Update admin view to include created date and last modified information
All checks were successful
Jenkins Production Deployment
All checks were successful
Jenkins Production Deployment
This commit is contained in:
parent
2d09046976
commit
a2ef25ad34
|
@ -22,12 +22,19 @@
|
||||||
<td>
|
<td>
|
||||||
<input type="text" [(ngModel)]="event!.location">
|
<input type="text" [(ngModel)]="event!.location">
|
||||||
</td>
|
</td>
|
||||||
<td>
|
|
||||||
{{event?.createdBy}}
|
|
||||||
</td>
|
|
||||||
<td class="{{invalidUrlError? 'has-error' : ''}}">
|
<td class="{{invalidUrlError? 'has-error' : ''}}">
|
||||||
<input type="text" [(ngModel)]="event!.url">
|
<input type="text" [(ngModel)]="event!.url">
|
||||||
</td>
|
</td>
|
||||||
|
<td>
|
||||||
|
By: {{event?.createdBy}}
|
||||||
|
<br>
|
||||||
|
At: {{printDate(event?.createdDate!)}}
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
By: {{event?.lastModifiedBy}}
|
||||||
|
<br>
|
||||||
|
At: {{printDate(event?.lastModifiedDate!)}}
|
||||||
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<select [(ngModel)]="event!.status">
|
<select [(ngModel)]="event!.status">
|
||||||
<option value="DRAFT">Draft</option>
|
<option value="DRAFT">Draft</option>
|
||||||
|
@ -73,10 +80,17 @@
|
||||||
{{event?.location}}
|
{{event?.location}}
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
{{event?.createdBy}}
|
{{event?.url}}
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
{{event?.url}}
|
By: {{event?.createdBy}}
|
||||||
|
<br>
|
||||||
|
At: {{printDate(event?.createdDate!)}}
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
By: {{event?.lastModifiedBy}}
|
||||||
|
<br>
|
||||||
|
At: {{printDate(event?.lastModifiedDate!)}}
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
{{getEventStatusFriendlyName()}}
|
{{getEventStatusFriendlyName()}}
|
||||||
|
|
|
@ -141,6 +141,20 @@ export class EventComponent implements OnInit {
|
||||||
return `${hours}:${minutes}`;
|
return `${hours}:${minutes}`;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
printDate(date: Date): string {
|
||||||
|
try {
|
||||||
|
let year = date.getFullYear();
|
||||||
|
let month = (date.getMonth() + 1).toString().padStart(2, '0');
|
||||||
|
let day = date.getDate().toString().padStart(2, '0');
|
||||||
|
let hours = date.getHours().toString().padStart(2, '0');
|
||||||
|
let minutes = date.getMinutes().toString().padStart(2, '0');
|
||||||
|
|
||||||
|
return `${day}.${month}.${year}, ${hours}:${minutes}`;
|
||||||
|
} catch (e) {
|
||||||
|
return '';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
parseDate(text: string): Date {
|
parseDate(text: string): Date {
|
||||||
return new Date(text);
|
return new Date(text);
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,8 +7,9 @@
|
||||||
<th>Start</th>
|
<th>Start</th>
|
||||||
<th>End</th>
|
<th>End</th>
|
||||||
<th>Location</th>
|
<th>Location</th>
|
||||||
<th>Created by</th>
|
|
||||||
<th>URL</th>
|
<th>URL</th>
|
||||||
|
<th>Created</th>
|
||||||
|
<th>Last Modified</th>
|
||||||
<th>Status</th>
|
<th>Status</th>
|
||||||
<th>Edit</th>
|
<th>Edit</th>
|
||||||
<th>Move</th>
|
<th>Move</th>
|
||||||
|
|
|
@ -7,8 +7,10 @@ export interface Event {
|
||||||
startDateTime: Date;
|
startDateTime: Date;
|
||||||
endDateTime: Date;
|
endDateTime: Date;
|
||||||
createdDate: Date;
|
createdDate: Date;
|
||||||
|
lastModifiedDate: Date;
|
||||||
location: string;
|
location: string;
|
||||||
createdBy: string;
|
createdBy: string;
|
||||||
|
lastModifiedBy: string;
|
||||||
url: string;
|
url: string;
|
||||||
wholeDay: boolean;
|
wholeDay: boolean;
|
||||||
status: string;
|
status: string;
|
||||||
|
|
|
@ -57,7 +57,8 @@ export class AdminComponent implements OnInit {
|
||||||
...event,
|
...event,
|
||||||
startDateTime: new Date(event.startDateTime),
|
startDateTime: new Date(event.startDateTime),
|
||||||
endDateTime: new Date(event.endDateTime),
|
endDateTime: new Date(event.endDateTime),
|
||||||
createdDate: new Date(event.createdDate)
|
createdDate: new Date(event.createdDate),
|
||||||
|
lastModifiedDate: new Date(event.lastModifiedDate)
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user