digipay-utility-payment 0.0.3 → 0.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Binary file
@@ -1198,9 +1198,9 @@ class NoDataComponent {
1198
1198
  <i class="la" [class.icon]="icon"></i>
1199
1199
  </div>
1200
1200
  }
1201
- <p class="text-muted">{{ title }}</p>
1201
+ <p class="text-muted">{{ title | translate }}</p>
1202
1202
  </div>
1203
- `, isInline: true });
1203
+ `, isInline: true, dependencies: [{ kind: "ngmodule", type: SharedModule }, { kind: "pipe", type: TranslatePipe, name: "translate" }] });
1204
1204
  }
1205
1205
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.17", ngImport: i0, type: NoDataComponent, decorators: [{
1206
1206
  type: Component,
@@ -1213,10 +1213,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.17", ngImpo
1213
1213
  <i class="la" [class.icon]="icon"></i>
1214
1214
  </div>
1215
1215
  }
1216
- <p class="text-muted">{{ title }}</p>
1216
+ <p class="text-muted">{{ title | translate }}</p>
1217
1217
  </div>
1218
1218
  `,
1219
1219
  standalone: true,
1220
+ imports: [SharedModule],
1220
1221
  }]
1221
1222
  }], propDecorators: { title: [{
1222
1223
  type: Input
@@ -1531,7 +1532,7 @@ class BillWorkflowComponent {
1531
1532
  }
1532
1533
  }
1533
1534
  else {
1534
- this.toasterService.error(res?.error[0]);
1535
+ this.toasterService.error(this.translationService.translate(res?.error[0]));
1535
1536
  this.proceedToBillReview();
1536
1537
  }
1537
1538
  },
@@ -3134,6 +3135,7 @@ class ViewBillsComponent {
3134
3135
  router = inject(Router);
3135
3136
  dataService = inject(DataService);
3136
3137
  sdkState = inject(SdkStateService, { optional: true });
3138
+ translationService = inject(TranslationService);
3137
3139
  currency = null;
3138
3140
  showLoader = false;
3139
3141
  billsData = null;
@@ -3227,7 +3229,7 @@ class ViewBillsComponent {
3227
3229
  this.billsData = res?.data;
3228
3230
  }
3229
3231
  else {
3230
- this.toasterService.error(res?.error[0]);
3232
+ this.toasterService.error(this.translationService.translate(res?.error[0]));
3231
3233
  }
3232
3234
  },
3233
3235
  });
@@ -3298,7 +3300,7 @@ class ViewBillsComponent {
3298
3300
  }
3299
3301
  }
3300
3302
  else {
3301
- this.toasterService.error(res?.error[0]);
3303
+ this.toasterService.error(this.translationService.translate(res?.error[0]));
3302
3304
  this.topupAndBillpaymentService.saveBillData({
3303
3305
  selectedBill: billData,
3304
3306
  user_info: this.billsData?.user_info
@@ -4286,7 +4288,7 @@ class TopupAndBillpaymentReviewComponent extends TransactionClass {
4286
4288
  if (response.success) {
4287
4289
  clearInterval(this.interval);
4288
4290
  this.hideModal("OTPVerification");
4289
- this.toasterService.success(response?.data?.message);
4291
+ this.toasterService.success(this.translationService.translate(response?.data?.message));
4290
4292
  if (this.inValidTxnPin) {
4291
4293
  this.inValidTxnPin = false;
4292
4294
  this.isTxnPinCreated = false;
@@ -4301,7 +4303,7 @@ class TopupAndBillpaymentReviewComponent extends TransactionClass {
4301
4303
  this.otpReset = true;
4302
4304
  }
4303
4305
  else {
4304
- this.toasterService.error(response?.error[0]);
4306
+ this.toasterService.error(this.translationService.translate(response?.error[0]));
4305
4307
  }
4306
4308
  },
4307
4309
  error: () => {
@@ -4383,7 +4385,7 @@ class TopupAndBillpaymentReviewComponent extends TransactionClass {
4383
4385
  next: (response) => {
4384
4386
  this.showLoader = false;
4385
4387
  if (response.success) {
4386
- this.toasterService.success(response?.data?.message);
4388
+ this.toasterService.success(this.translationService.translate(response?.data?.message));
4387
4389
  this.showModal("OTPVerification");
4388
4390
  if (this.otpResendTime > 0) {
4389
4391
  this.timer = this.otpResendTime;
@@ -4398,7 +4400,7 @@ class TopupAndBillpaymentReviewComponent extends TransactionClass {
4398
4400
  }
4399
4401
  }
4400
4402
  else {
4401
- this.toasterService.error(response?.error[0]);
4403
+ this.toasterService.error(this.translationService.translate(response?.error[0]));
4402
4404
  }
4403
4405
  },
4404
4406
  error: () => {
@@ -4453,7 +4455,7 @@ class TopupAndBillpaymentReviewComponent extends TransactionClass {
4453
4455
  || error?.error?.error
4454
4456
  || error?.error?.message
4455
4457
  || this.translationService.translate("LABEL_SOMETHING_WENT_WRONG");
4456
- this.toasterService.error(apiError);
4458
+ this.toasterService.error(this.translationService.translate(apiError));
4457
4459
  },
4458
4460
  });
4459
4461
  }
@@ -4475,12 +4477,12 @@ class TopupAndBillpaymentReviewComponent extends TransactionClass {
4475
4477
  next: (res) => {
4476
4478
  this.showLoader = false;
4477
4479
  if (res?.success) {
4478
- this.toasterService.success(res?.data.message);
4480
+ this.toasterService.success(this.translationService.translate(res?.data.message));
4479
4481
  this.createSession(this.enteredPIN ?? undefined);
4480
4482
  this.hideModal("ConfirmTransactionPIN");
4481
4483
  }
4482
4484
  else {
4483
- this.toasterService.error(res?.error[0]);
4485
+ this.toasterService.error(this.translationService.translate(res?.error[0]));
4484
4486
  }
4485
4487
  },
4486
4488
  error: () => {
@@ -4617,7 +4619,7 @@ class TopupAndBillpaymentReviewComponent extends TransactionClass {
4617
4619
  credit_account_type_id: this.adminUserDetails?.id,
4618
4620
  username: this.vendorContractDetails?.contact_person_name,
4619
4621
  },
4620
- txn_amount: 10, // (this.providerCode == 'DBA_PREPAID_ELECTRICITY' || this.providerCode == 'DBA_POSTPAID_ELECTRICITY') ? parseFloat(this.userAmountWithoutCharge) : txnAmount,
4622
+ txn_amount: (this.providerCode == 'DBA_PREPAID_ELECTRICITY' || this.providerCode == 'DBA_POSTPAID_ELECTRICITY') ? parseFloat(this.userAmountWithoutCharge) : txnAmount,
4621
4623
  txn_code: txnCode,
4622
4624
  payment_mode: PAYMENT_MODE.WALLET,
4623
4625
  txn_device_info: null,
@@ -4687,7 +4689,7 @@ class TopupAndBillpaymentReviewComponent extends TransactionClass {
4687
4689
  this.latestTransactionPayload = txnPayload;
4688
4690
  // txnPayload.amount = Math.floor(Math.random() + Math.floor(Math.random() + 2))
4689
4691
  if (!this.proceedToPayment) {
4690
- this.toasterService.error('LABEL_BILL_OVER_DUE');
4692
+ this.toasterService.error(this.translationService.translate('LABEL_BILL_OVER_DUE'));
4691
4693
  this.showLoader = false;
4692
4694
  return;
4693
4695
  }
@@ -4735,23 +4737,23 @@ class TopupAndBillpaymentReviewComponent extends TransactionClass {
4735
4737
  }
4736
4738
  else {
4737
4739
  this.showLoader = false;
4738
- this.toasterService.error(statusResponse?.error?.[0] || this.translationService.translate("LABEL_SOMETHING_WENT_WRONG"));
4740
+ this.toasterService.error(this.translationService.translate(statusResponse?.error[0] || "LABEL_SOMETHING_WENT_WRONG"));
4739
4741
  }
4740
4742
  },
4741
4743
  error: (statusError) => {
4742
4744
  this.showLoader = false;
4743
- this.toasterService.error(statusError?.error?.error || this.translationService.translate("LABEL_SOMETHING_WENT_WRONG"));
4745
+ this.toasterService.error(this.translationService.translate(statusError?.error?.error || "LABEL_SOMETHING_WENT_WRONG"));
4744
4746
  },
4745
4747
  });
4746
4748
  }
4747
4749
  else {
4748
4750
  this.showLoader = false;
4749
- this.toasterService.error(payBillResponse?.error?.[0] || this.translationService.translate("LABEL_SOMETHING_WENT_WRONG"));
4751
+ this.toasterService.error(this.translationService.translate(payBillResponse?.error?.[0] || "LABEL_SOMETHING_WENT_WRONG"));
4750
4752
  }
4751
4753
  },
4752
4754
  error: (payBillError) => {
4753
4755
  this.showLoader = false;
4754
- this.toasterService.error(payBillError?.error?.error || this.translationService.translate("LABEL_SOMETHING_WENT_WRONG"));
4756
+ this.toasterService.error(this.translationService.translate(payBillError?.error?.error || "LABEL_SOMETHING_WENT_WRONG"));
4755
4757
  },
4756
4758
  });
4757
4759
  }
@@ -4835,34 +4837,34 @@ class TopupAndBillpaymentReviewComponent extends TransactionClass {
4835
4837
  }
4836
4838
  else {
4837
4839
  this.showLoader = false;
4838
- this.toasterService.error(statusResponse?.error?.[0] || this.translationService.translate("LABEL_SOMETHING_WENT_WRONG"));
4840
+ this.toasterService.error(this.translationService.translate(statusResponse?.error?.[0] || "LABEL_SOMETHING_WENT_WRONG"));
4839
4841
  }
4840
4842
  },
4841
4843
  error: (statusError) => {
4842
4844
  this.showLoader = false;
4843
- this.toasterService.error(statusError?.error?.error || this.translationService.translate("LABEL_SOMETHING_WENT_WRONG"));
4845
+ this.toasterService.error(this.translationService.translate(statusError?.error?.error || "LABEL_SOMETHING_WENT_WRONG"));
4844
4846
  },
4845
4847
  });
4846
4848
  }
4847
4849
  else {
4848
4850
  this.showLoader = false;
4849
- this.toasterService.error(payBillResponse?.error?.[0] || this.translationService.translate("LABEL_SOMETHING_WENT_WRONG"));
4851
+ this.toasterService.error(this.translationService.translate(payBillResponse?.error?.[0] || "LABEL_SOMETHING_WENT_WRONG"));
4850
4852
  }
4851
4853
  },
4852
4854
  error: (payBillError) => {
4853
4855
  this.showLoader = false;
4854
- this.toasterService.error(payBillError?.error?.error || this.translationService.translate("LABEL_SOMETHING_WENT_WRONG"));
4856
+ this.toasterService.error(this.translationService.translate(payBillError?.error?.error || "LABEL_SOMETHING_WENT_WRONG"));
4855
4857
  },
4856
4858
  });
4857
4859
  }
4858
4860
  else {
4859
4861
  this.showLoader = false;
4860
- this.toasterService.error(response?.error[0]);
4862
+ this.toasterService.error(this.translationService.translate(response?.error[0]));
4861
4863
  }
4862
4864
  },
4863
4865
  error: (error) => {
4864
4866
  this.showLoader = false;
4865
- this.toasterService.error(error?.error?.error);
4867
+ this.toasterService.error(this.translationService.translate(error?.error?.error));
4866
4868
  },
4867
4869
  });
4868
4870
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "digipay-utility-payment",
3
- "version": "0.0.3",
3
+ "version": "0.0.5",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "^20.3.0",
6
6
  "@angular/core": "^20.3.0"