feat : added pool replace
This commit is contained in:
parent
5bfaec747d
commit
39910e2c21
@ -168,15 +168,13 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="pool-replace-body">
|
<div class="pool-replace-body">
|
||||||
<p>Select an option to replace the pool:</p>
|
<p>Select an option to replace the pool:</p>
|
||||||
<button class="btn btn-light">WIN</button>
|
<ng-container *ngFor="let label of poolReplaceOptions">
|
||||||
<button class="btn btn-light">SHP</button>
|
<button class="btn btn-light" (click)="handlePoolReplace(label)">{{ label }}</button>
|
||||||
<button class="btn btn-light">THP</button>
|
</ng-container>
|
||||||
<button class="btn btn-light">PLC</button>
|
|
||||||
<button class="btn btn-light">SHW</button>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="pool-replace-footer">
|
<div class="pool-replace-footer">
|
||||||
<button class="btn btn-secondary" (click)="closePoolReplaceModal()">Cancel</button>
|
<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>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -78,6 +78,7 @@ export class TouchPadMenuComponent implements OnInit, OnDestroy {
|
|||||||
|
|
||||||
// POOL REPLACE modal
|
// POOL REPLACE modal
|
||||||
poolReplaceOpen = false;
|
poolReplaceOpen = false;
|
||||||
|
poolReplaceOptions: string[] = [];
|
||||||
|
|
||||||
// TRE popup
|
// TRE popup
|
||||||
trePopupVisible = false;
|
trePopupVisible = false;
|
||||||
@ -1307,9 +1308,44 @@ const winLabels = allRows.map(row => {
|
|||||||
|
|
||||||
openPoolReplaceModal() {
|
openPoolReplaceModal() {
|
||||||
if (this.totalAmountLimitReached) return;
|
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;
|
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() {
|
closePoolReplaceModal() {
|
||||||
this.poolReplaceOpen = false;
|
this.poolReplaceOpen = false;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user