diff --git a/apps/red-ui/src/app/models/notification-preferences.ts b/apps/red-ui/src/app/models/notification-preferences.ts new file mode 100644 index 000000000..f3aad2a88 --- /dev/null +++ b/apps/red-ui/src/app/models/notification-preferences.ts @@ -0,0 +1,26 @@ +import { FormControl } from '@angular/forms'; + +export class NotificationPreferences { + //TODO replace hardcoded values with the ones from backend when it will be done + readonly isActive: FormControl = new FormControl(true); + readonly sendSchedule?: FormControl; + + readonly dossierStatusChanges: FormControl = new FormControl(true); + readonly requestToJoinTheDossier: FormControl = new FormControl(true); + readonly documentStatusChanges: FormControl = new FormControl(true); + readonly documentIsSentForApproval: FormControl = new FormControl(true); + + readonly whenIAmAssignedOnADocument: FormControl = new FormControl(true); + readonly whenIAmUnassignedFromADocument: FormControl = new FormControl(true); + readonly whenADocumentIsApproved: FormControl = new FormControl(true); + + readonly whenADocumentIsSentForApproval: FormControl = new FormControl(true); + readonly whenADocumentIsAssignedToAReviewer: FormControl = new FormControl(true); + readonly whenAReviewerIsUnassignedFromADocument: FormControl = new FormControl(true); + + constructor(sendSchedule?: string) { + if (sendSchedule) { + this.sendSchedule = new FormControl(sendSchedule); + } + } +} diff --git a/apps/red-ui/src/app/modules/account/screens/notifications/notifications-screen.component.html b/apps/red-ui/src/app/modules/account/screens/notifications/notifications-screen.component.html index f132cc2cf..e43fbbcec 100644 --- a/apps/red-ui/src/app/modules/account/screens/notifications/notifications-screen.component.html +++ b/apps/red-ui/src/app/modules/account/screens/notifications/notifications-screen.component.html @@ -12,37 +12,120 @@