Taobin-Recipe-Manager/client/src/app/features/recipes/recipe-details/recipe-topping/recipe-topping.component.html

39 lines
1 KiB
HTML
Raw Normal View History

2024-01-19 17:13:04 +07:00
<div [formGroup]="toppingForm">
<div formArrayName="toppingList" *ngFor="let topping of toppingList.controls; let i = index">
<div formGroupName="{{ i }}">
2024-01-19 20:23:36 +07:00
<input type="checkbox" formControlName="isUse"/>
2024-01-19 17:13:04 +07:00
<!-- toppingGroup -->
<ng-select
appendTo="body"
[clearable]="false"
[compareWith]="this.compareFunc"
formControlName="groupID"
(close)="getDefaultOfGroup(getGroupIdByIndex(i))"
2024-01-17 17:38:23 +07:00
>
2024-01-19 17:13:04 +07:00
<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()"
2024-01-17 17:38:23 +07:00
>
2024-01-19 17:13:04 +07:00
<div>{{ item.name }} ({{ item.id }})</div>
</ng-option>
</ng-select>
</div>
</div>
2024-01-17 17:38:23 +07:00
</div>