File tree Expand file tree Collapse file tree 3 files changed +15
-1
lines changed
Expand file tree Collapse file tree 3 files changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -2,4 +2,5 @@ export interface Announcement {
22 announcementId : string ;
33 title : string ;
44 text : string ;
5+ createdAt : Date | undefined ;
56}
Original file line number Diff line number Diff line change @@ -8,13 +8,15 @@ import { ClientService } from '../../api/client.service';
88import { BannerService } from '../../banners/banner.service' ;
99import { RefreshApiError } from '../../api/refresh-api-error' ;
1010import { ConfirmationDialogComponent } from "../ui/confirmation-dialog.component" ;
11+ import { DateComponent } from "../ui/info/date.component" ;
1112
1213@Component ( {
1314 selector : 'app-announcement' ,
1415 imports : [
1516 FaIconComponent ,
1617 ButtonComponent ,
17- ConfirmationDialogComponent
18+ ConfirmationDialogComponent ,
19+ DateComponent
1820] ,
1921 template : `
2022 <div class="bg-yellow rounded px-5 py-2.5">
@@ -30,6 +32,15 @@ import { ConfirmationDialogComponent } from "../ui/confirmation-dialog.component
3032 </div>
3133
3234 <p class="word-wrap-and-break">{{data.text}}</p>
35+
36+ @if (data.createdAt != null) {
37+ <div class="flex flex-row justify-end">
38+ <span class="italic">
39+ posted
40+ <app-date [date]="data.createdAt"></app-date>
41+ </span>
42+ </div>
43+ }
3344 </div>
3445
3546 @defer (when showDeletionDialog) { @if (showDeletionDialog) {
Original file line number Diff line number Diff line change @@ -58,6 +58,7 @@ export class ModPanelComponent {
5858 announcementId : "" ,
5959 title : "" ,
6060 text : "" ,
61+ createdAt : undefined ,
6162 } ;
6263 protected announcementForm = new FormGroup ( {
6364 title : new FormControl ( ) ,
@@ -147,6 +148,7 @@ export class ModPanelComponent {
147148 announcementId : "" ,
148149 title : "" ,
149150 text : "" ,
151+ createdAt : undefined ,
150152 } ;
151153 }
152154
You can’t perform that action at this time.
0 commit comments