fix : confrim button will show if rows (data) are present

This commit is contained in:
karthik 2025-08-09 12:57:14 +05:30
parent 0fc02ef576
commit 5372d9b046

View File

@ -65,6 +65,12 @@ export class MiddleSectionComponent implements OnInit, OnDestroy {
this.filledRows = [...rows, ...emptyRows].slice(0, 5); this.filledRows = [...rows, ...emptyRows].slice(0, 5);
this.calculateTotal(); this.calculateTotal();
// Show Confirm button only if at least one row has data (label and numbers)
// and only after repeat is clicked (showRepeatTicket flag)
this.showConfirmButton = this.showRepeatTicket && this.filledRows.some(
row => row.label && row.numbers && row.numbers.length > 0
);
} }
showSalesTotal: boolean = false; showSalesTotal: boolean = false;