@hmcts/ccpay-web-component 5.0.1-beta151 → 5.0.1-beta152

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.
@@ -3970,17 +3970,13 @@ var CaseTransactionsComponent = /** @class */ (function () {
3970
3970
  }
3971
3971
  }));
3972
3972
  }
3973
- _this.orderPendingPayments = (_this.orderFeesTotal - _this.orderRemissionTotal) - _this.orderTotalPayments;
3974
- if (_this.orderPendingPayments <= 0.00) {
3975
- _this.orderStatus = 'Paid';
3973
+ // this.orderPendingPayments = (this.orderFeesTotal - this.orderRemissionTotal) - this.orderTotalPayments;
3974
+ if (paymentGroup.service_request_status === 'Paid') {
3975
+ _this.orderStatus = paymentGroup.service_request_status;
3976
3976
  _this.orderAddBtnEnable = false;
3977
3977
  }
3978
- else if (_this.orderFeesTotal > 0 && (_this.orderTotalPayments > 0 || _this.orderRemissionTotal > 0) && (_this.orderTotalPayments < _this.orderPendingPayments)) {
3979
- _this.orderStatus = 'Partially paid';
3980
- _this.orderAddBtnEnable = true;
3981
- }
3982
- else {
3983
- _this.orderStatus = 'Not paid';
3978
+ else if (paymentGroup.service_request_status === '' || paymentGroup.service_request_status === '') {
3979
+ _this.orderStatus = paymentGroup.service_request_status;
3984
3980
  _this.orderAddBtnEnable = true;
3985
3981
  }
3986
3982
  //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']
@@ -4070,18 +4066,17 @@ var CaseTransactionsComponent = /** @class */ (function () {
4070
4066
  }));
4071
4067
  }
4072
4068
  }
4069
+ _this.orderStatus = orderDetail.service_request_status;
4073
4070
  }));
4074
- this.orderPendingPayments = (this.orderFeesTotal - this.orderRemissionTotal) - this.orderTotalPayments;
4071
+ //this.orderPendingPayments = (this.orderFeesTotal - this.orderRemissionTotal) - this.orderTotalPayments;
4075
4072
  // this.orderRef = orderReferenceObj.orderRefId;
4076
- if (this.orderPendingPayments <= 0.00) {
4077
- this.orderStatus = 'Paid';
4078
- }
4079
- else if (this.orderFeesTotal > 0 && (this.orderTotalPayments > 0 || this.orderRemissionTotal > 0) && (this.orderTotalPayments < this.orderPendingPayments)) {
4080
- this.orderStatus = 'Partially paid';
4081
- }
4082
- else {
4083
- this.orderStatus = 'Not paid';
4084
- }
4073
+ // if (this.orderPendingPayments <= 0.00) {
4074
+ // this.orderStatus = 'Paid';
4075
+ // } else if (this.orderFeesTotal > 0 && (this.orderTotalPayments > 0 || this.orderRemissionTotal > 0) && (this.orderTotalPayments < this.orderPendingPayments)) {
4076
+ // this.orderStatus = 'Partially paid'
4077
+ // } else {
4078
+ // this.orderStatus = 'Not paid'
4079
+ // }
4085
4080
  if (this.cpoDetails !== null) {
4086
4081
  this.orderParty = this.cpoDetails['responsibleParty'];
4087
4082
  this.orderCreated = this.cpoDetails['createdTimestamp'];
@@ -10871,7 +10866,12 @@ var PbaPaymentComponent = /** @class */ (function () {
10871
10866
  * @return {?}
10872
10867
  */
10873
10868
  function (r) {
10874
- _this.pbaAccountrPaymentResult = JSON.parse(r).data;
10869
+ try {
10870
+ _this.pbaAccountrPaymentResult = JSON.parse(r);
10871
+ }
10872
+ catch (e) {
10873
+ _this.pbaAccountrPaymentResult = r;
10874
+ }
10875
10875
  _this.isPBAAccountPaymentSuccess = true;
10876
10876
  }), (/**
10877
10877
  * @param {?} e