fix : enter and shash enter has better working things (qui, tan,for)

This commit is contained in:
karthik 2025-07-26 23:09:23 +05:30
parent 3f1081b014
commit f7552a8479
2 changed files with 19 additions and 12 deletions

View File

@ -19,11 +19,12 @@
<button
*ngIf="showShashEnter"
class="btn btn-dark"
[disabled]="twoGroupLabels.includes(selectedLabel || '') && isFirstGroupComplete"
(click)="padEnter()"
[disabled]="isShashEnterDisabled"
(click)="onShashEnter()"
>
shash ENTER
</button>
<button class="btn btn-dark">COPY</button>
<button class="btn btn-danger btn-bkp" *ngIf="showBackspace" (click)="removeLastNumber()">BKP</button>
@ -96,7 +97,7 @@
</ng-container>
<div class="col-6">
<button class="btn btn-secondary w-100 number-button" [disabled]="!numericPadEnabled" (click)="padEnter()">Enter</button>
<button class="btn btn-secondary w-100 number-button" [disabled]="!numericPadEnabled" (click)="onPadEnter()">Enter</button>
</div>
<div class="col-6">
<button class="btn btn-secondary w-100 number-button" [disabled]="!canPrint" (click)="print()">Print</button>

View File

@ -1,3 +1,4 @@
// ... same imports
import { Component, Input, OnInit } from '@angular/core';
import { CommonModule } from '@angular/common';
import { SelectionService } from '../selection.service/selection.service';
@ -162,7 +163,14 @@ export class TouchPadMenuComponent implements OnInit {
return this.selectedNumbers.includes(number);
}
padEnter() {
// 👉 Changed from padEnter to split into two handlers
onPadEnter() {
if (this.canPrint) {
this.print();
}
}
onShashEnter() {
if (this.selectedLabel === 'TAN') {
if (this.tanGroupStage < 2) {
this.tanGroupStage++;
@ -183,8 +191,6 @@ export class TouchPadMenuComponent implements OnInit {
this.selectionService.updatePartial({ numbers: [...this.selectedNumbers] });
return;
}
} else if (this.canPrint) {
this.print();
}
}