From b83e7a0e15b0de94190d89c768ab17a74098a8a2 Mon Sep 17 00:00:00 2001 From: Valentin Mihai Date: Tue, 3 May 2022 16:56:05 +0300 Subject: [PATCH 01/30] RED-3966 - As a user I want to set/edit the justification of an imported redaction --- apps/red-ui/src/app/models/file/annotation.permissions.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/red-ui/src/app/models/file/annotation.permissions.ts b/apps/red-ui/src/app/models/file/annotation.permissions.ts index 2c5d1e02d..8e9ee5082 100644 --- a/apps/red-ui/src/app/models/file/annotation.permissions.ts +++ b/apps/red-ui/src/app/models/file/annotation.permissions.ts @@ -44,7 +44,7 @@ export class AnnotationPermissions { (annotation.isRedacted || annotation.isSkipped || annotation.isHint) && !annotation.pending; - permissions.canChangeLegalBasis = annotation.isRedacted && !annotation.imported && !annotation.pending; + permissions.canChangeLegalBasis = annotation.isRedacted && !annotation.pending; permissions.canRecategorizeImage = ((annotation.isImage && !annotation.isSuggestion) || annotation.isSuggestionRecategorizeImage) && !annotation.pending; From ac60d7cc2b88e8944b073229fce172ca4ca669c4 Mon Sep 17 00:00:00 2001 From: Atlassian Bamboo Date: Tue, 3 May 2022 15:58:40 +0200 Subject: [PATCH 02/30] chore(release) --- package.json | 2 +- paligo-theme.tar.gz | Bin 3248 -> 3247 bytes 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 2a159797d..3489a8446 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "redaction", - "version": "3.451.0", + "version": "3.452.0", "private": true, "license": "MIT", "scripts": { diff --git a/paligo-theme.tar.gz b/paligo-theme.tar.gz index 279150e4a1e20797f7e49866baf6f5eac403b2a5..59bdcf47207552ff2177b84ded3734d61b733b19 100644 GIT binary patch literal 3247 zcmV;g3{dkQiwFP!000001MM5hlH9gc=lKd`Tu#k6%^t43O<7S~v6D+G728QJxqu|t zM21b$B&eBDN>%xdoO1DJ_@+O}m*fEi*#HT4_h@9s^e~fZa{uP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>#&}D7fzI`gE+yNUAt{9E9V-xjs zYnUQk$TI_>B0RS)@s`L}Ev=Kzw#$NHKcIAihsJ8L!1H;;A=|m#oZ0H zV|x+c?WhmkZO6%Z*BSCYzC$@uC(kzOXjeU8j0Dmy!H8$J)bF6)eK4x}kmLujvfTO5g2dR9qetHeLOkS9()B{6cNQ_{5m z>Pg#INecHBK&ZY?I@B*2rnypQ`)w0jQ6YW}4y4032il7as{fKMBEng871*C53pwB} zu2lk1>Ph6=w;u8KQzG4daLJ_JXzxW|2$S~LxcM^@=}PA>Dm&~-4Y^Xmt(2&>YNJmw z;gVGQRqDpY?QPy%>}DG-woK~9a4Ej+V6+b)GJYJ)xR2Sokij@&13b8rN2En!vB#2J zkE6(buU4G#72)53$mz3GwNqzf5A9fY=17STAR*&xjWY!ltKE+A?HPmuGqec!UX0^k zk0t}jl^XL6hSaRw>i##szDJ`0dcwuzTnC0M0K*2p5@#LICa($Gd(tACwJ*c-Zq0is zhweX%`xh!crfU~!`$@Mg4gwUe@d(JtKqOV5?YK??dGC$Z5%-7w;E7l0-;RYhgxFo(Jqj_ Date: Tue, 3 May 2022 19:13:45 +0300 Subject: [PATCH 03/30] RED-3800 error message parsing --- apps/red-ui/src/assets/config/config.json | 4 ++-- libs/common-ui | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/apps/red-ui/src/assets/config/config.json b/apps/red-ui/src/assets/config/config.json index 684210fa7..0cb5f13c3 100644 --- a/apps/red-ui/src/assets/config/config.json +++ b/apps/red-ui/src/assets/config/config.json @@ -1,7 +1,7 @@ { "ADMIN_CONTACT_NAME": null, "ADMIN_CONTACT_URL": null, - "API_URL": "https://dev-08.iqser.cloud/redaction-gateway-v1", + "API_URL": "https://dev-04.iqser.cloud/redaction-gateway-v1", "APP_NAME": "RedactManager", "AUTO_READ_TIME": 3, "BACKEND_APP_VERSION": "4.4.40", @@ -17,7 +17,7 @@ "MAX_RETRIES_ON_SERVER_ERROR": 3, "OAUTH_CLIENT_ID": "redaction", "OAUTH_IDP_HINT": null, - "OAUTH_URL": "https://dev-08.iqser.cloud/auth/realms/redaction", + "OAUTH_URL": "https://dev-04.iqser.cloud/auth/realms/redaction", "RECENT_PERIOD_IN_HOURS": 24, "SELECTION_MODE": "structural", "MANUAL_BASE_URL": "https://docs.redactmanager.com/preview" diff --git a/libs/common-ui b/libs/common-ui index 2998cb076..fd9d62241 160000 --- a/libs/common-ui +++ b/libs/common-ui @@ -1 +1 @@ -Subproject commit 2998cb076f802a2bfb8694742c2c35a36ae687b8 +Subproject commit fd9d622413547de842439e8d91ee4316f2facff1 From 2ca93e4a135a32fe095d564c45dd3250e957d1cc Mon Sep 17 00:00:00 2001 From: Atlassian Bamboo Date: Tue, 3 May 2022 18:16:18 +0200 Subject: [PATCH 04/30] chore(release) --- package.json | 2 +- paligo-theme.tar.gz | Bin 3247 -> 3248 bytes 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 3489a8446..7ce869fae 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "redaction", - "version": "3.452.0", + "version": "3.453.0", "private": true, "license": "MIT", "scripts": { diff --git a/paligo-theme.tar.gz b/paligo-theme.tar.gz index 59bdcf47207552ff2177b84ded3734d61b733b19..53f3a6730fca594c0cc51aa61bf1f64c96f4ad7e 100644 GIT binary patch delta 2623 zcmV-F3c&TR8L%0DABzY80000000ZqC$#Uejb1Ur z8Qm5ZOUaJhy!bJS4P_bF{OJsyU3ua7uIIaf>p6=Twqpl>w)X-BKMFR3($oxB2z`vH zevW0X%U^!f>@g$thth_p%inXC%d`AHMmZ?|io`f#vTYvK_501i1-$U5#qgbCVP~ ztLNLI*k%NOm$aTo#qI_a!u@rEcQkwa{EsEcfAtN{>kVZ%o850y_R5}lwtZ{QeDNEI z--Y;Hir*FdI--vw`Z%JGBl#-(Ji)emJvIf@4yle_SB+ z#-e#l9yZ9ig|C!Qn16%(z%CzdFWwGDY&IcDii(I7ks*%mwpG#Ou@x0rQ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;8L}V90Z}cBjFr+{(eXPvw+5U?aj6qmg!OqMmLIQ=|)dW*}6A z=hh|O68Wm7b<){(Sul+JL`V1~GJ;B7129|hPZx8DQy>C-P078uyPoFM$54@U9&XZfi#6`2<;VbizCrW&njtbmH4NB7xKi(rzA#hbV{1`Up;C2DoNqK z0tnUjNr(C+!!%dwY`<+{D=NgV!GU!6=0JOqLG@qKMMOA@t^)g0WFZIK#kEQRN zxV_DPn~U9S!^M_Ky%;XVw;hc30Yt`+gBkZRTNg4IM{IxxSMrFoNG$ePlIw94+3(eg zGrl7HI}ka2ma2B@Z0w;O>&_f0@c|@ce64Y&fMT`VF}^*6P+*1@0pE*p{Oi$VAh}Xw zzQK^1m0R8a=GXUVG(b9)l|fWkE%0XZ2+9f91tq+{@(bCco(c0B6>g$nswYuL}Jixk&w-6M#>|9 zH+d%lI>!`{jCrTCzu$HEt|4`Qo6ndJ^*vr97LQz^IR3MRS3!pUBMx?%tGu$=8_k41 z@O3UzOqsH@4jFA2Oh#A_`S3+J;SJ3z|G=@aB)+}>y+N1!1~}q3z%OU0hKE&?iV7?H z6K{eF@=|Ap#LFDsWR=@jxm}glS9x83mETwST~*Lm1zpvmuUg2evU^q|k8mpMTHH_E zdY$O{v>n$;An(1=I^zD&A3X62{oAqdh7h}}yGJ1g8bn3*Lx|p~5PeUDsHo1fz2Hdm zMj_tQQUnQc94Q`hK4OU3gLRE3C%cmXk|JuR&isGs|1NVb=W;IRaxUj`F6VNSoeT$) Zo(u+)o(u*K=kh;M{tKy&UWEWq008}B3DW=o From 05edefe569aedcb89b461198b95e93402d31be2a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adina=20=C8=9Aeudan?= Date: Tue, 3 May 2022 23:26:16 +0300 Subject: [PATCH 05/30] RED-3688: Paligo featured content --- paligo-styles/homepage.scss | 29 +++++++++++++---------------- 1 file changed, 13 insertions(+), 16 deletions(-) diff --git a/paligo-styles/homepage.scss b/paligo-styles/homepage.scss index 7256c0b92..b38122cbb 100644 --- a/paligo-styles/homepage.scss +++ b/paligo-styles/homepage.scss @@ -11,31 +11,28 @@ .publication-icon { background-color: variables.$red-1; } + + width: 280px; } -.portal-contents { +.featured-content-label { + margin-top: 24px; + text-align: center; +} + +.featured-content { margin-top: 24px; margin-bottom: 0; .inner { margin: 0; - display: grid; - grid-template-columns: 1fr 1fr; - grid-gap: 24px; - - &::before { - content: none; - } + justify-content: center; } -} -.publication-contents { - @include mixin.card; -} - -@media only screen and (max-width: 768px) { - .portal-contents .inner { - grid-template-columns: 1fr; + .publication-contents { + @include mixin.card; + width: 250px; + margin: 0 15px !important; } } From 1f56e7ba4fc246671afdd169a26a6be45d7cbb36 Mon Sep 17 00:00:00 2001 From: Atlassian Bamboo Date: Tue, 3 May 2022 22:29:32 +0200 Subject: [PATCH 06/30] chore(release) --- package.json | 2 +- paligo-theme.tar.gz | Bin 3248 -> 3245 bytes paligo-theme/paligo-styles/redacto-theme.css | 57 +++++++++---------- 3 files changed, 28 insertions(+), 31 deletions(-) diff --git a/package.json b/package.json index 7ce869fae..2798e7bbc 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "redaction", - "version": "3.453.0", + "version": "3.454.0", "private": true, "license": "MIT", "scripts": { diff --git a/paligo-theme.tar.gz b/paligo-theme.tar.gz index 53f3a6730fca594c0cc51aa61bf1f64c96f4ad7e..c452809fbb35ee5514a9e84ea31a37895721265e 100644 GIT binary patch literal 3245 zcmV;e3{vwSiwFP!000001MM5za^tpjpZyi6GwIl=DDx`G+R1jCY0|!QI!)5{r7s`} ziijzaOM+{AJD%xp^rBwP;84d({z{HDYi-4qr} z$(G!__%WIdZ5i17(;0kr?Shusyhd7ygv|J!fGrd-=QG66C)K z-~-tomsE56KbQaOD8*Gx7`puPw_jPS%a<3g>9#B?hMFq7x=a}>>-Eh|Qsk_jZ;E1* z5nR%G9u?agPzd+e3EtA|@$)~HB>&YnIIq`~;cRxlN!e?A=Gpd3d*+M3f%v-+f0yF# z3jR7`jw9w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RaxUj` iF6VMC=W;IRaxUj`F6VMC=W;Ip6Xm~b1{RtCPyhfiu`GT7 diff --git a/paligo-theme/paligo-styles/redacto-theme.css b/paligo-theme/paligo-styles/redacto-theme.css index b475625a2..7a028fe0e 100644 --- a/paligo-theme/paligo-styles/redacto-theme.css +++ b/paligo-theme/paligo-styles/redacto-theme.css @@ -59,6 +59,7 @@ } .portal-single-publication { background-color: transparent; + width: 280px; } .portal-single-publication > a { border-radius: 4px; @@ -67,78 +68,74 @@ background-color: #dd4d50; } -.portal-contents { +.featured-content-label { + margin-top: 24px; + text-align: center; +} + +.featured-content { margin-top: 24px; margin-bottom: 0; } -.portal-contents .inner { +.featured-content .inner { margin: 0; - display: grid; - grid-template-columns: 1fr 1fr; - grid-gap: 24px; + justify-content: center; } -.portal-contents .inner::before { - content: none; -} - -.publication-contents { +.featured-content .publication-contents { padding: 24px 40px; border: 1px solid #e2e4e9; width: 100%; margin: 0; background-color: #fff; border-radius: 4px; + width: 250px; + margin: 0 15px !important; } -.publication-contents h4.featured-title, -.publication-contents .section-toc-title { +.featured-content .publication-contents h4.featured-title, +.featured-content .publication-contents .section-toc-title { margin: 0; } -.publication-contents h4.featured-title a, -.publication-contents .section-toc-title a { +.featured-content .publication-contents h4.featured-title a, +.featured-content .publication-contents .section-toc-title a { color: #283241; } -.publication-contents h4.featured-title a:hover, -.publication-contents .section-toc-title a:hover { +.featured-content .publication-contents h4.featured-title a:hover, +.featured-content .publication-contents .section-toc-title a:hover { color: #283241; text-decoration: underline; } -.publication-contents .section-toc-title { +.featured-content .publication-contents .section-toc-title { font-size: 28px; font-weight: 300; line-height: 36px; } -.publication-contents ul { +.featured-content .publication-contents ul { margin: 0; padding: 0; } -.publication-contents li { +.featured-content .publication-contents li { margin: 4px 0; } -.publication-contents li:first-child { +.featured-content .publication-contents li:first-child { margin-top: 20px; } -.publication-contents li:last-child { +.featured-content .publication-contents li:last-child { margin-bottom: 40px; } -.publication-contents li a { +.featured-content .publication-contents li a { color: #dd4d50; font-size: 16px; line-height: 24px; } -.publication-contents li a:hover { +.featured-content .publication-contents li a:hover { color: #dd4d50; text-decoration: underline; } -.publication-contents h4 span, -.publication-contents li::before { +.featured-content .publication-contents h4 span, +.featured-content .publication-contents li::before { display: none; } -@media only screen and (max-width: 768px) { - .portal-contents .inner { - grid-template-columns: 1fr; - } -} /* Einleitung */ .cat-panel-1:before { content: "\f277"; From c31e19358881912e20ccfa72d0dd6adf03158808 Mon Sep 17 00:00:00 2001 From: Timo Bejan Date: Wed, 4 May 2022 11:13:23 +0300 Subject: [PATCH 07/30] RED-3800 performance --- apps/red-ui/ngsw-config.json | 8 ++++++++ docker/common/nginx/nginx.conf | 2 +- libs/common-ui | 2 +- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/apps/red-ui/ngsw-config.json b/apps/red-ui/ngsw-config.json index 5b78c22f4..90d383880 100644 --- a/apps/red-ui/ngsw-config.json +++ b/apps/red-ui/ngsw-config.json @@ -16,6 +16,14 @@ "resources": { "files": ["/assets/**", "/*.(eot|svg|cur|jpg|png|webp|gif|otf|ttf|woff|woff2|ani)"] } + }, + { + "name": "pdftron", + "installMode": "prefetch", + "updateMode": "prefetch", + "resources": { + "files": ["/assets/wv-resources/**/*.*"] + } } ] } diff --git a/docker/common/nginx/nginx.conf b/docker/common/nginx/nginx.conf index 752051c54..26e32461a 100644 --- a/docker/common/nginx/nginx.conf +++ b/docker/common/nginx/nginx.conf @@ -6,7 +6,7 @@ server { root /usr/share/nginx/html; # SSL stuff for cloudflare proxy-ing - ignores SSL certificate and uses SNI - add_header Content-Security-Policy "default-src 'self'; script-src 'self' data: 'unsafe-eval'; script-src-elem 'self' data: blob: 'unsafe-inline'; script-src-attr 'self' data:; style-src 'self' 'unsafe-inline'; img-src 'self' data:; font-src 'self' data:"; + add_header Content-Security-Policy "default-src 'self'; script-src 'inline'; script-src 'self' data: 'unsafe-eval'; script-src-elem 'self' data: blob: 'unsafe-inline'; script-src-attr 'self' data:; style-src 'self' 'unsafe-inline'; img-src 'self' data:; font-src 'self' data:"; proxy_ssl_verify off; proxy_read_timeout 1m; diff --git a/libs/common-ui b/libs/common-ui index fd9d62241..d8c2a342b 160000 --- a/libs/common-ui +++ b/libs/common-ui @@ -1 +1 @@ -Subproject commit fd9d622413547de842439e8d91ee4316f2facff1 +Subproject commit d8c2a342baa6acb330132c44000562bdd823f620 From 8175e0b81821eb568864602caad43e4cc1fb455c Mon Sep 17 00:00:00 2001 From: Timo Bejan Date: Wed, 4 May 2022 11:14:21 +0300 Subject: [PATCH 08/30] RED-3800 performance --- libs/common-ui | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/common-ui b/libs/common-ui index d8c2a342b..83f2fbd88 160000 --- a/libs/common-ui +++ b/libs/common-ui @@ -1 +1 @@ -Subproject commit d8c2a342baa6acb330132c44000562bdd823f620 +Subproject commit 83f2fbd88feb455d27397f470b9cadf72aa3471e From 896731ae6b76f88d98a4e18ec1651cabfa6ada14 Mon Sep 17 00:00:00 2001 From: Atlassian Bamboo Date: Wed, 4 May 2022 10:16:54 +0200 Subject: [PATCH 09/30] chore(release) --- package.json | 2 +- paligo-theme.tar.gz | Bin 3245 -> 3246 bytes 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 2798e7bbc..645a0ba08 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "redaction", - "version": "3.454.0", + "version": "3.455.0", "private": true, "license": "MIT", "scripts": { diff --git a/paligo-theme.tar.gz b/paligo-theme.tar.gz index c452809fbb35ee5514a9e84ea31a37895721265e..7f182f6d8cc68e6893c30dab2c11a2776f8ee84c 100644 GIT binary patch delta 3158 zcmV-c45{<28Lkr*)$>hJY%+pNTF;|m zdjksL{yM>1nmvC0$CBi~`UdCqnlhZt?l&oWZO=U0ereBq@i!2E7vk?y{9VCcN6c}= z97oJ?#2iP=arm5H#&H zez5Lo%u;}5+bXa%!VN3<@3N>VqXqO-B*TopC5K_p+ka0hp(KmN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--- docker/common/nginx/nginx.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker/common/nginx/nginx.conf b/docker/common/nginx/nginx.conf index 26e32461a..243242264 100644 --- a/docker/common/nginx/nginx.conf +++ b/docker/common/nginx/nginx.conf @@ -6,7 +6,7 @@ server { root /usr/share/nginx/html; # SSL stuff for cloudflare proxy-ing - ignores SSL certificate and uses SNI - add_header Content-Security-Policy "default-src 'self'; script-src 'inline'; script-src 'self' data: 'unsafe-eval'; script-src-elem 'self' data: blob: 'unsafe-inline'; script-src-attr 'self' data:; style-src 'self' 'unsafe-inline'; img-src 'self' data:; font-src 'self' data:"; + add_header Content-Security-Policy "default-src 'self'; script-src 'self' data: 'unsafe-eval' 'unsafe-inline'; script-src-elem 'self' data: blob: 'unsafe-inline'; script-src-attr 'self' data:; style-src 'self' 'unsafe-inline'; img-src 'self' data:; font-src 'self' data:"; proxy_ssl_verify off; proxy_read_timeout 1m; From 416f6e59f39186fb489f404380912429e93249a4 Mon Sep 17 00:00:00 2001 From: Atlassian Bamboo Date: Wed, 4 May 2022 10:22:22 +0200 Subject: [PATCH 11/30] chore(release) --- package.json | 2 +- paligo-theme.tar.gz | Bin 3246 -> 3247 bytes 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 645a0ba08..88757f5a6 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "redaction", - "version": "3.455.0", + "version": "3.456.0", "private": true, "license": "MIT", "scripts": { diff --git a/paligo-theme.tar.gz b/paligo-theme.tar.gz index 7f182f6d8cc68e6893c30dab2c11a2776f8ee84c..87c50018e21746f02f885768442d296bbb2a352a 100644 GIT binary patch delta 3128 zcmV-849D}X8Lt_TcnO}rT)wa!J8=Awfg*onpXL8kw7v4LNQ@&U$L3L8f7l*ezzcs$ z{+_e2m%aQK3m4?S2>j&>WPe;z&F%kO{;#7HS2bbi^3UIXWvwn>Uc9E;vZxqps_g1A zWvr~%H#bRp%+5IMEukC-C z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5*&MM5^O87Y4cyilG9=p0i(GUlDm{=Vw) zrXh9zO3|1P^)p@}7LQz^xc;++S3!pPBMx?%t9**u8_k41@N+IxOqsH@4jHW(Y(`iQ z*?4i>za|mh(0uauTpLT`+js42bje?~BmT1ea)xU7uxe6KVP${jBB&rQb!JF>nZq~P z<@Q}}*X4ipU0&Da_g#M174%&}*R|-o7P71CKC6*OIF@xS?njnhC#IfOah(M6!G+cl z_lN%A#D5y_G#1_vV)rEZAjCj}sK|Z@(K{BR@2L Date: Wed, 4 May 2022 11:30:26 +0300 Subject: [PATCH 12/30] RED-3800 csp fix --- docker/common/nginx/nginx.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker/common/nginx/nginx.conf b/docker/common/nginx/nginx.conf index 243242264..4c51b152e 100644 --- a/docker/common/nginx/nginx.conf +++ b/docker/common/nginx/nginx.conf @@ -6,7 +6,7 @@ server { root /usr/share/nginx/html; # SSL stuff for cloudflare proxy-ing - ignores SSL certificate and uses SNI - add_header Content-Security-Policy "default-src 'self'; script-src 'self' data: 'unsafe-eval' 'unsafe-inline'; script-src-elem 'self' data: blob: 'unsafe-inline'; script-src-attr 'self' data:; style-src 'self' 'unsafe-inline'; img-src 'self' data:; font-src 'self' data:"; + add_header Content-Security-Policy "default-src 'self'; script-src 'self' 'blob' data: 'unsafe-eval' 'unsafe-inline'; script-src-elem 'self' data: blob: 'unsafe-inline'; script-src-attr 'self' data:; style-src 'self' 'unsafe-inline'; img-src 'self' data:; font-src 'self' data:"; proxy_ssl_verify off; proxy_read_timeout 1m; From 031e610f3114239f166be971e18340c721139303 Mon Sep 17 00:00:00 2001 From: Atlassian Bamboo Date: Wed, 4 May 2022 10:33:09 +0200 Subject: [PATCH 13/30] chore(release) --- package.json | 2 +- paligo-theme.tar.gz | Bin 3247 -> 3247 bytes 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 88757f5a6..d055f42a1 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "redaction", - "version": "3.456.0", + "version": "3.457.0", "private": true, "license": "MIT", "scripts": { diff --git a/paligo-theme.tar.gz b/paligo-theme.tar.gz index 87c50018e21746f02f885768442d296bbb2a352a..821ad4b05d43cddb0adfd654a8de369f0545c121 100644 GIT binary patch delta 3093 zcmV+w4C?c*8Lt_Tcm)1p>A#VDMSq?A13OrP{1<`0e1YtbORBm3pUeMsl;Wx;3|;>D z+pnzE<;#oLbXyh`Lrs-kU8anc_4?)}DRNfNH$}0@2rg+okBaRLD1`g#1aE2f`1v18 zlK<)(oY!m0a5lT&r0lgl^KAR2J@duiK>S^Zzf19V1%Dke#}RWJF~<>e9Dgy#;d6c& z)4I&? zH>}{l%c7=?7SL0X3^V$c9ELq_Kdpq4EEYS-T^!r~lmiWmit`aU5j;doUoMnX?_;JG-RNqMmfj(3SG zlCzga`lF_*c~@D`oRP|)3pUpV@xOf>3G1|YEBS3upg8v9KtQ^9y(KZlsK~QNR7Vvd zIl_62u9PFPt~N+B~7!@ z{t=h>=2XDcrT%Uvqbwt{qnCnlibM}9 zqIT_&^Upv7;b$R&jb`~-__XHdc~~hXY-}>cA&E&;RJb+Lpc$m%w&fJeC#0fSGk0}l zoZ>B{@i=npCVv|rz5dLcqz)O?Ao;zMIC}j$p;gVSD5cVIYF5QQjW7V0VH31bn07pU zx`uYPRSz5%hQPt~Pv6R*cDoHfj@qR@0>70Xe>{MvYUnNF`ZdancH@hi&(N1N&j@8r zzCoYeT+9K41$&Upa@3{0RlodO;x3n$-Ri#<)m@Sm_kV-6?$la4a{9G@0d6!k>m zst5ZlCx0d9uljwyF0u^v;XM0-RAiFq)g;m@zX$f)qOK{R3%D@S!-ey3k25v`c{>Sm z87Uy|nk^3@Pzd2^2rA0CvPECUloi!bSM5n{38E2}5ST}4M#=ksNkmgpH9T0!AUYi) z>r9>l+u14NS5o5j`yW73HP@jboar;+;U3QKGJn7kkI0)m47MBZaQMxi{{4@C*61pI z|9z9t4MAU3pdR`45Zd%<2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b^Q2u}=wD%ciM zQGP|)2XQlAJ#6?s@Qu-OEKS!eO?Mzop&CMa#ka+QXr*VBG`33o(+hdxDqa#J3!Rdt z-LIasU6-VA*M9+o>UGkgesy=nQfK?Ji9LNE589^qFXo!C*uYoftOMHQHDNnXT4b~K%kchN^Ipoe{LlZG zxqR5|A==K>h#IS68fa$ zUPKJm9Qo{FfX=huHVolCCtlXIr+cL^pmXn2gi{#lm;`!|k-haTt0E#XXtzkn<~1Yb zffvdX0i9zCNXER=+22meI2j{Dan!W)`T{+?@NNqqaReT^>p%XY+HwqMRr4Ifrb zDk`k(&s+o* Date: Wed, 4 May 2022 13:19:39 +0300 Subject: [PATCH 14/30] RED-3198: show remove only here for redacted images --- apps/red-ui/src/app/models/file/annotation.permissions.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/red-ui/src/app/models/file/annotation.permissions.ts b/apps/red-ui/src/app/models/file/annotation.permissions.ts index 8e9ee5082..7ce766bc0 100644 --- a/apps/red-ui/src/app/models/file/annotation.permissions.ts +++ b/apps/red-ui/src/app/models/file/annotation.permissions.ts @@ -38,7 +38,7 @@ export class AnnotationPermissions { permissions.canMarkAsFalsePositive = annotation.canBeMarkedAsFalsePositive && annotationEntity.hasDictionary; permissions.canRemoveOrSuggestToRemoveOnlyHere = - (annotation.isRedacted || annotation.isHint) && !annotation.pending && !annotation.isImage; + !annotation.pending && (annotation.isRedacted || (annotation.isHint && !annotation.isImage)); permissions.canRemoveOrSuggestToRemoveFromDictionary = annotation.isModifyDictionary && (annotation.isRedacted || annotation.isSkipped || annotation.isHint) && From 7af39d97ad1eb635eeb4f2bc4b426de57a3962ea Mon Sep 17 00:00:00 2001 From: Atlassian Bamboo Date: Wed, 4 May 2022 12:21:57 +0200 Subject: [PATCH 15/30] chore(release) --- package.json | 2 +- paligo-theme.tar.gz | Bin 3247 -> 3246 bytes 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index d055f42a1..5a5aaafdc 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "redaction", - "version": "3.457.0", + "version": "3.458.0", "private": true, "license": "MIT", "scripts": { diff --git a/paligo-theme.tar.gz b/paligo-theme.tar.gz index 821ad4b05d43cddb0adfd654a8de369f0545c121..ce8fc64cffa3770dab306d56179a2304f84eabec 100644 GIT binary patch delta 3158 zcmV-c45{<48LkK&so^ZUjB6NWDT{OwoP>hk5qYq~9qilL^;t}au?%6ffslYbOBtLK}d*klBkw4O)B z_68Kf{dI!3G<*E~k0r@}^$pJJHDx%P-EUI%+Mao~{nDQK;%^}SF2vuZ_`8C?j+onF`0?}l9+#KbFE8dCKb%=9!7-`O-!Bk)XVE++4{PMSgkLG4 zu>TtQfn7elynlEatXQu@k`xsYD?=RJZK|TlV=F4MqFSR*+?D70&UhV49kGNn!>Z{! zvPKJ^Zy>ww<+hw6=*wtMtPYjcvYoia)rRI4D@s_r()z-Jv0@8Y8<9rc&zj&WN(CZY z{9xVFn56*AwpCzjgd0}y-(^u#MhobvNQN1GOAf=Hw|}2jLP-{jo#ZZ#ZGXyvhDF8s zh@A2P)kQ{Q^hxZ+L5z2UR)u5Q)IfQQmx0eolAMUkdJT#Yk+jGb54AijW-PJVsZ_5n1x{b}e9;&$T8&-);F|KHCGy2J&=2DMZ!4(~MYU z6J|8RTm%zj4EQRsbyov3V1V}u;TEROW&hy9xqtG*qR}L3Du?F@!K{Ih00u$4z>^Gz zB$I|{XVqM(`iwjyd~&M@u(OpKR#R5cEW@2L1Ow}CBPW2pf6@AC%r)nDx>A2P zlYdc`k=fBp!8k>thZRw~cF6f>pn>qS5Wz;X{49K0^Yc8c6caW!nc|SdBq}Q08fnlB zQgPdI3g#11QLLG}Ixz^K3zjQ+o}f+3q#=G`hTZyWl+1_h95`mQXhfe%8x%Dz*9B!mT~oUl&;h`*5CpK`Jsy^lB36mEQyVZBf@0&;?u= z>EXh8xW^eAfxMjrxr`K$cg>cE5Pv9y@H7M!x&w=gi6!9x5@%sG_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@D?ygwsY+p99r|;uI+Z6vLT||Vl z=qj*3MV7c^zE%l9sV9+dzx9Z>KPA%b4}UJ1)Em`a^n);Ie~rbTkw{lMe^J?CS8B+W z3T~xDtyLR+lL?ok+OJYKE^cr0=AxQyc(6067sI3Y)WK*!fXMi9u;VUf>p}+OiZ$@y zN?wN+iNzjEay^bB`&zAdJ5z+;0g==9rs|~5#_p?Fcjicm48Az_wm~SwoX607v-~3r3jRxom7n5@x7_tBi8~93`bwHcECT!

