description-template table view: added numbering on title

This commit is contained in:
Sofia Papacharalampous 2024-05-27 13:05:57 +03:00
parent c2a86a4aa2
commit 71b25867a7
5 changed files with 8 additions and 3 deletions

View File

@ -120,7 +120,7 @@
</div>
<div [id]="'preview_container'+ form.get('id').value" class="row">
<div *ngIf="previewFieldSet && showPreview && firstField?.get('data')?.get('fieldType')?.value" class="col-12" [@fade-in-fast]>
<app-description-form-field-set class="w-100" [canReview]="false" [propertiesFormGroup]="previewPropertiesFormGroup" [fieldSet]="previewFieldSet" [visibilityRulesService]="visibilityRulesService" [hideAnnotations]="true"></app-description-form-field-set>
<app-description-form-field-set class="w-100" [canReview]="false" [propertiesFormGroup]="previewPropertiesFormGroup" [fieldSet]="previewFieldSet" [visibilityRulesService]="visibilityRulesService" [numbering]="numbering" [hideAnnotations]="true"></app-description-form-field-set>
</div>
</div>
</div>

View File

@ -1,7 +1,7 @@
<div mat-dialog-title>
<div class="row">
<div class="col-auto">
<h5 class="field-set-title">{{fieldSet.title}}</h5>
<h5 class="field-set-title">{{numberingText}} {{fieldSet.title}}</h5>
</div>
<div class="col-auto ml-auto close-btn" (click)="close()">
<mat-icon>close</mat-icon>

View File

@ -10,6 +10,7 @@ import { DescriptionTemplateFieldSet } from "@app/core/model/description-templat
})
export class FormFieldSetEditorDialogComponent {
numberingText: string;
fieldSet: DescriptionTemplateFieldSet;
propertiesFormGroup: UntypedFormGroup;
@ -19,6 +20,7 @@ export class FormFieldSetEditorDialogComponent {
) {
this.fieldSet = data.fieldSet;
this.propertiesFormGroup = data.propertiesFormGroup;
this.numberingText = data.numberingText;
}
cancel() {

View File

@ -29,6 +29,7 @@ export class DescriptionFormFieldSetComponent extends BaseComponent {
@Input() descriptionId: Guid;
@Input() hideAnnotations: boolean = false;
@Input() canReview: boolean = false;
@Input() numbering: string;
get isMultiplicityEnabled() {
return this.fieldSet.hasMultiplicity && this.fieldSet.multiplicity != null;
@ -127,7 +128,8 @@ export class DescriptionFormFieldSetComponent extends BaseComponent {
minWidth: '49%',
data: {
fieldSet: this.fieldSet,
propertiesFormGroup: cloneAbstractControl((this.propertiesFormGroup?.get('items') as UntypedFormArray).at(fieldSetIndex))
propertiesFormGroup: cloneAbstractControl((this.propertiesFormGroup?.get('items') as UntypedFormArray).at(fieldSetIndex)),
numberingText: this.numbering
}
});
dialogRef.afterClosed().pipe(takeUntil(this._destroyed)).subscribe(data => {

View File

@ -19,6 +19,7 @@
[fieldSet]="fieldSet"
[descriptionId]="descriptionId"
[path]="path + '.' + (i+1)"
[numbering]="path + '.' + (i+1)"
[visibilityRulesService]="visibilityRulesService"
[validationErrorModel]="validationErrorModel"
[isChild]="false"