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 6811d1ad095e30e008cfee599b9ebf5fcd21528d..2934c0f0af5c51a57bf6613bb0f60937cb4bd38c 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 @@ -244,19 +244,23 @@ </div> <div class="ml-5 row"> - - <mat-form-field class="mr-3 vitamui-mat-select col-6"> - <mat-select panelClass="vitamui-mat-select"> - <mat-option *ngFor="let element of enumerationsSedaControl" [value]=""> - {{element}} - </mat-option> - </mat-select> - <div class="select-arrow"> - <i class="material-icons">keyboard_arrow_up</i> - <i class="material-icons">keyboard_arrow_down</i> - </div> - </mat-form-field> - + <div class="col-8"> + <mat-form-field class="mr-3 vitamui-mat-select " *ngIf="!isEmptyEnumeration(enumerationsSedaControl); else blockInput"> + <mat-select panelClass="vitamui-mat-select"> + <mat-option *ngFor="let element of enumerationsSedaControl" [value]=""> + {{element}} + </mat-option> + </mat-select> + <div class="select-arrow"> + <i class="material-icons">keyboard_arrow_up</i> + <i class="material-icons">keyboard_arrow_down</i> + </div> + </mat-form-field> + <ng-template #blockInput> + <vitamui-common-editable-textarea > + </vitamui-common-editable-textarea> + </ng-template> + </div> </div> </div> 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 dbc213bf91ac6804aeffedb818a45190c02f6215..8d00555c7d89f7d5a53463c2eddfda053325ce40 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 @@ -764,6 +764,8 @@ export class FileTreeMetadataComponent { return this.sedaService.isDuplicated(nomDuChamp, this.selectedSedaNode); } - - + isEmptyEnumeration(enumerations: string[]): boolean{ + return enumerations.length === 0; + } + }