aMD;aJwSxF1=1otS!B#dQ+M2NzmL+#mXb6aQ(z(^z;zh~1OqgAfA^ zq9XetMDJLLzNbP|ROi`Va8RUqqY&@36hT59M~eHLk62>%VBO%+$?hb8q==fSJO7{i xp8=iQxt-g&o!hyc+qs?Fxt-g&o!hyc+qs?Fxt-g&o!kFd`wyqbZ0i6}0057EEt>!U From 90778aac7f33066c6bf5b2f8acf77d29e8829816 Mon Sep 17 00:00:00 2001 From: Dan Percic Date: Wed, 4 May 2022 13:39:38 +0300 Subject: [PATCH 16/30] RED-3784: change type label for suggest add to false positive --- apps/red-ui/src/app/models/file/annotation.wrapper.ts | 11 +++++++++-- .../app/translations/annotation-types-translations.ts | 7 ++++++- apps/red-ui/src/assets/i18n/de.json | 1 + apps/red-ui/src/assets/i18n/en.json | 1 + 4 files changed, 17 insertions(+), 3 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 509b98f4d..0ce9794ae 100644 --- a/apps/red-ui/src/app/models/file/annotation.wrapper.ts +++ b/apps/red-ui/src/app/models/file/annotation.wrapper.ts @@ -1,4 +1,4 @@ -import { annotationTypesTranslations } from '../../translations/annotation-types-translations'; +import { annotationTypesTranslations, SuggestionAddFalsePositive } from '../../translations/annotation-types-translations'; import { marker as _ } from '@biesbjerg/ngx-translate-extract-marker'; import { Highlight, IComment, IManualChange, IPoint, IRectangle, LogEntryStatus, ManualRedactionType } from '@red/domain'; import { RedactionLogEntry } from '@models/file/redaction-log.entry'; @@ -292,11 +292,18 @@ export class AnnotationWrapper implements IListable, Record { this._createContent(annotationWrapper, redactionLogEntry); this._setSuperType(annotationWrapper, redactionLogEntry); this._handleRecommendations(annotationWrapper, redactionLogEntry); - annotationWrapper.typeLabel = annotationTypesTranslations[annotationWrapper.superType]; + annotationWrapper.typeLabel = this.#getTypeLabel(redactionLogEntry, annotationWrapper); return annotationWrapper; } + static #getTypeLabel(redactionLogEntry: RedactionLogEntry, annotation: AnnotationWrapper): string { + if (redactionLogEntry.reason?.toLowerCase() === 'false positive') { + return annotationTypesTranslations[SuggestionAddFalsePositive]; + } + return annotationTypesTranslations[annotation.superType]; + } + private static _handleRecommendations(annotationWrapper: AnnotationWrapper, redactionLogEntry: RedactionLogEntry) { if (annotationWrapper.superType === SuperTypes.Recommendation) { annotationWrapper.recommendationType = redactionLogEntry.type; diff --git a/apps/red-ui/src/app/translations/annotation-types-translations.ts b/apps/red-ui/src/app/translations/annotation-types-translations.ts index 9def2207e..289292d8f 100644 --- a/apps/red-ui/src/app/translations/annotation-types-translations.ts +++ b/apps/red-ui/src/app/translations/annotation-types-translations.ts @@ -1,7 +1,11 @@ import { marker as _ } from '@biesbjerg/ngx-translate-extract-marker'; import { SuperType, SuperTypes } from '@models/file/super-types'; -export const annotationTypesTranslations: { [key in SuperType]: string } = { +export const SuggestionAddFalsePositive = 'suggestion-add-false-positive' as const; + +type TranslationKey = SuperType & typeof SuggestionAddFalsePositive; + +export const annotationTypesTranslations: Record = { [SuperTypes.TextHighlight]: _('annotation-type.text-highlight'), [SuperTypes.DeclinedSuggestion]: _('annotation-type.declined-suggestion'), [SuperTypes.Hint]: _('annotation-type.hint'), @@ -19,4 +23,5 @@ export const annotationTypesTranslations: { [key in SuperType]: string } = { [SuperTypes.SuggestionRemove]: _('annotation-type.suggestion-remove'), [SuperTypes.SuggestionRemoveDictionary]: _('annotation-type.suggestion-remove-dictionary'), [SuperTypes.SuggestionResize]: _('annotation-type.suggestion-resize'), + [SuggestionAddFalsePositive]: _('annotation-type.suggestion-add-false-positive'), } as const; diff --git a/apps/red-ui/src/assets/i18n/de.json b/apps/red-ui/src/assets/i18n/de.json index 702feb6a6..9ecf220fb 100644 --- a/apps/red-ui/src/assets/i18n/de.json +++ b/apps/red-ui/src/assets/i18n/de.json @@ -344,6 +344,7 @@ "skipped": "Übersprungen", "suggestion-add": "Vorschlag für Schwärzung", "suggestion-add-dictionary": "Vorschlag für neuen Wörterbucheintrag", + "suggestion-add-false-positive": "", "suggestion-change-legal-basis": "Vorschlag für Änderung der Rechtsgrundlage", "suggestion-force-hint": "", "suggestion-force-redaction": "Vorschlag für erzwungene Schwärzung", diff --git a/apps/red-ui/src/assets/i18n/en.json b/apps/red-ui/src/assets/i18n/en.json index fa2de2d63..498a5d53d 100644 --- a/apps/red-ui/src/assets/i18n/en.json +++ b/apps/red-ui/src/assets/i18n/en.json @@ -344,6 +344,7 @@ "skipped": "Skipped", "suggestion-add": "Suggested redaction", "suggestion-add-dictionary": "Suggested dictionary add", + "suggestion-add-false-positive": "Suggested add to false positive", "suggestion-change-legal-basis": "Suggested change legal basis", "suggestion-force-hint": "Suggestion force hint", "suggestion-force-redaction": "Suggestion force redaction", From 281d03de25f15e08227565575842e790abdfe542 Mon Sep 17 00:00:00 2001 From: Atlassian Bamboo Date: Wed, 4 May 2022 12:41:59 +0200 Subject: [PATCH 17/30] chore(release) --- package.json | 2 +- paligo-theme.tar.gz | Bin 3246 -> 3247 bytes 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 5a5aaafdc..b86801f49 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "redaction", - "version": "3.458.0", + "version": "3.459.0", "private": true, "license": "MIT", "scripts": { diff --git a/paligo-theme.tar.gz b/paligo-theme.tar.gz index ce8fc64cffa3770dab306d56179a2304f84eabec..f2d37b28113a315c92f45d2078c866215b2feb05 100644 GIT binary patch delta 104 zcmV-u0GI!+8Lt_TcvRkU5xlS+J8%{+Q1GK*GiXiCaD~uMvDJTLo9ptIKWg@vk@{n4 z!|C$(JjXrD|EFks Date: Wed, 4 May 2022 14:59:09 +0300 Subject: [PATCH 18/30] RED-3958: return annotation value for false recommendations --- .../services/annotation-actions.service.ts | 31 ++++++++++++------- 1 file changed, 19 insertions(+), 12 deletions(-) diff --git a/apps/red-ui/src/app/modules/file-preview/services/annotation-actions.service.ts b/apps/red-ui/src/app/modules/file-preview/services/annotation-actions.service.ts index faa35213f..5d33b65f1 100644 --- a/apps/red-ui/src/app/modules/file-preview/services/annotation-actions.service.ts +++ b/apps/red-ui/src/app/modules/file-preview/services/annotation-actions.service.ts @@ -501,19 +501,26 @@ export class AnnotationActionsService { } private _getFalsePositiveText(annotation: AnnotationWrapper) { - if (annotation.canBeMarkedAsFalsePositive) { - let text: string; - if (annotation.hasTextAfter) { - text = getFirstRelevantTextPart(annotation.textAfter, 'FORWARD'); - return text ? (annotation.value + text).trim() : annotation.value; - } - if (annotation.hasTextAfter) { - text = getFirstRelevantTextPart(annotation.textBefore, 'BACKWARD'); - return text ? (text + annotation.value).trim() : annotation.value; - } else { - return annotation.value; - } + if (!annotation.canBeMarkedAsFalsePositive) { + return; } + + if (annotation.isRecommendation) { + return annotation.value; + } + + let text: string; + if (annotation.hasTextAfter) { + text = getFirstRelevantTextPart(annotation.textAfter, 'FORWARD'); + return text ? (annotation.value + text).trim() : annotation.value; + } + + if (annotation.hasTextBefore) { + text = getFirstRelevantTextPart(annotation.textBefore, 'BACKWARD'); + return text ? (text + annotation.value).trim() : annotation.value; + } + + return annotation.value; } private _convertPath(path: string): string { From 89fdadd8abd5704ee7e5b0c6c1925e2b285f8ba9 Mon Sep 17 00:00:00 2001 From: Atlassian Bamboo Date: Wed, 4 May 2022 14:01:39 +0200 Subject: [PATCH 19/30] chore(release) --- package.json | 2 +- paligo-theme.tar.gz | Bin 3247 -> 3245 bytes 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index b86801f49..20a05d70b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "redaction", - "version": "3.459.0", + "version": "3.460.0", "private": true, "license": "MIT", "scripts": { diff --git a/paligo-theme.tar.gz b/paligo-theme.tar.gz index f2d37b28113a315c92f45d2078c866215b2feb05..8f17ce6bdce4e7e4fa141669b71fc406feb601b9 100644 GIT binary patch delta 103 zcmV-t0GR);8Lb(RcT+C{*N1+`4(#9s3Vsx92CbjpXFF&4{}gSn{3{aUh{>^eRM#K22N&?dpOU}lEbL`3f8Skz{1-vszOl^P3kWj4 Js(=7c0086~F=7A! delta 105 zcmV-v0G9u)8Lt_TcU1@8auK|+9XoIqFHrEKU^8e<&2WX#PqEd1W1H*pmp^Lun34Kp zX~XIA_dLfv%m1fnd*xq|7)MNw&7->husyhd7ygv|J!fGrJNf%g;DY=Yf$zVu%G(PF LN8(dx08jt`O|drk From 4ad3722f89cf26bad3daf40753bbeabc0c64d416 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adina=20=C8=9Aeudan?= Date: Wed, 4 May 2022 20:43:20 +0300 Subject: [PATCH 20/30] RED-3688: smaller font size for li --- paligo-styles/homepage.scss | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/paligo-styles/homepage.scss b/paligo-styles/homepage.scss index b38122cbb..cfbe08a30 100644 --- a/paligo-styles/homepage.scss +++ b/paligo-styles/homepage.scss @@ -33,6 +33,11 @@ @include mixin.card; width: 250px; margin: 0 15px !important; + + li a { + font-size: inherit; + line-height: inherit; + } } } From 2b73ec8549643a30c724f194fb8e25e3859041ac Mon Sep 17 00:00:00 2001 From: Atlassian Bamboo Date: Wed, 4 May 2022 19:45:40 +0200 Subject: [PATCH 21/30] chore(release) --- package.json | 2 +- paligo-theme.tar.gz | Bin 3245 -> 3261 bytes paligo-theme/paligo-styles/redacto-theme.css | 4 ++++ 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 20a05d70b..389284f9e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "redaction", - "version": "3.460.0", + "version": "3.461.0", "private": true, "license": "MIT", "scripts": { diff --git a/paligo-theme.tar.gz b/paligo-theme.tar.gz index 8f17ce6bdce4e7e4fa141669b71fc406feb601b9..870efdf09e91bf47e1cc2a9dbac32b639ddcf92a 100644 GIT binary patch delta 2996 zcmV;l3rqB^8NC^hAb*o-(!O*$P15$IFCYnuh$)gG!L_{|&-6F?)R%ll-u6%WB|QK^ z3LrsU)|*XdDr90wxE!1t&JEc4O^GwQDJ+(fExCE|b2J;;GO+olGx+S<3&(doKk$OU z_FmYI9oWGO6#OjM3|dn&Tp{!^w)$Ueb6x)ON6j8HQhz9IIDcLKo@YB}`G1VISN;`= zam3`u;ZMombC&+1m;Yk11oe`#+ce>nO!lO&GfT%XeQ} ztIL-cuj#fdDu$XWyShvnE9>>mO;Y5no^Og`lM!6fdL9+q8&C-Mw+Y_T?D6wIl_dYo zw>YoYl;Lc4zkf;DYkTI|_Dg%_i@$;RyAXeu;_nLnI%19^<~U-GBjz|_j>G5tI;M4* z;m6PGdt6>#zr2`p{BUNa1jnR8|F}Tttwr;gJgkxP5`LwG!v1UI2X^`J^5SW*V!aMY zQdC5&3~_X~sfs3#t*FR~YK=Z|SDx!T<8>%?#1hU7tAD0%$r>$uzJctzm)mlRpf962 zu{u;%%XZ=xR~wpJtSDjeO6v;?#)>UqZA2P%KWl=kC>4lo@q=|wW0nFe+g5?C5pGz) zf0so~87-ivA{l1%4LJ;Z-hNsMC0Q(XlDjyz{V4|;78U0sa>@r(7a5JwC$Sd?G2RVY z6^?0B1ApZ$UIsoVNpd1C>oq7sMA9Pb1YeXmqU>>v?D_IUV6*4#Jk%CVFC3{CnhrRt zV+1>9eu?9l<{JRu0>7Q*QBXpbw~KrE;}AsEFv9VwT8xCA?!a?#I+OBZ6&&vpS0raI zjr2!NRr9X0pgALzK^JVU4dQ?MI1<)r@ka97pnpJd?8kwCbn$viVv13bXOF0kDnfFE z^B7$zM`X#*+qHm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3tLL=#hVm$V*9}1 zlb;D7e+BU)s{E#BBMU=S!nsv0Q$ zBEng871*C5OI$Kvs|29blgPK%{DyPnbeEnQGDuPv>!lZ{5aTg7qfLCgK@i(6YF(2w@yh1D(muFLPc{H`nL zyMnH3(RVFmSJ{15Bad(_>ss88e=NODOg*jQItk>13#}vW5BkX AP5=M^ diff --git a/paligo-theme/paligo-styles/redacto-theme.css b/paligo-theme/paligo-styles/redacto-theme.css index 7a028fe0e..520e846ea 100644 --- a/paligo-theme/paligo-styles/redacto-theme.css +++ b/paligo-theme/paligo-styles/redacto-theme.css @@ -135,6 +135,10 @@ .featured-content .publication-contents li::before { display: none; } +.featured-content .publication-contents li a { + font-size: inherit; + line-height: inherit; +} /* Einleitung */ .cat-panel-1:before { From f168b74d97d2c8ceae12b9295b1ead978a331ce0 Mon Sep 17 00:00:00 2001 From: Timo Bejan Date: Fri, 6 May 2022 09:58:50 +0300 Subject: [PATCH 22/30] RED-3969 Flatten existing annotations on load --- .../components/pdf-viewer/pdf-viewer.component.ts | 10 ++++++++-- docker/common/nginx/nginx.conf | 2 +- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/apps/red-ui/src/app/modules/file-preview/components/pdf-viewer/pdf-viewer.component.ts b/apps/red-ui/src/app/modules/file-preview/components/pdf-viewer/pdf-viewer.component.ts index 03ed3c9e6..72fa76200 100644 --- a/apps/red-ui/src/app/modules/file-preview/components/pdf-viewer/pdf-viewer.component.ts +++ b/apps/red-ui/src/app/modules/file-preview/components/pdf-viewer/pdf-viewer.component.ts @@ -552,13 +552,19 @@ export class PdfViewerComponent extends AutoUnsubscribe implements OnInit, OnCha return entry; } - private _loadDocument(blob: Blob, file: File) { + private async _loadDocument(blob: Blob, file: File) { const onError = () => { this._loadingService.stop(); this._errorService.set(DocLoadingError); this.stateService.reloadBlob(); }; - this.instance.UI.loadDocument(blob, { filename: file?.filename + '.pdf' ?? 'document.pdf', onError }); + + const pdfNet = this.instance.Core.PDFNet; + + await pdfNet.initialize(environment.licenseKey ? atob(environment.licenseKey) : null); + const document = await pdfNet.PDFDoc.createFromBuffer(await blob.arrayBuffer()); + await document.flattenAnnotations(false); + this.instance.UI.loadDocument(document, { filename: file?.filename + '.pdf' ?? 'document.pdf', onError }); this._pageRotationService.clearRotationsHideActions(); } diff --git a/docker/common/nginx/nginx.conf b/docker/common/nginx/nginx.conf index 4c51b152e..73661a583 100644 --- a/docker/common/nginx/nginx.conf +++ b/docker/common/nginx/nginx.conf @@ -6,7 +6,7 @@ server { root /usr/share/nginx/html; # SSL stuff for cloudflare proxy-ing - ignores SSL certificate and uses SNI - add_header Content-Security-Policy "default-src 'self'; script-src 'self' 'blob' data: 'unsafe-eval' 'unsafe-inline'; script-src-elem 'self' data: blob: 'unsafe-inline'; script-src-attr 'self' data:; style-src 'self' 'unsafe-inline'; img-src 'self' data:; font-src 'self' data:"; + add_header Content-Security-Policy "default-src 'self'; script-src 'self' blob: data: 'unsafe-eval' 'unsafe-inline'; script-src-elem 'self' data: blob: 'unsafe-inline'; script-src-attr 'self' data:; style-src 'self' 'unsafe-inline'; img-src 'self' data:; font-src 'self' data:"; proxy_ssl_verify off; proxy_read_timeout 1m; From ef575520a2d45311af8dde1ea3180b6b49359cdf Mon Sep 17 00:00:00 2001 From: Atlassian Bamboo Date: Fri, 6 May 2022 09:02:07 +0200 Subject: [PATCH 23/30] chore(release) --- package.json | 2 +- paligo-theme.tar.gz | Bin 3261 -> 3260 bytes 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 389284f9e..33f6aadc1 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "redaction", - "version": "3.461.0", + "version": "3.462.0", "private": true, "license": "MIT", "scripts": { diff --git a/paligo-theme.tar.gz b/paligo-theme.tar.gz index 870efdf09e91bf47e1cc2a9dbac32b639ddcf92a..c25db9a9417c7e7f83c96b8eb3d9881dd77dd9e7 100644 GIT binary patch delta 3145 zcmV-P47T&V8N3;gbqu}0@x8!zU)Y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f9021361b07f79741473709f71218d9caff7319b Mon Sep 17 00:00:00 2001 From: Dan Percic Date: Thu, 5 May 2022 17:20:45 +0300 Subject: [PATCH 24/30] RED-3765: wip license view --- .../src/app/modules/admin/admin.module.ts | 5 +- .../screens/license-information/constants.ts | 15 ++ .../screens/license-information/licence.ts | 69 ++++++ .../license-information-screen.component.html | 13 +- .../license-information-screen.component.ts | 216 ++++++++++-------- .../select-licence.component.html | 21 ++ .../select-licence.component.scss | 15 ++ .../select-licence.component.ts | 26 +++ .../admin/services/licence-report.service.ts | 17 +- apps/red-ui/src/assets/i18n/de.json | 5 + apps/red-ui/src/assets/i18n/en.json | 5 + .../src/assets/styles/red-components.scss | 4 + 12 files changed, 310 insertions(+), 101 deletions(-) create mode 100644 apps/red-ui/src/app/modules/admin/screens/license-information/constants.ts create mode 100644 apps/red-ui/src/app/modules/admin/screens/license-information/licence.ts create mode 100644 apps/red-ui/src/app/modules/admin/screens/license-information/select-licence/select-licence.component.html create mode 100644 apps/red-ui/src/app/modules/admin/screens/license-information/select-licence/select-licence.component.scss create mode 100644 apps/red-ui/src/app/modules/admin/screens/license-information/select-licence/select-licence.component.ts diff --git a/apps/red-ui/src/app/modules/admin/admin.module.ts b/apps/red-ui/src/app/modules/admin/admin.module.ts index b13bdebea..19db479bd 100644 --- a/apps/red-ui/src/app/modules/admin/admin.module.ts +++ b/apps/red-ui/src/app/modules/admin/admin.module.ts @@ -33,7 +33,6 @@ import { TrashScreenComponent } from './screens/trash/trash-screen.component'; import { AuditService } from './services/audit.service'; import { DigitalSignatureService } from './services/digital-signature.service'; import { BaseAdminScreenComponent } from './base-admin-screen/base-admin-screen.component'; -import { LicenseReportService } from './services/licence-report.service'; import { RulesService } from './services/rules.service'; import { SmtpConfigService } from './services/smtp-config.service'; import { UploadDictionaryDialogComponent } from './dialogs/upload-dictionary-dialog/upload-dictionary-dialog.component'; @@ -49,6 +48,7 @@ import { ConfirmDeleteDossierStateDialogComponent } from './dialogs/confirm-dele import { TrashTableItemComponent } from './screens/trash/trash-table-item/trash-table-item.component'; import { BaseEntityScreenComponent } from './base-entity-screen/base-entity-screen.component'; import { CloneDossierTemplateDialogComponent } from './dialogs/clone-dossier-template-dialog/clone-dossier-template-dialog.component'; +import { SelectLicenceComponent } from './screens/license-information/select-licence/select-licence.component'; const dialogs = [ AddEditDossierTemplateDialogComponent, @@ -103,8 +103,9 @@ const components = [ AddEditDossierStateDialogComponent, ConfirmDeleteDossierStateDialogComponent, TrashTableItemComponent, + SelectLicenceComponent, ], - providers: [AdminDialogService, AuditService, DigitalSignatureService, LicenseReportService, RulesService, SmtpConfigService], + providers: [AdminDialogService, AuditService, DigitalSignatureService, RulesService, SmtpConfigService], imports: [CommonModule, SharedModule, AdminRoutingModule, SharedAdminModule, NgxChartsModule, ColorPickerModule, A11yModule], }) export class AdminModule {} diff --git a/apps/red-ui/src/app/modules/admin/screens/license-information/constants.ts b/apps/red-ui/src/app/modules/admin/screens/license-information/constants.ts new file mode 100644 index 000000000..766035b64 --- /dev/null +++ b/apps/red-ui/src/app/modules/admin/screens/license-information/constants.ts @@ -0,0 +1,15 @@ +import { Color, ScaleType } from '@swimlane/ngx-charts'; + +export const ComboBarScheme: Color = { + name: 'Combo bar scheme', + selectable: true, + group: ScaleType.Ordinal, + domain: ['#0389ec'], +}; + +export const LineChartScheme: Color = { + name: 'Line chart scheme', + selectable: true, + group: ScaleType.Ordinal, + domain: ['#dd4d50', '#5ce594', '#0389ec'], +}; diff --git a/apps/red-ui/src/app/modules/admin/screens/license-information/licence.ts b/apps/red-ui/src/app/modules/admin/screens/license-information/licence.ts new file mode 100644 index 000000000..51da73235 --- /dev/null +++ b/apps/red-ui/src/app/modules/admin/screens/license-information/licence.ts @@ -0,0 +1,69 @@ +export interface ILicenseFeature { + readonly name: string; + readonly type: string; + readonly value: string; +} + +export interface ILicense { + readonly id: string; + readonly name: string; + readonly product: string; + readonly licensedTo: string; + readonly licensedToEmail: string; + readonly validFrom: string; + readonly validUntil: string; + readonly features: readonly ILicenseFeature[]; +} + +export interface ILicenses { + readonly activeLicense: string; + readonly licenses: readonly ILicense[]; +} + +export const LICENSE_DATA: ILicenses = { + activeLicense: 'guid-1', + licenses: [ + { + id: 'guid-1', + name: '1 Year comulative (2022)', + product: 'RedactManager', + licensedTo: 'Customer company name 1', + licensedToEmail: 'customer@example.com', + validFrom: '2022-01-01T00:00:00.000Z', + validUntil: '2022-12-31T23:59:59.999Z', + features: [ + { + name: 'pdftron', + type: 'STRING', + value: 'base64 encoded pdftron webviewer license key', + }, + { + name: 'processingPages', + type: 'NUMBER', + value: '200000', + }, + ], + }, + { + id: 'guid-2', + name: '2 Year comulative (2021)', + product: 'RedactManager', + licensedTo: 'Customer company name 2', + licensedToEmail: 'customer@example.com', + validFrom: '2021-01-01T00:00:00.000Z', + validUntil: '2021-12-31T23:59:59.999Z', + features: [ + { + name: 'pdftron', + type: 'STRING', + value: 'base64 encoded pdftron webviewer license key', + }, + { + name: 'processingPages', + type: 'NUMBER', + value: '100000', + }, + ], + }, + ], +}; diff --git a/apps/red-ui/src/app/modules/admin/screens/license-information/license-information-screen.component.html b/apps/red-ui/src/app/modules/admin/screens/license-information/license-information-screen.component.html index 684b6c4dd..947c16001 100644 --- a/apps/red-ui/src/app/modules/admin/screens/license-information/license-information-screen.component.html +++ b/apps/red-ui/src/app/modules/admin/screens/license-information/license-information-screen.component.html @@ -38,16 +38,23 @@
    +
    +
    +
    + +
    +
    +
    -
    {{ configService.values.LICENSE_CUSTOMER || '-' }}
    +
    {{ selectedLicense.licensedTo || '-' }}
    - {{ configService.values.LICENSE_START || '-' }} / - {{ configService.values.LICENSE_END || '-' }} + {{ (selectedLicense.validFrom | date: 'dd-MM-YYYY') || '-' }} / + {{ (selectedLicense.validUntil | date: 'dd-MM-YYYY') || '-' }}
    diff --git a/apps/red-ui/src/app/modules/admin/screens/license-information/license-information-screen.component.ts b/apps/red-ui/src/app/modules/admin/screens/license-information/license-information-screen.component.ts index ae953b5d7..57703c432 100644 --- a/apps/red-ui/src/app/modules/admin/screens/license-information/license-information-screen.component.ts +++ b/apps/red-ui/src/app/modules/admin/screens/license-information/license-information-screen.component.ts @@ -5,18 +5,38 @@ import { ButtonConfig, IconButtonTypes, LoadingService } from '@iqser/common-ui' import { marker as _ } from '@biesbjerg/ngx-translate-extract-marker'; import { UserService } from '@services/user.service'; import { RouterHistoryService } from '@services/router-history.service'; -import { LicenseReportService } from '../../services/licence-report.service'; +import { LicenseService } from '../../services/licence-report.service'; import { ILicenseReport } from '@red/domain'; -import { Color, ScaleType } from '@swimlane/ngx-charts'; -import { firstValueFrom } from 'rxjs'; import dayjs from 'dayjs'; +import { ComboBarScheme, LineChartScheme } from './constants'; +import { ILicense } from './licence'; + +const monthNames = dayjs.monthsShort(); + +function toDate(month: number, year: number) { + return dayjs(`01-${month}-${year}`, 'DD-M-YYYY').toDate(); +} + +interface IMonthYear { + readonly month: number; + readonly year: number; +} + +interface IDateRange { + readonly startDate: IMonthYear; + readonly endDate: IMonthYear; +} @Component({ selector: 'redaction-license-information-screen', templateUrl: './license-information-screen.component.html', styleUrls: ['./license-information-screen.component.scss'], + providers: [LicenseService], }) export class LicenseInformationScreenComponent implements OnInit { + readonly lineChartScheme = LineChartScheme; + readonly comboBarScheme = ComboBarScheme; + readonly currentYear = new Date().getFullYear(); readonly currentUser = this._userService.currentUser; readonly buttonConfigs: readonly ButtonConfig[] = [ { @@ -29,40 +49,35 @@ export class LicenseInformationScreenComponent implements OnInit { currentInfo: ILicenseReport = {}; totalInfo: ILicenseReport = {}; unlicensedInfo: ILicenseReport = {}; - totalLicensedNumberOfPages = 0; analysisPercentageOfLicense = 100; barChart: any[]; lineChartSeries: any[] = []; - lineChartScheme: Color = { - name: 'Line chart scheme', - selectable: true, - group: ScaleType.Ordinal, - domain: ['#dd4d50', '#5ce594', '#0389ec'], - }; - comboBarScheme: Color = { - name: 'Combo bar scheme', - selectable: true, - group: ScaleType.Ordinal, - domain: ['#0389ec'], - }; + selectedLicense = this.licenseService.getActiveLicense(); + totalLicensedNumberOfPages = this.#processingPages; constructor( readonly configService: ConfigService, + readonly licenseService: LicenseService, private readonly _userService: UserService, private readonly _loadingService: LoadingService, readonly routerHistoryService: RouterHistoryService, private readonly _translateService: TranslateService, - private readonly _licenseReportService: LicenseReportService, ) { _loadingService.start(); } - get currentYear(): number { - return new Date().getFullYear(); + get #processingPages() { + const processingPagesFeature = this.selectedLicense.features.find(f => f.name === 'processingPages'); + return Number(processingPagesFeature.value ?? '0'); } - async ngOnInit() { - this.totalLicensedNumberOfPages = this.configService.values.LICENSE_PAGE_COUNT || 0; + ngOnInit() { + return this.loadLicenceData(); + } + + async loadLicenceData() { + // const startDate = dayjs(this.selectedLicense.validFrom, 'DD-MM-YYYY'); + // const endDate = dayjs(this.selectedLicense.validUntil, 'DD-MM-YYYY'); const startDate = dayjs(this.configService.values.LICENSE_START, 'DD-MM-YYYY'); const endDate = dayjs(this.configService.values.LICENSE_END, 'DD-MM-YYYY'); @@ -72,30 +87,23 @@ export class LicenseInformationScreenComponent implements OnInit { startDate: startDate.toDate(), endDate: endDate.toDate(), }; - const promises = [ - firstValueFrom(this._licenseReportService.licenseReport(currentConfig)), - firstValueFrom(this._licenseReportService.licenseReport({})), - ]; + const reports: Promise[] = [this.licenseService.getReport(currentConfig), this.licenseService.getReport({})]; if (endDate.isBefore(dayjs())) { const unlicensedConfig = { startDate: endDate.toDate(), }; - promises.push(firstValueFrom(this._licenseReportService.licenseReport(unlicensedConfig))); + reports.push(this.licenseService.getReport(unlicensedConfig)); } - Promise.all(promises).then(reports => { - [this.currentInfo, this.totalInfo, this.unlicensedInfo] = reports; - this._loadingService.stop(); - this.analysisPercentageOfLicense = - this.totalLicensedNumberOfPages > 0 - ? (this.currentInfo.numberOfAnalyzedPages / this.totalLicensedNumberOfPages) * 100 - : 100; - }); + [this.currentInfo, this.totalInfo, this.unlicensedInfo] = await Promise.all(reports); + this._loadingService.stop(); + this.analysisPercentageOfLicense = + this.totalLicensedNumberOfPages > 0 ? (this.currentInfo.numberOfAnalyzedPages / this.totalLicensedNumberOfPages) * 100 : 100; } sendMail(): void { - const licenseCustomer = this.configService.values.LICENSE_CUSTOMER; + const licenseCustomer = this.selectedLicense.licensedTo; const subject = this._translateService.instant('license-info-screen.email.title', { licenseCustomer, }); @@ -108,77 +116,97 @@ export class LicenseInformationScreenComponent implements OnInit { pages: this.totalLicensedNumberOfPages, }), ].join(lineBreak); - window.location.href = `mailto:${this.configService.values.LICENSE_EMAIL}?subject=${subject}&body=${body}`; + window.location.href = `mailto:${this.selectedLicense.licensedToEmail}?subject=${subject}&body=${body}`; + } + + licenceChanged(license: ILicense) { + this.selectedLicense = license; + this.totalLicensedNumberOfPages = this.#processingPages; + return this.loadLicenceData(); } private async _setMonthlyStats(startDate: dayjs.Dayjs, endDate: dayjs.Dayjs) { - const [startMonth, startYear] = [startDate.month(), startDate.year()]; - const [endMonth, endYear] = [endDate.month(), endDate.year()]; + const startMonth: number = startDate.month(); + const startYear: number = startDate.year(); - let m: number = startMonth; - let y: number = startYear; - const totalLicensedSeries = []; - const cumulativePagesSeries = []; - const promises = []; - - while (m <= endMonth && y <= endYear) { - totalLicensedSeries.push({ - name: `${dayjs.monthsShort()[m]} ${y}`, - value: this.totalLicensedNumberOfPages, - }); - - let nm = m + 1; - let ny = y; - if (nm === 12) { - nm = 0; - ny++; - } - - promises.push( - firstValueFrom( - this._licenseReportService.licenseReport({ - startDate: dayjs(`01-${m + 1}-${y}`, 'DD-M-YYYY').toDate(), - endDate: dayjs(`01-${nm + 1}-${ny}`, 'DD-M-YYYY').toDate(), - }), - ), - ); - - y = ny; - m = nm; - } - - const reports = await Promise.all(promises); - - m = startMonth; - y = startYear; - let cumulativePages = 0; - this.barChart = []; - for (const report of reports) { - cumulativePages += report.numberOfAnalyzedPages; - this.barChart.push({ - name: `${dayjs.monthsShort()[m]} ${y}`, - value: report.numberOfAnalyzedPages, - }); - cumulativePagesSeries.push({ - name: `${dayjs.monthsShort()[m]} ${y}`, - value: cumulativePages, - }); - m++; - if (m === 12) { - m = 0; - y++; - } - } + const dateRanges = this.#generateDateRanges(startMonth, startYear, endDate.month(), endDate.year()); + const reports = await this.#getReports(dateRanges); this.lineChartSeries = [ { name: this._translateService.instant('license-info-screen.chart.licensed-total'), - series: totalLicensedSeries, + series: this.#totalLicensedPagesSeries(dateRanges), }, { name: this._translateService.instant('license-info-screen.chart.cumulative'), - series: cumulativePagesSeries, + series: this.#setBarChartAndGetCumulativePageSeries(startMonth, startYear, reports), }, ]; } + + #setBarChartAndGetCumulativePageSeries(month: number, year: number, reports: ILicenseReport[]) { + let cumulativePages = 0; + const cumulativePagesSeries = []; + this.barChart = []; + + for (const report of reports) { + cumulativePages += report.numberOfAnalyzedPages; + + const name = `${monthNames[month]} ${year}`; + this.barChart.push({ + name, + value: report.numberOfAnalyzedPages, + }); + + cumulativePagesSeries.push({ + name, + value: cumulativePages, + }); + + month++; + if (month === 12) { + month = 0; + year++; + } + } + + return cumulativePagesSeries; + } + + #getReports(dateRanges: IDateRange[]) { + const reports = dateRanges.map(dateRange => { + const startDate = toDate(dateRange.startDate.month + 1, dateRange.startDate.year); + const endDate = toDate(dateRange.endDate.month + 1, dateRange.endDate.year); + return this.licenseService.getReport({ startDate, endDate }); + }); + + return Promise.all(reports); + } + + #totalLicensedPagesSeries(dateRanges: IDateRange[]) { + return dateRanges.map(dateRange => ({ + name: `${monthNames[dateRange.startDate.month]} ${dateRange.startDate.year}`, + value: this.totalLicensedNumberOfPages, + })); + } + + #generateDateRanges(month: number, year: number, endMonth: number, endYear: number) { + const dates: IDateRange[] = []; + + while (month <= endMonth && year <= endYear) { + let nextMonth = month + 1; + let nextYear = year; + if (nextMonth === 12) { + nextMonth = 0; + nextYear++; + } + + dates.push({ startDate: { month, year }, endDate: { month: nextMonth, year: nextYear } }); + + year = nextYear; + month = nextMonth; + } + + return dates; + } } diff --git a/apps/red-ui/src/app/modules/admin/screens/license-information/select-licence/select-licence.component.html b/apps/red-ui/src/app/modules/admin/screens/license-information/select-licence/select-licence.component.html new file mode 100644 index 000000000..e697dddfa --- /dev/null +++ b/apps/red-ui/src/app/modules/admin/screens/license-information/select-licence/select-licence.component.html @@ -0,0 +1,21 @@ +
    + + + + + + + + + +
    + + +
    + {{ license.name }} +
    +
    + {{ getStatus(license.id) | translate | uppercase }} +
    +
    +
    diff --git a/apps/red-ui/src/app/modules/admin/screens/license-information/select-licence/select-licence.component.scss b/apps/red-ui/src/app/modules/admin/screens/license-information/select-licence/select-licence.component.scss new file mode 100644 index 000000000..5d71f0eab --- /dev/null +++ b/apps/red-ui/src/app/modules/admin/screens/license-information/select-licence/select-licence.component.scss @@ -0,0 +1,15 @@ +.green { + background: var(--iqser-green-2); +} + +.space-between { + justify-content: space-between; +} + +.dot { + position: relative; +} + +.small-label { + font-weight: 600; +} diff --git a/apps/red-ui/src/app/modules/admin/screens/license-information/select-licence/select-licence.component.ts b/apps/red-ui/src/app/modules/admin/screens/license-information/select-licence/select-licence.component.ts new file mode 100644 index 000000000..a033f39f1 --- /dev/null +++ b/apps/red-ui/src/app/modules/admin/screens/license-information/select-licence/select-licence.component.ts @@ -0,0 +1,26 @@ +import { Component, EventEmitter, Output } from '@angular/core'; +import { LicenseService } from '../../../services/licence-report.service'; +import { ILicense } from '../licence'; +import { marker as _ } from '@biesbjerg/ngx-translate-extract-marker'; + +const translations = { + active: _('license-info-screen.status.active'), + inactive: _('license-info-screen.status.inactive'), +} as const; + +@Component({ + selector: 'redaction-select-licence', + templateUrl: './select-licence.component.html', + styleUrls: ['./select-licence.component.scss'], +}) +export class SelectLicenceComponent { + @Output() readonly valueChanges = new EventEmitter(); + + value = this.licenseService.getActiveLicense(); + + constructor(readonly licenseService: LicenseService) {} + + getStatus(id) { + return id === this.licenseService.activeLicenseId ? translations.active : translations.inactive; + } +} diff --git a/apps/red-ui/src/app/modules/admin/services/licence-report.service.ts b/apps/red-ui/src/app/modules/admin/services/licence-report.service.ts index fa1be5312..1e80657d7 100644 --- a/apps/red-ui/src/app/modules/admin/services/licence-report.service.ts +++ b/apps/red-ui/src/app/modules/admin/services/licence-report.service.ts @@ -1,15 +1,24 @@ import { Injectable, Injector } from '@angular/core'; import { GenericService, QueryParam, RequiredParam, Validate } from '@iqser/common-ui'; import { ILicenseReport, ILicenseReportRequest } from '@red/domain'; +import { firstValueFrom } from 'rxjs'; +import { LICENSE_DATA } from '../screens/license-information/licence'; @Injectable() -export class LicenseReportService extends GenericService { +export class LicenseService extends GenericService { + readonly licenseData = LICENSE_DATA; + readonly activeLicenseId = this.licenseData.activeLicense; + constructor(protected readonly _injector: Injector) { super(_injector, 'report'); } + getActiveLicense() { + return this.licenseData.licenses.find(license => license.id === this.activeLicenseId); + } + @Validate() - licenseReport(@RequiredParam() body: ILicenseReportRequest, limit?: number, offset?: number) { + getReport$(@RequiredParam() body: ILicenseReportRequest, limit?: number, offset?: number) { const queryParams: QueryParam[] = []; if (limit) { queryParams.push({ key: 'limit', value: limit }); @@ -21,4 +30,8 @@ export class LicenseReportService extends GenericService { return this._post(body, `${this._defaultModelPath}/license`, queryParams); } + + getReport(body: ILicenseReportRequest, limit?: number, offset?: number) { + return firstValueFrom(this.getReport$(body, limit, offset)); + } } diff --git a/apps/red-ui/src/assets/i18n/de.json b/apps/red-ui/src/assets/i18n/de.json index 9ecf220fb..607e2a984 100644 --- a/apps/red-ui/src/assets/i18n/de.json +++ b/apps/red-ui/src/assets/i18n/de.json @@ -1532,11 +1532,16 @@ }, "end-user-license-text": "Die Nutzung dieses Produkts unterliegt den Bedingungen der Endbenutzer-Lizenzvereinbarung für den RedactManager, sofern darin nichts anderweitig festgelegt.", "end-user-license-title": "Endbenutzer-Lizenzvereinbarung", + "license-title": "", "licensed-page-count": "Anzahl der lizenzierten Seiten", "licensed-to": "Lizenziert für", "licensing-details": "Lizenzdetails", "licensing-period": "Laufzeit der Lizenz", "ocr-analyzed-pages": "Mit OCR konvertierte Seiten", + "status": { + "active": "Aktiv", + "inactive": "" + }, "total-analyzed": "Seit {date} insgesamt analysierte Seiten", "unlicensed-analyzed": "Über Lizenz hinaus analysierte Seiten", "usage-details": "Nutzungsdetails" diff --git a/apps/red-ui/src/assets/i18n/en.json b/apps/red-ui/src/assets/i18n/en.json index 498a5d53d..d532ecb08 100644 --- a/apps/red-ui/src/assets/i18n/en.json +++ b/apps/red-ui/src/assets/i18n/en.json @@ -1532,11 +1532,16 @@ }, "end-user-license-text": "The use of this product is subject to the terms of the Redaction End User Agreement, unless otherwise specified therein.", "end-user-license-title": "End User License Agreement", + "license-title": "License Title", "licensed-page-count": "Number of licensed pages", "licensed-to": "Licensed to", "licensing-details": "Licensing Details", "licensing-period": "Licensing Period", "ocr-analyzed-pages": "OCR Analyzed Pages", + "status": { + "active": "Active", + "inactive": "Inactive" + }, "total-analyzed": "Total Analyzed Pages Since {date}", "unlicensed-analyzed": "Unlicensed Analyzed Pages", "usage-details": "Usage Details" diff --git a/apps/red-ui/src/assets/styles/red-components.scss b/apps/red-ui/src/assets/styles/red-components.scss index e9f484584..78d3c5e9e 100644 --- a/apps/red-ui/src/assets/styles/red-components.scss +++ b/apps/red-ui/src/assets/styles/red-components.scss @@ -98,3 +98,7 @@ } } } + +.align-center { + align-items: center; +} From 60d27f4dff45b7ff9d85ce95cd77644ca05ceb75 Mon Sep 17 00:00:00 2001 From: Dan Percic Date: Thu, 5 May 2022 17:53:55 +0300 Subject: [PATCH 25/30] RED-3765: extract chart to a separate component --- .../src/app/modules/admin/admin.module.ts | 6 +- .../screens/license-information/date-range.ts | 9 ++ .../license-chart.component.html | 18 +++ .../license-chart.component.scss | 0 .../license-chart/license-chart.component.ts | 123 ++++++++++++++++ .../license-information-screen.component.html | 44 ++---- .../license-information-screen.component.ts | 136 ++---------------- ...ent.html => select-license.component.html} | 2 +- ...ent.scss => select-license.component.scss} | 0 ...mponent.ts => select-license.component.ts} | 13 +- .../admin/services/licence-report.service.ts | 14 +- 11 files changed, 201 insertions(+), 164 deletions(-) create mode 100644 apps/red-ui/src/app/modules/admin/screens/license-information/date-range.ts create mode 100644 apps/red-ui/src/app/modules/admin/screens/license-information/license-chart/license-chart.component.html create mode 100644 apps/red-ui/src/app/modules/admin/screens/license-information/license-chart/license-chart.component.scss create mode 100644 apps/red-ui/src/app/modules/admin/screens/license-information/license-chart/license-chart.component.ts rename apps/red-ui/src/app/modules/admin/screens/license-information/select-licence/{select-licence.component.html => select-license.component.html} (91%) rename apps/red-ui/src/app/modules/admin/screens/license-information/select-licence/{select-licence.component.scss => select-license.component.scss} (100%) rename apps/red-ui/src/app/modules/admin/screens/license-information/select-licence/{select-licence.component.ts => select-license.component.ts} (68%) diff --git a/apps/red-ui/src/app/modules/admin/admin.module.ts b/apps/red-ui/src/app/modules/admin/admin.module.ts index 19db479bd..4693a3792 100644 --- a/apps/red-ui/src/app/modules/admin/admin.module.ts +++ b/apps/red-ui/src/app/modules/admin/admin.module.ts @@ -48,7 +48,8 @@ import { ConfirmDeleteDossierStateDialogComponent } from './dialogs/confirm-dele import { TrashTableItemComponent } from './screens/trash/trash-table-item/trash-table-item.component'; import { BaseEntityScreenComponent } from './base-entity-screen/base-entity-screen.component'; import { CloneDossierTemplateDialogComponent } from './dialogs/clone-dossier-template-dialog/clone-dossier-template-dialog.component'; -import { SelectLicenceComponent } from './screens/license-information/select-licence/select-licence.component'; +import { SelectLicenseComponent } from './screens/license-information/select-licence/select-license.component'; +import { LicenseChartComponent } from './screens/license-information/license-chart/license-chart.component'; const dialogs = [ AddEditDossierTemplateDialogComponent, @@ -103,7 +104,8 @@ const components = [ AddEditDossierStateDialogComponent, ConfirmDeleteDossierStateDialogComponent, TrashTableItemComponent, - SelectLicenceComponent, + SelectLicenseComponent, + LicenseChartComponent, ], providers: [AdminDialogService, AuditService, DigitalSignatureService, RulesService, SmtpConfigService], imports: [CommonModule, SharedModule, AdminRoutingModule, SharedAdminModule, NgxChartsModule, ColorPickerModule, A11yModule], diff --git a/apps/red-ui/src/app/modules/admin/screens/license-information/date-range.ts b/apps/red-ui/src/app/modules/admin/screens/license-information/date-range.ts new file mode 100644 index 000000000..6c18cc6d5 --- /dev/null +++ b/apps/red-ui/src/app/modules/admin/screens/license-information/date-range.ts @@ -0,0 +1,9 @@ +export interface IMonthYear { + readonly month: number; + readonly year: number; +} + +export interface IDateRange { + readonly startDate: IMonthYear; + readonly endDate: IMonthYear; +} diff --git a/apps/red-ui/src/app/modules/admin/screens/license-information/license-chart/license-chart.component.html b/apps/red-ui/src/app/modules/admin/screens/license-information/license-chart/license-chart.component.html new file mode 100644 index 000000000..8da1b9488 --- /dev/null +++ b/apps/red-ui/src/app/modules/admin/screens/license-information/license-chart/license-chart.component.html @@ -0,0 +1,18 @@ + diff --git a/apps/red-ui/src/app/modules/admin/screens/license-information/license-chart/license-chart.component.scss b/apps/red-ui/src/app/modules/admin/screens/license-information/license-chart/license-chart.component.scss new file mode 100644 index 000000000..e69de29bb diff --git a/apps/red-ui/src/app/modules/admin/screens/license-information/license-chart/license-chart.component.ts b/apps/red-ui/src/app/modules/admin/screens/license-information/license-chart/license-chart.component.ts new file mode 100644 index 000000000..207c1eca6 --- /dev/null +++ b/apps/red-ui/src/app/modules/admin/screens/license-information/license-chart/license-chart.component.ts @@ -0,0 +1,123 @@ +import { Component } from '@angular/core'; +import { ComboBarScheme, LineChartScheme } from '../constants'; +import dayjs from 'dayjs'; +import { TranslateService } from '@ngx-translate/core'; +import { ILicenseReport } from '@red/domain'; +import { LicenseService } from '../../../services/licence-report.service'; +import { IDateRange } from '../date-range'; +import { ILicense } from '../licence'; +import { switchMap } from 'rxjs/operators'; +import { ILineChartSeries } from '../../../components/combo-chart/models'; +import { ConfigService } from '../../../../../services/config.service'; + +const monthNames = dayjs.monthsShort(); + +function toDate(month: number, year: number) { + return dayjs(`01-${month}-${year}`, 'DD-M-YYYY').toDate(); +} + +@Component({ + selector: 'redaction-license-chart', + templateUrl: './license-chart.component.html', + styleUrls: ['./license-chart.component.scss'], +}) +export class LicenseChartComponent { + readonly lineChartScheme = LineChartScheme; + readonly comboBarScheme = ComboBarScheme; + + lineChartSeries$ = this._licenseService.selectedLicense$.pipe(switchMap(license => this.#setMonthlyStats(license))); + barChart: any[]; + + constructor( + private readonly _translateService: TranslateService, + private readonly _licenseService: LicenseService, + private readonly _configService: ConfigService, + ) {} + + async #setMonthlyStats(licence: ILicense): Promise { + const startDate = dayjs(licence.validFrom, 'DD-MM-YYYY'); + const endDate = dayjs(licence.validUntil, 'DD-MM-YYYY'); + const startMonth: number = startDate.month(); + const startYear: number = startDate.year(); + + const dateRanges = this.#generateDateRanges(startMonth, startYear, endDate.month(), endDate.year()); + const reports = await this.#getReports(dateRanges); + + return [ + { + name: this._translateService.instant('license-info-screen.chart.licensed-total'), + series: this.#totalLicensedPagesSeries(dateRanges), + }, + { + name: this._translateService.instant('license-info-screen.chart.cumulative'), + series: this.#setBarChartAndGetCumulativePageSeries(startMonth, startYear, reports), + }, + ]; + } + + #setBarChartAndGetCumulativePageSeries(month: number, year: number, reports: ILicenseReport[]) { + let cumulativePages = 0; + const cumulativePagesSeries = []; + this.barChart = []; + + for (const report of reports) { + cumulativePages += report.numberOfAnalyzedPages; + + const name = `${monthNames[month]} ${year}`; + this.barChart.push({ + name, + value: report.numberOfAnalyzedPages, + }); + + cumulativePagesSeries.push({ + name, + value: cumulativePages, + }); + + month++; + if (month === 12) { + month = 0; + year++; + } + } + + return cumulativePagesSeries; + } + + #getReports(dateRanges: IDateRange[]) { + const reports = dateRanges.map(dateRange => { + const startDate = toDate(dateRange.startDate.month + 1, dateRange.startDate.year); + const endDate = toDate(dateRange.endDate.month + 1, dateRange.endDate.year); + return this._licenseService.getReport({ startDate, endDate }); + }); + + return Promise.all(reports); + } + + #totalLicensedPagesSeries(dateRanges: IDateRange[]) { + return dateRanges.map(dateRange => ({ + name: `${monthNames[dateRange.startDate.month]} ${dateRange.startDate.year}`, + value: this._licenseService.totalLicensedNumberOfPages, + })); + } + + #generateDateRanges(month: number, year: number, endMonth: number, endYear: number) { + const dates: IDateRange[] = []; + + while (month <= endMonth && year <= endYear) { + let nextMonth = month + 1; + let nextYear = year; + if (nextMonth === 12) { + nextMonth = 0; + nextYear++; + } + + dates.push({ startDate: { month, year }, endDate: { month: nextMonth, year: nextYear } }); + + year = nextYear; + month = nextMonth; + } + + return dates; + } +} diff --git a/apps/red-ui/src/app/modules/admin/screens/license-information/license-information-screen.component.html b/apps/red-ui/src/app/modules/admin/screens/license-information/license-information-screen.component.html index 947c16001..5d0f57dd6 100644 --- a/apps/red-ui/src/app/modules/admin/screens/license-information/license-information-screen.component.html +++ b/apps/red-ui/src/app/modules/admin/screens/license-information/license-information-screen.component.html @@ -41,22 +41,24 @@
    - +
    -
    -
    -
    {{ selectedLicense.licensedTo || '-' }}
    -
    - -
    -
    -
    - {{ (selectedLicense.validFrom | date: 'dd-MM-YYYY') || '-' }} / - {{ (selectedLicense.validUntil | date: 'dd-MM-YYYY') || '-' }} + +
    +
    +
    {{ selectedLicense.licensedTo || '-' }}
    -
    + +
    +
    +
    + {{ (selectedLicense.validFrom | date: 'dd-MM-YYYY') || '-' }} / + {{ (selectedLicense.validUntil | date: 'dd-MM-YYYY') || '-' }} +
    +
    +
    {{ 'license-info-screen.licensed-page-count' | translate }}
    @@ -93,23 +95,7 @@
    - + diff --git a/apps/red-ui/src/app/modules/admin/screens/license-information/license-information-screen.component.ts b/apps/red-ui/src/app/modules/admin/screens/license-information/license-information-screen.component.ts index 57703c432..0deef09ea 100644 --- a/apps/red-ui/src/app/modules/admin/screens/license-information/license-information-screen.component.ts +++ b/apps/red-ui/src/app/modules/admin/screens/license-information/license-information-screen.component.ts @@ -8,25 +8,8 @@ import { RouterHistoryService } from '@services/router-history.service'; import { LicenseService } from '../../services/licence-report.service'; import { ILicenseReport } from '@red/domain'; import dayjs from 'dayjs'; -import { ComboBarScheme, LineChartScheme } from './constants'; import { ILicense } from './licence'; -const monthNames = dayjs.monthsShort(); - -function toDate(month: number, year: number) { - return dayjs(`01-${month}-${year}`, 'DD-M-YYYY').toDate(); -} - -interface IMonthYear { - readonly month: number; - readonly year: number; -} - -interface IDateRange { - readonly startDate: IMonthYear; - readonly endDate: IMonthYear; -} - @Component({ selector: 'redaction-license-information-screen', templateUrl: './license-information-screen.component.html', @@ -34,8 +17,6 @@ interface IDateRange { providers: [LicenseService], }) export class LicenseInformationScreenComponent implements OnInit { - readonly lineChartScheme = LineChartScheme; - readonly comboBarScheme = ComboBarScheme; readonly currentYear = new Date().getFullYear(); readonly currentUser = this._userService.currentUser; readonly buttonConfigs: readonly ButtonConfig[] = [ @@ -50,10 +31,7 @@ export class LicenseInformationScreenComponent implements OnInit { totalInfo: ILicenseReport = {}; unlicensedInfo: ILicenseReport = {}; analysisPercentageOfLicense = 100; - barChart: any[]; - lineChartSeries: any[] = []; - selectedLicense = this.licenseService.getActiveLicense(); - totalLicensedNumberOfPages = this.#processingPages; + totalLicensedNumberOfPages = this.licenseService.totalLicensedNumberOfPages; constructor( readonly configService: ConfigService, @@ -66,22 +44,13 @@ export class LicenseInformationScreenComponent implements OnInit { _loadingService.start(); } - get #processingPages() { - const processingPagesFeature = this.selectedLicense.features.find(f => f.name === 'processingPages'); - return Number(processingPagesFeature.value ?? '0'); - } - ngOnInit() { - return this.loadLicenceData(); + return this.loadLicenceData(this.licenseService.selectedLicense); } - async loadLicenceData() { - // const startDate = dayjs(this.selectedLicense.validFrom, 'DD-MM-YYYY'); - // const endDate = dayjs(this.selectedLicense.validUntil, 'DD-MM-YYYY'); - const startDate = dayjs(this.configService.values.LICENSE_START, 'DD-MM-YYYY'); - const endDate = dayjs(this.configService.values.LICENSE_END, 'DD-MM-YYYY'); - - await this._setMonthlyStats(startDate, endDate); + async loadLicenceData(license: ILicense) { + const startDate = dayjs(license.validFrom, 'DD-MM-YYYY'); + const endDate = dayjs(license.validUntil, 'DD-MM-YYYY'); const currentConfig = { startDate: startDate.toDate(), @@ -103,7 +72,7 @@ export class LicenseInformationScreenComponent implements OnInit { } sendMail(): void { - const licenseCustomer = this.selectedLicense.licensedTo; + const licenseCustomer = this.licenseService.selectedLicense.licensedTo; const subject = this._translateService.instant('license-info-screen.email.title', { licenseCustomer, }); @@ -116,97 +85,12 @@ export class LicenseInformationScreenComponent implements OnInit { pages: this.totalLicensedNumberOfPages, }), ].join(lineBreak); - window.location.href = `mailto:${this.selectedLicense.licensedToEmail}?subject=${subject}&body=${body}`; + const mail = this.licenseService.selectedLicense.licensedToEmail; + window.location.href = `mailto:${mail}?subject=${subject}&body=${body}`; } licenceChanged(license: ILicense) { - this.selectedLicense = license; - this.totalLicensedNumberOfPages = this.#processingPages; - return this.loadLicenceData(); - } - - private async _setMonthlyStats(startDate: dayjs.Dayjs, endDate: dayjs.Dayjs) { - const startMonth: number = startDate.month(); - const startYear: number = startDate.year(); - - const dateRanges = this.#generateDateRanges(startMonth, startYear, endDate.month(), endDate.year()); - const reports = await this.#getReports(dateRanges); - - this.lineChartSeries = [ - { - name: this._translateService.instant('license-info-screen.chart.licensed-total'), - series: this.#totalLicensedPagesSeries(dateRanges), - }, - { - name: this._translateService.instant('license-info-screen.chart.cumulative'), - series: this.#setBarChartAndGetCumulativePageSeries(startMonth, startYear, reports), - }, - ]; - } - - #setBarChartAndGetCumulativePageSeries(month: number, year: number, reports: ILicenseReport[]) { - let cumulativePages = 0; - const cumulativePagesSeries = []; - this.barChart = []; - - for (const report of reports) { - cumulativePages += report.numberOfAnalyzedPages; - - const name = `${monthNames[month]} ${year}`; - this.barChart.push({ - name, - value: report.numberOfAnalyzedPages, - }); - - cumulativePagesSeries.push({ - name, - value: cumulativePages, - }); - - month++; - if (month === 12) { - month = 0; - year++; - } - } - - return cumulativePagesSeries; - } - - #getReports(dateRanges: IDateRange[]) { - const reports = dateRanges.map(dateRange => { - const startDate = toDate(dateRange.startDate.month + 1, dateRange.startDate.year); - const endDate = toDate(dateRange.endDate.month + 1, dateRange.endDate.year); - return this.licenseService.getReport({ startDate, endDate }); - }); - - return Promise.all(reports); - } - - #totalLicensedPagesSeries(dateRanges: IDateRange[]) { - return dateRanges.map(dateRange => ({ - name: `${monthNames[dateRange.startDate.month]} ${dateRange.startDate.year}`, - value: this.totalLicensedNumberOfPages, - })); - } - - #generateDateRanges(month: number, year: number, endMonth: number, endYear: number) { - const dates: IDateRange[] = []; - - while (month <= endMonth && year <= endYear) { - let nextMonth = month + 1; - let nextYear = year; - if (nextMonth === 12) { - nextMonth = 0; - nextYear++; - } - - dates.push({ startDate: { month, year }, endDate: { month: nextMonth, year: nextYear } }); - - year = nextYear; - month = nextMonth; - } - - return dates; + this.totalLicensedNumberOfPages = this.licenseService.totalLicensedNumberOfPages; + return this.loadLicenceData(license); } } diff --git a/apps/red-ui/src/app/modules/admin/screens/license-information/select-licence/select-licence.component.html b/apps/red-ui/src/app/modules/admin/screens/license-information/select-licence/select-license.component.html similarity index 91% rename from apps/red-ui/src/app/modules/admin/screens/license-information/select-licence/select-licence.component.html rename to apps/red-ui/src/app/modules/admin/screens/license-information/select-licence/select-license.component.html index e697dddfa..8e0ee84ac 100644 --- a/apps/red-ui/src/app/modules/admin/screens/license-information/select-licence/select-licence.component.html +++ b/apps/red-ui/src/app/modules/admin/screens/license-information/select-licence/select-license.component.html @@ -1,5 +1,5 @@
    - + diff --git a/apps/red-ui/src/app/modules/admin/screens/license-information/select-licence/select-licence.component.scss b/apps/red-ui/src/app/modules/admin/screens/license-information/select-licence/select-license.component.scss similarity index 100% rename from apps/red-ui/src/app/modules/admin/screens/license-information/select-licence/select-licence.component.scss rename to apps/red-ui/src/app/modules/admin/screens/license-information/select-licence/select-license.component.scss diff --git a/apps/red-ui/src/app/modules/admin/screens/license-information/select-licence/select-licence.component.ts b/apps/red-ui/src/app/modules/admin/screens/license-information/select-licence/select-license.component.ts similarity index 68% rename from apps/red-ui/src/app/modules/admin/screens/license-information/select-licence/select-licence.component.ts rename to apps/red-ui/src/app/modules/admin/screens/license-information/select-licence/select-license.component.ts index a033f39f1..954521f9c 100644 --- a/apps/red-ui/src/app/modules/admin/screens/license-information/select-licence/select-licence.component.ts +++ b/apps/red-ui/src/app/modules/admin/screens/license-information/select-licence/select-license.component.ts @@ -9,11 +9,11 @@ const translations = { } as const; @Component({ - selector: 'redaction-select-licence', - templateUrl: './select-licence.component.html', - styleUrls: ['./select-licence.component.scss'], + selector: 'redaction-select-license', + templateUrl: './select-license.component.html', + styleUrls: ['./select-license.component.scss'], }) -export class SelectLicenceComponent { +export class SelectLicenseComponent { @Output() readonly valueChanges = new EventEmitter(); value = this.licenseService.getActiveLicense(); @@ -23,4 +23,9 @@ export class SelectLicenceComponent { getStatus(id) { return id === this.licenseService.activeLicenseId ? translations.active : translations.inactive; } + + licenseChanged($event: ILicense) { + this.valueChanges.emit($event); + this.licenseService.selectedLicense$.next($event); + } } diff --git a/apps/red-ui/src/app/modules/admin/services/licence-report.service.ts b/apps/red-ui/src/app/modules/admin/services/licence-report.service.ts index 1e80657d7..303112868 100644 --- a/apps/red-ui/src/app/modules/admin/services/licence-report.service.ts +++ b/apps/red-ui/src/app/modules/admin/services/licence-report.service.ts @@ -1,18 +1,28 @@ import { Injectable, Injector } from '@angular/core'; import { GenericService, QueryParam, RequiredParam, Validate } from '@iqser/common-ui'; import { ILicenseReport, ILicenseReportRequest } from '@red/domain'; -import { firstValueFrom } from 'rxjs'; -import { LICENSE_DATA } from '../screens/license-information/licence'; +import { BehaviorSubject, firstValueFrom } from 'rxjs'; +import { ILicense, LICENSE_DATA } from '../screens/license-information/licence'; @Injectable() export class LicenseService extends GenericService { readonly licenseData = LICENSE_DATA; readonly activeLicenseId = this.licenseData.activeLicense; + readonly selectedLicense$ = new BehaviorSubject(this.getActiveLicense()); constructor(protected readonly _injector: Injector) { super(_injector, 'report'); } + get selectedLicense() { + return this.selectedLicense$.value; + } + + get totalLicensedNumberOfPages() { + const processingPagesFeature = this.selectedLicense$.value.features.find(f => f.name === 'processingPages'); + return Number(processingPagesFeature.value ?? '0'); + } + getActiveLicense() { return this.licenseData.licenses.find(license => license.id === this.activeLicenseId); } From 4e51e402a7e3505afd4f3469607cc4a92825fe4a Mon Sep 17 00:00:00 2001 From: Dan Percic Date: Fri, 6 May 2022 11:56:43 +0300 Subject: [PATCH 26/30] RED-3765: add license module --- .../app/modules/admin/admin-routing.module.ts | 218 +++++++++--------- .../src/app/modules/admin/admin.module.ts | 16 +- .../combo-chart/combo-chart.component.html | 0 .../combo-chart/combo-chart.component.scss | 0 .../combo-chart/combo-chart.component.ts | 0 .../combo-series-vertical.component.ts | 0 .../license}/combo-chart/index.ts | 0 .../license}/combo-chart/models.ts | 0 .../license-chart.component.html | 0 .../license-chart.component.scss | 0 .../license-chart/license-chart.component.ts | 10 +- .../license-screen.component.html} | 6 +- .../license-screen.component.scss} | 0 .../license-screen.component.ts} | 12 +- .../license-select.component.html} | 0 .../license-select.component.scss} | 0 .../license-select.component.ts} | 12 +- .../admin/screens/license/license.module.ts | 32 +++ .../license/services/license.service.ts} | 2 +- .../utils}/constants.ts | 0 .../utils}/date-range.ts | 0 .../licence.ts => license/utils/license.ts} | 0 .../admin/shared/shared-admin.module.ts | 8 +- 23 files changed, 168 insertions(+), 148 deletions(-) rename apps/red-ui/src/app/modules/admin/{components => screens/license}/combo-chart/combo-chart.component.html (100%) rename apps/red-ui/src/app/modules/admin/{components => screens/license}/combo-chart/combo-chart.component.scss (100%) rename apps/red-ui/src/app/modules/admin/{components => screens/license}/combo-chart/combo-chart.component.ts (100%) rename apps/red-ui/src/app/modules/admin/{components => screens/license}/combo-chart/combo-series-vertical.component.ts (100%) rename apps/red-ui/src/app/modules/admin/{components => screens/license}/combo-chart/index.ts (100%) rename apps/red-ui/src/app/modules/admin/{components => screens/license}/combo-chart/models.ts (100%) rename apps/red-ui/src/app/modules/admin/screens/{license-information => license}/license-chart/license-chart.component.html (100%) rename apps/red-ui/src/app/modules/admin/screens/{license-information => license}/license-chart/license-chart.component.scss (100%) rename apps/red-ui/src/app/modules/admin/screens/{license-information => license}/license-chart/license-chart.component.ts (93%) rename apps/red-ui/src/app/modules/admin/screens/{license-information/license-information-screen.component.html => license/license-screen/license-screen.component.html} (94%) rename apps/red-ui/src/app/modules/admin/screens/{license-information/license-information-screen.component.scss => license/license-screen/license-screen.component.scss} (100%) rename apps/red-ui/src/app/modules/admin/screens/{license-information/license-information-screen.component.ts => license/license-screen/license-screen.component.ts} (90%) rename apps/red-ui/src/app/modules/admin/screens/{license-information/select-licence/select-license.component.html => license/license-select/license-select.component.html} (100%) rename apps/red-ui/src/app/modules/admin/screens/{license-information/select-licence/select-license.component.scss => license/license-select/license-select.component.scss} (100%) rename apps/red-ui/src/app/modules/admin/screens/{license-information/select-licence/select-license.component.ts => license/license-select/license-select.component.ts} (71%) create mode 100644 apps/red-ui/src/app/modules/admin/screens/license/license.module.ts rename apps/red-ui/src/app/modules/admin/{services/licence-report.service.ts => screens/license/services/license.service.ts} (95%) rename apps/red-ui/src/app/modules/admin/screens/{license-information => license/utils}/constants.ts (100%) rename apps/red-ui/src/app/modules/admin/screens/{license-information => license/utils}/date-range.ts (100%) rename apps/red-ui/src/app/modules/admin/screens/{license-information/licence.ts => license/utils/license.ts} (100%) 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 d142d6642..2fcbb5317 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 @@ -7,7 +7,6 @@ import { PendingChangesGuard } from '@guards/can-deactivate.guard'; import { FileAttributesListingScreenComponent } from './screens/file-attributes-listing/file-attributes-listing-screen.component'; import { DefaultColorsScreenComponent } from './screens/default-colors/default-colors-screen.component'; import { UserListingScreenComponent } from './screens/user-listing/user-listing-screen.component'; -import { LicenseInformationScreenComponent } from './screens/license-information/license-information-screen.component'; import { DigitalSignatureScreenComponent } from './screens/digital-signature/digital-signature-screen.component'; import { AuditScreenComponent } from './screens/audit/audit-screen.component'; import { RouterModule, Routes } from '@angular/router'; @@ -26,125 +25,127 @@ import { ACTIVE_DOSSIERS_SERVICE } from '../../tokens'; import { BaseEntityScreenComponent } from './base-entity-screen/base-entity-screen.component'; import { PermissionsGuard } from '../../guards/permissions-guard'; -const routes: Routes = [ - { path: '', redirectTo: 'dossier-templates', pathMatch: 'full' }, +const dossierTemplateIdRoutes = [ { - path: 'dossier-templates', + path: 'info', + canActivate: [CompositeRouteGuard], + component: BaseDossierTemplateScreenComponent, + loadChildren: () => import('./screens/info/dossier-template-info.module').then(m => m.DossierTemplateInfoModule), + }, + { + path: 'entities', children: [ { path: '', - component: BaseAdminScreenComponent, + component: EntitiesListingScreenComponent, canActivate: [CompositeRouteGuard], data: { routeGuards: [AuthGuard, RedRoleGuard], }, - loadChildren: () => - import('./screens/dossier-templates-listing/dossier-templates-listing.module').then( - m => m.DossierTemplatesListingModule, - ), }, { - path: `:${DOSSIER_TEMPLATE_ID}`, - children: [ - { - path: 'info', - canActivate: [CompositeRouteGuard], - component: BaseDossierTemplateScreenComponent, - loadChildren: () => import('./screens/info/dossier-template-info.module').then(m => m.DossierTemplateInfoModule), - }, - { - path: 'entities', - children: [ - { - path: '', - component: EntitiesListingScreenComponent, - canActivate: [CompositeRouteGuard], - data: { - routeGuards: [AuthGuard, RedRoleGuard], - }, - }, - { - path: `:${ENTITY_TYPE}`, - component: BaseEntityScreenComponent, - canActivate: [CompositeRouteGuard], - loadChildren: () => import('./screens/entities/entities.module').then(m => m.EntitiesModule), - data: { - routeGuards: [AuthGuard, RedRoleGuard, EntityExistsGuard], - }, - }, - ], - }, - { - path: 'rules', - component: BaseDossierTemplateScreenComponent, - canActivate: [CompositeRouteGuard], - data: { - routeGuards: [AuthGuard, RedRoleGuard], - }, - loadChildren: () => import('./screens/rules/rules.module').then(m => m.RulesModule), - }, - { - path: 'file-attributes', - component: FileAttributesListingScreenComponent, - canActivate: [CompositeRouteGuard], - data: { - routeGuards: [AuthGuard, RedRoleGuard], - }, - }, - { - path: 'watermark', - component: BaseDossierTemplateScreenComponent, - canActivate: [CompositeRouteGuard], - data: { - routeGuards: [AuthGuard, RedRoleGuard], - }, - loadChildren: () => import('./screens/watermark/watermark.module').then(m => m.WatermarkModule), - }, - { - path: 'reports', - component: BaseDossierTemplateScreenComponent, - canActivate: [CompositeRouteGuard], - data: { - routeGuards: [AuthGuard, RedRoleGuard], - }, - loadChildren: () => import('./screens/reports/reports.module').then(m => m.ReportsModule), - }, - { - path: 'dossier-attributes', - component: DossierAttributesListingScreenComponent, - canActivate: [CompositeRouteGuard], - data: { - routeGuards: [AuthGuard, RedRoleGuard], - }, - }, - { - path: 'dossier-states', - component: DossierStatesListingScreenComponent, - canActivate: [CompositeRouteGuard], - data: { - routeGuards: [AuthGuard, RedRoleGuard], - }, - }, - { - path: 'default-colors', - component: DefaultColorsScreenComponent, - canActivate: [CompositeRouteGuard], - data: { - routeGuards: [AuthGuard, RedRoleGuard], - }, - }, - { - path: 'justifications', - component: BaseDossierTemplateScreenComponent, - canActivate: [CompositeRouteGuard], - loadChildren: () => import('./screens/justifications/justifications.module').then(m => m.JustificationsModule), - }, - { path: '', redirectTo: 'info', pathMatch: 'full' }, - ], + path: `:${ENTITY_TYPE}`, + component: BaseEntityScreenComponent, canActivate: [CompositeRouteGuard], - data: { routeGuards: [DossierTemplateExistsGuard] }, + loadChildren: () => import('./screens/entities/entities.module').then(m => m.EntitiesModule), + data: { + routeGuards: [AuthGuard, RedRoleGuard, EntityExistsGuard], + }, }, ], + }, + { + path: 'rules', + component: BaseDossierTemplateScreenComponent, + canActivate: [CompositeRouteGuard], + data: { + routeGuards: [AuthGuard, RedRoleGuard], + }, + loadChildren: () => import('./screens/rules/rules.module').then(m => m.RulesModule), + }, + { + path: 'file-attributes', + component: FileAttributesListingScreenComponent, + canActivate: [CompositeRouteGuard], + data: { + routeGuards: [AuthGuard, RedRoleGuard], + }, + }, + { + path: 'watermark', + component: BaseDossierTemplateScreenComponent, + canActivate: [CompositeRouteGuard], + data: { + routeGuards: [AuthGuard, RedRoleGuard], + }, + loadChildren: () => import('./screens/watermark/watermark.module').then(m => m.WatermarkModule), + }, + { + path: 'reports', + component: BaseDossierTemplateScreenComponent, + canActivate: [CompositeRouteGuard], + data: { + routeGuards: [AuthGuard, RedRoleGuard], + }, + loadChildren: () => import('./screens/reports/reports.module').then(m => m.ReportsModule), + }, + { + path: 'dossier-attributes', + component: DossierAttributesListingScreenComponent, + canActivate: [CompositeRouteGuard], + data: { + routeGuards: [AuthGuard, RedRoleGuard], + }, + }, + { + path: 'dossier-states', + component: DossierStatesListingScreenComponent, + canActivate: [CompositeRouteGuard], + data: { + routeGuards: [AuthGuard, RedRoleGuard], + }, + }, + { + path: 'default-colors', + component: DefaultColorsScreenComponent, + canActivate: [CompositeRouteGuard], + data: { + routeGuards: [AuthGuard, RedRoleGuard], + }, + }, + { + path: 'justifications', + component: BaseDossierTemplateScreenComponent, + canActivate: [CompositeRouteGuard], + loadChildren: () => import('./screens/justifications/justifications.module').then(m => m.JustificationsModule), + }, + { path: '', redirectTo: 'info', pathMatch: 'full' }, +]; + +const dossierTemplatesRoutes: Routes = [ + { + path: '', + component: BaseAdminScreenComponent, + canActivate: [CompositeRouteGuard], + data: { + routeGuards: [AuthGuard, RedRoleGuard], + }, + loadChildren: () => + import('./screens/dossier-templates-listing/dossier-templates-listing.module').then(m => m.DossierTemplatesListingModule), + }, + { + path: `:${DOSSIER_TEMPLATE_ID}`, + children: dossierTemplateIdRoutes, + canActivate: [CompositeRouteGuard], + data: { routeGuards: [DossierTemplateExistsGuard] }, + }, +]; + +const routes: Routes = [ + { path: '', redirectTo: 'dossier-templates', pathMatch: 'full' }, + { + path: 'dossier-templates', + children: dossierTemplatesRoutes, canActivate: [CompositeRouteGuard], data: { routeGuards: [AuthGuard, RedRoleGuard, DossierTemplatesGuard], @@ -173,12 +174,13 @@ const routes: Routes = [ }, { path: 'license-info', - component: LicenseInformationScreenComponent, + component: BaseAdminScreenComponent, canActivate: [CompositeRouteGuard], data: { routeGuards: [AuthGuard, RedRoleGuard], requiredRoles: ['RED_ADMIN'], }, + loadChildren: () => import('./screens/license/license.module').then(m => m.LicenseModule), }, { path: 'digital-signature', diff --git a/apps/red-ui/src/app/modules/admin/admin.module.ts b/apps/red-ui/src/app/modules/admin/admin.module.ts index 4693a3792..f3be32ed2 100644 --- a/apps/red-ui/src/app/modules/admin/admin.module.ts +++ b/apps/red-ui/src/app/modules/admin/admin.module.ts @@ -7,7 +7,6 @@ import { DefaultColorsScreenComponent } from './screens/default-colors/default-c import { EntitiesListingScreenComponent } from './screens/entities-listing/entities-listing-screen.component'; import { DigitalSignatureScreenComponent } from './screens/digital-signature/digital-signature-screen.component'; import { FileAttributesListingScreenComponent } from './screens/file-attributes-listing/file-attributes-listing-screen.component'; -import { LicenseInformationScreenComponent } from './screens/license-information/license-information-screen.component'; import { UserListingScreenComponent } from './screens/user-listing/user-listing-screen.component'; import { DossierTemplateBreadcrumbsComponent } from './components/dossier-template-breadcrumbs/dossier-template-breadcrumbs.component'; import { ColorPickerModule } from 'ngx-color-picker'; @@ -15,8 +14,6 @@ import { AddEditFileAttributeDialogComponent } from './dialogs/add-edit-file-att import { AddEditDossierTemplateDialogComponent } from './dialogs/add-edit-dossier-template-dialog/add-edit-dossier-template-dialog.component'; import { AddEntityDialogComponent } from './dialogs/add-entity-dialog/add-entity-dialog.component'; import { EditColorDialogComponent } from './dialogs/edit-color-dialog/edit-color-dialog.component'; -import { ComboChartComponent, ComboSeriesVerticalComponent } from './components/combo-chart'; -import { NgxChartsModule } from '@swimlane/ngx-charts'; import { AdminDialogService } from './services/admin-dialog.service'; import { GeneralConfigScreenComponent } from './screens/general-config/general-config-screen.component'; import { SmtpAuthDialogComponent } from './dialogs/smtp-auth-dialog/smtp-auth-dialog.component'; @@ -24,7 +21,6 @@ import { AddEditUserDialogComponent } from './dialogs/add-edit-user-dialog/add-e import { UsersStatsComponent } from './components/users-stats/users-stats.component'; import { FileAttributesCsvImportDialogComponent } from './dialogs/file-attributes-csv-import-dialog/file-attributes-csv-import-dialog.component'; import { ActiveFieldsListingComponent } from './dialogs/file-attributes-csv-import-dialog/active-fields-listing/active-fields-listing.component'; -import { AdminSideNavComponent } from './admin-side-nav/admin-side-nav.component'; import { ResetPasswordComponent } from './dialogs/add-edit-user-dialog/reset-password/reset-password.component'; import { UserDetailsComponent } from './dialogs/add-edit-user-dialog/user-details/user-details.component'; import { AddEditDossierAttributeDialogComponent } from './dialogs/add-edit-dossier-attribute-dialog/add-edit-dossier-attribute-dialog.component'; @@ -48,8 +44,7 @@ import { ConfirmDeleteDossierStateDialogComponent } from './dialogs/confirm-dele import { TrashTableItemComponent } from './screens/trash/trash-table-item/trash-table-item.component'; import { BaseEntityScreenComponent } from './base-entity-screen/base-entity-screen.component'; import { CloneDossierTemplateDialogComponent } from './dialogs/clone-dossier-template-dialog/clone-dossier-template-dialog.component'; -import { SelectLicenseComponent } from './screens/license-information/select-licence/select-license.component'; -import { LicenseChartComponent } from './screens/license-information/license-chart/license-chart.component'; +import { AdminSideNavComponent } from './admin-side-nav/admin-side-nav.component'; const dialogs = [ AddEditDossierTemplateDialogComponent, @@ -71,7 +66,6 @@ const screens = [ EntitiesListingScreenComponent, DigitalSignatureScreenComponent, FileAttributesListingScreenComponent, - LicenseInformationScreenComponent, UserListingScreenComponent, GeneralConfigScreenComponent, DossierAttributesListingScreenComponent, @@ -80,11 +74,9 @@ const screens = [ const components = [ DossierTemplateBreadcrumbsComponent, - ComboChartComponent, - ComboSeriesVerticalComponent, UsersStatsComponent, - ActiveFieldsListingComponent, AdminSideNavComponent, + ActiveFieldsListingComponent, ResetPasswordComponent, UserDetailsComponent, BaseAdminScreenComponent, @@ -104,10 +96,8 @@ const components = [ AddEditDossierStateDialogComponent, ConfirmDeleteDossierStateDialogComponent, TrashTableItemComponent, - SelectLicenseComponent, - LicenseChartComponent, ], providers: [AdminDialogService, AuditService, DigitalSignatureService, RulesService, SmtpConfigService], - imports: [CommonModule, SharedModule, AdminRoutingModule, SharedAdminModule, NgxChartsModule, ColorPickerModule, A11yModule], + imports: [CommonModule, SharedModule, AdminRoutingModule, SharedAdminModule, ColorPickerModule, A11yModule], }) export class AdminModule {} diff --git a/apps/red-ui/src/app/modules/admin/components/combo-chart/combo-chart.component.html b/apps/red-ui/src/app/modules/admin/screens/license/combo-chart/combo-chart.component.html similarity index 100% rename from apps/red-ui/src/app/modules/admin/components/combo-chart/combo-chart.component.html rename to apps/red-ui/src/app/modules/admin/screens/license/combo-chart/combo-chart.component.html diff --git a/apps/red-ui/src/app/modules/admin/components/combo-chart/combo-chart.component.scss b/apps/red-ui/src/app/modules/admin/screens/license/combo-chart/combo-chart.component.scss similarity index 100% rename from apps/red-ui/src/app/modules/admin/components/combo-chart/combo-chart.component.scss rename to apps/red-ui/src/app/modules/admin/screens/license/combo-chart/combo-chart.component.scss diff --git a/apps/red-ui/src/app/modules/admin/components/combo-chart/combo-chart.component.ts b/apps/red-ui/src/app/modules/admin/screens/license/combo-chart/combo-chart.component.ts similarity index 100% rename from apps/red-ui/src/app/modules/admin/components/combo-chart/combo-chart.component.ts rename to apps/red-ui/src/app/modules/admin/screens/license/combo-chart/combo-chart.component.ts diff --git a/apps/red-ui/src/app/modules/admin/components/combo-chart/combo-series-vertical.component.ts b/apps/red-ui/src/app/modules/admin/screens/license/combo-chart/combo-series-vertical.component.ts similarity index 100% rename from apps/red-ui/src/app/modules/admin/components/combo-chart/combo-series-vertical.component.ts rename to apps/red-ui/src/app/modules/admin/screens/license/combo-chart/combo-series-vertical.component.ts diff --git a/apps/red-ui/src/app/modules/admin/components/combo-chart/index.ts b/apps/red-ui/src/app/modules/admin/screens/license/combo-chart/index.ts similarity index 100% rename from apps/red-ui/src/app/modules/admin/components/combo-chart/index.ts rename to apps/red-ui/src/app/modules/admin/screens/license/combo-chart/index.ts diff --git a/apps/red-ui/src/app/modules/admin/components/combo-chart/models.ts b/apps/red-ui/src/app/modules/admin/screens/license/combo-chart/models.ts similarity index 100% rename from apps/red-ui/src/app/modules/admin/components/combo-chart/models.ts rename to apps/red-ui/src/app/modules/admin/screens/license/combo-chart/models.ts diff --git a/apps/red-ui/src/app/modules/admin/screens/license-information/license-chart/license-chart.component.html b/apps/red-ui/src/app/modules/admin/screens/license/license-chart/license-chart.component.html similarity index 100% rename from apps/red-ui/src/app/modules/admin/screens/license-information/license-chart/license-chart.component.html rename to apps/red-ui/src/app/modules/admin/screens/license/license-chart/license-chart.component.html diff --git a/apps/red-ui/src/app/modules/admin/screens/license-information/license-chart/license-chart.component.scss b/apps/red-ui/src/app/modules/admin/screens/license/license-chart/license-chart.component.scss similarity index 100% rename from apps/red-ui/src/app/modules/admin/screens/license-information/license-chart/license-chart.component.scss rename to apps/red-ui/src/app/modules/admin/screens/license/license-chart/license-chart.component.scss diff --git a/apps/red-ui/src/app/modules/admin/screens/license-information/license-chart/license-chart.component.ts b/apps/red-ui/src/app/modules/admin/screens/license/license-chart/license-chart.component.ts similarity index 93% rename from apps/red-ui/src/app/modules/admin/screens/license-information/license-chart/license-chart.component.ts rename to apps/red-ui/src/app/modules/admin/screens/license/license-chart/license-chart.component.ts index 207c1eca6..1f64cec27 100644 --- a/apps/red-ui/src/app/modules/admin/screens/license-information/license-chart/license-chart.component.ts +++ b/apps/red-ui/src/app/modules/admin/screens/license/license-chart/license-chart.component.ts @@ -1,13 +1,13 @@ import { Component } from '@angular/core'; -import { ComboBarScheme, LineChartScheme } from '../constants'; +import { ComboBarScheme, LineChartScheme } from '../utils/constants'; import dayjs from 'dayjs'; import { TranslateService } from '@ngx-translate/core'; import { ILicenseReport } from '@red/domain'; -import { LicenseService } from '../../../services/licence-report.service'; -import { IDateRange } from '../date-range'; -import { ILicense } from '../licence'; +import { LicenseService } from '../services/license.service'; +import { IDateRange } from '../utils/date-range'; +import { ILicense } from '../utils/license'; import { switchMap } from 'rxjs/operators'; -import { ILineChartSeries } from '../../../components/combo-chart/models'; +import { ILineChartSeries } from '../combo-chart/models'; import { ConfigService } from '../../../../../services/config.service'; const monthNames = dayjs.monthsShort(); diff --git a/apps/red-ui/src/app/modules/admin/screens/license-information/license-information-screen.component.html b/apps/red-ui/src/app/modules/admin/screens/license/license-screen/license-screen.component.html similarity index 94% rename from apps/red-ui/src/app/modules/admin/screens/license-information/license-information-screen.component.html rename to apps/red-ui/src/app/modules/admin/screens/license/license-screen/license-screen.component.html index 5d0f57dd6..a762eefda 100644 --- a/apps/red-ui/src/app/modules/admin/screens/license-information/license-information-screen.component.html +++ b/apps/red-ui/src/app/modules/admin/screens/license/license-screen/license-screen.component.html @@ -1,8 +1,4 @@
    -
    - - -
    - +
    diff --git a/apps/red-ui/src/app/modules/admin/screens/license-information/license-information-screen.component.scss b/apps/red-ui/src/app/modules/admin/screens/license/license-screen/license-screen.component.scss similarity index 100% rename from apps/red-ui/src/app/modules/admin/screens/license-information/license-information-screen.component.scss rename to apps/red-ui/src/app/modules/admin/screens/license/license-screen/license-screen.component.scss diff --git a/apps/red-ui/src/app/modules/admin/screens/license-information/license-information-screen.component.ts b/apps/red-ui/src/app/modules/admin/screens/license/license-screen/license-screen.component.ts similarity index 90% rename from apps/red-ui/src/app/modules/admin/screens/license-information/license-information-screen.component.ts rename to apps/red-ui/src/app/modules/admin/screens/license/license-screen/license-screen.component.ts index 0deef09ea..b42e04ca2 100644 --- a/apps/red-ui/src/app/modules/admin/screens/license-information/license-information-screen.component.ts +++ b/apps/red-ui/src/app/modules/admin/screens/license/license-screen/license-screen.component.ts @@ -5,18 +5,16 @@ import { ButtonConfig, IconButtonTypes, LoadingService } from '@iqser/common-ui' import { marker as _ } from '@biesbjerg/ngx-translate-extract-marker'; import { UserService } from '@services/user.service'; import { RouterHistoryService } from '@services/router-history.service'; -import { LicenseService } from '../../services/licence-report.service'; +import { LicenseService } from '../services/license.service'; import { ILicenseReport } from '@red/domain'; import dayjs from 'dayjs'; -import { ILicense } from './licence'; +import { ILicense } from '../utils/license'; @Component({ - selector: 'redaction-license-information-screen', - templateUrl: './license-information-screen.component.html', - styleUrls: ['./license-information-screen.component.scss'], - providers: [LicenseService], + templateUrl: './license-screen.component.html', + styleUrls: ['./license-screen.component.scss'], }) -export class LicenseInformationScreenComponent implements OnInit { +export class LicenseScreenComponent implements OnInit { readonly currentYear = new Date().getFullYear(); readonly currentUser = this._userService.currentUser; readonly buttonConfigs: readonly ButtonConfig[] = [ diff --git a/apps/red-ui/src/app/modules/admin/screens/license-information/select-licence/select-license.component.html b/apps/red-ui/src/app/modules/admin/screens/license/license-select/license-select.component.html similarity index 100% rename from apps/red-ui/src/app/modules/admin/screens/license-information/select-licence/select-license.component.html rename to apps/red-ui/src/app/modules/admin/screens/license/license-select/license-select.component.html diff --git a/apps/red-ui/src/app/modules/admin/screens/license-information/select-licence/select-license.component.scss b/apps/red-ui/src/app/modules/admin/screens/license/license-select/license-select.component.scss similarity index 100% rename from apps/red-ui/src/app/modules/admin/screens/license-information/select-licence/select-license.component.scss rename to apps/red-ui/src/app/modules/admin/screens/license/license-select/license-select.component.scss diff --git a/apps/red-ui/src/app/modules/admin/screens/license-information/select-licence/select-license.component.ts b/apps/red-ui/src/app/modules/admin/screens/license/license-select/license-select.component.ts similarity index 71% rename from apps/red-ui/src/app/modules/admin/screens/license-information/select-licence/select-license.component.ts rename to apps/red-ui/src/app/modules/admin/screens/license/license-select/license-select.component.ts index 954521f9c..6c088558d 100644 --- a/apps/red-ui/src/app/modules/admin/screens/license-information/select-licence/select-license.component.ts +++ b/apps/red-ui/src/app/modules/admin/screens/license/license-select/license-select.component.ts @@ -1,6 +1,6 @@ import { Component, EventEmitter, Output } from '@angular/core'; -import { LicenseService } from '../../../services/licence-report.service'; -import { ILicense } from '../licence'; +import { LicenseService } from '../services/license.service'; +import { ILicense } from '../utils/license'; import { marker as _ } from '@biesbjerg/ngx-translate-extract-marker'; const translations = { @@ -9,11 +9,11 @@ const translations = { } as const; @Component({ - selector: 'redaction-select-license', - templateUrl: './select-license.component.html', - styleUrls: ['./select-license.component.scss'], + selector: 'redaction-license-select', + templateUrl: './license-select.component.html', + styleUrls: ['./license-select.component.scss'], }) -export class SelectLicenseComponent { +export class LicenseSelectComponent { @Output() readonly valueChanges = new EventEmitter(); value = this.licenseService.getActiveLicense(); diff --git a/apps/red-ui/src/app/modules/admin/screens/license/license.module.ts b/apps/red-ui/src/app/modules/admin/screens/license/license.module.ts new file mode 100644 index 000000000..dbe83e1b0 --- /dev/null +++ b/apps/red-ui/src/app/modules/admin/screens/license/license.module.ts @@ -0,0 +1,32 @@ +import { NgModule } from '@angular/core'; +import { LicenseScreenComponent } from './license-screen/license-screen.component'; +import { LicenseSelectComponent } from './license-select/license-select.component'; +import { LicenseChartComponent } from './license-chart/license-chart.component'; +import { LicenseService } from './services/license.service'; +import { RouterModule, Routes } from '@angular/router'; +import { TranslateModule } from '@ngx-translate/core'; +import { MatSelectModule } from '@angular/material/select'; +import { IqserListingModule } from '@iqser/common-ui'; +import { NgxChartsModule } from '@swimlane/ngx-charts'; +import { ComboChartComponent, ComboSeriesVerticalComponent } from './combo-chart'; +import { FormsModule } from '@angular/forms'; + +const routes: Routes = [ + { + path: '', + component: LicenseScreenComponent, + }, +]; + +@NgModule({ + declarations: [ + LicenseScreenComponent, + LicenseSelectComponent, + LicenseChartComponent, + ComboChartComponent, + ComboSeriesVerticalComponent, + ], + imports: [RouterModule.forChild(routes), TranslateModule, MatSelectModule, FormsModule, NgxChartsModule, IqserListingModule], + providers: [LicenseService], +}) +export class LicenseModule {} diff --git a/apps/red-ui/src/app/modules/admin/services/licence-report.service.ts b/apps/red-ui/src/app/modules/admin/screens/license/services/license.service.ts similarity index 95% rename from apps/red-ui/src/app/modules/admin/services/licence-report.service.ts rename to apps/red-ui/src/app/modules/admin/screens/license/services/license.service.ts index 303112868..d16c98ca0 100644 --- a/apps/red-ui/src/app/modules/admin/services/licence-report.service.ts +++ b/apps/red-ui/src/app/modules/admin/screens/license/services/license.service.ts @@ -2,7 +2,7 @@ import { Injectable, Injector } from '@angular/core'; import { GenericService, QueryParam, RequiredParam, Validate } from '@iqser/common-ui'; import { ILicenseReport, ILicenseReportRequest } from '@red/domain'; import { BehaviorSubject, firstValueFrom } from 'rxjs'; -import { ILicense, LICENSE_DATA } from '../screens/license-information/licence'; +import { ILicense, LICENSE_DATA } from '../utils/license'; @Injectable() export class LicenseService extends GenericService { diff --git a/apps/red-ui/src/app/modules/admin/screens/license-information/constants.ts b/apps/red-ui/src/app/modules/admin/screens/license/utils/constants.ts similarity index 100% rename from apps/red-ui/src/app/modules/admin/screens/license-information/constants.ts rename to apps/red-ui/src/app/modules/admin/screens/license/utils/constants.ts diff --git a/apps/red-ui/src/app/modules/admin/screens/license-information/date-range.ts b/apps/red-ui/src/app/modules/admin/screens/license/utils/date-range.ts similarity index 100% rename from apps/red-ui/src/app/modules/admin/screens/license-information/date-range.ts rename to apps/red-ui/src/app/modules/admin/screens/license/utils/date-range.ts diff --git a/apps/red-ui/src/app/modules/admin/screens/license-information/licence.ts b/apps/red-ui/src/app/modules/admin/screens/license/utils/license.ts similarity index 100% rename from apps/red-ui/src/app/modules/admin/screens/license-information/licence.ts rename to apps/red-ui/src/app/modules/admin/screens/license/utils/license.ts diff --git a/apps/red-ui/src/app/modules/admin/shared/shared-admin.module.ts b/apps/red-ui/src/app/modules/admin/shared/shared-admin.module.ts index 32bdf41f4..285cc8f30 100644 --- a/apps/red-ui/src/app/modules/admin/shared/shared-admin.module.ts +++ b/apps/red-ui/src/app/modules/admin/shared/shared-admin.module.ts @@ -4,13 +4,15 @@ import { SharedModule } from '@shared/shared.module'; import { DossierTemplateActionsComponent } from './components/dossier-template-actions/dossier-template-actions.component'; import { AddEditEntityComponent } from './components/add-edit-entity/add-edit-entity.component'; import { ColorPickerModule } from 'ngx-color-picker'; +import { RouterModule } from '@angular/router'; const components = [DossierTemplateActionsComponent, AddEditEntityComponent]; +const modules = [CommonModule, SharedModule]; + @NgModule({ declarations: [...components], - exports: [...components], - providers: [], - imports: [CommonModule, SharedModule, ColorPickerModule], + exports: [...components, ...modules], + imports: [...modules, RouterModule, ColorPickerModule], }) export class SharedAdminModule {} From 2fc1fd7bb20464b6f5366adb0f8174c24590e4d7 Mon Sep 17 00:00:00 2001 From: Dan Percic Date: Mon, 9 May 2022 15:51:15 +0300 Subject: [PATCH 27/30] RED-3765: show license select in dev mode --- .../license-chart/license-chart.component.ts | 76 ++++++++++--------- .../license-screen.component.html | 2 +- .../license-screen.component.ts | 7 +- .../license/services/license.service.ts | 40 +++++++++- .../admin/screens/license/utils/constants.ts | 2 + .../admin/screens/license/utils/date-range.ts | 11 +-- .../admin/screens/license/utils/functions.ts | 41 ++++++++++ .../admin/screens/license/utils/license.ts | 2 +- apps/red-ui/src/assets/config/config.json | 4 +- 9 files changed, 132 insertions(+), 53 deletions(-) create mode 100644 apps/red-ui/src/app/modules/admin/screens/license/utils/functions.ts diff --git a/apps/red-ui/src/app/modules/admin/screens/license/license-chart/license-chart.component.ts b/apps/red-ui/src/app/modules/admin/screens/license/license-chart/license-chart.component.ts index 1f64cec27..107353d82 100644 --- a/apps/red-ui/src/app/modules/admin/screens/license/license-chart/license-chart.component.ts +++ b/apps/red-ui/src/app/modules/admin/screens/license/license-chart/license-chart.component.ts @@ -1,21 +1,18 @@ import { Component } from '@angular/core'; -import { ComboBarScheme, LineChartScheme } from '../utils/constants'; +import { ComboBarScheme, LICENSE_STORAGE_KEY, LineChartScheme } from '../utils/constants'; import dayjs from 'dayjs'; import { TranslateService } from '@ngx-translate/core'; import { ILicenseReport } from '@red/domain'; import { LicenseService } from '../services/license.service'; import { IDateRange } from '../utils/date-range'; import { ILicense } from '../utils/license'; -import { switchMap } from 'rxjs/operators'; +import { switchMap, tap } from 'rxjs/operators'; import { ILineChartSeries } from '../combo-chart/models'; -import { ConfigService } from '../../../../../services/config.service'; +import { LoadingService } from '@iqser/common-ui'; +import { generateDateRanges, isCurrentMonth, toDate } from '../utils/functions'; const monthNames = dayjs.monthsShort(); -function toDate(month: number, year: number) { - return dayjs(`01-${month}-${year}`, 'DD-M-YYYY').toDate(); -} - @Component({ selector: 'redaction-license-chart', templateUrl: './license-chart.component.html', @@ -25,22 +22,30 @@ export class LicenseChartComponent { readonly lineChartScheme = LineChartScheme; readonly comboBarScheme = ComboBarScheme; - lineChartSeries$ = this._licenseService.selectedLicense$.pipe(switchMap(license => this.#setMonthlyStats(license))); + lineChartSeries$ = this.#licenseChartSeries$; barChart: any[]; constructor( private readonly _translateService: TranslateService, private readonly _licenseService: LicenseService, - private readonly _configService: ConfigService, + private readonly _loadingService: LoadingService, ) {} + get #licenseChartSeries$() { + return this._licenseService.selectedLicense$.pipe( + tap(() => this._loadingService.start()), + switchMap(license => this.#setMonthlyStats(license)), + tap(() => this._loadingService.stop()), + ); + } + async #setMonthlyStats(licence: ILicense): Promise { - const startDate = dayjs(licence.validFrom, 'DD-MM-YYYY'); - const endDate = dayjs(licence.validUntil, 'DD-MM-YYYY'); + const startDate = dayjs(licence.validFrom); + const endDate = dayjs(licence.validUntil); const startMonth: number = startDate.month(); const startYear: number = startDate.year(); - const dateRanges = this.#generateDateRanges(startMonth, startYear, endDate.month(), endDate.year()); + const dateRanges = generateDateRanges(startMonth, startYear, endDate.month(), endDate.year()); const reports = await this.#getReports(dateRanges); return [ @@ -86,38 +91,37 @@ export class LicenseChartComponent { #getReports(dateRanges: IDateRange[]) { const reports = dateRanges.map(dateRange => { - const startDate = toDate(dateRange.startDate.month + 1, dateRange.startDate.year); - const endDate = toDate(dateRange.endDate.month + 1, dateRange.endDate.year); - return this._licenseService.getReport({ startDate, endDate }); + const startMonth = dateRange.startMonth + 1; + const endMonth = dateRange.endMonth + 1; + + const key = `${startMonth}.${dateRange.startYear}-${endMonth}.${dateRange.endYear}`; + const existingReport = this._licenseService.storedReports[key]; + if (existingReport) { + return existingReport; + } + + const startDate = toDate(startMonth, dateRange.startYear); + const endDate = toDate(endMonth, dateRange.endYear); + const requestedReport = this._licenseService.getReport({ startDate, endDate }); + return requestedReport.then(report => this.#storeReportIfNotCurrentMonth(dateRange, report, key)); }); return Promise.all(reports); } + #storeReportIfNotCurrentMonth(dateRange: IDateRange, report: ILicenseReport, key: string) { + if (!isCurrentMonth(dateRange.startMonth + 1, dateRange.startYear)) { + this._licenseService.storedReports[key] = report; + localStorage.setItem(LICENSE_STORAGE_KEY, JSON.stringify(this._licenseService.storedReports)); + } + + return report; + } + #totalLicensedPagesSeries(dateRanges: IDateRange[]) { return dateRanges.map(dateRange => ({ - name: `${monthNames[dateRange.startDate.month]} ${dateRange.startDate.year}`, + name: `${monthNames[dateRange.startMonth]} ${dateRange.startYear}`, value: this._licenseService.totalLicensedNumberOfPages, })); } - - #generateDateRanges(month: number, year: number, endMonth: number, endYear: number) { - const dates: IDateRange[] = []; - - while (month <= endMonth && year <= endYear) { - let nextMonth = month + 1; - let nextYear = year; - if (nextMonth === 12) { - nextMonth = 0; - nextYear++; - } - - dates.push({ startDate: { month, year }, endDate: { month: nextMonth, year: nextYear } }); - - year = nextYear; - month = nextMonth; - } - - return dates; - } } diff --git a/apps/red-ui/src/app/modules/admin/screens/license/license-screen/license-screen.component.html b/apps/red-ui/src/app/modules/admin/screens/license/license-screen/license-screen.component.html index a762eefda..1d4e9834f 100644 --- a/apps/red-ui/src/app/modules/admin/screens/license/license-screen/license-screen.component.html +++ b/apps/red-ui/src/app/modules/admin/screens/license/license-screen/license-screen.component.html @@ -34,7 +34,7 @@
    -
    +
    diff --git a/apps/red-ui/src/app/modules/admin/screens/license/license-screen/license-screen.component.ts b/apps/red-ui/src/app/modules/admin/screens/license/license-screen/license-screen.component.ts index b42e04ca2..8f080de93 100644 --- a/apps/red-ui/src/app/modules/admin/screens/license/license-screen/license-screen.component.ts +++ b/apps/red-ui/src/app/modules/admin/screens/license/license-screen/license-screen.component.ts @@ -9,6 +9,7 @@ import { LicenseService } from '../services/license.service'; import { ILicenseReport } from '@red/domain'; import dayjs from 'dayjs'; import { ILicense } from '../utils/license'; +import { UserPreferenceService } from '../../../../../services/user-preference.service'; @Component({ templateUrl: './license-screen.component.html', @@ -33,6 +34,7 @@ export class LicenseScreenComponent implements OnInit { constructor( readonly configService: ConfigService, + readonly userPreferenceService: UserPreferenceService, readonly licenseService: LicenseService, private readonly _userService: UserService, private readonly _loadingService: LoadingService, @@ -47,8 +49,8 @@ export class LicenseScreenComponent implements OnInit { } async loadLicenceData(license: ILicense) { - const startDate = dayjs(license.validFrom, 'DD-MM-YYYY'); - const endDate = dayjs(license.validUntil, 'DD-MM-YYYY'); + const startDate = dayjs(license.validFrom); + const endDate = dayjs(license.validUntil); const currentConfig = { startDate: startDate.toDate(), @@ -64,7 +66,6 @@ export class LicenseScreenComponent implements OnInit { } [this.currentInfo, this.totalInfo, this.unlicensedInfo] = await Promise.all(reports); - this._loadingService.stop(); this.analysisPercentageOfLicense = this.totalLicensedNumberOfPages > 0 ? (this.currentInfo.numberOfAnalyzedPages / this.totalLicensedNumberOfPages) * 100 : 100; } diff --git a/apps/red-ui/src/app/modules/admin/screens/license/services/license.service.ts b/apps/red-ui/src/app/modules/admin/screens/license/services/license.service.ts index d16c98ca0..d3081f9da 100644 --- a/apps/red-ui/src/app/modules/admin/screens/license/services/license.service.ts +++ b/apps/red-ui/src/app/modules/admin/screens/license/services/license.service.ts @@ -2,15 +2,19 @@ import { Injectable, Injector } from '@angular/core'; import { GenericService, QueryParam, RequiredParam, Validate } from '@iqser/common-ui'; import { ILicenseReport, ILicenseReportRequest } from '@red/domain'; import { BehaviorSubject, firstValueFrom } from 'rxjs'; -import { ILicense, LICENSE_DATA } from '../utils/license'; +import { ILicense, ILicenses, LICENSE_DATA } from '../utils/license'; +import { ConfigService } from '../../../../../services/config.service'; +import dayjs from 'dayjs'; +import { getStoredReports } from '../utils/functions'; @Injectable() export class LicenseService extends GenericService { - readonly licenseData = LICENSE_DATA; + storedReports = getStoredReports(); + readonly licenseData = this.#licenceData; readonly activeLicenseId = this.licenseData.activeLicense; readonly selectedLicense$ = new BehaviorSubject(this.getActiveLicense()); - constructor(protected readonly _injector: Injector) { + constructor(protected readonly _injector: Injector, private readonly _configService: ConfigService) { super(_injector, 'report'); } @@ -23,6 +27,36 @@ export class LicenseService extends GenericService { return Number(processingPagesFeature.value ?? '0'); } + get #licenceData(): ILicenses { + return { + ...LICENSE_DATA, + licenses: [ + ...LICENSE_DATA.licenses, + { + id: 'guid-0', + name: this._configService.values.LICENSE_CUSTOMER, + product: 'RedactManager', + licensedTo: this._configService.values.LICENSE_CUSTOMER, + licensedToEmail: this._configService.values.LICENSE_EMAIL, + validFrom: dayjs(this._configService.values.LICENSE_START, 'DD-MM-YYYY').toISOString(), + validUntil: dayjs(this._configService.values.LICENSE_END, 'DD-MM-YYYY').toISOString(), + features: [ + { + name: 'pdftron', + type: 'STRING', + value: 'base64 encoded pdftron webviewer license key', + }, + { + name: 'processingPages', + type: 'NUMBER', + value: this._configService.values.LICENSE_PAGE_COUNT.toString(), + }, + ], + }, + ], + }; + } + getActiveLicense() { return this.licenseData.licenses.find(license => license.id === this.activeLicenseId); } diff --git a/apps/red-ui/src/app/modules/admin/screens/license/utils/constants.ts b/apps/red-ui/src/app/modules/admin/screens/license/utils/constants.ts index 766035b64..a139c9732 100644 --- a/apps/red-ui/src/app/modules/admin/screens/license/utils/constants.ts +++ b/apps/red-ui/src/app/modules/admin/screens/license/utils/constants.ts @@ -13,3 +13,5 @@ export const LineChartScheme: Color = { group: ScaleType.Ordinal, domain: ['#dd4d50', '#5ce594', '#0389ec'], }; + +export const LICENSE_STORAGE_KEY = 'redaction-license-reports'; diff --git a/apps/red-ui/src/app/modules/admin/screens/license/utils/date-range.ts b/apps/red-ui/src/app/modules/admin/screens/license/utils/date-range.ts index 6c18cc6d5..c18962cd6 100644 --- a/apps/red-ui/src/app/modules/admin/screens/license/utils/date-range.ts +++ b/apps/red-ui/src/app/modules/admin/screens/license/utils/date-range.ts @@ -1,9 +1,6 @@ -export interface IMonthYear { - readonly month: number; - readonly year: number; -} - export interface IDateRange { - readonly startDate: IMonthYear; - readonly endDate: IMonthYear; + readonly startMonth: number; + readonly startYear: number; + readonly endMonth: number; + readonly endYear: number; } diff --git a/apps/red-ui/src/app/modules/admin/screens/license/utils/functions.ts b/apps/red-ui/src/app/modules/admin/screens/license/utils/functions.ts new file mode 100644 index 000000000..4e445c7ae --- /dev/null +++ b/apps/red-ui/src/app/modules/admin/screens/license/utils/functions.ts @@ -0,0 +1,41 @@ +import dayjs from 'dayjs'; +import { IDateRange } from './date-range'; +import { LICENSE_STORAGE_KEY } from './constants'; +import { ILicenseReport } from '@red/domain'; + +export function toDate(month: number, year: number) { + return dayjs(`01-${month}-${year}`, 'DD-M-YYYY').toDate(); +} + +export function generateDateRanges(month: number, year: number, endMonth: number, endYear: number) { + const dates: IDateRange[] = []; + + while (month <= endMonth && year <= endYear) { + let nextMonth = month + 1; + let nextYear = year; + if (nextMonth === 12) { + nextMonth = 0; + nextYear++; + } + + dates.push({ startMonth: month, startYear: year, endMonth: nextMonth, endYear: nextYear }); + + year = nextYear; + month = nextMonth; + } + + return dates; +} + +export function getStoredReports() { + const rawStoredReports = localStorage.getItem(LICENSE_STORAGE_KEY); + return JSON.parse(rawStoredReports ?? '{}') as Record; +} + +export function isCurrentMonth(month: number, year: number) { + const now = dayjs(); + const currentMonth = now.month() + 1; + const currentYear = now.year(); + + return month === currentMonth && year === currentYear; +} diff --git a/apps/red-ui/src/app/modules/admin/screens/license/utils/license.ts b/apps/red-ui/src/app/modules/admin/screens/license/utils/license.ts index 51da73235..63cf5b4bf 100644 --- a/apps/red-ui/src/app/modules/admin/screens/license/utils/license.ts +++ b/apps/red-ui/src/app/modules/admin/screens/license/utils/license.ts @@ -21,7 +21,7 @@ export interface ILicenses { } export const LICENSE_DATA: ILicenses = { - activeLicense: 'guid-1', + activeLicense: 'guid-0', licenses: [ { id: 'guid-1', diff --git a/apps/red-ui/src/assets/config/config.json b/apps/red-ui/src/assets/config/config.json index 0cb5f13c3..684210fa7 100644 --- a/apps/red-ui/src/assets/config/config.json +++ b/apps/red-ui/src/assets/config/config.json @@ -1,7 +1,7 @@ { "ADMIN_CONTACT_NAME": null, "ADMIN_CONTACT_URL": null, - "API_URL": "https://dev-04.iqser.cloud/redaction-gateway-v1", + "API_URL": "https://dev-08.iqser.cloud/redaction-gateway-v1", "APP_NAME": "RedactManager", "AUTO_READ_TIME": 3, "BACKEND_APP_VERSION": "4.4.40", @@ -17,7 +17,7 @@ "MAX_RETRIES_ON_SERVER_ERROR": 3, "OAUTH_CLIENT_ID": "redaction", "OAUTH_IDP_HINT": null, - "OAUTH_URL": "https://dev-04.iqser.cloud/auth/realms/redaction", + "OAUTH_URL": "https://dev-08.iqser.cloud/auth/realms/redaction", "RECENT_PERIOD_IN_HOURS": 24, "SELECTION_MODE": "structural", "MANUAL_BASE_URL": "https://docs.redactmanager.com/preview" From 525578011da18b3307d9039c7a11db3031ccf6ba Mon Sep 17 00:00:00 2001 From: Atlassian Bamboo Date: Mon, 9 May 2022 14:54:17 +0200 Subject: [PATCH 28/30] chore(release) --- package.json | 2 +- paligo-theme.tar.gz | Bin 3260 -> 3260 bytes 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 33f6aadc1..94c6c1f54 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "redaction", - "version": "3.462.0", + "version": "3.463.0", "private": true, "license": "MIT", "scripts": { diff --git a/paligo-theme.tar.gz b/paligo-theme.tar.gz index c25db9a9417c7e7f83c96b8eb3d9881dd77dd9e7..ae82a4708569a60b6c0d971040a36b4724582917 100644 GIT binary patch delta 3173 zcmV-r44U)28N3;gc7KIyFP&id!glPyv0tFzXTfIBnwsGXp^vfE|6-f#@|Qnq_L!0S zLute5^7lO3Kg<7Pw7v4LNQ@&U$L3L8zuz8Qzzcs${+_e+7rp#FpUZy{1R#I=!;)%l z|L5|59i_Oc2}75E`R;3Lb@}q*HQkm)#ZXgaSC=VcWxc++Nq>r*)$>hJY%+pNTF;|m zdjksL{x-o|nmvC0r;_Bq`4;E(nlhZt?l&oWZO=U0ereBq@i!2E7vk?y{9VCcN6c}= z97oJ?#2iP=arm5H$Fwdp{P=l&kIT#Jmlt!6AI_|l;FwhC9~TI{wP+rbhc$9u!mpH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29/30] RED-3760 - new help mode keys --- .../dossier-details.component.html | 10 +- .../dossier-overview/config.service.ts | 6 +- .../edit-dossier-general-info.component.html | 4 + .../file-actions/file-actions.component.ts | 3 +- .../dossiers-listing-actions.component.html | 2 +- .../annotation-actions.component.html | 17 -- .../annotation-actions.component.ts | 16 -- .../highlights-separator.component.html | 4 +- .../user-management.component.html | 2 +- .../view-switch/view-switch.component.html | 8 +- .../file-preview-screen.component.html | 4 +- .../file-preview-screen.component.ts | 26 ++ .../expandable-file-actions.component.html | 10 +- .../expandable-file-actions.component.ts | 4 +- .../simple-doughnut-chart.component.ts | 2 +- apps/red-ui/src/assets/help-mode/links.json | 240 ++++-------------- libs/common-ui | 2 +- 17 files changed, 104 insertions(+), 256 deletions(-) diff --git a/apps/red-ui/src/app/modules/dossier-overview/components/dossier-details/dossier-details.component.html b/apps/red-ui/src/app/modules/dossier-overview/components/dossier-details/dossier-details.component.html index d9c5384a8..e7f72dec8 100644 --- a/apps/red-ui/src/app/modules/dossier-overview/components/dossier-details/dossier-details.component.html +++ b/apps/red-ui/src/app/modules/dossier-overview/components/dossier-details/dossier-details.component.html @@ -23,7 +23,7 @@ [tooltip]="'dossier-details.edit-owner' | translate" class="ml-14" icon="iqser:edit" - iqserHelpMode="edit_dossier_owner" + iqserHelpMode="dashboard_in_dossier" tooltipPosition="below" > @@ -43,7 +43,7 @@ [strokeWidth]="15" [subtitle]="'dossier-overview.dossier-details.charts.documents-in-dossier' | translate" direction="row" - helpModeKey="filter_for_status" + helpModeKey="dashboard_in_dossier" >
    @@ -51,11 +51,7 @@
    -
    +
    new NestedFilter(filter)); } diff --git a/apps/red-ui/src/app/modules/dossier/dialogs/edit-dossier-dialog/general-info/edit-dossier-general-info.component.html b/apps/red-ui/src/app/modules/dossier/dialogs/edit-dossier-dialog/general-info/edit-dossier-general-info.component.html index f2305bd2a..8fd005da3 100644 --- a/apps/red-ui/src/app/modules/dossier/dialogs/edit-dossier-dialog/general-info/edit-dossier-general-info.component.html +++ b/apps/red-ui/src/app/modules/dossier/dialogs/edit-dossier-dialog/general-info/edit-dossier-general-info.component.html @@ -83,6 +83,8 @@ [type]="iconButtonTypes.dark" icon="iqser:trash" id="deleteDossier" + iqserHelpMode="edit_dossier_delete_dossier" + [dialogElement]="true" >
    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 51b7578b3..406183cad 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 @@ -41,8 +41,7 @@ export class FileActionsComponent implements OnChanges { @Input() dossier: Dossier; @Input() type: 'file-preview' | 'dossier-overview-list' | 'dossier-overview-workflow'; @Input() maxWidth: number; - @Input() fileActionsHelpModeKey: 'document_features' | 'editor_document_features' = 'document_features'; - + @Input() fileActionsHelpModeKey: 'document_features_in_dossier' | 'document_features_in_editor' = 'document_features_in_dossier'; toggleTooltip?: string; assignTooltip?: string; buttonType?: CircleButtonType; diff --git a/apps/red-ui/src/app/modules/dossiers-listing/components/dossiers-listing-actions/dossiers-listing-actions.component.html b/apps/red-ui/src/app/modules/dossiers-listing/components/dossiers-listing-actions/dossiers-listing-actions.component.html index 8e84ed10d..8ea5f9bc5 100644 --- a/apps/red-ui/src/app/modules/dossiers-listing/components/dossiers-listing-actions/dossiers-listing-actions.component.html +++ b/apps/red-ui/src/app/modules/dossiers-listing/components/dossiers-listing-actions/dossiers-listing-actions.component.html @@ -6,7 +6,7 @@ [scrollableParentView]="scrollableParentView" [tooltip]="(currentUser.isManager ? 'dossier-listing.edit.action' : 'dossier-listing.dossier-info.action') | translate" [type]="circleButtonTypes.dark" - iqserHelpMode="edit_dossier" + iqserHelpMode="edit_dossier_dossier_info" >
    -
    +
    @@ -21,7 +20,6 @@ [tooltip]="'file-preview.highlights.remove' | translate" [type]="circleButtonTypes.dark" icon="iqser:trash" - iqserHelpMode="remove_highlights" tooltipPosition="above" >
    diff --git a/apps/red-ui/src/app/modules/file-preview/components/user-management/user-management.component.html b/apps/red-ui/src/app/modules/file-preview/components/user-management/user-management.component.html index e42a8a9c1..1d761a465 100644 --- a/apps/red-ui/src/app/modules/file-preview/components/user-management/user-management.component.html +++ b/apps/red-ui/src/app/modules/file-preview/components/user-management/user-management.component.html @@ -35,7 +35,7 @@ [tooltip]="assignTooltip$ | async" icon="iqser:edit" tooltipPosition="below" - iqserHelpMode="assign_reviewer" + iqserHelpMode="document_features_in_editor" > {{ 'file-preview.standard' | translate }} @@ -15,7 +15,7 @@ [disabled]="(canSwitchToDeltaView$ | async) === false" [matTooltip]="'file-preview.delta-tooltip' | translate" class="red-tab" - iqserHelpMode="delta_view" + iqserHelpMode="view" > {{ 'file-preview.delta' | translate }} @@ -26,7 +26,7 @@ [disabled]="(canSwitchToRedactedView$ | async) === false" [matTooltip]="'file-preview.redacted-tooltip' | translate" class="red-tab" - iqserHelpMode="preview_view" + iqserHelpMode="view" > {{ 'file-preview.redacted' | translate }} @@ -37,7 +37,7 @@ [disabled]="(canSwitchToHighlightsView$ | async) === false" [matTooltip]="'file-preview.text-highlights-tooltip' | translate" class="red-tab" - iqserHelpMode="highlights_view" + iqserHelpMode="view" > {{ 'file-preview.text-highlights' | translate }} diff --git a/apps/red-ui/src/app/modules/file-preview/file-preview-screen.component.html b/apps/red-ui/src/app/modules/file-preview/file-preview-screen.component.html index 355e6d228..4f2586b60 100644 --- a/apps/red-ui/src/app/modules/file-preview/file-preview-screen.component.html +++ b/apps/red-ui/src/app/modules/file-preview/file-preview-screen.component.html @@ -23,7 +23,7 @@ @@ -103,6 +103,8 @@ diff --git a/apps/red-ui/src/app/modules/file-preview/file-preview-screen.component.ts b/apps/red-ui/src/app/modules/file-preview/file-preview-screen.component.ts index 5a9595bff..d8f9bbe6f 100644 --- a/apps/red-ui/src/app/modules/file-preview/file-preview-screen.component.ts +++ b/apps/red-ui/src/app/modules/file-preview/file-preview-screen.component.ts @@ -14,6 +14,8 @@ import { OnAttach, OnDetach, processFilters, + ScrollableParentView, + ScrollableParentViews, shareDistinctLast, } from '@iqser/common-ui'; import { MatDialogRef, MatDialogState } from '@angular/material/dialog'; @@ -52,6 +54,17 @@ import { NGXLogger } from 'ngx-logger'; import { StampService } from './services/stamp.service'; import Annotation = Core.Annotations.Annotation; +const HelpModeKeys = { + redaction: 'redaction_text', + 'manual-redaction': 'redaction_text', + recommendation: 'recommendation', + skipped: 'skipped', + hint: 'hint_text', + 'hint-ocr': 'hint_picture', + 'hint-formula': 'picture', + 'hint-image': 'image', +}; + @Component({ templateUrl: './file-preview-screen.component.html', styleUrls: ['./file-preview-screen.component.scss'], @@ -486,6 +499,19 @@ export class FilePreviewScreenComponent extends AutoUnsubscribe implements OnIni this.handleAnnotationSelected([]); } + get scrollableParentView(): ScrollableParentView { + return ScrollableParentViews.ANNOTATIONS_LIST; + } + + getActionsHelpModeKey(annotation: AnnotationWrapper): string { + const type = annotation?.typeLabel?.split('.')[1]; + const typeValue = annotation?.typeValue; + if (type === 'hint' && (typeValue === 'ocr' || typeValue === 'formula' || typeValue === 'image')) { + return HelpModeKeys[`${type}-${typeValue}`]; + } + return HelpModeKeys[type]; + } + private _setExcludedPageStyles() { const file = this._filesMapService.get(this.dossierId, this.fileId); setTimeout(() => { diff --git a/apps/red-ui/src/app/modules/shared/components/expandable-file-actions/expandable-file-actions.component.html b/apps/red-ui/src/app/modules/shared/components/expandable-file-actions/expandable-file-actions.component.html index 3ad717745..f9b9c24fb 100644 --- a/apps/red-ui/src/app/modules/shared/components/expandable-file-actions/expandable-file-actions.component.html +++ b/apps/red-ui/src/app/modules/shared/components/expandable-file-actions/expandable-file-actions.component.html @@ -5,13 +5,13 @@ [attr.aria-expanded]="btn.ariaExpanded && btn.ariaExpanded | async" [disabled]="btn.disabled" [icon]="btn.icon" - [iqserHelpMode]="helpModeKey" - [scrollableParentView]="scrollableParentView" [showDot]="btn.showDot" [tooltipClass]="btn.tooltipClass" [tooltipPosition]="tooltipPosition" [tooltip]="btn.tooltip | translate" [type]="btn.buttonType || buttonType" + [iqserHelpMode]="helpModeKey" + [scrollableParentView]="scrollableParentView" > @@ -19,11 +19,11 @@ *ngIf="btn.type === 'downloadBtn'" [dossier]="btn.dossier" [files]="btn.files" - [iqserHelpMode]="helpModeKey" - [scrollableParentView]="scrollableParentView" [tooltipClass]="btn.tooltipClass" [tooltipPosition]="tooltipPosition" [type]="buttonType" + [iqserHelpMode]="helpModeKey" + [scrollableParentView]="scrollableParentView" > @@ -33,10 +33,10 @@ (click)="$event.stopPropagation()" [checked]="btn.checked" [disabled]="btn.disabled" - [iqserHelpMode]="helpModeKey" [matTooltipPosition]="tooltipPosition" [matTooltip]="btn.tooltip | translate" [ngClass]="btn.class" + [iqserHelpMode]="helpModeKey" [scrollableParentView]="scrollableParentView" color="primary" > diff --git a/apps/red-ui/src/app/modules/shared/components/expandable-file-actions/expandable-file-actions.component.ts b/apps/red-ui/src/app/modules/shared/components/expandable-file-actions/expandable-file-actions.component.ts index 9e59249c4..07ae9c81c 100644 --- a/apps/red-ui/src/app/modules/shared/components/expandable-file-actions/expandable-file-actions.component.ts +++ b/apps/red-ui/src/app/modules/shared/components/expandable-file-actions/expandable-file-actions.component.ts @@ -17,7 +17,7 @@ export class ExpandableFileActionsComponent implements OnChanges { @Input() actions: Action[]; @Input() buttonType: CircleButtonType; @Input() tooltipPosition: IqserTooltipPosition; - @Input() helpModeKey: 'document_features' | 'editor_document_features'; + @Input() helpModeKey: 'document_features_in_dossier' | 'document_features_in_editor'; displayedButtons: Action[]; hiddenButtons: Action[]; @@ -30,7 +30,7 @@ export class ExpandableFileActionsComponent implements OnChanges { ) {} get scrollableParentView(): ScrollableParentView { - return this.helpModeKey === 'document_features' ? ScrollableParentViews.VIRTUAL_SCROLL : undefined; + return this.helpModeKey === 'document_features_in_dossier' ? ScrollableParentViews.VIRTUAL_SCROLL : undefined; } ngOnChanges(changes: SimpleChanges) { 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 d91417945..b7bf8c3a2 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 @@ -26,7 +26,7 @@ export class SimpleDoughnutChartComponent implements OnChanges, OnInit { @Input() totalType: 'sum' | 'count' | 'simpleLabel' = 'sum'; @Input() counterText: string; @Input() filterKey = 'statusFilters'; - @Input() helpModeKey: 'filter_for_status'; + @Input() helpModeKey: 'dashboard_in_dossier'; filtersEnabled: boolean; chartData: any[] = []; diff --git a/apps/red-ui/src/assets/help-mode/links.json b/apps/red-ui/src/assets/help-mode/links.json index 6cd868047..b77c4b8c3 100644 --- a/apps/red-ui/src/assets/help-mode/links.json +++ b/apps/red-ui/src/assets/help-mode/links.json @@ -1,30 +1,12 @@ { - "assign_reviewer": { - "en": "/en/index-en.html?contextId=assign_reviewer", - "de": "", - "it": "", - "fr": "" - }, "bulk_select_annotations": { "en": "/en/index-en.html?contextId=bulk_select_annotations", "de": "", "it": "", "fr": "" }, - "delta_view": { - "en": "/en/index-en.html?contextId=delta_view", - "de": "", - "it": "", - "fr": "" - }, - "document_features": { - "en": "/en/index-en.html?contextId=document_features", - "de": "", - "it": "", - "fr": "" - }, - "edit_dossier": { - "en": "/en/index-en.html?contextId=edit_dossier", + "document_features_in_dossier": { + "en": "/en/index-en.html?contextId=document_features_in_dossier", "de": "", "it": "", "fr": "" @@ -41,14 +23,8 @@ "it": "", "fr": "" }, - "edit_dossier_owner": { - "en": "/en/index-en.html?contextId=edit_dossier_owner", - "de": "", - "it": "", - "fr": "" - }, - "redaction_edit_reason": { - "en": "/en/index-en.html?contextId=redaction_edit_reason", + "dashboard_in_dossier": { + "en": "/en/index-en.html?contextId=dashboard_in_dossier", "de": "", "it": "", "fr": "" @@ -65,12 +41,6 @@ "it": "", "fr": "" }, - "filter_for_editing_notes": { - "en": "/en/index-en.html?contextId=filter_for_editing_notes", - "de": "", - "it": "", - "fr": "" - }, "filter_for_status": { "en": "/en/index-en.html?contextId=filter_for_status", "de": "", @@ -101,104 +71,8 @@ "it": "", "fr": "" }, - "preview_view": { - "en": "/en/index-en.html?contextId=delta_view", - "de": "", - "it": "", - "fr": "" - }, - "highlights_view": { - "en": "/en/index-en.html?contextId=highlights_view", - "de": "", - "it": "", - "fr": "" - }, - "convert_highlights": { - "en": "/en/index-en.html?contextId=convert_highlights", - "de": "", - "it": "", - "fr": "" - }, - "remove_highlights": { - "en": "/en/index-en.html?contextId=remove_highlights", - "de": "", - "it": "", - "fr": "" - }, - "recommendation_accept_or_reject": { - "en": "/en/index-en.html?contextId=recommendation_accept_or_reject", - "de": "", - "it": "", - "fr": "" - }, - "redaction_false_positive": { - "en": "/en/index-en.html?contextId=redaction_false_positive", - "de": "", - "it": "", - "fr": "" - }, - "recommendation_false_positive": { - "en": "/en/index-en.html?contextId=recommendation_false_positive", - "de": "", - "it": "", - "fr": "" - }, - "skipped_remove_from_dictionary": { - "en": "/en/index-en.html?contextId=skipped_remove_from_dictionary", - "de": "", - "it": "", - "fr": "" - }, - "hint_remove_from_dictionary": { - "en": "/en/index-en.html?contextId=hint_remove_from_dictionary", - "de": "", - "it": "", - "fr": "" - }, - "recommendation_remove_from_dictionary": { - "en": "/en/index-en.html?contextId=recommendation_remove_from_dictionary", - "de": "", - "it": "", - "fr": "" - }, - "redaction_remove_only_here": { - "en": "/en/index-en.html?contextId=redaction_remove_only_here", - "de": "", - "it": "", - "fr": "" - }, - "hint_remove_only_here": { - "en": "/en/index-en.html?contextId=hint_remove_only_here", - "de": "", - "it": "", - "fr": "" - }, - "hint_recategorize": { - "en": "/en/index-en.html?contextId=hint_recategorize", - "de": "", - "it": "", - "fr": "" - }, - "hint_hide": { - "en": "/en/index-en.html?contextId=hint_hide", - "de": "", - "it": "", - "fr": "" - }, - "hint_force_hint": { - "en": "/en/index-en.html?contextId=hint_force_hint", - "de": "", - "it": "", - "fr": "" - }, - "redaction_recategorize": { - "en": "/en/index-en.html?contextId=redaction_recategorize", - "de": "", - "it": "", - "fr": "" - }, - "redaction_hide": { - "en": "/en/index-en.html?contextId=redaction_hide", + "view": { + "en": "/en/index-en.html?contextId=view", "de": "", "it": "", "fr": "" @@ -215,12 +89,6 @@ "it": "", "fr": "" }, - "standard_view": { - "en": "/en/index-en.html?contextId=standard_view", - "de": "", - "it": "", - "fr": "" - }, "workload_filter": { "en": "/en/index-en.html?contextId=workload_filter", "de": "", @@ -233,18 +101,6 @@ "it": "", "fr": "" }, - "delete_document_filter": { - "en": "/en/index-en.html?contextId=delete_document_filter", - "de": "", - "it": "", - "fr": "" - }, - "delete_dossier_filter": { - "en": "", - "de": "", - "it": "", - "fr": "" - }, "edit_dossier_in_dossier": { "en": "/en/index-en.html?contextId=edit_dossier_in_dossier", "de": "", @@ -257,32 +113,8 @@ "it": "", "fr": "" }, - "recommendation_resize": { - "en": "/en/index-en.html?contextId=recommendation_resize", - "de": "", - "it": "", - "fr": "" - }, - "hint_resize": { - "en": "/en/index-en.html?contextId=hint_resize", - "de": "", - "it": "", - "fr": "" - }, - "skipped_force_redaction": { - "en": "/en/index-en.html?contextId=skipped_force_redaction", - "de": "", - "it": "", - "fr": "" - }, - "editor_document_features": { - "en": "/en/index-en.html?contextId=editor_document_features", - "de": "", - "it": "", - "fr": "" - }, - "documents_quickfilter": { - "en": "/en/index-en.html?contextId=documents_quickfilter", + "document_features_in_editor": { + "en": "/en/index-en.html?contextId=document_features_in_editor", "de": "", "it": "", "fr": "" @@ -305,14 +137,8 @@ "it": "", "fr": "" }, - "dossiers_scroll_up_button": { - "en": "/en/index-en.html?contextId=dossiers_scroll_up_and_down", - "de": "", - "it": "", - "fr": "" - }, - "dossiers_scroll_down_button": { - "en": "/en/index-en.html?contextId=dossiers_scroll_up_and_down", + "scroll_dossier_list": { + "en": "/en/index-en.html?contextId=scroll_dossier_list", "de": "", "it": "", "fr": "" @@ -335,6 +161,18 @@ "it": "", "fr": "" }, + "edit_dossier_delete_dossier": { + "en": "/en/index-en.html?contextId=edit_dossier_delete_dossier", + "de": "", + "it": "", + "fr": "" + }, + "edit_dossier_archive_dossier": { + "en": "/en/index-en.html?contextId=edit_dossier_archive_dossier", + "de": "", + "it": "", + "fr": "" + }, "edit_dossier_download_package": { "en": "/en/index-en.html?contextId=edit_dossier_download_package", "de": "", @@ -389,26 +227,44 @@ "it": "", "fr": "" }, - "redaction_remove_from_dictionary": { - "en": "/en/index-en.html?contextId=redaction_remove_from_dictionary", + "redaction_text": { + "en": "/en/index-en.html?contextId=redaction_text", "de": "", "it": "", "fr": "" }, - "skipped_resize": { - "en": "/en/index-en.html?contextId=skipped_resize_redaction", + "recommendation": { + "en": "/en/index-en.html?contextId=recommendation", "de": "", "it": "", "fr": "" }, - "skipped_recategorize": { - "en": "/en/index-en.html?contextId=skipped_recategorize_redaction", + "skipped": { + "en": "/en/index-en.html?contextId=skipped", "de": "", "it": "", "fr": "" }, - "skipped_hide": { - "en": "/en/index-en.html?contextId=skipped_hide", + "hint_text": { + "en": "/en/index-en.html?contextId=hint_text", + "de": "", + "it": "", + "fr": "" + }, + "hint_picture": { + "en": "/en/index-en.html?contextId=hint_picture", + "de": "", + "it": "", + "fr": "" + }, + "picture": { + "en": "/en/index-en.html?contextId=picture", + "de": "", + "it": "", + "fr": "" + }, + "image": { + "en": "/en/index-en.html?contextId=image", "de": "", "it": "", "fr": "" diff --git a/libs/common-ui b/libs/common-ui index 83f2fbd88..46f19f216 160000 --- a/libs/common-ui +++ b/libs/common-ui @@ -1 +1 @@ -Subproject commit 83f2fbd88feb455d27397f470b9cadf72aa3471e +Subproject commit 46f19f216fb158d90439cfaa0dcd94f7d9f71f72 From d680af07b8ff4e806af566d7552f4205a0179ff0 Mon Sep 17 00:00:00 2001 From: Atlassian Bamboo Date: Mon, 9 May 2022 19:38:31 +0200 Subject: [PATCH 30/30] chore(release) --- package.json | 2 +- paligo-theme.tar.gz | Bin 3260 -> 3260 bytes 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 94c6c1f54..08771f626 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "redaction", - "version": "3.463.0", + "version": "3.464.0", "private": true, "license": "MIT", "scripts": { diff --git a/paligo-theme.tar.gz b/paligo-theme.tar.gz index ae82a4708569a60b6c0d971040a36b4724582917..ec2a79ac5e47d280c00114c7225b32521f7ffa35 100644 GIT binary patch delta 102 zcmV-s0Ga>18N3;gcTyYJzU#iQ9Xqg{7by5yuo<+bX1GG=V{G-m*yg(Y<&T;@W~Ba5 z+Hku3J$D(L<^M6-Uinuf#u1Za^Qf-hZx1fug+C>K&sqA5Uj7S*%YPC0vB~QT2r&{j IDF9Fa07E}Cv;Y7A delta 102 zcmV-s0Ga>18N3;gcT#IFonZOGcI?2hU!dS;!Di5!n&AqekFnMNVw>yomp^Lun34KJ zX~XIA_dMG_%l~7vz4EU}j3Xw;=22b0-yU4R3x7)fp0o59z5G3&%YP9BvB~QT2;MJ@ IW<C00W*ld;kCd