diff --git a/btc-UI/src/app/components/touch-pad-menu/touch-pad-menu.component.css b/btc-UI/src/app/components/touch-pad-menu/touch-pad-menu.component.css index 7a027c8..434afbc 100755 --- a/btc-UI/src/app/components/touch-pad-menu/touch-pad-menu.component.css +++ b/btc-UI/src/app/components/touch-pad-menu/touch-pad-menu.component.css @@ -627,3 +627,59 @@ button.ready-to-print { border-color: #ccc; opacity: 0.7; } +.pool-replace-modal { + display: none; /* Controlled by [style.display] binding */ + position: fixed; + top: 0; + left: 0; + width: 100%; + height: 100%; + background-color: rgba(0, 0, 0, 0.5); /* Semi-transparent overlay */ + z-index: 1000; +} + +.pool-replace-content { + position: absolute; + top: 50%; + left: 50%; + transform: translate(-50%, -50%); + background-color: white; + padding: 20px; + border-radius: 5px; + width: 700px; + /* height: 400px; */ + box-shadow: 0 0 10px rgba(0, 0, 0, 0.5); +} + +.pool-replace-header { + display: flex; + /* justify-content: space-between; */ + justify-content: space-evenly; + margin-left: -35%; + align-items: center; + margin-bottom: 10px; +} + +.close-btn { + cursor: pointer; + font-size: 30px; +} + +.pool-replace-body { + margin-bottom: 15px; + margin-left: 26%; +} + +.pool-replace-body button { + margin: 5px; +} + +.pool-replace-footer { + display: flex; + justify-content: center; + gap: 50px; +} +.pool-replace-btn{ + background-color: #125cac; + color: white; +} \ No newline at end of file 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 c19f009..35dfcfe 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 @@ -9,13 +9,13 @@
- + @@ -36,9 +36,8 @@ - - +
@@ -182,4 +181,29 @@ - \ No newline at end of file + +
+
+
+ × +
POOL REPLACE
+
+
+

Select an option to replace the pool:

+ + + + + +
+ +
+
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 6ceecdb..dc81ec3 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 @@ -57,6 +57,9 @@ export class TouchPadMenuComponent implements OnInit { fieldInput: string = ''; fieldFEntered = false; + // POOL REPLACE modal + poolReplaceOpen = false; + constructor(private selectionService: SelectionService) {} ngOnInit() { @@ -462,55 +465,56 @@ export class TouchPadMenuComponent implements OnInit { default: return 3; } } -private handleFieldForSpecialLabels() { - if (!this.selectedLabel) return; - if (this.selectedLabel === 'FOR' || this.selectedLabel === 'QUI') { - if (!this.isFirstGroupComplete) { - this.firstGroup = ['F']; - this.selectedNumbers = ['F']; - this.selectionService.updatePartial({ - label: this.selectedLabel, - numbers: [...this.selectedNumbers], - isBoxed: false, - value: 1 - }); - } else { - this.secondGroup = ['F']; - this.selectedNumbers = [...this.firstGroup, '-', 'F']; - this.selectionService.updatePartial({ - label: this.selectedLabel, - numbers: [...this.selectedNumbers], - isBoxed: false, - value: 1 - }); - } - } else if (this.selectedLabel === 'TAN') { - if (this.isBoxed) { - this.selectedNumbers = ['F']; - this.selectionService.updatePartial({ - label: this.selectedLabel, - numbers: ['F'], - isBoxed: true, - value: 1 - }); - } else { - this.tanGroups[this.tanGroupStage] = ['F']; - const combined: (number | string)[] = [...this.tanGroups[0]]; - if (this.tanGroupStage > 0) combined.push('-', ...this.tanGroups[1]); - if (this.tanGroupStage > 1) combined.push('-', ...this.tanGroups[2]); - this.selectedNumbers = combined; - this.selectionService.updatePartial({ - label: this.selectedLabel, - numbers: [...this.selectedNumbers], - isBoxed: false, - value: 1 - }); + private handleFieldForSpecialLabels() { + if (!this.selectedLabel) return; + + if (this.selectedLabel === 'FOR' || this.selectedLabel === 'QUI') { + if (!this.isFirstGroupComplete) { + this.firstGroup = ['F']; + this.selectedNumbers = ['F']; + this.selectionService.updatePartial({ + label: this.selectedLabel, + numbers: [...this.selectedNumbers], + isBoxed: false, + value: 1 + }); + } else { + this.secondGroup = ['F']; + this.selectedNumbers = [...this.firstGroup, '-', 'F']; + this.selectionService.updatePartial({ + label: this.selectedLabel, + numbers: [...this.selectedNumbers], + isBoxed: false, + value: 1 + }); + } + } else if (this.selectedLabel === 'TAN') { + if (this.isBoxed) { + this.selectedNumbers = ['F']; + this.selectionService.updatePartial({ + label: this.selectedLabel, + numbers: ['F'], + isBoxed: true, + value: 1 + }); + } else { + this.tanGroups[this.tanGroupStage] = ['F']; + const combined: (number | string)[] = [...this.tanGroups[0]]; + if (this.tanGroupStage > 0) combined.push('-', ...this.tanGroups[1]); + if (this.tanGroupStage > 1) combined.push('-', ...this.tanGroups[2]); + this.selectedNumbers = combined; + this.selectionService.updatePartial({ + label: this.selectedLabel, + numbers: [...this.selectedNumbers], + isBoxed: false, + value: 1 + }); + } } } -} - // Calculator and Field Modal methods (unchanged) + // Calculator and Field Modal methods openCalculator() { this.calculatorOpen = true; this.calcDisplay = ''; } closeCalculator() { this.calculatorOpen = false; } press(val: string) { if (this.calcDisplay === 'Error') this.calcDisplay = ''; this.calcDisplay += val; } @@ -548,14 +552,15 @@ private handleFieldForSpecialLabels() { } openFieldModal() { - if (['FOR', 'QUI', 'TAN'].includes(this.selectedLabel || '')) { - this.handleFieldForSpecialLabels(); - } else { - this.fieldModalOpen = true; - this.fieldInput = ''; - this.fieldFEntered = false; + if (['FOR', 'QUI', 'TAN'].includes(this.selectedLabel || '')) { + this.handleFieldForSpecialLabels(); + } else { + this.fieldModalOpen = true; + this.fieldInput = ''; + this.fieldFEntered = false; + } } -} + closeFieldModal() { this.fieldModalOpen = false; } @@ -635,4 +640,12 @@ private handleFieldForSpecialLabels() { } this.closeFieldModal(); } + + openPoolReplaceModal() { + this.poolReplaceOpen = true; + } + + closePoolReplaceModal() { + this.poolReplaceOpen = false; + } } \ No newline at end of file