diff --git a/src/frontend/app/administration/indexingModel/indexing-model-administration.component.ts b/src/frontend/app/administration/indexingModel/indexing-model-administration.component.ts index 4b51e4febab8186386439ef5d6013fb8f867dc14..40fe769a241a12722f59e95fda8dd4a45a2d4f8c 100644 --- a/src/frontend/app/administration/indexingModel/indexing-model-administration.component.ts +++ b/src/frontend/app/administration/indexingModel/indexing-model-administration.component.ts @@ -60,7 +60,7 @@ export class IndexingModelAdministrationComponent implements OnInit { identifier: 'confidential', label: this.lang.confidential, type: 'radio', - values: ['yes', 'no'] + values: [{'id': 'true', 'label': 'Oui'}, {'id': 'false', 'label': 'Non'}] }, { identifier: 'initiator', diff --git a/src/frontend/app/indexation/field-list/field-list.component.html b/src/frontend/app/indexation/field-list/field-list.component.html index e72bea0e5222d1dd56627642f931bce70c950832..5c1e4de133b23ae5730b595848baacbebbbc3fc7 100644 --- a/src/frontend/app/indexation/field-list/field-list.component.html +++ b/src/frontend/app/indexation/field-list/field-list.component.html @@ -41,22 +41,22 @@ </ng-container> <ng-container *ngIf="field.type === 'radio'"> <mat-radio-group class="radio-form" color="primary" disabled> - <mat-radio-button *ngFor="let value of field.values" [value]="value"> - {{value}} + <mat-radio-button *ngFor="let value of field.values" [value]="value.id"> + {{value.label}} </mat-radio-button> </mat-radio-group> </ng-container> <ng-container *ngIf="field.type === 'checkbox'"> <div class="input-form checkbox-form"> - <mat-selection-list #shoes class="div-list" disabled> - <mat-list-option *ngFor="let value of field.values" [value]="value" + <mat-selection-list #checkboxElement class="div-list" disabled> + <mat-list-option *ngFor="let value of field.values" [value]="value.id" checkboxPosition="before"> - {{value}} + {{value.label}} </mat-list-option> </mat-selection-list> </div> <mat-chip-list class="checkbox-selected-list"> - <mat-chip *ngFor="let chip of shoes.selectedOptions.selected" selected> + <mat-chip *ngFor="let chip of checkboxElement.selectedOptions.selected" selected> {{lang.selectedValue}} </mat-chip> </mat-chip-list> diff --git a/src/frontend/app/indexation/field-list/field-list.component.ts b/src/frontend/app/indexation/field-list/field-list.component.ts index 35cba548c2dc566e238b038d5c31ee300e14472c..af6652bfa70df6f123b1367b125e0b70531f2733 100644 --- a/src/frontend/app/indexation/field-list/field-list.component.ts +++ b/src/frontend/app/indexation/field-list/field-list.component.ts @@ -26,9 +26,9 @@ export class FieldListComponent implements OnInit { loading: boolean = false; - @Input('dataFields') availableCustomFields: any[]; + @Input('dataCustomFields') availableCustomFields: any[]; - @Input('dataCustomFields') availableFields: any[]; + @Input('dataFields') availableFields: any[]; constructor( public http: HttpClient, diff --git a/src/frontend/app/indexation/indexing-form/indexing-form.component.html b/src/frontend/app/indexation/indexing-form/indexing-form.component.html index 8ab55275924f0a1f98f81aea22bf6dfd0f242ec7..e9aa8877f368d0c89bca8b2646c029b63eeba69d 100644 --- a/src/frontend/app/indexation/indexing-form/indexing-form.component.html +++ b/src/frontend/app/indexation/indexing-form/indexing-form.component.html @@ -112,8 +112,8 @@ <input matInput style="display: none;"> <mat-radio-group class="radio-form" color="primary" [formControl]="arrFormControl[field.identifier]"> - <mat-radio-button *ngFor="let value of field.values" [value]="value"> - {{value}} + <mat-radio-button *ngFor="let value of field.values" [value]="value.id"> + {{value.label}} </mat-radio-button> </mat-radio-group> </mat-form-field> @@ -122,9 +122,9 @@ <div class="input-form checkbox-form"> <mat-selection-list #shoes class="div-list" [formControl]="arrFormControl[field.identifier]"> - <mat-list-option *ngFor="let value of field.values" [value]="value" + <mat-list-option *ngFor="let value of field.values" [value]="value.id" checkboxPosition="before"> - {{value}} + {{value.label}} </mat-list-option> </mat-selection-list> </div> diff --git a/src/frontend/app/indexation/indexing-form/indexing-form.component.ts b/src/frontend/app/indexation/indexing-form/indexing-form.component.ts index 71897d512dbcba37bcba10c5af4c3da8af34bd72..7b97d250f368837496bc416098986803a8f81709 100644 --- a/src/frontend/app/indexation/indexing-form/indexing-form.component.ts +++ b/src/frontend/app/indexation/indexing-form/indexing-form.component.ts @@ -89,7 +89,7 @@ export class IndexingFormComponent implements OnInit { label: this.lang.confidential, type: 'radio', default_value: '', - values: ['Oui', 'Non'] + values: [{'id': 'true', 'label': 'Oui'}, {'id': 'false', 'label': 'Non'}] }, { identifier: 'initiator',