diff --git a/btc-UI/src/app/components/sidebar/sidebar.component.css b/btc-UI/src/app/components/sidebar/sidebar.component.css
index f807cf2..e26beaf 100755
--- a/btc-UI/src/app/components/sidebar/sidebar.component.css
+++ b/btc-UI/src/app/components/sidebar/sidebar.component.css
@@ -539,3 +539,19 @@ strong{
opacity: 0.5;
cursor: not-allowed;
}
+
+.deposit-print-btn[disabled]{
+ opacity: 0.5;
+ cursor: not-allowed;
+}
+
+.deposit-cancel-btn[disabled]{
+ opacity: 0.5;
+ cursor: not-allowed;
+}
+
+.erase-btn[disabled],.withdraw-print-btn[disabled] {
+ opacity: 0.5;
+ cursor: not-allowed;
+}
+
diff --git a/btc-UI/src/app/components/sidebar/sidebar.component.html b/btc-UI/src/app/components/sidebar/sidebar.component.html
index 9eaf55b..cd18dbb 100755
--- a/btc-UI/src/app/components/sidebar/sidebar.component.html
+++ b/btc-UI/src/app/components/sidebar/sidebar.component.html
@@ -42,15 +42,13 @@
{{ loadingMessage }}
-
+
@@ -67,26 +65,22 @@
id="payoutTicketNo"
class="modal-input"
[(ngModel)]="payoutTicketNo"
- />
+ (ngModelChange)="onPayoutTicketChange($event)"
+ maxlength="16"
+ />
{{ payoutWarning }}
{{ loadingMessage }}
-
-
-
+
DEPOSIT
@@ -162,11 +156,21 @@
+
{{ loadingMessage }}
@@ -243,13 +247,20 @@
+ {{ loadingMessage }}
diff --git a/btc-UI/src/app/components/sidebar/sidebar.component.ts b/btc-UI/src/app/components/sidebar/sidebar.component.ts
index 9caba0a..07bb864 100755
--- a/btc-UI/src/app/components/sidebar/sidebar.component.ts
+++ b/btc-UI/src/app/components/sidebar/sidebar.component.ts
@@ -289,6 +289,19 @@ Original Total: ₹${cancelTicketData.totalAmount}
payoutWarning = ''; // show GUI message when payout response is not as expected
+onPayoutTicketChange(value: string) {
+ if (value.length > 16) {
+ this.payoutTicketNo = value.slice(0, 16); // trim to 16
+ } else {
+ this.payoutTicketNo = value;
+ }
+
+ // if not exactly 16 chars, you can clear it completely:
+ if (this.payoutTicketNo.length !== 16) {
+ this.payoutTicketNo = '';
+ }
+}
+
async printPayoutTicket() {
console.log("🖨️ Print payout clicked");
@@ -471,7 +484,7 @@ async printDeposit() {
btId: btid,
btMake: btMake
};
-
+ this.loadingMessage = 'Printing Deposit — please wait...';
console.log("📡 Sending deposit API request:", apiPayload);
try {
@@ -633,6 +646,9 @@ ${content}
console.error("❌ Deposit API call failed:", err);
this.depositWarning = '❌ Deposit API call failed. Please try again.';
}
+ finally {
+ this.loadingMessage = ''; // ALWAYS clear loading message
+ }
}
//--------------------------------------PRINT DEPOSIT TICKET ENDS HERE -------------------------------------------------------------