@hmcts/ccpay-web-component 6.0.0-beta16 → 6.0.0-beta17

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.
@@ -3483,17 +3483,13 @@ var CaseTransactionsComponent = /** @class */ (function () {
3483
3483
  }
3484
3484
  }));
3485
3485
  }
3486
- _this.orderPendingPayments = (_this.orderFeesTotal - _this.orderRemissionTotal) - _this.orderTotalPayments;
3487
- if (_this.orderPendingPayments <= 0.00) {
3488
- _this.orderStatus = 'Paid';
3486
+ // this.orderPendingPayments = (this.orderFeesTotal - this.orderRemissionTotal) - this.orderTotalPayments;
3487
+ if (paymentGroup.service_request_status === 'Paid') {
3488
+ _this.orderStatus = paymentGroup.service_request_status;
3489
3489
  _this.orderAddBtnEnable = false;
3490
3490
  }
3491
- else if (_this.orderFeesTotal > 0 && (_this.orderTotalPayments > 0 || _this.orderRemissionTotal > 0) && (_this.orderTotalPayments < _this.orderPendingPayments)) {
3492
- _this.orderStatus = 'Partially paid';
3493
- _this.orderAddBtnEnable = true;
3494
- }
3495
- else {
3496
- _this.orderStatus = 'Not paid';
3491
+ else if (paymentGroup.service_request_status === 'Partially paid' || paymentGroup.service_request_status === 'Not paid') {
3492
+ _this.orderStatus = paymentGroup.service_request_status;
3497
3493
  _this.orderAddBtnEnable = true;
3498
3494
  }
3499
3495
  //this.orderLevelFees.push({orderRefId:paymentGroup['payment_group_reference'],orderTotalFees: this.orderFeesTotal,orderStatus: this.orderStatus,orderParty:'Santosh', orderCCDEvent:'Case Creation',orderCreated: new Date(), orderAddBtnEnable: this.orderAddBtnEnable}); this.cpoDetails['createdTimestamp']
@@ -3583,18 +3579,17 @@ var CaseTransactionsComponent = /** @class */ (function () {
3583
3579
  }));
3584
3580
  }
3585
3581
  }
3582
+ _this.orderStatus = orderDetail.service_request_status;
3586
3583
  }));
3587
- this.orderPendingPayments = (this.orderFeesTotal - this.orderRemissionTotal) - this.orderTotalPayments;
3584
+ //this.orderPendingPayments = (this.orderFeesTotal - this.orderRemissionTotal) - this.orderTotalPayments;
3588
3585
  // this.orderRef = orderReferenceObj.orderRefId;
3589
- if (this.orderPendingPayments <= 0.00) {
3590
- this.orderStatus = 'Paid';
3591
- }
3592
- else if (this.orderFeesTotal > 0 && (this.orderTotalPayments > 0 || this.orderRemissionTotal > 0) && (this.orderTotalPayments < this.orderPendingPayments)) {
3593
- this.orderStatus = 'Partially paid';
3594
- }
3595
- else {
3596
- this.orderStatus = 'Not paid';
3597
- }
3586
+ // if (this.orderPendingPayments <= 0.00) {
3587
+ // this.orderStatus = 'Paid';
3588
+ // } else if (this.orderFeesTotal > 0 && (this.orderTotalPayments > 0 || this.orderRemissionTotal > 0) && (this.orderTotalPayments < this.orderPendingPayments)) {
3589
+ // this.orderStatus = 'Partially paid'
3590
+ // } else {
3591
+ // this.orderStatus = 'Not paid'
3592
+ // }
3598
3593
  if (this.cpoDetails !== null) {
3599
3594
  this.orderParty = this.cpoDetails['responsibleParty'];
3600
3595
  this.orderCreated = this.cpoDetails['createdTimestamp'];
@@ -9623,7 +9618,12 @@ var PbaPaymentComponent = /** @class */ (function () {
9623
9618
  * @return {?}
9624
9619
  */
9625
9620
  function (r) {
9626
- _this.pbaAccountrPaymentResult = JSON.parse(r).data;
9621
+ try {
9622
+ _this.pbaAccountrPaymentResult = JSON.parse(r);
9623
+ }
9624
+ catch (e) {
9625
+ _this.pbaAccountrPaymentResult = r;
9626
+ }
9627
9627
  _this.isPBAAccountPaymentSuccess = true;
9628
9628
  }), (/**
9629
9629
  * @param {?} e