From 2acb5d7b35552773d4c79b58ba06872c8022255e Mon Sep 17 00:00:00 2001 From: karthik Date: Thu, 31 Jul 2025 13:48:13 +0530 Subject: [PATCH] fix : going back to previous commit --- .../touch-pad-menu.component.html | 16 ++------- .../touch-pad-menu.component.ts | 36 +++---------------- 2 files changed, 6 insertions(+), 46 deletions(-) diff --git a/btc-UI/src/app/components/touch-pad-menu/touch-pad-menu.component.html b/btc-UI/src/app/components/touch-pad-menu/touch-pad-menu.component.html index f8e6d58..d916233 100755 --- a/btc-UI/src/app/components/touch-pad-menu/touch-pad-menu.component.html +++ b/btc-UI/src/app/components/touch-pad-menu/touch-pad-menu.component.html @@ -104,22 +104,10 @@
- +
- +
diff --git a/btc-UI/src/app/components/touch-pad-menu/touch-pad-menu.component.ts b/btc-UI/src/app/components/touch-pad-menu/touch-pad-menu.component.ts index 46234b5..cea60ca 100755 --- a/btc-UI/src/app/components/touch-pad-menu/touch-pad-menu.component.ts +++ b/btc-UI/src/app/components/touch-pad-menu/touch-pad-menu.component.ts @@ -299,31 +299,9 @@ export class TouchPadMenuComponent implements OnInit, OnDestroy { } onPadEnter() { - // Only allows entry if less than 5 rows are filled - if (this.maxRowsReached) return; - - const value = parseFloat(this.padValue) || 0; - if (!this.selectedLabel || !this.selectedNumbers.length || value === 0) return; // Basic validation - - // Finalize current row selection - this.selectionService.finalizeCurrentRow(); - - // Clear current row selection, but do NOT clear the existing rows, - // so user can keep filling rows up to 5 - this.selectedLabel = null; - this.selectedNumbers = []; - this.padValue = ''; - this.canPrint = false; - this.isBoxed = false; - - // Reset all group stages - this.tanGroupStage = 0; - this.tanGroups = [[], [], []]; - this.isFirstGroupComplete = false; - this.firstGroup = []; - this.secondGroup = []; - this.multiLegStage = 0; - this.multiLegGroups = [[], [], [], [], []]; + if (this.canPrint) { + this.print(); + } } onShashEnter() { @@ -391,19 +369,13 @@ export class TouchPadMenuComponent implements OnInit, OnDestroy { } print() { - // Don't print if no rows - if (this.currentSelections.length === 0) return; - const selectionsTotal = this.currentSelections.reduce((sum, sel) => sum + sel.total, 0); if (selectionsTotal + this.currentTotal > 5000) { this.showLimitPopup = true; return; } - // Submit all rows this.selectionService.finalizeCurrentRow(); - - // Clear everything after print - this.erase(); + this.resetSelections(); } erase() {