fix : added popup TRE

This commit is contained in:
karthik 2025-07-30 14:03:09 +05:30
parent 0bc77c0124
commit 855512bedf
2 changed files with 78 additions and 24 deletions

View File

@ -207,3 +207,22 @@
</div>
</div>
</div>
<!-- 🟦 TRE Popup Modal -->
<div
class="tre-popup-backdrop"
*ngIf="trePopupVisible"
style="position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; background: rgba(0,0,0,0.15); z-index: 2000;"
(click)="closeTrePopup()"
>
<div
class="tre-popup-dialog"
(click)="$event.stopPropagation()"
style="background: #fff; border-radius: 8px; padding: 24px 16px; position: absolute; top: 30%; left: 50%; transform: translate(-50%, -50%); min-width: 700px;margin-top: 10%; box-shadow: 0 3px 16px rgba(0,0,0,0.25);"
>
<div style="font-weight: bold; text-align: center; font-size: 1.25rem; margin-bottom: 1.25rem;">Select TRE</div>
<button class="btn btn-primary my-2 w-100" (click)="treButtonClick(1)">TRB1</button>
<button class="btn btn-primary my-2 w-100" (click)="treButtonClick(2)">TRB2</button>
<button class="btn btn-secondary my-2 w-100" style="opacity: 0.6; pointer-events: none;">TRB3</button>
</div>
</div>

View File

@ -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;
}
}