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 db78498..6ceecdb 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 @@ -462,6 +462,53 @@ 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 + }); + } + } +} // Calculator and Field Modal methods (unchanged) openCalculator() { this.calculatorOpen = true; this.calcDisplay = ''; } @@ -501,11 +548,14 @@ export class TouchPadMenuComponent implements OnInit { } openFieldModal() { + if (['FOR', 'QUI', 'TAN'].includes(this.selectedLabel || '')) { + this.handleFieldForSpecialLabels(); + } else { this.fieldModalOpen = true; this.fieldInput = ''; this.fieldFEntered = false; } - +} closeFieldModal() { this.fieldModalOpen = false; }