diff --git a/ui/ui-frontend/projects/pastis/src/app/profile/edit-profile/file-tree-metadata/file-tree-metadata.component.html b/ui/ui-frontend/projects/pastis/src/app/profile/edit-profile/file-tree-metadata/file-tree-metadata.component.html index 1dd928dc91f6d136313f5b2de98b8bd17755e015..6811d1ad095e30e008cfee599b9ebf5fcd21528d 100644 --- a/ui/ui-frontend/projects/pastis/src/app/profile/edit-profile/file-tree-metadata/file-tree-metadata.component.html +++ b/ui/ui-frontend/projects/pastis/src/app/profile/edit-profile/file-tree-metadata/file-tree-metadata.component.html @@ -235,7 +235,6 @@ translate}}<mat-icon class="pastis-icon-primary"><i class="vitamui-icon vitamui-icon-info"></i> </mat-icon> </span> - {{this.clickedControl | json}} </h2> </div> <div style="position: relative; right:20px; "><button class="btn btn-circle large " @@ -248,8 +247,8 @@ <mat-form-field class="mr-3 vitamui-mat-select col-6"> <mat-select panelClass="vitamui-mat-select"> - <mat-option *ngFor="" [value]=""> - + <mat-option *ngFor="let element of enumerationsSedaControl" [value]=""> + {{element}} </mat-option> </mat-select> <div class="select-arrow"> @@ -331,4 +330,4 @@ </ng-template> </mat-sidenav-content> -</mat-sidenav-container> \ No newline at end of file +</mat-sidenav-container> diff --git a/ui/ui-frontend/projects/pastis/src/app/profile/edit-profile/file-tree-metadata/file-tree-metadata.component.ts b/ui/ui-frontend/projects/pastis/src/app/profile/edit-profile/file-tree-metadata/file-tree-metadata.component.ts index a4eb95569df16667c7aa3ff6944be9a0e770e94f..dbc213bf91ac6804aeffedb818a45190c02f6215 100644 --- a/ui/ui-frontend/projects/pastis/src/app/profile/edit-profile/file-tree-metadata/file-tree-metadata.component.ts +++ b/ui/ui-frontend/projects/pastis/src/app/profile/edit-profile/file-tree-metadata/file-tree-metadata.component.ts @@ -141,6 +141,7 @@ export class FileTreeMetadataComponent { expressionControl: boolean; arrayControl: string[]; clickedControl: FileNode; + enumerationsSedaControl: string[]; formatagePredefini: string[] = ["Date AAAA-MM-JJ", "Date AAAA", "Adresse mail"]; @@ -565,7 +566,7 @@ export class FileTreeMetadataComponent { console.log("The answer for arrays control was ", popUpAnswer); if(popUpAnswer){ this.arrayControl = popUpAnswer; - this.setControlsVues(this.arrayControl) + this.setControlsVues(this.arrayControl, popData.fileNode.name) } } } @@ -578,9 +579,10 @@ export class FileTreeMetadataComponent { this.valueControl = false; } - setControlsVues(elements: string[]){ + setControlsVues(elements: string[], sedaName: string){ if((this.isStandalone && elements.includes("Enumération")) || elements.includes(this.translated(ADD_PUA_CONTROL_TRANSLATE_PATH + '.ENUMERATIONS_LABEL'))){ this.enumerationControl = true; + this.enumerationsSedaControl = this.sedaService.findSedaChildByName(sedaName, this.selectedSedaNode).Enumeration; } if((this.isStandalone && elements.includes("Expression régulière")) || elements.includes(this.translated(ADD_PUA_CONTROL_TRANSLATE_PATH + '.EXPRESSION_REGULIERE_LABEL'))){ this.expressionControl = true; @@ -762,6 +764,6 @@ export class FileTreeMetadataComponent { return this.sedaService.isDuplicated(nomDuChamp, this.selectedSedaNode); } - - + + }