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 35dfcfe..6f590c2 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 @@ -181,29 +181,48 @@ - -
-
-
- × -
POOL REPLACE
-
-
-

Select an option to replace the pool:

- - - - - -
- + + +
+
+
Select TRE
+ + + +
+
\ No newline at end of file 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 71326d0..8bc9b16 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 @@ -60,6 +60,9 @@ export class TouchPadMenuComponent implements OnInit { // POOL REPLACE modal poolReplaceOpen = false; + // TRE popup + trePopupVisible = false; + constructor(private selectionService: SelectionService) {} ngOnInit() { @@ -141,6 +144,10 @@ export class TouchPadMenuComponent implements OnInit { } selectLabel(label: string) { + if (label === 'TRE') { + this.trePopupVisible = true; + return; // Stop further execution until popup interaction + } this.selectedLabel = label; this.selectedNumbers = []; this.padValue = ''; @@ -646,4 +653,32 @@ export class TouchPadMenuComponent implements OnInit { closePoolReplaceModal() { this.poolReplaceOpen = false; } + + // TRE Popup Methods + treButtonClick(btnNum: number) { + this.trePopupVisible = false; + this._selectTreAfterPopup(); + } + + private _selectTreAfterPopup() { + this.selectedLabel = 'TRE'; + 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.selectionService.updatePartial({ label: 'TRE' }); + } + + closeTrePopup() { + this.trePopupVisible = false; + } } \ No newline at end of file