2024-02-02 17:43:24 +01:00
< div * ngIf = "fieldSet" class = "dynamic-form-composite-field row" >
< div * ngIf = "showTitle" class = "col-12" >
2024-03-13 09:45:22 +01:00
< div class = "row" >
< div class = "col" >
< app-description-form-field-set-title class = "row" [ fieldSet ] = " fieldSet " [ path ] = " path " [ isChild ] = " isChild " > < / app-description-form-field-set-title >
< / div >
< div class = "col-auto" >
< button mat-icon-button class = "col-auto annotation-icon" ( click ) = " showAnnotations ( fieldSet . id ) " >
< mat-icon matTooltip = "{{'DATASET-EDITOR.QUESTION.EXTENDED-DESCRIPTION.ANNOTATIONS' | translate}}" > comment< / mat-icon >
< / button >
< / div >
< / div >
2023-12-20 08:20:38 +01:00
< / div >
2024-02-02 17:43:24 +01:00
< div * ngIf = "!fieldSet?.multiplicity?.tableView" class = "col-12" >
< div class = "row" * ngFor = "let fieldSetItemPropertiesControl of propertiesFormGroup?.get('items')?.controls" >
< div class = "col" >
< div class = "row" >
2024-02-01 14:41:05 +01:00
< div * ngFor = "let field of fieldSet.fields; let i = index;" class = "col-12 compositeField" >
2024-02-02 17:43:24 +01:00
< ng-container >
< div class = "row" >
< h5 * ngIf = "placeholderTitle" class = "col-auto font-weight-bold" > {{field.label}}< / h5 >
< / div >
< app-description-form-field class = "col-12 compositeField" [ propertiesFormGroup ] = " fieldSetItemPropertiesControl . get ( ' fields ' ) " [ field ] = " field " [ fieldSet ] = " fieldSet " [ visibilityRulesService ] = " visibilityRulesService " [ datasetProfileId ] = " datasetProfileId " [ isChild ] = " true " > < / app-description-form-field >
< / ng-container >
< / div >
2023-12-20 08:20:38 +01:00
< / div >
< / div >
2024-02-02 17:43:24 +01:00
< div * ngIf = "propertiesFormGroup.get('items').length > 1" class = "col-auto align-self-center" >
< button mat-icon-button type = "button" class = "deleteBtn" ( click ) = " deleteMultiplicityField ( i ) ; " [ disabled ] = " fieldSetItemPropertiesControl . disabled " >
2023-12-20 08:20:38 +01:00
< mat-icon > delete< / mat-icon >
< / button >
< / div >
< / div >
2024-03-20 11:35:55 +01:00
< div * ngIf = "(fieldSet?.multiplicity?.max - 1) > (propertiesFormGroup.get('items').length)" class = "col-12 mt-1 ml-0 mr-0 addOneFieldButton" >
2024-02-02 17:43:24 +01:00
< span class = "d-inline-flex align-items-center" [ ngClass ] = " propertiesFormGroup . disabled ? ' ' : ' pointer ' " ( click ) = " addMultiplicityField ( ) " >
< button mat-icon-button color = "primary" [ disabled ] = " propertiesFormGroup . disabled " >
< mat-icon > add_circle< / mat-icon >
< / button >
2024-03-20 11:35:55 +01:00
< span class = "mt-1" * ngIf = "fieldSet?.multiplicity?.placeholder" > {{fieldSet.multiplicity.placeholder}}< / span >
2024-03-22 12:06:10 +01:00
< span class = "mt-1" * ngIf = "!fieldSet?.multiplicity?.placeholder" > {{('DESCRIPTION-EDITOR.ACTIONS.MULTIPLICITY-ADD-ONE-FIELD' + (fieldSet.multiplicity.tableView?'-TABLEVIEW':'')) | translate}}< / span >
2024-02-02 17:43:24 +01:00
< / span >
< / div >
2023-12-20 08:20:38 +01:00
< / div >
2024-02-02 17:43:24 +01:00
< div * ngIf = "fieldSet?.multiplicity?.tableView" class = "col-12" >
< table class = "table table-bordered" style = "table-layout: fixed" >
< tr >
< th * ngFor = "let field of fieldSet.fields; let i = index;" class = "text-wrap" > {{field.data?.label}}< / th >
< th class = "actions" > < / th >
< / tr >
< tr * ngFor = "let fieldSetItemPropertiesControl of propertiesFormGroup?.get('items')?.controls; let j = index" >
< td * ngFor = "let field of fieldSet.fields;" class = "text-wrap" > {{fieldSetItemPropertiesControl.get('fields').get(field.id).get('value').getRawValue()}}< / td >
< td class = "actions" >
< button mat-icon-button type = "button" class = "deleteBtn btn-sm" ( click ) = " editTableMultiplicityFieldInDialog ( j ) " [ disabled ] = " fieldSetItemPropertiesControl . disabled " >
< mat-icon > edit< / mat-icon >
< / button >
< button * ngIf = "propertiesFormGroup.get('items').length > 1" mat-icon-button type = "button" class = "deleteBtn" ( click ) = " deleteMultiplicityField ( j ) ; " [ disabled ] = " fieldSetItemPropertiesControl . disabled " >
< mat-icon > delete< / mat-icon >
< / button >
< / td >
< / tr >
< tr * ngIf = "(fieldSet.multiplicity.max - 1) > propertiesFormGroup?.get('items')?.controls.length" >
< td [ colSpan ] = " fieldSet . fields . length + 1 " class = "text-center" >
< span class = "d-inline-flex align-items-center" [ ngClass ] = " propertiesFormGroup . disabled ? ' ' : ' pointer ' " ( click ) = " addMultiplicityField ( ) " >
< button mat-icon-button color = "primary" [ disabled ] = " propertiesFormGroup . disabled " >
< mat-icon > add_circle< / mat-icon >
< / button >
< span class = "mt-1" * ngIf = "fieldSet.multiplicity.placeholder" > {{fieldSet.multiplicity.placeholder}}< / span >
2024-03-22 12:06:10 +01:00
< span class = "mt-1" * ngIf = "!fieldSet.multiplicity.placeholder" > {{('DESCRIPTION-EDITOR.ACTIONS.MULTIPLICITY-ADD-ONE-FIELD' + (fieldSet.multiplicity.tableView?'-TABLEVIEW':'')) | translate}}< / span >
2024-02-02 17:43:24 +01:00
< / span >
< / td >
< / tr >
< / table >
2024-01-19 13:28:31 +01:00
< / div >
2023-12-20 08:20:38 +01:00
< / div >
2024-02-02 17:43:24 +01:00
<!-- comment only on top level fieldset -->
< div class = "row" >
< div * ngIf = "fieldSet.hasCommentField && propertiesFormGroup?.get('items')?.at(0)?.get('comment')" class = "col-12" >
2024-03-22 12:06:10 +01:00
< rich-text-editor-component [ form ] = " propertiesFormGroup ? . get ( ' items ' ) ? . at ( 0 ) ? . get ( ' comment ' ) " [ id ] = " ' editor1 ' " [ placeholder ] = " ' DESCRIPTION-EDITOR . FIELDS . COMMENT-PLACEHOLDER ' | translate " [ wrapperClasses ] = " ' mb-2 ' " [ editable ] = " ! propertiesFormGroup ? . get ( ' items ' ) ? . at ( 0 ) ? . get ( ' comment ' ) . disabled " > < / rich-text-editor-component >
2024-02-02 17:43:24 +01:00
< / div >
< / div >