criteria-tabs.component.html 1.49 KB
Newer Older
Tifenn Guillas's avatar
Tifenn Guillas committed
1
<div *ngIf="criteriaFamilyList.length == 1 && getAttributeByFamily(criteriaFamilyList[0].id).length > 0">
2
3
4
    <div class="border rounded my-2">
        <p class="border-bottom bg-light text-primary py-4 pl-4">{{ criteriaFamilyList[0].label }}</p>
        <div class="px-3">
5
6
7
            <app-criteria-by-family [criteriaFamily]="criteriaFamilyList[0]"
                [datasetAttributeList]="datasetAttributeList" [criteriaList]="criteriaList"
                (addCriterion)="add($event)">
8
9
10
            </app-criteria-by-family>
        </div>
    </div>
11
</div>
12

François Agneray's avatar
François Agneray committed
13
<accordion *ngIf="criteriaFamilyList.length > 1">
Tifenn Guillas's avatar
Tifenn Guillas committed
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
    <ng-container *ngFor="let family of criteriaFamilyList">
        <accordion-group #ag *ngIf="getAttributeByFamily(family.id).length > 0" [panelClass]="'custom-accordion'" [isOpen]="true"
            class="my-2">
            <button class="btn btn-link btn-block clearfix" accordion-heading>
                <div class="pull-left float-left">
                    {{ family.label }}
                    &nbsp;
                    <span *ngIf="ag.isOpen"><i class="fas fa-chevron-up"></i></span>
                    <span *ngIf="!ag.isOpen"><i class="fas fa-chevron-down"></i></span>
                </div>
            </button>
            <app-criteria-by-family [criteriaFamily]="family" [datasetAttributeList]="datasetAttributeList"
                [criteriaList]="criteriaList" (addCriterion)="add($event)">
            </app-criteria-by-family>
        </accordion-group>
    </ng-container>
30
</accordion>