argos/dmp-frontend/src/app/ui/description/editor/description-form/components/form-section/form-section.component.html

40 lines
2.1 KiB
HTML
Raw Normal View History

2023-12-20 08:20:38 +01:00
<div class="dynamic-form-section row" [id]="section.id">
<mat-accordion class="col-12">
2023-12-28 16:18:49 +01:00
<mat-expansion-panel class="row expansion-panel toc-section-header" [id]="path" [(expanded)]="panelExpanded">
<mat-expansion-panel-header>
2023-12-20 08:20:38 +01:00
<mat-panel-title>
2023-12-28 16:18:49 +01:00
<h6 class='panel-title' *ngIf="section?.sections?.length > 0">{{path}}.section {{section.title}}</h6>
<h6 class='panel-title' *ngIf="section?.fieldSets?.length > 0">{{path}} {{section.title}}</h6>
2023-12-20 08:20:38 +01:00
</mat-panel-title>
2023-12-28 16:18:49 +01:00
</mat-expansion-panel-header>
2023-12-20 08:20:38 +01:00
<mat-panel-description class="col-12">
<h6 class='panel-desc' *ngIf="section.description" [innerHTML]="section.description"></h6>
2023-12-28 16:18:49 +01:00
</mat-panel-description>
2024-03-13 09:45:22 +01:00
<div *ngFor="let fieldSet of section.fieldSets; let i = index;" class="col-12" [id]="fieldSet.id" (click)="onAskedToScroll($event, fieldSet.id)">
2024-03-27 16:09:10 +01:00
<div class="row" *ngIf="visibilityRulesService.isVisibleMap[fieldSet.id] ?? true">
2023-12-20 08:20:38 +01:00
<div class="col-12">
<div class="row">
2024-03-27 16:09:10 +01:00
<app-description-form-field-set class="align-self-center col"
[propertiesFormGroup]="propertiesFormGroup.get('fieldSets')?.get(fieldSet.id)"
[fieldSet]="fieldSet"
2024-03-13 09:45:22 +01:00
[descriptionId]="descriptionId"
2024-03-27 16:09:10 +01:00
[path]="path + '.' + (i+1)"
[visibilityRulesService]="visibilityRulesService"
2024-02-08 16:23:03 +01:00
[validationErrorModel]="validationErrorModel"
2024-02-02 17:43:24 +01:00
[isChild]="false"></app-description-form-field-set>
2023-12-20 08:20:38 +01:00
</div>
2024-02-02 17:43:24 +01:00
</div>
2023-12-20 08:20:38 +01:00
</div>
</div>
2023-12-28 16:18:49 +01:00
<div *ngIf="section?.sections?.length > 0" class="col-12">
<ng-container *ngFor="let innerSection of section.sections; let j = index;">
2024-03-27 16:09:10 +01:00
<div class="row" *ngIf="visibilityRulesService.isVisibleMap[innerSection.id]">
2024-03-13 09:45:22 +01:00
<app-description-form-section class="col-12" [section]="innerSection" [path]="path+'.'+(j+1)" [pathName]="pathName+'.sections.'+j" (askedToScroll)="onAskedToScroll($event)" [propertiesFormGroup]="propertiesFormGroup" [descriptionId]="descriptionId" [visibilityRulesService]="visibilityRulesService" [linkToScroll]="subsectionLinkToScroll"></app-description-form-section>
2023-12-20 08:20:38 +01:00
</div>
</ng-container>
</div>
2023-12-28 16:18:49 +01:00
</mat-expansion-panel>
</mat-accordion>
2024-03-27 16:09:10 +01:00
</div>