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 3a6aa6b..a6897c2 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 @@ -17,11 +17,12 @@
@@ -139,32 +140,32 @@
-
-
-
- × -
FIELD
-
+
+
+
+ × +
FIELD
+
- - + + -

Total Runners
1,2,3,4,5,6,7,8,9,10,11,12

+

Total Runners
1,2,3,4,5,6,7,8,9,10,11,12

-
- - - +
+ + + - - + + +
-
-
+
\ No newline at end of file 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 247f739..cea26a5 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 @@ -66,6 +66,11 @@ export class TouchPadMenuComponent implements OnInit { return this.selectedLabel !== null && this.selectedNumbers.length > 0; } + get showShashEnter(): boolean { + const enabledLabels = ['FOR', 'QUI', 'TAN', 'EXA', 'WSP', 'TRE', 'MJP', 'JKP', 'SJP', '.']; + return enabledLabels.includes(this.selectedLabel || ''); + } + private chunk(array: T[], size: number): T[][] { return Array.from({ length: Math.ceil(array.length / size) }, (_, i) => array.slice(i * size, i * size + size) @@ -95,16 +100,16 @@ export class TouchPadMenuComponent implements OnInit { if (this.isQUIFirstGroupComplete) { if (!this.QUIGroup2.includes(number)) { this.QUIGroup2.push(number); - this.selectedNumbers = [...this.QUIGroup1, ...this.QUIGroup2]; - this.selectionService.updatePartial({ numbers: this.selectedNumbers }); + this.selectedNumbers = [...this.QUIGroup1, '-', ...this.QUIGroup2]; } } else { if (!this.QUIGroup1.includes(number)) { this.QUIGroup1.push(number); this.selectedNumbers = [...this.QUIGroup1]; - this.selectionService.updatePartial({ numbers: this.selectedNumbers }); } } + + this.selectionService.updatePartial({ numbers: this.selectedNumbers }); } else { if (!this.selectedNumbers.includes(number)) { this.selectedNumbers.push(number); @@ -116,9 +121,9 @@ export class TouchPadMenuComponent implements OnInit { this.canPrint = false; } - isNumberDisabled(number: number) { + isNumberDisabled(number: number): boolean { if (this.selectedLabel === 'QUI') { - return this.QUIGroup1.includes(number) || this.QUIGroup2.includes(number); + return false; // ✅ Allow reuse in second group } return this.selectedNumbers.includes(number); } @@ -152,6 +157,14 @@ export class TouchPadMenuComponent implements OnInit { if (this.selectedLabel === 'QUI') { if (!this.isQUIFirstGroupComplete && this.QUIGroup1.length > 0) { this.isQUIFirstGroupComplete = true; + + // ✅ Add dash to represent separator + this.selectedNumbers = [...this.QUIGroup1, '-']; + this.QUIGroup2 = []; + + // Update to prepare for second group + this.selectionService.updatePartial({ numbers: [...this.selectedNumbers] }); + return; } } else if (this.canPrint) { this.print(); @@ -231,15 +244,14 @@ export class TouchPadMenuComponent implements OnInit { } // 🔘 FIELD Modal Logic - canUseField(): boolean { - const allowedLabels = ['WIN', 'SHP', 'THP', 'PLC', 'SHW']; - return ( - this.selectedLabel !== null && - allowedLabels.includes(this.selectedLabel) && - this.selectedNumbers.length === 0 - ); -} - + canUseField(): boolean { + const allowedLabels = ['WIN', 'SHP', 'THP', 'PLC', 'SHW']; + return ( + this.selectedLabel !== null && + allowedLabels.includes(this.selectedLabel) && + this.selectedNumbers.length === 0 + ); + } openFieldModal() { this.fieldModalOpen = true;