feat: add published_at field support to announcements with scheduled publishing and student visibility filtering
Add published_at field to announcement creation and updates, allowing instructors to schedule announcement publishing. Update student announcement filtering to only show PUBLISHED announcements where published_at <= now. Modify announcement creation to set published_at to provided value or current time for PUBLISHED status. Update announcement updates to handle published_at changes while
This commit is contained in:
parent
67f10c4287
commit
05755992a7
3 changed files with 41 additions and 8 deletions
|
|
@ -6,6 +6,7 @@ export interface Announcement {
|
|||
content: MultiLanguageText;
|
||||
status: string;
|
||||
is_pinned: boolean;
|
||||
published_at: Date | null;
|
||||
created_at: Date;
|
||||
updated_at: Date | null;
|
||||
attachments: AnnouncementAttachment[];
|
||||
|
|
@ -44,6 +45,7 @@ export interface CreateAnnouncementInput{
|
|||
content: MultiLanguageText;
|
||||
status: string;
|
||||
is_pinned: boolean;
|
||||
published_at?: Date;
|
||||
files?: Express.Multer.File[];
|
||||
}
|
||||
|
||||
|
|
@ -86,6 +88,7 @@ export interface UpdateAnnouncementInput{
|
|||
content: MultiLanguageText;
|
||||
status: string;
|
||||
is_pinned: boolean;
|
||||
published_at?: Date;
|
||||
attachments?: AnnouncementAttachment[];
|
||||
}
|
||||
|
||||
|
|
@ -112,6 +115,7 @@ export interface CreateAnnouncementBody {
|
|||
content: MultiLanguageText;
|
||||
status: string;
|
||||
is_pinned: boolean;
|
||||
published_at?: string;
|
||||
}
|
||||
|
||||
export interface UpdateAnnouncementBody {
|
||||
|
|
@ -119,4 +123,5 @@ export interface UpdateAnnouncementBody {
|
|||
content: MultiLanguageText;
|
||||
status: string;
|
||||
is_pinned: boolean;
|
||||
published_at?: string;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue