diff --git a/apps/red-ui/src/app/modules/dossier-overview/components/file-attribute/file-attribute.component.html b/apps/red-ui/src/app/modules/dossier-overview/components/file-attribute/file-attribute.component.html index fd8750520..4f59aaa5f 100644 --- a/apps/red-ui/src/app/modules/dossier-overview/components/file-attribute/file-attribute.component.html +++ b/apps/red-ui/src/app/modules/dossier-overview/components/file-attribute/file-attribute.component.html @@ -1,19 +1,22 @@
- {{ fileAttribute.label }}: - - {{ fileAttributeValue || '-' }} + +
+ {{ fileAttribute.label }}: + + {{ fileAttributeValue || '-' }} +
{{ fileAttributeValue ? (fileAttributeValue | date: 'd MMM yyyy') : '-' }}
@@ -187,6 +188,7 @@ export class FileAttributeComponent extends BaseFormComponent implements OnDestr #initFileAttributes() { const configs = this.fileAttributesService.getFileAttributeConfig(this.file.dossierTemplateId).fileAttributeConfigs; + this.readonlyAttrs = configs.filter(config => config.editable === false).map(config => config.id); configs.forEach(config => { if (!this.file.fileAttributes.attributeIdToValue[config.id]) { this.file.fileAttributes.attributeIdToValue[config.id] = null; @@ -199,7 +201,12 @@ export class FileAttributeComponent extends BaseFormComponent implements OnDestr const fileAttributes = this.file.fileAttributes.attributeIdToValue; Object.keys(fileAttributes).forEach(key => { const attrValue = fileAttributes[key]; - config[key] = [dayjs(attrValue, 'YYYY-MM-DD', true).isValid() ? dayjs(attrValue).toDate() : attrValue]; + config[key] = [ + { + value: dayjs(attrValue, 'YYYY-MM-DD', true).isValid() ? dayjs(attrValue).toDate() : attrValue, + disabled: this.readonlyAttrs.includes(key), + }, + ]; }); return this._formBuilder.group(config, { validators: [this.#checkEmptyInput(), this.#checkDate()], diff --git a/apps/red-ui/src/app/modules/file-preview/dialogs/structured-component-management-dialog/structured-component-management-dialog.component.scss b/apps/red-ui/src/app/modules/file-preview/dialogs/structured-component-management-dialog/structured-component-management-dialog.component.scss index 7c1268089..c75e9dc4a 100644 --- a/apps/red-ui/src/app/modules/file-preview/dialogs/structured-component-management-dialog/structured-component-management-dialog.component.scss +++ b/apps/red-ui/src/app/modules/file-preview/dialogs/structured-component-management-dialog/structured-component-management-dialog.component.scss @@ -32,14 +32,6 @@ font-weight: 600; } - .value-content { - .value { - } - - .actions { - } - } - .table-header { margin: 10px 0; border-bottom: 1px solid var(--iqser-separator); diff --git a/apps/red-ui/src/app/modules/shared-dossiers/dialogs/edit-dossier-dialog/attributes/edit-dossier-attributes.component.html b/apps/red-ui/src/app/modules/shared-dossiers/dialogs/edit-dossier-dialog/attributes/edit-dossier-attributes.component.html index 813c9961c..93f577af5 100644 --- a/apps/red-ui/src/app/modules/shared-dossiers/dialogs/edit-dossier-dialog/attributes/edit-dossier-attributes.component.html +++ b/apps/red-ui/src/app/modules/shared-dossiers/dialogs/edit-dossier-dialog/attributes/edit-dossier-attributes.component.html @@ -12,7 +12,6 @@