From aa1471e89ce861fa425493ebf1fcff079474fbf7 Mon Sep 17 00:00:00 2001 From: karthik Date: Mon, 28 Jul 2025 13:58:45 +0530 Subject: [PATCH] fix : box logic for FOR is working --- .../app/components/selection.service/selection.service.ts | 4 ++-- .../components/touch-pad-menu/touch-pad-menu.component.ts | 7 ++++++- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/btc-UI/src/app/components/selection.service/selection.service.ts b/btc-UI/src/app/components/selection.service/selection.service.ts index 264fd45..f1180e9 100644 --- a/btc-UI/src/app/components/selection.service/selection.service.ts +++ b/btc-UI/src/app/components/selection.service/selection.service.ts @@ -1,4 +1,4 @@ -// ✅ Final SelectionService.ts with strict FOR logic, split from QUI +// ✅ Final SelectionService.ts with strict QUI logic import { Injectable } from '@angular/core'; import { BehaviorSubject } from 'rxjs'; @@ -82,7 +82,7 @@ export class SelectionService { } else { for (const a of group1) { for (const b of group2) { - combinations++; + if (a !== b) combinations++; } } updated.numbers = [...group1, '-', ...group2]; 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 faf3750..77a964f 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 @@ -78,8 +78,13 @@ export class TouchPadMenuComponent implements OnInit { } get showShashEnter(): boolean { + const label = this.selectedLabel || ''; + const isBoxed = this.isBoxed; + if (['FOR', 'QUI', 'TAN'].includes(label) && isBoxed) { + return false; + } const specialLabels = ['FOR', 'QUI', 'TAN', 'EXA', 'WSP', 'TRE', 'MJP', 'JKP', '.']; - return specialLabels.includes(this.selectedLabel || ''); + return specialLabels.includes(label); } get isShashEnterDisabled(): boolean {