@hmcts/ccpay-web-component 5.0.1-beta28 → 5.0.1-beta29

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.
@@ -1394,6 +1394,7 @@
1394
1394
  this.paymentGroup = paymentgrp;
1395
1395
  this.viewStatus = 'issuerefund';
1396
1396
  this.isRefundRemission = true;
1397
+ this.paymentLibComponent.isFromServiceRequestPage = false;
1397
1398
  }
1398
1399
  }
1399
1400
  };
@@ -3774,6 +3775,7 @@
3774
3775
  if (this.chkIssueRefundBtnEnable(payment)) {
3775
3776
  this.viewStatus = 'issuerefund';
3776
3777
  this.payment = payment;
3778
+ this.paymentLibComponent.isFromServiceRequestPage = true;
3777
3779
  this.isRefundRemission = true;
3778
3780
  }
3779
3781
  }
@@ -6686,9 +6688,9 @@
6686
6688
  else if (this.selectedRefundReason.includes('Other') && this.remissionForm.controls['reason'].value !== '') {
6687
6689
  this.refundHasError = false;
6688
6690
  this.refundReason += '-' + this.remissionForm.controls['reason'].value;
6689
- this.displayRefundReason = this.remissionForm.controls['reason'].value;
6691
+ this.displayRefundReason = this.selectedRefundReason + '-' + this.remissionForm.controls['reason'].value;
6690
6692
  if (this.isFromRefundListPage) {
6691
- this.refundListReason.emit({ reason: this.selectedRefundReason, code: this.refundReason });
6693
+ this.refundListReason.emit({ reason: this.displayRefundReason, code: this.refundReason });
6692
6694
  }
6693
6695
  else {
6694
6696
  this.viewCompStatus = '';
@@ -6908,15 +6910,6 @@
6908
6910
  this.paymentLibComponent.ISNEWPCIPALOFF = this.isNewPcipalOff;
6909
6911
  this.paymentLibComponent.ISOLDPCIPALOFF = this.isOldPcipalOff;
6910
6912
  this.paymentLibComponent.isFromServiceRequestPage = true;
6911
- // this.paymentViewService.getBSfeature().subscribe(
6912
- // features => {
6913
- // let result = JSON.parse(features).filter(feature => feature.uid === BS_ENABLE_FLAG);
6914
- // this.paymentLibComponent.ISBSENABLE = result[0] ? result[0].enable : false;
6915
- // },
6916
- // err => {
6917
- // this.paymentLibComponent.ISBSENABLE = false;
6918
- // }
6919
- // );
6920
6913
  this.paymentLibComponent.ISBSENABLE = true;
6921
6914
  /** @type {?} */
6922
6915
  var partUrl = this.bsPaymentDcnNumber ? "&dcn=" + this.bsPaymentDcnNumber : '';
@@ -7009,49 +7002,61 @@
7009
7002
  */
7010
7003
  function (event) {
7011
7004
  event.preventDefault();
7012
- this.OrderslistService.setnavigationPage('casetransactions');
7013
- this.OrderslistService.setisFromServiceRequestPage(false);
7014
- this.paymentLibComponent.viewName = 'case-transactions';
7015
- this.paymentLibComponent.ISBSENABLE = true;
7016
- // // if (this.paymentLibComponent.REFUNDLIST) {
7017
- // // this.paymentLibComponent.viewName = 'refund-list';
7018
- // // return;
7019
- // // }
7020
- // // if (this.paymentLibComponent.TAKEPAYMENT === undefined && this.paymentLibComponent.SERVICEREQUEST === undefined) {
7021
- // // this.paymentLibComponent.SERVICEREQUEST = 'false';
7022
- // // }
7023
- // // this.OrderslistService.setisFromServiceRequestPage(false);
7024
- // // this.OrderslistService.setpaymentPageView({method: '',payment_group_reference: '', reference:''});
7025
- // // this.OrderslistService.setnavigationPage('casetransactions');
7026
- // // this.errorMessage = '';
7027
- // // this.paymentLibComponent.viewName = 'case-transactions';
7028
- // // //this.paymentLibComponent.TAKEPAYMENT = true;
7029
- // // this.paymentLibComponent.ISTURNOFF = this.isTurnOff;
7030
- // // this.paymentLibComponent.ISNEWPCIPALOFF = this.isNewPcipalOff;
7031
- // // this.paymentLibComponent.ISOLDPCIPALOFF = this.isOldPcipalOff;
7032
- // // this.paymentLibComponent.isFromServiceRequestPage = true;
7033
- // // this.paymentLibComponent.ISBSENABLE = true;
7034
- // // let partUrl = this.bsPaymentDcnNumber ? `&dcn=${this.bsPaymentDcnNumber}` : '';
7035
- // // partUrl += this.paymentLibComponent.ISBSENABLE ? '&isBulkScanning=Enable' : '&isBulkScanning=Disable';
7036
- // // partUrl += this.paymentLibComponent.ISTURNOFF ? '&isTurnOff=Enable' : '&isTurnOff=Disable';
7037
- // // partUrl += this.isStrategicFixEnable ? '&isStFixEnable=Enable' : '&isStFixEnable=Disable';
7038
- // // partUrl += `&caseType=${this.caseType}`;
7039
- // // partUrl += this.paymentLibComponent.ISNEWPCIPALOFF ? '&isNewPcipalOff=Enable' : '&isNewPcipalOff=Disable';
7040
- // // partUrl += this.paymentLibComponent.ISOLDPCIPALOFF ? '&isOldPcipalOff=Enable' : '&isOldPcipalOff=Disable';
7041
- // // if(this.isFromPaymentDetailPage) {
7042
- // // partUrl += this.paymentLibComponent.isFromPaymentDetailPage
7043
- // // }
7044
- // // if(!this.paymentLibComponent.SERVICEREQUEST) {
7045
- // // const url = `/payment-history/${this.ccdCaseNumber}?view=case-transactions&takePayment=${this.paymentLibComponent.TAKEPAYMENT}&selectedOption=${this.option}${partUrl}`;
7046
- // // this.router.routeReuseStrategy.shouldReuseRoute = () => false;
7047
- // // this.router.onSameUrlNavigation = 'reload';
7048
- // // this.router.navigateByUrl(url);
7049
- // // } else {
7050
- // // const url =`/payment-history/${this.ccdCaseNumber}?selectedOption=${this.option}${partUrl}`;
7051
- // // this.router.routeReuseStrategy.shouldReuseRoute = () => false;
7052
- // // this.router.onSameUrlNavigation = 'reload';
7053
- // // this.router.navigateByUrl(url);
7054
- // // }
7005
+ if (!this.paymentLibComponent.isFromServiceRequestPage) {
7006
+ this.OrderslistService.setnavigationPage('casetransactions');
7007
+ this.OrderslistService.setisFromServiceRequestPage(false);
7008
+ this.paymentLibComponent.viewName = 'case-transactions';
7009
+ this.paymentLibComponent.ISBSENABLE = true;
7010
+ }
7011
+ else {
7012
+ if (this.paymentLibComponent.REFUNDLIST) {
7013
+ this.paymentLibComponent.viewName = 'refund-list';
7014
+ return;
7015
+ }
7016
+ if (this.paymentLibComponent.TAKEPAYMENT === undefined && this.paymentLibComponent.SERVICEREQUEST === undefined) {
7017
+ this.paymentLibComponent.SERVICEREQUEST = 'false';
7018
+ }
7019
+ this.OrderslistService.setisFromServiceRequestPage(false);
7020
+ this.OrderslistService.setpaymentPageView({ method: '', payment_group_reference: '', reference: '' });
7021
+ this.OrderslistService.setnavigationPage('casetransactions');
7022
+ this.errorMessage = '';
7023
+ this.paymentLibComponent.viewName = 'case-transactions';
7024
+ //this.paymentLibComponent.TAKEPAYMENT = true;
7025
+ this.paymentLibComponent.ISTURNOFF = this.isTurnOff;
7026
+ this.paymentLibComponent.ISNEWPCIPALOFF = this.isNewPcipalOff;
7027
+ this.paymentLibComponent.ISOLDPCIPALOFF = this.isOldPcipalOff;
7028
+ this.paymentLibComponent.isFromServiceRequestPage = true;
7029
+ this.paymentLibComponent.ISBSENABLE = true;
7030
+ /** @type {?} */
7031
+ var partUrl = this.bsPaymentDcnNumber ? "&dcn=" + this.bsPaymentDcnNumber : '';
7032
+ partUrl += this.paymentLibComponent.ISBSENABLE ? '&isBulkScanning=Enable' : '&isBulkScanning=Disable';
7033
+ partUrl += this.paymentLibComponent.ISTURNOFF ? '&isTurnOff=Enable' : '&isTurnOff=Disable';
7034
+ partUrl += this.isStrategicFixEnable ? '&isStFixEnable=Enable' : '&isStFixEnable=Disable';
7035
+ partUrl += "&caseType=" + this.caseType;
7036
+ partUrl += this.paymentLibComponent.ISNEWPCIPALOFF ? '&isNewPcipalOff=Enable' : '&isNewPcipalOff=Disable';
7037
+ partUrl += this.paymentLibComponent.ISOLDPCIPALOFF ? '&isOldPcipalOff=Enable' : '&isOldPcipalOff=Disable';
7038
+ if (this.isFromPaymentDetailPage) {
7039
+ partUrl += this.paymentLibComponent.isFromPaymentDetailPage;
7040
+ }
7041
+ if (!this.paymentLibComponent.SERVICEREQUEST) {
7042
+ /** @type {?} */
7043
+ var url = "/payment-history/" + this.ccdCaseNumber + "?view=case-transactions&takePayment=" + this.paymentLibComponent.TAKEPAYMENT + "&selectedOption=" + this.option + partUrl;
7044
+ this.router.routeReuseStrategy.shouldReuseRoute = ( /**
7045
+ * @return {?}
7046
+ */function () { return false; });
7047
+ this.router.onSameUrlNavigation = 'reload';
7048
+ this.router.navigateByUrl(url);
7049
+ }
7050
+ else {
7051
+ /** @type {?} */
7052
+ var url = "/payment-history/" + this.ccdCaseNumber + "?selectedOption=" + this.option + partUrl;
7053
+ this.router.routeReuseStrategy.shouldReuseRoute = ( /**
7054
+ * @return {?}
7055
+ */function () { return false; });
7056
+ this.router.onSameUrlNavigation = 'reload';
7057
+ this.router.navigateByUrl(url);
7058
+ }
7059
+ }
7055
7060
  };
7056
7061
  /**
7057
7062
  * @param {?} currency
@@ -7807,11 +7812,12 @@
7807
7812
  * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
7808
7813
  */
7809
7814
  var TableComponent = /** @class */ (function () {
7810
- function TableComponent(paymentLibComponent, cdRef, OrderslistService$$1, router$$1) {
7815
+ function TableComponent(paymentLibComponent, cdRef, OrderslistService$$1, router$$1, activeRoute) {
7811
7816
  this.paymentLibComponent = paymentLibComponent;
7812
7817
  this.cdRef = cdRef;
7813
7818
  this.OrderslistService = OrderslistService$$1;
7814
7819
  this.router = router$$1;
7820
+ this.activeRoute = activeRoute;
7815
7821
  // displayedColumns = ['ccdCaseNumber', 'refundReference', 'reason', 'createBy', 'updateDate', 'Action'];
7816
7822
  this.displayedColumns = ['ccd_case_number', 'refund_reference', 'user_full_name', 'date_created', 'date_updated', 'Action'];
7817
7823
  }
@@ -7942,16 +7948,7 @@
7942
7948
  * @return {?}
7943
7949
  */
7944
7950
  function (ccdCaseNumber, refundData) {
7945
- /** @type {?} */
7946
- var url = "/cases/case-details/:" + ccdCaseNumber;
7947
- console.log(url);
7948
- console.log(this.router.getCurrentNavigation());
7949
- this.router.routeReuseStrategy.shouldReuseRoute = ( /**
7950
- * @return {?}
7951
- */function () { return false; });
7952
- this.router.onSameUrlNavigation = 'reload';
7953
- this.router.navigateByUrl(url);
7954
- console.log(this.router.getCurrentNavigation());
7951
+ this.router.navigate(["/cases/case-details/:" + ccdCaseNumber], { relativeTo: this.activeRoute });
7955
7952
  };
7956
7953
  TableComponent.decorators = [
7957
7954
  { type: i0.Component, args: [{
@@ -7966,7 +7963,8 @@
7966
7963
  { type: PaymentLibComponent },
7967
7964
  { type: i0.ChangeDetectorRef },
7968
7965
  { type: OrderslistService },
7969
- { type: router.Router }
7966
+ { type: router.Router },
7967
+ { type: router.ActivatedRoute }
7970
7968
  ];
7971
7969
  };
7972
7970
  TableComponent.propDecorators = {