From 39910e2c21783b0176b84fd475f881b452d2ee94 Mon Sep 17 00:00:00 2001 From: karthik Date: Thu, 7 Aug 2025 13:36:51 +0530 Subject: [PATCH] feat : added pool replace --- .../touch-pad-menu.component.html | 10 +++--- .../touch-pad-menu.component.ts | 36 +++++++++++++++++++ 2 files changed, 40 insertions(+), 6 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 81f3bed..6b238f0 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 @@ -168,15 +168,13 @@

Select an option to replace the pool:

- - - - - + + +
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 d7d99e4..1dba641 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 @@ -78,6 +78,7 @@ export class TouchPadMenuComponent implements OnInit, OnDestroy { // POOL REPLACE modal poolReplaceOpen = false; + poolReplaceOptions: string[] = []; // TRE popup trePopupVisible = false; @@ -1307,9 +1308,44 @@ const winLabels = allRows.map(row => { openPoolReplaceModal() { if (this.totalAmountLimitReached) return; + // Determine allowed group based on current selection + const groupA = ['WIN', 'SHP', 'THP', 'PLC', 'SHW']; + const groupB = ['FOR', 'QUI', 'TAN']; + if (groupA.includes(this.selectedLabel || '')) { + this.poolReplaceOptions = groupA; + } else if (groupB.includes(this.selectedLabel || '')) { + this.poolReplaceOptions = groupB; + } else { + this.poolReplaceOptions = []; + } this.poolReplaceOpen = true; } + handlePoolReplace(label: string) { + this.selectedLabel = label; + this.selectedNumbers = []; + this.padValue = ''; + this.canPrint = false; + this.isBoxed = false; + this.tanGroupStage = 0; + this.tanGroups = [[], [], []]; + this.isFirstGroupComplete = false; + this.firstGroup = []; + this.secondGroup = []; + this.multiLegStage = 0; + this.multiLegGroups = [[], [], [], [], []]; + this.multiLegBaseRaceIdx = 0; + this.currentLegRaceDisplay = ''; + this.currentPool = null; + this.fieldModalOpen = false; + this.fieldInput = ''; + this.fieldFEntered = false; + this.wspTicketStage = 0; + this.poolReplaceOpen = false; + // Update selection service with new label + this.selectionService.updatePartial({ label }); + } + closePoolReplaceModal() { this.poolReplaceOpen = false; }