@hmcts/ccpay-web-component 5.1.0-beta03 → 5.2.0

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.
Files changed (121) hide show
  1. package/bundles/hmcts-ccpay-web-component.umd.js +1727 -509
  2. package/bundles/hmcts-ccpay-web-component.umd.js.map +1 -1
  3. package/bundles/hmcts-ccpay-web-component.umd.min.js +1 -1
  4. package/bundles/hmcts-ccpay-web-component.umd.min.js.map +1 -1
  5. package/esm2015/hmcts-ccpay-web-component.js +35 -32
  6. package/esm2015/lib/components/add-remission/add-remission.component.js +473 -116
  7. package/esm2015/lib/components/allocate-payments/allocate-payments.component.js +3 -3
  8. package/esm2015/lib/components/case-transactions/case-transactions.component.js +26 -15
  9. package/esm2015/lib/components/contact-details/contact-details.component.js +315 -0
  10. package/esm2015/lib/components/fee-summary/fee-summary.component.js +15 -10
  11. package/esm2015/lib/components/mark-unidentified-payment/mark-unidentified-payment.component.js +1 -1
  12. package/esm2015/lib/components/mark-unsolicited-payment/mark-unsolicited-payment.component.js +1 -1
  13. package/esm2015/lib/components/notification-preview/notification-preview.component.js +59 -0
  14. package/esm2015/lib/components/payment-list/payment-list.component.js +1 -1
  15. package/esm2015/lib/components/payment-view/payment-view.component.js +133 -75
  16. package/esm2015/lib/components/pba-payment/pba-payment.component.js +3 -3
  17. package/esm2015/lib/components/process-refund/process-refund.component.js +146 -41
  18. package/esm2015/lib/components/processed-payments/processed-payments.component.js +1 -1
  19. package/esm2015/lib/components/refund-list/refund-list.component.js +3 -3
  20. package/esm2015/lib/components/refund-status/refund-status.component.js +165 -38
  21. package/esm2015/lib/components/reports/reports.component.js +2 -2
  22. package/esm2015/lib/components/service-request/service-request.component.js +160 -102
  23. package/esm2015/lib/components/status-history/status-history.component.js +2 -2
  24. package/esm2015/lib/components/table/table.component.js +7 -4
  25. package/esm2015/lib/components/unprocessed-payments/unprocessed-payments.component.js +2 -2
  26. package/esm2015/lib/interfaces/IFee.js +1 -1
  27. package/esm2015/lib/interfaces/INotificationPreview.js +2 -0
  28. package/esm2015/lib/interfaces/IPayment.js +1 -1
  29. package/esm2015/lib/interfaces/IPutNotificationRequest.js +11 -0
  30. package/esm2015/lib/interfaces/IRefundContactDetails.js +2 -0
  31. package/esm2015/lib/interfaces/IRefundFee.js +2 -0
  32. package/esm2015/lib/interfaces/IRefundList.js +1 -1
  33. package/esm2015/lib/interfaces/IRefundsNotifications.js +2 -0
  34. package/esm2015/lib/interfaces/IRemission.js +1 -1
  35. package/esm2015/lib/interfaces/IResubmitRefundRequest.js +4 -2
  36. package/esm2015/lib/interfaces/NotificationPreviewRequest.js +37 -0
  37. package/esm2015/lib/interfaces/PostIssueRefundRetroRemission.js +3 -2
  38. package/esm2015/lib/interfaces/PostRefundRetroRemission.js +6 -2
  39. package/esm2015/lib/payment-lib.component.js +8 -2
  40. package/esm2015/lib/payment-lib.module.js +6 -2
  41. package/esm2015/lib/payment-lib.service.js +7 -1
  42. package/esm2015/lib/services/notification/notification.service.js +70 -0
  43. package/esm2015/lib/services/payment-view/payment-view.service.js +15 -7
  44. package/esm2015/lib/services/refunds/refunds.service.js +4 -1
  45. package/esm2015/lib/services/shared/httpclient/webcomponent.http.client.js +1 -1
  46. package/esm2015/lib/services/xl-file/xl-file.service.js +1 -2
  47. package/fesm2015/hmcts-ccpay-web-component.js +1673 -454
  48. package/fesm2015/hmcts-ccpay-web-component.js.map +1 -1
  49. package/hmcts-ccpay-web-component.d.ts +34 -31
  50. package/hmcts-ccpay-web-component.d.ts.map +1 -1
  51. package/hmcts-ccpay-web-component.metadata.json +1 -1
  52. package/lib/components/add-remission/add-remission.component.d.ts +55 -4
  53. package/lib/components/add-remission/add-remission.component.d.ts.map +1 -1
  54. package/lib/components/case-transactions/case-transactions.component.d.ts +2 -1
  55. package/lib/components/case-transactions/case-transactions.component.d.ts.map +1 -1
  56. package/lib/components/contact-details/contact-details.component.css.shim.ngstyle.d.ts.map +1 -0
  57. package/lib/components/contact-details/contact-details.component.d.ts +50 -0
  58. package/lib/components/contact-details/contact-details.component.d.ts.map +1 -0
  59. package/lib/components/contact-details/contact-details.component.ngfactory.d.ts.map +1 -0
  60. package/lib/components/fee-summary/fee-summary.component.d.ts.map +1 -1
  61. package/lib/components/notification-preview/notification-preview.component.d.ts +32 -0
  62. package/lib/components/notification-preview/notification-preview.component.d.ts.map +1 -0
  63. package/lib/components/notification-preview/notification-preview.component.ngfactory.d.ts.map +1 -0
  64. package/lib/components/notification-preview/notification-preview.component.scss.shim.ngstyle.d.ts.map +1 -0
  65. package/lib/components/payment-view/payment-view.component.d.ts +31 -7
  66. package/lib/components/payment-view/payment-view.component.d.ts.map +1 -1
  67. package/lib/components/payment-view/payment-view.component.scss.shim.ngstyle.d.ts.map +1 -0
  68. package/lib/components/process-refund/process-refund.component.d.ts +18 -1
  69. package/lib/components/process-refund/process-refund.component.d.ts.map +1 -1
  70. package/lib/components/refund-list/refund-list.component.d.ts.map +1 -1
  71. package/lib/components/refund-status/refund-status.component.d.ts +45 -7
  72. package/lib/components/refund-status/refund-status.component.d.ts.map +1 -1
  73. package/lib/components/service-request/service-request.component.d.ts +35 -9
  74. package/lib/components/service-request/service-request.component.d.ts.map +1 -1
  75. package/lib/components/service-request/service-request.component.scss.shim.ngstyle.d.ts.map +1 -0
  76. package/lib/components/table/table.component.d.ts +1 -0
  77. package/lib/components/table/table.component.d.ts.map +1 -1
  78. package/lib/interfaces/IFee.d.ts +6 -0
  79. package/lib/interfaces/IFee.d.ts.map +1 -1
  80. package/lib/interfaces/INotificationPreview.d.ts +28 -0
  81. package/lib/interfaces/INotificationPreview.d.ts.map +1 -0
  82. package/lib/interfaces/IPayment.d.ts +3 -0
  83. package/lib/interfaces/IPayment.d.ts.map +1 -1
  84. package/lib/interfaces/IPutNotificationRequest.d.ts +7 -0
  85. package/lib/interfaces/IPutNotificationRequest.d.ts.map +1 -0
  86. package/lib/interfaces/IRefundContactDetails.d.ts +10 -0
  87. package/lib/interfaces/IRefundContactDetails.d.ts.map +1 -0
  88. package/lib/interfaces/IRefundFee.d.ts +8 -0
  89. package/lib/interfaces/IRefundFee.d.ts.map +1 -0
  90. package/lib/interfaces/IRefundList.d.ts +5 -0
  91. package/lib/interfaces/IRefundList.d.ts.map +1 -1
  92. package/lib/interfaces/IRefundsNotifications.d.ts +17 -0
  93. package/lib/interfaces/IRefundsNotifications.d.ts.map +1 -0
  94. package/lib/interfaces/IRemission.d.ts +3 -0
  95. package/lib/interfaces/IRemission.d.ts.map +1 -1
  96. package/lib/interfaces/IResubmitRefundRequest.d.ts +5 -1
  97. package/lib/interfaces/IResubmitRefundRequest.d.ts.map +1 -1
  98. package/lib/interfaces/NotificationPreviewRequest.d.ts +25 -0
  99. package/lib/interfaces/NotificationPreviewRequest.d.ts.map +1 -0
  100. package/lib/interfaces/PostIssueRefundRetroRemission.d.ts +3 -1
  101. package/lib/interfaces/PostIssueRefundRetroRemission.d.ts.map +1 -1
  102. package/lib/interfaces/PostRefundRetroRemission.d.ts +7 -1
  103. package/lib/interfaces/PostRefundRetroRemission.d.ts.map +1 -1
  104. package/lib/payment-lib.component.d.ts +2 -0
  105. package/lib/payment-lib.component.d.ts.map +1 -1
  106. package/lib/payment-lib.module.d.ts.map +1 -1
  107. package/lib/payment-lib.module.ngfactory.d.ts.map +1 -1
  108. package/lib/payment-lib.service.d.ts +3 -0
  109. package/lib/payment-lib.service.d.ts.map +1 -1
  110. package/lib/services/notification/notification.service.d.ts +19 -0
  111. package/lib/services/notification/notification.service.d.ts.map +1 -0
  112. package/lib/services/notification/notification.service.ngfactory.d.ts.map +1 -0
  113. package/lib/services/payment-view/payment-view.service.d.ts +1 -1
  114. package/lib/services/payment-view/payment-view.service.d.ts.map +1 -1
  115. package/lib/services/refunds/refunds.service.d.ts +2 -0
  116. package/lib/services/refunds/refunds.service.d.ts.map +1 -1
  117. package/lib/services/shared/httpclient/webcomponent.http.client.d.ts.map +1 -1
  118. package/lib/services/xl-file/xl-file.service.d.ts.map +1 -1
  119. package/package.json +1 -1
  120. package/lib/components/payment-view/payment-view.component.css.shim.ngstyle.d.ts.map +0 -1
  121. package/lib/components/service-request/service-request.component.css.shim.ngstyle.d.ts.map +0 -1
@@ -37,6 +37,12 @@ class PaymentLibService {
37
37
  getRefundsApiRootUrl() {
38
38
  return this.REFUNDS_API_ROOT;
39
39
  }
40
+ setNoticationApiRootUrl(notificationapiRoot) {
41
+ this.NOTIFICATION_API_ROOT = notificationapiRoot;
42
+ }
43
+ getNoticationApiRootUrl() {
44
+ return this.NOTIFICATION_API_ROOT;
45
+ }
40
46
  setCardPaymentReturnUrl(cardPaymentReturnUrl) {
41
47
  this.CARDPAYMENTRETURNURL = cardPaymentReturnUrl;
42
48
  }
@@ -209,6 +215,7 @@ class PaymentLibComponent {
209
215
  this.cd = cd;
210
216
  this.OrderslistService = OrderslistService;
211
217
  this.unProcessedPaymentServiceId = null;
218
+ this.isFromPayBubble = false;
212
219
  this.unProcessedPayment = null;
213
220
  this.orderFeesTotal = 0.00;
214
221
  this.orderRemissionTotal = 0.00;
@@ -222,6 +229,7 @@ class PaymentLibComponent {
222
229
  this.paymentLibService.setApiRootUrl(this.API_ROOT);
223
230
  this.paymentLibService.setBulkScanApiRootUrl(this.BULKSCAN_API_ROOT);
224
231
  this.paymentLibService.setRefundndsApiRootUrl(this.REFUNDS_API_ROOT);
232
+ this.paymentLibService.setNoticationApiRootUrl(this.NOTIFICATION_API_ROOT);
225
233
  this.paymentLibService.setCardPaymentReturnUrl(this.CARDPAYMENTRETURNURL);
226
234
  if (this.LOGGEDINUSERROLES.length > 0) {
227
235
  this.OrderslistService.setUserRolesList(this.LOGGEDINUSERROLES);
@@ -248,6 +256,9 @@ class PaymentLibComponent {
248
256
  if (this.isTakePayment) {
249
257
  this.TAKEPAYMENT = true;
250
258
  }
259
+ if (this.API_ROOT == 'api/payment-history') {
260
+ this.isFromPayBubble = true;
261
+ }
251
262
  }
252
263
  }
253
264
  PaymentLibComponent.decorators = [
@@ -272,7 +283,7 @@ PaymentLibComponent.decorators = [
272
283
  <ccpay-pba-payment *ngIf="viewName === 'pba-payment'"
273
284
  [pbaPayOrderRef]="pbaPayOrderRef"
274
285
  ></ccpay-pba-payment>
275
- <ccpay-case-transactions [isTakePayment]="isTakePayment" [LOGGEDINUSERROLES]="LOGGEDINUSERROLES" *ngIf="viewName === 'case-transactions'"></ccpay-case-transactions>
286
+ <ccpay-case-transactions [isTakePayment]="isTakePayment" [isFromServiceRequestPage]="isFromServiceRequestPage" [LOGGEDINUSERROLES]="LOGGEDINUSERROLES" *ngIf="viewName === 'case-transactions'"></ccpay-case-transactions>
276
287
  <app-mark-unidentified-payment *ngIf="viewName === 'unidentifiedPage'"
277
288
  [caseType]="CASETYPE"></app-mark-unidentified-payment>
278
289
  <app-mark-unsolicited-payment *ngIf="viewName === 'unsolicitedPage'"
@@ -302,6 +313,7 @@ PaymentLibComponent.propDecorators = {
302
313
  API_ROOT: [{ type: Input, args: ['API_ROOT',] }],
303
314
  BULKSCAN_API_ROOT: [{ type: Input, args: ['BULKSCAN_API_ROOT',] }],
304
315
  REFUNDS_API_ROOT: [{ type: Input, args: ['REFUNDS_API_ROOT',] }],
316
+ NOTIFICATION_API_ROOT: [{ type: Input, args: ['NOTIFICATION_API_ROOT',] }],
305
317
  CARDPAYMENTRETURNURL: [{ type: Input, args: ['CARDPAYMENTRETURNURL',] }],
306
318
  CCD_CASE_NUMBER: [{ type: Input, args: ['CCD_CASE_NUMBER',] }],
307
319
  EXC_REFERENCE: [{ type: Input, args: ['EXC_REFERENCE',] }],
@@ -480,7 +492,7 @@ PaymentListComponent.decorators = [
480
492
  { type: Component, args: [{
481
493
  selector: 'ccpay-payment-list',
482
494
  template: "<div class=\"govuk-width-container\">\n\n <div *ngIf=\"errorMessage\">\n <div class=\"error-summary\" role=\"group\" aria-labelledby=\"failure-error-summary-heading\" tabindex=\"-1\">\n <h2 class=\"heading-medium error-summary-heading\" id=\"failure-error-summary-heading\">\n Payments list could not be retrieved\n </h2>\n <div class=\"govuk-error-summary__body\">\n {{ errorMessage }}\n </div>\n </div>\n </div>\n\n <div *ngIf=\"!errorMessage && payments\">\n\n <table class=\"table\">\n <tr>\n <th class=\"bold font-xsmall\">Payment group reference</th>\n <th class=\"bold font-xsmall\">Payment reference</th>\n <th class=\"bold font-xsmall\">Date created</th>\n <th class=\"bold font-xsmall\">Channel</th>\n <th class=\"bold font-xsmall\">Method</th>\n <th class=\"bold font-xsmall\">Amount</th>\n <th class=\"bold font-xsmall\">Status</th>\n </tr>\n <tr *ngFor=\"let payment of payments.payments\">\n <td class=\"font-xsmall\">\n <a href=\"javascript:void(0)\" (click)=\"loadPaymentViewComponent(payment.payment_group_reference, payment.payment_reference, payment.method)\">{{ payment.payment_group_reference }}</a>\n <td class=\"font-xsmall\">{{ payment.payment_reference }}</td>\n <td class=\"font-xsmall\">{{ payment.date_created | date:'dd MMM yyyy' }}</td>\n <td class=\"font-xsmall\">{{ payment.channel | titlecase }}</td>\n <td class=\"font-xsmall\">{{ payment.method | titlecase }}</td>\n <td class=\"font-xsmall\">\u00A3{{ payment.amount | number:'.2' }}</td>\n <td *ngIf=\"payment.method === 'card' && payment.channel === 'online'\">\n <details>\n <summary><span class=\"summary font-xsmall\">{{ payment.status }}</span></summary>\n <div class=\"panel panel-border-narrow\" *ngIf=\"payment.status === 'Failed'\">\n <div *ngFor=\"let statusHistory of payment.status_histories\">\n <p class=\"font-xsmall\" *ngIf=\"statusHistory.error_code === 'P0010'\">\n Payment rejected due to payment method selected or payment information entered, for example, failed fraud check, a 3D Secure authentication failure, or the user does not have enough money in account\n </p>\n <p class=\"font-xsmall\" *ngIf=\"statusHistory.error_code === 'P0020'\">\n Payment was not confirmed and completed within 90 minutes of being created\n </p>\n <p class=\"font-xsmall\" *ngIf=\"statusHistory.error_code === 'P0030'\">\n User clicked on the \u201CCancel payment\u201D button during the payment journey\n </p>\n <p class=\"font-xsmall\" *ngIf=\"statusHistory.error_code === 'P0050'\">\n Multiple possible causes, for example a configuration problem with the payment provider, or incorrect login credentials\n </p>\n </div>\n </div>\n </details>\n </td>\n <td *ngIf=\"payment.method === 'card' && payment.channel === 'telephony'\" class=\"font-xsmall\">\n {{ payment.status}}\n </td>\n <td *ngIf=\"payment.method === 'payment by account'\">\n <details>\n <summary><span class=\"summary font-xsmall\">{{ payment.status }}</span></summary>\n <div class=\"panel panel-border-narrow\" *ngIf=\"payment.status === 'Pending'\">\n <p class=\"font-xsmall\">This means the transaction is being processed by Liberata.</p>\n </div>\n </details>\n </td>\n </tr>\n </table>\n\n </div>\n\n</div>\n",
483
- styles: ["a:focus{background-color:#fd0;outline:2px solid #fd0}"]
495
+ styles: [""]
484
496
  },] }
485
497
  ];
486
498
  PaymentListComponent.ctorParameters = () => [
@@ -557,12 +569,20 @@ class PaymentViewService {
557
569
  }
558
570
  getPaymentDetails(paymentReference, paymentMethod) {
559
571
  this.logger.info('Payment-view-service getPaymentDetails for: ', paymentReference);
560
- return this.http.get(paymentMethod === 'card' || paymentMethod === 'cash' || paymentMethod === 'cheque' || paymentMethod === 'postal order' ?
561
- `${this.paymentLibService.API_ROOT}/card-payments/${paymentReference}` :
562
- `${this.paymentLibService.API_ROOT}/credit-account-payments/${paymentReference}`, {
563
- withCredentials: true
564
- })
565
- .pipe(catchError(this.errorHandlerService.handleError));
572
+ if (paymentMethod == undefined || paymentMethod == null) {
573
+ return this.http.get(`${this.paymentLibService.API_ROOT}/payments/${paymentReference}`, {
574
+ withCredentials: true
575
+ })
576
+ .pipe(catchError(this.errorHandlerService.handleError));
577
+ }
578
+ else {
579
+ return this.http.get(paymentMethod === 'card' || paymentMethod === 'cash' || paymentMethod === 'cheque' || paymentMethod === 'postal order' ?
580
+ `${this.paymentLibService.API_ROOT}/card-payments/${paymentReference}` :
581
+ `${this.paymentLibService.API_ROOT}/credit-account-payments/${paymentReference}`, {
582
+ withCredentials: true
583
+ })
584
+ .pipe(catchError(this.errorHandlerService.handleError));
585
+ }
566
586
  }
567
587
  getPaymentGroupDetails(paymentGroupReference) {
568
588
  this.logger.info('Payment-view-service getPaymentGroupDetails for: ', paymentGroupReference);
@@ -674,10 +694,81 @@ PaymentViewService.ctorParameters = () => [
674
694
  { type: PaymentLibService }
675
695
  ];
676
696
 
697
+ class NotificationService {
698
+ constructor(http, https, errorHandlerService, paymentLibService) {
699
+ this.http = http;
700
+ this.https = https;
701
+ this.errorHandlerService = errorHandlerService;
702
+ this.paymentLibService = paymentLibService;
703
+ }
704
+ getRefundNotification(reference) {
705
+ return this.http.get(`${this.paymentLibService.NOTIFICATION_API_ROOT}/${reference}`, {
706
+ withCredentials: true
707
+ })
708
+ .pipe(catchError(this.errorHandlerService.handleError));
709
+ }
710
+ getAddressByPostcode(postcode) {
711
+ return this.http.get(`${this.paymentLibService.NOTIFICATION_API_ROOT}/postcode-lookup/${postcode}`, {
712
+ withCredentials: true
713
+ })
714
+ .pipe(catchError(this.errorHandlerService.handleError));
715
+ }
716
+ getNotificationPreview(body) {
717
+ return this.https.post(`${this.paymentLibService.NOTIFICATION_API_ROOT}/doc-preview`, body).pipe(catchError(this.errorHandlerService.handleError));
718
+ }
719
+ getNotificationInstructionType(paymentChannel, paymentMethod) {
720
+ if (paymentChannel === 'bulk scan' && paymentMethod === 'postal order') {
721
+ return 'RefundWhenContacted';
722
+ }
723
+ else if (paymentChannel === 'bulk scan' && paymentMethod === 'cash') {
724
+ return 'RefundWhenContacted';
725
+ }
726
+ else if (paymentChannel === 'online' && paymentMethod === 'card') {
727
+ return 'SendRefund';
728
+ }
729
+ else if (paymentChannel === 'telephony' && paymentMethod === 'card') {
730
+ return 'SendRefund';
731
+ }
732
+ else if (paymentChannel === 'online' && paymentMethod === 'payment by account') {
733
+ return 'SendRefund';
734
+ }
735
+ else if (paymentChannel === 'bulk scan' && paymentMethod === 'cheque') {
736
+ return 'SendRefund';
737
+ }
738
+ else {
739
+ return 'Template';
740
+ }
741
+ }
742
+ }
743
+ NotificationService.ɵprov = i0.ɵɵdefineInjectable({ factory: function NotificationService_Factory() { return new NotificationService(i0.ɵɵinject(i1.HttpClient), i0.ɵɵinject(WebComponentHttpClient), i0.ɵɵinject(ErrorHandlerService), i0.ɵɵinject(PaymentLibService)); }, token: NotificationService, providedIn: "root" });
744
+ NotificationService.decorators = [
745
+ { type: Injectable, args: [{
746
+ providedIn: 'root'
747
+ },] }
748
+ ];
749
+ NotificationService.ctorParameters = () => [
750
+ { type: HttpClient },
751
+ { type: WebComponentHttpClient },
752
+ { type: ErrorHandlerService },
753
+ { type: PaymentLibService }
754
+ ];
755
+
756
+ class PostRefundRetroRemission {
757
+ constructor(contact_details, fees, payment_reference, refund_reason, total_refund_amount, is_over_payment) {
758
+ this.contact_details = contact_details;
759
+ this.fees = fees;
760
+ this.payment_reference = payment_reference;
761
+ this.refund_reason = refund_reason;
762
+ this.total_refund_amount = total_refund_amount;
763
+ this.is_over_payment = is_over_payment === 'op';
764
+ }
765
+ }
766
+
677
767
  const BS_ENABLE_FLAG$4 = 'bulk-scan-enabling-fe';
678
768
  class PaymentViewComponent {
679
- constructor(paymentViewService, paymentLibComponent, cd, OrderslistService) {
769
+ constructor(paymentViewService, notificationService, paymentLibComponent, cd, OrderslistService) {
680
770
  this.paymentViewService = paymentViewService;
771
+ this.notificationService = notificationService;
681
772
  this.paymentLibComponent = paymentLibComponent;
682
773
  this.cd = cd;
683
774
  this.OrderslistService = OrderslistService;
@@ -687,16 +778,7 @@ class PaymentViewComponent {
687
778
  this.allowedRolesToAccessRefund = ['payments-refund-approver', 'payments-refund'];
688
779
  this.remissions = [];
689
780
  this.allPaymentsFailure = [];
690
- this.check4AllowedRoles2AccessRefund = () => {
691
- return this.allowedRolesToAccessRefund.some(role => this.LOGGEDINUSERROLES.indexOf(role) !== -1);
692
- };
693
- this.allowFurtherAccessAfter4Days = (payment) => {
694
- if (payment !== null && payment !== undefined) {
695
- let tmp4DayAgo = new Date();
696
- tmp4DayAgo.setDate(tmp4DayAgo.getDate() - 4);
697
- return tmp4DayAgo >= new Date(payment.date_created);
698
- }
699
- };
781
+ this.isContinueBtnDisabled = true;
700
782
  }
701
783
  ngAfterContentChecked() {
702
784
  this.cd.detectChanges();
@@ -724,6 +806,7 @@ class PaymentViewComponent {
724
806
  }
725
807
  });
726
808
  paymentGroup.fees = fees;
809
+ this.paymentFees = fees;
727
810
  this.paymentGroup = paymentGroup;
728
811
  this.paymentGroup.payments = this.paymentGroup.payments.filter(paymentGroupObj => paymentGroupObj['reference'].includes(this.paymentLibComponent.paymentReference));
729
812
  const paymentAllocation = this.paymentGroup.payments[0].payment_allocation;
@@ -754,6 +837,13 @@ class PaymentViewComponent {
754
837
  goToPaymentList() {
755
838
  this.paymentLibComponent.viewName = 'payment-list';
756
839
  }
840
+ getOverPaymentValue() {
841
+ let feesOverPayment = 0;
842
+ this.paymentGroup.fees.forEach(fee => {
843
+ feesOverPayment += fee.over_payment;
844
+ });
845
+ return feesOverPayment > 0 ? feesOverPayment : this.paymentGroup.payments[0].over_payment;
846
+ }
757
847
  goToServiceRequestPage() {
758
848
  this.paymentLibComponent.viewName = 'case-transactions';
759
849
  this.paymentLibComponent.TAKEPAYMENT = false;
@@ -783,7 +873,7 @@ class PaymentViewComponent {
783
873
  }
784
874
  }
785
875
  addRemission(fee) {
786
- if (this.chkForAddRemission(fee.code)) {
876
+ if (this.chkIsAddRemissionBtnEnable(fee)) {
787
877
  this.feeId = fee;
788
878
  this.paymentViewService.getApportionPaymentDetails(this.paymentGroup.payments[0].reference).subscribe(paymentGroup => {
789
879
  this.paymentGroup = paymentGroup;
@@ -804,46 +894,71 @@ class PaymentViewComponent {
804
894
  }
805
895
  return false;
806
896
  }
807
- addRefundForRemission(payment, remission, fees) {
808
- if (this.chkIsRefundRemissionBtnEnable()) {
809
- this.payment = payment;
810
- this.paymentViewService.getApportionPaymentDetails(this.payment.reference).subscribe(paymentGroup => {
811
- this.paymentGroup = paymentGroup;
812
- this.paymentGroup.payments = this.paymentGroup.payments.filter(paymentGroupObj => paymentGroupObj['reference'].includes(this.payment.reference));
813
- this.payment = this.paymentGroup.payments[0];
814
- this.remissions = remission;
815
- this.remissionFeeAmt = fees.filter(data => data.code === this.remissions['fee_code'])[0].net_amount;
816
- this.viewStatus = 'addrefundforremission';
817
- // const paymentAllocation = this.paymentGroup.payments[0].payment_allocation;
818
- // this.isStatusAllocated = paymentAllocation.length > 0 && paymentAllocation[0].allocation_status === 'Allocated' || paymentAllocation.length === 0;
819
- }, (error) => this.errorMessage = error);
820
- }
821
- }
822
- chkIsRefundRemissionBtnEnable() {
823
- if (this.paymentGroup !== null && this.paymentGroup !== undefined) {
824
- this.paymentGroup.payments.forEach(payment => {
825
- if (payment.method.toLocaleLowerCase() === 'payment by account' && payment.status.toLocaleLowerCase() === 'success' && this.allowFurtherAccessAfter4Days(payment)) {
826
- this.isRefundRemissionBtnEnable = true;
827
- }
828
- });
829
- if (this.isRefundRemissionBtnEnable) {
830
- return true;
831
- }
832
- else {
833
- return false;
897
+ processRefund() {
898
+ this.isConfirmationBtnDisabled = true;
899
+ this.errorMessage = '';
900
+ const obj = this.paymentGroup.fees[0];
901
+ this.fees = [{ id: obj.id,
902
+ code: obj.code,
903
+ version: obj.version,
904
+ apportion_amount: obj.apportion_amount,
905
+ calculated_amount: obj.calculated_amount,
906
+ updated_volume: obj.updated_volume ? obj.updated_volume : obj.volume,
907
+ volume: obj.volume,
908
+ refund_amount: this.getOverPaymentValue() }];
909
+ const requestBody = new PostRefundRetroRemission(this.contactDetailsObj, this.fees, this.paymentGroup.payments[0].reference, 'RR037', this.getOverPaymentValue(), 'op');
910
+ this.paymentViewService.postRefundsReason(requestBody).subscribe(response => {
911
+ if (JSON.parse(response)) {
912
+ this.viewCompStatus = '';
913
+ this.viewStatus = 'refundconfirmationpage';
914
+ this.refundReference = JSON.parse(response).refund_reference;
915
+ this.refundAmount = JSON.parse(response).refund_amount;
834
916
  }
835
- ;
917
+ }, (error) => {
918
+ this.errorMessage = error;
919
+ this.isConfirmationBtnDisabled = false;
920
+ this.cd.detectChanges();
921
+ });
922
+ }
923
+ gotoAddressPage(note) {
924
+ if (note) {
925
+ this.notification = { contact_details: note, notification_type: note.notification_type };
836
926
  }
927
+ this.errorMessage = '';
928
+ this.viewCompStatus = 'overPaymentAddressCapture';
929
+ }
930
+ addRefundForRemission(payment, remission, fees) {
931
+ //if(!this.chkIsIssueRefundBtnEnable(payment)) {
932
+ this.paymentViewService.getApportionPaymentDetails(payment.reference).subscribe(paymentGroup => {
933
+ this.paymentGroup = paymentGroup;
934
+ this.paymentGroup.payments = this.paymentGroup.payments.filter(paymentGroupObj => paymentGroupObj['reference'].includes(payment.reference));
935
+ this.payment = this.paymentGroup.payments[0];
936
+ this.remissions = remission;
937
+ this.remissionFeeAmt = fees.filter(data => data.code === this.remissions['fee_code'])[0].net_amount;
938
+ this.viewStatus = 'addrefundforremission';
939
+ // const paymentAllocation = this.paymentGroup.payments[0].payment_allocation;
940
+ // this.isStatusAllocated = paymentAllocation.length > 0 && paymentAllocation[0].allocation_status === 'Allocated' || paymentAllocation.length === 0;
941
+ }, (error) => this.errorMessage = error);
942
+ //}
943
+ }
944
+ goToPaymentViewComponent() {
945
+ this.viewCompStatus = '';
946
+ this.viewStatus = 'paymentview';
837
947
  }
838
948
  issueRefund(paymentgrp) {
839
949
  if (paymentgrp !== null && paymentgrp !== undefined) {
840
- if (this.chkIssueRefundBtnEnable(paymentgrp.payments[0])) {
841
- this.paymentGroup = paymentgrp;
842
- this.viewStatus = 'issuerefund';
843
- this.isRefundRemission = true;
844
- this.paymentLibComponent.isFromPaymentDetailPage = true;
845
- this.isFromPaymentDetailPage = true;
846
- this.isFromServiceRequestPage = this.paymentLibComponent.isFromServiceRequestPage;
950
+ if (this.chkIsIssueRefundBtnEnable(paymentgrp.payments[0])) {
951
+ if (paymentgrp.payments[0].over_payment > 0) {
952
+ this.viewCompStatus = 'overpayment';
953
+ }
954
+ else {
955
+ this.paymentGroup = paymentgrp;
956
+ this.viewStatus = 'issuerefund';
957
+ this.isRefundRemission = true;
958
+ this.paymentLibComponent.isFromPaymentDetailPage = true;
959
+ this.isFromPaymentDetailPage = true;
960
+ this.isFromServiceRequestPage = false;
961
+ }
847
962
  }
848
963
  }
849
964
  }
@@ -857,44 +972,60 @@ class PaymentViewComponent {
857
972
  }
858
973
  return null;
859
974
  }
860
- chkIssueRefundBtnEnable(payment) {
861
- if (this.check4AllowedRoles2AccessRefund() && this.allowFurtherAccessAfter4Days(payment) &&
862
- payment.method === 'payment by account' && payment.status.toLocaleLowerCase() === 'success') {
863
- this.isIssueRefunfBtnEnable = true;
864
- }
865
- if (this.isIssueRefunfBtnEnable) {
866
- return true;
975
+ chkIsIssueRefundBtnEnable(payment) {
976
+ if (payment !== null && payment !== undefined) {
977
+ return payment.issue_refund && payment.refund_enable;
867
978
  }
868
979
  else {
869
980
  return false;
870
981
  }
871
- ;
872
982
  }
873
- chkForPBAPayment() {
874
- if (this.paymentGroup !== null && this.paymentGroup !== undefined) {
875
- let payment = this.paymentGroup.payments[0];
876
- if (payment.method.toLocaleLowerCase() === 'payment by account' && this.allowFurtherAccessAfter4Days(payment)) {
877
- return true;
878
- }
983
+ chkIsAddRefundBtnEnable(remission) {
984
+ if (remission !== null && remission !== undefined) {
985
+ return remission.add_refund;
986
+ }
987
+ else {
879
988
  return false;
880
989
  }
881
990
  }
882
- chkForAddRemission(feeCode) {
883
- if (this.chkForPBAPayment() && this.check4AllowedRoles2AccessRefund() && this.allowFurtherAccessAfter4Days(this.paymentGroup.payments[0])) {
884
- if (this.paymentGroup.remissions && this.paymentGroup.remissions.length > 0) {
885
- for (const remission of this.paymentGroup.remissions) {
886
- if (remission.fee_code === feeCode) {
887
- return false;
888
- }
889
- }
890
- return true;
891
- }
892
- return true;
991
+ chkIsAddRemissionBtnEnable(fee) {
992
+ if (fee !== null && fee !== undefined) {
993
+ return fee.add_remission && fee.remission_enable;
893
994
  }
894
995
  else {
895
996
  return false;
896
997
  }
897
998
  }
999
+ selectPymentOption(paymentType) {
1000
+ this.paymentType = paymentType;
1001
+ this.isContinueBtnDisabled = false;
1002
+ }
1003
+ continuePayment(paymentgrp) {
1004
+ if (this.paymentType === 'op') {
1005
+ this.isFullyRefund = false;
1006
+ this.viewCompStatus = 'overPaymentAddressCapture';
1007
+ }
1008
+ else if (this.paymentType === 'fp') {
1009
+ this.isFullyRefund = true;
1010
+ this.paymentGroup = paymentgrp;
1011
+ this.viewStatus = 'issuerefund';
1012
+ this.viewCompStatus = "";
1013
+ this.isRefundRemission = true;
1014
+ this.paymentLibComponent.isFromPaymentDetailPage = true;
1015
+ this.isFromPaymentDetailPage = true;
1016
+ this.isFromServiceRequestPage = this.paymentLibComponent.isFromServiceRequestPage;
1017
+ }
1018
+ }
1019
+ gotoPaymentSelectPage(event) {
1020
+ event.preventDefault();
1021
+ this.viewCompStatus = 'overpayment';
1022
+ }
1023
+ getContactDetails(obj) {
1024
+ this.contactDetailsObj = obj;
1025
+ this.notificationPreview = false;
1026
+ this.getTemplateInstructionType(this.paymentGroup.payments[0]);
1027
+ this.viewCompStatus = 'overpaymentcheckandanswer';
1028
+ }
898
1029
  resetOrderData() {
899
1030
  this.OrderslistService.setOrderRef(null);
900
1031
  this.OrderslistService.setorderCCDEvent(null);
@@ -913,16 +1044,31 @@ class PaymentViewComponent {
913
1044
  event.preventDefault();
914
1045
  this.viewStatus = 'paymentview';
915
1046
  }
1047
+ getTemplateInstructionType(payment) {
1048
+ if (payment == undefined || payment == null) {
1049
+ this.templateInstructionType = 'Template';
1050
+ }
1051
+ else {
1052
+ this.templateInstructionType = this.notificationService.getNotificationInstructionType(payment.channel, payment.method);
1053
+ }
1054
+ }
1055
+ showNotificationPreview() {
1056
+ this.notificationPreview = true;
1057
+ }
1058
+ hideNotificationPreview() {
1059
+ this.notificationPreview = false;
1060
+ }
916
1061
  }
917
1062
  PaymentViewComponent.decorators = [
918
1063
  { type: Component, args: [{
919
1064
  selector: 'ccpay-payment-view',
920
- template: "\n<ng-container *ngIf=\"viewStatus === 'paymentview'\">\n<div class=\"govuk-width-container\">\n\n <div class=\"govuk-breadcrumbs\">\n <ol class=\"govuk-breadcrumbs__list\">\n <li class=\"govuk-breadcrumbs__list-item\">\n <a href=\"javascript:void(0)\" (click)=\"goToCaseTransationPage($event)\" class=\"govuk-back-link govuk-body\">Back</a>\n </li>\n </ol>\n </div>\n\n <main class=\"govuk-main-wrapper govuk-!-padding-top-0\" id=\"main-content\" role=\"main\">\n\n <div *ngIf=\"errorMessage\">\n <div class=\"error-summary\" role=\"group\" aria-labelledby=\"failure-error-summary-heading\" tabindex=\"-1\">\n <h2 class=\"heading-medium error-summary-heading\" id=\"failure-error-summary-heading\">\n Payment details could not be retrieved\n </h2>\n <div class=\"govuk-error-summary__body\">\n {{ errorMessage }}\n </div>\n </div>\n </div>\n\n <div class=\"payment-view-alignment\" *ngIf=\"!errorMessage && paymentGroup?.payments[0]\">\n\n <input #myInput type='hidden' class='iFrameDrivenImageValue' value='PAYMENTDETAILS'>\n <div class=\"govuk-grid-row\">\n <div class=\"column\">\n <h1 class=\"heading-large govuk-!-margin-top-0\">Payment details</h1>\n </div>\n </div>\n <table>\n <tbody>\n\n <tr class=\"section\">\n <td class=\"bold tb-col-w\">Service request reference</td>\n <td class=\"tb-col-w\">{{ serviceReference }}</td>\n </tr>\n <tr class=\"section\">\n <td class=\"bold tb-col-w\">Payment reference</td>\n <td class=\"tb-col-w\">{{ paymentGroup?.payments[0]?.reference }}</td>\n </tr>\n <tr class=\"section\">\n <td class=\"bold tb-col-w\">Payment amount</td>\n <td class=\"tb-col-w\">\u00A3{{ paymentGroup?.payments[0]?.amount | number:'.2' }}</td>\n </tr>\n <tr class=\"section\" *ngIf=\"paymentGroup?.payments[0] && paymentGroup?.payments[0]?.document_control_number && !paymentGroup?.payments[0]?.external_reference\">\n <td class=\"bold tb-col-w\">Payment asset number(DCN)</td>\n <td class=\"tb-col-w\">{{ paymentGroup?.payments[0]?.document_control_number }}</td>\n </tr>\n <tr class=\"section\" *ngIf=\"paymentGroup?.payments[0] && paymentGroup?.payments[0]?.document_control_number && !paymentGroup?.payments[0]?.external_reference\">\n <td class=\"bold tb-col-w\">Banked date</td>\n <td class=\"tb-col-w\">{{ paymentGroup?.payments[0]?.banked_date | date:'dd MMM yyyy' }}</td>\n </tr>\n <tr class=\"section\" *ngIf=\"paymentGroup?.payments[0] && paymentGroup?.payments[0]?.external_reference\">\n <td class=\"bold tb-col-w\">GovPay Transaction ID</td>\n <td class=\"tb-col-w\">{{ paymentGroup?.payments[0]?.external_reference }}</td>\n </tr>\n <tr class=\"section\" >\n <td class=\"bold tb-col-w\">Payment method</td>\n <td class=\"tb-col-w text-transform\">{{ paymentGroup?.payments[0]?.method }}</td>\n </tr>\n <tr class=\"section\" *ngIf=\"paymentGroup?.payments[0]?.method === 'payment by account'\" >\n <td class=\"bold tb-col-w\">Type</td>\n <td class=\"tb-col-w\" *ngIf=\"paymentGroup?.payments[0]?.method !== 'card'\">Credit</td>\n <td class=\"tb-col-w\" *ngIf=\"paymentGroup?.payments[0]?.method === 'card'\">Card</td>\n </tr>\n <tr class=\"section\">\n <td class=\"bold tb-col-w\">Channel</td>\n <td class=\"tb-col-w text-transform\">{{ paymentGroup?.payments[0]?.channel }}</td>\n </tr>\n <!-- <tr class=\"section\">\n <td class=\"bold tb-col-w\">Method</td>\n <td *ngIf=\"paymentGroup?.payments[0]?.method !== 'card'\">{{ paymentGroup?.payments[0]?.method }}</td>\n <td *ngIf=\"paymentGroup?.payments[0]?.method === 'card'\">CARD</td>\n </tr> -->\n <!-- <tr class=\"section\" *ngIf=\"paymentGroup?.payments[0]?.channel !== 'telephony'\">\n <td class=\"bold tb-col-w\">Status</td>\n <td>{{ paymentGroup?.payments[0]?.status }}</td>\n </tr> -->\n <tr class=\"section\" *ngIf=\"paymentGroup?.payments[0]?.payment_allocation[0] !== undefined\">\n <td class=\"bold tb-col-w\">Allocaton status</td>\n <td class=\"tb-col-w\">{{ paymentGroup?.payments[0]?.payment_allocation[0]?.allocation_status }}</td>\n </tr>\n\n <tr *ngIf=\"paymentGroup?.payments[0].organisation_name\">\n <td class=\"bold tb-col-w\">PBA account name</td>\n <td class=\"tb-col-w\">{{ paymentGroup?.payments[0]?.organisation_name }}</td>\n </tr>\n\n <tr *ngIf=\"paymentGroup?.payments[0].account_number\">\n <td class=\"bold tb-col-w\">PBA number</td>\n <td class=\"tb-col-w\">{{ paymentGroup?.payments[0]?.account_number }}</td>\n </tr>\n\n <tr *ngIf=\"paymentGroup?.payments[0].customer_reference\">\n <td class=\"bold tb-col-w\">Customer internal reference</td>\n <td class=\"tb-col-w\">{{ paymentGroup?.payments[0]?.customer_reference }}</td>\n </tr>\n\n </tbody>\n </table>\n\n <div>\n <!-- Status histories -->\n <ccpay-payment-statuses *ngIf=\"isStatusAllocated\" [isTakePayment]=\"isTakePayment\"></ccpay-payment-statuses>\n </div>\n <div class=\"remission\">\n <button [disabled]=\"!chkIssueRefundBtnEnable(paymentGroup?.payments[0])\" (click)=\"issueRefund(paymentGroup)\" class=\"govuk-button govuk-button--secondary\">Issue refund</button>\n </div>\n<div *ngIf=\"ISPAYMENTSTATUSENABLED\">\n <div class=\"column\">\n <h2 class=\"heading-medium\">Disputed payment history</h2>\n </div>\n \n <div>\n <table>\n <thead>\n <tr>\n <th>Status</th>\n <th>Amount</th>\n <th>Date</th>\n <th>Payment reference</th>\n <th>Event</th>\n <th></th>\n </tr>\n </thead> \n <tbody *ngIf=\"!errorMsg && allPaymentsFailure.length > 0\" role=\"status\">\n <tr *ngFor=\"let payment of allPaymentsFailure\">\n <td>{{ payment.status | capitalize }}</td>\n <td>\u00A3{{ payment.disputed_amount | number:'.2' }}</td>\n <td>{{(payment.representment_date ? payment.representment_date : payment.failure_event_date_time) | date:'dd MMM yyyy'}}</td>\n <td>{{ payment.payment_reference }}</td>\n <td >{{ payment.failure_type }}</td>\n <td>\n \n <a href=\"javascript:void(0)\" (click)=\"goToPaymentFailuePage(payment)\">Show detail</a>\n\n </td>\n </tr>\n </tbody>\n <tbody *ngIf=\"errorMsg || allPaymentsFailure.length === 0\" role=\"status\">\n <tr>\n <td colspan=\"6\"> No disputed payment history available. </td>\n </tr>\n </tbody>\n </table>\n </div>\n <br/>\n <br/>\n </div>\n \n <div *ngIf=\"checkForFees(paymentGroup)\">\n <div *ngIf=\"paymentGroup.fees.length > 0\">\n <div class=\"column\">\n <br/>\n <br/>\n <h2 class=\"heading-large\">Fee and remission details</h2>\n\n </div>\n </div>\n\n <div *ngFor=\"let fee of paymentGroup.fees\">\n <table class=\"table\">\n <tbody>\n <tr class=\"section\">\n <td class=\"bold tb-col-w\">Description</td>\n <td class=\"tb-col-w\">Application for {{ fee.description }}</td>\n </tr>\n <tr class=\"section\">\n <td class=\"bold tb-col-w\">Fee code</td>\n <td class=\"tb-col-w\">{{ fee?.code }}</td>\n </tr>\n <tr class=\"section\">\n <td class=\"bold tb-col-w\" [ngClass]=\"{'tr-border': !fee.apportion_amount && !fee.remissions && !isTurnOff }\">Fee amount</td>\n <td [ngClass]=\"{'tr-border': !fee.apportion_amount && !fee.remissions && !isTurnOff}\">\u00A3{{ fee?.calculated_amount | number:'.2' }}</td>\n </tr>\n\n <tr *ngIf=\"fee.apportion_amount\">\n <td class=\"bold tb-col-w tr-border\" [ngClass]=\"{'tr-border': !fee.remissions}\">Allocated amount</td>\n <td [ngClass]=\"{'tr-border': !fee.remissions}\">\u00A3{{ fee?.apportion_amount | number:'.2' }}</td>\n </tr>\n\n </tbody>\n </table>\n <button [disabled]=\"!chkForAddRemission(fee.code)\" (click)=\"addRemission(fee)\" class=\"govuk-button govuk-button--secondary\"> Add remission</button>\n </div>\n\n <!-- remissions -->\n <div class=\"order-class\">\n <div class=\"column\">\n <table class=\"govuk-table\">\n <thead class=\"govuk-table__head\">\n <tr class=\"govuk-table__row\">\n <th class=\"govuk-table__header col-24 whitespace-inherit\" scope=\"col\">Help with fees or remission code</th>\n <th class=\"govuk-table__header col-27 whitespace-inherit\" scope=\"col\">Reference</th>\n <th class=\"govuk-table__header whitespace-inherit\" scope=\"col\">Fee</th>\n <th class=\"govuk-table__header whitespace-inherit\" scope=\"col\">Amount</th>\n <th class=\"govuk-table__header whitespace-inherit refundBtn\" scope=\"col\"></th>\n </tr>\n </thead>\n <tbody class=\"govuk-table__body\" *ngFor=\"let remission of paymentGroup.remissions\" role=\"status\">\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__cell whitespace-inherit\">{{ remission?.hwf_reference }}</td>\n <td class=\"govuk-table__cell whitespace-inherit\">{{ remission?.remission_reference }}</td>\n <td class=\"govuk-table__cell whitespace-inherit\">{{ remission?.fee_code }}</td>\n <td class=\"govuk-table__cell whitespace-inherit\">{{ remission?.hwf_amount | currency:'GBP':'symbol-narrow':'1.2-2'}}</td>\n <td class=\"govuk-table__cell refundBtn whitespace-inherit\" >\n <button [disabled]=\"!chkIsRefundRemissionBtnEnable()\" (click)=\"addRefundForRemission(paymentGroup.payments[0],remission,paymentGroup.fees)\" class=\"govuk-button govuk-button--secondary\"> Add refund</button>\n </td>\n </tr>\n </tbody>\n <tbody class=\"govuk-table__body\" *ngIf=\"paymentGroup.remissions?.length === 0\" role=\"status\">\n <td colspan=\"6\">No help with fees or remissions.</td>\n </tbody>\n\n\n </table>\n </div></div>\n\n </div>\n </div>\n </main>\n</div>\n\n</ng-container>\n<ng-container *ngIf=\"viewStatus === 'addremission' && feeId\">\n<ccpay-add-remission\n[isTurnOff]=\"isTurnOff\"\n[isStrategicFixEnable]=\"isStrategicFixEnable\"\n[viewCompStatus]= \"viewStatus\"\n[fee]=\"feeId\"\n[payment] = \"payment\"\n[orderStatus] =\"paymentGroup.payments[0].status\"\n[paidAmount]= \"paymentGroup.payments[0].amount\"\n[isRefundRemission]=\"isRefundRemission\"\n[caseType]=\"caseType\"\n[paymentGroupRef]=\"paymentGroup.payment_group_reference\"\n[isFromPaymentDetailPage] = \"true\"\n[ccdCaseNumber]=\"ccdCaseNumber\"\n[orderFeesTotal] = \"orderFeesTotal\"\n[orderTotalPayments] = \"orderTotalPayments\"\n[orderRemissionTotal] = \"orderRemissionTotal\"\n[orderRef] = \"orderRef\"\n[orderCreated] = \"orderCreated\"\n[orderParty] = \"orderParty\"\n[orderCCDEvent] = \"orderCCDEvent\"\n[orderDetail] = \"orderDetail\"\n[LOGGEDINUSERROLES] = \"LOGGEDINUSERROLES\"></ccpay-add-remission>\n</ng-container>\n\n<ng-container *ngIf=\"viewStatus === 'addrefundforremission' && payment\">\n\n<ccpay-add-remission\n[isTurnOff]=\"isTurnOff\"\n[isStrategicFixEnable]=\"isStrategicFixEnable\"\n[viewCompStatus]= \"viewStatus\"\n[payment]=\"payment\"\n[orderStatus] =\"orderStatus\"\n[paidAmount]= \"orderTotalPayments\"\n[isRefundRemission]=\"isRefundRemission\"\n[caseType]=\"caseType\"\n[feeamount]=\"remissionFeeAmt\"\n[remission] = \"remissions\"\n[isFromServiceRequestPage]=\"false\"\n[paymentGroupRef]=\"paymentGroup.payment_group_reference\"\n[ccdCaseNumber]=\"ccdCaseNumber\"\n[orderFeesTotal] = \"orderFeesTotal\"\n[orderTotalPayments] = \"orderTotalPayments\"\n[orderRemissionTotal] = \"orderRemissionTotal\"\n[orderRef] = \"orderRef\"\n[orderCreated] = \"orderCreated\"\n[orderParty] = \"orderParty\"\n[orderCCDEvent] = \"orderCCDEvent\"\n[orderDetail] = \"orderDetail\"\n[LOGGEDINUSERROLES] = \"LOGGEDINUSERROLES\"></ccpay-add-remission>\n</ng-container>\n\n<ng-container *ngIf=\"viewStatus === 'issuerefund'\">\n <ccpay-add-remission\n [isTurnOff]=\"isTurnOff\"\n [isStrategicFixEnable]=\"isStrategicFixEnable\"\n [payment] = 'paymentGroup.payments[0]'\n [viewCompStatus]= \"viewStatus\"\n [orderStatus] =\"paymentGroup.payments[0].status\"\n [paidAmount]= \"paymentGroup.payments[0].amount\"\n [isRefundRemission]=\"isRefundRemission\"\n [caseType]=\"caseType\"\n [isFromServiceRequestPage]=\"isFromServiceRequestPage\"\n [isFromPaymentDetailPage] = \"isFromPaymentDetailPage\"\n [paymentGroupRef]=\"paymentGroup.payment_group_reference\"\n [ccdCaseNumber]=\"ccdCaseNumber\"\n [orderFeesTotal] = \"orderFeesTotal\"\n [orderTotalPayments] = \"orderTotalPayments\"\n [orderRemissionTotal] = \"orderRemissionTotal\"\n [orderRef] = \"orderRef\"\n [orderCreated] = \"orderCreated\"\n [orderParty] = \"orderParty\"\n [orderCCDEvent] = \"orderCCDEvent\"\n [orderDetail] = \"orderDetail\"\n [LOGGEDINUSERROLES] = \"LOGGEDINUSERROLES\">\n ></ccpay-add-remission>\n</ng-container>\n<ng-container *ngIf=\"viewStatus === 'order-full-view'\">\n <ccpay-service-request\n [viewStatus] = \"viewStatus\"\n [orderRef] = \"orderRef\"\n [orderStatus] = \"orderStatus\"\n [orderCreated] = \"orderCreated\"\n [orderParty] = \"orderParty\"\n [orderCCDEvent] = \"orderCCDEvent\"\n [orderDetail] = \"orderDetail\"\n [LOGGEDINUSERROLES] = \"LOGGEDINUSERROLES\"\n [takePayment] = \"isTakePayment\"\n [ccdCaseNumber] = \"ccdCaseNumber\"\n [orderFeesTotal] = \"orderFeesTotal\"\n [orderTotalPayments] = \"orderTotalPayments\"\n [orderRemissionTotal] = \"orderRemissionTotal\"\n [isServiceRequest] = \"isServiceRequest\"\n (goToServiceRquestComponent) = \"goToServiceRequestPage()\"\n>\n</ccpay-service-request>\n\n</ng-container>\n\n<ng-container *ngIf=\"viewStatus === 'payment-failure'\" role=\"status\">\n <div class=\"payment-failure-alignment\">\n <div class=\"govuk-breadcrumbs\">\n <ol class=\"govuk-breadcrumbs__list\">\n <li class=\"govuk-breadcrumbs__list-item\">\n <a href=\"javascript:void(0)\" (click)=\"goBackToPaymentView($event)\" class=\"govuk-back-link govuk-body\">Back</a>\n </li>\n </ol>\n </div>\n <div class=\"govuk-grid-row\">\n <div class=\"column\">\n <h1 class=\"heading-large govuk-!-margin-top-0\">Failure event details</h1>\n </div>\n </div>\n <table>\n <tbody>\n\n <tr class=\"section\">\n <td class=\"bold\">Failure reference</td>\n <td>\t{{selectedPaymentsStatus.failure_reference}}</td>\n </tr>\n <tr class=\"section\">\n <td class=\"bold\">Failure reason</td>\n <td>\t{{selectedPaymentsStatus.failure_reason}}</td>\n </tr>\n <tr class=\"section\">\n <td class=\"bold\">Payment reference</td>\n <td>{{ selectedPaymentsStatus.payment_reference }}</td>\n </tr>\n <tr class=\"section\">\n <td class=\"bold\">Payment amount</td>\n <td> \u00A3{{ paymentGroup?.payments[0]?.amount | number:'.2' }}</td>\n\n </tr>\n <tr class=\"section\">\n <td class=\"bold\">Disputed amount</td>\n <td>\t\u00A3{{selectedPaymentsStatus.disputed_amount | number:'.2'}}</td>\n </tr>\n <tr class=\"section\">\n <td class=\"bold\">Additional information</td>\n <td>\t{{selectedPaymentsStatus.additional_reference }}</td>\n </tr>\n <tr class=\"section\">\n <td class=\"bold\">Failure type</td>\n <td>\t{{ selectedPaymentsStatus.failure_type }}</td>\n </tr>\n <tr class=\"section\">\n <td class=\"bold\">Failure event date and time</td>\n <td> {{ selectedPaymentsStatus.failure_event_date_time | date:'dd MMM yyyy HH:mm:ss' }}</td>\n </tr>\n <tr class=\"section\" *ngIf=\"selectedPaymentsStatus.has_amount_debited\">\n <td class=\"bold\">Has disputed amount debited</td>\n <td>\t{{selectedPaymentsStatus.has_amount_debited}}</td>\n </tr>\n <tr class=\"section\" *ngIf=\"selectedPaymentsStatus.representment_status\">\n <td class=\"bold\">Status following representation of payment</td>\n <td>\t{{(selectedPaymentsStatus.representment_status === 'Yes' || selectedPaymentsStatus.representment_status === 'yes') ? 'Success' : 'Failure'}}</td>\n </tr>\n <tr class=\"section\" *ngIf=\"selectedPaymentsStatus.representment_date\">\n <td class=\"bold\">Date payment represented</td>\n <td>\t{{selectedPaymentsStatus.representment_date | date:'dd MMM yyyy HH:mm:ss'}}</td>\n </tr>\n </tbody>\n </table>\n\n <div>\n </div>\n </div>\n</ng-container>\n",
921
- styles: [".tb-col-w{width:330px}.tr-border{border-bottom:2px solid}.payment-view-alignment{margin-left:30px}.govuk-button{font-size:19px;float:left;margin-top:2em}.remission{margin-bottom:7em}.govuk-error-summary__title{font-size:24px!important}.govuk-table__cell,.govuk-table__header{padding:0;line-height:1.3;vertical-align:middle}.govuk-table__row{line-height:1.3}.govuk-table__cell:last-child{text-align:right}.text-transform:first-letter{text-transform:capitalize}.govuk-link{cursor:pointer}.mar-17{font-size:19px!important}.payment-failure-alignment{margin-bottom:50px!important;margin-left:15px!important}.govuk-back-link:focus,a:focus{background-color:#fd0;outline:2px solid #fd0}button:focus{outline:3.5px solid #fd0}"]
1065
+ template: "<div class=\"payment-view-section\">\n<ng-container *ngIf=\"viewStatus === 'paymentview' && viewCompStatus !== 'overpayment' && viewCompStatus !== 'overPaymentAddressCapture' && viewCompStatus !== 'overpaymentcheckandanswer'\">\n<div class=\"govuk-width-container\">\n\n <div class=\"govuk-breadcrumbs\">\n <ol class=\"govuk-breadcrumbs__list\">\n <li class=\"govuk-breadcrumbs__list-item\">\n <a href=\"javascript:void(0)\" (click)=\"goToCaseTransationPage($event)\" class=\"govuk-back-link\">Back</a>\n </li>\n </ol>\n </div>\n\n <main class=\"govuk-main-wrapper govuk-!-padding-top-0\" id=\"main-content\" role=\"main\">\n\n <div *ngIf=\"errorMessage\">\n <div class=\"error-summary\" role=\"group\" aria-labelledby=\"failure-error-summary-heading\" tabindex=\"-1\">\n <h2 class=\"heading-medium error-summary-heading\" id=\"failure-error-summary-heading\">\n Payment details could not be retrieved\n </h2>\n <div class=\"govuk-error-summary__body\">\n {{ errorMessage }}\n </div>\n </div>\n </div>\n\n <div class=\"payment-view-alignment\" *ngIf=\"!errorMessage && paymentGroup?.payments[0]\">\n\n <input #myInput type='hidden' class='iFrameDrivenImageValue' value='PAYMENTDETAILS'>\n <div class=\"govuk-grid-row\">\n <div class=\"column\">\n <h1 class=\"heading-large govuk-!-margin-top-0\">Payment details</h1>\n </div>\n </div>\n <table>\n <tbody>\n\n <tr class=\"section\">\n <td class=\"bold tb-col-w\">Service request reference</td>\n <td class=\"tb-col-w\">{{ serviceReference }}</td>\n </tr>\n <tr class=\"section\">\n <td class=\"bold tb-col-w\">Payment reference</td>\n <td class=\"tb-col-w\">{{ paymentGroup?.payments[0]?.reference }}</td>\n </tr>\n <tr class=\"section\">\n <td class=\"bold tb-col-w\">Payment amount</td>\n <td class=\"tb-col-w\">\u00A3{{ paymentGroup?.payments[0]?.amount | number:'.2' }}</td>\n </tr>\n <tr class=\"section\" *ngIf=\"paymentGroup?.payments[0]?.over_payment > 0\">\n <td class=\"bold tb-col-w\">Over payment</td>\n <td class=\"tb-col-w\">\u00A3{{ getOverPaymentValue() | number:'.2' }}</td>\n </tr>\n <tr class=\"section\" *ngIf=\"paymentGroup?.payments[0] && paymentGroup?.payments[0]?.document_control_number && !paymentGroup?.payments[0]?.external_reference\">\n <td class=\"bold tb-col-w\">Payment asset number(DCN)</td>\n <td class=\"tb-col-w\">{{ paymentGroup?.payments[0]?.document_control_number }}</td>\n </tr>\n <tr class=\"section\" *ngIf=\"paymentGroup?.payments[0] && paymentGroup?.payments[0]?.document_control_number && !paymentGroup?.payments[0]?.external_reference\">\n <td class=\"bold tb-col-w\">Banked date</td>\n <td class=\"tb-col-w\">{{ paymentGroup?.payments[0]?.banked_date | date:'dd MMM yyyy' }}</td>\n </tr>\n <tr class=\"section\" *ngIf=\"paymentGroup?.payments[0] && paymentGroup?.payments[0]?.external_reference\">\n <td class=\"bold tb-col-w\">GovPay Transaction ID</td>\n <td class=\"tb-col-w\">{{ paymentGroup?.payments[0]?.external_reference }}</td>\n </tr>\n <tr class=\"section\" >\n <td class=\"bold tb-col-w\">Payment method</td>\n <td class=\"tb-col-w text-transform\">{{ paymentGroup?.payments[0]?.method }}</td>\n </tr>\n <tr class=\"section\" *ngIf=\"paymentGroup?.payments[0]?.method === 'payment by account'\" >\n <td class=\"bold tb-col-w\">Type</td>\n <td class=\"tb-col-w\" *ngIf=\"paymentGroup?.payments[0]?.method !== 'card'\">Credit</td>\n <td class=\"tb-col-w\" *ngIf=\"paymentGroup?.payments[0]?.method === 'card'\">Card</td>\n </tr>\n <tr class=\"section\">\n <td class=\"bold tb-col-w\">Channel</td>\n <td class=\"tb-col-w text-transform\">{{ paymentGroup?.payments[0]?.channel }}</td>\n </tr>\n <!-- <tr class=\"section\">\n <td class=\"bold tb-col-w\">Method</td>\n <td *ngIf=\"paymentGroup?.payments[0]?.method !== 'card'\">{{ paymentGroup?.payments[0]?.method }}</td>\n <td *ngIf=\"paymentGroup?.payments[0]?.method === 'card'\">CARD</td>\n </tr> -->\n <!-- <tr class=\"section\" *ngIf=\"paymentGroup?.payments[0]?.channel !== 'telephony'\">\n <td class=\"bold tb-col-w\">Status</td>\n <td>{{ paymentGroup?.payments[0]?.status }}</td>\n </tr> -->\n <tr class=\"section\" *ngIf=\"paymentGroup?.payments[0]?.payment_allocation[0] !== undefined\">\n <td class=\"bold tb-col-w\">Allocaton status</td>\n <td class=\"tb-col-w\">{{ paymentGroup?.payments[0]?.payment_allocation[0]?.allocation_status }}</td>\n </tr>\n\n <tr *ngIf=\"paymentGroup?.payments[0].organisation_name\">\n <td class=\"bold tb-col-w\">PBA account name</td>\n <td class=\"tb-col-w\">{{ paymentGroup?.payments[0]?.organisation_name }}</td>\n </tr>\n\n <tr *ngIf=\"paymentGroup?.payments[0].account_number\">\n <td class=\"bold tb-col-w\">PBA number</td>\n <td class=\"tb-col-w\">{{ paymentGroup?.payments[0]?.account_number }}</td>\n </tr>\n\n <tr *ngIf=\"paymentGroup?.payments[0].customer_reference\">\n <td class=\"bold tb-col-w\">Customer internal reference</td>\n <td class=\"tb-col-w\">{{ paymentGroup?.payments[0]?.customer_reference }}</td>\n </tr>\n\n </tbody>\n </table>\n\n <div>\n <!-- Status histories -->\n <ccpay-payment-statuses *ngIf=\"isStatusAllocated\" [isTakePayment]=\"isTakePayment\"></ccpay-payment-statuses>\n </div>\n <div class=\"remission\">\n <button [disabled]=\"!chkIsIssueRefundBtnEnable(paymentGroup?.payments[0])\" (click)=\"issueRefund(paymentGroup)\" class=\"govuk-button govuk-button--secondary\">Issue refund</button>\n </div>\n<div *ngIf=\"ISPAYMENTSTATUSENABLED\">\n <div class=\"column\">\n <h2 class=\"heading-medium\">Disputed payment history</h2>\n </div>\n \n <div>\n <table>\n <thead>\n <tr>\n <th>Status</th>\n <th>Amount</th>\n <th>Date</th>\n <th>Payment reference</th>\n <th>Event</th>\n <th></th>\n </tr>\n </thead> \n <tbody *ngIf=\"!errorMsg && allPaymentsFailure.length > 0\">\n <tr *ngFor=\"let payment of allPaymentsFailure\">\n <td>{{ payment.status | capitalize }}</td>\n <td>\u00A3{{ payment.disputed_amount | number:'.2' }}</td>\n <td>{{(payment.representment_date ? payment.representment_date : payment.failure_event_date_time) | date:'dd MMM yyyy'}}</td>\n <td>{{ payment.payment_reference }}</td>\n <td >{{ payment.failure_type }}</td>\n <td>\n \n <a href=\"javascript:void(0)\" (click)=\"goToPaymentFailuePage(payment)\">Show detail</a>\n\n </td>\n </tr>\n </tbody>\n <tbody *ngIf=\"errorMsg || allPaymentsFailure.length === 0\">\n <tr>\n <td colspan=\"6\"> No disputed payment history available. </td>\n </tr>\n </tbody>\n </table>\n </div>\n <br/>\n <br/>\n </div>\n \n <div *ngIf=\"checkForFees(paymentGroup)\">\n <div *ngIf=\"paymentGroup.fees.length > 0\">\n <div class=\"column\">\n <br/>\n <br/>\n <h2 class=\"heading-large\">Fee and remission details</h2>\n\n </div>\n </div>\n\n <div *ngFor=\"let fee of paymentGroup.fees\">\n <table class=\"table\">\n <tbody>\n <tr class=\"section\">\n <td class=\"bold tb-col-w\">Description</td>\n <td class=\"tb-col-w\">Application for {{ fee.description }}</td>\n </tr>\n <tr class=\"section\">\n <td class=\"bold tb-col-w\">Fee code</td>\n <td class=\"tb-col-w\">{{ fee?.code }}</td>\n </tr>\n <tr class=\"section\">\n <td class=\"bold tb-col-w\" [ngClass]=\"{'tr-border': !fee.apportion_amount && !fee.remissions && !isTurnOff }\">Fee amount</td>\n <td [ngClass]=\"{'tr-border': !fee.apportion_amount && !fee.remissions && !isTurnOff}\">\u00A3{{ fee?.calculated_amount | number:'.2' }}</td>\n </tr>\n\n <tr *ngIf=\"fee.apportion_amount\">\n <td class=\"bold tb-col-w tr-border\" [ngClass]=\"{'tr-border': !fee.remissions}\">Allocated amount</td>\n <td [ngClass]=\"{'tr-border': !fee.remissions}\">\u00A3{{ fee?.apportion_amount | number:'.2' }}</td>\n </tr>\n\n </tbody>\n </table>\n <button [disabled]=\"!chkIsAddRemissionBtnEnable(fee)\" (click)=\"addRemission(fee)\" class=\"govuk-button govuk-button--secondary\"> Add remission</button>\n </div>\n\n <!-- remissions -->\n <div class=\"order-class\">\n <div class=\"column\">\n <table class=\"govuk-table\">\n <thead class=\"govuk-table__head\">\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__header col-24 whitespace-inherit\" scope=\"col\">Help with fees or remission code</td>\n <td class=\"govuk-table__header col-27 whitespace-inherit\" scope=\"col\">Reference</td>\n <td class=\"govuk-table__header whitespace-inherit\" scope=\"col\">Fee</td>\n <td class=\"govuk-table__header whitespace-inherit\" scope=\"col\">Amount</td>\n <td class=\"govuk-table__header whitespace-inherit refundBtn\" scope=\"col\"></td>\n </tr>\n </thead>\n <tbody class=\"govuk-table__body\" *ngFor=\"let remission of paymentGroup.remissions\">\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__cell whitespace-inherit\">{{ remission?.hwf_reference }}</td>\n <td class=\"govuk-table__cell whitespace-inherit\">{{ remission?.remission_reference }}</td>\n <td class=\"govuk-table__cell whitespace-inherit\">{{ remission?.fee_code }}</td>\n <td class=\"govuk-table__cell whitespace-inherit\">{{ remission?.hwf_amount | currency:'GBP':'symbol-narrow':'1.2-2'}}</td>\n <td class=\"govuk-table__cell refundBtn whitespace-inherit\" >\n <button [disabled]=\"!chkIsAddRefundBtnEnable(remission)\" (click)=\"addRefundForRemission(paymentGroup.payments[0],remission,paymentGroup.fees)\" class=\"govuk-button govuk-button--secondary\"> Add refund</button>\n </td>\n </tr>\n </tbody>\n\n\n </table>\n </div></div>\n\n <div *ngIf=\"paymentGroup.remissions?.length === 0\">\n <span class=\"mar-17\" >No help with fees or remissions.</span>\n </div>\n\n </div>\n </div>\n </main>\n</div>\n\n</ng-container>\n<ng-container *ngIf=\"viewStatus === 'addremission' && feeId && viewCompStatus !== 'overpayment' && viewCompStatus !== 'overPaymentAddressCapture' && viewCompStatus !== 'overpaymentcheckandanswer'\">\n<ccpay-add-remission \n[isTurnOff]=\"isTurnOff\"\n[isStrategicFixEnable]=\"isStrategicFixEnable\"\n[viewCompStatus]= \"viewStatus\"\n[fee]=\"feeId\"\n[payment] = \"payment\"\n[orderStatus] =\"paymentGroup.payments[0].status\"\n[paidAmount]= \"paymentGroup.payments[0].amount\"\n[isRefundRemission]=\"isRefundRemission\"\n[caseType]=\"caseType\"\n[paymentGroupRef]=\"paymentGroup.payment_group_reference\"\n[isFromPaymentDetailPage] = \"true\"\n[ccdCaseNumber]=\"ccdCaseNumber\"\n[orderFeesTotal] = \"orderFeesTotal\"\n[orderTotalPayments] = \"orderTotalPayments\"\n[orderRemissionTotal] = \"orderRemissionTotal\"\n[orderRef] = \"orderRef\"\n[orderCreated] = \"orderCreated\"\n[orderParty] = \"orderParty\"\n[orderCCDEvent] = \"orderCCDEvent\"\n[orderDetail] = \"orderDetail\"\n[LOGGEDINUSERROLES] = \"LOGGEDINUSERROLES\"></ccpay-add-remission>\n</ng-container>\n\n<ng-container *ngIf=\"viewStatus === 'addrefundforremission' && payment && viewCompStatus !== 'overpayment' && viewCompStatus !== 'overPaymentAddressCapture' && viewCompStatus !== 'overpaymentcheckandanswer'\">\n\n<ccpay-add-remission\n[isTurnOff]=\"isTurnOff\"\n[isStrategicFixEnable]=\"isStrategicFixEnable\"\n[viewCompStatus]= \"viewStatus\"\n[payment]=\"payment\"\n[orderStatus] =\"orderStatus\"\n[paidAmount]= \"orderTotalPayments\"\n[isRefundRemission]=\"isRefundRemission\"\n[caseType]=\"caseType\"\n[feeamount]=\"remissionFeeAmt\"\n[remission] = \"remissions\"\n[isFromServiceRequestPage]=\"false\"\n[paymentGroupRef]=\"paymentGroup.payment_group_reference\"\n[ccdCaseNumber]=\"ccdCaseNumber\"\n[orderFeesTotal] = \"orderFeesTotal\"\n[orderTotalPayments] = \"orderTotalPayments\"\n[orderRemissionTotal] = \"orderRemissionTotal\"\n[orderRef] = \"orderRef\"\n[orderCreated] = \"orderCreated\"\n[orderParty] = \"orderParty\"\n[orderCCDEvent] = \"orderCCDEvent\"\n[orderDetail] = \"orderDetail\"\n[LOGGEDINUSERROLES] = \"LOGGEDINUSERROLES\"></ccpay-add-remission>\n</ng-container>\n\n<ng-container *ngIf=\"viewStatus === 'issuerefund' && viewCompStatus !== 'overpayment' && viewCompStatus !== 'overPaymentAddressCapture' && viewCompStatus !== 'overpaymentcheckandanswer'\">\n <ccpay-add-remission \n [isTurnOff]=\"isTurnOff\"\n [isStrategicFixEnable]=\"isStrategicFixEnable\"\n [payment] = 'paymentGroup.payments[0]'\n [viewCompStatus]= \"viewStatus\"\n [orderStatus] =\"paymentGroup.payments[0].status\"\n [paidAmount]= \"paymentGroup.payments[0].amount\"\n [isRefundRemission]=\"isRefundRemission\"\n [caseType]=\"caseType\"\n [isFromServiceRequestPage]=\"isFromServiceRequestPage\"\n [isFromPaymentDetailPage] = \"isFromPaymentDetailPage\"\n [paymentGroupRef]=\"paymentGroup.payment_group_reference\"\n [ccdCaseNumber]=\"ccdCaseNumber\"\n [orderFeesTotal] = \"orderFeesTotal\"\n [orderTotalPayments] = \"orderTotalPayments\"\n [orderRemissionTotal] = \"orderRemissionTotal\"\n [orderRef] = \"orderRef\"\n [orderCreated] = \"orderCreated\"\n [orderParty] = \"orderParty\"\n [orderCCDEvent] = \"orderCCDEvent\"\n [orderDetail] = \"orderDetail\"\n [fees] =\"paymentFees\"\n [isFullyRefund] = \"isFullyRefund\"\n [LOGGEDINUSERROLES] = \"LOGGEDINUSERROLES\">\n \n ></ccpay-add-remission>\n</ng-container>\n<ng-container *ngIf=\"viewStatus === 'order-full-view' && viewCompStatus !== 'overpayment' && viewCompStatus !== 'overPaymentAddressCapture' && viewCompStatus !== 'overpaymentcheckandanswer'\">\n <ccpay-service-request\n [viewStatus] = \"viewStatus\"\n [orderRef] = \"orderRef\"\n [orderStatus] = \"orderStatus\"\n [orderCreated] = \"orderCreated\"\n [orderParty] = \"orderParty\"\n [orderCCDEvent] = \"orderCCDEvent\"\n [orderDetail] = \"orderDetail\"\n [LOGGEDINUSERROLES] = \"LOGGEDINUSERROLES\"\n [takePayment] = \"isTakePayment\"\n [ccdCaseNumber] = \"ccdCaseNumber\"\n [orderFeesTotal] = \"orderFeesTotal\"\n [orderTotalPayments] = \"orderTotalPayments\"\n [orderRemissionTotal] = \"orderRemissionTotal\"\n [isServiceRequest] = \"isServiceRequest\"\n (goToServiceRquestComponent) = \"goToServiceRequestPage()\"\n>\n</ccpay-service-request>\n\n</ng-container>\n</div>\n<div class=\"over-payment\">\n<ng-container *ngIf=\"viewCompStatus === 'overpayment'\">\n <input #myInput type='hidden' id='iFrameDrivenImageValue' value='OVERPAYMENTPAGE'> \n <h1 class=\"heading-large\">Issue refund</h1>\n <h1 class=\"heading-medium\">Case reference: {{ccdCaseNumber | ccdHyphens }}</h1>\n <span id=\"how-contacted-conditional-hint govuk-font19px\" class=\"form-hint\">\n Payment reference: {{paymentGroup?.payments[0]?.reference}}\n </span>\n<div class=\"govuk-form-group\">\n <fieldset class=\"govuk-fieldset\">\n <legend class=\"govuk-fieldset__legend govuk-fieldset__legend--l\">\n <h1 class=\"heading-medium\">Select payment to refund</h1>\n </legend>\n <div class=\"govuk-radios\" data-module=\"govuk-radios\">\n <div class=\"govuk-radios__item\">\n <input class=\"govuk-radios__input\" id=\"over-payment\" name=\"over-payment\" type=\"radio\" (click)=\"selectPymentOption('op')\" value=\"op\">\n <label class=\"govuk-label govuk-radios__label govuk-font19px\" for=\"where-do-you-live\">\n Over payment \u00A3{{getOverPaymentValue() | number:'.2'}}\n </label>\n </div>\n <div class=\"govuk-radios__item\">\n <input class=\"govuk-radios__input\" id=\"full-payment\" name=\"over-payment\" type=\"radio\" (click)=\"selectPymentOption('fp')\" value=\"fp\">\n <label class=\"govuk-label govuk-radios__label govuk-font19px\" for=\"where-do-you-live-2\">\n Full payment \u00A3{{paymentGroup?.payments[0]?.amount | number:'.2'}}\n </label>\n </div>\n </div>\n <button class=\"govuk-button govuk-button--secondary over-payment-alignment govuk-font19px\"\n (click)=\"goToPaymentViewComponent()\"> Previous</button>\n <button \n (click)=\"continuePayment(paymentGroup)\"\n [disabled]=\"isContinueBtnDisabled\"\n [ngClass]='isContinueBtnDisabled ? \"button button--disabled govuk-!-margin-right-1 govuk-font19px\" : \"button govuk-!-margin-right-1 govuk-font19px\"'\n class=\"govuk-button\"> Continue</button>\n </fieldset>\n</div>\n</ng-container>\n\n<ng-container *ngIf=\"viewCompStatus === 'overPaymentAddressCapture'\">\n <input #myInput type='hidden' id='iFrameDrivenImageValue' value='OVERPAYMENTADDRESSCAPTUREPAGE'> \n <h1 class=\"govuk-heading-l\">Issue refund</h1>\n <h2 class=\"govuk-heading-m govuk-font19px\">Case reference: {{ccdCaseNumber | ccdHyphens }}</h2>\n <span id=\"how-contacted-conditional-hint\" class=\"govuk-hint govuk-font19px\">\n Payment reference: {{paymentGroup?.payments[0]?.reference}}\n </span>\n<ccpay-contact-details \n[addressObj] = notification\n(assignContactDetails)=\"getContactDetails($event)\"\n(redirectToIssueRefund)=\"gotoPaymentSelectPage($event)\" ></ccpay-contact-details>\n<p>\n <a (click)=\"goToCaseTransationPage($event)\" class=\"govuk-link\" data-module=\"govuk-button\">\n Cancel\n </a>\n</p>\n</ng-container>\n\n<ng-container *ngIf=\"viewCompStatus === 'overpaymentcheckandanswer'\">\n <input #myInput type='hidden' id='iFrameDrivenImageValue' value='ADDREFUNDFORREMISSION'> \n <div class=\"govuk-warning-text\">\n \n <h1 class=\"heading-large\"> Check your answers</h1>\n </div>\n <table class=\"govuk-table\">\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__cell govuk-!-font-weight-bold\">Payment reference</td>\n <td class=\"govuk-table__cell\"> {{paymentGroup.payments[0].reference}} </td>\n </tr>\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__cell govuk-!-font-weight-bold\">Payment amount</td>\n <td class=\"govuk-table__cell\">{{paymentGroup.payments[0].amount | currency:'GBP':'symbol-narrow':'1.2-2'}}</td>\n </tr>\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__cell govuk-!-font-weight-bold\">Fee amount</td>\n <td class=\"govuk-table__cell\">{{paymentGroup?.fees[0]?.net_amount | currency:'GBP':'symbol-narrow':'1.2-2'}}</td>\n </tr>\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__cell govuk-!-font-weight-bold\">Refund amount</td>\n <td class=\"govuk-table__cell\">{{getOverPaymentValue() | currency:'GBP':'symbol-narrow':'1.2-2'}}</td>\n </tr>\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__cell govuk-!-font-weight-bold\">Refund reason</td>\n <td class=\"govuk-table__cell\">Over payment</td>\n </tr>\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__cell govuk-!-font-weight-bold\">Send to</td>\n <td class=\"govuk-table__cell\">{{orderParty}}</td>\n </tr>\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__cell govuk-!-font-weight-bold\">Send via</td>\n <td class=\"govuk-table__cell whitespace-inherit\">\n <div *ngIf=\"contactDetailsObj?.notification_type === 'EMAIL'\" class=\"contactDetails-width\">\n <strong>Email</strong>\n <br/>\n {{contactDetailsObj?.email?.trim()}}\n </div>\n <div *ngIf=\"contactDetailsObj?.notification_type === 'LETTER'\" class=\"contactDetails-width\">\n <strong>Post</strong>\n <br/>\n {{contactDetailsObj?.address_line?.trim()}}&nbsp;{{contactDetailsObj?.city?.trim()}}&nbsp;{{contactDetailsObj?.county?.trim()}}&nbsp;{{contactDetailsObj?.country?.trim()}}&nbsp;{{contactDetailsObj?.postal_code?.trim()}}\n </div>\n <a (click)=\"gotoAddressPage(contactDetailsObj)\" class=\"govuk-link right\" >Change</a>\n </td>\n </tr>\n\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__cell govuk-!-font-weight-bold\">Notification</td>\n <td class=\"govuk-table__cell\">{{templateInstructionType}}\n <a *ngIf=\"!notificationPreview\" href=\"Javascript:void(0)\" class=\"govuk-link right\" (click)=\"showNotificationPreview()\">\n Preview\n </a>\n <a *ngIf=\"notificationPreview\" href=\"Javascript:void(0)\" class=\"govuk-link right\" (click)=\"hideNotificationPreview()\">\n Hide Preview\n </a>\n </td>\n </tr>\n </table>\n\n <app-notification-preview *ngIf=\"notificationPreview\" \n [payment]=\"paymentGroup.payments[0]\" \n [contactDetails]=\"contactDetailsObj\"\n [refundReason]=\"'RR037'\"\n [refundAmount]=\"getOverPaymentValue()\"></app-notification-preview>\n\n <button type=\"submit\" class=\"button govuk-button--secondary over-payment-alignment govuk-font19px\" (click)=\"gotoAddressPage(contactDetailsObj)\">Previous</button>\n <button type=\"submit\"\n [ngClass]='isContinueBtnDisabled ? \"button button--disabled govuk-!-margin-right-1 govuk-font19px\" : \"button govuk-!-margin-right-1 govuk-font19px\"'\n (click)=\"processRefund()\">\n Submit refund\n </button>\n <p>\n <a href=\"javascript:void(0)\" (click)=\"goToCaseTransationPage($event)\" class=\"govuk-link govuk-font19px\" data-module=\"govuk-button\">\n Cancel\n </a>\n </p>\n\n</ng-container>\n<ng-container *ngIf=\"viewStatus === 'refundconfirmationpage' && viewCompStatus !== 'overpayment' && viewCompStatus !== 'overPaymentAddressCapture' && viewCompStatus !== 'overpaymentcheckandanswer'\">\n <input #myInput type='hidden' id='iFrameDrivenImageValue' value='RETROREMISSIONREFUNDCONFIRMATIONPAGE'> \n <div class=\"govuk-grid-row pagesize\">\n <div >\n <div class=\"govuk-panel govuk-panel--confirmation\">\n <h1 class=\"govuk-panel__title\">\n Refund submitted\n </h1>\n \n <div class=\"govuk-panel__body\">\n <p class=\"govuk-body white\"><strong>Refund reference: {{refundReference}}</strong></p>\n </div>\n \n </div>\n <h2 class=\"govuk-heading-l\">What happens next</h2>\n <p class=\"govuk-body\">\n A refund request for {{refundAmount | currency:'GBP':'symbol-narrow':'1.2-2' }} has been created and will be passed to a team leader to approve.\n </p>\n <p class=\"govuk-body\">\n <a href=\"javascript:void(0)\" (click)=\"goToCaseTransationPage($event)\" class=\"govuk-link pointer\" data-module=\"govuk-button\">\n Return to case\n </a>\n </p>\n </div>\n </div>\n\n</ng-container>\n</div>\n\n<ng-container *ngIf=\"viewStatus === 'payment-failure'\">\n <div class=\"payment-failure-alignment\">\n <div class=\"govuk-breadcrumbs\">\n <ol class=\"govuk-breadcrumbs__list\">\n <li class=\"govuk-breadcrumbs__list-item\">\n <a href=\"javascript:void(0)\" (click)=\"goBackToPaymentView($event)\" class=\"govuk-back-link\">Back</a>\n </li>\n </ol>\n </div>\n <div class=\"govuk-grid-row\">\n <div class=\"column\">\n <h1 class=\"heading-large govuk-!-margin-top-0\">Failure event details</h1>\n </div>\n </div>\n <table>\n <tbody>\n\n <tr class=\"section\">\n <td class=\"bold\">Failure reference</td>\n <td>\t{{selectedPaymentsStatus.failure_reference}}</td>\n </tr>\n <tr class=\"section\">\n <td class=\"bold\">Failure reason</td>\n <td>\t{{selectedPaymentsStatus.failure_reason}}</td>\n </tr>\n <tr class=\"section\">\n <td class=\"bold\">Payment reference</td>\n <td>{{ selectedPaymentsStatus.payment_reference }}</td>\n </tr>\n <tr class=\"section\">\n <td class=\"bold\">Payment amount</td>\n <td> \u00A3{{ paymentGroup?.payments[0]?.amount | number:'.2' }}</td>\n\n </tr>\n <tr class=\"section\">\n <td class=\"bold\">Disputed amount</td>\n <td>\t\u00A3{{selectedPaymentsStatus.disputed_amount | number:'.2'}}</td>\n </tr>\n <tr class=\"section\">\n <td class=\"bold\">Additional information</td>\n <td>\t{{selectedPaymentsStatus.additional_reference }}</td>\n </tr>\n <tr class=\"section\">\n <td class=\"bold\">Failure type</td>\n <td>\t{{ selectedPaymentsStatus.failure_type }}</td>\n </tr>\n <tr class=\"section\">\n <td class=\"bold\">Failure event date and time</td>\n <td> {{ selectedPaymentsStatus.failure_event_date_time | date:'dd MMM yyyy HH:mm:ss' }}</td>\n </tr>\n <tr class=\"section\" *ngIf=\"selectedPaymentsStatus.has_amount_debited\">\n <td class=\"bold\">Has disputed amount debited</td>\n <td>\t{{selectedPaymentsStatus.has_amount_debited}}</td>\n </tr>\n <tr class=\"section\" *ngIf=\"selectedPaymentsStatus.representment_status\">\n <td class=\"bold\">Status following representation of payment</td>\n <td>\t{{(selectedPaymentsStatus.representment_status === 'Yes' || selectedPaymentsStatus.representment_status === 'yes') ? 'Success' : 'Failure'}}</td>\n </tr>\n <tr class=\"section\" *ngIf=\"selectedPaymentsStatus.representment_date\">\n <td class=\"bold\">Date payment represented</td>\n <td>\t{{selectedPaymentsStatus.representment_date | date:'dd MMM yyyy HH:mm:ss'}}</td>\n </tr>\n </tbody>\n </table>\n\n <div>\n </div>\n </div>\n</ng-container>\n",
1066
+ styles: [".payment-view-section .tb-col-w{width:330px}.payment-view-section .tr-border{border-bottom:2px solid}.payment-view-section .payment-view-alignment{margin-left:30px}.payment-view-section .govuk-button{font-size:19px;float:left;margin-top:2em}.payment-view-section .remission{margin-bottom:7em}.payment-view-section .govuk-error-summary__title{font-size:24px!important}.payment-view-section .govuk-table__cell,.payment-view-section .govuk-table__header{padding:0;line-height:1.3;vertical-align:middle}.payment-view-section .govuk-table__row{line-height:1.3}.payment-view-section .govuk-table__cell:last-child{text-align:right}.payment-view-section .text-transform:first-letter{text-transform:capitalize}.payment-view-section .govuk-link{cursor:pointer}.payment-view-section .mar-17{font-size:19px!important}.over-payment .pagesize{margin:2em;width:97%}.over-payment .contactDetails-width{width:70%}.over-payment .margin-top10px{margin-top:20px}.over-payment .govuk-font19px{font-size:19px!important}.over-payment .margin-top--size{margin-top:-30px}.over-payment .over-payment-alignment{margin-right:10px}.over-payment .govuk-button{font-size:19px;float:left;margin-top:2em}.over-payment td.govuk-table__cell{width:50%}.over-payment .govuk-label--s,.over-payment .govuk-warning-text__text,.over-payment .hmcts-currency-input__symbol{font-size:19px;font-weight:400}.over-payment .inline-error-class{outline:3px solid #a71414;outline-offset:0;border-color:#a71414}.over-payment .inline-error-message{color:#a71414;border-color:#a71414;font-weight:700;margin-top:10px;font-size:20px}.over-payment .govuk-button-group{padding-top:2em}.over-payment .heading-medium{margin-top:.875em}.over-payment .heading-large{margin-top:.25em}.over-payment .govuk-panel--confirmation{color:#fff;background:#00703c}.over-payment .govuk-panel__title{font-size:5rem}.over-payment .govuk-body,.over-payment .govuk-body-m{font-size:2.1875rem}.over-payment .govuk-link{cursor:pointer}.over-payment .govuk-radios__conditional{padding-top:12px!important}.over-payment .right{float:right;cursor:pointer}.over-payment .radio{float:right}.over-payment .white{color:#fff}.whitespace-inherit{white-space:inherit!important}"]
922
1067
  },] }
923
1068
  ];
924
1069
  PaymentViewComponent.ctorParameters = () => [
925
1070
  { type: PaymentViewService },
1071
+ { type: NotificationService },
926
1072
  { type: PaymentLibComponent },
927
1073
  { type: ChangeDetectorRef },
928
1074
  { type: OrderslistService }
@@ -1004,6 +1150,9 @@ class RefundsService {
1004
1150
  postIssueRefund(body) {
1005
1151
  return this.https.post(`${this.paymentLibService.REFUNDS_API_ROOT}/refund`, body).pipe(catchError(this.errorHandlerService.handleError));
1006
1152
  }
1153
+ putResendOrEdit(body, refundRef, notificationType) {
1154
+ return this.https.put(`${this.paymentLibService.REFUNDS_API_ROOT}/resend/notification/${refundRef}?notificationType=${notificationType}`, body).pipe(catchError(this.errorHandlerService.handleError));
1155
+ }
1007
1156
  patchResubmitRefund(body, refund_reference) {
1008
1157
  // const opts = this.addHeaders({});
1009
1158
  return this.https.patch(`${this.paymentLibService.REFUNDS_API_ROOT}/resubmit/${refund_reference}`, body).pipe(catchError(this.errorHandlerService.handleError));
@@ -1048,10 +1197,12 @@ RefundsService.ctorParameters = () => [
1048
1197
  ];
1049
1198
 
1050
1199
  class ProcessRefundComponent {
1051
- constructor(RefundsService, formBuilder, OrderslistService, paymentLibComponent, router, activeRoute) {
1200
+ constructor(RefundsService, paymentViewService, formBuilder, OrderslistService, notificationService, paymentLibComponent, router, activeRoute) {
1052
1201
  this.RefundsService = RefundsService;
1202
+ this.paymentViewService = paymentViewService;
1053
1203
  this.formBuilder = formBuilder;
1054
1204
  this.OrderslistService = OrderslistService;
1205
+ this.notificationService = notificationService;
1055
1206
  this.paymentLibComponent = paymentLibComponent;
1056
1207
  this.router = router;
1057
1208
  this.activeRoute = activeRoute;
@@ -1072,7 +1223,9 @@ class ProcessRefundComponent {
1072
1223
  this.isReasonEmpty = false;
1073
1224
  this.isReasonInvalid = false;
1074
1225
  this.successMsg = null;
1226
+ this.cpoDetails = null;
1075
1227
  this.isConfirmButtondisabled = true;
1228
+ this.notificationPreview = false;
1076
1229
  }
1077
1230
  ngOnInit() {
1078
1231
  this.viewStatus = 'RefundProcess';
@@ -1104,6 +1257,13 @@ class ProcessRefundComponent {
1104
1257
  if ((typeof this.paymentLibComponent.TAKEPAYMENT === 'string' && this.paymentLibComponent.TAKEPAYMENT === 'false') || (typeof this.paymentLibComponent.TAKEPAYMENT === 'boolean' && !this.paymentLibComponent.TAKEPAYMENT)) {
1105
1258
  this.isFromRefundListPage = true;
1106
1259
  }
1260
+ this.paymentViewService.getPartyDetails(this.ccdCaseNumber).subscribe(response => {
1261
+ this.cpoDetails = JSON.parse(response).content[0];
1262
+ }, (error) => {
1263
+ this.errorMessage = error.replace(/"/g, "");
1264
+ this.isCPODown = true;
1265
+ });
1266
+ this.getTemplateInstructionType(this.paymentObj, this.refundlistsource.payment_reference);
1107
1267
  }
1108
1268
  checkRefundActions(code) {
1109
1269
  this.refundActionsHasError = false;
@@ -1140,6 +1300,9 @@ class ProcessRefundComponent {
1140
1300
  this.isOtherClicked = false;
1141
1301
  }
1142
1302
  }
1303
+ getNotificationPreviewObj(notificationPreviewObj) {
1304
+ this.notificationPreviewObj = notificationPreviewObj;
1305
+ }
1143
1306
  processRefundSubmit() {
1144
1307
  let processRefundRequest;
1145
1308
  let status;
@@ -1153,24 +1316,102 @@ class ProcessRefundComponent {
1153
1316
  || (controls.refundActionField.value == 'Return to caseworker' && controls.sendMeBackField.valid))) {
1154
1317
  if (controls.refundActionField.value === 'Approve') {
1155
1318
  status = 'APPROVE';
1156
- processRefundRequest = {
1157
- code: '',
1158
- reason: ''
1159
- };
1319
+ if (this.notificationPreviewObj) {
1320
+ processRefundRequest = {
1321
+ code: '',
1322
+ reason: '',
1323
+ template_preview: {
1324
+ body: this.notificationPreviewObj.body,
1325
+ from: {
1326
+ from_email_address: this.notificationPreviewObj.from.from_email_address,
1327
+ from_mail_address: {
1328
+ address_line: this.notificationPreviewObj.from.from_mail_address.address_line,
1329
+ city: this.notificationPreviewObj.from.from_mail_address.city,
1330
+ country: this.notificationPreviewObj.from.from_mail_address.country,
1331
+ county: this.notificationPreviewObj.from.from_mail_address.county,
1332
+ postal_code: this.notificationPreviewObj.from.from_mail_address.postal_code
1333
+ }
1334
+ },
1335
+ html: this.notificationPreviewObj.html,
1336
+ id: this.notificationPreviewObj.template_id,
1337
+ subject: this.notificationPreviewObj.subject,
1338
+ template_type: this.notificationPreviewObj.template_type,
1339
+ version: 0
1340
+ }
1341
+ };
1342
+ }
1343
+ else {
1344
+ processRefundRequest = {
1345
+ code: '',
1346
+ reason: ''
1347
+ };
1348
+ }
1160
1349
  }
1161
1350
  else if (controls.refundActionField.value === 'Reject') {
1162
1351
  status = 'REJECT';
1163
- processRefundRequest = {
1164
- code: controls.refundRejectReasonField.value ? controls.refundRejectReasonField.value : '',
1165
- reason: controls.refundRejectReasonField.value == 'RE005' ? controls.enterReasonField.value : ''
1166
- };
1352
+ if (this.notificationPreviewObj) {
1353
+ processRefundRequest = {
1354
+ code: controls.refundRejectReasonField.value ? controls.refundRejectReasonField.value : '',
1355
+ reason: controls.refundRejectReasonField.value == 'RE005' ? controls.enterReasonField.value : '',
1356
+ template_preview: {
1357
+ body: this.notificationPreviewObj.body,
1358
+ from: {
1359
+ from_email_address: this.notificationPreviewObj.from.from_email_address,
1360
+ from_mail_address: {
1361
+ address_line: this.notificationPreviewObj.from.from_mail_address.address_line,
1362
+ city: this.notificationPreviewObj.from.from_mail_address.city,
1363
+ country: this.notificationPreviewObj.from.from_mail_address.country,
1364
+ county: this.notificationPreviewObj.from.from_mail_address.county,
1365
+ postal_code: this.notificationPreviewObj.from.from_mail_address.postal_code
1366
+ }
1367
+ },
1368
+ html: this.notificationPreviewObj.html,
1369
+ id: this.notificationPreviewObj.template_id,
1370
+ subject: this.notificationPreviewObj.subject,
1371
+ template_type: this.notificationPreviewObj.template_type,
1372
+ version: 0
1373
+ }
1374
+ };
1375
+ }
1376
+ else {
1377
+ processRefundRequest = {
1378
+ code: controls.refundRejectReasonField.value ? controls.refundRejectReasonField.value : '',
1379
+ reason: controls.refundRejectReasonField.value == 'RE005' ? controls.enterReasonField.value : ''
1380
+ };
1381
+ }
1167
1382
  }
1168
1383
  else if (controls.refundActionField.value === 'Return to caseworker') {
1169
1384
  status = 'SENDBACK';
1170
- processRefundRequest = {
1171
- code: '',
1172
- reason: controls.sendMeBackField.value
1173
- };
1385
+ if (this.notificationPreviewObj) {
1386
+ processRefundRequest = {
1387
+ code: '',
1388
+ reason: controls.sendMeBackField.value,
1389
+ template_preview: {
1390
+ body: this.notificationPreviewObj.body,
1391
+ from: {
1392
+ from_email_address: this.notificationPreviewObj.from.from_email_address,
1393
+ from_mail_address: {
1394
+ address_line: this.notificationPreviewObj.from.from_mail_address.address_line,
1395
+ city: this.notificationPreviewObj.from.from_mail_address.city,
1396
+ country: this.notificationPreviewObj.from.from_mail_address.country,
1397
+ county: this.notificationPreviewObj.from.from_mail_address.county,
1398
+ postal_code: this.notificationPreviewObj.from.from_mail_address.postal_code
1399
+ }
1400
+ },
1401
+ html: this.notificationPreviewObj.html,
1402
+ id: this.notificationPreviewObj.template_id,
1403
+ subject: this.notificationPreviewObj.subject,
1404
+ template_type: this.notificationPreviewObj.template_type,
1405
+ version: 0
1406
+ }
1407
+ };
1408
+ }
1409
+ else {
1410
+ processRefundRequest = {
1411
+ code: '',
1412
+ reason: controls.sendMeBackField.value
1413
+ };
1414
+ }
1174
1415
  }
1175
1416
  this.RefundsService.patchRefundActions(processRefundRequest, this.refundReference, status).subscribe(response => {
1176
1417
  this.isSuccesspageEnable = true;
@@ -1268,30 +1509,13 @@ class ProcessRefundComponent {
1268
1509
  this.loadRefundListPage();
1269
1510
  }
1270
1511
  }
1271
- // loadCaseTransactionPage() {
1272
- // this.paymentLibComponent.isRefundStatusView = false;
1273
- // this.paymentLibCo}mponent.TAKEPAYMENT = true;
1274
- // this.paymentLibComponent.viewName = 'case-transactions';
1275
- // this.paymentViewService.getBSfeature().subscribe(
1276
- // features => {
1277
- // let result = JSON.parse(features).filter(feature => feature.uid === BS_ENABLE_FLAG);
1278
- // this.paymentLibComponent.ISBSENABLE = result[0] ? result[0].enable : false;
1279
- // },
1280
- // err => {
1281
- // this.paymentLibComponent.ISBSENABLE = false;
1282
- // }
1283
- // );
1284
- // let partUrl = `selectedOption=${this.paymentLibComponent.SELECTED_OPTION}`;
1285
- // partUrl += this.bsPaymentDcnNumber ? `&dcn=${this.bsPaymentDcnNumber}` : '';
1286
- // partUrl += this.paymentLibComponent.ISBSENABLE ? '&isBulkScanning=Enable' : '&isBulkScanning=Disable';
1287
- // partUrl += this.paymentLibComponent.ISTURNOFF ? '&isTurnOff=Enable' : '&isTurnOff=Disable';
1288
- // partUrl += this.paymentLibComponent.ISSFENABLE ? '&isStFixEnable=Enable' : '&isStFixEnable=Disable';
1289
- // partUrl += `&caseType=${this.paymentLibComponent.CASETYPE}`;
1290
- // partUrl += this.isNewPcipalOff ? '&isNewPcipalOff=Enable' : '&isNewPcipalOff=Disable';
1291
- // partUrl += this.isOldPcipalOff ? '&isOldPcipalOff=Enable' : '&isOldPcipalOff=Disable';
1292
- // let url = `/payment-history/${this.ccdCaseNumber}?view=case-transactions&takePayment=true&${partUrl}`;
1293
- // this.router.navigateByUrl(url);
1294
- // }
1512
+ loadCaseTransactionPage() {
1513
+ this.OrderslistService.setnavigationPage('casetransactions');
1514
+ this.OrderslistService.setisFromServiceRequestPage(false);
1515
+ this.paymentLibComponent.viewName = 'case-transactions';
1516
+ this.paymentLibComponent.ISBSENABLE = true;
1517
+ this.paymentLibComponent.isRefundStatusView = false;
1518
+ }
1295
1519
  resetForm(vals, field) {
1296
1520
  if (field === 'action' || field === 'all') {
1297
1521
  this.refundActionsHasError = vals[0];
@@ -1311,20 +1535,48 @@ class ProcessRefundComponent {
1311
1535
  }
1312
1536
  }
1313
1537
  goToCaseReview() {
1314
- this.router.navigate([`/cases/case-details/${this.ccdCaseNumber}`], { relativeTo: this.activeRoute });
1538
+ const isPayBubble = this.paymentLibComponent.isFromPayBubble;
1539
+ if (isPayBubble) {
1540
+ this.loadCaseTransactionPage();
1541
+ }
1542
+ else {
1543
+ this.router.navigate([`/cases/case-details/${this.ccdCaseNumber}`], { relativeTo: this.activeRoute });
1544
+ }
1545
+ }
1546
+ getTemplateInstructionType(payment, paymentReference) {
1547
+ if (payment == undefined || payment == null || payment.reference != paymentReference) {
1548
+ this.paymentViewService.getPaymentDetails(paymentReference).subscribe(payment => {
1549
+ this.paymentObj = payment;
1550
+ this.paymentObj.reference = paymentReference;
1551
+ this.templateInstructionType = this.notificationService.getNotificationInstructionType(this.paymentObj.channel, this.paymentObj.method);
1552
+ }, (error) => {
1553
+ this.templateInstructionType = 'Template';
1554
+ });
1555
+ }
1556
+ else {
1557
+ this.templateInstructionType = this.notificationService.getNotificationInstructionType(payment.channel, payment.method);
1558
+ }
1559
+ }
1560
+ showNotificationPreview() {
1561
+ this.notificationPreview = true;
1562
+ }
1563
+ hideNotificationPreview() {
1564
+ this.notificationPreview = false;
1315
1565
  }
1316
1566
  }
1317
1567
  ProcessRefundComponent.decorators = [
1318
1568
  { type: Component, args: [{
1319
1569
  selector: 'ccpay-process-refund',
1320
- template: "<ng-container *ngIf=\"viewStatus === 'RefundProcess'\">\n<div class=\"govuk-width-container\">\n\n <main class=\"govuk-main-wrapper govuk-!-padding-top-0\" [ngClass]=\"{'govuk-radios__conditional--hidden': isSuccesspageEnable}\" id=\"main-content\" role=\"main\">\n <div *ngIf=\"errorMessage.showError\">\n <div class=\"error-summary\" role=\"group\" aria-labelledby=\"failure-error-summary-heading\" tabindex=\"-1\">\n <h2 class=\"heading-medium error-summary-heading\" id=\"failure-error-summary-heading\">\n {{errorMessage.title}}\n </h2>\n <div class=\"govuk-error-summary__body process-refund-font\">\n {{errorMessage.body}}\n </div>\n </div>\n </div>\n\n <div class=\"payment-view-alignment\">\n\n <div class=\"govuk-grid-row\">\n <div class=\"column\">\n <h1 class=\"heading-large govuk-!-margin-top-0\">Review refund details</h1>\n </div>\n </div>\n <table>\n <tbody>\n\n <tr class=\"section\">\n <td class=\"bold tb-col-w\">Payment to be refunded</td>\n <td>\t{{refundlistsource?.refund_reference}} ({{refundlistsource.amount | currency :'GBP':'symbol':'1.2-2' }})</td>\n </tr>\n <tr class=\"section\">\n <td class=\"bold tb-col-w\">Reason for refund</td>\n <td>\t{{refundlistsource?.reason}}</td>\n </tr>\n <tr class=\"section\">\n <td class=\"bold tb-col-w\">Amount to be refunded</td>\n <td>{{refundlistsource?.amount | currency :'GBP':'symbol':'1.2-2' }}</td>\n </tr>\n <tr class=\"section\">\n <td class=\"bold tb-col-w\">Submitted by</td>\n <td>{{refundlistsource?.user_full_name}}</td>\n\n </tr>\n <tr class=\"section\">\n <td class=\"bold tb-col-w\">Date submitted</td>\n <td>\t{{refundlistsource?.date_created | date:'d MMMM yyyy' }}</td>\n </tr>\n\n </tbody>\n </table>\n\n <div>\n </div>\n </div>\n <div class=\"process-refund__panel\">\n <form [formGroup]=\"processRefundForm\" novalidate>\n <div class=\"\">\n <fieldset class=\"govuk-fieldset\" aria-describedby=\"sign-in-hint\">\n <legend class=\"govuk-fieldset__legend govuk-fieldset__legend--l\">\n <h1 class=\"heading-large\">\n What do you want to do with this refund?\n </h1>\n </legend>\n <div class=\"govuk-radios\" [ngClass]=\"{'form-group-error': refundActionsHasError}\">\n <p class=\"inline-error-message\"\n *ngIf=\"refundActionsHasError\">\n <span *ngIf=\"refundActionsHasError\">Please select an action</span>\n </p>\n <div class=\"govuk-radios__item\" *ngFor=\"let refundAction of refundActionList; let i = index;\">\n <input class=\"govuk-radios__input\" \n id=\"refundAction-{{i}}\" \n name=\"refundActionField\"\n type=\"radio\"\n formControlName=\"refundActionField\"\n (click)=\"checkRefundActions(refundAction.code)\"\n value=\"{{refundAction.code}}\">\n <label class=\"govuk-label govuk-radios__label process-refund-font\" for=\"refundAction-{{i}}\">\n {{refundAction.code}}\n </label>\n <div id=\"sign-in-item-hint\" class=\"govuk-hint govuk-radios__hint process-refund-font\">\n {{refundAction.label}}\n </div>\n </div>\n <div class=\"govuk-radios__conditional\" [ngClass]=\"{'govuk-radios__conditional--hidden': !isSendMeBackClicked}\">\n <div class=\"govuk-form-group\">\n <label class=\"govuk-label process-refund-font\" for=\"contact-by-text\">\n Add a reason\n </label>\n <p class=\"inline-error-message\"\n *ngIf=\"isReasonFieldEmpty || isReasonFieldInvalid || reasonFieldMinHasError || reasonFieldMaxHasError\">\n <span *ngIf=\"isReasonFieldEmpty\">Add a reason</span>\n <span *ngIf=\"isReasonFieldInvalid\">Add a valid reason</span>\n <span *ngIf=\"reasonFieldMinHasError\">Reason should be at least 3 characters.</span>\n <span *ngIf=\"reasonFieldMaxHasError\">Reason should be 255 characters or under.</span>\n </p>\n <textarea class=\"govuk-textarea govuk-!-width-one-third reason-font\"\n [ngClass]=\"{'inline-error-class': isReasonFieldEmpty || isReasonFieldInvalid || reasonFieldMinHasError || reasonFieldMaxHasError}\"\n id=\"sendmeback\"\n name=\"sendMeBackField\" \n formControlName=\"sendMeBackField\"\n rows=\"5\"></textarea>\n \n </div>\n\n </div>\n \n </div>\n \n </fieldset>\n </div>\n\n <div [ngClass]=\"{'govuk-radios__conditional--hidden': !isRejectClicked}\">\n <fieldset class=\"govuk-fieldset\">\n <legend class=\"govuk-fieldset__legend govuk-fieldset__legend--l\">\n <h2 class=\"heading-medium\">\n Why are you rejecting this refund?\n </h2>\n </legend>\n <div class=\"govuk-radios\" [ngClass]=\"{'form-group-error': refundRejectReasonHasError}\">\n <p class=\"inline-error-message\"\n *ngIf=\"refundRejectReasonHasError\">\n <span *ngIf=\"refundRejectReasonHasError\">Please select a reject reason</span>\n </p>\n <div class=\"govuk-radios__item\" *ngFor=\"let refundRejectReason of refundRejectReasonList; let j = index;\">\n <input class=\"govuk-radios__input\" \n id=\"refundRejectReason-{{j}}\"\n formControlName=\"refundRejectReasonField\"\n name=\"refundRejectReasonField\"\n (click)=\"checkRefundActions(refundRejectReason.code)\"\n type=\"radio\" value=\"{{refundRejectReason.code}}\">\n <label class=\"govuk-label govuk-radios__label process-refund-font\" for=\"refundRejectReason-{{j}}\">\n {{refundRejectReason.name}}\n </label>\n </div>\n </div>\n <div class=\"govuk-radios__conditional\" [ngClass]=\"{'govuk-radios__conditional--hidden': !isOtherClicked}\" id=\"conditional-contact-3\">\n <div class=\"govuk-form-group\">\n <label class=\"govuk-label process-refund-font \" for=\"contact-by-text\">\n Enter reason\n </label>\n <p class=\"inline-error-message\" *ngIf=\"isReasonEmpty || isReasonInvalid\">\n <span *ngIf=\"isReasonEmpty\">Enter reason.</span>\n <span *ngIf=\"isReasonInvalid\">Enter a valid reason</span>\n </p>\n <input class=\"govuk-input govuk-!-width-one-third reason-font\" id=\"otherReason\" \n [ngClass]=\"{'inline-error-class': isReasonEmpty || isReasonInvalid}\"\n formControlName=\"enterReasonField\" name=\"enterReasonField\" type=\"text\"></div>\n \n </div>\n \n </fieldset>\n </div>\n\n <div class=\"govuk-button-group\">\n <button (click)=\"redirecttoRefundListPage()\" class=\"govuk-button govuk-button--secondary marginright\"> Previous</button>\n <button (click)=\"processRefundSubmit()\" class=\"govuk-button button\"\n data-module=\"govuk-button\">\n Submit \n </button>\n <br/><br/>\n </div>\n \n <div *ngIf=\"!isFromRefundListPage\" class=\"govuk-button-group margin\">\n\n <p><a (click)=\"loadRefundsHomePage()\" class=\"govuk-link pointer\" data-module=\"govuk-button\" href=\"javascript:void(0)\">Cancel</a></p>\n</div>\n</form>\n </div>\n \n\n </main>\n \n <main class=\"govuk-main-wrapper govuk-main-wrapper--l success-page-padding--top25\" [ngClass]=\"{'govuk-radios__conditional--hidden': !isSuccesspageEnable}\" id=\"main-content\" role=\"main\" >\n <div class=\"govuk-grid-row\">\n <div class=\"govuk-panel govuk-panel-refund--confirmation\">\n <h1 class=\"heading-xlarge\">\n {{successMsg}}\n </h1>\n </div>\n <p class=\"govuk-body process-refund-font\">\n <a (click) = \"goToCaseReview()\" class=\"govuk-link pointer\" href=\"javascript:void(0)\">Return to case</a>\n </p>\n </div>\n </main>\n</div>\n</ng-container>\n\n",
1321
- styles: [".tb-col-w{width:330px}.tr-border{border-bottom:2px solid}.payment-view-alignment{margin-left:30px}.govuk-button{float:left!important;font-size:19px;margin-top:2em!important}.remission{margin-bottom:7em}.process-refund-font{font-size:19px!important}.govuk-radios__conditional--hidden{display:none}.inline-error-message{color:#c11717;font-weight:700;margin-top:10px;border-color:#c11717}.inline-error-class{outline:3px solid #c11717;outline-offset:0;border-color:#c11717}.form-group-error{border-left:5px solid #c11717;padding-left:15px}.govuk-panel-refund--confirmation{color:#fff;background:#00703c}.process-refund__panel{display:flex;flex-direction:column;margin-left:25px;margin-top:30px}.button-margin--left25{margin-left:25px}.success-page-padding--top25{padding-top:25px}.margin{margin-top:5em}.marginright{margin-right:1.5em}.govuk-textarea{line-height:2.25}.reason-font{font-size:19px!important}.pointer{cursor:pointer}"]
1570
+ template: "<ng-container *ngIf=\"viewStatus === 'RefundProcess'\">\n<div class=\"govuk-width-container\">\n\n <main class=\"govuk-main-wrapper govuk-!-padding-top-0\" [ngClass]=\"{'govuk-radios__conditional--hidden': isSuccesspageEnable}\" id=\"main-content\" role=\"main\">\n <div *ngIf=\"errorMessage.showError\">\n <div class=\"error-summary\" role=\"group\" aria-labelledby=\"failure-error-summary-heading\" tabindex=\"-1\">\n <h2 class=\"heading-medium error-summary-heading\" id=\"failure-error-summary-heading\">\n {{errorMessage.title}}\n </h2>\n <div class=\"govuk-error-summary__body process-refund-font\">\n {{errorMessage.body}}\n </div>\n </div>\n </div>\n\n <div class=\"payment-view-alignment\">\n\n <div class=\"govuk-grid-row\">\n <div class=\"column\">\n <h1 class=\"heading-large govuk-!-margin-top-0\">Review refund details</h1>\n </div>\n </div>\n <table>\n <tbody>\n\n <tr class=\"section\">\n <td class=\"bold tb-col-w\">Payment to be refunded</td>\n <td colspan=\"2\">{{refundlistsource?.refund_reference}} ({{refundlistsource.amount | currency :'GBP':'symbol':'1.2-2' }})</td>\n </tr>\n <tr class=\"section\">\n <td class=\"bold tb-col-w\">Reason for refund</td>\n <td colspan=\"2\">{{refundlistsource?.reason?.trim()}}</td>\n </tr>\n <tr class=\"section\">\n <td class=\"bold tb-col-w\">Amount to be refunded</td>\n <td colspan=\"2\">{{refundlistsource?.amount | currency :'GBP':'symbol':'1.2-2' }}</td>\n </tr>\n <tr class=\"section\">\n <td class=\"bold tb-col-w\">Sent to</td>\n <td colspan=\"2\">{{cpoDetails?.responsibleParty}}</td>\n </tr>\n <tr class=\"section\">\n <td class=\"bold tb-col-w\">Sent via</td>\n <td colspan=\"2\">\n <div *ngIf=\"refundlistsource?.contact_details?.notification_type === 'EMAIL'\" class=\"contactDetails-width font-size-19px\">\n <strong>Email</strong>\n <br/>\n {{refundlistsource?.contact_details?.email?.trim()}}\n </div>\n <div *ngIf=\"refundlistsource?.contact_details?.notification_type === 'LETTER'\" class=\"contactDetails-width font-size-19px\">\n <strong>Post</strong>\n <br/>\n {{refundlistsource?.contact_details?.address_line?.trim()}} {{refundlistsource?.contact_details?.city?.trim()}} {{refundlistsource?.contact_details?.county?.trim()}} {{refundlistsource?.contact_details?.country?.trim()}} {{refundlistsource?.contact_details?.postal_code?.trim()}}\n </div> \n </td>\n </tr>\n <tr class=\"section\">\n <td class=\"bold tb-col-w\">Submitted by</td>\n <td colspan=\"2\">{{refundlistsource?.user_full_name}}</td>\n\n </tr>\n <tr class=\"section\">\n <td class=\"bold tb-col-w\">Date submitted</td>\n <td colspan=\"2\">{{refundlistsource?.date_created | date:'d MMMM yyyy' }}</td>\n </tr>\n <tr class=\"section\">\n <td class=\"bold tb-col-w\">Notification</td>\n <td>{{templateInstructionType}}</td>\n <td>\n <a *ngIf=\"!notificationPreview\" href=\"Javascript:void(0)\" class=\"govuk-link pointer right\" (click)=\"showNotificationPreview()\">\n Preview\n </a>\n <a *ngIf=\"notificationPreview\" href=\"Javascript:void(0)\" class=\"govuk-link pointer right\" (click)=\"hideNotificationPreview()\">\n Hide Preview\n </a>\n </td>\n\n </tr>\n\n </tbody>\n </table>\n\n <app-notification-preview *ngIf=\"notificationPreview\" [paymentReference]=\"refundlistsource?.payment_reference\"\n [payment]=\"paymentObj\"\n [contactDetails]=\"refundlistsource?.contact_details\"\n [refundReason]=\"refundlistsource?.reason_code\" [refundAmount]=\"refundlistsource?.amount\"\n [refundReference]=\"refundlistsource?.refund_reference\"\n (notificationPreviewEvent) = \"getNotificationPreviewObj($event)\">\n </app-notification-preview>\n\n <div>\n </div>\n </div>\n <div class=\"process-refund__panel\">\n <form [formGroup]=\"processRefundForm\" novalidate>\n <div class=\"\">\n <fieldset class=\"govuk-fieldset\" aria-describedby=\"sign-in-hint\">\n <legend class=\"govuk-fieldset__legend govuk-fieldset__legend--l\">\n <h1 class=\"heading-large\">\n What do you want to do with this refund?\n </h1>\n </legend>\n <div class=\"govuk-radios\" [ngClass]=\"{'form-group-error': refundActionsHasError}\">\n <p class=\"inline-error-message\"\n *ngIf=\"refundActionsHasError\">\n <span *ngIf=\"refundActionsHasError\">Please select an action</span>\n </p>\n <div class=\"govuk-radios__item\" *ngFor=\"let refundAction of refundActionList; let i = index;\">\n <input class=\"govuk-radios__input\" \n id=\"refundAction-{{i}}\" \n name=\"refundActionField\"\n type=\"radio\"\n formControlName=\"refundActionField\"\n (click)=\"checkRefundActions(refundAction.code)\"\n value=\"{{refundAction.code}}\">\n <label class=\"govuk-label govuk-radios__label process-refund-font\" for=\"refundAction-{{i}}\">\n {{refundAction.code}}\n </label>\n <div id=\"sign-in-item-hint\" class=\"govuk-hint govuk-radios__hint process-refund-font\">\n {{refundAction.label}}\n </div>\n </div>\n <div class=\"govuk-radios__conditional\" [ngClass]=\"{'govuk-radios__conditional--hidden': !isSendMeBackClicked}\">\n <div class=\"govuk-form-group\">\n <label class=\"govuk-label process-refund-font\" for=\"contact-by-text\">\n Add a reason\n </label>\n <p class=\"inline-error-message\"\n *ngIf=\"isReasonFieldEmpty || isReasonFieldInvalid || reasonFieldMinHasError || reasonFieldMaxHasError\">\n <span *ngIf=\"isReasonFieldEmpty\">Add a reason</span>\n <span *ngIf=\"isReasonFieldInvalid\">Add a valid reason</span>\n <span *ngIf=\"reasonFieldMinHasError\">Reason should be at least 3 characters.</span>\n <span *ngIf=\"reasonFieldMaxHasError\">Reason should be 255 characters or under.</span>\n </p>\n <textarea class=\"govuk-textarea govuk-!-width-one-third reason-font\"\n [ngClass]=\"{'inline-error-class': isReasonFieldEmpty || isReasonFieldInvalid || reasonFieldMinHasError || reasonFieldMaxHasError}\"\n id=\"sendmeback\"\n name=\"sendMeBackField\" \n formControlName=\"sendMeBackField\"\n rows=\"5\"></textarea>\n \n </div>\n\n </div>\n \n </div>\n \n </fieldset>\n </div>\n\n <div [ngClass]=\"{'govuk-radios__conditional--hidden': !isRejectClicked}\">\n <fieldset class=\"govuk-fieldset\">\n <legend class=\"govuk-fieldset__legend govuk-fieldset__legend--l\">\n <h2 class=\"heading-medium\">\n Why are you rejecting this refund?\n </h2>\n </legend>\n <div class=\"govuk-radios\" [ngClass]=\"{'form-group-error': refundRejectReasonHasError}\">\n <p class=\"inline-error-message\"\n *ngIf=\"refundRejectReasonHasError\">\n <span *ngIf=\"refundRejectReasonHasError\">Please select a reject reason</span>\n </p>\n <div class=\"govuk-radios__item\" *ngFor=\"let refundRejectReason of refundRejectReasonList; let j = index;\">\n <input class=\"govuk-radios__input\" \n id=\"refundRejectReason-{{j}}\"\n formControlName=\"refundRejectReasonField\"\n name=\"refundRejectReasonField\"\n (click)=\"checkRefundActions(refundRejectReason.code)\"\n type=\"radio\" value=\"{{refundRejectReason.code}}\">\n <label class=\"govuk-label govuk-radios__label process-refund-font\" for=\"refundRejectReason-{{j}}\">\n {{refundRejectReason.name}}\n </label>\n </div>\n </div>\n <div class=\"govuk-radios__conditional\" [ngClass]=\"{'govuk-radios__conditional--hidden': !isOtherClicked}\" id=\"conditional-contact-3\">\n <div class=\"govuk-form-group\">\n <label class=\"govuk-label process-refund-font \" for=\"contact-by-text\">\n Enter reason\n </label>\n <p class=\"inline-error-message\" *ngIf=\"isReasonEmpty || isReasonInvalid\">\n <span *ngIf=\"isReasonEmpty\">Enter reason.</span>\n <span *ngIf=\"isReasonInvalid\">Enter a valid reason</span>\n </p>\n <input class=\"govuk-input govuk-!-width-one-third reason-font\" id=\"otherReason\" \n [ngClass]=\"{'inline-error-class': isReasonEmpty || isReasonInvalid}\"\n formControlName=\"enterReasonField\" name=\"enterReasonField\" type=\"text\"></div>\n \n </div>\n \n </fieldset>\n </div>\n\n <div class=\"govuk-button-group\">\n <button (click)=\"redirecttoRefundListPage()\" class=\"govuk-button govuk-button--secondary marginright\"> Previous</button>\n <button (click)=\"processRefundSubmit()\" class=\"govuk-button button\"\n data-module=\"govuk-button\">\n Submit \n </button>\n <br/><br/>\n </div>\n \n <div *ngIf=\"!isFromRefundListPage\" class=\"govuk-button-group margin\">\n\n <p><a (click)=\"loadRefundsHomePage()\" class=\"govuk-link pointer\" data-module=\"govuk-button\">Cancel</a></p>\n</div>\n</form>\n </div>\n \n\n </main>\n \n <main class=\"govuk-main-wrapper govuk-main-wrapper--l success-page-padding--top25\" [ngClass]=\"{'govuk-radios__conditional--hidden': !isSuccesspageEnable}\" id=\"main-content\" role=\"main\" >\n <div class=\"govuk-grid-row pagesize\">\n <div class=\"govuk-panel govuk-panel-refund--confirmation\">\n <h1 class=\"heading-xlarge\">\n {{successMsg}}\n </h1>\n </div>\n <p class=\"govuk-body process-refund-font\">\n <a href=\"Javascript:void(0)\" (click)=\"goToCaseReview()\" class=\"govuk-link pointer\">Return to case</a>\n </p>\n </div>\n </main>\n</div>\n</ng-container>\n\n",
1571
+ styles: [".tb-col-w{width:330px}.tr-border{border-bottom:2px solid}.payment-view-alignment{margin-left:30px}.govuk-button{float:left!important;font-size:19px;margin-top:2em!important}.remission{margin-bottom:7em}.process-refund-font{font-size:19px!important}.govuk-radios__conditional--hidden{display:none}.inline-error-message{color:#c11717;font-weight:700;margin-top:10px;border-color:#c11717}.inline-error-class{outline:3px solid #c11717;outline-offset:0;border-color:#c11717}.form-group-error{border-left:5px solid #c11717;padding-left:15px}.govuk-panel-refund--confirmation{color:#fff;background:#00703c}.process-refund__panel{margin-left:25px;margin-top:30px}.button-margin--left25{margin-left:25px}.success-page-padding--top25{padding-top:25px}.margin{margin-top:5em}.marginright{margin-right:1.5em}.govuk-textarea{line-height:2.25}.reason-font{font-size:19px!important}.pointer{cursor:pointer}.right{float:right}.pagesize{margin:2em;width:97%}"]
1322
1572
  },] }
1323
1573
  ];
1324
1574
  ProcessRefundComponent.ctorParameters = () => [
1325
1575
  { type: RefundsService },
1576
+ { type: PaymentViewService },
1326
1577
  { type: FormBuilder },
1327
1578
  { type: OrderslistService },
1579
+ { type: NotificationService },
1328
1580
  { type: PaymentLibComponent },
1329
1581
  { type: Router },
1330
1582
  { type: ActivatedRoute }
@@ -1339,10 +1591,10 @@ class RefundListComponent {
1339
1591
  this.refundService = refundService;
1340
1592
  this.submittedRefundList = [];
1341
1593
  this.rejectedRefundList = [];
1594
+ // approvalStatus = 'Sent for approval';
1595
+ // rejectStatus = 'Update required';
1342
1596
  this.approvalStatus = 'Sent for approval';
1343
1597
  this.rejectStatus = 'Update required';
1344
- // approvalStatus = 'sent for approval';
1345
- // rejectStatus = 'sent back';
1346
1598
  this.errorMessage = null;
1347
1599
  this.isAuthorized = true;
1348
1600
  }
@@ -1497,7 +1749,7 @@ class StatusHistoryComponent {
1497
1749
  StatusHistoryComponent.decorators = [
1498
1750
  { type: Component, args: [{
1499
1751
  selector: 'ccpay-payment-statuses',
1500
- template: "<div class=\"column\">\n <h2 class=\"heading-medium\">{{ pageTitle }}</h2>\n</div>\n\n\n<div class=\"error-summary\" role=\"group\" aria-labelledby=\"failure-error-summary-heading\" tabindex=\"-1\" *ngIf=\"errorMessage\" role=\"status\">\n <h2 class=\"heading-medium error-summary-heading\" id=\"failure-error-summary-heading\">\n Payment status history could not be retrieved\n </h2>\n <div class=\"govuk-error-summary__body\">\n {{ errorMessage }}\n </div>\n</div>\n\n<div *ngIf=\"!errorMessage && statuses\" role=\"status\">\n <table>\n <thead>\n <tr>\n <th>Status</th>\n <th *ngIf=\"isTakePayment\">Amount</th>\n <th>Date and time</th>\n </tr>\n </thead> \n <tbody>\n <tr *ngFor=\"let status of statuses.status_histories\">\n <td>{{ status.status }}</td>\n <td *ngIf=\"isTakePayment\">\u00A3{{ statuses.amount | number:'.2' }}</td>\n <td>{{ status.date_created | date:'dd MMMM yyyy HH:mm:ss'}}</td>\n </tr>\n </tbody>\n </table>\n</div>\n",
1752
+ template: "<div class=\"column\">\n <h2 class=\"heading-medium\">{{ pageTitle }}</h2>\n</div>\n\n\n<div class=\"error-summary\" role=\"group\" aria-labelledby=\"failure-error-summary-heading\" tabindex=\"-1\" *ngIf=\"errorMessage\">\n <h2 class=\"heading-medium error-summary-heading\" id=\"failure-error-summary-heading\">\n Payment status history could not be retrieved\n </h2>\n <div class=\"govuk-error-summary__body\">\n {{ errorMessage }}\n </div>\n</div>\n\n<div *ngIf=\"!errorMessage && statuses\">\n <table>\n <thead>\n <tr>\n <th>Status</th>\n <th *ngIf=\"isTakePayment\">Amount</th>\n <th>Date and time</th>\n </tr>\n </thead> \n <tbody>\n <tr *ngFor=\"let status of statuses.status_histories\">\n <td>{{ status.status }}</td>\n <td *ngIf=\"isTakePayment\">\u00A3{{ statuses.amount | number:'.2' }}</td>\n <td>{{ status.date_created | date:'dd MMMM yyyy HH:mm:ss'}}</td>\n </tr>\n </tbody>\n </table>\n</div>\n",
1501
1753
  styles: [""]
1502
1754
  },] }
1503
1755
  ];
@@ -1509,40 +1761,351 @@ StatusHistoryComponent.propDecorators = {
1509
1761
  isTakePayment: [{ type: Input }]
1510
1762
  };
1511
1763
 
1512
- class PbaDetailsComponent {
1513
- constructor() { }
1514
- ngOnInit() {
1764
+ class ContactDetailsComponent {
1765
+ constructor(formBuilder, notificationService, paymentLibComponent) {
1766
+ this.formBuilder = formBuilder;
1767
+ this.notificationService = notificationService;
1768
+ this.paymentLibComponent = paymentLibComponent;
1769
+ this.assignContactDetails = new EventEmitter();
1770
+ this.assignContactDetailsInFefundsList = new EventEmitter();
1771
+ this.redirectToIssueRefund = new EventEmitter();
1772
+ this.pageTitle = 'Payment status history';
1773
+ this.isEmailSAddressClicked = true;
1774
+ this.isShowPickAddress = false;
1775
+ this.isPostcodeClicked = false;
1776
+ this.isManualAddressClicked = false;
1777
+ this.addressPostcodeList = [];
1778
+ this.isAddressBoxEmpty = false;
1779
+ this.isEmailEmpty = false;
1780
+ this.emailHasError = false;
1781
+ this.isPostcodeEmpty = false;
1782
+ this.postcodeHasError = false;
1783
+ this.isaddressLine1Empty = false;
1784
+ this.addressLine1HasError = false;
1785
+ this.addressLine2HasError = false;
1786
+ this.isTownOrCityEmpty = false;
1787
+ this.townOrCityHasError = false;
1788
+ this.isCountyEmpty = false;
1789
+ this.countyHasError = false;
1790
+ this.isMPostcodeEmpty = false;
1791
+ this.mpostcodeHasError = false;
1792
+ this.isCountryEmpty = false;
1515
1793
  }
1516
- }
1517
- PbaDetailsComponent.decorators = [
1518
- { type: Component, args: [{
1519
- selector: 'ccpay-pba-details',
1520
- template: "\n <h2 class=\"heading-large\">Payment method</h2>\n <table>\n <tbody>\n <tr>\n <td class=\"bold tb-col-w\">Method</td>\n <td class=\"capitalize\">{{ payment.method | lowercase}}</td>\n </tr>\n <tr>\n <td class=\"bold tb-col-w\">Type</td>\n <td>Credit</td>\n </tr>\n <tr *ngIf=\"payment.organisation_name\">\n <td class=\"bold tb-col-w\">PBA account name</td>\n <td>{{ payment.organisation_name }}</td>\n </tr>\n <tr *ngIf=\"payment.account_number\">\n <td class=\"bold tb-col-w\">PBA number</td>\n <td>{{ payment.account_number }}</td>\n </tr>\n <tr *ngIf=\"payment.customer_reference\">\n <td class=\"bold tb-col-w\">Customer internal reference</td>\n <td>{{ payment.customer_reference }}</td>\n </tr>\n </tbody>\n </table>\n",
1521
- styles: [".capitalize:first-letter{text-transform:uppercase}.tb-col-w{width:330px}"]
1522
- },] }
1523
- ];
1524
- PbaDetailsComponent.ctorParameters = () => [];
1525
- PbaDetailsComponent.propDecorators = {
1526
- payment: [{ type: Input }]
1527
- };
1528
-
1529
- let isDebugMode = false;
1530
- const noop = () => undefined;
1531
- const ɵ0 = noop;
1532
- class ConsoleLoggerService {
1533
- get info() {
1534
- if (isDebugMode) {
1535
- return console.info.bind(console);
1536
- }
1537
- else {
1538
- return noop;
1794
+ ngOnInit() {
1795
+ this.resetForm([false, false, false, false, false, false, false, false, false, false, false, false, false, false], 'all');
1796
+ this.emailAddressForm = this.formBuilder.group({
1797
+ email: new FormControl('', Validators.compose([
1798
+ Validators.required,
1799
+ Validators.pattern('^[a-z0-9._%+-]+@[a-z0-9-]+\\.[a-z]{2,4}$')
1800
+ ]))
1801
+ });
1802
+ this.postCodeForm = this.formBuilder.group({
1803
+ postcode: new FormControl('', Validators.compose([
1804
+ Validators.required,
1805
+ Validators.pattern('^([A-Za-z]{1,2}[0-9]{1,2}[A-Za-z]{0,1} ?[0-9][A-Za-z]{2})')
1806
+ ]))
1807
+ });
1808
+ this.manualAddressForm = this.formBuilder.group({
1809
+ addressl1: new FormControl('', Validators.compose([
1810
+ Validators.required,
1811
+ Validators.pattern('^[a-zA-Z0-9\\s,\'-]*$')
1812
+ ])),
1813
+ addressl2: new FormControl('', Validators.compose([
1814
+ Validators.pattern('^[a-zA-Z0-9\\s,\'-]*$')
1815
+ ])),
1816
+ townorcity: new FormControl('', Validators.compose([
1817
+ Validators.required,
1818
+ Validators.pattern('^[a-zA-Z0-9\\s,\'-]*$')
1819
+ ])),
1820
+ county: new FormControl('', Validators.compose([
1821
+ Validators.pattern('^[a-zA-Z0-9\\s,\'-]*$')
1822
+ ])),
1823
+ mpostcode: new FormControl('', Validators.compose([
1824
+ Validators.required,
1825
+ Validators.pattern('^([A-Za-z]{1,2}[0-9]{1,2}[A-Za-z]{0,1} ?[0-9][A-Za-z]{2})')
1826
+ ])),
1827
+ country: new FormControl('', Validators.compose([
1828
+ Validators.required
1829
+ ]))
1830
+ });
1831
+ if (this.addressObj !== undefined && this.addressObj !== '') {
1832
+ this.setEditDetails();
1833
+ }
1834
+ if (this.isEditOperationInRefundList === undefined) {
1835
+ this.isEditOperationInRefundList = false;
1836
+ }
1837
+ }
1838
+ setEditDetails() {
1839
+ if (this.addressObj.notification_type === 'EMAIL') {
1840
+ this.isEmailSAddressClicked = true;
1841
+ this.isPostcodeClicked = false;
1842
+ this.isManualAddressClicked = false;
1843
+ this.emailAddressForm.setValue({ email: this.addressObj.contact_details.email });
1844
+ }
1845
+ else if (this.addressObj.notification_type === 'LETTER') {
1846
+ this.isEmailSAddressClicked = false;
1847
+ this.isPostcodeClicked = true;
1848
+ this.isManualAddressClicked = true;
1849
+ this.manualAddressForm.patchValue({
1850
+ addressl1: this.addressObj.contact_details.address_line,
1851
+ townorcity: this.addressObj.contact_details.city,
1852
+ county: this.addressObj.contact_details.county,
1853
+ country: this.addressObj.contact_details.country,
1854
+ mpostcode: this.addressObj.contact_details.postal_code
1855
+ });
1539
1856
  }
1540
1857
  }
1541
- get warn() {
1542
- if (isDebugMode) {
1543
- return console.warn.bind(console);
1544
- }
1545
- else {
1858
+ selectContactOption(type, isLinkedClied) {
1859
+ this.resetForm([false, false, false, false, false, false, false, false, false, false, false, false, false, false, false], 'all');
1860
+ if (type === 'Email' && isLinkedClied === 'false') {
1861
+ this.isEmailSAddressClicked = true;
1862
+ this.isPostcodeClicked = false;
1863
+ this.isManualAddressClicked = false;
1864
+ }
1865
+ else if (type === 'Postcode' && isLinkedClied === 'false') {
1866
+ this.isEmailSAddressClicked = false;
1867
+ this.isPostcodeClicked = true;
1868
+ this.isManualAddressClicked = false;
1869
+ }
1870
+ else if (type === 'Postcode' && isLinkedClied === 'true') {
1871
+ this.isEmailSAddressClicked = false;
1872
+ this.isPostcodeClicked = true;
1873
+ this.isManualAddressClicked = true;
1874
+ }
1875
+ }
1876
+ finalFormSubmit() {
1877
+ this.resetForm([false, false, false, false, false, false, false, false, false, false, false, false, false, false, false], 'all');
1878
+ if (this.isEmailSAddressClicked) {
1879
+ const emailField = this.emailAddressForm.controls.email;
1880
+ if (this.emailAddressForm.valid) {
1881
+ if (!this.isEditOperationInRefundList) {
1882
+ this.assignContactDetails.emit({
1883
+ email: emailField.value,
1884
+ notification_type: 'EMAIL'
1885
+ });
1886
+ }
1887
+ else {
1888
+ this.assignContactDetailsInFefundsList.emit({
1889
+ email: emailField.value,
1890
+ notification_type: 'EMAIL'
1891
+ });
1892
+ }
1893
+ }
1894
+ else {
1895
+ if (emailField.value == '') {
1896
+ this.resetForm([true, false, false, false, false, false, false, false, false, false, false, false, false, false], 'email');
1897
+ }
1898
+ if (emailField.value != '' && emailField.invalid) {
1899
+ this.resetForm([false, true, false, false, false, false, false, false, false, false, false, false, false, false], 'email');
1900
+ }
1901
+ }
1902
+ }
1903
+ else if (this.isPostcodeClicked && !this.isManualAddressClicked) {
1904
+ this.postcodeValidation('FS');
1905
+ }
1906
+ else if (this.isPostcodeClicked && this.isManualAddressClicked) {
1907
+ const fieldCtrls = this.manualAddressForm.controls;
1908
+ if (this.manualAddressForm.valid) {
1909
+ if (!this.isEditOperationInRefundList) {
1910
+ this.assignContactDetails.emit({
1911
+ address_line: fieldCtrls.addressl1.value + ' ' + fieldCtrls.addressl2.value,
1912
+ city: fieldCtrls.townorcity.value,
1913
+ county: fieldCtrls.county.value,
1914
+ postal_code: fieldCtrls.mpostcode.value,
1915
+ country: fieldCtrls.country.value,
1916
+ notification_type: 'LETTER'
1917
+ });
1918
+ }
1919
+ else {
1920
+ this.assignContactDetailsInFefundsList.emit({
1921
+ address_line: fieldCtrls.addressl1.value + ' ' + fieldCtrls.addressl2.value,
1922
+ city: fieldCtrls.townorcity.value,
1923
+ county: fieldCtrls.county.value,
1924
+ postal_code: fieldCtrls.mpostcode.value,
1925
+ country: fieldCtrls.country.value,
1926
+ notification_type: 'LETTER'
1927
+ });
1928
+ }
1929
+ }
1930
+ else {
1931
+ if (fieldCtrls.addressl1.value == '') {
1932
+ this.resetForm([false, false, false, false, true, false, false, false, false, false, false, false, false, false], 'address1');
1933
+ }
1934
+ if (fieldCtrls.addressl1.value != '' && fieldCtrls.addressl1.invalid) {
1935
+ this.resetForm([false, false, false, false, false, true, false, false, false, false, false, false, false, false], 'address1');
1936
+ }
1937
+ if (fieldCtrls.addressl2.value != '' && fieldCtrls.addressl2.invalid) {
1938
+ this.resetForm([false, false, false, false, false, false, true, false, false, false, false, false, false, false], 'address2');
1939
+ }
1940
+ if (fieldCtrls.townorcity.value == '') {
1941
+ this.resetForm([false, false, false, false, false, false, false, true, false, false, false, false, false, false], 'town');
1942
+ }
1943
+ if (fieldCtrls.townorcity.value != '' && fieldCtrls.townorcity.invalid) {
1944
+ this.resetForm([false, false, false, false, false, false, false, false, true, false, false, false, false, false], 'town');
1945
+ }
1946
+ if (fieldCtrls.county.value == '') {
1947
+ this.resetForm([false, false, false, false, false, false, false, false, false, true, false, false, false, false], 'county');
1948
+ }
1949
+ if (fieldCtrls.county.value != '' && fieldCtrls.county.invalid) {
1950
+ this.resetForm([false, false, false, false, false, false, false, false, false, false, true, false, false, false], 'county');
1951
+ }
1952
+ if (fieldCtrls.mpostcode.value == '') {
1953
+ this.resetForm([false, false, false, false, false, false, false, false, false, false, false, true, false, false], 'mpostcode');
1954
+ }
1955
+ if (fieldCtrls.mpostcode.value != '' && fieldCtrls.mpostcode.invalid) {
1956
+ this.resetForm([false, false, false, false, false, false, false, false, false, false, false, false, true, false], 'mpostcode');
1957
+ }
1958
+ if (fieldCtrls.country.value == '') {
1959
+ this.resetForm([false, false, false, false, false, false, false, false, false, false, false, false, false, true], 'country');
1960
+ }
1961
+ }
1962
+ }
1963
+ }
1964
+ postcodeValidation(str) {
1965
+ this.resetForm([false, false, false, false, false, false, false, false, false, false, false, false, false, false, false], 'all');
1966
+ const postcodeField = this.postCodeForm.controls.postcode;
1967
+ if (this.postCodeForm.valid) {
1968
+ if (str === 'FA') {
1969
+ this.notificationService.getAddressByPostcode(postcodeField.value).subscribe(refundsNotification => {
1970
+ this.addressPostcodeList = refundsNotification['results'];
1971
+ this.isShowPickAddress = refundsNotification['header'].totalresults > 0;
1972
+ if (!this.isShowPickAddress) {
1973
+ this.resetForm([false, false, false, true, false, false, false, false, false, false, false, false, false], 'postcode');
1974
+ }
1975
+ }),
1976
+ (error) => {
1977
+ this.isShowPickAddress = false;
1978
+ this.errorMessage = error.replace(/"/g, "");
1979
+ };
1980
+ }
1981
+ else if (str === 'FS') {
1982
+ if (this.postcodeAddress !== undefined && this.postcodeAddress) {
1983
+ this.isAddressBoxEmpty = false;
1984
+ let addressLine = "";
1985
+ let addressArray = this.postcodeAddress.ADDRESS.split(",");
1986
+ for (let i = 0; i < addressArray.length - 2; i++) {
1987
+ addressLine += addressArray[i];
1988
+ }
1989
+ const addressObject = {
1990
+ address_line: addressLine,
1991
+ city: this.postcodeAddress.POST_TOWN,
1992
+ county: this.postcodeAddress.LOCAL_CUSTODIAN_CODE_DESCRIPTION,
1993
+ postal_code: this.postcodeAddress.POSTCODE,
1994
+ country: 'United Kingdom',
1995
+ notification_type: 'LETTER'
1996
+ };
1997
+ if (!this.isEditOperationInRefundList) {
1998
+ this.assignContactDetails.emit(addressObject);
1999
+ }
2000
+ else {
2001
+ this.assignContactDetailsInFefundsList.emit(addressObject);
2002
+ }
2003
+ }
2004
+ else {
2005
+ this.isAddressBoxEmpty = true;
2006
+ }
2007
+ }
2008
+ }
2009
+ else {
2010
+ if (postcodeField.value == '') {
2011
+ this.resetForm([false, false, true, false, false, false, false, false, false, false, false, false, false], 'postcode');
2012
+ }
2013
+ if (postcodeField.value != '' && postcodeField.invalid) {
2014
+ this.resetForm([false, false, false, true, false, false, false, false, false, false, false, false, false], 'postcode');
2015
+ }
2016
+ }
2017
+ }
2018
+ redirection(event) {
2019
+ this.redirectToIssueRefund.emit(event);
2020
+ }
2021
+ resetForm(val, field) {
2022
+ if (field === 'email' || field === 'all') {
2023
+ this.isEmailEmpty = val[0];
2024
+ this.emailHasError = val[1];
2025
+ }
2026
+ if (field === 'postcode' || field === 'all') {
2027
+ this.isPostcodeEmpty = val[2];
2028
+ this.postcodeHasError = val[3];
2029
+ }
2030
+ if (field === 'address1' || field === 'all') {
2031
+ this.isaddressLine1Empty = val[4];
2032
+ this.addressLine1HasError = val[5];
2033
+ }
2034
+ if (field === 'address2' || field === 'all') {
2035
+ this.addressLine2HasError = val[6];
2036
+ }
2037
+ if (field === 'town' || field === 'all') {
2038
+ this.isTownOrCityEmpty = val[7];
2039
+ this.townOrCityHasError = val[8];
2040
+ }
2041
+ if (field === 'county' || field === 'all') {
2042
+ this.isCountyEmpty = val[9];
2043
+ this.countyHasError = val[10];
2044
+ }
2045
+ if (field === 'mpostcode' || field === 'all') {
2046
+ this.isMPostcodeEmpty = val[11];
2047
+ this.mpostcodeHasError = val[12];
2048
+ }
2049
+ if (field === 'country' || field === 'all') {
2050
+ this.isCountryEmpty = val[13];
2051
+ }
2052
+ }
2053
+ }
2054
+ ContactDetailsComponent.decorators = [
2055
+ { type: Component, args: [{
2056
+ selector: 'ccpay-contact-details',
2057
+ template: "<fieldset class=\"govuk-fieldset contact-details--size\">\n <hr class=\"govuk-section-break govuk-section-break--m govuk-section-break--visible\">\n <div class=\"govuk-form-group\">\n <legend class=\"govuk-fieldset__legend govuk-fieldset__legend--s govuk-font19px\">\n {{ isEditOperation ? 'Edit contact information' : 'Contact information' }}\n </legend>\n <div id=\"contact-hint\" class=\"govuk-hint govuk-font19px\">\n Notifications will be sent via email or post when this refund is issued or rejected. You can only choose one option.\n </div>\n <div class=\"govuk-form-group\">\n <fieldset class=\"govuk-fieldset\">\n <div class=\"govuk-radios govuk-radios--conditional\" data-module=\"govuk-radios\">\n <div class=\"govuk-radios__item\">\n <input class=\"govuk-radios__input\" id=\"contact\" name=\"contact\" (click)=\"selectContactOption('Email', 'false')\" type=\"radio\" value=\"email\" [checked]=\"isEmailSAddressClicked\" aria-controls=\"conditional-contact\" aria-expanded=\"true\">\n <label class=\"govuk-label govuk-radios__label govuk-font19px\" for=\"contact\">\n Email\n </label>\n </div>\n <div class=\"govuk-radios__conditional\" id=\"conditional-contact-email\" *ngIf=\"isEmailSAddressClicked\">\n <form [formGroup]=\"emailAddressForm\" novalidate>\n <div class=\"govuk-form-group\">\n <label class=\"govuk-label \" for=\"email\">\n <span class=\"govuk-hint govuk-font19px\">Information about this refund will be sent to this email address.</span>\n </label>\n\n <div id=\"email-hint\" class=\"govuk-hint\">\n </div>\n <input class=\"govuk-input govuk-font19px\" id=\"email\" name=\"\" type=\"email\" [ngClass]=\"{ 'inline-error-class': isEmailEmpty || emailHasError }\" value=\"{{addressObj?.contact_details?.email}}\" formControlName=\"email\" aria-describedby=\"email-hint\">\n <p class=\"inline-error-message\" *ngIf=\"isEmailEmpty || emailHasError\">\n <span *ngIf=\"isEmailEmpty\">Enter a email address.</span>\n <span *ngIf=\"emailHasError\">Enter a valid email address.</span>\n </p>\n </div>\n </form>\n </div>\n <div class=\"govuk-radios__item\">\n <input class=\"govuk-radios__input\" id=\"contact-2\" name=\"contact\" (click)=\"selectContactOption('Postcode', 'false')\" type=\"radio\" [checked]=\"isPostcodeClicked\" value=\"post\" aria-controls=\"conditional-contact-2\" aria-expanded=\"false\">\n <label class=\"govuk-label govuk-radios__label govuk-font19px\" for=\"contact-2\">\n Post\n </label>\n </div>\n <div class=\"govuk-radios__conditional\" id=\"conditional-contact-postcode\" *ngIf=\"isPostcodeClicked && !isManualAddressClicked\">\n <form [formGroup]=\"postCodeForm\" novalidate>\n <label class=\"govuk-label govuk-font19px\" for=\"address-postcode\">\n <span class=\"govuk-hint govuk-font19px\">Information about this refund will be sent to this address.</span>Postcode\n </label>\n <div class=\"postcode-align-css\">\n <div class=\"govuk-form-group govuk-margin-right-10px\">\n <input class=\"govuk-input govuk-input--width-10\" id=\"address-postcode\" name=\"address-postcode\" [ngClass]=\"{ 'inline-error-class': isPostcodeEmpty || postcodeHasError }\" formControlName=\"postcode\" type=\"text\" autocomplete=\"postal-code\">\n <p class=\"inline-error-message\" *ngIf=\"isPostcodeEmpty || postcodeHasError\">\n <span *ngIf=\"isPostcodeEmpty\">Enter a postcode.</span>\n <span *ngIf=\"postcodeHasError\">Enter a valid postcode.</span>\n </p>\n </div>\n <div class=\"govuk-button-group\">\n <button class=\"govuk-button govuk-button--secondary govuk-font19px\" (click)=\"postcodeValidation('FA')\" data-module=\"govuk-button\">\n Find address\n </button>\n </div>\n </div>\n </form>\n <div class=\"govuk-form-group govuk-margin-btm-20px\" *ngIf=\"isShowPickAddress\">\n <label class=\"govuk-label govuk-font19px\" for=\"country\">\n Pick an address\n </label>\n <select class=\"govuk-select govuk-font19px\" [(ngModel)]=\"postcodeAddress\" id=\"postcodeAddress\" [ngClass]=\"{ 'inline-error-class': isAddressBoxEmpty }\" name=\"postcodeAddress\">\n <option *ngFor=\"let address of addressPostcodeList;\" [ngValue]=\"address.DPA\" > {{address.DPA.ADDRESS}}</option>\n </select> \n <p class=\"inline-error-message\" *ngIf=\"isAddressBoxEmpty\">\n <span *ngIf=\"isAddressBoxEmpty\">Please select an address.</span>\n </p>\n </div>\n <details class=\"govuk-details\" data-module=\"govuk-details\">\n <summary class=\"govuk-details__summary\">\n <span class=\"govuk-details__summary-text govuk-font19px\">\n <a href=\"Javascript:void(0);\" (click)=\"selectContactOption('Postcode', 'true')\"> Enter address manually</a>\n </span>\n </summary>\n </details>\n </div>\n <div class=\"govuk-radios__conditional\" id=\"conditional-contact-manual\" *ngIf=\"isPostcodeClicked && isManualAddressClicked\">\n <form [formGroup]=\"manualAddressForm\" novalidate>\n\n <div class=\"govuk-form-group\">\n <label class=\"govuk-label govuk-font19px\" for=\"address-line-1\">\n <span class=\"govuk-hint govuk-font19px\">Information about this refund will be sent to this address.</span>Building and street <span class=\"govuk-visually-hidden\">line 1 of 2</span>\n </label>\n <input class=\"govuk-input govuk-font19px\" id=\"address-line-1\" name=\"address-line-1\" [ngClass]=\"{ 'inline-error-class': isaddressLine1Empty || addressLine1HasError }\" value=\"{{addressObj?.contact_details?.address_line}}\" formControlName=\"addressl1\" type=\"text\" autocomplete=\"address-line1\">\n <p class=\"inline-error-message\" *ngIf=\"isaddressLine1Empty || addressLine1HasError\">\n <span *ngIf=\"isaddressLine1Empty\">Enter a Building and street.</span>\n <span *ngIf=\"addressLine1HasError\">Enter a valid Building and street.</span>\n </p> \n </div>\n <div class=\"govuk-form-group\">\n <label class=\"govuk-label\" for=\"address-line-2\">\n <span class=\"govuk-visually-hidden govuk-font19px\">Building and street line 2 of 2</span>\n </label>\n <input class=\"govuk-input govuk-font19px\" id=\"address-line-2\" name=\"address-line-2\" [ngClass]=\"{ 'inline-error-class': addressLine2HasError}\" formControlName=\"addressl2\" type=\"text\" autocomplete=\"address-line2\">\n <p class=\"inline-error-message\" *ngIf=\"addressLine2HasError\">\n <span *ngIf=\"addressLine2HasError\">Enter a valid Building and street line 2 of 2.</span>\n </p> \n </div>\n <div class=\"govuk-form-group\">\n <label class=\"govuk-label govuk-font19px\" for=\"address-town\">\n Town or city\n </label>\n <input class=\"govuk-input govuk-!-width-two-thirds govuk-font19px\" id=\"address-town\" name=\"address-town\" [ngClass]=\"{ 'inline-error-class': isTownOrCityEmpty || townOrCityHasError}\" value=\"{{addressObj?.contact_details?.city}}\" formControlName=\"townorcity\" type=\"text\" autocomplete=\"address-level2\">\n <p class=\"inline-error-message\" *ngIf=\"isTownOrCityEmpty || townOrCityHasError\">\n <span *ngIf=\"isTownOrCityEmpty\">Enter a town or city.</span>\n <span *ngIf=\"townOrCityHasError\">Enter a town or city.</span>\n </p> \n </div>\n <div class=\"govuk-form-group\">\n <label class=\"govuk-label govuk-font19px\" for=\"address-county\">\n County\n </label>\n <input class=\"govuk-input govuk-!-width-two-thirds govuk-font19px\" id=\"address-county\" [ngClass]=\"{ 'inline-error-class': isCountyEmpty || countyHasError}\" value=\"{{addressObj?.contact_details?.county}}\" formControlName=\"county\" name=\"address-county\" type=\"text\">\n <p class=\"inline-error-message\" *ngIf=\"isCountyEmpty || countyHasError\">\n <span *ngIf=\"isCountyEmpty\">Enter a County.</span>\n <span *ngIf=\"countyHasError\">Enter a valid County.</span>\n </p> \n </div>\n <div class=\"govuk-form-group\">\n <label class=\"govuk-label govuk-font19px\" for=\"address-postcode\">\n Postcode\n </label>\n <input class=\"govuk-input govuk-input--width-10 govuk-font19px\" id=\"address-postcode\" formControlName=\"mpostcode\" name=\"address-postcode\" [ngClass]=\"{ 'inline-error-class': isMPostcodeEmpty || mpostcodeHasError}\" value=\"{{addressObj?.contact_details?.postal_code}}\" type=\"text\" autocomplete=\"postal-code\">\n <p class=\"inline-error-message\" *ngIf=\"isMPostcodeEmpty || mpostcodeHasError\">\n <span *ngIf=\"isMPostcodeEmpty\">Enter a postcode.</span>\n <span *ngIf=\"mpostcodeHasError\">Enter a valid postcode.</span>\n </p> \n </div>\n <div class=\"govuk-form-group\">\n <label class=\"govuk-label govuk-font19px\" for=\"country\">\n Country\n </label>\n <select class=\"govuk-select govuk-font19px\" id=\"country\" name=\"country\" [ngClass]=\"{'inline-error-class': isCountryEmpty}\" formControlName=\"country\">\n <option value=\"\" selected=\"selected\">Please select</option>\n <option value=\"United Kingdom\" selected=\"{{ addressObj?.contact_details?.country ? 'selected' : '' }}\">United Kingdom</option>\n </select>\n <p class=\"inline-error-message\" *ngIf=\"isCountryEmpty\">\n <span *ngIf=\"isCountryEmpty\">Select a Country.</span>\n </p> \n </div>\n </form>\n </div>\n </div>\n </fieldset>\n </div>\n <!---FORM--->\n </div>\n\n<hr class=\"govuk-section-break govuk-section-break--m govuk-section-break--visible\">\n</fieldset>\n<div class=\"govuk-button-group\">\n<button type=\"submit\" class=\"button govuk-button--secondary govuk-font19px\" (click)=\"redirection($event)\"> Previous </button>\n&nbsp;\n<button type=\"submit\" class=\"button govuk-button govuk-font19px\" (click)=\"finalFormSubmit()\">\n Continue\n</button>\n</div>",
2058
+ styles: [".govuk-font19px{font-size:19px}.inline-error-class{outline:3px solid #a71414;outline-offset:0}.inline-error-message{color:#a71414;font-weight:700;margin-top:10px}.contact-details--size{width:50%}.postcode-align-css{display:flex;flex-direction:row}.govuk-margin-right-10px{margin-right:10px}.govuk-margin-btm-20px{margin-bottom:20px!important}"]
2059
+ },] }
2060
+ ];
2061
+ ContactDetailsComponent.ctorParameters = () => [
2062
+ { type: FormBuilder },
2063
+ { type: NotificationService },
2064
+ { type: PaymentLibComponent }
2065
+ ];
2066
+ ContactDetailsComponent.propDecorators = {
2067
+ isEditOperation: [{ type: Input, args: ['isEditOperation',] }],
2068
+ isEditOperationInRefundList: [{ type: Input, args: ['isEditOperationInRefundList',] }],
2069
+ addressObj: [{ type: Input, args: ['addressObj',] }],
2070
+ assignContactDetails: [{ type: Output }],
2071
+ assignContactDetailsInFefundsList: [{ type: Output }],
2072
+ redirectToIssueRefund: [{ type: Output }]
2073
+ };
2074
+
2075
+ class PbaDetailsComponent {
2076
+ constructor() { }
2077
+ ngOnInit() {
2078
+ }
2079
+ }
2080
+ PbaDetailsComponent.decorators = [
2081
+ { type: Component, args: [{
2082
+ selector: 'ccpay-pba-details',
2083
+ template: "\n <h2 class=\"heading-large\">Payment method</h2>\n <table>\n <tbody>\n <tr>\n <td class=\"bold tb-col-w\">Method</td>\n <td class=\"capitalize\">{{ payment.method | lowercase}}</td>\n </tr>\n <tr>\n <td class=\"bold tb-col-w\">Type</td>\n <td>Credit</td>\n </tr>\n <tr *ngIf=\"payment.organisation_name\">\n <td class=\"bold tb-col-w\">PBA account name</td>\n <td>{{ payment.organisation_name }}</td>\n </tr>\n <tr *ngIf=\"payment.account_number\">\n <td class=\"bold tb-col-w\">PBA number</td>\n <td>{{ payment.account_number }}</td>\n </tr>\n <tr *ngIf=\"payment.customer_reference\">\n <td class=\"bold tb-col-w\">Customer internal reference</td>\n <td>{{ payment.customer_reference }}</td>\n </tr>\n </tbody>\n </table>\n",
2084
+ styles: [".capitalize:first-letter{text-transform:uppercase}.tb-col-w{width:330px}"]
2085
+ },] }
2086
+ ];
2087
+ PbaDetailsComponent.ctorParameters = () => [];
2088
+ PbaDetailsComponent.propDecorators = {
2089
+ payment: [{ type: Input }]
2090
+ };
2091
+
2092
+ let isDebugMode = false;
2093
+ const noop = () => undefined;
2094
+ const ɵ0 = noop;
2095
+ class ConsoleLoggerService {
2096
+ get info() {
2097
+ if (isDebugMode) {
2098
+ return console.info.bind(console);
2099
+ }
2100
+ else {
2101
+ return noop;
2102
+ }
2103
+ }
2104
+ get warn() {
2105
+ if (isDebugMode) {
2106
+ return console.warn.bind(console);
2107
+ }
2108
+ else {
1546
2109
  return noop;
1547
2110
  }
1548
2111
  }
@@ -1696,6 +2259,7 @@ class CaseTransactionsComponent {
1696
2259
  this.viewStatus = 'main';
1697
2260
  this.isRemoveBtnDisabled = false;
1698
2261
  this.clAmountDue = 0;
2262
+ this.overPaymentAmount = 0;
1699
2263
  this.isFeeRecordsExist = false;
1700
2264
  this.isGrpOutstandingAmtPositive = false;
1701
2265
  //Order changes
@@ -1758,6 +2322,7 @@ class CaseTransactionsComponent {
1758
2322
  }
1759
2323
  else {
1760
2324
  this.serviceRequestValue = 'false';
2325
+ this.paymentLibComponent.isFromServiceRequestPage = false;
1761
2326
  }
1762
2327
  this.isBulkScanEnable = this.paymentLibComponent.ISBSENABLE;
1763
2328
  this.dcnNumber = this.paymentLibComponent.DCN_NUMBER;
@@ -1884,6 +2449,7 @@ class CaseTransactionsComponent {
1884
2449
  if (paymentGroup.fees) {
1885
2450
  paymentGroup.fees.forEach(fee => {
1886
2451
  this.orderFeesTotal = this.orderFeesTotal + fee.calculated_amount;
2452
+ this.overPaymentAmount = this.overPaymentAmount + fee.over_payment;
1887
2453
  });
1888
2454
  }
1889
2455
  if (paymentGroup.remissions) {
@@ -1892,7 +2458,11 @@ class CaseTransactionsComponent {
1892
2458
  });
1893
2459
  }
1894
2460
  if (paymentGroup.payments) {
2461
+ const isFeeOverPaymentExist = this.overPaymentAmount === 0;
1895
2462
  paymentGroup.payments.forEach(payment => {
2463
+ if (isFeeOverPaymentExist) {
2464
+ this.overPaymentAmount = this.overPaymentAmount + payment.over_payment;
2465
+ }
1896
2466
  if (payment.status.toUpperCase() === 'SUCCESS') {
1897
2467
  this.orderTotalPayments = this.orderTotalPayments + payment.amount;
1898
2468
  }
@@ -2192,14 +2762,13 @@ class CaseTransactionsComponent {
2192
2762
  }
2193
2763
  }
2194
2764
  addRefundForRemission(payment, remission, fees) {
2195
- this.viewStatus = 'addrefundforremission';
2196
- this.payment = payment;
2197
- this.paymentViewService.getApportionPaymentDetails(this.payment.reference).subscribe(paymentGroup => {
2765
+ this.paymentViewService.getApportionPaymentDetails(payment.reference).subscribe(paymentGroup => {
2198
2766
  this.paymentGroup = paymentGroup;
2199
- this.paymentGroup.payments = this.paymentGroup.payments.filter(paymentGroupObj => paymentGroupObj['reference'].includes(this.payment.reference));
2767
+ this.paymentGroup.payments = paymentGroup.payments.filter(paymentGroupObj => paymentGroupObj.reference === payment.reference);
2200
2768
  this.payment = this.paymentGroup.payments[0];
2201
2769
  this.remissions = remission;
2202
2770
  this.remissionFeeAmt = fees.filter(data => data.code === this.remissions['fee_code'])[0].net_amount;
2771
+ this.viewStatus = 'addrefundforremission';
2203
2772
  // const paymentAllocation = this.paymentGroup.payments[0].payment_allocation;
2204
2773
  // this.isStatusAllocated = paymentAllocation.length > 0 && paymentAllocation[0].allocation_status === 'Allocated' || paymentAllocation.length === 0;
2205
2774
  }, (error) => this.errorMessage = error);
@@ -2325,17 +2894,21 @@ class CaseTransactionsComponent {
2325
2894
  }
2326
2895
  }
2327
2896
  chkIssueRefundBtnEnable(payment) {
2328
- if (this.check4AllowedRoles2AccessRefund() && this.allowFurtherAccessAfter4Days(payment) &&
2329
- payment.method === 'payment by account' && payment.status.toLocaleLowerCase() === 'success') {
2330
- this.isIssueRefunfBtnEnable = true;
2331
- }
2332
- if (this.isIssueRefunfBtnEnable) {
2333
- return true;
2897
+ if (payment !== null && payment !== undefined) {
2898
+ return payment.issue_refund && payment.refund_enable;
2334
2899
  }
2335
2900
  else {
2336
2901
  return false;
2337
2902
  }
2338
- ;
2903
+ // if (this.check4AllowedRoles2AccessRefund() && this.allowFurtherAccessAfter4Days(payment) &&
2904
+ // payment.method === 'payment by account' && payment.status.toLocaleLowerCase() === 'success') {
2905
+ // this.isIssueRefunfBtnEnable = true;
2906
+ // }
2907
+ // if (this.isIssueRefunfBtnEnable) {
2908
+ // return true;
2909
+ // } else {
2910
+ // return false;
2911
+ // };
2339
2912
  }
2340
2913
  chkIsRefundRemissionBtnEnable() {
2341
2914
  if (this.orderDetail !== null && this.orderDetail !== undefined) {
@@ -2366,8 +2939,8 @@ class CaseTransactionsComponent {
2366
2939
  CaseTransactionsComponent.decorators = [
2367
2940
  { type: Component, args: [{
2368
2941
  selector: 'ccpay-case-transactions',
2369
- template: "<title>Case transaction - HMCTS Paybubble - GOV.UK</title>\n<div class=\"govuk-width-container\">\n\n <main class=\"govuk-main-wrapper\">\n <ng-container *ngIf=\"viewStatus === 'main1'\">\n <div *ngIf=\"viewStatus === 'main1'&& !isTurnOff && takePayment\">\n\n <div *ngIf=\"takePayment\" class=\"govuk-grid-row\">\n <div class=\"govuk-grid-column-two-thirds\">\n <h1 class=\"govuk-heading-xl\">Case transactions</h1>\n </div>\n </div>\n\n <div *ngIf=\"takePayment\" class=\"govuk-grid-row\">\n <div *ngIf='!isExceptionRecord' class=\"govuk-grid-column-two-thirds govuk-!-padding-bottom-6 govuk-!-padding-top-6\">\n <h3 class=\"heading-medium\">CCD reference:</h3>\n <span> {{ ccdCaseNumber | ccdHyphens }}</span>\n </div>\n\n <div *ngIf='isExceptionRecord' class=\"govuk-grid-column-two-thirds govuk-!-padding-bottom-6 govuk-!-padding-top-6\">\n <h3 class=\"heading-medium\">Exception reference:</h3>\n <span> {{ ccdCaseNumber | ccdHyphens }}</span>\n </div>\n <div class=\"govuk-grid-column-full govuk-!-padding-bottom-3\">\n <hr class=\"govuk-section-break govuk-section-break--visible\">\n <table class=\"table govuk-table\" aria-describedby=\"case transactions\">\n <thead class=\"govuk-table__head\">\n <tr class=\"govuk-table__row\">\n <th class=\"govuk-table__header\" scope=\"col\">Total payments</th>\n <th class=\"govuk-table__header\" scope=\"col\">Total remissions</th>\n <th class=\"govuk-table__header\" scope=\"col\">Amount due</th>\n <th class=\"govuk-table__header govuk-table__header--custom\" scope=\"col\" *ngIf=\"isBulkScanEnable\">Unallocated payments</th>\n </tr>\n </thead>\n <tbody class=\"govuk-table__body\">\n <tr class=\"totalpayments govuk-table__row\" scope=\"row\">\n <td class=\"govuk-table__cell summary-table-font\">{{ totalPayments | currency :'GBP':'symbol':'1.2-2' }}</td>\n <td class=\"govuk-table__cell summary-table-font\">{{ totalRemissions | currency :'GBP':'symbol':'1.2-2' }}</td>\n <td class=\"govuk-table__cell summary-table-font\">{{ clAmountDue | currency :'GBP':'symbol':'1.2-2'}}</td>\n <td class=\"govuk-table__cell case-transaction__color summary-table-font\" *ngIf=\"isBulkScanEnable\">{{unprocessedRecordCount}}</td>\n </tr>\n </tbody>\n </table>\n </div>\n\n <div class=\"govuk-grid-column-two-thirds\" *ngIf=\"takePayment\">\n <button type=\"submit\" (click)=\"redirectToFeeSearchPage($event)\"\n [disabled]=\"!isAddFeeBtnEnabled\"\n [ngClass]='!isAddFeeBtnEnabled ? \"govuk-button govuk-button--secondary govuk-button--disabled govuk-!-margin-right-1\" : \"govuk-button govuk-button--secondary govuk-!-margin-right-1\"'>\n Take telephony payment\n </button>\n </div>\n\n </div>\n <div class=\"govuk-grid-row\">\n\n </div>\n <div *ngIf=\"takePayment\" class=\" govuk-!-margin-top-9\">\n\n <div class=\"govuk-grid-row\">\n <div class=\"govuk-grid-column-full\">\n <h3 class=\"heading-medium\">Fees</h3>\n </div>\n <div class=\"govuk-grid-column-full\">\n <table class=\"table govuk-table\" aria-describedby=\"service request\">\n <thead class=\"govuk-table__head\">\n <tr class=\"govuk-table__row\">\n <th class=\"govuk-table__header\" scope=\"col\">Code</th>\n <th class=\"govuk-table__header\" scope=\"col\">Description</th>\n <th class=\"govuk-table__header\" scope=\"col\">Volume</th>\n <th class=\"govuk-table__header\" scope=\"col\">Fee amount</th>\n <th class=\"govuk-table__header\" scope=\"col\">Calculated amount</th>\n <th class=\"govuk-table__header\" scope=\"col\">Amount due</th>\n <th class=\"govuk-table__header\" scope=\"col\">Action</th>\n\n </tr>\n </thead>\n <tbody class=\"govuk-table__body\" *ngFor=\"let paymentGroup of paymentGroups;\" role=\"status\">\n <tr class=\"govuk-table__row\" *ngFor=\"let fee of paymentGroup.fees; let i = index;\" scope=\"row\">\n <td class=\"govuk-table__cell\">\t{{fee.code}} </td>\n <td class=\"govuk-table__cell\">{{fee.description}}</td>\n <td class=\"govuk-table__cell\">{{fee.volume? fee.volume : '-'}}</td>\n <td class=\"govuk-table__cell\">{{ fee.net_amount | currency:'GBP':'symbol-narrow':'1.2-2' }}</td>\n <td class=\"govuk-table__cell\">{{fee.calculated_amount | currency:'GBP':'symbol-narrow':'1.2-2' }}</td>\n <td class=\"govuk-table__cell govuk-!-font-weight-bold\" [attr.rowspan]=\"paymentGroup.fees.length\" *ngIf=\"paymentGroup.old && i==0\"> {{getGroupOutstandingAmount(paymentGroup)| currency:'GBP':'symbol-narrow':'1.2-2'}}* </td>\n <td class=\"govuk-table__cell\" *ngIf=\"!paymentGroup.old\"> {{calculateAmountDue(fee) | currency:'GBP':'symbol-narrow':'1.2-2'}} </td>\n <td class=\"govuk-table__cell\" *ngIf=\"!paymentGroup.old\">\n <a (click)=\"confirmRemoveFee(fee.id)\" [ngClass]='!isCheckAmountdueExist(fee.amount_due) || fee.remissions ? \"disable-link\" : \"\"' href=\"javascript:void(0)\">Remove</a>\n </td>\n <td class=\"govuk-table__cell\" *ngIf=\"paymentGroup.old\">\n <a (click)=\"confirmRemoveFee(fee.id)\" [ngClass]='paymentGroup.payments?.length > 0 || paymentGroup.remissions?.length > 0 ? \"disable-link\" : \"\"' href=\"javascript:void(0)\">Remove</a>\n </td>\n </tr>\n </tbody>\n <tbody class=\"govuk-table__body\" *ngIf=\"paymentGroups?.length === 0\" role=\"status\">\n <tr class=\"govuk-table__row\" scope=\"row\">\n <td class=\"govuk-table__cell\" colspan=\"7\">No fees recorded</td>\n </tr>\n </tbody>\n </table>\n </div>\n </div>\n <div class=\"hmcts-banner\" *ngIf=\"isHistoricGroupAvailable\">\n <svg class=\"hmcts-banner__icon\" fill=\"currentColor\" role=\"presentation\" focusable=\"false\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 25 25\" height=\"25\" width=\"25\">\n <path d=\"M13.7,18.5h-2.4v-2.4h2.4V18.5z M12.5,13.7c-0.7,0-1.2-0.5-1.2-1.2V7.7c0-0.7,0.5-1.2,1.2-1.2s1.2,0.5,1.2,1.2v4.8\n C13.7,13.2,13.2,13.7,12.5,13.7z M12.5,0.5c-6.6,0-12,5.4-12,12s5.4,12,12,12s12-5.4,12-12S19.1,0.5,12.5,0.5z\"></path>\n </svg>\n <div class=\"hmcts-banner__message\">\n <span class=\"hmcts-banner__assistive\">information</span>\n * These fees have already been processed offline. Check the notes in CCD for more information.\n </div>\n </div>\n <div class=\"panel panel-no--style\" *ngIf=\"allPayments?.length > 0 || remissions?.length > 0\">\n <!-- payments -->\n <h3 class=\"heading-medium\">Payments</h3>\n <table class=\"govuk-table\">\n <thead class=\"govuk-table__head\">\n <tr class=\"govuk-table__row\">\n <th class=\"govuk-table__header col-28\" scope=\"col\">Payment reference</th>\n <th class=\"govuk-table__header\" scope=\"col\">Date created</th>\n <th class=\"govuk-table__header\" scope=\"col\">Channel</th>\n <th class=\"govuk-table__header\" scope=\"col\">Method</th>\n <th class=\"govuk-table__header col-15\" scope=\"col\">Amount</th>\n <th class=\"govuk-table__header\" scope=\"col\">Allocation status</th>\n <th class=\"govuk-table__header\" scope=\"col\">Payment status</th>\n </tr>\n </thead>\n <tbody class=\"govuk-table__body\" *ngIf=\"allPayments?.length > 0\" role=\"status\">\n <tr class=\"govuk-table__row\" *ngFor=\"let payment of allPayments\">\n <td class=\"govuk-table__cell whitespace-inherit\">\n <a href=\"javascript:void(0)\" (click)=\"goToPayementView(payment.paymentGroupReference, payment.reference, payment.method)\">{{ payment.reference }}</a>\n </td>\n <td class=\"govuk-table__cell whitespace-inherit\">{{ payment.date_created | date:'dd MMM yyyy' }}</td>\n <td class=\"channel govuk-table__cell whitespace-inherit\">{{ payment.channel | lowercase }}</td>\n <td class=\"govuk-table__cell capitalize whitespace-inherit\">{{ payment.method | lowercase}}</td>\n <td class=\"govuk-table__cell whitespace-inherit\">{{ payment.amount | currency:'GBP':'symbol-narrow':'1.2-2' }}</td>\n <td class=\"govuk-table__cell whitespace-inherit\"> {{getAllocationStatus(payment)}}</td>\n <td class=\"govuk-table__cell whitespace-inherit\">{{ payment.status }}</td>\n </tr>\n </tbody>\n <tbody class=\"govuk-table__body\" *ngIf=\"allPayments?.length === 0\" role=\"status\">\n <td class=\"govuk-table__cell\" colspan=\"7\">No payments recorded</td>\n </tbody>\n </table>\n\n <!-- remissions -->\n <h3 class=\"heading-medium\">Remissions</h3>\n <table class=\"govuk-table\">\n <thead class=\"govuk-table__head\">\n <tr class=\"govuk-table__row\">\n <th class=\"govuk-table__header\" scope=\"col\">Remission reference</th>\n <th class=\"govuk-table__header\" scope=\"col\">Date created</th>\n <th class=\"govuk-table__header\" scope=\"col\">Remission code</th>\n <th class=\"govuk-table__header\" scope=\"col\">Fee code</th>\n <th class=\"govuk-table__header\" scope=\"col\">Remission amount</th>\n </tr>\n </thead>\n <tbody class=\"govuk-table__body\" *ngIf=\"remissions?.length > 0\" role=\"status\">\n <tr class=\"govuk-table__row\" *ngFor=\"let remission of remissions\">\n <td class=\"govuk-table__cell whitespace-inherit\">{{ remission.remission_reference }}</td>\n <td class=\"govuk-table__cell whitespace-inherit\">{{ remission.date_created | date:'dd MMM yyyy' }}</td>\n <td class=\"govuk-table__cell whitespace-inherit\">{{ remission.hwf_reference }}</td>\n <td class=\"govuk-table__cell whitespace-inherit\">{{ remission.fee_code }}</td>\n <td class=\"govuk-table__cell whitespace-inherit\">{{ remission.hwf_amount | currency:'GBP':'symbol-narrow':'1.2-2'}}</td>\n </tr>\n </tbody>\n <tbody class=\"govuk-table__body\" *ngIf=\"remissions?.length === 0\" role=\"status\">\n <td class=\"govuk-table__cell\" colspan=\"5\">No remissions recorded</td>\n </tbody>\n </table>\n </div>\n </div>\n </div>\n\n <div *ngIf=\"takePayment && isTurnOff\">\n <div class=\"govuk-grid-row\">\n <div class=\"govuk-grid-column-two-thirds\">\n <h1 class=\"govuk-heading-xl\">Case transactions</h1>\n </div>\n\n <div class=\"govuk-grid-column-one-third\" align=\"right\">\n <a [ngClass]=\"{ 'disable': !isAddFeeBtnEnabled} \" (click)=\"redirectToFeeSearchPage($event)\" class=\"button\" href=\"javascript:void(0)\">Add a new fee</a>\n </div>\n </div>\n\n <div class=\"govuk-grid-row\">\n <div class=\"govuk-grid-column-two-thirds govuk-!-padding-bottom-6\">\n <h3 class=\"heading-medium\">CCD reference:</h3>\n <span> {{ ccdCaseNumber | ccdHyphens }}</span>\n </div>\n\n <div class=\"govuk-grid-column-full govuk-!-padding-bottom-3\">\n <hr class=\"govuk-section-break govuk-section-break--visible\">\n <table class=\"govuk-table\">\n <thead class=\"govuk-table__head\">\n <tr class=\"govuk-table__row\">\n <th class=\"govuk-table__header\" scope=\"col\">Total payments</th>\n <th class=\"govuk-table__header\" scope=\"col\">Total remissions</th>\n <th class=\"govuk-table__header\" scope=\"col\">Amount due</th>\n </tr>\n </thead>\n <tbody class=\"govuk-table__body\">\n <tr class=\"totalpayments govuk-table__row\">\n <td class=\"govuk-table__cell\">{{ totalPayments | currency :'GBP':'symbol':'1.2-2' }}</td>\n <td class=\"govuk-table__cell\">{{ totalRemissions | currency :'GBP':'symbol':'1.2-2' }}</td>\n <td class=\"govuk-table__cell\">{{ (totalFees - totalRemissions) - totalPayments | currency :'GBP':'symbol':'1.2-2'}}</td>\n </tr>\n </tbody>\n </table>\n </div>\n </div>\n\n\n <!-- No fees start -->\n <div *ngIf=\"paymentGroups?.length === 0\">\n <div class=\"govuk-grid-row\">\n <div class=\"govuk-grid-column-full\">\n <span class=\"heading-small\">Existing fees</span>\n </div>\n\n <div class=\"govuk-grid-column-full\">\n <table class=\"govuk-table\">\n <thead class=\"govuk-table__head\">\n <tr class=\"govuk-table__row\">\n <th class=\"govuk-table__header\" scope=\"col\">Code</th>\n <th class=\"govuk-table__header\" scope=\"col\">Description</th>\n <th class=\"govuk-table__header\" scope=\"col\">Volume</th>\n <th class=\"govuk-table__header\" scope=\"col\">Fee amount</th>\n <th class=\"govuk-table__header\" scope=\"col\">Calculated amount</th>\n <th class=\"govuk-table__header\" scope=\"col\">Group amount outstanding</th>\n </tr>\n </thead>\n <tbody class=\"govuk-table__body\">\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__cell\" colspan=\"6\" role=\"status\">No fees recorded</td>\n </tr>\n </tbody>\n </table>\n </div>\n </div>\n </div>\n\n <!-- No fees end -->\n\n <div *ngFor=\"let paymentGroup of paymentGroups\">\n\n <div class=\"govuk-grid-row\">\n <div class=\"govuk-grid-column-full govuk-grid-column-full--gr\">\n <span class=\"heading-medium\">Group reference: {{paymentGroup.payment_group_reference}}</span>\n </div>\n </div>\n <div class=\"govuk-grid-row\">\n\n <!--New Code start-->\n\n <div class=\"govuk-grid-column-full\">\n <span class=\"heading-small\">Exisiting fees</span>\n </div>\n <div class=feeclass>\n <table class=\"govuk-table\">\n <thead class=\"govuk-table__head\">\n <tr class=\"govuk-table__row\">\n <th class=\"govuk-table__header\" scope=\"col\">Code</th>\n <th class=\"govuk-table__header\" scope=\"col\">Description</th>\n <th class=\"govuk-table__header\" scope=\"col\">Volume</th>\n <th class=\"govuk-table__header\" scope=\"col\">Fee amount</th>\n <th class=\"govuk-table__header\" scope=\"col\">Calculated amount</th>\n <th class=\"groupamount govuk-table__header\" scope=\"col\">Group amount outstanding</th>\n </tr>\n </thead>\n <tbody class=\"govuk-table__body\" >\n <tr class=\"govuk-table__row\" *ngFor=\"let fee of paymentGroup.fees; let i = index;\" role=\"status\">\n <td class=\"govuk-table__cell govuk-table__cell--col1\">{{fee.code}}</td>\n <td class=\"govuk-table__cell govuk-table__cell--col2\"> {{fee.description}} </td>\n <td class=\"govuk-table__cell govuk-table__cell--col3 align-center\"> {{fee.volume? fee.volume : '-'}} </td>\n <td class=\"govuk-table__cell govuk-table__cell--col4\"> {{ fee.net_amount | currency:'GBP':'symbol-narrow':'1.2-2' }} </td>\n <td class=\"govuk-table__cell govuk-table__cell--col5\"> {{fee.calculated_amount | currency:'GBP':'symbol-narrow':'1.2-2' }} </td>\n <td class=\"govuk-table__cell govuk-table__cell--col6 govuk-table__custom--col6\" [attr.rowspan]=\"paymentGroup.fees.length\" *ngIf=\"i==0\">\n {{getGroupOutstandingAmount(paymentGroup) | currency:'GBP':'symbol-narrow':'1.2-2' }} </td>\n </tr>\n </tbody>\n <tbody class=\"govuk-table__body\" *ngIf=\"paymentGroup.fees.length==0\" role=\"status\">\n <td class=\"govuk-table__cell\" colspan=\"6\">No payments recorded</td>\n </tbody>\n </table>\n </div>\n </div>\n <div class=\"govuk-inset-text govuk-inset-text__no-border\" *ngIf=\"paymentGroup.payments || paymentGroup.remissions\">\n <details>\n <summary class=\"govuk-hidetext\">\n <span class=\"summary\">Allocated payments and remissions</span>\n </summary>\n\n <div class=\"panel panel-border-narrow\">\n <!-- payments -->\n <span class=\"heading-medium\">Payments</span>\n <table class=\"govuk-table\">\n <thead class=\"govuk-table__head\">\n <tr class=\"govuk-table__row\">\n <th class=\"govuk-table__header\" scope=\"col\">Payment reference</th>\n <th class=\"govuk-table__header\" scope=\"col\">Date created</th>\n <th class=\"govuk-table__header\" scope=\"col\">Channel</th>\n <th class=\"govuk-table__header\" scope=\"col\">Method</th>\n <th class=\"govuk-table__header\" scope=\"col\">Amount</th>\n <th class=\"govuk-table__header\" scope=\"col\">Allocation status</th>\n <th class=\"govuk-table__header\" scope=\"col\">Status</th>\n </tr>\n </thead>\n <tbody class=\"govuk-table__body\" *ngIf=\"paymentGroup.payments?.length > 0\" role=\"status\">\n <tr class=\"govuk-table__row\" *ngFor=\"let payment of paymentGroup.payments\">\n <td class=\"govuk-table__cell whitespace-inherit\">\n <a href=\"javascript:void(0)\" (click)=\"goToPayementView(paymentGroup.payment_group_reference, payment.reference, payment.method)\">{{ payment.reference }}</a>\n </td>\n <td class=\"govuk-table__cell whitespace-inherit\">{{ payment.date_created | date:'dd MMM yyyy' }}</td>\n <td class=\"channel govuk-table__cell whitespace-inherit\">{{ payment.channel | lowercase }}</td>\n <td class=\"govuk-table__cell capitalize whitespace-inherit\">{{ payment.method | lowercase}}</td>\n <td class=\"govuk-table__cell whitespace-inherit\">{{ payment.amount }}</td>\n <td class=\"govuk-table__cell whitespace-inherit\"> {{getAllocationStatus(payment)}}</td>\n <td class=\"govuk-table__cell whitespace-inherit\">{{ payment.status }}</td>\n </tr>\n </tbody>\n <tbody class=\"govuk-table__body\" *ngIf=\"paymentGroup.payments?.length === 0\" role=\"status\">\n <td class=\"govuk-table__cell\" colspan=\"6\">No payments recorded</td>\n </tbody>\n </table>\n\n <!-- remissions -->\n <span class=\"heading-medium\">Remissions</span>\n <table class=\"govuk-table\">\n <thead class=\"govuk-table__head\">\n <tr class=\"govuk-table__row\">\n <th class=\"govuk-table__header\" scope=\"col\">Remission reference</th>\n <th class=\"govuk-table__header\" scope=\"col\">Date created</th>\n <th class=\"govuk-table__header\" scope=\"col\">Remission code</th>\n <th class=\"govuk-table__header\" scope=\"col\">Fee applied against</th>\n <th class=\"govuk-table__header\" scope=\"col\">Remission amount</th>\n </tr>\n </thead>\n <tbody class=\"govuk-table__body\" *ngIf=\"paymentGroup.remissions?.length > 0\" role=\"status\">\n <tr class=\"govuk-table__row\" *ngFor=\"let remission of paymentGroup.remissions\">\n <td class=\"govuk-table__cell whitespace-inherit\">{{ remission.remission_reference }}</td>\n <td class=\"govuk-table__cell whitespace-inherit\">{{ remission.date_created | date:'dd MMM' }}</td>\n <td class=\"govuk-table__cell whitespace-inherit\">{{ remission.hwf_reference }}</td>\n <td class=\"govuk-table__cell whitespace-inherit\">{{ remission.fee_code }}</td>\n <td class=\"govuk-table__cell whitespace-inherit\">{{ remission.hwf_amount }}</td>\n </tr>\n </tbody>\n <tbody class=\"govuk-table__body\" *ngIf=\"paymentGroup.remissions?.length === 0\" role=\"status\">\n <td class=\"govuk-table__cell\" colspan=\"5\">No remissions recorded</td>\n </tbody>\n </table>\n </div>\n </details>\n\n\n <div *ngIf=\"takePayment\">\n <button type=\"submit\" (click)=\"loadFeeSummaryPage(paymentGroup)\"\n [disabled]=\"(getGroupOutstandingAmount(paymentGroup) <= 0 || isUnprocessedRecordSelected)\"\n [ngClass]='(getGroupOutstandingAmount(paymentGroup) <= 0 || isUnprocessedRecordSelected) ? \"govuk-button govuk-button--secondary govuk-button--disabled govuk-!-margin-right-1\" : \"govuk-button govuk-button--secondary govuk-!-margin-right-1\"'>\n Add telephone payment\n </button>\n </div>\n </div>\n </div>\n <ccpay-app-unprocessed-payments\n *ngIf=\"isBulkScanEnable\"\n [IS_BUTTON_ENABLE]=\"takePayment\"\n [LEVEL]=\"5\"\n [PAYMENTSLENGTH]=\"allPayments?.length\"\n [PAYMENTREF]=\"paymentRef\"\n [ISTURNOFF]=\"isTurnOff\"\n [ISSFENABLE]=\"isStrategicFixEnable\"\n [FEE_RECORDS_EXISTS]=\"isFeeRecordsExist\"\n (getUnprocessedFeeCount) = \"getUnprocessedFeeCount($event)\"\n [IS_OS_AMT_AVAILABLE]=\"isGrpOutstandingAmtPositive\"\n (selectedUnprocessedFeeEvent) = \"selectedUnprocessedFeeEvent($event)\">\n </ccpay-app-unprocessed-payments>\n <div class=\"govuk-grid-row govuk-grid__surplus-payments\" *ngIf=\"totalRefundAmount > 0 && takePayment\">\n <div class=\"govuk-grid-column-full govuk-grid__surplus-payments-col1\">\n <h3 class=\"heading-medium\">Surplus payments</h3>\n </div>\n <div class=\"govuk-grid-column-full\">\n Total surplus payments received: {{totalRefundAmount | currency :'GBP':'symbol':'1.2-2'}}\n </div>\n </div>\n </div>\n\n <div *ngIf=\"takePayment\">\n <ccpay-app-unprocessed-payments\n *ngIf=\"isBulkScanEnable && !takePayment\"\n [IS_BUTTON_ENABLE]=\"takePayment\"\n [LEVEL]=\"1\"\n [ISTURNOFF]=\"isTurnOff\"\n [ISSFENABLE]=\"isStrategicFixEnable\"\n [FEE_RECORDS_EXISTS]=\"isFeeRecordsExist\"\n [IS_OS_AMT_AVAILABLE]=\"isGrpOutstandingAmtPositive\"\n (getUnprocessedFeeCount) = \"getUnprocessedFeeCount($event)\"\n [PAYMENTSLENGTH]=\"allPayments?.length\"\n [PAYMENTREF]=\"paymentRef\"\n (selectedUnprocessedFeeEvent) = \"selectedUnprocessedFeeEvent($event)\">\n </ccpay-app-unprocessed-payments>\n </div>\n\n <div *ngIf=\"!takePayment\" class=\"govuk-grid-row govuk-grid__surplus-payments\">\n\n <div class=\"govuk-grid-column-full\">\n\n <span class=\"heading-medium\">Payments</span>\n <table class=\"govuk-table\">\n <thead class=\"govuk-table__head\">\n <tr class=\"govuk-table__row\">\n <th class=\"govuk-table__header col-13\" scope=\"col\">Status</th>\n <th class=\"govuk-table__header col-10\" scope=\"col\">Amount</th>\n <th class=\"govuk-table__header col-14\" scope=\"col\">Date allocated</th>\n <th class=\"govuk-table__header col-20\" scope=\"col\">Request reference</th>\n <th class=\"govuk-table__header col-9\" scope=\"col\"></th>\n <th class=\"govuk-table__header\" scope=\"col\"></th>\n </tr>\n </thead>\n <tbody class=\"govuk-table__body\" *ngIf=\"allPayments?.length > 0\" role=\"status\">\n <tr class=\"govuk-table__row\" *ngFor=\"let payment of allPayments\">\n <td class=\"govuk-table__cell col-13 whitespace-inherit\">{{ payment.status }}</td>\n <td class=\"govuk-table__cell col-10 whitespace-inherit\">{{ payment.amount | currency :'GBP':'symbol':'1.2-2' }}</td>\n <td class=\"govuk-table__cell col-17 whitespace-inherit\">{{ payment.date_created | date:'dd MMM yyyy HH:mm:ss' }}</td>\n <td class=\"govuk-table__cell col-24 whitespace-inherit\">{{ payment.paymentGroupReference }}</td>\n <td class=\"govuk-table__cell col-13 whitespace-inherit\"></td>\n <td class=\"govuk-table__cell whitespace-inherit\">\n <a class=\"govuk-link\" href=\"javascript:void(0)\" (click)=\"goToPayementView(payment.paymentGroupReference, payment.reference, payment.method)\">Review</a>\n </td>\n </tr>\n </tbody>\n\n </table>\n <ccpay-app-unprocessed-payments class=\"govuk-table\"\n *ngIf=\"isBulkScanEnable && !takePayment\"\n [IS_BUTTON_ENABLE]=\"takePayment\"\n [LEVEL]=\"2\"\n [ISTURNOFF]=\"isTurnOff\"\n [ISSFENABLE]=\"isStrategicFixEnable\"\n [FEE_RECORDS_EXISTS]=\"isFeeRecordsExist\"\n [IS_OS_AMT_AVAILABLE]=\"isGrpOutstandingAmtPositive\"\n [PAYMENTSLENGTH]=\"allPayments?.length\"\n [PAYMENTREF]=\"paymentRef\"\n (getUnprocessedFeeCount) = \"getUnprocessedFeeCount($event)\"\n (selectedUnprocessedFeeEvent) = \"selectedUnprocessedFeeEvent($event)\">\n </ccpay-app-unprocessed-payments>\n </div>\n </div>\n </ng-container>\n\n<!--Order Case Transactions Page-->\n <ng-container *ngIf=\"viewStatus === 'main' && !isTurnOff && takePayment\">\n <div>\n\n <div>\n <h1 class=\"govuk-grid-column-two-thirds govuk-heading-l govuk-!-margin-top-0\">Case transactions</h1>\n <ng-container *ngIf='!isExceptionRecord' class=\" govuk-!-margin-bottom-6 alignself\">\n <b> Case reference: </b>{{ ccdCaseNumber | ccdHyphens }}\n </ng-container>\n <ng-container *ngIf='isExceptionRecord' class=\"govuk-!-margin-bottom-3 col-55 alignself\" >\n <b> Exception reference:</b>{{ ccdCaseNumber | ccdHyphens }}\n </ng-container>\n <div>\n <table class=\"govuk-table\">\n <thead class=\"govuk-table__head\">\n <tr class=\"govuk-table__row\">\n <th class=\"govuk-table__header col-25\" scope=\"col\">Total payments</th>\n <th class=\"govuk-table__header govuk-table__header--custom col-25\" scope=\"col\" *ngIf=\"isBulkScanEnable\">Unallocated payments</th>\n <th class=\"govuk-table__header col-25\" scope=\"col\">Total remissions</th>\n <th class=\"govuk-table__header col-25\" scope=\"col\">Amount due</th>\n\n </tr>\n </thead>\n <tbody class=\"govuk-table__body\">\n <tr class=\"totalpayments govuk-table__row\">\n <td class=\"govuk-table__cell summary-table-font\">{{ totalPayments | currency :'GBP':'symbol':'1.2-2' }}</td>\n <td class=\"govuk-table__cell case-transaction__color summary-table-font\" *ngIf=\"isBulkScanEnable\">{{unprocessedRecordCount}}</td>\n\n <td class=\"govuk-table__cell summary-table-font\">{{ totalRemissions | currency :'GBP':'symbol':'1.2-2' }}</td>\n <td class=\"govuk-table__cell summary-table-font\">{{ clAmountDue | currency :'GBP':'symbol':'1.2-2'}}</td>\n </tr>\n </tbody>\n </table>\n </div>\n </div>\n <input #myInput type='hidden' class='iFrameDrivenImageValue' value='ORDERIDDETAILS'>\n\n <!--Payment Request-->\n <div class=\"paymentrequest\">\n <span class=\"heading-medium\">Service requests</span>\n <ng-container>\n <table class=\"govuk-table\">\n <thead class=\"govuk-table__head\">\n <tr class=\"govuk-table__row\">\n <th class=\"govuk-table__header col-14\" scope=\"col\">Status</th>\n <th class=\"govuk-table__header col-10\" scope=\"col\">Amount</th>\n <th class=\"govuk-table__header col-18\" scope=\"col\">Party</th>\n <th class=\"govuk-table__header col-21\" scope=\"col\">Request reference</th>\n <th class=\"govuk-table__header col-9\" scope=\"col\"></th>\n <th class=\"govuk-table__header col\" scope=\"col\"></th>\n </tr>\n </thead>\n <tbody class=\"govuk-table__body\" *ngIf=\"orderLevelFees?.length > 0\" role=\"status\">\n <tr *ngFor=\"let orderRef of orderLevelFees;let i = index;\">\n <td class=\"govuk-table__cell whitespace-inherit\">{{orderRef.orderStatus}}</td>\n <td class=\"govuk-table__cell whitespace-inherit\">{{ orderRef.orderTotalFees | currency :'GBP':'symbol':'1.2-2' }}</td>\n <td *ngIf=\"cpoDetails !== null\" class=\"govuk-table__cell whitespace-inherit\">{{cpoDetails['responsibleParty']}}</td>\n <td *ngIf=\"cpoDetails === null\" class=\"govuk-table__cell whitespace-inherit\"></td>\n <td class=\"govuk-table__cell whitespace-inherit\">{{orderRef.orderRefId}}</td>\n <td class=\"govuk-table__cell\">\n <a href=\"javascript:void(0)\" (click)=\"goToOrderViewDetailSection(orderRef)\">Review</a>\n </td>\n <td class=\"alignright\">\n\n <button type=\"submit\" (click)=\"redirectToOrderFeeSearchPage($event,orderRef)\"\n [disabled]=\"!orderRef.orderAddBtnEnable\"\n [ngClass]='!orderRef.orderAddBtnEnable ? \"govuk-button govuk-button--secondary govuk-button--disabled govuk-!-margin-right-1\" : \"govuk-button govuk-button--secondary govuk-!-margin-right-1\"'>\n Take telephony payment\n </button></td>\n </tr>\n </tbody>\n <tbody class=\"govuk-table__body alignleft\" *ngIf=\"orderLevelFees?.length === 0\" role=\"status\">\n <td colspan=\"6\">No service requests on this case.</td>\n </tbody>\n </table>\n </ng-container>\n <!-- <ng-container *ngIf=\"orderLevelFees?.length === 0\">\n <br/>No service requests on this case.<br/>\n </ng-container> -->\n <span>\n <br/>\n <a (click)=\"redirectToFeeSearchPage($event)\"\n [class.disable-link]=\"!isAddFeeBtnEnabled\" href=\"javascript:void(0)\">Create service request and pay</a><br/>\n </span>\n </div>\n <div>\n <span class=\"heading-medium\"><br/>Payments</span>\n <ccpay-app-unprocessed-payments\n *ngIf=\"isBulkScanEnable\"\n [IS_BUTTON_ENABLE]=\"takePayment\"\n [LEVEL]=\"3\"\n [PAYMENTSLENGTH]=\"allPayments?.length\"\n [ISTURNOFF]=\"isTurnOff\"\n [ISSFENABLE]=\"isStrategicFixEnable\"\n [PAYMENTREF]=\"paymentRef\"\n [FEE_RECORDS_EXISTS]=\"isFeeRecordsExist\"\n (getUnprocessedFeeCount) = \"getUnprocessedFeeCount($event)\"\n [IS_OS_AMT_AVAILABLE]=\"isGrpOutstandingAmtPositive\"\n (selectedUnprocessedFeeEvent) = \"selectedUnprocessedFeeEvent($event)\">\n </ccpay-app-unprocessed-payments>\n\n <ng-container>\n \n <table class=\"govuk-table\">\n <thead class=\"govuk-table__head\">\n </thead>\n <tbody class=\"govuk-table__body\" *ngIf=\"allPayments?.length > 0\" role=\"status\">\n <tr class=\"govuk-table__row\" *ngFor=\"let payment of allPayments\">\n <td class=\"govuk-table__cell col-14 whitespace-inherit\" role=\"status\">{{ payment.status }}</td>\n <td class=\"govuk-table__cell col-10 whitespace-inherit\">{{ payment.amount | currency :'GBP':'symbol':'1.2-2' }}</td>\n <td class=\"govuk-table__cell col-17 whitespace-inherit\">{{ payment.date_created | date:'dd MMM yyyy' }}</td>\n <td class=\"govuk-table__cell col-24 whitespace-inherit\">{{ payment.paymentGroupReference }}</td>\n <td class=\"govuk-table__cell col-13 whitespace-inherit\"></td>\n <td class=\"govuk-table__cell whitespace-inherit\">\n <a href=\"javascript:void(0)\" (click)=\"goToPayementView(payment.paymentGroupReference, payment.reference, payment.method)\">Review</a>\n </td>\n </tr>\n </tbody>\n\n <tbody class=\"govuk-table__body\" *ngIf=\"allPayments?.length === 0 && unprocessedRecordCount <= 0\" role=\"status\">\n <td colspan=\"6\">No payments recorded</td>\n </tbody>\n </table>\n\n </ng-container>\n\n </div>\n <div *ngIf=\"!check4AllowedRoles2AccessPBApayment()\">\n <span class=\"heading-medium\"><br/>Refunds</span>\n <ccpay-refund-status\n [ccdCaseNumber]=\"ccdCaseNumber\"\n [isTurnOff]=\"isTurnOff\"\n [LOGGEDINUSERROLES]=\"LOGGEDINUSERROLES\" \n [isEliginbleToAccess] = check4AllowedRoles2AccessRefund()\n ></ccpay-refund-status>\n </div>\n </div>\n </ng-container>\n\n <ng-container *ngIf=\"!takePayment && viewStatus === 'main'\">\n <div class=\"govuk-grid-column-full\" [ngClass]='serviceRequestValue!== \"false\" ? \"govuk-margin-btm-20px\" : \"\"'>\n <!-- <span *ngIf=\"serviceRequestValue === 'false'\" class=\"heading-medium\">Service requests</span> -->\n <ng-container *ngIf=\"!(orderLevelFees?.length === 0 && !isAnyFeeGroupAvilable) && serviceRequestValue !== 'false' \">\n <table class=\"govuk-table\">\n <thead class=\"govuk-table__head\">\n <tr class=\"govuk-table__row\">\n <th class=\"govuk-table__header col-14\" scope=\"col\">Status</th>\n <th class=\"govuk-table__header col-18\" scope=\"col\">Amount</th>\n <th class=\"govuk-table__header col-18\" scope=\"col\">Party</th>\n <th class=\"govuk-table__header col-24\" scope=\"col\">Request reference\t</th>\n <th class=\"govuk-table__header col-9\" scope=\"col\"></th>\n <th class=\"govuk-table__header\" scope=\"col\"></th>\n </tr>\n </thead>\n <tbody class=\"govuk-table__body\" *ngIf=\"orderLevelFees?.length > 0\" role=\"status\">\n <tr class=\"govuk-table__row\" *ngFor=\"let orderRef of orderLevelFees;let i = index;\">\n <td class=\"govuk-table__cell whitespace-inherit\">{{orderRef.orderStatus}}</td>\n <td class=\"govuk-table__cell whitespace-inherit\">{{orderRef.orderTotalFees | currency :'GBP':'symbol':'1.2-2'}}</td>\n <td *ngIf=\"cpoDetails !== null\" class=\"govuk-table__cell whitespace-inherit\">{{cpoDetails['responsibleParty']}}</td>\n <td *ngIf=\"cpoDetails === null\" class=\"govuk-table__cell whitespace-inherit\"></td>\n <td class=\"govuk-table__cell whitespace-inherit\">{{orderRef.orderRefId}}</td>\n <td class=\"govuk-table__cell of-visible\"> <a href=\"javascript:void(0)\" (click)=\"loadPBAAccountPage(orderRef)\" *ngIf=\"serviceRequestValue !== 'false' && check4AllowedRoles2AccessPBApayment() && orderRef.orderStatus === 'Not paid'\"> Pay now</a></td>\n <td class=\"govuk-table__cell\">\n <a href=\"javascript:void(0)\" (click)=\"goToOrderViewDetailSection(orderRef)\">Review</a>\n </td>\n </tr>\n </tbody>\n <tbody class=\"govuk-table__body\" *ngIf=\"orderLevelFees?.length === 0 && serviceRequestValue === 'false'\" role=\"status\">\n <tr class=\"govuk-table__row\" >\n <td class=\"alignleft\" colspan=\"7\">No service requests on this case.</td>\n </tr>\n </tbody>\n </table>\n </ng-container>\n <ng-container *ngIf=\"orderLevelFees?.length === 0 && serviceRequestValue !== 'false' && !isAnyFeeGroupAvilable\" role=\"status\">\n <h1 class=\"govuk-heading-l govuk-heading-lw\">If you are expecting to pay and are not able to see a service request,</h1>\n <p>please refresh and try in some time.</p>\n </ng-container>\n\n <!-- </div> -->\n\n </div>\n\n <div class=\"govuk-grid-column-full\">\n <h1 class=\"govuk-heading-xl\" *ngIf=\"!takePayment && serviceRequestValue === 'false'\">Payment History</h1>\n <div *ngIf=\"serviceRequestValue === 'false'\">\n <span class=\"heading-medium\"><br/>Payments</span>\n <ng-container >\n <table class=\"govuk-table\">\n <thead class=\"govuk-table__head\">\n <tr class=\"govuk-table__row\">\n <th class=\"govuk-table__header col-14\" scope=\"col\">Status</th>\n <th class=\"govuk-table__header col-10\" scope=\"col\">Amount</th>\n <th class=\"govuk-table__header col-17\" scope=\"col\">Date</th>\n <th class=\"govuk-table__header col-24\" scope=\"col\">Payment reference</th>\n <th class=\"govuk-table__header col-13\" scope=\"col\"></th>\n <th class=\"govuk-table__header\" scope=\"col\"></th>\n </tr>\n </thead>\n <tbody class=\"govuk-table__body\" *ngIf=\"allPayments?.length > 0\" role=\"status\">\n <tr class=\"govuk-table__row\" *ngFor=\"let payment of allPayments\">\n <td class=\"govuk-table__cell whitespace-inherit\">{{ payment.status }}</td>\n <td class=\"govuk-table__cell whitespace-inherit\">{{ payment.amount | currency :'GBP':'symbol':'1.2-2' }}</td>\n <td class=\"govuk-table__cell whitespace-inherit\">{{ payment.date_created | date:'dd MMM yyyy' }}</td>\n <td class=\"govuk-table__cell whitespace-inherit\">{{ payment?.reference }}</td>\n <td class=\"govuk-table__cell whitespace-inherit\"></td>\n <td class=\"govuk-table__cell whitespace-inherit\">\n <a href=\"javascript:void(0)\" (click)=\"goToPayementView(payment.paymentGroupReference, payment.reference, payment.method)\">Review</a>\n </td>\n </tr>\n </tbody>\n\n <tbody class=\"govuk-table__body\" *ngIf=\"allPayments?.length === 0\" role=\"status\">\n <td colspan=\"6\">No payments recorded</td>\n </tbody>\n </table>\n <ccpay-app-unprocessed-payments class=\"govuk-table\"\n *ngIf=\"isBulkScanEnable && !takePayment\"\n [IS_BUTTON_ENABLE]=\"takePayment\"\n [LEVEL]=\"4\"\n [ISTURNOFF]=\"isTurnOff\"\n [ISSFENABLE]=\"isStrategicFixEnable\"\n [PAYMENTSLENGTH]=\"allPayments?.length\"\n [PAYMENTREF]=\"paymentRef\"\n (getUnprocessedFeeCount) = \"getUnprocessedFeeCount($event)\"\n [FEE_RECORDS_EXISTS]=\"isAnyFeeGroupAvilable\"\n [IS_OS_AMT_AVAILABLE]=\"isGrpOutstandingAmtPositive\"\n (selectedUnprocessedFeeEvent) = \"selectedUnprocessedFeeEvent($event)\">\n </ccpay-app-unprocessed-payments>\n </ng-container>\n\n </div>\n </div>\n <div class=\"govuk-grid-column-full\" *ngIf=\"!check4AllowedRoles2AccessPBApayment()\">\n <span class=\"heading-medium\"><br/>Refunds</span>\n <ccpay-refund-status \n [ccdCaseNumber]=\"ccdCaseNumber\"\n [isEliginbleToAccess] = check4AllowedRoles2AccessRefund()\n ></ccpay-refund-status>\n </div>\n\n </ng-container>\n\n\n<input #myInput type='hidden' class='iFrameDrivenImageValue' value='FEEREMOVALCONFIRMATION_2'>\n\n<!-- Order Full View Details-->\n<ng-container *ngIf=\"viewStatus === 'order-full-view'\">\n <ccpay-service-request\n [viewStatus] = \"viewStatus\"\n [orderRef] = \"orderRef\"\n [orderStatus] = \"orderStatus\"\n [orderCreated] = \"orderCreated\"\n [orderParty] = \"orderParty\"\n [orderCCDEvent] = \"orderCCDEvent\"\n [orderDetail] = \"orderDetail\"\n [LOGGEDINUSERROLES] = \"LOGGEDINUSERROLES\"\n [ccdCaseNumber] = \"ccdCaseNumber\"\n [orderFeesTotal] = \"orderFeesTotal\"\n [orderTotalPayments] = \"orderTotalPayments\"\n [orderRemissionTotal] = \"orderRemissionTotal\"\n [isServiceRequest] = \"serviceRequestValue\"\n (goToServiceRquestComponent) = \"goToServiceRequestPage()\"\n ></ccpay-service-request>\n\n</ng-container>\n<ccpay-add-remission *ngIf=\"viewStatus === 'addremission' && feeId\"\n[isTurnOff]=\"isTurnOff\"\n[isStrategicFixEnable]=\"isStrategicFixEnable\"\n[viewCompStatus]= \"viewStatus\"\n[fee]=\"feeId\"\n[orderStatus] =\"orderStatus\"\n[paidAmount]= \"orderTotalPayments\"\n[isRefundRemission]=\"isRefundRemission\"\n[caseType]=\"caseType\"\n[paymentGroupRef]=\"orderRef\"\n[isFromServiceRequestPage] = \"true\"\n[payment] = \"payment\"\n[ccdCaseNumber]=\"ccdCaseNumber\"></ccpay-add-remission>\n\n<ccpay-add-remission *ngIf=\"viewStatus === 'issuerefund' && payment\"\n[isTurnOff]=\"isTurnOff\"\n[isStrategicFixEnable]=\"isStrategicFixEnable\"\n[viewCompStatus]= \"viewStatus\"\n[isFromServiceRequestPage] = \"true\"\n[payment]=\"payment\"\n[orderStatus] =\"orderStatus\"\n[paidAmount]= \"orderTotalPayments\"\n[isRefundRemission]=\"isRefundRemission\"\n[caseType]=\"caseType\"\n[paymentGroupRef]=\"orderRef\"\n[ccdCaseNumber]=\"ccdCaseNumber\"></ccpay-add-remission>\n\n<ccpay-add-remission *ngIf=\"viewStatus === 'addrefundforremission' && payment\"\n[isTurnOff]=\"isTurnOff\"\n[isStrategicFixEnable]=\"isStrategicFixEnable\"\n[viewCompStatus]= \"viewStatus\"\n[payment]=\"payment\"\n[orderStatus] =\"orderStatus\"\n[paidAmount]= \"orderTotalPayments\"\n[isRefundRemission]=\"isRefundRemission\"\n[caseType]=\"caseType\"\n[feeamount]=\"remissionFeeAmt\"\n[remission] = \"remissions\"\n[isFromServiceRequestPage]=\"true\"\n[ccdCaseNumber]=\"ccdCaseNumber\"></ccpay-add-remission>\n\n<ng-container *ngIf=\"viewStatus === 'feeRemovalConfirmation'\">\n <div class=\"govuk-warning-text\">\n <h1 class=\"govuk-heading-l\">Case reference:{{ccdCaseNumber | ccdHyphens}}</h1>\n <span class=\"govuk-warning-text__icon\" aria-hidden=\"true\">!</span>\n <strong class=\"govuk-warning-text__text\">\n <span class=\"govuk-warning-text__assistive\">Warning</span>\n Are you sure you want to delete this fee?\n </strong>\n </div>\n <div class=\"govuk-button-grb\">\n <form novalidate>\n <button type=\"submit\" class=\"button govuk-button--secondary\" (click)=\"cancelRemoval()\">\n Cancel\n </button>\n <button type=\"submit\" class=\"button\"\n [disabled]=\"isRemoveBtnDisabled\"\n [ngClass]='isRemoveBtnDisabled ? \"button button--disabled govuk-!-margin-right-1\" : \"button govuk-!-margin-right-1\"'\n (click)=\"removeFee(feeId)\">\n Remove\n </button>\n </form>\n </div>\n</ng-container>\n\n</main>\n</div>\n",
2370
- styles: [".govuk-grid-column-full--gr{position:relative;margin-bottom:10px}.disable{text-decoration:none;cursor:default;color:#fff;background-color:grey;pointer-events:none}.govuk-grid__surplus-payments{margin:20px 0}.govuk-grid__surplus-payments>.govuk-grid-column-full{padding:0}.govuk-grid__surplus-payments-col1{margin-bottom:10px}.govuk-inset-text__no-border{border-left:0}.govuk-hidetext{font-size:22px;padding-bottom:10px}.lowercase{text-transform:lowercase}.channel:first-letter{text-transform:uppercase}.govuk-heading-xl{font-size:48px;margin-bottom:1px}.govuk-section-break--visible{border-bottom:2px solid #000}.totalpayments.govuk-table__row{border-bottom:2px solid #000!important}.govuk-inset-text{margin-left:1em}.govuk-button{font-size:19px;margin-bottom:0!important}.govuk-table__cell.govuk-table__cell--col6.govuk-table__custom--col6,.groupamount.govuk-table__header{text-align:right}.feeclass{padding-left:.7em}.align-center{text-align:center}details summary{display:list-item}.case-transaction__color{color:#a71414;font-weight:700;text-align:center}.capitalize:first-letter{text-transform:uppercase}.govuk-inset-text__no-left-margin{margin-left:0;padding-left:0}.whitespace-inherit{white-space:inherit!important}.govuk-section-records-break{margin:10px;border-bottom:2px solid #000!important}.exisitng-fees{margin-left:12px}.add-telephony-payment{margin-top:-2em;margin-left:-2em}.govuk-table__header--custom{text-align:center}.disable-link{cursor:default;pointer-events:none;color:#8e8c8c}.panel-no--style{border-left-style:none}.col-28{width:28%!important}.col-8{width:8%!important}.col-60{width:60%!important}.col-32{width:32%!important}.col-34{width:34%!important}.col-15{width:15%!important;padding-right:0!important;padding-left:0!important}.col-16{width:16%!important}.col-14{width:14%!important}.col-17{width:17%!important}.col-12{width:12%!important}.col-9{width:9%!important}.col-10{width:10%!important}.col-11{width:11%!important}.col-13{width:13%!important}.col-21{width:21%!important}.col-20{width:20%!important}.col-24{width:24%!important}.govuk-table__cell,.govuk-table__header{padding:10px 10px 10px 0}.col-27{width:27%!important}td{white-space:nowrap;overflow:hidden!important}.col-19{width:19%!important}.col-18,.col-19{padding-left:0!important}.col-18{width:18%!important;padding-right:0!important}.col-37{width:37%!important}.col-55{width:55%!important}.govuk-table{margin-bottom:1px}.hmcts-banner>.hmcts-banner__message{font-size:19px;line-height:1.25}.summary-table-font{font-size:36px}.order-class{padding-top:3em}.govuk-table__cell:last-child,.govuk-table__header:last-child{text-align:right}.govuk-grid-column-two-thirds{width:64%!important;padding:0!important}.govuk-heading-l{font-size:36px;margin-bottom:10px}.govuk-heading-lw{width:70%}.paymentrequest{margin-top:1em}.mar-17{margin-left:17px}.col-61{width:61px!important;padding:0!important}.error{width:960px;margin:auto}.summarypage{padding-left:36em;margin-top:2em}.summarypagealign{width:100%;text-align:right;margin-top:2em}.govuk-inset-text{font-size:2.1875rem}table{table-layout:fixed;width:100%}td,th{word-wrap:break-word}.totalPay{padding-right:14px}.totalfees,.totalPay{float:right;margin-top:2em}.refundBtn{text-align:right;width:18%}.col-25{width:25%!important}.of-visible{overflow:visible!important}.col-51{width:51%!important}.alignright{text-align:right}.alignleft{text-align:left}.alignself{align-self:flex-end}.maxwidth{width:100%}.govuk-padding-btm{padding-bottom:50px}.govuk-margin-btm-20px{margin-bottom:20px}a:focus{background-color:#fd0;outline:2px solid #fd0}button:focus{outline:3.5px solid #fd0}.govuk-warning-text__icon{margin-top:8px}@media screen and (max-width:979px){table,td,th,tr{font-size:16px}.summary-table-font{font-size:28px}.govuk-button{font-size:14px;white-space:normal;word-wrap:break-word}}@media screen and (max-width:650px){table,td,th,tr{font-size:14px}.summary-table-font{font-size:22px}.govuk-button{font-size:12px;white-space:normal;word-wrap:break-word}}@media screen and (max-width:470px){table,td,th,tr{font-size:12px}.summary-table-font{font-size:20px}.govuk-button,.summary-table-font{white-space:normal;word-wrap:break-word}.govuk-button{font-size:10px}}"]
2942
+ template: "<div class=\"govuk-width-container\">\n\n <main class=\"govuk-main-wrapper\">\n <ng-container *ngIf=\"viewStatus === 'main1'\">\n <div *ngIf=\"viewStatus === 'main1'&& !isTurnOff && takePayment\">\n <div *ngIf=\"takePayment\" class=\"govuk-grid-row\">\n\n <div class=\"govuk-grid-column-two-thirds\">\n <h1 class=\"govuk-heading-xl\">Case transactions</h1>\n </div>\n </div>\n\n <div *ngIf=\"takePayment\" class=\"govuk-grid-row\">\n <div *ngIf='!isExceptionRecord' class=\"govuk-grid-column-two-thirds govuk-!-padding-bottom-6 govuk-!-padding-top-6\">\n <h3 class=\"heading-medium\">CCD reference:</h3>\n <span> {{ ccdCaseNumber | ccdHyphens }}</span>\n </div>\n\n <div *ngIf='isExceptionRecord' class=\"govuk-grid-column-two-thirds govuk-!-padding-bottom-6 govuk-!-padding-top-6\">\n <h3 class=\"heading-medium\">Exception reference:</h3>\n <span> {{ ccdCaseNumber | ccdHyphens }}</span>\n </div>\n <div class=\"govuk-grid-column-full govuk-!-padding-bottom-3\">\n <hr class=\"govuk-section-break govuk-section-break--visible\">\n <table class=\"govuk-table\">\n <thead class=\"govuk-table__head\">\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__header\" scope=\"col\">Total payments</td>\n <td class=\"govuk-table__header\" scope=\"col\">Total remissions</td>\n <td class=\"govuk-table__header\" scope=\"col\">Amount due</td>\n <td class=\"govuk-table__header govuk-table__header--custom\" scope=\"col\" *ngIf=\"isBulkScanEnable\">Unallocated payments</td>\n </tr>\n </thead>\n <tbody class=\"govuk-table__body\">\n <tr class=\"totalpayments govuk-table__row\">\n <td class=\"govuk-table__cell summary-table-font\">{{ totalPayments | currency :'GBP':'symbol':'1.2-2' }}</td>\n <td class=\"govuk-table__cell summary-table-font\">{{ totalRemissions | currency :'GBP':'symbol':'1.2-2' }}</td>\n <td class=\"govuk-table__cell summary-table-font\">{{ clAmountDue | currency :'GBP':'symbol':'1.2-2'}}</td>\n <td class=\"govuk-table__cell case-transaction__color summary-table-font\" *ngIf=\"isBulkScanEnable\">{{unprocessedRecordCount}}</td>\n </tr>\n </tbody>\n </table>\n </div>\n\n <div class=\"govuk-grid-column-two-thirds\" *ngIf=\"takePayment\">\n <button type=\"submit\" (click)=\"redirectToFeeSearchPage($event)\"\n [disabled]=\"!isAddFeeBtnEnabled\"\n [ngClass]='!isAddFeeBtnEnabled ? \"govuk-button govuk-button--secondary govuk-button--disabled govuk-!-margin-right-1\" : \"govuk-button govuk-button--secondary govuk-!-margin-right-1\"'>\n Take telephony payment\n </button>\n </div>\n\n </div>\n <div class=\"govuk-grid-row\">\n\n </div>\n <div *ngIf=\"takePayment\" class=\" govuk-!-margin-top-9\">\n\n <div class=\"govuk-grid-row\">\n <div class=\"govuk-grid-column-full\">\n <h3 class=\"heading-medium\">Fees</h3>\n </div>\n <div class=\"govuk-grid-column-full\">\n <table class=\"govuk-table\">\n <thead class=\"govuk-table__head\">\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__header\" scope=\"col\">Code</td>\n <td class=\"govuk-table__header\" scope=\"col\">Description</td>\n <td class=\"govuk-table__header\" scope=\"col\">Volume</td>\n <td class=\"govuk-table__header\" scope=\"col\">Fee amount</td>\n <td class=\"govuk-table__header\" scope=\"col\">Calculated amount</td>\n <td class=\"govuk-table__header\" scope=\"col\">Amount due</td>\n <td class=\"govuk-table__header\" scope=\"col\">Action</td>\n\n </tr>\n </thead>\n <tbody class=\"govuk-table__body\" *ngFor=\"let paymentGroup of paymentGroups;\">\n <tr class=\"govuk-table__row\" *ngFor=\"let fee of paymentGroup.fees; let i = index;\">\n <td class=\"govuk-table__cell\">\t{{fee.code}} </td>\n <td class=\"govuk-table__cell\">{{fee.description}}</td>\n <td class=\"govuk-table__cell\">{{fee.volume? fee.volume : '-'}}</td>\n <td class=\"govuk-table__cell\">{{ fee.net_amount | currency:'GBP':'symbol-narrow':'1.2-2' }}</td>\n <td class=\"govuk-table__cell\">{{fee.calculated_amount | currency:'GBP':'symbol-narrow':'1.2-2' }}</td>\n <td class=\"govuk-table__cell govuk-!-font-weight-bold\" [attr.rowspan]=\"paymentGroup.fees.length\" *ngIf=\"paymentGroup.old && i==0\"> {{getGroupOutstandingAmount(paymentGroup)| currency:'GBP':'symbol-narrow':'1.2-2'}}* </td>\n <td class=\"govuk-table__cell\" *ngIf=\"!paymentGroup.old\"> {{calculateAmountDue(fee) | currency:'GBP':'symbol-narrow':'1.2-2'}} </td>\n <td class=\"govuk-table__cell\" *ngIf=\"!paymentGroup.old\">\n <a (click)=\"confirmRemoveFee(fee.id)\" [ngClass]='!isCheckAmountdueExist(fee.amount_due) || fee.remissions ? \"disable-link\" : \"\"'>Remove</a>\n </td>\n <td class=\"govuk-table__cell\" *ngIf=\"paymentGroup.old\">\n <a (click)=\"confirmRemoveFee(fee.id)\" [ngClass]='paymentGroup.payments?.length > 0 || paymentGroup.remissions?.length > 0 ? \"disable-link\" : \"\"'>Remove</a>\n </td>\n </tr>\n </tbody>\n <tbody class=\"govuk-table__body\" *ngIf=\"paymentGroups?.length === 0\">\n <tr class=\"govuk-table__row\" >\n <td class=\"govuk-table__cell\" colspan=\"7\">No fees recorded</td>\n </tr>\n </tbody>\n </table>\n </div>\n </div>\n <div class=\"hmcts-banner\" *ngIf=\"isHistoricGroupAvailable\">\n <svg class=\"hmcts-banner__icon\" fill=\"currentColor\" role=\"presentation\" focusable=\"false\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 25 25\" height=\"25\" width=\"25\">\n <path d=\"M13.7,18.5h-2.4v-2.4h2.4V18.5z M12.5,13.7c-0.7,0-1.2-0.5-1.2-1.2V7.7c0-0.7,0.5-1.2,1.2-1.2s1.2,0.5,1.2,1.2v4.8\n C13.7,13.2,13.2,13.7,12.5,13.7z M12.5,0.5c-6.6,0-12,5.4-12,12s5.4,12,12,12s12-5.4,12-12S19.1,0.5,12.5,0.5z\"></path>\n </svg>\n <div class=\"hmcts-banner__message\">\n <span class=\"hmcts-banner__assistive\">information</span>\n * These fees have already been processed offline. Check the notes in CCD for more information.\n </div>\n </div>\n <div class=\"panel panel-no--style\" *ngIf=\"allPayments?.length > 0 || remissions?.length > 0\">\n <!-- payments -->\n <h3 class=\"heading-medium\">Payments</h3>\n <table class=\"govuk-table\">\n <thead class=\"govuk-table__head\">\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__header col-28\" scope=\"col\">Payment reference</td>\n <td class=\"govuk-table__header\" scope=\"col\">Date created</td>\n <td class=\"govuk-table__header\" scope=\"col\">Channel</td>\n <td class=\"govuk-table__header\" scope=\"col\">Method</td>\n <td class=\"govuk-table__header col-15\" scope=\"col\">Amount</td>\n <td class=\"govuk-table__header\" scope=\"col\">Allocation status</td>\n <td class=\"govuk-table__header\" scope=\"col\">Payment status</td>\n </tr>\n </thead>\n <tbody class=\"govuk-table__body\" *ngIf=\"allPayments?.length > 0\">\n <tr class=\"govuk-table__row\" *ngFor=\"let payment of allPayments\">\n <td class=\"govuk-table__cell whitespace-inherit\">\n <a href=\"javascript:void(0)\" (click)=\"goToPayementView(payment.paymentGroupReference, payment.reference, payment.method)\">{{ payment.reference }}</a>\n </td>\n <td class=\"govuk-table__cell whitespace-inherit\">{{ payment.date_created | date:'dd MMM yyyy' }}</td>\n <td class=\"channel govuk-table__cell whitespace-inherit\">{{ payment.channel | lowercase }}</td>\n <td class=\"govuk-table__cell capitalize whitespace-inherit\">{{ payment.method | lowercase}}</td>\n <td class=\"govuk-table__cell whitespace-inherit\">{{ payment.amount | currency:'GBP':'symbol-narrow':'1.2-2' }}</td>\n <td class=\"govuk-table__cell whitespace-inherit\"> {{getAllocationStatus(payment)}}</td>\n <td class=\"govuk-table__cell whitespace-inherit\">{{ payment.status }}</td>\n </tr>\n </tbody>\n <tbody class=\"govuk-table__body\" *ngIf=\"allPayments?.length === 0\">\n <td class=\"govuk-table__cell\" colspan=\"7\">No payments recorded</td>\n </tbody>\n </table>\n\n <!-- remissions -->\n <h3 class=\"heading-medium\">Remissions</h3>\n <table class=\"govuk-table\">\n <thead class=\"govuk-table__head\">\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__header\" scope=\"col\">Remission reference</td>\n <td class=\"govuk-table__header\" scope=\"col\">Date created</td>\n <td class=\"govuk-table__header\" scope=\"col\">Remission code</td>\n <td class=\"govuk-table__header\" scope=\"col\">Fee code</td>\n <td class=\"govuk-table__header\" scope=\"col\">Remission amount</td>\n </tr>\n </thead>\n <tbody class=\"govuk-table__body\" *ngIf=\"remissions?.length > 0\">\n <tr class=\"govuk-table__row\" *ngFor=\"let remission of remissions\">\n <td class=\"govuk-table__cell whitespace-inherit\">{{ remission.remission_reference }}</td>\n <td class=\"govuk-table__cell whitespace-inherit\">{{ remission.date_created | date:'dd MMM yyyy' }}</td>\n <td class=\"govuk-table__cell whitespace-inherit\">{{ remission.hwf_reference }}</td>\n <td class=\"govuk-table__cell whitespace-inherit\">{{ remission.fee_code }}</td>\n <td class=\"govuk-table__cell whitespace-inherit\">{{ remission.hwf_amount | currency:'GBP':'symbol-narrow':'1.2-2'}}</td>\n </tr>\n </tbody>\n <tbody class=\"govuk-table__body\" *ngIf=\"remissions?.length === 0\">\n <td class=\"govuk-table__cell\" colspan=\"5\">No remissions recorded</td>\n </tbody>\n </table>\n </div>\n </div>\n </div>\n\n <div *ngIf=\"takePayment && isTurnOff\">\n <div class=\"govuk-grid-row\">\n <div class=\"govuk-grid-column-two-thirds\">\n <h1 class=\"govuk-heading-xl\">Case transactions</h1>\n </div>\n\n <div class=\"govuk-grid-column-one-third\" align=\"right\" >\n <a [ngClass]=\"{ 'disable': !isAddFeeBtnEnabled} \" (click)=\"redirectToFeeSearchPage($event)\" class=\"button\">Add a new fee</a>\n </div>\n </div>\n\n <div class=\"govuk-grid-row\">\n <div class=\"govuk-grid-column-two-thirds govuk-!-padding-bottom-6\">\n <h3 class=\"heading-medium\">CCD reference:</h3>\n <span> {{ ccdCaseNumber | ccdHyphens }}</span>\n </div>\n\n <div class=\"govuk-grid-column-full govuk-!-padding-bottom-3\">\n <hr class=\"govuk-section-break govuk-section-break--visible\">\n <table class=\"govuk-table\">\n <thead class=\"govuk-table__head\">\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__header\" scope=\"col\">Total payments</td>\n <td class=\"govuk-table__header\" scope=\"col\">Total remissions</td>\n <td class=\"govuk-table__header\" scope=\"col\">Amount due</td>\n </tr>\n </thead>\n <tbody class=\"govuk-table__body\">\n <tr class=\"totalpayments govuk-table__row\">\n <td class=\"govuk-table__cell\">{{ totalPayments | currency :'GBP':'symbol':'1.2-2' }}</td>\n <td class=\"govuk-table__cell\">{{ totalRemissions | currency :'GBP':'symbol':'1.2-2' }}</td>\n <td class=\"govuk-table__cell\">{{ (totalFees - totalRemissions) - totalPayments | currency :'GBP':'symbol':'1.2-2'}}</td>\n </tr>\n </tbody>\n </table>\n </div>\n </div>\n\n\n <!-- No fees start -->\n <div *ngIf=\"paymentGroups?.length === 0\">\n <div class=\"govuk-grid-row\">\n <div class=\"govuk-grid-column-full\">\n <span class=\"heading-small\">Existing fees</span>\n </div>\n\n <div class=\"govuk-grid-column-full\">\n <table class=\"govuk-table\">\n <thead class=\"govuk-table__head\">\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__header\" scope=\"col\">Code</td>\n <td class=\"govuk-table__header\" scope=\"col\">Description</td>\n <td class=\"govuk-table__header\" scope=\"col\">Volume</td>\n <td class=\"govuk-table__header\" scope=\"col\">Fee amount</td>\n <td class=\"govuk-table__header\" scope=\"col\">Calculated amount</td>\n <td class=\"govuk-table__header\" scope=\"col\">Group amount outstanding</td>\n </tr>\n </thead>\n <tbody class=\"govuk-table__body\">\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__cell\" colspan=\"6\">No fees recorded</td>\n </tr>\n </tbody>\n </table>\n </div>\n </div>\n </div>\n\n <!-- No fees end -->\n\n <div *ngFor=\"let paymentGroup of paymentGroups\">\n\n <div class=\"govuk-grid-row\">\n <div class=\"govuk-grid-column-full govuk-grid-column-full--gr\">\n <span class=\"heading-medium\">Group reference: {{paymentGroup.payment_group_reference}}</span>\n </div>\n </div>\n <div class=\"govuk-grid-row\">\n\n <!--New Code start-->\n\n <div class=\"govuk-grid-column-full\">\n <span class=\"heading-small\">Exisiting fees</span>\n </div>\n <div class=feeclass>\n <table class=\"govuk-table\">\n <thead class=\"govuk-table__head\">\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__header\" scope=\"col\">Code</td>\n <td class=\"govuk-table__header\" scope=\"col\">Description</td>\n <td class=\"govuk-table__header\" scope=\"col\">Volume</td>\n <td class=\"govuk-table__header\" scope=\"col\">Fee amount</td>\n <td class=\"govuk-table__header\" scope=\"col\">Calculated amount</td>\n <td class=\"groupamount govuk-table__header\" scope=\"col\">Group amount outstanding</td>\n </tr>\n </thead>\n <tbody class=\"govuk-table__body\" >\n <tr class=\"govuk-table__row\" *ngFor=\"let fee of paymentGroup.fees; let i = index;\">\n <td class=\"govuk-table__cell govuk-table__cell--col1\">{{fee.code}}</td>\n <td class=\"govuk-table__cell govuk-table__cell--col2\"> {{fee.description}} </td>\n <td class=\"govuk-table__cell govuk-table__cell--col3 align-center\"> {{fee.volume? fee.volume : '-'}} </td>\n <td class=\"govuk-table__cell govuk-table__cell--col4\"> {{ fee.net_amount | currency:'GBP':'symbol-narrow':'1.2-2' }} </td>\n <td class=\"govuk-table__cell govuk-table__cell--col5\"> {{fee.calculated_amount | currency:'GBP':'symbol-narrow':'1.2-2' }} </td>\n <td class=\"govuk-table__cell govuk-table__cell--col6 govuk-table__custom--col6\" [attr.rowspan]=\"paymentGroup.fees.length\" *ngIf=\"i==0\">\n {{getGroupOutstandingAmount(paymentGroup) | currency:'GBP':'symbol-narrow':'1.2-2' }} </td>\n </tr>\n </tbody>\n <tbody class=\"govuk-table__body\" *ngIf=\"paymentGroup.fees.length==0\">\n <td class=\"govuk-table__cell\" colspan=\"6\">No payments recorded</td>\n </tbody>\n </table>\n </div>\n </div>\n <div class=\"govuk-inset-text govuk-inset-text__no-border\" *ngIf=\"paymentGroup.payments || paymentGroup.remissions\">\n <details>\n <summary class=\"govuk-hidetext\">\n <span class=\"summary\">Allocated payments and remissions</span>\n </summary>\n\n <div class=\"panel panel-border-narrow\">\n <!-- payments -->\n <span class=\"heading-medium\">Payments</span>\n <table class=\"govuk-table\">\n <thead class=\"govuk-table__head\">\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__header\" scope=\"col\">Payment reference</td>\n <td class=\"govuk-table__header\" scope=\"col\">Date created</td>\n <td class=\"govuk-table__header\" scope=\"col\">Channel</td>\n <td class=\"govuk-table__header\" scope=\"col\">Method</td>\n <td class=\"govuk-table__header\" scope=\"col\">Amount</td>\n <td class=\"govuk-table__header\" scope=\"col\">Allocation status</td>\n <td class=\"govuk-table__header\" scope=\"col\">Status</td>\n </tr>\n </thead>\n <tbody class=\"govuk-table__body\" *ngIf=\"paymentGroup.payments?.length > 0\">\n <tr class=\"govuk-table__row\" *ngFor=\"let payment of paymentGroup.payments\">\n <td class=\"govuk-table__cell whitespace-inherit\">\n <a href=\"javascript:void(0)\" (click)=\"goToPayementView(paymentGroup.payment_group_reference, payment.reference, payment.method)\">{{ payment.reference }}</a>\n </td>\n <td class=\"govuk-table__cell whitespace-inherit\">{{ payment.date_created | date:'dd MMM yyyy' }}</td>\n <td class=\"channel govuk-table__cell whitespace-inherit\">{{ payment.channel | lowercase }}</td>\n <td class=\"govuk-table__cell capitalize whitespace-inherit\">{{ payment.method | lowercase}}</td>\n <td class=\"govuk-table__cell whitespace-inherit\">{{ payment.amount }}</td>\n <td class=\"govuk-table__cell whitespace-inherit\"> {{getAllocationStatus(payment)}}</td>\n <td class=\"govuk-table__cell whitespace-inherit\">{{ payment.status }}</td>\n </tr>\n </tbody>\n <tbody class=\"govuk-table__body\" *ngIf=\"paymentGroup.payments?.length === 0\">\n <td class=\"govuk-table__cell\" colspan=\"6\">No payments recorded</td>\n </tbody>\n </table>\n\n <!-- remissions -->\n <span class=\"heading-medium\">Remissions</span>\n <table class=\"govuk-table\">\n <thead class=\"govuk-table__head\">\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__header\" scope=\"col\">Remission reference</td>\n <td class=\"govuk-table__header\" scope=\"col\">Date created</td>\n <td class=\"govuk-table__header\" scope=\"col\">Remission code</td>\n <td class=\"govuk-table__header\" scope=\"col\">Fee applied against</td>\n <td class=\"govuk-table__header\" scope=\"col\">Remission amount</td>\n </tr>\n </thead>\n <tbody class=\"govuk-table__body\" *ngIf=\"paymentGroup.remissions?.length > 0\">\n <tr class=\"govuk-table__row\" *ngFor=\"let remission of paymentGroup.remissions\">\n <td class=\"govuk-table__cell whitespace-inherit\">{{ remission.remission_reference }}</td>\n <td class=\"govuk-table__cell whitespace-inherit\">{{ remission.date_created | date:'dd MMM' }}</td>\n <td class=\"govuk-table__cell whitespace-inherit\">{{ remission.hwf_reference }}</td>\n <td class=\"govuk-table__cell whitespace-inherit\">{{ remission.fee_code }}</td>\n <td class=\"govuk-table__cell whitespace-inherit\">{{ remission.hwf_amount }}</td>\n </tr>\n </tbody>\n <tbody class=\"govuk-table__body\" *ngIf=\"paymentGroup.remissions?.length === 0\">\n <td class=\"govuk-table__cell\" colspan=\"5\">No remissions recorded</td>\n </tbody>\n </table>\n </div>\n </details>\n\n\n <div *ngIf=\"takePayment\">\n <button type=\"submit\" (click)=\"loadFeeSummaryPage(paymentGroup)\"\n [disabled]=\"(getGroupOutstandingAmount(paymentGroup) <= 0 || isUnprocessedRecordSelected)\"\n [ngClass]='(getGroupOutstandingAmount(paymentGroup) <= 0 || isUnprocessedRecordSelected) ? \"govuk-button govuk-button--secondary govuk-button--disabled govuk-!-margin-right-1\" : \"govuk-button govuk-button--secondary govuk-!-margin-right-1\"'>\n Add telephone payment\n </button>\n </div>\n </div>\n </div>\n <ccpay-app-unprocessed-payments\n *ngIf=\"isBulkScanEnable\"\n [IS_BUTTON_ENABLE]=\"takePayment\"\n [LEVEL]=\"5\"\n [PAYMENTSLENGTH]=\"allPayments?.length\"\n [PAYMENTREF]=\"paymentRef\"\n [ISTURNOFF]=\"isTurnOff\"\n [ISSFENABLE]=\"isStrategicFixEnable\"\n [FEE_RECORDS_EXISTS]=\"isFeeRecordsExist\"\n (getUnprocessedFeeCount) = \"getUnprocessedFeeCount($event)\"\n [IS_OS_AMT_AVAILABLE]=\"isGrpOutstandingAmtPositive\"\n (selectedUnprocessedFeeEvent) = \"selectedUnprocessedFeeEvent($event)\">\n </ccpay-app-unprocessed-payments>\n <div class=\"govuk-grid-row govuk-grid__surplus-payments\" *ngIf=\"totalRefundAmount > 0 && takePayment\">\n <div class=\"govuk-grid-column-full govuk-grid__surplus-payments-col1\">\n <h3 class=\"heading-medium\">Surplus payments</h3>\n </div>\n <div class=\"govuk-grid-column-full\">\n Total surplus payments received: {{totalRefundAmount | currency :'GBP':'symbol':'1.2-2'}}\n </div>\n </div>\n </div>\n\n <div *ngIf=\"takePayment\">\n <ccpay-app-unprocessed-payments\n *ngIf=\"isBulkScanEnable && !takePayment\"\n [IS_BUTTON_ENABLE]=\"takePayment\"\n [LEVEL]=\"1\"\n [ISTURNOFF]=\"isTurnOff\"\n [ISSFENABLE]=\"isStrategicFixEnable\"\n [FEE_RECORDS_EXISTS]=\"isFeeRecordsExist\"\n [IS_OS_AMT_AVAILABLE]=\"isGrpOutstandingAmtPositive\"\n (getUnprocessedFeeCount) = \"getUnprocessedFeeCount($event)\"\n [PAYMENTSLENGTH]=\"allPayments?.length\"\n [PAYMENTREF]=\"paymentRef\"\n (selectedUnprocessedFeeEvent) = \"selectedUnprocessedFeeEvent($event)\">\n </ccpay-app-unprocessed-payments>\n </div>\n\n <div *ngIf=\"!takePayment\" class=\"govuk-grid-row govuk-grid__surplus-payments\">\n\n <div class=\"govuk-grid-column-full\">\n\n <span class=\"heading-medium\">Payments</span>\n <table class=\"govuk-table\">\n <thead class=\"govuk-table__head\">\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__header col-13\" scope=\"col\">Status</td>\n <td class=\"govuk-table__header col-10\" scope=\"col\">Amount</td>\n <td class=\"govuk-table__header col-14\" scope=\"col\">Date allocated</td>\n <td class=\"govuk-table__header col-20\" scope=\"col\">Request reference</td>\n <td class=\"govuk-table__header col-9\" scope=\"col\"></td>\n <td class=\"govuk-table__header\" scope=\"col\"></td>\n </tr>\n </thead>\n <tbody class=\"govuk-table__body\" *ngIf=\"allPayments?.length > 0\">\n <tr class=\"govuk-table__row\" *ngFor=\"let payment of allPayments\">\n <td class=\"govuk-table__cell col-13 whitespace-inherit\">{{ payment.status }}</td>\n <td class=\"govuk-table__cell col-10 whitespace-inherit\">{{ payment.amount | currency :'GBP':'symbol':'1.2-2' }}</td>\n <td class=\"govuk-table__cell col-17 whitespace-inherit\">{{ payment.date_created | date:'dd MMM yyyy HH:mm:ss' }}</td>\n <td class=\"govuk-table__cell col-24 whitespace-inherit\">{{ payment.paymentGroupReference }}</td>\n <td class=\"govuk-table__cell col-13 whitespace-inherit\"></td>\n <td class=\"govuk-table__cell whitespace-inherit\">\n <a href=\"javascript:void(0)\" (click)=\"goToPayementView(payment.paymentGroupReference, payment.reference, payment.method)\">Review</a>\n </td>\n </tr>\n </tbody>\n\n </table>\n <ccpay-app-unprocessed-payments class=\"govuk-table\"\n *ngIf=\"isBulkScanEnable && !takePayment\"\n [IS_BUTTON_ENABLE]=\"takePayment\"\n [LEVEL]=\"2\"\n [ISTURNOFF]=\"isTurnOff\"\n [ISSFENABLE]=\"isStrategicFixEnable\"\n [FEE_RECORDS_EXISTS]=\"isFeeRecordsExist\"\n [IS_OS_AMT_AVAILABLE]=\"isGrpOutstandingAmtPositive\"\n [PAYMENTSLENGTH]=\"allPayments?.length\"\n [PAYMENTREF]=\"paymentRef\"\n (getUnprocessedFeeCount) = \"getUnprocessedFeeCount($event)\"\n (selectedUnprocessedFeeEvent) = \"selectedUnprocessedFeeEvent($event)\">\n </ccpay-app-unprocessed-payments>\n </div>\n </div>\n </ng-container>\n\n<!--Order Case Transactions Page-->\n <ng-container *ngIf=\"viewStatus === 'main' && !isTurnOff && takePayment\">\n <div>\n\n <div>\n <h1 class=\"govuk-grid-column-two-thirds govuk-heading-l govuk-!-margin-top-0\">Case transactions</h1>\n <ng-container *ngIf='!isExceptionRecord' class=\" govuk-!-margin-bottom-6 alignself\">\n <b> Case reference: </b>{{ ccdCaseNumber | ccdHyphens }}\n </ng-container>\n <ng-container *ngIf='isExceptionRecord' class=\"govuk-!-margin-bottom-3 col-55 alignself\" >\n <b> Exception reference:</b>{{ ccdCaseNumber | ccdHyphens }}\n </ng-container>\n <div>\n <table class=\"govuk-table\">\n <thead class=\"govuk-table__head\">\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__header col-25\" scope=\"col\">Total payments</td>\n <td class=\"govuk-table__header govuk-table__header--custom col-25\" scope=\"col\" *ngIf=\"isBulkScanEnable\">Unallocated payments</td>\n <td class=\"govuk-table__header col-25\" scope=\"col\">Total remissions</td>\n <td class=\"govuk-table__header col-20\" scope=\"col\">Amount due</td>\n <td class=\"govuk-table__header col-20\" scope=\"col\">Over payment</td>\n </tr>\n </thead>\n <tbody class=\"govuk-table__body\">\n <tr class=\"totalpayments govuk-table__row\">\n <td class=\"govuk-table__cell summary-table-font\">{{ totalPayments | currency :'GBP':'symbol':'1.2-2' }}</td>\n <td class=\"govuk-table__cell case-transaction__color summary-table-font\" *ngIf=\"isBulkScanEnable\">{{unprocessedRecordCount}}</td>\n\n <td class=\"govuk-table__cell summary-table-font\">{{ totalRemissions | currency :'GBP':'symbol':'1.2-2' }}</td>\n <td class=\"govuk-table__cell summary-table-font\">{{ clAmountDue | currency :'GBP':'symbol':'1.2-2'}}</td>\n <td class=\"govuk-table__cell summary-table-font\">{{ overPaymentAmount | currency :'GBP':'symbol':'1.2-2'}}</td>\n\n </tr>\n </tbody>\n </table>\n </div>\n </div>\n <input #myInput type='hidden' class='iFrameDrivenImageValue' value='ORDERIDDETAILS'>\n\n <!--Payment Request-->\n <div class=\"paymentrequest\">\n <span class=\"heading-medium\">Service requests</span>\n <ng-container>\n <table class=\"govuk-table\">\n <thead class=\"govuk-table__head\">\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__header col-14\" scope=\"col\">Status</td>\n <td class=\"govuk-table__header col-10\" scope=\"col\">Amount</td>\n <td class=\"govuk-table__header col-18\" scope=\"col\">Party</td>\n <td class=\"govuk-table__header col-21\" scope=\"col\">Request reference</td>\n <td class=\"govuk-table__header col-9\" scope=\"col\"></td>\n <td class=\"govuk-table__header col\" scope=\"col\"></td>\n </tr>\n </thead>\n <tbody class=\"govuk-table__body\" *ngIf=\"orderLevelFees?.length > 0\">\n <tr *ngFor=\"let orderRef of orderLevelFees;let i = index;\">\n <td class=\"govuk-table__cell whitespace-inherit\">{{orderRef.orderStatus}}</td>\n <td class=\"govuk-table__cell whitespace-inherit\">{{ orderRef.orderTotalFees | currency :'GBP':'symbol':'1.2-2' }}</td>\n <td *ngIf=\"cpoDetails !== null\" class=\"govuk-table__cell whitespace-inherit\">{{cpoDetails['responsibleParty']}}</td>\n <td *ngIf=\"cpoDetails === null\" class=\"govuk-table__cell whitespace-inherit\"></td>\n <td class=\"govuk-table__cell whitespace-inherit\">{{orderRef.orderRefId}}</td>\n <td class=\"govuk-table__cell\">\n <a href=\"javascript:void(0)\" (click)=\"goToOrderViewDetailSection(orderRef)\">Review</a>\n </td>\n <td class=\"alignright\">\n\n <button type=\"submit\" (click)=\"redirectToOrderFeeSearchPage($event,orderRef)\"\n [disabled]=\"!orderRef.orderAddBtnEnable\"\n [ngClass]='!orderRef.orderAddBtnEnable ? \"govuk-button govuk-button--secondary govuk-button--disabled govuk-!-margin-right-1\" : \"govuk-button govuk-button--secondary govuk-!-margin-right-1\"'>\n Take telephony payment\n </button></td>\n </tr>\n </tbody>\n <tbody class=\"govuk-table__body alignleft\" *ngIf=\"orderLevelFees?.length === 0\">\n <td colspan=\"6\">No service requests on this case.</td>\n </tbody>\n </table>\n </ng-container>\n <!-- <ng-container *ngIf=\"orderLevelFees?.length === 0\">\n <br/>No service requests on this case.<br/>\n </ng-container> -->\n <span>\n <br/>\n <a (click)=\"redirectToFeeSearchPage($event)\"\n [class.disable-link]=\"!isAddFeeBtnEnabled\">Create service request and pay</a><br/>\n </span>\n </div>\n <div>\n <span class=\"heading-medium\"><br/>Payments</span>\n <ccpay-app-unprocessed-payments\n *ngIf=\"isBulkScanEnable\"\n [IS_BUTTON_ENABLE]=\"takePayment\"\n [LEVEL]=\"3\"\n [PAYMENTSLENGTH]=\"allPayments?.length\"\n [ISTURNOFF]=\"isTurnOff\"\n [ISSFENABLE]=\"isStrategicFixEnable\"\n [PAYMENTREF]=\"paymentRef\"\n [FEE_RECORDS_EXISTS]=\"isFeeRecordsExist\"\n (getUnprocessedFeeCount) = \"getUnprocessedFeeCount($event)\"\n [IS_OS_AMT_AVAILABLE]=\"isGrpOutstandingAmtPositive\"\n (selectedUnprocessedFeeEvent) = \"selectedUnprocessedFeeEvent($event)\">\n </ccpay-app-unprocessed-payments>\n\n <ng-container>\n <table class=\"govuk-table\">\n <thead class=\"govuk-table__head\">\n </thead>\n <tbody class=\"govuk-table__body\" *ngIf=\"allPayments?.length > 0\">\n <tr class=\"govuk-table__row\" *ngFor=\"let payment of allPayments\">\n <td class=\"govuk-table__cell col-14 whitespace-inherit\">{{ payment.status }}</td>\n <td class=\"govuk-table__cell col-10 whitespace-inherit\">{{ payment.amount | currency :'GBP':'symbol':'1.2-2' }}</td>\n <td class=\"govuk-table__cell col-17 whitespace-inherit\">{{ payment.date_created | date:'dd MMM yyyy' }}</td>\n <td class=\"govuk-table__cell col-24 whitespace-inherit\">{{ payment.paymentGroupReference }}</td>\n <td class=\"govuk-table__cell col-13 whitespace-inherit\"></td>\n <td class=\"govuk-table__cell whitespace-inherit\">\n <a href=\"javascript:void(0)\" (click)=\"goToPayementView(payment.paymentGroupReference, payment.reference, payment.method)\">Review</a>\n </td>\n </tr>\n </tbody>\n\n <tbody class=\"govuk-table__body\" *ngIf=\"allPayments?.length === 0 && unprocessedRecordCount <= 0\">\n <td colspan=\"6\">No payments recorded</td>\n </tbody>\n </table>\n\n </ng-container>\n\n </div>\n <div *ngIf=\"!check4AllowedRoles2AccessPBApayment() && serviceRequestValue !== 'true'\">\n <span class=\"heading-medium\"><br/>Refunds</span>\n <ccpay-refund-status\n [ccdCaseNumber]=\"ccdCaseNumber\"\n [isTurnOff]=\"isTurnOff\"\n [orderParty]=\"orderParty\"\n [LOGGEDINUSERROLES]=\"LOGGEDINUSERROLES\" \n ></ccpay-refund-status>\n </div>\n </div>\n </ng-container>\n\n <ng-container *ngIf=\"!takePayment && viewStatus === 'main'\">\n <div class=\"govuk-grid-column-full\" [ngClass]='serviceRequestValue!== \"false\" ? \"govuk-margin-btm-20px\" : \"\"'>\n <!-- <span *ngIf=\"serviceRequestValue === 'false'\" class=\"heading-medium\">Service requests</span> -->\n <ng-container *ngIf=\"!(orderLevelFees?.length === 0 && !isAnyFeeGroupAvilable) && serviceRequestValue !== 'false' \">\n <table class=\"govuk-table\">\n <thead class=\"govuk-table__head\">\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__header col-14\" scope=\"col\">Status</td>\n <td class=\"govuk-table__header col-18\" scope=\"col\">Amount</td>\n <td class=\"govuk-table__header col-18\" scope=\"col\">Party</td>\n <td class=\"govuk-table__header col-24\" scope=\"col\">Request reference\t</td>\n <td class=\"govuk-table__header col-9\" scope=\"col\"></td>\n <td class=\"govuk-table__header\" scope=\"col\"></td>\n </tr>\n </thead>\n <tbody class=\"govuk-table__body\" *ngIf=\"orderLevelFees?.length > 0\">\n <tr class=\"govuk-table__row\" *ngFor=\"let orderRef of orderLevelFees;let i = index;\">\n <td class=\"govuk-table__cell whitespace-inherit\">{{orderRef.orderStatus}}</td>\n <td class=\"govuk-table__cell whitespace-inherit\">{{orderRef.orderTotalFees | currency :'GBP':'symbol':'1.2-2'}}</td>\n <td *ngIf=\"cpoDetails !== null\" class=\"govuk-table__cell whitespace-inherit\">{{cpoDetails['responsibleParty']}}</td>\n <td *ngIf=\"cpoDetails === null\" class=\"govuk-table__cell whitespace-inherit\"></td>\n <td class=\"govuk-table__cell whitespace-inherit\">{{orderRef.orderRefId}}</td>\n <td class=\"govuk-table__cell of-visible\"> <a href=\"javascript:void(0)\" (click)=\"loadPBAAccountPage(orderRef)\" *ngIf=\"serviceRequestValue !== 'false' && check4AllowedRoles2AccessPBApayment() && orderRef.orderStatus === 'Not paid'\"> Pay now</a></td>\n <td class=\"govuk-table__cell\">\n <a href=\"javascript:void(0)\" (click)=\"goToOrderViewDetailSection(orderRef)\">Review</a>\n </td>\n </tr>\n </tbody>\n <tbody class=\"govuk-table__body\" *ngIf=\"orderLevelFees?.length === 0 && serviceRequestValue === 'false'\">\n <tr class=\"govuk-table__row\" >\n <td class=\"alignleft\" colspan=\"7\">No service requests on this case.</td>\n </tr>\n </tbody>\n </table>\n </ng-container>\n <ng-container *ngIf=\"orderLevelFees?.length === 0 && serviceRequestValue !== 'false' && !isAnyFeeGroupAvilable\">\n <h1 class=\"govuk-heading-l govuk-heading-lw\">If you are expecting to pay and are not able to see a service request,</h1>\n <p>please refresh and try in some time.</p>\n </ng-container>\n\n <!-- </div> -->\n\n </div>\n\n <div class=\"govuk-grid-column-full\">\n <div *ngIf=\"serviceRequestValue === 'false'\">\n <span class=\"heading-medium\"><br/>Payments</span>\n <ng-container >\n <table class=\"govuk-table\">\n <thead class=\"govuk-table__head\">\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__header col-14\" scope=\"col\">Status</td>\n <td class=\"govuk-table__header col-10\" scope=\"col\">Amount</td>\n <td class=\"govuk-table__header col-17\" scope=\"col\">Date</td>\n <td class=\"govuk-table__header col-24\" scope=\"col\">Payment reference</td>\n <td class=\"govuk-table__header col-13\" scope=\"col\"></td>\n <td class=\"govuk-table__header\" scope=\"col\"></td>\n </tr>\n </thead>\n <tbody class=\"govuk-table__body\" *ngIf=\"allPayments?.length > 0\">\n <tr class=\"govuk-table__row\" *ngFor=\"let payment of allPayments\">\n <td class=\"govuk-table__cell whitespace-inherit\">{{ payment.status }}</td>\n <td class=\"govuk-table__cell whitespace-inherit\">{{ payment.amount | currency :'GBP':'symbol':'1.2-2' }}</td>\n <td class=\"govuk-table__cell whitespace-inherit\">{{ payment.date_created | date:'dd MMM yyyy' }}</td>\n <td class=\"govuk-table__cell whitespace-inherit\">{{ payment?.reference }}</td>\n <td class=\"govuk-table__cell whitespace-inherit\"></td>\n <td class=\"govuk-table__cell whitespace-inherit\">\n <a href=\"javascript:void(0)\" (click)=\"goToPayementView(payment.paymentGroupReference, payment.reference, payment.method)\">Review</a>\n </td>\n </tr>\n </tbody>\n\n <tbody class=\"govuk-table__body\" *ngIf=\"allPayments?.length === 0\">\n <td colspan=\"6\">No payments recorded</td>\n </tbody>\n </table>\n <ccpay-app-unprocessed-payments class=\"govuk-table\"\n *ngIf=\"isBulkScanEnable && !takePayment\"\n [IS_BUTTON_ENABLE]=\"takePayment\"\n [LEVEL]=\"4\"\n [ISTURNOFF]=\"isTurnOff\"\n [ISSFENABLE]=\"isStrategicFixEnable\"\n [PAYMENTSLENGTH]=\"allPayments?.length\"\n [PAYMENTREF]=\"paymentRef\"\n (getUnprocessedFeeCount) = \"getUnprocessedFeeCount($event)\"\n [FEE_RECORDS_EXISTS]=\"isAnyFeeGroupAvilable\"\n [IS_OS_AMT_AVAILABLE]=\"isGrpOutstandingAmtPositive\"\n (selectedUnprocessedFeeEvent) = \"selectedUnprocessedFeeEvent($event)\">\n </ccpay-app-unprocessed-payments>\n </ng-container>\n\n </div>\n </div>\n <div class=\"govuk-grid-column-full\" *ngIf=\"!check4AllowedRoles2AccessPBApayment() && serviceRequestValue !== 'true'\">\n <span class=\"heading-medium\"><br/>Refunds</span>\n <ccpay-refund-status \n [ccdCaseNumber]=\"ccdCaseNumber\"\n [orderParty] =\"orderParty\"\n ></ccpay-refund-status>\n </div>\n\n </ng-container>\n\n\n<input #myInput type='hidden' class='iFrameDrivenImageValue' value='FEEREMOVALCONFIRMATION_2'>\n\n<!-- Order Full View Details-->\n<ng-container *ngIf=\"viewStatus === 'order-full-view'\">\n <ccpay-service-request\n [viewStatus] = \"viewStatus\"\n [orderRef] = \"orderRef\"\n [orderStatus] = \"orderStatus\"\n [orderCreated] = \"orderCreated\"\n [orderParty] = \"orderParty\"\n [orderCCDEvent] = \"orderCCDEvent\"\n [orderDetail] = \"orderDetail\"\n [paymentGroupList] = \"paymentGroups\"\n [LOGGEDINUSERROLES] = \"LOGGEDINUSERROLES\"\n [ccdCaseNumber] = \"ccdCaseNumber\"\n [orderFeesTotal] = \"orderFeesTotal\"\n [orderTotalPayments] = \"orderTotalPayments\"\n [orderRemissionTotal] = \"orderRemissionTotal\"\n [isServiceRequest] = \"serviceRequestValue\"\n (goToServiceRquestComponent) = \"goToServiceRequestPage()\"\n ></ccpay-service-request>\n\n</ng-container>\n<ccpay-add-remission *ngIf=\"viewStatus === 'addremission' && feeId\"\n[isTurnOff]=\"isTurnOff\"\n[isStrategicFixEnable]=\"isStrategicFixEnable\"\n[viewCompStatus]= \"viewStatus\"\n[fee]=\"feeId\"\n[orderStatus] =\"orderStatus\"\n[paidAmount]= \"orderTotalPayments\"\n[isRefundRemission]=\"isRefundRemission\"\n[caseType]=\"caseType\"\n[paymentGroupRef]=\"orderRef\"\n[isFromServiceRequestPage] = \"true\"\n[payment] = \"payment\"\n[ccdCaseNumber]=\"ccdCaseNumber\"></ccpay-add-remission>\n\n<ccpay-add-remission *ngIf=\"viewStatus === 'issuerefund' && payment\"\n[isTurnOff]=\"isTurnOff\"\n[isStrategicFixEnable]=\"isStrategicFixEnable\"\n[viewCompStatus]= \"viewStatus\"\n[isFromServiceRequestPage] = \"true\"\n[payment]=\"payment\"\n[orderStatus] =\"orderStatus\"\n[paidAmount]= \"orderTotalPayments\"\n[isRefundRemission]=\"isRefundRemission\"\n[caseType]=\"caseType\"\n[paymentGroupRef]=\"orderRef\"\n[ccdCaseNumber]=\"ccdCaseNumber\"></ccpay-add-remission>\n<ccpay-add-remission *ngIf=\"viewStatus === 'addrefundforremission' && payment\"\n[isTurnOff]=\"isTurnOff\"\n[isStrategicFixEnable]=\"isStrategicFixEnable\"\n[viewCompStatus]= \"viewStatus\"\n[payment]=\"payment\"\n[orderStatus] =\"orderStatus\"\n[paidAmount]= \"orderTotalPayments\"\n[isRefundRemission]=\"isRefundRemission\"\n[caseType]=\"caseType\"\n[feeamount]=\"remissionFeeAmt\"\n[remission] = \"remissions\"\n[isFromServiceRequestPage]=\"true\"\n[ccdCaseNumber]=\"ccdCaseNumber\"></ccpay-add-remission>\n\n<ng-container *ngIf=\"viewStatus === 'feeRemovalConfirmation'\">\n <div class=\"govuk-warning-text\">\n <span class=\"govuk-warning-text__icon\" aria-hidden=\"true\">!</span>\n <strong class=\"govuk-warning-text__text\">\n <span class=\"govuk-warning-text__assistive\">Warning</span>\n Are you sure you want to delete this fee?\n </strong>\n </div>\n <div class=\"govuk-button-grb\">\n <form novalidate>\n <button type=\"submit\" class=\"button govuk-button--secondary\" (click)=\"cancelRemoval()\">\n Cancel\n </button>\n <button type=\"submit\" class=\"button\"\n [disabled]=\"isRemoveBtnDisabled\"\n [ngClass]='isRemoveBtnDisabled ? \"button button--disabled govuk-!-margin-right-1\" : \"button govuk-!-margin-right-1\"'\n (click)=\"removeFee(feeId)\">\n Remove\n </button>\n </form>\n </div>\n</ng-container>\n</main>\n</div>\n",
2943
+ styles: [".govuk-grid-column-full--gr{position:relative;margin-bottom:10px}.disable{text-decoration:none;cursor:default;color:#fff;background-color:grey;pointer-events:none}.govuk-grid__surplus-payments{margin:20px 0}.govuk-grid__surplus-payments>.govuk-grid-column-full{padding:0}.govuk-grid__surplus-payments-col1{margin-bottom:10px}.govuk-inset-text__no-border{border-left:0}.govuk-hidetext{font-size:22px;padding-bottom:10px}.lowercase{text-transform:lowercase}.channel:first-letter{text-transform:uppercase}.govuk-heading-xl{font-size:48px;margin-bottom:1px}.govuk-section-break--visible{border-bottom:2px solid #000}.totalpayments.govuk-table__row{border-bottom:2px solid #000!important}.govuk-inset-text{margin-left:1em}.govuk-button{font-size:19px;margin-bottom:0!important}.govuk-table__cell.govuk-table__cell--col6.govuk-table__custom--col6,.groupamount.govuk-table__header{text-align:right}.feeclass{padding-left:.7em}.align-center{text-align:center}details summary{display:list-item}.case-transaction__color{color:#a71414;font-weight:700;text-align:center}.capitalize:first-letter{text-transform:uppercase}.govuk-inset-text__no-left-margin{margin-left:0;padding-left:0}.whitespace-inherit{white-space:inherit!important}.govuk-section-records-break{margin:10px;border-bottom:2px solid #000!important}.exisitng-fees{margin-left:12px}.add-telephony-payment{margin-top:-2em;margin-left:-2em}.govuk-table__header--custom{text-align:center}.disable-link{cursor:default;pointer-events:none;color:#8e8c8c}.panel-no--style{border-left-style:none}.col-28{width:28%!important}.col-8{width:8%!important}.col-60{width:60%!important}.col-32{width:32%!important}.col-34{width:34%!important}.col-15{width:15%!important;padding-right:0!important;padding-left:0!important}.col-16{width:16%!important}.col-14{width:14%!important}.col-17{width:17%!important}.col-12{width:12%!important}.col-9{width:9%!important}.col-10{width:10%!important}.col-11{width:11%!important}.col-13{width:13%!important}.col-21{width:21%!important}.col-20{width:20%!important}.col-24{width:24%!important}.govuk-table__cell,.govuk-table__header{padding:10px 10px 10px 0}.col-27{width:27%!important}td{white-space:nowrap;overflow:hidden!important}.col-19{width:19%!important}.col-18,.col-19{padding-left:0!important}.col-18{width:18%!important;padding-right:0!important}.col-37{width:37%!important}.col-55{width:55%!important}.govuk-table{margin-bottom:1px}.hmcts-banner>.hmcts-banner__message{font-size:19px;line-height:1.25}.summary-table-font{font-size:36px}.order-class{padding-top:3em}.govuk-table__cell:last-child,.govuk-table__header:last-child{text-align:right}.govuk-grid-column-two-thirds{width:64%!important;padding:0!important}.govuk-heading-l{font-size:36px;margin-bottom:10px}.govuk-heading-lw{width:70%}.paymentrequest{margin-top:1em}.mar-17{margin-left:17px}.col-61{width:61px!important;padding:0!important}.error{width:960px;margin:auto}.summarypage{padding-left:36em;margin-top:2em}.summarypagealign{width:100%;text-align:right;margin-top:2em}.govuk-inset-text{font-size:2.1875rem}table{table-layout:fixed;width:100%}td,th{word-wrap:break-word}.totalPay{padding-right:14px;float:right;margin-top:2em}.govuk-back-link{font-size:1.5rem!important}.totalfees{float:right;margin-top:2em}.refundBtn{text-align:right;width:18%}.col-25{width:25%!important}.of-visible{overflow:visible!important}.col-51{width:51%!important}.alignright{text-align:right}.alignleft{text-align:left}.alignself{align-self:flex-end}.maxwidth{width:100%}.govuk-padding-btm{padding-bottom:50px}.govuk-margin-btm-20px{margin-bottom:20px}"]
2371
2944
  },] }
2372
2945
  ];
2373
2946
  CaseTransactionsComponent.ctorParameters = () => [
@@ -2380,7 +2953,8 @@ CaseTransactionsComponent.ctorParameters = () => [
2380
2953
  ];
2381
2954
  CaseTransactionsComponent.propDecorators = {
2382
2955
  LOGGEDINUSERROLES: [{ type: Input, args: ['LOGGEDINUSERROLES',] }],
2383
- isTakePayment: [{ type: Input }]
2956
+ isTakePayment: [{ type: Input }],
2957
+ isFromServiceRequestPage: [{ type: Input }]
2384
2958
  };
2385
2959
 
2386
2960
  class PaymentToPayhubRequest {
@@ -2492,15 +3066,20 @@ class FeeSummaryComponent {
2492
3066
  if (fee.calculated_amount === 0) {
2493
3067
  this.isFeeAmountZero = true;
2494
3068
  }
2495
- this.isRemissionsMatch = false;
2496
- paymentGroup.remissions.forEach(rem => {
2497
- if (rem.fee_code === fee.code) {
2498
- this.isRemissionsMatch = true;
2499
- fee['remissions'] = rem;
3069
+ if (paymentGroup.remissions) {
3070
+ this.isRemissionsMatch = false;
3071
+ paymentGroup.remissions.forEach(rem => {
3072
+ if (rem.fee_code === fee.code) {
3073
+ this.isRemissionsMatch = true;
3074
+ fee['remissions'] = rem;
3075
+ fees.push(fee);
3076
+ }
3077
+ });
3078
+ if (!this.isRemissionsMatch) {
2500
3079
  fees.push(fee);
2501
3080
  }
2502
- });
2503
- if (!this.isRemissionsMatch) {
3081
+ }
3082
+ else {
2504
3083
  fees.push(fee);
2505
3084
  }
2506
3085
  });
@@ -2594,8 +3173,8 @@ class FeeSummaryComponent {
2594
3173
  FeeSummaryComponent.decorators = [
2595
3174
  { type: Component, args: [{
2596
3175
  selector: 'ccpay-fee-summary',
2597
- template: "\n<div class=\"govuk-breadcrumbs\" *ngIf=\"isBackButtonEnable\">\n <ol class=\"govuk-breadcrumbs__list\">\n <li class=\"govuk-breadcrumbs__list-item\" *ngIf=\"!isTurnOff\">\n <a (click)=\"loadCaseTransactionPage()\" class=\"govuk-back-link govuk-label govuk-body\" href=\"javascript:void(0)\">Back</a>\n </li>\n <li class=\"govuk-breadcrumbs__list-item\" *ngIf=\"isTurnOff\">\n <a (click)=\"redirectToFeeSearchPage($event,'summary')\" class=\"govuk-back-link govuk-label govuk-body\" href=\"javascript:void(0)\">Back</a>\n </li>\n </ol>\n</div>\n<div class=\"fee-summary\" *ngIf=\"viewStatus === 'main'\">\n <main class=\"govuk-main-wrapper\">\n <input #myInput type='hidden' class='iFrameDrivenImageValue' value='FEESUMMARY'>\n <div class=\"summaryheader\">\n <h1 class=\"heading-large govuk-!-margin-top-3 govuk-!-margin-bottom-4\">Summary </h1>\n <p class=\"govuk-!-margin-top-5 caseref\">Case reference:{{ccdCaseNumber | ccdHyphens}}</p>\n </div>\n\n <!-- <div class=\"govuk-grid-row\">\n <div class=\"govuk-grid-column-two-thirds\">\n <h1 class=\"heading-xlarge\">Fee Summary</h1>\n </div>\n\n\n \u00A0<div\u00A0class=\"govuk-grid-column-one-third\"\u00A0align=\"right\">\n \u00A0\u00A0\u00A0\u00A0\u00A0\u00A0<button\u00A0 *ngIf=\"!isTurnOff\" (click)=\"redirectToFeeSearchPage($event,'summary')\"\n \u00A0\u00A0\u00A0\u00A0\u00A0\u00A0[disabled]=\"isPaymentExist\"\n \u00A0\u00A0\u00A0\u00A0\u00A0\u00A0[ngClass]='isPaymentExist ?\u00A0\"button\u00A0button--disabled govuk-!-margin-right-1\"\u00A0:\u00A0\"button govuk-!-margin-right-1\"'>\n Add a new fee\n </button>\n\n <a *ngIf=\"isTurnOff\" (click)=\"redirectToFeeSearchPage($event,'summary')\" class=\"button\">Add a new fee</a>\n </div>\n </div> -->\n\n\n <div *ngIf=\"errorMessage\">\n <div class=\"error-summary\" role=\"group\" aria-labelledby=\"failure-error-summary-heading\" tabindex=\"-1\">\n <h2 class=\"heading-medium error-summary-heading\" id=\"failure-error-summary-heading\">\n Payment Group details could not be retrieved\n </h2>\n <div class=\"govuk-error-summary__body\">\n {{ errorMessage }}\n </div>\n </div>\n </div>\n\n <!-- <table class=\"govuk-table\" *ngIf=\"!errorMessage && paymentGroup\">\n <thead class=\"govuk-table__head\">\n <tr class=\"govuk-table__row\">\n <th class=\"govuk-table__header govuk-!-font-weight-bold\" scope=\"col\">Fee Code</th>\n <th class=\"govuk-table__header govuk-!-font-weight-bold\" scope=\"col\">Fee description</th>\n <th class=\"govuk-table__header govuk-!-font-weight-bold\" scope=\"col\">Remission code</th>\n <th class=\"govuk-table__header govuk-!-font-weight-bold\" scope=\"col\"></th>\n </tr>\n </thead>\n <tbody class=\"govuk-table__body\" *ngIf=\"paymentGroup.fees\">\n <tr class=\"govuk-table__row\" *ngFor=\"let fee of paymentGroup.fees; let i = index;\">\n <td class=\"govuk-table__cell\">{{ fee.code }}</td>\n <td class=\"govuk-table__cell\">{{ fee.description }}</td>\n <td class=\"govuk-table__cell\">{{ getRemissionByFeeCode(fee.code)?.hwf_reference }}</td>\n <td class=\"govuk-table__cell grey-text\">\n <table class=\"govuk-table\">\n <tr class=\"govuk-table__row\">\n <td class=\"no-border grey-text subcolumn-1\">Fee amount:</td>\n <td class=\"no-border subcolumn-2\">{{ fee.fee_amount | currency:'GBP':'symbol-narrow':'1.2-2' }}</td>\n <td class=\"no-border subcolumn-3\" *ngIf=\"!isTurnOff\">\n <a (click)=\"confirmRemoveFee(fee.id)\" [ngClass]='isPaymentExist || fee.remissions ? \"disable-link\" : \"\"'>remove fee</a>\n </td>\n <td class=\"no-border subcolumn-3\" *ngIf=\"isTurnOff\">\n <a (click)=\"confirmRemoveFee(fee.id)\">remove fee</a>\n </td>\n </tr>\n <tr class=\"govuk-table__row\" *ngIf=\"fee.volume && fee.volume > 0\">\n <td class=\"no-border grey-text subcolumn-1\">Volume:</td>\n <td class=\"no-border subcolumn-2\">{{ fee.volume }}</td>\n <td class=\"no-border subcolumn-3\"></td>\n </tr>\n <tr class=\"govuk-table__row\">\n <td class=\"no-border grey-text subcolumn-1\">Fee total:</td>\n <td class=\"no-border subcolumn-2\">{{ fee.calculated_amount | currency:'GBP':'symbol-narrow':'1.2-2' }}</td>\n <td class=\"no-border subcolumn-3\"></td>\n </tr>\n <tr class=\"govuk-table__row\">\n <td class=\"no-border grey-text subcolumn-1\">Remission amount:</td>\n <td class=\"no-border subcolumn-2\">{{ getRemissionByFeeCode(fee.code)?.hwf_amount? ( getRemissionByFeeCode(fee.code)?.hwf_amount | currency:'GBP':'symbol-narrow':'1.2-2') : '-' }}</td>\n <td class=\"no-border subcolumn-3\" *ngIf=\"!isTurnOff\">\n <a (click)=\"addRemission(fee)\" *ngIf=\"(getRemissionByFeeCode(fee.code)?.hwf_amount === 0 || !getRemissionByFeeCode(fee.code)?.hwf_amount) && !isPaymentExist\">\n Deduct remission\n </a>\n </td>\n <td class=\"no-border subcolumn-3\" *ngIf=\"isTurnOff\">\n <a (click)=\"addRemission(fee)\" *ngIf=\"getRemissionByFeeCode(fee.code)?.hwf_amount === 0 || !getRemissionByFeeCode(fee.code)?.hwf_amount\">\n Deduct remission\n </a>\n </td>\n </tr>\n <tr class=\"govuk-table__row\">\n <td class=\"no-border grey-text subcolumn-1\">Total after remission:</td>\n <td class=\"no-border subcolumn-2\">{{ fee.net_amount | currency:'GBP':'symbol-narrow':'1.2-2' }}</td>\n <td class=\"no-border subcolumn-3\"></td>\n </tr>\n </table>\n </td>\n </tr>\n <tr class=\"govuk-table__row\">\n <td class=\"no-border\"></td>\n <td class=\"no-border\"></td>\n <td class=\"no-border\"></td>\n <td class=\"no-border\">\n <table class=\"govuk-table\">\n <tr class=\"govuk-table__row\">\n <td class=\"no-border govuk-!-font-weight-bold subcolumn-1\">Total payment</td>\n <td class=\"no-border subcolumn-2\">{{ totalAfterRemission - outStandingAmount | currency:'GBP':'symbol-narrow':'1.2-2'}}</td>\n <td class=\"no-border subcolumn-3\"></td>\n </tr>\n <tr class=\"govuk-table__row\">\n <td class=\"no-border govuk-!-font-weight-bold subcolumn-1\">Total outstanding amount</td>\n <td class=\"no-border subcolumn-2\">{{ outStandingAmount | currency:'GBP':'symbol-narrow':'1.2-2'}}</td>\n <td class=\"no-border subcolumn-3\"></td>\n </tr>\n </table>\n </td>\n </tr>\n <tr class=\"govuk-table__row\" *ngIf=\"!bsPaymentDcnNumber && isOldPcipalOff && isNewPcipalOff\">\n <td class=\"no-border\"></td>\n <td class=\"no-border\"></td>\n <td class=\"no-border\"></td>\n <td class=\"no-border\">\n <div class=\"govuk-form-group govuk-form-group--mg\">\n <fieldset class=\"govuk-fieldset\">\n <legend class=\"govuk-fieldset__legend govuk-fieldset__legend--m\">\n <span class=\"govuk-fieldset__heading govuk-fieldset__heading--fz\">\n Which system are you using to take the payment?\n </span>\n </legend>\n <div class=\"govuk-radios govuk-radios--small\">\n <div class=\"govuk-radios__item\">\n <input id=\"changed-name\" class=\"govuk-radios__input\" [(ngModel)]=\"platForm\" type=\"radio\" aria-label=\"8x8\" value=\"8x8\">\n <label class=\"govuk-label govuk-radios__label\" for=\"changed-name\">\n 8x8\n </label>\n </div>\n <div class=\"govuk-radios__item\">\n <input id=\"changed-name-2\" class=\"govuk-radios__input\" [(ngModel)]=\"platForm\" type=\"radio\" aria-label=\"Antenna\" value=\"Antenna\">\n <label class=\"govuk-label govuk-radios__label\" for=\"changed-name-2\">\n Antenna\n </label>\n </div>\n </div>\n </fieldset>\n </div>\n </td>\n </tr>\n </tbody>\n <tr class=\"govuk-table__row\">\n <td class=\"no-border\"></td>\n <td class=\"no-border\"></td>\n <td class=\"no-border\"></td>\n <td class=\"no-border\">\n <table class=\"govuk-table\">\n <tr class=\"govuk-table__row\">\n <td class=\"no-border subcolumn-2\">\n <button *ngIf=\"!bsPaymentDcnNumber\" type=\"submit\" (click)=\"takePayment()\"\n [disabled]=\"totalFee <= 0 || !platForm || isConfirmationBtnDisabled\"\n [ngClass]='totalFee <= 0 || !platForm || isConfirmationBtnDisabled? \"button button--disabled govuk-!-margin-right-1\" : \"button govuk-!-margin-right-1\"'>\n Take payment\n </button>\n <button *ngIf=\"bsPaymentDcnNumber\" type=\"button\" (click)=\"goToAllocatePage(outStandingAmount, isFeeAmountZero)\" class=\"button govuk-!-margin-right-1\">\n <span *ngIf=\"outStandingAmount > 0 || (isFeeAmountZero && outStandingAmount === 0)\">\n Allocate payment\n </span>\n <span *ngIf=\"outStandingAmount < 0 || (!isFeeAmountZero && outStandingAmount === 0)\">\n Continue\n </span>\n </button>\n </td>\n </tr>\n </table>\n </td>\n </tr>\n </tbody>\n </table> -->\n\n <div class=\"govuk-!-margin-top-3\">\n <table class=\"govuk-table govuk-!-margin-top-9\" *ngIf=\"!errorMessage && paymentGroup\">\n <thead class=\"govuk-table__head\">\n <tr class=\"govuk-table__row\">\n <th class=\"govuk-table__header\" scope=\"col\" class=\"class600\">Description</th>\n <th class=\"govuk-table__header\" scope=\"col\" class=\"class60\">Quantity</th>\n <th class=\"govuk-table__header\" scope=\"col\" class=\"class80\"></th>\n <th class=\"govuk-table__header\" scope=\"col\" class=\"class100\">Amount</th>\n </tr>\n </thead>\n\n <tbody class=\"govuk-table__body\" *ngIf=\"paymentGroup.fees\" role=\"status\">\n <tr class=\"govuk-table__row\" *ngFor=\"let fee of paymentGroup.fees; let i = index;\">\n <td class=\"govuk-table__cell\">{{ fee.description }}\n\n <span class=\"no-border\" *ngIf=\"(isPaymentExist || (getRemissionByFeeCode(fee.code)?.hwf_amount === 0 || !getRemissionByFeeCode(fee.code)?.hwf_amount)) && !isTurnOff\">\n\n\n <a (click)=\"confirmRemoveFee(fee.id)\" *ngIf=\"(!isPaymentExist || !fee.remissions)\" [ngClass]='isPaymentExist || fee.remissions? \"disable-link\" : \"\"' href=\"javascript:void(0)\"> <br>Remove</a>\n </span>\n\n <span class=\"no-border\" *ngIf=\"(!isPaymentExist || (getRemissionByFeeCode(fee.code)?.hwf_amount === 0 || !getRemissionByFeeCode(fee.code)?.hwf_amount)) && isTurnOff \">\n <a (click)=\"confirmRemoveFee(fee.id)\" href=\"javascript:void(0)\">Remove</a>\n </span>\n\n <a (click)=\"addRemission(fee)\" class=\"remissionActive\" *ngIf=\"(getRemissionByFeeCode(fee.code)?.hwf_amount === 0 || !getRemissionByFeeCode(fee.code)?.hwf_amount) && !isPaymentExist && !isTurnOff\" href=\"javascript:void(0)\">\n Add help with fees or remission\n </a>\n <a (click)=\"addRemission(fee)\" class=\"remissionActive\" *ngIf=\"(getRemissionByFeeCode(fee.code)?.hwf_amount === 0 || !getRemissionByFeeCode(fee.code)?.hwf_amount) && isTurnOff\" href=\"javascript:void(0)\">\n Add help with fees or remission\n </a>\n <span *ngIf = \"getRemissionByFeeCode(fee.code)?.hwf_amount > 0\">\n <br>\n <div class=\"govuk-table__cell_border\" *ngIf = \"getRemissionByFeeCode(fee.code)?.hwf_amount > 0\">Remission,{{ getRemissionByFeeCode(fee.code)?.hwf_reference }}</div>\n </span>\n </td>\n\n <td class=\"govuk-table__cell\" *ngIf=\"fee.volume && fee.volume > 0\">\n {{ fee.volume }}\n <span *ngIf = \"getRemissionByFeeCode(fee.code)?.hwf_amount > 0\">\n <br>\n <div class=\"govuk-table__cell_border\">1</div>\n </span>\n </td>\n\n <td class=\"govuk-table__cell alignright\">\n <br>\n <div *ngIf = \"getRemissionByFeeCode(fee.code)?.hwf_amount > 0\" class=\"govuk-table__cell_border\"> <br><br></div>\n </td>\n <td class=\"govuk-table__cell alignright\" >\n {{ fee.calculated_amount | currency:'GBP':'symbol-narrow':'1.2-2' }}\n <span *ngIf = \"getRemissionByFeeCode(fee.code)?.hwf_amount > 0\">\n <br>\n <div class=\"govuk-table__cell_rmborder alignright\">\n -{{ getRemissionByFeeCode(fee.code)?.hwf_amount? ( getRemissionByFeeCode(fee.code)?.hwf_amount | currency:'GBP':'symbol-narrow':'1.2-2') : '-' }}\n </div>\n </span>\n </td>\n\n\n </tr>\n <!-- <tr>\n <td *ngIf = \"getRemissionByFeeCode(fee.code)?.hwf_amount > 0\">\n <br>\n <div class=\"govuk-table__cell_border\" *ngIf = \"getRemissionByFeeCode(fee.code)?.hwf_amount > 0\">Remission,{{ getRemissionByFeeCode(fee.code)?.hwf_reference }}</div>\n </td>\n <td *ngIf = \"getRemissionByFeeCode(fee.code)?.hwf_amount ===''\">\n <div class=\"govuk-table__cell_border\"></div>\n </td>\n <td *ngIf = \"getRemissionByFeeCode(fee.code)?.hwf_amount === ''\">\n <br>\n <div class=\"govuk-table__cell_border\" *ngIf = \"getRemissionByFeeCode(fee.code)?.hwf_amount === ''\"></div>\n </td>\n <td>\n <br>\n <div class=\"govuk-table__cell_border\" style=\"text-align: right;\">\n -{{ getRemissionByFeeCode(fee.code)?.hwf_amount? ( getRemissionByFeeCode(fee.code)?.hwf_amount | currency:'GBP':'symbol-narrow':'1.2-2') : '-' }}\n </div>\n </td>\n </tr> -->\n </tbody>\n </table>\n </div>\n <div class=\"addfee govuk-!-margin-top-5\">\n <div class=\"total-to-pay\">\n <p class=\"govuk-!-margin-top-2\">Total to pay: {{ outStandingAmount | currency:'GBP':'symbol-narrow':'1.2-2'}}</p>\n </div>\n <div class=\"add-fee-button\">\n <button *ngIf=\"!isTurnOff\" (click)=\"redirectToFeeSearchPage($event,'summary')\"\n [disabled]=\"isPaymentExist\"\n [ngClass]='isPaymentExist ? \"govuk-button govuk-button--secondary button--disabled\" : \"govuk-button govuk-button--secondary\"'>\n Add fee\n </button>\n </div>\n <a *ngIf=\"isTurnOff\" (click)=\"redirectToFeeSearchPage($event,'summary')\" class=\"govuk-button govuk-button--secondary add-fee-button\" href=\"javascript:void(0)\">Add a new fee</a>\n </div>\n<!--\n <div class=\"govuk-form-group govuk-form-group--mg\" *ngIf=\"!bsPaymentDcnNumber\">\n <label class=\"govuk-label custom-govuk-label govuk-fieldset__heading--fz\" for=\"responsibleOffice\">\n <strong>What service is this fee for?</strong>\n </label>\n <select class=\"govuk-select govuk-select--custom\" id=\"responsibleOffice\" [(ngModel)]=\"service\" name=\"responsibleOffice\">\n <option value=\"\" selected='selected'>Please select</option>\n <option value=\"AA07\">Divorce</option>\n <option value=\"AA09\">Financial Remedy</option>\n <option value=\"AA08\">Probate</option>\n </select>\n </div> -->\n\n <div>\n <button *ngIf=\"!bsPaymentDcnNumber\" type=\"submit\" (click)=\"takePayment()\"\n [disabled]=\"totalFee <= 0 || isConfirmationBtnDisabled\"\n [ngClass]='totalFee <= 0 || !platForm || !service || isConfirmationBtnDisabled? \"button button--disabled govuk-!-margin-right-1\" : \"button govuk-!-margin-right-1\"'>\n Take payment\n </button>\n <button *ngIf=\"bsPaymentDcnNumber\" type=\"button\" (click)=\"goToAllocatePage(outStandingAmount, isFeeAmountZero)\" class=\"button govuk-!-margin-right-1\">\n <span *ngIf=\"outStandingAmount > 0 || (isFeeAmountZero && outStandingAmount === 0)\">\n Allocate payment\n </span>\n <span *ngIf=\"outStandingAmount < 0 || (!isFeeAmountZero && outStandingAmount === 0)\">\n Continue\n </span>\n </button>\n </div>\n\n</main>\n</div>\n\n <ng-container *ngIf=\"viewStatus === 'feeRemovalConfirmation'\">\n <input #myInput type='hidden' class='iFrameDrivenImageValue' value='FEEREMOVALCONFIRMATION_1'>\n <div class=\"govuk-warning-text\">\n <h1 class=\"govuk-heading-l\">Case reference:{{ccdCaseNumber | ccdHyphens}}</h1>\n <span class=\"govuk-warning-text__icon\" aria-hidden=\"true\">!</span>\n <strong class=\"govuk-warning-text__text\">\n <span class=\"govuk-warning-text__assistive\">Warning</span>\n Are you sure you want to delete this fee?\n </strong>\n </div>\n <div class=\"govuk-button-grb\">\n <form novalidate>\n <button type=\"submit\" class=\"button govuk-button--secondary\" (click)=\"cancelRemission()\">\n Cancel\n </button>\n <button type=\"submit\" class=\"button\"\n *ngIf =\"!isRemoveBtnDisabled\"\n [ngClass]='isRemoveBtnDisabled ? \"button button--disabled govuk-!-margin-right-1\" : \"button govuk-!-margin-right-1\"'\n (click)=\"removeFee(currentFee)\">\n Remove\n </button>\n </form>\n </div>\n </ng-container>\n<ccpay-add-remission *ngIf=\"viewStatus === 'add_remission' && currentFee\"\n [isTurnOff]=\"isTurnOff\"\n [isStrategicFixEnable]=\"isStrategicFixEnable\"\n [fee]=\"currentFee\"\n [caseType]=\"caseType\"\n [ccdCaseNumber]=\"ccdCaseNumber\"\n [paymentGroupRef]=\"paymentGroupRef\"\n (cancelRemission)=\"cancelRemission()\"></ccpay-add-remission>\n <input *ngIf=\"viewStatus === 'payhub_view' && payhubHtml\" #myInput type='hidden' class='iFrameDrivenImageValue' value='PCIPAL'>\n",
2598
- styles: [".fee-summary{position:relative}.fee-summary .grey-text{color:#6b7376;font-weight:500}.fee-summary .govuk-table{margin-bottom:0}.fee-summary .no-border{border:none}.fee-summary table td,.fee-summary table th{font-size:19px;vertical-align:top}.fee-summary table td .no-padding,.fee-summary table th .no-padding{padding:0}.fee-summary table td .subcolumn-1,.fee-summary table th .subcolumn-1{width:45%}.fee-summary table td .subcolumn-2,.fee-summary table th .subcolumn-2{width:25%;text-align:right}.fee-summary table td .subcolumn-3,.fee-summary table th .subcolumn-3{width:30%;text-align:center}table th{font-weight:700}.govuk-button-grb{padding-bottom:20px}.govuk-button-grb .govuk-button--secondary{background-color:#dee0e2;box-shadow:0 2px 0 #858688;color:#0b0c0c;margin-right:10px}.govuk-form-group--mg{margin-top:10px!important}.govuk-fieldset__heading--fz{font-size:16px}.remissionDisable{color:grey;cursor:default}.heading-xlarge{margin:0 0 14px -20px}.govuk-select--custom{width:50%}.disable-link{cursor:default;pointer-events:none;color:#8e8c8c}.govuk-table__cell_border,.govuk-table__header{padding:10px 0 0;border-top:1px solid #bfc1c3;text-align:left}.govuk-table__cell,.govuk-table__header{padding:10px 0}.govuk-table__cell_rmborder,.govuk-table__header{padding:10px 0 0;border-top:1px solid #bfc1c3;text-align:left}.govuk-table__fessheader{font-weight:700}.govuk-button{font-size:19px}.feeAddButton{position:absolute;right:0}.remissionActive{padding-left:10px}.paddigleft{padding-left:2em}.govuk-warning-text__text{font-size:19px}.summaryheader{display:flex;flex-direction:row;justify-content:space-between;position:relative}.heading-large{position:absolute;left:0}.class600{width:600px}.class60{width:60px}.class80{width:80px;text-align:right}.class100{width:100px}.alignright,.class100{text-align:right}.caseref{position:absolute;right:0}.addfee{position:relative;border:5px solid transparent}.total-to-pay{position:absolute;right:0}a:focus{background-color:#fd0;outline:2px solid #fd0}button:focus{outline:3.5px solid #fd0}.govuk-warning-text__icon{margin-top:8px}@media screen and (max-width:640px){.add-fee-button{margin-top:80px}.total-to-pay{position:absolute;top:0}}"]
3176
+ template: "\n<div class=\"govuk-breadcrumbs\" *ngIf=\"isBackButtonEnable\">\n <ol class=\"govuk-breadcrumbs__list\">\n <li class=\"govuk-breadcrumbs__list-item\" *ngIf=\"!isTurnOff\">\n <a (click)=\"loadCaseTransactionPage()\" class=\"govuk-back-link govuk-label\">Back</a>\n </li>\n <li class=\"govuk-breadcrumbs__list-item\" *ngIf=\"isTurnOff\">\n <a (click)=\"redirectToFeeSearchPage($event,'summary')\" class=\"govuk-back-link govuk-label\">Back</a>\n </li>\n </ol>\n</div>\n<div class=\"fee-summary\" *ngIf=\"viewStatus === 'main'\">\n <main class=\"govuk-main-wrapper\">\n <input #myInput type='hidden' class='iFrameDrivenImageValue' value='FEESUMMARY'>\n <div class=\"summaryheader\">\n <h1 class=\"heading-large govuk-!-margin-top-3 govuk-!-margin-bottom-4\">Summary </h1>\n <p class=\"govuk-!-margin-top-5 caseref\">Case reference:{{ccdCaseNumber | ccdHyphens}}</p>\n </div>\n\n <!-- <div class=\"govuk-grid-row\">\n <div class=\"govuk-grid-column-two-thirds\">\n <h1 class=\"heading-xlarge\">Fee Summary</h1>\n </div>\n\n\n \u00A0<div\u00A0class=\"govuk-grid-column-one-third\"\u00A0align=\"right\">\n \u00A0\u00A0\u00A0\u00A0\u00A0\u00A0<button\u00A0 *ngIf=\"!isTurnOff\" (click)=\"redirectToFeeSearchPage($event,'summary')\"\n \u00A0\u00A0\u00A0\u00A0\u00A0\u00A0[disabled]=\"isPaymentExist\"\n \u00A0\u00A0\u00A0\u00A0\u00A0\u00A0[ngClass]='isPaymentExist ?\u00A0\"button\u00A0button--disabled govuk-!-margin-right-1\"\u00A0:\u00A0\"button govuk-!-margin-right-1\"'>\n Add a new fee\n </button>\n\n <a *ngIf=\"isTurnOff\" (click)=\"redirectToFeeSearchPage($event,'summary')\" class=\"button\">Add a new fee</a>\n </div>\n </div> -->\n\n\n <div *ngIf=\"errorMessage\">\n <div class=\"error-summary\" role=\"group\" aria-labelledby=\"failure-error-summary-heading\" tabindex=\"-1\">\n <h2 class=\"heading-medium error-summary-heading\" id=\"failure-error-summary-heading\">\n Payment Group details could not be retrieved\n </h2>\n <div class=\"govuk-error-summary__body\">\n {{ errorMessage }}\n </div>\n </div>\n </div>\n\n <div class=\"govuk-!-margin-top-3\">\n <table class=\"govuk-table govuk-!-margin-bottom-2\" *ngIf=\"!errorMessage && paymentGroup\">\n <thead class=\"govuk-table__head\">\n <tr class=\"govuk-table__row\">\n <th class=\"govuk-table__header\" scope=\"col\" class=\"class600\">Description</th>\n <th class=\"govuk-table__header\" scope=\"col\" class=\"class60\">Quantity</th>\n <th class=\"govuk-table__header\" scope=\"col\" class=\"class80\"></th>\n <th class=\"govuk-table__header\" scope=\"col\" class=\"class100\">Amount</th>\n </tr>\n </thead>\n\n <tbody class=\"govuk-table__body\" *ngIf=\"paymentGroup.fees\">\n <tr class=\"govuk-table__row\" *ngFor=\"let fee of paymentGroup.fees; let i = index;\">\n <td class=\"govuk-table__cell\">{{ fee.description }}\n\n <span class=\"no-border\" *ngIf=\"(isPaymentExist || (getRemissionByFeeCode(fee.code)?.hwf_amount === 0 || !getRemissionByFeeCode(fee.code)?.hwf_amount)) && !isTurnOff\">\n\n\n <a (click)=\"confirmRemoveFee(fee.id)\" *ngIf=\"(!isPaymentExist || !fee.remissions)\" [ngClass]='isPaymentExist || fee.remissions? \"disable-link\" : \"\"'> <br>Remove</a>\n </span>\n\n <span class=\"no-border\" *ngIf=\"(!isPaymentExist || (getRemissionByFeeCode(fee.code)?.hwf_amount === 0 || !getRemissionByFeeCode(fee.code)?.hwf_amount)) && isTurnOff \">\n <a (click)=\"confirmRemoveFee(fee.id)\">Remove</a>\n </span>\n\n <a (click)=\"addRemission(fee)\" class=\"remissionActive\" *ngIf=\"(getRemissionByFeeCode(fee.code)?.hwf_amount === 0 || !getRemissionByFeeCode(fee.code)?.hwf_amount) && !isPaymentExist && !isTurnOff\">\n Add help with fees or remission\n </a>\n <a (click)=\"addRemission(fee)\" class=\"remissionActive\" *ngIf=\"(getRemissionByFeeCode(fee.code)?.hwf_amount === 0 || !getRemissionByFeeCode(fee.code)?.hwf_amount) && isTurnOff\">\n Add help with fees or remission\n </a>\n <span *ngIf = \"getRemissionByFeeCode(fee.code)?.hwf_amount > 0\">\n <br>\n <div class=\"govuk-table__cell_border\" *ngIf = \"getRemissionByFeeCode(fee.code)?.hwf_amount > 0\">Remission,{{ getRemissionByFeeCode(fee.code)?.hwf_reference }}</div>\n </span>\n </td>\n\n <td class=\"govuk-table__cell\" *ngIf=\"fee.volume && fee.volume > 0\">\n {{ fee.volume }}\n <span *ngIf = \"getRemissionByFeeCode(fee.code)?.hwf_amount > 0\">\n <br>\n <div class=\"govuk-table__cell_border\">1</div>\n </span>\n </td>\n\n <td class=\"govuk-table__cell alignright\">\n <br>\n <div *ngIf = \"getRemissionByFeeCode(fee.code)?.hwf_amount > 0\" class=\"govuk-table__cell_border\"> <br><br></div>\n </td>\n <td class=\"govuk-table__cell alignright\" >\n {{ fee.calculated_amount | currency:'GBP':'symbol-narrow':'1.2-2' }}\n <span *ngIf = \"getRemissionByFeeCode(fee.code)?.hwf_amount > 0\">\n <br>\n <div class=\"govuk-table__cell_rmborder alignright\">\n -{{ getRemissionByFeeCode(fee.code)?.hwf_amount? ( getRemissionByFeeCode(fee.code)?.hwf_amount | currency:'GBP':'symbol-narrow':'1.2-2') : '-' }}\n </div>\n </span>\n </td>\n\n\n </tr>\n <!-- <tr>\n <td *ngIf = \"getRemissionByFeeCode(fee.code)?.hwf_amount > 0\">\n <br>\n <div class=\"govuk-table__cell_border\" *ngIf = \"getRemissionByFeeCode(fee.code)?.hwf_amount > 0\">Remission,{{ getRemissionByFeeCode(fee.code)?.hwf_reference }}</div>\n </td>\n <td *ngIf = \"getRemissionByFeeCode(fee.code)?.hwf_amount ===''\">\n <div class=\"govuk-table__cell_border\"></div>\n </td>\n <td *ngIf = \"getRemissionByFeeCode(fee.code)?.hwf_amount === ''\">\n <br>\n <div class=\"govuk-table__cell_border\" *ngIf = \"getRemissionByFeeCode(fee.code)?.hwf_amount === ''\"></div>\n </td>\n <td>\n <br>\n <div class=\"govuk-table__cell_border\" style=\"text-align: right;\">\n -{{ getRemissionByFeeCode(fee.code)?.hwf_amount? ( getRemissionByFeeCode(fee.code)?.hwf_amount | currency:'GBP':'symbol-narrow':'1.2-2') : '-' }}\n </div>\n </td>\n </tr> -->\n </tbody>\n </table>\n </div>\n <div class=\"addfee\">\n <button *ngIf=\"!isTurnOff\" (click)=\"redirectToFeeSearchPage($event,'summary')\"\n [disabled]=\"isPaymentExist\"\n [ngClass]='isPaymentExist ? \"govuk-button govuk-button--secondary button--disabled\" : \"govuk-button govuk-button--secondary\"'>\n Add fee\n </button>\n <a *ngIf=\"isTurnOff\" (click)=\"redirectToFeeSearchPage($event,'summary')\" class=\"govuk-button govuk-button--secondary\">Add a new fee</a>\n <div class=\"feeAddButton\">\n <p class=\"paddigleft govuk-!-margin-top-2\">Total to pay: {{ outStandingAmount | currency:'GBP':'symbol-narrow':'1.2-2'}}</p>\n </div>\n </div>\n<!--\n <div class=\"govuk-form-group govuk-form-group--mg\" *ngIf=\"!bsPaymentDcnNumber\">\n <label class=\"govuk-label custom-govuk-label govuk-fieldset__heading--fz\" for=\"responsibleOffice\">\n <strong>What service is this fee for?</strong>\n </label>\n <select class=\"govuk-select govuk-select--custom\" id=\"responsibleOffice\" [(ngModel)]=\"service\" name=\"responsibleOffice\">\n <option value=\"\" selected='selected'>Please select</option>\n <option value=\"AA07\">Divorce</option>\n <option value=\"AA09\">Financial Remedy</option>\n <option value=\"AA08\">Probate</option>\n </select>\n </div> -->\n\n <div>\n <button *ngIf=\"!bsPaymentDcnNumber\" type=\"submit\" (click)=\"takePayment()\"\n [disabled]=\"totalFee <= 0 || isConfirmationBtnDisabled\"\n [ngClass]='totalFee <= 0 || !platForm || !service || isConfirmationBtnDisabled? \"button button--disabled govuk-!-margin-right-1\" : \"button govuk-!-margin-right-1\"'>\n Take payment\n </button>\n <button *ngIf=\"bsPaymentDcnNumber\" type=\"button\" (click)=\"goToAllocatePage(outStandingAmount, isFeeAmountZero)\" class=\"button govuk-!-margin-right-1\">\n <span *ngIf=\"outStandingAmount > 0 || (isFeeAmountZero && outStandingAmount === 0)\">\n Allocate payment\n </span>\n <span *ngIf=\"outStandingAmount < 0 || (!isFeeAmountZero && outStandingAmount === 0)\">\n Continue\n </span>\n </button>\n </div>\n\n</main>\n</div>\n\n <ng-container *ngIf=\"viewStatus === 'feeRemovalConfirmation'\">\n <input #myInput type='hidden' class='iFrameDrivenImageValue' value='FEEREMOVALCONFIRMATION_1'>\n <div class=\"govuk-warning-text\">\n <span class=\"govuk-warning-text__icon\" aria-hidden=\"true\">!</span>\n <strong class=\"govuk-warning-text__text\">\n <span class=\"govuk-warning-text__assistive\">Warning</span>\n Are you sure you want to delete this fee?\n </strong>\n </div>\n <div class=\"govuk-button-grb\">\n <form novalidate>\n <button type=\"submit\" class=\"button govuk-button--secondary\" (click)=\"cancelRemission()\">\n Cancel\n </button>\n <button type=\"submit\" class=\"button\"\n *ngIf =\"!isRemoveBtnDisabled\"\n [ngClass]='isRemoveBtnDisabled ? \"button button--disabled govuk-!-margin-right-1\" : \"button govuk-!-margin-right-1\"'\n (click)=\"removeFee(currentFee)\">\n Remove\n </button>\n </form>\n </div>\n </ng-container>\n<ccpay-add-remission *ngIf=\"viewStatus === 'add_remission' && currentFee\"\n [isTurnOff]=\"isTurnOff\"\n [isStrategicFixEnable]=\"isStrategicFixEnable\"\n [fee]=\"currentFee\"\n [caseType]=\"caseType\"\n [ccdCaseNumber]=\"ccdCaseNumber\"\n [paymentGroupRef]=\"paymentGroupRef\"\n (cancelRemission)=\"cancelRemission()\"></ccpay-add-remission>\n <input *ngIf=\"viewStatus === 'payhub_view' && payhubHtml\" #myInput type='hidden' class='iFrameDrivenImageValue' value='PCIPAL'>\n",
3177
+ styles: [".fee-summary .grey-text{color:#6b7376;font-weight:500}.fee-summary .govuk-table{margin-bottom:0}.fee-summary .no-border{border:none}.fee-summary table td,.fee-summary table th{font-size:19px;vertical-align:top}.fee-summary table td .no-padding,.fee-summary table th .no-padding{padding:0}.fee-summary table td .subcolumn-1,.fee-summary table th .subcolumn-1{width:45%}.fee-summary table td .subcolumn-2,.fee-summary table th .subcolumn-2{width:25%;text-align:right}.fee-summary table td .subcolumn-3,.fee-summary table th .subcolumn-3{width:30%;text-align:center}table th{font-weight:700}.govuk-button-grb{padding-bottom:20px}.govuk-button-grb .govuk-button--secondary{background-color:#dee0e2;box-shadow:0 2px 0 #858688;color:#0b0c0c;margin-right:10px}.govuk-form-group--mg{margin-top:10px!important}.govuk-fieldset__heading--fz{font-size:16px}.remissionDisable{color:grey;cursor:default}.heading-xlarge{margin:0 0 14px -20px}.govuk-select--custom{width:50%}.disable-link{cursor:default;pointer-events:none;color:#8e8c8c}.govuk-table__cell_border,.govuk-table__header{padding:10px 0 0;border-top:1px solid #bfc1c3;text-align:left}.govuk-table__cell,.govuk-table__header{padding:10px 0}.govuk-table__cell_rmborder,.govuk-table__header{padding:10px 0 0;border-top:1px solid #bfc1c3;text-align:left}.govuk-table__fessheader{font-weight:700}.govuk-button{font-size:19px}.feeAddButton{padding-left:65rem}.remissionActive{padding-left:10px}.paddigleft{padding-left:2em}.govuk-back-link{font-size:1.5rem!important}.govuk-warning-text__text{font-size:19px}.summaryheader{display:flex;flex-direction:row;justify-content:space-between;width:960px}.class600{width:600px}.class60{width:60px}.class80{width:80px;text-align:right}.class100{width:100px}.alignright,.class100{text-align:right}.caseref{align-self:flex-end}.addfee{display:flex;flex-direction:row}"]
2599
3178
  },] }
2600
3179
  ];
2601
3180
  FeeSummaryComponent.ctorParameters = () => [
@@ -2832,7 +3411,7 @@ class MarkUnidentifiedPaymentComponent {
2832
3411
  MarkUnidentifiedPaymentComponent.decorators = [
2833
3412
  { type: Component, args: [{
2834
3413
  selector: 'app-mark-unidentified-payment',
2835
- template: "<div class=\"mkpay-unidentified\" >\n <div *ngIf=\"viewStatus === 'mainForm'\">\n <input #myInput type='hidden' class='iFrameDrivenImageValue' value='MARKUNIDENTIFIED'>\n <h1 class=\"heading-large\">Mark payment as unidentified</h1>\n\n <div class=\"govuk-grid-column-full govuk-!-padding-bottom-3\">\n <hr class=\"govuk-section-break govuk-section-break--visible\">\n <table class=\"govuk-table\">\n <thead class=\"govuk-table__head\">\n <tr class=\"govuk-table__row\">\n <th class=\"govuk-table__header\" scope=\"col\">Payment asset number (DCN)</th>\n <th class=\"govuk-table__header\" scope=\"col\">Banked date</th>\n <th class=\"govuk-table__header\" scope=\"col\">Amount</th>\n <th class=\"govuk-table__header\" scope=\"col\">Method</th>\n \n </tr>\n </thead>\n <tbody class=\"govuk-table__body\">\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__cell\">{{unassignedRecord.dcn_reference}}</td>\n <td class=\"govuk-table__cell\"> {{unassignedRecord.date_banked | date:'dd MMM yyyy'}}</td>\n <td class=\"govuk-table__cell\"> {{unassignedRecord.amount | currency :'GBP':'symbol':'1.2-2'}}</td>\n <td class=\"capitalize govuk-table__cell\"> {{trimUnderscore(unassignedRecord.payment_method) | lowercase}} </td>\n </tr>\n </tbody>\n </table>\n </div>\n <form [formGroup]=\"markPaymentUnidentifiedForm\" novalidate>\n <div class=\"govuk-form-group\">\n <p class=\"unidentifiedSubText\">\n Give a reason for marking this payment as unidentified.\n <br/>\n Include any investigations you've made.\n </p>\n <label class=\"heading-small\" for=\"investicationDetail\">\n\n </label>\n <textarea class=\"form-control form-control-3-4\" [ngClass]=\"{'inline-error-class': isInvesticationDetailEmpty || investicationDetailHasError || investicationDetailMinHasError || investicationDetailMaxHasError}\" name=\"investicationDetail\" id=\"investicationDetail\" rows=\"5\" formControlName=\"investicationDetail\">\n </textarea>\n <p class=\"inline-error-message\" *ngIf=\"isInvesticationDetailEmpty || investicationDetailHasError || investicationDetailMinHasError || investicationDetailMaxHasError\">\n <span *ngIf=\"isInvesticationDetailEmpty\">Enter a reason for marking this payment as unidentified.</span>\n <span *ngIf=\"investicationDetailHasError\">Enter a vaild reason</span>\n <span *ngIf=\"investicationDetailMinHasError\">Reason should be at least 3 characters.</span>\n <span *ngIf=\"investicationDetailMaxHasError\">Reason should be 255 characters or under.</span>\n </p>\n </div>\n <div class=\"govuk-button--group\">\n <button type=\"submit\" class=\"button\" (click)=\"saveAndContinue()\">\n Continue\n </button>\n <button type=\"button\" class=\"button govuk-button--secondary\" (click)=\"cancelMarkUnidentifiedPayments('cancel')\">\n Cancel\n </button>\n </div>\n </form>\n </div>\n <ng-container *ngIf=\"viewStatus === 'unidentifiedContinueConfirm'\">\n <ccpay-error-banner *ngIf=\"errorMessage.showError\" [errorMessage]=\"errorMessage\"></ccpay-error-banner>\n <input #myInput type='hidden' class='iFrameDrivenImageValue' value='UNIDENTIFIEDCONFIRMATION'>\n <div class=\"govuk-warning-text\">\n <span class=\"govuk-warning-text__icon\" aria-hidden=\"true\">!</span>\n <strong class=\"govuk-warning-text__text\">\n <span class=\"govuk-warning-text__assistive\">Warning</span>\n <h1 class=\"heading-small\"> Are you sure you want to mark this payment as unidentified? </h1>\n \n </strong>\n\n <div class=\"govuk-grid-column-full govuk-!-padding-bottom-3\">\n <hr class=\"govuk-section-break govuk-section-break--visible\">\n <table class=\"govuk-table\">\n <thead class=\"govuk-table__head\">\n <tr class=\"govuk-table__row\">\n <th class=\"govuk-table__header\" scope=\"col\">Investigations</th>\n </tr>\n </thead>\n <tbody class=\"govuk-table__body\">\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__cell\">{{investigationComment}}</td>\n </tr>\n </tbody>\n </table>\n </div>\n\n </div>\n <div class=\"govuk-button--group\">\n <button type=\"submit\" class=\"button\" [disabled]=\"isConfirmButtondisabled\" (click)=\"confirmPayments()\">\n Confirm\n </button>\n <button type=\"button\" class=\"button govuk-button--secondary\" (click)=\"cancelMarkUnidentifiedPayments()\">\n Cancel\n </button>\n </div>\n </ng-container>\n <ng-container *ngIf=\"viewStatus === 'unidentifiedCancelConfirm'\">\n <input #myInput type='hidden' class='iFrameDrivenImageValue' value='CANCELUNIDENTIFIED'>\n <div class=\"govuk-warning-text\">\n <span class=\"govuk-warning-text__icon\" aria-hidden=\"true\">!</span>\n <strong class=\"govuk-warning-text__text\">\n <span class=\"govuk-warning-text__assistive\">Warning</span>\n Are you sure you want to cancel?\n </strong>\n </div>\n <div class=\"govuk-button--group\">\n <button type=\"submit\" class=\"button\" (click)=\"gotoCasetransationPage()\">\n Yes\n </button>\n <button type=\"button\" class=\"button govuk-button--secondary\" (click)=\"cancelMarkUnidentifiedPayments()\">\n No\n </button>\n </div>\n </ng-container>\n</div>\n",
3414
+ template: "<div class=\"mkpay-unidentified\" >\n <div *ngIf=\"viewStatus === 'mainForm'\">\n <input #myInput type='hidden' class='iFrameDrivenImageValue' value='MARKUNIDENTIFIED'>\n <h1 class=\"heading-large\">Mark payment as unidentified</h1>\n\n <div class=\"govuk-grid-column-full govuk-!-padding-bottom-3\">\n <hr class=\"govuk-section-break govuk-section-break--visible\">\n <table class=\"govuk-table\">\n <thead class=\"govuk-table__head\">\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__header\" scope=\"col\">Payment asset number (DCN)</td>\n <td class=\"govuk-table__header\" scope=\"col\">Banked date</td>\n <td class=\"govuk-table__header\" scope=\"col\">Amount</td>\n <td class=\"govuk-table__header\" scope=\"col\">Method</td>\n \n </tr>\n </thead>\n <tbody class=\"govuk-table__body\">\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__cell\">{{unassignedRecord.dcn_reference}}</td>\n <td class=\"govuk-table__cell\"> {{unassignedRecord.date_banked | date:'dd MMM yyyy'}}</td>\n <td class=\"govuk-table__cell\"> {{unassignedRecord.amount | currency :'GBP':'symbol':'1.2-2'}}</td>\n <td class=\"capitalize govuk-table__cell\"> {{trimUnderscore(unassignedRecord.payment_method) | lowercase}} </td>\n </tr>\n </tbody>\n </table>\n </div>\n <form [formGroup]=\"markPaymentUnidentifiedForm\" novalidate>\n <div class=\"govuk-form-group\">\n <p class=\"unidentifiedSubText\">\n Give a reason for marking this payment as unidentified.\n <br/>\n Include any investigations you've made.\n </p>\n <label class=\"heading-small\" for=\"investicationDetail\">\n\n </label>\n <textarea class=\"form-control form-control-3-4\" [ngClass]=\"{'inline-error-class': isInvesticationDetailEmpty || investicationDetailHasError || investicationDetailMinHasError || investicationDetailMaxHasError}\" name=\"investicationDetail\" id=\"investicationDetail\" rows=\"5\" formControlName=\"investicationDetail\">\n </textarea>\n <p class=\"inline-error-message\" *ngIf=\"isInvesticationDetailEmpty || investicationDetailHasError || investicationDetailMinHasError || investicationDetailMaxHasError\">\n <span *ngIf=\"isInvesticationDetailEmpty\">Enter a reason for marking this payment as unidentified.</span>\n <span *ngIf=\"investicationDetailHasError\">Enter a vaild reason</span>\n <span *ngIf=\"investicationDetailMinHasError\">Reason should be at least 3 characters.</span>\n <span *ngIf=\"investicationDetailMaxHasError\">Reason should be 255 characters or under.</span>\n </p>\n </div>\n <div class=\"govuk-button--group\">\n <button type=\"submit\" class=\"button\" (click)=\"saveAndContinue()\">\n Continue\n </button>\n <button type=\"button\" class=\"button govuk-button--secondary\" (click)=\"cancelMarkUnidentifiedPayments('cancel')\">\n Cancel\n </button>\n </div>\n </form>\n </div>\n <ng-container *ngIf=\"viewStatus === 'unidentifiedContinueConfirm'\">\n <ccpay-error-banner *ngIf=\"errorMessage.showError\" [errorMessage]=\"errorMessage\"></ccpay-error-banner>\n <input #myInput type='hidden' class='iFrameDrivenImageValue' value='UNIDENTIFIEDCONFIRMATION'>\n <div class=\"govuk-warning-text\">\n <span class=\"govuk-warning-text__icon\" aria-hidden=\"true\">!</span>\n <strong class=\"govuk-warning-text__text\">\n <span class=\"govuk-warning-text__assistive\">Warning</span>\n <h1 class=\"heading-small\"> Are you sure you want to mark this payment as unidentified? </h1>\n \n </strong>\n\n <div class=\"govuk-grid-column-full govuk-!-padding-bottom-3\">\n <hr class=\"govuk-section-break govuk-section-break--visible\">\n <table class=\"govuk-table\">\n <thead class=\"govuk-table__head\">\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__header\" scope=\"col\">Investigations</td>\n </tr>\n </thead>\n <tbody class=\"govuk-table__body\">\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__cell\">{{investigationComment}}</td>\n </tr>\n </tbody>\n </table>\n </div>\n\n </div>\n <div class=\"govuk-button--group\">\n <button type=\"submit\" class=\"button\" [disabled]=\"isConfirmButtondisabled\" (click)=\"confirmPayments()\">\n Confirm\n </button>\n <button type=\"button\" class=\"button govuk-button--secondary\" (click)=\"cancelMarkUnidentifiedPayments()\">\n Cancel\n </button>\n </div>\n </ng-container>\n <ng-container *ngIf=\"viewStatus === 'unidentifiedCancelConfirm'\">\n <input #myInput type='hidden' class='iFrameDrivenImageValue' value='CANCELUNIDENTIFIED'>\n <div class=\"govuk-warning-text\">\n <span class=\"govuk-warning-text__icon\" aria-hidden=\"true\">!</span>\n <strong class=\"govuk-warning-text__text\">\n <span class=\"govuk-warning-text__assistive\">Warning</span>\n Are you sure you want to cancel?\n </strong>\n </div>\n <div class=\"govuk-button--group\">\n <button type=\"submit\" class=\"button\" (click)=\"gotoCasetransationPage()\">\n Yes\n </button>\n <button type=\"button\" class=\"button govuk-button--secondary\" (click)=\"cancelMarkUnidentifiedPayments()\">\n No\n </button>\n </div>\n </ng-container>\n</div>\n",
2836
3415
  styles: [".mkpay-unidentified{margin:10px 0 20px}.mkpay-unidentified .govuk-button--group .govuk-button--secondary{margin-left:10px;background-color:rgba(179,184,189,.9490196078431372)}.mkpay-unidentified .inline-error-class{outline:3px solid #a71414;outline-offset:0}.mkpay-unidentified .inline-error-message{color:#a71414;font-weight:700;margin-top:10px}.govuk-grid-column-full{padding:0}.unidentifiedSubText{line-height:45px}.govuk-warning-text__text{font-size:19px}.lowercase{text-transform:lowercase}.capitalize{text-transform:capitalize}"]
2837
3416
  },] }
2838
3417
  ];
@@ -3078,7 +3657,7 @@ class MarkUnsolicitedPaymentComponent {
3078
3657
  MarkUnsolicitedPaymentComponent.decorators = [
3079
3658
  { type: Component, args: [{
3080
3659
  selector: 'app-mark-unsolicited-payment',
3081
- template: "<div class=\"mkpay-unidentified\">\n <div *ngIf=\"viewStatus === 'mainForm'\">\n <ccpay-error-banner *ngIf=\"errorMessage.showError\" [errorMessage]=\"errorMessage\"></ccpay-error-banner>\n <h1 class=\"heading-large\">Mark payment as transferred</h1>\n <div class=\"govuk-grid-column-full govuk-!-padding-bottom-3\">\n <hr class=\"govuk-section-break govuk-section-break--visible\">\n <table class=\"govuk-table\">\n <thead class=\"govuk-table__head\">\n <tr class=\"govuk-table__row\">\n <th class=\"govuk-table__header\" scope=\"col\">Payment asset number (DCN)</th>\n <th class=\"govuk-table__header\" scope=\"col\">Banked date</th>\n <th class=\"govuk-table__header\" scope=\"col\">Amount</th>\n <th class=\"govuk-table__header\" scope=\"col\">Method</th>\n </tr>\n </thead>\n <tbody class=\"govuk-table__body\">\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__cell\">{{unassignedRecord.dcn_reference}}</td>\n <td class=\"govuk-table__cell\"> {{unassignedRecord.date_banked | date:'dd MMM yyyy'}}</td>\n <td class=\"govuk-table__cell\"> {{unassignedRecord.amount | currency :'GBP':'symbol':'1.2-2'}}</td>\n <td class=\"capitalize govuk-table__cell\"> {{trimUnderscore(unassignedRecord.payment_method) | lowercase}} </td>\n </tr>\n </tbody>\n </table>\n </div>\n \n <form [formGroup]=\"markPaymentUnsolicitedForm\" novalidate>\n <input #myInput type='hidden' class='iFrameDrivenImageValue' value='MARKTRANSFERRED'>\n <div class=\"govuk-form-group\">\n <label class=\"govuk-label custom-govuk-label custom-govuk-label\" for=\"reason\">\n Reason for payment being marked as transferred \n </label>\n <textarea class=\"form-control form-control-3-4\" [ngClass]=\"{'inline-error-class': reasonHasError || reasonMinHasError || reasonMaxHasError}\" name=\"reason\" id=\"reason\" rows=\"5\" formControlName=\"reason\">\n </textarea>\n <p class=\"inline-error-message\" *ngIf=\"isReasonEmpty || reasonHasError || reasonMinHasError || reasonMaxHasError\">\n <span *ngIf=\"isReasonEmpty\">Enter a reason for marking this payment as transferred.</span>\n <span *ngIf=\"reasonHasError\">Enter a valid reason</span>\n <span *ngIf=\"reasonMinHasError\">Reason should be at least 3 characters.</span>\n <span *ngIf=\"reasonMaxHasError\">Reason should be 255 characters or under.</span>\n </p>\n </div>\n <div class=\"govuk-form-group\">\n <label class=\"govuk-label custom-govuk-label\" for=\"responsibleOffice\">\n Receiving Site ID (Receiving court/Bulk centre site ID) \n </label>\n <select class=\"form-control short-input\" id=\"responsibleOffice\" formControlName=\"responsibleOffice\" (change)=\"selectchange($event)\">\n <option value=\"\" selected='selected'>Please select</option>\n <option *ngFor=\"let siteID of siteIDList;\" value=\"{{siteID.siteId}}\">{{siteID.siteName}} ({{siteID.siteId}})</option>\n </select>\n <p class=\"inline-error-message\" *ngIf=\"isResponsibleOfficeEmpty || responsibleOfficeHasError\">\n <span *ngIf=\"isResponsibleOfficeEmpty\">Please select Receiving Site ID</span>\n <span *ngIf=\"responsibleOfficeHasError\">Please select a valid Receiving Site ID</span>\n </p>\n </div>\n <div class=\"govuk-button--group\">\n <button type=\"submit\" [disabled]=\"isContinueButtondisabled\" class=\"button\" (click)=\"saveAndContinue()\">\n Confirm\n </button>\n <button type=\"button\" class=\"button govuk-button--secondary\" (click)=\"cancelMarkUnsolicitedPayments('cancel')\">\n Cancel\n </button>\n </div>\n </form>\n \n</div>\n <ng-container *ngIf=\"viewStatus === 'unsolicitedContinueConfirm'\">\n <ccpay-error-banner *ngIf=\"errorMessage.showError\" [errorMessage]=\"errorMessage\"></ccpay-error-banner>\n <div class=\"govuk-warning-text\">\n <span class=\"govuk-warning-text__icon\" aria-hidden=\"true\">!</span>\n <strong class=\"govuk-warning-text__text\">\n <span class=\"govuk-warning-text__assistive\">Warning</span>\n <h1 class=\"heading-small\"> Are you sure you want to mark this payment as transferred? </h1>\n </strong>\n <input #myInput type='hidden' class='iFrameDrivenImageValue' value='TRANSFERREDCONFIRMATION'>\n <div class=\"govuk-grid-column-full govuk-!-padding-bottom-3\">\n <hr class=\"govuk-section-break govuk-section-break--visible\">\n <table class=\"govuk-table\">\n <thead class=\"govuk-table__head\">\n <tr class=\"govuk-table__row\">\n <th class=\"govuk-table__header\" scope=\"col\">Reason</th>\n <th class=\"govuk-table__header\" scope=\"col\">Receiving site ID</th>\n </tr>\n </thead>\n <tbody class=\"govuk-table__body\">\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__cell\">{{reason}}</td>\n <td class=\"govuk-table__cell\">{{selectedSiteName}}</td>\n </tr>\n </tbody>\n </table>\n </div>\n\n </div>\n <div class=\"govuk-button--group\">\n <button type=\"submit\" class=\"button\" [disabled]=\"isConfirmButtondisabled\" (click)=\"confirmPayments()\">\n Confirm\n </button>\n <button type=\"button\" class=\"button govuk-button--secondary\" (click)=\"cancelMarkUnsolicitedPayments()\">\n Cancel\n </button>\n </div>\n </ng-container>\n <ng-container *ngIf=\"viewStatus === 'unsolicitedCancelConfirm'\">\n <input #myInput type='hidden' class='iFrameDrivenImageValue' value='CANCELTRANSFERRED'>\n <div class=\"govuk-warning-text\">\n <span class=\"govuk-warning-text__icon\" aria-hidden=\"true\">!</span>\n <strong class=\"govuk-warning-text__text\">\n <span class=\"govuk-warning-text__assistive\">Warning</span>\n Are you sure you want to cancel?\n </strong>\n </div>\n <div class=\"govuk-button--group\">\n <button type=\"submit\" class=\"button\" (click)=\"gotoCasetransationPage()\">\n Yes\n </button>\n <button type=\"button\" class=\"button govuk-button--secondary\" (click)=\"cancelMarkUnsolicitedPayments()\">\n No\n </button>\n </div>\n </ng-container>\n</div>",
3660
+ template: "<div class=\"mkpay-unidentified\">\n <div *ngIf=\"viewStatus === 'mainForm'\">\n <ccpay-error-banner *ngIf=\"errorMessage.showError\" [errorMessage]=\"errorMessage\"></ccpay-error-banner>\n <h1 class=\"heading-large\">Mark payment as transferred</h1>\n <div class=\"govuk-grid-column-full govuk-!-padding-bottom-3\">\n <hr class=\"govuk-section-break govuk-section-break--visible\">\n <table class=\"govuk-table\">\n <thead class=\"govuk-table__head\">\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__header\" scope=\"col\">Payment asset number (DCN)</td>\n <td class=\"govuk-table__header\" scope=\"col\">Banked date</td>\n <td class=\"govuk-table__header\" scope=\"col\">Amount</td>\n <td class=\"govuk-table__header\" scope=\"col\">Method</td>\n </tr>\n </thead>\n <tbody class=\"govuk-table__body\">\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__cell\">{{unassignedRecord.dcn_reference}}</td>\n <td class=\"govuk-table__cell\"> {{unassignedRecord.date_banked | date:'dd MMM yyyy'}}</td>\n <td class=\"govuk-table__cell\"> {{unassignedRecord.amount | currency :'GBP':'symbol':'1.2-2'}}</td>\n <td class=\"capitalize govuk-table__cell\"> {{trimUnderscore(unassignedRecord.payment_method) | lowercase}} </td>\n </tr>\n </tbody>\n </table>\n </div>\n \n <form [formGroup]=\"markPaymentUnsolicitedForm\" novalidate>\n <input #myInput type='hidden' class='iFrameDrivenImageValue' value='MARKTRANSFERRED'>\n <div class=\"govuk-form-group\">\n <label class=\"govuk-label custom-govuk-label custom-govuk-label\" for=\"reason\">\n Reason for payment being marked as transferred \n </label>\n <textarea class=\"form-control form-control-3-4\" [ngClass]=\"{'inline-error-class': reasonHasError || reasonMinHasError || reasonMaxHasError}\" name=\"reason\" id=\"reason\" rows=\"5\" formControlName=\"reason\">\n </textarea>\n <p class=\"inline-error-message\" *ngIf=\"isReasonEmpty || reasonHasError || reasonMinHasError || reasonMaxHasError\">\n <span *ngIf=\"isReasonEmpty\">Enter a reason for marking this payment as transferred.</span>\n <span *ngIf=\"reasonHasError\">Enter a valid reason</span>\n <span *ngIf=\"reasonMinHasError\">Reason should be at least 3 characters.</span>\n <span *ngIf=\"reasonMaxHasError\">Reason should be 255 characters or under.</span>\n </p>\n </div>\n <div class=\"govuk-form-group\">\n <label class=\"govuk-label custom-govuk-label\" for=\"responsibleOffice\">\n Receiving Site ID (Receiving court/Bulk centre site ID) \n </label>\n <select class=\"form-control short-input\" id=\"responsibleOffice\" formControlName=\"responsibleOffice\" (change)=\"selectchange($event)\">\n <option value=\"\" selected='selected'>Please select</option>\n <option *ngFor=\"let siteID of siteIDList;\" value=\"{{siteID.siteId}}\">{{siteID.siteName}} ({{siteID.siteId}})</option>\n </select>\n <p class=\"inline-error-message\" *ngIf=\"isResponsibleOfficeEmpty || responsibleOfficeHasError\">\n <span *ngIf=\"isResponsibleOfficeEmpty\">Please select Receiving Site ID</span>\n <span *ngIf=\"responsibleOfficeHasError\">Please select a valid Receiving Site ID</span>\n </p>\n </div>\n <div class=\"govuk-button--group\">\n <button type=\"submit\" [disabled]=\"isContinueButtondisabled\" class=\"button\" (click)=\"saveAndContinue()\">\n Confirm\n </button>\n <button type=\"button\" class=\"button govuk-button--secondary\" (click)=\"cancelMarkUnsolicitedPayments('cancel')\">\n Cancel\n </button>\n </div>\n </form>\n \n</div>\n <ng-container *ngIf=\"viewStatus === 'unsolicitedContinueConfirm'\">\n <ccpay-error-banner *ngIf=\"errorMessage.showError\" [errorMessage]=\"errorMessage\"></ccpay-error-banner>\n <div class=\"govuk-warning-text\">\n <span class=\"govuk-warning-text__icon\" aria-hidden=\"true\">!</span>\n <strong class=\"govuk-warning-text__text\">\n <span class=\"govuk-warning-text__assistive\">Warning</span>\n <h1 class=\"heading-small\"> Are you sure you want to mark this payment as transferred? </h1>\n </strong>\n <input #myInput type='hidden' class='iFrameDrivenImageValue' value='TRANSFERREDCONFIRMATION'>\n <div class=\"govuk-grid-column-full govuk-!-padding-bottom-3\">\n <hr class=\"govuk-section-break govuk-section-break--visible\">\n <table class=\"govuk-table\">\n <thead class=\"govuk-table__head\">\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__header\" scope=\"col\">Reason</td>\n <td class=\"govuk-table__header\" scope=\"col\">Receiving site ID</td>\n </tr>\n </thead>\n <tbody class=\"govuk-table__body\">\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__cell\">{{reason}}</td>\n <td class=\"govuk-table__cell\">{{selectedSiteName}}</td>\n </tr>\n </tbody>\n </table>\n </div>\n\n </div>\n <div class=\"govuk-button--group\">\n <button type=\"submit\" class=\"button\" [disabled]=\"isConfirmButtondisabled\" (click)=\"confirmPayments()\">\n Confirm\n </button>\n <button type=\"button\" class=\"button govuk-button--secondary\" (click)=\"cancelMarkUnsolicitedPayments()\">\n Cancel\n </button>\n </div>\n </ng-container>\n <ng-container *ngIf=\"viewStatus === 'unsolicitedCancelConfirm'\">\n <input #myInput type='hidden' class='iFrameDrivenImageValue' value='CANCELTRANSFERRED'>\n <div class=\"govuk-warning-text\">\n <span class=\"govuk-warning-text__icon\" aria-hidden=\"true\">!</span>\n <strong class=\"govuk-warning-text__text\">\n <span class=\"govuk-warning-text__assistive\">Warning</span>\n Are you sure you want to cancel?\n </strong>\n </div>\n <div class=\"govuk-button--group\">\n <button type=\"submit\" class=\"button\" (click)=\"gotoCasetransationPage()\">\n Yes\n </button>\n <button type=\"button\" class=\"button govuk-button--secondary\" (click)=\"cancelMarkUnsolicitedPayments()\">\n No\n </button>\n </div>\n </ng-container>\n</div>",
3082
3661
  styles: [".mkpay-unidentified{margin:10px 0 20px}.mkpay-unidentified .govuk-button--secondary{margin-left:10px;background-color:rgba(179,184,189,.9490196078431372)}.mkpay-unidentified .inline-error-class{outline:3px solid #a71414;outline-offset:0}.mkpay-unidentified .inline-error-message{color:#a71414;font-weight:700;margin-top:10px}.lowercase{text-transform:lowercase}.capitalize{text-transform:capitalize}.custom-govuk-label,.govuk-warning-text__text{font-size:19px}#responsibleOffice{color:#000;width:75%;font-weight:white}select option{background:#fff}"]
3083
3662
  },] }
3084
3663
  ];
@@ -3259,8 +3838,8 @@ class UnprocessedPaymentsComponent {
3259
3838
  UnprocessedPaymentsComponent.decorators = [
3260
3839
  { type: Component, args: [{
3261
3840
  selector: 'ccpay-app-unprocessed-payments',
3262
- template: "<!-- <ng-container *ngIf=\"IS_BUTTON_ENABLE\">\n <div class=\"unprocessed-payments govuk-grid-column-full govuk-!-padding-bottom-3\">\n <input #myInput type='hidden' class='iFrameDrivenImageValue' value='CASETRANSACTION'>\n <h3 class=\"heading-medium\" *ngIf=\"!IS_BUTTON_ENABLE\">Unprocessed payments</h3>\n <h3 class=\"heading-medium\" *ngIf=\"IS_BUTTON_ENABLE\">Unallocated payments</h3>\n <table class=\"govuk-table\">\n <thead class=\"govuk-table__head\">\n <tr class=\"govuk-table__row\">\n <th class=\"govuk-table__header\" scope=\"col\" *ngIf=\"IS_BUTTON_ENABLE && !isTurnOff\">Select</th>\n <th class=\"govuk-table__header\" scope=\"col\" *ngIf=\"IS_BUTTON_ENABLE && isTurnOff\"><a href=\"#\" (click)=\"unprocessedPaymentUnSelectEvent($event)\">Unselect</a></th>\n \n <th class=\"govuk-table__header\" scope=\"col\">Payment asset number (DCN)</th>\n <th class=\"govuk-table__header\" scope=\"col\">Banked date</th>\n <th class=\"govuk-table__header\" scope=\"col\">Amount</th>\n <th class=\"govuk-table__header\" scope=\"col\">Method</th>\n </tr>\n </thead>\n <tbody class=\"govuk-table__body\" >\n <tr class=\"govuk-table__row\" *ngFor=\"let unassignedRecord of unassignedRecordList; let i of index;\">\n <td class=\"govuk-table__cell\" *ngIf=\"IS_BUTTON_ENABLE\">\n <div class=\"multiple-choice unprocessed-payments--radio-button\">\n <input id=\"'unpaiedFee'+i+''\"\n aria-label=\"unassignedRecord\"\n name=\"unassignedRecord\"\n type=\"radio\"\n [(ngModel)]=\"recordId\"\n (click)=\"unprocessedPaymentSelectEvent(unassignedRecord.dcn_reference)\"\n value=\"{{unassignedRecord.dcn_reference}}\" />\n <label for=\"radio-inline-1\"></label>\n </div>\n </td>\n <td class=\"govuk-table__cell whitespace-inherit\">\n {{unassignedRecord.dcn_reference}}\n </td>\n <td class=\"govuk-table__cell whitespace-inherit\"> {{unassignedRecord.date_banked | date:'dd MMM yyyy'}}</td>\n <td class=\"govuk-table__cell whitespace-inherit\"> {{unassignedRecord.amount | currency :'GBP':'symbol':'1.2-2'}}</td>\n <td class=\"capitalize govuk-table__cell whitespace-inherit\"> {{ trimUnderscore(unassignedRecord.payment_method) | lowercase}} </td>\n </tr>\n </tbody>\n <tbody class=\"govuk-table__body\" *ngIf=\"upPaymentErrorMessage !== null\">\n <td class=\"govuk-table__cell\" colspan=\"6\">No unallocated payments record available</td>\n </tbody>\n </table>\n <div class=\"button-grb\" *ngIf=\"IS_BUTTON_ENABLE && !isTurnOff\">\n <button type=\"button\"\n [disabled]=\"!isAllocatedToNewFeebtnEnabled\"\n [ngClass]=\"!isAllocatedToNewFeebtnEnabled ? 'button govuk-button--secondary button--disabled govuk-!-margin-right-1' : 'button govuk-button--secondary govuk-!-margin-right-1'\" (click)=\"redirectToFeeSearchPage($event)\">\n Allocate to a new fee\n </button>\n <button type=\"button\" \n [disabled]=\"!isAllocateToExistingFeebtnEnabled\"\n [ngClass]='!isAllocateToExistingFeebtnEnabled ? \"button govuk-button--secondary button--disabled govuk-!-margin-right-1\" : \"button govuk-button--secondary govuk-!-margin-right-1\"' (click)=\"goToAllocatePage()\">\n Allocate to an existing fee\n </button>\n <button type=\"button\" \n [disabled]=\"!isMarkAsUnidentifiedbtnEnabled\"\n [ngClass]='!isMarkAsUnidentifiedbtnEnabled ? \"button govuk-button--secondary button--disabled govuk-!-margin-right-1\" : \"button govuk-button--secondary govuk-!-margin-right-1\"' (click)=\"loadUnsolicitedPage('unidentifiedPage')\">\n Mark as unidentified\n </button>\n <button type=\"button\" \n [disabled]=\"!isUnprocessedRecordSelected\"\n [ngClass]='!isUnprocessedRecordSelected ? \"button govuk-button--secondary button--disabled govuk-!-margin-right-1\" : \"button govuk-button--secondary govuk-!-margin-right-1\"' (click)=\"loadUnsolicitedPage('unsolicitedPage')\">\n Mark as transferred\n </button> \n </div>\n \n <div class=\"button-grb\" *ngIf=\"IS_BUTTON_ENABLE && isTurnOff\">\n <button type=\"button\"\n [disabled]=\"!isAllocatedToNewFeebtnEnabled\"\n [ngClass]=\"!isAllocatedToNewFeebtnEnabled ? 'button button--disabled govuk-!-margin-right-1' : 'button govuk-!-margin-right-1'\" (click)=\"redirectToFeeSearchPage($event)\">\n Allocate to a new fee\n </button>\n <button type=\"button\" \n [disabled]=\"!isAllocateToExistingFeebtnEnabled\"\n [ngClass]='!isAllocateToExistingFeebtnEnabled ? \"button button--disabled govuk-!-margin-right-1\" : \"button govuk-!-margin-right-1\"' (click)=\"goToAllocatePage()\">\n Allocate to an existing fee\n </button>\n <button type=\"button\" \n [disabled]=\"!isMarkAsUnidentifiedbtnEnabled\"\n [ngClass]='!isMarkAsUnidentifiedbtnEnabled ? \"button button--disabled govuk-!-margin-right-1\" : \"button govuk-!-margin-right-1\"' (click)=\"loadUnsolicitedPage('unidentifiedPage')\">\n Mark as unidentified\n </button>\n <button type=\"button\" \n [disabled]=\"!isUnprocessedRecordSelected\"\n [ngClass]='!isUnprocessedRecordSelected ? \"button button--disabled govuk-!-margin-right-1\" : \"button govuk-!-margin-right-1\"' (click)=\"loadUnsolicitedPage('unsolicitedPage')\">\n Mark as transferred\n </button> \n </div>\n </div>\n</ng-container> -->\n\n\n<ng-container *ngIf=\"!IS_BUTTON_ENABLE\">\n <table class=\"govuk-table\">\n \n <thead class=\"govuk-table__head\" *ngIf='PAYMENTSLENGTH === 0 '>\n <!-- <tr class=\"govuk-table__row\">\n <th class=\"govuk-table__header col-14\" scope=\"col\">Status</th>\n <th class=\"govuk-table__header col-10\" scope=\"col\">Amount</th>\n <th class=\"govuk-table__header col-14\" scope=\"col\">Date</th>\n <th class=\"govuk-table__header col-20\" scope=\"col\">Request reference</th>\n <th class=\"govuk-table__header col-9\" scope=\"col\"></th>\n <th class=\"govuk-table__header\" scope=\"col\"></th>\n </tr> -->\n </thead>\n <tbody class=\"govuk-table__body\">\n <tr class=\"govuk-table__row\" *ngFor=\"let unassignedRecord of unassignedRecordList; let i = index;\">\n <td class=\"govuk-table__cell whitespace-inherit\" class=\"col-13\">\n Unallocated \n </td>\n <td class=\"govuk-table__cell whitespace-inherit\"> {{unassignedRecord.amount | currency :'GBP':'symbol':'1.2-2'}}</td>\n <td class=\"govuk-table__cell whitespace-inherit\"></td>\n <td class=\"govuk-table__cell whitespace-inherit\"></td>\n <td class=\"govuk-table__cell whitespace-inherit\"></td>\n <td class=\"govuk-table__cell whitespace-inherit\"></td>\n </tr>\n </tbody>\n \n </table>\n\n</ng-container>\n\n\n<!--Orders Unallocated changes-->\n<ng-container *ngIf=\"IS_BUTTON_ENABLE\">\n <div class=\"unprocessed-payments\">\n <input #myInput type='hidden' class='iFrameDrivenImageValue' value='CASETRANSACTION'>\n <table class=\"table\">\n \n <thead class=\"govuk-table__head\">\n <tr class=\"govuk-table__row\">\n <th class=\"govuk-table__header col-13\" scope=\"col\">Status</th>\n <th class=\"govuk-table__header col-9\" scope=\"col\">Amount</th>\n <th class=\"govuk-table__header col-16\" scope=\"col\">Date allocated</th>\n <th class=\"govuk-table__header col-24\" colspan=\"3\" scope=\"col\">Request reference</th>\n <th class=\"govuk-table__header col-13\" scope=\"col\"></th>\n <th class=\"govuk-table__header\" scope=\"col\"></th>\n </tr>\n </thead>\n <tbody>\n <ng-container *ngFor=\"let unassignedRecord of unassignedRecordList; let i = index;\">\n <tr>\n <td class=\"govuk-table__cell whitespace-inherit col-13\" >\n Unallocated \n </td>\n <td class=\"govuk-table__cell whitespace-inherit col-10\">\n {{unassignedRecord.amount | currency :'GBP':'symbol':'1.2-2'}}\n </td>\n <td class=\"govuk-table__cell whitespace-inherit\" colspan=\"8\">\n <div *ngIf=\"IS_BUTTON_ENABLE && !isTurnOff\" class=\"alignright\">\n <button type=\"button\"\n [disabled]=\"!isAllocatedToNewFeebtnEnabled\"\n [ngClass]=\"!isAllocatedToNewFeebtnEnabled ? 'button govuk-button--secondary button--disabled' : 'button govuk-button--secondary'\" (click)=\"redirectToFeeSearchPage($event,unassignedRecord.dcn_reference)\">\n Allocate to new service request\n </button><br/>\n <button type=\"button\" \n [disabled]=\"!isAllocateToExistingFeebtnEnabled\"\n [ngClass]='!isAllocateToExistingFeebtnEnabled ? \"button govuk-button--secondary button--disabled\" : \"button govuk-button--secondary\"' (click)=\"goToAllocatePage(unassignedRecord.dcn_reference)\">\n Allocate to existing service request \n </button>\n </div>\n \n </td>\n </tr>\n \n <!-- <ng-container> -->\n <tr>\n <td class=\"unassigned noborders\" colspan=\"10\">\n <summary (click)=\"unassignedRecord.expanded = !unassignedRecord.expanded\" class=\"govuk-details__summary\">\n <span class=\"govuk-details__summary-text\">\n More details and actions\n </span>\n </summary>\n <div *ngIf=\"unassignedRecord.expanded\" class=\"govuk-details__text govuk-!-margin-bottom-5 paddingright\">\n <dl class=\"govuk-summary-list govuk-!-margin-bottom-5\">\n <div class=\"govuk-summary-list__row\">\n <dt class=\"govuk-summary-list__key\">\n Method\n </dt>\n <dd class=\"govuk-summary-list__value\">\n {{ trimUnderscore(unassignedRecord.payment_method) | lowercase}}\n </dd>\n </div>\n <div class=\"govuk-summary-list__row\">\n <dt class=\"govuk-summary-list__key\">\n Payment assest number (DCN) \n </dt>\n <dd class=\"govuk-summary-list__value\">\n {{unassignedRecord.dcn_reference}}\n </dd>\n </div>\n </dl>\n <div class=\" govuk-!-margin-bottom-5\">\n <button type=\"button\" \n [disabled]=\"!isMarkAsUnidentifiedbtnEnabled\"\n [ngClass]='!isMarkAsUnidentifiedbtnEnabled ? \"button govuk-button--secondary button--disabled\" : \"button govuk-button--secondary\"' (click)=\"loadUnsolicitedPage('unidentifiedPage',unassignedRecord.dcn_reference)\">\n Mark as unidentified\n </button>\n </div>\n <div>\n <button type=\"button\" \n [disabled]=\"!isUnprocessedRecordSelected\"\n [ngClass]='!isUnprocessedRecordSelected ? \"button govuk-button--secondary button--disabled\" : \"button govuk-button--secondary\"' (click)=\"loadUnsolicitedPage('unsolicitedPage',unassignedRecord.dcn_reference)\">\n Mark as transferred\n </button> \n </div>\n\n </div>\n </td> \n </tr> \n <!-- </ng-container> -->\n </ng-container>\n </tbody>\n </table>\n \n </div>\n</ng-container>\n\n<ng-container *ngIf=\"viewStatus === 'main'\">\n\n</ng-container>\n<!-- <ng-container *ngIf=\"PAYMENTSLENGTH === 0 && unassignedRecordListLength === 0\">\n <br/>No payments.<br/>\n</ng-container> -->\n\n",
3263
- styles: [".unprocessed-payments .unprocessed-payments--radio-button{bottom:10px}.disable{text-decoration:none;padding:.526315em .789473em .263157em;cursor:default;color:#fff;background-color:#00823b;pointer-events:none;font-size:1em;line-height:1.25;outline:1px solid transparent;outline-offset:-1px;-webkit-appearance:none;box-shadow:0 2px 0 #003618}.button.disabled,.button[disabled=disabled],.button[disabled]{zoom:1;filter:alpha(opacity=50);opacity:.5}.button.disabled:active,.button[disabled=disabled]:active,.button[disabled]:active{top:0;box-shadow:0 2px 0 #003618}.button[disabled=disabled]{background:#00823b}.col-13{width:13%!important}.col-17{width:17%!important}.col-12{width:12%!important}.col-9{width:9%!important}.col-15{width:15%!important}.lowercase{text-transform:lowercase}.capitalize:first-letter{text-transform:uppercase}.whitespace-inherit{white-space:inherit!important}.top_row{display:table;width:100%}.top_row>div{display:table-cell;width:50%;border-bottom:1px solid #eee}.unassigned{border-top:hidden}.col-16{width:16%!important}.col-10{width:10%!important}.col-14{width:14%!important}.col-19{width:19%!important}.col-18,.col-19{padding-left:0!important}.col-18{width:18%!important;padding-right:0!important}.col-21{width:21%!important}.col-20{width:20%!important}.col-11{width:11%!important}.col-37{width:37%!important}.noborders>td{border-color:transparent;border-top-style:hidden;border-right-style:hidden;border-left-style:hidden}.govuk-button--secondary{margin-bottom:10px}.govuk-summary-list{font-size:19px}.govuk-summary-list__key{width:35%}td{white-space:nowrap;overflow:hidden!important}table{table-layout:fixed;width:100%}td,th{word-wrap:break-word}.alignright{text-align:right}.paddingright{padding-right:0}@media screen and (max-width:979px){table,td,th,tr{font-size:16px}.button{font-size:14px;white-space:normal;word-wrap:break-word}}@media screen and (max-width:650px){table,td,th,tr{font-size:14px}.button{font-size:12px;white-space:normal;word-wrap:break-word}}@media screen and (max-width:470px){table,td,th,tr{font-size:12px}.button{font-size:10px;white-space:normal;word-wrap:break-word}}"]
3841
+ template: "<!-- <ng-container *ngIf=\"IS_BUTTON_ENABLE\">\n <div class=\"unprocessed-payments govuk-grid-column-full govuk-!-padding-bottom-3\">\n <input #myInput type='hidden' class='iFrameDrivenImageValue' value='CASETRANSACTION'>\n <h3 class=\"heading-medium\" *ngIf=\"!IS_BUTTON_ENABLE\">Unprocessed payments</h3>\n <h3 class=\"heading-medium\" *ngIf=\"IS_BUTTON_ENABLE\">Unallocated payments</h3>\n <table class=\"govuk-table\">\n <thead class=\"govuk-table__head\">\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__header\" scope=\"col\" *ngIf=\"IS_BUTTON_ENABLE && !isTurnOff\">Select</td>\n <td class=\"govuk-table__header\" scope=\"col\" *ngIf=\"IS_BUTTON_ENABLE && isTurnOff\"><a href=\"#\" (click)=\"unprocessedPaymentUnSelectEvent($event)\">Unselect</a></td>\n \n <td class=\"govuk-table__header\" scope=\"col\">Payment asset number (DCN)</td>\n <td class=\"govuk-table__header\" scope=\"col\">Banked date</td>\n <td class=\"govuk-table__header\" scope=\"col\">Amount</td>\n <td class=\"govuk-table__header\" scope=\"col\">Method</td>\n </tr>\n </thead>\n <tbody class=\"govuk-table__body\" >\n <tr class=\"govuk-table__row\" *ngFor=\"let unassignedRecord of unassignedRecordList; let i of index;\">\n <td class=\"govuk-table__cell\" *ngIf=\"IS_BUTTON_ENABLE\">\n <div class=\"multiple-choice unprocessed-payments--radio-button\">\n <input id=\"'unpaiedFee'+i+''\"\n aria-label=\"unassignedRecord\"\n name=\"unassignedRecord\"\n type=\"radio\"\n [(ngModel)]=\"recordId\"\n (click)=\"unprocessedPaymentSelectEvent(unassignedRecord.dcn_reference)\"\n value=\"{{unassignedRecord.dcn_reference}}\" />\n <label for=\"radio-inline-1\"></label>\n </div>\n </td>\n <td class=\"govuk-table__cell whitespace-inherit\">\n {{unassignedRecord.dcn_reference}}\n </td>\n <td class=\"govuk-table__cell whitespace-inherit\"> {{unassignedRecord.date_banked | date:'dd MMM yyyy'}}</td>\n <td class=\"govuk-table__cell whitespace-inherit\"> {{unassignedRecord.amount | currency :'GBP':'symbol':'1.2-2'}}</td>\n <td class=\"capitalize govuk-table__cell whitespace-inherit\"> {{ trimUnderscore(unassignedRecord.payment_method) | lowercase}} </td>\n </tr>\n </tbody>\n <tbody class=\"govuk-table__body\" *ngIf=\"upPaymentErrorMessage !== null\">\n <td class=\"govuk-table__cell\" colspan=\"6\">No unallocated payments record available</td>\n </tbody>\n </table>\n <div class=\"button-grb\" *ngIf=\"IS_BUTTON_ENABLE && !isTurnOff\">\n <button type=\"button\"\n [disabled]=\"!isAllocatedToNewFeebtnEnabled\"\n [ngClass]=\"!isAllocatedToNewFeebtnEnabled ? 'button govuk-button--secondary button--disabled govuk-!-margin-right-1' : 'button govuk-button--secondary govuk-!-margin-right-1'\" (click)=\"redirectToFeeSearchPage($event)\">\n Allocate to a new fee\n </button>\n <button type=\"button\" \n [disabled]=\"!isAllocateToExistingFeebtnEnabled\"\n [ngClass]='!isAllocateToExistingFeebtnEnabled ? \"button govuk-button--secondary button--disabled govuk-!-margin-right-1\" : \"button govuk-button--secondary govuk-!-margin-right-1\"' (click)=\"goToAllocatePage()\">\n Allocate to an existing fee\n </button>\n <button type=\"button\" \n [disabled]=\"!isMarkAsUnidentifiedbtnEnabled\"\n [ngClass]='!isMarkAsUnidentifiedbtnEnabled ? \"button govuk-button--secondary button--disabled govuk-!-margin-right-1\" : \"button govuk-button--secondary govuk-!-margin-right-1\"' (click)=\"loadUnsolicitedPage('unidentifiedPage')\">\n Mark as unidentified\n </button>\n <button type=\"button\" \n [disabled]=\"!isUnprocessedRecordSelected\"\n [ngClass]='!isUnprocessedRecordSelected ? \"button govuk-button--secondary button--disabled govuk-!-margin-right-1\" : \"button govuk-button--secondary govuk-!-margin-right-1\"' (click)=\"loadUnsolicitedPage('unsolicitedPage')\">\n Mark as transferred\n </button> \n </div>\n \n <div class=\"button-grb\" *ngIf=\"IS_BUTTON_ENABLE && isTurnOff\">\n <button type=\"button\"\n [disabled]=\"!isAllocatedToNewFeebtnEnabled\"\n [ngClass]=\"!isAllocatedToNewFeebtnEnabled ? 'button button--disabled govuk-!-margin-right-1' : 'button govuk-!-margin-right-1'\" (click)=\"redirectToFeeSearchPage($event)\">\n Allocate to a new fee\n </button>\n <button type=\"button\" \n [disabled]=\"!isAllocateToExistingFeebtnEnabled\"\n [ngClass]='!isAllocateToExistingFeebtnEnabled ? \"button button--disabled govuk-!-margin-right-1\" : \"button govuk-!-margin-right-1\"' (click)=\"goToAllocatePage()\">\n Allocate to an existing fee\n </button>\n <button type=\"button\" \n [disabled]=\"!isMarkAsUnidentifiedbtnEnabled\"\n [ngClass]='!isMarkAsUnidentifiedbtnEnabled ? \"button button--disabled govuk-!-margin-right-1\" : \"button govuk-!-margin-right-1\"' (click)=\"loadUnsolicitedPage('unidentifiedPage')\">\n Mark as unidentified\n </button>\n <button type=\"button\" \n [disabled]=\"!isUnprocessedRecordSelected\"\n [ngClass]='!isUnprocessedRecordSelected ? \"button button--disabled govuk-!-margin-right-1\" : \"button govuk-!-margin-right-1\"' (click)=\"loadUnsolicitedPage('unsolicitedPage')\">\n Mark as transferred\n </button> \n </div>\n </div>\n</ng-container> -->\n\n\n<ng-container *ngIf=\"!IS_BUTTON_ENABLE\">\n <table class=\"govuk-table\">\n \n <thead class=\"govuk-table__head\" *ngIf='PAYMENTSLENGTH === 0 '>\n <!-- <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__header col-14\" scope=\"col\">Status</td>\n <td class=\"govuk-table__header col-10\" scope=\"col\">Amount</td>\n <td class=\"govuk-table__header col-14\" scope=\"col\">Date</td>\n <td class=\"govuk-table__header col-20\" scope=\"col\">Request reference</td>\n <td class=\"govuk-table__header col-9\" scope=\"col\"></td>\n <td class=\"govuk-table__header\" scope=\"col\"></td>\n </tr> -->\n </thead>\n <tbody class=\"govuk-table__body\">\n <tr class=\"govuk-table__row\" *ngFor=\"let unassignedRecord of unassignedRecordList; let i = index;\">\n <td class=\"govuk-table__cell whitespace-inherit\" class=\"col-13\">\n Unallocated \n </td>\n <td class=\"govuk-table__cell whitespace-inherit\"> {{unassignedRecord.amount | currency :'GBP':'symbol':'1.2-2'}}</td>\n <td class=\"govuk-table__cell whitespace-inherit\"></td>\n <td class=\"govuk-table__cell whitespace-inherit\"></td>\n <td class=\"govuk-table__cell whitespace-inherit\"></td>\n <td class=\"govuk-table__cell whitespace-inherit\"></td>\n </tr>\n </tbody>\n \n </table>\n\n</ng-container>\n\n\n<!--Orders Unallocated changes-->\n<ng-container *ngIf=\"IS_BUTTON_ENABLE\">\n <div class=\"unprocessed-payments\">\n <input #myInput type='hidden' class='iFrameDrivenImageValue' value='CASETRANSACTION'>\n <table class=\"table\">\n \n <thead class=\"govuk-table__head\">\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__header col-13\" scope=\"col\">Status</td>\n <td class=\"govuk-table__header col-9\" scope=\"col\">Amount</td>\n <td class=\"govuk-table__header col-16\" scope=\"col\">Date allocated</td>\n <td class=\"govuk-table__header col-24\" colspan=\"3\" scope=\"col\">Request reference</td>\n <td class=\"govuk-table__header col-13\" scope=\"col\"></td>\n <td class=\"govuk-table__header\" scope=\"col\"></td>\n </tr>\n </thead>\n <tbody>\n <ng-container *ngFor=\"let unassignedRecord of unassignedRecordList; let i = index;\">\n <tr>\n <td class=\"govuk-table__cell whitespace-inherit col-13\" >\n Unallocated \n </td>\n <td class=\"govuk-table__cell whitespace-inherit col-10\">\n {{unassignedRecord.amount | currency :'GBP':'symbol':'1.2-2'}}\n </td>\n <td class=\"govuk-table__cell whitespace-inherit\" colspan=\"8\">\n <div *ngIf=\"IS_BUTTON_ENABLE && !isTurnOff\" class=\"alignright\">\n <button type=\"button\"\n [disabled]=\"!isAllocatedToNewFeebtnEnabled\"\n [ngClass]=\"!isAllocatedToNewFeebtnEnabled ? 'button govuk-button--secondary button--disabled' : 'button govuk-button--secondary'\" (click)=\"redirectToFeeSearchPage($event,unassignedRecord.dcn_reference)\">\n Allocate to new service request\n </button><br/>\n <button type=\"button\" \n [disabled]=\"!isAllocateToExistingFeebtnEnabled\"\n [ngClass]='!isAllocateToExistingFeebtnEnabled ? \"button govuk-button--secondary button--disabled\" : \"button govuk-button--secondary\"' (click)=\"goToAllocatePage(unassignedRecord.dcn_reference)\">\n Allocate to existing service request \n </button>\n </div>\n \n </td>\n </tr>\n \n <!-- <ng-container> -->\n <tr>\n <td class=\"unassigned noborders\" colspan=\"10\">\n <summary (click)=\"unassignedRecord.expanded = !unassignedRecord.expanded\" class=\"govuk-details__summary\">\n <span class=\"govuk-details__summary-text\">\n More details and actions\n </span>\n </summary>\n <div *ngIf=\"unassignedRecord.expanded\" class=\"govuk-details__text govuk-!-margin-bottom-5 paddingright\">\n <dl class=\"govuk-summary-list govuk-!-margin-bottom-5\">\n <div class=\"govuk-summary-list__row\">\n <dt class=\"govuk-summary-list__key\">\n Method\n </dt>\n <dd class=\"govuk-summary-list__value\">\n {{ trimUnderscore(unassignedRecord.payment_method) | lowercase}}\n </dd>\n </div>\n <div class=\"govuk-summary-list__row\">\n <dt class=\"govuk-summary-list__key\">\n Payment assest number (DCN) \n </dt>\n <dd class=\"govuk-summary-list__value\">\n {{unassignedRecord.dcn_reference}}\n </dd>\n </div>\n </dl>\n <div class=\" govuk-!-margin-bottom-5\">\n <button type=\"button\" \n [disabled]=\"!isMarkAsUnidentifiedbtnEnabled\"\n [ngClass]='!isMarkAsUnidentifiedbtnEnabled ? \"button govuk-button--secondary button--disabled\" : \"button govuk-button--secondary\"' (click)=\"loadUnsolicitedPage('unidentifiedPage',unassignedRecord.dcn_reference)\">\n Mark as unidentified\n </button>\n </div>\n <div>\n <button type=\"button\" \n [disabled]=\"!isUnprocessedRecordSelected\"\n [ngClass]='!isUnprocessedRecordSelected ? \"button govuk-button--secondary button--disabled\" : \"button govuk-button--secondary\"' (click)=\"loadUnsolicitedPage('unsolicitedPage',unassignedRecord.dcn_reference)\">\n Mark as transferred\n </button> \n </div>\n\n </div>\n </td> \n </tr> \n <!-- </ng-container> -->\n </ng-container>\n </tbody>\n </table>\n \n </div>\n</ng-container>\n\n<ng-container *ngIf=\"viewStatus === 'main'\">\n\n</ng-container>\n<!-- <ng-container *ngIf=\"PAYMENTSLENGTH === 0 && unassignedRecordListLength === 0\">\n <br/>No payments.<br/>\n</ng-container> -->\n\n",
3842
+ styles: [".unprocessed-payments .unprocessed-payments--radio-button{bottom:10px}.disable{text-decoration:none;padding:.526315em .789473em .263157em;cursor:default;color:#fff;background-color:#00823b;pointer-events:none;font-size:1em;line-height:1.25;outline:1px solid transparent;outline-offset:-1px;-webkit-appearance:none;box-shadow:0 2px 0 #003618}.button.disabled,.button[disabled=disabled],.button[disabled]{zoom:1;filter:alpha(opacity=50);opacity:.5}.button.disabled:active,.button[disabled=disabled]:active,.button[disabled]:active{top:0;box-shadow:0 2px 0 #003618}.button[disabled=disabled]{background:#00823b}.col-13{width:13%!important}.col-17{width:17%!important}.col-12{width:12%!important}.col-9{width:9%!important}.col-15{width:15%!important}.lowercase{text-transform:lowercase}.capitalize:first-letter{text-transform:uppercase}.whitespace-inherit{white-space:inherit!important}.top_row{display:table;width:100%}.top_row>div{display:table-cell;width:50%;border-bottom:1px solid #eee}.unassigned{border-top:hidden}.col-16{width:16%!important}.col-10{width:10%!important}.col-14{width:14%!important}.col-19{width:19%!important}.col-18,.col-19{padding-left:0!important}.col-18{width:18%!important;padding-right:0!important}.col-21{width:21%!important}.col-20{width:20%!important}.col-11{width:11%!important}.col-37{width:37%!important}.noborders>td{border-color:transparent;border-top-style:hidden;border-right-style:hidden;border-left-style:hidden}.govuk-button--secondary{margin-bottom:10px}.govuk-summary-list{font-size:19px}.govuk-summary-list__key{width:35%}td{white-space:nowrap;overflow:hidden!important}table{table-layout:fixed;width:100%}td,th{word-wrap:break-word}.alignright{text-align:right}.paddingright{padding-right:0}"]
3264
3843
  },] }
3265
3844
  ];
3266
3845
  UnprocessedPaymentsComponent.ctorParameters = () => [
@@ -3301,7 +3880,7 @@ class ProcessedPaymentsComponent {
3301
3880
  ProcessedPaymentsComponent.decorators = [
3302
3881
  { type: Component, args: [{
3303
3882
  selector: 'ccpay-app-processed-payments',
3304
- template: "<div class=\"processed-payments govuk-grid-column-full govuk-!-padding-bottom-3\">\n <h3 class=\"heading-medium\">Processed payments</h3>\n <table class=\"govuk-table\">\n <thead class=\"govuk-table__head\">\n <tr class=\"govuk-table__row\">\n <th class=\"govuk-table__header\" scope=\"col\">Payment asset number (DCN)</th>\n <th class=\"govuk-table__header\" scope=\"col\">Banked date</th>\n <th class=\"govuk-table__header\" scope=\"col\">Amount</th>\n <th class=\"govuk-table__header\" scope=\"col\">Method</th>\n <th class=\"govuk-table__header\" scope=\"col\">Allocation status</th>\n </tr>\n </thead>\n <tbody class=\"govuk-table__body\" >\n <tr class=\"govuk-table__row\" *ngFor=\"let processedRecord of NONPAYMENTS\">\n <td class=\"govuk-table__cell\">\n <a href=\"javascript:void(0)\" (click)=\"redirectToPaymentViewPage(processedRecord.paymentGroupReference, processedRecord.reference, processedRecord.method)\">{{processedRecord.document_control_number}}</a>\n </td>\n <td class=\"govuk-table__cell\"> {{processedRecord.banked_date | date:'dd MMM yyyy'}}</td>\n <td class=\"govuk-table__cell\"> {{processedRecord.amount | currency :'GBP':'symbol':'1.2-2'}}</td>\n <td class=\"capitalize govuk-table__cell\"> {{ trimUnderscore(processedRecord.method) | lowercase}} </td>\n <td class=\"capitalize govuk-table__cell\"> {{ processedRecord.payment_allocation[0] ? processedRecord.payment_allocation[0].allocation_status : '-' }} </td>\n\n </tr>\n <tr class=\"govuk-table__row\" *ngIf=\"NONPAYMENTS.length === 0\">\n <td class=\"govuk-table__cell\" colspan=\"5\">\n No processed payments\n </td>\n\n </tr>\n\n </tbody>\n </table>\n</div>\n",
3883
+ template: "<div class=\"processed-payments govuk-grid-column-full govuk-!-padding-bottom-3\">\n <h3 class=\"heading-medium\">Processed payments</h3>\n <table class=\"govuk-table\">\n <thead class=\"govuk-table__head\">\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__header\" scope=\"col\">Payment asset number (DCN)</td>\n <td class=\"govuk-table__header\" scope=\"col\">Banked date</td>\n <td class=\"govuk-table__header\" scope=\"col\">Amount</td>\n <td class=\"govuk-table__header\" scope=\"col\">Method</td>\n <td class=\"govuk-table__header\" scope=\"col\">Allocation status</td>\n </tr>\n </thead>\n <tbody class=\"govuk-table__body\" >\n <tr class=\"govuk-table__row\" *ngFor=\"let processedRecord of NONPAYMENTS\">\n <td class=\"govuk-table__cell\">\n <a href=\"javascript:void(0)\" (click)=\"redirectToPaymentViewPage(processedRecord.paymentGroupReference, processedRecord.reference, processedRecord.method)\">{{processedRecord.document_control_number}}</a>\n </td>\n <td class=\"govuk-table__cell\"> {{processedRecord.banked_date | date:'dd MMM yyyy'}}</td>\n <td class=\"govuk-table__cell\"> {{processedRecord.amount | currency :'GBP':'symbol':'1.2-2'}}</td>\n <td class=\"capitalize govuk-table__cell\"> {{ trimUnderscore(processedRecord.method) | lowercase}} </td>\n <td class=\"capitalize govuk-table__cell\"> {{ processedRecord.payment_allocation[0] ? processedRecord.payment_allocation[0].allocation_status : '-' }} </td>\n\n </tr>\n <tr class=\"govuk-table__row\" *ngIf=\"NONPAYMENTS.length === 0\">\n <td class=\"govuk-table__cell\" colspan=\"5\">\n No processed payments\n </td>\n\n </tr>\n\n </tbody>\n </table>\n</div>\n",
3305
3884
  styles: [".lowercase{text-transform:lowercase}.capitalize:first-letter{text-transform:uppercase}"]
3306
3885
  },] }
3307
3886
  ];
@@ -3681,8 +4260,8 @@ class AllocatePaymentsComponent {
3681
4260
  AllocatePaymentsComponent.decorators = [
3682
4261
  { type: Component, args: [{
3683
4262
  selector: 'app-allocate-payments',
3684
- template: "<div class=\"allocate-payments\">\n <ng-container *ngIf=\"viewStatus === 'mainForm' && !isTurnOff\">\n\n <div class=\"govuk-breadcrumbs\">\n <ol class=\"govuk-breadcrumbs__list\">\n <li class=\"govuk-breadcrumbs__list-item\">\n <a (click)=\"gotoCasetransationPage()\" class=\"govuk-back-link govuk-label govuk-body\" href=\"javascript:void(0)\">Back</a>\n </li>\n </ol>\n </div>\n \n <div class=\"paymentrequest\">\n <h1 class=\"govuk-heading-xl govuk-!-margin-top-3 govuk-!-margin-bottom-4\">Select payment request</h1>\n <p class=\"govuk-!-margin-top-5 casererf\">Case reference: {{ccdReference}}</p>\n </div>\n \n <div *ngFor=\"let orderRef of orderLevelFees; let i = index;\" class=\"multiple-choice unprocessed-payments--radio-button\">\n <input id=\"'orderfee'+i+''\"\n aria-label=\"orderLevelRecord\"\n name=\"orderLevelRecord\"\n \n (click)=\"OrderListSelectEvent(orderRef.orderRefId)\"\n type=\"radio\"\n value=\"{{orderRef.orderTotalFees}}\" />\n <label for=\"radio-inline-1\"> {{orderRef.orderTotalFees | currency :'GBP':'symbol':'1.2-2'}}({{orderRef.orderStatus}})</label>\n </div>\n \n <div class=\"paymentrequest\">\n <button [disabled]=\"isContinueButtondisabled\" type=\"submit\" (click)=\"redirectToOrderFeeSearchPage()\" class=\"button allbtb button--disabled govuk-!-margin-right-1\">\n Continue\n </button>\n </div>\n \n </ng-container>\n\n <div *ngIf=\"viewStatus==='mainForm' && isTurnOff\">\n <input #myInput type='hidden' class='iFrameDrivenImageValue' value='ALLOCATEPAYMENTS'>\n <div class=\"govuk-breadcrumbs\" *ngIf=\"paymentRef\">\n <ol class=\"govuk-breadcrumbs__list\">\n <li class=\"govuk-breadcrumbs__list-item\">\n <a href=\"javascript:void(0)\" (click)=\"gotoSummaryPage($event)\" class=\"govuk-back-link govuk-body\">Back</a>\n </li>\n </ol>\n </div>\n <div class=\"govuk-heading-section\">\n <h1 class=\"govuk-heading-xl\">Allocate payment to fee group</h1>\n <h2 class=\"govuk-heading-l\">Amount left to be allocated:\n {{ unAllocatedPayment.amount | currency:'GBP':'symbol-narrow':'1.2-2' }}</h2>\n </div>\n <div class=\"payment-group-section\" *ngFor=\"let paymentGroup of paymentGroups\">\n <h3 class=\"govuk-heading-m\">Group reference: {{paymentGroup.payment_group_reference}}</h3>\n <table class=\"govuk-table\">\n <thead class=\"govuk-table__head\">\n <tr class=\"govuk-table__row\">\n <th class=\"govuk-table__header\" scope=\"col\"></th>\n <th class=\"govuk-table__header\" scope=\"col\">Code</th>\n <th class=\"govuk-table__header\" scope=\"col\">Description</th>\n <th class=\"govuk-table__header\" scope=\"col\">Volume</th>\n <th class=\"govuk-table__header\" scope=\"col\">Fee amount</th>\n <th class=\"govuk-table__header\" scope=\"col\">Calculated amount</th>\n <th class=\"govuk-table__header\" scope=\"col\">Group amount outstanding</th>\n </tr>\n </thead>\n <tbody class=\"govuk-table__body\">\n <tr class=\"govuk-table__row\" *ngFor=\"let fee of paymentGroup.fees; let i = index;\">\n <td class=\"govuk-table__cell govuk-table__cell--col1 govuk-table__custom--col1\"\n [attr.rowspan]=\"paymentGroup.fees.length\" *ngIf=\"i==0\">\n <div class=\"multiple-choice\">\n <input id=\"unpaiedFee-{{i}}\" name=\"unassignedRecord\" type=\"radio\"\n (click)=\"selectedPaymentGroup(paymentGroup)\" />\n <label for=\"unpaiedFee-{{i}}\"></label>\n </div>\n </td>\n <td class=\"govuk-table__cell govuk-table__cell--col1\">{{fee.code}}</td>\n <td class=\"govuk-table__cell govuk-table__cell--col2\"> {{fee.description}} </td>\n <td class=\"govuk-table__cell govuk-table__cell--col3\"> {{fee.volume? fee.volume : '-'}} </td>\n <td class=\"govuk-table__cell govuk-table__cell--col4\">\n {{ fee.fee_amount | currency:'GBP':'symbol-narrow':'1.2-2' }} </td>\n <td class=\"govuk-table__cell govuk-table__cell--col5\">\n {{fee.calculated_amount | currency:'GBP':'symbol-narrow':'1.2-2' }} </td>\n <td class=\"govuk-table__cell govuk-table__cell--col6 govuk-table__custom--col6\"\n [attr.rowspan]=\"paymentGroup.fees.length\" *ngIf=\"i==0\">\n {{getGroupOutstandingAmount(paymentGroup) | currency:'GBP':'symbol-narrow':'1.2-2' }} </td>\n\n </tr>\n\n </tbody>\n <tbody class=\"govuk-table__body\" *ngIf=\"paymentGroup.fees.length==0\">\n <td class=\"govuk-table__cell\" colspan=\"6\">No payments recorded</td>\n </tbody>\n </table>\n </div>\n <div class=\"govuk-button-group-allocate\">\n <button type=\"button\" class=\"button govuk-!-margin-right-1\" [disabled]=\"isContinueButtondisabled\"\n (click)=\"saveAndContinue()\">\n Continue\n </button>\n <button type=\"button\" class=\"button govuk-button--secondary\" (click)=\"gotoCasetransationPage()\">\n Cancel\n </button>\n </div>\n </div>\n\n <ng-container *ngIf=\"(viewStatus === 'mainForm' && isTurnOff) || viewStatus === 'allocatePaymentConfirmation'\">\n <ccpay-error-banner *ngIf=\"errorMessage.showError\" [errorMessage]=\"errorMessage\"></ccpay-error-banner>\n <input #myInput type='hidden' class='iFrameDrivenImageValue' value='{{feedbackUrlLabel}}'>\n <h1 class=\"govuk-heading-xl\">Confirm allocation</h1>\n <h2 class=\"govuk-heading-l govuk-heading-l--custom\">\n Amount to be allocated: {{amountForAllocation | currency:'GBP':'symbol-narrow':'1.2-2'}}\n </h2>\n <div class=\"payment-group-section\" *ngIf=\"paymentGroup\">\n <h3 class=\"govuk-heading-m--custom\" *ngIf=\"isTurnOff\">Group reference: {{paymentGroup.payment_group_reference}}\n </h3>\n <table class=\"govuk-table\">\n <thead class=\"govuk-table__head\">\n <tr class=\"govuk-table__row\">\n <th class=\"govuk-table__header\" scope=\"col\">Code</th>\n <th class=\"govuk-table__header\" scope=\"col\">Description</th>\n <th class=\"govuk-table__header\" scope=\"col\">Volume</th>\n <th class=\"govuk-table__header\" scope=\"col\">Fee amount</th>\n <th class=\"govuk-table__header\" scope=\"col\">Calculated amount</th>\n <th class=\"govuk-table__header\" scope=\"col\">Amount Due</th>\n </tr>\n </thead>\n <tbody class=\"govuk-table__body\">\n <tr class=\"govuk-table__row\" *ngFor=\"let fee of paymentGroup.fees; let i = index;\">\n <td class=\"govuk-table__cell govuk-table__cell--col1\">{{fee.code}}</td>\n <td class=\"govuk-table__cell govuk-table__cell--col2\"> {{fee.description}} </td>\n <td class=\"govuk-table__cell govuk-table__cell--col3\"> {{fee.volume? fee.volume : '-'}} </td>\n <td class=\"govuk-table__cell govuk-table__cell--col4\">\n {{ fee.fee_amount | currency:'GBP':'symbol-narrow':'1.2-2' }} </td>\n <td class=\"govuk-table__cell govuk-table__cell--col5\">\n {{fee.calculated_amount | currency:'GBP':'symbol-narrow':'1.2-2'}} </td>\n <td class=\"govuk-table__cell govuk-table__cell--col6\" [attr.rowspan]=\"paymentGroup.fees.length\"\n *ngIf=\"i==0\"> {{afterFeeAllocateOutstanding | currency:'GBP':'symbol-narrow':'1.2-2'}} </td>\n </tr>\n </tbody>\n <tbody class=\"govuk-table__body\" *ngIf=\"paymentGroup.fees.length == 0\">\n <td class=\"govuk-table__cell\" colspan=\"6\">No payments recorded</td>\n </tbody>\n </table>\n </div>\n <div class=\"govuk-warning-text\" *ngIf=\"isRemainingAmountGtZero || isRemainingAmountLtZero || remainingAmount === 0\">\n <span class=\"govuk-warning-text__icon\" aria-hidden=\"true\">!</span>\n <strong class=\"govuk-warning-text__text govuk-warning-text__custom\">\n <span class=\"govuk-warning-text__assistive\">Warning</span>\n {{paymentSectionLabel.title}} {{ remainingAmount | currency:'GBP':'symbol-narrow':'1.2-2' }}\n </strong>\n </div>\n <div class=\"govuk-form-group\" *ngIf=\"isRemainingAmountGtZero || isRemainingAmountLtZero\">\n <div class=\"govuk-form-group\">\n <fieldset class=\"govuk-fieldset\" aria-describedby=\"how-contacted-conditional-hint\">\n <span id=\"how-contacted-conditional-hint\" class=\"govuk-hint\"\n [ngClass]=\"{'inline-error-message': paymentReasonHasError}\">\n {{paymentSectionLabel.reason}}\n </span>\n <div\n [ngClass]=\"paymentReasonHasError ? 'govuk-radios govuk-radios--conditional form-group-error' : 'govuk-radios govuk-radios--conditional'\"\n data-module=\"govuk-radios\" *ngIf=\"isRemainingAmountGtZero\">\n <div class=\"govuk-radios__item\" *ngFor=\"let reason of reasonList.overPayment | keyValue\">\n <input class=\"govuk-radios__input\" id=\"{{reason.key}}\" name=\"paymentReason\" type=\"radio\"\n [(ngModel)]=\"paymentReason\" value={{reason.value}}>\n <label class=\"govuk-label govuk-radios__label govuk-font__custom\" for=\"how-contacted-conditional\">\n {{reason.value}}\n </label>\n </div>\n </div>\n <div\n [ngClass]=\"paymentReasonHasError ? 'govuk-radios govuk-radios--conditional form-group-error' : 'govuk-radios govuk-radios--conditional'\"\n data-module=\"govuk-radios\" *ngIf=\"isRemainingAmountLtZero\">\n <div class=\"govuk-radios__item\" *ngFor=\"let reason of reasonList.shortFall | keyValue\">\n <input class=\"govuk-radios__input\" id=\"{{reason.key}}\" name=\"paymentReason\" type=\"radio\"\n [(ngModel)]=\"paymentReason\" value={{reason.value}}>\n <label class=\"govuk-label govuk-radios__label govuk-font__custom\" for=\"how-contacted-conditional\">\n {{reason.value}}\n </label>\n </div>\n </div>\n </fieldset>\n </div>\n <div class=\"govuk-form-group\">\n <fieldset class=\"govuk-fieldset\" aria-describedby=\"how-contacted-conditional-hint\">\n <span id=\"how-contacted-conditional-hint\" class=\"govuk-hint\"\n [ngClass]=\"{'inline-error-message': paymentExplanationHasError}\">\n Provide an explanatory note\n </span>\n <div\n [ngClass]=\"paymentExplanationHasError ? 'govuk-radios govuk-radios--conditional form-group-error' : 'govuk-radios govuk-radios--conditional'\"\n data-module=\"govuk-radios\" *ngIf=\"isRemainingAmountGtZero\">\n <div class=\"govuk-radios__item\" *ngFor=\"let explanation of explanationList.overPayment | keyValue\">\n <input class=\"govuk-radios__input\" id=\"{{explanation.key}}\" name=\"paymentExplanation\" type=\"radio\"\n [(ngModel)]=\"paymentExplanation\" value={{explanation.value}}\n (click)=\"selectRadioButton(explanation.key, 'explanation')\">\n <label class=\"govuk-label govuk-radios__label govuk-font__custom\" for=\"how-contacted-conditional\">\n {{explanation.value}}\n </label>\n </div>\n </div>\n <div\n [ngClass]=\"paymentExplanationHasError ? 'govuk-radios govuk-radios--conditional form-group-error' : 'govuk-radios govuk-radios--conditional'\"\n data-module=\"govuk-radios\" *ngIf=\"isRemainingAmountLtZero\">\n <div class=\"govuk-radios__item\" *ngFor=\"let explanation of explanationList.shortFall | keyValue\">\n <input class=\"govuk-radios__input\" id=\"{{explanation.key}}\" name=\"paymentExplanation\" type=\"radio\"\n [(ngModel)]=\"paymentExplanation\" value={{explanation.value}}\n (click)=\"selectRadioButton(explanation.key, 'explanation')\">\n <label class=\"govuk-label govuk-radios__label govuk-font__custom\" for=\"how-contacted-conditional\">\n {{explanation.value}}\n </label>\n </div>\n </div>\n </fieldset>\n </div>\n </div>\n\n <form [formGroup]=\"overUnderPaymentForm\" novalidate>\n <div\n [ngClass]=\"isMoreDetailsBoxHide ? 'govuk-radios__conditional govuk-radios__conditional--hidden' : isPaymentDetailsEmpty || isPaymentDetailsInvalid || paymentDetailsMinHasError || paymentDetailsMaxHasError ? 'govuk-radios__conditional inline-error-border' : 'govuk-radios__conditional'\"\n id=\"conditional-how-contacted-conditional-3\">\n <div class=\"govuk-form-group\">\n <span id=\"more-detail-hint\" class=\"govuk-hint govuk-font__custom\">\n Please enter details\n </span>\n <textarea class=\"govuk-textarea\"\n [ngClass]=\"{'inline-error-class': isPaymentDetailsEmpty || isPaymentDetailsInvalid || paymentDetailsMinHasError || paymentDetailsMaxHasError}\"\n id=\"moreDetails\" name=\"moreDetails\" rows=\"5\" formControlName=\"moreDetails\">\n </textarea>\n <p class=\"inline-error-message\"\n *ngIf=\"isPaymentDetailsEmpty || isPaymentDetailsInvalid || paymentDetailsMinHasError || paymentDetailsMaxHasError\">\n <span *ngIf=\"isPaymentDetailsEmpty\">Enter a explanation</span>\n <span *ngIf=\"isPaymentDetailsInvalid\">Enter a valid explanation</span>\n <span *ngIf=\"paymentDetailsMinHasError\">Explanation should be at least 3 characters.</span>\n <span *ngIf=\"paymentDetailsMaxHasError\">Explanation should be 255 characters or under.</span>\n </p>\n </div>\n </div>\n <div class=\"govuk-button--group\">\n <button type=\"submit\" [disabled]=\"isConfirmButtondisabled\"\n [ngClass]=\"isConfirmButtondisabled ? 'button button--disabled' : 'button'\"\n (click)=\"confirmAllocatePayement()\">\n Confirm\n </button>\n <button type=\"button\" class=\"button govuk-button--secondary\" (click)=\"cancelAllocatePayment($event)\">\n Cancel\n </button>\n </div>\n </form>\n </ng-container>\n</div>",
3685
- styles: [".allocate-payments{margin:20px 0}.allocate-payments .govuk-table__cell--col1,.allocate-payments .govuk-table__cell--col3{width:10%}.allocate-payments .govuk-table__cell--col2,.allocate-payments .govuk-table__cell--col6{width:25%}.allocate-payments .govuk-table__cell--col4,.allocate-payments .govuk-table__cell--col5{width:15%}.allocate-payments .govuk-button-group-allocate{display:flex;justify-content:flex-start}.allocate-payments .govuk-button--secondary{margin-left:10px;background-color:rgba(179,184,189,.9490196078431372)}.allocate-payments .govuk-custom-warning__message{font-size:30px;position:relative;top:12px;font-weight:700}.allocate-payments .govuk-warning-text-custom{margin-bottom:0!important;padding:10px 0 5px}.allocate-payments .govuk-table__custom--col1{padding-top:0;padding-bottom:20px;padding-left:15px}.allocate-payments .govuk-table__custom--col6{text-align:center}.allocate-payments .govuk-list__custom{padding-left:20px}.allocate-payments .govuk-font__custom,.allocate-payments .govuk-heading-m--custom,.allocate-payments .govuk-hint,.allocate-payments .govuk-label--m,.allocate-payments .govuk-list__custom,.allocate-payments .govuk-radios__item,.allocate-payments .govuk-warning-text__custom{font-size:19px}.allocate-payments .govuk-radios__conditional--hidden{display:none}.allocate-payments .form-group-error{border-left:5px solid #b10e1e;padding-left:15px}.allocate-payments .inline-error-class{outline:3px solid #a71414;outline-offset:0}.allocate-payments .inline-error-message{color:#a71414;font-weight:700;margin-top:10px}.allocate-payments .inline-error-border{border-color:#a71414}.allbtb{margin-top:2em}a:focus{background-color:#fd0;outline:2px solid #fd0}.casererf,.multiple-choice{font-size:19px}.casererf{align-self:flex-end}.paymentrequest{display:flex;flex-direction:row;justify-content:space-between;width:960px}"]
4263
+ template: "<div class=\"allocate-payments\">\n <ng-container *ngIf=\"viewStatus === 'mainForm' && !isTurnOff\">\n\n <div class=\"govuk-breadcrumbs\">\n <ol class=\"govuk-breadcrumbs__list\">\n <li class=\"govuk-breadcrumbs__list-item\">\n <a (click)=\"gotoCasetransationPage()\" class=\"govuk-back-link govuk-label\">Back</a>\n </li>\n </ol>\n </div>\n \n <div class=\"paymentrequest\">\n <h1 class=\"govuk-heading-xl govuk-!-margin-top-3 govuk-!-margin-bottom-4\">Select payment request</h1>\n <p class=\"govuk-!-margin-top-5 casererf\">Case reference: {{ccdReference}}</p>\n </div>\n \n <div *ngFor=\"let orderRef of orderLevelFees; let i = index;\" class=\"multiple-choice unprocessed-payments--radio-button\">\n <input id=\"'orderfee'+i+''\"\n aria-label=\"orderLevelRecord\"\n name=\"orderLevelRecord\"\n \n (click)=\"OrderListSelectEvent(orderRef.orderRefId)\"\n type=\"radio\"\n value=\"{{orderRef.orderTotalFees}}\" />\n <label for=\"radio-inline-1\"> {{orderRef.orderTotalFees | currency :'GBP':'symbol':'1.2-2'}}({{orderRef.orderStatus}})</label>\n </div>\n \n <div class=\"paymentrequest\">\n <button [disabled]=\"isContinueButtondisabled\" type=\"submit\" (click)=\"redirectToOrderFeeSearchPage()\" class=\"button allbtb button--disabled govuk-!-margin-right-1\">\n Continue\n </button>\n </div>\n \n </ng-container>\n\n <div *ngIf=\"viewStatus==='mainForm' && isTurnOff\">\n <input #myInput type='hidden' class='iFrameDrivenImageValue' value='ALLOCATEPAYMENTS'>\n <div class=\"govuk-breadcrumbs\" *ngIf=\"paymentRef\">\n <ol class=\"govuk-breadcrumbs__list\">\n <li class=\"govuk-breadcrumbs__list-item\">\n <a href=\"#\" (click)=\"gotoSummaryPage($event)\" class=\"govuk-back-link\">Back</a>\n </li>\n </ol>\n </div>\n <div class=\"govuk-heading-section\">\n <h1 class=\"govuk-heading-xl\">Allocate payment to fee group</h1>\n <h2 class=\"govuk-heading-l\">Amount left to be allocated:\n {{ unAllocatedPayment.amount | currency:'GBP':'symbol-narrow':'1.2-2' }}</h2>\n </div>\n <div class=\"payment-group-section\" *ngFor=\"let paymentGroup of paymentGroups\">\n <h3 class=\"govuk-heading-m\">Group reference: {{paymentGroup.payment_group_reference}}</h3>\n <table class=\"govuk-table\">\n <thead class=\"govuk-table__head\">\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__header\" scope=\"col\"></td>\n <td class=\"govuk-table__header\" scope=\"col\">Code</td>\n <td class=\"govuk-table__header\" scope=\"col\">Description</td>\n <td class=\"govuk-table__header\" scope=\"col\">Volume</td>\n <td class=\"govuk-table__header\" scope=\"col\">Fee amount</td>\n <td class=\"govuk-table__header\" scope=\"col\">Calculated amount</td>\n <td class=\"govuk-table__header\" scope=\"col\">Group amount outstanding</td>\n </tr>\n </thead>\n <tbody class=\"govuk-table__body\">\n <tr class=\"govuk-table__row\" *ngFor=\"let fee of paymentGroup.fees; let i = index;\">\n <td class=\"govuk-table__cell govuk-table__cell--col1 govuk-table__custom--col1\"\n [attr.rowspan]=\"paymentGroup.fees.length\" *ngIf=\"i==0\">\n <div class=\"multiple-choice\">\n <input id=\"unpaiedFee-{{i}}\" name=\"unassignedRecord\" type=\"radio\"\n (click)=\"selectedPaymentGroup(paymentGroup)\" />\n <label for=\"unpaiedFee-{{i}}\"></label>\n </div>\n </td>\n <td class=\"govuk-table__cell govuk-table__cell--col1\">{{fee.code}}</td>\n <td class=\"govuk-table__cell govuk-table__cell--col2\"> {{fee.description}} </td>\n <td class=\"govuk-table__cell govuk-table__cell--col3\"> {{fee.volume? fee.volume : '-'}} </td>\n <td class=\"govuk-table__cell govuk-table__cell--col4\">\n {{ fee.fee_amount | currency:'GBP':'symbol-narrow':'1.2-2' }} </td>\n <td class=\"govuk-table__cell govuk-table__cell--col5\">\n {{fee.calculated_amount | currency:'GBP':'symbol-narrow':'1.2-2' }} </td>\n <td class=\"govuk-table__cell govuk-table__cell--col6 govuk-table__custom--col6\"\n [attr.rowspan]=\"paymentGroup.fees.length\" *ngIf=\"i==0\">\n {{getGroupOutstandingAmount(paymentGroup) | currency:'GBP':'symbol-narrow':'1.2-2' }} </td>\n\n </tr>\n\n </tbody>\n <tbody class=\"govuk-table__body\" *ngIf=\"paymentGroup.fees.length==0\">\n <td class=\"govuk-table__cell\" colspan=\"6\">No payments recorded</td>\n </tbody>\n </table>\n </div>\n <div class=\"govuk-button-group-allocate\">\n <button type=\"button\" class=\"button govuk-!-margin-right-1\" [disabled]=\"isContinueButtondisabled\"\n (click)=\"saveAndContinue()\">\n Continue\n </button>\n <button type=\"button\" class=\"button govuk-button--secondary\" (click)=\"gotoCasetransationPage()\">\n Cancel\n </button>\n </div>\n </div>\n\n <ng-container *ngIf=\"(viewStatus === 'mainForm' && isTurnOff) || viewStatus === 'allocatePaymentConfirmation'\">\n <ccpay-error-banner *ngIf=\"errorMessage.showError\" [errorMessage]=\"errorMessage\"></ccpay-error-banner>\n <input #myInput type='hidden' class='iFrameDrivenImageValue' value='{{feedbackUrlLabel}}'>\n <h1 class=\"govuk-heading-xl\">Confirm allocation</h1>\n <h2 class=\"govuk-heading-l govuk-heading-l--custom\">\n Amount to be allocated: {{amountForAllocation | currency:'GBP':'symbol-narrow':'1.2-2'}}\n </h2>\n <div class=\"payment-group-section\" *ngIf=\"paymentGroup\">\n <h3 class=\"govuk-heading-m--custom\" *ngIf=\"isTurnOff\">Group reference: {{paymentGroup.payment_group_reference}}\n </h3>\n <table class=\"govuk-table\">\n <thead class=\"govuk-table__head\">\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__header\" scope=\"col\">Code</td>\n <td class=\"govuk-table__header\" scope=\"col\">Description</td>\n <td class=\"govuk-table__header\" scope=\"col\">Volume</td>\n <td class=\"govuk-table__header\" scope=\"col\">Fee amount</td>\n <td class=\"govuk-table__header\" scope=\"col\">Calculated amount</td>\n <td class=\"govuk-table__header\" scope=\"col\">Amount Due</td>\n </tr>\n </thead>\n <tbody class=\"govuk-table__body\">\n <tr class=\"govuk-table__row\" *ngFor=\"let fee of paymentGroup.fees; let i = index;\">\n <td class=\"govuk-table__cell govuk-table__cell--col1\">{{fee.code}}</td>\n <td class=\"govuk-table__cell govuk-table__cell--col2\"> {{fee.description}} </td>\n <td class=\"govuk-table__cell govuk-table__cell--col3\"> {{fee.volume? fee.volume : '-'}} </td>\n <td class=\"govuk-table__cell govuk-table__cell--col4\">\n {{ fee.fee_amount | currency:'GBP':'symbol-narrow':'1.2-2' }} </td>\n <td class=\"govuk-table__cell govuk-table__cell--col5\">\n {{fee.calculated_amount | currency:'GBP':'symbol-narrow':'1.2-2'}} </td>\n <td class=\"govuk-table__cell govuk-table__cell--col6\" [attr.rowspan]=\"paymentGroup.fees.length\"\n *ngIf=\"i==0\"> {{afterFeeAllocateOutstanding | currency:'GBP':'symbol-narrow':'1.2-2'}} </td>\n </tr>\n </tbody>\n <tbody class=\"govuk-table__body\" *ngIf=\"paymentGroup.fees.length == 0\">\n <td class=\"govuk-table__cell\" colspan=\"6\">No payments recorded</td>\n </tbody>\n </table>\n </div>\n <div class=\"govuk-warning-text\" *ngIf=\"isRemainingAmountGtZero || isRemainingAmountLtZero || remainingAmount === 0\">\n <span class=\"govuk-warning-text__icon\" aria-hidden=\"true\">!</span>\n <strong class=\"govuk-warning-text__text govuk-warning-text__custom\">\n <span class=\"govuk-warning-text__assistive\">Warning</span>\n {{paymentSectionLabel.title}} {{ remainingAmount | currency:'GBP':'symbol-narrow':'1.2-2' }}\n </strong>\n </div>\n <div class=\"govuk-form-group\" *ngIf=\"isRemainingAmountGtZero || isRemainingAmountLtZero\">\n <div class=\"govuk-form-group\">\n <fieldset class=\"govuk-fieldset\" aria-describedby=\"how-contacted-conditional-hint\">\n <span id=\"how-contacted-conditional-hint\" class=\"govuk-hint\"\n [ngClass]=\"{'inline-error-message': paymentReasonHasError}\">\n {{paymentSectionLabel.reason}}\n </span>\n <div\n [ngClass]=\"paymentReasonHasError ? 'govuk-radios govuk-radios--conditional form-group-error' : 'govuk-radios govuk-radios--conditional'\"\n data-module=\"govuk-radios\" *ngIf=\"isRemainingAmountGtZero\">\n <div class=\"govuk-radios__item\" *ngFor=\"let reason of reasonList.overPayment | keyValue\">\n <input class=\"govuk-radios__input\" id=\"{{reason.key}}\" name=\"paymentReason\" type=\"radio\"\n [(ngModel)]=\"paymentReason\" value={{reason.value}}>\n <label class=\"govuk-label govuk-radios__label govuk-font__custom\" for=\"how-contacted-conditional\">\n {{reason.value}}\n </label>\n </div>\n </div>\n <div\n [ngClass]=\"paymentReasonHasError ? 'govuk-radios govuk-radios--conditional form-group-error' : 'govuk-radios govuk-radios--conditional'\"\n data-module=\"govuk-radios\" *ngIf=\"isRemainingAmountLtZero\">\n <div class=\"govuk-radios__item\" *ngFor=\"let reason of reasonList.shortFall | keyValue\">\n <input class=\"govuk-radios__input\" id=\"{{reason.key}}\" name=\"paymentReason\" type=\"radio\"\n [(ngModel)]=\"paymentReason\" value={{reason.value}}>\n <label class=\"govuk-label govuk-radios__label govuk-font__custom\" for=\"how-contacted-conditional\">\n {{reason.value}}\n </label>\n </div>\n </div>\n </fieldset>\n </div>\n <div class=\"govuk-form-group\">\n <fieldset class=\"govuk-fieldset\" aria-describedby=\"how-contacted-conditional-hint\">\n <span id=\"how-contacted-conditional-hint\" class=\"govuk-hint\"\n [ngClass]=\"{'inline-error-message': paymentExplanationHasError}\">\n Provide an explanatory note\n </span>\n <div\n [ngClass]=\"paymentExplanationHasError ? 'govuk-radios govuk-radios--conditional form-group-error' : 'govuk-radios govuk-radios--conditional'\"\n data-module=\"govuk-radios\" *ngIf=\"isRemainingAmountGtZero\">\n <div class=\"govuk-radios__item\" *ngFor=\"let explanation of explanationList.overPayment | keyValue\">\n <input class=\"govuk-radios__input\" id=\"{{explanation.key}}\" name=\"paymentExplanation\" type=\"radio\"\n [(ngModel)]=\"paymentExplanation\" value={{explanation.value}}\n (click)=\"selectRadioButton(explanation.key, 'explanation')\">\n <label class=\"govuk-label govuk-radios__label govuk-font__custom\" for=\"how-contacted-conditional\">\n {{explanation.value}}\n </label>\n </div>\n </div>\n <div\n [ngClass]=\"paymentExplanationHasError ? 'govuk-radios govuk-radios--conditional form-group-error' : 'govuk-radios govuk-radios--conditional'\"\n data-module=\"govuk-radios\" *ngIf=\"isRemainingAmountLtZero\">\n <div class=\"govuk-radios__item\" *ngFor=\"let explanation of explanationList.shortFall | keyValue\">\n <input class=\"govuk-radios__input\" id=\"{{explanation.key}}\" name=\"paymentExplanation\" type=\"radio\"\n [(ngModel)]=\"paymentExplanation\" value={{explanation.value}}\n (click)=\"selectRadioButton(explanation.key, 'explanation')\">\n <label class=\"govuk-label govuk-radios__label govuk-font__custom\" for=\"how-contacted-conditional\">\n {{explanation.value}}\n </label>\n </div>\n </div>\n </fieldset>\n </div>\n </div>\n\n <form [formGroup]=\"overUnderPaymentForm\" novalidate>\n <div\n [ngClass]=\"isMoreDetailsBoxHide ? 'govuk-radios__conditional govuk-radios__conditional--hidden' : isPaymentDetailsEmpty || isPaymentDetailsInvalid || paymentDetailsMinHasError || paymentDetailsMaxHasError ? 'govuk-radios__conditional inline-error-border' : 'govuk-radios__conditional'\"\n id=\"conditional-how-contacted-conditional-3\">\n <div class=\"govuk-form-group\">\n <span id=\"more-detail-hint\" class=\"govuk-hint govuk-font__custom\">\n Please enter details\n </span>\n <textarea class=\"govuk-textarea\"\n [ngClass]=\"{'inline-error-class': isPaymentDetailsEmpty || isPaymentDetailsInvalid || paymentDetailsMinHasError || paymentDetailsMaxHasError}\"\n id=\"moreDetails\" name=\"moreDetails\" rows=\"5\" formControlName=\"moreDetails\">\n </textarea>\n <p class=\"inline-error-message\"\n *ngIf=\"isPaymentDetailsEmpty || isPaymentDetailsInvalid || paymentDetailsMinHasError || paymentDetailsMaxHasError\">\n <span *ngIf=\"isPaymentDetailsEmpty\">Enter a explanation</span>\n <span *ngIf=\"isPaymentDetailsInvalid\">Enter a valid explanation</span>\n <span *ngIf=\"paymentDetailsMinHasError\">Explanation should be at least 3 characters.</span>\n <span *ngIf=\"paymentDetailsMaxHasError\">Explanation should be 255 characters or under.</span>\n </p>\n </div>\n </div>\n <div class=\"govuk-button--group\">\n <button type=\"submit\" [disabled]=\"isConfirmButtondisabled\"\n [ngClass]=\"isConfirmButtondisabled ? 'button button--disabled' : 'button'\"\n (click)=\"confirmAllocatePayement()\">\n Confirm\n </button>\n <button type=\"button\" class=\"button govuk-button--secondary\" (click)=\"cancelAllocatePayment($event)\">\n Cancel\n </button>\n </div>\n </form>\n </ng-container>\n</div>",
4264
+ styles: [".allocate-payments{margin:20px 0}.allocate-payments .govuk-table__cell--col1,.allocate-payments .govuk-table__cell--col3{width:10%}.allocate-payments .govuk-table__cell--col2,.allocate-payments .govuk-table__cell--col6{width:25%}.allocate-payments .govuk-table__cell--col4,.allocate-payments .govuk-table__cell--col5{width:15%}.allocate-payments .govuk-button-group-allocate{display:flex;justify-content:flex-start}.allocate-payments .govuk-button--secondary{margin-left:10px;background-color:rgba(179,184,189,.9490196078431372)}.allocate-payments .govuk-custom-warning__message{font-size:30px;position:relative;top:12px;font-weight:700}.allocate-payments .govuk-warning-text-custom{margin-bottom:0!important;padding:10px 0 5px}.allocate-payments .govuk-table__custom--col1{padding-top:0;padding-bottom:20px;padding-left:15px}.allocate-payments .govuk-table__custom--col6{text-align:center}.allocate-payments .govuk-list__custom{padding-left:20px}.allocate-payments .govuk-font__custom,.allocate-payments .govuk-heading-m--custom,.allocate-payments .govuk-hint,.allocate-payments .govuk-label--m,.allocate-payments .govuk-list__custom,.allocate-payments .govuk-radios__item,.allocate-payments .govuk-warning-text__custom{font-size:19px}.allocate-payments .govuk-radios__conditional--hidden{display:none}.allocate-payments .form-group-error{border-left:5px solid #b10e1e;padding-left:15px}.allocate-payments .inline-error-class{outline:3px solid #a71414;outline-offset:0}.allocate-payments .inline-error-message{color:#a71414;font-weight:700;margin-top:10px}.allocate-payments .inline-error-border{border-color:#a71414}.allbtb{margin-top:2em}.govuk-back-link{font-size:1.5rem!important}.casererf,.multiple-choice{font-size:19px}.casererf{align-self:flex-end}.paymentrequest{display:flex;flex-direction:row;justify-content:space-between;width:960px}"]
3686
4265
  },] }
3687
4266
  ];
3688
4267
  AllocatePaymentsComponent.ctorParameters = () => [
@@ -3716,25 +4295,21 @@ class AddRetroRemissionRequest {
3716
4295
  }
3717
4296
  }
3718
4297
 
3719
- class PostRefundRetroRemission {
3720
- constructor(payment_reference, refund_reason) {
3721
- this.payment_reference = payment_reference;
3722
- this.refund_reason = refund_reason;
3723
- }
3724
- }
3725
-
3726
4298
  class PostIssueRefundRetroRemission {
3727
- constructor(remissionReference) {
4299
+ constructor(remissionReference, contactDeatils) {
3728
4300
  this.remissionReference = remissionReference;
4301
+ this.contact_details = contactDeatils;
3729
4302
  }
3730
4303
  }
3731
4304
 
3732
4305
  const BS_ENABLE_FLAG$1 = 'bulk-scan-enabling-fe';
4306
+ const resolvedPromise = Promise.resolve(null);
3733
4307
  class AddRemissionComponent {
3734
- constructor(formBuilder, router, paymentViewService, paymentLibComponent, refundService, cd, OrderslistService) {
4308
+ constructor(formBuilder, router, paymentViewService, notificationService, paymentLibComponent, refundService, cd, OrderslistService) {
3735
4309
  this.formBuilder = formBuilder;
3736
4310
  this.router = router;
3737
4311
  this.paymentViewService = paymentViewService;
4312
+ this.notificationService = notificationService;
3738
4313
  this.paymentLibComponent = paymentLibComponent;
3739
4314
  this.refundService = refundService;
3740
4315
  this.cd = cd;
@@ -3743,6 +4318,7 @@ class AddRemissionComponent {
3743
4318
  //@Output() refundListReason: EventEmitter<any> = new EventEmitter({reason:string, code:string});
3744
4319
  this.refundListReason = new EventEmitter();
3745
4320
  this.refundListAmount = new EventEmitter();
4321
+ this.refundFees = new EventEmitter();
3746
4322
  this.refund = {
3747
4323
  reason: {
3748
4324
  duplicate: 'Duplicate payment',
@@ -3771,8 +4347,12 @@ class AddRemissionComponent {
3771
4347
  this.isRemissionApplied = false;
3772
4348
  // refundReasons: any[] = [];
3773
4349
  this.commonRefundReasons = [];
4350
+ this.class = '';
4351
+ this.errorMsg = new Array();
3774
4352
  }
3775
4353
  ngOnInit() {
4354
+ this.errorMessage = '';
4355
+ this.errorMsg = [];
3776
4356
  this.default = 'Select a different reason';
3777
4357
  this.pattern1 = '^([a-zA-Z0-9]{3})-([a-zA-Z0-9]{3})-([a-zA-Z0-9]{3})$';
3778
4358
  this.pattern2 = '^([A-Za-z]{2}[0-9]{2})-([0-9]{6})$';
@@ -3785,6 +4365,7 @@ class AddRemissionComponent {
3785
4365
  this.amount = (this.fee.volume * this.fee.calculated_amount);
3786
4366
  }
3787
4367
  if (this.payment) {
4368
+ this.paymentReference = this.payment.reference;
3788
4369
  this.remessionPayment = this.payment;
3789
4370
  if (this.payment.status === 'Success') {
3790
4371
  this.isPaymentSuccess = true;
@@ -3803,26 +4384,156 @@ class AddRemissionComponent {
3803
4384
  ])),
3804
4385
  refundReason: new FormControl('', Validators.compose([Validators.required])),
3805
4386
  refundDDReason: new FormControl('', Validators.compose([Validators.required])),
3806
- reason: new FormControl()
4387
+ reason: new FormControl(),
4388
+ feeAmount: new FormControl(),
4389
+ feesList: this.formBuilder.array([])
3807
4390
  });
3808
4391
  const remissionctrls = this.remissionForm.controls;
3809
4392
  remissionctrls['refundDDReason'].setValue('Select a different reason', { onlySelf: true });
4393
+ if (this.refundPaymentReference !== undefined && this.refundPaymentReference.length > 0) {
4394
+ this.paymentReference = this.refundPaymentReference;
4395
+ }
4396
+ else {
4397
+ this.paymentReference = (this.payment !== undefined) ? this.payment.reference : '';
4398
+ }
4399
+ if (this.isFromServiceRequestPage) {
4400
+ this.paymentViewService.getApportionPaymentDetails(this.paymentReference).subscribe(paymentGroup => {
4401
+ let fees = [];
4402
+ paymentGroup.fees.forEach(fee => {
4403
+ this.isRemissionsMatch = false;
4404
+ paymentGroup.remissions.forEach(rem => {
4405
+ if (rem.fee_code === fee.code) {
4406
+ this.isRemissionsMatch = true;
4407
+ fee['remissions'] = rem;
4408
+ fees.push(fee);
4409
+ }
4410
+ });
4411
+ if (!this.isRemissionsMatch) {
4412
+ fees.push(fee);
4413
+ }
4414
+ });
4415
+ paymentGroup.fees = fees;
4416
+ this.paymentFees = fees;
4417
+ this.fees = fees;
4418
+ this.paymentGroup = paymentGroup;
4419
+ this.paymentGroup.payments = this.paymentGroup.payments.filter(paymentGroupObj => paymentGroupObj['reference'].includes(this.paymentLibComponent.paymentReference));
4420
+ // const paymentAllocation = this.paymentGroup.payments[0].payment_allocation;
4421
+ // this.isStatusAllocated = paymentAllocation.length > 0 && paymentAllocation[0].allocation_status === 'Allocated' || paymentAllocation.length === 0;
4422
+ this.refundFeesList();
4423
+ }, (error) => this.errorMessage = error);
4424
+ }
4425
+ if (this.fees && this.viewCompStatus === 'issuerefund') {
4426
+ this.refundFeesList();
4427
+ }
3810
4428
  if (this.viewCompStatus === '') {
3811
4429
  this.viewStatus = 'main';
3812
4430
  }
3813
- if (this.viewCompStatus === 'issuerefund') {
4431
+ if (this.viewCompStatus === 'issuerefundpage1') {
3814
4432
  this.refundService.getRefundReasons().subscribe(refundReasons => {
3815
4433
  this.refundReasons = refundReasons.filter((data) => data.recently_used === false);
3816
- this.refundReasons = this.refundReasons.filter((data) => data.name !== 'Retrospective remission');
4434
+ this.refundReasons = this.refundReasons.filter((data) => data.name !== 'Retrospective remission' && data.name !== 'Overpayment');
3817
4435
  this.cd.detectChanges();
3818
4436
  this.commonRefundReasons = refundReasons.filter((data) => data.recently_used === true);
3819
4437
  this.commonRefundReasons.sort((a, b) => a.toString().localeCompare(b));
3820
4438
  this.cd.detectChanges();
3821
4439
  });
4440
+ this.refundReason = this.changeRefundReason;
3822
4441
  }
3823
4442
  if (this.viewCompStatus === 'processretroremissonpage' && this.isFromRefundListPage) {
3824
4443
  this.viewStatus = 'processretroremissonpage';
3825
4444
  }
4445
+ if (this.orderDetail !== undefined) {
4446
+ this.paymentViewService.getApportionPaymentDetails(this.orderDetail[0].payments[0].reference).subscribe(paymentGroup => {
4447
+ this.fees = paymentGroup.fees;
4448
+ this.paymentReference = paymentGroup.payments[0].reference;
4449
+ }, (error) => this.errorMessage = error);
4450
+ }
4451
+ }
4452
+ goToPaymentViewComponent() {
4453
+ this.paymentLibComponent.paymentMethod = this.payment.method;
4454
+ this.paymentLibComponent.paymentGroupReference = this.paymentGroupRef;
4455
+ this.paymentLibComponent.paymentReference = this.paymentReference;
4456
+ //this.PaymentViewComponent.viewCompStatus = 'overpayment';
4457
+ this.paymentLibComponent.viewName = 'payment-view';
4458
+ }
4459
+ refundFeesList() {
4460
+ const creds = this.remissionForm.controls.feesList;
4461
+ // if(creds.controls.length > 0) {
4462
+ for (var i = 0; i < this.fees.length; i++) {
4463
+ creds.push(this.formBuilder.group({
4464
+ id: this.fees[i].id,
4465
+ code: this.fees[i].code,
4466
+ volume: this.fees[i].volume,
4467
+ calculated_amount: this.fees[i].calculated_amount,
4468
+ apportion_amount: this.fees[i].apportion_amount,
4469
+ ccd_case_number: this.fees[i].ccd_case_number,
4470
+ description: this.fees[i].description,
4471
+ net_amount: this.fees[i].net_amount,
4472
+ version: this.fees[i].version,
4473
+ refund_amount: [''],
4474
+ selected: [''],
4475
+ updated_volume: this.fees[i].volume
4476
+ }));
4477
+ }
4478
+ this.cd.detectChanges();
4479
+ //}
4480
+ }
4481
+ get feesList() {
4482
+ const dd = this.remissionForm.get('feesList');
4483
+ return this.remissionForm.get('feesList');
4484
+ }
4485
+ noneSelected() {
4486
+ if (this.isFullyRefund) {
4487
+ return false;
4488
+ }
4489
+ else {
4490
+ if (!this.feesList.controls.some(item => item.get('selected').value === true)) {
4491
+ this.errorMsg = [];
4492
+ [].forEach.call(document.querySelectorAll('input'), function (el) {
4493
+ el.classList.remove('inline-error-class');
4494
+ });
4495
+ }
4496
+ return !this.feesList.controls.some(item => item.get('selected').value === true);
4497
+ }
4498
+ }
4499
+ check_en(i, v1, AppAmt, Volume) {
4500
+ const ele = document.getElementById(v1);
4501
+ const formArray = this.remissionForm.controls.feesList;
4502
+ if (ele.checked) {
4503
+ formArray.at(i).get('refund_amount').setValue(AppAmt);
4504
+ formArray.at(i).get('volume').setValue(Volume);
4505
+ formArray.at(i).get('selected').setValue(true);
4506
+ formArray.at(i).get('updated_volume').setValue(Volume);
4507
+ document.getElementById('feeAmount_' + v1).value = AppAmt;
4508
+ document.getElementById('feeAmount_' + v1).removeAttribute("disabled");
4509
+ if (Volume === 1) {
4510
+ document.getElementById('VolumeUpdated_' + v1).value = Volume;
4511
+ }
4512
+ else {
4513
+ document.getElementById('feeVolumeUpdated_' + v1).value = Volume;
4514
+ }
4515
+ if (document.getElementById('feeVolumeUpdated_' + v1) !== null) {
4516
+ document.getElementById('feeAmount_' + v1).removeAttribute("disabled");
4517
+ document.getElementById('feeVolumeUpdated_' + v1).removeAttribute("disabled");
4518
+ }
4519
+ this.cd.detectChanges();
4520
+ }
4521
+ else {
4522
+ this.errorMsg = [];
4523
+ document.getElementById('feeAmount_' + v1).setAttribute("disabled", "true");
4524
+ this.remissionForm.value.feesList[i]["refund_amount"] = '';
4525
+ this.remissionForm.value.feesList[i]["volume"] = '';
4526
+ this.remissionForm.value.feesList[i]["selected"] = false;
4527
+ document.getElementById('feeAmount_' + v1).value = '';
4528
+ if (Volume > 1) {
4529
+ this.remissionForm.value.feesList[i]["volume"] = '';
4530
+ document.getElementById('feeVolumeUpdated_' + v1).value = '';
4531
+ }
4532
+ if (document.getElementById('feeVolumeUpdated_' + v1) !== null) {
4533
+ document.getElementById('feeVolumeUpdated_' + v1).removeAttribute("disabled");
4534
+ }
4535
+ this.cd.detectChanges();
4536
+ }
3826
4537
  }
3827
4538
  addRemission() {
3828
4539
  this.resetRemissionForm([false, false, false, false, false, false], 'All');
@@ -3896,6 +4607,8 @@ class AddRemissionComponent {
3896
4607
  // Add retro remission changes
3897
4608
  addRemissionCode() {
3898
4609
  this.errorMessage = false;
4610
+ // this.isFromCheckAnsPage = true;
4611
+ this.errorMsg = [];
3899
4612
  this.viewStatus = '';
3900
4613
  this.isRefundRemission = false;
3901
4614
  this.resetRemissionForm([false, false, false, false, false, false], 'All');
@@ -3905,8 +4618,14 @@ class AddRemissionComponent {
3905
4618
  this.remissionForm.controls['refundDDReason'].setErrors(null);
3906
4619
  this.remissionForm.controls['amount'].setErrors(null);
3907
4620
  if (this.remissionForm.dirty && this.remissionForm.valid) {
3908
- this.viewCompStatus = '';
3909
- this.viewStatus = "processretroremissonpage";
4621
+ if (!this.isFromCheckAnsPage) {
4622
+ this.viewCompStatus = '';
4623
+ this.viewStatus = "processretroremissonpage";
4624
+ }
4625
+ else {
4626
+ this.viewCompStatus = '';
4627
+ this.viewStatus = 'checkretroremissionpage';
4628
+ }
3910
4629
  }
3911
4630
  else {
3912
4631
  if (remissionctrls['remissionCode'].value == '') {
@@ -3931,8 +4650,9 @@ class AddRemissionComponent {
3931
4650
  }
3932
4651
  gotoAddRetroRemissionCodePage() {
3933
4652
  this.errorMessage = false;
4653
+ this.isFromCheckAnsPage = false;
4654
+ this.errorMsg = [];
3934
4655
  if (this.isRefundRemission) {
3935
- this.paymentLibComponent.iscancelClicked = true;
3936
4656
  this.refundListAmount.emit();
3937
4657
  this.paymentLibComponent.isFromRefundStatusPage = true;
3938
4658
  return;
@@ -3948,6 +4668,7 @@ class AddRemissionComponent {
3948
4668
  this.viewCompStatus = "addremission";
3949
4669
  this.isRefundRemission = true;
3950
4670
  this.errorMessage = '';
4671
+ this.errorMsg = [];
3951
4672
  if (this.isFromPaymentDetailPage) {
3952
4673
  this.paymentLibComponent.viewName = 'payment-view';
3953
4674
  }
@@ -3988,11 +4709,30 @@ class AddRemissionComponent {
3988
4709
  //}
3989
4710
  }
3990
4711
  }
4712
+ gotoAmountRetroRemission() {
4713
+ this.isFromCheckAnsPage = false;
4714
+ this.viewStatus = 'processretroremissonpage';
4715
+ this.viewCompStatus = '';
4716
+ // this.isRefundRemission = true;
4717
+ this.errorMessage = '';
4718
+ }
3991
4719
  gotoProcessRetroRemissionPage() {
4720
+ this.isFromCheckAnsPage = true;
3992
4721
  this.viewStatus = '';
3993
4722
  this.viewCompStatus = 'addremission';
3994
4723
  this.isRefundRemission = true;
3995
4724
  this.errorMessage = '';
4725
+ this.errorMsg = [];
4726
+ }
4727
+ gotoProcessRetroRemission(note) {
4728
+ if (note) {
4729
+ this.notification = { contact_details: note, notification_type: note.notification_type };
4730
+ }
4731
+ this.isFromCheckAnsPage = true;
4732
+ this.viewStatus = 'remissionAddressPage';
4733
+ this.viewCompStatus = '';
4734
+ this.isRefundRemission = true;
4735
+ this.errorMessage = '';
3996
4736
  }
3997
4737
  confirmRetroRemission() {
3998
4738
  if (!this.isConfirmationBtnDisabled) {
@@ -4015,6 +4755,7 @@ class AddRemissionComponent {
4015
4755
  }
4016
4756
  processRefund() {
4017
4757
  this.errorMessage = '';
4758
+ this.errorMsg = [];
4018
4759
  this.isConfirmationBtnDisabled = true;
4019
4760
  if (this.isRefundRemission) {
4020
4761
  this.retroRemission = true;
@@ -4022,7 +4763,7 @@ class AddRemissionComponent {
4022
4763
  if (this.remissionReference === undefined || this.remissionReference === '') {
4023
4764
  this.remissionReference = this.remission.remission_reference;
4024
4765
  }
4025
- const requestBody = new PostIssueRefundRetroRemission(this.remissionReference);
4766
+ const requestBody = new PostIssueRefundRetroRemission(this.remissionReference, this.contactDetailsObj);
4026
4767
  this.paymentViewService.postRefundRetroRemission(requestBody).subscribe(response => {
4027
4768
  if (JSON.parse(response)) {
4028
4769
  this.viewCompStatus = '';
@@ -4041,7 +4782,9 @@ class AddRemissionComponent {
4041
4782
  if (this.paymentLibComponent.REFUNDLIST === "true") {
4042
4783
  this.isFromRefundListPage = true;
4043
4784
  }
4785
+ this.totalRefundAmount = this.remissionForm.value.feesList.reduce((a, c) => a + c.refund_amount * c.selected, 0);
4044
4786
  this.errorMessage = '';
4787
+ this.errorMsg = [];
4045
4788
  this.refundReason = this.remissionForm.controls['refundReason'].value === null ? this.remissionForm.controls['refundDDReason'].value : this.remissionForm.controls['refundReason'].value;
4046
4789
  if (!this.refundReason || this.refundReason === 'Select a different reason') {
4047
4790
  this.refundHasError = true;
@@ -4057,19 +4800,35 @@ class AddRemissionComponent {
4057
4800
  this.refundListReason.emit({ reason: this.displayRefundReason, code: this.refundReason });
4058
4801
  }
4059
4802
  else {
4803
+ if (this.isFromCheckAnsPage) {
4804
+ this.totalRefundAmount = this.remissionForm.value.feesList.reduce((a, c) => a + c.refund_amount * c.selected, 0);
4805
+ this.isFromCheckAnsPage = false;
4806
+ this.viewStatus = 'checkissuerefundpage';
4807
+ this.viewCompStatus = '';
4808
+ this.notificationPreview = false;
4809
+ return;
4810
+ }
4060
4811
  this.viewCompStatus = '';
4061
- this.viewStatus = 'checkissuerefundpage';
4812
+ this.viewStatus = 'contactDetailsPage';
4062
4813
  }
4063
4814
  }
4064
4815
  else {
4065
4816
  this.displayRefundReason = this.selectedRefundReason;
4817
+ if (this.isFromCheckAnsPage) {
4818
+ this.totalRefundAmount = this.remissionForm.value.feesList.reduce((a, c) => a + c.refund_amount * c.selected, 0);
4819
+ this.isFromCheckAnsPage = false;
4820
+ this.viewStatus = 'checkissuerefundpage';
4821
+ this.viewCompStatus = '';
4822
+ this.notificationPreview = false;
4823
+ return;
4824
+ }
4066
4825
  if (this.isFromRefundListPage) {
4067
4826
  this.paymentLibComponent.isFromRefundStatusPage = true;
4068
4827
  this.refundListReason.emit({ reason: this.selectedRefundReason, code: this.refundReason });
4069
4828
  }
4070
4829
  else {
4071
4830
  this.viewCompStatus = '';
4072
- this.viewStatus = 'checkissuerefundpage';
4831
+ this.viewStatus = 'contactDetailsPage';
4073
4832
  }
4074
4833
  }
4075
4834
  }
@@ -4079,25 +4838,172 @@ class AddRemissionComponent {
4079
4838
  this.viewStatus = '';
4080
4839
  this.isRefundRemission = true;
4081
4840
  this.errorMessage = false;
4841
+ this.errorMsg = [];
4082
4842
  this.refundHasError = false;
4083
4843
  this.isReasonEmpty = false;
4084
4844
  }
4845
+ gotoIssuePage(isFullyRefund) {
4846
+ if (isFullyRefund) {
4847
+ this.viewCompStatus = 'issuerefundpage1';
4848
+ this.getRefundReasons();
4849
+ }
4850
+ else {
4851
+ [].forEach.call(document.querySelectorAll('input'), function (el) {
4852
+ el.classList.remove('inline-error-class');
4853
+ });
4854
+ var checkboxs = document.getElementsByTagName('input');
4855
+ this.errorMessage = '';
4856
+ this.totalRefundAmount = 0;
4857
+ this.errorMsg = [];
4858
+ for (var j = 0; j < checkboxs.length; j++) {
4859
+ if (checkboxs[j].checked) {
4860
+ this.fullRefund = false;
4861
+ let quantity = +document.getElementById('feeVolume_' + checkboxs[j].value).value;
4862
+ let amountToRefund = +document.getElementById('feeAmount_' + checkboxs[j].value).value;
4863
+ let apportionAmount = +document.getElementById('feeApportionAmount_' + checkboxs[j].value).value;
4864
+ let calculatedAmount = +document.getElementById('calculatedAmount_' + checkboxs[j].value).value;
4865
+ if (amountToRefund === apportionAmount) {
4866
+ this.fullRefund = true;
4867
+ }
4868
+ if (amountToRefund === 0) {
4869
+ this.elementId = 'feeAmount_' + checkboxs[j].value;
4870
+ this.errorMsg.push('You need to enter a refund amount');
4871
+ this.getErrorClass(this.elementId);
4872
+ }
4873
+ if (quantity === 1) {
4874
+ if (amountToRefund > 0 && amountToRefund > apportionAmount) {
4875
+ this.elementId = 'feeAmount_' + checkboxs[j].value;
4876
+ this.errorMsg.push('The amount you want to refund is more than the amount paid');
4877
+ this.getErrorClass(this.elementId);
4878
+ }
4879
+ }
4880
+ if (quantity > 1) {
4881
+ this.quantityUpdated = +document.getElementById('feeVolumeUpdated_' + checkboxs[j].value).value;
4882
+ if (this.quantityUpdated === 0) {
4883
+ this.elementId = 'feeVolumeUpdated_' + checkboxs[j].value;
4884
+ this.errorMsg.push('You need to enter quantity');
4885
+ this.getErrorClass(this.elementId);
4886
+ }
4887
+ if (this.fullRefund && quantity !== this.quantityUpdated) {
4888
+ this.elementId = 'feeVolumeUpdated_' + checkboxs[j].value;
4889
+ this.errorMsg.push('The quantity you want to refund should be maximun available quantity');
4890
+ this.getErrorClass(this.elementId);
4891
+ }
4892
+ if (!this.fullRefund && this.quantityUpdated > 0 && amountToRefund > 0) {
4893
+ this.refundAmtForFeeVolumes = +document.getElementById('feeVOl_' + checkboxs[j].value).innerText;
4894
+ this.allowedRefundAmount = this.quantityUpdated * this.refundAmtForFeeVolumes;
4895
+ if (this.allowedRefundAmount !== amountToRefund) {
4896
+ this.elementId = 'feeAmount_' + checkboxs[j].value;
4897
+ this.errorMsg.push('The Amount to Refund should be equal to the product of Fee Amount and quantity');
4898
+ this.getErrorClass(this.elementId);
4899
+ }
4900
+ }
4901
+ if (!this.fullRefund && amountToRefund > apportionAmount) {
4902
+ this.elementId = 'feeAmount_' + checkboxs[j].value;
4903
+ this.errorMsg.push('The amount you want to refund is more than the amount paid');
4904
+ this.getErrorClass(this.elementId);
4905
+ }
4906
+ if (!this.fullRefund && this.quantityUpdated > 0 && this.quantityUpdated > quantity) {
4907
+ this.elementId = 'feeVolumeUpdated_' + checkboxs[j].value;
4908
+ this.errorMsg.push('The quantity you want to refund is more than the available quantity');
4909
+ this.getErrorClass(this.elementId);
4910
+ }
4911
+ }
4912
+ //this.remissionForm.value.feesList.find(id=>id=checkboxs[j].value)['refund_amount'] = apportionAmount;
4913
+ }
4914
+ }
4915
+ if (this.errorMsg.length === 0) {
4916
+ if (this.isFromCheckAnsPage) {
4917
+ this.isFromCheckAnsPage = false;
4918
+ this.totalRefundAmount = this.remissionForm.value.feesList.reduce((a, c) => a + c.refund_amount * c.selected, 0);
4919
+ this.fees = this.remissionForm.value.feesList.filter(value => value.selected === true);
4920
+ this.viewStatus = 'checkissuerefundpage';
4921
+ this.viewCompStatus = '';
4922
+ this.notificationPreview = false;
4923
+ return;
4924
+ }
4925
+ else if (this.isFromRefundStatusPage) {
4926
+ var remissionctrls = this.remissionForm.controls;
4927
+ this.totalRefundAmount = this.remissionForm.value.feesList.reduce((a, c) => a + c.refund_amount * c.selected, 0);
4928
+ this.refundListAmount.emit(this.totalRefundAmount.toString());
4929
+ this.fees = this.remissionForm.value.feesList.filter(value => value.selected === true);
4930
+ this.refundFees.emit(this.fees);
4931
+ return;
4932
+ }
4933
+ this.viewCompStatus = 'issuerefundpage1';
4934
+ this.getRefundReasons();
4935
+ }
4936
+ }
4937
+ }
4938
+ calAmtToRefund(value, amount, volume, i) {
4939
+ const volumeFee = amount / volume;
4940
+ const amtToRefund = value * volumeFee;
4941
+ const formArray = this.remissionForm.controls.feesList;
4942
+ formArray.at(i).get('refund_amount').setValue(amtToRefund);
4943
+ // formArray.at(i).get('volume').setValue(value);
4944
+ // (<HTMLInputElement>document.getElementById('feeAmount_'+i)).value = +amtToRefund;
4945
+ // const formControl = this.remissionForm.controls.feesList['volume'].at(i);
4946
+ // formControl.setValue(value);
4947
+ }
4948
+ gotoContactDetailsPage(note) {
4949
+ if (note) {
4950
+ this.notification = { contact_details: note, notification_type: note.notification_type };
4951
+ }
4952
+ this.errorMessage = '';
4953
+ this.viewCompStatus = '';
4954
+ this.viewStatus = 'contactDetailsPage';
4955
+ this.isRefundRemission = true;
4956
+ this.errorMessage = false;
4957
+ }
4958
+ getRefundReasons() {
4959
+ if (this.viewCompStatus === 'issuerefundpage1') {
4960
+ this.refundService.getRefundReasons().subscribe(refundReasons => {
4961
+ this.refundReasons = refundReasons.filter((data) => data.recently_used === false);
4962
+ this.refundReasons = this.refundReasons.filter((data) => data.name !== 'Retrospective remission');
4963
+ this.cd.detectChanges();
4964
+ this.commonRefundReasons = refundReasons.filter((data) => data.recently_used === true);
4965
+ this.commonRefundReasons.sort((a, b) => a.toString().localeCompare(b));
4966
+ this.cd.detectChanges();
4967
+ });
4968
+ }
4969
+ }
4970
+ getErrorClass(elementId) {
4971
+ if (this.errorMsg.length > 0) {
4972
+ const ele = document.getElementById(elementId);
4973
+ ele.classList.add('inline-error-class');
4974
+ }
4975
+ }
4085
4976
  changeIssueRefundReason() {
4086
- // this.remissionForm.controls['refundReason'].setValue('Duplicate payment');
4977
+ this.isFromCheckAnsPage = true;
4087
4978
  this.errorMessage = '';
4979
+ this.errorMsg = [];
4088
4980
  this.refundHasError = false;
4089
4981
  this.isReasonEmpty = false;
4090
- this.viewCompStatus = 'issuerefund';
4982
+ this.viewCompStatus = 'issuerefundpage1';
4091
4983
  this.viewStatus = '';
4092
4984
  this.isRefundRemission = true;
4093
4985
  }
4094
- confirmIssueRefund() {
4986
+ confirmIssueRefund(isFullyRefund) {
4095
4987
  this.isConfirmationBtnDisabled = true;
4096
4988
  this.errorMessage = '';
4989
+ this.errorMsg = [];
4097
4990
  if (this.isRefundRemission) {
4098
4991
  this.retroRemission = true;
4099
4992
  }
4100
- const requestBody = new PostRefundRetroRemission(this.payment.reference, this.refundReason);
4993
+ if (isFullyRefund) {
4994
+ this.totalRefundAmount = this.payment.amount;
4995
+ }
4996
+ if (!isFullyRefund) {
4997
+ this.fees = this.remissionForm.value.feesList.filter(value => value.selected === true);
4998
+ }
4999
+ this.fees = this.fees.map(obj => ({ id: obj.id,
5000
+ code: obj.code,
5001
+ version: obj.version,
5002
+ apportion_amount: obj.apportion_amount,
5003
+ calculated_amount: obj.calculated_amount,
5004
+ updated_volume: obj.updated_volume ? obj.updated_volume : obj.volume,
5005
+ refund_amount: obj.refund_amount ? obj.refund_amount : this.totalRefundAmount }));
5006
+ const requestBody = new PostRefundRetroRemission(this.contactDetailsObj, this.fees, this.payment.reference, this.refundReason, this.totalRefundAmount, 'op');
4101
5007
  this.paymentViewService.postRefundsReason(requestBody).subscribe(response => {
4102
5008
  if (JSON.parse(response)) {
4103
5009
  this.viewCompStatus = '';
@@ -4113,43 +5019,52 @@ class AddRemissionComponent {
4113
5019
  this.cd.detectChanges();
4114
5020
  });
4115
5021
  }
4116
- // Retro Refund
4117
- confirmRetroRefund() {
4118
- this.isConfirmationBtnDisabled = true;
4119
- this.errorMessage = '';
4120
- if (this.isRefundRemission) {
4121
- this.retroRemission = true;
4122
- }
4123
- const requestBody = new PostRefundRetroRemission(this.payment.reference, 'RR004-Retrospective remission');
4124
- this.paymentViewService.postRefundsReason(requestBody).subscribe(response => {
4125
- if (JSON.parse(response)) {
4126
- this.viewCompStatus = '';
4127
- this.viewStatus = 'retrorefundconfirmationpage';
4128
- this.refundReference = JSON.parse(response).refund_reference;
4129
- if (JSON.parse(response).refund_amount) {
4130
- this.refundAmount = JSON.parse(response).refund_amount;
4131
- }
4132
- }
4133
- }, (error) => {
4134
- this.errorMessage = error;
4135
- this.isConfirmationBtnDisabled = false;
4136
- });
5022
+ gotoRefundReasonPage() {
5023
+ this.viewStatus = '';
5024
+ this.viewCompStatus = 'issuerefundpage1';
4137
5025
  }
5026
+ // Retro Refund
5027
+ // confirmRetroRefund() {
5028
+ // this.isConfirmationBtnDisabled = true;
5029
+ // this.errorMessage = '';
5030
+ // this.errorMsg = [];
5031
+ // if( this.isRefundRemission) {
5032
+ // this.retroRemission = true;
5033
+ // }
5034
+ // const requestBody = new PostRefundRetroRemission(this.payment.reference,'RR004-Retrospective remission', this.contactDetailsObj);
5035
+ // this.paymentViewService.postRefundsReason(requestBody).subscribe(
5036
+ // response => {
5037
+ // if (JSON.parse(response)) {
5038
+ // this.viewCompStatus = '';
5039
+ // this.viewStatus = 'retrorefundconfirmationpage';
5040
+ // this.refundReference =JSON.parse(response).refund_reference;
5041
+ // if(JSON.parse(response).refund_amount) {
5042
+ // this.refundAmount = JSON.parse(response).refund_amount;
5043
+ // }
5044
+ // }
5045
+ // },
5046
+ // (error: any) => {
5047
+ // this.errorMessage = error;
5048
+ // this.isConfirmationBtnDisabled = false;
5049
+ // });
5050
+ // }
4138
5051
  selectRadioButton(key, value) {
4139
- localStorage.setItem("myradio", key);
5052
+ localStorage.setItem("myradio", value);
4140
5053
  const remissionctrls = this.remissionForm.controls;
4141
5054
  remissionctrls['refundDDReason'].setValue('Select a different reason', { onlySelf: true });
4142
5055
  remissionctrls['reason'].reset();
4143
5056
  this.isRefundReasonsSelected = true;
4144
5057
  this.errorMessage = false;
5058
+ this.errorMsg = [];
4145
5059
  this.isReasonEmpty = false;
4146
5060
  this.showReasonText = false;
4147
5061
  this.refundHasError = false;
4148
- this.selectedRefundReason = key;
5062
+ this.selectedRefundReason = value;
5063
+ this.selectedRefundReasonCode = key;
4149
5064
  if (this.selectedRefundReason.includes('Other')) {
4150
5065
  this.showReasonText = true;
4151
5066
  this.refundHasError = false;
4152
- this.refundReason = key;
5067
+ this.refundReason = value;
4153
5068
  }
4154
5069
  }
4155
5070
  selectchange(args) {
@@ -4160,6 +5075,7 @@ class AddRemissionComponent {
4160
5075
  this.showReasonText = false;
4161
5076
  this.refundHasError = false;
4162
5077
  this.selectedRefundReason = args.target.options[args.target.options.selectedIndex].id;
5078
+ this.selectedRefundReasonCode = args.target.options[args.target.options.selectedIndex].value;
4163
5079
  this.reasonLength = (29 - this.selectedRefundReason.split('- ')[1].length);
4164
5080
  if (this.selectedRefundReason.includes('Other')) {
4165
5081
  this.showReasonText = true;
@@ -4167,9 +5083,42 @@ class AddRemissionComponent {
4167
5083
  this.refundReason = args.target.options[args.target.options.selectedIndex].id;
4168
5084
  }
4169
5085
  }
5086
+ getContactDetails(obj, type) {
5087
+ this.contactDetailsObj = obj;
5088
+ this.viewCompStatus = '';
5089
+ this.notificationPreview = false;
5090
+ if (type == 'checkaddRefundpage') {
5091
+ this.getTemplateInstructionType(this.remessionPayment.reference, this.remessionPayment);
5092
+ }
5093
+ else if (type == 'checkissuerefundpage') {
5094
+ this.getTemplateInstructionType(this.payment.reference, this.payment);
5095
+ }
5096
+ else if (type == 'addrefundcheckandanswer') {
5097
+ this.getTemplateInstructionType(this.paymentReference, this.paymentObj);
5098
+ }
5099
+ this.viewStatus = type;
5100
+ }
5101
+ gotoPartialFeeRefundScreen() {
5102
+ if (this.isFromRefundStatusPage) {
5103
+ var remissionctrls = this.remissionForm.controls;
5104
+ this.refundListReason.emit({ reason: this.displayRefundReason, code: this.refundReason });
5105
+ return;
5106
+ }
5107
+ this.refundHasError = false;
5108
+ this.viewCompStatus = 'issuerefund';
5109
+ this.viewStatus = '';
5110
+ }
4170
5111
  gotoServiceRequestPage(event) {
4171
5112
  this.errorMessage = '';
5113
+ this.errorMsg = [];
5114
+ this.isFromCheckAnsPage = false;
4172
5115
  event.preventDefault();
5116
+ if (this.isFromRefundStatusPage) {
5117
+ var remissionctrls = this.remissionForm.controls;
5118
+ this.totalRefundAmount = 0;
5119
+ this.refundListAmount.emit(this.totalRefundAmount.toString());
5120
+ return;
5121
+ }
4173
5122
  if (this.isFromServiceRequestPage && !this.isFromPaymentDetailPage) {
4174
5123
  this.viewStatus = 'order-full-view';
4175
5124
  this.viewCompStatus = '';
@@ -4200,68 +5149,29 @@ class AddRemissionComponent {
4200
5149
  }
4201
5150
  this.viewCompStatus = '';
4202
5151
  }
4203
- // if (this.paymentLibComponent.TAKEPAYMENT === undefined && this.paymentLibComponent.SERVICEREQUEST === undefined) {
4204
- // this.paymentLibComponent.SERVICEREQUEST = 'false';
4205
- // this.paymentLibComponent.TAKEPAYMENT = false;
4206
- // }
4207
- // if (this.isFromServiceRequestPage) {
4208
- // //this.paymentLibComponent.TAKEPAYMENT = false;
4209
- // this.paymentLibComponent.isFromRefundStatusPage = false;
4210
- // this.viewStatus = 'main'
4211
- // this.paymentLibComponent.viewName = 'case-transactions';
4212
- // this.OrderslistService.setisFromServiceRequestPage(true);
4213
- // this.OrderslistService.setnavigationPage('servicerequestpage');
4214
- // }
4215
- // if ( this.isFromRefundListPage ) {
4216
- // this.paymentLibComponent.iscancelClicked = true;
4217
- // this.refundListReason.emit({reason: this.selectedRefundReason, code: this.refundReason});
4218
- // this.paymentLibComponent.isFromRefundStatusPage = true;
4219
- // }
4220
- // if(!this.paymentLibComponent.isFromRefundStatusPage) {
4221
- // if(this.payment) {
4222
- // this.OrderslistService.setpaymentPageView({method: this.payment.method,payment_group_reference: this.paymentGroupRef, reference:this.payment.reference});
4223
- // }
4224
- // if (this.isFromServiceRequestPage) {
4225
- // this.OrderslistService.setnavigationPage('servicerequestpage');
4226
- // } else {
4227
- // this.OrderslistService.setnavigationPage('paymentdetailspage');
4228
- // }
4229
- // this.errorMessage = '';
4230
- // this.paymentLibComponent.viewName = 'case-transactions';
4231
- // // this.paymentLibComponent.TAKEPAYMENT = true;
4232
- // this.paymentLibComponent.ISTURNOFF = this.isTurnOff;
4233
- // this.paymentLibComponent.isFromServiceRequestPage = true;
4234
- // this.paymentLibComponent.ISBSENABLE = true;
4235
- // let partUrl = this.bsPaymentDcnNumber ? `&dcn=${this.bsPaymentDcnNumber}` : '';
4236
- // partUrl += this.paymentLibComponent.ISBSENABLE ? '&isBulkScanning=Enable' : '&isBulkScanning=Disable';
4237
- // partUrl += this.paymentLibComponent.ISTURNOFF ? '&isTurnOff=Enable' : '&isTurnOff=Disable';
4238
- // partUrl += this.isStrategicFixEnable ? '&isStFixEnable=Enable' : '&isStFixEnable=Disable';
4239
- // partUrl += `&caseType=${this.caseType}`;
4240
- // if(this.isFromPaymentDetailPage) {
4241
- // partUrl += this.paymentLibComponent.isFromPaymentDetailPage
4242
- // }
4243
- // if(!this.paymentLibComponent.TAKEPAYMENT) {
4244
- // this.paymentLibComponent.TAKEPAYMENT = undefined;
4245
- // }
4246
- // if ( this.paymentLibComponent.SERVICEREQUEST) {
4247
- // const url = `/payment-history/${this.ccdCaseNumber}?view=case-transactions&selectedOption=${this.option}${partUrl}`;
4248
- // this.router.routeReuseStrategy.shouldReuseRoute = () => false;
4249
- // this.router.onSameUrlNavigation = 'reload';
4250
- // this.router.navigateByUrl(url);
4251
- // } else {
4252
- // const url = `/payment-history/${this.ccdCaseNumber}?view=case-transactions&takePayment=${this.paymentLibComponent.TAKEPAYMENT}&selectedOption=${this.option}${partUrl}`;
4253
- // this.router.routeReuseStrategy.shouldReuseRoute = () => false;
4254
- // this.router.onSameUrlNavigation = 'reload';
4255
- // this.router.navigateByUrl(url);
4256
- // }
4257
- // } else {
4258
- // this.paymentLibComponent.viewName === 'refundstatuslist';
4259
- // this.paymentLibComponent.isFromRefundStatusPage = true;
4260
- // }
5152
+ }
5153
+ gotoAddressPage(note) {
5154
+ if (note) {
5155
+ this.notification = { contact_details: note, notification_type: note.notification_type };
5156
+ }
5157
+ this.errorMessage = '';
5158
+ this.viewCompStatus = 'addrefundforremission';
5159
+ this.viewStatus = '';
5160
+ this.isRefundRemission = true;
5161
+ this.errorMessage = false;
5162
+ }
5163
+ gotoRemissionSuccess(event) {
5164
+ event.preventDefault();
5165
+ this.errorMessage = '';
5166
+ this.viewCompStatus = '';
5167
+ this.viewStatus = 'retroremissionconfirmationpage';
5168
+ this.isRefundRemission = true;
5169
+ this.errorMessage = false;
4261
5170
  }
4262
5171
  gotoCasetransationPage() {
4263
5172
  this.OrderslistService.setnavigationPage('casetransactions');
4264
5173
  this.errorMessage = '';
5174
+ this.errorMsg = [];
4265
5175
  this.paymentLibComponent.viewName = 'case-transactions';
4266
5176
  this.paymentLibComponent.VIEW = 'case-transactions';
4267
5177
  this.paymentLibComponent.ISTURNOFF = this.isTurnOff;
@@ -4279,28 +5189,14 @@ class AddRemissionComponent {
4279
5189
  }
4280
5190
  gotoCasetransationPageCancelBtnClicked(event) {
4281
5191
  event.preventDefault();
4282
- if (!this.paymentLibComponent.isFromServiceRequestPage) {
5192
+ this.errorMsg = [];
5193
+ if (this.paymentLibComponent.isFromServiceRequestPage !== undefined && !this.paymentLibComponent.isFromServiceRequestPage) {
4283
5194
  this.OrderslistService.setnavigationPage('casetransactions');
4284
5195
  this.OrderslistService.setisFromServiceRequestPage(false);
4285
5196
  this.paymentLibComponent.VIEW = 'case-transactions';
4286
5197
  this.paymentLibComponent.viewName = 'case-transactions';
4287
5198
  this.paymentLibComponent.ISBSENABLE = true;
4288
5199
  this.paymentLibComponent.isRefundStatusView = false;
4289
- // this.OrderslistService.setnavigationPage('casetransactions');
4290
- // this.OrderslistService.setisFromServiceRequestPage(false);
4291
- // this.paymentLibComponent.VIEW ='case-transactions';
4292
- // this.paymentLibComponent.viewName = 'case-transactions';
4293
- // this.paymentLibComponent.ISBSENABLE = true;
4294
- // this.paymentLibComponent.isRefundStatusView = false;
4295
- // this.resetOrderData(); let partUrl = this.bsPaymentDcnNumber ? `&dcn=${this.bsPaymentDcnNumber}` : '';
4296
- // partUrl += this.paymentLibComponent.ISBSENABLE ? '&isBulkScanning=Enable' : '&isBulkScanning=Disable';
4297
- // partUrl += this.paymentLibComponent.ISTURNOFF ? '&isTurnOff=Enable' : '&isTurnOff=Disable';
4298
- // partUrl += this.isStrategicFixEnable ? '&isStFixEnable=Enable' : '&isStFixEnable=Disable';
4299
- // partUrl += `&caseType=${this.caseType}`;
4300
- // const url = `/payment-history/${this.ccdCaseNumber}?view=case-transactions&takePayment=${this.paymentLibComponent.TAKEPAYMENT}&selectedOption=${this.option}${partUrl}`;
4301
- // this.router.routeReuseStrategy.shouldReuseRoute = () => false;
4302
- // this.router.onSameUrlNavigation = 'reload';
4303
- // this.router.navigateByUrl(url);
4304
5200
  }
4305
5201
  else {
4306
5202
  if (this.paymentLibComponent.REFUNDLIST) {
@@ -4350,24 +5246,50 @@ class AddRemissionComponent {
4350
5246
  this.OrderslistService.setorderRemissionTotal(null);
4351
5247
  this.OrderslistService.setorderFeesTotal(null);
4352
5248
  }
5249
+ changeRefundAmount() {
5250
+ this.isFromCheckAnsPage = true;
5251
+ this.viewCompStatus = 'issuerefund';
5252
+ this.viewStatus = '';
5253
+ }
4353
5254
  getFormattedCurrency(currency) {
4354
5255
  if (currency.toString().includes(".")) {
4355
5256
  return currency;
4356
5257
  }
4357
5258
  return currency.toString().concat(".00");
4358
5259
  }
5260
+ showNotificationPreview() {
5261
+ this.notificationPreview = true;
5262
+ }
5263
+ hideNotificationPreview() {
5264
+ this.notificationPreview = false;
5265
+ }
5266
+ getTemplateInstructionType(paymentReference, payment) {
5267
+ if (payment == undefined || payment == null || payment.reference != paymentReference) {
5268
+ this.paymentViewService.getPaymentDetails(paymentReference).subscribe(payment => {
5269
+ this.paymentObj = payment;
5270
+ this.paymentObj.reference = paymentReference;
5271
+ this.templateInstructionType = this.notificationService.getNotificationInstructionType(this.paymentObj.channel, this.paymentObj.method);
5272
+ }, (error) => {
5273
+ this.templateInstructionType = 'Template';
5274
+ });
5275
+ }
5276
+ else {
5277
+ this.templateInstructionType = this.notificationService.getNotificationInstructionType(payment.channel, payment.method);
5278
+ }
5279
+ }
4359
5280
  }
4360
5281
  AddRemissionComponent.decorators = [
4361
5282
  { type: Component, args: [{
4362
5283
  selector: 'ccpay-add-remission',
4363
- template: "<div class=\"add-remission pagesize\">\n <div *ngIf=\"errorMessage\">\n <div class=\"error-summary\" role=\"group\" aria-labelledby=\"failure-error-summary-heading\" tabindex=\"-1\">\n <h2 class=\"heading-medium error-summary-heading\" id=\"failure-error-summary-heading\">\n Error in processing the request\n </h2>\n <div class=\"govuk-error-summary__body\">\n {{ errorMessage }}\n </div>\n </div>\n </div>\n\n <ng-container *ngIf=\"viewStatus === 'main' && !isRefundRemission \">\n <input #myInput type='hidden' class='iFrameDrivenImageValue' value='ADDREMISSION'>\n <h1 class=\"heading-large\">Add remission </h1>\n <form novalidate>\n <div class=\"govuk-form-group\">\n <form [formGroup]=\"remissionForm\" novalidate>\n <div class=\"govuk-form-group\">\n <label class=\"govuk-label govuk-label--s\" for=\"remission-code\">\n Add remission to {{ fee?.code }}: {{ fee?.description }}\n <span class=\"form-hint\">Enter remission for reference. For example: HWF-A1B-23C OR PA21-123456</span>\n </label>\n <input [ngClass]=\"{'inline-error-class': isRemissionCodeEmpty || remissionCodeHasError}\" class=\"govuk-input govuk-input--width-20 govuk-!-margin-right-1\" id=\"remissionCode\" aria-label=\"remissionCode\" name=\"remissionCode\" type=\"text\" formControlName=\"remissionCode\">\n <p class=\"inline-error-message\" *ngIf=\"isRemissionCodeEmpty || remissionCodeHasError\">\n <span *ngIf=\"isRemissionCodeEmpty\">Enter a remission code</span>\n <span *ngIf=\"remissionCodeHasError\">Enter a vaild remission code</span>\n </p>\n </div>\n <div class=\"govuk-form-group\">\n <label class=\"govuk-label govuk-label--s\" for=\"amount\">\n How much does the applicant need to pay?\n </label>\n\n <div id=\"amount-currency\" class=\"govuk-visually-hidden\">in pounds</div>\n <div class=\"hmcts-currency-input\">\n <div class=\"hmcts-currency-input__symbol\" aria-hidden=\"true\">\u00A3</div>\n <input class=\"govuk-input govuk-input--width-10\" [ngClass]=\"{'inline-error-class': isAmountEmpty || amountHasError || isRemissionLessThanFeeError}\" id=\"amount\" aria-label=\"amount\" name=\"amount\" type=\"text\" aria-describedby=\"amount-currency\" formControlName=\"amount\">\n <p class=\"inline-error-message\" *ngIf=\"isAmountEmpty || amountHasError || isRemissionLessThanFeeError\">\n <span *ngIf=\"isAmountEmpty\">Enter a amount</span>\n <span *ngIf=\"amountHasError\">Enter a vaild amount</span>\n <span *ngIf=\"isRemissionLessThanFeeError\">The remission amount must be less than the total fee</span>\n </p>\n </div>\n </div>\n </form>\n <button class=\"button\" type=\"submit\" (click)=\"addRemission()\">\n Submit\n </button>\n </div>\n </form>\n </ng-container>\n\n <ng-container *ngIf=\"viewStatus === 'confirmation'\">\n <input #myInput type='hidden' class='iFrameDrivenImageValue' value='ADDREMISSIONCONFIRMATION'>\n <div class=\"govuk-warning-text\">\n <span class=\"govuk-warning-text__icon\" aria-hidden=\"true\">!</span>\n <strong class=\"govuk-warning-text__text\">\n <span class=\"govuk-warning-text__assistive\">Warning</span>\n Are you sure you want to add remission to this fee?\n </strong>\n </div>\n <table class=\"govuk-table\">\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__cell govuk-!-font-weight-bold\">Remission code:</td>\n <td class=\"govuk-table__cell\">{{ remissionForm.controls.remissionCode.value }}</td>\n </tr>\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__cell govuk-!-font-weight-bold\">Fee code:</td>\n <td class=\"govuk-table__cell\">{{ fee.code }}</td>\n </tr>\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__cell govuk-!-font-weight-bold\">Fee description:</td>\n <td class=\"govuk-table__cell\">{{ fee.description }}</td>\n </tr>\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__cell govuk-!-font-weight-bold\">Amount the applicant must pay:</td>\n <td class=\"govuk-table__cell\">{{ remissionForm.controls.amount.value | currency:'GBP':'symbol-narrow':'1.2-2' }}</td>\n </tr>\n </table>\n\n <button type=\"submit\" class=\"button govuk-button--secondary\" (click)=\"cancelRemission.emit()\">\n Cancel\n </button>\n <button type=\"submit\"\n [disabled]=\"isConfirmationBtnDisabled\"\n [ngClass]='isConfirmationBtnDisabled ? \"button button--disabled govuk-!-margin-right-1\" : \"button govuk-!-margin-right-1\"'\n (click)=\"confirmRemission()\">\n Confirm\n </button>\n\n </ng-container>\n\n <!-- Add retro remission changes-->\n\n <ng-container *ngIf=\"viewCompStatus === 'addremission'\">\n <input #myInput type='hidden' class='iFrameDrivenImageValue' value='PROCESSADDRETROREMISSIONPAGE'>\n <h1 class=\"heading-large\">Process remission</h1>\n <h1 class=\"heading-medium\">#{{ccdCaseNumber | ccdHyphens}}</h1>\n <h1 class=\"heading-large\">Enter help with fees or remission reference</h1>\n <form novalidate>\n <div class=\"govuk-form-group\">\n <form [formGroup]=\"remissionForm\" novalidate>\n <div class=\"govuk-form-group\">\n <label class=\"govuk-label govuk-label--s\" for=\"remission-code\">\n <span class=\"form-hint\">For example: HWF-A1B-23C OR PA21-123456</span>\n </label>\n <p class=\"inline-error-message\" *ngIf=\"isRemissionCodeEmpty || remissionCodeHasError\">\n <span *ngIf=\"isRemissionCodeEmpty\">Enter a remission code</span>\n <span *ngIf=\"remissionCodeHasError\">Enter a vaild remission code</span>\n </p>\n <input [ngClass]=\"{'inline-error-class': isRemissionCodeEmpty || remissionCodeHasError}\" class=\"govuk-input govuk-input--width-20 govuk-!-margin-right-1\" id=\"remissionCode\" aria-label=\"remissionCode\" name=\"remissionCode\" type=\"text\" formControlName=\"remissionCode\">\n\n </div>\n\n </form>\n <div class=\"govuk-button-group\">\n <button (click)=\"gotoServiceRequestPage($event)\" class=\"govuk-button govuk-button--secondary\"> Previous</button>\n <button (click)=\"addRemissionCode()\" class=\"govuk-button\"> Continue</button>\n </div>\n <p><a href=\"javascript:void(0)\" (click)=\"gotoCasetransationPageCancelBtnClicked($event)\" class=\"govuk-link pointer\" data-module=\"govuk-button\">Cancel</a></p>\n </div>\n </form>\n\n </ng-container>\n\n <ng-container *ngIf=\"viewStatus === 'processretroremissonpage'\" >\n <input #myInput type='hidden' class='iFrameDrivenImageValue' value='PROCESSRETROREMISSIONPAGE'>\n <h1 class=\"heading-large\">Process remission</h1>\n <h1 class=\"heading-medium\">#{{ccdCaseNumber | ccdHyphens }}</h1>\n <div class=\"govuk-form-group\">\n <form novalidate>\n <div class=\"govuk-form-group\">\n <form [formGroup]=\"remissionForm\" novalidate>\n <fieldset class=\"govuk-fieldset\">\n <legend class=\"govuk-fieldset__legend govuk-fieldset__legend--m\">\n <h1 *ngIf=\"remessionPayment?.status === 'Success' || isFromRefundListPage\" class=\"heading-medium\">\n Enter the amount to be refunded\n </h1>\n <h1 *ngIf=\"remessionPayment?.status !== 'Success' && !isFromRefundListPage\" class=\"heading-medium\">\n Enter the remission amount\n </h1>\n <h1 *ngIf=\"remessionPayment?.status === 'undefined'\" class=\"heading-medium\">\n Enter the amount\n </h1>\n </legend>\n <div id=\"amount-currency\" class=\"govuk-visually-hidden\">in pounds</div>\n <p class=\"inline-error-message\" *ngIf=\"isAmountEmpty || amountHasError || isRemissionLessThanFeeError\">\n <span *ngIf=\"isAmountEmpty\">Enter a amount</span>\n <span *ngIf=\"amountHasError\">Enter a vaild amount</span>\n <span *ngIf=\"isRemissionLessThanFeeError\">You cannot add a remission that's more than the fee amount.</span>\n </p>\n <div class=\"hmcts-currency-input\">\n\n <div class=\"hmcts-currency-input__symbol\" aria-hidden=\"true\">\u00A3</div>\n <input class=\"govuk-input govuk-input--width-10\" [ngClass]=\"{'inline-error-class': isAmountEmpty || amountHasError || isRemissionLessThanFeeError}\" id=\"amount\" aria-label=\"amount\" name=\"amount\" type=\"number\" aria-describedby=\"amount-currency\" formControlName=\"amount\">\n\n\n </div>\n </fieldset>\n </form>\n\n <div class=\"govuk-button-group\">\n <button (click)=\"gotoAddRetroRemissionCodePage()\" class=\"govuk-button govuk-button--secondary\"> Previous</button>\n <button (click)=\"gotoCheckRetroRemissionPage(payment)\" class=\"govuk-button\"> Continue</button>\n\n </div>\n <p>\n <a href=\"javascript:void(0)\" (click)=\"gotoCasetransationPageCancelBtnClicked($event)\" class=\"govuk-link\" data-module=\"govuk-button\">Cancel</a>\n </p>\n </div>\n\n </form>\n </div>\n </ng-container>\n\n <ng-container *ngIf=\"viewStatus === 'checkretroremissionpage'\">\n <input #myInput type='hidden' class='iFrameDrivenImageValue' value='CHECKRETROREMISSIONCONFIRMATION'>\n <div class=\"govuk-warning-text\">\n <h1 class=\"heading-large\"> Check your answers</h1>\n </div>\n <table class=\"govuk-table\">\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__cell govuk-!-font-weight-bold\">Payment reference</td>\n <td class=\"govuk-table__cell\">{{remessionPayment ? remessionPayment.reference: ' '}}</td>\n </tr>\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__cell govuk-!-font-weight-bold\">Payment amount</td>\n <td class=\"govuk-table__cell\">\u00A3{{ remessionPayment ? getFormattedCurrency(remessionPayment.amount): ' ' | currency :'GBP':'symbol':'1.2-2'}} </td>\n </tr>\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__cell govuk-!-font-weight-bold\">Payment status</td>\n <td class=\"govuk-table__cell\">{{remessionPayment ? remessionPayment.status: ''}}</td>\n </tr>\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__cell govuk-!-font-weight-bold\">Fee</td>\n <td class=\"govuk-table__cell\">{{ fee.code }} - {{ fee.description }} ({{ fee.calculated_amount/fee.volume| currency:'GBP':'symbol-narrow':'1.2-2' }}) </td>\n </tr>\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__cell govuk-!-font-weight-bold\">Help with fees or remission reference</td>\n <td class=\"govuk-table__cell\"> {{ remissionForm.controls.remissionCode.value }}\n <a (click)=\"gotoProcessRetroRemissionPage()\" class=\"govuk-link right\" href=\"javascript:void(0)\">Change</a>\n </td>\n </tr>\n <tr class=\"govuk-table__row\">\n <td *ngIf=\"remessionPayment.status === 'Success'\" class=\"govuk-table__cell govuk-!-font-weight-bold\">Refund amount</td>\n <td *ngIf=\"remessionPayment.status !== 'Success'\" class=\"govuk-table__cell govuk-!-font-weight-bold\">Remission amount</td>\n <td class=\"govuk-table__cell\">{{remissionForm.controls.amount.value | currency:'GBP':'symbol-narrow':'1.2-2' }}\n <a (click)=\"addRemissionCode()\" class=\"govuk-link right\" href=\"javascript:void(0)\">Change</a>\n </td>\n </tr>\n </table>\n\n <button type=\"submit\" class=\"button govuk-button--secondary\" (click)=\"addRemissionCode()\">Previous</button>\n <button type=\"submit\" [disabled]=\"isConfirmationBtnDisabled\" [ngClass]='isConfirmationBtnDisabled ? \"button button--disabled govuk-!-margin-right-1\" : \"button govuk-!-margin-right-1\"' (click)=\"confirmRetroRemission()\"> Add remission </button>\n <p> <a href=\"javascript:void(0)\" (click)=\"gotoCasetransationPageCancelBtnClicked($event)\" class=\"govuk-link\" data-module=\"govuk-button\"> Cancel</a> </p>\n\n </ng-container>\n\n <ng-container *ngIf=\"viewStatus === 'retroremissionconfirmationpage'\">\n <input #myInput type='hidden' class='iFrameDrivenImageValue' value='RETROREMISSIONCONFIRMATIONPAGE'>\n <div class=\"govuk-grid-row\">\n <div >\n <div class=\"govuk-panel govuk-panel--confirmation\">\n <h1 class=\"govuk-panel__title\">\n Remission added\n </h1>\n <div *ngIf=\"remessionPayment.status === 'Success'\" class=\"govuk-panel__body\">\n <p class=\"govuk-body white\"><strong>The amount to be refunded should be {{remissionForm.controls.amount.value | currency:'GBP':'symbol-narrow':'1.2-2' }}</strong></p>\n\n </div>\n </div>\n <div *ngIf=\"remessionPayment.status === 'Success'\" >\n <button type=\"submit\" [disabled]=\"!isRemissionApplied\" [ngClass]='isConfirmationBtnDisabled ? \"button button--disabled govuk-!-margin-right-1\" : \"button govuk-!-margin-right-1\"' (click)=\"processRefund()\">Submit refund </button>\n </div>\n <p class=\"govuk-body\">\n <a href=\"javascript:void(0)\" (click)=\"gotoCasetransationPageCancelBtnClicked($event)\" class=\"govuk-link pointer\" data-module=\"govuk-button\">\n Return to case\n </a>\n </p>\n </div>\n </div>\n </ng-container>\n\n <ng-container *ngIf=\"viewStatus === 'refundconfirmationpage'\">\n <input #myInput type='hidden' class='iFrameDrivenImageValue' value='RETROREMISSIONREFUNDCONFIRMATIONPAGE'>\n <div class=\"govuk-grid-row\">\n <div >\n <div class=\"govuk-panel govuk-panel--confirmation\">\n <h1 class=\"govuk-panel__title\">\n Refund submitted\n </h1>\n\n <div class=\"govuk-panel__body\">\n <p class=\"govuk-body white\"><strong>Refund reference: {{refundReference}}</strong></p>\n </div>\n\n </div>\n <div *ngIf=\"isPaymentSuccess\">\n <h2 class=\"govuk-heading-l\">What happens next</h2>\n <p class=\"govuk-body\">\n A refund request for {{refundAmount | currency:'GBP':'symbol-narrow':'1.2-2' }} has been created and will be passed to a team leader to approve.\n </p>\n </div>\n <p class=\"govuk-body\">\n <a href=\"javascript:void(0)\" (click)=\"gotoCasetransationPageCancelBtnClicked($event)\" class=\"govuk-link pointer\" data-module=\"govuk-button\">\n Return to case\n </a>\n </p>\n </div>\n </div>\n\n </ng-container>\n\n <!-- Issue Refund Section -->\n\n <ng-container *ngIf=\"viewCompStatus === 'issuerefund' && isRefundRemission\">\n <input #myInput type='hidden' class='iFrameDrivenImageValue' value='ISSUEREFUNDPAGE'>\n <h1 class=\"heading-large\">Process refund</h1>\n <h1 class=\"heading-medium\">#{{ccdCaseNumber | ccdHyphens }}</h1>\n <h1 class=\"heading-large\">Why are you making this refund?\n </h1>\n\n\n <div class=\"govuk-form-group\">\n <form novalidate>\n <div class=\"govuk-form-group\">\n <form [formGroup]=\"remissionForm\" novalidate>\n <fieldset class=\"govuk-fieldset\" aria-describedby=\"how-contacted-conditional-hint\">\n\n <div\n [ngClass]=\"refundHasError ? 'govuk-radios govuk-radios--conditional form-group-error' : 'govuk-radios govuk-radios--conditional'\"\n data-module=\"govuk-radios\" >\n <p class=\"inline-error-message\" *ngIf=\"refundHasError\">\n <span *ngIf=\"refundHasError\">Select a reason why you\u2019re making this refund</span>\n </p>\n\n\n\n <div class = \"container-fluid\">\n <div class=\"row\">\n <div class=\"govuk-radios__item col-md-4\" *ngFor=\"let refund of commonRefundReasons; let i = index;\">\n <!-- <div *ngIf = \"{{refund.name}} !== 'Retrospective remission'\"> -->\n <input class=\"govuk-radios__input\" id=\"{{refund.name}}\" name=\"refundReason\" type=\"radio\"\n formControlName=\"refundReason\" value={{refund.code}}\n (change)=\"selectRadioButton(refund.name, refund.name)\">\n <label class=\"govuk-label--s govuk-radios__label govuk-font__custom\" for=\"how-contacted-conditional\">\n {{refund.name}}\n </label>\n\n <div class=\"govuk-radios__conditional\" *ngIf=\"isRefundReasonsSelected && showReasonText && selectedRefundReason === refund.name \" >\n <label class=\"govuk-label govuk-label--m\" for=\"{{refund.name}}\">\n Enter reason\n </label>\n <div [ngClass]=\"{'form-group-error': isReasonEmpty}\">\n <p class=\"inline-error-message\" *ngIf=\"isReasonEmpty\">\n <span *ngIf=\"isReasonEmpty\">Enter a reason why you\u2019re making this refund</span>\n </p>\n\n <input class=\"govuk-input govuk-input--width-10\" [ngClass]=\"{'inline-error-class': isReasonEmpty}\" id=\"reason\" aria-label=\"reason\" name=\"reason\" type=\"text\" aria-describedby=\"reason\" maxlength=\"30\" formControlName=\"reason\">\n </div>\n </div>\n <!-- </div> -->\n </div>\n </div>\n </div>\n <br/>\n <div>\n <select formControlName=\"refundDDReason\" class=\"govuk-select\" id=\"sort\" (change)=\"selectchange($event)\">\n <option selected='selected' [defaultSelected]=true [value]=\"default\" >{{default}}</option>\n <!-- <option value=\"\" selected='selected'>Select a different reason</option> -->\n <option *ngFor=\"let refund of refundReasons;\" id=\"{{refund.name}}\" value=\"{{refund.code}}\">{{refund.name}}</option>\n </select>\n\n </div>\n <br/>\n <div class=\"govuk-radios__conditional\" *ngIf=\"showReasonText && !isRefundReasonsSelected\" >\n <div [ngClass]=\"{'form-group-error': isReasonEmpty}\">\n <label class=\"govuk-label govuk-label--m\" for=\"amount\">\n Enter reason\n </label>\n <p class=\"inline-error-message\" *ngIf=\"isReasonEmpty\">\n <span *ngIf=\"isReasonEmpty\">Enter a reason why you\u2019re making this refund</span>\n </p>\n <input class=\"govuk-input govuk-input--width-10\" [ngClass]=\"{'inline-error-class': isReasonEmpty}\" id=\"reason\" aria-label=\"reason\" name=\"reason\" type=\"text\" aria-describedby=\"reason\" maxlength=\"{{reasonLength}}\" formControlName=\"reason\">\n </div>\n </div>\n\n\n </div>\n </fieldset>\n </form>\n </div>\n </form>\n </div>\n <div class=\"govuk-button-group\">\n <button (click)=\"gotoServiceRequestPage($event)\" class=\"govuk-button govuk-button--secondary\"> Previous</button>\n <button (click)=\"gotoIssueRefundConfirmation(payment)\" class=\"govuk-button\"> Continue</button>\n </div>\n <p>\n <a href=\"javascript:void(0)\" (click)=\"gotoCasetransationPageCancelBtnClicked($event)\" class=\"govuk-link\" data-module=\"govuk-button\">\n Cancel\n </a>\n </p>\n\n </ng-container>\n\n <ng-container *ngIf=\"viewStatus === 'checkissuerefundpage'\">\n <input #myInput type='hidden' class='iFrameDrivenImageValue' value='CHECKISSUEREFUNDPAGE'>\n <div class=\"govuk-warning-text\">\n\n <h1 class=\"heading-large\"> Check your answers</h1>\n </div>\n <table class=\"govuk-table\">\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__cell govuk-!-font-weight-bold\">Reason for refund</td>\n <td class=\"govuk-table__cell\"> {{ displayRefundReason }}\n <a (click)=\"changeIssueRefundReason()\" class=\"govuk-link right\" href=\"javascript:void(0)\">Change</a>\n </td>\n </tr>\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__cell govuk-!-font-weight-bold\">Payment reference</td>\n <td class=\"govuk-table__cell\">{{this.payment.reference}}</td>\n </tr>\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__cell govuk-!-font-weight-bold\">Payment amount</td>\n <td class=\"govuk-table__cell\">{{this.payment.amount | currency:'GBP':'symbol-narrow':'1.2-2'}}</td>\n </tr>\n </table>\n <div class=\"govuk-button-group\">\n <button type=\"submit\" class=\"button govuk-button--secondary\" (click)=\"gotoIssueRefundPage()\"> Previous </button>\n <button type=\"submit\"\n [disabled]=\"isConfirmationBtnDisabled\"\n [ngClass]='isConfirmationBtnDisabled ? \"button button--disabled govuk-!-margin-right-1\" : \"button govuk-!-margin-right-1\"'\n (click)=\"confirmIssueRefund()\">\n Submit refund\n </button>\n </div>\n <p>\n <a (click)=\"gotoCasetransationPageCancelBtnClicked($event)\" class=\"govuk-link\" data-module=\"govuk-button\" href=\"javascript:void(0)\">\n Cancel\n </a>\n </p>\n\n </ng-container>\n\n <!--Retro Refund-->\n <ng-container *ngIf=\"viewCompStatus === 'addrefundforremission'\">\n <input #myInput type='hidden' class='iFrameDrivenImageValue' value='ADDREFUNDFORREMISSION'>\n <div class=\"govuk-warning-text\">\n\n <h1 class=\"heading-large\"> Check your answers</h1>\n </div>\n <table class=\"govuk-table\">\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__cell govuk-!-font-weight-bold\">Reason for refund</td>\n <td class=\"govuk-table__cell\"> Retrospective remission </td>\n </tr>\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__cell govuk-!-font-weight-bold\">Payment reference</td>\n <td class=\"govuk-table__cell\">{{this.payment.reference}}</td>\n </tr>\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__cell govuk-!-font-weight-bold\">Refund amount</td>\n <td class=\"govuk-table__cell\">{{this.remission.hwf_amount | currency:'GBP':'symbol-narrow':'1.2-2'}}</td>\n </tr>\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__cell govuk-!-font-weight-bold\">Fee code</td>\n <td class=\"govuk-table__cell\">{{this.remission.fee_code}}</td>\n </tr>\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__cell govuk-!-font-weight-bold\">Fee amount</td>\n <td class=\"govuk-table__cell\">{{feeamount | currency:'GBP':'symbol-narrow':'1.2-2'}}</td>\n </tr>\n </table>\n <div class=\"govuk-button-group\">\n <button type=\"submit\" class=\"button govuk-button--secondary\" (click)=\"gotoServiceRequestPage($event)\">Previous</button>\n <button type=\"submit\"\n [disabled]=\"isConfirmationBtnDisabled\"\n [ngClass]='isConfirmationBtnDisabled ? \"button button--disabled govuk-!-margin-right-1\" : \"button govuk-!-margin-right-1\"'\n (click)=\"processRefund()\">\n Submit refund\n </button>\n </div>\n <p>\n <a href=\"javascript:void(0)\" (click)=\"gotoCasetransationPageCancelBtnClicked($event)\" class=\"govuk-link\" data-module=\"govuk-button\">\n Cancel\n </a>\n </p>\n\n </ng-container>\n\n <ng-container *ngIf=\"viewStatus === 'retrorefundconfirmationpage'\">\n <div class=\"govuk-grid-row\">\n <div >\n <div class=\"govuk-panel govuk-panel--confirmation\">\n <h1 class=\"govuk-panel__title\">\n Refund submitted\n </h1>\n\n <div class=\"govuk-panel__body\">\n <p class=\"govuk-body white\"><strong>Refund reference: {{refundReference}}</strong></p>\n </div>\n\n </div>\n <div *ngIf=\"isPaymentSuccess\">\n <h2 class=\"govuk-heading-l\">What happens next</h2>\n <p class=\"govuk-body\">\n A refund request for {{ refundAmount| currency:'GBP':'symbol-narrow':'1.2-2'}} has been passed to a team leader to approve.\n </p>\n </div>\n <p class=\"govuk-body\">\n <a href=\"javascript:void(0)\" (click)=\"gotoCasetransationPageCancelBtnClicked($event)\" class=\"govuk-link pointer\" data-module=\"govuk-button\">\n Return to case\n </a>\n </p>\n </div>\n </div>\n </ng-container>\n\n <ng-container *ngIf=\"viewStatus === 'order-full-view'\">\n <ccpay-service-request\n [viewStatus] = \"viewStatus\"\n [orderRef] = \"orderRef\"\n [orderStatus] = \"orderStatus\"\n [orderCreated] = \"orderCreated\"\n [orderParty] = \"orderParty\"\n [orderCCDEvent] = \"orderCCDEvent\"\n [orderDetail] = \"orderDetail\"\n [LOGGEDINUSERROLES] = \"LOGGEDINUSERROLES\"\n [takePayment] = \"takePayment\"\n [ccdCaseNumber] = \"ccdCaseNumber\"\n [orderFeesTotal] = \"orderFeesTotal\"\n [orderTotalPayments] = \"orderTotalPayments\"\n [orderRemissionTotal] = \"orderRemissionTotal\">\n </ccpay-service-request>\n </ng-container>\n\n <ng-container *ngIf=\"viewStatus === 'payment-view'\">\n <ccpay-payment-view\n [LOGGEDINUSERROLES] = \"LOGGEDINUSERROLES\"\n [isTurnOff] = \"isTurnOff\"\n [isTakePayment] = \"takePayment\"\n [caseType] = \"caseType\"\n [orderRef] = \"orderRef\"\n [orderStatus] = \"orderStatus\"\n [orderCreated] = \"orderCreated\"\n [orderParty] = \"orderParty\"\n [orderCCDEvent] = \"orderCCDEvent\"\n [orderDetail] = \"orderDetail\"\n [orderFeesTotal] = \"orderFeesTotal\"\n [orderTotalPayments] = \"orderTotalPayments\"\n [orderRemissionTotal] = \"orderRemissionTotal\"\n >\n </ccpay-payment-view>\n </ng-container>\n\n</div>\n\n\n\n",
4364
- styles: [".add-remission .button{margin:20px 2px;padding:.5em;font-size:19px;font-weight:200}.add-remission td.govuk-table__cell{width:50%}.add-remission .govuk-button--secondary{background-color:#dee0e2;box-shadow:0 2px 0 #858688;color:#0b0c0c;margin-right:.5em}.add-remission .right{cursor:pointer}.add-remission .govuk-label--s,.add-remission .govuk-warning-text__text,.add-remission .hmcts-currency-input__symbol{font-size:19px;font-weight:400}.add-remission .inline-error-class{outline:3px solid #a71414;outline-offset:0;border-color:#a71414}.add-remission .inline-error-message{color:#a71414;border-color:#a71414;font-weight:700;margin-top:10px;font-size:20px}.add-remission .govuk-button,.add-remission .govuk-link{margin-right:1em;font-size:19px;font-weight:200}.add-remission .govuk-button-group{padding-top:2em}.add-remission .heading-medium{margin-top:.875em}.add-remission .heading-large{margin-top:.25em}.add-remission .govuk-panel--confirmation{color:#fff;background:#00703c}.add-remission .govuk-panel__title{font-size:5rem}.add-remission .govuk-body,.add-remission .govuk-body-m{font-size:2.1875rem}.add-remission .govuk-radios__item{clear:none!important;display:inline-block;width:45%!important}.add-remission .govuk-radios__conditional{padding-top:12px!important}.add-remission .radio,.add-remission .right{float:right}.govuk-input,.govuk-select{font-size:19px}.govuk-select{font-weight:400}.govuk-input--width-10{max-width:50ex}.govuk-label--m{font-size:19px;font-weight:400}.govuk-error-summary__body{font-size:19px!important}.govuk-error-summary__title{font-size:24px!important}.white{color:#fff}.pagesize{margin:2em;width:97%}.right{cursor:pointer}.form-hint{font-size:19px!important}.govuk-input:focus,button:focus{outline:3.5px solid #fd0}"]
5284
+ template: "<div class=\"add-remission pagesize\">\n <div *ngIf=\"errorMessage\">\n <div class=\"error-summary\" role=\"group\" aria-labelledby=\"failure-error-summary-heading\" tabindex=\"-1\">\n <h2 class=\"heading-medium error-summary-heading\" id=\"failure-error-summary-heading\">\n Error in processing the request\n </h2>\n <div class=\"govuk-error-summary__body\">\n {{ errorMessage }}\n </div>\n </div>\n </div>\n <div *ngIf=\"errorMsg.length > 0\">\n <div class=\"error-summary\" role=\"group\" aria-labelledby=\"failure-error-summary-heading\" tabindex=\"-1\">\n <h2 class=\"heading-medium error-summary-heading\" id=\"failure-error-summary-heading\">\n Error in processing the request\n </h2>\n <div *ngFor=\"let err of errorMsg; let i = index\" class=\"govuk-error-summary__body\">\n \n <li>{{err}}</li>\n </div>\n </div>\n </div>\n\n<ng-container *ngIf=\"viewStatus === 'main' && !isRefundRemission \">\n <input #myInput type='hidden' id='iFrameDrivenImageValue' value='ADDREMISSION'>\n <h1 class=\"heading-large\">Add remission </h1>\n <form novalidate>\n <div class=\"govuk-form-group\">\n <form [formGroup]=\"remissionForm\" novalidate>\n <div class=\"govuk-form-group\">\n <label class=\"govuk-label govuk-label--s\" for=\"remission-code\">\n Add remission to {{ fee?.code }}: {{ fee?.description }}\n <span class=\"form-hint\">Enter remission for reference. For example: HWF-A1B-23C OR PA21-123456</span>\n </label>\n <input [ngClass]=\"{'inline-error-class': isRemissionCodeEmpty || remissionCodeHasError}\" class=\"govuk-input govuk-input--width-20 govuk-!-margin-right-1\" id=\"remissionCode\" aria-label=\"remissionCode\" name=\"remissionCode\" type=\"text\" formControlName=\"remissionCode\">\n <p class=\"inline-error-message\" *ngIf=\"isRemissionCodeEmpty || remissionCodeHasError\">\n <span *ngIf=\"isRemissionCodeEmpty\">Enter a remission code</span>\n <span *ngIf=\"remissionCodeHasError\">Enter a vaild remission code</span>\n </p>\n </div>\n <div class=\"govuk-form-group\">\n <label class=\"govuk-label govuk-label--s\" for=\"amount\">\n How much does the applicant need to pay?\n </label>\n\n <div id=\"amount-currency\" class=\"govuk-visually-hidden\">in pounds</div>\n <div class=\"hmcts-currency-input\">\n <div class=\"hmcts-currency-input__symbol\" aria-hidden=\"true\">\u00A3</div>\n <input class=\"govuk-input govuk-input--width-10\" [ngClass]=\"{'inline-error-class': isAmountEmpty || amountHasError || isRemissionLessThanFeeError}\" id=\"amount\" aria-label=\"amount\" name=\"amount\" type=\"text\" aria-describedby=\"amount-currency\" formControlName=\"amount\">\n <p class=\"inline-error-message\" *ngIf=\"isAmountEmpty || amountHasError || isRemissionLessThanFeeError\">\n <span *ngIf=\"isAmountEmpty\">Enter a amount</span>\n <span *ngIf=\"amountHasError\">Enter a vaild amount</span>\n <span *ngIf=\"isRemissionLessThanFeeError\">The remission amount must be less than the total fee</span>\n </p>\n </div>\n </div>\n </form>\n <button class=\"button\" type=\"submit\" (click)=\"addRemission()\">\n Submit\n </button>\n </div>\n </form>\n</ng-container>\n\n<ng-container *ngIf=\"viewStatus === 'confirmation'\">\n <input #myInput type='hidden' id='iFrameDrivenImageValue' value='ADDREMISSIONCONFIRMATION'> \n <div class=\"govuk-warning-text\">\n <span class=\"govuk-warning-text__icon\" aria-hidden=\"true\">!</span>\n <strong class=\"govuk-warning-text__text\">\n <span class=\"govuk-warning-text__assistive\">Warning</span>\n Are you sure you want to add remission to this fee?\n </strong>\n </div>\n <table class=\"govuk-table\">\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__cell govuk-!-font-weight-bold\">Remission code:</td>\n <td class=\"govuk-table__cell\">{{ remissionForm.controls.remissionCode.value }}</td>\n </tr>\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__cell govuk-!-font-weight-bold\">Fee code:</td>\n <td class=\"govuk-table__cell\">{{ fee.code }}</td>\n </tr>\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__cell govuk-!-font-weight-bold\">Fee description:</td>\n <td class=\"govuk-table__cell\">{{ fee.description }}</td>\n </tr>\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__cell govuk-!-font-weight-bold\">Amount the applicant must pay:</td>\n <td class=\"govuk-table__cell\">{{ remissionForm.controls.amount.value | currency:'GBP':'symbol-narrow':'1.2-2' }}</td>\n </tr>\n </table>\n\n <button type=\"submit\" class=\"button govuk-button--secondary\" (click)=\"cancelRemission.emit()\">\n Cancel\n </button>\n <button type=\"submit\"\n [disabled]=\"isConfirmationBtnDisabled\"\n [ngClass]='isConfirmationBtnDisabled ? \"button button--disabled govuk-!-margin-right-1\" : \"button govuk-!-margin-right-1\"'\n (click)=\"confirmRemission()\">\n Confirm\n </button>\n\n</ng-container>\n\n<!-- Add retro remission changes-->\n\n<ng-container *ngIf=\"viewCompStatus === 'addremission'\">\n <input #myInput type='hidden' id='iFrameDrivenImageValue' value='PROCESSADDRETROREMISSIONPAGE'> \n <h1 class=\"heading-large\">Process remission</h1>\n <h1 class=\"heading-medium\">#{{ccdCaseNumber | ccdHyphens}}</h1>\n <h1 class=\"heading-large\">Enter help with fees or remission reference</h1>\n <form novalidate>\n <div class=\"govuk-form-group\">\n <form [formGroup]=\"remissionForm\" novalidate>\n <div class=\"govuk-form-group\">\n <label class=\"govuk-label govuk-label--s\" for=\"remission-code\">\n <span class=\"form-hint\">For example: HWF-A1B-23C OR PA21-123456</span>\n </label>\n <p class=\"inline-error-message\" *ngIf=\"isRemissionCodeEmpty || remissionCodeHasError\">\n <span *ngIf=\"isRemissionCodeEmpty\">Enter a remission code</span>\n <span *ngIf=\"remissionCodeHasError\">Enter a vaild remission code</span>\n </p>\n <input [ngClass]=\"{'inline-error-class': isRemissionCodeEmpty || remissionCodeHasError}\" class=\"govuk-input govuk-input--width-20 govuk-!-margin-right-1\" id=\"remissionCode\" aria-label=\"remissionCode\" name=\"remissionCode\" type=\"text\" formControlName=\"remissionCode\">\n \n </div>\n \n </form>\n <div class=\"govuk-button-group\">\n <button (click)=\"gotoServiceRequestPage($event)\" class=\"govuk-button govuk-button--secondary\"> Previous</button>\n <button (click)=\"addRemissionCode()\" class=\"govuk-button\"> Continue</button>\n </div>\n <p><a href=\"javascript:void(0)\" (click)=\"gotoCasetransationPageCancelBtnClicked($event)\" class=\"govuk-link pointer\" data-module=\"govuk-button\">Cancel</a></p>\n </div>\n </form>\n\n</ng-container>\n\n<ng-container *ngIf=\"viewStatus === 'processretroremissonpage'\" >\n <input #myInput type='hidden' id='iFrameDrivenImageValue' value='PROCESSRETROREMISSIONPAGE'> \n <h1 class=\"heading-large\">Process remission</h1>\n <h1 class=\"heading-medium\">#{{ccdCaseNumber | ccdHyphens }}</h1>\n <div class=\"govuk-form-group\">\n <form novalidate>\n <div class=\"govuk-form-group\">\n <form [formGroup]=\"remissionForm\" novalidate>\n <fieldset class=\"govuk-fieldset\">\n <legend class=\"govuk-fieldset__legend govuk-fieldset__legend--m\"> \n <h1 *ngIf=\"remessionPayment?.status === 'Success' || isFromRefundListPage\" class=\"heading-medium\">\n Enter the amount to be refunded\n </h1> \n <h1 *ngIf=\"remessionPayment?.status !== 'Success' && !isFromRefundListPage\" class=\"heading-medium\">\n Enter the remission amount\n </h1> \n <h1 *ngIf=\"remessionPayment?.status === 'undefined'\" class=\"heading-medium\">\n Enter the amount\n </h1> \n </legend>\n <div id=\"amount-currency\" class=\"govuk-visually-hidden\">in pounds</div>\n <p class=\"inline-error-message\" *ngIf=\"isAmountEmpty || amountHasError || isRemissionLessThanFeeError\">\n <span *ngIf=\"isAmountEmpty\">Enter a amount</span>\n <span *ngIf=\"amountHasError\">Enter a vaild amount</span>\n <span *ngIf=\"isRemissionLessThanFeeError\">You cannot add a remission that's more than the fee amount.</span>\n </p>\n <div class=\"hmcts-currency-input\">\n \n <div class=\"hmcts-currency-input__symbol\" aria-hidden=\"true\">\u00A3</div>\n <input class=\"govuk-input govuk-input--width-10\" [ngClass]=\"{'inline-error-class': isAmountEmpty || amountHasError || isRemissionLessThanFeeError}\" id=\"amount\" aria-label=\"amount\" name=\"amount\" type=\"number\" aria-describedby=\"amount-currency\" formControlName=\"amount\">\n \n \n </div>\n </fieldset>\n </form>\n \n <div class=\"govuk-button-group\">\n <button (click)=\"gotoAddRetroRemissionCodePage()\" class=\"govuk-button govuk-button--secondary\"> Previous</button>\n <button (click)=\"gotoCheckRetroRemissionPage(payment)\" class=\"govuk-button\"> Continue</button>\n \n </div>\n <p>\n <a href=\"javascript:void(0)\" (click)=\"gotoCasetransationPageCancelBtnClicked($event)\" class=\"govuk-link\" data-module=\"govuk-button\">Cancel</a>\n </p>\n </div>\n \n </form>\n </div>\n</ng-container>\n<ng-container *ngIf=\"viewStatus === 'checkretroremissionpage'\">\n <input #myInput type='hidden' id='iFrameDrivenImageValue' value='CHECKRETROREMISSIONCONFIRMATION'> \n <div class=\"govuk-warning-text\">\n <h1 class=\"heading-large\"> Check your answers</h1>\n </div>\n <table class=\"govuk-table\">\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__cell govuk-!-font-weight-bold\">Payment reference</td>\n <td class=\"govuk-table__cell\">{{remessionPayment ? remessionPayment.reference: ' '}}</td>\n </tr>\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__cell govuk-!-font-weight-bold\">Payment amount</td>\n <td class=\"govuk-table__cell\">\u00A3{{ remessionPayment ? getFormattedCurrency(remessionPayment.amount): ' ' | currency :'GBP':'symbol':'1.2-2'}} </td>\n </tr>\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__cell govuk-!-font-weight-bold\">Payment status</td>\n <td class=\"govuk-table__cell\">{{remessionPayment ? remessionPayment.status: ''}}</td>\n </tr>\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__cell govuk-!-font-weight-bold\">Fee</td>\n <td class=\"govuk-table__cell\">{{ fee.code }} - {{ fee.description }} </td>\n </tr>\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__cell govuk-!-font-weight-bold\">Fee amount</td>\n <td class=\"govuk-table__cell\">{{ fee.calculated_amount/fee.volume| currency:'GBP':'symbol-narrow':'1.2-2' }}</td>\n </tr>\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__cell govuk-!-font-weight-bold\">Help with fees or remission reference</td>\n <td class=\"govuk-table__cell\">{{ remissionForm.controls.remissionCode.value?.trim() }}\n <a (click)=\"gotoProcessRetroRemissionPage()\" class=\"govuk-link right\" >Change</a>\n </td>\n </tr>\n <tr class=\"govuk-table__row\">\n <td *ngIf=\"remessionPayment.status === 'Success'\" class=\"govuk-table__cell govuk-!-font-weight-bold\">Refund amount</td>\n <td *ngIf=\"remessionPayment.status !== 'Success'\" class=\"govuk-table__cell govuk-!-font-weight-bold\">Remission amount</td>\n <td class=\"govuk-table__cell\">{{remissionForm.controls.amount.value | currency:'GBP':'symbol-narrow':'1.2-2' }}\n <a (click)=\"gotoAmountRetroRemission()\" class=\"govuk-link right\" >Change</a>\n </td>\n </tr>\n </table>\n\n <button type=\"submit\" class=\"button govuk-button--secondary\" (click)=\"gotoAmountRetroRemission()\">Previous</button>\n <button type=\"submit\" [disabled]=\"isConfirmationBtnDisabled\" [ngClass]='isConfirmationBtnDisabled ? \"button button--disabled govuk-!-margin-right-1\" : \"button govuk-!-margin-right-1\"' (click)=\"confirmRetroRemission()\"> Add remission </button>\n <p> <a href=\"javascript:void(0)\" (click)=\"gotoCasetransationPageCancelBtnClicked($event)\" class=\"govuk-link\" data-module=\"govuk-button\"> Cancel</a> </p>\n\n</ng-container>\n\n<ng-container *ngIf=\"viewStatus === 'retroremissionconfirmationpage'\">\n <input #myInput type='hidden' id='iFrameDrivenImageValue' value='RETROREMISSIONCONFIRMATIONPAGE'> \n <div class=\"govuk-grid-row\">\n <div >\n <div class=\"govuk-panel govuk-panel-border--confirmation\">\n <h1 class=\"govuk-panel__title\">\n Remission added\n </h1>\n <div *ngIf=\"remessionPayment.status === 'Success'\" class=\"govuk-panel__body\">\n <p class=\"govuk-body\"><strong>The amount to be refunded should be {{remissionForm.controls.amount.value | currency:'GBP':'symbol-narrow':'1.2-2' }}</strong></p>\n \n </div>\n </div>\n <div *ngIf=\"remessionPayment.status === 'Success'\" >\n <button type=\"submit\" [disabled]=\"!isRemissionApplied\" [ngClass]='isConfirmationBtnDisabled ? \"button button--disabled govuk-!-margin-right-1\" : \"button govuk-!-margin-right-1\"' (click)=\"gotoProcessRetroRemission()\">Continue </button>\n </div>\n <p class=\"govuk-body\">\n <a href=\"javascript:void(0)\" (click)=\"gotoCasetransationPageCancelBtnClicked($event)\" class=\"govuk-link pointer\" data-module=\"govuk-button\">\n Return to case\n </a>\n </p>\n </div>\n </div>\n</ng-container>\n\n\n<ng-container *ngIf=\"viewStatus === 'remissionAddressPage'\">\n <input #myInput type='hidden' id='iFrameDrivenImageValue' value='ADDRESSDETAILSRETROREMISSIONPAGE'> \n <h1 class=\"govuk-heading-l\">Process refund</h1>\n <h2 class=\"govuk-heading-m govuk-font19px\">Case reference: {{ccdCaseNumber | ccdHyphens }}</h2>\n <ccpay-contact-details\n [addressObj] = notification\n (assignContactDetails)=\"getContactDetails($event, 'checkaddRefundpage')\"\n (redirectToIssueRefund)=\"gotoRemissionSuccess($event)\" ></ccpay-contact-details>\n <p>\n <a (click)=\"gotoCasetransationPageCancelBtnClicked($event)\" class=\"govuk-link\" data-module=\"govuk-button\">\n Cancel\n </a>\n </p>\n\n</ng-container>\n\n<ng-container *ngIf=\"viewStatus === 'checkaddRefundpage'\">\n <input #myInput type='hidden' id='iFrameDrivenImageValue' value='CHECKRETROREMISSIONCONFIRMATION'> \n <div class=\"govuk-warning-text\">\n <h1 class=\"heading-large\"> Check your answers</h1>\n </div>\n <table class=\"govuk-table\">\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__cell govuk-!-font-weight-bold\">Payment reference</td>\n <td class=\"govuk-table__cell\">{{remessionPayment ? remessionPayment.reference: ' '}}</td>\n </tr>\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__cell govuk-!-font-weight-bold\">Payment amount</td>\n <td class=\"govuk-table__cell\">\u00A3{{ remessionPayment ? getFormattedCurrency(remessionPayment.amount): ' ' | currency :'GBP':'symbol':'1.2-2'}} </td>\n </tr>\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__cell govuk-!-font-weight-bold\">Payment status</td>\n <td class=\"govuk-table__cell\">{{remessionPayment ? remessionPayment.status: ''}}</td>\n </tr>\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__cell govuk-!-font-weight-bold\">Fee</td>\n <td class=\"govuk-table__cell\">{{ fee.code }} - {{ fee.description }} ({{ fee.calculated_amount/fee.volume| currency:'GBP':'symbol-narrow':'1.2-2' }}) </td>\n </tr>\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__cell govuk-!-font-weight-bold\">Help with fees or remission reference</td>\n <td class=\"govuk-table__cell\">{{ remissionForm.controls.remissionCode.value?.trim() }}\n </td>\n </tr>\n <tr class=\"govuk-table__row\">\n <td *ngIf=\"remessionPayment.status === 'Success'\" class=\"govuk-table__cell govuk-!-font-weight-bold\">Refund amount</td>\n <td *ngIf=\"remessionPayment.status !== 'Success'\" class=\"govuk-table__cell govuk-!-font-weight-bold\">Remission amount</td>\n <td class=\"govuk-table__cell\">{{remissionForm.controls.amount.value | currency:'GBP':'symbol-narrow':'1.2-2' }}\n </td>\n </tr>\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__cell govuk-!-font-weight-bold\">Send to</td>\n <td class=\"govuk-table__cell\">{{orderParty}}</td>\n </tr>\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__cell govuk-!-font-weight-bold\">Send via</td>\n <td class=\"govuk-table__cell whitespace-inherit\">\n <div *ngIf=\"contactDetailsObj?.notification_type === 'EMAIL'\" class=\"contactDetails-width\">\n <strong>Email</strong>\n <br/>\n {{contactDetailsObj?.email?.trim()}}\n </div>\n <div *ngIf=\"contactDetailsObj?.notification_type === 'LETTER'\" class=\"contactDetails-width\">\n <strong>Post</strong>\n <br/>\n {{contactDetailsObj?.address_line?.trim()}}&nbsp;{{contactDetailsObj?.city?.trim()}}&nbsp;{{contactDetailsObj?.county?.trim()}}&nbsp;{{contactDetailsObj?.country?.trim()}}&nbsp;{{contactDetailsObj?.postal_code?.trim()}}\n </div>\n <a (click)=\"gotoProcessRetroRemission(contactDetailsObj)\" class=\"govuk-link right\" >Change</a>\n </td>\n </tr>\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__cell govuk-!-font-weight-bold\">Notification</td>\n <td class=\"govuk-table__cell\">{{templateInstructionType}}\n <a *ngIf=\"!notificationPreview\" href=\"Javascript:void(0)\" class=\"govuk-link right\" (click)=\"showNotificationPreview()\">\n Preview\n </a>\n <a *ngIf=\"notificationPreview\" href=\"Javascript:void(0)\" class=\"govuk-link right\" (click)=\"hideNotificationPreview()\">\n Hide Preview\n </a>\n </td>\n </tr>\n </table>\n\n <app-notification-preview *ngIf=\"notificationPreview\" \n [payment]=\"remessionPayment\" \n [contactDetails]=\"contactDetailsObj\"\n [refundReason]=\"'RR036'\"\n [refundAmount]=\"remissionForm.controls.amount.value\"></app-notification-preview>\n\n <button type=\"submit\" class=\"button govuk-button--secondary\" (click)=\"gotoProcessRetroRemission(contactDetailsObj)\">Previous</button>\n <button type=\"submit\" [disabled]=\"isConfirmationBtnDisabled\" [ngClass]='isConfirmationBtnDisabled ? \"button button--disabled govuk-!-margin-right-1\" : \"button govuk-!-margin-right-1\"' (click)=\"processRefund()\"> Submit refund </button>\n <p> <a href=\"javascript:void(0)\" (click)=\"gotoCasetransationPageCancelBtnClicked($event)\" class=\"govuk-link\" data-module=\"govuk-button\"> Cancel</a> </p>\n\n</ng-container>\n\n<ng-container *ngIf=\"viewStatus === 'refundconfirmationpage'\">\n <input #myInput type='hidden' id='iFrameDrivenImageValue' value='RETROREMISSIONREFUNDCONFIRMATIONPAGE'> \n <div class=\"govuk-grid-row\">\n <div >\n <div class=\"govuk-panel govuk-panel--confirmation\">\n <h1 class=\"govuk-panel__title\">\n Refund submitted\n </h1>\n\n <div class=\"govuk-panel__body\">\n <p class=\"govuk-body white\"><strong>Refund reference: {{refundReference}}</strong></p>\n </div>\n\n </div>\n <div *ngIf=\"isPaymentSuccess\">\n <h2 class=\"govuk-heading-l\">What happens next</h2>\n <p class=\"govuk-body\">\n A refund request for {{refundAmount | currency:'GBP':'symbol-narrow':'1.2-2' }} has been created and will be passed to a team leader to approve.\n </p>\n </div>\n <p class=\"govuk-body\">\n <a href=\"javascript:void(0)\" (click)=\"gotoCasetransationPageCancelBtnClicked($event)\" class=\"govuk-link pointer\" data-module=\"govuk-button\">\n Return to case\n </a>\n </p>\n </div>\n </div>\n \n</ng-container>\n\n<!-- Issue Refund Section -->\n<ng-container *ngIf=\"viewCompStatus === 'issuerefund' && isRefundRemission\">\n <div class=\"govuk-form-group\">\n <form [formGroup]=\"remissionForm\" novalidate>\n <h1 class=\"heading-large\">Process refund</h1>\n <h2 class=\"heading-medium\">Case reference:{{ccdCaseNumber | ccdHyphens }}</h2>\n <span id=\"how-contacted-conditional-hint\" class=\"form-hint govuk-font19px\">\n Payment reference: {{paymentReference}}\n </span>\n <h3 class=\"heading-small\">Select fees to be refunded</h3>\n <!--TABLE-->\n <div>\n <table class=\"govuk-table\">\n <thead class=\"govuk-table__head\">\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__header col-1\" scope=\"col\">Select</td>\n <td class=\"govuk-table__header col-18\" scope=\"col\">Fee description</td>\n <td class=\"govuk-table__header col-6\" scope=\"col\">Fee amount</td>\n <td class=\"govuk-table__header col-6\" scope=\"col\">Total paid</td>\n <td class=\"govuk-table__header col-6\" scope=\"col\">Quantity</td>\n <td class=\"govuk-table__header col-8\" scope=\"col\">Amount to refund</td>\n <td class=\"govuk-table__header\" scope=\"col\"></td>\n </tr>\n </thead>\n <tbody class=\"govuk-table__body\" *ngIf=\"!isFullyRefund\">\n <tr class=\"govuk-table__row\" formArrayName=\"feesList\" *ngFor=\"let fee of feesList?.controls; let i = index\">\n <td class=\"govuk-table__cell\">\n <div [formGroupName]=\"i\" class=\"govuk-checkboxes govuk-checkboxes--large\" data-module=\"govuk-checkboxes\">\n <div class=\"govuk-checkboxes__item\">\n\n <input\n class=\"govuk-checkboxes__input\" \n (click)=\"check_en(i,fee.controls['id'].value,fee.controls['apportion_amount'].value,fee.controls['volume'].value)\" \n id=\"{{fee.controls['id'].value}}\" \n name=\"organisation\" \n type=\"checkbox\" \n value=\"{{fee.controls['id'].value}}\" \n formControlName=\"selected\" >\n <label class=\"govuk-label govuk-checkboxes__label\" for=\"{{fee.controls['id'].value}}\">\n <span style=\"display:none\">Select</span>\n </label>\n </div>\n </div>\n </td>\n <td class=\"govuk-table__cell whitespace-inherit\">{{fee.controls['description'].value}} </td>\n <td class=\"govuk-table__cell whitespace-inherit left\" >\n <div type=\"hidden\" style=\"display:none;background-color:white;\" id=\"feeVOl_{{fee.controls['id'].value}}\">{{ fee.controls['calculated_amount'].value / fee.controls['volume'].value }}</div>\n {{ fee.controls['calculated_amount'].value / fee.controls['volume'].value | currency:'GBP':'symbol-narrow':'1.2-2' }}\n </td>\n <td class=\"govuk-table__cell whitespace-inherit left\" >{{ fee.controls['apportion_amount'].value | currency:'GBP':'symbol-narrow':'1.2-2'}} </td>\n <td class=\"govuk-table__cell whitespace-inherit left\" *ngIf=\"fee.controls['volume'].value >1\">\n <div [formGroupName]=\"i\">\n <input disabled=\"disabled\" class=\"govuk-input govuk-input--width-4 center\" id=\"feeVolumeUpdated_{{fee.controls['id'].value}}\" (keyup)=\"calAmtToRefund($event.target.value,fee.controls['calculated_amount'].value,fee.controls['volume'].value,i)\" value=\"{{fee.controls['updated_volume'].value}}\" name=\"feeVolumeUpdated_{{fee.controls['id'].value}}\" formControlName=\"updated_volume\" type=\"text\" >\n </div>\n </td>\n <td class=\"govuk-table__cell whitespace-inherit left\" *ngIf=\"fee.controls['volume'].value ===1\">\n <input disabled=\"disabled\" class=\"govuk-input govuk-input--width-4 center\" id=\"VolumeUpdated_{{fee.controls['id'].value}}\" name=\"VolumeUpdated_{{fee.controls['id'].value}}\" type=\"text\" value=\"{{fee.controls['volume'].value}}\">\n </td>\n <td class=\"govuk-table__cell whitespace-inherit center\" scope=\"row\">\n \n <div [formGroupName]=\"i\" class=\"hmcts-currency-input\">\n \n <div class=\"hmcts-currency-input__symbol\" aria-hidden=\"true\">\u00A3</div>\n <input disabled=\"disabled\" class=\"govuk-input govuk-input--width-10\" id=\"feeAmount_{{fee.controls['id'].value}}\" name=\"feeAmount_{{fee.controls['id'].value}}\" type=\"text\" aria-describedby=\"amount-currency \" pattern=\"[0-9]*\" formControlName=\"refund_amount\">\n <input id=\"feeVolume_{{fee.controls['id'].value}}\" name=\"feeVolume_{{fee.controls['id'].value}}\" value= \"{{fee.controls['volume'].value}}\" type=\"hidden\" formControlName=\"volume\">\n <input id=\"feeApportionAmount_{{fee.controls['id'].value}}\" name=\"feeApportionAmount_{{fee.controls['id'].value}}\" value= \"{{fee.controls['apportion_amount'].value}}\" type=\"hidden\" formControlName=\"apportion_amount\">\n <input id=\"calculatedAmount_{{fee.controls['id'].value}}\" name=\"calculatedAmount_{{fee.controls['id'].value}}\" value= \"{{fee.controls['calculated_amount'].value}}\" type=\"hidden\" formControlName=\"calculated_amount\">\n </div> \n \n </td>\n </tr>\n </tbody>\n <tbody class=\"govuk-table__body\" *ngIf=\"isFullyRefund\">\n <tr class=\"govuk-table__row\" *ngFor=\"let fee of fees; let i = index\">\n <td class=\"govuk-table__cell\">\n <div class=\"govuk-checkboxes govuk-checkboxes--large\" data-module=\"govuk-checkboxes\">\n <div class=\"govuk-checkboxes__item\">\n <input \n class=\"govuk-checkboxes__input\" \n \n id=\"{{fee.id}}\" \n name=\"organisation\" \n type=\"checkbox\" \n value=\"{{fee.id}}\"\n disabled=\"disabled\"\n [checked]=\"true\" >\n <label class=\"govuk-label govuk-checkboxes__label\" for=\"{{fee.id}}\">\n <span style=\"display:none\">Select</span>\n </label>\n </div>\n </div>\n </td>\n <td class=\"govuk-table__cell whitespace-inherit\">{{fee.description}} </td>\n <td class=\"govuk-table__cell whitespace-inherit left\" >\n <div type=\"hidden\" style=\"display:none;background-color:white;\" id=\"feeVOl_{{fee.id}}\">{{ fee.calculated_amount / fee.volume }}</div>\n {{ fee.calculated_amount / fee.volume| currency:'GBP':'symbol-narrow':'1.2-2' }}\n </td>\n <td class=\"govuk-table__cell whitespace-inherit left\" >{{ payment.amount | currency:'GBP':'symbol-narrow':'1.2-2'}} </td>\n <td class=\"govuk-table__cell whitespace-inherit left\">\n <div >\n <input disabled=\"disabled\" class=\"govuk-input govuk-input--width-4 center\" id=\"feeVolumeUpdated_{{fee.id}}\" value=\"{{fee.volume}}\" name=\"feeVolumeUpdated_{{fee.id}}\" type=\"text\" >\n </div>\n </td>\n \n <td class=\"govuk-table__cell whitespace-inherit center\" scope=\"row\">\n \n <div class=\"hmcts-currency-input\">\n \n <div class=\"hmcts-currency-input__symbol\" aria-hidden=\"true\">\u00A3</div>\n <input disabled=\"disabled\" class=\"govuk-input govuk-input--width-10\" id=\"feeAmount_{{fee.id}}\" name=\"feeAmount_{{fee.id}}\" type=\"text\" aria-describedby=\"amount-currency \" value=\"{{ payment.amount | currency:'GBP':'symbol-narrow':'1.2-2'}}\" pattern=\"[0-9]*\" >\n </div> \n \n </td>\n </tr>\n </tbody>\n <tbody class=\"govuk-table__body\" *ngIf=\"fees?.length === 0\">\n <td class=\"govuk-table__cell\" colspan=\"6\">No fees recorded</td>\n </tbody>\n </table>\n </div>\n <div class=\"govuk-button-group\">\n\n \n <a (click)=\"gotoServiceRequestPage($event)\" *ngIf=\"!isFullyRefund\" draggable=\"false\" class=\"govuk-button govuk-button--secondary\" data-module=\"govuk-button\">\n Previous\n </a>\n <a (click)=\"goToPaymentViewComponent()\" *ngIf=\"isFullyRefund\" draggable=\"false\" class=\"govuk-button govuk-button--secondary\" data-module=\"govuk-button\">\n Previous\n </a>\n \n <button [disabled] = \"noneSelected()\" (click)=\"gotoIssuePage(isFullyRefund)\" class=\"govuk-button\">\n Continue\n </button>\n \n </div>\n <p>\n <a (click)=\"gotoCasetransationPageCancelBtnClicked($event)\" class=\"govuk-link\" data-module=\"govuk-button\">Cancel</a>\n </p>\n </form>\n </div>\n</ng-container>\n\n<ng-container *ngIf=\"viewCompStatus === 'issuerefundpage1' && isRefundRemission\">\n\n <input #myInput type='hidden' id='iFrameDrivenImageValue' value='ISSUEREFUNDPAGE'> \n <h1 class=\"heading-large\">Process refund</h1>\n <h1 class=\"heading-medium\">Case reference: {{ccdCaseNumber | ccdHyphens }}</h1>\n <span id=\"how-contacted-conditional-hint govuk-font19px\" *ngIf=\"payment\" class=\"form-hint\">\n Payment reference: {{paymentReference}}\n </span>\n <span id=\"how-contacted-conditional-hint govuk-font19px\" *ngIf=\"refundPaymentReference\" class=\"form-hint\">\n Payment reference: {{refundPaymentReference}}\n </span>\n <h1 class=\"heading-large\">Why are you making this refund?\n </h1>\n \n\n <div class=\"govuk-form-group\">\n <form novalidate>\n <div class=\"govuk-form-group\">\n <form [formGroup]=\"remissionForm\" novalidate>\n <fieldset class=\"govuk-fieldset\" aria-describedby=\"how-contacted-conditional-hint\">\n \n <div\n [ngClass]=\"refundHasError ? 'govuk-radios govuk-radios--conditional form-group-error' : 'govuk-radios govuk-radios--conditional'\"\n data-module=\"govuk-radios\" >\n <p class=\"inline-error-message\" *ngIf=\"refundHasError\">\n <span *ngIf=\"refundHasError\">Select a reason why you\u2019re making this refund</span>\n </p>\n\n \n\n <div class = \"container-fluid\">\n <div class=\"row\">\n <div class=\"govuk-radios__item col-md-4\" *ngFor=\"let refund of commonRefundReasons; let i = index;\">\n <!-- <div *ngIf = \"{{refund.name}} !== 'Retrospective remission'\"> -->\n <input class=\"govuk-radios__input\" id=\"{{refund.name}}\" name=\"refundReason\" type=\"radio\"\n formControlName=\"refundReason\" value={{refund.code}}\n (change)=\"selectRadioButton(refund.code, refund.name)\">\n <label class=\"govuk-label--s govuk-radios__label govuk-font__custom\" for=\"how-contacted-conditional\">\n {{refund.name}}\n </label>\n\n <div class=\"govuk-radios__conditional\" *ngIf=\"isRefundReasonsSelected && showReasonText && selectedRefundReason === refund.name \" >\n <label class=\"govuk-label govuk-label--m\" for=\"{{refund.name}}\">\n Enter reason\n </label>\n <div [ngClass]=\"{'form-group-error': isReasonEmpty}\">\n <p class=\"inline-error-message\" *ngIf=\"isReasonEmpty\">\n <span *ngIf=\"isReasonEmpty\">Enter a reason why you\u2019re making this refund</span>\n </p>\n \n <input class=\"govuk-input govuk-input--width-10\" [ngClass]=\"{'inline-error-class': isReasonEmpty}\" id=\"reason\" aria-label=\"reason\" name=\"reason\" type=\"text\" aria-describedby=\"reason\" maxlength=\"30\" formControlName=\"reason\">\n </div>\n </div>\n <!-- </div> -->\n </div>\n </div>\n </div>\n <br/>\n <div>\n <select formControlName=\"refundDDReason\" class=\"govuk-select\" id=\"sort\" (change)=\"selectchange($event)\">\n <option selected='selected' [defaultSelected]=true [value]=\"default\" >{{default}}</option> \n <!-- <option value=\"\" selected='selected'>Select a different reason</option> -->\n <option *ngFor=\"let refund of refundReasons;\" id=\"{{refund.name}}\" value=\"{{refund.code}}\">{{refund.name}}</option>\n </select>\n \n </div>\n <br/>\n <div class=\"govuk-radios__conditional\" *ngIf=\"showReasonText && !isRefundReasonsSelected\" >\n <div [ngClass]=\"{'form-group-error': isReasonEmpty}\">\n <label class=\"govuk-label govuk-label--m\" for=\"amount\">\n Enter reason\n </label>\n <p class=\"inline-error-message\" *ngIf=\"isReasonEmpty\">\n <span *ngIf=\"isReasonEmpty\">Enter a reason why you\u2019re making this refund</span>\n </p>\n <input class=\"govuk-input govuk-input--width-10\" [ngClass]=\"{'inline-error-class': isReasonEmpty}\" id=\"reason\" aria-label=\"reason\" name=\"reason\" type=\"text\" aria-describedby=\"reason\" maxlength=\"{{reasonLength}}\" formControlName=\"reason\">\n </div>\n </div>\n\n \n </div>\n </fieldset>\n </form>\n </div>\n </form>\n </div>\n <div class=\"govuk-button-group\">\n <button (click)=\"gotoPartialFeeRefundScreen()\" class=\"govuk-button govuk-button--secondary\"> Previous</button>\n <button (click)=\"gotoIssueRefundConfirmation(payment)\" class=\"govuk-button\"> Continue</button>\n </div>\n <p>\n <a href=\"javascript:void(0)\" (click)=\"gotoCasetransationPageCancelBtnClicked($event)\" class=\"govuk-link\" data-module=\"govuk-button\">\n Cancel\n </a>\n </p>\n \n</ng-container>\n<ng-container *ngIf=\"viewStatus === 'contactDetailsPage'\">\n <input #myInput type='hidden' id='iFrameDrivenImageValue' value='CAPTUREADDRESSDETAILSPAGE'> \n <h1 class=\"govuk-heading-l\">Process refund</h1>\n <h2 class=\"govuk-heading-m govuk-font19px\">Case reference: {{ccdCaseNumber | ccdHyphens }}</h2>\n <span id=\"how-contacted-conditional-hint\" class=\"govuk-hint govuk-font19px\">\n Payment reference: {{paymentReference}}\n </span>\n <ccpay-contact-details\n [addressObj] = notification\n (assignContactDetails)=\"getContactDetails($event, 'checkissuerefundpage')\"\n (redirectToIssueRefund)=\"gotoRefundReasonPage()\" ></ccpay-contact-details>\n <p>\n <a (click)=\"gotoCasetransationPageCancelBtnClicked($event)\" class=\"govuk-link\" data-module=\"govuk-button\">\n Cancel\n </a>\n </p>\n\n</ng-container>\n\n<ng-container *ngIf=\"viewStatus === 'checkissuerefundpage'\">\n <input #myInput type='hidden' id='iFrameDrivenImageValue' value='CHECKISSUEREFUNDPAGE'> \n <div class=\"govuk-warning-text\">\n \n <h1 class=\"heading-large\"> Check your answers</h1>\n </div>\n <table class=\"govuk-table\">\n \n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__cell govuk-!-font-weight-bold\">Payment reference</td>\n <td class=\"govuk-table__cell\">{{paymentReference}}</td>\n </tr>\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__cell govuk-!-font-weight-bold\">Payment amount</td>\n <td class=\"govuk-table__cell\">{{payment.amount | currency:'GBP':'symbol-narrow':'1.2-2'}}</td>\n </tr>\n <tr>\n <td class=\"govuk-table__cell govuk-!-font-weight-bold\">Reason for refund</td>\n <td class=\"govuk-table__cell\">{{ displayRefundReason?.trim() }} \n <a (click)=\"changeIssueRefundReason()\" class=\"govuk-link right\" >Change</a>\n </td>\n </tr>\n <tr class=\"govuk-table__row\" *ngIf=\"!isFullyRefund\">\n <td class=\"govuk-table__cell govuk-!-font-weight-bold\">Refund amount</td>\n <td class=\"govuk-table__cell\">{{totalRefundAmount | currency:'GBP':'symbol-narrow':'1.2-2'}}\n <a (click)=\"changeRefundAmount()\" class=\"govuk-link right\" >Change</a>\n </td>\n </tr>\n <tr class=\"govuk-table__row\" *ngIf=\"isFullyRefund\">\n <td class=\"govuk-table__cell govuk-!-font-weight-bold\">Refund amount</td>\n <td class=\"govuk-table__cell\">{{payment.amount | currency:'GBP':'symbol-narrow':'1.2-2'}}</td>\n </tr>\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__cell govuk-!-font-weight-bold\">Send to</td>\n <td class=\"govuk-table__cell\">{{orderParty}}</td>\n </tr>\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__cell govuk-!-font-weight-bold\">Send via</td>\n <td class=\"govuk-table__cell whitespace-inherit\">\n <div *ngIf=\"contactDetailsObj?.notification_type === 'EMAIL'\" class=\"contactDetails-width\">\n <strong>Email</strong>\n <br/>\n {{contactDetailsObj?.email?.trim()}}\n </div>\n <div *ngIf=\"contactDetailsObj?.notification_type === 'LETTER'\" class=\"contactDetails-width\">\n <strong>Post</strong>\n <br/>\n {{contactDetailsObj?.address_line?.trim()}}&nbsp;{{contactDetailsObj?.city?.trim()}}&nbsp;{{contactDetailsObj?.county?.trim()}}&nbsp;{{contactDetailsObj?.country?.trim()}}&nbsp;{{contactDetailsObj?.postal_code?.trim()}}\n </div>\n <a (click)=\"gotoContactDetailsPage(contactDetailsObj)\" class=\"govuk-link right\" >Change</a>\n </td>\n </tr>\n\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__cell govuk-!-font-weight-bold\">Notification</td>\n <td class=\"govuk-table__cell\">{{templateInstructionType}}\n <a *ngIf=\"!notificationPreview\" href=\"Javascript:void(0)\" class=\"govuk-link right\" (click)=\"showNotificationPreview()\">\n Preview\n </a>\n <a *ngIf=\"notificationPreview\" href=\"Javascript:void(0)\" class=\"govuk-link right\" (click)=\"hideNotificationPreview()\">\n Hide Preview\n </a>\n </td>\n </tr>\n </table>\n\n <app-notification-preview *ngIf=\"notificationPreview\" \n [payment]=\"payment\" \n [contactDetails]=\"contactDetailsObj\"\n [refundReason]=\"selectedRefundReasonCode\"\n [refundAmount]=\"isFullyRefund ? payment.amount : totalRefundAmount\"></app-notification-preview>\n\n\n <div class=\"govuk-button-group\">\n <button type=\"submit\" class=\"button govuk-button--secondary\" (click)=\"gotoContactDetailsPage(contactDetailsObj)\"> Previous </button>\n <button type=\"submit\"\n [disabled]=\"isConfirmationBtnDisabled\"\n [ngClass]='isConfirmationBtnDisabled ? \"button button--disabled govuk-!-margin-right-1\" : \"button govuk-!-margin-right-1\"'\n (click)=\"confirmIssueRefund(isFullyRefund)\">\n Submit refund\n </button>\n </div>\n <p>\n <a (click)=\"gotoCasetransationPageCancelBtnClicked($event)\" class=\"govuk-link\" data-module=\"govuk-button\">\n Cancel\n </a>\n </p>\n\n</ng-container>\n\n<!--Retro Refund-->\n<ng-container *ngIf=\"viewCompStatus === 'addrefundforremission'\">\n <input #myInput type='hidden' id='iFrameDrivenImageValue' value='ADDRESSDETAILSRETROREMISSIONPAGE'> \n <h1 class=\"govuk-heading-l\">Process refund</h1>\n <h2 class=\"govuk-heading-m govuk-font19px\">Case reference: {{ccdCaseNumber | ccdHyphens }}</h2>\n <span id=\"how-contacted-conditional-hint\" class=\"govuk-hint govuk-font19px\">\n Payment reference: {{paymentReference}}\n </span>\n<ccpay-contact-details \n[addressObj] = notification\n(assignContactDetails)=\"getContactDetails($event, 'addrefundcheckandanswer')\"\n(redirectToIssueRefund)=\"gotoServiceRequestPage($event)\" ></ccpay-contact-details>\n<p>\n <a (click)=\"gotoCasetransationPageCancelBtnClicked($event)\" class=\"govuk-link\" data-module=\"govuk-button\">\n Cancel\n </a>\n</p>\n</ng-container>\n<ng-container *ngIf=\"viewStatus === 'addrefundcheckandanswer'\">\n <input #myInput type='hidden' id='iFrameDrivenImageValue' value='ADDREFUNDFORREMISSION'> \n <div class=\"govuk-warning-text\">\n \n <h1 class=\"heading-large\"> Check your answers</h1>\n </div>\n <table class=\"govuk-table\">\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__cell govuk-!-font-weight-bold\">Reason for refund</td>\n <td class=\"govuk-table__cell\">Retrospective remission</td>\n </tr>\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__cell govuk-!-font-weight-bold\">Payment reference</td>\n <td class=\"govuk-table__cell\">{{paymentReference}}</td>\n </tr>\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__cell govuk-!-font-weight-bold\">Refund amount</td>\n <td class=\"govuk-table__cell\">{{remission.hwf_amount | currency:'GBP':'symbol-narrow':'1.2-2'}}</td>\n </tr>\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__cell govuk-!-font-weight-bold\">Fee code</td>\n <td class=\"govuk-table__cell\">{{remission.fee_code}}</td>\n </tr>\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__cell govuk-!-font-weight-bold\">Fee amount</td>\n <td class=\"govuk-table__cell\">{{feeamount | currency:'GBP':'symbol-narrow':'1.2-2'}}</td>\n </tr>\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__cell govuk-!-font-weight-bold\">Send to</td>\n <td class=\"govuk-table__cell\">{{orderParty}}</td>\n </tr>\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__cell govuk-!-font-weight-bold\">Send via</td>\n <td class=\"govuk-table__cell whitespace-inherit\">\n <div *ngIf=\"contactDetailsObj?.notification_type === 'EMAIL'\" class=\"contactDetails-width\">\n <strong>Email</strong>\n <br/>\n {{contactDetailsObj?.email?.trim()}}\n </div>\n <div *ngIf=\"contactDetailsObj?.notification_type === 'LETTER'\" class=\"contactDetails-width\">\n <strong>Post</strong>\n <br/>\n {{contactDetailsObj?.address_line?.trim()}}&nbsp;{{contactDetailsObj?.city?.trim()}}&nbsp;{{contactDetailsObj?.county?.trim()}}&nbsp;{{contactDetailsObj?.country?.trim()}}&nbsp;{{contactDetailsObj?.postal_code?.trim()}}\n </div>\n <a (click)=\"gotoAddressPage(contactDetailsObj)\" class=\"govuk-link right\" >Change</a>\n </td>\n </tr>\n\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__cell govuk-!-font-weight-bold\">Notification</td>\n <td class=\"govuk-table__cell\">{{templateInstructionType}}\n <a *ngIf=\"!notificationPreview\" href=\"Javascript:void(0)\" class=\"govuk-link right\" (click)=\"showNotificationPreview()\">\n Preview\n </a>\n <a *ngIf=\"notificationPreview\" href=\"Javascript:void(0)\" class=\"govuk-link right\" (click)=\"hideNotificationPreview()\">\n Hide Preview\n </a>\n </td>\n </tr>\n </table>\n\n <app-notification-preview *ngIf=\"notificationPreview\" \n [contactDetails]=\"contactDetailsObj\"\n [paymentReference]=\"paymentReference\"\n [payment]=\"paymentObj\"\n [refundReason]=\"'RR036'\"\n [refundAmount]=\"remission.hwf_amount\"></app-notification-preview>\n\n <div class=\"govuk-button-group\">\n <button type=\"submit\" class=\"button govuk-button--secondary\" (click)=\"gotoAddressPage(contactDetailsObj)\">Previous</button>\n <button type=\"submit\"\n [disabled]=\"isConfirmationBtnDisabled\"\n [ngClass]='isConfirmationBtnDisabled ? \"button button--disabled govuk-!-margin-right-1\" : \"button govuk-!-margin-right-1\"'\n (click)=\"processRefund()\">\n Submit refund\n </button>\n </div>\n <p>\n <a href=\"javascript:void(0)\" (click)=\"gotoCasetransationPageCancelBtnClicked($event)\" class=\"govuk-link\" data-module=\"govuk-button\">\n Cancel\n </a>\n </p>\n\n</ng-container>\n\n<ng-container *ngIf=\"viewStatus === 'retrorefundconfirmationpage'\">\n <div class=\"govuk-grid-row\">\n <div >\n <div class=\"govuk-panel govuk-panel--confirmation\">\n <h1 class=\"govuk-panel__title\">\n Refund submitted\n </h1>\n \n <div class=\"govuk-panel__body\">\n <p class=\"govuk-body white\"><strong>Refund reference: {{refundReference}}</strong></p>\n </div>\n \n </div>\n <div *ngIf=\"isPaymentSuccess\">\n <h2 class=\"govuk-heading-l\">What happens next</h2>\n <p class=\"govuk-body\">\n A refund request for {{ refundAmount| currency:'GBP':'symbol-narrow':'1.2-2'}} has been passed to a team leader to approve.\n </p>\n </div>\n <p class=\"govuk-body\">\n <a href=\"javascript:void(0)\" (click)=\"gotoCasetransationPageCancelBtnClicked($event)\" class=\"govuk-link pointer\" data-module=\"govuk-button\">\n Return to case\n </a>\n </p>\n </div>\n </div>\n</ng-container>\n\n<ng-container *ngIf=\"viewStatus === 'order-full-view'\">\n <ccpay-service-request\n [viewStatus] = \"viewStatus\"\n [orderRef] = \"orderRef\"\n [isServiceRequest]=\"isServiceRequest\"\n [orderStatus] = \"orderStatus\"\n [orderCreated] = \"orderCreated\"\n [orderParty] = \"orderParty\"\n [orderCCDEvent] = \"orderCCDEvent\"\n [orderDetail] = \"orderDetail\"\n [LOGGEDINUSERROLES] = \"LOGGEDINUSERROLES\"\n [takePayment] = \"takePayment\"\n [ccdCaseNumber] = \"ccdCaseNumber\"\n [orderFeesTotal] = \"orderFeesTotal\"\n [orderTotalPayments] = \"orderTotalPayments\"\n [orderRemissionTotal] = \"orderRemissionTotal\">\n</ccpay-service-request>\n</ng-container>\n\n<ng-container *ngIf=\"viewStatus === 'payment-view'\">\n <ccpay-payment-view \n [LOGGEDINUSERROLES] = \"LOGGEDINUSERROLES\"\n [isTurnOff] = \"isTurnOff\" \n [isTakePayment] = \"takePayment\" \n [caseType] = \"caseType\"\n [isServiceRequest]=\"isServiceRequest\"\n [orderRef] = \"orderRef\"\n [orderStatus] = \"orderStatus\"\n [orderCreated] = \"orderCreated\"\n [orderParty] = \"orderParty\"\n [orderCCDEvent] = \"orderCCDEvent\"\n [orderDetail] = \"orderDetail\"\n [orderFeesTotal] = \"orderFeesTotal\"\n [orderTotalPayments] = \"orderTotalPayments\"\n [orderRemissionTotal] = \"orderRemissionTotal\"\n >\n</ccpay-payment-view>\n</ng-container>\n\n</div>",
5285
+ styles: [".add-remission .button{margin:20px 2px;padding:.5em;font-size:19px;font-weight:200}.add-remission td.govuk-table__cell{width:50%}.add-remission .govuk-button--secondary{background-color:#dee0e2;box-shadow:0 2px 0 #858688;color:#0b0c0c;margin-right:.5em}.add-remission .govuk-label--s,.add-remission .govuk-warning-text__text,.add-remission .hmcts-currency-input__symbol{font-size:19px;font-weight:400}.add-remission .inline-error-class{outline:3px solid #a71414;outline-offset:0;border-color:#a71414}.add-remission .inline-error-message{color:#a71414;border-color:#a71414;font-weight:700;margin-top:10px;font-size:20px}.add-remission .govuk-button,.add-remission .govuk-link{margin-right:1em;font-size:19px;font-weight:200}.add-remission .govuk-button-group{padding-top:2em}.add-remission .heading-medium{margin-top:.875em}.add-remission .heading-large{margin-top:.25em}.add-remission .govuk-panel--confirmation{color:#fff;background:#00703c}.add-remission .govuk-panel__title{font-size:5rem}.add-remission .govuk-body,.add-remission .govuk-body-m{font-size:2.1875rem}.add-remission .govuk-radios__item{clear:none!important;display:inline-block;width:45%!important}.add-remission .govuk-radios__conditional{padding-top:12px!important}.add-remission .right{float:right;cursor:pointer}.add-remission .radio{float:right}.govuk-font19px,.govuk-input,.govuk-select{font-size:19px}.govuk-select{font-weight:400}.govuk-input--width-10{max-width:50ex}.govuk-label--m{font-size:19px;font-weight:400}.govuk-error-summary__body{font-size:19px!important}.govuk-error-summary__title{font-size:24px!important}.white{color:#fff}.pagesize{margin:2em;width:97%}.pointer{cursor:pointer}.col-18{min-width:18em}.col-6{min-width:6em}.col-8{min-width:8em}.col-1{min-width:1em}.col-25{width:25%!important}.col-24{width:24%!important}.left{text-align:left}.center{text-align:center}.col-60{width:60%;text-align:left}.margin-top--size{margin-top:-30px}.contactDetails-width{width:70%}.right{cursor:pointer}.form-hint{font-size:19px!important}.govuk-panel-border--confirmation{color:#0b0c0c;border:5px solid #00703c}.whitespace-inherit{white-space:inherit!important}.govuk-link{cursor:pointer}"]
4365
5286
  },] }
4366
5287
  ];
4367
5288
  AddRemissionComponent.ctorParameters = () => [
4368
5289
  { type: FormBuilder },
4369
5290
  { type: Router },
4370
5291
  { type: PaymentViewService },
5292
+ { type: NotificationService },
4371
5293
  { type: PaymentLibComponent },
4372
5294
  { type: RefundsService },
4373
5295
  { type: ChangeDetectorRef },
@@ -4375,6 +5297,7 @@ AddRemissionComponent.ctorParameters = () => [
4375
5297
  ];
4376
5298
  AddRemissionComponent.propDecorators = {
4377
5299
  fee: [{ type: Input }],
5300
+ fees: [{ type: Input }],
4378
5301
  payment: [{ type: Input }],
4379
5302
  remission: [{ type: Input }],
4380
5303
  ccdCaseNumber: [{ type: Input }],
@@ -4388,7 +5311,12 @@ AddRemissionComponent.propDecorators = {
4388
5311
  isFromRefundListPage: [{ type: Input }],
4389
5312
  isFromPaymentDetailPage: [{ type: Input }],
4390
5313
  isFromServiceRequestPage: [{ type: Input }],
5314
+ isFullyRefund: [{ type: Input, args: ['isFullyRefund',] }],
4391
5315
  feeamount: [{ type: Input }],
5316
+ refundPaymentReference: [{ type: Input }],
5317
+ isFromRefundStatusPage: [{ type: Input }],
5318
+ changeRefundReason: [{ type: Input }],
5319
+ isServiceRequest: [{ type: Input, args: ["isServiceRequest",] }],
4392
5320
  LOGGEDINUSERROLES: [{ type: Input, args: ['LOGGEDINUSERROLES',] }],
4393
5321
  orderDetail: [{ type: Input, args: ['orderDetail',] }],
4394
5322
  orderRef: [{ type: Input, args: ['orderRef',] }],
@@ -4402,7 +5330,8 @@ AddRemissionComponent.propDecorators = {
4402
5330
  orderRemissionTotal: [{ type: Input, args: ['orderRemissionTotal',] }],
4403
5331
  cancelRemission: [{ type: Output }],
4404
5332
  refundListReason: [{ type: Output }],
4405
- refundListAmount: [{ type: Output }]
5333
+ refundListAmount: [{ type: Output }],
5334
+ refundFees: [{ type: Output }]
4406
5335
  };
4407
5336
 
4408
5337
  class CcdHyphensPipe {
@@ -4476,7 +5405,6 @@ class XlFileService {
4476
5405
  exportAsExcelFile(json, excelFileName) {
4477
5406
  let worksheet;
4478
5407
  let workbook;
4479
- console.log(excelFileName);
4480
5408
  if (excelFileName.match('Data_Loss') !== null) {
4481
5409
  worksheet = XLSX.utils.json_to_sheet(json, { header: ['loss_resp', 'payment_asset_dcn', 'env_ref', 'env_item', 'resp_service_id', 'resp_service_name', 'date_banked', 'bgc_batch', 'payment_method', 'amount'] });
4482
5410
  worksheet = this.setDataLossReportHeaders(worksheet);
@@ -4872,7 +5800,7 @@ class ReportsComponent {
4872
5800
  ReportsComponent.decorators = [
4873
5801
  { type: Component, args: [{
4874
5802
  selector: 'ccpay-reports',
4875
- template: "<div class=\"header\">\n <input #myInput type='hidden' class='iFrameDrivenImageValue' value='REPORTS'>\n <ccpay-error-banner *ngIf=\"errorMessage.showError\" [errorMessage]=\"errorMessage\"></ccpay-error-banner>\n</div>\n<form [formGroup]=\"reportsForm\">\n <div class=\"govuk-form-group\">\n <fieldset class=\"govuk-fieldset\" aria-label=\"Report Type\">\n <legend class=\"govuk-fieldset__legend--xl\">\n <h1 class=\"govuk-fieldset__heading\"> Choose the report type and date range</h1>\n </legend>\n <div class=\"govuk-radios govuk-radios--conditional\" data-module=\"govuk-radios\">\n <div class=\"govuk-radios__item\">\n <input \n required\n id=\"DataLoss\"\n class=\"govuk-radios__input\"\n formControlName=\"selectedreport\"\n (click)=\"validateDates('DATA_LOSS')\"\n name=\"selectedreport\"\n type=\"radio\"\n value=\"DATA_LOSS\" \n data-aria-controls=\"DataLoss\"/>\n <label class=\"govuk-label govuk-radios__label govuk-label--m\" for=\"DataLoss\">Data loss</label>\n <span class=\"form-hint\">Missing transactions where data has been received from only either of Exela or Bulk scan</span>\n </div>\n\n <div class=\"govuk-radios__item\">\n <input \n id=\"UnprocessedTransactions\"\n class=\"govuk-radios__input\"\n formControlName=\"selectedreport\"\n (click)=\"validateDates('UNPROCESSED')\"\n name=\"selectedreport\"\n type=\"radio\"\n value=\"UNPROCESSED\" \n data-aria-controls=\"UnprocessedTransactions\"/>\n <label class=\"govuk-label govuk-radios__label govuk-label--m\" for=\"UnprocessedTransactions\">Unprocessed transactions</label>\n <span class=\"form-hint\">Transaction records that are still unprocessed by staff.</span>\n </div>\n\n <div class=\"govuk-radios__item\">\n <input \n id=\"ProcessedUnallocated\"\n class=\"govuk-radios__input\"\n formControlName=\"selectedreport\"\n name=\"selectedreport\"\n (click)=\"validateDates('PROCESSED_UNALLOCATED')\"\n type=\"radio\"\n value=\"PROCESSED_UNALLOCATED\" \n data-aria-controls=\"ProcessedUnallocated\"/>\n <label class=\"govuk-label govuk-radios__label govuk-label--m\" for=\"ProcessedUnallocated\">Processed unallocated</label>\n <span class=\"form-hint\">Payments that are marked as \u2018Unidentified\u2019 or \u2018Transferred\u2019 (Unsolicited requests)</span>\n </div>\n\n <div class=\"govuk-radios__item\">\n <input \n id=\"ShortfallsandSurplus\"\n class=\"govuk-radios__input\"\n formControlName=\"selectedreport\"\n name=\"selectedreport\"\n (click)=\"validateDates('SURPLUS_AND_SHORTFALL')\"\n type=\"radio\"\n value=\"SURPLUS_AND_SHORTFALL\" \n data-aria-controls=\"ShortfallsandSurplus\"/>\n <label class=\"govuk-label govuk-radios__label govuk-label--m\" for=\"ShortfallsandSurplus\">Under payment and Over payment</label>\n <span class=\"form-hint\">Requests where balances are marked as Under payment/Over payment further case management.\n E.g: Refund approval, Customer contact</span>\n </div>\n\n <div class=\"govuk-radios__item\" *ngIf=\"ISPAYMENTSTATUSENABLED\">\n <input \n id=\"PaymentFailureEvent\"\n class=\"govuk-radios__input\"\n formControlName=\"selectedreport\"\n name=\"selectedreport\"\n (click)=\"validateDates('PAYMENT_FAILURE_EVENT')\"\n type=\"radio\"\n value=\"PAYMENT_FAILURE_EVENT\" \n data-aria-controls=\"PaymentFailureEvent\"/>\n <label class=\"govuk-label govuk-radios__label govuk-label--m\" for=\"PaymentFailureEvent\">Payment failure event</label>\n <span class=\"form-hint\">Failed payment transaction details</span>\n </div>\n </div>\n <div class=\"govuk-form-group\">\n <div class=\"datefrom\">\n <label class=\"govuk-label govuk-radios__label govuk-label--m\" for=\"date-from\">Date from</label>\n <input (change)=\"getSelectedFromDate()\" [max]=\"getToday()\" class=\"form-control\" id=\"date-from\" name=\"date-from\" type=\"date\" formControlName=\"startDate\" required/>\n </div>\n </div>\n\n <div class=\"dateto\">\n <label class=\"govuk-label govuk-radios__label govuk-label--m\" for=\"date-to\">Date to</label>\n <input (change)=\"getSelectedFromDate()\" [max]=\"getToday()\" class=\"form-control\" id=\"date-to\" name=\"search\" type=\"date\" formControlName=\"endDate\" required/>\n </div>\n </fieldset>\n </div>\n\n <p class=\"inline-error-message\" *ngIf=\"isStartDateLesthanEndDate || isDateRangeBetnWeek || isDateBetwnMonth\">\n <span *ngIf=\"isStartDateLesthanEndDate\">Please select 'Date From' less than or equal to 'Date To'</span>\n <span *ngIf=\"isDateRangeBetnWeek\"> Please select the date range between 7 days</span>\n <span *ngIf=\"isDateBetwnMonth\"> Please select the date range between 30 days</span>\n </p>\n <div class=\"btnsubmit\">\n <button type=\"submit\" (click)=\"downloadReport()\" class=\"button\" [disabled]=\"!reportsForm.valid || isDownLoadButtondisabled || isStartDateLesthanEndDate || isDateRangeBetnWeek\">Download report</button>\n </div>\n </form>\n \n",
5803
+ template: "<div class=\"header\">\n <input #myInput type='hidden' class='iFrameDrivenImageValue' value='REPORTS'>\n <ccpay-error-banner *ngIf=\"errorMessage.showError\" [errorMessage]=\"errorMessage\"></ccpay-error-banner>\n <legend class=\"govuk-fieldset__legend--xl\">\n <h1 class=\"govuk-fieldset__heading\"> Choose the report type and date range</h1>\n </legend>\n</div>\n<form [formGroup]=\"reportsForm\">\n <div class=\"govuk-form-group\">\n <div class=\"govuk-radios govuk-radios--conditional\" data-module=\"govuk-radios\">\n <div class=\"govuk-radios__item\">\n <input \n required\n id=\"DataLoss\"\n class=\"govuk-radios__input\"\n formControlName=\"selectedreport\"\n (click)=\"validateDates('DATA_LOSS')\"\n name=\"selectedreport\"\n type=\"radio\"\n value=\"DATA_LOSS\" \n data-aria-controls=\"DataLoss\"/>\n <label class=\"govuk-label govuk-radios__label govuk-label--m\" for=\"DataLoss\">Data loss</label>\n <span class=\"form-hint\">Missing transactions where data has been received from only either of Exela or Bulk scan</span>\n </div>\n\n <div class=\"govuk-radios__item\">\n <input \n id=\"UnprocessedTransactions\"\n class=\"govuk-radios__input\"\n formControlName=\"selectedreport\"\n (click)=\"validateDates('UNPROCESSED')\"\n name=\"selectedreport\"\n type=\"radio\"\n value=\"UNPROCESSED\" \n data-aria-controls=\"UnprocessedTransactions\"/>\n <label class=\"govuk-label govuk-radios__label govuk-label--m\" for=\"UnprocessedTransactions\">Unprocessed transactions</label>\n <span class=\"form-hint\">Transaction records that are still unprocessed by staff.</span>\n </div>\n\n <div class=\"govuk-radios__item\">\n <input \n id=\"ProcessedUnallocated\"\n class=\"govuk-radios__input\"\n formControlName=\"selectedreport\"\n name=\"selectedreport\"\n (click)=\"validateDates('PROCESSED_UNALLOCATED')\"\n type=\"radio\"\n value=\"PROCESSED_UNALLOCATED\" \n data-aria-controls=\"ProcessedUnallocated\"/>\n <label class=\"govuk-label govuk-radios__label govuk-label--m\" for=\"ProcessedUnallocated\">Processed unallocated</label>\n <span class=\"form-hint\">Payments that are marked as \u2018Unidentified\u2019 or \u2018Transferred\u2019 (Unsolicited requests)</span>\n </div>\n\n <div class=\"govuk-radios__item\">\n <input \n id=\"ShortfallsandSurplus\"\n class=\"govuk-radios__input\"\n formControlName=\"selectedreport\"\n name=\"selectedreport\"\n (click)=\"validateDates('SURPLUS_AND_SHORTFALL')\"\n type=\"radio\"\n value=\"SURPLUS_AND_SHORTFALL\" \n data-aria-controls=\"ShortfallsandSurplus\"/>\n <label class=\"govuk-label govuk-radios__label govuk-label--m\" for=\"ShortfallsandSurplus\">Under payment and Over payment</label>\n <span class=\"form-hint\">Requests where balances are marked as Under payment/Over payment further case management.\n E.g: Refund approval, Customer contact</span>\n </div>\n <div class=\"govuk-radios__item\" *ngIf=\"ISPAYMENTSTATUSENABLED\">\n <input \n id=\"PaymentFailureEvent\"\n class=\"govuk-radios__input\"\n formControlName=\"selectedreport\"\n name=\"selectedreport\"\n (click)=\"validateDates('PAYMENT_FAILURE_EVENT')\"\n type=\"radio\"\n value=\"PAYMENT_FAILURE_EVENT\" \n data-aria-controls=\"PaymentFailureEvent\"/>\n <label class=\"govuk-label govuk-radios__label govuk-label--m\" for=\"PaymentFailureEvent\">Payment failure event</label>\n <span class=\"form-hint\">Failed payment transaction details</span>\n </div>\n </div>\n </div>\n <div class=\"govuk-form-group\">\n <div class=\"datefrom\">\n <label class=\"govuk-label govuk-radios__label govuk-label--m\" for=\"date-from\">Date from</label>\n <input (change)=\"getSelectedFromDate()\" [max]=\"getToday()\" class=\"form-control\" id=\"date-from\" name=\"date-from\" type=\"date\" formControlName=\"startDate\" required/>\n </div>\n\n <div class=\"dateto\">\n <label class=\"govuk-label govuk-radios__label govuk-label--m\" for=\"date-to\">Date to</label>\n <input (change)=\"getSelectedFromDate()\" [max]=\"getToday()\" class=\"form-control\" id=\"date-to\" name=\"search\" type=\"date\" formControlName=\"endDate\" required/>\n </div>\n </div>\n <p class=\"inline-error-message\" *ngIf=\"isStartDateLesthanEndDate || isDateRangeBetnWeek || isDateBetwnMonth\">\n <span *ngIf=\"isStartDateLesthanEndDate\">Please select 'Date From' less than or equal to 'Date To'</span>\n <span *ngIf=\"isDateRangeBetnWeek\"> Please select the date range between 7 days</span>\n <span *ngIf=\"isDateBetwnMonth\"> Please select the date range between 30 days</span>\n </p>\n <div class=\"btnsubmit\">\n <button type=\"submit\" (click)=\"downloadReport()\" class=\"button\" [disabled]=\"!reportsForm.valid || isDownLoadButtondisabled || isStartDateLesthanEndDate || isDateRangeBetnWeek\">Download report</button>\n </div>\n </form>\n \n",
4876
5804
  styles: [".govuk-radios__input:focus+.govuk-radios__label:before{border-width:4px;box-shadow:0 0 0 4px #ffaf00}.datefrom{width:50%;float:left}.dateto{width:50%;float:right}.govuk-label--m{font-size:large}.form-hint{padding-left:.7em}.header{margin-top:10px;margin-bottom:15px}.btnsubmit{margin-bottom:30px}.inline-error-message{color:#a71414;font-weight:700;margin-top:10px}"]
4877
5805
  },] }
4878
5806
  ];
@@ -4911,8 +5839,11 @@ class TableComponent {
4911
5839
  if (this.refundList !== undefined) {
4912
5840
  this.userLst = this.refundList.reduce((r, { user_full_name }) => (r[user_full_name] = '', r), {});
4913
5841
  this.userLst = Object.keys(this.userLst);
5842
+ this.userLst.sort((a, b) => a.toString().localeCompare(b));
5843
+ this.serviceLst = this.refundList.reduce((r, { service_type }) => (r[service_type] = '', r), {});
5844
+ this.serviceLst = Object.keys(this.serviceLst);
5845
+ this.serviceLst.sort((a, b) => a.toString().localeCompare(b));
4914
5846
  }
4915
- this.userLst.sort((a, b) => a.toString().localeCompare(b));
4916
5847
  }
4917
5848
  /**
4918
5849
  * Set the paginator and sort after the view init since this component will
@@ -4957,8 +5888,8 @@ class TableComponent {
4957
5888
  TableComponent.decorators = [
4958
5889
  { type: Component, args: [{
4959
5890
  selector: 'ccpay-table',
4960
- template: "<div class=\"add-remission\">\n <div *ngIf=\"errorMessage\">\n <div class=\"error-summary\" role=\"group\" aria-labelledby=\"failure-error-summary-heading\" tabindex=\"-1\">\n <h2 class=\"heading-medium error-summary-heading\" id=\"failure-error-summary-heading\">\n Error in processing the request\n </h2>\n <div class=\"govuk-error-summary__body\">\n {{ errorMessage }}\n </div>\n </div>\n </div>\n\n<div *ngIf=\"dataSource.data.length > 0\" class=\"govuk-form-group\" style=\"float: right\">\n <label class=\"govuk-label dropdpwn\" for=\"sort\" >\n Filter by caseworker:\n </label>\n <select class=\"govuk-select\" id=\"sort\" name=\"sort\" (change)=\"selectchange($event)\">\n <option value=\"\" selected='selected'>All caseworkers</option>\n <option *ngFor=\"let name of userLst;\" value=\"{{name}}\">{{name}}</option>\n </select>\n </div>\n \n<div *ngIf=\"dataSource.data.length > 0\" class=\"example-container\">\n\n <mat-table [dataSource]=\"dataSource\" matSort>\n\n <ng-container matColumnDef=\"ccd_case_number\">\n <mat-header-cell *matHeaderCellDef >Case reference </mat-header-cell>\n <mat-cell *matCellDef=\"let row\" class=\"whitespace-inherit\"> {{row.ccd_case_number | ccdHyphens }} </mat-cell>\n </ng-container>\n\n <ng-container matColumnDef=\"refund_reference\">\n <mat-header-cell *matHeaderCellDef > Refund reference </mat-header-cell>\n <mat-cell *matCellDef=\"let row\" class=\"whitespace-inherit\"> {{row.refund_reference}} </mat-cell>\n </ng-container>\n\n <ng-container matColumnDef=\"user_full_name\">\n <mat-header-cell *matHeaderCellDef > Submitted by </mat-header-cell>\n <mat-cell *matCellDef=\"let row\" [style.color]=\"row.color\" class=\"whitespace-inherit\"> {{row.user_full_name }} </mat-cell>\n </ng-container>\n\n <ng-container matColumnDef=\"date_created\">\n <mat-header-cell *matHeaderCellDef mat-sort-header> Date created </mat-header-cell>\n <mat-cell *matCellDef=\"let row\" class=\"whitespace-inherit\"> {{row.date_created | date:'d MMMM yyyy'}} </mat-cell>\n </ng-container>\n\n <ng-container matColumnDef=\"date_updated\">\n <mat-header-cell *matHeaderCellDef mat-sort-header> Last updated</mat-header-cell>\n <mat-cell *matCellDef=\"let row\" [style.color]=\"row.color\" class=\"whitespace-inherit\"> {{row.date_updated | date:'d MMMM yyyy'}} </mat-cell>\n </ng-container>\n\n <ng-container *ngIf=\"isApprovalFlow\" matColumnDef=\"Action\">\n <mat-header-cell *matHeaderCellDef> Action </mat-header-cell>\n <mat-cell *matCellDef=\"let row\" [style.color]=\"row.color\" > <a href=\"javascript:void(0)\" (click)=\"goToCaseReview(row.ccd_case_number, row)\">Review case</a>&nbsp;<a href=\"javascript:void(0)\" (click)=\"goToRefundProcessComponent(row.refund_reference, row)\">Process refund</a></mat-cell>\n </ng-container>\n \n <ng-container *ngIf=\"!isApprovalFlow\" matColumnDef=\"Action\">\n <mat-header-cell *matHeaderCellDef > Action </mat-header-cell>\n <mat-cell *matCellDef=\"let row\" [style.color]=\"row.color\"> <a href=\"javascript:void(0)\" (click)=\"goToRefundViewComponent(row.refund_reference, row)\">Review refund</a></mat-cell>\n </ng-container>\n\n <mat-header-row *matHeaderRowDef=\"displayedColumns\"></mat-header-row>\n <mat-row *matRowDef=\"let row; columns: displayedColumns;\">\n </mat-row>\n </mat-table>\n <mat-paginator [pageSizeOptions]=\"[5, 10, 25, 100]\"></mat-paginator>\n</div>\n\n<div class=\"govuk-label dropdpwn\" *ngIf=\"dataSource.data.length === 0\">No records to display</div>\n",
4961
- styles: [".mat-header-row{min-height:27px}.mat-cell{padding:0 10px 0 0;text-align:left;word-wrap:break-word;white-space:inherit!important;font-size:19px;line-height:25px;font-weight:400}.mat-cell,.mat-table{font-family:nta,Arial,sans-serif}.mat-table{color:#0b0c0c;display:table;-webkit-font-smoothing:antialiased;margin-bottom:1px;box-sizing:border-box;text-indent:0;border-spacing:0;border-collapse:collapse;font-size:1.1875rem;line-height:1.31578947;table-layout:fixed;width:102%}.mat-header-cell{text-align:left;font-weight:700;padding:10px 10px 10px 0;word-wrap:break-word;font-size:19px;line-height:25px;color:#0b0c0c;cursor:pointer;font-family:inherit}.dropdpwn{display:inline-block;margin-right:10px;font-size:19px}.mat-column-ccdCaseNumber{flex:3em}.mat-column-refundReference{flex:6em}.mat-column-reason{flex:2em}.govuk-select{font-size:19px;font-weight:400}.govuk-error-summary__title{font-size:24px!important}"]
5891
+ template: "<div class=\"add-remission\">\n <div *ngIf=\"errorMessage\">\n <div class=\"error-summary\" role=\"group\" aria-labelledby=\"failure-error-summary-heading\" tabindex=\"-1\">\n <h2 class=\"heading-medium error-summary-heading\" id=\"failure-error-summary-heading\">\n Error in processing the request\n </h2>\n <div class=\"govuk-error-summary__body\">\n {{ errorMessage }}\n </div>\n </div>\n </div>\n\n \n\n<div *ngIf=\"dataSource.data.length > 0\" class=\"govuk-form-group float-right\">\n <label class=\"govuk-label dropdpwn\" for=\"sort\" >\n Filter by caseworker:\n </label>\n <select class=\"govuk-select\" id=\"sort\" name=\"sort\" (change)=\"selectchange($event)\">\n <option value=\"\" selected='selected'>All caseworkers</option>\n <option *ngFor=\"let name of userLst;\" value=\"{{name}}\">{{name}}</option>\n </select>\n</div>\n\n <div *ngIf=\"dataSource.data.length > 0\" class=\"govuk-form-group float-right-padding\">\n <label class=\"govuk-label dropdpwn\" for=\"sort\" >\n Filter by service:\n </label>\n <select class=\"govuk-select\" id=\"sort\" name=\"sort\" (change)=\"selectchange($event)\">\n <option value=\"\" selected='selected'>All services</option>\n <option *ngFor=\"let name of serviceLst;\" value=\"{{name}}\">{{name}}</option>\n </select>\n </div>\n \n<div *ngIf=\"dataSource.data.length > 0\" class=\"example-container\">\n\n <mat-table [dataSource]=\"dataSource\" matSort>\n\n <ng-container matColumnDef=\"ccd_case_number\">\n <mat-header-cell *matHeaderCellDef >Case reference </mat-header-cell>\n <mat-cell *matCellDef=\"let row\" class=\"whitespace-inherit\"> {{row.ccd_case_number | ccdHyphens }} </mat-cell>\n </ng-container>\n\n <ng-container matColumnDef=\"refund_reference\">\n <mat-header-cell *matHeaderCellDef > Refund reference </mat-header-cell>\n <mat-cell *matCellDef=\"let row\" class=\"whitespace-inherit\"> {{row.refund_reference}} </mat-cell>\n </ng-container>\n\n <ng-container matColumnDef=\"user_full_name\">\n <mat-header-cell *matHeaderCellDef > Submitted by </mat-header-cell>\n <mat-cell *matCellDef=\"let row\" [style.color]=\"row.color\" class=\"whitespace-inherit\"> {{row.user_full_name }} </mat-cell>\n </ng-container>\n\n <ng-container matColumnDef=\"date_created\">\n <mat-header-cell *matHeaderCellDef mat-sort-header> Date created </mat-header-cell>\n <mat-cell *matCellDef=\"let row\" class=\"whitespace-inherit\"> {{row.date_created | date:'d MMMM yyyy'}} </mat-cell>\n </ng-container>\n\n <ng-container matColumnDef=\"date_updated\">\n <mat-header-cell *matHeaderCellDef mat-sort-header> Last updated</mat-header-cell>\n <mat-cell *matCellDef=\"let row\" [style.color]=\"row.color\" class=\"whitespace-inherit\"> {{row.date_updated | date:'d MMMM yyyy'}} </mat-cell>\n </ng-container>\n\n <ng-container *ngIf=\"isApprovalFlow\" matColumnDef=\"Action\">\n <mat-header-cell *matHeaderCellDef> Action </mat-header-cell>\n <mat-cell *matCellDef=\"let row\" [style.color]=\"row.color\" > <a href=\"javascript:void(0)\" (click)=\"goToCaseReview(row.ccd_case_number, row)\">Review case</a>&nbsp;<a href=\"javascript:void(0)\" (click)=\"goToRefundProcessComponent(row.refund_reference, row)\">Process refund</a></mat-cell>\n </ng-container>\n \n <ng-container *ngIf=\"!isApprovalFlow\" matColumnDef=\"Action\">\n <mat-header-cell *matHeaderCellDef > Action </mat-header-cell>\n <mat-cell *matCellDef=\"let row\" [style.color]=\"row.color\"> <a href=\"javascript:void(0)\" (click)=\"goToRefundViewComponent(row.refund_reference, row)\">Review refund</a></mat-cell>\n </ng-container>\n\n <mat-header-row *matHeaderRowDef=\"displayedColumns\"></mat-header-row>\n <mat-row *matRowDef=\"let row; columns: displayedColumns;\">\n </mat-row>\n </mat-table>\n <mat-paginator [pageSizeOptions]=\"[5, 10, 25, 100]\"></mat-paginator>\n</div>\n\n<div class=\"govuk-label dropdpwn\" *ngIf=\"dataSource.data.length === 0\">No records to display</div>\n",
5892
+ styles: [".mat-header-row{min-height:27px}.mat-cell{padding:0 10px 0 0;text-align:left;word-wrap:break-word;white-space:inherit!important;font-size:19px;line-height:25px;font-weight:400}.mat-cell,.mat-table{font-family:nta,Arial,sans-serif}.mat-table{color:#0b0c0c;display:table;-webkit-font-smoothing:antialiased;margin-bottom:1px;box-sizing:border-box;text-indent:0;border-spacing:0;border-collapse:collapse;font-size:1.1875rem;line-height:1.31578947;table-layout:fixed;width:102%}.mat-header-cell{text-align:left;font-weight:700;padding:10px 10px 10px 0;word-wrap:break-word;font-size:19px;line-height:25px;color:#0b0c0c;cursor:pointer;font-family:inherit}.dropdpwn{display:inline-block;margin-right:10px;font-size:19px}.mat-column-ccdCaseNumber{flex:3em}.mat-column-refundReference{flex:6em}.mat-column-reason{flex:2em}.govuk-select{font-size:19px;font-weight:400}.govuk-error-summary__title{font-size:24px!important}.float-right{float:right}.float-right-padding{float:right;padding-right:2em}.float-left-padding{padding-left:12em}"]
4962
5893
  },] }
4963
5894
  ];
4964
5895
  TableComponent.ctorParameters = () => [
@@ -4976,27 +5907,38 @@ TableComponent.propDecorators = {
4976
5907
  sort: [{ type: ViewChild, args: [MatSort,] }]
4977
5908
  };
4978
5909
 
5910
+ class IPutNotificationRequest {
5911
+ constructor(contactDetails, notificationType) {
5912
+ if (notificationType === 'EMAIL') {
5913
+ this.recipient_email_address = contactDetails;
5914
+ }
5915
+ else if (notificationType === 'LETTER') {
5916
+ this.recipient_postal_address = contactDetails;
5917
+ }
5918
+ }
5919
+ }
5920
+
4979
5921
  class IResubmitRefundRequest {
4980
- constructor(refund_reason, amount) {
5922
+ constructor(refund_reason, amount, contact_details, refund_fees) {
4981
5923
  this.refund_reason = refund_reason;
4982
5924
  this.amount = amount;
5925
+ this.contact_details = contact_details;
5926
+ this.refund_fees = refund_fees;
4983
5927
  }
4984
5928
  }
4985
5929
 
4986
5930
  class RefundStatusComponent {
4987
- constructor(formBuilder, refundService, paymentLibComponent, paymentViewService, router, OrderslistService) {
5931
+ constructor(formBuilder, refundService, notificationService, paymentLibComponent, OrderslistService, paymentViewService) {
4988
5932
  this.formBuilder = formBuilder;
4989
5933
  this.refundService = refundService;
5934
+ this.notificationService = notificationService;
4990
5935
  this.paymentLibComponent = paymentLibComponent;
4991
- this.paymentViewService = paymentViewService;
4992
- this.router = router;
4993
5936
  this.OrderslistService = OrderslistService;
5937
+ this.paymentViewService = paymentViewService;
4994
5938
  this.LOGGEDINUSERROLES = [];
4995
5939
  this.rejectedRefundList = [];
4996
5940
  this.approvalStatus = 'Sent for approval';
4997
5941
  this.rejectStatus = 'Update required';
4998
- // approvalStatus = 'sent for approval';
4999
- // rejectStatus = 'sent back';
5000
5942
  this.errorMessage = null;
5001
5943
  this.refundButtonState = '';
5002
5944
  this.isAmountEmpty = false;
@@ -5005,19 +5947,22 @@ class RefundStatusComponent {
5005
5947
  this.isRemissionLessThanFeeError = false;
5006
5948
  this.refundHasError = false;
5007
5949
  this.refundReasons = [];
5950
+ this.isResendOperationSuccess = false;
5951
+ this.isEditDetailsClicked = false;
5952
+ this.isEditAddressDeatilsClicked = false;
5008
5953
  this.isRefundBtnDisabled = true;
5009
5954
  this.isFromPayBubble = false;
5010
5955
  this.isLastUpdatedByCurrentUser = true;
5011
5956
  this.isProcessRefund = false;
5957
+ this.notificationSentViewIndex = -1;
5958
+ this.notificationPreview = false;
5959
+ this.notificationSentView = false;
5960
+ this.allowedRolesToAccessRefund = ['payments-refund-approver', 'payments-refund', 'payments'];
5012
5961
  }
5013
5962
  ngOnInit() {
5014
- // if (this.check4AllowedRoles2AccessRefund()) {
5015
5963
  this.resetRemissionForm([false, false, false, false], 'All');
5016
5964
  this.bsPaymentDcnNumber = this.paymentLibComponent.bspaymentdcn;
5017
5965
  this.isCallFromRefundList = this.paymentLibComponent.isCallFromRefundList;
5018
- // if(this.paymentLibComponent.isFromRefundStatusPage) {
5019
- // this.viewName = 'reviewandsubmitview';
5020
- // }
5021
5966
  if (this.API_ROOT == 'api/payment-history') {
5022
5967
  this.isFromPayBubble = true;
5023
5968
  }
@@ -5028,17 +5973,12 @@ class RefundStatusComponent {
5028
5973
  }
5029
5974
  else {
5030
5975
  this.viewName = 'refundstatuslist';
5031
- if (this.isEliginbleToAccess) {
5032
- this.refundService.getRefundStatusList(this.ccdCaseNumber).subscribe(refundList => {
5033
- this.rejectedRefundList = refundList['refund_list'];
5034
- }),
5035
- (error) => {
5036
- this.errorMessage = error.replace(/"/g, "");
5037
- };
5038
- }
5039
- else {
5040
- this.rejectedRefundList = [];
5041
- }
5976
+ this.refundService.getRefundStatusList(this.ccdCaseNumber).subscribe(refundList => {
5977
+ this.rejectedRefundList = refundList['refund_list'];
5978
+ }),
5979
+ (error) => {
5980
+ this.errorMessage = error.replace(/"/g, "");
5981
+ };
5042
5982
  }
5043
5983
  this.refundStatusForm = this.formBuilder.group({
5044
5984
  amount: new FormControl('', Validators.compose([
@@ -5049,6 +5989,7 @@ class RefundStatusComponent {
5049
5989
  reason: new FormControl()
5050
5990
  });
5051
5991
  if (this.refundlist !== undefined) {
5992
+ this.getRefundsNotification();
5052
5993
  this.getRefundsStatusHistoryList();
5053
5994
  if (this.LOGGEDINUSERROLES.some(i => i.includes('payments-refund-approver'))) {
5054
5995
  this.isProcessRefund = true;
@@ -5060,7 +6001,6 @@ class RefundStatusComponent {
5060
6001
  this.refundButtonState = this.refundlist.refund_status.name;
5061
6002
  }
5062
6003
  }
5063
- //}
5064
6004
  }
5065
6005
  getRefundsStatusHistoryList() {
5066
6006
  if (this.refundlist !== undefined) {
@@ -5073,6 +6013,14 @@ class RefundStatusComponent {
5073
6013
  };
5074
6014
  }
5075
6015
  }
6016
+ getRefundsNotification() {
6017
+ this.notificationService.getRefundNotification(this.refundlist.refund_reference).subscribe(refundsNotification => {
6018
+ this.notificationList = refundsNotification['notifications'];
6019
+ }),
6020
+ (error) => {
6021
+ this.errorMessage = error.replace(/"/g, "");
6022
+ };
6023
+ }
5076
6024
  goToRefundView(refundlist, navigationpage) {
5077
6025
  this.OrderslistService.setRefundView(refundlist);
5078
6026
  this.OrderslistService.setCCDCaseNumber(this.ccdCaseNumber);
@@ -5105,6 +6053,7 @@ class RefundStatusComponent {
5105
6053
  }
5106
6054
  gotoReviewAndReSubmitPage() {
5107
6055
  this.viewName = 'reviewandsubmitview';
6056
+ this.getTemplateInstructionType(this.paymentObj, this.refundlist.payment_reference);
5108
6057
  this.oldRefundReason = this.refundlist.reason;
5109
6058
  this.changedAmount = this.refundlist.amount;
5110
6059
  this.refundreason = this.refundStatusHistories.filter(data => data.status.toLowerCase() === 'update required')[0].notes;
@@ -5112,13 +6061,14 @@ class RefundStatusComponent {
5112
6061
  this.refundReasons = refundReasons;
5113
6062
  });
5114
6063
  }
5115
- gotoRefundReasonPage() {
6064
+ gotoRefundReasonPage(refundReason) {
5116
6065
  this.isRefundBtnDisabled = false;
5117
6066
  this.paymentLibComponent.REFUNDLIST = "true";
5118
6067
  this.paymentLibComponent.isFromRefundStatusPage = true;
5119
6068
  this.ccdCaseNumber = this.paymentLibComponent.CCD_CASE_NUMBER;
5120
6069
  this.errorMessage = false;
5121
- this.viewName = 'issuerefund';
6070
+ this.changeRefundReason = refundReason;
6071
+ this.viewName = 'issuerefundpage1';
5122
6072
  }
5123
6073
  gotoAmountPage() {
5124
6074
  this.errorMessage = false;
@@ -5126,7 +6076,12 @@ class RefundStatusComponent {
5126
6076
  this.isRefundBtnDisabled = false;
5127
6077
  this.ccdCaseNumber = this.paymentLibComponent.CCD_CASE_NUMBER;
5128
6078
  this.paymentLibComponent.isFromRefundStatusPage = true;
5129
- this.viewName = 'processretroremissonpage';
6079
+ if (this.refundlist.reason == 'Retrospective remission') {
6080
+ this.viewName = 'processretroremissonpage';
6081
+ }
6082
+ else {
6083
+ this.viewName = 'issuerefund';
6084
+ }
5130
6085
  }
5131
6086
  goToReviewAndSubmitView() {
5132
6087
  const remissionctrls = this.refundStatusForm.controls;
@@ -5172,12 +6127,17 @@ class RefundStatusComponent {
5172
6127
  }
5173
6128
  getRefundListReason(refundListReason) {
5174
6129
  if (this.paymentLibComponent.isFromRefundStatusPage && !this.paymentLibComponent.iscancelClicked) {
5175
- this.refundlist.reason = refundListReason.reason;
5176
- this.refundCode = refundListReason.code;
6130
+ if (refundListReason.reason != undefined && refundListReason.reason != null && refundListReason.reason != this.refundlist.reason) {
6131
+ this.refundlist.reason = refundListReason.reason;
6132
+ this.refundlist.reason_code = refundListReason.code.split('-')[0].trim();
6133
+ this.refundlist.code = refundListReason.code;
6134
+ this.refundCode = refundListReason.code;
6135
+ }
5177
6136
  }
5178
6137
  else {
5179
6138
  this.isRefundBtnDisabled = true;
5180
6139
  }
6140
+ this.notificationPreview = false;
5181
6141
  this.viewName = 'reviewandsubmitview';
5182
6142
  this.paymentLibComponent.CCD_CASE_NUMBER = this.ccdCaseNumber;
5183
6143
  }
@@ -5191,14 +6151,23 @@ class RefundStatusComponent {
5191
6151
  else {
5192
6152
  this.isRefundBtnDisabled = true;
5193
6153
  }
6154
+ this.notificationPreview = false;
5194
6155
  this.viewName = 'reviewandsubmitview';
5195
6156
  this.paymentLibComponent.CCD_CASE_NUMBER = this.ccdCaseNumber;
5196
6157
  }
6158
+ getRefundFees(fees) {
6159
+ this.fees = fees;
6160
+ this.refundFees = this.fees.map(obj => ({ fee_id: obj.id, code: obj.code, version: obj.version, volume: obj.volume, refund_amount: obj.refund_amount }));
6161
+ }
5197
6162
  gotoReviewRefundConfirmationPage() {
5198
- if (this.oldRefundReason === this.refundlist.reason) {
5199
- this.refundCode = '';
6163
+ // if (this.oldRefundReason === this.refundlist.reason) {
6164
+ // this.refundCode = '';
6165
+ // }
6166
+ if (this.refundFees === undefined) {
6167
+ this.refundFees = this.refundlist['refund_fees'];
5200
6168
  }
5201
- const resubmitRequest = new IResubmitRefundRequest(this.refundCode, this.changedAmount);
6169
+ this.refundCode = this.refundlist.code;
6170
+ const resubmitRequest = new IResubmitRefundRequest(this.refundCode, this.changedAmount, this.refundlist.contact_details, this.refundFees);
5202
6171
  this.refundService.patchResubmitRefund(resubmitRequest, this.refundlist.refund_reference).subscribe(response => {
5203
6172
  if (JSON.parse(response)) {
5204
6173
  this.refundReference = JSON.parse(response).refund_reference;
@@ -5209,40 +6178,143 @@ class RefundStatusComponent {
5209
6178
  this.errorMessage = error.replace(/"/g, "");
5210
6179
  });
5211
6180
  }
6181
+ gotoEditAddressDetails(note) {
6182
+ this.notification = note;
6183
+ this.isEditDetailsClicked = true;
6184
+ this.viewName = 'refundEditView';
6185
+ }
6186
+ getContactDetails(obj) {
6187
+ this.addressDetails = obj;
6188
+ this.getTemplateInstructionType(this.paymentObj, this.refundlist.payment_reference);
6189
+ this.notificationPreview = false;
6190
+ this.viewName = 'revieweditdetailsconfirmationpage';
6191
+ }
6192
+ getContactDetailsForRefundList(obj) {
6193
+ this.refundlist.contact_details = obj;
6194
+ this.getTemplateInstructionType(this.paymentObj, this.refundlist.payment_reference);
6195
+ this.notificationPreview = false;
6196
+ this.isEditDetailsClicked = false;
6197
+ this.isRefundBtnDisabled = false;
6198
+ this.viewName = 'reviewandsubmitview';
6199
+ }
6200
+ gotoEditDetailsPage(note, view) {
6201
+ if (note) {
6202
+ this.notification = { contact_details: note, notification_type: note.notification_type };
6203
+ }
6204
+ this.isEditDetailsClicked = true;
6205
+ this.viewName = view;
6206
+ }
6207
+ submitEditDetail() {
6208
+ this.isResendOperationSuccess = false;
6209
+ const contactDetails = this.addressDetails.notification_type === 'EMAIL' ? this.addressDetails.email :
6210
+ {
6211
+ address_line: this.addressDetails.address_line,
6212
+ city: this.addressDetails.city,
6213
+ county: this.addressDetails.county,
6214
+ country: this.addressDetails.country,
6215
+ postal_code: this.addressDetails.postal_code,
6216
+ };
6217
+ const resendRequest = new IPutNotificationRequest(contactDetails, this.addressDetails.notification_type);
6218
+ this.refundService.putResendOrEdit(resendRequest, this.refundlist.refund_reference, this.addressDetails.notification_type).subscribe((response) => {
6219
+ this.isResendOperationSuccess = response;
6220
+ }, (error) => {
6221
+ this.isResendOperationSuccess = false;
6222
+ this.errorMessage = error.replace(/"/g, "");
6223
+ });
6224
+ }
6225
+ putResend(notification) {
6226
+ this.isResendOperationSuccess = false;
6227
+ const contactDetails = notification.notification_type === 'EMAIL' ? notification.contact_details.email :
6228
+ {
6229
+ address_line: notification.contact_details.address_line,
6230
+ city: notification.contact_details.city,
6231
+ county: notification.contact_details.county,
6232
+ country: notification.contact_details.country,
6233
+ postal_code: notification.contact_details.postal_code,
6234
+ };
6235
+ const resendRequest = new IPutNotificationRequest(contactDetails, notification.notification_type);
6236
+ this.refundService.putResendOrEdit(resendRequest, this.refundlist.refund_reference, notification.notification_type).subscribe((response) => {
6237
+ this.isResendOperationSuccess = response;
6238
+ }, (error) => {
6239
+ this.isResendOperationSuccess = false;
6240
+ this.errorMessage = error.replace(/"/g, "");
6241
+ });
6242
+ }
6243
+ gotoRefundViewPageCancelBtnClicked(event) {
6244
+ event.preventDefault();
6245
+ this.isEditDetailsClicked = false;
6246
+ this.viewName = 'refundview';
6247
+ }
6248
+ gotoRefundReviewAndSubmitViewPageCancelBtnClicked(event) {
6249
+ event.preventDefault();
6250
+ this.isEditDetailsClicked = false;
6251
+ this.viewName = 'reviewandsubmitview';
6252
+ }
5212
6253
  goToRefundProcessComponent(refundReference, refundList) {
5213
6254
  this.paymentLibComponent.refundlistsource = refundList;
5214
6255
  this.paymentLibComponent.refundReference = refundReference;
6256
+ this.paymentLibComponent.isFromPayBubble = true;
5215
6257
  this.paymentLibComponent.viewName = 'process-refund';
5216
6258
  }
6259
+ getTemplateInstructionType(payment, paymentReference) {
6260
+ if (payment == undefined || payment == null || payment.reference != paymentReference) {
6261
+ this.paymentViewService.getPaymentDetails(paymentReference).subscribe(payment => {
6262
+ this.paymentObj = payment;
6263
+ this.paymentObj.reference = paymentReference;
6264
+ this.templateInstructionType = this.notificationService.getNotificationInstructionType(this.paymentObj.channel, this.paymentObj.method);
6265
+ }, (error) => {
6266
+ this.templateInstructionType = 'Template';
6267
+ });
6268
+ }
6269
+ else {
6270
+ this.templateInstructionType = this.notificationService.getNotificationInstructionType(payment.channel, payment.method);
6271
+ }
6272
+ }
6273
+ showNotificationPreview() {
6274
+ this.notificationPreview = true;
6275
+ }
6276
+ hideNotificationPreview() {
6277
+ this.notificationPreview = false;
6278
+ }
6279
+ showNotificationSentView(index) {
6280
+ this.notificationSentViewIndex = index;
6281
+ this.notificationSentView = true;
6282
+ }
6283
+ hideNotificationSentView() {
6284
+ this.notificationSentViewIndex = -1;
6285
+ this.notificationSentView = false;
6286
+ }
5217
6287
  }
5218
6288
  RefundStatusComponent.decorators = [
5219
6289
  { type: Component, args: [{
5220
6290
  selector: 'ccpay-refund-status',
5221
- template: "\n<div *ngIf=\"errorMessage\">\n <div class=\"error-summary\" role=\"group\" aria-labelledby=\"failure-error-summary-heading\" tabindex=\"-1\">\n <h2 class=\"heading-medium error-summary-heading\" id=\"failure-error-summary-heading\">\n Error in processing the request\n </h2>\n <div class=\"govuk-error-summary__body\">\n {{ errorMessage }}\n </div>\n </div>\n</div>\n<ng-container *ngIf=\"viewName==='refundstatuslist' && rejectedRefundList\">\n <!-- payments -->\n\n <table class=\"govuk-table\">\n <thead class=\"govuk-table__head\">\n <tr class=\"govuk-table__row\">\n <th class=\"govuk-table__header col-16\" scope=\"col\">Status</th>\n <th class=\"govuk-table__header col-11\" scope=\"col\">Amount</th>\n <th class=\"govuk-table__header col-18\" scope=\"col\">Date</th>\n <th class=\"govuk-table__header col-25\" scope=\"col\">Refund reference</th>\n <th class=\"govuk-table__header col-24 \" scope=\"col\">Reason</th>\n <th class=\"govuk-table__header\" scope=\"col\"></th>\n </tr>\n </thead>\n <tbody class=\"govuk-table__body\" *ngIf=\"rejectedRefundList?.length > 0\" role=\"status\">\n <tr class=\"govuk-table__row\" *ngFor=\"let refundList of rejectedRefundList\">\n <td class=\"govuk-table__cell whitespace-inherit\">{{ refundList?.refund_status['name'] }}</td>\n <td class=\"channel govuk-table__cell whitespace-inherit\">\u00A3{{ refundList?.amount | number:'.2' }}</td>\n <td class=\"govuk-table__cell whitespace-inherit\">{{ refundList?.date_updated | date:'dd MMM yyyy'}}\n </td>\n <td class=\"govuk-table__cell whitespace-inherit\">{{ refundList?.refund_reference }}</td>\n <td class=\"govuk-table__cell whitespace-inherit\"> {{refundList?.reason}}</td>\n <td class=\"govuk-table__cell\">\n <a href=\"javascript:void(0)\" (click)=\"goToRefundView(refundList,'casetransactions')\">Review</a>\n </td>\n </tr>\n </tbody>\n <tbody class=\"govuk-table__body\" *ngIf=\"rejectedRefundList?.length === 0\" role=\"status\">\n <td class=\"govuk-table__cell\" colspan=\"6\">No refunds recorded</td>\n </tbody>\n </table>\n</ng-container>\n\n<ng-container *ngIf=\"viewName==='refundview'\">\n <div class=\"govuk-breadcrumbs\">\n <ol class=\"govuk-breadcrumbs__list\">\n <li class=\"govuk-breadcrumbs__list-item\">\n <a href=\"javascript:void(0)\" (click)=\"loadRefundListPage()\" class=\"govuk-back-link govuk-label govuk-body\">Back</a>\n </li>\n </ol>\n </div>\n <h2 class=\"govuk-heading-l\">Refund details</h2>\n <table>\n \n <tbody>\n <tr class=\"section\">\n <td class=\"bold tb-col-w\">Refund reference</td>\n <td>{{ refundlist?.refund_reference }}</td>\n </tr>\n <tr class=\"section\">\n <td class=\"bold tb-col-w\">Payment to be refunded</td>\n <td>{{refundlist?.payment_reference }}</td>\n </tr>\n <tr class=\"section\">\n <td class=\"bold tb-col-w\">Reason for refund</td>\n <td>{{ refundlist?.reason }}</td>\n </tr>\n <tr class=\"section\">\n <td class=\"bold tb-col-w\">Amount refunded</td>\n <td>\u00A3{{refundlist?.amount | number:'.2' }}</td>\n </tr>\n\n </tbody>\n </table>\n\n <!-- Status history -->\n <div>\n <br />\n <h2 class=\"govuk-heading-m\">Refund status history</h2>\n <div *ngIf=\"refundStatusHistories\">\n <table class=\"govuk-table\">\n <thead class=\"govuk-table__head\">\n <tr class=\"govuk-table__row\">\n <th class=\"govuk-table__header col-24 whitespace-inherit\" scope=\"col\">Status</th>\n <th class=\"govuk-table__header col-27 whitespace-inherit\" scope=\"col\">Date and time</th>\n <th class=\"govuk-table__header whitespace-inherit\" scope=\"col\">Users</th>\n <th class=\"govuk-table__header whitespace-inherit\" scope=\"col\">Notes</th>\n </tr>\n </thead>\n <tbody class=\"govuk-table__body\" *ngFor=\"let refundStatusHistory of refundStatusHistories;\">\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__cell whitespace-inherit\">{{refundStatusHistory.status}}</td>\n <td class=\"govuk-table__cell whitespace-inherit\">\n {{refundStatusHistory.date_created | date:'dd MMMM yyyy HH:mm:ss'}}\n </td>\n <td class=\"govuk-table__cell whitespace-inherit\">{{refundStatusHistory.created_by}}</td>\n <td class=\"govuk-table__cell whitespace-inherit\">{{refundStatusHistory.notes}}</td>\n </tr>\n </tbody>\n </table>\n </div>\n\n </div>\n\n <ng-container *ngIf=\"viewName === 'refundview' && !isFromPayBubble\">\n <div *ngIf=\"refundButtonState==='Update required'\">\n <!-- <div *ngIf=\"refundButtonState==='sent back'\"> -->\n <br />\n <button type=\"submit\" class=\"button govuk-button--secondary btnmargin\"\n (click)=\"gotoReviewAndReSubmitPage()\">Resubmit\n refund</button>\n </div>\n <div *ngIf=\"isProcessRefund && !isLastUpdatedByCurrentUser && refundButtonState==='Sent for approval'\" >\n <!-- <div *ngIf=\"isProcessRefund && !isLastUpdatedByCurrentUser && refundButtonState==='sent for approval'\"> -->\n <br />\n <button type=\"submit\" class=\"button govuk-button--secondary\"\n (click)=\"goToRefundProcessComponent(refundlist.refund_reference,refundlist)\">Process refund</button>\n </div>\n </ng-container>\n\n\n</ng-container>\n\n<ng-container *ngIf=\"viewName==='reviewandsubmitview'\">\n <!-- <div class=\"govuk-breadcrumbs\">\n <ol class=\"govuk-breadcrumbs__list\">\n <li class=\"govuk-breadcrumbs__list-item\">\n <a (click)=\"gotoReviewDetailsPage($event)\" class=\"govuk-back-link govuk-label\">Back</a>\n </li>\n </ol>\n </div> -->\n <div class=\"govuk-warning-text\">\n <h1 class=\"heading-large\">Review and resubmit refund</h1>\n </div>\n <table class=\"govuk-table\">\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__cell govuk-!-font-weight-bold\">Reason for rejection</td>\n <td class=\"govuk-table__cell\">{{refundreason}}</td>\n </tr>\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__cell govuk-!-font-weight-bold\">Refund reference</td>\n <td class=\"govuk-table__cell\">{{ refundlist?.refund_reference}} </td>\n </tr>\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__cell govuk-!-font-weight-bold\">Reason for refund</td>\n <td class=\"govuk-table__cell\"> {{ refundlist?.reason}}\n <a (click)=\"gotoRefundReasonPage()\" *ngIf=\"refundlist?.reason !== 'Retrospective remission'\"\n class=\"govuk-link right\" href=\"javascript:void(0)\">Change</a>\n </td>\n\n <!-- <td class=\"govuk-table__cell\">{{ refundlist?.reason }}</td>\n <a (click)=\"gotoRefundReasonPage()\" class=\"govuk-link right\">Change</a> -->\n </tr>\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__cell govuk-!-font-weight-bold\">Payment reference</td>\n <td class=\"govuk-table__cell\">{{ refundlist?.payment_reference}} </td>\n </tr>\n <tr class=\"govuk-table__row\">\n <td *ngIf=\"refundlist?.reason === 'Retrospective remission'\" class=\"govuk-table__cell govuk-!-font-weight-bold\">Refund amount</td>\n <td *ngIf=\"refundlist?.reason !== 'Retrospective remission'\" class=\"govuk-table__cell govuk-!-font-weight-bold\">Payment amount</td>\n <td class=\"govuk-table__cell\"> \u00A3{{ changedAmount | number:'.2' }}\n <a (click)=\"gotoAmountPage()\" *ngIf=\"refundlist?.reason === 'Retrospective remission'\"\n class=\"govuk-link right\">Change</a>\n </td>\n\n </tr>\n </table>\n <div class=\"govuk-button-group\">\n <button (click)=\"gotoReviewDetailsPage($event)\" class=\"govuk-button govuk-button--secondary\"> Previous</button>\n <button [disabled]=\"isRefundBtnDisabled\" (click)=\"gotoReviewRefundConfirmationPage()\" class=\"govuk-button button\"\n data-module=\"govuk-button\">\n Submit refund\n </button>\n</div>\n<p><a href=\"javascript:void(0)\" (click)=\"loadRefundListPage()\" class=\"govuk-link\" data-module=\"govuk-button\">Cancel</a></p>\n <!-- <div class=\"govuk-button-group\">\n <button [disabled]=\"isRefundBtnDisabled\" (click)=\"gotoReviewRefundConfirmationPage()\" class=\"govuk-button button\"\n data-module=\"govuk-button\">\n Submit refund\n </button>\n </div> -->\n <!-- <p>\n <a (click)=\"loadRefundListPage()\" href=\"\" class=\"cancelbtn\">Cancel</a>\n </p> -->\n</ng-container>\n\n<ng-container *ngIf=\"viewName === 'issuerefund'\">\n <ccpay-add-remission [isFromRefundListPage]=\"true\" [viewCompStatus]=\"viewName\" [isRefundRemission]=\"true\"\n [ccdCaseNumber]=\"ccdCaseNumber\" (refundListReason)=\"getRefundListReason($event)\"></ccpay-add-remission>\n</ng-container>\n\n<ng-container *ngIf=\"viewName === 'processretroremissonpage'\">\n <ccpay-add-remission [isFromRefundListPage]=\"true\" [viewCompStatus]=\"viewName\" [isRefundRemission]=\"true\"\n [ccdCaseNumber]=\"ccdCaseNumber\" (refundListAmount)=\"getRefundAmount($event)\"></ccpay-add-remission>\n</ng-container>\n\n<ng-container *ngIf=\"viewName === 'reviewrefundconfirmationpage'\">\n <div class=\"govuk-grid-row pagesize\">\n <div>\n <div class=\"govuk-panel govuk-panel--confirmation\">\n <h1 class=\"govuk-panel__title\">\n Refund submitted\n </h1>\n\n <div class=\"govuk-panel__body\">\n <p class=\"govuk-body white\"><strong>Refund reference:{{refundReference}} </strong></p>\n </div>\n\n </div>\n\n <h2 class=\"govuk-heading-l\">What happens next</h2>\n <p class=\"govuk-body\">\n A refund request for {{refundAmount| currency:'GBP':'symbol-narrow':'1.2-2'}} has been created and will be passed to a team leader to approve.\n </p>\n\n <p class=\"govuk-body\">\n <a href=\"javascript:void(0)\" (click)=\"loadRefundListPage()\" class=\"govuk-link\">Return to case</a>\n </p>\n </div>\n </div>\n</ng-container>\n",
5222
- styles: [".right{float:right!important}.button{margin-bottom:3em;font-size:19px}.cancelbtn{font-size:19px;font-weight:400}.btnmargin{margin-bottom:2em}.govuk-button--secondary{background-color:#dee0e2;box-shadow:0 2px 0 #858688;color:#0b0c0c;margin-right:.5em}.govuk-label--s,.govuk-warning-text__text,.hmcts-currency-input__symbol{font-size:19px;font-weight:400}.inline-error-class{outline:3px solid #a71414;outline-offset:0}.inline-error-message{color:#a71414;font-weight:700;margin-top:10px;font-size:20px}.govuk-button,.govuk-link{margin-right:1em;font-size:19px;font-weight:200}.govuk-button-group{padding-top:2em}.heading-medium{margin-top:.875em}.heading-large{margin-top:.25em}.govuk-panel--confirmation{color:#fff;background:#00703c}.govuk-heading-l{font-size:36px}.govuk-heading-m{font-size:24px}.govuk-panel__title{font-size:5rem}.govuk-body,.govuk-body-m{font-size:2.1875rem}.govuk-input--width-10{max-width:36ex}.col-14{width:14%!important}.col-10{width:10%!important}.col-11{width:11%!important}.col-18{width:18%!important}.col-21{width:21%!important}.col-9{width:9%!important}.col-15{width:15%!important}.col-16{width:16%!important}.col-25{width:25%!important}.col-24{width:24%!important}.govuk-error-summary__title{font-size:24px!important}.govuk-error-summary__body{font-size:19px!important}.white{color:#fff}.pagesize{margin:2em;width:97%}.govuk-link{cursor:pointer}.govuk-back-link:focus,a:focus{background-color:#fd0;outline:2px solid #fd0}@media screen and (max-width:979px){table,td,th,tr{font-size:16px}.button{font-size:14px;white-space:normal;word-wrap:break-word}}@media screen and (max-width:650px){table,td,th,tr{font-size:14px}.button{font-size:12px;white-space:normal;word-wrap:break-word}}@media screen and (max-width:470px){table,td,th,tr{font-size:12px}.button{font-size:10px;white-space:normal;word-wrap:break-word}}"]
6291
+ template: "\n<div *ngIf=\"errorMessage\">\n <div class=\"error-summary\" role=\"group\" aria-labelledby=\"failure-error-summary-heading\" tabindex=\"-1\">\n <h2 class=\"heading-medium error-summary-heading\" id=\"failure-error-summary-heading\">\n Error in processing the request\n </h2>\n <div class=\"govuk-error-summary__body\">\n {{ errorMessage }}\n </div>\n </div>\n</div>\n\n<ng-container *ngIf=\"viewName==='refundstatuslist' && rejectedRefundList && !isResendOperationSuccess && !isEditDetailsClicked\">\n <!-- payments -->\n\n <table class=\"govuk-table\">\n <thead class=\"govuk-table__head\">\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__header col-16\" scope=\"col\">Status</td>\n <td class=\"govuk-table__header col-11\" scope=\"col\">Amount</td>\n <td class=\"govuk-table__header col-18\" scope=\"col\">Date</td>\n <td class=\"govuk-table__header col-25\" scope=\"col\">Refund reference</td>\n <td class=\"govuk-table__header col-24 \" scope=\"col\">Reason</td>\n <td class=\"govuk-table__header\" scope=\"col\"></td>\n </tr>\n </thead>\n <tbody class=\"govuk-table__body\" *ngIf=\"rejectedRefundList?.length > 0\">\n <tr class=\"govuk-table__row\" *ngFor=\"let refundList of rejectedRefundList\">\n <td class=\"govuk-table__cell whitespace-inherit\">{{ refundList?.refund_status['name'] }}</td>\n <td class=\"channel govuk-table__cell whitespace-inherit\">\u00A3{{ refundList?.amount | number:'.2' }}</td>\n <td class=\"govuk-table__cell whitespace-inherit\">{{ refundList?.date_updated | date:'dd MMM yyyy'}}\n </td>\n <td class=\"govuk-table__cell whitespace-inherit\">{{ refundList?.refund_reference }}</td>\n <td class=\"govuk-table__cell whitespace-inherit\"> {{refundList?.reason}}</td>\n <td class=\"govuk-table__cell whitespace-inherit\">\n <a href=\"javascript:void(0)\" (click)=\"goToRefundView(refundList,'casetransactions')\">Review</a>\n </td>\n </tr>\n </tbody>\n <tbody class=\"govuk-table__body\" *ngIf=\"rejectedRefundList?.length === 0\">\n <td class=\"govuk-table__cell\" colspan=\"6\">No refunds recorded</td>\n </tbody>\n </table>\n</ng-container>\n\n<ng-container *ngIf=\"viewName==='refundview' && !isResendOperationSuccess && !isEditDetailsClicked\">\n <div class=\"govuk-breadcrumbs\">\n <ol class=\"govuk-breadcrumbs__list\">\n <li class=\"govuk-breadcrumbs__list-item\">\n <a href=\"javascript:void(0)\" (click)=\"loadRefundListPage()\" class=\"govuk-back-link govuk-label\">Back</a>\n </li>\n </ol>\n </div>\n <h2 class=\"govuk-heading-l\">Refund details</h2>\n <table>\n \n <tbody>\n <tr class=\"section\">\n <td class=\"bold tb-col-w\">Refund reference</td>\n <td>{{ refundlist?.refund_reference }}</td>\n </tr>\n <tr class=\"section\">\n <td class=\"bold tb-col-w\">Payment to be refunded</td>\n <td>{{refundlist?.payment_reference }}</td>\n </tr>\n <tr class=\"section\">\n <td class=\"bold tb-col-w\">Reason for refund</td>\n <td>{{ refundlist?.reason }}</td>\n </tr>\n <tr class=\"section\">\n <td class=\"bold tb-col-w\">Amount refunded</td>\n <td>\u00A3{{refundlist?.amount | number:'.2' }}</td>\n </tr>\n\n </tbody>\n </table>\n\n\n <!-- Notification sent details -->\n <div>\n <br />\n <h2 class=\"govuk-heading-m\">Notifications sent</h2>\n <table class=\"govuk-table\">\n <thead class=\"govuk-table__head\">\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__header col-24 whitespace-inherit\" scope=\"col\">Date and time</td>\n <td class=\"govuk-table__header col-27 whitespace-inherit\" scope=\"col\">Sent to</td>\n <td class=\"govuk-table__header whitespace-inherit\" scope=\"col\">Sent via</td>\n <td class=\"govuk-table__header whitespace-inherit\" scope=\"col\">Actions</td>\n </tr>\n </thead>\n <tbody class=\"govuk-table__body\" *ngIf=\"notificationList\">\n <ng-container *ngFor=\"let notification of notificationList; let i = index;\">\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__cell whitespace-inherit\">{{notification.date_created | date:'dd MMMM yyyy HH:mm:ss'}}</td>\n <td class=\"govuk-table__cell whitespace-inherit\">{{orderParty}}</td>\n <td class=\"govuk-table__cell whitespace-inherit col-40\">\n <div *ngIf=\"notification?.notification_type === 'EMAIL'\">\n <strong>Email</strong><br>\n {{notification?.contact_details?.email?.trim()}}\n </div>\n <div *ngIf=\"notification?.notification_type === 'LETTER'\">\n <strong>Post</strong><br>\n {{notification?.contact_details?.address_line?.trim()}} {{notification?.contact_details?.city?.trim()}} {{notification?.contact_details?.county?.trim()}} {{notification?.contact_details?.country?.trim()}} {{notification?.contact_details?.postal_code?.trim()}}\n </div>\n </td>\n <td class=\"govuk-table__cell whitespace-inherit\" *ngIf=\"i === 0\"><a href=\"Javascript:void(0);\" (click)=\"putResend(notification)\">Resend</a>&nbsp;&nbsp;|&nbsp;&nbsp;<a href=\"Javascript:void(0);\" (click)=\"gotoEditAddressDetails(notification)\">Edit details</a>&nbsp;&nbsp;|&nbsp;&nbsp;<a *ngIf=\"!notificationSentView || i != notificationSentViewIndex\" href=\"Javascript:void(0);\" (click)=\"showNotificationSentView(i)\">View</a><a *ngIf=\"i === notificationSentViewIndex && notificationSentView\" href=\"Javascript:void(0);\" (click)=\"hideNotificationSentView()\">Hide</a></td>\n <td class=\"govuk-table__cell whitespace-inherit\" *ngIf=\"i > 0\"><a *ngIf=\"!notificationSentView || i != notificationSentViewIndex\" href=\"Javascript:void(0);\" (click)=\"showNotificationSentView(i)\">View</a><a *ngIf=\"i === notificationSentViewIndex && notificationSentView\" href=\"Javascript:void(0);\" (click)=\"hideNotificationSentView()\">Hide</a></td>\n </tr>\n <tr *ngIf=\"i === notificationSentViewIndex && notificationSentView\">\n <td class=\"govuk-table__cell\" colspan=\"4\">\n <app-notification-preview\n [previewJourney]=\"'Notifications sent'\" [notificationSent]=\"notification?.sent_notification\">\n </app-notification-preview>\n </td>\n </tr>\n </ng-container>\n\n </tbody>\n <tbody class=\"govuk-table__body\" *ngIf=\"!notificationList\">\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__cell whitespace-inherit\" colspan=\"4\">No record found ... </td>\n </tr>\n </tbody>\n </table> \n </div>\n <!-- Status history -->\n <div>\n <br />\n <h2 class=\"govuk-heading-m\">Refund status history</h2>\n <div *ngIf=\"refundStatusHistories\">\n <table class=\"govuk-table\">\n <thead class=\"govuk-table__head\">\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__header col-24 whitespace-inherit\" scope=\"col\">Status</td>\n <td class=\"govuk-table__header col-27 whitespace-inherit\" scope=\"col\">Date and time</td>\n <td class=\"govuk-table__header whitespace-inherit\" scope=\"col\">Users</td>\n <td class=\"govuk-table__header whitespace-inherit\" scope=\"col\">Notes</td>\n </tr>\n </thead>\n <tbody class=\"govuk-table__body\" *ngFor=\"let refundStatusHistory of refundStatusHistories;\">\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__cell whitespace-inherit\">{{refundStatusHistory.status}}</td>\n <td class=\"govuk-table__cell whitespace-inherit\">\n {{refundStatusHistory.date_created | date:'dd MMMM yyyy HH:mm:ss'}}\n </td>\n <td class=\"govuk-table__cell whitespace-inherit\">{{refundStatusHistory.created_by}}</td>\n <td class=\"govuk-table__cell whitespace-inherit\">{{refundStatusHistory.notes}}</td>\n </tr>\n </tbody>\n </table>\n </div>\n\n </div>\n\n <ng-container *ngIf=\"viewName==='refundview' && !isFromPayBubble && !isResendOperationSuccess && !isEditDetailsClicked\">\n <div *ngIf=\"refundButtonState==='Update required'\" >\n <!-- <div *ngIf=\"refundButtonState==='sent back'\"> -->\n <br />\n <button type=\"submit\" class=\"button govuk-button--secondary btnmargin\"\n (click)=\"gotoReviewAndReSubmitPage()\">Change refund details</button>\n </div>\n <div *ngIf=\"isProcessRefund && !isLastUpdatedByCurrentUser && refundButtonState==='Sent for approval'\" >\n <!-- <div *ngIf=\"isProcessRefund && !isLastUpdatedByCurrentUser && refundButtonState==='sent for approval'\"> -->\n <br />\n <button type=\"submit\" class=\"button govuk-button--secondary\"\n (click)=\"goToRefundProcessComponent(refundlist.refund_reference,refundlist)\">Process refund</button>\n </div>\n </ng-container>\n\n\n</ng-container>\n\n<ng-container *ngIf=\"viewName==='reviewandsubmitview' && !isResendOperationSuccess && !isEditDetailsClicked\">\n <!-- <div class=\"govuk-breadcrumbs\">\n <ol class=\"govuk-breadcrumbs__list\">\n <li class=\"govuk-breadcrumbs__list-item\">\n <a (click)=\"gotoReviewDetailsPage($event)\" class=\"govuk-back-link govuk-label\">Back</a>\n </li>\n </ol>\n </div> -->\n <div class=\"govuk-warning-text\">\n <h1 class=\"heading-large\">Check your answers</h1>\n </div>\n <table class=\"govuk-table\">\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__cell govuk-!-font-weight-bold\">Payment reference</td>\n <td class=\"govuk-table__cell\">{{ refundlist?.payment_reference}} </td>\n </tr>\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__cell govuk-!-font-weight-bold\">Reason for return</td>\n <td class=\"govuk-table__cell\">{{refundreason}}</td>\n </tr>\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__cell govuk-!-font-weight-bold\">Refund reference</td>\n <td class=\"govuk-table__cell\">{{ refundlist?.refund_reference}} </td>\n </tr>\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__cell govuk-!-font-weight-bold\">Reason for refund</td>\n <td class=\"govuk-table__cell\">{{ refundlist?.reason?.trim()}}\n <a (click)=\"gotoRefundReasonPage(refundlist?.reason)\" *ngIf=\"refundlist?.reason !== 'Retrospective remission' && refundlist?.reason !== 'Overpayment'\"\n class=\"govuk-link right\">Change</a>\n </td>\n\n <!-- <td class=\"govuk-table__cell\">{{ refundlist?.reason }}</td>\n <a (click)=\"gotoRefundReasonPage()\" class=\"govuk-link right\">Change</a> -->\n </tr>\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__cell govuk-!-font-weight-bold\">Refund amount</td>\n <td class=\"govuk-table__cell\">\u00A3{{ changedAmount ? changedAmount : refundlist?.amount | number:'.2' }}\n <a (click)=\"gotoAmountPage()\" *ngIf=\"refundlist?.reason !== 'Overpayment'\"\n class=\"govuk-link right\">Change</a>\n </td>\n\n </tr>\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__cell govuk-!-font-weight-bold\">Send to</td>\n <td class=\"govuk-table__cell\">{{orderParty}} </td>\n </tr>\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__cell govuk-!-font-weight-bold\">Send via</td>\n <td class=\"govuk-table__cell whitespace-inherit\">\n <div *ngIf=\"refundlist?.contact_details?.notification_type === 'EMAIL'\" class=\"contactDetails-width font-size-19px\">\n <strong>Email</strong>\n <br/>\n {{refundlist?.contact_details?.email?.trim()}}\n </div>\n <div *ngIf=\"refundlist?.contact_details?.notification_type === 'LETTER'\" class=\"contactDetails-width font-size-19px\">\n <strong>Post</strong>\n <br/>\n {{refundlist?.contact_details?.address_line?.trim()}} {{refundlist?.contact_details?.city?.trim()}} {{refundlist?.contact_details?.county?.trim()}} {{refundlist?.contact_details?.country?.trim()}} {{refundlist?.contact_details?.postal_code?.trim()}}\n </div> \n <a class=\"govuk-link\" href=\"Javascript:void(0)\" *ngIf=\"refundlist?.contact_details !=null\" class=\"govuk-link right\" (click)=\"gotoEditDetailsPage(refundlist?.contact_details, 'reviewandsubmitEditview')\">\n Change\n </a>\n </td>\n </tr> \n\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__cell govuk-!-font-weight-bold\">Notification</td>\n <td class=\"govuk-table__cell\">{{templateInstructionType}} \n <a *ngIf=\"!notificationPreview\" href=\"Javascript:void(0)\" class=\"govuk-link right\" (click)=\"showNotificationPreview()\">\n Preview\n </a>\n <a *ngIf=\"notificationPreview\" href=\"Javascript:void(0)\" class=\"govuk-link right\" (click)=\"hideNotificationPreview()\">\n Hide Preview\n </a>\n </td>\n </tr>\n </table>\n <app-notification-preview *ngIf=\"notificationPreview\" \n [paymentReference]=\"refundlist?.payment_reference\"\n [payment]=\"paymentObj\" \n [contactDetails]=\"refundlist?.contact_details\"\n [refundReason]=\"refundlist?.reason_code\"\n [refundAmount]=\"changedAmount ? changedAmount : refundlist?.amount\"\n [refundReference]=\"refundlist?.refund_reference\"></app-notification-preview>\n\n <div class=\"govuk-button-group\">\n <button (click)=\"gotoReviewDetailsPage($event)\" class=\"govuk-button govuk-button--secondary\"> Previous</button>\n <button [disabled]=\"isRefundBtnDisabled\" (click)=\"gotoReviewRefundConfirmationPage()\" class=\"govuk-button button\"\n data-module=\"govuk-button\">\n Submit refund\n </button>\n</div>\n<p><a href=\"javascript:void(0)\" (click)=\"loadRefundListPage()\" class=\"govuk-link\" data-module=\"govuk-button\">Cancel</a></p>\n <!-- <div class=\"govuk-button-group\">\n <button [disabled]=\"isRefundBtnDisabled\" (click)=\"gotoReviewRefundConfirmationPage()\" class=\"govuk-button button\"\n data-module=\"govuk-button\">\n Submit refund\n </button>\n </div> -->\n <!-- <p>\n <a (click)=\"loadRefundListPage()\" href=\"\" class=\"cancelbtn\">Cancel</a>\n </p> -->\n</ng-container>\n\n<ng-container *ngIf=\"viewName === 'reviewandsubmitEditview' && isEditDetailsClicked\">\n <input #myInput type='hidden' id='iFrameDrivenImageValue' value='EDITDETAILSPAGE'> \n <h1 class=\"govuk-heading-l\">Edit contact details</h1>\n <h2 class=\"govuk-heading-m govuk-font19px\">Case reference: {{ccdCaseNumber | ccdHyphens }}</h2>\n <span class=\"govuk-hint font-size-19px\">\n Refund reference: {{ refundlist?.refund_reference}}\n </span>\n <ccpay-contact-details\n [isEditOperationInRefundList] = isEditDetailsClicked\n [addressObj] = notification\n (assignContactDetailsInFefundsList)=\"getContactDetailsForRefundList($event)\"\n (redirectToIssueRefund)=\"gotoRefundReviewAndSubmitViewPageCancelBtnClicked($event)\" ></ccpay-contact-details>\n <p>\n <a (click)=\"loadRefundListPage()\" class=\"govuk-link\" data-module=\"govuk-button\">\n Cancel\n </a>\n </p>\n\n</ng-container>\n\n<ng-container *ngIf=\"viewName === 'issuerefundpage1' && !isResendOperationSuccess && !isEditDetailsClicked\">\n <ccpay-add-remission [isFromRefundListPage]=\"true\" [viewCompStatus]=\"viewName\" [isRefundRemission]=\"true\" [isFromRefundStatusPage] = \"true\"\n [changeRefundReason]= \"changeRefundReason\" [ccdCaseNumber]=\"ccdCaseNumber\" (refundListReason)=\"getRefundListReason($event)\" [refundPaymentReference]= \"refundlist?.payment_reference\" ></ccpay-add-remission>\n</ng-container>\n\n<ng-container *ngIf=\"viewName === 'processretroremissonpage' && !isResendOperationSuccess && !isEditDetailsClicked\">\n <ccpay-add-remission [isFromRefundListPage]=\"true\" [viewCompStatus]=\"viewName\" [isRefundRemission]=\"true\"\n [ccdCaseNumber]=\"ccdCaseNumber\" [refundPaymentReference]= \"refundlist?.payment_reference\" (refundListAmount)=\"getRefundAmount($event)\"></ccpay-add-remission>\n</ng-container>\n\n<ng-container *ngIf=\"viewName === 'issuerefund' && !isResendOperationSuccess && !isEditDetailsClicked\">\n <ccpay-add-remission [isFromRefundListPage]=\"true\" [viewCompStatus]=\"viewName\" [isRefundRemission]=\"true\" [isFromServiceRequestPage] = \"true\"\n [ccdCaseNumber]=\"ccdCaseNumber\" [refundPaymentReference]= \"refundlist?.payment_reference\" [isFromRefundStatusPage]=\"true\" (refundListAmount)=\"getRefundAmount($event)\" (refundFees)=\"getRefundFees($event)\"></ccpay-add-remission>\n</ng-container>\n\n<ng-container *ngIf=\"viewName === 'reviewrefundconfirmationpage' && !isResendOperationSuccess && !isEditDetailsClicked\">\n <div class=\"govuk-grid-row pagesize\">\n <div>\n <div class=\"govuk-panel govuk-panel--confirmation\">\n <h1 class=\"govuk-panel__title\">\n Refund submitted\n </h1>\n\n <div class=\"govuk-panel__body\">\n <p class=\"govuk-body white\"><strong>Refund reference:{{refundReference}} </strong></p>\n </div>\n\n </div>\n\n <h2 class=\"govuk-heading-l\">What happens next</h2>\n <p class=\"govuk-body\">\n A refund request for {{refundAmount| currency:'GBP':'symbol-narrow':'1.2-2'}} has been created and will be passed to a team leader to approve.\n </p>\n\n <p class=\"govuk-body\">\n <a href=\"javascript:void(0)\" (click)=\"loadRefundListPage()\" class=\"govuk-link\">Return to case</a>\n </p>\n </div>\n </div>\n</ng-container>\n\n<ng-container *ngIf=\"isResendOperationSuccess\">\n <div class=\"govuk-grid-row pagesize\">\n <div>\n <div class=\"govuk-panel govuk-panel--confirmation\">\n <h1 class=\"govuk-panel__title\">\n Notification sent\n </h1>\n\n <div class=\"govuk-panel__body\">\n <p class=\"govuk-body white\"><strong>Refund reference: {{ refundlist?.refund_reference}} </strong></p>\n </div>\n\n </div>\n <p class=\"govuk-body\">\n <a href=\"javascript:void(0)\" (click)=\"loadRefundListPage()\" class=\"govuk-link\">Return to case</a>\n </p>\n </div>\n </div>\n</ng-container>\n<ng-container *ngIf=\"viewName === 'refundEditView' && isEditDetailsClicked\">\n <input #myInput type='hidden' id='iFrameDrivenImageValue' value='EDITDETAILSPAGE'> \n <h1 class=\"govuk-heading-l\">Edit contact details</h1>\n <h2 class=\"govuk-heading-m govuk-font19px\">Case reference: {{ccdCaseNumber | ccdHyphens }}</h2>\n <span class=\"govuk-hint font-size-19px\">\n Refund reference: {{ refundlist?.refund_reference}}\n </span>\n <ccpay-contact-details\n [isEditOperationInRefundList] = isEditDetailsClicked\n [addressObj] = notification\n (assignContactDetailsInFefundsList)=\"getContactDetails($event)\"\n (redirectToIssueRefund)=\"gotoRefundViewPageCancelBtnClicked($event)\" ></ccpay-contact-details>\n <p>\n <a (click)=\"loadRefundListPage()\" class=\"govuk-link\" data-module=\"govuk-button\">\n Cancel\n </a>\n </p>\n\n</ng-container>\n<ng-container *ngIf=\"viewName === 'revieweditdetailsconfirmationpage' && !isResendOperationSuccess && isEditDetailsClicked\">\n <input #myInput type='hidden' id='iFrameDrivenImageValue' value='EDITDETAILSCHECKANDANSWERPAGE'> \n <h1 class=\"govuk-heading-l\">Check your answers</h1>\n <dl class=\"govuk-summary-list\">\n <div class=\"govuk-summary-list__row font-size-19px\">\n <dt class=\"govuk-summary-list__key\">\n Refund reference\n </dt>\n <dd class=\"govuk-summary-list__value\">\n {{ refundlist?.refund_reference}}\n </dd>\n <span class=\"govuk-summary-list__actions\"></span> \n </div>\n <div class=\"govuk-summary-list__row font-size-19px\">\n <dt class=\"govuk-summary-list__key\">\n Send via\n <br/>\n </dt>\n <dd class=\"govuk-summary-list__value\">\n <div *ngIf=\"addressDetails?.notification_type === 'EMAIL'\" class=\"contactDetails-width font-size-19px\">\n <strong>Email</strong>\n <br/>\n {{addressDetails?.email?.trim()}}\n </div>\n <div *ngIf=\"addressDetails?.notification_type === 'LETTER'\" class=\"contactDetails-width font-size-19px\">\n <strong>Post</strong>\n <br/>\n {{addressDetails?.address_line?.trim()}} {{addressDetails?.city?.trim()}} {{addressDetails?.county?.trim()}} {{addressDetails?.country?.trim()}} {{addressDetails?.postal_code?.trim()}}\n </div> \n </dd>\n <dd class=\"govuk-summary-list__actions\">\n <a class=\"govuk-link\" href=\"Javascript:void(0)\" (click)=\"gotoEditDetailsPage(addressDetails, 'refundEditView')\">\n Change\n </a>\n </dd>\n </div>\n <div class=\"govuk-summary-list__row font-size-19px\">\n <dt class=\"govuk-summary-list__key\">\n Notification\n </dt>\n <dd class=\"govuk-summary-list__value\">\n {{templateInstructionType}} \n </dd>\n <span class=\"govuk-summary-list__actions\">\n <a *ngIf=\"!notificationPreview\" href=\"Javascript:void(0)\" class=\"govuk-link right\" (click)=\"showNotificationPreview()\">\n Preview\n </a>\n <a *ngIf=\"notificationPreview\" href=\"Javascript:void(0)\" class=\"govuk-link right\" (click)=\"hideNotificationPreview()\">\n Hide Preview\n </a>\n </span> \n </div>\n </dl>\n\n <app-notification-preview *ngIf=\"notificationPreview\" [paymentReference]=\"refundlist?.payment_reference\"\n [payment]=\"paymentObj\"\n [contactDetails]=\"addressDetails\"\n [refundReason]=\"refundlist?.reason_code\"\n [refundAmount]=\"refundlist?.amount\"\n [refundReference]=\"refundlist?.refund_reference\">\n </app-notification-preview>\n\n\n\n <div class=\"govuk-button-group\">\n <button (click)=\"gotoEditDetailsPage(addressDetails, 'refundEditView')\" class=\"govuk-button govuk-button--secondary\"> Previous</button>\n <button (click)=\"submitEditDetail()\" class=\"govuk-button button\"\n data-module=\"govuk-button\">\n Send notification\n </button>\n </div>\n <p>\n <a (click)=\"loadRefundListPage()\" class=\"govuk-link\" data-module=\"govuk-button\">\n Cancel\n </a>\n </p>\n\n</ng-container>\n",
6292
+ styles: [".right{float:right!important}.button{margin-bottom:3em;font-size:19px}.cancelbtn{font-size:19px;font-weight:400}.btnmargin{margin-bottom:2em}.govuk-button--secondary{background-color:#dee0e2;box-shadow:0 2px 0 #858688;color:#0b0c0c;margin-right:.5em}.govuk-label--s,.govuk-warning-text__text,.hmcts-currency-input__symbol{font-size:19px;font-weight:400}.inline-error-class{outline:3px solid #a71414;outline-offset:0}.inline-error-message{color:#a71414;font-weight:700;margin-top:10px;font-size:20px}.govuk-button,.govuk-link{margin-right:1em;font-size:19px;font-weight:200}.govuk-button-group{padding-top:2em}.heading-medium{margin-top:.875em}.heading-large{margin-top:.25em}.govuk-panel--confirmation{color:#fff;background:#00703c}.govuk-heading-l{font-size:36px}.govuk-heading-m{font-size:24px}.govuk-panel__title{font-size:5rem}.govuk-body,.govuk-body-m{font-size:2.1875rem}.govuk-input--width-10{max-width:36ex}.col-14{width:14%!important}.col-10{width:10%!important}.col-11{width:11%!important}.col-18{width:18%!important}.col-21{width:21%!important}.col-9{width:9%!important}.col-40{width:40%!important}.col-15{width:15%!important}.col-16{width:16%!important}.col-25{width:25%!important}.col-24{width:24%!important}.govuk-error-summary__title{font-size:24px!important}.govuk-error-summary__body{font-size:19px!important}.font-size-19px{font-size:19px}.white{color:#fff}.pagesize{margin:2em;width:97%}.govuk-link{cursor:pointer}.contactDetails-width{width:70%}.whitespace-inherit{white-space:inherit!important}"]
5223
6293
  },] }
5224
6294
  ];
5225
6295
  RefundStatusComponent.ctorParameters = () => [
5226
6296
  { type: FormBuilder },
5227
6297
  { type: RefundsService },
6298
+ { type: NotificationService },
5228
6299
  { type: PaymentLibComponent },
5229
- { type: PaymentViewService },
5230
- { type: Router },
5231
- { type: OrderslistService }
6300
+ { type: OrderslistService },
6301
+ { type: PaymentViewService }
5232
6302
  ];
5233
6303
  RefundStatusComponent.propDecorators = {
5234
6304
  LOGGEDINUSERROLES: [{ type: Input, args: ['LOGGEDINUSERROLES',] }],
5235
6305
  API_ROOT: [{ type: Input, args: ['API_ROOT',] }],
5236
6306
  ccdCaseNumber: [{ type: Input }],
5237
6307
  isTurnOff: [{ type: Input }],
5238
- isEliginbleToAccess: [{ type: Input }]
6308
+ orderParty: [{ type: Input }]
5239
6309
  };
5240
6310
 
5241
6311
  class ServiceRequestComponent {
5242
- constructor(paymentLibComponent, paymentViewService, OrderslistService, router) {
6312
+ constructor(paymentLibComponent, paymentViewService, OrderslistService, notificationService, cd, router) {
5243
6313
  this.paymentLibComponent = paymentLibComponent;
5244
6314
  this.paymentViewService = paymentViewService;
5245
6315
  this.OrderslistService = OrderslistService;
6316
+ this.notificationService = notificationService;
6317
+ this.cd = cd;
5246
6318
  this.router = router;
5247
6319
  this.goToServiceRquestComponent = new EventEmitter();
5248
6320
  this.paymentGroups = [];
@@ -5250,7 +6322,6 @@ class ServiceRequestComponent {
5250
6322
  this.nonPayments = [];
5251
6323
  this.allPayments = [];
5252
6324
  this.remissions = [];
5253
- this.fees = [];
5254
6325
  this.isRefundRemission = true;
5255
6326
  this.isAddFeeBtnEnabled = true;
5256
6327
  this.isExceptionRecord = false;
@@ -5270,18 +6341,11 @@ class ServiceRequestComponent {
5270
6341
  this.isAddRemissionBtnEnabled = false;
5271
6342
  this.isRefundRemissionBtnEnable = false;
5272
6343
  this.allowedRolesToAccessRefund = ['payments-refund-approver', 'payments-refund'];
5273
- this.check4AllowedRoles2AccessRefund = () => {
5274
- return this.allowedRolesToAccessRefund.some(role => this.LOGGEDINUSERROLES.indexOf(role) !== -1);
5275
- };
5276
- this.allowFurtherAccessAfter4Days = (payment) => {
5277
- if (payment !== null && payment !== undefined) {
5278
- let tmp4DayAgo = new Date();
5279
- tmp4DayAgo.setDate(tmp4DayAgo.getDate() - 4);
5280
- return tmp4DayAgo >= new Date(payment.date_created);
5281
- }
5282
- };
6344
+ this.isContinueBtnDisabled = true;
5283
6345
  }
5284
6346
  ngOnInit() {
6347
+ this.isTurnOff = this.paymentLibComponent.ISTURNOFF;
6348
+ this.isServiceRequest = 'false';
5285
6349
  if (this.viewStatus === undefined) {
5286
6350
  this.viewStatus = this.paymentLibComponent.viewName;
5287
6351
  }
@@ -5297,9 +6361,9 @@ class ServiceRequestComponent {
5297
6361
  this.OrderslistService.getoorderTotalPaymentss().subscribe((data) => this.orderTotalPayments = data);
5298
6362
  }
5299
6363
  }
5300
- // if (this.takePayment) {
5301
- // this.paymentLibComponent.TAKEPAYMENT = this.takePayment;
5302
- // }
6364
+ if (this.paymentLibComponent.isFromServiceRequestPage && this.paymentLibComponent.TAKEPAYMENT) {
6365
+ this.isServiceRequest = 'false';
6366
+ }
5303
6367
  }
5304
6368
  goToServiceRequestPage() {
5305
6369
  this.goToServiceRquestComponent.emit();
@@ -5314,7 +6378,7 @@ class ServiceRequestComponent {
5314
6378
  if (this.takePayment) {
5315
6379
  this.paymentLibComponent.isTakePayment = this.takePayment;
5316
6380
  }
5317
- this.paymentLibComponent.SERVICEREQUEST = "true";
6381
+ //this.paymentLibComponent.SERVICEREQUEST = "true";
5318
6382
  this.paymentLibComponent.isFromServiceRequestPage = false;
5319
6383
  if (this.isServiceRequest !== 'false') {
5320
6384
  this.paymentLibComponent.isFromServiceRequestPage = true;
@@ -5335,44 +6399,8 @@ class ServiceRequestComponent {
5335
6399
  this.router.onSameUrlNavigation = 'reload';
5336
6400
  this.router.navigateByUrl(url);
5337
6401
  }
5338
- chkForAddRemission(feeCode) {
5339
- if (this.chkForPBAPayment() && this.check4AllowedRoles2AccessRefund()) {
5340
- if (this.orderDetail[0]['remissions'].length > 0) {
5341
- for (const remission of this.orderDetail[0]['remissions']) {
5342
- if (remission.fee_code === feeCode) {
5343
- return false;
5344
- }
5345
- }
5346
- }
5347
- return true;
5348
- }
5349
- else {
5350
- return false;
5351
- }
5352
- }
5353
- chkForPBAPayment() {
5354
- if (this.orderDetail !== null && this.orderDetail !== undefined) {
5355
- this.orderDetail.forEach(orderDetail => {
5356
- if (orderDetail.payments) {
5357
- orderDetail.payments.forEach(payment => {
5358
- if (payment.method.toLocaleLowerCase() === 'payment by account' && this.allowFurtherAccessAfter4Days(payment)) {
5359
- this.paymentLibComponent.paymentReference = payment.reference;
5360
- this.isPBA = true;
5361
- }
5362
- });
5363
- }
5364
- });
5365
- if (this.isPBA) {
5366
- return true;
5367
- }
5368
- else {
5369
- return false;
5370
- }
5371
- ;
5372
- }
5373
- }
5374
6402
  addRemission(fee) {
5375
- if (this.chkForAddRemission(fee.code)) {
6403
+ if (this.chkIsAddRemissionBtnEnable(fee)) {
5376
6404
  this.feeId = fee;
5377
6405
  this.viewStatus = 'addremission';
5378
6406
  this.payment = this.orderDetail[0].payments[0];
@@ -5380,20 +6408,20 @@ class ServiceRequestComponent {
5380
6408
  this.paymentGroup = paymentGroup;
5381
6409
  this.paymentGroup.payments = this.paymentGroup.payments.filter(paymentGroupObj => paymentGroupObj['reference'].includes(this.paymentLibComponent.paymentReference));
5382
6410
  this.payment = this.paymentGroup.payments[0];
5383
- // const paymentAllocation = this.paymentGroup.payments[0].payment_allocation;
5384
- // this.isStatusAllocated = paymentAllocation.length > 0 && paymentAllocation[0].allocation_status === 'Allocated' || paymentAllocation.length === 0;
6411
+ // const paymentAllocation = this.paymentGroup.payments[0].payment_allocation;
6412
+ // this.isStatusAllocated = paymentAllocation.length > 0 && paymentAllocation[0].allocation_status === 'Allocated' || paymentAllocation.length === 0;
5385
6413
  }, (error) => this.errorMessage = error.replace(/"/g, ""));
5386
6414
  }
5387
6415
  }
5388
6416
  addRefundForRemission(payment, remission, fees) {
5389
- this.viewStatus = 'addrefundforremission';
5390
- this.payment = payment;
5391
- this.paymentViewService.getApportionPaymentDetails(this.payment.reference).subscribe(paymentGroup => {
6417
+ this.paymentLibComponent.isFromServiceRequestPage = true;
6418
+ this.paymentViewService.getApportionPaymentDetails(payment.reference).subscribe(paymentGroup => {
5392
6419
  this.paymentGroup = paymentGroup;
5393
- this.paymentGroup.payments = this.paymentGroup.payments.filter(paymentGroupObj => paymentGroupObj['reference'].includes(this.payment.reference));
6420
+ this.paymentGroup.payments = this.paymentGroup.payments.filter(paymentGroupObj => paymentGroupObj.reference === payment.reference);
5394
6421
  this.payment = this.paymentGroup.payments[0];
5395
6422
  this.remissions = remission;
5396
6423
  this.remissionFeeAmt = fees.filter(data => data.code === this.remissions['fee_code'])[0].net_amount;
6424
+ this.viewStatus = 'addrefundforremission';
5397
6425
  // const paymentAllocation = this.paymentGroup.payments[0].payment_allocation;
5398
6426
  // this.isStatusAllocated = paymentAllocation.length > 0 && paymentAllocation[0].allocation_status === 'Allocated' || paymentAllocation.length === 0;
5399
6427
  }, (error) => this.errorMessage = error);
@@ -5410,47 +6438,26 @@ class ServiceRequestComponent {
5410
6438
  this.isRemoveBtnDisabled = false;
5411
6439
  });
5412
6440
  }
5413
- chkIssueRefundBtnEnable(payment) {
5414
- if (this.check4AllowedRoles2AccessRefund() && this.allowFurtherAccessAfter4Days(payment) &&
5415
- payment.method === 'payment by account' && payment.status.toLocaleLowerCase() === 'success') {
5416
- this.isIssueRefunfBtnEnable = true;
5417
- }
5418
- if (this.isIssueRefunfBtnEnable) {
5419
- return true;
5420
- }
5421
- else {
5422
- return false;
5423
- }
5424
- ;
5425
- }
5426
- chkIsRefundRemissionBtnEnable() {
5427
- if (this.orderDetail !== null && this.orderDetail !== undefined) {
5428
- this.paymentLibComponent.isFromServiceRequestPage = true;
5429
- this.orderDetail.forEach(orderDetail => {
5430
- if (orderDetail.payments) {
5431
- orderDetail.payments.forEach(payment => {
5432
- if (payment.method.toLocaleLowerCase() === 'payment by account' && payment.status.toLocaleLowerCase() === 'success' && this.allowFurtherAccessAfter4Days(payment)) {
5433
- this.isRefundRemissionBtnEnable = true;
5434
- }
5435
- });
5436
- }
5437
- });
5438
- if (this.isRefundRemissionBtnEnable) {
5439
- return true;
5440
- }
5441
- else {
5442
- return false;
5443
- }
5444
- ;
5445
- }
5446
- }
5447
6441
  issueRefund(payment) {
5448
6442
  if (payment !== null && payment !== undefined) {
5449
- if (this.chkIssueRefundBtnEnable(payment)) {
5450
- this.viewStatus = 'issuerefund';
5451
- this.payment = payment;
5452
- this.paymentLibComponent.isFromServiceRequestPage = true;
5453
- this.isRefundRemission = true;
6443
+ if (this.chkIsIssueRefundBtnEnable(payment)) {
6444
+ this.paymentViewService.getApportionPaymentDetails(payment.reference).subscribe(paymentGroup => {
6445
+ paymentGroup.payments = paymentGroup.payments.filter(paymentGroupObj => paymentGroupObj['reference'].includes(payment.reference));
6446
+ if (payment.over_payment > 0) {
6447
+ this.viewStatus = '';
6448
+ this.payment = payment;
6449
+ this.paymentGroupList = paymentGroup;
6450
+ this.viewCompStatus = 'overpayment';
6451
+ }
6452
+ else {
6453
+ this.viewStatus = 'issuerefund';
6454
+ this.viewCompStatus = '';
6455
+ this.paymentFees = paymentGroup.fees;
6456
+ this.payment = payment;
6457
+ this.paymentLibComponent.isFromServiceRequestPage = true;
6458
+ this.isRefundRemission = true;
6459
+ }
6460
+ }, (error) => this.errorMessage = error);
5454
6461
  }
5455
6462
  }
5456
6463
  }
@@ -5472,6 +6479,30 @@ class ServiceRequestComponent {
5472
6479
  this.OrderslistService.setorderFeesTotal(this.orderFeesTotal);
5473
6480
  this.viewStatus = 'payment-view';
5474
6481
  }
6482
+ chkIsIssueRefundBtnEnable(payment) {
6483
+ if (payment !== null && payment !== undefined) {
6484
+ return payment.issue_refund && payment.refund_enable;
6485
+ }
6486
+ else {
6487
+ return false;
6488
+ }
6489
+ }
6490
+ chkIsAddRefundBtnEnable(remission) {
6491
+ if (remission !== null && remission !== undefined) {
6492
+ return remission.add_refund;
6493
+ }
6494
+ else {
6495
+ return false;
6496
+ }
6497
+ }
6498
+ chkIsAddRemissionBtnEnable(fee) {
6499
+ if (fee !== null && fee !== undefined) {
6500
+ return fee.add_remission && fee.remission_enable;
6501
+ }
6502
+ else {
6503
+ return false;
6504
+ }
6505
+ }
5475
6506
  resetOrderData() {
5476
6507
  this.OrderslistService.setOrderRef(null);
5477
6508
  this.OrderslistService.setorderCCDEvent(null);
@@ -5482,18 +6513,112 @@ class ServiceRequestComponent {
5482
6513
  this.OrderslistService.setorderRemissionTotal(null);
5483
6514
  this.OrderslistService.setorderFeesTotal(null);
5484
6515
  }
6516
+ selectPymentOption(paymentType) {
6517
+ this.paymentType = paymentType;
6518
+ this.isContinueBtnDisabled = false;
6519
+ }
6520
+ goToPaymentViewComp() {
6521
+ this.viewCompStatus = '';
6522
+ this.viewStatus = 'paymentview';
6523
+ }
6524
+ continuePayment(paymentgrp) {
6525
+ if (this.paymentType === 'op') {
6526
+ this.isFullyRefund = false;
6527
+ this.viewStatus = '';
6528
+ this.viewCompStatus = 'overPaymentAddressCapture';
6529
+ }
6530
+ else if (this.paymentType === 'fp') {
6531
+ this.isFullyRefund = true;
6532
+ this.paymentGroupList = paymentgrp;
6533
+ this.viewStatus = 'issuerefund';
6534
+ this.viewCompStatus = "";
6535
+ this.isRefundRemission = true;
6536
+ this.paymentLibComponent.isFromPaymentDetailPage = true;
6537
+ this.isFromPaymentDetailPage = true;
6538
+ this.isFromServiceRequestPage = this.paymentLibComponent.isFromServiceRequestPage;
6539
+ }
6540
+ }
6541
+ getContactDetails(obj) {
6542
+ this.contactDetailsObj = obj;
6543
+ this.viewStatus = '';
6544
+ this.viewCompStatus = 'overpaymentcheckandanswer';
6545
+ this.getTemplateInstructionType(this.paymentGroupList.payments[0]);
6546
+ this.notificationPreview = false;
6547
+ }
6548
+ gotoPaymentSelectPage(event) {
6549
+ event.preventDefault();
6550
+ this.viewStatus = '';
6551
+ this.viewCompStatus = 'overpayment';
6552
+ }
6553
+ gotoAddressPage(note) {
6554
+ if (note) {
6555
+ this.notification = { contact_details: note, notification_type: note.notification_type };
6556
+ }
6557
+ this.errorMessage = '';
6558
+ this.viewStatus = '';
6559
+ this.viewCompStatus = 'overPaymentAddressCapture';
6560
+ }
6561
+ processRefund() {
6562
+ this.isConfirmationBtnDisabled = true;
6563
+ this.errorMessage = '';
6564
+ const obj = this.paymentGroupList.fees[0];
6565
+ this.fees = [{ id: obj.id,
6566
+ code: obj.code,
6567
+ version: obj.version,
6568
+ apportion_amount: obj.apportion_amount,
6569
+ calculated_amount: obj.calculated_amount,
6570
+ updated_volume: obj.updated_volume ? obj.updated_volume : obj.volume,
6571
+ volume: obj.volume,
6572
+ refund_amount: this.getOverPaymentValue() }];
6573
+ const requestBody = new PostRefundRetroRemission(this.contactDetailsObj, this.fees, this.paymentGroupList.payments[0].reference, 'RR037', this.getOverPaymentValue(), 'op');
6574
+ this.paymentViewService.postRefundsReason(requestBody).subscribe(response => {
6575
+ if (JSON.parse(response)) {
6576
+ this.viewCompStatus = '';
6577
+ this.viewStatus = 'refundconfirmationpage';
6578
+ this.refundReference = JSON.parse(response).refund_reference;
6579
+ this.refundAmount = JSON.parse(response).refund_amount;
6580
+ }
6581
+ }, (error) => {
6582
+ this.errorMessage = error;
6583
+ this.isConfirmationBtnDisabled = false;
6584
+ this.cd.detectChanges();
6585
+ });
6586
+ }
6587
+ getOverPaymentValue() {
6588
+ let feesOverPayment = 0;
6589
+ this.paymentGroupList.fees.forEach(fee => {
6590
+ feesOverPayment += fee.over_payment;
6591
+ });
6592
+ return feesOverPayment > 0 ? feesOverPayment : this.paymentGroupList.payments[0].over_payment;
6593
+ }
6594
+ getTemplateInstructionType(payment) {
6595
+ if (payment == undefined || payment == null) {
6596
+ this.templateInstructionType = 'Template';
6597
+ }
6598
+ else {
6599
+ this.templateInstructionType = this.notificationService.getNotificationInstructionType(payment.channel, payment.method);
6600
+ }
6601
+ }
6602
+ showNotificationPreview() {
6603
+ this.notificationPreview = true;
6604
+ }
6605
+ hideNotificationPreview() {
6606
+ this.notificationPreview = false;
6607
+ }
5485
6608
  }
5486
6609
  ServiceRequestComponent.decorators = [
5487
6610
  { type: Component, args: [{
5488
6611
  selector: 'ccpay-service-request',
5489
- template: "<!-- Order Full View Details-->\n<ng-container *ngIf=\"viewStatus === 'order-full-view'\">\n <div class=\"govuk-breadcrumbs\">\n <ol class=\"govuk-breadcrumbs__list\">\n <li class=\"govuk-breadcrumbs__list-item\" *ngIf=\"isServiceRequest === 'false'\">\n <a href=\"javascript:void(0)\" (click)=\"goToCaseTransationPage($event)\" class=\"govuk-back-link govuk-body\">Back</a>\n </li>\n <li class=\"govuk-breadcrumbs__list-item\" *ngIf=\"isServiceRequest !== 'false'\">\n <a href=\"javascript:void(0)\" (click)=\"goToServiceRequestPage()\" id=\"bckLnksize\" class=\"govuk-back-link govuk-body\">Back</a>\n </li>\n </ol>\n </div>\n <div class=\"govuk-grid-column-full\">\n <div class=\"column\">\n <h1 class=\"heading-large govuk-!-margin-top-0\">Service request</h1>\n </div>\n <table >\n <tbody>\n <tr class=\"section\">\n <td class=\"bold tb-col-w\">Service request reference</td>\n <td>{{orderRef}}</td>\n </tr>\n <tr class=\"section\">\n <td class=\"bold tb-col-w\">Status</td>\n <td role=\"status\">{{orderStatus}}</td>\n </tr>\n <tr class=\"section\">\n <td class=\"bold tb-col-w\">Date created</td>\n <td>{{orderCreated | date:'dd MMMM yyyy'}}</td>\n </tr>\n <tr class=\"section\">\n <td class=\"bold tb-col-w\">Party</td>\n <td>{{orderParty}}</td>\n </tr>\n <tr class=\"section\">\n <td class=\"bold tb-col-w\">CCD event</td>\n <td>{{orderCCDEvent}}</td>\n </tr>\n </tbody>\n </table>\n </div>\n\n <div class=\"govuk-grid-column-full order-class\">\n <div class=\"column\">\n <table class=\"govuk-table \">\n <thead class=\"govuk-table__head\">\n <tr class=\"govuk-table__row\">\n <th class=\"govuk-table__header col-51\" scope=\"col\" *ngIf=\"isServiceRequest === 'false'\">Fee</th>\n <th class=\"govuk-table__header col-51\" scope=\"col\" colspan=\"2\" *ngIf=\"isServiceRequest !== 'false'\">Fee</th>\n <th class=\"govuk-table__header\" scope=\"col\">Amount</th>\n <th class=\"govuk-table__header\" scope=\"col\">Total</th>\n <th class=\"govuk-table__header\" scope=\"col\" *ngIf=\"isServiceRequest === 'false'\"></th>\n </tr>\n </thead>\n <tbody class=\"govuk-table__body\" *ngFor=\"let order of orderDetail;\">\n <tr class=\"govuk-table__row\" *ngFor=\"let fee of order.fees; let i = index;\">\n <td class=\"govuk-table__cell col-60 whitespace-inherit\" *ngIf=\"isServiceRequest === 'false'\">{{fee.description}}</td>\n <td class=\"govuk-table__cell col-60 whitespace-inherit\" colspan=\"2\" *ngIf=\"isServiceRequest !== 'false'\">{{fee.description}}</td>\n <td class=\"govuk-table__cell\">{{fee.volume? fee.volume : '-'}} X {{ fee.calculated_amount/fee.volume| currency:'GBP':'symbol-narrow':'1.2-2' }}</td>\n <td class=\"govuk-table__cell\">{{ fee?.net_amount | currency:'GBP':'symbol-narrow':'1.2-2' }}</td>\n <td class=\"govuk-table__cell alignright\" *ngIf=\"isServiceRequest === 'false'\">\n <button [disabled]=\"!chkForAddRemission(fee.code)\" (click)=\"addRemission(fee)\" class=\"govuk-button govuk-button--secondary\"> Add remission</button>\n </td>\n\n </tr>\n </tbody>\n <tbody class=\"govuk-table__body\" *ngFor=\"let order of orderDetail;\">\n <tr class=\"govuk-table__row\" *ngIf=\"order.fees?.length === 0\" >\n <td class=\"govuk-table__cell alignleft\" colspan=\"7\">No fees recorded</td>\n </tr>\n </tbody>\n </table>\n\n </div>\n <div class=\"maxwidth\">\n <p class=\"totalfees\">Total fees: {{orderFeesTotal | currency:'GBP':'symbol-narrow':'1.2-2' }}</p>\n </div>\n </div>\n <!-- remissions -->\n<ng-container *ngFor=\"let order of orderDetail;\" >\n <div class=\"govuk-grid-column-full order-class\" *ngIf=\"order.remissions\">\n <table class=\"govuk-table\">\n <thead class=\"govuk-table__head\">\n <tr class=\"govuk-table__row\">\n <th class=\"govuk-table__header col-24 whitespace-inherit\" scope=\"col\">Help with fees or remission code</th>\n <th class=\"govuk-table__header col-27 whitespace-inherit\" scope=\"col\">Reference</th>\n <th class=\"govuk-table__header whitespace-inherit\" scope=\"col\">Fee</th>\n <th class=\"govuk-table__header whitespace-inherit\" scope=\"col\">Amount</th>\n <th class=\"govuk-table__header whitespace-inherit refundBtn\" scope=\"col\"></th>\n </tr>\n </thead>\n <tbody *ngIf=\"order.remissions?.length > 0\" class=\"govuk-table__body\" role=\"status\">\n <tr class=\"govuk-table__row\" *ngFor=\"let remission of order.remissions\">\n <td class=\"govuk-table__cell whitespace-inherit\">{{ remission?.hwf_reference }}</td>\n <td class=\"govuk-table__cell whitespace-inherit\">{{ remission?.remission_reference }}</td>\n <td class=\"govuk-table__cell whitespace-inherit\">{{ remission?.fee_code }}</td>\n <td class=\"govuk-table__cell whitespace-inherit\">{{ remission?.hwf_amount | currency:'GBP':'symbol-narrow':'1.2-2'}}</td>\n <td class=\"govuk-table__cell refundBtn whitespace-inherit\" >\n <button [disabled]=\"!chkIsRefundRemissionBtnEnable()\" (click)=\"addRefundForRemission(order.payments[0],remission,order.fees)\" class=\"govuk-button govuk-button--secondary\"> Add refund</button>\n </td>\n <!-- <td class=\"govuk-table__cell refundBtn whitespace-inherit\" >\n\n </td> -->\n </tr>\n </tbody>\n <tbody class=\"govuk-table__body\" *ngIf=\"order.remissions?.length === 0\" role=\"status\">\n <td colspan=\"6\">No help with fees or remissions.</td>\n </tbody>\n </table>\n \n <div class=\"summarypagealign\">\n <p>Total reductions: {{orderRemissionTotal | currency:'GBP':'symbol-narrow':'1.2-2' }}</p>\n </div>\n <div class=\"summarypagealign\">\n <p>Total fees to pay: {{(orderFeesTotal - orderRemissionTotal) | currency:'GBP':'symbol-narrow':'1.2-2' }}</p>\n </div>\n </div>\n\n\n</ng-container>\n\n\n <!--Payments-->\n <ng-container *ngFor=\"let order of orderDetail;\" >\n <div class=\"govuk-grid-column-full\" *ngIf=\"order.payments\">\n <h3 class=\"heading-medium\">Payments</h3>\n <table class=\"govuk-table \">\n <thead class=\"govuk-table__head\">\n <tr class=\"govuk-table__row\">\n <th class=\"govuk-table__header col-25\" scope=\"col\"></th>\n <th class=\"govuk-table__header\" scope=\"col\">Date created</th>\n <th class=\"govuk-table__header\" scope=\"col\">Amount</th>\n <th class=\"govuk-table__header\" scope=\"col\"></th>\n </tr>\n </thead>\n <tbody *ngIf=\"order.payments?.length > 0\" class=\"govuk-table__body\" role=\"status\">\n <tr class=\"govuk-table__row\" *ngFor=\"let payment of order.payments\">\n <td class=\"govuk-table__cell whitespace-inherit\">\n <a href=\"javascript:void(0)\" (click)=\"goToPayementView(payment.paymentGroupReference, payment.reference, payment.method)\">Review</a>\n </td>\n <td class=\"govuk-table__cell whitespace-inherit\">{{ payment?.date_created | date:'dd MMM yyyy' }}</td>\n <td class=\"govuk-table__cell whitespace-inherit\">{{ payment?.amount | currency:'GBP':'symbol-narrow':'1.2-2' }}</td>\n <td class=\"govuk-table__cell alignright\">\n <button [disabled] = \"!chkIssueRefundBtnEnable(payment)\" (click)=\"issueRefund(payment)\" class=\"govuk-button govuk-button--secondary\">Issue refund</button>\n </td>\n <!-- <td *ngIf=\"!chkIssueRefundBtnEnable(payment)\" class=\"govuk-table__cell\" style=\"text-align: right;\">\n </td> -->\n </tr>\n </tbody>\n <tbody class=\"govuk-table__body\" *ngIf=\"order.payments === undefined || order.payments === null\" role=\"status\">\n <td colspan=\"6\">No Payments recorded.</td>\n </tbody>\n\n </table>\n</div>\n</ng-container>\n<div *ngIf=\"isServiceRequest === 'false'\">\n <div *ngIf=\"((orderFeesTotal - orderRemissionTotal)- orderTotalPayments) > 0\" >\n <p class=\"totalPay\">Total left to pay: <b>{{((orderFeesTotal - orderRemissionTotal)- orderTotalPayments )| currency:'GBP':'symbol-narrow':'1.2-2' }}</b> </p>\n </div>\n <div *ngIf=\"((orderFeesTotal - orderRemissionTotal)- orderTotalPayments) < 0\" >\n <p class=\"totalPay\">Total left to pay: <b>0</b> </p>\n </div>\n</div>\n</ng-container>\n<ccpay-add-remission *ngIf=\"viewStatus === 'addremission' && feeId\"\n[isTurnOff]=\"isTurnOff\"\n[isStrategicFixEnable]=\"isStrategicFixEnable\"\n[viewCompStatus]= \"viewStatus\"\n[fee]=\"feeId\"\n[orderStatus] =\"orderStatus\"\n[paidAmount]= \"orderTotalPayments\"\n[isRefundRemission]=\"isRefundRemission\"\n[caseType]=\"caseType\"\n[paymentGroupRef]=\"orderRef\"\n[isFromServiceRequestPage] = \"true\"\n[payment] = \"payment\"\n[ccdCaseNumber]=\"ccdCaseNumber\"\n[orderRef] = \"orderRef\"\n[orderStatus] = \"orderStatus\"\n[orderCreated] = \"orderCreated\"\n[orderParty] = \"orderParty\"\n[orderCCDEvent] = \"orderCCDEvent\"\n[orderDetail] = \"orderDetail\"\n[LOGGEDINUSERROLES] = \"LOGGEDINUSERROLES\"\n[takepayment] = \"takePayment\"\n[orderFeesTotal] = \"orderFeesTotal\"\n[orderTotalPayments] = \"orderTotalPayments\"\n[orderRemissionTotal] = \"orderRemissionTotal\"\n></ccpay-add-remission>\n\n<ccpay-add-remission *ngIf=\"viewStatus === 'issuerefund' && payment\"\n[isTurnOff]=\"isTurnOff\"\n[isStrategicFixEnable]=\"isStrategicFixEnable\"\n[viewCompStatus]= \"viewStatus\"\n[isFromServiceRequestPage] = \"true\"\n[payment]=\"payment\"\n[orderStatus] =\"orderStatus\"\n[paidAmount]= \"orderTotalPayments\"\n[isRefundRemission]=\"isRefundRemission\"\n[caseType]=\"caseType\"\n[paymentGroupRef]=\"orderRef\"\n[ccdCaseNumber]=\"ccdCaseNumber\"\n[orderRef] = \"orderRef\"\n[orderStatus] = \"orderStatus\"\n[orderCreated] = \"orderCreated\"\n[orderParty] = \"orderParty\"\n[orderCCDEvent] = \"orderCCDEvent\"\n[orderDetail] = \"orderDetail\"\n[LOGGEDINUSERROLES] = \"LOGGEDINUSERROLES\"\n[takepayment] = \"takePayment\"\n[orderFeesTotal] = \"orderFeesTotal\"\n[orderTotalPayments] = \"orderTotalPayments\"\n[orderRemissionTotal] = \"orderRemissionTotal\"></ccpay-add-remission>\n\n<ccpay-add-remission *ngIf=\"viewStatus === 'addrefundforremission' && payment\"\n[isTurnOff]=\"isTurnOff\"\n[isStrategicFixEnable]=\"isStrategicFixEnable\"\n[viewCompStatus]= \"viewStatus\"\n[payment]=\"payment\"\n[orderStatus] =\"orderStatus\"\n[paidAmount]= \"orderTotalPayments\"\n[isRefundRemission]=\"isRefundRemission\"\n[caseType]=\"caseType\"\n[feeamount]=\"remissionFeeAmt\"\n[remission] = \"remissions\"\n[isFromServiceRequestPage]=\"true\"\n[ccdCaseNumber]=\"ccdCaseNumber\"\n[orderRef] = \"orderRef\"\n[orderStatus] = \"orderStatus\"\n[orderCreated] = \"orderCreated\"\n[orderParty] = \"orderParty\"\n[orderCCDEvent] = \"orderCCDEvent\"\n[orderDetail] = \"orderDetail\"\n[LOGGEDINUSERROLES] = \"LOGGEDINUSERROLES\"\n[takepayment] = \"takePayment\"\n[orderFeesTotal] = \"orderFeesTotal\"\n[orderTotalPayments] = \"orderTotalPayments\"\n[orderRemissionTotal] = \"orderRemissionTotal\"></ccpay-add-remission>\n\n<ccpay-payment-view *ngIf=\"viewStatus === 'payment-view'\"\n[LOGGEDINUSERROLES] = \"LOGGEDINUSERROLES\"\n[isTurnOff] = \"isTurnOff\"\n[isTakePayment] = \"takePayment\"\n[caseType] = \"caseType\"\n[orderRef] = \"orderRef\"\n[orderStatus] = \"orderStatus\"\n[orderCreated] = \"orderCreated\"\n[orderParty] = \"orderParty\"\n[orderCCDEvent] = \"orderCCDEvent\"\n[orderDetail] = \"orderDetail\"\n[orderFeesTotal] = \"orderFeesTotal\"\n[orderTotalPayments] = \"orderTotalPayments\"\n[orderRemissionTotal] = \"orderRemissionTotal\"\n[isServiceRequest] = \"isServiceRequest\">\n</ccpay-payment-view>\n\n<ng-container *ngIf=\"viewStatus === 'feeRemovalConfirmation'\">\n<div class=\"govuk-warning-text\">\n <h1 class=\"govuk-heading-l\">Case reference:{{ccdCaseNumber | ccdHyphens}}</h1>\n <span class=\"govuk-warning-text__icon\" aria-hidden=\"true\">!</span>\n <strong class=\"govuk-warning-text__text\">\n <span class=\"govuk-warning-text__assistive\">Warning</span>\n Are you sure you want to delete this fee?\n </strong>\n</div>\n<div class=\"govuk-button-grb\">\n <form novalidate>\n <button type=\"submit\" class=\"button govuk-button--secondary\" (click)=\"cancelRemoval()\">\n Cancel\n </button>\n <button type=\"submit\" class=\"button\"\n [disabled]=\"isRemoveBtnDisabled\"\n [ngClass]='isRemoveBtnDisabled ? \"button button--disabled govuk-!-margin-right-1\" : \"button govuk-!-margin-right-1\"'\n (click)=\"removeFee(feeId)\">\n Remove\n </button>\n </form>\n</div>\n</ng-container>\n",
5490
- styles: [".govuk-grid-column-full--gr{position:relative;margin-bottom:10px}.disable{text-decoration:none;cursor:default;color:#fff;background-color:grey;pointer-events:none}.govuk-grid__surplus-payments{margin:20px 0}.govuk-grid__surplus-payments>.govuk-grid-column-full{padding:0}.govuk-grid__surplus-payments-col1{margin-bottom:10px}.govuk-inset-text__no-border{border-left:0}.govuk-hidetext{font-size:22px;padding-bottom:10px}.lowercase{text-transform:lowercase}.channel:first-letter{text-transform:uppercase}.govuk-heading-xl{font-size:48px;margin-bottom:1px}.govuk-section-break--visible{border-bottom:2px solid #000}.totalpayments.govuk-table__row{border-bottom:2px solid #000!important}.govuk-inset-text{margin-left:1em}.govuk-button{font-size:19px;margin-bottom:0!important}.govuk-table__cell.govuk-table__cell--col6.govuk-table__custom--col6,.groupamount.govuk-table__header{text-align:right}.feeclass{padding-left:.7em}.align-center{text-align:center}details summary{display:list-item}.case-transaction__color{color:#a71414;font-weight:700;text-align:center}.capitalize:first-letter{text-transform:uppercase}.govuk-inset-text__no-left-margin{margin-left:0;padding-left:0}.whitespace-inherit{white-space:inherit!important}.govuk-section-records-break{margin:10px;border-bottom:2px solid #000!important}.exisitng-fees{margin-left:12px}.add-telephony-payment{margin-top:-2em;margin-left:-2em}.govuk-table__header--custom{text-align:center}.disable-link{cursor:default;pointer-events:none;color:#8e8c8c}.panel-no--style{border-left-style:none}.col-28{width:28%!important}.col-8{width:8%!important}.col-60{width:60%!important}.col-32{width:32%!important}.col-34{width:34%!important}#bckLnksize{font-size:16px!important}.col-15{width:15%!important;padding-right:0!important;padding-left:0!important}.col-16{width:16%!important}.col-14{width:14%!important}.col-17{width:17%!important}.col-12{width:12%!important}.col-9{width:9%!important}.col-10{width:10%!important}.col-11{width:11%!important}.col-13{width:13%!important}.col-21{width:21%!important}.col-20{width:20%!important}.col-24{width:24%!important}.govuk-table__cell,.govuk-table__header{padding:10px 10px 10px 0}.col-27{width:27%!important}td{white-space:nowrap;overflow:hidden!important}.col-19{width:19%!important}.col-18,.col-19{padding-left:0!important}.col-18{width:18%!important;padding-right:0!important}.col-37{width:37%!important}.col-55{width:55%!important}.govuk-table{margin-bottom:1px}.hmcts-banner>.hmcts-banner__message{font-size:19px;line-height:1.25}.summary-table-font{font-size:36px}.order-class{padding-top:3em}.govuk-table__cell:last-child,.govuk-table__header:last-child{text-align:right}.govuk-grid-column-two-thirds{width:64%!important;padding:0!important}.govuk-heading-l{font-size:36px;margin-bottom:10px}.paymentrequest{margin-top:1em}.mar-17{margin-left:17px}.col-61{width:61px!important;padding:0!important}.error{width:960px;margin:auto}.summarypage{padding-left:36em;margin-top:2em}.summarypagealign{width:100%;text-align:right;margin-top:2em}.govuk-inset-text{font-size:2.1875rem}table{table-layout:fixed;width:100%}td,th{word-wrap:break-word}.totalPay{padding-right:14px}.totalfees,.totalPay{float:right;margin-top:2em}.refundBtn{text-align:right;width:18%}.col-25{width:25%!important}.col-51{width:51%!important}.alignright{text-align:right}.alignleft{text-align:left}.alignself{align-self:flex-end}.maxwidth{width:100%}a:focus{background-color:#fd0;outline:2px solid #fd0}button:focus{outline:3.5px solid #fd0}.govuk-warning-text__icon{margin-top:8px}@media screen and (max-width:979px){table,td,th,tr{font-size:16px}.govuk-button,table,td,th,tr{white-space:normal;word-wrap:break-word}.govuk-button{font-size:14px}}@media screen and (max-width:650px){table,td,th,tr{font-size:14px}.govuk-button{font-size:12px}}@media screen and (max-width:470px){table,td,th,tr{font-size:12px}.govuk-button{font-size:10px}}"]
6612
+ template: "<!-- Order Full View Details-->\n<ng-container *ngIf=\"viewStatus === 'order-full-view'\">\n <div class=\"govuk-breadcrumbs\">\n <ol class=\"govuk-breadcrumbs__list\">\n <li class=\"govuk-breadcrumbs__list-item\" *ngIf=\"isServiceRequest === 'false'\">\n <a href=\"javascript:void(0)\" (click)=\"goToCaseTransationPage($event)\" class=\"govuk-back-link\">Back</a>\n </li>\n <li class=\"govuk-breadcrumbs__list-item\" *ngIf=\"isServiceRequest !== 'false'\">\n <a href=\"javascript:void(0)\" (click)=\"goToServiceRequestPage()\" id=\"bckLnksize\" class=\"govuk-back-link\">Back</a>\n </li>\n </ol>\n </div>\n <div class=\"govuk-grid-column-full\">\n <div class=\"column\">\n <h1 class=\"heading-large govuk-!-margin-top-0\">Service request</h1>\n </div>\n <table >\n <tbody>\n <tr class=\"section\">\n <td class=\"bold tb-col-w\">Service request reference</td>\n <td>{{orderRef}}</td>\n </tr>\n <tr class=\"section\">\n <td class=\"bold tb-col-w\">Status</td>\n <td>{{orderStatus}}</td>\n </tr>\n <tr class=\"section\">\n <td class=\"bold tb-col-w\">Date created</td>\n <td>{{orderCreated | date:'dd MMMM yyyy'}}</td>\n </tr>\n <tr class=\"section\">\n <td class=\"bold tb-col-w\">Party</td>\n <td>{{orderParty}}</td>\n </tr>\n <tr class=\"section\">\n <td class=\"bold tb-col-w\">CCD event</td>\n <td>{{orderCCDEvent}}</td>\n </tr>\n </tbody>\n </table>\n </div>\n\n <div class=\"govuk-grid-column-full order-class\">\n <div class=\"column\">\n <table class=\"govuk-table \">\n <thead class=\"govuk-table__head\">\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__header col-51\" scope=\"col\" *ngIf=\"isServiceRequest === 'false'\">Fee</td>\n <td class=\"govuk-table__header col-51\" scope=\"col\" colspan=\"2\" *ngIf=\"isServiceRequest !== 'false'\">Fee</td>\n <td class=\"govuk-table__header\" scope=\"col\">Amount</td>\n <td class=\"govuk-table__header\" scope=\"col\">Total</td>\n <td class=\"govuk-table__header\" scope=\"col\" *ngIf=\"isServiceRequest === 'false'\"></td>\n </tr>\n </thead>\n <tbody class=\"govuk-table__body\" *ngFor=\"let order of orderDetail;\">\n <tr class=\"govuk-table__row\" *ngFor=\"let fee of order.fees; let i = index;\">\n <td class=\"govuk-table__cell col-60 whitespace-inherit\" *ngIf=\"isServiceRequest === 'false'\">{{fee.description}}</td>\n <td class=\"govuk-table__cell col-60 whitespace-inherit\" colspan=\"2\" *ngIf=\"isServiceRequest !== 'false'\">{{fee.description}}</td>\n <td class=\"govuk-table__cell\">{{fee.volume? fee.volume : '-'}} X {{ fee.calculated_amount/fee.volume| currency:'GBP':'symbol-narrow':'1.2-2' }}</td>\n <td class=\"govuk-table__cell\">{{ fee?.net_amount | currency:'GBP':'symbol-narrow':'1.2-2' }}</td>\n <td class=\"govuk-table__cell alignright\" *ngIf=\"isServiceRequest === 'false'\">\n <button [disabled]=\"!chkIsAddRemissionBtnEnable(fee)\" (click)=\"addRemission(fee)\" class=\"govuk-button govuk-button--secondary\"> Add remission</button>\n </td>\n\n </tr>\n </tbody>\n <tbody class=\"govuk-table__body\" *ngFor=\"let order of orderDetail;\">\n <tr class=\"govuk-table__row\" *ngIf=\"order.fees?.length === 0\" >\n <td class=\"govuk-table__cell alignleft\" colspan=\"7\">No fees recorded</td>\n </tr>\n </tbody>\n </table>\n\n </div>\n <div class=\"maxwidth\">\n <p class=\"totalfees\">Total fees: {{orderFeesTotal | currency:'GBP':'symbol-narrow':'1.2-2' }}</p>\n </div>\n </div>\n <!-- remissions -->\n<ng-container *ngFor=\"let order of orderDetail;\" >\n <div class=\"govuk-grid-column-full order-class\" *ngIf=\"order.remissions\">\n <table class=\"govuk-table\">\n <thead class=\"govuk-table__head\">\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__header col-24 whitespace-inherit\" scope=\"col\">Help with fees or remission code</td>\n <td class=\"govuk-table__header col-27 whitespace-inherit\" scope=\"col\">Reference</td>\n <td class=\"govuk-table__header whitespace-inherit\" scope=\"col\">Fee</td>\n <td class=\"govuk-table__header whitespace-inherit\" scope=\"col\">Amount</td>\n <td class=\"govuk-table__header whitespace-inherit refundBtn\" scope=\"col\"></td>\n </tr>\n </thead>\n <tbody *ngIf=\"order.remissions?.length > 0\" class=\"govuk-table__body\" >\n <tr class=\"govuk-table__row\" *ngFor=\"let remission of order.remissions\">\n <td class=\"govuk-table__cell whitespace-inherit\">{{ remission?.hwf_reference }}</td>\n <td class=\"govuk-table__cell whitespace-inherit\">{{ remission?.remission_reference }}</td>\n <td class=\"govuk-table__cell whitespace-inherit\">{{ remission?.fee_code }}</td>\n <td class=\"govuk-table__cell whitespace-inherit\">{{ remission?.hwf_amount | currency:'GBP':'symbol-narrow':'1.2-2'}}</td>\n <td class=\"govuk-table__cell refundBtn whitespace-inherit\" >\n <button [disabled]=\"!chkIsAddRefundBtnEnable(remission)\" (click)=\"addRefundForRemission(order.payments[0],remission,order.fees)\" class=\"govuk-button govuk-button--secondary\"> Add refund</button>\n </td>\n <!-- <td class=\"govuk-table__cell refundBtn whitespace-inherit\" >\n\n </td> -->\n </tr>\n </tbody>\n\n\n </table>\n <div *ngIf=\"order.remissions?.length === 0\">\n <span >No help with fees or remissions.</span>\n </div>\n <div class=\"summarypagealign\">\n <p>Total reductions: {{orderRemissionTotal | currency:'GBP':'symbol-narrow':'1.2-2' }}</p>\n </div>\n <div class=\"summarypagealign\">\n <p class=\"summarypage\">Total fees to pay: {{(orderFeesTotal - orderRemissionTotal) | currency:'GBP':'symbol-narrow':'1.2-2' }}</p>\n </div>\n </div>\n\n\n</ng-container>\n\n\n <!--Payments-->\n <ng-container *ngFor=\"let order of orderDetail;\" >\n <div class=\"govuk-grid-column-full\" *ngIf=\"order.payments\">\n <h3 class=\"heading-medium\">Payments</h3>\n <table class=\"govuk-table \">\n <thead class=\"govuk-table__head\">\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__header col-25\" scope=\"col\"></td>\n <td class=\"govuk-table__header\" scope=\"col\">Date created</td>\n <td class=\"govuk-table__header\" scope=\"col\">Amount</td>\n <td class=\"govuk-table__header\" scope=\"col\"></td>\n </tr>\n </thead>\n <tbody *ngIf=\"order.payments?.length > 0\" class=\"govuk-table__body\">\n <tr class=\"govuk-table__row\" *ngFor=\"let payment of order.payments\">\n <td class=\"govuk-table__cell whitespace-inherit\">\n <a href=\"javascript:void(0)\" (click)=\"goToPayementView(payment.paymentGroupReference, payment.reference, payment.method)\">Review</a>\n </td>\n <td class=\"govuk-table__cell whitespace-inherit\">{{ payment?.date_created | date:'dd MMM yyyy' }}</td>\n <td class=\"govuk-table__cell whitespace-inherit\">{{ payment?.amount | currency:'GBP':'symbol-narrow':'1.2-2' }}</td>\n <td class=\"govuk-table__cell alignright\">\n <button [disabled]=\"!chkIsIssueRefundBtnEnable(payment)\" (click)=\"issueRefund(payment)\" class=\"govuk-button govuk-button--secondary\">Issue refund</button>\n </td>\n <!-- <td *ngIf=\"!chkIssueRefundBtnEnable(payment)\" class=\"govuk-table__cell\" style=\"text-align: right;\">\n </td> -->\n </tr>\n </tbody>\n </table>\n\n <div *ngIf=\"order.payments === undefined || order.payments === null\">\n <!-- <h3 class=\"heading-medium mar-17\">Payments</h3> -->\n <span class=\"mar-17\" >No Payments recorded</span>\n </div>\n</div>\n</ng-container>\n<div *ngIf=\"isServiceRequest === 'false'\">\n <div *ngIf=\"((orderFeesTotal - orderRemissionTotal)- orderTotalPayments) > 0\" >\n <p class=\"totalPay\">Total left to pay: <b>{{((orderFeesTotal - orderRemissionTotal)- orderTotalPayments )| currency:'GBP':'symbol-narrow':'1.2-2' }}</b> </p>\n </div>\n <div *ngIf=\"((orderFeesTotal - orderRemissionTotal)- orderTotalPayments) < 0\" >\n <p class=\"totalPay\">Total left to pay: <b>0</b> </p>\n </div>\n</div>\n</ng-container>\n<ccpay-add-remission *ngIf=\"viewStatus === 'addremission' && feeId\"\n[isTurnOff]=\"isTurnOff\"\n[isStrategicFixEnable]=\"isStrategicFixEnable\"\n[viewCompStatus]= \"viewStatus\"\n[fee]=\"feeId\"\n[orderStatus] =\"orderStatus\"\n[paidAmount]= \"orderTotalPayments\"\n[isRefundRemission]=\"isRefundRemission\"\n[caseType]=\"caseType\" \n[isServiceRequest] = \"isServiceRequest\"\n[paymentGroupRef]=\"orderRef\" \n[isFromServiceRequestPage] = \"true\"\n[payment] = \"payment\"\n[ccdCaseNumber]=\"ccdCaseNumber\"\n[orderRef] = \"orderRef\"\n[orderStatus] = \"orderStatus\"\n[orderCreated] = \"orderCreated\"\n[orderParty] = \"orderParty\"\n[orderCCDEvent] = \"orderCCDEvent\"\n[orderDetail] = \"orderDetail\"\n[LOGGEDINUSERROLES] = \"LOGGEDINUSERROLES\"\n[takepayment] = \"takePayment\"\n[orderFeesTotal] = \"orderFeesTotal\"\n[orderTotalPayments] = \"orderTotalPayments\"\n[orderRemissionTotal] = \"orderRemissionTotal\"\n></ccpay-add-remission>\n<ccpay-add-remission *ngIf=\"viewStatus === 'issuerefund' && payment\"\n[isTurnOff]=\"isTurnOff\"\n[isStrategicFixEnable]=\"isStrategicFixEnable\"\n[viewCompStatus]= \"viewStatus\"\n[isFromServiceRequestPage]=\"isFromServiceRequestPage\"\n[isFromPaymentDetailPage] = \"isFromPaymentDetailPage\"\n[payment]=\"payment\" \n[orderStatus] =\"orderStatus\"\n[paidAmount]= \"orderTotalPayments\"\n[isRefundRemission]=\"isRefundRemission\"\n[caseType]=\"caseType\"\n[paymentGroupRef]=\"orderRef\"\n[ccdCaseNumber]=\"ccdCaseNumber\"\n[orderRef] = \"orderRef\"\n[orderStatus] = \"orderStatus\"\n[orderCreated] = \"orderCreated\"\n[orderParty] = \"orderParty\"\n[orderCCDEvent] = \"orderCCDEvent\"\n[orderDetail] = \"orderDetail\"\n[isFullyRefund] = \"isFullyRefund\"\n[fees] = \"paymentFees\"\n[LOGGEDINUSERROLES] = \"LOGGEDINUSERROLES\"\n[isFromRefundListPage] = \"false\"\n[takepayment] = \"takePayment\"\n[orderFeesTotal] = \"orderFeesTotal\"\n[orderTotalPayments] = \"orderTotalPayments\"\n[orderRemissionTotal] = \"orderRemissionTotal\"></ccpay-add-remission>\n\n<ccpay-add-remission *ngIf=\"viewStatus === 'addrefundforremission' && payment\"\n[isTurnOff]=\"isTurnOff\"\n[isStrategicFixEnable]=\"isStrategicFixEnable\"\n[viewCompStatus]= \"viewStatus\"\n[payment]=\"payment\"\n[orderStatus] =\"orderStatus\"\n[paidAmount]= \"orderTotalPayments\"\n[isRefundRemission]=\"isRefundRemission\"\n[caseType]=\"caseType\"\n[feeamount]=\"remissionFeeAmt\"\n[remission] = \"remissions\"\n[isFromServiceRequestPage]=\"isServiceRequest\" \n[ccdCaseNumber]=\"ccdCaseNumber\"\n[orderRef] = \"orderRef\"\n[orderStatus] = \"orderStatus\"\n[orderCreated] = \"orderCreated\"\n[orderParty] = \"orderParty\"\n[orderCCDEvent] = \"orderCCDEvent\"\n[orderDetail] = \"orderDetail\"\n[LOGGEDINUSERROLES] = \"LOGGEDINUSERROLES\"\n[takepayment] = \"takePayment\"\n[orderFeesTotal] = \"orderFeesTotal\"\n[orderTotalPayments] = \"orderTotalPayments\"\n[orderRemissionTotal] = \"orderRemissionTotal\"></ccpay-add-remission>\n\n<ccpay-payment-view *ngIf=\"viewStatus === 'payment-view'\"\n[LOGGEDINUSERROLES] = \"LOGGEDINUSERROLES\"\n[isTurnOff] = \"isTurnOff\"\n[isTakePayment] = \"takePayment\"\n[caseType] = \"caseType\"\n[orderRef] = \"orderRef\"\n[orderStatus] = \"orderStatus\"\n[orderCreated] = \"orderCreated\"\n[orderParty] = \"orderParty\"\n[orderCCDEvent] = \"orderCCDEvent\"\n[orderDetail] = \"orderDetail\"\n[orderFeesTotal] = \"orderFeesTotal\"\n[orderTotalPayments] = \"orderTotalPayments\"\n[orderRemissionTotal] = \"orderRemissionTotal\"\n[isServiceRequest] = \"isServiceRequest\">\n</ccpay-payment-view>\n\n<ng-container *ngIf=\"viewStatus === 'feeRemovalConfirmation'\">\n<div class=\"govuk-warning-text\">\n <span class=\"govuk-warning-text__icon\" aria-hidden=\"true\">!</span>\n <strong class=\"govuk-warning-text__text\">\n <span class=\"govuk-warning-text__assistive\">Warning</span>\n Are you sure you want to delete this fee?\n </strong>\n</div>\n<div class=\"govuk-button-grb\">\n <form novalidate>\n <button type=\"submit\" class=\"button govuk-button--secondary\" (click)=\"cancelRemoval()\">\n Cancel\n </button>\n <button type=\"submit\" class=\"button\"\n [disabled]=\"isRemoveBtnDisabled\"\n [ngClass]='isRemoveBtnDisabled ? \"button button--disabled govuk-!-margin-right-1\" : \"button govuk-!-margin-right-1\"'\n (click)=\"removeFee(feeId)\">\n Remove\n </button>\n </form>\n</div>\n</ng-container>\n\n<div class=\"over-payment\">\n <ng-container *ngIf=\"viewCompStatus === 'overpayment'\">\n <input #myInput type='hidden' id='iFrameDrivenImageValue' value='OVERPAYMENTPAGE'> \n <h1 class=\"heading-large\">Issue refund</h1>\n <h1 class=\"heading-medium\">Case reference: {{ccdCaseNumber | ccdHyphens }}</h1>\n <span id=\"how-contacted-conditional-hint govuk-font19px\" class=\"form-hint\">\n Payment reference: {{paymentGroupList?.payments[0]?.reference}}\n </span>\n <div class=\"govuk-form-group\">\n <fieldset class=\"govuk-fieldset\">\n <legend class=\"govuk-fieldset__legend govuk-fieldset__legend--l\">\n <h1 class=\"heading-medium\">Select payment to refund</h1>\n </legend>\n <div class=\"govuk-radios\" data-module=\"govuk-radios\">\n <div class=\"govuk-radios__item\">\n <input class=\"govuk-radios__input\" id=\"over-payment\" name=\"over-payment\" type=\"radio\" (click)=\"selectPymentOption('op')\" value=\"op\">\n <label class=\"govuk-label govuk-radios__label govuk-font19px\" for=\"where-do-you-live\">\n Over payment \u00A3{{getOverPaymentValue() | number:'.2'}}\n </label>\n </div>\n <div class=\"govuk-radios__item\">\n <input class=\"govuk-radios__input\" id=\"full-payment\" name=\"over-payment\" type=\"radio\" (click)=\"selectPymentOption('fp')\" value=\"fp\">\n <label class=\"govuk-label govuk-radios__label govuk-font19px\" for=\"where-do-you-live-2\">\n Full payment \u00A3{{paymentGroupList?.payments[0]?.amount | number:'.2'}}\n </label>\n </div>\n </div>\n <button class=\"govuk-button govuk-button--secondary over-payment-alignment govuk-font19px\"\n (click)=\"goToPaymentViewComp()\"> Previous</button>\n <button \n (click)=\"continuePayment(paymentGroupList)\"\n [disabled]=\"isContinueBtnDisabled\"\n [ngClass]='isContinueBtnDisabled ? \"button button--disabled govuk-!-margin-right-1 govuk-font19px\" : \"button govuk-!-margin-right-1 govuk-font19px\"'\n class=\"govuk-button\"> Continue</button>\n </fieldset>\n </div>\n </ng-container>\n \n <ng-container *ngIf=\"viewCompStatus === 'overPaymentAddressCapture'\">\n <input #myInput type='hidden' id='iFrameDrivenImageValue' value='OVERPAYMENTADDRESSCAPTUREPAGE'> \n <h1 class=\"govuk-heading-l\">Issue refund</h1>\n <h2 class=\"govuk-heading-m govuk-font19px\">Case reference: {{ccdCaseNumber | ccdHyphens }}</h2>\n <span id=\"how-contacted-conditional-hint\" class=\"govuk-hint govuk-font19px\">\n Payment reference: {{paymentGroupList?.payments[0]?.reference}}\n </span>\n <ccpay-contact-details \n [addressObj] = notification\n (assignContactDetails)=\"getContactDetails($event)\"\n (redirectToIssueRefund)=\"gotoPaymentSelectPage($event)\" ></ccpay-contact-details>\n <p>\n <a (click)=\"goToCaseTransationPage($event)\" class=\"govuk-link\" data-module=\"govuk-button\">\n Cancel\n </a>\n </p>\n </ng-container>\n \n <ng-container *ngIf=\"viewCompStatus === 'overpaymentcheckandanswer'\">\n <input #myInput type='hidden' id='iFrameDrivenImageValue' value='ADDREFUNDFORREMISSION'> \n <div class=\"govuk-warning-text\">\n \n <h1 class=\"heading-large\"> Check your answers</h1>\n </div>\n <table class=\"govuk-table govuk-table-mb\">\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__cell govuk-!-font-weight-bold\">Payment reference</td>\n <td class=\"govuk-table__cell\">{{paymentGroupList.payments[0].reference}}</td>\n </tr>\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__cell govuk-!-font-weight-bold\">Payment amount</td>\n <td class=\"govuk-table__cell\">{{paymentGroupList.payments[0].amount | currency:'GBP':'symbol-narrow':'1.2-2'}}</td>\n </tr>\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__cell govuk-!-font-weight-bold\">Fee amount</td>\n <td class=\"govuk-table__cell\">{{paymentGroupList?.fees[0]?.net_amount | currency:'GBP':'symbol-narrow':'1.2-2'}}</td>\n </tr>\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__cell govuk-!-font-weight-bold\">Refund amount</td>\n <td class=\"govuk-table__cell\">{{getOverPaymentValue() | currency:'GBP':'symbol-narrow':'1.2-2'}}</td>\n </tr>\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__cell govuk-!-font-weight-bold\">Refund reason</td>\n <td class=\"govuk-table__cell\">Over payment</td>\n </tr>\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__cell govuk-!-font-weight-bold\">Send to</td>\n <td class=\"govuk-table__cell\">{{orderParty}}</td>\n </tr>\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__cell govuk-!-font-weight-bold\">Send via</td>\n <td class=\"govuk-table__cell whitespace-inherit\">\n <div *ngIf=\"contactDetailsObj?.notification_type === 'EMAIL'\" class=\"contactDetails-width\">\n <strong>Email</strong>\n <br/>\n {{contactDetailsObj?.email?.trim()}}\n </div>\n <div *ngIf=\"contactDetailsObj?.notification_type === 'LETTER'\" class=\"contactDetails-width\">\n <strong>Post</strong>\n <br/>\n {{contactDetailsObj?.address_line?.trim()}}&nbsp;{{contactDetailsObj?.city?.trim()}}&nbsp;{{contactDetailsObj?.county?.trim()}}&nbsp;{{contactDetailsObj?.country?.trim()}}&nbsp;{{contactDetailsObj?.postal_code?.trim()}}\n </div>\n <a (click)=\"gotoAddressPage(contactDetailsObj)\" class=\"govuk-link right\" >Change</a>\n </td>\n </tr>\n\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__cell govuk-!-font-weight-bold\">Notification</td>\n <td class=\"govuk-table__cell\">{{templateInstructionType}}\n <a *ngIf=\"!notificationPreview\" href=\"Javascript:void(0)\" class=\"govuk-link right\" (click)=\"showNotificationPreview()\">\n Preview\n </a>\n <a *ngIf=\"notificationPreview\" href=\"Javascript:void(0)\" class=\"govuk-link right\" (click)=\"hideNotificationPreview()\">\n Hide Preview\n </a>\n </td>\n </tr>\n </table>\n\n <app-notification-preview *ngIf=\"notificationPreview\" \n [payment]=\"paymentGroupList.payments[0]\" \n [contactDetails]=\"contactDetailsObj\"\n [refundReason]=\"'RR037'\"\n [refundAmount]=\"getOverPaymentValue()\"></app-notification-preview>\n\n\n <button type=\"submit\" class=\"button govuk-button--secondary over-payment-alignment govuk-font19px\" (click)=\"gotoAddressPage(contactDetailsObj)\">Previous</button>\n <button type=\"submit\"\n [ngClass]='isContinueBtnDisabled ? \"button button--disabled govuk-!-margin-right-1 govuk-font19px\" : \"button govuk-!-margin-right-1 govuk-font19px\"'\n (click)=\"processRefund()\">\n Submit refund\n </button>\n <p>\n <a href=\"javascript:void(0)\" (click)=\"goToCaseTransationPage($event)\" class=\"govuk-link govuk-font19px\" data-module=\"govuk-button\">\n Cancel\n </a>\n </p>\n \n </ng-container>\n <ng-container *ngIf=\"viewStatus === 'refundconfirmationpage' && viewCompStatus !== 'overpayment' && viewCompStatus !== 'overPaymentAddressCapture' && viewCompStatus !== 'overpaymentcheckandanswer'\">\n <input #myInput type='hidden' id='iFrameDrivenImageValue' value='RETROREMISSIONREFUNDCONFIRMATIONPAGE'> \n <div class=\"govuk-grid-row pagesize\">\n <div >\n <div class=\"govuk-panel govuk-panel--confirmation\">\n <h1 class=\"govuk-panel__title\">\n Refund submitted\n </h1>\n \n <div class=\"govuk-panel__body\">\n <p class=\"govuk-body white\"><strong>Refund reference: {{refundReference}}</strong></p>\n </div>\n \n </div>\n <h2 class=\"govuk-heading-l\">What happens next</h2>\n <p class=\"govuk-body\">\n A refund request for {{refundAmount | currency:'GBP':'symbol-narrow':'1.2-2' }} has been created and will be passed to a team leader to approve.\n </p>\n <p class=\"govuk-body\">\n <a href=\"javascript:void(0)\" (click)=\"goToCaseTransationPage($event)\" class=\"govuk-link pointer\" data-module=\"govuk-button\">\n Return to case\n </a>\n </p>\n </div>\n </div>\n \n </ng-container>\n </div>\n",
6613
+ styles: [".govuk-grid-column-full--gr{position:relative;margin-bottom:10px}.disable{text-decoration:none;cursor:default;color:#fff;background-color:grey;pointer-events:none}.pagesize{margin:2em;width:97%}.govuk-grid__surplus-payments{margin:20px 0}.govuk-grid__surplus-payments>.govuk-grid-column-full{padding:0}.govuk-grid__surplus-payments-col1{margin-bottom:10px}.govuk-inset-text__no-border{border-left:0}.govuk-hidetext{font-size:22px;padding-bottom:10px}.lowercase{text-transform:lowercase}.channel:first-letter{text-transform:uppercase}.govuk-heading-xl{font-size:48px;margin-bottom:1px}.govuk-section-break--visible{border-bottom:2px solid #000}.totalpayments.govuk-table__row{border-bottom:2px solid #000!important}.govuk-inset-text{margin-left:1em}.govuk-button{font-size:19px;margin-bottom:0!important}.govuk-table__cell.govuk-table__cell--col6.govuk-table__custom--col6,.groupamount.govuk-table__header{text-align:right}.feeclass{padding-left:.7em}.align-center{text-align:center}details summary{display:list-item}.case-transaction__color{color:#a71414;font-weight:700;text-align:center}.capitalize:first-letter{text-transform:uppercase}.govuk-inset-text__no-left-margin{margin-left:0;padding-left:0}.whitespace-inherit{white-space:inherit!important}.govuk-section-records-break{margin:10px;border-bottom:2px solid #000!important}.exisitng-fees{margin-left:12px}.add-telephony-payment{margin-top:-2em;margin-left:-2em}.govuk-table__header--custom{text-align:center}.disable-link{cursor:default;pointer-events:none;color:#8e8c8c}.panel-no--style{border-left-style:none}.col-28{width:28%!important}.col-8{width:8%!important}.col-60{width:60%!important}.col-32{width:32%!important}.col-34{width:34%!important}#bckLnksize{font-size:16px!important}.col-15{width:15%!important;padding-right:0!important;padding-left:0!important}.col-16{width:16%!important}.col-14{width:14%!important}.col-17{width:17%!important}.col-12{width:12%!important}.col-9{width:9%!important}.col-10{width:10%!important}.col-11{width:11%!important}.col-13{width:13%!important}.col-21{width:21%!important}.col-20{width:20%!important}.col-24{width:24%!important}.govuk-table__cell,.govuk-table__header{padding:10px 10px 10px 0}.col-27{width:27%!important}td{white-space:nowrap;overflow:hidden!important}.col-19{width:19%!important}.col-18,.col-19{padding-left:0!important}.col-18{width:18%!important;padding-right:0!important}.col-37{width:37%!important}.col-55{width:55%!important}.govuk-table{margin-bottom:1px}.hmcts-banner>.hmcts-banner__message{font-size:19px;line-height:1.25}.summary-table-font{font-size:36px}.order-class{padding-top:3em}.govuk-table__cell:last-child,.govuk-table__header:last-child{text-align:right}.govuk-grid-column-two-thirds{width:64%!important;padding:0!important}.govuk-heading-l{font-size:36px;margin-bottom:10px}.paymentrequest{margin-top:1em}.mar-17{margin-left:17px}.col-61{width:61px!important;padding:0!important}.error{width:960px;margin:auto}.summarypage{padding-left:36em;margin-top:2em}.summarypagealign{width:100%;text-align:right;margin-top:2em}.govuk-inset-text{font-size:2.1875rem}table{table-layout:fixed;width:100%}td,th{word-wrap:break-word}.totalPay{padding-right:14px;float:right;margin-top:2em}.govuk-back-link{font-size:1.5rem!important}.totalfees{float:right;margin-top:2em}.refundBtn{text-align:right;width:18%}.col-25{width:25%!important}.col-51{width:51%!important}.alignright{text-align:right}.alignleft{text-align:left}.alignself{align-self:flex-end}.maxwidth{width:100%}.over-payment .govuk-table-mb{margin-bottom:20px}.over-payment .contactDetails-width{width:70%}.over-payment .margin-top10px{margin-top:20px}.over-payment .govuk-font19px{font-size:19px!important}.over-payment .margin-top--size{margin-top:-30px}.over-payment .over-payment-alignment{margin-right:10px}.over-payment .govuk-button{font-size:19px;float:left;margin-top:2em}.over-payment td.govuk-table__cell{width:50%;text-align:left}.over-payment .govuk-label--s,.over-payment .govuk-warning-text__text,.over-payment .hmcts-currency-input__symbol{font-size:19px;font-weight:400}.over-payment .inline-error-class{outline:3px solid #a71414;outline-offset:0;border-color:#a71414}.over-payment .inline-error-message{color:#a71414;border-color:#a71414;font-weight:700;margin-top:10px;font-size:20px}.over-payment .govuk-button-group{padding-top:2em}.over-payment .heading-medium{margin-top:.875em}.over-payment .heading-large{margin-top:.25em}.over-payment .govuk-panel--confirmation{color:#fff;background:#00703c}.over-payment .govuk-panel__title{font-size:5rem}.over-payment .govuk-body,.over-payment .govuk-body-m{font-size:2.1875rem}.over-payment .govuk-link{cursor:pointer}.over-payment .govuk-radios__conditional{padding-top:12px!important}.over-payment .right{float:right;cursor:pointer}.over-payment .radio{float:right}.over-payment .white{color:#fff}"]
5491
6614
  },] }
5492
6615
  ];
5493
6616
  ServiceRequestComponent.ctorParameters = () => [
5494
6617
  { type: PaymentLibComponent },
5495
6618
  { type: PaymentViewService },
5496
6619
  { type: OrderslistService },
6620
+ { type: NotificationService },
6621
+ { type: ChangeDetectorRef },
5497
6622
  { type: Router }
5498
6623
  ];
5499
6624
  ServiceRequestComponent.propDecorators = {
@@ -5508,6 +6633,7 @@ ServiceRequestComponent.propDecorators = {
5508
6633
  orderFeesTotal: [{ type: Input, args: ['orderFeesTotal',] }],
5509
6634
  orderTotalPayments: [{ type: Input, args: ['orderTotalPayments',] }],
5510
6635
  orderRemissionTotal: [{ type: Input, args: ['orderRemissionTotal',] }],
6636
+ paymentGroupList: [{ type: Input, args: ['paymentGroupList',] }],
5511
6637
  takePayment: [{ type: Input, args: ['takePayment',] }],
5512
6638
  ccdCaseNumber: [{ type: Input, args: ['ccdCaseNumber',] }],
5513
6639
  isServiceRequest: [{ type: Input, args: ["isServiceRequest",] }],
@@ -5656,8 +6782,8 @@ class PbaPaymentComponent {
5656
6782
  PbaPaymentComponent.decorators = [
5657
6783
  { type: Component, args: [{
5658
6784
  selector: 'ccpay-pba-payment',
5659
- template: "<ng-container *ngIf=\"viewStatus === 'pba-payment'\">\n\n <div class=\"govuk-breadcrumbs\" *ngIf=\"!errorMsg && !isPBAAccountPaymentSuccess && !isCardPaymentSuccess\">\n <ol class=\"govuk-breadcrumbs__list\">\n <li class=\"govuk-breadcrumbs__list-item\">\n <a href=\"javascript:void(0)\" (click)=\"gotoCasetransationPage()\" class=\"govuk-back-link pba-payments-16-font govuk-body\">Back</a>\n </li>\n </ol>\n </div>\n <div class=\"pba-payment\" *ngIf=\"(pbaAccountList?.length > 0 || errorMsg) && !isInSufficiantFund && !isPBAAccountNotExist && !isPBAServerError && !isPBAAccountHold && !isPBAAccountPaymentSuccess && isCardPaymentSuccess\">\n \n <div *ngIf=\"errorMsg\" class=\"govuk-error-summary pba-payments-error-box--size\" aria-labelledby=\"error-summary-title\" >\n <h2 class=\"govuk-error-summary__title govuk-error-summary__title-custom pba-payments-24-font\" id=\"error-summary-title\">\n There is a problem\n </h2>\n <div class=\"govuk-error-summary__body\">\n <ul class=\"govuk-list govuk-error-summary__list\">\n <li class=\"pba-payments-error-16-font\">\n Your PBA account cannot be found.\n </li>\n <li class=\"pba-payments-error-16-font\">\n If you know your organisation has a PBA, try again.\n </li>\n <li class=\"pba-payments-error-16-font\">\n You can also pay by credit or debit card.\n </li>\n </ul>\n </div>\n </div>\n <!-- <h1 class=\"heading-medium margin-top-10-px\">Pay fee using Payment by Account (PBA)</h1> -->\n <div class=\"govuk-form-group margin-top-10-px\">\n <label class=\"govuk-label pba-payments-govuk__label pba-payments-19-font\">\n Amount to pay \n </label>\n <span class=\"pba-payments-19-font\">{{pbaPayOrderRef.orderTotalFees | currency :'GBP':'symbol':'1.2-2'}}</span>\n </div>\n\n <div class=\"govuk-form-group\" *ngIf=\"!errorMsg\">\n <fieldset class=\"govuk-fieldset\" aria-describedby=\"contact-hint\">\n <div class=\"govuk-radios\" data-module=\"govuk-radios\">\n <div class=\"govuk-radios__item\">\n <input class=\"govuk-radios__input\" id=\"pbaAccount\" name=\"paymentSelection\" type=\"radio\" value=\"PBA\" (click)=\"selectPaymentMethod('PBA')\" data-aria-controls=\"pba-account\">\n <label class=\"govuk-label govuk-radios__label pba-payments-19-font pba-payments-font-bld\" for=\"pbaAccount\">\n Pay fee using Payment by Account (PBA)\n </label>\n </div>\n <div class=\"govuk-radios__conditional\" id=\"conditional-contact\" *ngIf=\"isPbaAccountSelected\">\n <div class=\"govuk-form-group pba-payments-select-box--size\">\n <label class=\"govuk-label pba-payments-govuk__label pba-payments-19-font\" for=\"pbaAccountNumber\">\n Select a PBA \n </label>\n <select class=\"form-control short-input\" id=\"pbaAccountNumber\" (change)=\"selectpbaaccount($event)\">\n <option value=\"\" selected='selected'>Select option</option>\n <option *ngFor=\"let pbaAccount of pbaAccountList;\" value=\"{{pbaAccount}}\">{{pbaAccount}}</option>\n </select>\n </div>\n <div class=\"govuk-form-group\" *ngIf=\"!errorMsg && selectedPbaAccount\">\n <label class=\"govuk-label pba-payments-govuk__label pba-payments-24-font\" for=\"pbaAccountNumber\">\n Enter a reference for your PBA account statements \n </label>\n <div id=\"event-name-hint\" class=\"govuk-hint pba-payments-19-font pba-payment-width\">\n This should be your own unique reference to identify the case. It will appear on your statements.\n </div>\n <input class=\"govuk-input pba-payments-ref-box--size pba-payments-19-font\" id=\"pbaAccountRef\" (change)=\"selectpbaaccount($event)\" name=\"pbaAccountRef\" type=\"text\" aria-describedby=\"pbaAccountRef-hint\">\n </div>\n \n </div>\n <div class=\"govuk-radios__item\">\n <input class=\"govuk-radios__input\" id=\"cardPayment\" name=\"paymentSelection\" type=\"radio\" value=\"card\" (click)=\"selectPaymentMethod('CARD')\" data-aria-controls=\"card-payment\">\n <label class=\"govuk-label govuk-radios__label pba-payments-19-font pba-payments-font-bld\" for=\"cardPayment\">\n Pay by credit or debit card\n </label>\n </div>\n </div>\n </fieldset>\n </div>\n\n <div class=\"govuk-button--group\" *ngIf=\"errorMsg\">\n <button type=\"button\" class=\"button pba-payments-19-font govuk-button--secondary pba-payments-margin-10\" (click)=\"gotoCasetransationPage()\">\n View Service Request\n </button>\n <button type=\"submit\" class=\"button pba-payments-19-font pba-payments-20-margin\" (click)=\"cardPayment()\">\n Pay by card\n </button>\n </div>\n <div class=\"govuk-button--group\" *ngIf=\"!errorMsg\">\n <button type=\"submit\" [disabled]=\"isContinueButtondisabled\" class=\"button pba-payments-19-font pba-payments-20-margin\" (click)=\"saveAndContinue()\">\n <span *ngIf=\"!isPBADropdownSelected\">Continue</span>\n <span *ngIf=\"isPBADropdownSelected\">Confirm payment</span>\n </button>\n </div>\n </div>\n<ng-container *ngIf=\"pbaAccountList?.length <= 0 && !errorMsg && isGetPBAAccountSucceed && isCardPaymentSuccess\">\n <div class=\"govuk-width-container\">\n <main class=\"govuk-main-wrapper govuk-main-wrapper--l\" id=\"main-content\" role=\"main\">\n <div class=\"govuk-grid-row\">\n <div class=\"govuk-warning-text\">\n <span class=\"govuk-warning-text__icon\" aria-hidden=\"true\">!</span>\n <strong class=\"govuk-warning-text__text\">\n <span class=\"govuk-warning-text__assistive\">Warning</span>\n <h2 class=\"warning-heading-m\">You don\u2019t have a registered PBA.</h2>\n </strong>\n </div>\n <div class=\"pba-payments-margin-top-10\">\n <h2 class=\"heading-medium\">Pay by credit or debit card</h2>\n <p class=\"govuk-body pba-payments-19-font\">\n We recommend that you apply to get a new PBA to pay for fees.\n </p>\n <p class=\"govuk-bod ypba-payments-19-font\">\n you can also pay by credit or debit card if you need to pay now\n </p>\n <p class=\"govuk-body\">\n <button type=\"submit\" (click)=\"cardPayment()\" class=\"button pba-payments-19-font pba-payments-20-margin\">\n Pay by card\n </button>\n </p>\n \n </div>\n <div class=\"pba-payments-margin-top-10\">\n <h2 class=\"heading-medium\">Register an existing PBA with MyHMCTS</h2>\n <p class=\"govuk-body pba-payments-19-font\">\n You may find it easier in future to pay by PBA, your organisation administrator will need to \n email <a href=\"mailto: MyHMCTSsupport@justice.gov.uk\">MyHMCTSsupport@justice.gov.uk</a> to ask for your PBA to be registered with your \n MyHMCTS account. You should include your organisation name and PBA number.\n </p>\n <p class=\"govuk-body pba-payments-19-font\">\n It can then take up to 3 days for your account to be updated. You\u2019ll need to start your claim \n again to pay the fee.\n </p>\n </div>\n <div class=\"pba-payments-margin-top-10\">\n <h2 class=\"heading-medium\">Apply to get a new PBA </h2>\n <p class=\"govuk-body pba-payments-19-font\">\n You\u2019ll need to provide details for you and your organisation, including the required credit\n limit for your account.\n </p>\n <p class=\"govuk-body pba-payments-19-font\">\n Once your account has been registered, you\u2019ll need to start your claim again to pay the fee.\n </p>\n <p class=\"govuk-body pba-payments-19-font\">\n Read more information on <a target=\"_blank\" href=\"https://www.gov.uk/guidance/hmcts-payment-by-account-for-online-services\">registering for PBA</a>.\n </p>\n </div>\n </div>\n </main>\n </div>\n</ng-container>\n\n<ng-container *ngIf=\"isInSufficiantFund && isCardPaymentSuccess\">\n <div class=\"govuk-width-container\">\n <main class=\"govuk-main-wrapper govuk-main-wrapper--l\" id=\"main-content\" role=\"main\">\n <div class=\"govuk-grid-row\">\n <div class=\"govuk-error-summary pba-payments-error-box--size\" aria-labelledby=\"error-summary-title\">\n <h2 class=\"govuk-error-summary__title govuk-error-summary__title-custom pba-payments-24-font\" id=\"error-summary-title\">\n There is a problem\n </h2>\n <div class=\"govuk-error-summary__body\">\n <ul class=\"govuk-list govuk-error-summary__list\">\n <li class=\"pba-payments-error-16-font\">\n You don't have enough funds in your PBA account to pay for this fee.\n </li>\n <li class=\"pba-payments-error-16-font\">\n If you have already topped up your PBA account, wait up to 24 hours for the new balance to become available.\n </li>\n </ul>\n </div>\n </div>\n <div class=\"pba-payments-margin-top-10\">\n <h2 class=\"heading-medium\">Should you need any further advice</h2>\n <p class=\"govuk-body pba-payments-19-font\">\n Email <a href=\"mailto:MiddleOffice.DDservices@liberata.com\">MiddleOffice.DDservices@liberata.com</a> or call <a href=\"tel:01633-652-125\">01633 652 125</a> (option 3) to try to fix the issue.\n </p>\n <p class=\"govuk-body pba-payments-19-font\">\n you can also pay by credit or debit card.\n </p>\n <div class=\"govuk-button--group\">\n <button type=\"button\" class=\"button pba-payments-19-font govuk-button--secondary pba-payments-margin-10\" (click)=\"gotoCasetransationPage()\">\n View Service Request\n </button>\n <button type=\"submit\" class=\"button pba-payments-19-font pba-payments-20-margin\" (click)=\"cardPayment()\">\n Pay by card\n </button>\n </div>\n </div>\n </div>\n </main>\n </div>\n</ng-container>\n<ng-container *ngIf=\"isPBAAccountNotExist && isCardPaymentSuccess\">\n <div class=\"govuk-width-container\">\n <main class=\"govuk-main-wrapper govuk-main-wrapper--l\" id=\"main-content\" role=\"main\">\n <div class=\"govuk-grid-row\">\n <div class=\"govuk-error-summary pba-payments-error-box--size\" aria-labelledby=\"error-summary-title\">\n <h2 class=\"govuk-error-summary__title govuk-error-summary__title-custom pba-payments-24-font\" id=\"error-summary-title\">\n There is a problem\n </h2>\n <div class=\"govuk-error-summary__body\">\n <ul class=\"govuk-list govuk-error-summary__list\">\n <li class=\"pba-payments-error-16-font\">\n Your PBA account ({{selectedPbaAccount}}) no longer exists.\n </li>\n </ul>\n </div>\n </div>\n <div class=\"pba-payments-margin-top-10\">\n <h2 class=\"heading-medium\">Should you need any further advice</h2>\n <p class=\"govuk-body pba-payments-19-font govuk-body-width\">\n Email <a href=\"mailto:MiddleOffice.DDservices@liberata.com\">MiddleOffice.DDservices@liberata.com</a> or call <a href=\"tel:01633-652-125\">01633 652 125</a> (option 3) to try to fix the issue.\n </p>\n <p class=\"govuk-body pba-payments-19-font\">\n you can also pay by credit or debit card.\n </p>\n <div class=\"govuk-button--group\">\n <button type=\"button\" class=\"button pba-payments-19-font govuk-button--secondary pba-payments-margin-10\" (click)=\"gotoCasetransationPage()\">\n View Service Request\n </button>\n <button type=\"submit\" class=\"button pba-payments-19-font pba-payments-20-margin\" (click)=\"cardPayment()\">\n Pay by card\n </button>\n </div>\n </div>\n </div>\n </main>\n </div>\n</ng-container>\n<ng-container *ngIf=\"isPBAAccountHold && isCardPaymentSuccess\">\n <div class=\"govuk-width-container\">\n <main class=\"govuk-main-wrapper govuk-main-wrapper--l\" id=\"main-content\" role=\"main\">\n <div class=\"govuk-grid-row\">\n <div class=\"govuk-error-summary pba-payments-error-box--size\" aria-labelledby=\"error-summary-title\">\n <h2 class=\"govuk-error-summary__title govuk-error-summary__title-custom pba-payments-24-font\" id=\"error-summary-title\">\n There is a problem\n </h2>\n <div class=\"govuk-error-summary__body\">\n <ul class=\"govuk-list govuk-error-summary__list\">\n <li class=\"pba-payments-error-16-font\">\n Your PBA account ({{selectedPbaAccount}}) has been put on hold.\n </li>\n </ul>\n </div>\n </div>\n <div class=\"pba-payments-margin-top-10\">\n <h2 class=\"heading-medium\">Should you need any further advice</h2>\n <p class=\"govuk-body pba-payments-19-font govuk-body-width\">\n Email <a href=\"mailto:MiddleOffice.DDservices@liberata.com\">MiddleOffice.DDservices@liberata.com</a> or call <a href=\"tel:01633-652-125\">01633 652 125</a> (option 3) to try to fix the issue.\n </p>\n <p class=\"govuk-body pba-payments-19-font\">\n you can also pay by credit or debit card.\n </p>\n <div class=\"govuk-button--group\">\n <button type=\"button\" class=\"button pba-payments-19-font govuk-button--secondary pba-payments-margin-10\" (click)=\"gotoCasetransationPage()\">\n View Service Request\n </button>\n <button type=\"submit\" class=\"button pba-payments-19-font pba-payments-20-margin\" (click)=\"cardPayment()\">\n Pay by card\n </button>\n </div>\n </div>\n </div>\n </main>\n </div>\n</ng-container>\n<ng-container *ngIf=\"isPBAServerError && isCardPaymentSuccess\">\n <div class=\"govuk-width-container\">\n <main class=\"govuk-main-wrapper govuk-main-wrapper--l\" id=\"main-content\" role=\"main\">\n <div class=\"govuk-grid-row\">\n <div class=\"pba-payments-margin-top-10\">\n <h2 class=\"pba-payments-heading-lg\">Sorry, there is a problem with the service</h2>\n <p class=\"govuk-body pba-payments-19-font\">\n Try again later.\n </p>\n <p class=\"govuk-body pba-payments-19-font\">\n you can also pay by credit or debit card.\n </p>\n <div class=\"govuk-button--group\">\n <button type=\"button\" class=\"button pba-payments-19-font govuk-button--secondary pba-payments-margin-10\" (click)=\"gotoCasetransationPage()\">\n View Service Request\n </button>\n <button type=\"submit\" class=\"button pba-payments-19-font pba-payments-20-margin\" (click)=\"cardPayment()\">\n Pay by card\n </button>\n </div>\n </div>\n </div>\n </main>\n </div>\n</ng-container>\n\n<ng-container *ngIf=\"isPBAAccountPaymentSuccess && isCardPaymentSuccess\">\n <div class=\"govuk-width-container\">\n <main class=\"govuk-main-wrapper govuk-main-wrapper--l\" id=\"main-content\" role=\"main\">\n <div class=\"govuk-grid-row\">\n <div class=\"govuk-panel govuk-panel--confirmation pba-payments--confirmation\">\n <h1 class=\"govuk-panel__title pba-payments--title\">\n Payment successful\n </h1>\n <div class=\"govuk-panel__body pba-payments__body\">\n Your payment reference is <br><strong>{{pbaAccountrPaymentResult.payment_reference}}</strong>\n </div>\n </div>\n <p class=\"govuk-body pba-payments-19-font\">\n <a href=\"javascript:void(0)\" (click)=\"gotoCasetransationPage()\">View service requests</a>\n </p>\n </div>\n </main>\n </div>\n</ng-container>\n\n<ng-container *ngIf=\"!isCardPaymentSuccess\">\n <div class=\"govuk-width-container\">\n <main class=\"govuk-main-wrapper govuk-main-wrapper--l\" id=\"main-content\" role=\"main\">\n <div class=\"govuk-grid-row\">\n <div class=\"pba-payments-margin-top-10\">\n <h2 class=\"pba-payments-heading-lg\">Sorry, there is a problem with the service</h2>\n <p class=\"govuk-body pba-payments-19-font\">\n Try again later.\n </p>\n <!-- <p class=\"govuk-body pba-payments-19-font\">\n you can also <a href=\"javascript:void(0)\" (click)=\"cardPayment()\" >pay by credit or debit card</a>.\n </p> -->\n <p class=\"govuk-body pba-payments-19-font\">\n <a href=\"javascript:void(0)\" (click)=\"gotoCasetransationPage()\">View service requests</a>\n </p>\n </div>\n </div>\n </main>\n </div>\n</ng-container>\n</ng-container>\n\n\n\n",
5660
- styles: [".pba-payments-govuk__label{font-weight:700;line-height:1.31578947}.pba-payments-19-font{font-size:19px}.pba-payments-font-bld{font-weight:700}.pba-payments-16-font{font-size:16px}.pba-payments-24-font{font-size:24px}.pba-payments-20-margin{margin-bottom:20px}.pba-payments-select-box--size{width:40%}.pba-payments-error-box--size{width:80%}.pba-payments-ref-box--size{width:60%}.pba-payments-error-16-font{font-size:16px;line-height:34px}.pba-payments-margin-10{margin-right:10px}.pba-payments-margin-top-10{margin-top:15px}.pba-payments-heading-lg{font-size:40px;font-weight:700;line-height:72px}.pba-payments--confirmation{background:#00703c!important}.pba-payments__body{font-size:36px!important}.pba-payments--title{font-size:48px!important}.warning-heading-m{font-size:29px;font-weight:700}.pba-payment-width{width:75%}.margin-top-10-px{margin-top:10px}.govuk-error-summary:focus{outline:3px solid #fd0}.govuk-body-width{width:750px}.govuk-back-link:focus,a:focus{background-color:#fd0;outline:2px solid #fd0}"]
6785
+ template: "<ng-container *ngIf=\"viewStatus === 'pba-payment'\">\n\n <div class=\"govuk-breadcrumbs\" *ngIf=\"!errorMsg && !isPBAAccountPaymentSuccess && !isCardPaymentSuccess\">\n <ol class=\"govuk-breadcrumbs__list\">\n <li class=\"govuk-breadcrumbs__list-item\">\n <a href=\"javascript:void(0)\" (click)=\"gotoCasetransationPage()\" class=\"govuk-back-link pba-payments-16-font\">Back</a>\n </li>\n </ol>\n </div>\n <div class=\"pba-payment\" *ngIf=\"(pbaAccountList?.length > 0 || errorMsg) && !isInSufficiantFund && !isPBAAccountNotExist && !isPBAServerError && !isPBAAccountHold && !isPBAAccountPaymentSuccess && isCardPaymentSuccess\">\n \n <div *ngIf=\"errorMsg\" class=\"govuk-error-summary pba-payments-error-box--size\" aria-labelledby=\"error-summary-title\" >\n <h2 class=\"govuk-error-summary__title govuk-error-summary__title-custom pba-payments-24-font\" id=\"error-summary-title\">\n There is a problem\n </h2>\n <div class=\"govuk-error-summary__body\">\n <ul class=\"govuk-list govuk-error-summary__list\">\n <li class=\"pba-payments-error-16-font\">\n Your PBA account cannot be found.\n </li>\n <li class=\"pba-payments-error-16-font\">\n If you know your organisation has a PBA, try again.\n </li>\n <li class=\"pba-payments-error-16-font\">\n You can also pay by credit or debit card.\n </li>\n </ul>\n </div>\n </div>\n <!-- <h1 class=\"heading-medium margin-top-10-px\">Pay fee using Payment by Account (PBA)</h1> -->\n <div class=\"govuk-form-group margin-top-10-px\">\n <label class=\"govuk-label pba-payments-govuk__label pba-payments-19-font\">\n Amount to pay \n </label>\n <span class=\"pba-payments-19-font\">{{pbaPayOrderRef.orderTotalFees | currency :'GBP':'symbol':'1.2-2'}}</span>\n </div>\n\n <div class=\"govuk-form-group\" *ngIf=\"!errorMsg\">\n <fieldset class=\"govuk-fieldset\" aria-describedby=\"contact-hint\">\n <div class=\"govuk-radios\" data-module=\"govuk-radios\">\n <div class=\"govuk-radios__item\">\n <input class=\"govuk-radios__input\" id=\"pbaAccount\" name=\"paymentSelection\" type=\"radio\" value=\"PBA\" (click)=\"selectPaymentMethod('PBA')\" data-aria-controls=\"pba-account\">\n <label class=\"govuk-label govuk-radios__label pba-payments-19-font pba-payments-font-bld\" for=\"pbaAccount\">\n Pay fee using Payment by Account (PBA)\n </label>\n </div>\n <div class=\"govuk-radios__conditional\" id=\"conditional-contact\" *ngIf=\"isPbaAccountSelected\">\n <div class=\"govuk-form-group pba-payments-select-box--size\">\n <label class=\"govuk-label pba-payments-govuk__label pba-payments-19-font\" for=\"pbaAccountNumber\">\n Select a PBA \n </label>\n <select class=\"form-control short-input\" id=\"pbaAccountNumber\" (change)=\"selectpbaaccount($event)\">\n <option value=\"\" selected='selected'>Select option</option>\n <option *ngFor=\"let pbaAccount of pbaAccountList;\" value=\"{{pbaAccount}}\">{{pbaAccount}}</option>\n </select>\n </div>\n <div class=\"govuk-form-group\" *ngIf=\"!errorMsg && selectedPbaAccount\">\n <label class=\"govuk-label pba-payments-govuk__label pba-payments-24-font\" for=\"pbaAccountNumber\">\n Enter a reference for your PBA account statements \n </label>\n <div id=\"event-name-hint\" class=\"govuk-hint pba-payments-19-font pba-payment-width\">\n This should be your own unique reference to identify the case. It will appear on your statements.\n </div>\n <input class=\"govuk-input pba-payments-ref-box--size pba-payments-19-font\" id=\"pbaAccountRef\" (change)=\"selectpbaaccount($event)\" name=\"pbaAccountRef\" type=\"text\" aria-describedby=\"pbaAccountRef-hint\">\n </div>\n \n </div>\n <div class=\"govuk-radios__item\">\n <input class=\"govuk-radios__input\" id=\"cardPayment\" name=\"paymentSelection\" type=\"radio\" value=\"card\" (click)=\"selectPaymentMethod('CARD')\" data-aria-controls=\"card-payment\">\n <label class=\"govuk-label govuk-radios__label pba-payments-19-font pba-payments-font-bld\" for=\"cardPayment\">\n Pay by credit or debit card\n </label>\n </div>\n </div>\n </fieldset>\n </div>\n\n <div class=\"govuk-button--group\" *ngIf=\"errorMsg\">\n <button type=\"button\" class=\"button pba-payments-19-font govuk-button--secondary pba-payments-margin-10\" (click)=\"gotoCasetransationPage()\">\n View Service Request\n </button>\n <button type=\"submit\" class=\"button pba-payments-19-font pba-payments-20-margin\" (click)=\"cardPayment()\">\n Pay by card\n </button>\n </div>\n <div class=\"govuk-button--group\" *ngIf=\"!errorMsg\">\n <button type=\"submit\" [disabled]=\"isContinueButtondisabled\" class=\"button pba-payments-19-font pba-payments-20-margin\" (click)=\"saveAndContinue()\">\n <span *ngIf=\"!isPBADropdownSelected\">Continue</span>\n <span *ngIf=\"isPBADropdownSelected\">Confirm payment</span>\n </button>\n </div>\n </div>\n<ng-container *ngIf=\"pbaAccountList?.length <= 0 && !errorMsg && isGetPBAAccountSucceed && isCardPaymentSuccess\">\n <div class=\"govuk-width-container\">\n <main class=\"govuk-main-wrapper govuk-main-wrapper--l\" id=\"main-content\" role=\"main\">\n <div class=\"govuk-grid-row\">\n <div class=\"govuk-warning-text\">\n <span class=\"govuk-warning-text__icon\" aria-hidden=\"true\">!</span>\n <strong class=\"govuk-warning-text__text\">\n <span class=\"govuk-warning-text__assistive\">Warning</span>\n <h2 class=\"warning-heading-m\">You don\u2019t have a registered PBA.</h2>\n </strong>\n </div>\n <div class=\"pba-payments-margin-top-10\">\n <h2 class=\"heading-medium\">Pay by credit or debit card</h2>\n <p class=\"govuk-body pba-payments-19-font\">\n We recommend that you apply to get a new PBA to pay for fees.\n </p>\n <p class=\"govuk-bod ypba-payments-19-font\">\n you can also pay by credit or debit card if you need to pay now\n </p>\n <p class=\"govuk-body\">\n <button type=\"submit\" (click)=\"cardPayment()\" class=\"button pba-payments-19-font pba-payments-20-margin\">\n Pay by card\n </button>\n </p>\n \n </div>\n <div class=\"pba-payments-margin-top-10\">\n <h2 class=\"heading-medium\">Register an existing PBA with MyHMCTS</h2>\n <p class=\"govuk-body pba-payments-19-font\">\n You may find it easier in future to pay by PBA, your organisation administrator will need to \n email <a href=\"mailto: MyHMCTSsupport@justice.gov.uk\">MyHMCTSsupport@justice.gov.uk</a> to ask for your PBA to be registered with your \n MyHMCTS account. You should include your organisation name and PBA number.\n </p>\n <p class=\"govuk-body pba-payments-19-font\">\n It can then take up to 3 days for your account to be updated. You\u2019ll need to start your claim \n again to pay the fee.\n </p>\n </div>\n <div class=\"pba-payments-margin-top-10\">\n <h2 class=\"heading-medium\">Apply to get a new PBA </h2>\n <p class=\"govuk-body pba-payments-19-font\">\n You\u2019ll need to provide details for you and your organisation, including the required credit\n limit for your account.\n </p>\n <p class=\"govuk-body pba-payments-19-font\">\n Once your account has been registered, you\u2019ll need to start your claim again to pay the fee.\n </p>\n <p class=\"govuk-body pba-payments-19-font\">\n Read more information on <a target=\"_blank\" href=\"https://www.gov.uk/guidance/hmcts-payment-by-account-for-online-services\">registering for PBA</a>.\n </p>\n </div>\n </div>\n </main>\n </div>\n</ng-container>\n\n<ng-container *ngIf=\"isInSufficiantFund && isCardPaymentSuccess\">\n <div class=\"govuk-width-container\">\n <main class=\"govuk-main-wrapper govuk-main-wrapper--l\" id=\"main-content\" role=\"main\">\n <div class=\"govuk-grid-row\">\n <div class=\"govuk-error-summary pba-payments-error-box--size\" aria-labelledby=\"error-summary-title\">\n <h2 class=\"govuk-error-summary__title govuk-error-summary__title-custom pba-payments-24-font\" id=\"error-summary-title\">\n There is a problem\n </h2>\n <div class=\"govuk-error-summary__body\">\n <ul class=\"govuk-list govuk-error-summary__list\">\n <li class=\"pba-payments-error-16-font\">\n You don't have enough funds in your PBA account to pay for this fee.\n </li>\n <li class=\"pba-payments-error-16-font\">\n If you have already topped up your PBA account, wait up to 24 hours for the new balance to become available.\n </li>\n </ul>\n </div>\n </div>\n <div class=\"pba-payments-margin-top-10\">\n <h2 class=\"heading-medium\">Should you need any further advice</h2>\n <p class=\"govuk-body pba-payments-19-font\">\n Email <a href=\"mailto:MiddleOffice.DDservices@liberata.com\">MiddleOffice.DDservices@liberata.com</a> or call <a href=\"tel:01633-652-125\">01633 652 125</a> (option 3) to try to fix the issue.\n </p>\n <p class=\"govuk-body pba-payments-19-font\">\n you can also pay by credit or debit card.\n </p>\n <div class=\"govuk-button--group\">\n <button type=\"button\" class=\"button pba-payments-19-font govuk-button--secondary pba-payments-margin-10\" (click)=\"gotoCasetransationPage()\">\n View Service Request\n </button>\n <button type=\"submit\" class=\"button pba-payments-19-font pba-payments-20-margin\" (click)=\"cardPayment()\">\n Pay by card\n </button>\n </div>\n </div>\n </div>\n </main>\n </div>\n</ng-container>\n<ng-container *ngIf=\"isPBAAccountNotExist && isCardPaymentSuccess\">\n <div class=\"govuk-width-container\">\n <main class=\"govuk-main-wrapper govuk-main-wrapper--l\" id=\"main-content\" role=\"main\">\n <div class=\"govuk-grid-row\">\n <div class=\"govuk-error-summary pba-payments-error-box--size\" aria-labelledby=\"error-summary-title\">\n <h2 class=\"govuk-error-summary__title govuk-error-summary__title-custom pba-payments-24-font\" id=\"error-summary-title\">\n There is a problem\n </h2>\n <div class=\"govuk-error-summary__body\">\n <ul class=\"govuk-list govuk-error-summary__list\">\n <li class=\"pba-payments-error-16-font\">\n Your PBA account ({{selectedPbaAccount}}) no longer exists.\n </li>\n </ul>\n </div>\n </div>\n <div class=\"pba-payments-margin-top-10\">\n <h2 class=\"heading-medium\">Should you need any further advice</h2>\n <p class=\"govuk-body pba-payments-19-font govuk-body-width\">\n Email <a href=\"mailto:MiddleOffice.DDservices@liberata.com\">MiddleOffice.DDservices@liberata.com</a> or call <a href=\"tel:01633-652-125\">01633 652 125</a> (option 3) to try to fix the issue.\n </p>\n <p class=\"govuk-body pba-payments-19-font\">\n you can also pay by credit or debit card.\n </p>\n <div class=\"govuk-button--group\">\n <button type=\"button\" class=\"button pba-payments-19-font govuk-button--secondary pba-payments-margin-10\" (click)=\"gotoCasetransationPage()\">\n View Service Request\n </button>\n <button type=\"submit\" class=\"button pba-payments-19-font pba-payments-20-margin\" (click)=\"cardPayment()\">\n Pay by card\n </button>\n </div>\n </div>\n </div>\n </main>\n </div>\n</ng-container>\n<ng-container *ngIf=\"isPBAAccountHold && isCardPaymentSuccess\">\n <div class=\"govuk-width-container\">\n <main class=\"govuk-main-wrapper govuk-main-wrapper--l\" id=\"main-content\" role=\"main\">\n <div class=\"govuk-grid-row\">\n <div class=\"govuk-error-summary pba-payments-error-box--size\" aria-labelledby=\"error-summary-title\">\n <h2 class=\"govuk-error-summary__title govuk-error-summary__title-custom pba-payments-24-font\" id=\"error-summary-title\">\n There is a problem\n </h2>\n <div class=\"govuk-error-summary__body\">\n <ul class=\"govuk-list govuk-error-summary__list\">\n <li class=\"pba-payments-error-16-font\">\n Your PBA account ({{selectedPbaAccount}}) has been put on hold.\n </li>\n </ul>\n </div>\n </div>\n <div class=\"pba-payments-margin-top-10\">\n <h2 class=\"heading-medium\">Should you need any further advice</h2>\n <p class=\"govuk-body pba-payments-19-font govuk-body-width\">\n Email <a href=\"mailto:MiddleOffice.DDservices@liberata.com\">MiddleOffice.DDservices@liberata.com</a> or call <a href=\"tel:01633-652-125\">01633 652 125</a> (option 3) to try to fix the issue.\n </p>\n <p class=\"govuk-body pba-payments-19-font\">\n you can also pay by credit or debit card.\n </p>\n <div class=\"govuk-button--group\">\n <button type=\"button\" class=\"button pba-payments-19-font govuk-button--secondary pba-payments-margin-10\" (click)=\"gotoCasetransationPage()\">\n View Service Request\n </button>\n <button type=\"submit\" class=\"button pba-payments-19-font pba-payments-20-margin\" (click)=\"cardPayment()\">\n Pay by card\n </button>\n </div>\n </div>\n </div>\n </main>\n </div>\n</ng-container>\n<ng-container *ngIf=\"isPBAServerError && isCardPaymentSuccess\">\n <div class=\"govuk-width-container\">\n <main class=\"govuk-main-wrapper govuk-main-wrapper--l\" id=\"main-content\" role=\"main\">\n <div class=\"govuk-grid-row\">\n <div class=\"pba-payments-margin-top-10\">\n <h2 class=\"pba-payments-heading-lg\">Sorry, there is a problem with the service</h2>\n <p class=\"govuk-body pba-payments-19-font\">\n Try again later.\n </p>\n <p class=\"govuk-body pba-payments-19-font\">\n you can also pay by credit or debit card.\n </p>\n <div class=\"govuk-button--group\">\n <button type=\"button\" class=\"button pba-payments-19-font govuk-button--secondary pba-payments-margin-10\" (click)=\"gotoCasetransationPage()\">\n View Service Request\n </button>\n <button type=\"submit\" class=\"button pba-payments-19-font pba-payments-20-margin\" (click)=\"cardPayment()\">\n Pay by card\n </button>\n </div>\n </div>\n </div>\n </main>\n </div>\n</ng-container>\n\n<ng-container *ngIf=\"isPBAAccountPaymentSuccess && isCardPaymentSuccess\">\n <div class=\"govuk-width-container\">\n <main class=\"govuk-main-wrapper govuk-main-wrapper--l\" id=\"main-content\" role=\"main\">\n <div class=\"govuk-grid-row\">\n <div class=\"govuk-panel govuk-panel--confirmation pba-payments--confirmation\">\n <h1 class=\"govuk-panel__title pba-payments--title\">\n Payment successful\n </h1>\n <div class=\"govuk-panel__body pba-payments__body\">\n Your payment reference is <br><strong>{{pbaAccountrPaymentResult.payment_reference}}</strong>\n </div>\n </div>\n <p class=\"govuk-body pba-payments-19-font\">\n <a href=\"javascript:void(0)\" (click)=\"gotoCasetransationPage()\">View service requests</a>\n </p>\n </div>\n </main>\n </div>\n</ng-container>\n\n<ng-container *ngIf=\"!isCardPaymentSuccess\">\n <div class=\"govuk-width-container\">\n <main class=\"govuk-main-wrapper govuk-main-wrapper--l\" id=\"main-content\" role=\"main\">\n <div class=\"govuk-grid-row\">\n <div class=\"pba-payments-margin-top-10\">\n <h2 class=\"pba-payments-heading-lg\">Sorry, there is a problem with the service</h2>\n <p class=\"govuk-body pba-payments-19-font\">\n Try again later.\n </p>\n <!-- <p class=\"govuk-body pba-payments-19-font\">\n you can also <a href=\"javascript:void(0)\" (click)=\"cardPayment()\" >pay by credit or debit card</a>.\n </p> -->\n <p class=\"govuk-body pba-payments-19-font\">\n <a href=\"javascript:void(0)\" (click)=\"gotoCasetransationPage()\">View service requests</a>\n </p>\n </div>\n </div>\n </main>\n </div>\n</ng-container>\n</ng-container>\n\n\n\n",
6786
+ styles: [".pba-payments-govuk__label{font-weight:700;line-height:1.31578947}.pba-payments-19-font{font-size:19px}.pba-payments-font-bld{font-weight:700}.pba-payments-16-font{font-size:16px}.pba-payments-24-font{font-size:24px}.pba-payments-20-margin{margin-bottom:20px}.pba-payments-select-box--size{width:40%}.pba-payments-error-box--size{width:80%}.pba-payments-ref-box--size{width:60%}.pba-payments-error-16-font{font-size:16px;line-height:34px}.pba-payments-margin-10{margin-right:10px}.pba-payments-margin-top-10{margin-top:15px}.pba-payments-heading-lg{font-size:40px;font-weight:700;line-height:72px}.pba-payments--confirmation{background:#00703c!important}.pba-payments__body{font-size:36px!important}.pba-payments--title{font-size:48px!important}.warning-heading-m{font-size:29px;font-weight:700}.pba-payment-width{width:75%}.margin-top-10-px{margin-top:10px}.govuk-error-summary:focus{outline:3px solid #fd0}.govuk-body-width{width:750px}"]
5661
6787
  },] }
5662
6788
  ];
5663
6789
  PbaPaymentComponent.ctorParameters = () => [
@@ -5668,6 +6794,97 @@ PbaPaymentComponent.propDecorators = {
5668
6794
  pbaPayOrderRef: [{ type: Input }]
5669
6795
  };
5670
6796
 
6797
+ class NotificationPreviewRequest {
6798
+ constructor(payment, contactDetails, refund_reason, refund_amount, refund_reference, payment_reference) {
6799
+ if (contactDetails !== undefined && contactDetails !== null) {
6800
+ this.notification_type = contactDetails.notification_type.toUpperCase();
6801
+ }
6802
+ if (payment !== undefined && payment !== null) {
6803
+ this.payment_reference = payment.reference;
6804
+ this.payment_method = payment.method;
6805
+ this.payment_channel = payment.channel;
6806
+ this.service_name = payment.service_name;
6807
+ }
6808
+ else {
6809
+ this.payment_reference = payment_reference;
6810
+ }
6811
+ this.personalisation = {
6812
+ ccd_case_number: (payment !== undefined && payment !== null) ? payment.ccd_case_number : '',
6813
+ refund_reason: refund_reason,
6814
+ refund_amount: refund_amount,
6815
+ refund_reference: refund_reference
6816
+ };
6817
+ if (this.notification_type === "EMAIL") {
6818
+ this.recipient_email_address = contactDetails.email;
6819
+ this.recipient_postal_address = null;
6820
+ }
6821
+ else if (this.notification_type === "LETTER") {
6822
+ this.recipient_postal_address = {
6823
+ address_line: contactDetails.address_line,
6824
+ city: contactDetails.city,
6825
+ county: contactDetails.county,
6826
+ country: contactDetails.country,
6827
+ postal_code: contactDetails.postal_code
6828
+ };
6829
+ this.recipient_email_address = null;
6830
+ }
6831
+ }
6832
+ }
6833
+
6834
+ class NotificationPreviewComponent {
6835
+ constructor(errorHandlerService, notificationService) {
6836
+ this.errorHandlerService = errorHandlerService;
6837
+ this.notificationService = notificationService;
6838
+ this.notificationPreviewEvent = new EventEmitter();
6839
+ this.today = Date.now();
6840
+ this.errorMessage = this.errorHandlerService.getServerErrorMessage(false, false, '');
6841
+ }
6842
+ ngOnInit() {
6843
+ if (this.previewJourney != undefined && this.previewJourney != null && this.previewJourney === 'Notifications sent') {
6844
+ this.notification = this.notificationSent;
6845
+ if (this.notification != undefined && this.notification != null && this.notification.template_type === 'letter') {
6846
+ this.notification.body = this.notification.body.replace(/\r\n/g, '<br/>');
6847
+ }
6848
+ }
6849
+ else {
6850
+ const notficationPreviewRequestBody = new NotificationPreviewRequest(this.payment, this.contactDetails, this.refundReason, this.refundAmount, this.refundReference, this.paymentReference);
6851
+ this.notificationService.getNotificationPreview(notficationPreviewRequestBody).subscribe(res => {
6852
+ this.errorMessage = this.errorHandlerService.getServerErrorMessage(false, false, '');
6853
+ this.notification = JSON.parse(res);
6854
+ if (this.notification != undefined && this.notification != null && this.notification.template_type === 'letter') {
6855
+ this.notification.body = this.notification.body.replace(/\r\n/g, '<br/>');
6856
+ }
6857
+ }, (error) => {
6858
+ this.errorMessage = this.errorHandlerService.getServerErrorMessage(true, false, '');
6859
+ console.log(this.errorMessage);
6860
+ });
6861
+ this.notificationPreviewEvent.emit(this.notification);
6862
+ }
6863
+ }
6864
+ }
6865
+ NotificationPreviewComponent.decorators = [
6866
+ { type: Component, args: [{
6867
+ selector: 'app-notification-preview',
6868
+ template: "<div class=\"govuk-grid-column-full\">\n <table class=\"govuk-table\">\n <tbody class=\"govuk-table__body\">\n <ng-container *ngIf=\"notification?.template_type === 'email'\">\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__cell whitespace-inherit\"><span class=\"govuk-!-font-weight-bold\">From:</span>\n {{notification?.from?.from_email_address}}</td>\n </tr>\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__cell whitespace-inherit\"><span class=\"govuk-!-font-weight-bold\">To:</span>\n {{notification?.recipient_contact?.recipient_email_address}}</td>\n </tr>\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__cell whitespace-inherit\"><span class=\"govuk-!-font-weight-bold\">Subject:</span>\n {{notification?.subject}}</td>\n </tr>\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__cell whitespace-inherit\">\n <div [innerHTML]=\"notification?.html\"></div>\n </td>\n </tr>\n </ng-container>\n <ng-container *ngIf=\"notification?.template_type === 'letter'\">\n <tr class=\"govuk-table__row\">\n <td class=\"letter-row-border\">\n <ng-container *ngIf=\"notification?.recipient_contact?.recipient_mail_address?.address_line\">\n {{notification?.recipient_contact?.recipient_mail_address?.address_line}}<br /></ng-container>\n <ng-container *ngIf=\"notification?.recipient_contact?.recipient_mail_address?.city\">\n {{notification?.recipient_contact?.recipient_mail_address?.city}}<br /></ng-container>\n <ng-container *ngIf=\"notification?.recipient_contact?.recipient_mail_address?.county\">\n {{notification?.recipient_contact?.recipient_mail_address?.county}}<br /></ng-container>\n <ng-container *ngIf=\"notification?.recipient_contact?.recipient_mail_address?.country\">\n {{notification?.recipient_contact?.recipient_mail_address?.country}}<br /></ng-container>\n {{notification?.recipient_contact?.recipient_mail_address?.postal_code}}\n </td>\n </tr>\n <tr class=\"govuk-table__row\">\n <td class=\"letter-row-border\">{{ today | date:'d MMMM y' }}</td>\n </tr>\n <tr class=\"govuk-table__row\">\n <td class=\"letter-row-border\"><span class=\"govuk-!-font-weight-bold\">{{notification?.subject}}</span></td>\n </tr>\n <tr class=\"govuk-table__row\">\n <td class=\"govuk-table__cell whitespace-inherit\">\n <div [innerHTML]=\"notification?.body\"></div>\n </td>\n </tr>\n </ng-container>\n \n </tbody>\n </table>\n</div>\n",
6869
+ styles: [".right{float:right}.letter-row-border{border-bottom:none}"]
6870
+ },] }
6871
+ ];
6872
+ NotificationPreviewComponent.ctorParameters = () => [
6873
+ { type: ErrorHandlerService },
6874
+ { type: NotificationService }
6875
+ ];
6876
+ NotificationPreviewComponent.propDecorators = {
6877
+ payment: [{ type: Input }],
6878
+ contactDetails: [{ type: Input }],
6879
+ refundReason: [{ type: Input }],
6880
+ refundAmount: [{ type: Input }],
6881
+ paymentReference: [{ type: Input }],
6882
+ refundReference: [{ type: Input }],
6883
+ previewJourney: [{ type: Input }],
6884
+ notificationSent: [{ type: Input }],
6885
+ notificationPreviewEvent: [{ type: Output }]
6886
+ };
6887
+
5671
6888
  class PaymentLibModule {
5672
6889
  }
5673
6890
  PaymentLibModule.decorators = [
@@ -5688,6 +6905,7 @@ PaymentLibModule.decorators = [
5688
6905
  PaymentListComponent,
5689
6906
  PaymentViewComponent,
5690
6907
  PbaPaymentComponent,
6908
+ ContactDetailsComponent,
5691
6909
  ProcessRefundComponent,
5692
6910
  RefundListComponent,
5693
6911
  CardDetailsComponent,
@@ -5710,7 +6928,8 @@ PaymentLibModule.decorators = [
5710
6928
  ErrorBannerComponent,
5711
6929
  TableComponent,
5712
6930
  RefundStatusComponent,
5713
- ServiceRequestComponent
6931
+ ServiceRequestComponent,
6932
+ NotificationPreviewComponent
5714
6933
  ],
5715
6934
  exports: [PaymentLibComponent],
5716
6935
  providers: [
@@ -5729,5 +6948,5 @@ PaymentLibModule.decorators = [
5729
6948
  * Generated bundle index. Do not edit.
5730
6949
  */
5731
6950
 
5732
- export { PaymentLibComponent, PaymentLibModule, PaymentLibService, OrderslistService as ɵa, PaymentListComponent as ɵb, FeeSummaryComponent as ɵba, AddRemissionComponent as ɵbb, CcdHyphensPipe as ɵbc, CapitalizePipe as ɵbd, keyValuePipe as ɵbe, SanitizeHtmlPipe as ɵbf, ReportsComponent as ɵbg, XlFileService as ɵbh, ErrorBannerComponent as ɵbi, TableComponent as ɵbj, RefundStatusComponent as ɵbk, ServiceRequestComponent as ɵbl, ConsoleLoggerService as ɵbm, PaymentListService as ɵc, LoggerService as ɵd, ErrorHandlerService as ɵe, PaymentViewComponent as ɵf, PaymentViewService as ɵg, WebComponentHttpClient as ɵh, PbaPaymentComponent as ɵi, ProcessRefundComponent as ɵj, RefundsService as ɵk, RefundListComponent as ɵl, CardDetailsComponent as ɵm, CardDetailsService as ɵn, PageNotFoundComponent as ɵo, StatusHistoryComponent as ɵp, StatusHistoryService as ɵq, MarkUnidentifiedPaymentComponent as ɵr, BulkScaningPaymentService as ɵs, MarkUnsolicitedPaymentComponent as ɵt, UnprocessedPaymentsComponent as ɵu, ProcessedPaymentsComponent as ɵv, AllocatePaymentsComponent as ɵw, CaseTransactionsService as ɵx, PbaDetailsComponent as ɵy, CaseTransactionsComponent as ɵz };
6951
+ export { PaymentLibComponent, PaymentLibModule, PaymentLibService, OrderslistService as ɵa, PaymentListComponent as ɵb, PbaDetailsComponent as ɵba, CaseTransactionsComponent as ɵbb, FeeSummaryComponent as ɵbc, AddRemissionComponent as ɵbd, CcdHyphensPipe as ɵbe, CapitalizePipe as ɵbf, keyValuePipe as ɵbg, SanitizeHtmlPipe as ɵbh, ReportsComponent as ɵbi, XlFileService as ɵbj, ErrorBannerComponent as ɵbk, TableComponent as ɵbl, RefundStatusComponent as ɵbm, ServiceRequestComponent as ɵbn, NotificationPreviewComponent as ɵbo, ConsoleLoggerService as ɵbp, PaymentListService as ɵc, LoggerService as ɵd, ErrorHandlerService as ɵe, PaymentViewComponent as ɵf, PaymentViewService as ɵg, WebComponentHttpClient as ɵh, NotificationService as ɵi, PbaPaymentComponent as ɵj, ContactDetailsComponent as ɵk, ProcessRefundComponent as ɵl, RefundsService as ɵm, RefundListComponent as ɵn, CardDetailsComponent as ɵo, CardDetailsService as ɵp, PageNotFoundComponent as ɵq, StatusHistoryComponent as ɵr, StatusHistoryService as ɵs, MarkUnidentifiedPaymentComponent as ɵt, BulkScaningPaymentService as ɵu, MarkUnsolicitedPaymentComponent as ɵv, UnprocessedPaymentsComponent as ɵw, ProcessedPaymentsComponent as ɵx, AllocatePaymentsComponent as ɵy, CaseTransactionsService as ɵz };
5733
6952
  //# sourceMappingURL=hmcts-ccpay-web-component.js.map