Skip to content

Commit

Permalink
display valuelist as checkboxes in fix outliers modal - not functional
Browse files Browse the repository at this point in the history
  • Loading branch information
lsteinmann committed Dec 18, 2024
1 parent f38b197 commit ca7c892
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ export class FixOutliersModalComponent {

public valuelist: Valuelist;
public selectedValue: string;
public inputType: string;
public replaceAll: boolean;
public countAffected: number;

Expand Down Expand Up @@ -56,6 +57,9 @@ export class FixOutliersModalComponent {

this.projectDocument = await this.datastore.get('project');
this.valuelist = await this.getValuelist(this.document, this.field);
this.inputType = await this.field.inputType;
console.log(this.inputType)
console.log(this.valuelist.values)
this.affectedDocuments = [];

const foundDocuments: Array<Document> = (await this.datastore.find({
Expand Down Expand Up @@ -100,6 +104,17 @@ export class FixOutliersModalComponent {
this.activeModal.close();
}

public clickCheckbox(value: string) {

/** TODO */
console.log(value)
}

public isSelectedValue(value: string) {

/** TODO */
return false;
}

private openFixingDataInProgressModal(): NgbModalRef {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,23 @@ <h5 class="modal-title" i18n="@@navbar.taskbar.fixOutliers.header">
Bitte wählen Sie den korrekten Wert aus der Werteliste aus.
</div>

<searchable-select [selectedValue]="selectedValue"
[values]="getValues()"
[getLabel]="getValueLabel"
(onValueSelected)="selectedValue = $event"></searchable-select>
<div *ngIf="inputType == 'dropdown'">
<searchable-select [selectedValue]="selectedValue"
[values]="getValues()"
[getLabel]="getValueLabel"
(onValueSelected)="selectedValue = $event">
</searchable-select>
</div>
<div *ngIf="inputType == 'checkboxes'">
{{getValues()}}
<div *ngFor="let value of getValues()" class="checkbox form-check form-check-inline">
<label class="form-check-label">
<input class="form-check-input" [value]="value" type="checkbox" (click)="clickCheckbox(value)" [checked]="isSelectedValue(value)">
{{value}}
</label>
</div>
</div>


<div *ngIf="selectedValue"
id="multiple-switch"
Expand Down

0 comments on commit ca7c892

Please sign in to comment.