diff --git a/bookie/src/app/sales/bill.service.ts b/bookie/src/app/sales/bill.service.ts index 2d04b7e..99a8a7c 100644 --- a/bookie/src/app/sales/bill.service.ts +++ b/bookie/src/app/sales/bill.service.ts @@ -152,7 +152,7 @@ export class BillService { }, data: { list: this.modifierCategoryService.listForProduct(item.product.id as string), - selected: item.modifiers, + selected: Object.assign([], item.modifiers), }, }); @@ -160,8 +160,8 @@ export class BillService { if (result !== undefined) { item.modifiers = result; } + this.displayBill(); }); - this.displayBill(); } addOne(item: BillViewItem): void { diff --git a/bookie/src/app/sales/bills/bills.component.html b/bookie/src/app/sales/bills/bills.component.html index 1a18a22..1e72892 100644 --- a/bookie/src/app/sales/bills/bills.component.html +++ b/bookie/src/app/sales/bills/bills.component.html @@ -66,7 +66,7 @@ {{ row.info }} diff --git a/bookie/src/app/sales/bills/bills.component.ts b/bookie/src/app/sales/bills/bills.component.ts index 26c7c9d..0bdcdfe 100644 --- a/bookie/src/app/sales/bills/bills.component.ts +++ b/bookie/src/app/sales/bills/bills.component.ts @@ -1,26 +1,11 @@ import { AsyncPipe, CurrencyPipe } from '@angular/common'; import { Component, OnInit } from '@angular/core'; -import { MatButton, MatIconButton } from '@angular/material/button'; -import { MatCard, MatCardHeader, MatCardTitle, MatCardContent } from '@angular/material/card'; +import { MatButtonModule } from '@angular/material/button'; +import { MatCardModule } from '@angular/material/card'; import { MatCheckbox } from '@angular/material/checkbox'; import { MatDialog } from '@angular/material/dialog'; import { MatIcon } from '@angular/material/icon'; -import { - MatTable, - MatColumnDef, - MatHeaderCellDef, - MatHeaderCell, - MatCellDef, - MatCell, - MatHeaderRowDef, - MatHeaderRow, - MatRowDef, - MatRow, - MatFooterRowDef, - MatFooterRow, - MatFooterCellDef, - MatFooterCell, -} from '@angular/material/table'; +import { MatTableModule } from '@angular/material/table'; import { MatTooltip } from '@angular/material/tooltip'; import { ActivatedRoute, Router, RouterOutlet } from '@angular/router'; import { Observable } from 'rxjs'; @@ -51,29 +36,12 @@ import { VoucherType } from './voucher-type'; templateUrl: './bills.component.html', styleUrls: ['./bills.component.sass'], imports: [ - MatCard, - MatCardHeader, - MatCardTitle, - MatCardContent, - MatTable, - MatColumnDef, - MatHeaderCellDef, - MatHeaderCell, + MatCardModule, + MatTableModule, MatTooltip, - MatButton, - MatCellDef, - MatCell, + MatButtonModule, MatCheckbox, - MatIconButton, MatIcon, - MatHeaderRowDef, - MatHeaderRow, - MatRowDef, - MatRow, - MatFooterRowDef, - MatFooterRow, - MatFooterCellDef, - MatFooterCell, RouterOutlet, AsyncPipe, CurrencyPipe, diff --git a/bookie/src/app/sales/modifiers/modifiers.component.html b/bookie/src/app/sales/modifiers/modifiers.component.html index 87f85ad..ffa93f1 100644 --- a/bookie/src/app/sales/modifiers/modifiers.component.html +++ b/bookie/src/app/sales/modifiers/modifiers.component.html @@ -14,7 +14,7 @@
- @for (m of item.modifiers; track m) { + @for (m of item.modifiers; track m.id) {