From 3e5dc85e0491f6ae2e99e8fd00c1813f17b9f377 Mon Sep 17 00:00:00 2001 From: "k.triantafyllou" Date: Tue, 10 Jan 2023 13:08:56 +0200 Subject: [PATCH] Fix visibility dependencies for table view. Add missing question titles if a field is table. --- .../src/app/core/pipes/field-value.pipe.ts | 2 - ...file-editor-composite-field.component.html | 2 +- .../dataset-wizard.component.ts | 1 - ...form-composite-field-dialog.component.html | 2 +- .../form-composite-field-dialog.component.ts | 5 +- .../form-composite-field.component.html | 6 +- .../form-composite-field.component.ts | 15 +++-- .../form-section-inner.component.html | 44 ++++++++------ .../form-section-inner.component.ts | 3 + .../form-section/form-section.component.html | 59 +++++++++++-------- .../form-section/form-section.component.ts | 4 ++ .../visibility-rules.service.ts | 1 - 12 files changed, 85 insertions(+), 59 deletions(-) diff --git a/dmp-frontend/src/app/core/pipes/field-value.pipe.ts b/dmp-frontend/src/app/core/pipes/field-value.pipe.ts index e90453e0c..360b8e87e 100644 --- a/dmp-frontend/src/app/core/pipes/field-value.pipe.ts +++ b/dmp-frontend/src/app/core/pipes/field-value.pipe.ts @@ -14,8 +14,6 @@ export class FieldValuePipe implements PipeTransform { let value = controlValue.value; let renderStyle = controlValue.viewStyle?.renderStyle; if (renderStyle && value) { - console.log(renderStyle); - console.log(value); switch (renderStyle) { case DatasetProfileFieldViewStyle.Currency: if (value) { diff --git a/dmp-frontend/src/app/ui/admin/dataset-profile/editor/components/composite-field/dataset-profile-editor-composite-field.component.html b/dmp-frontend/src/app/ui/admin/dataset-profile/editor/components/composite-field/dataset-profile-editor-composite-field.component.html index 4d514f606..72d631d4f 100644 --- a/dmp-frontend/src/app/ui/admin/dataset-profile/editor/components/composite-field/dataset-profile-editor-composite-field.component.html +++ b/dmp-frontend/src/app/ui/admin/dataset-profile/editor/components/composite-field/dataset-profile-editor-composite-field.component.html @@ -204,7 +204,7 @@
- +
diff --git a/dmp-frontend/src/app/ui/dataset/dataset-wizard/dataset-wizard.component.ts b/dmp-frontend/src/app/ui/dataset/dataset-wizard/dataset-wizard.component.ts index 15f4e3452..df98a21bd 100644 --- a/dmp-frontend/src/app/ui/dataset/dataset-wizard/dataset-wizard.component.ts +++ b/dmp-frontend/src/app/ui/dataset/dataset-wizard/dataset-wizard.component.ts @@ -532,7 +532,6 @@ export class DatasetWizardComponent extends CheckDeactivateBaseComponent impleme if (profiledId && profiledId.length > 0) { this.formGroup.removeControl('datasetProfileDefinition'); this.getDefinition(profiledId); - console.log(this.table0fContents.tocentries.length + 1); } } diff --git a/dmp-frontend/src/app/ui/misc/dataset-description-form/components/form-composite-field-dialog/form-composite-field-dialog.component.html b/dmp-frontend/src/app/ui/misc/dataset-description-form/components/form-composite-field-dialog/form-composite-field-dialog.component.html index db7baaf85..567ff7d61 100644 --- a/dmp-frontend/src/app/ui/misc/dataset-description-form/components/form-composite-field-dialog/form-composite-field-dialog.component.html +++ b/dmp-frontend/src/app/ui/misc/dataset-description-form/components/form-composite-field-dialog/form-composite-field-dialog.component.html @@ -5,7 +5,7 @@
-
diff --git a/dmp-frontend/src/app/ui/misc/dataset-description-form/components/form-composite-field-dialog/form-composite-field-dialog.component.ts b/dmp-frontend/src/app/ui/misc/dataset-description-form/components/form-composite-field-dialog/form-composite-field-dialog.component.ts index db4e95837..d1a3625cb 100644 --- a/dmp-frontend/src/app/ui/misc/dataset-description-form/components/form-composite-field-dialog/form-composite-field-dialog.component.ts +++ b/dmp-frontend/src/app/ui/misc/dataset-description-form/components/form-composite-field-dialog/form-composite-field-dialog.component.ts @@ -8,12 +8,13 @@ import {VisibilityRulesService} from "@app/ui/misc/dataset-description-form/visi }) export class FormCompositeFieldDialogComponent { + public visibilityRulesService: VisibilityRulesService; + constructor( - private visibilityRulesService: VisibilityRulesService, private dialogRef: MatDialogRef, @Inject(MAT_DIALOG_DATA) public data: any ) { - this.visibilityRulesService.buildVisibilityRules([], this.data.formGroup); + this.visibilityRulesService = data.visibilityRulesService; } cancel() { diff --git a/dmp-frontend/src/app/ui/misc/dataset-description-form/components/form-composite-field/form-composite-field.component.html b/dmp-frontend/src/app/ui/misc/dataset-description-form/components/form-composite-field/form-composite-field.component.html index f33132ffe..24f35ac7a 100644 --- a/dmp-frontend/src/app/ui/misc/dataset-description-form/components/form-composite-field/form-composite-field.component.html +++ b/dmp-frontend/src/app/ui/misc/dataset-description-form/components/form-composite-field/form-composite-field.component.html @@ -37,7 +37,7 @@
-->
-
{{this.fieldFormGroup.get('data').value.label}}
+
{{this.fieldFormGroup.get('data').value.label}}