diff --git a/apps/red-ui/src/app/modules/admin/dialogs/add-edit-dossier-template-dialog/add-edit-dossier-template-dialog.component.html b/apps/red-ui/src/app/modules/admin/dialogs/add-edit-dossier-template-dialog/add-edit-dossier-template-dialog.component.html
index 17ac0a2f8..3c97b65c9 100644
--- a/apps/red-ui/src/app/modules/admin/dialogs/add-edit-dossier-template-dialog/add-edit-dossier-template-dialog.component.html
+++ b/apps/red-ui/src/app/modules/admin/dialogs/add-edit-dossier-template-dialog/add-edit-dossier-template-dialog.component.html
@@ -72,23 +72,6 @@
{{ 'download-includes' | translate }}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
this.hasValidTo)
],
- downloadFileTypes: [this.dossierTemplate?.downloadFileTypes || ['PREVIEW', 'REDACTED']],
- reportTemplateIds: [this.dossierTemplate?.reportTemplateIds || [], Validators.required]
+ downloadFileTypes: [this.dossierTemplate?.downloadFileTypes || ['PREVIEW', 'REDACTED']]
});
this.hasValidFrom = !!this.dossierTemplate?.validFrom;
this.hasValidTo = !!this.dossierTemplate?.validTo;
@@ -72,27 +71,26 @@ export class AddEditDossierTemplateDialogComponent implements OnInit {
}
for (const key of Object.keys(this.dossierTemplateForm.getRawValue())) {
+ const formValue = this.dossierTemplateForm.get(key).value;
+ const objectValue = this.dossierTemplate[key];
if (key === 'validFrom') {
- if (this.hasValidFrom !== !!this.dossierTemplate.validFrom) {
- return true;
- }
- if (
- this.hasValidFrom &&
- !moment(this.dossierTemplate.validFrom).isSame(moment(this.dossierTemplateForm.get('validFrom').value))
- ) {
+ if (this.hasValidFrom !== !!objectValue || (this.hasValidFrom && !moment(objectValue).isSame(moment(formValue)))) {
return true;
}
} else if (key === 'validTo') {
- if (this.hasValidTo !== !!this.dossierTemplate.validTo) {
+ if (this.hasValidTo !== !!objectValue || (this.hasValidTo && !moment(objectValue).isSame(moment(formValue)))) {
return true;
}
- if (
- this.hasValidTo &&
- !moment(this.dossierTemplate.validTo).isSame(moment(this.dossierTemplateForm.get('validTo').value))
- ) {
+ } else if (formValue instanceof Array) {
+ if (objectValue.length !== formValue.length) {
return true;
}
- } else if (this.dossierTemplate[key] !== this.dossierTemplateForm.get(key).value) {
+ for (const item of objectValue) {
+ if (!formValue.includes(item)) {
+ return true;
+ }
+ }
+ } else if (objectValue !== formValue) {
return true;
}
}
diff --git a/libs/common-ui b/libs/common-ui
index a659dcecd..b1e1bc3f1 160000
--- a/libs/common-ui
+++ b/libs/common-ui
@@ -1 +1 @@
-Subproject commit a659dcecd7115eda1320d9d7188788e1e00ccb18
+Subproject commit b1e1bc3f1a95ae53c30485a3f2ac044d71255c00
diff --git a/package.json b/package.json
index 3d7687956..9935e6ec9 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "redaction",
- "version": "2.211.0",
+ "version": "2.214.0",
"private": true,
"license": "MIT",
"scripts": {
diff --git a/paligo-theme.tar.gz b/paligo-theme.tar.gz
index 5b7fdffe2..72624e3fe 100644
Binary files a/paligo-theme.tar.gz and b/paligo-theme.tar.gz differ