fix : added popup TRE
This commit is contained in:
parent
0bc77c0124
commit
855512bedf
@ -182,12 +182,12 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- 🟩 POOL REPLACE Modal -->
|
<!-- 🟩 POOL REPLACE Modal -->
|
||||||
<div
|
<div
|
||||||
id="poolReplaceModal"
|
id="poolReplaceModal"
|
||||||
class="pool-replace-modal"
|
class="pool-replace-modal"
|
||||||
[style.display]="poolReplaceOpen ? 'block' : 'none'"
|
[style.display]="poolReplaceOpen ? 'block' : 'none'"
|
||||||
(click)="closePoolReplaceModal()"
|
(click)="closePoolReplaceModal()"
|
||||||
>
|
>
|
||||||
<div class="pool-replace-content" (click)="$event.stopPropagation()">
|
<div class="pool-replace-content" (click)="$event.stopPropagation()">
|
||||||
<div class="pool-replace-header">
|
<div class="pool-replace-header">
|
||||||
<span class="close-btn" (click)="closePoolReplaceModal()">×</span>
|
<span class="close-btn" (click)="closePoolReplaceModal()">×</span>
|
||||||
@ -206,4 +206,23 @@
|
|||||||
<button class="btn btn-primary">Confirm</button>
|
<button class="btn btn-primary">Confirm</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</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>
|
||||||
@ -60,6 +60,9 @@ export class TouchPadMenuComponent implements OnInit {
|
|||||||
// POOL REPLACE modal
|
// POOL REPLACE modal
|
||||||
poolReplaceOpen = false;
|
poolReplaceOpen = false;
|
||||||
|
|
||||||
|
// TRE popup
|
||||||
|
trePopupVisible = false;
|
||||||
|
|
||||||
constructor(private selectionService: SelectionService) {}
|
constructor(private selectionService: SelectionService) {}
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
@ -141,6 +144,10 @@ export class TouchPadMenuComponent implements OnInit {
|
|||||||
}
|
}
|
||||||
|
|
||||||
selectLabel(label: string) {
|
selectLabel(label: string) {
|
||||||
|
if (label === 'TRE') {
|
||||||
|
this.trePopupVisible = true;
|
||||||
|
return; // Stop further execution until popup interaction
|
||||||
|
}
|
||||||
this.selectedLabel = label;
|
this.selectedLabel = label;
|
||||||
this.selectedNumbers = [];
|
this.selectedNumbers = [];
|
||||||
this.padValue = '';
|
this.padValue = '';
|
||||||
@ -646,4 +653,32 @@ export class TouchPadMenuComponent implements OnInit {
|
|||||||
closePoolReplaceModal() {
|
closePoolReplaceModal() {
|
||||||
this.poolReplaceOpen = false;
|
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;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
Loading…
Reference in New Issue
Block a user