fix : box disabiling according to number selection (tan,qui & for)

This commit is contained in:
karthik 2025-08-14 13:22:03 +05:30
parent 200360cb68
commit 7d383587cf

View File

@ -244,13 +244,17 @@ export class TouchPadMenuComponent implements OnInit, OnDestroy {
get isBoxToggleDisabled(): boolean {
if (!this.selectedLabel) return true;
const disallowedBoxLabels = ['WIN', 'SHP', 'THP', 'PLC', 'WSP','SHW', 'TRE', 'MJP', 'JKP'];
const disallowedBoxLabels = ['WIN', 'SHP', 'THP', 'PLC', 'WSP', 'SHW', 'TRE', 'MJP', 'JKP'];
if (disallowedBoxLabels.includes(this.selectedLabel)) {
return true;
}
if (this.selectedNumbers.includes('F')) {
return true;
}
// Disable Box toggle for TAN, QUI, FOR after any number is selected
if (['TAN', 'QUI', 'FOR'].includes(this.selectedLabel) && this.selectedNumbers.length > 0) {
return true;
}
return false;
}