From e04d8534b73ae00be6440177892172565bf1cc7c Mon Sep 17 00:00:00 2001 From: Valentin Date: Mon, 6 Dec 2021 22:58:57 +0200 Subject: [PATCH 01/15] updated date pipe logic for "shophisticatedDate" branch --- apps/red-ui/src/app/modules/shared/pipes/date.pipe.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/apps/red-ui/src/app/modules/shared/pipes/date.pipe.ts b/apps/red-ui/src/app/modules/shared/pipes/date.pipe.ts index d4017a2f1..b2a1364ee 100644 --- a/apps/red-ui/src/app/modules/shared/pipes/date.pipe.ts +++ b/apps/red-ui/src/app/modules/shared/pipes/date.pipe.ts @@ -90,13 +90,15 @@ export class DatePipe extends BaseDatePipe implements PipeTransform { return this._translateService.instant('yesterday'); } - const isShortMonthFormat = day < thisDay - 1 && (year === thisYear || month >= thisMonth - 3); + const isShortMonthFormat = + year === thisYear && + ((month === thisMonth && day !== thisDay && day !== thisDay - 1) || (month !== thisMonth && month >= thisMonth - 2)); if (isShortMonthFormat) { const translatedMonth = this._translateService.instant(MONTH_NAMES[month]); return `${day} ${translatedMonth}`; } - const isShortMonthYearFormat = year === thisYear - 1 && month < thisMonth - 3; + const isShortMonthYearFormat = (year === thisYear && month <= thisMonth - 3) || year === thisYear - 1; if (isShortMonthYearFormat) { const translatedMonth = this._translateService.instant(MONTH_NAMES[month]); return `${translatedMonth} ${year}`; From d4144150bff4df8ca919facbdcd17691e889558b Mon Sep 17 00:00:00 2001 From: Bamboo Date: Mon, 6 Dec 2021 22:10:03 +0100 Subject: [PATCH 02/15] chore(release) --- package.json | 2 +- paligo-theme.tar.gz | Bin 3207 -> 3207 bytes 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 72d2e6142..f1fb2aaad 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "redaction", - "version": "3.86.0", + "version": "3.87.0", "private": true, "license": "MIT", "scripts": { diff --git a/paligo-theme.tar.gz b/paligo-theme.tar.gz index 063b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8YAN0+~o2$CXdrmn4j?*BRE+|KRX t&h6aJ?cC1o+|KRX&h6aJ?cC1o+|KRX&h6aJ?cAQ#{tH?~f?)tq008_#L8brz From e4a9d87b99c8a9773408bc4864d0ecf18170c856 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adina=20=C8=9Aeudan?= Date: Tue, 7 Dec 2021 05:20:25 +0200 Subject: [PATCH 03/15] RED-2828 --- apps/red-ui/src/assets/i18n/en.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/red-ui/src/assets/i18n/en.json b/apps/red-ui/src/assets/i18n/en.json index 171d9267d..5f29a6483 100644 --- a/apps/red-ui/src/assets/i18n/en.json +++ b/apps/red-ui/src/assets/i18n/en.json @@ -769,7 +769,7 @@ }, "dictionaries": "{length} {length, plural, one{dictionary} other{dictionaries}}", "error": { - "conflict": "Cannot delete this DossierTemplate! At least on Dossier uses this template!", + "conflict": "Cannot delete this DossierTemplate! At least one Dossier uses this template!", "generic": "Cannot delete this DossierTemplate!" }, "no-data": { From 11e7090dc756a7d7c295a01f131aa3f1f4d24dd7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adina=20=C8=9Aeudan?= Date: Tue, 7 Dec 2021 05:43:05 +0200 Subject: [PATCH 04/15] RED-2787 --- apps/red-ui/src/app/services/permissions.service.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/apps/red-ui/src/app/services/permissions.service.ts b/apps/red-ui/src/app/services/permissions.service.ts index 65f8c7b24..fd313f45f 100644 --- a/apps/red-ui/src/app/services/permissions.service.ts +++ b/apps/red-ui/src/app/services/permissions.service.ts @@ -30,9 +30,15 @@ export class PermissionsService { return file.assignee === this._userService.currentUser.id; } + // https://jira.iqser.com/browse/RED-2787 canDeleteFile(file: File): boolean { const dossier = this._getDossier(file); - return (this.isOwner(dossier) && !file.isApproved) || file.isNew; + return ( + file.isNew || + (file.isUnderReview && !file.assignee && this.isDossierMember(dossier)) || + (file.isUnderApproval && !file.assignee && this.isApprover(dossier)) || + (file.assignee && !file.isApproved && (this.isFileAssignee(file) || this.isOwner(dossier))) + ); } canAssignToSelf(file: File, dossier = this._getDossier(file)): boolean { From 31821348928fc6824f625997ef08352583cf914b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adina=20=C8=9Aeudan?= Date: Tue, 7 Dec 2021 05:43:36 +0200 Subject: [PATCH 05/15] Minor updates --- .../general-config-form.component.html | 7 ++++--- .../general-config-screen.component.html | 4 ++-- .../general-config-screen.component.scss | 14 -------------- .../dossier-details/dossier-details.component.scss | 4 ---- libs/common-ui | 2 +- 5 files changed, 7 insertions(+), 24 deletions(-) diff --git a/apps/red-ui/src/app/modules/admin/screens/general-config/general-config-form/general-config-form.component.html b/apps/red-ui/src/app/modules/admin/screens/general-config/general-config-form/general-config-form.component.html index 7b53e6abd..d85baac5a 100644 --- a/apps/red-ui/src/app/modules/admin/screens/general-config/general-config-form/general-config-form.component.html +++ b/apps/red-ui/src/app/modules/admin/screens/general-config/general-config-form/general-config-form.component.html @@ -15,9 +15,10 @@ /> -
- - +
+ {{ 'general-config-screen.general.form.forgot-password' | translate }} +
diff --git a/apps/red-ui/src/app/modules/admin/screens/general-config/general-config-screen.component.html b/apps/red-ui/src/app/modules/admin/screens/general-config/general-config-screen.component.html index 58e0678e1..af303ea03 100644 --- a/apps/red-ui/src/app/modules/admin/screens/general-config/general-config-screen.component.html +++ b/apps/red-ui/src/app/modules/admin/screens/general-config/general-config-screen.component.html @@ -21,10 +21,10 @@
-
+
-
+
diff --git a/apps/red-ui/src/app/modules/admin/screens/general-config/general-config-screen.component.scss b/apps/red-ui/src/app/modules/admin/screens/general-config/general-config-screen.component.scss index ba039443f..98e4dc474 100644 --- a/apps/red-ui/src/app/modules/admin/screens/general-config/general-config-screen.component.scss +++ b/apps/red-ui/src/app/modules/admin/screens/general-config/general-config-screen.component.scss @@ -10,20 +10,6 @@ overflow: auto; } -.w-100 { - min-width: 100px; - width: 100px; -} - -.inline-input-group { - background-color: rgba(variables.$grey-6, 0.8); - width: 100%; - height: 38px; - border-radius: 4px; - padding: 1px 11px; - margin-top: 20px; -} - .dialog { width: 100%; min-height: unset; diff --git a/apps/red-ui/src/app/modules/dossier/screens/dossier-overview/components/dossier-details/dossier-details.component.scss b/apps/red-ui/src/app/modules/dossier/screens/dossier-overview/components/dossier-details/dossier-details.component.scss index 2c5d7243a..590bd275b 100644 --- a/apps/red-ui/src/app/modules/dossier/screens/dossier-overview/components/dossier-details/dossier-details.component.scss +++ b/apps/red-ui/src/app/modules/dossier/screens/dossier-overview/components/dossier-details/dossier-details.component.scss @@ -41,7 +41,3 @@ } } } - -.mt-12 { - margin-top: 12px; -} diff --git a/libs/common-ui b/libs/common-ui index 5d584893d..f97305cab 160000 --- a/libs/common-ui +++ b/libs/common-ui @@ -1 +1 @@ -Subproject commit 5d584893d7e3067e0abfd09d2fc6b567305e9b43 +Subproject commit f97305cab6b7942b8095762e674f233ced092bbd From 033a7c7e687ab8c88b0a06f01fe68e0a39aa7e5a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adina=20=C8=9Aeudan?= Date: Tue, 7 Dec 2021 05:50:23 +0200 Subject: [PATCH 06/15] RED-2842 --- apps/red-ui/src/app/modules/admin/admin-routing.module.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/apps/red-ui/src/app/modules/admin/admin-routing.module.ts b/apps/red-ui/src/app/modules/admin/admin-routing.module.ts index 276e1b59d..74ee574cc 100644 --- a/apps/red-ui/src/app/modules/admin/admin-routing.module.ts +++ b/apps/red-ui/src/app/modules/admin/admin-routing.module.ts @@ -175,6 +175,7 @@ const routes: Routes = [ canActivate: [CompositeRouteGuard], data: { routeGuards: [AuthGuard, RedRoleGuard, AppStateGuard], + requiredRoles: ['RED_MANAGER'], }, }, ]; From 83234ee804f3ce1709a736586d02fe8f179cf2d0 Mon Sep 17 00:00:00 2001 From: Bamboo Date: Tue, 7 Dec 2021 04:59:34 +0100 Subject: [PATCH 07/15] chore(release) --- package.json | 2 +- paligo-theme.tar.gz | Bin 3207 -> 3208 bytes 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index f1fb2aaad..390ad809d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "redaction", - "version": "3.87.0", + "version": "3.88.0", "private": true, "license": "MIT", "scripts": { diff --git a/paligo-theme.tar.gz b/paligo-theme.tar.gz index 4044cac26bd02d961105fb37600cdfb819ae2e01..c6b10c27029fb9c1af23e48653c6723f1c59322e 100644 GIT binary patch literal 3208 zcmV;340rP%iwFP!000001MM5za^tpjpZyi6Gws-^DDx`G@?^WoG-+QtohE7f(ie~f zMRX~WA;Go19nbVP`qYYqnF>3xB;erS+;A=cGQTNtMmL4U zQnDpCuRcbzp)CVjd^*AMmF+B{EyQoxUOB!KctH@@3xIQ6#}8hi;G@g$tk7W&~>)&7c&RPFIMcb?Yio`f#a%>*e_4C%?3SRhA z`u7~$3p)KTY|njVyBy*bvVUAw&F%kO|8JrcS2bbi^3UIXWvwpnF5b{>SyT))Rd#im zGFH~>o13J_Sv}tr#U>-Tr1d;1wl`o9?r##jrPu+#guPMXX?0%E7H}=f4 z?K^wsi@$;RyAXeu;_nLnIs(QKFphw61dJnK91ioVnAT;6A3v+_ad~-tcQNPm;mk@2 zj!A|7ae>f#i{>$TSR>~Sex-!M`fKC|cKL93@idsRUWX(pDk5fvIC{%9o5xmEWJR?` zpSUZ}^_}rNlsaMx7lu{S_hgM0K3_m~-OFV;N6?qioLC(xt7Qwg#np!97As1aywdu@ zg0W%?R2zv#-OrlfDoO<*Tl`?%)0m}z%eGZyYlItC@ZV)oQ$`EusYr$yeMb)Cp0}S? zLP-{jmE+yLEg^tC@dk% z+sVEDaR{nv7~ynPEk(jkcj&n~ok@MM3buENE0VK2BmYrT)x4`LXwFDwumzi2gZR%r zj)iqvyp!@a7*HJhaUd{VyxEeNVpQbWBdVi{kR0JWMpw!fS@QjMEpVClwWdMeZRKFz z+XKx8a(6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jDUO$V+xJr@^Y+%E7l! zB|%$YBf=Gtya@kfJWi&Bt@rF(dd2pd%}6P znzi#x2B?B*A$Q_OTYV5W4n!+GtE912;-6l~ z6UTp&7`ZbiY1)1Dr0uFCg}VwMRNvSe>X!`DT&c5to^LBE#IKlvba*z~UJ_9Kmvj*k z&Y~+w!jXj>a2MAq0Vwq(^6guXc>5`lZa=tWQg5_bpf7|;`)k~-7>RVH^B0vJcBO_~ zso+*h)LOOCCz)_bs{JZ;w@F*(HjH=>=X2p7}?w7 zvMM4HgZ7COZC*1{9=JC<5#l+f5M|6eo&Ehj#CHv;`&(|t45{z&8nJlf9K{KiE&L2J z^dE7s%Vp&S$=-}6^ntHKnRLn|rghP1&0sRZddU0lhY9~^UYUDNJ|*$(ZR<6<febqu% zmEE%ss88+>D**dfFcBB#>usy^gp)bbTjYSbrJ|ZwRrwD0>iMpg~k*KZNKV z3(@yfh>GgG(BVIgHE$I3ot896h~wCCpYstz%pR<3JUacI1dtR_Gj(kJbN}a*b2*oD tIhS)emvcFnb2*oDIhS)emvcFnb2*oDIhS)emvebm`7gYdED``v001j=Ftz{y From bf8e1cb54e6975677e6e22963010acd110a67403 Mon Sep 17 00:00:00 2001 From: Edi Cziszter Date: Tue, 16 Nov 2021 18:20:50 +0200 Subject: [PATCH 08/15] greySelected flag instead of dossierView button type --- libs/common-ui | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/common-ui b/libs/common-ui index f97305cab..e14472a48 160000 --- a/libs/common-ui +++ b/libs/common-ui @@ -1 +1 @@ -Subproject commit f97305cab6b7942b8095762e674f233ced092bbd +Subproject commit e14472a48a09b633402ebf78ffc360448b5f8f58 From 2afda405f3fbcb13e6dac33bea41d67ade41c417 Mon Sep 17 00:00:00 2001 From: Edi Cziszter Date: Mon, 22 Nov 2021 12:08:47 +0200 Subject: [PATCH 09/15] grey selected treu for dossier view buttons --- .../view-mode-selection/view-mode-selection.component.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/red-ui/src/app/modules/dossier/screens/dossier-overview/components/view-mode-selection/view-mode-selection.component.html b/apps/red-ui/src/app/modules/dossier/screens/dossier-overview/components/view-mode-selection/view-mode-selection.component.html index 1ce54287c..c1ed86bc3 100644 --- a/apps/red-ui/src/app/modules/dossier/screens/dossier-overview/components/view-mode-selection/view-mode-selection.component.html +++ b/apps/red-ui/src/app/modules/dossier/screens/dossier-overview/components/view-mode-selection/view-mode-selection.component.html @@ -5,7 +5,7 @@ (action)="configService.listingMode = listingModes.table" [attr.aria-expanded]="mode === listingModes.table" [tooltip]="'view-mode.list' | translate" - [type]="circleButtonTypes.dossierView" + [greySelected]="true" icon="iqser:list" > @@ -13,7 +13,7 @@ (action)="configService.listingMode = listingModes.workflow" [attr.aria-expanded]="mode === listingModes.workflow" [tooltip]="'view-mode.workflow' | translate" - [type]="circleButtonTypes.dossierView" + [greySelected]="true" icon="iqser:lanes" >
From 6c36dfdd307301fa7a9f72e95c018192e4d5491c Mon Sep 17 00:00:00 2001 From: Edi Cziszter Date: Tue, 7 Dec 2021 13:30:46 +0200 Subject: [PATCH 10/15] greyselected in common-ui --- libs/common-ui | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/common-ui b/libs/common-ui index e14472a48..8f440491e 160000 --- a/libs/common-ui +++ b/libs/common-ui @@ -1 +1 @@ -Subproject commit e14472a48a09b633402ebf78ffc360448b5f8f58 +Subproject commit 8f440491e8006cad8d64ee62b1b84b97be747413 From 9939711f267f54352c967660b42a1bf75500069a Mon Sep 17 00:00:00 2001 From: Timo Bejan Date: Tue, 7 Dec 2021 14:27:06 +0200 Subject: [PATCH 11/15] preparation for notification preferences --- .../notifications-screen.component.html | 8 ++++--- .../notifications-translations.ts | 1 - apps/red-ui/src/assets/i18n/en.json | 3 +-- .../red-domain/src/lib/notifications/types.ts | 23 +++++++++---------- 4 files changed, 17 insertions(+), 18 deletions(-) diff --git a/apps/red-ui/src/app/modules/account/screens/notifications/notifications-screen/notifications-screen.component.html b/apps/red-ui/src/app/modules/account/screens/notifications/notifications-screen/notifications-screen.component.html index 8c76795dc..db13ee0bd 100644 --- a/apps/red-ui/src/app/modules/account/screens/notifications/notifications-screen/notifications-screen.component.html +++ b/apps/red-ui/src/app/modules/account/screens/notifications/notifications-screen/notifications-screen.component.html @@ -18,8 +18,9 @@
-
-
+ + +
-
+ +
diff --git a/apps/red-ui/src/app/translations/notifications-translations.ts b/apps/red-ui/src/app/translations/notifications-translations.ts index 04d9977ea..adf4ca5bb 100644 --- a/apps/red-ui/src/app/translations/notifications-translations.ts +++ b/apps/red-ui/src/app/translations/notifications-translations.ts @@ -5,7 +5,6 @@ export const notificationsTranslations: { [key in NotificationType]: string } = [NotificationTypes.ASSIGN_APPROVER]: _('notification.assign-approver'), [NotificationTypes.ASSIGN_REVIEWER]: _('notification.assign-reviewer'), [NotificationTypes.DOCUMENT_APPROVED]: _('notification.document-approved'), - [NotificationTypes.DOSSIER_OWNER_DELETED]: _('notification.dossier-owner-deleted'), [NotificationTypes.DOSSIER_OWNER_REMOVED]: _('notification.dossier-owner-removed'), [NotificationTypes.DOSSIER_OWNER_SET]: _('notification.dossier-owner-set'), [NotificationTypes.UNASSIGNED_FROM_FILE]: _('notification.unassigned-from-file'), diff --git a/apps/red-ui/src/assets/i18n/en.json b/apps/red-ui/src/assets/i18n/en.json index 5f29a6483..d5bce048b 100644 --- a/apps/red-ui/src/assets/i18n/en.json +++ b/apps/red-ui/src/assets/i18n/en.json @@ -1288,7 +1288,6 @@ "assign-reviewer": "You have been assigned as reviewer for {fileName} in the {dossierName}!", "document-approved": " {fileName} has been approved!", "dossier-deleted": "Dossier: {dossierName} has been deleted!", - "dossier-owner-deleted": "{dossierName} owner removed!", "dossier-owner-removed": "{dossierName} owner removed!", "dossier-owner-set": " {dossierName} owner changed to {user}!", "no-data": "You currently have no notifications", @@ -1312,7 +1311,7 @@ "own": "Dossiers you own", "reviewer": "Dossiers you are reviewer on" }, - "options-title": "Choose on which category you want to be notified", + "options-title": "Choose on which action you want to be notified", "options": { "document-is-sent-for-approval": "Document is sent for approval", "document-status-changes": "Document status changes", diff --git a/libs/red-domain/src/lib/notifications/types.ts b/libs/red-domain/src/lib/notifications/types.ts index e9788ca3d..fb1465a6f 100644 --- a/libs/red-domain/src/lib/notifications/types.ts +++ b/libs/red-domain/src/lib/notifications/types.ts @@ -1,16 +1,15 @@ export const NotificationTypes = { - ASSIGN_REVIEWER: 'ASSIGN_REVIEWER', - ASSIGN_APPROVER: 'ASSIGN_APPROVER', - UNASSIGNED_FROM_FILE: 'UNASSIGNED_FROM_FILE', - DOCUMENT_APPROVED: 'DOCUMENT_APPROVED', - DOSSIER_OWNER_SET: 'DOSSIER_OWNER_SET', - DOSSIER_OWNER_REMOVED: 'DOSSIER_OWNER_REMOVED', - USER_BECOMES_DOSSIER_MEMBER: 'USER_BECOMES_DOSSIER_MEMBER', - DOSSIER_DELETED: 'DOSSIER_DELETED', - USER_REMOVED_AS_DOSSIER_MEMBER: 'USER_REMOVED_AS_DOSSIER_MEMBER', - USER_PROMOTED_TO_APPROVER: 'USER_PROMOTED_TO_APPROVER', - USER_DEGRADED_TO_REVIEWER: 'USER_DEGRADED_TO_REVIEWER', - DOSSIER_OWNER_DELETED: 'DOSSIER_OWNER_DELETED', + ASSIGN_REVIEWER: 'ASSIGN_REVIEWER', // "You are assigned as review" + ASSIGN_APPROVER: 'ASSIGN_APPROVER', // "You are assigned as approver" + UNASSIGNED_FROM_FILE: 'UNASSIGNED_FROM_FILE', // "You are unassigned" + DOCUMENT_APPROVED: 'DOCUMENT_APPROVED', // "A document has been approved" + DOSSIER_OWNER_SET: 'DOSSIER_OWNER_SET', // "Dossier owner has changed" + DOSSIER_OWNER_REMOVED: 'DOSSIER_OWNER_REMOVED', // "Dossier owner has been removed" + USER_BECOMES_DOSSIER_MEMBER: 'USER_BECOMES_DOSSIER_MEMBER', // "You have been assigned to a dossier" + DOSSIER_DELETED: 'DOSSIER_DELETED', // "A dossier has been deleted" + USER_REMOVED_AS_DOSSIER_MEMBER: 'USER_REMOVED_AS_DOSSIER_MEMBER', // "You have been removed from a dossier" + USER_PROMOTED_TO_APPROVER: 'USER_PROMOTED_TO_APPROVER', // "You are promoted to approver" + USER_DEGRADED_TO_REVIEWER: 'USER_DEGRADED_TO_REVIEWER', // "You are denoted to reviewer" } as const; export type NotificationType = keyof typeof NotificationTypes; From 3b361306cdb761031e581d72f662c44298cfb73c Mon Sep 17 00:00:00 2001 From: Bamboo Date: Tue, 7 Dec 2021 13:42:08 +0100 Subject: [PATCH 12/15] chore(release) --- package.json | 2 +- paligo-theme.tar.gz | Bin 3208 -> 3207 bytes 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 390ad809d..ffa73e70b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "redaction", - "version": "3.88.0", + "version": "3.89.0", "private": true, "license": "MIT", "scripts": { diff --git a/paligo-theme.tar.gz b/paligo-theme.tar.gz index c6b10c27029fb9c1af23e48653c6723f1c59322e..dd6f26406ab006768ef6efe465dd4215c5ed6e1e 100644 GIT binary patch literal 3207 zcmV;240!V&iwFP!000001MM5ha^$vk&iV>OuB0TV+2Y#WYLzErSM21HO2u}POD-S@ zHj!bIGzpHRNvSHoky9@I4BzHY@+ElyK{h~wy+|HARcWZENn&|;8{Pt7<~JqI=%%n( zO19+Y)yF6{lx1LxrxPq++0GKmLVU~e%JH4RTLdn&LA&et!7CJe6l?~isTr;iI@m8S zHdWD-A0MHgw#;?;%a58pW~BbHwBdC5`%B+B%m1e+d*xq|7)MOD&7-=0-W*)O3x7)f zo@0AKCx6d%gIBf-e;|MR$0gNV{?FzACQ5Nt6NWDT{OwoP>hkX54c(SS#ZXgaSC=Vc zWxc++Ns64+^G#7~GJ;E5&!b{{0}A2(Cc#^pJ%0AblH|Ys2IuvfGMvrsHz|8#&pg|{ zvuD2e4aDz4{4T}s3Vt2Y#}R!T(Z>;e9MQ+&eSQ_wy3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K!Kk_hk0`#;q*hwVMK6)KVe;E2se6apBR^AX}_fYmA#z4cU=zfUN zI~JqwsTdX0d11hR8e85d={v1xkQm3g Date: Tue, 7 Dec 2021 15:33:57 +0200 Subject: [PATCH 13/15] RED-2839: Handle edit dossier dialog when save action fails --- .../edit-dossier-attributes.component.ts | 12 ++-- ...dit-dossier-deleted-documents.component.ts | 13 ++--- .../edit-dossier-dictionary.component.ts | 58 +++++++++++-------- ...edit-dossier-download-package.component.ts | 43 +++++++------- .../edit-dossier-dialog.component.html | 11 +--- .../edit-dossier-dialog.component.ts | 22 +++---- .../edit-dossier-section.interface.ts | 4 +- .../edit-dossier-team.component.html} | 0 .../edit-dossier-team.component.scss} | 4 +- .../edit-dossier-team.component.ts} | 25 ++++---- .../edit-dossier-general-info.component.ts | 17 +++--- .../app/modules/dossier/dossiers.module.ts | 4 +- .../dossiers-listing-actions.component.ts | 9 +-- .../table-item/table-item.component.html | 6 +- .../table-item/table-item.component.ts | 3 +- .../dossiers-listing-screen.component.html | 2 +- .../dossiers-listing-screen.component.ts | 11 ++-- 17 files changed, 118 insertions(+), 126 deletions(-) rename apps/red-ui/src/app/modules/dossier/{components/team-members-manager/team-members-manager.component.html => dialogs/edit-dossier-dialog/edit-dossier-team/edit-dossier-team.component.html} (100%) rename apps/red-ui/src/app/modules/dossier/{components/team-members-manager/team-members-manager.component.scss => dialogs/edit-dossier-dialog/edit-dossier-team/edit-dossier-team.component.scss} (91%) rename apps/red-ui/src/app/modules/dossier/{components/team-members-manager/team-members-manager.component.ts => dialogs/edit-dossier-dialog/edit-dossier-team/edit-dossier-team.component.ts} (86%) diff --git a/apps/red-ui/src/app/modules/dossier/dialogs/edit-dossier-dialog/attributes/edit-dossier-attributes.component.ts b/apps/red-ui/src/app/modules/dossier/dialogs/edit-dossier-dialog/attributes/edit-dossier-attributes.component.ts index c1903040d..18b30ea9a 100644 --- a/apps/red-ui/src/app/modules/dossier/dialogs/edit-dossier-dialog/attributes/edit-dossier-attributes.component.ts +++ b/apps/red-ui/src/app/modules/dossier/dialogs/edit-dossier-dialog/attributes/edit-dossier-attributes.component.ts @@ -1,5 +1,5 @@ -import { Component, ElementRef, EventEmitter, Input, OnInit, Output, QueryList, ViewChildren } from '@angular/core'; -import { EditDossierSectionInterface } from '../edit-dossier-section.interface'; +import { Component, ElementRef, Input, OnInit, QueryList, ViewChildren } from '@angular/core'; +import { EditDossierSaveResult, EditDossierSectionInterface } from '../edit-dossier-section.interface'; import { Dossier, DossierAttributeConfigType, DossierAttributeConfigTypes, DossierAttributeWithValue } from '@red/domain'; import { PermissionsService } from '@services/permissions.service'; import { CircleButtonTypes, IconButtonTypes, LoadingService, Toaster } from '@iqser/common-ui'; @@ -19,7 +19,6 @@ export class EditDossierAttributesComponent implements EditDossierSectionInterfa readonly dossierAttributeConfigTypes = DossierAttributeConfigTypes; @Input() dossier: Dossier; - @Output() readonly updateDossier = new EventEmitter(); customAttributes: DossierAttributeWithValue[] = []; imageAttributes: DossierAttributeWithValue[] = []; attributes: DossierAttributeWithValue[] = []; @@ -64,7 +63,7 @@ export class EditDossierAttributesComponent implements EditDossierSectionInterfa this._loadingService.stop(); } - async save() { + async save(): EditDossierSaveResult { const dossierAttributeList = this.attributes.map(attr => ({ dossierAttributeConfigId: attr.id, value: this.currentAttrValue(attr), @@ -72,9 +71,10 @@ export class EditDossierAttributesComponent implements EditDossierSectionInterfa try { await this._dossierAttributesService.setAttributes(this.dossier, dossierAttributeList).toPromise(); await this._loadAttributes(); - this.updateDossier.emit(); - } catch (e) { + return { success: true }; + } catch (error) { this._toaster.error(_('edit-dossier-dialog.attributes.error.generic')); + return { success: false }; } } diff --git a/apps/red-ui/src/app/modules/dossier/dialogs/edit-dossier-dialog/deleted-documents/edit-dossier-deleted-documents.component.ts b/apps/red-ui/src/app/modules/dossier/dialogs/edit-dossier-dialog/deleted-documents/edit-dossier-deleted-documents.component.ts index 6a9336c7e..7a8035ada 100644 --- a/apps/red-ui/src/app/modules/dossier/dialogs/edit-dossier-dialog/deleted-documents/edit-dossier-deleted-documents.component.ts +++ b/apps/red-ui/src/app/modules/dossier/dialogs/edit-dossier-dialog/deleted-documents/edit-dossier-deleted-documents.component.ts @@ -1,5 +1,5 @@ -import { Component, EventEmitter, forwardRef, Injector, Input, OnInit, Output } from '@angular/core'; -import { EditDossierSectionInterface } from '../edit-dossier-section.interface'; +import { Component, forwardRef, Injector, Input, OnInit } from '@angular/core'; +import { EditDossierSaveResult, EditDossierSectionInterface } from '../edit-dossier-section.interface'; import { Dossier, IFile } from '@red/domain'; import { CircleButtonTypes, @@ -16,7 +16,7 @@ import { marker as _ } from '@biesbjerg/ngx-translate-extract-marker'; import * as moment from 'moment'; import { ConfigService } from '@services/config.service'; import { getLeftDateTime } from '@utils/functions'; -import { Observable } from 'rxjs'; +import { Observable, of } from 'rxjs'; import { distinctUntilChanged, map } from 'rxjs/operators'; import { DossiersDialogService } from '../../../services/dossiers-dialog.service'; import { FilesService } from '@services/entity-services/files.service'; @@ -38,7 +38,6 @@ interface FileListItem extends IFile, IListable { }) export class EditDossierDeletedDocumentsComponent extends ListingComponent implements EditDossierSectionInterface, OnInit { @Input() dossier: Dossier; - @Output() readonly updateDossier = new EventEmitter(); readonly changed = false; readonly canRestoreSelected$ = this._canRestoreSelected$; disabled: boolean; @@ -101,7 +100,9 @@ export class EditDossierDeletedDocumentsComponent extends ListingComponent f.fileId); await this._fileManagementService.hardDelete(this.dossier.id, fileIds).toPromise(); this._removeFromList(fileIds); - this.updateDossier.emit(); } private _removeFromList(ids: string[]): void { diff --git a/apps/red-ui/src/app/modules/dossier/dialogs/edit-dossier-dialog/dictionary/edit-dossier-dictionary.component.ts b/apps/red-ui/src/app/modules/dossier/dialogs/edit-dossier-dialog/dictionary/edit-dossier-dictionary.component.ts index bf9246d99..ba2dc7296 100644 --- a/apps/red-ui/src/app/modules/dossier/dialogs/edit-dossier-dialog/dictionary/edit-dossier-dictionary.component.ts +++ b/apps/red-ui/src/app/modules/dossier/dialogs/edit-dossier-dialog/dictionary/edit-dossier-dictionary.component.ts @@ -1,11 +1,12 @@ -import { Component, EventEmitter, Input, OnInit, Output, ViewChild } from '@angular/core'; +import { Component, Input, OnInit, ViewChild } from '@angular/core'; import { Dossier, IDictionary } from '@red/domain'; -import { EditDossierSectionInterface } from '../edit-dossier-section.interface'; +import { EditDossierSaveResult, EditDossierSectionInterface } from '../edit-dossier-section.interface'; import { PermissionsService } from '@services/permissions.service'; import { DictionaryManagerComponent } from '@shared/components/dictionary-manager/dictionary-manager.component'; import { DictionaryService } from '@shared/services/dictionary.service'; -import { CircleButtonTypes, LoadingService } from '@iqser/common-ui'; +import { CircleButtonTypes, LoadingService, Toaster } from '@iqser/common-ui'; import { DossiersService } from '@services/entity-services/dossiers.service'; +import { marker as _ } from '@biesbjerg/ngx-translate-extract-marker'; @Component({ selector: 'redaction-edit-dossier-dictionary', @@ -14,7 +15,6 @@ import { DossiersService } from '@services/entity-services/dossiers.service'; }) export class EditDossierDictionaryComponent implements EditDossierSectionInterface, OnInit { @Input() dossier: Dossier; - @Output() readonly updateDossier = new EventEmitter(); canEdit = false; readonly circleButtonTypes = CircleButtonTypes; dossierDictionary: IDictionary; @@ -26,6 +26,7 @@ export class EditDossierDictionaryComponent implements EditDossierSectionInterfa private readonly _dictionaryService: DictionaryService, private readonly _permissionsService: PermissionsService, private readonly _loadingService: LoadingService, + private readonly _toaster: Toaster, ) {} get changed() { @@ -44,27 +45,38 @@ export class EditDossierDictionaryComponent implements EditDossierSectionInterfa } async updateDisplayName(label: string) { - const dictionary: IDictionary = { ...this.dossierDictionary, label }; - await this._dictionaryService - .updateDictionary(dictionary, this.dossier.dossierTemplateId, 'dossier_redaction', this.dossier.id) - .toPromise(); - await this._updateDossierDictionary(); - this.updateDossier.emit(); + try { + this._loadingService.start(); + // TODO: Setting the type manually shouldn't be necessary, but for now it fails with status code 500... + const dictionary: IDictionary = { ...this.dossierDictionary, type: 'dossier_redaction', label }; + await this._dictionaryService + .updateDictionary(dictionary, this.dossier.dossierTemplateId, 'dossier_redaction', this.dossier.id) + .toPromise(); + await this._updateDossierDictionary(); + this._toaster.success(_('edit-dossier-dialog.dictionary.display-name.success')); + } catch (error) { + this._toaster.error(_('edit-dossier-dialog.dictionary.display-name.error')); + } + this._loadingService.stop(); } - async save() { - await this._dictionaryService - .saveEntries( - this._dictionaryManager.editor.currentEntries, - this._dictionaryManager.initialEntries, - this.dossier.dossierTemplateId, - 'dossier_redaction', - this.dossier.id, - false, - ) - .toPromise(); - await this._updateDossierDictionary(); - this.updateDossier.emit(); + async save(): EditDossierSaveResult { + try { + await this._dictionaryService + .saveEntries( + this._dictionaryManager.editor.currentEntries, + this._dictionaryManager.initialEntries, + this.dossier.dossierTemplateId, + 'dossier_redaction', + this.dossier.id, + false, + ) + .toPromise(); + await this._updateDossierDictionary(); + return { success: true }; + } catch (error) { + return { success: false }; + } } revert() { diff --git a/apps/red-ui/src/app/modules/dossier/dialogs/edit-dossier-dialog/download-package/edit-dossier-download-package.component.ts b/apps/red-ui/src/app/modules/dossier/dialogs/edit-dossier-dialog/download-package/edit-dossier-download-package.component.ts index 7e5e49fdb..402e8a3c8 100644 --- a/apps/red-ui/src/app/modules/dossier/dialogs/edit-dossier-dialog/download-package/edit-dossier-download-package.component.ts +++ b/apps/red-ui/src/app/modules/dossier/dialogs/edit-dossier-dialog/download-package/edit-dossier-download-package.component.ts @@ -1,7 +1,7 @@ -import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core'; +import { Component, Input, OnInit } from '@angular/core'; import { Dossier, DownloadFileType, IReportTemplate } from '@red/domain'; import { FormBuilder, FormGroup } from '@angular/forms'; -import { EditDossierSectionInterface } from '../edit-dossier-section.interface'; +import { EditDossierSaveResult, EditDossierSectionInterface } from '../edit-dossier-section.interface'; import { downloadTypesTranslations } from '../../../../../translations/download-types-translations'; import { DossiersService } from '@services/entity-services/dossiers.service'; import { ReportTemplateService } from '@services/report-template.service'; @@ -20,7 +20,6 @@ export class EditDossierDownloadPackageComponent implements OnInit, EditDossierS availableReportTypes: IReportTemplate[] = []; @Input() dossier: Dossier; - @Output() readonly updateDossier = new EventEmitter(); constructor( private readonly _dossiersService: DossiersService, @@ -70,6 +69,27 @@ export class EditDossierDownloadPackageComponent implements OnInit, EditDossierS this.dossierForm = this._getForm(); } + async save(): EditDossierSaveResult { + const dossier = { + ...this.dossier, + downloadFileTypes: this.dossierForm.get('downloadFileTypes').value, + reportTemplateIds: this.dossierForm.get('reportTemplateIds').value, + }; + try { + await this._dossiersService.createOrUpdate(dossier).toPromise(); + return { success: true }; + } catch (error) { + return { success: false }; + } + } + + revert() { + this.dossierForm.reset({ + downloadFileTypes: this.dossier.downloadFileTypes, + reportTemplateIds: this.dossier.reportTemplateIds, + }); + } + private _getForm(): FormGroup { return this._formBuilder.group( { @@ -84,21 +104,4 @@ export class EditDossierDownloadPackageComponent implements OnInit, EditDossierS }, ); } - - async save() { - const dossier = { - ...this.dossier, - downloadFileTypes: this.dossierForm.get('downloadFileTypes').value, - reportTemplateIds: this.dossierForm.get('reportTemplateIds').value, - }; - await this._dossiersService.createOrUpdate(dossier).toPromise(); - this.updateDossier.emit(); - } - - revert() { - this.dossierForm.reset({ - downloadFileTypes: this.dossier.downloadFileTypes, - reportTemplateIds: this.dossier.reportTemplateIds, - }); - } } diff --git a/apps/red-ui/src/app/modules/dossier/dialogs/edit-dossier-dialog/edit-dossier-dialog.component.html b/apps/red-ui/src/app/modules/dossier/dialogs/edit-dossier-dialog/edit-dossier-dialog.component.html index 7e5df0c58..010261882 100644 --- a/apps/red-ui/src/app/modules/dossier/dialogs/edit-dossier-dialog/edit-dossier-dialog.component.html +++ b/apps/red-ui/src/app/modules/dossier/dialogs/edit-dossier-dialog/edit-dossier-dialog.component.html @@ -21,37 +21,28 @@ - + diff --git a/apps/red-ui/src/app/modules/dossier/dialogs/edit-dossier-dialog/edit-dossier-dialog.component.ts b/apps/red-ui/src/app/modules/dossier/dialogs/edit-dossier-dialog/edit-dossier-dialog.component.ts index 5494a637d..4c7a6b9a7 100644 --- a/apps/red-ui/src/app/modules/dossier/dialogs/edit-dossier-dialog/edit-dossier-dialog.component.ts +++ b/apps/red-ui/src/app/modules/dossier/dialogs/edit-dossier-dialog/edit-dossier-dialog.component.ts @@ -11,9 +11,9 @@ import { EditDossierAttributesComponent } from './attributes/edit-dossier-attrib import { marker as _ } from '@biesbjerg/ngx-translate-extract-marker'; import { EditDossierDeletedDocumentsComponent } from './deleted-documents/edit-dossier-deleted-documents.component'; import { DossiersService } from '@services/entity-services/dossiers.service'; -import { TeamMembersManagerComponent } from '../../components/team-members-manager/team-members-manager.component'; import { Observable } from 'rxjs'; import { tap } from 'rxjs/operators'; +import { EditDossierTeamComponent } from './edit-dossier-team/edit-dossier-team.component'; type Section = 'dossierInfo' | 'downloadPackage' | 'dossierDictionary' | 'members' | 'dossierAttributes' | 'deletedDocuments'; @@ -30,7 +30,7 @@ export class EditDossierDialogComponent { @ViewChild(EditDossierGeneralInfoComponent) generalInfoComponent: EditDossierGeneralInfoComponent; @ViewChild(EditDossierDownloadPackageComponent) downloadPackageComponent: EditDossierDownloadPackageComponent; @ViewChild(EditDossierDictionaryComponent) dictionaryComponent: EditDossierDictionaryComponent; - @ViewChild(TeamMembersManagerComponent) membersComponent: TeamMembersManagerComponent; + @ViewChild(EditDossierTeamComponent) membersComponent: EditDossierTeamComponent; @ViewChild(EditDossierAttributesComponent) attributesComponent: EditDossierAttributesComponent; @ViewChild(EditDossierDeletedDocumentsComponent) deletedDocumentsComponent: EditDossierDeletedDocumentsComponent; private _dossierName: string; @@ -44,7 +44,6 @@ export class EditDossierDialogComponent { @Inject(MAT_DIALOG_DATA) private readonly _data: { dossierId: string; - afterSave: Function; section?: Section; }, ) { @@ -112,23 +111,20 @@ export class EditDossierDialogComponent { return !['deletedDocuments'].includes(this.activeNav); } - updatedDossier() { - this._toaster.success(_('edit-dossier-dialog.change-successful'), { params: { dossierName: this._dossierName } }); - this.afterSave(); - } - afterSave() { - if (this._data?.afterSave) { - this._data.afterSave(); - } + this._toaster.success(_('edit-dossier-dialog.change-successful'), { params: { dossierName: this._dossierName } }); } async save(closeAfterSave: boolean = false) { this._loadingService.start(); - await this.activeComponent.save(); + const result = await this.activeComponent.save(); this._loadingService.stop(); - if (closeAfterSave) { + if (result.success) { + this.afterSave(); + } + + if (result.success && closeAfterSave) { this._dialogRef.close(); } } diff --git a/apps/red-ui/src/app/modules/dossier/dialogs/edit-dossier-dialog/edit-dossier-section.interface.ts b/apps/red-ui/src/app/modules/dossier/dialogs/edit-dossier-dialog/edit-dossier-section.interface.ts index ffe1b7354..84d05ca47 100644 --- a/apps/red-ui/src/app/modules/dossier/dialogs/edit-dossier-dialog/edit-dossier-section.interface.ts +++ b/apps/red-ui/src/app/modules/dossier/dialogs/edit-dossier-dialog/edit-dossier-section.interface.ts @@ -1,6 +1,8 @@ +export type EditDossierSaveResult = Promise<{ success: boolean }>; + export interface EditDossierSectionInterface { changed: boolean; disabled: boolean; - save: Function; + save: (...args: any) => EditDossierSaveResult; revert: Function; } diff --git a/apps/red-ui/src/app/modules/dossier/components/team-members-manager/team-members-manager.component.html b/apps/red-ui/src/app/modules/dossier/dialogs/edit-dossier-dialog/edit-dossier-team/edit-dossier-team.component.html similarity index 100% rename from apps/red-ui/src/app/modules/dossier/components/team-members-manager/team-members-manager.component.html rename to apps/red-ui/src/app/modules/dossier/dialogs/edit-dossier-dialog/edit-dossier-team/edit-dossier-team.component.html diff --git a/apps/red-ui/src/app/modules/dossier/components/team-members-manager/team-members-manager.component.scss b/apps/red-ui/src/app/modules/dossier/dialogs/edit-dossier-dialog/edit-dossier-team/edit-dossier-team.component.scss similarity index 91% rename from apps/red-ui/src/app/modules/dossier/components/team-members-manager/team-members-manager.component.scss rename to apps/red-ui/src/app/modules/dossier/dialogs/edit-dossier-dialog/edit-dossier-team/edit-dossier-team.component.scss index 59b089f07..fad35d935 100644 --- a/apps/red-ui/src/app/modules/dossier/components/team-members-manager/team-members-manager.component.scss +++ b/apps/red-ui/src/app/modules/dossier/dialogs/edit-dossier-dialog/edit-dossier-team/edit-dossier-team.component.scss @@ -1,5 +1,5 @@ -@use 'common-mixins'; -@use 'variables'; +@use 'libs/common-ui/src/assets/styles/common-mixins'; +@use 'apps/red-ui/src/assets/styles/variables'; .search-container { margin-top: 16px; diff --git a/apps/red-ui/src/app/modules/dossier/components/team-members-manager/team-members-manager.component.ts b/apps/red-ui/src/app/modules/dossier/dialogs/edit-dossier-dialog/edit-dossier-team/edit-dossier-team.component.ts similarity index 86% rename from apps/red-ui/src/app/modules/dossier/components/team-members-manager/team-members-manager.component.ts rename to apps/red-ui/src/app/modules/dossier/dialogs/edit-dossier-dialog/edit-dossier-team/edit-dossier-team.component.ts index 21bb9c8df..0d9f1a7cc 100644 --- a/apps/red-ui/src/app/modules/dossier/components/team-members-manager/team-members-manager.component.ts +++ b/apps/red-ui/src/app/modules/dossier/dialogs/edit-dossier-dialog/edit-dossier-team/edit-dossier-team.component.ts @@ -1,24 +1,23 @@ -import { ChangeDetectionStrategy, Component, EventEmitter, Input, OnDestroy, OnInit, Output } from '@angular/core'; +import { ChangeDetectionStrategy, Component, Input, OnDestroy, OnInit } from '@angular/core'; import { UserService } from '@services/user.service'; import { FormBuilder, FormGroup, Validators } from '@angular/forms'; import { DossiersService } from '@services/entity-services/dossiers.service'; -import { Dossier, IDossier, IDossierRequest } from '@red/domain'; +import { Dossier, IDossierRequest } from '@red/domain'; import { AutoUnsubscribe } from '@iqser/common-ui'; -import { EditDossierSectionInterface } from '../../dialogs/edit-dossier-dialog/edit-dossier-section.interface'; +import { EditDossierSaveResult, EditDossierSectionInterface } from '../edit-dossier-section.interface'; import { BehaviorSubject } from 'rxjs'; @Component({ - selector: 'redaction-team-members-manager', - templateUrl: './team-members-manager.component.html', - styleUrls: ['./team-members-manager.component.scss'], + selector: 'redaction-edit-dossier-team', + templateUrl: './edit-dossier-team.component.html', + styleUrls: ['./edit-dossier-team.component.scss'], changeDetection: ChangeDetectionStrategy.OnPush, }) -export class TeamMembersManagerComponent extends AutoUnsubscribe implements EditDossierSectionInterface, OnInit, OnDestroy { +export class EditDossierTeamComponent extends AutoUnsubscribe implements EditDossierSectionInterface, OnInit, OnDestroy { form: FormGroup; searchQuery = ''; @Input() dossier: Dossier; - @Output() readonly updateDossier = new EventEmitter(); readonly ownersSelectOptions = this.userService.managerUsers.map(m => m.id); membersSelectOptions: string[] = []; @@ -69,7 +68,7 @@ export class TeamMembersManagerComponent extends AutoUnsubscribe implements Edit return userId === this.selectedOwnerId; } - async save() { + async save(): EditDossierSaveResult { const dossier = { ...this.dossier, memberIds: this.selectedMembersList, @@ -77,9 +76,11 @@ export class TeamMembersManagerComponent extends AutoUnsubscribe implements Edit ownerId: this.selectedOwnerId, } as IDossierRequest; - const result = await this._dossiersService.createOrUpdate(dossier).toPromise(); - if (result) { - this.updateDossier.emit(); + try { + await this._dossiersService.createOrUpdate(dossier).toPromise(); + return { success: true }; + } catch (error) { + return { success: false }; } } diff --git a/apps/red-ui/src/app/modules/dossier/dialogs/edit-dossier-dialog/general-info/edit-dossier-general-info.component.ts b/apps/red-ui/src/app/modules/dossier/dialogs/edit-dossier-dialog/general-info/edit-dossier-general-info.component.ts index cb62879f8..48ca6a9b3 100644 --- a/apps/red-ui/src/app/modules/dossier/dialogs/edit-dossier-dialog/general-info/edit-dossier-general-info.component.ts +++ b/apps/red-ui/src/app/modules/dossier/dialogs/edit-dossier-dialog/general-info/edit-dossier-general-info.component.ts @@ -1,8 +1,8 @@ -import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core'; +import { Component, Input, OnInit } from '@angular/core'; import { FormBuilder, FormGroup, Validators } from '@angular/forms'; import * as moment from 'moment'; import { Dossier, IDossierRequest, IDossierTemplate } from '@red/domain'; -import { EditDossierSectionInterface } from '../edit-dossier-section.interface'; +import { EditDossierSaveResult, EditDossierSectionInterface } from '../edit-dossier-section.interface'; import { DossiersDialogService } from '../../../services/dossiers-dialog.service'; import { PermissionsService } from '@services/permissions.service'; import { Router } from '@angular/router'; @@ -22,13 +22,12 @@ import { DossierStatsService } from '@services/entity-services/dossier-stats.ser export class EditDossierGeneralInfoComponent implements OnInit, EditDossierSectionInterface { readonly iconButtonTypes = IconButtonTypes; + @Input() dossier: Dossier; + dossierForm: FormGroup; hasDueDate: boolean; dossierTemplates: IDossierTemplate[]; - @Input() dossier: Dossier; - @Output() readonly updateDossier = new EventEmitter(); - constructor( readonly permissionsService: PermissionsService, private readonly _dossierTemplatesService: DossierTemplatesService, @@ -83,7 +82,7 @@ export class EditDossierGeneralInfoComponent implements OnInit, EditDossierSecti }); } - async save() { + async save(): EditDossierSaveResult { const dossier = { ...this.dossier, dossierName: this.dossierForm.get('dossierName').value, @@ -95,8 +94,10 @@ export class EditDossierGeneralInfoComponent implements OnInit, EditDossierSecti } as IDossierRequest; try { await this._dossiersService.createOrUpdate(dossier).toPromise(); - this.updateDossier.emit(); - } catch (e) {} + return { success: true }; + } catch (error) { + return { success: false }; + } } deleteDossier() { diff --git a/apps/red-ui/src/app/modules/dossier/dossiers.module.ts b/apps/red-ui/src/app/modules/dossier/dossiers.module.ts index 9def60668..02a08fd5c 100644 --- a/apps/red-ui/src/app/modules/dossier/dossiers.module.ts +++ b/apps/red-ui/src/app/modules/dossier/dossiers.module.ts @@ -19,7 +19,6 @@ import { EditDossierDialogComponent } from './dialogs/edit-dossier-dialog/edit-d import { EditDossierGeneralInfoComponent } from './dialogs/edit-dossier-dialog/general-info/edit-dossier-general-info.component'; import { EditDossierDownloadPackageComponent } from './dialogs/edit-dossier-dialog/download-package/edit-dossier-download-package.component'; import { EditDossierDictionaryComponent } from './dialogs/edit-dossier-dialog/dictionary/edit-dossier-dictionary.component'; -import { TeamMembersManagerComponent } from './components/team-members-manager/team-members-manager.component'; import { ChangeLegalBasisDialogComponent } from './dialogs/change-legal-basis-dialog/change-legal-basis-dialog.component'; import { RecategorizeImageDialogComponent } from './dialogs/recategorize-image-dialog/recategorize-image-dialog.component'; import { EditDossierAttributesComponent } from './dialogs/edit-dossier-dialog/attributes/edit-dossier-attributes.component'; @@ -31,6 +30,7 @@ import { ResizeAnnotationDialogComponent } from './dialogs/resize-annotation-dia import { BreadcrumbsService } from '@services/breadcrumbs.service'; import { of } from 'rxjs'; import { TranslateService } from '@ngx-translate/core'; +import { EditDossierTeamComponent } from './dialogs/edit-dossier-dialog/edit-dossier-team/edit-dossier-team.component'; const screens = [SearchScreenComponent]; @@ -52,7 +52,7 @@ const components = [ EditDossierDownloadPackageComponent, EditDossierDictionaryComponent, EditDossierAttributesComponent, - TeamMembersManagerComponent, + EditDossierTeamComponent, EditDossierDeletedDocumentsComponent, ...screens, diff --git a/apps/red-ui/src/app/modules/dossier/screens/dossiers-listing/components/dossiers-listing-actions/dossiers-listing-actions.component.ts b/apps/red-ui/src/app/modules/dossier/screens/dossiers-listing/components/dossiers-listing-actions/dossiers-listing-actions.component.ts index 6b347473f..fd02bf16f 100644 --- a/apps/red-ui/src/app/modules/dossier/screens/dossiers-listing/components/dossiers-listing-actions/dossiers-listing-actions.component.ts +++ b/apps/red-ui/src/app/modules/dossier/screens/dossiers-listing/components/dossiers-listing-actions/dossiers-listing-actions.component.ts @@ -1,4 +1,4 @@ -import { ChangeDetectionStrategy, Component, EventEmitter, Input, OnChanges, Output } from '@angular/core'; +import { ChangeDetectionStrategy, Component, Input, OnChanges } from '@angular/core'; import { PermissionsService } from '@services/permissions.service'; import { CircleButtonTypes, List, StatusBarConfig } from '@iqser/common-ui'; import { UserService } from '@services/user.service'; @@ -28,8 +28,6 @@ export class DossiersListingActionsComponent implements OnChanges { @Input() dossier: Dossier; @Input() stats: DossierStats; - @Output() readonly actionPerformed = new EventEmitter(); - constructor( private readonly _reanalysisService: ReanalysisService, private readonly _userService: UserService, @@ -57,10 +55,7 @@ export class DossiersListingActionsComponent implements OnChanges { } openEditDossierDialog($event: MouseEvent, dossierId: string): void { - this._dialogService.openDialog('editDossier', $event, { - dossierId, - afterSave: () => this.actionPerformed.emit(), - }); + this._dialogService.openDialog('editDossier', $event, { dossierId }); } async reanalyseDossier($event: MouseEvent, id: string): Promise { diff --git a/apps/red-ui/src/app/modules/dossier/screens/dossiers-listing/components/table-item/table-item.component.html b/apps/red-ui/src/app/modules/dossier/screens/dossiers-listing/components/table-item/table-item.component.html index 41571ae8d..fcff19968 100644 --- a/apps/red-ui/src/app/modules/dossier/screens/dossiers-listing/components/table-item/table-item.component.html +++ b/apps/red-ui/src/app/modules/dossier/screens/dossiers-listing/components/table-item/table-item.component.html @@ -12,10 +12,6 @@
- +
diff --git a/apps/red-ui/src/app/modules/dossier/screens/dossiers-listing/components/table-item/table-item.component.ts b/apps/red-ui/src/app/modules/dossier/screens/dossiers-listing/components/table-item/table-item.component.ts index dac916669..5839919cd 100644 --- a/apps/red-ui/src/app/modules/dossier/screens/dossiers-listing/components/table-item/table-item.component.ts +++ b/apps/red-ui/src/app/modules/dossier/screens/dossiers-listing/components/table-item/table-item.component.ts @@ -1,4 +1,4 @@ -import { ChangeDetectionStrategy, Component, EventEmitter, Input, OnChanges, Output } from '@angular/core'; +import { ChangeDetectionStrategy, Component, Input, OnChanges } from '@angular/core'; import { Dossier, DossierStats } from '@red/domain'; import { DossierStatsService } from '@services/entity-services/dossier-stats.service'; import { BehaviorSubject, merge, Observable, timer } from 'rxjs'; @@ -14,7 +14,6 @@ import { FilesService } from '@services/entity-services/files.service'; }) export class TableItemComponent implements OnChanges { @Input() dossier!: Dossier; - @Output() readonly calculateData = new EventEmitter(); readonly stats$: Observable; private readonly _ngOnChanges$ = new BehaviorSubject(undefined); diff --git a/apps/red-ui/src/app/modules/dossier/screens/dossiers-listing/screen/dossiers-listing-screen.component.html b/apps/red-ui/src/app/modules/dossier/screens/dossiers-listing/screen/dossiers-listing-screen.component.html index da289757f..16f8d9509 100644 --- a/apps/red-ui/src/app/modules/dossier/screens/dossiers-listing/screen/dossiers-listing-screen.component.html +++ b/apps/red-ui/src/app/modules/dossier/screens/dossiers-listing/screen/dossiers-listing-screen.component.html @@ -29,5 +29,5 @@ - + diff --git a/apps/red-ui/src/app/modules/dossier/screens/dossiers-listing/screen/dossiers-listing-screen.component.ts b/apps/red-ui/src/app/modules/dossier/screens/dossiers-listing/screen/dossiers-listing-screen.component.ts index 8f2d96158..5b2f0da3a 100644 --- a/apps/red-ui/src/app/modules/dossier/screens/dossiers-listing/screen/dossiers-listing-screen.component.ts +++ b/apps/red-ui/src/app/modules/dossier/screens/dossiers-listing/screen/dossiers-listing-screen.component.ts @@ -64,14 +64,11 @@ export class DossiersListingScreenComponent extends ListingComponent im } ngOnInit(): void { - this.computeAllFilters(); - this.addSubscription = timer(CHANGED_CHECK_INTERVAL, CHANGED_CHECK_INTERVAL) - .pipe( - switchMap(() => this._dossiersService.loadAllIfChanged()), - tap(() => this.computeAllFilters()), - ) + .pipe(switchMap(() => this._dossiersService.loadAllIfChanged())) .subscribe(); + + this.addSubscription = this._dossiersService.all$.pipe(tap(() => this._computeAllFilters())).subscribe(); } ngOnAttach(): void { @@ -95,7 +92,7 @@ export class DossiersListingScreenComponent extends ListingComponent im }); } - computeAllFilters() { + private _computeAllFilters() { const filterGroups = this._configService.filterGroups(this.entitiesService.all, this._needsWorkFilterTemplate); this.filterService.addFilterGroups(filterGroups); } From 81103034c7d18cb5695aa528c80ac5b54af155aa Mon Sep 17 00:00:00 2001 From: Bamboo Date: Tue, 7 Dec 2021 14:44:00 +0100 Subject: [PATCH 14/15] chore(release) --- package.json | 2 +- paligo-theme.tar.gz | Bin 3207 -> 3208 bytes 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index ffa73e70b..8f49bef43 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "redaction", - "version": "3.89.0", + "version": "3.90.0", "private": true, "license": "MIT", "scripts": { diff --git a/paligo-theme.tar.gz b/paligo-theme.tar.gz index dd6f26406ab006768ef6efe465dd4215c5ed6e1e..b9f8a617314bfdaa9447a2ce3196f702c9599906 100644 GIT binary patch delta 3075 zcmV+e4E*zl8H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&HAHo-}#_6-??-y2IrziU+w^$vWjoj8d`-aW2z-Vleets!uq z!hCBa9vZ9+Oa-SH9%_BoYRRa7O~8m?#(x(XumfMY?gH51t~gJCG4}lSTJ8Q_L!-AA zgltS0zSfW{81!GqsCc%_?7>HH}G#C-?kzvVrUe0!--IwY|gD)gGB&YaLpNUh9D5>Srm< zc>_c|-&TMEk8Z@*?;+I!hXkKb18nD6u_+9@Jm7fS=;9acu?m*kaq8gp8r)d;mV&A5 zFwr*M9cd&FjIo%&Rp;B0r`FA#fk{cH`!yE_J;#P2Ld@0Z5R*Gt6y-t7l%F)&&Z#eE#kXX1)vQ2Z^SJi`^44F?g7|>{V%_226vV z+??Js1?=l7FBruo2;k(MTqB<0GD7On)J_$c2jVWU#~=B44#UL^|6p zZG(}Y=m@_?Mo_710A?%x>0%CX%7$3)D7hE+BGiuUM(5M058ZCY*<{xl5*5CsHc}_g zeDKv(4;UkXw99a&eTp+1vy2V8I99u%e%`hng?@+>J}D|dtbwGtihpoThS(jQ`tMe& zX)8dZaCefT)2V3mKK(u6JX_7$c_sr?!L*P&@uRIih@0{4u7=M8Z;X~>X}V@<#rxhH0+U**?#= z6&2!F%s@Ikn{6)%sDJ)Tx`+s8(G?`&$U+Xdi))ntlzI~R_N_;}{ggkWQbVp(a4RKht=j05Ot>V~ewDg$aeJFL7u&CfOCytdFv0s>Z!U^st$!l?I}ka2e5iKnZ0x=* z*3KL$@c|@ce64Y&fMT`#2fjUnP+*1@0pC1u{Oi$VAh}XwzQK^1m0R7g0WfIf6XtZW98DTx- z{rAI!e>AVmJtv=%`1ZE-8eQ`H)`;J?zMP>N9#%~%D(vphye%roOPv`KFLQX4Rc>G9 zc2!=zA(eMRi{2@Snz-HwyYrOBy7^aqPIy`G_HA z57spvo&HV&NQ$VLI=23~|8vT@oXfeK%ekD(xtz Date: Tue, 7 Dec 2021 15:54:36 +0200 Subject: [PATCH 15/15] Removed check for changes from dossier table item --- .../notifications/notifications.component.ts | 3 ++- .../dossier-overview-screen.component.ts | 2 +- .../table-item/table-item.component.ts | 27 +++++-------------- .../dossiers-listing-screen.component.ts | 11 ++------ .../simple-doughnut-chart.component.ts | 2 +- apps/red-ui/src/app/utils/constants.ts | 1 + apps/red-ui/src/app/utils/types.d.ts | 3 --- libs/common-ui | 2 +- libs/red-domain/src/lib/shared/colors.ts | 4 +++ libs/red-domain/src/lib/shared/index.ts | 1 + 10 files changed, 20 insertions(+), 36 deletions(-) create mode 100644 apps/red-ui/src/app/utils/constants.ts delete mode 100644 apps/red-ui/src/app/utils/types.d.ts create mode 100644 libs/red-domain/src/lib/shared/colors.ts diff --git a/apps/red-ui/src/app/components/notifications/notifications.component.ts b/apps/red-ui/src/app/components/notifications/notifications.component.ts index 5d807fcbd..963e9d5da 100644 --- a/apps/red-ui/src/app/components/notifications/notifications.component.ts +++ b/apps/red-ui/src/app/components/notifications/notifications.component.ts @@ -7,7 +7,8 @@ import { NotificationsService } from '@services/notifications.service'; import { Notification } from '@red/domain'; import { distinctUntilChanged, map, switchMap, tap } from 'rxjs/operators'; import { BehaviorSubject, Observable, timer } from 'rxjs'; -import { AutoUnsubscribe, CHANGED_CHECK_INTERVAL, List, shareLast } from '@iqser/common-ui'; +import { AutoUnsubscribe, List, shareLast } from '@iqser/common-ui'; +import { CHANGED_CHECK_INTERVAL } from '@utils/constants'; const INCLUDE_SEEN = false; diff --git a/apps/red-ui/src/app/modules/dossier/screens/dossier-overview/screen/dossier-overview-screen.component.ts b/apps/red-ui/src/app/modules/dossier/screens/dossier-overview/screen/dossier-overview-screen.component.ts index d5e5ebcb4..000eabe11 100644 --- a/apps/red-ui/src/app/modules/dossier/screens/dossier-overview/screen/dossier-overview-screen.component.ts +++ b/apps/red-ui/src/app/modules/dossier/screens/dossier-overview/screen/dossier-overview-screen.component.ts @@ -20,7 +20,6 @@ import { Observable, timer } from 'rxjs'; import { filter, switchMap, tap } from 'rxjs/operators'; import { convertFiles, Files, handleFileDrop } from '@utils/index'; import { - CHANGED_CHECK_INTERVAL, CircleButtonTypes, DefaultListingServices, ListingComponent, @@ -46,6 +45,7 @@ import { LongPressEvent } from '@shared/directives/long-press.directive'; import { UserPreferenceService } from '@services/user-preference.service'; import { FilesMapService } from '@services/entity-services/files-map.service'; import { FilesService } from '@services/entity-services/files.service'; +import { CHANGED_CHECK_INTERVAL } from '@utils/constants'; @Component({ templateUrl: './dossier-overview-screen.component.html', diff --git a/apps/red-ui/src/app/modules/dossier/screens/dossiers-listing/components/table-item/table-item.component.ts b/apps/red-ui/src/app/modules/dossier/screens/dossiers-listing/components/table-item/table-item.component.ts index 5839919cd..d1e991d3c 100644 --- a/apps/red-ui/src/app/modules/dossier/screens/dossiers-listing/components/table-item/table-item.component.ts +++ b/apps/red-ui/src/app/modules/dossier/screens/dossiers-listing/components/table-item/table-item.component.ts @@ -1,10 +1,8 @@ import { ChangeDetectionStrategy, Component, Input, OnChanges } from '@angular/core'; import { Dossier, DossierStats } from '@red/domain'; import { DossierStatsService } from '@services/entity-services/dossier-stats.service'; -import { BehaviorSubject, merge, Observable, timer } from 'rxjs'; -import { filter, switchMap } from 'rxjs/operators'; -import { CHANGED_CHECK_INTERVAL } from '@iqser/common-ui'; -import { FilesService } from '@services/entity-services/files.service'; +import { BehaviorSubject, Observable } from 'rxjs'; +import { switchMap } from 'rxjs/operators'; @Component({ selector: 'redaction-table-item [dossier]', @@ -18,24 +16,13 @@ export class TableItemComponent implements OnChanges { readonly stats$: Observable; private readonly _ngOnChanges$ = new BehaviorSubject(undefined); - constructor(readonly dossierStatsService: DossierStatsService, readonly filesService: FilesService) { - const hasChanges$ = this._hasChanges$; - this.stats$ = merge(this._ngOnChanges$, hasChanges$).pipe( - filter(() => !!this.dossier), - switchMap(() => this.dossierStatsService.watch$(this.dossier.dossierId)), - ); - } - - private get _hasChanges$() { - return timer(CHANGED_CHECK_INTERVAL, CHANGED_CHECK_INTERVAL).pipe( - filter(() => !!this.dossier), - switchMap(() => this.filesService.hasChanges$(this.dossier.dossierId)), - filter(changed => changed), - switchMap(() => this.dossierStatsService.getFor([this.dossier.dossierId])), - ); + constructor(readonly dossierStatsService: DossierStatsService) { + this.stats$ = this._ngOnChanges$.pipe(switchMap(dossierId => this.dossierStatsService.watch$(dossierId))); } ngOnChanges() { - this._ngOnChanges$.next(this.dossier.dossierId); + if (this.dossier) { + this._ngOnChanges$.next(this.dossier.dossierId); + } } } diff --git a/apps/red-ui/src/app/modules/dossier/screens/dossiers-listing/screen/dossiers-listing-screen.component.ts b/apps/red-ui/src/app/modules/dossier/screens/dossiers-listing/screen/dossiers-listing-screen.component.ts index 5b2f0da3a..c7ba3f10b 100644 --- a/apps/red-ui/src/app/modules/dossier/screens/dossiers-listing/screen/dossiers-listing-screen.component.ts +++ b/apps/red-ui/src/app/modules/dossier/screens/dossiers-listing/screen/dossiers-listing-screen.component.ts @@ -6,21 +6,14 @@ import { TranslateChartService } from '@services/translate-chart.service'; import { timer } from 'rxjs'; import { Router } from '@angular/router'; import { DossiersDialogService } from '../../../services/dossiers-dialog.service'; -import { - CHANGED_CHECK_INTERVAL, - DefaultListingServicesTmp, - EntitiesService, - ListingComponent, - OnAttach, - OnDetach, - TableComponent, -} from '@iqser/common-ui'; +import { DefaultListingServicesTmp, EntitiesService, ListingComponent, OnAttach, OnDetach, TableComponent } from '@iqser/common-ui'; import { marker as _ } from '@biesbjerg/ngx-translate-extract-marker'; import { ConfigService } from '../config.service'; import { DossiersService } from '@services/entity-services/dossiers.service'; import { FilesService } from '@services/entity-services/files.service'; import { DossierTemplatesService } from '@services/entity-services/dossier-templates.service'; import { switchMap, tap } from 'rxjs/operators'; +import { CHANGED_CHECK_INTERVAL } from '@utils/constants'; @Component({ templateUrl: './dossiers-listing-screen.component.html', diff --git a/apps/red-ui/src/app/modules/shared/components/simple-doughnut-chart/simple-doughnut-chart.component.ts b/apps/red-ui/src/app/modules/shared/components/simple-doughnut-chart/simple-doughnut-chart.component.ts index 6524e07d2..ec11bf6e7 100644 --- a/apps/red-ui/src/app/modules/shared/components/simple-doughnut-chart/simple-doughnut-chart.component.ts +++ b/apps/red-ui/src/app/modules/shared/components/simple-doughnut-chart/simple-doughnut-chart.component.ts @@ -1,5 +1,5 @@ import { Component, Input, OnChanges, OnInit } from '@angular/core'; -import { Color } from '@utils/types'; +import { Color } from '@red/domain'; import { FilterService, INestedFilter } from '@iqser/common-ui'; import { Observable, of } from 'rxjs'; import { map } from 'rxjs/operators'; diff --git a/apps/red-ui/src/app/utils/constants.ts b/apps/red-ui/src/app/utils/constants.ts new file mode 100644 index 000000000..454c91719 --- /dev/null +++ b/apps/red-ui/src/app/utils/constants.ts @@ -0,0 +1 @@ +export const CHANGED_CHECK_INTERVAL = 3000; diff --git a/apps/red-ui/src/app/utils/types.d.ts b/apps/red-ui/src/app/utils/types.d.ts deleted file mode 100644 index 9b37405ff..000000000 --- a/apps/red-ui/src/app/utils/types.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -import { DossierStatus, FileStatus } from '@red/domain'; - -export type Color = FileStatus | DossierStatus | string; diff --git a/libs/common-ui b/libs/common-ui index 8f440491e..fb53b06cf 160000 --- a/libs/common-ui +++ b/libs/common-ui @@ -1 +1 @@ -Subproject commit 8f440491e8006cad8d64ee62b1b84b97be747413 +Subproject commit fb53b06cfc8fa2c846e7d1a173ad6f0e19f90d02 diff --git a/libs/red-domain/src/lib/shared/colors.ts b/libs/red-domain/src/lib/shared/colors.ts new file mode 100644 index 000000000..f80429122 --- /dev/null +++ b/libs/red-domain/src/lib/shared/colors.ts @@ -0,0 +1,4 @@ +import { DossierStatus } from '../dossiers'; +import { WorkflowFileStatus } from '../files'; + +export type Color = WorkflowFileStatus | DossierStatus | string; diff --git a/libs/red-domain/src/lib/shared/index.ts b/libs/red-domain/src/lib/shared/index.ts index 3da2cbc13..77273e7c7 100644 --- a/libs/red-domain/src/lib/shared/index.ts +++ b/libs/red-domain/src/lib/shared/index.ts @@ -3,4 +3,5 @@ export * from './types'; export * from './rules'; export * from './watermark'; export * from './default-color-type'; +export * from './colors'; export * from './view-mode';