feat : added pool replace
This commit is contained in:
parent
5bfaec747d
commit
39910e2c21
@ -168,15 +168,13 @@
|
||||
</div>
|
||||
<div class="pool-replace-body">
|
||||
<p>Select an option to replace the pool:</p>
|
||||
<button class="btn btn-light">WIN</button>
|
||||
<button class="btn btn-light">SHP</button>
|
||||
<button class="btn btn-light">THP</button>
|
||||
<button class="btn btn-light">PLC</button>
|
||||
<button class="btn btn-light">SHW</button>
|
||||
<ng-container *ngFor="let label of poolReplaceOptions">
|
||||
<button class="btn btn-light" (click)="handlePoolReplace(label)">{{ label }}</button>
|
||||
</ng-container>
|
||||
</div>
|
||||
<div class="pool-replace-footer">
|
||||
<button class="btn btn-secondary" (click)="closePoolReplaceModal()">Cancel</button>
|
||||
<button class="btn btn-primary">Confirm</button>
|
||||
<button class="btn btn-primary" style="display:none;">Confirm</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -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;
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user