add topping edit to recipelist WIP

This commit is contained in:
pakintada@gmail.com 2024-01-19 17:13:04 +07:00
parent 6b37c73aea
commit ddfbeb4ac6
6 changed files with 180 additions and 73 deletions

View file

@ -1,27 +1,38 @@
<div>
<input type="checkbox" />
<!-- toppingGroup -->
<ng-select
appendTo="body"
[clearable]="false"
[compareWith]="this.compareFunc"
formControlName="groupID"
>
<ng-option
*ngFor="let item of allToppingsDefinitions"
[value]="item.groupId.toString()"
<div [formGroup]="toppingForm">
<div formArrayName="toppingList" *ngFor="let topping of toppingList.controls; let i = index">
<div formGroupName="{{ i }}">
<input type="checkbox" />
<!-- toppingGroup -->
<ng-select
appendTo="body"
[clearable]="false"
[compareWith]="this.compareFunc"
formControlName="groupID"
(close)="getDefaultOfGroup(getGroupIdByIndex(i))"
>
<div>{{ item.name }} ({{ item.groupId }})</div>
<ng-option
*ngFor="let item of allToppingsDefinitions"
[value]="item.groupId.toString()"
>
<div>{{ item.name }} ({{ item.groupId }})</div>
</ng-option>
</ng-select>
<!-- defaultSelect -->
<ng-select
appendTo="body"
[clearable]="false"
[compareWith]="this.compareFunc"
formControlName="defaultIDSelect"
>
<ng-option
*ngFor="let item of getMembersByGroupId(getGroupIdByIndex(this.index!))"
[value]="item.id.toString()"
>
<div>{{ item.name }} ({{ item.id }})</div>
</ng-option>
</ng-select>
<!-- defaultSelect -->
<ng-select
>
<!-- <ng-option
*ngFor="let item of getMembersByGroupId(getGroupIdByIndex(this.index))"
[value]="item.defaultId.toString()"
>
<div>{{ item.name }} ({{ item.defaultId }})</div>
</ng-option> -->
</ng-select>
</ng-select>
</div>
</div>
</div>