Skip to content
Snippets Groups Projects
Verified Commit 2c34612a authored by Florian Azizian's avatar Florian Azizian
Browse files

FEAT #11959 TIME 2 improve display multi values (custom and standard field)

parent c21b46b0
No related branches found
No related tags found
No related merge requests found
...@@ -60,7 +60,7 @@ export class IndexingModelAdministrationComponent implements OnInit { ...@@ -60,7 +60,7 @@ export class IndexingModelAdministrationComponent implements OnInit {
identifier: 'confidential', identifier: 'confidential',
label: this.lang.confidential, label: this.lang.confidential,
type: 'radio', type: 'radio',
values: ['yes', 'no'] values: [{'id': 'true', 'label': 'Oui'}, {'id': 'false', 'label': 'Non'}]
}, },
{ {
identifier: 'initiator', identifier: 'initiator',
......
...@@ -41,22 +41,22 @@ ...@@ -41,22 +41,22 @@
</ng-container> </ng-container>
<ng-container *ngIf="field.type === 'radio'"> <ng-container *ngIf="field.type === 'radio'">
<mat-radio-group class="radio-form" color="primary" disabled> <mat-radio-group class="radio-form" color="primary" disabled>
<mat-radio-button *ngFor="let value of field.values" [value]="value"> <mat-radio-button *ngFor="let value of field.values" [value]="value.id">
{{value}} {{value.label}}
</mat-radio-button> </mat-radio-button>
</mat-radio-group> </mat-radio-group>
</ng-container> </ng-container>
<ng-container *ngIf="field.type === 'checkbox'"> <ng-container *ngIf="field.type === 'checkbox'">
<div class="input-form checkbox-form"> <div class="input-form checkbox-form">
<mat-selection-list #shoes class="div-list" disabled> <mat-selection-list #checkboxElement class="div-list" disabled>
<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"> checkboxPosition="before">
{{value}} {{value.label}}
</mat-list-option> </mat-list-option>
</mat-selection-list> </mat-selection-list>
</div> </div>
<mat-chip-list class="checkbox-selected-list"> <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}} {{lang.selectedValue}}
</mat-chip> </mat-chip>
</mat-chip-list> </mat-chip-list>
......
...@@ -26,9 +26,9 @@ export class FieldListComponent implements OnInit { ...@@ -26,9 +26,9 @@ export class FieldListComponent implements OnInit {
loading: boolean = false; loading: boolean = false;
@Input('dataFields') availableCustomFields: any[]; @Input('dataCustomFields') availableCustomFields: any[];
@Input('dataCustomFields') availableFields: any[]; @Input('dataFields') availableFields: any[];
constructor( constructor(
public http: HttpClient, public http: HttpClient,
......
...@@ -112,8 +112,8 @@ ...@@ -112,8 +112,8 @@
<input matInput style="display: none;"> <input matInput style="display: none;">
<mat-radio-group class="radio-form" color="primary" <mat-radio-group class="radio-form" color="primary"
[formControl]="arrFormControl[field.identifier]"> [formControl]="arrFormControl[field.identifier]">
<mat-radio-button *ngFor="let value of field.values" [value]="value"> <mat-radio-button *ngFor="let value of field.values" [value]="value.id">
{{value}} {{value.label}}
</mat-radio-button> </mat-radio-button>
</mat-radio-group> </mat-radio-group>
</mat-form-field> </mat-form-field>
...@@ -122,9 +122,9 @@ ...@@ -122,9 +122,9 @@
<div class="input-form checkbox-form"> <div class="input-form checkbox-form">
<mat-selection-list #shoes class="div-list" <mat-selection-list #shoes class="div-list"
[formControl]="arrFormControl[field.identifier]"> [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"> checkboxPosition="before">
{{value}} {{value.label}}
</mat-list-option> </mat-list-option>
</mat-selection-list> </mat-selection-list>
</div> </div>
......
...@@ -89,7 +89,7 @@ export class IndexingFormComponent implements OnInit { ...@@ -89,7 +89,7 @@ export class IndexingFormComponent implements OnInit {
label: this.lang.confidential, label: this.lang.confidential,
type: 'radio', type: 'radio',
default_value: '', default_value: '',
values: ['Oui', 'Non'] values: [{'id': 'true', 'label': 'Oui'}, {'id': 'false', 'label': 'Non'}]
}, },
{ {
identifier: 'initiator', identifier: 'initiator',
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment