#6: Add ability to create whole-day events
All checks were successful
Jenkins Production Deployment

This commit is contained in:
Patrick Müller 2022-12-28 12:33:20 +01:00
parent effb0efb6d
commit aa0d03c86a
Signed by: Paddy
GPG Key ID: 37ABC11275CAABCE
4 changed files with 12 additions and 5 deletions

View File

@ -8,13 +8,16 @@
<td>
<input type="text" [(ngModel)]="event!.description">
</td>
<td>
<input type="checkbox" [(ngModel)]="event!.wholeDay">
</td>
<td class="{{showDateError || requiredFieldsMissing? 'has-error' : ''}}">
<input type="date" [(ngModel)]="newStartDate" (change)="setStartDateTime()">
<input type="time" [(ngModel)]="newStartTime" (change)="setStartDateTime()">
<input type="time" [(ngModel)]="newStartTime" (change)="setStartDateTime()" *ngIf="!this.event!.wholeDay">
</td>
<td class="{{showDateError || requiredFieldsMissing? 'has-error' : ''}}">
<input type="date" [(ngModel)]="newEndDate" (change)="setEndDateTime()">
<input type="time" [(ngModel)]="newEndTime" (change)="setEndDateTime()">
<input type="time" [(ngModel)]="newEndTime" (change)="setEndDateTime()" *ngIf="!this.event!.wholeDay">
</td>
<td>
<input type="text" [(ngModel)]="event!.location">
@ -45,13 +48,16 @@
<td>
{{event?.description}}
</td>
<td>
<input type="checkbox" [(ngModel)]="event!.wholeDay" disabled>
</td>
<td>
<input type="date" [value]="newStartDate" readonly>
<input type="time" [value]="newStartTime" readonly>
<input type="time" [value]="newStartTime" readonly *ngIf="!this.event!.wholeDay">
</td>
<td>
<input type="date" [value]="newEndDate" readonly>
<input type="time" [value]="newEndTime" readonly>
<input type="time" [value]="newEndTime" readonly *ngIf="!this.event!.wholeDay">
</td>
<td>
{{event?.location}}

View File

@ -63,7 +63,6 @@ export class EventComponent implements OnInit {
this.showCreateError = true;
return;
}
});
} else {
// Update existing event

View File

@ -3,6 +3,7 @@
<th>Calendar</th>
<th>Name</th>
<th>Description</th>
<th>Whole Day</th>
<th>Start</th>
<th>End</th>
<th>Location</th>

View File

@ -10,4 +10,5 @@ export interface Event {
location: string;
createdBy: string;
url: string;
wholeDay: boolean;
}