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 @@
- - - - - - +
+
+
+ {{ + translations[category] | translate + }} +
- - - - +
+
+
+ + + {{ translations[schedule] | translate }} +
+
- - - - - - - - - - - - - - - - - - - +
+ +
+
+
+ + {{ 'notifications-screen.options.dossier-status-changes' | translate }} + + + {{ 'notifications-screen.options.request-to-join-the-dossier' | translate }} + + + {{ 'notifications-screen.options.document-status-changes' | translate }} + + + {{ 'notifications-screen.options.document-is-sent-for-approval' | translate }} + +
+
+ +
+
+
+ + {{ 'notifications-screen.options.when-i-am-assigned-on-a-document' | translate }} + + + {{ 'notifications-screen.options.when-i-am-unassigned-from-a-document' | translate }} + + + {{ 'notifications-screen.options.when-a-document-is-approved' | translate }} + +
+
+ +
+
+
+ + {{ 'notifications-screen.options.when-a-document-is-sent-for-approval' | translate }} + + + {{ 'notifications-screen.options.when-a-document-is-assigned-to-a-reviewer' | translate }} + + + {{ + 'notifications-screen.options.when-a-reviewer-is-unassigned-from-a-document' | translate + }} + +
+
+
+
+