From 7b7a4cff81563f292ef57deea3b476bd49259dee Mon Sep 17 00:00:00 2001 From: Dan Percic Date: Thu, 17 Feb 2022 13:42:02 +0200 Subject: [PATCH 01/15] load only open dossier's stats --- .../services/entity-services/dossiers.service.ts | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/apps/red-ui/src/app/services/entity-services/dossiers.service.ts b/apps/red-ui/src/app/services/entity-services/dossiers.service.ts index 4787fdb30..4a680ef1e 100644 --- a/apps/red-ui/src/app/services/entity-services/dossiers.service.ts +++ b/apps/red-ui/src/app/services/entity-services/dossiers.service.ts @@ -2,7 +2,7 @@ import { Injectable, Injector } from '@angular/core'; import { EntitiesService, List, mapEach, QueryParam, RequiredParam, shareLast, Toaster, Validate } from '@iqser/common-ui'; import { Dossier, IDossier, IDossierRequest } from '@red/domain'; import { catchError, filter, map, mapTo, switchMap, tap } from 'rxjs/operators'; -import { combineLatest, firstValueFrom, Observable, of, Subject, throwError, timer } from 'rxjs'; +import { combineLatest, firstValueFrom, forkJoin, Observable, of, Subject, throwError, timer } from 'rxjs'; import { marker as _ } from '@biesbjerg/ngx-translate-extract-marker'; import { HttpErrorResponse, HttpStatusCode } from '@angular/common/http'; import { DossierStatsService } from '@services/entity-services/dossier-stats.service'; @@ -62,13 +62,16 @@ export class DossiersService extends EntitiesService { } loadAllIfChanged(): Observable { - return this.hasChangesDetails$().pipe(switchMap(changes => this.loadAll().pipe(mapTo(changes)))); + return this.hasChangesDetails$().pipe( + switchMap(changes => forkJoin(changes.dossierChanges.map(change => this.load(change.dossierId))).pipe(mapTo(changes))), + ); } hasChangesDetails$(): Observable { const body = { value: this._lastCheckedForChanges.get('root') ?? '0' }; return this._post(body, `${this._defaultModelPath}/changes/details`).pipe( filter(changes => changes.dossierChanges.length > 0), + tap(() => this._updateLastChanged()), ); } @@ -115,6 +118,14 @@ export class DossiersService extends EntitiesService { return this.all.filter(dossier => dossier.dossierStatusId === dossierStatusId).length; } + load(id: string, queryParams?: List): Observable { + return super._getOne([id], this._defaultModelPath, queryParams).pipe( + map(entity => new Dossier(entity)), + switchMap(dossier => this._dossierStatsService.getFor([dossier.dossierId]).pipe(mapTo(dossier))), + tap(dossier => this.replace(dossier)), + ); + } + private _emitFileChanges(changes: ChangesDetails): void { changes.dossierChanges.filter(change => change.fileChanges).forEach(change => this.dossierFileChanges$.next(change.dossierId)); } From 51b3d38d28bb9700772cfac72385fb9709789b1a Mon Sep 17 00:00:00 2001 From: Atlassian Bamboo Date: Thu, 17 Feb 2022 12:46:19 +0100 Subject: [PATCH 02/15] chore(release) --- package.json | 2 +- paligo-theme.tar.gz | Bin 3215 -> 3214 bytes 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index c2f6e6561..01cdfda2e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "redaction", - "version": "3.236.0", + "version": "3.237.0", "private": true, "license": "MIT", "scripts": { diff --git a/paligo-theme.tar.gz b/paligo-theme.tar.gz index 8b823f63ce3602f6fa0f626ca9ffbf20656da871..6a97aa814f463d65866f6f75c830ecc6566d1447 100644 GIT binary patch delta 1014 zcmVyk7soVhQ?R1TY=h-!H4? z_6yhln<&LqO&GfT>(^gctINBKH*{MT6+=yxU0tS(mG%1OCVwe%R?jy@vB?N7X+4jM z?F|@&`?~~hY4-HVpG%Ve_A8v%Yszpod)TDxjXm>h`_7*E;%^}SF2vuZ_`8C?j+o~8&>e&Wl>W`3+Smxh8cZJ4&$D;pMO?DNfwKh3vC70KD1k^iWvYTi{AG-sqT*n-WiLHuVQ$HF=--b#5J3@DEMI1rdF z-fT%sF)H%x3Dr?WNRDtGqbp^LEct%B7P!p&TGOEKwsJ7$AskIx&->tCBi!Q9b>-`3 zW&oTkKP(zelA`LVLnpbdr61clMMrmJy;sx>riY%>JeT&-IX$ z<$qD9HEAGhozSXgR+LidY=jtE`M|n2U_v=^C&5wb?<|;6mXX=SL~v`7=wU_F&K$;4 zcXebe^%i=lvrixo;S&hNMn`|bTCMv!Wkto|jU6l_kIafmR8+Wi>7aX3aoJ2$)nwz{ z(Hr6($z@c7^LIYmJbPqF>ZW$>JtoM3Ghu9k9cM%nlIWQ7lw%J?%Nsyu|Xd@ z^dF*+)JJ?zP1yvx=THTed8 kd~-1eWEMz(WR_#}q?i9l+~xAKQ3N&!2owu$j{r~r0Ce5?_W%F@ delta 1015 zcmV%2n24?@kLH8sN(LO;e*KgTxL^)G+a>?tGl z_hk*I>)-R7;H>{2qwUpyMPeK=IW~{#`oq@X3SRhA`u7}Ax77aZiVXZFjF5b{>SyT))Rd#imGFH~>n}3_6$XPw#6vZYZxTN(w zDz-OZ5bp01yrtRGCx0$U{@br`Uau*`+3aDHvN!h3v+X;3=8M09_`48)m*VdV{yJig zBjz|_jw9wcVvfV-{3fP#nc=5T>IYn2Uf*5JIej>@Qi5Yrp?_T<^vBk-PF--xUaZ6q3XKWl=kC>4Zk z@uT%XW0nFg+g6dS5pGz)f0so~87-ivA{l1%Ejf&P-hX~t2_;!9R+6hYw*704G%PAE zN92@`s4g-ZqmN=Q4r06;v??6arUuSix(sqolH^2M)@v|?h@?f^e_|JTphU?9OAus&E#3m_e@dc!tH~LcI5}(}Ojs331 zy#B0hc|Yxj65BZ1e1qA*q|%wfC4H2V%~!33i+jO;D;Us&hAbL|zyovb%3<2*d_` z?9hLRK2jg?JvC($APd#Kj03@k1v-<%+~*YAU?vb8<1_|tqsu*cIK257eNOX?P}bxd l^zqHb9FSQc0g_pc(UV^OBY{frvrq&!2nbo61xf%=005y{>z4ok From b33f68733dc322d76911e3c05af365323a070b7f Mon Sep 17 00:00:00 2001 From: Dan Percic Date: Thu, 17 Feb 2022 13:53:37 +0200 Subject: [PATCH 03/15] rename and refactor loading only changed dossiers --- .../entity-services/dossiers.service.ts | 26 +++++++++++-------- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/apps/red-ui/src/app/services/entity-services/dossiers.service.ts b/apps/red-ui/src/app/services/entity-services/dossiers.service.ts index 4a680ef1e..6869264b0 100644 --- a/apps/red-ui/src/app/services/entity-services/dossiers.service.ts +++ b/apps/red-ui/src/app/services/entity-services/dossiers.service.ts @@ -14,14 +14,16 @@ export interface IDossiersStats { totalAnalyzedPages: number; } +interface DossierChange { + readonly dossierChanges: boolean; + readonly dossierId: string; + readonly fileChanges: boolean; +} + +type DossierChanges = readonly DossierChange[]; + interface ChangesDetails { - dossierChanges: [ - { - dossierChanges: boolean; - dossierId: string; - fileChanges: boolean; - }, - ]; + readonly dossierChanges: DossierChanges; } const DOSSIER_EXISTS_MSG = _('add-dossier-dialog.errors.dossier-already-exists'); @@ -44,7 +46,7 @@ export class DossiersService extends EntitiesService { timer(CHANGED_CHECK_INTERVAL, CHANGED_CHECK_INTERVAL) .pipe( - switchMap(() => this.loadAllIfChanged()), + switchMap(() => this.loadOnlyChanged()), tap(changes => this._emitFileChanges(changes)), ) .subscribe(); @@ -61,9 +63,12 @@ export class DossiersService extends EntitiesService { ); } - loadAllIfChanged(): Observable { + loadOnlyChanged(): Observable { + const load = (changes: DossierChanges) => forkJoin(changes.map(change => this.load(change.dossierId))); + return this.hasChangesDetails$().pipe( - switchMap(changes => forkJoin(changes.dossierChanges.map(change => this.load(change.dossierId))).pipe(mapTo(changes))), + switchMap(changes => load(changes.dossierChanges).pipe(mapTo(changes))), + tap(() => this._updateLastChanged()), ); } @@ -71,7 +76,6 @@ export class DossiersService extends EntitiesService { const body = { value: this._lastCheckedForChanges.get('root') ?? '0' }; return this._post(body, `${this._defaultModelPath}/changes/details`).pipe( filter(changes => changes.dossierChanges.length > 0), - tap(() => this._updateLastChanged()), ); } From a4458184f1b3c05bac16c732959ff6be2659d96a Mon Sep 17 00:00:00 2001 From: Atlassian Bamboo Date: Thu, 17 Feb 2022 12:57:53 +0100 Subject: [PATCH 04/15] chore(release) --- package.json | 2 +- paligo-theme.tar.gz | Bin 3214 -> 3215 bytes 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 01cdfda2e..4132d5b49 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "redaction", - "version": "3.237.0", + "version": "3.238.0", "private": true, "license": "MIT", "scripts": { diff --git a/paligo-theme.tar.gz b/paligo-theme.tar.gz index 6a97aa814f463d65866f6f75c830ecc6566d1447..c7e70d3081378e81a1ea81325b8c91e4143ae8be 100644 GIT binary patch delta 3126 zcmV-649WA38IKu|cz<5tEnnG=9oWGu6#O963|dn&Tp{#hEcJ72b6x-PN6nrxQh#68 zaJv3I&vwrG|1sKL{Z}N$5tC!{sIEV34X)sYKc#=q0d;r!_w9uT`dW+Sv9v` zxc=WnDXwb5(B)sh{=!;a-d((*+p?$_YO3t&GG(l+*Ecswk$oUVnpVSYyyu7}p?EdIfA~7=EUkqSuNX%TU>2uZn2^S;FZ=F7K{~JpxQ_@>VDP)S5Ybm+2Tj* zfyOKaT(+$uTO-`Cg8wdynlf5IPen4!=v#6a_q_eI5`RjvSga&hacuk79BEioT#m>o zA5mRoG)5oAUL3@DH)vHjrcDi;w{#igoFvJKw5-=)2oXt(tW$hZ;)t@RHL~Z+6Oqkc zw(`(gG`n!5U1&Dotd3FaSokH5W14ROfeZ3>mPcU;S>6Ko`o|%ts$qoFRkaieJKdq@ z>U1Xc#eXW;-X*R`&hCu-M@?1puCkyxBbC7xY;FzWKl?Zq)@kup%G+Q-aqP!|z;y9u zOJa&qk!Me+jw(WOg!33(DO+U8_uI9=W!~4C27R}cgL!WcG#kj>{mhw42xbk0P9PJ+ z0I(SjNhVg1o@|ZsA{YB`JbP+hCmYaIMy#?4Gk+RkuGk6TXxe(-2mc!37Kg4YUpF%Y z;9U7((P)wsRZkr{$!#tD*v=_Bx+CkoqGm8X^ql6ow2#j53H|f}+*CB?9sJW`WDC8F zaKf4`#46+@75}fFvB5xsJ79gVnif9fn5HR3DjJ*pM&k=eH*fT%#3eqty&L;ojmIgE zI)AN617YigRyDJtluBnK#L&tI*1Z7}%8@$>j#7VT!Hlwu%qAv+TZ=>wE24JhFqXQj zB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^~FIFj<~frh-3Ca z>%8EO;yA(fDp~TY1Fy>zbNtpCZAUHbSjc5YGv_c)BY$xH`Ms9ew_r|7@+jSRl$7uw zcS?pPwSIt*{kIUF@f;kr7qu8j#sae7cxJp0XjD&Clx~;0l(7%8Or&^-0`}AC@(I9r(s*Io76Y)}}kqrZ5d* zy?^4{;y||2i%L3MCI9J_JaKs_nUUvulBeCTp0!<<$x4up$ql>wA`lKA#pPk8%N65ambnn}IUQG>n_ zCjGDRtYf6ol`daYcGQ&`aiv0ADM@S1Mt@&qA|$E)tJIx~+xxt^IJ`AHIhnMJ;Z}U^ zaI_!5Wc)N(ahJ1oDT5JW4Klcr_e@1%v8R$;kF&`BXi{8?72!XD$?3~SbyDYJ_Z`r7 z?nucGpdjOWjSB?~t37@2?HQy3Gqec!(Sze(j}`;Xm74Gkj?`@2>TxfBSVyA)d4D3r zOWq);xQ}>xpiZBBaiC8+?xDc|=E(O219D#ctYC=mB^k7? z-R=>=fX}^e2Tl=WU!b2P$lf29ReuqY7_3i}X!Dwp^1!Rxi4@NEiFtA--uy z-M^7DR!IGf*NDZV;3)3DY!PRWVg5*hT`eo0SN3i+p^tnY%A!*iF>Q!OYX*xE)??oP zx=h4J^UmCJZz`E@-)gVXC4a4r_-pOU8LHvKs!2tK-~EY?MFo4QGehFb9DlyaF1PP; zyDqQq^13d+@AA8@pzjL0u0`LqkX>c>S&^~JI!<&g?MEKQPE0-R40aO92OqtTq(2OO zCq8$79xHE%v3q8F5M!WWRCGVY=pBpE_f(9E>AW!DKaVYMl=PieG)Ro&+;Ly<5g_IW z)(swA{!SuDil~{o^!};;*DjWGJGXN?w{ttUb33 Date: Thu, 17 Feb 2022 14:03:01 +0200 Subject: [PATCH 05/15] refactor private methods in dossiers service --- .../services/entity-services/dossiers.service.ts | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/apps/red-ui/src/app/services/entity-services/dossiers.service.ts b/apps/red-ui/src/app/services/entity-services/dossiers.service.ts index 6869264b0..5d7a7174b 100644 --- a/apps/red-ui/src/app/services/entity-services/dossiers.service.ts +++ b/apps/red-ui/src/app/services/entity-services/dossiers.service.ts @@ -33,7 +33,7 @@ const GENERIC_MSG = _('add-dossier-dialog.errors.generic'); providedIn: 'root', }) export class DossiersService extends EntitiesService { - readonly generalStats$ = this.all$.pipe(switchMap(entities => this._generalStats$(entities))); + readonly generalStats$ = this.all$.pipe(switchMap(entities => this.#generalStats$(entities))); readonly dossierFileChanges$ = new Subject(); constructor( @@ -47,7 +47,7 @@ export class DossiersService extends EntitiesService { timer(CHANGED_CHECK_INTERVAL, CHANGED_CHECK_INTERVAL) .pipe( switchMap(() => this.loadOnlyChanged()), - tap(changes => this._emitFileChanges(changes)), + tap(changes => this.#emitFileChanges(changes)), ) .subscribe(); } @@ -64,7 +64,7 @@ export class DossiersService extends EntitiesService { } loadOnlyChanged(): Observable { - const load = (changes: DossierChanges) => forkJoin(changes.map(change => this.load(change.dossierId))); + const load = (changes: DossierChanges) => forkJoin(changes.map(change => this._load(change.dossierId))); return this.hasChangesDetails$().pipe( switchMap(changes => load(changes.dossierChanges).pipe(mapTo(changes))), @@ -122,7 +122,7 @@ export class DossiersService extends EntitiesService { return this.all.filter(dossier => dossier.dossierStatusId === dossierStatusId).length; } - load(id: string, queryParams?: List): Observable { + private _load(id: string, queryParams?: List): Observable { return super._getOne([id], this._defaultModelPath, queryParams).pipe( map(entity => new Dossier(entity)), switchMap(dossier => this._dossierStatsService.getFor([dossier.dossierId]).pipe(mapTo(dossier))), @@ -130,11 +130,11 @@ export class DossiersService extends EntitiesService { ); } - private _emitFileChanges(changes: ChangesDetails): void { + #emitFileChanges(changes: ChangesDetails): void { changes.dossierChanges.filter(change => change.fileChanges).forEach(change => this.dossierFileChanges$.next(change.dossierId)); } - private _computeStats(entities: List): IDossiersStats { + #computeStats(entities: List): IDossiersStats { let totalAnalyzedPages = 0; const totalPeople = new Set(); @@ -149,11 +149,11 @@ export class DossiersService extends EntitiesService { }; } - private _generalStats$(entities: List): Observable { + #generalStats$(entities: List): Observable { const stats$ = entities.map(entity => this._dossierStatsService.watch$(entity.dossierId)); return combineLatest(stats$).pipe( filter(stats => stats.every(s => !!s)), - map(() => this._computeStats(entities)), + map(() => this.#computeStats(entities)), shareLast(), ); } From 7c1347bc24808bb439bb6d487f583e5ef706ab0c Mon Sep 17 00:00:00 2001 From: Atlassian Bamboo Date: Thu, 17 Feb 2022 13:15:23 +0100 Subject: [PATCH 06/15] chore(release) --- package.json | 2 +- paligo-theme.tar.gz | Bin 3215 -> 3215 bytes 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 4132d5b49..9af209bd4 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "redaction", - "version": "3.238.0", + "version": "3.239.0", "private": true, "license": "MIT", "scripts": { diff --git a/paligo-theme.tar.gz b/paligo-theme.tar.gz index c7e70d3081378e81a1ea81325b8c91e4143ae8be..e9d19de813ddc7a08d24a12e0ca4f1e65a89293c 100644 GIT binary patch delta 3097 zcmV+!4CeEX8IKu|cnLw^EMD1;9oYVnfgyhny3YFl5!zn;S0u&}lVkI!u0L!IuHc0~ zrGL)>b$9w-IQA0szX&|{6|%oyR?Y1fuKzbtimRG1botk>zpz%9cNcHywk#@!nku`x zOc^Wd_03IEeuh*2}Z1%88*&Ba* z2HW_~p84W$ApS1I-=+Awg1?TK{lllRdm)Ca}b50-5 ztd!uGROnw92)(mt9+Ss4a_-<)N+_(qMt)$Ik9QZ(1BmrHBuP;b0U6@xep3}q9$Qh7 z71bJjydWQ~6oK3_m~J;-G_N6?qioLC(xt7SWJi>nRIEmo8O zywdu@g0W%?R2zv#-OrlfDoO<*Tl{D}(3quw%eGZyYlItC@ZV)oQ$`EusYr$yeM=7G zp0}S?LP-{jmEh&s+J;Qr#tjqozA4bSOwd=#1+Zeoss{jscPO;7Bpw1GT4I6 ztwH=}AIHKvE#69b8w@Cp{WyORm@eLINlY;+^6UxKQAJ3Oa2}&8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!T<7xvL1*WJul72M4>|YC1^JINaUC=zJ;`z0ZD6xD8ipeqILwSFkKpUi@OL zPvU0$u&m+hz&A$Au{K?^Hr;_Xg=q-u72g&IvXx#`(%CBcPp{;O%R|YGJlB&v?SA#F z?Ybm~yAEJfKNcL?mrQ@tTxqlYDS@q+5PzTs+Tpcu`@}$vUou2QIE${Jghv)~AY5Fl z44~AL#JAsi!rPyc==KNKOzMq}8uX1Y>3@x99V3;lborvPqpsA5D;3&GNm^?*`XUn{ zN%dc)?p)m7=gr08t>MYZq+JZR;&X?i{QxH8r@@N5oUKb4j1YfokinI_XDSklJ(c8o zoJICWlj2gW2>%I8PG3H%lR6)}?|`;*M@oJG1sUIKTqs~z?dgMW&ma|;p+&%t9vuIA zv>0fv)P!$vq-Nt*k9+yUIvNeg6Coz&HZT+cI5votIO~u$c}>_Zk`~#l{W82D)}ohk zL;bUO!l2M|!pnaJl?&5@1$F!ff2XjQ7!iyQkTaRO9l+cN!9)08@&-Z0eZ@KeC~ZaaEc)N0{tXG_Wro6iipHueWFC0 z*Nl`0UfoWlc#bJW8Ou%=e}4|~O+)JbjhwMU>Sw%0EFOOaM{)mUi#US}^G6cwYFYWb zvUj5iedPO47M-$)X+tzxGgyqU9`pX!Wg;c{bA@k@wxl+Sb0N?-80*R7y}KXqWd96?^uk!r(#r0 z=Y;|Pd2D&3r0=w%L1G-|j{Aa-05M0fZt&>xcM?HTM9tKt_fP%5ww&9!o!hyc+qs?F nxt-g&o!hyc+qs?Fxt-g&o!hyc+qwN>+y4QCB##9t08jt`+e;6F From 8b1d63a6757b13a3acd2adfeb5df2808bf79181e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adina=20=C8=9Aeudan?= Date: Thu, 17 Feb 2022 19:55:18 +0200 Subject: [PATCH 07/15] RED-3411: list indicator --- ...rm-delete-dossier-state-dialog.component.ts | 3 ++- .../file-name-column.component.html | 8 +++++++- .../file-name-column.component.scss | 8 ++++++++ .../table-item/table-item.component.html | 8 +++----- .../workflow-item/workflow-item.component.html | 9 +-------- .../file-preview-screen.component.html | 9 +-------- .../file-preview-screen.component.ts | 2 +- .../file-actions/file-actions.component.html | 9 +-------- .../file-actions/file-actions.component.ts | 2 +- .../translations/file-status-translations.ts | 2 ++ .../processing-indicator.component.html | 3 +++ .../processing-indicator.component.scss | 3 +++ .../processing-indicator.component.ts | 18 ++++++++++++++++++ .../src/app/modules/shared/shared.module.ts | 2 ++ apps/red-ui/src/assets/i18n/en.json | 10 +++++++--- libs/red-domain/src/lib/files/file.model.ts | 8 +++++--- libs/red-domain/src/lib/files/types.ts | 6 +++++- 17 files changed, 70 insertions(+), 40 deletions(-) create mode 100644 apps/red-ui/src/app/modules/shared/components/processing-indicator/processing-indicator.component.html create mode 100644 apps/red-ui/src/app/modules/shared/components/processing-indicator/processing-indicator.component.scss create mode 100644 apps/red-ui/src/app/modules/shared/components/processing-indicator/processing-indicator.component.ts diff --git a/apps/red-ui/src/app/modules/admin/dialogs/confirm-delete-dossier-state-dialog/confirm-delete-dossier-state-dialog.component.ts b/apps/red-ui/src/app/modules/admin/dialogs/confirm-delete-dossier-state-dialog/confirm-delete-dossier-state-dialog.component.ts index 6088cb114..387160092 100644 --- a/apps/red-ui/src/app/modules/admin/dialogs/confirm-delete-dossier-state-dialog/confirm-delete-dossier-state-dialog.component.ts +++ b/apps/red-ui/src/app/modules/admin/dialogs/confirm-delete-dossier-state-dialog/confirm-delete-dossier-state-dialog.component.ts @@ -2,6 +2,7 @@ import { ChangeDetectionStrategy, Component, Inject } from '@angular/core'; import { IDossierState } from '@red/domain'; import { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog'; import { FormBuilder, FormGroup } from '@angular/forms'; +import { marker as _ } from '@biesbjerg/ngx-translate-extract-marker'; interface DialogData { readonly toBeDeletedState: IDossierState; @@ -38,7 +39,7 @@ export class ConfirmDeleteDossierStateDialogComponent { } get label(): string { - return this.replaceDossierStatusId ? 'confirm-delete-dossier-state.delete-replace' : 'confirm-delete-dossier-state.delete'; + return this.replaceDossierStatusId ? _('confirm-delete-dossier-state.delete-replace') : _('confirm-delete-dossier-state.delete'); } get afterCloseValue(): string | true { diff --git a/apps/red-ui/src/app/modules/dossier/screens/dossier-overview/components/table-item/file-name-column/file-name-column.component.html b/apps/red-ui/src/app/modules/dossier/screens/dossier-overview/components/table-item/file-name-column/file-name-column.component.html index 3c6f12950..f6b15ff1b 100644 --- a/apps/red-ui/src/app/modules/dossier/screens/dossier-overview/components/table-item/file-name-column/file-name-column.component.html +++ b/apps/red-ui/src/app/modules/dossier/screens/dossier-overview/components/table-item/file-name-column/file-name-column.component.html @@ -1,5 +1,11 @@
-
+
{{ file.filename }}
diff --git a/apps/red-ui/src/app/modules/dossier/screens/dossier-overview/components/table-item/file-name-column/file-name-column.component.scss b/apps/red-ui/src/app/modules/dossier/screens/dossier-overview/components/table-item/file-name-column/file-name-column.component.scss index bcbf74f08..6d6ea372d 100644 --- a/apps/red-ui/src/app/modules/dossier/screens/dossier-overview/components/table-item/file-name-column/file-name-column.component.scss +++ b/apps/red-ui/src/app/modules/dossier/screens/dossier-overview/components/table-item/file-name-column/file-name-column.component.scss @@ -2,6 +2,14 @@ .table-item-title { max-width: 25vw; + + &.error { + color: var(--iqser-red-1); + } + + &.initial-processing { + color: var(--iqser-disabled); + } } .primary-attribute { diff --git a/apps/red-ui/src/app/modules/dossier/screens/dossier-overview/components/table-item/table-item.component.html b/apps/red-ui/src/app/modules/dossier/screens/dossier-overview/components/table-item/table-item.component.html index 23d443a1f..ac30d92cd 100644 --- a/apps/red-ui/src/app/modules/dossier/screens/dossier-overview/components/table-item/table-item.component.html +++ b/apps/red-ui/src/app/modules/dossier/screens/dossier-overview/components/table-item/table-item.component.html @@ -40,15 +40,13 @@
-
+
-
- -
+
-
- -
+
-
- -
+ diff --git a/apps/red-ui/src/app/modules/dossier/screens/file-preview-screen/file-preview-screen.component.ts b/apps/red-ui/src/app/modules/dossier/screens/file-preview-screen/file-preview-screen.component.ts index ff7186de9..6fdff7a0d 100644 --- a/apps/red-ui/src/app/modules/dossier/screens/file-preview-screen/file-preview-screen.component.ts +++ b/apps/red-ui/src/app/modules/dossier/screens/file-preview-screen/file-preview-screen.component.ts @@ -566,7 +566,7 @@ export class FilePreviewScreenComponent extends AutoUnsubscribe implements OnIni return this._router.navigate([this._dossiersService.find(this.dossierId).routerLink]); } - if (file.isPending) { + if (file.isUnprocessed) { return; } diff --git a/apps/red-ui/src/app/modules/dossier/shared/components/file-actions/file-actions.component.html b/apps/red-ui/src/app/modules/dossier/shared/components/file-actions/file-actions.component.html index a65863042..94b795272 100644 --- a/apps/red-ui/src/app/modules/dossier/shared/components/file-actions/file-actions.component.html +++ b/apps/red-ui/src/app/modules/dossier/shared/components/file-actions/file-actions.component.html @@ -1,13 +1,6 @@
-
- -
+
diff --git a/apps/red-ui/src/app/modules/dossier/shared/components/file-actions/file-actions.component.ts b/apps/red-ui/src/app/modules/dossier/shared/components/file-actions/file-actions.component.ts index 8b4d73884..cf73d8661 100644 --- a/apps/red-ui/src/app/modules/dossier/shared/components/file-actions/file-actions.component.ts +++ b/apps/red-ui/src/app/modules/dossier/shared/components/file-actions/file-actions.component.ts @@ -373,7 +373,7 @@ export class FileActionsComponent extends AutoUnsubscribe implements OnDestroy, this.canDisableAutoAnalysis = this._permissionsService.canDisableAutoAnalysis([this.file]); this.canEnableAutoAnalysis = this._permissionsService.canEnableAutoAnalysis([this.file]); - this.showStatusBar = !this.file.isError && !this.file.isPending && this.isDossierOverviewList; + this.showStatusBar = !this.file.isError && !this.file.isUnprocessed && this.isDossierOverviewList; this.showAssignToSelf = this._permissionsService.canAssignToSelf(this.file) && this.isDossierOverview; this.showAssign = diff --git a/apps/red-ui/src/app/modules/dossier/translations/file-status-translations.ts b/apps/red-ui/src/app/modules/dossier/translations/file-status-translations.ts index 4649a8f47..1e413fccd 100644 --- a/apps/red-ui/src/app/modules/dossier/translations/file-status-translations.ts +++ b/apps/red-ui/src/app/modules/dossier/translations/file-status-translations.ts @@ -10,6 +10,8 @@ export const workflowFileStatusTranslations: { [key in WorkflowFileStatus]: stri }; export const processingFileStatusTranslations: { [key in ProcessingFileStatus]: string } = { + ANALYSE: _('file-status.analyse'), + NER_ANALYZING: _('file-status.ner-analyzing'), PROCESSED: _('file-status.processed'), DELETED: _('file-status.deleted'), ERROR: _('file-status.error'), diff --git a/apps/red-ui/src/app/modules/shared/components/processing-indicator/processing-indicator.component.html b/apps/red-ui/src/app/modules/shared/components/processing-indicator/processing-indicator.component.html new file mode 100644 index 000000000..b7f2967c8 --- /dev/null +++ b/apps/red-ui/src/app/modules/shared/components/processing-indicator/processing-indicator.component.html @@ -0,0 +1,3 @@ +
+ +
diff --git a/apps/red-ui/src/app/modules/shared/components/processing-indicator/processing-indicator.component.scss b/apps/red-ui/src/app/modules/shared/components/processing-indicator/processing-indicator.component.scss new file mode 100644 index 000000000..7f26ddcb5 --- /dev/null +++ b/apps/red-ui/src/app/modules/shared/components/processing-indicator/processing-indicator.component.scss @@ -0,0 +1,3 @@ +:host { + display: block; +} diff --git a/apps/red-ui/src/app/modules/shared/components/processing-indicator/processing-indicator.component.ts b/apps/red-ui/src/app/modules/shared/components/processing-indicator/processing-indicator.component.ts new file mode 100644 index 000000000..c70b5a778 --- /dev/null +++ b/apps/red-ui/src/app/modules/shared/components/processing-indicator/processing-indicator.component.ts @@ -0,0 +1,18 @@ +import { ChangeDetectionStrategy, Component, Input, OnChanges } from '@angular/core'; +import { File } from '@red/domain'; +import { marker as _ } from '@biesbjerg/ngx-translate-extract-marker'; + +@Component({ + selector: 'redaction-processing-indicator [file]', + templateUrl: './processing-indicator.component.html', + styleUrls: ['./processing-indicator.component.scss'], + changeDetection: ChangeDetectionStrategy.OnPush, +}) +export class ProcessingIndicatorComponent implements OnChanges { + tooltip: string; + @Input() file: File; + + ngOnChanges() { + this.tooltip = this.file.isInitialProcessing ? _('file-status.initial-processing') : _('file-status.re-processing'); + } +} diff --git a/apps/red-ui/src/app/modules/shared/shared.module.ts b/apps/red-ui/src/app/modules/shared/shared.module.ts index 4f606ceb9..939fd0eb7 100644 --- a/apps/red-ui/src/app/modules/shared/shared.module.ts +++ b/apps/red-ui/src/app/modules/shared/shared.module.ts @@ -26,6 +26,7 @@ import { TypeFilterComponent } from './components/type-filter/type-filter.compon import { TeamMembersComponent } from './components/team-members/team-members.component'; import { EditorComponent } from './components/editor/editor.component'; import { ExpandableFileActionsComponent } from './components/expandable-file-actions/expandable-file-actions.component'; +import { ProcessingIndicatorComponent } from '@shared/components/processing-indicator/processing-indicator.component'; const buttons = [FileDownloadBtnComponent, UserButtonComponent]; @@ -41,6 +42,7 @@ const components = [ TypeFilterComponent, TeamMembersComponent, ExpandableFileActionsComponent, + ProcessingIndicatorComponent, ...buttons, ]; diff --git a/apps/red-ui/src/assets/i18n/en.json b/apps/red-ui/src/assets/i18n/en.json index df128effe..735fca3da 100644 --- a/apps/red-ui/src/assets/i18n/en.json +++ b/apps/red-ui/src/assets/i18n/en.json @@ -410,8 +410,8 @@ "configurations": "Configurations", "confirm-delete-dossier-state": { "cancel": "Cancel", - "delete-replace": "Delete and Replace", "delete": "Delete only", + "delete-replace": "Delete and Replace", "form": { "status": "Replace Status", "status-placeholder": "Choose another status" @@ -910,12 +910,12 @@ }, "download-type": { "annotated": "Annotated PDF", + "delta-preview": "Delta PDF", "flatten": "Flatten PDF", "label": "{length} document {length, plural, one{version} other{versions}}", "original": "Optimized PDF", "preview": "Preview PDF", - "redacted": "Redacted PDF", - "delta-preview": "Delta PDF" + "redacted": "Redacted PDF" }, "downloads-list": { "actions": { @@ -1248,16 +1248,20 @@ } }, "file-status": { + "analyse": "Analyzing", "approved": "Approved", "deleted": "Deleted", "error": "Re-processing required", "full-reprocess": "Processing", "image-analyzing": "Image Analyzing", "indexing": "Processing", + "initial-processing": "Initial processing...", + "ner-analyzing": "NER Analyzing", "new": "New", "ocr-processing": "OCR Processing", "processed": "Processed", "processing": "Processing...", + "re-processing": "Re-processing...", "reprocess": "Processing", "unassigned": "Unassigned", "under-approval": "Under Approval", diff --git a/libs/red-domain/src/lib/files/file.model.ts b/libs/red-domain/src/lib/files/file.model.ts index d1168ffa2..2c4f19da3 100644 --- a/libs/red-domain/src/lib/files/file.model.ts +++ b/libs/red-domain/src/lib/files/file.model.ts @@ -48,8 +48,9 @@ export class File extends Entity implements IFile { readonly isNew: boolean; readonly isError: boolean; readonly isProcessing: boolean; + readonly isInitialProcessing: boolean; readonly isApproved: boolean; - readonly isPending: boolean; + readonly isUnprocessed: boolean; readonly isUnderReview: boolean; readonly isUnderApproval: boolean; readonly canBeApproved: boolean; @@ -89,6 +90,7 @@ export class File extends Entity implements IFile { this.processingStatus = file.processingStatus; this.workflowStatus = file.workflowStatus; this.isError = this.processingStatus === ProcessingFileStatuses.ERROR; + this.isUnprocessed = this.processingStatus === ProcessingFileStatuses.UNPROCESSED; this.numberOfPages = this.isError ? 0 : file.numberOfPages ?? 0; this.rulesVersion = file.rulesVersion; this.uploader = file.uploader; @@ -99,14 +101,14 @@ export class File extends Entity implements IFile { this.cacheIdentifier = btoa((this.lastUploaded ?? '') + (this.lastOCRTime ?? '')); this.hintsOnly = this.hasHints && !this.hasRedactions; this.hasNone = !this.hasRedactions && !this.hasHints && !this.hasSuggestions; - this.isPending = this.processingStatus === ProcessingFileStatuses.UNPROCESSED; this.isProcessing = isProcessingStatuses.includes(this.processingStatus); + this.isInitialProcessing = this.isProcessing && this.numberOfAnalyses === 0; this.isApproved = this.workflowStatus === WorkflowFileStatuses.APPROVED; this.isNew = this.workflowStatus === WorkflowFileStatuses.NEW; this.isUnderReview = this.workflowStatus === WorkflowFileStatuses.UNDER_REVIEW; this.isUnderApproval = this.workflowStatus === WorkflowFileStatuses.UNDER_APPROVAL; this.canBeApproved = !this.analysisRequired && !this.hasSuggestions && !this.isProcessing && !this.isError; - this.canBeOpened = !this.isError && !this.isPending && this.numberOfAnalyses > 0; + this.canBeOpened = !this.isError && !this.isUnprocessed && this.numberOfAnalyses > 0; this.canBeOCRed = !this.excluded && !this.lastOCRTime && (this.isNew || this.isUnderReview || this.isUnderApproval); if (!this.fileAttributes || !this.fileAttributes.attributeIdToValue) { diff --git a/libs/red-domain/src/lib/files/types.ts b/libs/red-domain/src/lib/files/types.ts index 70155c11f..bce6a1566 100644 --- a/libs/red-domain/src/lib/files/types.ts +++ b/libs/red-domain/src/lib/files/types.ts @@ -11,16 +11,18 @@ export const WorkflowFileStatuses = { export type WorkflowFileStatus = keyof typeof WorkflowFileStatuses; export const ProcessingFileStatuses = { + ANALYSE: 'ANALYSE', DELETED: 'DELETED', ERROR: 'ERROR', FULLREPROCESS: 'FULLREPROCESS', IMAGE_ANALYZING: 'IMAGE_ANALYZING', - SURROUNDING_TEXT_PROCESSING: 'SURROUNDING_TEXT_PROCESSING', INDEXING: 'INDEXING', + NER_ANALYZING: 'NER_ANALYZING', OCR_PROCESSING: 'OCR_PROCESSING', PROCESSED: 'PROCESSED', PROCESSING: 'PROCESSING', REPROCESS: 'REPROCESS', + SURROUNDING_TEXT_PROCESSING: 'SURROUNDING_TEXT_PROCESSING', UNPROCESSED: 'UNPROCESSED', } as const; @@ -32,8 +34,10 @@ export const isProcessingStatuses: List = [ ProcessingFileStatuses.SURROUNDING_TEXT_PROCESSING, ProcessingFileStatuses.OCR_PROCESSING, ProcessingFileStatuses.IMAGE_ANALYZING, + ProcessingFileStatuses.NER_ANALYZING, ProcessingFileStatuses.INDEXING, ProcessingFileStatuses.PROCESSING, + ProcessingFileStatuses.ANALYSE, ] as const; export interface StatusBarConfig { From a5b7e46fad90600acec7c8ebd02ceca0dc598fec Mon Sep 17 00:00:00 2001 From: Atlassian Bamboo Date: Thu, 17 Feb 2022 19:02:36 +0100 Subject: [PATCH 08/15] chore(release) --- package.json | 2 +- paligo-theme.tar.gz | Bin 3215 -> 3214 bytes 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 9af209bd4..b4ca07d4c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "redaction", - "version": "3.239.0", + "version": "3.240.0", "private": true, "license": "MIT", "scripts": { diff --git a/paligo-theme.tar.gz b/paligo-theme.tar.gz index e9d19de813ddc7a08d24a12e0ca4f1e65a89293c..5eb856afa2d86a5bc9e94500f0ffac385c23d705 100644 GIT binary patch delta 3015 zcmV;&3pn(T8IBo{b_*BS3(xak*^V99&XIv3DR&v1_5WkEz51_6j3Xw;=22aL*cx2H z3x7)gp5u64um45hfc_T&m;sT@R)6N%_MJWR#os{uU5LL+@plD(9Wloda~v_p5px_d z$Ki8+6VtlP@Y5&t11>MG?=I$?KAc%8!7-`Ozb+7ZXVE++k89-I!LO81SbvTDz%C!} zE}jPv>vc$yq9Ot^#L@kxDw;gDq9QA*HTuY1d9Lq_;ZW)b5H1X>rtioaEq{Ezfb4pZ z%W{sOFQYlJI#O24cH$OS8=70JC;@n-^@Rmv#TKYG5{}{l%c7=?7SL0X3^V$c9L7CwKdpq4EEX%tRUF&?HAfm26_+D&%12Ze8I93L zu@?t1-VIt6j%iZ^=Pg|ZIe#Zfaw0A3H5fuf(jw~=Uz9ka>}iec`SL_$vzM(rv=+@S z9BCJt4LGY~6gw7viQ|~&8$jTKyq)DySVES!z`g!)2&!rr;dE6kMZ!*Z=(#$bNqw;j zws(mulCwJ_|4~!bysIo|&PZjj1)E!g_|HC$g>_oImGU+iP#pVlAb&7jyxEeNVpQbW z6RM+%kR0JWMpw!fS@QjMEpVClwWdMeZRKFz+XKx8a(6#-rV@f#1ECYh1Tg??hC`Bx z6{IIyqrAw)J{-@Un%Bt&G?fvnY{HC2m@9TdIGVPe_rbqLxW%FC%Gb@z0615ESTvd> zMb%S>PI6mIKels4e!FC(0=W(%t}2*kl+qjAFQT@4>_i3N|B1jX1~$+0@BSJeJOE?Pj2tVeplmh%A-ze(m>cc zp;gVSD5cWb2r;zsfpu@dgmUCgf}_;mSumq4BeRK#;MOA1!+(mXojHu9?&`=`>Mit8 zXP-bG!Y2@jjgJ0=wOaRe%8H7^8#`D=9+?%B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P!s^P<`NkxU<{fUo71$(J8L*mOEzR51P?{d2?ukZ4@ zF2C>cyRM+`3c9XE-?flkW%pT;vCBG6bS>>i9>#x8Og-%kb`r@4AH9yGKMZ{*K6if} zD{qLgduDqOW1wMFbU(!C9gETTRE&!0yfENDk1cPM^qp2TNQ~p$abNHeAm#|x4IW+o zP9jK(sF}L-{;B`hmUBC|b33 Date: Thu, 17 Feb 2022 20:17:45 +0200 Subject: [PATCH 09/15] Supertype after recategorization --- .../src/app/models/file/annotation.wrapper.ts | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/apps/red-ui/src/app/models/file/annotation.wrapper.ts b/apps/red-ui/src/app/models/file/annotation.wrapper.ts index aaac10fa3..e16705469 100644 --- a/apps/red-ui/src/app/models/file/annotation.wrapper.ts +++ b/apps/red-ui/src/app/models/file/annotation.wrapper.ts @@ -426,8 +426,17 @@ export class AnnotationWrapper { case ManualRedactionType.RECATEGORIZE: switch (lastManualChange.annotationStatus) { case LogEntryStatus.APPROVED: - case LogEntryStatus.DECLINED: - return redactionLogEntry.redacted ? 'redaction' : 'hint'; + case LogEntryStatus.DECLINED: { + if (redactionLogEntry.recommendation) { + return 'recommendation'; + } else if (redactionLogEntry.redacted) { + return 'redaction'; + } else if (redactionLogEntry.hint) { + return 'hint'; + } else { + return 'skipped'; + } + } case LogEntryStatus.REQUESTED: return 'suggestion-recategorize-image'; } From 6565c2da20a1fd2c3f73602d042a6cb7b167acf1 Mon Sep 17 00:00:00 2001 From: Atlassian Bamboo Date: Thu, 17 Feb 2022 19:31:53 +0100 Subject: [PATCH 10/15] chore(release) --- package.json | 2 +- paligo-theme.tar.gz | Bin 3214 -> 3216 bytes 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index b4ca07d4c..a1779d19e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "redaction", - "version": "3.240.0", + "version": "3.241.0", "private": true, "license": "MIT", "scripts": { diff --git a/paligo-theme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wo;PTntzSH$V5m|{a2|w7q|C$b8&cUcycmn7sIXi z+~H_HfXVo2u;MOf>rw_I#2RF9CGVMv#9~h+xgKYc{n4bj6f44i0+Z91kLsk($L>3z z?c9-)A3#CI_Zk-p7*>1w;M+4u1!iaw@S_LEzaA|HnkzNo8yuF zh{?GP3`GEr4PqtEI;2fr6Sj+_MK)`{3@?ba=%w6H|16#`DD<50azW+7^k6|9|H0oW z>?KA7;{)VOrfvr?_d)Ow{+GN#P;npe^gx|H`QkvIblgLO0nCx_3kKx8_*uaa-%B!R zUAx^Qf&rg<-wvE2$i6^7NszriE`O^cA~9H>DADFMBjtftw-YIzV@grRveU)ipF@1p zkh*^(XRMI=8LttGN5N6tf7v3=AjABT1iM;RKCkTEXhI+PK9ohLEMnRajn)hnBdo`~ z|8<#&kLI1Z=iXE@-@eseqf7o;8}ZlLmorquhgFk`3cvdkABzh1QfG$5mw!2YlU;7# z<#t_O-{o~(e&6MHT|wU!bX|+SYazSJ?z19emvx-zTH231jGdTz+8OL5k`F$59Z7!} z`c8cA{ybLR5M%eu_8`VU!>H(fh|xP1qwlF071McPz<(ZF-YDrit!R)K$GPLa;3GiH z5v&_Ly8N9)kQ7lfb?N<6|1YmC=XP%Ac5df(Zs&Gx=XP%Ac5df(Zs&Gx=XP%Ac5df( QZok;}f9-H1@c>W&0L6X=fdBvi From c1a342e6ee807ff7b58d3a649542606129d2286f Mon Sep 17 00:00:00 2001 From: Timo Bejan Date: Thu, 17 Feb 2022 20:36:10 +0200 Subject: [PATCH 11/15] Import Redactions work in progress / fix for missing dossier templates, annotation debug --- .../dossier-details-stats.component.ts | 2 +- ...dossiers-listing-dossier-name.component.ts | 2 +- .../dossiers-listing-status.component.html | 4 +-- .../dossiers-listing/config.service.ts | 2 +- .../annotations-list.component.ts | 6 ++++ .../pdf-viewer/pdf-viewer.component.html | 2 +- .../file-actions/file-actions.component.html | 8 +++++ .../file-actions/file-actions.component.scss | 4 +++ .../file-actions/file-actions.component.ts | 36 +++++++++++++++++++ .../services/redaction-import.service.ts | 25 +++++++++++++ .../dossier/shared/shared-dossiers.module.ts | 3 +- .../dictionaries-map.service.ts | 2 +- .../entity-services/dossier-state.service.ts | 4 +-- .../dossier-templates.service.ts | 20 ++++++----- .../src/app/services/permissions.service.ts | 4 +++ apps/red-ui/src/assets/config/config.json | 4 +-- apps/red-ui/src/assets/i18n/en.json | 1 + 17 files changed, 109 insertions(+), 20 deletions(-) create mode 100644 apps/red-ui/src/app/modules/dossier/shared/services/redaction-import.service.ts diff --git a/apps/red-ui/src/app/modules/dossier/screens/dossier-overview/components/dossier-details-stats/dossier-details-stats.component.ts b/apps/red-ui/src/app/modules/dossier/screens/dossier-overview/components/dossier-details-stats/dossier-details-stats.component.ts index 87f035344..bc8ef922a 100644 --- a/apps/red-ui/src/app/modules/dossier/screens/dossier-overview/components/dossier-details-stats/dossier-details-stats.component.ts +++ b/apps/red-ui/src/app/modules/dossier/screens/dossier-overview/components/dossier-details-stats/dossier-details-stats.component.ts @@ -37,7 +37,7 @@ export class DossierDetailsStatsComponent implements OnInit { switchMap(() => this._filesService.getDeletedFilesFor(this.dossier.id)), map(files => files.length), ); - this.dossierTemplateName = this._dossierTemplatesService.find(this.dossier.dossierTemplateId).name; + this.dossierTemplateName = this._dossierTemplatesService.find(this.dossier.dossierTemplateId)?.name || '-'; } openEditDossierDialog(section: string): void { diff --git a/apps/red-ui/src/app/modules/dossier/screens/dossiers-listing/components/dossiers-listing-dossier-name/dossiers-listing-dossier-name.component.ts b/apps/red-ui/src/app/modules/dossier/screens/dossiers-listing/components/dossiers-listing-dossier-name/dossiers-listing-dossier-name.component.ts index bbc7be107..30a26f8b5 100644 --- a/apps/red-ui/src/app/modules/dossier/screens/dossiers-listing/components/dossiers-listing-dossier-name/dossiers-listing-dossier-name.component.ts +++ b/apps/red-ui/src/app/modules/dossier/screens/dossiers-listing/components/dossiers-listing-dossier-name/dossiers-listing-dossier-name.component.ts @@ -36,6 +36,6 @@ export class DossiersListingDossierNameComponent { } getDossierTemplateNameFor(dossierTemplateId: string): string { - return this._dossierTemplatesService.find(dossierTemplateId).name; + return this._dossierTemplatesService.find(dossierTemplateId)?.name || '-'; } } diff --git a/apps/red-ui/src/app/modules/dossier/screens/dossiers-listing/components/dossiers-listing-status/dossiers-listing-status.component.html b/apps/red-ui/src/app/modules/dossier/screens/dossiers-listing/components/dossiers-listing-status/dossiers-listing-status.component.html index 1ec18fba9..3df7ebc04 100644 --- a/apps/red-ui/src/app/modules/dossier/screens/dossiers-listing/components/dossiers-listing-status/dossiers-listing-status.component.html +++ b/apps/red-ui/src/app/modules/dossier/screens/dossiers-listing/components/dossiers-listing-status/dossiers-listing-status.component.html @@ -1,11 +1,11 @@ - +
{{ currentState.name }}
- +
{{ 'edit-dossier-dialog.general-info.form.dossier-status.placeholder' | translate }}
diff --git a/apps/red-ui/src/app/modules/dossier/screens/dossiers-listing/config.service.ts b/apps/red-ui/src/app/modules/dossier/screens/dossiers-listing/config.service.ts index 66fdedebd..290cb5253 100644 --- a/apps/red-ui/src/app/modules/dossier/screens/dossiers-listing/config.service.ts +++ b/apps/red-ui/src/app/modules/dossier/screens/dossiers-listing/config.service.ts @@ -143,7 +143,7 @@ export class ConfigService { id => new NestedFilter({ id: id, - label: this._dossierTemplatesService.find(id).name, + label: this._dossierTemplatesService.find(id)?.name || '-', }), ); diff --git a/apps/red-ui/src/app/modules/dossier/screens/file-preview-screen/components/annotations-list/annotations-list.component.ts b/apps/red-ui/src/app/modules/dossier/screens/file-preview-screen/components/annotations-list/annotations-list.component.ts index 062d28b62..cb29ddd3a 100644 --- a/apps/red-ui/src/app/modules/dossier/screens/file-preview-screen/components/annotations-list/annotations-list.component.ts +++ b/apps/red-ui/src/app/modules/dossier/screens/file-preview-screen/components/annotations-list/annotations-list.component.ts @@ -5,6 +5,7 @@ import { MultiSelectService } from '../../services/multi-select.service'; import { AnnotationReferencesService } from '../../services/annotation-references.service'; import { ViewModeService } from '../../services/view-mode.service'; import { FilePreviewStateService } from '../../services/file-preview-state.service'; +import { UserPreferenceService } from '../../../../../../services/user-preference.service'; @Component({ selector: 'redaction-annotations-list', @@ -28,6 +29,7 @@ export class AnnotationsListComponent implements OnChanges { readonly annotationReferencesService: AnnotationReferencesService, private readonly _filterService: FilterService, private readonly _state: FilePreviewStateService, + private readonly _userPreferenceService: UserPreferenceService, ) {} ngOnChanges(changes: SimpleChanges): void { @@ -37,6 +39,10 @@ export class AnnotationsListComponent implements OnChanges { } annotationClicked(annotation: AnnotationWrapper, $event: MouseEvent): void { + if (this._userPreferenceService.areDevFeaturesEnabled) { + console.log('Selected Annotation:', annotation); + } + if (($event?.target as IqserEventTarget)?.localName === 'input') { return; } diff --git a/apps/red-ui/src/app/modules/dossier/screens/file-preview-screen/components/pdf-viewer/pdf-viewer.component.html b/apps/red-ui/src/app/modules/dossier/screens/file-preview-screen/components/pdf-viewer/pdf-viewer.component.html index 97eab9b6a..68d38d51c 100644 --- a/apps/red-ui/src/app/modules/dossier/screens/file-preview-screen/components/pdf-viewer/pdf-viewer.component.html +++ b/apps/red-ui/src/app/modules/dossier/screens/file-preview-screen/components/pdf-viewer/pdf-viewer.component.html @@ -2,7 +2,7 @@
- +