@hmcts/ccpay-web-component 5.2.7-beta02 → 5.2.7-beta03

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 (117) hide show
  1. package/bundles/hmcts-ccpay-web-component.umd.js +1743 -511
  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/case-transactions/case-transactions.component.js +25 -14
  8. package/esm2015/lib/components/contact-details/contact-details.component.js +315 -0
  9. package/esm2015/lib/components/fee-summary/fee-summary.component.js +14 -9
  10. package/esm2015/lib/components/notification-preview/notification-preview.component.js +59 -0
  11. package/esm2015/lib/components/payment-view/payment-view.component.js +133 -75
  12. package/esm2015/lib/components/pba-payment/pba-payment.component.js +2 -1
  13. package/esm2015/lib/components/process-refund/process-refund.component.js +146 -41
  14. package/esm2015/lib/components/refund-list/refund-list.component.js +3 -3
  15. package/esm2015/lib/components/refund-status/refund-status.component.js +174 -38
  16. package/esm2015/lib/components/reports/reports.component.js +4 -1
  17. package/esm2015/lib/components/service-request/service-request.component.js +160 -102
  18. package/esm2015/lib/components/table/table.component.js +7 -4
  19. package/esm2015/lib/components/unprocessed-payments/unprocessed-payments.component.js +3 -3
  20. package/esm2015/lib/interfaces/IFee.js +1 -1
  21. package/esm2015/lib/interfaces/INotificationPreview.js +2 -0
  22. package/esm2015/lib/interfaces/IPayment.js +1 -1
  23. package/esm2015/lib/interfaces/IPutNotificationRequest.js +11 -0
  24. package/esm2015/lib/interfaces/IRefundContactDetails.js +2 -0
  25. package/esm2015/lib/interfaces/IRefundFee.js +2 -0
  26. package/esm2015/lib/interfaces/IRefundList.js +1 -1
  27. package/esm2015/lib/interfaces/IRefundsNotifications.js +2 -0
  28. package/esm2015/lib/interfaces/IRemission.js +1 -1
  29. package/esm2015/lib/interfaces/IResubmitRefundRequest.js +4 -2
  30. package/esm2015/lib/interfaces/NotificationPreviewRequest.js +37 -0
  31. package/esm2015/lib/interfaces/PostIssueRefundRetroRemission.js +3 -2
  32. package/esm2015/lib/interfaces/PostRefundRetroRemission.js +6 -2
  33. package/esm2015/lib/payment-lib.component.js +8 -2
  34. package/esm2015/lib/payment-lib.module.js +6 -2
  35. package/esm2015/lib/payment-lib.service.js +7 -1
  36. package/esm2015/lib/services/notification/notification.service.js +70 -0
  37. package/esm2015/lib/services/payment-view/payment-view.service.js +15 -7
  38. package/esm2015/lib/services/refunds/refunds.service.js +4 -1
  39. package/esm2015/lib/services/shared/httpclient/webcomponent.http.client.js +1 -1
  40. package/esm2015/lib/services/xl-file/xl-file.service.js +15 -15
  41. package/fesm2015/hmcts-ccpay-web-component.js +1689 -456
  42. package/fesm2015/hmcts-ccpay-web-component.js.map +1 -1
  43. package/hmcts-ccpay-web-component.d.ts +34 -31
  44. package/hmcts-ccpay-web-component.d.ts.map +1 -1
  45. package/hmcts-ccpay-web-component.metadata.json +1 -1
  46. package/lib/components/add-remission/add-remission.component.d.ts +55 -4
  47. package/lib/components/add-remission/add-remission.component.d.ts.map +1 -1
  48. package/lib/components/case-transactions/case-transactions.component.d.ts +2 -1
  49. package/lib/components/case-transactions/case-transactions.component.d.ts.map +1 -1
  50. package/lib/components/contact-details/contact-details.component.css.shim.ngstyle.d.ts.map +1 -0
  51. package/lib/components/contact-details/contact-details.component.d.ts +50 -0
  52. package/lib/components/contact-details/contact-details.component.d.ts.map +1 -0
  53. package/lib/components/contact-details/contact-details.component.ngfactory.d.ts.map +1 -0
  54. package/lib/components/fee-summary/fee-summary.component.d.ts.map +1 -1
  55. package/lib/components/notification-preview/notification-preview.component.d.ts +32 -0
  56. package/lib/components/notification-preview/notification-preview.component.d.ts.map +1 -0
  57. package/lib/components/notification-preview/notification-preview.component.ngfactory.d.ts.map +1 -0
  58. package/lib/components/notification-preview/notification-preview.component.scss.shim.ngstyle.d.ts.map +1 -0
  59. package/lib/components/payment-view/payment-view.component.d.ts +31 -7
  60. package/lib/components/payment-view/payment-view.component.d.ts.map +1 -1
  61. package/lib/components/payment-view/payment-view.component.scss.shim.ngstyle.d.ts.map +1 -0
  62. package/lib/components/pba-payment/pba-payment.component.d.ts.map +1 -1
  63. package/lib/components/process-refund/process-refund.component.d.ts +18 -1
  64. package/lib/components/process-refund/process-refund.component.d.ts.map +1 -1
  65. package/lib/components/refund-list/refund-list.component.d.ts.map +1 -1
  66. package/lib/components/refund-status/refund-status.component.d.ts +45 -7
  67. package/lib/components/refund-status/refund-status.component.d.ts.map +1 -1
  68. package/lib/components/reports/reports.component.d.ts.map +1 -1
  69. package/lib/components/service-request/service-request.component.d.ts +35 -9
  70. package/lib/components/service-request/service-request.component.d.ts.map +1 -1
  71. package/lib/components/service-request/service-request.component.scss.shim.ngstyle.d.ts.map +1 -0
  72. package/lib/components/table/table.component.d.ts +1 -0
  73. package/lib/components/table/table.component.d.ts.map +1 -1
  74. package/lib/interfaces/IFee.d.ts +6 -0
  75. package/lib/interfaces/IFee.d.ts.map +1 -1
  76. package/lib/interfaces/INotificationPreview.d.ts +28 -0
  77. package/lib/interfaces/INotificationPreview.d.ts.map +1 -0
  78. package/lib/interfaces/IPayment.d.ts +3 -0
  79. package/lib/interfaces/IPayment.d.ts.map +1 -1
  80. package/lib/interfaces/IPutNotificationRequest.d.ts +7 -0
  81. package/lib/interfaces/IPutNotificationRequest.d.ts.map +1 -0
  82. package/lib/interfaces/IRefundContactDetails.d.ts +10 -0
  83. package/lib/interfaces/IRefundContactDetails.d.ts.map +1 -0
  84. package/lib/interfaces/IRefundFee.d.ts +8 -0
  85. package/lib/interfaces/IRefundFee.d.ts.map +1 -0
  86. package/lib/interfaces/IRefundList.d.ts +5 -0
  87. package/lib/interfaces/IRefundList.d.ts.map +1 -1
  88. package/lib/interfaces/IRefundsNotifications.d.ts +17 -0
  89. package/lib/interfaces/IRefundsNotifications.d.ts.map +1 -0
  90. package/lib/interfaces/IRemission.d.ts +3 -0
  91. package/lib/interfaces/IRemission.d.ts.map +1 -1
  92. package/lib/interfaces/IResubmitRefundRequest.d.ts +5 -1
  93. package/lib/interfaces/IResubmitRefundRequest.d.ts.map +1 -1
  94. package/lib/interfaces/NotificationPreviewRequest.d.ts +25 -0
  95. package/lib/interfaces/NotificationPreviewRequest.d.ts.map +1 -0
  96. package/lib/interfaces/PostIssueRefundRetroRemission.d.ts +3 -1
  97. package/lib/interfaces/PostIssueRefundRetroRemission.d.ts.map +1 -1
  98. package/lib/interfaces/PostRefundRetroRemission.d.ts +7 -1
  99. package/lib/interfaces/PostRefundRetroRemission.d.ts.map +1 -1
  100. package/lib/payment-lib.component.d.ts +2 -0
  101. package/lib/payment-lib.component.d.ts.map +1 -1
  102. package/lib/payment-lib.module.d.ts.map +1 -1
  103. package/lib/payment-lib.module.ngfactory.d.ts.map +1 -1
  104. package/lib/payment-lib.service.d.ts +3 -0
  105. package/lib/payment-lib.service.d.ts.map +1 -1
  106. package/lib/services/notification/notification.service.d.ts +19 -0
  107. package/lib/services/notification/notification.service.d.ts.map +1 -0
  108. package/lib/services/notification/notification.service.ngfactory.d.ts.map +1 -0
  109. package/lib/services/payment-view/payment-view.service.d.ts +1 -1
  110. package/lib/services/payment-view/payment-view.service.d.ts.map +1 -1
  111. package/lib/services/refunds/refunds.service.d.ts +2 -0
  112. package/lib/services/refunds/refunds.service.d.ts.map +1 -1
  113. package/lib/services/shared/httpclient/webcomponent.http.client.d.ts.map +1 -1
  114. package/lib/services/xl-file/xl-file.service.d.ts.map +1 -1
  115. package/package.json +1 -1
  116. package/lib/components/payment-view/payment-view.component.css.shim.ngstyle.d.ts.map +0 -1
  117. package/lib/components/service-request/service-request.component.css.shim.ngstyle.d.ts.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"names":["PaymentLibService","prototype","setApiRootUrl","apiRoot","this","API_ROOT","getApiRootUrl","setBulkScanApiRootUrl","bulkscanapiRoot","BULKSCAN_API_ROOT","getBulkScanApiRootUrl","setRefundndsApiRootUrl","refundsapiRoot","REFUNDS_API_ROOT","getRefundsApiRootUrl","setCardPaymentReturnUrl","cardPaymentReturnUrl","CARDPAYMENTRETURNURL","getCardPaymentReturnUrl","type","Injectable","args","providedIn","OrderslistService","ordersList","BehaviorSubject","refundView","caseType","getcaseType","asObservable","feeExists","getFeeExist","ccdCaseNumber","getCCDCaseNumberforRefund","isFromServiceRequestPage","getisFromServiceRequestPage","OrderRefId","getOrderRefId","navigationPage","getnavigationPage","orderRef","getorderRef","orderCCDEvent","getorderCCDEvent","orderCreated","getorderCreated","orderParty","getorderParty","orderRemissionTotal","getorderRemissionTotal","orderFeesTotal","getorderFeesTotal","orderTotalPayments","getorderTotalPayments","rolesList","orderDetail","paymentPageView","setOrdersList","orderLevelFees","next","Object","assign","getOrdersList","setRefundView","refundList","getRefundView","setCaseType","getCaseType","setCCDCaseNumber","getCCDCaseNumber","setFeeExists","getFeeExists","setisFromServiceRequestPage","getisFromServiceRequestPages","setOrderRefId","getSelectedOrderRefId","setnavigationPage","getnavigationPageValue","setpaymentPageView","paymentpageList","getpaymentPageView","setUserRolesList","getUserRolesList","setorderDetail","getorderDetail","setOrderRef","getorderRefs","setorderCCDEvent","getorderCCDEvents","setorderCreated","getorderCreateds","setorderParty","getorderPartys","setorderRemissionTotal","getorderRemissionTotals","setorderFeesTotal","getorderFeesTotals","setorderTotalPayments","getoorderTotalPaymentss","PaymentLibComponent","paymentLibService","cd","unProcessedPaymentServiceId","unProcessedPayment","orderPendingPayments","ngAfterContentChecked","detectChanges","ngOnInit","LOGGEDINUSERROLES","length","PAYMENT_GROUP_REF","paymentGroupReference","DCN_NUMBER","bspaymentdcn","REFUNDLIST","VIEW","viewName","isTakePayment","TAKEPAYMENT","Component","selector","template","ChangeDetectorRef","Input","CCD_CASE_NUMBER","EXC_REFERENCE","PAYMENT_METHOD","VIEWSERVICE","SERVICEREQUEST","SELECTED_OPTION","ISBSENABLE","ISSFENABLE","ISTURNOFF","CASETYPE","ISPAYMENTSTATUSENABLED","rootUrl","USERID","LOGGEDINUSEREMAIL","ErrorHandlerService","handleError","err","errorMessage","error","Error","message","status","undefined","JSON","parse","statusCode","messsage","stringify","throwError","getServerErrorMessage","isErrorExist","isDataNotExist","title","body","showError","LoggerService","invokeConsoleMethod","PaymentListService","http","logger","errorHandlerService","getPaymentByCcdCaseNumber","paymentMethod","info","get","withCredentials","pipe","catchError","HttpClient","PaymentListComponent","paymentListService","paymentLibComponent","_this","subscribe","payments","loadPaymentViewComponent","paymentReference","create","__values","o","s","Symbol","iterator","m","i","call","value","done","TypeError","WebComponentHttpClient","meta","post","url","options","opts","addHeaders","put","delete","patch","csrfToken","getTag","headers","forEach","element","document","cookie","split","find","row","startsWith","content","HttpHeaders","responseType","Meta","PaymentViewService","https","getPaymentDetails","getPaymentGroupDetails","getApportionPaymentDetails","getPBAaccountDetails","postWays2PayCardPayment","serviceRef","rurl","replace","postPBAaccountPayment","randomKey","Math","random","toString","join","setTimeout","console","log","postBSPayments","postBSUnidentifiedPayments","postBSUnsolicitedPayments","postBSAllocationPayments","postPaymentGroupWithRemissions","feeId","deleteFeeFromPaymentGroup","postPaymentToPayHub","paymentGroupRef","postPaymentAntennaToPayHub","downloadSelectedReport","reportName","startDate","endDate","downloadFailureReport","getBSfeature","getSiteID","getPartyDetails","caseNumber","postRefundsReason","postPaymentGroupWithRetroRemissions","postRefundRetroRemission","getPaymentFailure","PaymentViewComponent","paymentViewService","isRefundRemission","isAddFeeBtnEnabled","isIssueRefunfBtnEnable","allowedRolesToAccessRefund","remissions","allPaymentsFailure","check4AllowedRoles2AccessRefund","some","role","indexOf","allowFurtherAccessAfter4Days","payment","tmp4DayAgo","Date","setDate","getDate","date_created","selectedOption","dcnNumber","isTurnOff","serviceReference","viewStatus","paymentGroup","fees","fee","isRemissionsMatch","rem","fee_code","code","push","filter","paymentGroupObj","includes","paymentAllocation","payment_allocation","isStatusAllocated","allocation_status","res","payment_failure_list","reverse","payment_failure_initiated","payment_failure_closed","e","errorMsg","defineProperty","method","channel","goToPaymentList","goToServiceRequestPage","window","location","reload","goToCaseTransationPage","event","preventDefault","data","resetOrderData","addRemission","chkForAddRemission","reference","isFromPaymentDetailPage","checkForFees","addRefundForRemission","remission","chkIsRefundRemissionBtnEnable","remissionFeeAmt","net_amount","toLocaleLowerCase","isRefundRemissionBtnEnable","issueRefund","paymentgrp","chkIssueRefundBtnEnable","getRemissionByFeeCode","feeCode","remissions_1","remissions_1_1","chkForPBAPayment","_b","_c","goToPaymentFailuePage","selectedPaymentsStatus","goBackToPaymentView","isServiceRequest","RefundsService","getRefundReasons","getRefundRejectReasons","getRefundActions","refundReference","patchRefundActions","reviewerAction","getRefundList","refundstatus","selfexclusive","getRefundStatusHistory","getRefundStatusList","getUserDetails","postIssueRefund","patchResubmitRefund","refund_reference","ProcessRefundComponent","formBuilder","router","activeRoute","getErrorMessage","sendmeback","refundActionList","refundRejectReasonList","isSendMeBackClicked","isRejectClicked","isOtherClicked","isSuccesspageEnable","refundActionsHasError","refundRejectReasonHasError","isReasonFieldEmpty","isReasonFieldInvalid","reasonFieldMinHasError","reasonFieldMaxHasError","isReasonEmpty","isReasonInvalid","successMsg","isConfirmButtondisabled","processRefundForm","group","refundActionField","FormControl","Validators","compose","required","refundRejectReasonField","sendMeBackField","minLength","maxLength","pattern","enterReasonField","refundlistsource","ccd_case_number","isFromRefundListPage","checkRefundActions","processRefundSubmit","processRefundRequest","resetForm","controls","processFormError","errors","dirty","valid","reason","response","invalid","minlength","actualLength","maxlength","bodyTxt","loadRefundListPage","navigationpage","isRefundStatusView","loadRefundsHomePage","redirecttoRefundListPage","vals","field","goToCaseReview","navigate","relativeTo","FormBuilder","Router","ActivatedRoute","RefundListComponent","refundService","submittedRefundList","rejectedRefundList","approvalStatus","rejectStatus","isAuthorized","userLst","isApproveTableVisible","tableApprovalHeader","tableRejectedHeader","isRejectTableVisible","CardDetailsService","getCardDetails","CardDetailsComponent","cardDetailsService","pageTitle","cardDetails","PageNotFoundComponent","StatusHistoryService","getPaymentStatusesByReference","StatusHistoryComponent","statusHistoryService","statuses","PbaDetailsComponent","noop","ConsoleLoggerService","apply","CaseTransactionsService","getPaymentGroups","BulkScaningPaymentService","getBSPaymentsByCCD","getBSPaymentsByDCN","dcn","postBSAllocatePayment","paymentRef","postBSPaymentStrategic","postBSWoPGStrategic","patchBSChangeStatus","calculateOutStandingAmount","feesTotal","paymentsTotal","remissionsTotal","calculated_amount","toUpperCase","amount","hwf_amount","removeUnwantedString","input","replaceText","CaseTransactionsComponent","bulkScaningPaymentService","caseTransactionsService","paymentGroups","nonPayments","allPayments","totalPayments","totalRemissions","isExceptionRecord","isUnprocessedRecordSelected","isAnyFeeGroupAvilable","isHistoricGroupAvailable","isRemoveBtnDisabled","clAmountDue","isFeeRecordsExist","isGrpOutstandingAmtPositive","isAddRemissionEnable","orderRemissionDetails","ispaymentGroupApisuccess","cpoDetails","isPBA","isAddRemissionBtnEnabled","isEligible4PBAPayment","currentDate","check4AllowedRoles2AccessPBApayment","paymentView","payment_group_reference","goToPayementView","excReference","takePayment","serviceRequest","serviceRequestValue","isBulkScanEnable","isStrategicFixEnable","calculateAmounts","calculateOrderFeesAmounts","totalRefundAmount","calculateRefundAmount","setDefaults","isCPODown","goToOrderViewDetailSection","checkForExceptionRecord","totalNonOffPayments","totalFees","getAllocationStatus","recordData","exception_record_reference","ccd_reference","case_reference","resetOrderVariables","service_request_status","orderStatus","orderAddBtnEnable","orderRefId","orderTotalFees","orderReferenceObj","x","redirectToOrderFeeSearchPage","orderef","nonOffLinePayment","a","amount_due","b","allocationLen","remisison","totalRefundAmount_1","isFeeAmountZero_1","grpOutstandingAmount","isNewPaymentGroup_1","index","getGroupOutstandingAmount","redirectToFeeSearchPage","navigateByUrl","redirectToremissionPage","redirectToReportsPage","loadFeeSummaryPage","goToPaymentViewComponent","selectedUnprocessedFeeEvent","unprocessedRecordId","getUnprocessedFeeCount","unProcessedRecordCount","unprocessedRecordCount","calculateAmountDue","confirmRemoveFee","cancelRemoval","removeFee","success","isCheckAmountdueExist","amountDue","loadPBAAccountPage","pbaPayOrderRef","PaymentToPayhubRequest","currency","description","provider","toFixed","case_type","PayhubAntennaRequest","BS_ENABLE_FLAG","FeeSummaryComponent","service","platForm","isBackButtonEnable","isFeeAmountZero","totalAfterRemission","isConfirmationBtnDisabled","isPaymentExist","isRemissionsExist","bsPaymentDcnNumber","features","result","feature","uid","enable","getUnassignedPaymentlist","getPaymentGroup","unassignedPayments","responsible_service_id","upPaymentErrorMessage","currentFee","outStandingAmount","loadCaseTransactionPage","partUrl","cancelRemission","page","antennaReqBody","href","goToAllocatePage","Location","ErrorBannerComponent","UnidentifiedPaymentsRequest","payment_reference","unidentified_reason","payment_allocation_status","name","AllocatePaymentRequest","unAllocatedPayment","exceptionRecord","allocatedRequest","banked_date","date_banked","exception_record","document_control_number","dcn_reference","external_provider","giro_slip_no","bgc_reference","payer_name","payment_channel","payment_status","payment_method","payment_allocation_dto","MarkUnidentifiedPaymentComponent","isInvesticationDetailEmpty","investicationDetailHasError","investicationDetailMinHasError","investicationDetailMaxHasError","siteID","ccdReference","exceptionReference","getUnassignedPayment","markPaymentUnidentifiedForm","investicationDetail","unassignedRecord","beCcdNumber","beExceptionNumber","trimUnderscore","saveAndContinue","investicationField","formerror","investigationComment","val","confirmPayments","res1","requestBody","res2","response2","reqBody","res3","gotoCasetransationPage","user_id","postStrategicBody","cancelMarkUnidentifiedPayments","UnsolicitedPaymentsRequest","responsible_office","responsible_person","email_id","receiving_office","receiving_email_address","sending_email_address","MarkUnsolicitedPaymentComponent","reasonHasError","reasonMinHasError","reasonMaxHasError","responsibleOfficeHasError","isResponsibleOfficeEmpty","isContinueButtondisabled","siteids","siteIDList","scrollTo","markPaymentUnsolicitedForm","responsibleOffice","responsiblePerson","emailId","selectedSiteId","reasonField","officeIdField","cancelMarkUnsolicitedPayments","checkingFormValue","setValue","formFields","valueExists","hasOwnProperty","selectchange","target","selectedSiteName","selectedIndex","text","UnprocessedPaymentsComponent","EventEmitter","recordId","isRecordExist","isAllocateToExistingFeebtnEnabled","isMarkAsUnidentifiedbtnEnabled","isAllocatedToNewFeebtnEnabled","isExceptionCase","serviceId","unassignedRecordListLength","isStFixEnable","FEE_RECORDS_EXISTS","setValuesForUnassignedRecord","emit","unassignedRecordList","unprocessedPaymentSelectEvent","formatUnassignedRecordId","ID","loadUnsolicitedPage","selectedRecordReference","validateButtons","resetButtons","PAYMENTREF","IS_OS_AMT_AVAILABLE","unprocessedPaymentUnSelectEvent","showDetailRow","obj","unassignedRecordSelectedList","IS_BUTTON_ENABLE","PAYMENTSLENGTH","LEVEL","Output","ProcessedPaymentsComponent","redirectToPaymentViewPage","NONPAYMENTS","IAllocationPaymentsRequest","explanation","userName","user_name","AllocatePaymentsComponent","isMoreDetailsBoxHide","otherPaymentExplanation","paymentReasonHasError","paymentExplanationHasError","isPaymentDetailsEmpty","isPaymentDetailsInvalid","paymentDetailsMinHasError","paymentDetailsMaxHasError","isUserNameEmpty","isUserNameInvalid","paymentReason","paymentExplanation","cookieUserName","userNameField","reasonList","overPayment","hwfReward","wrongFee","notIssueCase","otherDeduction","shortFall","helpWithFee","other","explanationList","referRefund","noRefund","noCase","holdCase","heldCase","refund","duplicate","humanerror","caseWithdrawn","overUnderPaymentForm","moreDetails","fstCon","scndCn","selectedPaymentGroup","gotoSummaryPage","cancelAllocatePayment","confirmAllocatePayement","enCookieUserName","decodeURIComponent","fullName","paymentDetailsField","paymentFormError","isEmptyCondtion","isOtherOptionSelected","isRemainingAmountGtZero","isRemainingAmountLtZero","finalServiceCall","reset","GroupOutstandingAmount","remainingToBeAssigned","paymentSectionLabel","feedbackUrlLabel","remainingAmount","afterFeeAllocateOutstanding","amountForAllocation","selectRadioButton","key","OrderListSelectEvent","AddRemissionRequest","hwf_reference","AddRetroRemissionRequest","PostRefundRetroRemission","refund_reason","PostIssueRefundRetroRemission","remissionReference","AddRemissionComponent","refundListReason","refundListAmount","hasErrors","option","selectedValue","retroRemission","isRemissionCodeEmpty","remissionCodeHasError","isAmountEmpty","amountHasError","isRemissionLessThanFeeError","refundHasError","isPaymentSuccess","isRemissionApplied","commonRefundReasons","default","pattern1","pattern2","viewCompStatus","volume","remessionPayment","remissionForm","remissionCode","refundReason","refundDDReason","onlySelf","refundReasons","recently_used","sort","localeCompare","resetRemissionForm","remissionctrls","isRemissionLessThanFee","setErrors","confirmRemission","newNetAmount","remissionAmount","trim","id","LDUrl","routeReuseStrategy","shouldReuseRoute","onSameUrlNavigation","addRemissionCode","gotoAddRetroRemissionCodePage","iscancelClicked","isFromRefundStatusPage","selectedRefundReason","gotoCheckRetroRemissionPage","gotoProcessRetroRemissionPage","confirmRetroRemission","remissionamt","remission_reference","processRefund","refundAmount","refund_amount","gotoIssueRefundConfirmation","displayRefundReason","gotoIssueRefundPage","changeIssueRefundReason","confirmIssueRefund","confirmRetroRefund","localStorage","setItem","isRefundReasonsSelected","showReasonText","reasonLength","gotoServiceRequestPage","sendOrderDetail","sendOrderRef","gotoCasetransationPageCancelBtnClicked","getFormattedCurrency","concat","CcdHyphensPipe","transform","match","Pipe","CapitalizePipe","slice","keyValuePipe","keys","SanitizeHtmlPipe","sanitizer","bypassSecurityTrustHtml","DomSanitizer","XlFileService","exportAsExcelFile","json","excelFileName","worksheet","workbook","XLSX","utils","json_to_sheet","header","setDataLossReportHeaders","autoFitColumns","setUnprocessedReportHeaders","setProcessedUnallocatedReportHeaders","setPaymentFailureReportHeaders","setShortFallReportHeaders","Sheets","SheetNames","excelBuffer","write","bookType","saveAsExcelFile","objectMaxLength","ColWidth","values","j","width","A1","v","B1","C1","D1","E1","F1","G1","H1","I1","J1","K1","L1","M1","N1","buffer","fileName","Blob","FileSaver","saveAs","ReportsComponent","xlFileService","fmt","loc","isDownLoadButtondisabled","isStartDateLesthanEndDate","isDateBetwnMonth","isDateRangeBetnWeek","fromValidation","getToday","toISOString","getSelectedFromDate","validateDates","reportsForm","selectedStartDate","tranformDate","selectedEndDate","isDateRangeMoreThanWeek","isDateRangeMoreThanMonth","selectedreport","downloadReport","dataLossRptDefault","loss_resp","payment_asset_dcn","env_ref","env_item","resp_service_id","resp_service_name","bgc_batch","unProcessedRptDefault","exception_ref","ccd_ref","processedUnallocated","allocation_reason","ccd_exception_ref","ccd_case_ref","updated_by","shortFallsRptDefault","surplus_shortfall","balance","payment_amount","ccd_case_reference","ccd_exception_reference","processed_date","selectedReportName","applyDateFormat","substr","convertToFloatValue","Op","getFileName","toLowerCase","errorContent","stDt","formatDate","enDt","now","timestamp","getTwodigit","getHours","getMinutes","getSeconds","getCamelCaseString","strDate","parts","map","multiDateFormater","dateStr","date","amt","Number","parseFloat","TableComponent","cdRef","displayedColumns","STATUS","isApprovalFlow","DATASOURCE","dataSource","MatTableDataSource","actualcount","reduce","r","_a","user_full_name","ngAfterViewInit","paginator","applyFilter","filterValue","goToRefundProcessComponent","refundData","goToRefundViewComponent","isCallFromRefundList","ViewChild","MatPaginator","MatSort","IResubmitRefundRequest","RefundStatusComponent","refundButtonState","isRefundBtnDisabled","isFromPayBubble","isLastUpdatedByCurrentUser","isProcessRefund","refundlist","isEliginbleToAccess","refundStatusForm","getRefundsStatusHistoryList","refund_status","statusHistoryList","refundStatusHistories","status_history_dto_list","last_updated_by_current_user","goToRefundView","gotoReviewDetailsPage","gotoReviewAndReSubmitPage","oldRefundReason","changedAmount","refundreason","notes","gotoRefundReasonPage","gotoAmountPage","goToReviewAndSubmitView","getRefundListReason","refundCode","getRefundAmount","gotoReviewRefundConfirmationPage","resubmitRequest","ServiceRequestComponent","goToServiceRquestComponent","IserviceRequestCardPayment","language","IserviceRequestPbaPayment","account_number","customer_reference","orgName","organisation_name","PbaPaymentComponent","isPBAAccountHold","isCardPaymentSuccess","isInSufficiantFund","isPBAAccountNotExist","isPBAServerError","isGetPBAAccountSucceed","selectedPbaAccount","pbaAccountRef","isPbaAccountSelected","isCardPaymentSelected","isPBADropdownSelected","isPBAAccountPaymentSuccess","organisationEntityResponse","pbaAccountList","paymentAccount","selectpbaaccount","currentTarget","pbaAccountrPaymentResult","cardPayment","paymentUrl","next_url","selectPaymentMethod","PaymentLibModule","NgModule","imports","CommonModule","HttpClientModule","FormsModule","ReactiveFormsModule","MatTableModule","MatPaginatorModule","MatSortModule","MatFormFieldModule","MatInputModule","declarations","exports","providers","provide","useClass"],"sources":["../../../projects/payment-lib/src/lib/payment-lib.service.ts","../../../projects/payment-lib/src/lib/services/orderslist.service.ts","../../../projects/payment-lib/src/lib/payment-lib.component.ts","../../../projects/payment-lib/src/lib/services/shared/error-handler.service.ts","../../../projects/payment-lib/src/lib/services/shared/logger/logger.service.ts","../../../projects/payment-lib/src/lib/services/payment-list/payment-list.service.ts","../../../projects/payment-lib/src/lib/components/payment-list/payment-list.component.ts","../../../node_modules/tslib/tslib.es6.js","../../../projects/payment-lib/src/lib/services/shared/httpclient/webcomponent.http.client.ts","../../../projects/payment-lib/src/lib/services/payment-view/payment-view.service.ts","../../../projects/payment-lib/src/lib/components/payment-view/payment-view.component.ts","../../../projects/payment-lib/src/lib/services/refunds/refunds.service.ts","../../../projects/payment-lib/src/lib/components/process-refund/process-refund.component.ts","../../../projects/payment-lib/src/lib/components/refund-list/refund-list.component.ts","../../../projects/payment-lib/src/lib/services/card-details/card-details.service.ts","../../../projects/payment-lib/src/lib/components/card-details/card-details.component.ts","../../../projects/payment-lib/src/lib/components/page-not-found.component.ts","../../../projects/payment-lib/src/lib/services/status-history/status-history.service.ts","../../../projects/payment-lib/src/lib/components/status-history/status-history.component.ts","../../../projects/payment-lib/src/lib/components/pba-details/pba-details.component.ts","../../../projects/payment-lib/src/lib/services/shared/logger/console-logger.service.ts","../../../projects/payment-lib/src/lib/services/case-transactions/case-transactions.service.ts","../../../projects/payment-lib/src/lib/services/bulk-scaning-payment/bulk-scaning-payment.service.ts","../../../projects/payment-lib/src/lib/components/case-transactions/case-transactions.component.ts","../../../projects/payment-lib/src/lib/interfaces/PaymentToPayhubRequest.ts","../../../projects/payment-lib/src/lib/interfaces/PayhubAntennaRequest.ts","../../../projects/payment-lib/src/lib/components/fee-summary/fee-summary.component.ts","../../../projects/payment-lib/src/lib/components/error-banner/error-banner.component.ts","../../../projects/payment-lib/src/lib/interfaces/UnidentifiedPaymentsRequest.ts","../../../projects/payment-lib/src/lib/interfaces/AllocatePaymentRequest.ts","../../../projects/payment-lib/src/lib/components/mark-unidentified-payment/mark-unidentified-payment.component.ts","../../../projects/payment-lib/src/lib/interfaces/UnsolicitedPaymentsRequest.ts","../../../projects/payment-lib/src/lib/components/mark-unsolicited-payment/mark-unsolicited-payment.component.ts","../../../projects/payment-lib/src/lib/components/unprocessed-payments/unprocessed-payments.component.ts","../../../projects/payment-lib/src/lib/components/processed-payments/processed-payments.component.ts","../../../projects/payment-lib/src/lib/interfaces/IAllocationPaymentsRequest.ts","../../../projects/payment-lib/src/lib/components/allocate-payments/allocate-payments.component.ts","../../../projects/payment-lib/src/lib/interfaces/AddRemissionRequest.ts","../../../projects/payment-lib/src/lib/interfaces/AddRetroRemissionRequest.ts","../../../projects/payment-lib/src/lib/interfaces/PostRefundRetroRemission.ts","../../../projects/payment-lib/src/lib/interfaces/PostIssueRefundRetroRemission.ts","../../../projects/payment-lib/src/lib/components/add-remission/add-remission.component.ts","../../../projects/payment-lib/src/lib/pipes/ccd-hyphens.pipe.ts","../../../projects/payment-lib/src/lib/pipes/capitalize.pipe.ts","../../../projects/payment-lib/src/lib/pipes/key-value.pipe.ts","../../../projects/payment-lib/src/lib/pipes/sanitize-html.pipe.ts","../../../projects/payment-lib/src/lib/services/xl-file/xl-file.service.ts","../../../projects/payment-lib/src/lib/components/reports/reports.component.ts","../../../projects/payment-lib/src/lib/components/table/table.component.ts","../../../projects/payment-lib/src/lib/interfaces/IResubmitRefundRequest.ts","../../../projects/payment-lib/src/lib/components/refund-status/refund-status.component.ts","../../../projects/payment-lib/src/lib/components/service-request/service-request.component.ts","../../../projects/payment-lib/src/lib/interfaces/IserviceRequestCardPayment.ts","../../../projects/payment-lib/src/lib/interfaces/IserviceRequestPbaPayment.ts","../../../projects/payment-lib/src/lib/components/pba-payment/pba-payment.component.ts","../../../projects/payment-lib/src/lib/payment-lib.module.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\n\n@Injectable({\n providedIn: 'root'\n})\n\nexport class PaymentLibService {\n API_ROOT: string;\n BULKSCAN_API_ROOT: string;\n REFUNDS_API_ROOT: string;\n CARDPAYMENTRETURNURL: string;\n\n constructor() { }\n\n setApiRootUrl(apiRoot: string): void {\n this.API_ROOT = apiRoot;\n }\n\n getApiRootUrl(): string {\n return this.API_ROOT;\n }\n\n setBulkScanApiRootUrl(bulkscanapiRoot: string): void {\n this.BULKSCAN_API_ROOT = bulkscanapiRoot;\n }\n\n getBulkScanApiRootUrl(): string {\n return this.BULKSCAN_API_ROOT;\n }\n\n setRefundndsApiRootUrl(refundsapiRoot: string): void {\n this.REFUNDS_API_ROOT = refundsapiRoot;\n }\n\n getRefundsApiRootUrl(): string {\n return this.REFUNDS_API_ROOT;\n }\n setCardPaymentReturnUrl(cardPaymentReturnUrl: string):void {\n this.CARDPAYMENTRETURNURL = cardPaymentReturnUrl;\n }\n getCardPaymentReturnUrl(): string {\n return this.CARDPAYMENTRETURNURL;\n }\n}\n","import { Injectable } from '@angular/core';\nimport { Observable, BehaviorSubject } from 'rxjs';\nimport {IOrderReferenceFee} from '../interfaces/IOrderReferenceFee';\nimport { IRefundList } from '../interfaces/IRefundList';\nimport { IPaymentView } from '../interfaces/IPaymentView'; \n\n@Injectable({\n providedIn: 'root'\n})\nexport class OrderslistService {\n private ordersList: BehaviorSubject<IOrderReferenceFee[]> = new BehaviorSubject<IOrderReferenceFee[]>(null);\n private refundView: BehaviorSubject<IRefundList> = new BehaviorSubject<IRefundList>(null);\n private caseType = new BehaviorSubject(\"\");\n getcaseType = this.caseType.asObservable();\n private feeExists = new BehaviorSubject<boolean>(null);\n getFeeExist = this.feeExists.asObservable();\n private ccdCaseNumber = new BehaviorSubject(\"\");\n getCCDCaseNumberforRefund = this.ccdCaseNumber.asObservable();\n private isFromServiceRequestPage = new BehaviorSubject<boolean>(null);\n getisFromServiceRequestPage = this.isFromServiceRequestPage.asObservable();\n private OrderRefId = new BehaviorSubject(\"\");\n getOrderRefId = this.OrderRefId.asObservable();\n private navigationPage = new BehaviorSubject(\"\");\n getnavigationPage = this.navigationPage.asObservable();\n\n private orderRef = new BehaviorSubject(\"\");\n getorderRef = this.orderRef.asObservable();\n private orderCCDEvent = new BehaviorSubject(\"\");\n getorderCCDEvent = this.caseType.asObservable();\n private orderCreated = new BehaviorSubject<Date>(null);\n getorderCreated = this.orderCreated.asObservable();\n private orderParty = new BehaviorSubject(\"\");\n getorderParty = this.orderParty.asObservable();\n private orderRemissionTotal = new BehaviorSubject<number>(null);\n getorderRemissionTotal = this.orderRemissionTotal.asObservable();\n private orderFeesTotal = new BehaviorSubject<number>(null);\n getorderFeesTotal = this.orderFeesTotal.asObservable();\n private orderTotalPayments = new BehaviorSubject<number>(null);\n getorderTotalPayments = this.orderTotalPayments.asObservable();\n private rolesList: BehaviorSubject<any[]> = new BehaviorSubject<any[]>(null);\n\n private orderDetail: BehaviorSubject<any[]> = new BehaviorSubject<any[]>(null);\n\n private paymentPageView: BehaviorSubject<IPaymentView> = new BehaviorSubject<IPaymentView>(null);\n\n constructor() { }\n\n setOrdersList(orderLevelFees: IOrderReferenceFee[]): void {\n this.ordersList.next(Object.assign([], orderLevelFees));\n }\n getOrdersList() {\n return this.ordersList;\n }\n\n setRefundView(refundList: IRefundList): void {\n this.refundView.next(Object.assign([], refundList));\n }\n getRefundView() {\n return this.refundView;\n }\n\n setCaseType(caseType: string){\n this.caseType.next(caseType);\n }\n getCaseType(){\n return this.caseType;\n }\n\n setCCDCaseNumber(ccdCaseNumber: string){\n this.ccdCaseNumber.next(ccdCaseNumber);\n }\n getCCDCaseNumber(){\n return this.ccdCaseNumber;\n }\n\n setFeeExists(feeExists: boolean){\n this.feeExists.next(feeExists);\n }\n getFeeExists(){\n return this.feeExists;\n } \n\n setisFromServiceRequestPage(isFromServiceRequestPage: boolean){\n this.isFromServiceRequestPage.next(isFromServiceRequestPage);\n }\n getisFromServiceRequestPages(){\n return this.isFromServiceRequestPage;\n }\n\n setOrderRefId(OrderRefId: string){\n this.OrderRefId.next(OrderRefId);\n }\n getSelectedOrderRefId(){\n return this.OrderRefId;\n }\n\n setnavigationPage(navigationPage: string){\n this.navigationPage.next(navigationPage);\n }\n getnavigationPageValue(){\n return this.navigationPage;\n }\n\n setpaymentPageView(paymentpageList: IPaymentView): void {\n this.paymentPageView.next(Object.assign([], paymentpageList));\n }\n getpaymentPageView() {\n return this.paymentPageView;\n }\n\n setUserRolesList(rolesList:any[]): void {\n this.rolesList.next(Object.assign([], rolesList));\n }\n getUserRolesList() {\n return this.rolesList;\n }\n\n setorderDetail(orderDetail:any[]): void {\n this.orderDetail.next(Object.assign([], orderDetail));\n }\n getorderDetail() {\n return this.orderDetail;\n }\n\n setOrderRef(orderRef: string){\n this.orderRef.next(orderRef);\n }\n getorderRefs(){\n return this.orderRef;\n }\n\n setorderCCDEvent(orderCCDEvent: string){\n this.orderCCDEvent.next(orderCCDEvent);\n }\n getorderCCDEvents(){\n return this.orderCCDEvent;\n }\n\n setorderCreated(orderCreated: Date){\n this.orderCreated.next(orderCreated);\n }\n getorderCreateds(){\n return this.orderCreated;\n }\n\n setorderParty(orderParty: string){\n this.orderParty.next(orderParty);\n }\n getorderPartys(){\n return this.orderParty;\n }\n\n setorderRemissionTotal(orderRemissionTotal: number){\n this.orderRemissionTotal.next(orderRemissionTotal);\n }\n getorderRemissionTotals(){\n return this.orderRemissionTotal;\n }\n\n setorderFeesTotal(orderFeesTotal: number){\n this.orderFeesTotal.next(orderFeesTotal);\n }\n getorderFeesTotals(){\n return this.orderFeesTotal;\n }\n\n setorderTotalPayments(orderTotalPayments: number){\n this.orderTotalPayments.next(orderTotalPayments);\n }\n getoorderTotalPaymentss(){\n return this.orderTotalPayments;\n }\n}\n","import { ChangeDetectorRef, Component, Input, OnInit } from '@angular/core';\nimport { PaymentLibService } from './payment-lib.service';\nimport { IBSPayments } from './interfaces/IBSPayments';\nimport { OrderslistService } from './services/orderslist.service';\nimport { IPayment } from './interfaces/IPayment';\n\n@Component({\n selector: 'ccpay-payment-lib',\n template: `\n <ccpay-refund-list [USERID]=\"USERID\" [LOGGEDINUSERROLES]=\"LOGGEDINUSERROLES\" [LOGGEDINUSEREMAIL]=\"LOGGEDINUSEREMAIL\" *ngIf=\"viewName === 'refund-list'\"></ccpay-refund-list>\n <ccpay-payment-list *ngIf=\"viewName === 'payment-list'\"></ccpay-payment-list>\n <ccpay-refund-status\n [LOGGEDINUSERROLES]=\"LOGGEDINUSERROLES\"\n [API_ROOT]=\"API_ROOT\"\n *ngIf=\"viewName === 'refundstatuslist'\"> </ccpay-refund-status >\n <ccpay-payment-view [LOGGEDINUSERROLES]=\"LOGGEDINUSERROLES\" *ngIf=\"viewName === 'payment-view'\"\n [isTurnOff]=\"ISTURNOFF\" [isTakePayment]=\"TAKEPAYMENT\" [caseType]=\"CASETYPE\"\n [ISPAYMENTSTATUSENABLED] = \"ISPAYMENTSTATUSENABLED\"\n ></ccpay-payment-view>\n\n <ccpay-process-refund *ngIf=\"viewName === 'process-refund'\"\n [refundReference]=\"refundReference\"\n [refundlistsource]=\"refundlistsource\"\n ></ccpay-process-refund>\n <ccpay-pba-payment *ngIf=\"viewName === 'pba-payment'\"\n [pbaPayOrderRef]=\"pbaPayOrderRef\"\n ></ccpay-pba-payment>\n <ccpay-case-transactions [isTakePayment]=\"isTakePayment\" [LOGGEDINUSERROLES]=\"LOGGEDINUSERROLES\" *ngIf=\"viewName === 'case-transactions'\"></ccpay-case-transactions>\n <app-mark-unidentified-payment *ngIf=\"viewName === 'unidentifiedPage'\"\n [caseType]=\"CASETYPE\"></app-mark-unidentified-payment>\n <app-mark-unsolicited-payment *ngIf=\"viewName === 'unsolicitedPage'\"\n [caseType]=\"CASETYPE\"></app-mark-unsolicited-payment>\n <app-allocate-payments *ngIf=\"viewName === 'allocate-payments'\"\n [isTurnOff]=\"ISTURNOFF\"\n [caseType]=\"CASETYPE\"\n ></app-allocate-payments>\n <ccpay-fee-summary *ngIf=\"viewName === 'fee-summary'\"\n [ccdCaseNumber]=\"CCD_CASE_NUMBER\"\n [paymentGroupRef]=\"paymentGroupReference\"\n [isTurnOff]=\"ISTURNOFF\"\n [caseType]=\"CASETYPE\"\n ></ccpay-fee-summary>\n <ccpay-reports *ngIf=\"viewName === 'reports'\"\n [ISPAYMENTSTATUSENABLED] = \"ISPAYMENTSTATUSENABLED\"\n ></ccpay-reports>\n `\n})\n\nexport class PaymentLibComponent implements OnInit {\n @Input('API_ROOT') API_ROOT: string;\n @Input('BULKSCAN_API_ROOT') BULKSCAN_API_ROOT: string;\n @Input('REFUNDS_API_ROOT') REFUNDS_API_ROOT: string;\n @Input('CARDPAYMENTRETURNURL') CARDPAYMENTRETURNURL: string;\n @Input('CCD_CASE_NUMBER') CCD_CASE_NUMBER: string;\n @Input('EXC_REFERENCE') EXC_REFERENCE: string;\n @Input('PAYMENT_METHOD') PAYMENT_METHOD: string;\n @Input('VIEW') VIEW: string;\n @Input('VIEWSERVICE') VIEWSERVICE: string;\n @Input('PAYMENT_GROUP_REF') PAYMENT_GROUP_REF?: string;\n @Input('TAKEPAYMENT') TAKEPAYMENT: boolean;\n @Input('SERVICEREQUEST') SERVICEREQUEST: string;\n @Input('DCN_NUMBER') DCN_NUMBER: string;\n @Input('SELECTED_OPTION') SELECTED_OPTION: string;\n @Input('ISBSENABLE') ISBSENABLE: Boolean;\n @Input('ISSFENABLE') ISSFENABLE: boolean;\n @Input('ISTURNOFF') ISTURNOFF: boolean;\n @Input('CASETYPE') CASETYPE: string;\n @Input('ISPAYMENTSTATUSENABLED') ISPAYMENTSTATUSENABLED: boolean;\n @Input('rootUrl') rootUrl: boolean;\n @Input('REFUNDLIST') REFUNDLIST: string;\n @Input('USERID') USERID: string;\n @Input('LOGGEDINUSERROLES') LOGGEDINUSERROLES: any[];\n @Input('LOGGEDINUSEREMAIL') LOGGEDINUSEREMAIL: string;\n @Input('isFromServiceRequestPage') isFromServiceRequestPage: boolean;\n\n paymentMethod: string;\n bspaymentdcn: string;\n unProcessedPaymentServiceId: string = null;\n paymentGroupReference: string;\n paymentReference: string;\n refundReference: string;\n refundlistsource: any;\n viewName: string;\n isTurnOff: boolean;\n caseType: string;\n unProcessedPayment: IBSPayments = null;\n isRefundStatusView: boolean;\n isRedirectFromCaseTransactionPage: string;\n isCallFromRefundList: boolean;\n isFromRefundStatusPage: boolean;\n iscancelClicked : boolean;\n isFromPaymentDetailPage: boolean;\n pbaPayOrderRef: IPayment;\n isTakePayment: boolean;\n\n orderDetail: any[];\n orderRef: string;\n orderStatus: string;\n orderParty: string;\n orderCreated: Date;\n orderCCDEvent: string;\n serviceRequestValue: string;\n orderAddBtnEnable: boolean;\n orderFeesTotal: number = 0.00;\n orderRemissionTotal: number = 0.00;\n orderTotalPayments: number = 0.00;\n orderPendingPayments: number = 0.00;\n\n constructor(private paymentLibService: PaymentLibService,\n private cd: ChangeDetectorRef,\n private OrderslistService: OrderslistService) { }\n ngAfterContentChecked(): void {\n this.cd.detectChanges();\n }\n\n\n ngOnInit() {\n this.paymentLibService.setApiRootUrl(this.API_ROOT);\n this.paymentLibService.setBulkScanApiRootUrl(this.BULKSCAN_API_ROOT);\n this.paymentLibService.setRefundndsApiRootUrl(this.REFUNDS_API_ROOT);\n this.paymentLibService.setCardPaymentReturnUrl(this.CARDPAYMENTRETURNURL);\n\n if(this.LOGGEDINUSERROLES.length > 0) {\n this.OrderslistService.setUserRolesList(this.LOGGEDINUSERROLES);\n }\n if (this.PAYMENT_GROUP_REF) {\n this.paymentGroupReference = this.PAYMENT_GROUP_REF;\n }\n if (this.DCN_NUMBER) {\n this.bspaymentdcn = this.DCN_NUMBER;\n }\n if (this.REFUNDLIST === \"true\") {\n this.VIEW = 'refund-list';\n this.viewName = this.VIEW;\n }\n if (this.VIEW === 'fee-summary') {\n this.viewName = 'fee-summary';\n } else if (this.VIEW !== 'reports' && this.VIEW !== 'refund-list') {\n this.viewName = 'case-transactions';\n } else {\n this.viewName = this.VIEW;\n }\n\n if (this.isTakePayment) {\n this.TAKEPAYMENT = true;\n }\n }\n}\n","import { Injectable } from '@angular/core';\nimport { HttpErrorResponse } from '@angular/common/http';\nimport { Observable, throwError } from 'rxjs';\n\n@Injectable({\n providedIn: 'root'\n})\n\n\nexport class ErrorHandlerService {\n\n constructor() { }\n\n\n handleError(err: HttpErrorResponse): Observable<any> {\n let errorMessage: string;\n if (err.error instanceof Error) {\n // A client-side or network error occurred.\n errorMessage = `An error occurred: ${err.error.message}`;\n } else {\n // The backend returned an unsuccessful response code.\n if (err.status === 404) {\n\n if (typeof err.error === 'string' && err.error !== undefined) {\n\n if(err.error.length > 60) {\n if (JSON.parse(err.error).statusCode !== undefined && JSON.parse(err.error).statusCode === 500)\n {\n errorMessage = 'Internal server error';\n } else {\n if(err.error.length > 60) {\n errorMessage = JSON.parse(err.error).error;\n } else {\n errorMessage = err.error;\n }\n\n }\n } else {\n errorMessage = err.error;\n }\n } else {\n errorMessage = JSON.parse(err.error).error;\n }\n\n }\n else if (err.status === 500) {\n errorMessage = 'Internal server error';\n } else if (err.error.messsage === undefined) {\n if( typeof err.error === 'object') {\n errorMessage = JSON.parse(JSON.stringify(err.error)).error;\n } else {\n if (typeof err.error === 'string' && err.error !== undefined) {\n\n if(err.error.length > 60) {\n if (JSON.parse(err.error).statusCode !== undefined && JSON.parse(err.error).statusCode === 500)\n {\n errorMessage = 'Internal server error';\n } else {\n if(err.error.length > 60) {\n errorMessage = JSON.parse(err.error).error;\n } else {\n errorMessage = err.error;\n }\n\n }\n } else {\n errorMessage = err.error;\n }\n } else {\n errorMessage = JSON.parse(err.error).error;\n }\n\n }\n\n } else {\n if (err.error.message !== undefined) {\n errorMessage = `${err.error.message}`;\n } else {\n errorMessage = `${err.error}`;\n }\n\n }\n }\n return throwError(errorMessage);\n }\n\n\n getServerErrorMessage(isErrorExist, isDataNotExist = false, error='') {\n const bodyContent = isDataNotExist ? error : 'Try again later';\n return {\n title: \"There is a problem with the service\",\n body: bodyContent,\n showError: isErrorExist\n };\n }\n}\n","import { Injectable } from '@angular/core';\n\nconst noop = (): any => undefined;\n\nexport abstract class Logger {\n\n info: any;\n warn: any;\n error: any;\n}\n\n@Injectable({\n providedIn: 'root'\n})\nexport class LoggerService implements Logger {\n\n info: any;\n warn: any;\n error: any;\n\n invokeConsoleMethod(type: string, args?: any): void {}\n}\n","import { Injectable } from '@angular/core';\nimport { HttpClient } from '@angular/common/http';\n\nimport { Observable } from 'rxjs/internal/Observable';\nimport {PaymentLibService} from '../../payment-lib.service';\nimport { IPayments } from '../../interfaces/IPayments';\nimport { catchError } from 'rxjs/operators';\nimport { ErrorHandlerService } from '../shared/error-handler.service';\nimport { LoggerService } from '../shared/logger/logger.service';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class PaymentListService {\n payments: IPayments;\n\n constructor(private http: HttpClient,\n private logger: LoggerService,\n private errorHandlerService: ErrorHandlerService,\n private paymentLibService: PaymentLibService) { }\n\n\n getPaymentByCcdCaseNumber(ccdCaseNumber: string, paymentMethod: string): Observable<IPayments> {\n this.logger.info('Payment-list-service getPaymentByCcdCaseNumber for: ', ccdCaseNumber);\n\n return this.http.get<IPayments>(`${this.paymentLibService.API_ROOT}/cases/${ccdCaseNumber}/payments`, {\n withCredentials: true\n })\n .pipe(\n catchError(this.errorHandlerService.handleError)\n );\n }\n}\n","import {Component, OnInit} from '@angular/core';\n\nimport {PaymentListService} from '../../services/payment-list/payment-list.service';\nimport {IPayments} from '../../interfaces/IPayments';\nimport {PaymentLibComponent} from '../../payment-lib.component';\nimport {IStatusHistory} from '../../interfaces/IStatusHistory';\n\n@Component({\n selector: 'ccpay-payment-list',\n templateUrl: './payment-list.component.html',\n styleUrls: ['./payment-list.component.css']\n})\nexport class PaymentListComponent implements OnInit {\n payments: IPayments;\n errorMessage: string;\n code: string;\n\n constructor(private paymentListService: PaymentListService,\n private paymentLibComponent: PaymentLibComponent) {\n }\n\n ngOnInit() {\n this.paymentListService.getPaymentByCcdCaseNumber(this.paymentLibComponent.CCD_CASE_NUMBER, this.paymentLibComponent.PAYMENT_METHOD)\n .subscribe(\n payments => this.payments = payments,\n (error: any) => this.errorMessage = <any>error\n );\n }\n\n loadPaymentViewComponent(paymentGroupReference: string, paymentReference: string, paymentMethod: string) {\n this.paymentLibComponent.paymentMethod = paymentMethod;\n this.paymentLibComponent.paymentGroupReference = paymentGroupReference;\n this.paymentLibComponent.paymentReference = paymentReference;\n this.paymentLibComponent.viewName = 'payment-view';\n }\n}\n","/******************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n if (typeof b !== \"function\" && b !== null)\r\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (_) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n var desc = Object.getOwnPropertyDescriptor(m, k);\r\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\r\n desc = { enumerable: true, get: function() { return m[k]; } };\r\n }\r\n Object.defineProperty(o, k2, desc);\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n});\r\n\r\nexport function __exportStar(m, o) {\r\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\r\n}\r\n\r\nexport function __values(o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n}\r\n\r\nexport function __spreadArray(to, from, pack) {\r\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\r\n if (ar || !(i in from)) {\r\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\r\n ar[i] = from[i];\r\n }\r\n }\r\n return to.concat(ar || Array.prototype.slice.call(from));\r\n}\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === \"return\" } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nvar __setModuleDefault = Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\r\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\r\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\r\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\r\n}\r\n\r\nexport function __classPrivateFieldIn(state, receiver) {\r\n if (receiver === null || (typeof receiver !== \"object\" && typeof receiver !== \"function\")) throw new TypeError(\"Cannot use 'in' operator on non-object\");\r\n return typeof state === \"function\" ? receiver === state : state.has(receiver);\r\n}\r\n","import { Injectable } from '@angular/core';\nimport { HttpClient, HttpHeaders } from '@angular/common/http';\nimport { Meta } from '@angular/platform-browser';\nimport { Observable } from 'rxjs';\n\n@Injectable()\nexport class WebComponentHttpClient {\n constructor(\n private http: HttpClient,\n private meta: Meta\n ) { }\n\n post(url: string, body: any | null, options?: any): Observable<any> {\n const opts = this.addHeaders(options || {});\n return this.http.post(url, body, opts);\n }\n\n put(url: string, body: any | null, options?: any): Observable<any> {\n const opts = this.addHeaders(options || {});\n return this.http.put(url, body, opts);\n }\n\n get(url: string, options?: any): Observable<any> {\n const opts = this.addHeaders(options || {});\n return this.http.get(url, opts);\n }\n\n delete(url: string, options?: any): Observable<any> {\n const opts = this.addHeaders(options || {});\n return this.http.delete(url, opts);\n }\n \n patch(url: string, body: any | null, options?: any): Observable<any> {\n const opts = this.addHeaders(options || {});\n return this.http.patch(url, body, opts);\n }\n\n addHeaders(options: any): any {\n const csrfToken = this.meta.getTag('name=csrf-token');\n const headers = {};\n \n if (options.headers) {\n options.headers.forEach(element => {\n headers[element] = options.headers.get(element);\n });\n }\n headers['X-Requested-With'] = 'XMLHttpRequest';\n if (csrfToken === null) {\n if( document.cookie.split(';').find(row => row.startsWith('XSRF-TOKEN')) !== undefined ) {\n headers['CSRF-Token'] = document.cookie.split(';').find(row => row.startsWith('XSRF-TOKEN')).split('=')[1]; \n } else {\n headers['CSRF-Token'] = document.cookie.split(';').find(row => row.startsWith(' XSRF-TOKEN')).split('=')[1];\n }\n } else {\n headers['CSRF-Token'] = csrfToken.content;\n }\n options.headers = new HttpHeaders(headers);\n options.responseType = 'text';\n return options;\n }\n}\n","import { Injectable } from '@angular/core';\nimport { HttpClient, HttpHeaders } from '@angular/common/http';\nimport { Observable } from 'rxjs/internal/Observable';\nimport { v4 as uuidv4 } from 'uuid';\nimport {IPayment} from '../../interfaces/IPayment';\nimport {PaymentLibService} from '../../payment-lib.service';\nimport { WebComponentHttpClient } from '../shared/httpclient/webcomponent.http.client';\nimport { ErrorHandlerService } from '../shared/error-handler.service';\nimport { catchError } from 'rxjs/operators';\nimport { LoggerService } from '../shared/logger/logger.service';\nimport {IPaymentGroup} from '../../interfaces/IPaymentGroup';\nimport { AddRemissionRequest } from '../../interfaces/AddRemissionRequest';\nimport { PaymentToPayhubRequest } from '../../interfaces/PaymentToPayhubRequest';\nimport { PayhubAntennaRequest } from '../../interfaces/PayhubAntennaRequest';\nimport { UnidentifiedPaymentsRequest } from '../../interfaces/UnidentifiedPaymentsRequest';\nimport { UnsolicitedPaymentsRequest } from '../../interfaces/UnsolicitedPaymentsRequest';\nimport { Meta } from '@angular/platform-browser';\nimport { AllocatePaymentRequest } from '../../interfaces/AllocatePaymentRequest';\nimport { IAllocationPaymentsRequest } from '../../interfaces/IAllocationPaymentsRequest';\nimport {IOrderReferenceFee} from '../../interfaces/IOrderReferenceFee';\nimport { BehaviorSubject } from 'rxjs';\nimport { IserviceRequestPbaPayment } from '../../interfaces/IserviceRequestPbaPayment';\nimport { IserviceRequestCardPayment } from '../../interfaces/IserviceRequestCardPayment';\nimport { RefundsRequest } from '../../interfaces/RefundsRequest';\nimport { AddRetroRemissionRequest } from '../../interfaces/AddRetroRemissionRequest';\nimport { PostRefundRetroRemission } from '../../interfaces/PostRefundRetroRemission';\nimport { PostIssueRefundRetroRemission } from '../../interfaces/PostIssueRefundRetroRemission';\nimport { error } from '@angular/compiler/src/util';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class PaymentViewService {\n private ordersList = <BehaviorSubject<IOrderReferenceFee[]>>new BehaviorSubject([]);\n\n private meta: Meta;\n\n\n constructor(private http: HttpClient,\n private https: WebComponentHttpClient,\n private logger: LoggerService,\n private errorHandlerService: ErrorHandlerService,\n private paymentLibService: PaymentLibService) { }\n\n getPaymentDetails(paymentReference: string, paymentMethod: string): Observable<IPayment> {\n this.logger.info('Payment-view-service getPaymentDetails for: ', paymentReference);\n\n return this.http.get<IPayment>(paymentMethod === 'card' || paymentMethod === 'cash' || paymentMethod === 'cheque' || paymentMethod === 'postal order' ?\n `${this.paymentLibService.API_ROOT}/card-payments/${paymentReference}` :\n `${this.paymentLibService.API_ROOT}/credit-account-payments/${paymentReference}`, {\n withCredentials: true\n })\n .pipe(\n catchError(this.errorHandlerService.handleError)\n );\n }\n\n getPaymentGroupDetails(paymentGroupReference: string): Observable<IPaymentGroup> {\n this.logger.info('Payment-view-service getPaymentGroupDetails for: ', paymentGroupReference);\n\n return this.http.get<IPayment>(`${this.paymentLibService.API_ROOT}/payment-groups/${paymentGroupReference}`, {\n withCredentials: true\n })\n .pipe(\n catchError(this.errorHandlerService.handleError)\n );\n }\n getApportionPaymentDetails(paymentReference: string): Observable<IPaymentGroup> {\n this.logger.info('Payment-view-service getPaymentGroupDetails for: ', paymentReference);\n\n return this.http.get<IPayment>(`${this.paymentLibService.API_ROOT}/payment-groups/fee-pay-apportion/${paymentReference}`, {\n withCredentials: true\n })\n .pipe(\n catchError(this.errorHandlerService.handleError)\n );\n }\n getPBAaccountDetails(): Observable<any> {\n const url = `${this.paymentLibService.API_ROOT}/pba-accounts`;\n return this.http.get(url, { withCredentials: true }).pipe(\n catchError(this.errorHandlerService.handleError)\n );\n }\n\n postWays2PayCardPayment(serviceRef: string, body: IserviceRequestCardPayment): Observable<any> {\n const url = `${this.paymentLibService.API_ROOT}/service-request/${serviceRef}/card-payments`;\n const rurl = this.paymentLibService.CARDPAYMENTRETURNURL.replace('.prod', '');\n body['return-url'] = `${rurl}/payment`;\n return this.https.post(url, body).pipe(\n catchError(this.errorHandlerService.handleError)\n );\n }\n \n postPBAaccountPayment(serviceRef: string, body: IserviceRequestPbaPayment): Observable<any> {\n let randomKey = 'idam-key-' + Math.random().toString().split('.').join('-');\n body['idempotency_key'] = randomKey;\n const url = `${this.paymentLibService.API_ROOT}/service-request/${serviceRef}/pba-payments`;\n setTimeout(() => {\n console.log('Good Night!');\n }, 4000);\n return this.https.post(url, body);\n }\n\n postBSPayments(body: AllocatePaymentRequest): Observable<any> {\n return this.https.post(`${this.paymentLibService.API_ROOT}/payment-groups/bulk-scan-payments`, body).pipe(\n catchError(this.errorHandlerService.handleError)\n );\n }\n postBSUnidentifiedPayments(body: UnidentifiedPaymentsRequest): Observable<any> {\n return this.https.post(`${this.paymentLibService.API_ROOT}/payment-allocations`, body).pipe(\n catchError(this.errorHandlerService.handleError)\n );\n }\n postBSUnsolicitedPayments(body: UnsolicitedPaymentsRequest): Observable<any> {\n return this.https.post(`${this.paymentLibService.API_ROOT}/payment-allocations`, body).pipe(\n catchError(this.errorHandlerService.handleError)\n );\n }\n postBSAllocationPayments(body: IAllocationPaymentsRequest): Observable<any> {\n return this.https.post(`${this.paymentLibService.API_ROOT}/payment-allocations`, body).pipe(\n catchError(this.errorHandlerService.handleError)\n );\n }\n\n postPaymentGroupWithRemissions(paymentGroupReference: string, feeId: number, body: AddRemissionRequest): Observable<any> {\n return this.https.post(`${this.paymentLibService.API_ROOT}/payment-groups/${paymentGroupReference}/fees/${feeId}/remissions`, body).pipe(\n catchError(this.errorHandlerService.handleError)\n );\n }\n\n deleteFeeFromPaymentGroup(feeId: number): Observable<any> {\n this.logger.info('Payment-view-service deleteFeeFromPaymentGroup for: ', feeId);\n return this.https.delete(`${this.paymentLibService.API_ROOT}/fees/${feeId}`).pipe(\n catchError(this.errorHandlerService.handleError)\n );\n }\n postPaymentToPayHub(body: PaymentToPayhubRequest, paymentGroupRef: string): Observable<any> {\n return this.https.post(`${this.paymentLibService.API_ROOT}/payment-groups/${paymentGroupRef}/card-payments`, body).pipe(\n catchError(this.errorHandlerService.handleError)\n );\n }\n\n postPaymentAntennaToPayHub(body: PayhubAntennaRequest, paymentGroupRef: string): Observable<any> {\n return this.https.post(`${this.paymentLibService.API_ROOT}/payment-groups/${paymentGroupRef}/telephony-card-payments`, body).pipe(\n catchError(this.errorHandlerService.handleError)\n );\n }\n downloadSelectedReport(reportName: string, startDate: string, endDate:string): Observable<any> {\n const url = `${this.paymentLibService.API_ROOT}/report/data?date_from=${startDate}&date_to=${endDate}&report_type=${reportName}`;\n return this.https.get(url, { withCredentials: true }).pipe( catchError(this.errorHandlerService.handleError));\n }\n downloadFailureReport(startDate: string, endDate:string): Observable<any> {\n const url = `${this.paymentLibService.API_ROOT}/payment-failures/failure-report?date_from=${startDate}&date_to=${endDate}`;\n return this.https.get(url, { withCredentials: true }).pipe( catchError(this.errorHandlerService.handleError));\n }\n getBSfeature(): Observable<any> {\n return this.https.get('api/payment-history/bulk-scan-feature', { withCredentials: true }).pipe( catchError(this.errorHandlerService.handleError));\n }\n getSiteID(): Observable<any> {\n return this.https.get('api/payment-history/refdata/legacy-sites', { withCredentials: true }).pipe( catchError(this.errorHandlerService.handleError));\n }\n getPartyDetails(caseNumber: string): Observable<any> {\n const url = `${this.paymentLibService.API_ROOT}/case-payment-orders?case_ids=${caseNumber}`;\n return this.https.get(url, { withCredentials: true }).pipe( catchError(this.errorHandlerService.handleError));\n }\n \n setOrdersList(orderLevelFees: IOrderReferenceFee[]): void {\n this.ordersList.next(Object.assign([], orderLevelFees));\n}\n getOrdersList() {\n return this.ordersList;\n }\n\n //issue refund\n postRefundsReason(body: PostRefundRetroRemission): Observable<any> {\n return this.https.post(`${this.paymentLibService.API_ROOT}/refund-for-payment`, body).pipe(\n catchError(this.errorHandlerService.handleError)\n );\n }\n\n // retro remissions\n postPaymentGroupWithRetroRemissions(paymentGroupReference: string, feeId: number, body: AddRetroRemissionRequest): Observable<any> {\n return this.https.post(`${this.paymentLibService.API_ROOT}/payment-groups/${paymentGroupReference}/fees/${feeId}/retro-remission`, body).pipe(\n catchError(this.errorHandlerService.handleError)\n );\n }\n\n postRefundRetroRemission(body:PostIssueRefundRetroRemission) {\n return this.https.post(`${this.paymentLibService.API_ROOT}/refund-retro-remission`, body).pipe(\n catchError(this.errorHandlerService.handleError)\n );\n }\n getPaymentFailure(paymentReference: string): Observable<any> {\n return this.https.get(`${this.paymentLibService.API_ROOT}/payment-failures/${paymentReference}`, {\n withCredentials: true\n }).pipe(\n catchError(this.errorHandlerService.handleError)\n );\n }\n}\n","import { Component, OnInit, Input, Output, EventEmitter } from '@angular/core';\nimport { PaymentViewService } from '../../services/payment-view/payment-view.service';\nimport { PaymentLibComponent } from '../../payment-lib.component';\nimport { IPaymentGroup } from '../../interfaces/IPaymentGroup';\nimport { IFee } from '../../interfaces/IFee';\nimport { IPayment } from '../../interfaces/IPayment';\nimport { IRemission } from '../../interfaces/IRemission';\nconst BS_ENABLE_FLAG = 'bulk-scan-enabling-fe';\nimport { ChangeDetectorRef } from '@angular/core';\nimport { IPaymentFailure } from '../../interfaces/IPaymentFailure';\nimport { OrderslistService } from '../../services/orderslist.service';\n\n@Component({\n selector: 'ccpay-payment-view',\n templateUrl: './payment-view.component.html',\n styleUrls: ['./payment-view.component.css']\n})\nexport class PaymentViewComponent implements OnInit {\n @Input() isTurnOff: boolean;\n @Input() isTakePayment: boolean;\n @Input() caseType: boolean;\n @Input() orderRef: string;\n @Input() orderStatus: string;\n @Input() orderTotalPayments: number;\n @Input() payment: IPayment;\n @Input() LOGGEDINUSERROLES: string[];\n @Input() ISPAYMENTSTATUSENABLED: string;\n @Input() orderParty: string;\n @Input() orderCreated: Date;\n @Input() orderCCDEvent: string;\n @Input() orderFeesTotal: number;\n @Input() orderRemissionTotal: number;\n @Input() orderDetail: any[];\n @Input(\"isServiceRequest\") isServiceRequest: string;\n errorMsg: string;\n paymentGroup: IPaymentGroup;\n errorMessage: string;\n ccdCaseNumber: string;\n selectedOption: string;\n dcnNumber: string;\n isStatusAllocated: boolean;\n isRemissionsMatch: boolean;\n feeId: IFee;\n viewStatus: string;\n isRefundRemission: boolean = false;\n isStrategicFixEnable: boolean;\n isAddFeeBtnEnabled: boolean = false;\n isIssueRefunfBtnEnable: boolean = false;\n allowedRolesToAccessRefund = ['payments-refund-approver', 'payments-refund'];\n remissions: IRemission[] = [];\n allPaymentsFailure: IPaymentFailure[] = [];\n selectedPaymentsStatus: IPaymentFailure;\n remissionFeeAmt: number;\n isRefundRemissionBtnEnable: boolean;\n serviceReference: string;\n isFromServiceRequestPage: boolean;\n isFromPaymentDetailPage: boolean;\n\n constructor(private paymentViewService: PaymentViewService,\n private paymentLibComponent: PaymentLibComponent,\n private cd: ChangeDetectorRef,\n private OrderslistService: OrderslistService) {\n }\n\n ngAfterContentChecked(): void {\n this.cd.detectChanges();\n }\n\n ngOnInit() {\n this.ccdCaseNumber = this.paymentLibComponent.CCD_CASE_NUMBER;\n this.selectedOption = this.paymentLibComponent.SELECTED_OPTION;\n this.dcnNumber = this.paymentLibComponent.DCN_NUMBER;\n this.isTurnOff = this.paymentLibComponent.ISTURNOFF;\n this.serviceReference = this.paymentLibComponent.paymentGroupReference;\n this.viewStatus = 'paymentview';\n this.paymentViewService.getApportionPaymentDetails(this.paymentLibComponent.paymentReference).subscribe(\n paymentGroup => {\n let fees = [];\n paymentGroup.fees.forEach(fee => {\n this.isRemissionsMatch = false;\n\n paymentGroup.remissions.forEach(rem => {\n if (rem.fee_code === fee.code) {\n this.isRemissionsMatch = true;\n fee['remissions'] = rem;\n fees.push(fee);\n }\n });\n if (!this.isRemissionsMatch) {\n fees.push(fee);\n }\n });\n paymentGroup.fees = fees\n this.paymentGroup = paymentGroup;\n\n this.paymentGroup.payments = this.paymentGroup.payments.filter\n (paymentGroupObj => paymentGroupObj['reference'].includes(this.paymentLibComponent.paymentReference));\n const paymentAllocation = this.paymentGroup.payments[0].payment_allocation;\n this.isStatusAllocated = paymentAllocation.length > 0 && paymentAllocation[0].allocation_status === 'Allocated' || paymentAllocation.length === 0;\n\n },\n (error: any) => this.errorMessage = error\n );\n this.paymentViewService.getPaymentFailure(this.paymentLibComponent.paymentReference).subscribe({\n next: (res) => {\n JSON.parse(res).payment_failure_list.reverse().forEach(payments => {\n\n this.allPaymentsFailure.push(payments.payment_failure_initiated);\n if(payments.payment_failure_closed) {\n this.allPaymentsFailure.push(payments.payment_failure_closed);\n }\n });\n this.allPaymentsFailure = this.allPaymentsFailure.reverse();\n },\n error: (e) => {\n this.allPaymentsFailure = [];\n this.errorMsg = \"Server error\"\n }\n })\n }\n\n get isCardPayment(): boolean {\n return this.paymentGroup.payments[0].method === 'card';\n }\n\n get isTelephonyPayment(): boolean {\n return this.paymentGroup.payments[0].channel === 'telephony';\n }\n\n public goToPaymentList(): void {\n this.paymentLibComponent.viewName = 'payment-list';\n }\n goToServiceRequestPage() {\n this.paymentLibComponent.viewName = 'case-transactions';\n this.paymentLibComponent.TAKEPAYMENT = false;\n this.paymentLibComponent.SERVICEREQUEST = 'true';\n this.paymentLibComponent.isFromServiceRequestPage = true;\n window.location.reload();\n }\n goToCaseTransationPage(event: any) {\n event.preventDefault();\n if (!this.paymentLibComponent.isFromServiceRequestPage) {\n this.OrderslistService.setnavigationPage('casetransactions');\n this.OrderslistService.setisFromServiceRequestPage(false);\n this.paymentLibComponent.viewName = 'case-transactions';\n this.paymentLibComponent.ISBSENABLE = true;\n this.resetOrderData();\n } else {\n this.OrderslistService.getorderRefs().subscribe((data) => this.orderRef = data);\n this.OrderslistService.getorderCCDEvents().subscribe((data) => this.orderCCDEvent = data);\n this.OrderslistService.getorderCreateds().subscribe((data) => this.orderCreated = data);\n this.OrderslistService.getorderDetail().subscribe((data) => this.orderDetail = data);\n this.OrderslistService.getorderPartys().subscribe((data) => this.orderParty = data);\n this.OrderslistService.getorderRemissionTotals().subscribe((data) => this.orderRemissionTotal = data);\n this.OrderslistService.getorderFeesTotals().subscribe((data) => this.orderFeesTotal = data);\n this.OrderslistService.getoorderTotalPaymentss().subscribe((data) => this.orderTotalPayments = data);\n this.viewStatus = 'order-full-view';\n }\n\n }\n\n addRemission(fee: IFee) {\n if(this.chkForAddRemission(fee.code)) {\n this.feeId = fee;\n this.paymentViewService.getApportionPaymentDetails(this.paymentGroup.payments[0].reference).subscribe(\n paymentGroup => {\n this.paymentGroup = paymentGroup;\n\n this.paymentGroup.payments = this.paymentGroup.payments.filter\n (paymentGroupObj => paymentGroupObj['reference'].includes(this.paymentLibComponent.paymentReference));\n this.payment = this.paymentGroup.payments[0];\n this.paymentLibComponent.isFromPaymentDetailPage = true;\n this.viewStatus = 'addremission';\n this.isRefundRemission = true;\n this.cd.detectChanges();\n },\n (error: any) => this.errorMessage = error\n );\n }\n }\n\n checkForFees(paymentGroup: any) {\n if(paymentGroup !== null && paymentGroup !== undefined)\n {\n if (paymentGroup.fees !== null && paymentGroup.fees !== undefined) {\n return true;\n }\n\n }\n return false;\n }\n\n addRefundForRemission(payment: IPayment, remission: IRemission[],fees:any) {\n if(this.chkIsRefundRemissionBtnEnable()) {\n this.payment = payment;\n this.paymentViewService.getApportionPaymentDetails(this.payment.reference).subscribe(\n paymentGroup => {\n this.paymentGroup = paymentGroup;\n\n this.paymentGroup.payments = this.paymentGroup.payments.filter\n (paymentGroupObj => paymentGroupObj['reference'].includes(this.payment.reference));\n this.payment = this.paymentGroup.payments[0];\n this.remissions = remission;\n this.remissionFeeAmt = fees.filter(data=>data.code === this.remissions['fee_code'])[0].net_amount;\n this.viewStatus = 'addrefundforremission';\n // const paymentAllocation = this.paymentGroup.payments[0].payment_allocation;\n // this.isStatusAllocated = paymentAllocation.length > 0 && paymentAllocation[0].allocation_status === 'Allocated' || paymentAllocation.length === 0;\n },\n (error: any) => this.errorMessage = error\n );\n }\n }\n\n chkIsRefundRemissionBtnEnable(): boolean {\n if (this.paymentGroup !== null && this.paymentGroup !== undefined) {\n this.paymentGroup.payments.forEach(payment => {\n if (payment.method.toLocaleLowerCase() === 'payment by account' && payment.status.toLocaleLowerCase() === 'success' && this.allowFurtherAccessAfter4Days(payment)) {\n this.isRefundRemissionBtnEnable = true;\n }\n });\n if (this.isRefundRemissionBtnEnable) {\n return true;\n } else {\n return false;\n };\n }\n }\n\n issueRefund(paymentgrp: IPaymentGroup) {\n if (paymentgrp !== null && paymentgrp !== undefined) {\n if(this.chkIssueRefundBtnEnable(paymentgrp.payments[0])) {\n this.paymentGroup = paymentgrp;\n this.viewStatus = 'issuerefund';\n this.isRefundRemission = true;\n this.paymentLibComponent.isFromPaymentDetailPage = true;\n this.isFromPaymentDetailPage = true;\n this.isFromServiceRequestPage = this.paymentLibComponent.isFromServiceRequestPage;\n }\n }\n }\n\n getRemissionByFeeCode(feeCode: string, remissions: IRemission[]): IRemission {\n if (remissions && remissions.length > 0) {\n for (const remission of remissions) {\n if (remission.fee_code === feeCode) {\n return remission;\n }\n }\n }\n return null;\n }\n\n chkIssueRefundBtnEnable(payment: IPayment): boolean {\n if (this.check4AllowedRoles2AccessRefund() && this.allowFurtherAccessAfter4Days(payment) &&\n payment.method === 'payment by account' && payment.status.toLocaleLowerCase() === 'success') {\n this.isIssueRefunfBtnEnable = true;\n }\n if (this.isIssueRefunfBtnEnable) {\n return true;\n } else {\n return false;\n };\n }\n\n chkForPBAPayment(): boolean {\n if (this.paymentGroup !== null && this.paymentGroup !== undefined) {\n let payment = this.paymentGroup.payments[0];\n if (payment.method.toLocaleLowerCase() === 'payment by account' && this.allowFurtherAccessAfter4Days(payment)) {\n return true;\n }\n return false;\n }\n }\n\n chkForAddRemission(feeCode: string): boolean {\n if (this.chkForPBAPayment() && this.check4AllowedRoles2AccessRefund() && this.allowFurtherAccessAfter4Days(this.paymentGroup.payments[0])) {\n if (this.paymentGroup.remissions && this.paymentGroup.remissions.length > 0) {\n for (const remission of this.paymentGroup.remissions) {\n if (remission.fee_code === feeCode) {\n return false;\n }\n }\n return true;\n }\n return true;\n\n } else {\n return false;\n }\n }\n\n check4AllowedRoles2AccessRefund = (): boolean => {\n return this.allowedRolesToAccessRefund.some(role =>\n this.LOGGEDINUSERROLES.indexOf(role) !== -1\n );\n }\n\n allowFurtherAccessAfter4Days = (payment: IPayment): boolean => {\n if(payment !== null && payment !== undefined) {\n let tmp4DayAgo = new Date();\n tmp4DayAgo.setDate(tmp4DayAgo.getDate() - 4);\n return tmp4DayAgo >= new Date(payment.date_created);\n }\n }\n\n resetOrderData() {\n this.OrderslistService.setOrderRef(null);\n this.OrderslistService.setorderCCDEvent(null);\n this.OrderslistService.setorderCreated(null);\n this.OrderslistService.setorderDetail(null);\n this.OrderslistService.setorderParty(null);\n this.OrderslistService.setorderTotalPayments(null);\n this.OrderslistService.setorderRemissionTotal(null);\n this.OrderslistService.setorderFeesTotal(null);\n }\n\n goToPaymentFailuePage(payment: any) {\n this.viewStatus = 'payment-failure';\n this.selectedPaymentsStatus = payment;\n }\n goBackToPaymentView(event: any) {\n event.preventDefault();\n this.viewStatus = 'paymentview';\n }\n}\n","import { Injectable } from '@angular/core';\nimport {HttpClient, HttpHeaders} from '@angular/common/http';\nimport { Meta } from '@angular/platform-browser';\nimport {ErrorHandlerService} from '../shared/error-handler.service';\nimport { WebComponentHttpClient } from '../shared/httpclient/webcomponent.http.client';\nimport {PaymentLibService} from '../../payment-lib.service';\nimport {Observable} from 'rxjs/Observable';\nimport {catchError} from 'rxjs/operators';\nimport { IRefundReasons } from '../../interfaces/IRefundReasons';\nimport { IPatchRefundAction } from '../../interfaces/IPatchRefundAction';\nimport { IRefundList } from '../../interfaces/IRefundList';\nimport { IssueRefundRequest } from '../../interfaces/IssueRefundRequest';\nimport { IResubmitRefundRequest } from '../../interfaces/IResubmitRefundRequest';\nimport { IRefundStatusHistory } from '../../interfaces/IRefundStatusHistory';\n@Injectable({\n providedIn: 'root'\n})\nexport class RefundsService {\n\n constructor(private http: HttpClient,\n private https: WebComponentHttpClient,\n private errorHandlerService: ErrorHandlerService,\n private paymentLibService: PaymentLibService,\n private meta: Meta\n ) { }\n\n getRefundReasons(): Observable<IRefundReasons[]> {\n return this.http.get<IRefundReasons[]>(`${this.paymentLibService.REFUNDS_API_ROOT}/reasons`, {\n withCredentials: true\n })\n .pipe(\n catchError(this.errorHandlerService.handleError)\n );\n }\n\n getRefundRejectReasons(): Observable<any> {\n return this.http.get<any>(`${this.paymentLibService.REFUNDS_API_ROOT}/rejection-reasons`, {\n withCredentials: true\n })\n .pipe(\n catchError(this.errorHandlerService.handleError)\n );\n }\n\n getRefundActions(refundReference: string): Observable<any> {\n return this.http.get<any>(`${this.paymentLibService.REFUNDS_API_ROOT}/${refundReference}/actions`, {\n withCredentials: true\n })\n .pipe(\n catchError(this.errorHandlerService.handleError)\n );\n }\n\npatchRefundActions(body:IPatchRefundAction, refundReference: string, reviewerAction: string): Observable<any> {\n // const opts = this.addHeaders({});\n return this.https.patch(`${this.paymentLibService.REFUNDS_API_ROOT}/${refundReference}/action/${reviewerAction}`, body)\n .pipe(\n catchError(this.errorHandlerService.handleError)\n );\n}\n\ngetRefundList(refundstatus?: string, selfexclusive?:boolean): Observable<IRefundList[]> {\n return this.http.get<IRefundList[]>(`${this.paymentLibService.REFUNDS_API_ROOT}?status=${refundstatus}&excludeCurrentUser=${selfexclusive}`, \n {\n withCredentials: true\n})\n .pipe(\n catchError(this.errorHandlerService.handleError)\n );\n}\n\ngetRefundStatusHistory(reference?: string) {\n return this.http.get<IRefundStatusHistory>(`${this.paymentLibService.REFUNDS_API_ROOT}/${reference}/status-history`, \n {\n withCredentials: true\n})\n .pipe(\n catchError(this.errorHandlerService.handleError)\n );\n}\n\ngetRefundStatusList(ccdCaseNumber:string): Observable<IRefundList[]> {\n return this.http.get<IRefundList[]>(`${this.paymentLibService.REFUNDS_API_ROOT}?ccdCaseNumber=${ccdCaseNumber}`, {\n withCredentials: true\n})\n .pipe(\n catchError(this.errorHandlerService.handleError)\n );\n}\n\ngetUserDetails(): Observable<any> {\n return this.http.get<any>(`${this.paymentLibService.REFUNDS_API_ROOT}/get-user-details`, {\n withCredentials: true\n })\n .pipe(\n catchError(this.errorHandlerService.handleError)\n );\n}\n \npostIssueRefund(body: IssueRefundRequest): Observable<any> {\n return this.https.post(`${this.paymentLibService.REFUNDS_API_ROOT}/refund`, body).pipe(\n catchError(this.errorHandlerService.handleError)\n );\n}\n\npatchResubmitRefund(body: IResubmitRefundRequest, refund_reference: string): Observable<any> {\n // const opts = this.addHeaders({});\n return this.https.patch(`${this.paymentLibService.REFUNDS_API_ROOT}/resubmit/${refund_reference}`, body).pipe(\n catchError(this.errorHandlerService.handleError)\n );\n}\n\naddHeaders(options: any): any {\n const csrfToken = this.meta.getTag('name=csrf-token');\n const headers = {};\n if (options.headers) {\n options.headers.forEach(element => {\n headers[element] = options.headers.get(element);\n });\n }\n headers['X-Requested-With'] = 'XMLHttpRequest';\n if (csrfToken.content === null) {\n if( document.cookie.split(';').find(row => row.startsWith('XSRF-TOKEN')) !== undefined ) {\n headers['CSRF-Token'] = document.cookie.split(';').find(row => row.startsWith('XSRF-TOKEN')).split('=')[1]; \n } else {\n headers['CSRF-Token'] = document.cookie.split(';').find(row => row.startsWith(' XSRF-TOKEN')).split('=')[1];\n }\n } else {\n headers['CSRF-Token'] = csrfToken.content;\n }\n options.headers = new HttpHeaders(headers);\n options.responseType = 'text';\n return options;\n}\n}\n","import {Component, OnInit, Input} from '@angular/core';\nimport { FormBuilder, FormGroup, Validators, FormControl } from '@angular/forms';\nimport {RefundsService} from '../../services/refunds/refunds.service';\nimport { IRefundAction } from '../../interfaces/IRefundAction';\nimport { IRefundList } from '../../interfaces/IRefundList';\nimport { IRefundRejectReason } from '../../interfaces/IRefundRejectReason';\nimport { OrderslistService } from '../../services/orderslist.service';\nimport { PaymentLibComponent } from '../../payment-lib.component';\nimport { ActivatedRoute,Router } from '@angular/router';\n\n@Component({\n selector: 'ccpay-process-refund',\n templateUrl: './process-refund.component.html',\n styleUrls: ['./process-refund.component.css']\n})\nexport class ProcessRefundComponent implements OnInit {\n @Input() refundReference: string;\n @Input() refundlistsource: IRefundList;\n\n processRefundForm: FormGroup;\n\n errorMessage = this.getErrorMessage(false, '', '', '');\n sendmeback: string = null;\n viewStatus: string;\n refundActionList: IRefundAction[] = []; \n refundRejectReasonList: IRefundRejectReason[] = []; \n isSendMeBackClicked: boolean = false;\n isRejectClicked: boolean = false;\n isOtherClicked: boolean = false;\n isSuccesspageEnable: boolean = false;\n\n refundActionsHasError: boolean = false;\n refundRejectReasonHasError: boolean = false;\n isReasonFieldEmpty: boolean = false;\n isReasonFieldInvalid: boolean = false;\n reasonFieldMinHasError: boolean = false;\n reasonFieldMaxHasError: boolean = false;\n isReasonEmpty: boolean = false;\n isReasonInvalid: boolean = false;\n successMsg: string = null;\n navigationpage: string;\n ccdCaseNumber: string;\n isFromRefundListPage: boolean;\n\n isConfirmButtondisabled: boolean = true;\n constructor(private RefundsService: RefundsService,\n private formBuilder: FormBuilder,\n private OrderslistService: OrderslistService,\n private paymentLibComponent: PaymentLibComponent,\n private router: Router,\n private activeRoute: ActivatedRoute) {\n }\n\n ngOnInit() {\n this.viewStatus = 'RefundProcess';\n this.RefundsService.getRefundActions(this.refundReference).subscribe(\n refundActionList => {\n this.refundActionList = <any>refundActionList;\n },\n err => {\n this.errorMessage = this.getErrorMessage(true, err.statusCode, err.err, err);\n }\n );\n this.processRefundForm = this.formBuilder.group({\n refundActionField: new FormControl('', Validators.compose([\n Validators.required\n ])),\n refundRejectReasonField: new FormControl('', Validators.compose([\n Validators.required\n ])),\n sendMeBackField: new FormControl('', Validators.compose([\n Validators.required,\n Validators.minLength(3),\n Validators.maxLength(255),\n Validators.pattern('^([a-zA-Z0-9\\\\s,\\\\.]*)$'),\n\n ])),\n enterReasonField: new FormControl('', Validators.compose([\n Validators.required,\n Validators.maxLength(30),\n Validators.pattern('^([a-zA-Z0-9.\\\\s]*)$'),\n ])),\n });\n this.ccdCaseNumber = this.refundlistsource.ccd_case_number;\n\n if((typeof this.paymentLibComponent.TAKEPAYMENT === 'string' && this.paymentLibComponent.TAKEPAYMENT === 'false') || (typeof this.paymentLibComponent.TAKEPAYMENT === 'boolean' && !this.paymentLibComponent.TAKEPAYMENT) ) {\n this.isFromRefundListPage = true;\n }\n }\n checkRefundActions(code: string) {\n this.refundActionsHasError = false;\n this.isReasonFieldEmpty = false;\n this.isReasonEmpty = false;\n this.isReasonInvalid = false;\n this.refundRejectReasonHasError = false;\n if(code === 'Return to caseworker') {\n this.isConfirmButtondisabled = true;\n this.isSendMeBackClicked = true;\n this.isRejectClicked = false;\n this.isOtherClicked = false;\n\n } else if (code === 'Approve') {\n this.isSendMeBackClicked = false;\n this.isConfirmButtondisabled = false;\n this.isRejectClicked = false;\n this.isOtherClicked = false;\n\n } else if (code === 'Reject') {\n this.isRejectClicked = true;\n this.isSendMeBackClicked = false;\n this.isOtherClicked = false;\n this.RefundsService.getRefundRejectReasons().subscribe(\n refundRejectReasonList => {\n this.refundRejectReasonList = <any>refundRejectReasonList;\n },\n err => {\n this.errorMessage = this.getErrorMessage(true, err.statusCode, err.err, err);\n }\n );\n } else if (code === 'RE005') {\n this.isOtherClicked = true;\n } else if (code !== 'RE005') {\n this.isOtherClicked = false;\n }\n }\n processRefundSubmit() {\n let processRefundRequest;\n let status;\n this.resetForm([false, false, false, false, false, false, false, false], 'all');\n const controls = this.processRefundForm.controls;\n const processFormError = controls.sendMeBackField.errors;\n\n if (this.processRefundForm.dirty && controls.refundActionField.valid \n && (controls.refundActionField.value == 'Approve'\n || (controls.refundActionField.value == 'Reject' && controls.refundRejectReasonField.valid && controls.refundRejectReasonField.value != 'RE005')\n || (controls.refundActionField.value == 'Reject' && controls.refundRejectReasonField.value == 'RE005' && controls.enterReasonField.valid)\n || (controls.refundActionField.value == 'Return to caseworker' && controls.sendMeBackField.valid))) {\n if (controls.refundActionField.value === 'Approve'){\n status = 'APPROVE';\n processRefundRequest = {\n code:'',\n reason: ''\n };\n } else if (controls.refundActionField.value === 'Reject') {\n status = 'REJECT';\n\n processRefundRequest = {\n code: controls.refundRejectReasonField.value ? controls.refundRejectReasonField.value : '',\n reason: controls.refundRejectReasonField.value == 'RE005' ? controls.enterReasonField.value : ''\n };\n } else if (controls.refundActionField.value === 'Return to caseworker') {\n status = 'SENDBACK';\n\n processRefundRequest = {\n code: '',\n reason: controls.sendMeBackField.value\n };\n }\n this.RefundsService.patchRefundActions(processRefundRequest, this.refundReference, status).subscribe(\n response => {\n this.isSuccesspageEnable = true;\n // this.successMsg = JSON.parse(response)['data'];\n this.successMsg = response.replace(/['\"]+/g, '');\n },\n err => {\n this.errorMessage = this.getErrorMessage(true, err.statusCode, err.err, err);\n }\n );\n } else {\n if(controls.refundActionField.value == \"\") {\n this.resetForm([true, false, false, false, false, false, false, false], 'action');\n }\n if(controls.refundActionField.value == 'Reject' && controls.refundRejectReasonField.value == \"\") {\n this.resetForm([false, true, false, false, false, false, false, false], 'rejectReason');\n }\n if(controls.refundActionField.value == 'Return to caseworker') {\n if(controls.sendMeBackField.value == '' ) {\n this.resetForm([false, false, true, false, false, false, false, false], 'addAreason');\n }\n if(controls.sendMeBackField.value != '' && controls.sendMeBackField.invalid ) {\n this.resetForm([false, false, false, true, false, false, false, false], 'addAreason');\n }\n if(processFormError && processFormError.minlength && processFormError.minlength.actualLength < 3 ) {\n this.resetForm([false, false, false, false, true, false, false, false], 'addAreason');\n }\n if(processFormError && processFormError.maxlength && processFormError.maxlength.actualLength > 255 ) {\n this.resetForm([false, false, false, false, false, true, false, false], 'addAreason');\n }\n }\n if(controls.refundActionField.value == 'Reject' && controls.refundRejectReasonField.value == 'RE005') {\n if(controls.enterReasonField.value === \"\") {\n this.resetForm([false, false, false, false, false, false, true, false], 'enterReason');\n }\n if(controls.enterReasonField.value!== \"\" && controls.enterReasonField.invalid) {\n this.resetForm([false, false, false, false, false, false, false, true], 'enterReason');\n }\n }\n }\n\n }\n getErrorMessage(isErrorExist, status, errorMsg, err) {\n let bodyTxt = 'Please try again later';\n if (status !== 500) {\n if (errorMsg !== undefined) {\n bodyTxt = errorMsg;\n } else {\n bodyTxt = err;\n }\n \n }\n return {\n title: 'Something went wrong',\n body: bodyTxt,\n showError: isErrorExist\n };\n }\n loadRefundListPage() {\n this.OrderslistService.getnavigationPageValue().subscribe((data) => this.navigationpage = data);\n if (this.navigationpage === 'casetransactions') {\n // window.location.href='/refund-list?takePayment=false&refundlist=true';\n // // this.OrderslistService.setnavigationPage('casetransactions');\n // // this.OrderslistService.setisFromServiceRequestPage(false);\n // // this.paymentLibComponent.VIEW ='case-transactions';\n // // this.paymentLibComponent.viewName = 'case-transactions';\n // // this.paymentLibComponent.ISBSENABLE = true;\n // // this.paymentLibComponent.isRefundStatusView = false;\n this.paymentLibComponent.viewName = 'refundstatuslist';\n this.paymentLibComponent.isRefundStatusView = true;\n } else {\n this.paymentLibComponent.viewName = 'refundstatuslist';\n this.paymentLibComponent.isRefundStatusView = true;\n }\n }\n loadRefundsHomePage() {\n if(typeof this.paymentLibComponent.TAKEPAYMENT === 'string' && this.paymentLibComponent.TAKEPAYMENT === 'false') {\n //window.location.href='/refund-list?takePayment=false&refundlist=true';\n this.paymentLibComponent.viewName = 'refund-list';\n }\n else {\n this.OrderslistService.setnavigationPage('casetransactions');\n this.OrderslistService.setisFromServiceRequestPage(false);\n this.paymentLibComponent.VIEW ='case-transactions';\n this.paymentLibComponent.viewName = 'case-transactions';\n this.paymentLibComponent.ISBSENABLE = true;\n this.paymentLibComponent.isRefundStatusView = false;\n }\n }\n redirecttoRefundListPage() {\n if((typeof this.paymentLibComponent.TAKEPAYMENT === 'string' && this.paymentLibComponent.TAKEPAYMENT === 'false') || (typeof this.paymentLibComponent.TAKEPAYMENT === 'boolean' && !this.paymentLibComponent.TAKEPAYMENT) ) {\n // window.location.href='/refund-list?takePayment=false&refundlist=true';\n this.paymentLibComponent.viewName = 'refund-list';\n }\n else {\n this.loadRefundListPage();\n }\n }\n // loadCaseTransactionPage() {\n // this.paymentLibComponent.isRefundStatusView = false;\n // this.paymentLibCo}mponent.TAKEPAYMENT = true;\n // this.paymentLibComponent.viewName = 'case-transactions';\n // this.paymentViewService.getBSfeature().subscribe(\n // features => {\n // let result = JSON.parse(features).filter(feature => feature.uid === BS_ENABLE_FLAG);\n // this.paymentLibComponent.ISBSENABLE = result[0] ? result[0].enable : false;\n // },\n // err => {\n // this.paymentLibComponent.ISBSENABLE = false;\n // }\n // );\n\n // let partUrl = `selectedOption=${this.paymentLibComponent.SELECTED_OPTION}`;\n // partUrl += this.bsPaymentDcnNumber ? `&dcn=${this.bsPaymentDcnNumber}` : '';\n // partUrl += this.paymentLibComponent.ISBSENABLE ? '&isBulkScanning=Enable' : '&isBulkScanning=Disable';\n // partUrl += this.paymentLibComponent.ISTURNOFF ? '&isTurnOff=Enable' : '&isTurnOff=Disable';\n // partUrl += this.paymentLibComponent.ISSFENABLE ? '&isStFixEnable=Enable' : '&isStFixEnable=Disable';\n // partUrl += `&caseType=${this.paymentLibComponent.CASETYPE}`;\n // partUrl += this.isNewPcipalOff ? '&isNewPcipalOff=Enable' : '&isNewPcipalOff=Disable';\n // partUrl += this.isOldPcipalOff ? '&isOldPcipalOff=Enable' : '&isOldPcipalOff=Disable';\n // let url = `/payment-history/${this.ccdCaseNumber}?view=case-transactions&takePayment=true&${partUrl}`;\n // this.router.navigateByUrl(url);\n // }\n\n resetForm(vals, field) {\n if(field==='action' || field==='all') {\n this.refundActionsHasError = vals[0];\n }\n if(field==='rejectReason' || field==='all') {\n this.refundRejectReasonHasError = vals[1];\n }\n if(field==='addAreason' || field==='all') {\n this.isReasonFieldEmpty = vals[2];\n this.isReasonFieldInvalid = vals[3];\n this.reasonFieldMinHasError = vals[4];\n this.reasonFieldMaxHasError = vals[5];\n }\n if(field==='enterReason' || field==='all') {\n this.isReasonEmpty = vals[6];\n this.isReasonInvalid = vals[7];\n }\n }\n\n goToCaseReview() {\n this.router.navigate([`/cases/case-details/${this.ccdCaseNumber}`], {relativeTo: this.activeRoute});\n }\n}\n","import {Component, OnInit, Input} from '@angular/core';\nimport { RefundsService } from '../../services/refunds/refunds.service';\nimport { IRefundList } from '../../interfaces/IRefundList';\n\n@Component({\n selector: 'ccpay-refund-list',\n templateUrl: './refund-list.component.html',\n styleUrls: ['./refund-list.component.css']\n})\nexport class RefundListComponent implements OnInit {\n @Input('USERID') USERID: string;\n @Input('LOGGEDINUSERROLES') LOGGEDINUSERROLES: any[];\n @Input('LOGGEDINUSEREMAIL') LOGGEDINUSEREMAIL:string;\n\n constructor(private refundService: RefundsService) {\n }\n\n tableApprovalHeader: string;\n tableRejectedHeader: string;\n submittedRefundList: IRefundList[] = [];\n rejectedRefundList: IRefundList[] = [];\n approvalStatus = 'Sent for approval';\n rejectStatus = 'Update required';\n // approvalStatus = 'sent for approval';\n // rejectStatus = 'sent back';\n errorMessage = null;\n isApproveTableVisible:boolean;\n isRejectTableVisible:boolean;\n dropdownvalue: string;\n isAuthorized: boolean = true;\n userLst\n ngOnInit() {\n \n this.userLst = this.LOGGEDINUSERROLES;\n\n \n if(this.LOGGEDINUSERROLES.some(i =>i.includes('payments-refund-approver'))){\n this.isAuthorized = true;\n } else {\n this.isApproveTableVisible = false;\n this.isAuthorized = false;\n }\n\n \n this.tableApprovalHeader = 'Refunds to be approved';\n this.tableRejectedHeader = 'Refunds returned to caseworker';\n\n if(this.isAuthorized) {\n this.refundService.getRefundList(this.approvalStatus,true).subscribe(\n refundList => {\n this.submittedRefundList = refundList['refund_list'];\n this.isApproveTableVisible = true;\n }\n ),\n (error: any) => {\n this.errorMessage = error.replace(/\"/g,\"\");\n };\n }\n\n this.refundService.getRefundList(this.rejectStatus,false).subscribe(\n refundList => {\n this.rejectedRefundList = refundList['refund_list'];\n this.isRejectTableVisible = true;\n }\n ),\n (error: any) => {\n this.errorMessage = error.replace(/\"/g,\"\");\n };\n\n }\n \n}","import { Injectable } from '@angular/core';\nimport {HttpClient} from '@angular/common/http';\nimport {Observable} from 'rxjs/internal/Observable';\n\nimport {ICardDetails} from '../../interfaces/ICardDetails';\nimport {PaymentLibService} from '../../payment-lib.service';\nimport { catchError } from 'rxjs/operators';\nimport { ErrorHandlerService } from '../shared/error-handler.service';\nimport { LoggerService } from '../shared/logger/logger.service';\n\n\n@Injectable({\n providedIn: 'root'\n})\nexport class CardDetailsService {\n\n constructor(private http: HttpClient,\n private logger: LoggerService,\n private errorHandlerService: ErrorHandlerService,\n private paymentLibService: PaymentLibService) { }\n\n getCardDetails(paymentReference: string): Observable<ICardDetails> {\n this.logger.info('Card-detail-service getCardDetails for: ', paymentReference);\n\n return this.http.get<ICardDetails>(`${this.paymentLibService.API_ROOT}/card-payments/${paymentReference}/details`, {\n withCredentials: true\n })\n .pipe(\n catchError(this.errorHandlerService.handleError)\n );\n }\n}\n","import { Component, OnInit } from '@angular/core';\nimport { CardDetailsService } from '../../services/card-details/card-details.service';\nimport {ICardDetails} from '../../interfaces/ICardDetails';\nimport { PaymentLibComponent } from '../../payment-lib.component';\n\n@Component({\n selector: 'ccpay-card-details',\n templateUrl: './card-details.component.html',\n styleUrls: ['./card-details.component.css']\n})\nexport class CardDetailsComponent implements OnInit {\n pageTitle: string = 'Card details';\n cardDetails: ICardDetails;\n paymentReference: string;\n errorMessage: string;\n\n constructor(private cardDetailsService: CardDetailsService,\n private paymentLibComponent: PaymentLibComponent) { }\n\n ngOnInit() {\n this.cardDetailsService.getCardDetails(this.paymentLibComponent.paymentReference).subscribe(\n cardDetails => this.cardDetails = cardDetails,\n (error: any) => this.errorMessage = <any>error\n );\n }\n\n get getPaymentReference(): string {\n return this.paymentReference;\n }\n\n}\n","import { Component } from '@angular/core';\n\n@Component({\n template: `\n <h1>This is not the page you were looking for!</h1>\n `\n})\nexport class PageNotFoundComponent { }\n","import { Injectable } from '@angular/core';\nimport { PaymentLibService } from '../../payment-lib.service';\nimport { HttpClient } from '@angular/common/http';\nimport { IStatusHistories } from '../../interfaces/IStatusHistories';\nimport { Observable } from 'rxjs/internal/Observable';\nimport { ErrorHandlerService } from '../shared/error-handler.service';\nimport { catchError } from 'rxjs/operators';\nimport { LoggerService } from '../shared/logger/logger.service';\n\n\n@Injectable({\n providedIn: 'root'\n})\nexport class StatusHistoryService {\n\n constructor(private http: HttpClient,\n private logger: LoggerService,\n private errorHandlerService: ErrorHandlerService,\n private paymentLibService: PaymentLibService) { }\n\n getPaymentStatusesByReference(paymentReference: string, paymentMethod: string): Observable<IStatusHistories> {\n this.logger.info('Status-history-service getPaymentStatusesByReference for: ', paymentReference);\n\n return this.http.get<IStatusHistories>(paymentMethod === 'card' || paymentMethod === 'cash' || paymentMethod === 'cheque' || paymentMethod === 'postal order' ?\n `${this.paymentLibService.API_ROOT}/card-payments/${paymentReference}/statuses` :\n `${this.paymentLibService.API_ROOT}/credit-account-payments/${paymentReference}/statuses`, {\n withCredentials: true\n })\n .pipe(\n catchError(this.errorHandlerService.handleError)\n );\n }\n}\n","import { Component, OnInit, Input } from '@angular/core';\nimport { IStatusHistories } from '../../interfaces/IStatusHistories';\nimport { StatusHistoryService } from '../../services/status-history/status-history.service';\nimport { PaymentLibComponent } from '../../payment-lib.component';\n\n@Component({\n selector: 'ccpay-payment-statuses',\n templateUrl: './status-history.component.html',\n styleUrls: ['./status-history.component.css']\n})\nexport class StatusHistoryComponent implements OnInit {\n @Input() isTakePayment: boolean;\n pageTitle: string = 'Payment status history';\n statuses: IStatusHistories;\n errorMessage: string;\n\n constructor(private statusHistoryService: StatusHistoryService,\n private paymentLibComponent: PaymentLibComponent) { }\n\n ngOnInit() {\n this.statusHistoryService.getPaymentStatusesByReference(this.paymentLibComponent.paymentReference, this.paymentLibComponent.paymentMethod).subscribe(\n statuses => this.statuses = statuses,\n (error: any) => this.errorMessage = <any>error.replace(/\"/g,\"\")\n );\n \n }\n\n}\n","import { Component, Input, OnInit } from '@angular/core';\nimport { IPayment } from '../../interfaces/IPayment';\n\n@Component({\n selector: 'ccpay-pba-details',\n templateUrl: './pba-details.component.html',\n styleUrls: ['./pba-details.component.css']\n})\nexport class PbaDetailsComponent implements OnInit {\n @Input() payment: IPayment;\n\n constructor() { }\n\n ngOnInit() {\n }\n\n}\n","import { Injectable } from '@angular/core';\nimport { Logger } from './logger.service';\n\nexport let isDebugMode = false;\n\nconst noop = (): any => undefined;\n\n@Injectable({\n providedIn: 'root'\n})\nexport class ConsoleLoggerService implements Logger {\n\n get info() {\n if (isDebugMode) {\n return console.info.bind(console);\n } else {\n return noop;\n }\n }\n\n get warn() {\n if (isDebugMode) {\n return console.warn.bind(console);\n } else {\n return noop;\n }\n }\n\n get error() {\n if (isDebugMode) {\n return console.error.bind(console);\n } else {\n return noop;\n }\n }\n\n invokeConsoleMethod(type: string, args?: any): void {\n const logFn: Function = (console)[type] || console.log || noop;\n logFn.apply(console, [args]);\n }\n}\n","import { Injectable } from '@angular/core';\nimport {HttpClient} from '@angular/common/http';\nimport {LoggerService} from '../shared/logger/logger.service';\nimport {ErrorHandlerService} from '../shared/error-handler.service';\nimport {PaymentLibService} from '../../payment-lib.service';\nimport {Observable} from 'rxjs/Observable';\nimport {IPaymentGroup} from '../../interfaces/IPaymentGroup';\nimport {catchError} from 'rxjs/operators';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class CaseTransactionsService {\n\n constructor(private http: HttpClient,\n private logger: LoggerService,\n private errorHandlerService: ErrorHandlerService,\n private paymentLibService: PaymentLibService\n ) { }\n\n getPaymentGroups(ccdCaseNumber: string): Observable<IPaymentGroup[]> {\n this.logger.info('Case-transactions-service getPaymentGroups for: ', ccdCaseNumber);\n\n return this.http.get<IPaymentGroup[]>(`${this.paymentLibService.API_ROOT}/cases/${ccdCaseNumber}/paymentgroups`, {\n withCredentials: true\n })\n .pipe(\n catchError(this.errorHandlerService.handleError)\n );\n }\n}\n","import { Injectable } from '@angular/core';\nimport {HttpClient} from '@angular/common/http';\nimport {ErrorHandlerService} from '../shared/error-handler.service';\nimport { WebComponentHttpClient } from '../shared/httpclient/webcomponent.http.client';\nimport {PaymentLibService} from '../../payment-lib.service';\nimport {Observable} from 'rxjs/Observable';\nimport {catchError} from 'rxjs/operators';\nimport { IBSPayments } from '../../interfaces/IBSPayments';\nimport { AllocatePaymentRequest } from '../../interfaces/AllocatePaymentRequest';\nimport { IPaymentGroup } from '../../interfaces/IPaymentGroup';\n\n\n@Injectable({\n providedIn: 'root'\n})\nexport class BulkScaningPaymentService {\n\n constructor(private http: HttpClient,\n private https: WebComponentHttpClient,\n private errorHandlerService: ErrorHandlerService,\n private paymentLibService: PaymentLibService\n ) { }\n\n getBSPaymentsByCCD(ccdCaseNumber: string): Observable<IBSPayments> {\n return this.http.get<IBSPayments>(`${this.paymentLibService.BULKSCAN_API_ROOT}/cases/${ccdCaseNumber}`, {\n withCredentials: true\n })\n .pipe(\n catchError(this.errorHandlerService.handleError)\n );\n }\n getBSPaymentsByDCN(dcn: string): Observable<IBSPayments> {\n return this.http.get<IBSPayments>(`${this.paymentLibService.BULKSCAN_API_ROOT}/cases?document_control_number=${dcn}`, {\n withCredentials: true\n })\n .pipe(\n catchError(this.errorHandlerService.handleError)\n );\n }\n postBSAllocatePayment(body: AllocatePaymentRequest, paymentRef: string): Observable<any> {\n return this.https.post(`${this.paymentLibService.API_ROOT}/payment-groups/${paymentRef}/bulk-scan-payments`, body).pipe(\n catchError(this.errorHandlerService.handleError)\n );\n }\n postBSPaymentStrategic(body: AllocatePaymentRequest, paymentGroupRef: string): Observable<any> {\n return this.https.post(`${this.paymentLibService.API_ROOT}/payment-groups/${paymentGroupRef}/bulk-scan-payments-strategic`, body).pipe(\n catchError(this.errorHandlerService.handleError)\n );\n }\n postBSWoPGStrategic(body: AllocatePaymentRequest): Observable<any> {\n return this.https.post(`${this.paymentLibService.API_ROOT}/payment-groups/bulk-scan-payments-strategic`, body).pipe(\n catchError(this.errorHandlerService.handleError)\n );\n }\n patchBSChangeStatus(dcnNumber: string, status: string): Observable<any> {\n return this.https.patch(`${this.paymentLibService.API_ROOT}/bulk-scan-payments/${dcnNumber}/status/${status}`, status).pipe(\n catchError(this.errorHandlerService.handleError)\n );\n }\n calculateOutStandingAmount(paymentGroup: IPaymentGroup): number {\n let feesTotal = 0.00,\n paymentsTotal = 0.00,\n remissionsTotal = 0.00;\n\n if (paymentGroup.fees) {\n paymentGroup.fees.forEach(fee => {\n feesTotal = feesTotal + fee.calculated_amount;\n });\n }\n\n if (paymentGroup.payments) {\n paymentGroup.payments.forEach(payment => {\n if (payment.status.toUpperCase() === 'SUCCESS') {\n paymentsTotal = paymentsTotal + payment.amount;\n }\n });\n }\n\n if (paymentGroup.remissions) {\n paymentGroup.remissions.forEach(remission => {\n remissionsTotal = remissionsTotal + remission.hwf_amount;\n });\n } \n return (feesTotal - remissionsTotal) - paymentsTotal;\n }\n\n removeUnwantedString(input: string, replaceText: string) {\n const pattern = /[\\_]/gi;\n return input.replace(pattern, replaceText);\n }\n\n downloadSelectedReport(reportName: string, startDate: string, endDate:string): Observable<any> {\n return this.https.get(`${this.paymentLibService.BULKSCAN_API_ROOT}/report/data?date_from=${startDate}&date_to=${endDate}&report_type=${reportName}`, {\n withCredentials: true\n })\n .pipe(\n catchError(this.errorHandlerService.handleError)\n );\n}\n}\n","import { Component, OnInit, Input } from '@angular/core';\nimport { PaymentLibComponent } from '../../payment-lib.component';\nimport { IPaymentGroup } from '../../interfaces/IPaymentGroup';\nimport { CaseTransactionsService } from '../../services/case-transactions/case-transactions.service';\nimport { BulkScaningPaymentService } from '../../services/bulk-scaning-payment/bulk-scaning-payment.service';\nimport { PaymentViewService } from '../../services/payment-view/payment-view.service';\nimport { OrderslistService } from '../../services/orderslist.service';\nimport { IFee } from '../../interfaces/IFee';\nimport { IPayment } from '../../interfaces/IPayment';\nimport { IRemission } from '../../interfaces/IRemission';\nimport { IPaymentView } from '../../interfaces/IPaymentView';\nimport { IOrderReferenceFee } from '../../interfaces/IOrderReferenceFee';\nimport { Router } from '@angular/router';\n\nconst BS_ENABLE_FLAG = 'bulk-scan-enabling-fe';\n\n@Component({\n selector: 'ccpay-case-transactions',\n templateUrl: './case-transactions.component.html',\n styleUrls: ['./case-transactions.component.css']\n})\nexport class CaseTransactionsComponent implements OnInit {\n @Input('LOGGEDINUSERROLES') LOGGEDINUSERROLES: string[];\n @Input() isTakePayment: boolean;\n takePayment: boolean;\n ccdCaseNumber: string;\n excReference: string;\n paymentGroups: any[] = [];\n payments: IPayment[] = [];\n nonPayments: IPayment[] = [];\n allPayments: IPayment[] = [];\n remissions: IRemission[] = [];\n fees: IFee[] = [];\n errorMessage: string;\n totalFees: number;\n totalPayments: number = 0;\n totalNonOffPayments: number;\n totalRemissions: number = 0;\n selectedOption: string;\n dcnNumber: string;\n paymentRef: string;\n isTurnOff: boolean;\n isRefundRemission: boolean = true;\n isStrategicFixEnable: boolean;\n isAddFeeBtnEnabled: boolean = true;\n isExceptionRecord: boolean = false;\n isUnprocessedRecordSelected: boolean = false;\n exceptionRecordReference: string;\n isAnyFeeGroupAvilable: boolean = true;\n isHistoricGroupAvailable: boolean = false;\n isBulkScanEnable;\n isRemissionsMatch: boolean;\n viewStatus = 'main';\n isRemoveBtnDisabled: boolean = false;\n feeId: IFee;\n clAmountDue: number = 0;\n unprocessedRecordCount: number;\n isFeeRecordsExist: boolean = false;\n isGrpOutstandingAmtPositive: boolean = false;\n totalRefundAmount: number;\n caseType: String;\n // lsCcdNumber: any = ls.get<any>('ccdNumber');\n payment: IPayment;\n paymentGroup: IPaymentGroup;\n paymentView: IPaymentView;\n\n //Order changes\n orderDetail: any[] = [];\n\n isAddRemissionEnable: boolean = false;\n orderRemissionDetails: any[] = [];\n orderLevelFees: IOrderReferenceFee[] = [];\n ispaymentGroupApisuccess: boolean = false;\n cpoDetails: any = null;\n orderRef: string;\n orderStatus: string;\n orderParty: string;\n orderCreated: Date;\n orderCCDEvent: string;\n serviceRequestValue: string;\n orderAddBtnEnable: boolean;\n orderFeesTotal: number = 0.00;\n orderRemissionTotal: number = 0.00;\n orderTotalPayments: number = 0.00;\n orderPendingPayments: number = 0.00;\n isCPODown: boolean;\n test: boolean;\n isPBA: boolean = false;\n isIssueRefunfBtnEnable: boolean = false;\n isAddRemissionBtnEnabled: boolean = false;\n isRefundRemissionBtnEnable: boolean = false;\n allowedRolesToAccessRefund = ['payments-refund-approver', 'payments-refund'];\n isEligible4PBAPayment = ['pui-finance-manager', 'pui-user-manager', 'pui-organisation-manager', 'pui-case-manager'];\n currentDate = new Date();\n isFromServiceRequestPage: boolean;\n navigationpage: string;\n remissionFeeAmt: number;\n constructor(private router: Router,\n private paymentViewService: PaymentViewService,\n private bulkScaningPaymentService: BulkScaningPaymentService,\n private caseTransactionsService: CaseTransactionsService,\n private paymentLibComponent: PaymentLibComponent,\n private OrderslistService: OrderslistService\n ) { }\n\n ngOnInit() {\n this.navigationpage = '';\n if(this.OrderslistService.getpaymentPageView() !== null) {\n this.OrderslistService.getpaymentPageView().subscribe((data) => this.paymentView = data);\n }\n if((this.LOGGEDINUSERROLES === undefined || this.LOGGEDINUSERROLES.length === 0 )&&this.OrderslistService.getUserRolesList() !== null) {\n this.OrderslistService.getUserRolesList().subscribe((data) => this.LOGGEDINUSERROLES = data);\n }\n if(this.OrderslistService.getnavigationPageValue() !== null) {\n this.OrderslistService.getnavigationPageValue().subscribe((data) => this.navigationpage = data);\n }\n\n if (this.paymentView !== undefined && this.paymentView !== null && this.paymentView.payment_group_reference !== undefined && this.navigationpage === 'paymentdetailspage') {\n this.goToPayementView(this.paymentView.payment_group_reference, this.paymentView.reference, this.paymentView.method);\n }\n this.isGrpOutstandingAmtPositive = false;\n this.ccdCaseNumber = this.paymentLibComponent.CCD_CASE_NUMBER;\n this.caseType = this.paymentLibComponent.CASETYPE;\n if (this.paymentLibComponent.CCD_CASE_NUMBER === '') {\n this.ccdCaseNumber = this.paymentLibComponent.EXC_REFERENCE;\n }\n this.excReference = this.paymentLibComponent.EXC_REFERENCE;\n this.takePayment = this.paymentLibComponent.TAKEPAYMENT;\n\n const serviceRequest = this.paymentLibComponent.SERVICEREQUEST;\n if ( serviceRequest !== undefined && serviceRequest.toString() === 'true' ) {\n this.serviceRequestValue = 'true';\n } else {\n this.serviceRequestValue = 'false';\n }\n this.isBulkScanEnable = this.paymentLibComponent.ISBSENABLE;\n this.dcnNumber = this.paymentLibComponent.DCN_NUMBER;\n this.selectedOption = this.paymentLibComponent.SELECTED_OPTION.toLocaleLowerCase();\n this.isTurnOff = this.paymentLibComponent.ISTURNOFF;\n this.isStrategicFixEnable = this.paymentLibComponent.ISSFENABLE;\n if (!this.isTurnOff) {\n // if (this.lsCcdNumber !== this.ccdCaseNumber) {\n // this.router.navigateByUrl(`/ccd-search?takePayment=true`);\n // }\n\n this.caseTransactionsService.getPaymentGroups(this.ccdCaseNumber).subscribe(\n paymentGroups => {\n this.isAnyFeeGroupAvilable =true;\n this.paymentGroups = paymentGroups['payment_groups'];\n this.calculateAmounts();\n this.calculateOrderFeesAmounts();\n this.calculateRefundAmount();\n if (this.isFromServiceRequestPage) {\n this.OrderslistService.getSelectedOrderRefId().subscribe((data) => this.orderRef = data);\n this.goToOrderViewDetailSection(this.orderRef);\n } else {\n this.paymentViewService.getPartyDetails(this.ccdCaseNumber).subscribe(\n response => {\n this.cpoDetails = JSON.parse(response).content[0];\n\n },\n (error: any) => {\n this.errorMessage = <any>error ? error.replace(/\"/g,\"\") : \"\";\n this.isCPODown = true;\n }\n );\n\n }\n\n\n },\n (error: any) => {\n this.errorMessage = <any>error ? error.replace(/\"/g,\"\") : \"\";\n this.isAnyFeeGroupAvilable = false;\n this.setDefaults();\n }\n );\n } else {\n this.caseTransactionsService.getPaymentGroups(this.ccdCaseNumber).subscribe(\n paymentGroups => {\n this.isAnyFeeGroupAvilable =true;\n this.paymentGroups = paymentGroups['payment_groups'];\n this.calculateAmounts();\n this.calculateOrderFeesAmounts();\n this.totalRefundAmount = this.calculateRefundAmount();\n this.paymentViewService.getPartyDetails(this.ccdCaseNumber).subscribe(\n response => {\n this.cpoDetails = JSON.parse(response).content[0];\n\n },\n (error: any) => {\n this.errorMessage = <any>error ? error.replace(/\"/g,\"\") : \"\";\n this.setDefaults();\n this.isCPODown = true;\n }\n );\n\n },\n (error: any) => {\n this.errorMessage = <any>error ? error.replace(/\"/g,\"\") : \"\";\n this.isAnyFeeGroupAvilable = false;\n this.setDefaults();\n }\n );\n }\n\n if( this.paymentGroups !== undefined) {\n this.checkForExceptionRecord();\n }\n\n if(this.OrderslistService.getisFromServiceRequestPages() !== null) {\n this.OrderslistService.getisFromServiceRequestPages().subscribe((data) => this.isFromServiceRequestPage = data);\n }\n\n }\n\n setDefaults(): void {\n this.totalPayments = 0.00;\n this.totalRemissions = 0.00;\n this.totalNonOffPayments = 0.00;\n this.totalFees = 0.00;\n }\n\n getAllocationStatus(payments: any) {\n\n let paymentAllocation = payments.payment_allocation,\n isAllocationStatusExist = paymentAllocation.length > 0;\n return isAllocationStatusExist ? paymentAllocation[0].allocation_status : '-';\n //return \"-\";\n\n }\n\n checkForExceptionRecord(): void {\n\n if (this.paymentGroups.length === 0 && (this.selectedOption.toLocaleLowerCase() === 'ccdorexception' || this.selectedOption.toLocaleLowerCase() === 'rc')) {\n this.bulkScaningPaymentService.getBSPaymentsByCCD(this.ccdCaseNumber).subscribe(\n recordData => {\n if (recordData['data'] && recordData['data'].exception_record_reference && recordData['data'].exception_record_reference.length > 0 && recordData['data'].ccd_reference > 0) {\n this.isExceptionRecord = false;\n this.isAddFeeBtnEnabled = true;\n }\n\n if (recordData['data'] && recordData['data'].exception_record_reference && recordData['data'].exception_record_reference.length > 0 && recordData['data'].ccd_reference === undefined) {\n this.isExceptionRecord = true;\n this.isAddFeeBtnEnabled = false;\n }\n\n if (recordData['data'] && recordData['data'].exception_record_reference && recordData['data'].exception_record_reference.length === undefined && recordData['data'].ccd_reference > 0) {\n this.isExceptionRecord = false;\n this.isAddFeeBtnEnabled = true;\n }\n });\n }\n\n if (this.paymentGroups.length === 0 && this.selectedOption.toLocaleLowerCase() === 'dcn') {\n if (this.paymentLibComponent.CCD_CASE_NUMBER.length > 0 && this.paymentLibComponent.EXC_REFERENCE.length > 0) {\n this.isExceptionRecord = false;\n this.isAddFeeBtnEnabled = true;\n } else if (this.paymentLibComponent.CCD_CASE_NUMBER.length === 0 && this.paymentLibComponent.EXC_REFERENCE.length > 0) {\n this.isExceptionRecord = true;\n this.isAddFeeBtnEnabled = false;\n } else {\n this.isExceptionRecord = false;\n this.isAddFeeBtnEnabled = true;\n }\n }\n if (this.paymentGroups.length > 0)\n this.paymentGroups.forEach(paymentGroup => {\n if (paymentGroup.payments) {\n paymentGroup.payments.forEach(payment => {\n if (payment.case_reference !== undefined && payment.ccd_case_number === undefined) {\n this.isExceptionRecord = true;\n this.isAddFeeBtnEnabled = false;\n } else {\n this.isExceptionRecord = false;\n this.isAddFeeBtnEnabled = true;\n }\n\n });\n }\n });\n }\n\n calculateOrderFeesAmounts(): void {\n let feesTotal = 0.00;\n this.paymentGroups.forEach(paymentGroup => {\n this.resetOrderVariables();\n if (paymentGroup.fees) {\n paymentGroup.fees.forEach(fee => {\n this.orderFeesTotal = this.orderFeesTotal + fee.calculated_amount\n }\n )\n }\n if (paymentGroup.remissions) {\n paymentGroup.remissions.forEach(remission => {\n this.orderRemissionTotal = this.orderRemissionTotal + remission.hwf_amount;\n });\n }\n\n if (paymentGroup.payments) {\n paymentGroup.payments.forEach(payment => {\n if (payment.status.toUpperCase() === 'SUCCESS') {\n this.orderTotalPayments = this.orderTotalPayments + payment.amount;\n }\n });\n }\n\n // this.orderPendingPayments = (this.orderFeesTotal - this.orderRemissionTotal) - this.orderTotalPayments;\n if (paymentGroup.service_request_status === 'Paid') {\n this.orderStatus = paymentGroup.service_request_status;\n this.orderAddBtnEnable = false;\n } else if (paymentGroup.service_request_status === 'Partially paid' || paymentGroup.service_request_status === 'Not paid') {\n this.orderStatus = paymentGroup.service_request_status;\n this.orderAddBtnEnable = true;\n } else if (paymentGroup.service_request_status === 'Disputed'){\n this.orderStatus = paymentGroup.service_request_status;\n this.orderAddBtnEnable = true;\n }\n\n //this.orderLevelFees.push({orderRefId:paymentGroup['payment_group_reference'],orderTotalFees: this.orderFeesTotal,orderStatus: this.orderStatus,orderParty:'Santosh', orderCCDEvent:'Case Creation',orderCreated: new Date(), orderAddBtnEnable: this.orderAddBtnEnable}); this.cpoDetails['createdTimestamp']\n if (this.cpoDetails !== null) {\n this.orderLevelFees.push({ orderRefId: paymentGroup['payment_group_reference'], orderTotalFees: this.orderFeesTotal, orderStatus: this.orderStatus, orderParty: this.cpoDetails['responsibleParty'], orderCCDEvent: this.cpoDetails['action'], orderCreated: paymentGroup['date_created'], orderAddBtnEnable: this.orderAddBtnEnable });\n\n } else {\n this.orderLevelFees.push({ orderRefId: paymentGroup['payment_group_reference'], orderTotalFees: this.orderFeesTotal, orderStatus: this.orderStatus, orderParty: '', orderCCDEvent: '', orderCreated: paymentGroup['date_created'], orderAddBtnEnable: this.orderAddBtnEnable });\n }\n\n if (this.orderStatus !== 'Paid') {\n this.OrderslistService.setOrdersList(this.orderLevelFees);\n }\n });\n };\n\n resetOrderVariables(): void {\n this.orderFeesTotal = 0.00;\n this.orderTotalPayments = 0.00;\n this.orderRemissionTotal = 0.00;\n this.orderPendingPayments = 0.00;\n this.isAddFeeBtnEnabled = true;\n\n };\n\n goToOrderViewDetailSection(orderReferenceObj: any) {\n if (this.isFromServiceRequestPage) {\n this.OrderslistService.setOrderRefId(orderReferenceObj);\n this.orderRef = orderReferenceObj;\n } else {\n this.OrderslistService.setOrderRefId(orderReferenceObj.orderRefId);\n this.orderRef = orderReferenceObj.orderRefId;\n }\n\n this.orderFeesTotal = 0.00;\n this.orderRemissionTotal = 0.00;\n this.orderTotalPayments = 0.00;\n this.orderPendingPayments = 0.00;\n\n this.orderDetail = this.paymentGroups.filter(x => x.payment_group_reference === this.orderRef);\n this.orderDetail.forEach(orderDetail => {\n if (orderDetail.fees) {\n orderDetail.fees.forEach(fee => {\n this.orderFeesTotal = this.orderFeesTotal + fee.calculated_amount;\n });\n }\n if (orderDetail.remissions) {\n orderDetail.remissions.forEach(remission => {\n this.orderRemissionTotal = this.orderRemissionTotal + remission.hwf_amount;\n });\n if (orderDetail.payments) {\n this.payment = orderDetail.payments[0];\n orderDetail.payments.forEach(payment => {\n if (payment.status.toUpperCase() === 'SUCCESS') {\n this.orderTotalPayments = this.orderTotalPayments + payment.amount;\n }\n });\n }\n }\n this.orderStatus = orderDetail.service_request_status;\n });\n //this.orderPendingPayments = (this.orderFeesTotal - this.orderRemissionTotal) - this.orderTotalPayments;\n // this.orderRef = orderReferenceObj.orderRefId;\n // if (this.orderPendingPayments <= 0.00) {\n // this.orderStatus = 'Paid';\n // } else if (this.orderFeesTotal > 0 && (this.orderTotalPayments > 0 || this.orderRemissionTotal > 0) && (this.orderTotalPayments < this.orderPendingPayments)) {\n // this.orderStatus = 'Partially paid'\n // } else {\n // this.orderStatus = 'Not paid'\n // }\n\n\n if (this.cpoDetails !== null) {\n this.orderParty = this.cpoDetails['responsibleParty'];\n this.orderCreated = this.cpoDetails['createdTimestamp'];\n this.orderCCDEvent = this.cpoDetails['action'];\n } else {\n this.orderParty = '';\n this.orderCCDEvent = '';\n this.orderCreated = orderReferenceObj.orderCreated;\n }\n this.viewStatus = 'order-full-view';\n }\n\n redirectToOrderFeeSearchPage(event: any, orderef: any) {\n if(orderef.orderAddBtnEnable) {\n event.preventDefault();\n this.paymentLibComponent.bspaymentdcn = null;\n this.paymentLibComponent.paymentGroupReference = orderef.orderRefId;\n this.paymentLibComponent.isTurnOff = this.isTurnOff;\n this.paymentLibComponent.viewName = 'fee-summary';\n }\n }\n\n\n\n\n calculateAmounts(): void {\n let feesTotal = 0.00,\n paymentsTotal = 0.00,\n remissionsTotal = 0.00,\n nonOffLinePayment = 0.00;\n\n this.paymentGroups.forEach(paymentGroup => {\n if (paymentGroup.fees) {\n paymentGroup.fees.forEach(fee => {\n // new feature Apportionment toggle changes\n if (!this.isTurnOff) {\n if (fee.date_created) {\n let a = fee.amount_due === undefined;\n let b = fee.amount_due <= 0;\n this.clAmountDue = a ? this.clAmountDue + fee.net_amount : b ? this.clAmountDue + 0 : this.clAmountDue + fee.amount_due;\n }\n fee['payment_group_reference'] = paymentGroup['payment_group_reference'];\n this.fees.push(fee);\n } else {\n feesTotal = feesTotal + fee.calculated_amount;\n this.fees.push(fee);\n }\n\n });\n }\n if (this.isTurnOff) {\n this.totalFees = feesTotal;\n }\n\n if (paymentGroup.payments) {\n paymentGroup.payments.forEach(payment => {\n // new feature Apportionment toggle changes\n if (!this.isTurnOff) {\n let allocationLen = payment.payment_allocation;\n\n if (payment.status.toUpperCase() === 'SUCCESS') {\n paymentsTotal = paymentsTotal + payment.amount;\n if (allocationLen.length === 0 || allocationLen.length > 0 && allocationLen[0].allocation_status === 'Allocated') {\n nonOffLinePayment = nonOffLinePayment + payment.amount;\n }\n if (allocationLen.length > 0) {\n this.nonPayments.push(payment);\n }\n }\n if (allocationLen.length === 0) {\n this.payments.push(payment);\n }\n payment.paymentGroupReference = paymentGroup.payment_group_reference\n this.allPayments.push(payment);\n } else {\n if (payment.status.toUpperCase() === 'SUCCESS') {\n paymentsTotal = paymentsTotal + payment.amount;\n this.payments.push(payment);\n }\n payment.paymentGroupReference = paymentGroup.payment_group_reference\n this.allPayments.push(payment);\n }\n });\n }\n this.totalPayments = paymentsTotal;\n // new feature Apportionment toggle changes\n if (!this.isTurnOff) {\n this.totalNonOffPayments = nonOffLinePayment;\n }\n\n if (paymentGroup.remissions) {\n paymentGroup.remissions.forEach(remisison => {\n remissionsTotal = remissionsTotal + remisison.hwf_amount;\n this.remissions.push(remisison);\n });\n }\n this.totalRemissions = remissionsTotal;\n });\n\n }\n\n calculateRefundAmount() {\n if (!this.isTurnOff) {\n let isNewPaymentGroup = false;\n\n this.paymentGroups.forEach((paymentGroup, index) => {\n let grpOutstandingAmount = 0.00,\n feesTotal = 0.00,\n paymentsTotal = 0.00,\n remissionsTotal = 0.00,\n fees = [];\n\n if (paymentGroup.fees) {\n // this.isFeeRecordsExist = true;\n paymentGroup.fees.forEach(fee => {\n feesTotal = feesTotal + fee.calculated_amount;\n\n this.isRemissionsMatch = false;\n if (paymentGroup.remissions) {\n paymentGroup.remissions.forEach(rem => {\n if (rem.fee_code === fee.code) {\n this.isRemissionsMatch = true;\n fee['remissions'] = rem;\n // if(!fees.find(k => k.code=fee.code))\n // {\n fees.push(fee);\n //}\n }\n });\n }\n if (!this.isRemissionsMatch) {\n fees.push(fee);\n }\n\n if (fee.date_created) {\n isNewPaymentGroup = true;\n } else {\n this.isHistoricGroupAvailable = true;\n this.paymentGroups[index]['old'] = true;\n }\n });\n this.paymentGroups[index].fees = fees;\n }\n if (paymentGroup.payments) {\n paymentGroup.payments.forEach(payment => {\n if (payment.status.toUpperCase() === 'SUCCESS') {\n paymentsTotal = paymentsTotal + payment.amount;\n }\n });\n }\n\n if (paymentGroup.remissions) {\n paymentGroup.remissions.forEach(remission => {\n remissionsTotal = remissionsTotal + remission.hwf_amount;\n });\n }\n grpOutstandingAmount = (feesTotal - remissionsTotal) - paymentsTotal;\n if (grpOutstandingAmount > 0 && isNewPaymentGroup) {\n this.isAnyFeeGroupAvilable = true;\n this.isFeeRecordsExist = true;\n this.paymentRef = paymentGroup.payment_group_reference;\n }\n if (paymentGroup.fees && paymentGroup.fees.length > 0 && grpOutstandingAmount <= 0 && isNewPaymentGroup) {\n this.isAnyFeeGroupAvilable = false;\n }\n });\n if ((!isNewPaymentGroup && this.isHistoricGroupAvailable) || (!isNewPaymentGroup && !this.isHistoricGroupAvailable)) {\n this.isAnyFeeGroupAvilable = false;\n }\n } else {\n let totalRefundAmount = 0,\n isFeeAmountZero = false;\n this.paymentGroups.forEach(paymentGroup => {\n let grpOutstandingAmount = 0.00,\n feesTotal = 0.00,\n paymentsTotal = 0.00,\n remissionsTotal = 0.00;\n if (paymentGroup.fees) {\n this.isFeeRecordsExist = true;\n paymentGroup.fees.forEach(fee => {\n feesTotal = feesTotal + fee.calculated_amount;\n if (fee.calculated_amount === 0) {\n isFeeAmountZero = true\n }\n });\n\n }\n\n if (paymentGroup.payments) {\n paymentGroup.payments.forEach(payment => {\n if (payment.status.toUpperCase() === 'SUCCESS') {\n paymentsTotal = paymentsTotal + payment.amount;\n }\n });\n }\n\n if (paymentGroup.remissions) {\n paymentGroup.remissions.forEach(remission => {\n remissionsTotal = remissionsTotal + remission.hwf_amount;\n });\n }\n grpOutstandingAmount = (feesTotal - remissionsTotal) - paymentsTotal;\n if (grpOutstandingAmount < 0) {\n if (totalRefundAmount === 0) {\n totalRefundAmount = grpOutstandingAmount;\n } else {\n totalRefundAmount = (totalRefundAmount + grpOutstandingAmount);\n }\n }\n else if (grpOutstandingAmount > 0 || (grpOutstandingAmount === 0 && isFeeAmountZero)) {\n this.isGrpOutstandingAmtPositive = true;\n }\n });\n return totalRefundAmount * -1;\n }\n }\n\n getGroupOutstandingAmount(paymentGroup: IPaymentGroup): number {\n return this.bulkScaningPaymentService.calculateOutStandingAmount(paymentGroup);\n }\n\n redirectToFeeSearchPage(event: any) {\n event.preventDefault();\n let url = this.isBulkScanEnable ? '&isBulkScanning=Enable' : '&isBulkScanning=Disable';\n url += this.isTurnOff ? '&isTurnOff=Enable' : '&isTurnOff=Disable';\n url += this.isStrategicFixEnable ? '&isStFixEnable=Enable' : '&isStFixEnable=Disable';\n url += `&caseType=${this.caseType}`\n this.router.navigateByUrl(`/fee-search?selectedOption=${this.selectedOption}&ccdCaseNumber=${this.ccdCaseNumber}${url}`);\n }\n\n addRemission(fee: IFee) {\n if(this.chkForAddRemission(fee.code)) {\n this.feeId = fee;\n this.viewStatus = 'addremission';\n this.paymentViewService.getApportionPaymentDetails(this.payment.reference).subscribe(\n paymentGroup => {\n this.paymentGroup = paymentGroup;\n\n this.paymentGroup.payments = this.paymentGroup.payments.filter\n (paymentGroupObj => paymentGroupObj['reference'].includes(this.paymentLibComponent.paymentReference));\n this.payment = this.paymentGroup.payments[0];\n // const paymentAllocation = this.paymentGroup.payments[0].payment_allocation;\n // this.isStatusAllocated = paymentAllocation.length > 0 && paymentAllocation[0].allocation_status === 'Allocated' || paymentAllocation.length === 0;\n },\n (error: any) => this.errorMessage = error? error.replace(/\"/g,\"\") : \"\"\n );\n }\n }\n\n addRefundForRemission(payment: IPayment, remission: IRemission[],fees:any) {\n this.viewStatus = 'addrefundforremission';\n\n this.payment = payment;\n this.paymentViewService.getApportionPaymentDetails(this.payment.reference).subscribe(\n paymentGroup => {\n this.paymentGroup = paymentGroup;\n\n this.paymentGroup.payments = this.paymentGroup.payments.filter\n (paymentGroupObj => paymentGroupObj['reference'].includes(this.payment.reference));\n this.payment = this.paymentGroup.payments[0];\n this.remissions = remission;\n this.remissionFeeAmt = fees.filter(data=>data.code === this.remissions['fee_code'])[0].net_amount;\n // const paymentAllocation = this.paymentGroup.payments[0].payment_allocation;\n // this.isStatusAllocated = paymentAllocation.length > 0 && paymentAllocation[0].allocation_status === 'Allocated' || paymentAllocation.length === 0;\n },\n (error: any) => this.errorMessage = error\n );\n }\n\n redirectToremissionPage(event: any) {\n event.preventDefault();\n this.paymentLibComponent.viewName = 'remission'\n }\n goToServiceRequestPage() {\n this.paymentLibComponent.viewName = 'case-transactions';\n this.paymentLibComponent.TAKEPAYMENT = false;\n this.paymentLibComponent.SERVICEREQUEST = 'true';\n this.paymentLibComponent.isFromServiceRequestPage = true;\n window.location.reload();\n }\n redirectToReportsPage(event: any) {\n event.preventDefault();\n this.router.navigateByUrl(`/reports?selectedOption=${this.selectedOption}&ccdCaseNumber=${this.ccdCaseNumber}`);\n }\n\n loadFeeSummaryPage(paymentGroup: IPaymentGroup) {\n this.paymentLibComponent.bspaymentdcn = null;\n this.paymentLibComponent.paymentGroupReference = paymentGroup.payment_group_reference;\n this.paymentLibComponent.isTurnOff = this.isTurnOff;\n this.paymentLibComponent.viewName = 'fee-summary';\n }\n\n goToPaymentViewComponent(paymentGroup: any) {\n this.paymentLibComponent.paymentMethod = paymentGroup.paymentMethod;\n this.paymentLibComponent.paymentGroupReference = paymentGroup.paymentGroupReference;\n this.paymentLibComponent.paymentReference = paymentGroup.paymentReference;\n this.paymentLibComponent.viewName = 'payment-view';\n }\n\n goToPayementView(paymentGroupReference: string, paymentReference: string, paymentMethod: string) {\n this.goToPaymentViewComponent({ paymentGroupReference, paymentReference, paymentMethod });\n }\n\n selectedUnprocessedFeeEvent(unprocessedRecordId: string) {\n if (unprocessedRecordId) {\n if (this.isTurnOff) {\n this.isAddFeeBtnEnabled = false;\n }\n this.isUnprocessedRecordSelected = true;\n } else {\n if (this.isTurnOff) {\n this.isAddFeeBtnEnabled = true;\n }\n this.isUnprocessedRecordSelected = false;\n }\n }\n\n getUnprocessedFeeCount(unProcessedRecordCount: number) {\n this.unprocessedRecordCount = unProcessedRecordCount;\n }\n\n calculateAmountDue(fee: IFee) {\n\n if (fee.date_created) {\n return fee.amount_due !== undefined ? fee.amount_due : fee.net_amount;\n } else {\n return \"0.00\";\n }\n }\n\n confirmRemoveFee(fee: IFee) {\n this.isRemoveBtnDisabled = false;\n this.feeId = fee;\n this.viewStatus = 'feeRemovalConfirmation';\n }\n\n cancelRemoval() {\n this.viewStatus = 'main';\n }\n\n removeFee(fee: any) {\n this.isRemoveBtnDisabled = true;\n this.paymentViewService.deleteFeeFromPaymentGroup(fee).subscribe(\n (success: any) => {\n window.location.reload();\n },\n (error: any) => {\n this.errorMessage = error;\n this.isRemoveBtnDisabled = false;\n }\n );\n }\n\n isCheckAmountdueExist(amountDue: any) {\n return typeof amountDue === 'undefined';\n }\n\n issueRefund(payment: IPayment) {\n if (payment !== null && payment !== undefined) {\n if(this.chkIssueRefundBtnEnable(payment)) {\n this.viewStatus = 'issuerefund';\n this.payment = payment;\n this.paymentLibComponent.isFromServiceRequestPage = true;\n this.isRefundRemission = true;\n }\n }\n }\n\n chkForAddRemission(feeCode: string): boolean {\n if (this.chkForPBAPayment() && this.check4AllowedRoles2AccessRefund()) {\n if (this.orderDetail[0]['remissions'].length > 0) {\n for (const remission of this.orderDetail[0]['remissions']) {\n if (remission.fee_code === feeCode) {\n return false;\n }\n }\n }\n return true;\n } else {\n return false;\n }\n }\n\n chkForPBAPayment(): boolean {\n if (this.orderDetail !== null && this.orderDetail !== undefined) {\n this.orderDetail.forEach(orderDetail => {\n if (orderDetail.payments) {\n orderDetail.payments.forEach(payment => {\n if (payment.method.toLocaleLowerCase() === 'payment by account' && this.allowFurtherAccessAfter4Days(payment)) {\n this.isPBA = true;\n }\n });\n }\n });\n if (this.isPBA) {\n return true;\n } else {\n return false;\n };\n }\n }\n\n chkIssueRefundBtnEnable(payment: IPayment): boolean {\n if (this.check4AllowedRoles2AccessRefund() && this.allowFurtherAccessAfter4Days(payment) &&\n payment.method === 'payment by account' && payment.status.toLocaleLowerCase() === 'success') {\n this.isIssueRefunfBtnEnable = true;\n }\n if (this.isIssueRefunfBtnEnable) {\n return true;\n } else {\n return false;\n };\n }\n\n chkIsRefundRemissionBtnEnable(): boolean {\n if (this.orderDetail !== null && this.orderDetail !== undefined) {\n this.paymentLibComponent.isFromServiceRequestPage = true;\n this.orderDetail.forEach(orderDetail => {\n if (orderDetail.payments) {\n orderDetail.payments.forEach(payment => {\n if (payment.method.toLocaleLowerCase() === 'payment by account' && payment.status.toLocaleLowerCase() === 'success' && this.allowFurtherAccessAfter4Days(payment)) {\n this.isRefundRemissionBtnEnable = true;\n }\n });\n }\n });\n if (this.isRefundRemissionBtnEnable) {\n return true;\n } else {\n return false;\n };\n }\n }\n\n check4AllowedRoles2AccessRefund = (): boolean => {\n return this.allowedRolesToAccessRefund.some(role =>\n this.LOGGEDINUSERROLES.indexOf(role) !== -1\n );\n }\n check4AllowedRoles2AccessPBApayment = (): boolean => {\n return this.isEligible4PBAPayment.some(role =>\n this.LOGGEDINUSERROLES.indexOf(role) !== -1\n );\n }\n\n allowFurtherAccessAfter4Days = (payment: IPayment): boolean => {\n if (payment !== null && payment !== undefined) {\n let tmp4DayAgo = new Date();\n tmp4DayAgo.setDate(tmp4DayAgo.getDate() - 4);\n return tmp4DayAgo >= new Date(payment.date_created);\n }\n }\n\n loadPBAAccountPage(orderRef: IPayment) {\n this.paymentLibComponent.pbaPayOrderRef = orderRef;\n this.paymentLibComponent.viewName = 'pba-payment';\n }\n}\n","export class PaymentToPayhubRequest {\n currency = 'GBP';\n description = 'PayBubble payment';\n channel = 'telephony';\n provider = 'pci pal';\n case_type: string;\n\n ccd_case_number: string;\n amount: number;\n\n constructor(ccd_case_number: string, amount: number, caseType: string) {\n this.ccd_case_number = ccd_case_number;\n this.amount = <any>amount.toFixed(2);\n this.case_type= caseType;\n }\n}\n","export class PayhubAntennaRequest {\n currency = 'GBP';\n case_type: string;\n ccd_case_number: string;\n amount: number;\n\n constructor(ccd_case_number: string, amount: number, caseType: string) {\n this.ccd_case_number = ccd_case_number;\n this.amount = <any>amount.toFixed(2);\n this.case_type= caseType;\n }\n}\n","import { Component, OnInit, Input } from '@angular/core';\nimport { IPaymentGroup } from '../../interfaces/IPaymentGroup';\nimport { PaymentViewService } from '../../services/payment-view/payment-view.service';\nimport { BulkScaningPaymentService } from '../../services/bulk-scaning-payment/bulk-scaning-payment.service';\nimport { PaymentLibComponent } from '../../payment-lib.component';\nimport { IRemission } from '../../interfaces/IRemission';\nimport { IFee } from '../../interfaces/IFee';\nimport { PaymentToPayhubRequest } from '../../interfaces/PaymentToPayhubRequest';\nimport { PayhubAntennaRequest } from '../../interfaces/PayhubAntennaRequest';\nimport { SafeHtml } from '@angular/platform-browser';\nimport {Router} from '@angular/router';\nimport {Location} from '@angular/common';\nimport { OrderslistService } from '../../services/orderslist.service';\n\nconst BS_ENABLE_FLAG = 'bulk-scan-enabling-fe';\n\n@Component({\n selector: 'ccpay-fee-summary',\n templateUrl: './fee-summary.component.html',\n styleUrls: ['./fee-summary.component.scss']\n})\n\nexport class FeeSummaryComponent implements OnInit {\n @Input() paymentGroupRef: string;\n @Input() ccdCaseNumber: string;\n @Input() isTurnOff: string;\n @Input() caseType: string;\n\n\n bsPaymentDcnNumber: string;\n paymentGroup: IPaymentGroup;\n errorMessage: string;\n viewStatus = 'main';\n currentFee: IFee;\n totalFee: number;\n payhubHtml: SafeHtml;\n service: string = \"\";\n platForm: string = \"\";\n upPaymentErrorMessage: string;\n selectedOption:string;\n isBackButtonEnable: boolean = true;\n outStandingAmount: number;\n isFeeAmountZero: boolean = false;\n totalAfterRemission: number = 0;\n isConfirmationBtnDisabled: boolean = false;\n isRemoveBtnDisabled: boolean = false;\n isPaymentExist: boolean = false;\n isRemissionsExist: Boolean = false;\n isRemissionsMatch = false;\n isStrategicFixEnable: boolean;\n\n constructor(\n private router: Router,\n private bulkScaningPaymentService: BulkScaningPaymentService,\n private location: Location,\n private paymentViewService: PaymentViewService,\n private paymentLibComponent: PaymentLibComponent,\n private OrderslistService: OrderslistService\n ) {}\n\n ngOnInit() {\n this.viewStatus = 'main';\n this.caseType = this.paymentLibComponent.CASETYPE;\n this.bsPaymentDcnNumber = this.paymentLibComponent.bspaymentdcn;\n this.selectedOption = this.paymentLibComponent.SELECTED_OPTION.toLocaleLowerCase();\n this.isStrategicFixEnable = this.paymentLibComponent.ISSFENABLE;\n this.OrderslistService.setCaseType(this.paymentLibComponent.CASETYPE);\n\n this.platForm = 'Antenna';\n\n this.paymentViewService.getBSfeature().subscribe(\n features => {\n let result = JSON.parse(features).filter(feature => feature.uid === BS_ENABLE_FLAG);\n this.paymentLibComponent.ISBSENABLE = result[0] ? result[0].enable : false;\n },\n err => {\n this.paymentLibComponent.ISBSENABLE = false;\n }\n );\n if (this.bsPaymentDcnNumber) {\n this.getUnassignedPaymentlist();\n }\n this.getPaymentGroup();\n }\n\n getUnassignedPaymentlist() {\n if (this.selectedOption === 'dcn') {\n this.bulkScaningPaymentService.getBSPaymentsByDCN(this.paymentLibComponent.DCN_NUMBER).subscribe(\n unassignedPayments => {\n if(unassignedPayments['data'].payments) {\n this.service = unassignedPayments['data'].responsible_service_id;\n } else {\n this.upPaymentErrorMessage = 'error';\n }\n },\n (error: any) => this.upPaymentErrorMessage = error\n );\n } else {\n this.bulkScaningPaymentService.getBSPaymentsByCCD(this.ccdCaseNumber).subscribe(\n unassignedPayments => {\n if(unassignedPayments['data'].payments) {\n this.service = unassignedPayments['data'].responsible_service_id;\n } else {\n this.upPaymentErrorMessage = 'error';\n }\n },\n (error: any) => this.upPaymentErrorMessage = error\n );\n }\n\n }\n\n getRemissionByFeeCode(feeCode: string): IRemission {\n if (this.paymentGroup && this.paymentGroup.remissions && this.paymentGroup.remissions.length > 0) {\n for (const remission of this.paymentGroup.remissions) {\n if (remission.fee_code === feeCode) {\n return remission;\n }\n }\n }\n return null;\n }\n\n addRemission(fee: IFee) {\n this.currentFee = fee;\n this.viewStatus = 'add_remission';\n }\n\n getPaymentGroup() {\n let fees = [];\n this.paymentViewService.getPaymentGroupDetails(this.paymentGroupRef).subscribe(\n paymentGroup => {\n this.paymentGroup = paymentGroup;\n this.isPaymentExist = paymentGroup.payments ? paymentGroup.payments.length > 0 : false;\n this.isRemissionsExist = paymentGroup.remissions ? paymentGroup.remissions.length > 0 : false;\n\n if (paymentGroup.fees) {\n paymentGroup.fees.forEach(fee => {\n this.totalAfterRemission = this.totalAfterRemission + fee.net_amount;\n if(fee.calculated_amount === 0) {\n this.isFeeAmountZero = true;\n }\n this.isRemissionsMatch = false;\n paymentGroup.remissions.forEach(rem => {\n if(rem.fee_code === fee.code) {\n this.isRemissionsMatch = true;\n fee['remissions'] = rem;\n fees.push(fee);\n }\n });\n\n if(!this.isRemissionsMatch) {\n fees.push(fee);\n }\n });\n paymentGroup.fees = fees;\n }\n\n this.outStandingAmount = this.bulkScaningPaymentService.calculateOutStandingAmount(paymentGroup);\n },\n (error: any) => this.errorMessage = error.replace(/\"/g,\"\")\n );\n }\n\n confirmRemoveFee(fee: IFee){\n this.isRemoveBtnDisabled = false;\n this.currentFee = fee;\n this.viewStatus = 'feeRemovalConfirmation';\n }\n\n removeFee(fee: any){\n this.isRemoveBtnDisabled = true;\n this.paymentViewService.deleteFeeFromPaymentGroup(fee).subscribe(\n (success: any) => {\n if (this.paymentGroup.fees && this.paymentGroup.fees.length > 1){\n this.totalAfterRemission = 0;\n this.getPaymentGroup();\n this.viewStatus = 'main';\n return;\n }\n this.loadCaseTransactionPage();\n },\n (error: any) => {\n this.errorMessage = error;\n this.isRemoveBtnDisabled = false;\n }\n );\n }\n\n loadCaseTransactionPage() {\n this.paymentLibComponent.TAKEPAYMENT = true;\n this.paymentLibComponent.viewName = 'case-transactions';\n this.paymentViewService.getBSfeature().subscribe(\n features => {\n let result = JSON.parse(features).filter(feature => feature.uid === BS_ENABLE_FLAG);\n this.paymentLibComponent.ISBSENABLE = result[0] ? result[0].enable : false;\n },\n err => {\n this.paymentLibComponent.ISBSENABLE = false;\n }\n );\n\n let partUrl = `selectedOption=${this.paymentLibComponent.SELECTED_OPTION}`;\n partUrl +=this.bsPaymentDcnNumber ? `&dcn=${this.bsPaymentDcnNumber}` : '';\n partUrl +=this.paymentLibComponent.ISBSENABLE ? '&isBulkScanning=Enable' : '&isBulkScanning=Disable';\n partUrl +=this.paymentLibComponent.ISTURNOFF ? '&isTurnOff=Enable' : '&isTurnOff=Disable';\n partUrl +=this.paymentLibComponent.ISSFENABLE ? '&isStFixEnable=Enable' : '&isStFixEnable=Disable';\n partUrl +=`&caseType=${this.paymentLibComponent.CASETYPE}`;\n\n let url = `/payment-history/${this.ccdCaseNumber}?view=case-transactions&takePayment=true&${partUrl}`;\n this.router.navigateByUrl(url);\n }\n cancelRemission() {\n this.viewStatus = 'main';\n }\n redirectToFeeSearchPage(event: any, page?: string) {\n event.preventDefault();\n let partUrl =this.bsPaymentDcnNumber ? `&dcn=${this.bsPaymentDcnNumber}` : '';\n partUrl +=this.paymentLibComponent.ISBSENABLE ? '&isBulkScanning=Enable' : '&isBulkScanning=Disable';\n partUrl +=this.paymentLibComponent.ISTURNOFF ? '&isTurnOff=Enable' : '&isTurnOff=Disable';\n partUrl +=this.paymentLibComponent.ISSFENABLE ? '&isStFixEnable=Enable' : '&isStFixEnable=Disable';\n partUrl +=`&caseType=${this.paymentLibComponent.CASETYPE}`;\n\n if(this.viewStatus === 'feeRemovalConfirmation' || this.viewStatus === 'add_remission') {\n this.viewStatus = 'main';\n return;\n }\n let url = `/fee-search?ccdCaseNumber=${this.ccdCaseNumber}&selectedOption=${this.paymentLibComponent.SELECTED_OPTION}&paymentGroupRef=${this.paymentGroupRef}${partUrl}`;\n this.router.navigateByUrl(url);\n }\n takePayment() {\n this.isConfirmationBtnDisabled = true;\n const requestBody = new PaymentToPayhubRequest(this.ccdCaseNumber, this.outStandingAmount, this.caseType),\n antennaReqBody = new PayhubAntennaRequest(this.ccdCaseNumber, this.outStandingAmount, this.caseType);\n\n if(this.platForm === 'Antenna') {\n\n this.paymentViewService.postPaymentAntennaToPayHub(antennaReqBody, this.paymentGroupRef).subscribe(\n response => {\n this.isBackButtonEnable=false;\n window.location.href = '/makePaymentByTelephoneyProvider';\n },\n (error: any) => {\n this.errorMessage = error;\n this.isConfirmationBtnDisabled = false;\n this.router.navigateByUrl('/pci-pal-failure');\n }\n );\n }\n\n }\n\n goToAllocatePage(outStandingAmount: number, isFeeAmountZero: Boolean) {\n if (outStandingAmount > 0 || (outStandingAmount === 0 && isFeeAmountZero)) {\n this.paymentLibComponent.paymentGroupReference = this.paymentGroupRef;\n this.paymentLibComponent.viewName = 'allocate-payments';\n } else {\n this.loadCaseTransactionPage();\n }\n }\n isCheckAmountdueExist(amountDue: any) {\n return typeof amountDue === 'undefined';\n }\n}\n","import { Component, OnInit, Input } from '@angular/core';\n\n\n\n@Component({\n selector: 'ccpay-error-banner',\n templateUrl: './error-banner.component.html',\n styleUrls: ['./error-banner.component.scss']\n})\n\nexport class ErrorBannerComponent implements OnInit {\n @Input('errorMessage') errorMessage;\n\n constructor(\n ) {}\n\n ngOnInit() {\n\n }\n}\n","\nexport class UnidentifiedPaymentsRequest {\n payment_allocation_status: any;\n payment_group_reference: string;\n payment_reference: string;\n unidentified_reason: string;\n\n constructor(payment_group_reference: string, payment_reference : string, unidentified_reason: any) {\n this.payment_allocation_status = {\n description: '',\n name: \"Unidentified\"\n };\n this.payment_group_reference = payment_group_reference ;\n this.payment_reference= payment_reference;\n this.unidentified_reason= unidentified_reason;\n\n }\n\n\n\n}\n","import { IBSPayments } from \"./IBSPayments\";\n\nexport class AllocatePaymentRequest {\n amount: Number;\n banked_date: String;\n ccd_case_number: String;\n exception_record: string;\n currency: String;\n document_control_number: String;\n external_provider: String;\n giro_slip_no: String;\n payer_name: String;\n payment_channel: Object;\n payment_status: Object;\n payment_method: String;\n case_type: String;\n payment_allocation_dto?: {\n allocation_reason: String,\n allocation_status: String,\n explanation: String,\n payment_allocation_status: Object,\n payment_group_reference: String,\n payment_reference: String,\n reason: String,\n receiving_office: String,\n unidentified_reason: String,\n user_id: String,\n user_name: String,\n case_type: String\n }\n\n constructor(ccd_case_number : string, unAllocatedPayment: IBSPayments, caseType: string, exceptionRecord: string, allocatedRequest?: any) {\n this.amount = unAllocatedPayment.amount;\n this.banked_date = unAllocatedPayment.date_banked;\n this.ccd_case_number = ccd_case_number;\n this.exception_record = exceptionRecord;\n this.currency= unAllocatedPayment.currency;\n this.document_control_number = unAllocatedPayment.dcn_reference;\n this.external_provider = 'exela';\n this.giro_slip_no = unAllocatedPayment.bgc_reference;\n this.payer_name = unAllocatedPayment.payer_name;\n this.payment_channel = {\n description: '',\n name: 'bulk scan'\n };\n this.payment_status ={\n description: 'bulk scan payment completed',\n name: 'success'\n }\n this.payment_method = unAllocatedPayment.payment_method;\n this.case_type= caseType;\n if(allocatedRequest) {\n this.payment_allocation_dto = allocatedRequest;\n }\n\n }\n}\n","import { Component, OnInit, Input } from '@angular/core';\nimport { FormBuilder, FormGroup, Validators, FormControl } from '@angular/forms';\nimport { PaymentLibComponent } from '../../payment-lib.component';\nimport { PaymentViewService } from '../../services/payment-view/payment-view.service';\nimport {BulkScaningPaymentService} from '../../services/bulk-scaning-payment/bulk-scaning-payment.service';\nimport { IBSPayments } from '../../interfaces/IBSPayments';\nimport { UnidentifiedPaymentsRequest } from '../../interfaces/UnidentifiedPaymentsRequest';\nimport { AllocatePaymentRequest } from '../../interfaces/AllocatePaymentRequest';\n\n@Component({\n selector: 'app-mark-unidentified-payment',\n templateUrl: './mark-unidentified-payment.component.html',\n styleUrls: ['./mark-unidentified-payment.component.scss']\n})\nexport class MarkUnidentifiedPaymentComponent implements OnInit {\n @Input() caseType: string;\n markPaymentUnidentifiedForm: FormGroup;\n viewStatus: string;\n ccdCaseNumber: string;\n bspaymentdcn: string;\n isInvesticationDetailEmpty: boolean = false;\n investicationDetailHasError: boolean = false;\n investicationDetailMinHasError: boolean = false;\n investicationDetailMaxHasError: boolean = false;\n errorMessage = this.getErrorMessage(false);\n unassignedRecord:IBSPayments;\n siteID: string = null;\n investigationComment: string;\n isConfirmButtondisabled:Boolean = false;\n ccdReference: string = null;\n exceptionReference: string = null;\n isStrategicFixEnable: boolean = true;\n\n constructor(private formBuilder: FormBuilder,\n private paymentViewService: PaymentViewService,\n private paymentLibComponent: PaymentLibComponent,\n private bulkScaningPaymentService: BulkScaningPaymentService) { }\n\n ngOnInit() {\n this.viewStatus = 'mainForm';\n this.ccdCaseNumber = this.paymentLibComponent.CCD_CASE_NUMBER;\n this.bspaymentdcn = this.paymentLibComponent.bspaymentdcn;\n this.isStrategicFixEnable = this.paymentLibComponent.ISSFENABLE;\n this.getUnassignedPayment();\n\n this.markPaymentUnidentifiedForm = this.formBuilder.group({\n investicationDetail: new FormControl('', Validators.compose([\n Validators.required,\n Validators.minLength(3),\n Validators.maxLength(255),\n Validators.pattern('^([a-zA-Z0-9\\\\s,\\\\.]*)$')\n ]))\n });\n }\n getUnassignedPayment() {\n this.bulkScaningPaymentService.getBSPaymentsByDCN(this.bspaymentdcn).subscribe(\n unassignedPayments => {\n this.errorMessage = this.getErrorMessage(false);\n this.unassignedRecord = unassignedPayments['data'].payments.filter(payment => {\n return payment && payment.dcn_reference == this.bspaymentdcn;\n })[0];\n this.siteID = unassignedPayments['data'].responsible_service_id;\n const beCcdNumber = unassignedPayments['data'].ccd_reference,\n beExceptionNumber = unassignedPayments['data'].exception_record_reference,\n exceptionReference = beCcdNumber ? beCcdNumber === this.ccdCaseNumber ? null : this.ccdCaseNumber : this.ccdCaseNumber;\n this.ccdReference = beCcdNumber ? beCcdNumber : null;\n this.exceptionReference = beExceptionNumber ? beExceptionNumber : exceptionReference;\n },\n (error: any) => {\n this.errorMessage = this.getErrorMessage(true);\n }\n );\n }\n trimUnderscore(method: string){\n return this.bulkScaningPaymentService.removeUnwantedString(method,' ');\n }\n saveAndContinue() {\n this.resetForm([false, false, false, false]);\n const investicationField = this.markPaymentUnidentifiedForm.controls.investicationDetail;\n const formerror = investicationField.errors;\n if (this.markPaymentUnidentifiedForm.dirty && this.markPaymentUnidentifiedForm.valid) {\n this.investigationComment = this.markPaymentUnidentifiedForm.controls.investicationDetail.value;\n this.viewStatus = 'unidentifiedContinueConfirm';\n }else {\n if(investicationField.value == '' ) {\n this.resetForm([true, false, false, false]);\n }\n if(investicationField.value != '' && investicationField.invalid ) {\n this.resetForm([false, true, false, false]);\n }\n if(formerror && formerror.minlength && formerror.minlength.actualLength < 3 ) {\n this.resetForm([false, false, true, false]);\n }\n if(formerror && formerror.maxlength && formerror.maxlength.actualLength > 255 ) {\n this.resetForm([false, false, false, true]);\n }\n }\n }\n resetForm(val) {\n this.isInvesticationDetailEmpty = val[0];\n this.investicationDetailHasError = val[1];\n this.investicationDetailMinHasError = val[2];\n this.investicationDetailMaxHasError = val[3];\n }\n confirmPayments() {\n this.isConfirmButtondisabled = true;\n const reason = this.markPaymentUnidentifiedForm.get('investicationDetail').value;\n\n if(!this.isStrategicFixEnable) {\n let allocatedRequest = {\n allocation_status:'Unidentified',\n payment_allocation_status: {\n description: '',\n name: 'Unidentified'\n },\n unidentified_reason: reason,\n user_id: this.caseType,\n }\n const postStrategicBody = new AllocatePaymentRequest\n (this.ccdReference, this.unassignedRecord, this.caseType, this.exceptionReference, allocatedRequest);\n this.bulkScaningPaymentService.postBSWoPGStrategic(postStrategicBody).subscribe(\n res => {\n this.errorMessage = this.getErrorMessage(false);\n let response = JSON.parse(res);\n if (response.success) {\n this.gotoCasetransationPage();\n }\n },\n (error: any) => {\n this.errorMessage = this.getErrorMessage(true);\n this.isConfirmButtondisabled = false;\n });\n } else {\n this.bulkScaningPaymentService.patchBSChangeStatus(this.unassignedRecord.dcn_reference, 'PROCESSED').subscribe(\n res1 => {\n this.errorMessage = this.getErrorMessage(false);\n const requestBody = new AllocatePaymentRequest\n (this.ccdReference, this.unassignedRecord, this.siteID, this.exceptionReference)\n this.paymentViewService.postBSPayments(requestBody).subscribe(\n res2 => {\n this.errorMessage = this.getErrorMessage(false);\n const response2 = JSON.parse(res2),\n reqBody = new UnidentifiedPaymentsRequest\n (response2['data'].payment_group_reference, response2['data'].reference, reason);\n if (response2.success) {\n this.paymentViewService.postBSUnidentifiedPayments(reqBody).subscribe(\n res3 => {\n this.errorMessage = this.getErrorMessage(false);\n const response3 = JSON.parse(res3);\n if (response3.success) {\n this.gotoCasetransationPage();\n }\n },\n (error: any) => {\n this.bulkScaningPaymentService.patchBSChangeStatus(this.unassignedRecord.dcn_reference, 'COMPLETE').subscribe();\n this.errorMessage = this.getErrorMessage(true);\n this.isConfirmButtondisabled = false;\n }\n );\n }\n },\n (error: any) => {\n this.bulkScaningPaymentService.patchBSChangeStatus(this.unassignedRecord.dcn_reference, 'COMPLETE').subscribe();\n this.errorMessage = this.getErrorMessage(true);\n this.isConfirmButtondisabled = false;\n }\n );\n },\n (error: any) => {\n this.errorMessage = this.getErrorMessage(true);\n this.isConfirmButtondisabled = false;\n }\n );\n }\n }\n cancelMarkUnidentifiedPayments(type?:string){\n if(type && type === 'cancel') {\n if(this.markPaymentUnidentifiedForm.get('investicationDetail').value!==\"\"){\n this.viewStatus = 'unidentifiedCancelConfirm';\n } else {\n this.gotoCasetransationPage();\n }\n } else {\n this.viewStatus = 'mainForm';\n }\n }\n\n gotoCasetransationPage() {\n this.paymentLibComponent.viewName = 'case-transactions';\n this.paymentLibComponent.TAKEPAYMENT = true;\n this.paymentLibComponent.ISBSENABLE = true;\n }\n getErrorMessage(isErrorExist) {\n return {\n title: \"There is a problem with the service\",\n body: \"Try again later\",\n showError: isErrorExist\n };\n }\n}\n","\nexport class UnsolicitedPaymentsRequest {\n payment_allocation_status: any;\n payment_group_reference: string;\n payment_reference: string;\n receiving_office: string;\n receiving_email_address: string;\n sending_email_address: string;\n unidentified_reason: string;\n constructor(payment_group_reference: string, payment_reference : string, reason: string,responsible_office: string, responsible_person:string,email_id: string) {\n this.payment_allocation_status = {\n description: '',\n name: \"Transferred\"\n };\n this.payment_group_reference = payment_group_reference;\n this.payment_reference= payment_reference;\n this.unidentified_reason= reason;\n this.receiving_office= responsible_office;\n this.receiving_email_address= email_id;\n this.sending_email_address= responsible_person;\n }\n}\n","import { Component, OnInit, Input } from '@angular/core';\nimport { FormBuilder, FormGroup, Validators, FormControl } from '@angular/forms';\nimport { PaymentLibComponent } from '../../payment-lib.component';\nimport { BulkScaningPaymentService } from '../../services/bulk-scaning-payment/bulk-scaning-payment.service';\nimport { IBSPayments } from '../../interfaces/IBSPayments';\nimport { UnsolicitedPaymentsRequest } from '../../interfaces/UnsolicitedPaymentsRequest';\nimport { PaymentViewService } from '../../services/payment-view/payment-view.service';\nimport { AllocatePaymentRequest } from '../../interfaces/AllocatePaymentRequest';\nimport { ErrorHandlerService } from '../../services/shared/error-handler.service';\n\n\n@Component({\n selector: 'app-mark-unsolicited-payment',\n templateUrl: './mark-unsolicited-payment.component.html',\n styleUrls: ['./mark-unsolicited-payment.component.scss']\n})\nexport class MarkUnsolicitedPaymentComponent implements OnInit {\n @Input() caseType: string;\n markPaymentUnsolicitedForm: FormGroup;\n viewStatus: string;\n reasonHasError: boolean = false;\n isReasonEmpty: boolean = false;\n reasonMinHasError: boolean = false;\n reasonMaxHasError: boolean = false;\n responsibleOfficeHasError: boolean = false;\n isResponsibleOfficeEmpty: boolean = false;\n errorMessage = this.getErrorMessage(false);\n ccdCaseNumber: string;\n bspaymentdcn: string;\n unassignedRecord: IBSPayments;\n siteID: string = null;\n reason: string;\n responsiblePerson: string;\n responsibleOffice: string;\n emailId: string;\n isConfirmButtondisabled: Boolean = false;\n isContinueButtondisabled: Boolean = false;\n ccdReference: string = null;\n exceptionReference: string = null;\n selectedSiteId: string;\n selectedSiteName: string;\n isStrategicFixEnable: boolean = true;\n siteIDList;\n\n constructor(private formBuilder: FormBuilder,\n private paymentViewService: PaymentViewService,\n private paymentLibComponent: PaymentLibComponent,\n private bulkScaningPaymentService: BulkScaningPaymentService) { }\n\n ngOnInit() {\n this.resetForm([false,false,false,false,false,false], 'all');\n this.viewStatus = 'mainForm';\n this.ccdCaseNumber = this.paymentLibComponent.CCD_CASE_NUMBER;\n this.bspaymentdcn = this.paymentLibComponent.bspaymentdcn;\n this.isStrategicFixEnable = this.paymentLibComponent.ISSFENABLE;\n this.getUnassignedPayment();\n\n this.paymentViewService.getSiteID().subscribe(\n siteids => {\n this.isContinueButtondisabled = false;\n this.errorMessage = this.getErrorMessage(false);\n this.siteIDList = JSON.parse(siteids);\n },\n err => {\n window.scrollTo(0, 0);\n this.isContinueButtondisabled = true;\n this.errorMessage = this.getErrorMessage(true);\n }\n );\n \n this.markPaymentUnsolicitedForm = this.formBuilder.group({\n reason: new FormControl('', Validators.compose([\n Validators.required,\n Validators.minLength(3),\n Validators.maxLength(255),\n Validators.pattern('^([a-zA-Z0-9\\\\s,\\\\.]*)$')\n ])),\n responsibleOffice: new FormControl('', Validators.compose([\n Validators.required,\n Validators.pattern('^([a-zA-Z0-9\\\\s\\\\n,\\\\.-:]*)$')\n ])),\n responsiblePerson: new FormControl(''),\n emailId: new FormControl('')\n });\n }\n trimUnderscore(method: string){\n return this.bulkScaningPaymentService.removeUnwantedString(method,' ');\n }\n confirmPayments() {\n this.isConfirmButtondisabled = true;\n const controls = this.markPaymentUnsolicitedForm.controls;\n if(!this.isStrategicFixEnable) {\n let allocatedRequest = {\n allocation_status:'Transferred',\n payment_allocation_status: {\n description: '',\n name: 'Transferred'\n },\n unidentified_reason: controls.reason.value,\n receiving_office: this.selectedSiteId,\n user_id: this.caseType,\n }\n const postStrategicBody = new AllocatePaymentRequest\n (this.ccdReference, this.unassignedRecord, this.caseType, this.exceptionReference, allocatedRequest);\n this.bulkScaningPaymentService.postBSWoPGStrategic(postStrategicBody).subscribe(\n res => {\n this.errorMessage = this.getErrorMessage(false);\n let response = JSON.parse(res);\n if (response.success) {\n this.gotoCasetransationPage();\n }\n },\n (error: any) => {\n this.errorMessage = this.getErrorMessage(true);\n this.isConfirmButtondisabled = false;\n });\n } else {\n // controls.responsibleOffice.setValue('P219');\n this.bulkScaningPaymentService.patchBSChangeStatus(this.unassignedRecord.dcn_reference, 'PROCESSED').subscribe(\n res1 => {\n this.errorMessage = this.getErrorMessage(false);\n const response1 = JSON.parse(res1),\n requestBody = new AllocatePaymentRequest\n (this.ccdReference, this.unassignedRecord, this.siteID, this.exceptionReference)\n this.paymentViewService.postBSPayments(requestBody).subscribe(\n res2 => {\n this.errorMessage = this.getErrorMessage(false);\n const response2 = JSON.parse(res2),\n reqBody = new UnsolicitedPaymentsRequest\n (response2['data'].payment_group_reference, response2['data'].reference, controls.reason.value, this.selectedSiteId, controls.responsiblePerson.value, controls.emailId.value);\n if (response2.success) {\n this.paymentViewService.postBSUnsolicitedPayments(reqBody).subscribe(\n res3 => {\n this.errorMessage = this.getErrorMessage(false);\n const response3 = JSON.parse(res3);\n if (response3.success) {\n this.gotoCasetransationPage();\n }\n },\n (error: any) => {\n this.bulkScaningPaymentService.patchBSChangeStatus(this.unassignedRecord.dcn_reference, 'COMPLETE').subscribe();\n this.errorMessage = this.getErrorMessage(true);\n this.isConfirmButtondisabled = false;\n }\n );\n }\n },\n (error: any) => {\n this.bulkScaningPaymentService.patchBSChangeStatus(this.unassignedRecord.dcn_reference, 'COMPLETE').subscribe();\n this.errorMessage = this.getErrorMessage(true);\n this.isConfirmButtondisabled = false;\n }\n );\n },\n (error: any) => {\n this.errorMessage = this.getErrorMessage(true);\n this.isConfirmButtondisabled = false;\n }\n );\n }\n }\n saveAndContinue() {\n this.resetForm([false,false,false,false,false,false], 'all');\n const formerror = this.markPaymentUnsolicitedForm.controls.reason.errors;\n const reasonField = this.markPaymentUnsolicitedForm.controls.reason;\n //const officeIdField = this.selectedSiteId;\n const officeIdField = this.markPaymentUnsolicitedForm.controls.responsibleOffice;\n if (this.markPaymentUnsolicitedForm.dirty && this.markPaymentUnsolicitedForm.valid) {\n const controls = this.markPaymentUnsolicitedForm.controls;\n this.emailId = controls.emailId.value;\n this.responsibleOffice = officeIdField.value;\n this.responsiblePerson = controls.responsiblePerson.value;\n this.reason = controls.reason.value;\n this.viewStatus = 'unsolicitedContinueConfirm';\n }else {\n if( reasonField.value == '' ) {\n this.resetForm([true,false,false,false,false,false], 'reason');\n }\n if(reasonField.value != '' && this.markPaymentUnsolicitedForm.controls.reason.invalid ) {\n this.resetForm([false,true,false,false,false,false], 'reason');\n }\n if(formerror && formerror.minlength && formerror.minlength.actualLength < 3 ) {\n this.resetForm([false,false,true,false,false,false], 'reason');\n }\n if(formerror && formerror.maxlength && formerror.maxlength.actualLength > 255 ) {\n this.resetForm([false,false,false,true,false,false], 'reason');\n }\n if(officeIdField.value == '') {\n this.resetForm([false,false,false,false,true,false], 'responsibleOffice');\n }\n if(officeIdField.value != '' && officeIdField.invalid) {\n this.resetForm([false,false,false,false,false,true],'responsibleOffice');\n }\n }\n }\n resetForm(val, field) {\n if(field==='reason' || field==='all') {\n this.isReasonEmpty = val[0];\n this.reasonHasError = val[1];\n this.reasonMinHasError = val[2];\n this.reasonMaxHasError = val[3];\n }\n if(field==='responsibleOffice' || field==='all') {\n this.isResponsibleOfficeEmpty = val[4];\n this.responsibleOfficeHasError = val[5];\n }\n }\n\ncancelMarkUnsolicitedPayments(type?:string){\n if(type && type === 'cancel') {\n if(this.checkingFormValue()){\n this.viewStatus = 'unsolicitedCancelConfirm';\n } else {\n this.gotoCasetransationPage();\n }\n } else {\n this.markPaymentUnsolicitedForm.controls.responsibleOffice.setValue('');\n this.viewStatus = 'mainForm';\n }\n }\n checkingFormValue(){\n const formFields = this.markPaymentUnsolicitedForm.value;\n let valueExists = false;\n\n for (var field in formFields) {\n if (formFields.hasOwnProperty(field) && formFields[field] !==\"\") {\n valueExists = true;\n break;\n }\n }\n return valueExists;\n }\n gotoCasetransationPage() {\n this.paymentLibComponent.viewName = 'case-transactions';\n this.paymentLibComponent.TAKEPAYMENT = true;\n this.paymentLibComponent.ISBSENABLE = true;\n }\n getUnassignedPayment() {\n this.bulkScaningPaymentService.getBSPaymentsByDCN(this.bspaymentdcn).subscribe(\n unassignedPayments => {\n \n this.unassignedRecord = unassignedPayments['data'].payments.filter(payment => {\n return payment && payment.dcn_reference == this.bspaymentdcn;\n })[0];\n this.siteID = unassignedPayments['data'].responsible_service_id;\n const beCcdNumber = unassignedPayments['data'].ccd_reference,\n beExceptionNumber = unassignedPayments['data'].exception_record_reference,\n exceptionReference = beCcdNumber ? beCcdNumber === this.ccdCaseNumber ? null : this.ccdCaseNumber : this.ccdCaseNumber;\n this.ccdReference = beCcdNumber ? beCcdNumber : null;\n this.exceptionReference = beExceptionNumber ? beExceptionNumber : exceptionReference;\n },\n (error: any) => {\n this.errorMessage = this.getErrorMessage(true);\n }\n );\n }\n\n getErrorMessage(isErrorExist) {\n return {\n title: \"Something went wrong.\",\n body: \"Please try again later.\",\n showError: isErrorExist\n };\n }\n\n selectchange(args){ \n this.selectedSiteId = args.target.value; \n this.selectedSiteName = args.target.options[args.target.selectedIndex].text; \n } \n\n}\n","import { Component, OnInit, Output,Input, EventEmitter } from '@angular/core';\nimport { BulkScaningPaymentService } from '../../services/bulk-scaning-payment/bulk-scaning-payment.service';\nimport { PaymentLibComponent } from '../../payment-lib.component';\nimport { IBSPayments } from '../../interfaces/IBSPayments';\nimport {Router} from '@angular/router';\nimport { PaymentViewService } from '../../services/payment-view/payment-view.service';\nimport { OrderslistService } from '../../services/orderslist.service';\n\n@Component({\n selector: 'ccpay-app-unprocessed-payments',\n templateUrl: './unprocessed-payments.component.html',\n styleUrls: ['./unprocessed-payments.component.scss']\n})\nexport class UnprocessedPaymentsComponent implements OnInit {\n\n @Input('FEE_RECORDS_EXISTS') FEE_RECORDS_EXISTS: boolean;\n @Input('PAYMENTREF') PAYMENTREF: string;\n @Input('ISTURNOFF') ISTURNOFF: boolean;\n @Input('IS_BUTTON_ENABLE') IS_BUTTON_ENABLE: boolean;\n @Input('IS_OS_AMT_AVAILABLE') IS_OS_AMT_AVAILABLE: boolean;\n @Input('ISSFENABLE') ISSFENABLE: boolean;\n @Input('PAYMENTSLENGTH') PAYMENTSLENGTH:Number;\n @Input('LEVEL')LEVEL:Number;\n\n @Output() selectedUnprocessedFeeEvent: EventEmitter<string> = new EventEmitter();\n @Output() getUnprocessedFeeCount: EventEmitter<string> = new EventEmitter();\n\n viewStatus = 'main';\n unassignedRecordList: IBSPayments;\n upPaymentErrorMessage: string = null;\n ccdCaseNumber: string;\n recordId: string = null;\n isRecordExist: boolean = false;\n dcnNumber: string = null;\n selectedOption: string;\n isUnprocessedRecordSelected: boolean = true;\n isAllocateToExistingFeebtnEnabled: boolean = false;\n isMarkAsUnidentifiedbtnEnabled: boolean = false;\n isAllocatedToNewFeebtnEnabled: boolean = false;\n isExceptionCase: boolean = false;\n serviceId: string = null;\n isBulkScanEnable;\n isTurnOff: boolean = true;\n isStFixEnable;\n unassignedRecordSelectedList: IBSPayments;\n unassignedRecordListLength: number = 0;\n showContent: boolean;\n\n constructor(private router: Router,\n private bulkScaningPaymentService: BulkScaningPaymentService,\n private paymentLibComponent: PaymentLibComponent,\n private paymentViewService: PaymentViewService,\n private OrderslistService: OrderslistService\n ) { }\n\n ngOnInit() {\n // Todo ...\n this.ccdCaseNumber = this.paymentLibComponent.CCD_CASE_NUMBER;\n this.selectedOption = this.paymentLibComponent.SELECTED_OPTION.toLocaleLowerCase();\n this.dcnNumber = this.paymentLibComponent.DCN_NUMBER;\n this.isBulkScanEnable = this.paymentLibComponent.ISBSENABLE;\n this.isTurnOff = this.paymentLibComponent.ISTURNOFF;\n this.isStFixEnable = this.paymentLibComponent.ISSFENABLE;\n this.OrderslistService.getFeeExists().subscribe( (data) => this.FEE_RECORDS_EXISTS = data);\n this.getUnassignedPaymentlist();\n\n }\n\n getUnassignedPaymentlist() {\n if (this.selectedOption === 'dcn') {\n this.bulkScaningPaymentService.getBSPaymentsByDCN(this.dcnNumber).subscribe(\n unassignedPayments => {\n // unassignedPayments['data'].map(data => data.expandable=false);\n if(unassignedPayments['data'] && unassignedPayments['data'].payments) {\n this.setValuesForUnassignedRecord(unassignedPayments['data']);\n } else if(unassignedPayments['payments']) {\n this.setValuesForUnassignedRecord(unassignedPayments);\n } else {\n this.upPaymentErrorMessage = 'error';\n this.getUnprocessedFeeCount.emit('0');\n }\n },\n (error: any) => {\n this.upPaymentErrorMessage = error;\n this.getUnprocessedFeeCount.emit('0');\n }\n );\n } else {\n this.bulkScaningPaymentService.getBSPaymentsByCCD(this.ccdCaseNumber).subscribe(\n unassignedPayments => {\n // unassignedPayments['data'].map(data => data.expandable=false);\n if(unassignedPayments['data'] && unassignedPayments['data'].payments) {\n this.setValuesForUnassignedRecord(unassignedPayments['data']);\n } else if(unassignedPayments['payments']) {\n this.setValuesForUnassignedRecord(unassignedPayments);\n } else {\n this.upPaymentErrorMessage = 'error';\n this.getUnprocessedFeeCount.emit('0');\n }\n },\n (error: any) => {\n this.upPaymentErrorMessage = error;\n this.getUnprocessedFeeCount.emit('0');\n }\n );\n }\n\n }\n\n setValuesForUnassignedRecord(unassignedPayments) {\n\n this.unassignedRecordList = unassignedPayments.payments;\n if(this.unassignedRecordList){\n this.unassignedRecordListLength = unassignedPayments.payments.length\n }\n this.serviceId = unassignedPayments.responsible_service_id;\n if (unassignedPayments['ccd_reference'] === undefined) {\n this.isExceptionCase = true;\n }\n // this.isRecordExist = this.unassignedRecordList.length === 0;\n this.getUnprocessedFeeCount.emit(<any>this.unassignedRecordList.length);\n this.unprocessedPaymentSelectEvent(this.unassignedRecordList);\n }\n\n formatUnassignedRecordId(ID: Number) {\n return `unassignrecord-${ID}`;\n }\n\n trimUnderscore(method: string){\n return this.bulkScaningPaymentService.removeUnwantedString(method,' ');\n }\n\n redirectToFeeSearchPage(event: any, dcn_reference:any) {\n event.preventDefault();\n this.recordId = dcn_reference;\n let url = this.isBulkScanEnable ? '&isBulkScanning=Enable' : '&isBulkScanning=Disable';\n url += this.ISTURNOFF ? '&isTurnOff=Enable' : '&isTurnOff=Disable';\n url += this.isStFixEnable ? '&isStFixEnable=Enable' : '&isStFixEnable=Disable';\n url +=`&caseType=${this.paymentLibComponent.CASETYPE}`;\n\n this.router.navigateByUrl(`/fee-search?selectedOption=${this.selectedOption}&ccdCaseNumber=${this.ccdCaseNumber}&dcn=${this.recordId}${url}`);\n }\n\n loadUnsolicitedPage(viewName: string, dcn_reference:any) {\n this.recordId = dcn_reference;\n this.paymentLibComponent.bspaymentdcn = this.recordId;\n this.paymentLibComponent.viewName = viewName;\n }\n\n unprocessedPaymentSelectEvent(selectedRecordReference: any) {\n this.isUnprocessedRecordSelected = true;\n this.validateButtons();\n this.selectedUnprocessedFeeEvent.emit(selectedRecordReference);\n }\n\n resetButtons() {\n this.isUnprocessedRecordSelected = false;\n this.isAllocateToExistingFeebtnEnabled = false;\n this.isMarkAsUnidentifiedbtnEnabled = false;\n this.isAllocatedToNewFeebtnEnabled = false;\n }\n\n goToAllocatePage(dcn_reference:any) {\n this.paymentLibComponent.bspaymentdcn = dcn_reference;\n this.paymentLibComponent.unProcessedPaymentServiceId = this.serviceId\n this.paymentLibComponent.isTurnOff = this.ISTURNOFF;\n this.paymentLibComponent.ISSFENABLE = this.isStFixEnable;\n\n if(this.ISTURNOFF) {\n this.paymentLibComponent.paymentGroupReference = this.PAYMENTREF;\n this.paymentLibComponent.viewName = 'fee-summary';\n }else {\n this.paymentLibComponent.paymentGroupReference = null;\n this.paymentLibComponent.viewName = 'allocate-payments';\n }\n\n }\n\n validateButtons() {\n if ( this.isUnprocessedRecordSelected && this.isExceptionCase) {\n this.isMarkAsUnidentifiedbtnEnabled = true;\n } else if ( this.isUnprocessedRecordSelected && !this.isExceptionCase && !this.FEE_RECORDS_EXISTS) {\n this.isAllocateToExistingFeebtnEnabled = false;\n this.isAllocatedToNewFeebtnEnabled = true;\n } else if( this.isUnprocessedRecordSelected && !this.isExceptionCase && this.FEE_RECORDS_EXISTS ) {\n if(!this.ISTURNOFF) {\n this.isAllocateToExistingFeebtnEnabled = true;\n this.isAllocatedToNewFeebtnEnabled = false;\n } else {\n this.isAllocateToExistingFeebtnEnabled = this.IS_OS_AMT_AVAILABLE;\n this.isAllocatedToNewFeebtnEnabled = true;\n }\n }\n }\n\n unprocessedPaymentUnSelectEvent(event: any) {\n event.preventDefault();\n this.recordId = null;\n this.isUnprocessedRecordSelected = false;\n this.isAllocateToExistingFeebtnEnabled = false;\n this.isAllocatedToNewFeebtnEnabled = false;\n this.isMarkAsUnidentifiedbtnEnabled = false;\n //this.validateButtons();\n this.selectedUnprocessedFeeEvent.emit('');\n }\n\n showDetailRow(event: any,obj: any, i: any) {\n event.preventDefault();\n\n this.unassignedRecordSelectedList = obj;\n\n }\n}\n","import { Component, OnInit, Input, Output, EventEmitter } from '@angular/core';\nimport { BulkScaningPaymentService } from '../../services/bulk-scaning-payment/bulk-scaning-payment.service';\nimport {IPayment} from '../../interfaces/IPayment';\nimport {Router} from '@angular/router';\n\n@Component({\n selector: 'ccpay-app-processed-payments',\n templateUrl: './processed-payments.component.html',\n styleUrls: ['./processed-payments.component.scss']\n})\nexport class ProcessedPaymentsComponent implements OnInit {\n\n @Input('NONPAYMENTS') NONPAYMENTS: IPayment[];\n @Output() goToPaymentViewComponent: EventEmitter<any> = new EventEmitter();\n\n constructor(\n private router: Router,\n private bulkScaningPaymentService: BulkScaningPaymentService\n ) { }\n ngOnInit() {\n }\n\n trimUnderscore(method: string){\n return this.bulkScaningPaymentService.removeUnwantedString(method,' ');\n }\n redirectToPaymentViewPage(paymentGroupReference: string, paymentReference: string, paymentMethod: string) {\n this.goToPaymentViewComponent.emit({paymentGroupReference, paymentReference, paymentMethod});\n }\n}\n","\nexport class IAllocationPaymentsRequest {\n payment_allocation_status: any;\n payment_group_reference: string;\n payment_reference: string;\n reason: string;\n explanation: string;\n user_name: string;\n constructor(payment_group_reference: string, payment_reference : string, reason? : string, explanation? : string, userName? : string) {\n this.payment_allocation_status = {\n description: '',\n name: \"Allocated\"\n };\n this.payment_group_reference = payment_group_reference;\n this.payment_reference= payment_reference;\n this.reason = reason ? reason : null;\n this.explanation = explanation ? explanation : null;\n this.user_name = userName ? userName : null;\n }\n}\n","import { Component, OnInit, Input } from '@angular/core';\nimport { FormBuilder, FormGroup, Validators, FormControl } from '@angular/forms';\nimport { PaymentLibComponent } from '../../payment-lib.component';\nimport { PaymentViewService } from '../../services/payment-view/payment-view.service';\nimport {CaseTransactionsService} from '../../services/case-transactions/case-transactions.service'; \nimport {BulkScaningPaymentService} from '../../services/bulk-scaning-payment/bulk-scaning-payment.service';\nimport { ErrorHandlerService } from '../../services/shared/error-handler.service';\nimport {IPaymentGroup} from '../../interfaces/IPaymentGroup';\nimport {IBSPayments} from '../../interfaces/IBSPayments';\nimport {AllocatePaymentRequest} from '../../interfaces/AllocatePaymentRequest';\nimport {IAllocationPaymentsRequest} from '../../interfaces/IAllocationPaymentsRequest';\nimport { IOrderReferenceFee } from '../../interfaces/IOrderReferenceFee';\nimport { OrderslistService } from '../../services/orderslist.service';\n\n\n\n@Component({\n selector: 'app-allocate-payments',\n templateUrl: './allocate-payments.component.html',\n styleUrls: ['./allocate-payments.component.scss']\n})\nexport class AllocatePaymentsComponent implements OnInit {\n @Input() isTurnOff: boolean;\n @Input() caseType: string;\n\n overUnderPaymentForm: FormGroup;\n viewStatus: string;\n ccdCaseNumber: string;\n bspaymentdcn: string;\n recordId:string;\n feedbackUrlLabel:string;\n unAllocatedPayment: IBSPayments = {\n amount: 0\n };\n siteID: string = null;\n errorMessage = this.errorHandlerService.getServerErrorMessage(false, false, '');\n paymentGroup: IPaymentGroup;\n paymentGroups: IPaymentGroup[] = [];\t\n remainingAmount: number;\n isRemainingAmountGtZero: boolean;\n isMoreDetailsBoxHide: boolean = true;\n isRemainingAmountLtZero: boolean;\n afterFeeAllocateOutstanding: number;\n amountForAllocation: number;\n isConfirmButtondisabled: boolean = false;\n isContinueButtondisabled: boolean = true;\n otherPaymentExplanation: string = null;\n selectedOption: string = null;\n isFeeAmountZero: boolean = false;\t\n\n paymentReasonHasError: boolean = false;\n paymentExplanationHasError: boolean = false;\n isPaymentDetailsEmpty: boolean = false;\n isPaymentDetailsInvalid: boolean = false;\n paymentDetailsMinHasError: boolean = false;\n paymentDetailsMaxHasError: boolean = false;\n isUserNameEmpty: boolean = false;\n isUserNameInvalid: boolean = false;\n ccdReference: string = null;\n exceptionReference: string = null;\n paymentReason: string = null;\n paymentExplanation: string = null;\n userName: string = null;\n paymentSectionLabel: any;\n paymentRef: string = null;\n isStrategicFixEnable: boolean = true;\n orderLevelFees: IOrderReferenceFee[] = [];\n cookieUserName: string[] = [];\n enCookieUserName: any;\n userNameField: string = null;\n\n reasonList: { [key: string]: { [key: string]: string } }= {\n overPayment: {\n hwfReward: 'Help with Fees (HWF) awarded. Please include the HWF reference number in the explanatory note',\n wrongFee: 'Incorrect payment received',\n notIssueCase: 'Unable to issue case',\n otherDeduction: 'Other'\n },\n shortFall: {\n helpWithFee: 'Help with Fees (HWF) application declined',\n wrongFee: 'Incorrect payment received',\n other: 'Other'\n }\n }\n explanationList = {\n overPayment: {\n referRefund: 'Details in case notes. Refund due',\n noRefund: 'Details in case notes. No refund due',\n noCase: 'No case created. Refund due',\n other: 'Other'\n },\n shortFall: {\n holdCase: 'I have put a stop on the case and contacted the applicant requesting the balance of payment',\n heldCase: 'I have put a stop on the case. The applicant needs to be contacted to request the balance of payment',\n other: 'Other'\n }\n }\n\n refund = {\n reason: {\n duplicate: 'Duplicate payment',\n humanerror: 'Human error',\n caseWithdrawn: 'Case withdrawn',\n other: 'Other'\n }\n }\n\n\n constructor(\n private errorHandlerService: ErrorHandlerService,\n private caseTransactionsService: CaseTransactionsService,\n private formBuilder: FormBuilder,\n private paymentViewService: PaymentViewService,\n private paymentLibComponent: PaymentLibComponent,\n private bulkScaningPaymentService: BulkScaningPaymentService,\n private OrderslistService: OrderslistService) { }\n\n ngOnInit() {\n this.viewStatus = 'mainForm';\n if (this.paymentLibComponent.paymentGroupReference !== null) {\n this.viewStatus = 'allocatePaymentConfirmation';\n }\n \n this.ccdCaseNumber = this.paymentLibComponent.CCD_CASE_NUMBER;\n this.bspaymentdcn = this.paymentLibComponent.bspaymentdcn;\n this.paymentRef = this.paymentLibComponent.paymentGroupReference;\n this.selectedOption = this.paymentLibComponent.SELECTED_OPTION;\n this.isStrategicFixEnable = this.paymentLibComponent.ISSFENABLE;\n this.isTurnOff = this.paymentLibComponent.isTurnOff;\n this.overUnderPaymentForm = this.formBuilder.group({\n moreDetails: new FormControl('', Validators.compose([\n Validators.required,\n Validators.minLength(3),\n Validators.maxLength(255),\n Validators.pattern('^([a-zA-Z0-9\\\\s,\\\\.]*)$')\n ])),\n userName: new FormControl('', Validators.compose([\n Validators.required,\n Validators.pattern('^([a-zA-Z0-9\\\\s]*)$')\n ])),\n });\n this.OrderslistService.getOrdersList().subscribe( (data) =>\n this.orderLevelFees = data.filter(data => data.orderStatus !== 'Paid'));\n this.OrderslistService.getCaseType().subscribe( (data) => this.caseType = data);\n this.getUnassignedPayment();\n }\n getGroupOutstandingAmount(paymentGroup: IPaymentGroup): number {\n return this.bulkScaningPaymentService.calculateOutStandingAmount(paymentGroup);\n }\n\n getPaymentGroupDetails(){\n\n if(!this.isTurnOff){\n this.paymentViewService.getPaymentGroupDetails(this.paymentRef).subscribe(\n paymentGroup => {\n this.errorMessage = this.errorHandlerService.getServerErrorMessage(false, false, '');\n this.paymentGroup = paymentGroup;\n this.saveAndContinue();\n },\n (error: any) => {\n this.errorMessage = this.errorHandlerService.getServerErrorMessage(true, false, '');\n }\n );\n }else {\n this.caseTransactionsService.getPaymentGroups(this.ccdCaseNumber).subscribe(\n paymentGroups => {\n this.errorMessage = this.errorHandlerService.getServerErrorMessage(false, false, '');\n this.paymentGroups = paymentGroups['payment_groups'].filter(paymentGroup => {\n paymentGroup.fees.forEach(fee => {\n if(fee.calculated_amount === 0) {\n this.isFeeAmountZero = true\n }\n });\n let fstCon = this.getGroupOutstandingAmount(<IPaymentGroup>paymentGroup),\n scndCn = fstCon > 0 || (fstCon == 0 && this.isFeeAmountZero) && paymentGroup.payment_group_reference === this.paymentRef;\n return this.paymentRef ? scndCn : fstCon > 0 || (fstCon == 0 && this.isFeeAmountZero);\n });\n },\n (error: any) => {\n this.errorMessage = this.errorHandlerService.getServerErrorMessage(true, false, '');\n }\n );\n }\n\n }\n\n selectedPaymentGroup(paymentGroup: IPaymentGroup) {\t\n this.isContinueButtondisabled = false;\t\n this.paymentGroup = paymentGroup;\t\n }\t\n\n gotoCasetransationPage() {\n this.paymentLibComponent.viewName = 'case-transactions';\n this.paymentLibComponent.isTurnOff = this.isTurnOff;\n this.paymentLibComponent.TAKEPAYMENT = true;\n this.paymentLibComponent.ISBSENABLE = true;\n }\n\n gotoSummaryPage(event: any) { \n event.preventDefault();\n this.paymentLibComponent.viewName = 'fee-summary';\n this.paymentLibComponent.isTurnOff = this.isTurnOff;\n this.paymentLibComponent.TAKEPAYMENT = true;\n this.paymentLibComponent.ISBSENABLE = true;\n }\n\n cancelAllocatePayment(event: any){\n event.preventDefault();\n this.resetForm([false, false, false, false, false, false, false, false], 'all');\n if(!this.isTurnOff){\n this.paymentLibComponent.viewName = 'fee-summary';\n this.paymentLibComponent.isTurnOff = this.isTurnOff;\n this.paymentLibComponent.TAKEPAYMENT = true;\n this.paymentLibComponent.ISBSENABLE = true;\n } else {\n this.viewStatus = 'mainForm';\t\n }\n }\n confirmAllocatePayement(){\n this.enCookieUserName = document.cookie.split(\";\").find(row => row.includes(\"user-info\")).split(\"=\")[1].split(\";\");\n this.cookieUserName = JSON.parse(decodeURIComponent(this.enCookieUserName));\n \n const fullName = this.cookieUserName['forename'] + ' ' + this.cookieUserName['surname'];\n\n const paymentDetailsField = this.overUnderPaymentForm.controls.moreDetails,\n paymentFormError = this.overUnderPaymentForm.controls.moreDetails.errors,\n userNameField = fullName,\n isEmptyCondtion = this.paymentReason && this.paymentExplanation,\n isOtherOptionSelected = this.paymentExplanation === 'Other';\n\n this.resetForm([false, false, false, false, false, false, false, false], 'all');\n if ( (!this.isRemainingAmountGtZero && !this.isRemainingAmountLtZero) || isEmptyCondtion && (!isOtherOptionSelected && userNameField.length > 0 || isOtherOptionSelected && userNameField.length > 0 && paymentDetailsField.valid)) {\n this.isConfirmButtondisabled = true;\n this.otherPaymentExplanation = this.paymentExplanation === 'Other' ? paymentDetailsField.value : this.paymentExplanation;\n this.userName = userNameField;\n this.finalServiceCall();\n }else {\n if(!this.paymentReason) {\n this.resetForm([true, false, false, false, false, false, false, false], 'reason');\n }\n if(!this.paymentExplanation) {\n this.resetForm([false, true, false, false, false, false, false, false], 'explanation');\n }\n if(this.paymentExplanation && isOtherOptionSelected) {\n if(paymentDetailsField.value == '' ) {\n this.resetForm([false, false, true, false, false, false, false, false], 'other');\n }\n if(paymentDetailsField.value != '' && paymentDetailsField.invalid ) {\n this.resetForm([false, false, false, true, false, false, false, false], 'other');\n }\n if(paymentFormError && paymentFormError.minlength && paymentFormError.minlength.actualLength < 3 ) {\n this.resetForm([false, false, false, false, true, false, false, false], 'other');\n }\n if(paymentFormError && paymentFormError.maxlength && paymentFormError.maxlength.actualLength > 255 ) {\n this.resetForm([false, false, false, false, false, true, false, false], 'other');\n }\n }\n if(userNameField.length === 0) {\n this.resetForm([false, false, false, false, false, false, true, false], 'username');\n }\n }\n }\n resetForm(vals, field) {\n if(field==='reason' || field==='all') {\n this.paymentReasonHasError = vals[0];\n }\n if(field==='explanation' || field==='all') {\n this.paymentExplanationHasError = vals[1];\n }\n if(field==='other' || field==='all') {\n this.isPaymentDetailsEmpty = vals[2];\n this.isPaymentDetailsInvalid = vals[3];\n this.paymentDetailsMinHasError = vals[4];\n this.paymentDetailsMaxHasError = vals[5];\n }\n if(field==='username' || field==='all') {\n this.isUserNameEmpty = vals[6];\n this.isUserNameInvalid = vals[7];\n }\n }\n finalServiceCall() {\n if(!this.isStrategicFixEnable) {\n let allocatedRequest = {\n reason: this.paymentReason,\n allocation_status:'Allocated',\n explanation: this.otherPaymentExplanation,\n payment_allocation_status: {\n description: '',\n name: 'Allocated'\n },\n payment_group_reference: this.paymentGroup.payment_group_reference,\n case_type: this.caseType,\n user_name: this.userName\n }\n const postStrategicBody = new AllocatePaymentRequest\n (this.ccdReference, this.unAllocatedPayment, this.caseType, this.exceptionReference, allocatedRequest);\n this.bulkScaningPaymentService.postBSPaymentStrategic(postStrategicBody , this.paymentGroup.payment_group_reference).subscribe(\n res => {\n this.errorMessage = this.errorHandlerService.getServerErrorMessage(false, false, '');\n let response = JSON.parse(res);\n if (response.success) {\n this.gotoCasetransationPage();\n }\n },\n (error: any) => {\n this.errorMessage = this.errorHandlerService.getServerErrorMessage(true, false, '');\n window.scrollTo(0, 0);\n this.isConfirmButtondisabled = false;\n });\n\n } else {\n this.bulkScaningPaymentService.patchBSChangeStatus(this.unAllocatedPayment.dcn_reference, 'PROCESSED').subscribe(\n res1 => {\n this.errorMessage = this.errorHandlerService.getServerErrorMessage(false, false, '');\n let response1 = JSON.parse(res1);\n if (response1.success) {\n const requestBody = new AllocatePaymentRequest\n (this.ccdReference, this.unAllocatedPayment, this.siteID, this.exceptionReference);\n this.bulkScaningPaymentService.postBSAllocatePayment(requestBody, this.paymentGroup.payment_group_reference).subscribe(\n res2 => {\n this.errorMessage = this.errorHandlerService.getServerErrorMessage(false, false, '');\n let response2 = JSON.parse(res2);\n const reqBody = new IAllocationPaymentsRequest\n (response2['data'].payment_group_reference, response2['data'].reference, this.paymentReason, this.otherPaymentExplanation, this.userName);\n if (response2.success) {\n this.paymentViewService.postBSAllocationPayments(reqBody).subscribe(\n \n res3 => {\n this.errorMessage = this.errorHandlerService.getServerErrorMessage(false, false, '');\n let response3 = JSON.parse(res3);\n if (response3.success) {\n this.gotoCasetransationPage();\n }\n },\n (error: any) => {\n this.bulkScaningPaymentService.patchBSChangeStatus(this.unAllocatedPayment.dcn_reference, 'COMPLETE').subscribe();\n this.errorMessage = this.errorHandlerService.getServerErrorMessage(true, false, '');\n window.scrollTo(0, 0);\n this.isConfirmButtondisabled = false;\n }\n );\n }\n },\n (error: any) => {\n this.bulkScaningPaymentService.patchBSChangeStatus(this.unAllocatedPayment.dcn_reference, 'COMPLETE').subscribe();\n this.errorMessage = this.errorHandlerService.getServerErrorMessage(true, false, '');\n window.scrollTo(0, 0);\n this.isConfirmButtondisabled = false;\n }\n );\n }\n },\n (error: any) => {\n this.errorMessage = this.errorHandlerService.getServerErrorMessage(true, false, '');\n window.scrollTo(0, 0);\n this.isConfirmButtondisabled = false;\n }\n ); \n }\n }\n\n saveAndContinue(){\n if(this.paymentGroup) {\n this.isMoreDetailsBoxHide = true;\n this.overUnderPaymentForm.get('moreDetails').reset();\n this.overUnderPaymentForm.get('moreDetails').setValue('');\n this.overUnderPaymentForm.get('userName').reset();\n this.overUnderPaymentForm.get('userName').setValue('');\n this.paymentReason = '';\n this.paymentExplanation = '';\n let GroupOutstandingAmount = this.getGroupOutstandingAmount(this.paymentGroup);\n const remainingToBeAssigned = this.unAllocatedPayment.amount - GroupOutstandingAmount;\n this.isRemainingAmountGtZero = remainingToBeAssigned > 0;\n this.isRemainingAmountLtZero = remainingToBeAssigned < 0;\n this.paymentSectionLabel = this.isRemainingAmountGtZero ? { \n title: 'There is an Over payment of',\n reason: 'Provide a reason. This will be used in the Refund process.',\n }: this.isRemainingAmountLtZero ? { \n title: 'There is an Under payment of',\n reason: 'Provide a reason',\n }: { \n title:'Amount left to be allocated',\n reason:'',\n };\n this.feedbackUrlLabel = this.isRemainingAmountGtZero ? 'CONFIRMALLOCATION_SURPLUS' : this.isRemainingAmountLtZero ? 'CONFIRMALLOCATION_SHORTFALL' : 'CONFIRMALLOCATION';\n this.remainingAmount = this.isRemainingAmountGtZero ? remainingToBeAssigned : this.isRemainingAmountLtZero ? remainingToBeAssigned * -1 : 0;\n this.afterFeeAllocateOutstanding = remainingToBeAssigned >= 0 ? 0 : (remainingToBeAssigned * -1);\n this.amountForAllocation = GroupOutstandingAmount >= this.unAllocatedPayment.amount ? this.unAllocatedPayment.amount : GroupOutstandingAmount;\n if(this.isTurnOff){\n this.viewStatus = 'allocatePaymentConfirmation';\t\n }\n }\n }\n getUnassignedPayment() {\n this.bulkScaningPaymentService.getBSPaymentsByDCN(this.bspaymentdcn).subscribe(\n unassignedPayments => {\n this.errorMessage = this.errorHandlerService.getServerErrorMessage(false, false, '');\n this.unAllocatedPayment = unassignedPayments['data'].payments.filter(payment => {\n return payment && payment.dcn_reference == this.bspaymentdcn;\n })[0];\n this.siteID = unassignedPayments['data'].responsible_service_id;\n const beCcdNumber = unassignedPayments['data'].ccd_reference,\n beExceptionNumber = unassignedPayments['data'].exception_record_reference,\n exceptionReference = beCcdNumber ? beCcdNumber === this.ccdCaseNumber ? null : this.ccdCaseNumber : this.ccdCaseNumber;\n this.ccdReference = beCcdNumber ? beCcdNumber : null;\n this.exceptionReference = beExceptionNumber ? beExceptionNumber : exceptionReference;\n this.getPaymentGroupDetails();\n },\n (error: any) => {\n this.errorMessage = this.errorHandlerService.getServerErrorMessage(true, false, '');\n }\n );\n }\n selectRadioButton(key, type) {\n this.isMoreDetailsBoxHide = true;\n if( type === 'explanation' && key === 'other' ){\n this.isPaymentDetailsEmpty = false;\n this.isPaymentDetailsInvalid = false;\n this.paymentDetailsMinHasError = false;\n this.paymentDetailsMaxHasError = false;\n this.isMoreDetailsBoxHide = false;\n }\n }\n OrderListSelectEvent(orderef: any){\n this.isContinueButtondisabled = false;\n this.recordId= orderef;\n }\n\n redirectToOrderFeeSearchPage() {\n // this.paymentLibComponent.bspaymentdcn = null;\n this.paymentLibComponent.paymentGroupReference = this.recordId;\n this.paymentLibComponent.isTurnOff = this.isTurnOff;\n this.paymentLibComponent.viewName = 'fee-summary';\n}\n}\n","import { IFee } from './IFee';\n\nexport class AddRemissionRequest {\n beneficiary_name: string;\n ccd_case_number: string;\n fee: IFee;\n hwf_amount: number;\n hwf_reference: string;\n payment_group_reference: string;\n case_type: string;\n\n constructor(ccd_case_number: string, fee: IFee, hwf_amount: number, hwf_reference: string, caseType: string) {\n this.ccd_case_number = ccd_case_number;\n this.fee = fee;\n this.hwf_amount = hwf_amount;\n this.hwf_reference = hwf_reference;\n this.case_type = caseType;\n }\n}\n","export class AddRetroRemissionRequest {\n hwf_amount: number;\n hwf_reference: string;\n\n constructor(hwf_amount: number, hwf_reference: string) {\n this.hwf_amount = hwf_amount;\n this.hwf_reference = hwf_reference;\n }\n}\n","export class PostRefundRetroRemission {\n payment_reference: string;\n refund_reason: string;\n \n constructor(payment_reference : string, refund_reason : string) {\n this.payment_reference= payment_reference;\n this.refund_reason = refund_reason;\n } \n}","export class PostIssueRefundRetroRemission {\n remissionReference: string;\n \n constructor(remissionReference : string) {\n this.remissionReference= remissionReference;\n } \n}","import { Component, OnInit, Input, Output, EventEmitter} from '@angular/core';\nimport { FormBuilder, FormGroup, Validators, FormControl, RequiredValidator } from '@angular/forms';\nimport { IFee } from '../../interfaces/IFee';\nimport {Router} from '@angular/router';\nimport { AddRemissionRequest } from '../../interfaces/AddRemissionRequest';\nimport { PaymentViewService } from '../../services/payment-view/payment-view.service';\nimport { PaymentLibComponent } from '../../payment-lib.component';\nimport { IPayment } from '../../interfaces/IPayment';\nimport { RefundsService } from '../../services/refunds/refunds.service';\nimport { IRefundReasons } from '../../interfaces/IRefundReasons';\nimport { RefundsRequest } from '../../interfaces/RefundsRequest';\nimport { AddRetroRemissionRequest } from '../../interfaces/AddRetroRemissionRequest';\nimport { IssueRefundRequest } from '../../interfaces/IssueRefundRequest';\nimport { PostRefundRetroRemission } from '../../interfaces/PostRefundRetroRemission';\nimport { PostIssueRefundRetroRemission } from '../../interfaces/PostIssueRefundRetroRemission';\nimport {ChangeDetectorRef} from '@angular/core';\nimport { IRemission } from '../../interfaces/IRemission';\nimport { OrderslistService } from '../../services/orderslist.service';\n\nconst BS_ENABLE_FLAG = 'bulk-scan-enabling-fe';\n\n@Component({\n selector: 'ccpay-add-remission',\n templateUrl: './add-remission.component.html',\n styleUrls: ['./add-remission.component.scss']\n})\nexport class AddRemissionComponent implements OnInit {\n @Input() fee: IFee;\n @Input() payment: IPayment;\n @Input() remission: IRemission;\n @Input() ccdCaseNumber: string;\n @Input() caseType: string;\n @Input() viewCompStatus: string;\n @Input() paymentGroupRef: string;\n @Input() isTurnOff: boolean;\n @Input() isRefundRemission: boolean;\n @Input() isStrategicFixEnable: boolean;\n @Input() paidAmount: any;\n @Input() isFromRefundListPage: boolean;\n @Input() isFromPaymentDetailPage: boolean;\n @Input() isFromServiceRequestPage: boolean;\n @Input() feeamount: number;\n @Input('LOGGEDINUSERROLES') LOGGEDINUSERROLES: string[];\n @Input('orderDetail') orderDetail: any[];\n @Input('orderRef') orderRef: string;\n @Input('orderStatus') orderStatus: string;\n @Input('orderParty') orderParty: string;\n @Input('orderCreated') orderCreated: Date;\n @Input('orderCCDEvent') orderCCDEvent: string;\n @Input('takepayment') takePayment: boolean;\n @Input('orderFeesTotal') orderFeesTotal: number;\n @Input('orderTotalPayments') orderTotalPayments: number;\n @Input('orderRemissionTotal') orderRemissionTotal: number;\n @Output() cancelRemission: EventEmitter<void> = new EventEmitter();\n //@Output() refundListReason: EventEmitter<any> = new EventEmitter({reason:string, code:string});\n @Output() refundListReason = new EventEmitter<{reason: string, code: string}>();\n @Output() refundListAmount: EventEmitter<string> = new EventEmitter();\n\n refund = {\n reason: {\n duplicate: 'Duplicate payment',\n humanerror: 'Human error',\n caseWithdrawn: 'Case withdrawn',\n other: 'Other'\n }\n }\n\n remissionForm: FormGroup;\n hasErrors = false;\n viewStatus = 'main';\n errorMessage = null;\n option: string = null;\n isConfirmationBtnDisabled: boolean = false;\n bsPaymentDcnNumber: string;\n selectedValue = 'yes';\n amount: any;\n retroRemission: boolean = false;\n remissionReference: string = '';\n refundReference: string;\n refundAmount: string;\n paymentExplanationHasError: boolean = false;\n refundReason:string;\n selectedRefundReason: string;\n displayRefundReason: string;\n refundCode:string;\n remessionPayment:IPayment;\n isRemissionCodeEmpty: boolean = false;\n remissionCodeHasError: boolean = false;\n isAmountEmpty: boolean = false;\n isReasonEmpty: boolean = false;\n amountHasError: boolean = false;\n isRemissionLessThanFeeError: boolean = false;\n refundHasError:boolean = false;\n isPaymentSuccess: boolean = false;\n isRemissionApplied: boolean = false;\n remissionamt:number;\n // refundReasons: any[] = [];\n commonRefundReasons: any[] = [];\n showReasonText: boolean;\n isRefundReasonsSelected: boolean;\n default: string;\n reasonLength: number;\n refundReasons:IRefundReasons[];\n pattern1: string;\n pattern2: string;\n sendOrderDetail: any[];\n sendOrderRef: string;\n component: { account_number: string; amount: number; case_reference: string; ccd_case_number: string; channel: string; currency: string; customer_reference: string; date_created: string; date_updated: string; description: string; method: string; organisation_name: string; payment_allocation: any[]; reference: string; service_name: string; site_id: string; status: string; };\n\n constructor(private formBuilder: FormBuilder,\n private router: Router,\n private paymentViewService: PaymentViewService,\n private paymentLibComponent: PaymentLibComponent,\n private refundService: RefundsService,\n private cd: ChangeDetectorRef,\n private OrderslistService: OrderslistService) { }\n\n ngOnInit() {\n this.default = 'Select a different reason';\n this.pattern1 = '^([a-zA-Z0-9]{3})-([a-zA-Z0-9]{3})-([a-zA-Z0-9]{3})$';\n this.pattern2 = '^([A-Za-z]{2}[0-9]{2})-([0-9]{6})$';\n if(this.viewCompStatus !== '' && this.viewCompStatus !== undefined){\n this.viewStatus = '';\n }\n if(this.remission) {\n }\n if(this.fee) {\n this.amount = (this.fee.volume * this.fee.calculated_amount);\n }\n if (this.payment){\n this.remessionPayment = this.payment;\n if(this.payment.status === 'Success') {\n this.isPaymentSuccess = true;\n }\n }\n this.option = this.paymentLibComponent.SELECTED_OPTION;\n this.bsPaymentDcnNumber = this.paymentLibComponent.bspaymentdcn;\n this.remissionForm = this.formBuilder.group({\n remissionCode: new FormControl('',\n Validators.compose([\n Validators.required,\n Validators.pattern(`(${this.pattern1})|(${this.pattern2})`)\n ])\n ),\n amount: new FormControl('', Validators.compose([\n Validators.required,\n Validators.pattern('^[0-9]+(\\.[0-9]{1,2})?$')\n ])),\n refundReason: new FormControl('', Validators.compose([Validators.required])),\n refundDDReason: new FormControl('', Validators.compose([Validators.required])),\n reason: new FormControl()\n });\n const remissionctrls=this.remissionForm.controls;\n remissionctrls['refundDDReason'].setValue('Select a different reason', {onlySelf: true});\n\n if(this.viewCompStatus === ''){\n this.viewStatus = 'main';\n }\n\n if(this.viewCompStatus === 'issuerefund'){\n this.refundService.getRefundReasons().subscribe(\n refundReasons => {\n this.refundReasons = refundReasons.filter((data) => data.recently_used === false);\n this.refundReasons = this.refundReasons.filter((data) => data.name !== 'Retrospective remission');\n this.cd.detectChanges();\n this.commonRefundReasons = refundReasons.filter((data) => data.recently_used === true);\n this.commonRefundReasons.sort((a, b) => a.toString().localeCompare(b));\n this.cd.detectChanges();\n } );\n }\n\n if(this.viewCompStatus === 'processretroremissonpage' && this.isFromRefundListPage){\n this.viewStatus = 'processretroremissonpage';\n }\n\n }\n\n addRemission() {\n this.resetRemissionForm([false, false, false, false, false, false], 'All');\n const remissionctrls=this.remissionForm.controls,\n isRemissionLessThanFee = this.fee.calculated_amount > remissionctrls.amount.value;\n this.remissionForm.controls['refundReason'].setErrors(null);\n this.remissionForm.controls['refundDDReason'].setErrors(null);\n if (this.remissionForm.dirty && this.remissionForm.valid && isRemissionLessThanFee) {\n this.viewStatus = 'confirmation';\n }else {\n\n if(remissionctrls['remissionCode'].value == '' ) {\n this.resetRemissionForm([true, false, false, false, false, false], 'remissionCode');\n }\n if(remissionctrls['remissionCode'].value != '' && remissionctrls['remissionCode'].invalid ) {\n this.resetRemissionForm([false, true, false, false, false, false], 'remissionCode');\n }\n if(remissionctrls['amount'].value == '' ) {\n this.resetRemissionForm([false, false, true, false, false, false], 'amount');\n }\n if(remissionctrls['amount'].value != '' && remissionctrls['amount'].invalid ) {\n this.resetRemissionForm([false, true, false, true, false, false], 'amount');\n }\n if(remissionctrls.amount.valid && !isRemissionLessThanFee){\n this.resetRemissionForm([false, false, false, false, true, false], 'amount');\n }\n }\n }\n\n confirmRemission() {\n this.isConfirmationBtnDisabled = true;\n const newNetAmount = this.remissionForm.controls.amount.value,\n remissionAmount = this.fee.net_amount - newNetAmount,\n requestBody = new AddRemissionRequest\n (this.ccdCaseNumber, this.fee, remissionAmount, this.remissionForm.controls.remissionCode.value, this.caseType);\n this.paymentViewService.postPaymentGroupWithRemissions(decodeURIComponent(this.paymentGroupRef).trim(), this.fee.id, requestBody).subscribe(\n response => {\n if (JSON.parse(response).success) {\n let LDUrl = this.isTurnOff ? '&isTurnOff=Enable' : '&isTurnOff=Disable'\n LDUrl += `&caseType=${this.caseType}`\n if (this.paymentLibComponent.bspaymentdcn) {\n this.router.routeReuseStrategy.shouldReuseRoute = () => false;\n this.router.onSameUrlNavigation = 'reload';\n this.router.navigateByUrl(`/payment-history/${this.ccdCaseNumber}?view=fee-summary&selectedOption=${this.option}&paymentGroupRef=${this.paymentGroupRef}&dcn=${this.paymentLibComponent.bspaymentdcn}${LDUrl}`);\n }else {\n this.gotoCasetransationPage();\n }\n\n }\n },\n (error: any) => {\n this.errorMessage = error;\n this.isConfirmationBtnDisabled = false;\n }\n );\n }\n\n resetRemissionForm(val, field){\n if (field==='All'){\n this.isRemissionCodeEmpty = val[0];\n this.remissionCodeHasError = val[1];\n this.isAmountEmpty = val[2];\n this.amountHasError = val[3];\n this.isRemissionLessThanFeeError = val[4];\n this.isReasonEmpty = val[5];\n } else if(field==='remissionCode' || field==='All') {\n this.isRemissionCodeEmpty = val[0];\n this.remissionCodeHasError = val[1];\n } else if (field==='amount' || field==='All'){\n this.isAmountEmpty = val[2];\n this.amountHasError = val[3];\n this.isRemissionLessThanFeeError = val[4];\n } else if (field==='reason' || field==='All'){\n this.isReasonEmpty = val[5];\n }\n }\n\n // Add retro remission changes\n addRemissionCode() {\n this.errorMessage = false;\n this.viewStatus = '';\n this.isRefundRemission = false;\n this.resetRemissionForm([false, false, false, false, false, false], 'All');\n const remissionctrls=this.remissionForm.controls\n // isRemissionLessThanFee = this.fee.calculated_amount >= remissionctrls.amount.value;\n this.remissionForm.controls['refundReason'].setErrors(null);\n this.remissionForm.controls['refundDDReason'].setErrors(null);\n this.remissionForm.controls['amount'].setErrors(null);\n if (this.remissionForm.dirty && this.remissionForm.valid ) {\n this.viewCompStatus = '';\n this.viewStatus = \"processretroremissonpage\";\n }else {\n\n if(remissionctrls['remissionCode'].value == '' ) {\n this.resetRemissionForm([true, false, false, false, false], 'remissionCode');\n }\n if(remissionctrls['remissionCode'].value != '' && remissionctrls['remissionCode'].invalid ) {\n this.resetRemissionForm([false, true, false, false, false], 'remissionCode');\n }\n if(remissionctrls['amount'].value == '' ) {\n this.resetRemissionForm([false, false, true, false, false], 'amount');\n }\n if(remissionctrls['amount'].value != '' && remissionctrls['amount'].invalid ) {\n this.resetRemissionForm([false, true, false, true, false], 'amount');\n }\n if(remissionctrls['reason'].value == '') {\n this.resetRemissionForm([false, false, false, true, false, true], 'reason');\n }\n if(remissionctrls.amount.valid){\n this.resetRemissionForm([false, false, false, false, true], 'amount');\n }\n\n }\n }\n\n\n gotoAddRetroRemissionCodePage() {\n this.errorMessage = false;\n if(this.isRefundRemission) {\n this.paymentLibComponent.iscancelClicked = true;\n this.refundListAmount.emit();\n this.paymentLibComponent.isFromRefundStatusPage = true;\n return;\n }\n if ( this.isFromRefundListPage ) {\n this.paymentLibComponent.iscancelClicked = true;\n this.refundListReason.emit({reason: this.selectedRefundReason, code: this.refundReason});\n this.paymentLibComponent.isFromRefundStatusPage = true;\n return;\n }\n this.viewStatus = '';\n this.selectedValue = 'yes';\n this.viewCompStatus = \"addremission\";\n this.isRefundRemission = true;\n this.errorMessage = '';\n if(this.isFromPaymentDetailPage) {\n this.paymentLibComponent.viewName = 'payment-view';\n }\n }\n\n gotoCheckRetroRemissionPage(payment: IPayment) {\n this.paymentLibComponent.iscancelClicked = false;\n this.errorMessage = '';\n this.resetRemissionForm([false, false, false, false, false], 'All');\n if( !this.isRefundRemission) {\n var remissionctrls=this.remissionForm.controls,\n isRemissionLessThanFee = this.fee.calculated_amount >= remissionctrls.amount.value;\n if (this.remissionForm.dirty ) {\n if(remissionctrls['amount'].value == '' || remissionctrls['amount'].value < 0) {\n this.resetRemissionForm([false, false, true, false, false], 'amount');\n } else if(remissionctrls['amount'].value != '' && remissionctrls['amount'].invalid ) {\n this.resetRemissionForm([false, false, false, true, false], 'amount');\n } else if(remissionctrls.amount.valid && !isRemissionLessThanFee){\n this.resetRemissionForm([false, false, false, false, true], 'amount');\n } else {\n this.viewCompStatus = '';\n this.viewStatus = \"checkretroremissionpage\";\n }\n }\n } else {\n var remissionctrls=this.remissionForm.controls;\n //if (this.remissionForm.dirty ) {\n if(remissionctrls['amount'].value == '' || remissionctrls['amount'].value < 0 ) {\n this.resetRemissionForm([false, false, true, false, false], 'amount');\n } else {\n this.viewCompStatus = '';\n this.viewStatus = \"checkretroremissionpage\";\n this.refundListAmount.emit(remissionctrls['amount'].value);\n }\n //}\n\n }\n }\n\n gotoProcessRetroRemissionPage() {\n this.viewStatus = '';\n this.viewCompStatus = 'addremission';\n this.isRefundRemission = true;\n this.errorMessage = '';\n }\n\n confirmRetroRemission() {\n if(!this.isConfirmationBtnDisabled) {\n this.retroRemission = true;\n this.remissionamt = this.remissionForm.controls.amount.value;\n const requestBody = new AddRetroRemissionRequest(this.remissionamt,this.remissionForm.controls.remissionCode.value )\n this.paymentViewService.postPaymentGroupWithRetroRemissions(decodeURIComponent(this.paymentGroupRef).trim(), this.fee.id, requestBody).subscribe(\n response => {\n if (JSON.parse(response)) {\n this.isRemissionApplied = true;\n this.viewCompStatus = '';\n this.viewStatus = 'retroremissionconfirmationpage';\n this.remissionReference =JSON.parse(response).remission_reference;\n }\n },\n (error: any) => {\n this.errorMessage = error;\n this.isConfirmationBtnDisabled = false;\n this.cd.detectChanges();\n }\n );\n }\n }\n\n processRefund() {\n this.errorMessage = '';\n this.isConfirmationBtnDisabled = true;\n if( this.isRefundRemission) {\n this.retroRemission = true;\n }\n if (this.remissionReference === undefined || this.remissionReference === '') {\n this.remissionReference = this.remission.remission_reference;\n }\n const requestBody = new PostIssueRefundRetroRemission(this.remissionReference);\n this.paymentViewService.postRefundRetroRemission(requestBody).subscribe(\n response => {\n if (JSON.parse(response)) {\n this.viewCompStatus = '';\n this.viewStatus = 'refundconfirmationpage';\n this.refundReference = JSON.parse(response).refund_reference;\n this.refundAmount = JSON.parse(response).refund_amount;\n }\n },\n (error: any) => {\n this.errorMessage = error;\n this.isConfirmationBtnDisabled = false;\n })\n }\n\n // Issue Refund changes\n\n gotoIssueRefundConfirmation(payment: IPayment) {\n this.paymentLibComponent.iscancelClicked = false;\n if(this.paymentLibComponent.REFUNDLIST === \"true\") {\n this.isFromRefundListPage = true;\n }\n this.errorMessage = '';\n this.refundReason = this.remissionForm.controls['refundReason'].value === null ? this.remissionForm.controls['refundDDReason'].value : this.remissionForm.controls['refundReason'].value;\n if(!this.refundReason || this.refundReason === 'Select a different reason') {\n this.refundHasError = true;\n } else if(this.selectedRefundReason.includes('Other') && (this.remissionForm.controls['reason'].value == '' || this.remissionForm.controls['reason'].value == null)) {\n this.resetRemissionForm([false, false, false, true, false, true], 'reason');\n } else if (this.selectedRefundReason.includes('Other') && this.remissionForm.controls['reason'].value !== '') {\n this.refundHasError = false;\n this.refundReason += '-' + this.remissionForm.controls['reason'].value;\n this.displayRefundReason = this.selectedRefundReason + '-' + this.remissionForm.controls['reason'].value;\n if ( this.isFromRefundListPage ) {\n this.refundListReason.emit({reason: this.displayRefundReason, code: this.refundReason});\n } else {\n this.viewCompStatus = '';\n this.viewStatus = 'checkissuerefundpage';\n }\n\n } else {\n this.displayRefundReason = this.selectedRefundReason;\n if ( this.isFromRefundListPage ) {\n this.paymentLibComponent.isFromRefundStatusPage = true;\n this.refundListReason.emit({reason: this.selectedRefundReason, code: this.refundReason});\n } else {\n this.viewCompStatus = '';\n this.viewStatus = 'checkissuerefundpage';\n }\n\n }\n }\n\n gotoIssueRefundPage() {\n this.errorMessage = '';\n this.viewCompStatus = 'issuerefund';\n this.viewStatus = '';\n this.isRefundRemission = true;\n this.errorMessage = false;\n this.refundHasError = false;\n this.isReasonEmpty = false;\n }\n\n changeIssueRefundReason() {\n // this.remissionForm.controls['refundReason'].setValue('Duplicate payment');\n this.errorMessage = '';\n this.refundHasError = false;\n this.isReasonEmpty = false;\n this.viewCompStatus = 'issuerefund';\n this.viewStatus = '';\n this.isRefundRemission = true;\n }\n\n confirmIssueRefund() {\n this.isConfirmationBtnDisabled = true;\n this.errorMessage = '';\n if( this.isRefundRemission) {\n this.retroRemission = true;\n }\n\n const requestBody = new PostRefundRetroRemission(this.payment.reference,this.refundReason);\n this.paymentViewService.postRefundsReason(requestBody).subscribe(\n response => {\n if (JSON.parse(response)) {\n this.viewCompStatus = '';\n this.viewStatus = 'refundconfirmationpage';\n this.refundReference =JSON.parse(response).refund_reference;\n if(JSON.parse(response).refund_amount) {\n this.refundAmount = JSON.parse(response).refund_amount;\n }\n }\n },\n (error: any) => {\n this.errorMessage = error;\n this.isConfirmationBtnDisabled = false;\n this.cd.detectChanges();\n })\n }\n\n// Retro Refund\n\n confirmRetroRefund() {\n this.isConfirmationBtnDisabled = true;\n this.errorMessage = '';\n if( this.isRefundRemission) {\n this.retroRemission = true;\n }\n\n const requestBody = new PostRefundRetroRemission(this.payment.reference,'RR004-Retrospective remission');\n this.paymentViewService.postRefundsReason(requestBody).subscribe(\n response => {\n if (JSON.parse(response)) {\n this.viewCompStatus = '';\n this.viewStatus = 'retrorefundconfirmationpage';\n this.refundReference =JSON.parse(response).refund_reference;\n if(JSON.parse(response).refund_amount) {\n this.refundAmount = JSON.parse(response).refund_amount;\n }\n }\n },\n (error: any) => {\n this.errorMessage = error;\n this.isConfirmationBtnDisabled = false;\n });\n }\n\n selectRadioButton(key, value) {\n localStorage.setItem(\"myradio\", key);\n const remissionctrls=this.remissionForm.controls;\n remissionctrls['refundDDReason'].setValue('Select a different reason', {onlySelf: true});\n remissionctrls['reason'].reset();\n this.isRefundReasonsSelected = true;\n this.errorMessage = false;\n this.isReasonEmpty = false;\n this.showReasonText = false;\n this.refundHasError = false;\n this.selectedRefundReason = key;\n if(this.selectedRefundReason.includes('Other')) {\n this.showReasonText = true;\n this.refundHasError = false;\n this.refundReason = key;\n }\n }\n\n selectchange(args) {\n const remissionctrls=this.remissionForm.controls;\n remissionctrls['refundReason'].reset();\n remissionctrls['reason'].reset();\n this.isRefundReasonsSelected = false;\n this.showReasonText = false;\n this.refundHasError = false;\n this.selectedRefundReason = args.target.options[args.target.options.selectedIndex].id;\n this.reasonLength = (29-this.selectedRefundReason.split('- ')[1].length);\n\n if(this.selectedRefundReason.includes('Other')) {\n this.showReasonText = true;\n this.refundHasError = false;\n this.refundReason = args.target.options[args.target.options.selectedIndex].id;\n }\n\n\n }\n\n gotoServiceRequestPage(event: any) {\n this.errorMessage ='';\n event.preventDefault();\n if (this.isFromServiceRequestPage && !this.isFromPaymentDetailPage) {\n this.viewStatus = 'order-full-view';\n this.viewCompStatus = '';\n } else if ( this.isFromRefundListPage ) {\n this.paymentLibComponent.iscancelClicked = true;\n this.refundListReason.emit({reason: this.selectedRefundReason, code: this.refundReason});\n this.paymentLibComponent.isFromRefundStatusPage = true;\n } else {\n this.paymentLibComponent.paymentMethod = this.payment.method;\n this.paymentLibComponent.paymentGroupReference = this.paymentLibComponent.paymentGroupReference\n this.paymentLibComponent.paymentReference = this.payment.reference;\n this.paymentLibComponent.viewName = 'payment-view';\n this.OrderslistService.setOrderRef(this.orderRef);\n this.OrderslistService.setorderCCDEvent(this.orderCCDEvent);\n this.OrderslistService.setorderCreated(this.orderCreated);\n this.OrderslistService.setorderDetail(this.orderDetail);\n this.OrderslistService.setorderParty(this.orderParty);\n this.OrderslistService.setorderTotalPayments(this.orderTotalPayments);\n this.OrderslistService.setorderRemissionTotal(this.orderRemissionTotal);\n this.OrderslistService.setorderFeesTotal(this.orderFeesTotal);\n this.viewStatus = 'payment-view';\n this.sendOrderDetail = this.orderDetail;\n this.sendOrderRef = this.orderRef;\n if(this.LOGGEDINUSERROLES === undefined) {\n this.OrderslistService.getUserRolesList().subscribe((data) => this.LOGGEDINUSERROLES = data);\n }\n this.viewCompStatus = '';\n }\n // if (this.paymentLibComponent.TAKEPAYMENT === undefined && this.paymentLibComponent.SERVICEREQUEST === undefined) {\n // this.paymentLibComponent.SERVICEREQUEST = 'false';\n // this.paymentLibComponent.TAKEPAYMENT = false;\n // }\n // if (this.isFromServiceRequestPage) {\n // //this.paymentLibComponent.TAKEPAYMENT = false;\n // this.paymentLibComponent.isFromRefundStatusPage = false;\n // this.viewStatus = 'main'\n // this.paymentLibComponent.viewName = 'case-transactions';\n // this.OrderslistService.setisFromServiceRequestPage(true);\n // this.OrderslistService.setnavigationPage('servicerequestpage');\n // }\n // if ( this.isFromRefundListPage ) {\n // this.paymentLibComponent.iscancelClicked = true;\n // this.refundListReason.emit({reason: this.selectedRefundReason, code: this.refundReason});\n // this.paymentLibComponent.isFromRefundStatusPage = true;\n // }\n // if(!this.paymentLibComponent.isFromRefundStatusPage) {\n // if(this.payment) {\n // this.OrderslistService.setpaymentPageView({method: this.payment.method,payment_group_reference: this.paymentGroupRef, reference:this.payment.reference});\n // }\n // if (this.isFromServiceRequestPage) {\n // this.OrderslistService.setnavigationPage('servicerequestpage');\n // } else {\n // this.OrderslistService.setnavigationPage('paymentdetailspage');\n // }\n // this.errorMessage = '';\n // this.paymentLibComponent.viewName = 'case-transactions';\n // // this.paymentLibComponent.TAKEPAYMENT = true;\n // this.paymentLibComponent.ISTURNOFF = this.isTurnOff;\n\n // this.paymentLibComponent.isFromServiceRequestPage = true;\n // this.paymentLibComponent.ISBSENABLE = true;\n // let partUrl = this.bsPaymentDcnNumber ? `&dcn=${this.bsPaymentDcnNumber}` : '';\n // partUrl += this.paymentLibComponent.ISBSENABLE ? '&isBulkScanning=Enable' : '&isBulkScanning=Disable';\n // partUrl += this.paymentLibComponent.ISTURNOFF ? '&isTurnOff=Enable' : '&isTurnOff=Disable';\n // partUrl += this.isStrategicFixEnable ? '&isStFixEnable=Enable' : '&isStFixEnable=Disable';\n // partUrl += `&caseType=${this.caseType}`;\n // if(this.isFromPaymentDetailPage) {\n // partUrl += this.paymentLibComponent.isFromPaymentDetailPage\n // }\n // if(!this.paymentLibComponent.TAKEPAYMENT) {\n // this.paymentLibComponent.TAKEPAYMENT = undefined;\n // }\n // if ( this.paymentLibComponent.SERVICEREQUEST) {\n // const url = `/payment-history/${this.ccdCaseNumber}?view=case-transactions&selectedOption=${this.option}${partUrl}`;\n // this.router.routeReuseStrategy.shouldReuseRoute = () => false;\n // this.router.onSameUrlNavigation = 'reload';\n // this.router.navigateByUrl(url);\n // } else {\n // const url = `/payment-history/${this.ccdCaseNumber}?view=case-transactions&takePayment=${this.paymentLibComponent.TAKEPAYMENT}&selectedOption=${this.option}${partUrl}`;\n // this.router.routeReuseStrategy.shouldReuseRoute = () => false;\n // this.router.onSameUrlNavigation = 'reload';\n // this.router.navigateByUrl(url);\n // }\n\n // } else {\n // this.paymentLibComponent.viewName === 'refundstatuslist';\n // this.paymentLibComponent.isFromRefundStatusPage = true;\n // }\n }\n\n gotoCasetransationPage() {\n this.OrderslistService.setnavigationPage('casetransactions');\n this.errorMessage = '';\n this.paymentLibComponent.viewName = 'case-transactions';\n this.paymentLibComponent.VIEW = 'case-transactions';\n this.paymentLibComponent.ISTURNOFF = this.isTurnOff;\n this.paymentLibComponent.isFromServiceRequestPage = true;\n this.resetOrderData();\n let partUrl = this.bsPaymentDcnNumber ? `&dcn=${this.bsPaymentDcnNumber}` : '';\n partUrl += this.paymentLibComponent.ISBSENABLE ? '&isBulkScanning=Enable' : '&isBulkScanning=Disable';\n partUrl += this.paymentLibComponent.ISTURNOFF ? '&isTurnOff=Enable' : '&isTurnOff=Disable';\n partUrl += this.isStrategicFixEnable ? '&isStFixEnable=Enable' : '&isStFixEnable=Disable';\n partUrl += `&caseType=${this.caseType}`;\n const url = `/payment-history/${this.ccdCaseNumber}?view=case-transactions&takePayment=${this.paymentLibComponent.TAKEPAYMENT}&selectedOption=${this.option}${partUrl}`;\n this.router.routeReuseStrategy.shouldReuseRoute = () => false;\n this.router.onSameUrlNavigation = 'reload';\n this.router.navigateByUrl(url);\n }\n\n gotoCasetransationPageCancelBtnClicked(event: Event) {\n event.preventDefault();\n if( !this.paymentLibComponent.isFromServiceRequestPage) {\n this.OrderslistService.setnavigationPage('casetransactions');\n this.OrderslistService.setisFromServiceRequestPage(false);\n this.paymentLibComponent.VIEW ='case-transactions';\n this.paymentLibComponent.viewName = 'case-transactions';\n this.paymentLibComponent.ISBSENABLE = true;\n this.paymentLibComponent.isRefundStatusView = false;\n // this.OrderslistService.setnavigationPage('casetransactions');\n // this.OrderslistService.setisFromServiceRequestPage(false);\n // this.paymentLibComponent.VIEW ='case-transactions';\n // this.paymentLibComponent.viewName = 'case-transactions';\n // this.paymentLibComponent.ISBSENABLE = true;\n // this.paymentLibComponent.isRefundStatusView = false;\n // this.resetOrderData(); let partUrl = this.bsPaymentDcnNumber ? `&dcn=${this.bsPaymentDcnNumber}` : '';\n // partUrl += this.paymentLibComponent.ISBSENABLE ? '&isBulkScanning=Enable' : '&isBulkScanning=Disable';\n // partUrl += this.paymentLibComponent.ISTURNOFF ? '&isTurnOff=Enable' : '&isTurnOff=Disable';\n // partUrl += this.isStrategicFixEnable ? '&isStFixEnable=Enable' : '&isStFixEnable=Disable';\n // partUrl += `&caseType=${this.caseType}`;\n // const url = `/payment-history/${this.ccdCaseNumber}?view=case-transactions&takePayment=${this.paymentLibComponent.TAKEPAYMENT}&selectedOption=${this.option}${partUrl}`;\n // this.router.routeReuseStrategy.shouldReuseRoute = () => false;\n // this.router.onSameUrlNavigation = 'reload';\n // this.router.navigateByUrl(url);\n } else {\n\n if (this.paymentLibComponent.REFUNDLIST) {\n this.paymentLibComponent.viewName = 'refund-list';\n return;\n }\n if (this.paymentLibComponent.TAKEPAYMENT === undefined && this.paymentLibComponent.SERVICEREQUEST === undefined) {\n this.paymentLibComponent.SERVICEREQUEST = 'false';\n }\n this.OrderslistService.setisFromServiceRequestPage(false);\n this.OrderslistService.setpaymentPageView({method: '',payment_group_reference: '', reference:''});\n this.OrderslistService.setnavigationPage('casetransactions');\n this.errorMessage = '';\n this.paymentLibComponent.viewName = 'case-transactions';\n this.paymentLibComponent.ISTURNOFF = this.isTurnOff;\n this.paymentLibComponent.isFromServiceRequestPage = true;\n this.paymentLibComponent.ISBSENABLE = true;\n let partUrl = this.bsPaymentDcnNumber ? `&dcn=${this.bsPaymentDcnNumber}` : '';\n partUrl += this.paymentLibComponent.ISBSENABLE ? '&isBulkScanning=Enable' : '&isBulkScanning=Disable';\n partUrl += this.paymentLibComponent.ISTURNOFF ? '&isTurnOff=Enable' : '&isTurnOff=Disable';\n partUrl += this.isStrategicFixEnable ? '&isStFixEnable=Enable' : '&isStFixEnable=Disable';\n partUrl += `&caseType=${this.caseType}`;\n if(this.isFromPaymentDetailPage) {\n partUrl += this.paymentLibComponent.isFromPaymentDetailPage\n }\n\n if(!this.paymentLibComponent.SERVICEREQUEST) {\n const url = `/payment-history/${this.ccdCaseNumber}?view=case-transactions&takePayment=${this.paymentLibComponent.TAKEPAYMENT}&selectedOption=${this.option}${partUrl}`;\n this.router.routeReuseStrategy.shouldReuseRoute = () => false;\n this.router.onSameUrlNavigation = 'reload';\n this.router.navigateByUrl(url);\n } else {\n const url =`/payment-history/${this.ccdCaseNumber}?selectedOption=${this.option}${partUrl}`;\n this.router.routeReuseStrategy.shouldReuseRoute = () => false;\n this.router.onSameUrlNavigation = 'reload';\n this.router.navigateByUrl(url);\n }\n }\n\n }\n\n resetOrderData() {\n this.OrderslistService.setOrderRef(null);\n this.OrderslistService.setorderCCDEvent(null);\n this.OrderslistService.setorderCreated(null);\n this.OrderslistService.setorderDetail(null);\n this.OrderslistService.setorderParty(null);\n this.OrderslistService.setorderTotalPayments(null);\n this.OrderslistService.setorderRemissionTotal(null);\n this.OrderslistService.setorderFeesTotal(null);\n }\n\n\n getFormattedCurrency(currency:number){\n if(currency.toString().includes(\".\")){\n return currency\n }\n return currency.toString().concat(\".00\");\n }\n\n}\n","import { Pipe, PipeTransform } from '@angular/core';\n@Pipe({\n name: 'ccdHyphens'\n})\nexport class CcdHyphensPipe implements PipeTransform {\n constructor() {}\n transform(value: any, args?: any): any {\n const pattern = /^([0-9]{4})+([0-9]{4})+([0-9]{4})+([0-9]{4})$/;\n if ( value.match(pattern)) {\n return value.replace(pattern,'$1-$2-$3-$4') \n }\n return value;\n }\n}\n","import { Pipe, PipeTransform } from '@angular/core';\n@Pipe({\n name: 'capitalize'\n})\nexport class CapitalizePipe implements PipeTransform {\n constructor() { }\n transform(s: any, args?: any): any {\n return s && s[0].toUpperCase() + s.slice(1) || \"\";\n }\n}\n","import { Pipe, PipeTransform } from '@angular/core';\n@Pipe({\n name: 'keyValue'\n})\nexport class keyValuePipe implements PipeTransform {\n constructor() {}\n transform(input: any): any {\n let keys = [];\n for (let key in input) {\n if (input.hasOwnProperty(key)) {\n keys.push({ key: key, value: input[key]});\n }\n }\n return keys;\n }\n}\n","import { Pipe, PipeTransform } from '@angular/core';\nimport { DomSanitizer, SafeHtml } from '@angular/platform-browser';\n\n@Pipe({ name: 'sanitizeHtml' })\nexport class SanitizeHtmlPipe implements PipeTransform {\n constructor(private sanitizer: DomSanitizer) {}\n transform(value: any): SafeHtml {\n return this.sanitizer.bypassSecurityTrustHtml(value);\n }\n}\n","import { Injectable } from '@angular/core';\nimport * as FileSaver from 'file-saver';\nimport * as XLSX from 'xlsx';\nimport * as XLSXStyle from 'xlsx-style';\n\n\nconst EXCEL_TYPE = 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=UTF-8';\nconst EXCEL_EXTENSION = '.xlsx';\n\n@Injectable()\nexport class XlFileService {\n\n constructor() { }\n\n public exportAsExcelFile(json: any[], excelFileName: string): void {\n let worksheet: XLSX.WorkSheet; \n let workbook: XLSX.WorkBook; \n console.log(excelFileName);\n\n if(excelFileName.match('Data_Loss')!== null){\n 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']});\n worksheet = this.setDataLossReportHeaders(worksheet);\n worksheet = this.autoFitColumns(worksheet,json);\n } else if(excelFileName.match('Unprocessed')!== null){\n worksheet = XLSX.utils.json_to_sheet(json,{header:['resp_service_id','resp_service_name','exception_ref','ccd_ref','date_banked','bgc_batch','payment_asset_dcn','env_ref','env_item','payment_method','amount']});\n worksheet = this.setUnprocessedReportHeaders(worksheet);\n worksheet = this.autoFitColumns(worksheet,json);\n } else if(excelFileName.match('Processed_Unallocated')!== null){\n worksheet = XLSX.utils.json_to_sheet(json,{header:['resp_service_id','resp_service_name','allocation_status','receiving_office','allocation_reason','ccd_exception_reference','ccd_case_reference','payment_asset_dcn','env_ref','env_item','date_banked','bgc_batch','payment_method','amount']});\n worksheet = this.setProcessedUnallocatedReportHeaders(worksheet);\n worksheet = this.autoFitColumns(worksheet,json);\n } else if(excelFileName.match('Payment failure')!== null){\n worksheet = XLSX.utils.json_to_sheet(json,{header:['payment_reference','ccd_reference','org_id','service_name','failure_reference','failure_reason','disputed_amount','event_name','event_date','representment_status','representment_date','refund_reference','refund_amount','refund_date']});\n worksheet = this.setPaymentFailureReportHeaders(worksheet);\n worksheet = this.autoFitColumns(worksheet,json);\n } else {\n worksheet = XLSX.utils.json_to_sheet(json,{header:['resp_service_id','resp_service_name','surplus_shortfall','balance','payment_amount','ccd_case_reference', 'ccd_exception_reference', 'processed_date', 'reason', 'explanation', 'user_name']});\n worksheet = this.setShortFallReportHeaders(worksheet);\n worksheet = this.autoFitColumns(worksheet,json);\n }\n workbook = { Sheets: { 'data': worksheet }, SheetNames: ['data'] };\n const excelBuffer: any = XLSX.write(workbook, { bookType: 'xlsx', type: 'array' });\n this.saveAsExcelFile(excelBuffer, excelFileName);\n }\n\n\nprivate autoFitColumns (worksheet: XLSX.WorkSheet,json:any) : XLSX.WorkSheet {\n let objectMaxLength = []; \n let ColWidth = [];\n let obj = <any>Object;\n for (let i = 0; i < json.length; i++) {\n let value = obj.values(json[i]);\n let key = obj.keys(json[i]);\n for (let j = 0; j < value.length; j++) {\n if(value[j] === null){\n value[j] = '';\n }\n objectMaxLength[j] =\n key[j].length >= value[j].length\n ? key[j].length+2\n : value[j].length+1;\n if( value[j].length === undefined){\n objectMaxLength[j] = key[j].length+2;\n }\n ColWidth.push({'width': +objectMaxLength[j]});\n }\n }\n worksheet['!cols'] = ColWidth;\n return worksheet;\n}\n\n\nprivate setDataLossReportHeaders (worksheet: XLSX.WorkSheet): XLSX.WorkSheet {\n worksheet.A1.v = \"Loss_Resp\";\n worksheet.B1.v = \"Payment_Asset_DCN\";\n worksheet.C1.v = \"Envelope_Ref\";\n worksheet.D1.v = \"Envelope_Item\";\n worksheet.E1.v = \"Resp_Service ID\";\n worksheet.F1.v = \"Resp_Service Name\";\n worksheet.G1.v = \"Date_Banked\";\n worksheet.H1.v = \"BGC_Batch\";\n worksheet.I1.v = \"Payment_Method\";\n worksheet.J1.v = \"Amount\";\n return worksheet;\n}\n\nprivate setUnprocessedReportHeaders (worksheet: XLSX.WorkSheet): XLSX.WorkSheet {\n worksheet.A1.v = \"Resp_Service ID\";\n worksheet.B1.v = \"Resp_Service Name\";\n worksheet.C1.v = \"Exception_Ref\";\n worksheet.D1.v = \"CCD_Ref\";\n worksheet.E1.v = \"Date_Banked\";\n worksheet.F1.v = \"BGC_Batch\";\n worksheet.G1.v = \"Payment_Asset_DCN\";\n worksheet.H1.v = \"Envelope_Ref\";\n worksheet.I1.v = \"Envelope_Item\";\n worksheet.J1.v = \"Payment_Method\";\n worksheet.K1.v = \"Amount\";\n return worksheet;\n}\n\nprivate setProcessedUnallocatedReportHeaders (worksheet: XLSX.WorkSheet): XLSX.WorkSheet {\n worksheet.A1.v = \"Resp_Service ID\";\n worksheet.B1.v = \"Resp_Service Name\";\n worksheet.C1.v = \"Allocation_Status\";\n worksheet.D1.v = \"Receiving_Office\";\n worksheet.E1.v = \"Allocation_Reason\";\n worksheet.F1.v = \"CCD_Exception_Ref\";\n worksheet.G1.v = \"CCD_Case_Ref\";\n worksheet.H1.v = \"Payment_Asset_DCN\";\n worksheet.I1.v = \"Envelope_Ref\";\n worksheet.J1.v = \"Envelope_Item\";\n worksheet.K1.v = \"Date_Banked\";\n worksheet.L1.v = \"BGC_Batch\";\n worksheet.M1.v = \"Payment_Method\";\n worksheet.N1.v = \"Amount\";\n return worksheet;\n}\n\nprivate setPaymentFailureReportHeaders (worksheet: XLSX.WorkSheet): XLSX.WorkSheet {\n worksheet.A1.v = \"Payment reference\";\n worksheet.B1.v = \"CCD reference\";\n worksheet.C1.v = \"OrgID\";\n worksheet.D1.v = \"Service name\";\n worksheet.E1.v = \"Failure reference\";\n worksheet.F1.v = \"Failure reason\";\n worksheet.G1.v = \"Disputed amount\";\n worksheet.H1.v = \"Event name\";\n worksheet.I1.v = \"Event date\";\n worksheet.J1.v = \"Representment status\";\n worksheet.K1.v = \"Representment date\";\n worksheet.L1.v = \"Refund reference\";\n worksheet.M1.v = \"Refund amount\";\n worksheet.N1.v = \"Refund date\";\n return worksheet;\n}\nprivate setShortFallReportHeaders (worksheet: XLSX.WorkSheet): XLSX.WorkSheet {\n worksheet.A1.v = \"Resp_Service ID\";\n worksheet.B1.v = \"Resp_Service Name\";\n worksheet.C1.v = \"Over Payment_Under Payment\";\n worksheet.D1.v = \"Balance\";\n worksheet.E1.v = \"Payment_Amount\";\n worksheet.F1.v = \"CCD_Case_Ref\";\n worksheet.G1.v = \"Exception_Ref\";\n worksheet.H1.v = \"Processed_Date\";\n worksheet.I1.v = \"Reason\";\n worksheet.J1.v = \"Explanation\";\n worksheet.K1.v = \"Updated Name\";\n return worksheet;\n}\n\nprivate saveAsExcelFile(buffer: any, fileName: string): void {\n const data: Blob = new Blob([buffer], {\n type: EXCEL_TYPE\n });\n FileSaver.saveAs(data, fileName + EXCEL_EXTENSION);\n }\n}\n","import { Component, Input, OnInit } from '@angular/core';\nimport { FormBuilder, FormGroup, FormControl } from '@angular/forms';\nimport { formatDate } from \"@angular/common\";\nimport {IPaymentGroup} from '../../interfaces/IPaymentGroup';\nimport { BulkScaningPaymentService } from '../../services/bulk-scaning-payment/bulk-scaning-payment.service';\nimport { ErrorHandlerService } from '../../services/shared/error-handler.service';\nimport { PaymentViewService } from '../../services/payment-view/payment-view.service';\nimport {XlFileService} from '../../services/xl-file/xl-file.service';\nimport { FindValueSubscriber } from 'rxjs/internal/operators/find';\n\n@Component({\n selector: 'ccpay-reports',\n templateUrl: './reports.component.html',\n styleUrls: ['./reports.component.scss']\n})\nexport class ReportsComponent implements OnInit {\n @Input() ISPAYMENTSTATUSENABLED: string;\n fmt = 'dd/MM/yyyy';\n loc = 'en-US';\n reportsForm: FormGroup;\n startDate: string;\n endDate: string;\n errorMeaagse: string;\n ccdCaseNumber: string;\n isDownLoadButtondisabled:Boolean = false;\n isStartDateLesthanEndDate: Boolean = false;\n isDateBetwnMonth: Boolean = false;\n isDateRangeBetnWeek: Boolean = false;\n errorMessage = this.errorHandlerService.getServerErrorMessage(false, false, '');\n paymentGroups: IPaymentGroup[] = [];\n\n constructor(\n private xlFileService: XlFileService,\n private errorHandlerService: ErrorHandlerService,\n private formBuilder: FormBuilder,\n private bulkScaningPaymentService: BulkScaningPaymentService,\n private paymentViewService: PaymentViewService) { }\n \n\n ngOnInit() {\n this.fromValidation();\n\n }\n\n getToday(): string {\n return new Date().toISOString().split('T')[0];\n }\n\n getSelectedFromDate(): void {\n this.validateDates(this.reportsForm.get('selectedreport').value);\n }\n\n validateDates(reportName){\n const selectedStartDate = this.tranformDate(this.reportsForm.get('startDate').value),\n selectedEndDate = this.tranformDate(this.reportsForm.get('endDate').value);\n const isDateRangeMoreThanWeek = (<any>new Date(selectedStartDate) - <any>new Date(selectedEndDate))/(1000 * 3600 * -24) > 7;\n const isDateRangeMoreThanMonth = (<any>new Date(selectedStartDate) - <any>new Date(selectedEndDate))/(1000 * 3600 * -24) > 30;\n if(new Date(selectedStartDate) > new Date(selectedEndDate) && selectedEndDate !== ''){\n this.reportsForm.get('startDate').setValue('');\n this.isDateRangeBetnWeek = false;\n this.isDateBetwnMonth = false;\n this.isStartDateLesthanEndDate = true;\n } else if(reportName && reportName ==='SURPLUS_AND_SHORTFALL' && isDateRangeMoreThanWeek ) {\n this.isDateRangeBetnWeek = true;\n this.isDateBetwnMonth = false;\n this.isStartDateLesthanEndDate = false;\n } else if(reportName && reportName ==='PAYMENT_FAILURE_EVENT' && isDateRangeMoreThanMonth ) {\n this.isDateRangeBetnWeek = false;\n this.isDateBetwnMonth = true;\n this.isStartDateLesthanEndDate = false;\n } else {\n this.isDateBetwnMonth = false;\n this.isDateRangeBetnWeek = false;\n this.isStartDateLesthanEndDate = false;\n }\n\n }\n\n fromValidation() {\n this.reportsForm = this.formBuilder.group({\n selectedreport: new FormControl('') ,\n startDate: new FormControl(''),\n endDate: new FormControl('') \n });\n}\n\ndownloadReport(){\n this.isDownLoadButtondisabled = true;\n const dataLossRptDefault = [{loss_resp:'',payment_asset_dcn:'',env_ref:'',env_item:'',resp_service_id:'',resp_service_name:'',date_banked:'',bgc_batch:'',payment_method:'',amount:''}],\n unProcessedRptDefault = [{resp_service_id:'',resp_service_name:'',exception_ref:'',ccd_ref:'',date_banked:'',bgc_batch:'',payment_asset_dcn:'',env_ref:'',env_item:'',payment_method:'',amount:''}],\n processedUnallocated =[{resp_service_id:'',resp_service_name:'',allocation_status:'',receiving_office:'',allocation_reason:'',ccd_exception_ref:'',ccd_case_ref:'',payment_asset_dcn:'',env_ref:'',env_item:'',date_banked:'',bgc_batch:'',payment_method:'',amount:'',updated_by:''}],\n shortFallsRptDefault = [{resp_service_id:'',resp_service_name:'',surplus_shortfall:'',balance:'',payment_amount:'',ccd_case_reference:'',ccd_exception_reference:'',processed_date:'', reason:'', explanation:'', user_name:''}],\n selectedReportName = this.reportsForm.get('selectedreport').value,\n selectedStartDate = this.tranformDate(this.reportsForm.get('startDate').value),\n selectedEndDate = this.tranformDate(this.reportsForm.get('endDate').value);\n\n if(selectedReportName === 'PROCESSED_UNALLOCATED' || selectedReportName === 'SURPLUS_AND_SHORTFALL' ){\n this.paymentViewService.downloadSelectedReport(selectedReportName,selectedStartDate,selectedEndDate).subscribe(\n response => {\n this.errorMessage = this.errorHandlerService.getServerErrorMessage(false, false, '');\n const result = JSON.parse(response);\n let res= {data: this.applyDateFormat(result)};\n if(res['data'].length === 0 && selectedReportName === 'PROCESSED_UNALLOCATED' ){\n res.data= processedUnallocated;\n } else if(res['data'].length === 0 && selectedReportName === 'SURPLUS_AND_SHORTFALL' ) {\n res.data= shortFallsRptDefault;\n } \n if(result['data'].length > 0) {\n for( var i=0; i< res['data'].length; i++) {\n if(res['data'][i][\"payment_asset_dcn\"] !== undefined) {\n res['data'][i]['env_ref'] = res['data'][i][\"payment_asset_dcn\"].substr(0,13);\n res['data'][i]['env_item'] = res['data'][i][\"payment_asset_dcn\"].substr(13,21);\n }\n if(res['data'][i][\"amount\"] !== undefined) {\n res['data'][i]['amount'] = this.convertToFloatValue(res['data'][i]['amount']);\n }\n if(res['data'][i][\"balance\"] !== undefined) {\n res['data'][i]['balance'] = this.convertToFloatValue(res['data'][i][\"balance\"]);\n }\n let Op = res['data'][i][\"surplus_shortfall\"];\n if(Op !== undefined) {\n res['data'][i]['surplus_shortfall'] = Op ==\"Surplus\" ? \"Over payment\":\"Under payment\";\n }\n if(res['data'][i][\"payment_amount\"] !== undefined) {\n res['data'][i]['payment_amount'] = this.convertToFloatValue(res['data'][i]['payment_amount']);\n }\n }\n } \n this.isDownLoadButtondisabled = false;\n this.xlFileService.exportAsExcelFile(res['data'], this.getFileName(this.reportsForm.get('selectedreport').value, selectedStartDate, selectedEndDate));\n },\n (error: any) => {\n this.isDownLoadButtondisabled = false;\n this.errorMessage = this.errorHandlerService.getServerErrorMessage(true, false, '');\n })\n\n } else if(selectedReportName === 'PAYMENT_FAILURE_EVENT') {\n\n this.paymentViewService.downloadFailureReport(selectedStartDate,selectedEndDate).subscribe(\n response => {\n this.errorMessage = this.errorHandlerService.getServerErrorMessage(false, false, '');\n const result = {data: JSON.parse(response)['payment_failure_report_list']};\n let res = {data: this.applyDateFormat(result)};\n if (result['data'].length > 0) {\n for ( var i=0; i< res['data'].length; i++) {\n if (res['data'][i][\"disputed_amount\"] !== undefined) {\n res['data'][i]['disputed_amount'] = this.convertToFloatValue(res['data'][i][\"disputed_amount\"]);\n }\n if (res['data'][i][\"representment_status\"] !== undefined) {\n res['data'][i]['representment_status'] = res['data'][i][\"representment_status\"].toLowerCase() === 'yes' ? 'Success' : 'Failure';\n }\n if (res['data'][i]['representment_status'] === undefined) {\n res['data'][i]['representment_status'] = 'No representment received';\n }\n if (res['data'][i]['representment_date'] === undefined) {\n res['data'][i]['representment_date'] = 'N/A';\n }\n if (res['data'][i]['refund_reference'] === undefined) {\n res['data'][i]['refund_reference'] = 'No refund available';\n }\n if (res['data'][i]['refund_amount'] === undefined) {\n res['data'][i]['refund_amount'] = 'N/A';\n }\n if (res['data'][i]['refund_date'] === undefined) {\n res['data'][i]['refund_date'] = 'N/A';\n }\n }\n }\n this.isDownLoadButtondisabled = false;\n this.xlFileService.exportAsExcelFile(res['data'], this.getFileName(this.reportsForm.get('selectedreport').value, selectedStartDate, selectedEndDate ));\n\n },\n (error: any) => {\n this.isDownLoadButtondisabled = false;\n const errorContent = error.replace(/[^a-zA-Z ]/g, '').trim();\n const statusCode = error.replace(/[^a-zA-Z0-9 ]/g, '').trim().split(' ')[0];\n if(statusCode === '404') {\n this.errorMessage = this.errorHandlerService.getServerErrorMessage(true, true, errorContent);\n }else {\n this.errorMessage = this.errorHandlerService.getServerErrorMessage(true, false, '');\n }\n })\n\n } else {\n this.bulkScaningPaymentService.downloadSelectedReport(selectedReportName,selectedStartDate,selectedEndDate).subscribe(\n response => {\n this.errorMessage = this.errorHandlerService.getServerErrorMessage(false, false, '');\n const result = JSON.parse(response);\n let res = {data: this.applyDateFormat(result)};\n if(res['data'].length === 0 && selectedReportName === 'DATA_LOSS' ){\n res.data= dataLossRptDefault;\n } else if(res['data'].length === 0 && selectedReportName === 'UNPROCESSED'){\n res.data = unProcessedRptDefault;\n }\n if(result['data'].length > 0) {\n for( var i=0; i< res['data'].length; i++) {\n if(res['data'][i][\"amount\"] !== undefined) {\n res['data'][i]['amount'] = this.convertToFloatValue(res['data'][i]['amount']);\n }\n if(res['data'][i][\"payment_asset_dcn\"] !== undefined) {\n res['data'][i]['env_ref'] = res['data'][i][\"payment_asset_dcn\"].substr(0,13);\n res['data'][i]['env_item'] = res['data'][i][\"payment_asset_dcn\"].substr(13,21);\n }\n }\n }\n this.isDownLoadButtondisabled = false;\n this.xlFileService.exportAsExcelFile(res['data'], this.getFileName(this.reportsForm.get('selectedreport').value, selectedStartDate, selectedEndDate ));\n },\n (error: any) => {\n this.isDownLoadButtondisabled = false;\n this.errorMessage = this.errorHandlerService.getServerErrorMessage(true, false, '');\n })\n }\n }\n\n getFileName(selectedOption: string, startDate: string, endDate: string ) {\n const loc = 'en-US',\n stDt = formatDate(startDate, 'ddMMyy', loc),\n enDt = formatDate(endDate, 'ddMMyy', loc),\n now = new Date(),\n currentDate = formatDate(now, 'ddMMyy', loc),\n timestamp = `${currentDate}_${this.getTwodigit(now.getHours())}${this.getTwodigit(now.getMinutes())}${this.getTwodigit(now.getSeconds())}`,\n selectedOptionTxt = this.getCamelCaseString(selectedOption);\n \n return selectedOptionTxt+'_'+stDt+'_To_'+enDt+'_Run_'+ timestamp;\n } \n tranformDate(strDate: string) {\n let result = '';\n if (strDate) {\n let parts = strDate.split('-');\n result = `${parts[1]}/${parts[2]}/${parts[0]}`;\n }\n return result;\n }\n getTwodigit(input: number){\n return (\"0\" + input).slice(-2);\n }\n getCamelCaseString(selectedOption) {\n let result;\n switch(selectedOption) { \n case 'UNPROCESSED': { \n result = 'Unprocessed';\n break; \n } \n case 'DATA_LOSS': { \n result = 'Data_Loss';\n break; \n } \n case 'PROCESSED_UNALLOCATED': { \n result = 'Processed_Unallocated';\n break; \n } \n case 'SURPLUS_AND_SHORTFALL': { \n result = 'Over Payment_Under Payment';\n break; \n } \n case 'PAYMENT_FAILURE_EVENT': { \n result = 'Payment failure event';\n break; \n }\n default: { \n result = selectedOption;\n break; \n } \n } \n return result;\n }\n applyDateFormat(res) {\n return res['data'].map(value => {\n if (value['date_banked']) {\n value['date_banked'] = formatDate(value['date_banked'], this.fmt, this.loc);\n }\n if (value['event_date'] && value['event_date'].indexOf(',') === -1) {\n value['event_date'] = formatDate(value['event_date'], this.fmt, this.loc);\n } else if (value['event_date'] && value['event_date'].indexOf(',') !== -1) {\n value['event_date'] = this.multiDateFormater(value['event_date'])\n }\n\n if (value['representment_date'] && value['representment_date'].indexOf(',') === -1) {\n value['representment_date'] = formatDate(value['representment_date'], this.fmt, this.loc);\n } else if (value['representment_date'] && value['representment_date'].indexOf(',') !== -1) {\n value['representment_date'] = this.multiDateFormater(value['representment_date'])\n }\n\n if (value['refund_date'] && value['refund_date'].indexOf(',') === -1) {\n value['refund_date'] = formatDate(value['refund_date'], this.fmt, this.loc);\n } else if (value['refund_date'] && value['refund_date'].indexOf(',') !== -1) {\n value['refund_date'] = this.multiDateFormater(value['refund_date'])\n }\n return value;\n });\n }\n multiDateFormater(dateStr) {\n return dateStr.split(',').map((date) => formatDate(date, this.fmt, this.loc)).join(',');\n }\n \n convertToFloatValue(amt) {\n return amt ? Number.parseFloat(amt).toFixed(2): '0.00';\n }\n}\n","import {Component, ViewChild, Input, ChangeDetectorRef} from '@angular/core';\nimport {PaymentLibComponent} from '../../payment-lib.component';\nimport { MatTableDataSource} from '@angular/material/table';\nimport {MatSort } from '@angular/material/sort';\nimport {Sort } from '@angular/material/sort';\nimport {MatPaginator } from '@angular/material/paginator';\nimport { IRefundList } from '../../interfaces/IRefundList';\nimport { OrderslistService } from '../../services/orderslist.service';\nimport { THIS_EXPR } from '@angular/compiler/src/output/output_ast';\nimport { ActivatedRoute,Router } from '@angular/router';\n@Component({\n selector: 'ccpay-table',\n templateUrl: './table.component.html',\n styleUrls: ['./table.component.css']\n})\nexport class TableComponent {\n @Input('DATASOURCE') DATASOURCE: any[];\n @Input('STATUS') STATUS: string;\n @Input('errorMessage') errorMessage: string;\n isApprovalFlow: boolean;\n // displayedColumns = ['ccdCaseNumber', 'refundReference', 'reason', 'createBy', 'updateDate', 'Action'];\n displayedColumns = ['ccd_case_number', 'refund_reference', 'user_full_name','date_created', 'date_updated', 'Action'];\n \n dataSource: MatTableDataSource<any>;\n userLst;\n actualcount: number;\n count: number;\n refundList: IRefundList[];\n @ViewChild(MatPaginator) paginator: MatPaginator;\n @ViewChild(MatSort) sort: MatSort;\n constructor(\n private paymentLibComponent: PaymentLibComponent,\n private cdRef: ChangeDetectorRef,\n private OrderslistService: OrderslistService,\n private router: Router,\n private activeRoute: ActivatedRoute\n ) {}\n ngOnInit() {\n this.errorMessage = this.errorMessage;\n if(this.STATUS.toLowerCase() === 'sent for approval') {\n this.isApprovalFlow = true;\n } else {\n this.isApprovalFlow = false;\n }\n this.refundList = this.DATASOURCE;\n this.dataSource = new MatTableDataSource(this.refundList);\n this.actualcount = this.dataSource.data.length;\n if( this.refundList !== undefined) {\n this.userLst = this.refundList.reduce((r,{user_full_name}) => (r[user_full_name]='', r) , {});\n this.userLst = Object.keys(this.userLst);\n }\n this.userLst.sort((a, b) => a.toString().localeCompare(b));\n }\n /**\n * Set the paginator and sort after the view init since this component will\n * be able to query its view for the initialized paginator and sort.\n */\n ngAfterViewInit() {\n \n this.dataSource.sort = this.sort;\n\n //const sortState: Sort = {active: 'date_updated', direction: 'desc'};\n // this.sort.active = sortState.active;\n // this.sort.direction = sortState.direction;\n // this.sort.sortChange.emit(sortState);\n this.dataSource.paginator = this.paginator;\n this.dataSource.sort = this.sort;\n this.cdRef.detectChanges();\n }\n applyFilter(filterValue: string) {\n filterValue = filterValue.trim(); // Remove whitespace\n filterValue = filterValue.toLowerCase(); // Datasource defaults to lowercase matches\n this.dataSource.filter = filterValue;\n }\n selectchange(args){\n this.dataSource.filter = args.target.value;\n this.actualcount = this.dataSource.data.length;\n this.dataSource.paginator = this.paginator;\n }\n goToRefundProcessComponent(refundReference: string, refundData: IRefundList ) {\n this.paymentLibComponent.refundlistsource = refundData;\n this.paymentLibComponent.refundReference = refundReference;\n this.paymentLibComponent.viewName = 'process-refund';\n }\n goToRefundViewComponent(refundReference: string, refundData: IRefundList ) {\n this.OrderslistService.setRefundView(refundData);\n this.paymentLibComponent.viewName='refundstatuslist';\n this.paymentLibComponent.CCD_CASE_NUMBER = refundData.ccd_case_number;\n this.paymentLibComponent.isRefundStatusView = true;\n this.paymentLibComponent.isCallFromRefundList = true;\n }\n goToCaseReview(ccdCaseNumber: string, refundData: IRefundList ) {\n this.router.navigate([`/cases/case-details/${ccdCaseNumber}`], {relativeTo: this.activeRoute});\n }\n}","export class IResubmitRefundRequest {\n refund_reason: string;\n amount: number;\n \n \n constructor(refund_reason : string, amount: number) {\n this.refund_reason= refund_reason;\n this.amount = amount;\n \n } \n }\n ","import { Component, OnInit, Input } from '@angular/core';\nimport { RefundsService } from '../../services/refunds/refunds.service';\nimport { FormBuilder, FormGroup, Validators, FormControl, RequiredValidator } from '@angular/forms';\nimport { IRefundList } from '../../interfaces/IRefundList';\nimport { PaymentViewService } from '../../services/payment-view/payment-view.service';\nimport { Router } from '@angular/router';\nimport { OrderslistService } from '../../services/orderslist.service';\nimport { IRefundStatus } from '../../interfaces/IRefundStatus';\nimport { IResubmitRefundRequest } from '../../interfaces/IResubmitRefundRequest';\nimport { PaymentLibComponent } from '../../payment-lib.component';\n\n@Component({\n selector: 'ccpay-refund-status',\n templateUrl: './refund-status.component.html',\n styleUrls: ['./refund-status.component.css']\n})\nexport class RefundStatusComponent implements OnInit {\n @Input('LOGGEDINUSERROLES') LOGGEDINUSERROLES: string[] = [];\n @Input('API_ROOT') API_ROOT: string;\n @Input() ccdCaseNumber: string;\n @Input() isTurnOff: boolean;\n @Input() isEliginbleToAccess: boolean;\n refundStatusForm: FormGroup;\n selectedRefundReason: string;\n rejectedRefundList: IRefundList[] = [];\n approvalStatus = 'Sent for approval';\n rejectStatus = 'Update required';\n // approvalStatus = 'sent for approval';\n // rejectStatus = 'sent back';\n errorMessage = null;\n viewName: string;\n refundReason: string;\n refundlist: IRefundList;\n bsPaymentDcnNumber: string;\n isCallFromRefundList: boolean;\n refundButtonState: string = '';\n isAmountEmpty: boolean = false;\n isReasonEmpty: boolean = false;\n amountHasError: boolean = false;\n isRemissionLessThanFeeError: boolean = false;\n refundHasError: boolean = false;\n refundReasons: any[] = [];\n refundStatusHistories: IRefundStatus[];\n refundReference: string;\n refundAmount: string;\n refundCode: string;\n isRefundBtnDisabled: boolean = true;\n isFromPayBubble: boolean = false;\n oldRefundReason: string;\n refundreason: string;\n navigationpage: string;\n isLastUpdatedByCurrentUser: boolean = true;\n isProcessRefund: boolean = false;\n changedAmount: number;\n constructor(private formBuilder: FormBuilder,\n private refundService: RefundsService,\n private paymentLibComponent: PaymentLibComponent,\n private paymentViewService: PaymentViewService,\n private router: Router,\n private OrderslistService: OrderslistService) { }\n\n ngOnInit() {\n\n // if (this.check4AllowedRoles2AccessRefund()) {\n this.resetRemissionForm([false, false, false, false], 'All');\n this.bsPaymentDcnNumber = this.paymentLibComponent.bspaymentdcn;\n this.isCallFromRefundList = this.paymentLibComponent.isCallFromRefundList;\n // if(this.paymentLibComponent.isFromRefundStatusPage) {\n // this.viewName = 'reviewandsubmitview';\n // }\n if(this.API_ROOT == 'api/payment-history') {\n this.isFromPayBubble = true;\n }\n if (this.paymentLibComponent.isRefundStatusView) {\n this.viewName = 'refundview';\n this.OrderslistService.getRefundView().subscribe((data) => this.refundlist = data);\n this.OrderslistService.getCCDCaseNumberforRefund.subscribe((data) => this.ccdCaseNumber = data);\n } else {\n this.viewName = 'refundstatuslist';\n if(this.isEliginbleToAccess) {\n this.refundService.getRefundStatusList(this.ccdCaseNumber).subscribe(\n refundList => {\n this.rejectedRefundList = refundList['refund_list'];\n }\n ),\n (error: any) => {\n this.errorMessage = error.replace(/\"/g,\"\");\n };\n } else {\n this.rejectedRefundList = [];\n }\n\n }\n\n\n this.refundStatusForm = this.formBuilder.group({\n amount: new FormControl('', Validators.compose([\n Validators.required,\n Validators.pattern('^[0-9]+(\\.[0-9]{1,2})?$')\n ])),\n refundReason: new FormControl('', Validators.compose([Validators.required])),\n reason: new FormControl()\n });\n\n if(this.refundlist !== undefined) {\n this.getRefundsStatusHistoryList();\n\n if (this.LOGGEDINUSERROLES.some(i => i.includes('payments-refund-approver'))) {\n this.isProcessRefund = true;\n this.refundButtonState = this.refundlist.refund_status.name;\n return;\n }\n\n if (this.LOGGEDINUSERROLES.some(i => i.includes('payments-refund'))) {\n this.isProcessRefund = false;\n this.refundButtonState = this.refundlist.refund_status.name;\n }\n }\n //}\n }\n\n getRefundsStatusHistoryList() {\n if(this.refundlist !== undefined) {\n this.refundService.getRefundStatusHistory(this.refundlist.refund_reference).subscribe(\n statusHistoryList => {\n this.refundStatusHistories = statusHistoryList.status_history_dto_list;\n this.isLastUpdatedByCurrentUser = statusHistoryList.last_updated_by_current_user;\n }\n ),\n (error: any) => {\n this.errorMessage = error.replace(/\"/g,\"\");\n };\n }\n }\n\n goToRefundView(refundlist: IRefundList, navigationpage: string) {\n this.OrderslistService.setRefundView(refundlist);\n this.OrderslistService.setCCDCaseNumber(this.ccdCaseNumber);\n this.paymentLibComponent.viewName = 'refundstatuslist';\n this.paymentLibComponent.isRefundStatusView = true;\n this.refundlist = refundlist;\n this.OrderslistService.setnavigationPage(navigationpage);\n }\n\n loadCaseTransactionPage() {\n this.OrderslistService.setnavigationPage('casetransactions');\n this.OrderslistService.setisFromServiceRequestPage(false);\n this.paymentLibComponent.viewName = 'case-transactions';\n this.paymentLibComponent.ISBSENABLE = true;\n this.paymentLibComponent.isRefundStatusView = false;\n }\n\n loadRefundListPage() {\n this.OrderslistService.getnavigationPageValue().subscribe((data) => this.navigationpage = data);\n if (this.navigationpage === 'casetransactions') {\n this.loadCaseTransactionPage();\n } else {\n this.paymentLibComponent.viewName = 'refund-list';\n }\n }\n\n gotoReviewDetailsPage(event:any) {\n // event.preventDefault();\n this.errorMessage = false;\n this.paymentLibComponent.isRefundStatusView = true;\n this.ngOnInit();\n }\n\n gotoReviewAndReSubmitPage() {\n this.viewName = 'reviewandsubmitview';\n this.oldRefundReason = this.refundlist.reason;\n this.changedAmount = this.refundlist.amount;\n this.refundreason = this.refundStatusHistories.filter(data => data.status.toLowerCase() === 'update required')[0].notes;\n this.refundService.getRefundReasons().subscribe(\n refundReasons => {\n this.refundReasons = refundReasons;\n });\n }\n gotoRefundReasonPage() {\n this.isRefundBtnDisabled = false;\n this.paymentLibComponent.REFUNDLIST = \"true\";\n this.paymentLibComponent.isFromRefundStatusPage = true;\n this.ccdCaseNumber = this.paymentLibComponent.CCD_CASE_NUMBER;\n this.errorMessage = false;\n this.viewName = 'issuerefund';\n }\n\n gotoAmountPage() {\n this.errorMessage = false;\n this.paymentLibComponent.REFUNDLIST = \"true\";\n this.isRefundBtnDisabled = false;\n this.ccdCaseNumber = this.paymentLibComponent.CCD_CASE_NUMBER;\n this.paymentLibComponent.isFromRefundStatusPage = true;\n this.viewName = 'processretroremissonpage';\n }\n\n goToReviewAndSubmitView() {\n const remissionctrls = this.refundStatusForm.controls\n if (this.refundStatusForm.dirty) {\n if (remissionctrls['amount'].value == '') {\n this.resetRemissionForm([true, false, false, false], 'amount');\n }\n else if (remissionctrls['amount'].value != '' && remissionctrls['amount'].invalid) {\n this.resetRemissionForm([false, true, false, false], 'amount');\n }\n else if (remissionctrls['reason'].value == '') {\n this.resetRemissionForm([false, false, false, true], 'reason');\n } else {\n this.refundlist.reason = remissionctrls['reason'].value;\n this.viewName = 'reviewandsubmitview';\n }\n }\n\n }\n\n resetRemissionForm(val, field) {\n if (field === 'All') {\n this.isAmountEmpty = val[0];\n this.amountHasError = val[1];\n this.isRemissionLessThanFeeError = val[2];\n this.isReasonEmpty = val[3];\n } else if (field === 'amount' || field === 'All') {\n this.isAmountEmpty = val[0];\n this.amountHasError = val[1];\n this.isRemissionLessThanFeeError = val[2];\n } else if (field === 'reason' || field === 'All') {\n this.isReasonEmpty = val[3];\n }\n }\n\n selectRadioButton(key, value) {\n this.refundHasError = false;\n this.selectedRefundReason = key;\n if (key === 'Other') {\n this.refundHasError = false;\n this.refundReason = key;\n }\n }\n\n getRefundListReason(refundListReason: any) {\n if (this.paymentLibComponent.isFromRefundStatusPage && !this.paymentLibComponent.iscancelClicked) {\n this.refundlist.reason = refundListReason.reason;\n this.refundCode = refundListReason.code;\n } else {\n this.isRefundBtnDisabled = true;\n }\n this.viewName = 'reviewandsubmitview';\n this.paymentLibComponent.CCD_CASE_NUMBER = this.ccdCaseNumber;\n }\n\n getRefundAmount(amount: number) {\n if (this.paymentLibComponent.isFromRefundStatusPage && !this.paymentLibComponent.iscancelClicked) {\n if (amount > 0) {\n this.changedAmount = amount;\n // this.refundlist.amount = amount;\n }\n } else {\n this.isRefundBtnDisabled = true;\n }\n this.viewName = 'reviewandsubmitview';\n this.paymentLibComponent.CCD_CASE_NUMBER = this.ccdCaseNumber;\n }\n\n gotoReviewRefundConfirmationPage() {\n if (this.oldRefundReason === this.refundlist.reason) {\n this.refundCode = '';\n }\n const resubmitRequest = new IResubmitRefundRequest(this.refundCode, this.changedAmount);\n this.refundService.patchResubmitRefund(resubmitRequest, this.refundlist.refund_reference).subscribe(\n response => {\n if (JSON.parse(response)) {\n this.refundReference = JSON.parse(response).refund_reference;\n this.refundAmount = JSON.parse(response).refund_amount;\n this.viewName = 'reviewrefundconfirmationpage';\n }\n },\n (error: any) => {\n this.errorMessage = error.replace(/\"/g,\"\");\n }\n );\n\n }\n\n goToRefundProcessComponent(refundReference: string, refundList: IRefundList) {\n this.paymentLibComponent.refundlistsource = refundList;\n this.paymentLibComponent.refundReference = refundReference;\n this.paymentLibComponent.viewName = 'process-refund';\n }\n\n}\n","import { THIS_EXPR } from '@angular/compiler/src/output/output_ast';\nimport { Component, Input, OnInit, Output, EventEmitter } from '@angular/core';\nimport { PaymentLibComponent } from '../../payment-lib.component';\nimport { IPayment } from '../../interfaces/IPayment';\nimport { IRemission } from '../../interfaces/IRemission';\nimport { IPaymentView } from '../../interfaces/IPaymentView';\nimport { IOrderReferenceFee } from '../../interfaces/IOrderReferenceFee';\nimport { IFee } from '../../interfaces/IFee';\nimport { IPaymentGroup } from '../../interfaces/IPaymentGroup';\nimport { Router } from '@angular/router';\nimport { PaymentViewService } from '../../services/payment-view/payment-view.service';\nimport { OrderslistService } from '../../services/orderslist.service';\n\n@Component({\n selector: 'ccpay-service-request',\n templateUrl: './service-request.component.html',\n styleUrls: ['./service-request.component.css']\n})\nexport class ServiceRequestComponent implements OnInit {\n @Input('LOGGEDINUSERROLES') LOGGEDINUSERROLES: string[];\n @Input('viewStatus') viewStatus: string;\n @Input('orderDetail') orderDetail: any[];\n @Input('orderRef') orderRef: string;\n @Input('orderStatus') orderStatus: string;\n @Input('orderParty') orderParty: string;\n @Input('orderCreated') orderCreated: Date;\n @Input('orderCCDEvent') orderCCDEvent: string;\n @Input('orderFeesTotal') orderFeesTotal: number;\n @Input('orderTotalPayments') orderTotalPayments: number;\n @Input('orderRemissionTotal') orderRemissionTotal: number;\n @Input('takePayment') takePayment: boolean;\n @Input('ccdCaseNumber') ccdCaseNumber: boolean;\n @Input(\"isServiceRequest\") isServiceRequest: string;\n @Output() goToServiceRquestComponent: EventEmitter<any> = new EventEmitter();\n\n\n servicerequest: string;\n // ccdCaseNumber: string;\n excReference: string;\n paymentGroups: any[] = [];\n payments: IPayment[] = [];\n nonPayments: IPayment[] = [];\n allPayments: IPayment[] = [];\n remissions: IRemission[] = [];\n fees: IFee[] = [];\n errorMessage: string;\n totalFees: number;\n totalPayments: number;\n totalNonOffPayments: number;\n totalRemissions: number;\n selectedOption: string;\n dcnNumber: string;\n paymentRef: string;\n isTurnOff: boolean;\n isRefundRemission: boolean = true;\n isStrategicFixEnable: boolean;\n isAddFeeBtnEnabled: boolean = true;\n isExceptionRecord: boolean = false;\n isUnprocessedRecordSelected: boolean = false;\n exceptionRecordReference: string;\n isAnyFeeGroupAvilable: boolean = true;\n isHistoricGroupAvailable: boolean = false;\n isBulkScanEnable;\n isRemissionsMatch: boolean;\n isRemoveBtnDisabled: boolean = false;\n feeId: IFee;\n clAmountDue: number = 0;\n unprocessedRecordCount: number;\n isFeeRecordsExist: boolean = false;\n isGrpOutstandingAmtPositive: boolean = false;\n totalRefundAmount: Number;\n caseType: String;\n // lsCcdNumber: any = ls.get<any>('ccdNumber');\n payment: IPayment;\n paymentGroup: IPaymentGroup;\n paymentView: IPaymentView;\n\n\n isAddRemissionEnable: boolean = false;\n orderRemissionDetails: any[] = [];\n orderLevelFees: IOrderReferenceFee[] = [];\n cpoDetails: any = null;\n serviceRequestValue: string;\n orderAddBtnEnable: boolean;\n\n isCPODown: boolean;\n test: boolean;\n isPBA: boolean = false;\n isIssueRefunfBtnEnable: boolean = false;\n isAddRemissionBtnEnabled: boolean = false;\n isRefundRemissionBtnEnable: boolean = false;\n allowedRolesToAccessRefund = ['payments-refund-approver', 'payments-refund'];\n isFromServiceRequestPage: boolean;\n navigationpage: string;\n remissionFeeAmt: number;\n\n constructor(\n private paymentLibComponent: PaymentLibComponent,\n private paymentViewService: PaymentViewService,\n private OrderslistService: OrderslistService,\n private router: Router) { }\n\n ngOnInit() {\n if (this.viewStatus === undefined) {\n this.viewStatus = this.paymentLibComponent.viewName;\n }\n if(this.paymentLibComponent.isFromServiceRequestPage && this.paymentLibComponent.isFromPaymentDetailPage) {\n if(this.paymentLibComponent.isFromPaymentDetailPage && this.paymentLibComponent.isFromServiceRequestPage) {\n this.OrderslistService.getorderRefs().subscribe((data) => this.orderRef = data);\n this.OrderslistService.getorderCCDEvents().subscribe((data) => this.orderCCDEvent = data);\n this.OrderslistService.getorderCreateds().subscribe((data) => this.orderCreated = data);\n this.OrderslistService.getorderDetail().subscribe((data) => this.orderDetail = data);\n this.OrderslistService.getorderPartys().subscribe((data) => this.orderParty = data);\n this.OrderslistService.getorderRemissionTotals().subscribe((data) => this.orderRemissionTotal = data);\n this.OrderslistService.getorderFeesTotals().subscribe((data) => this.orderFeesTotal = data);\n this.OrderslistService.getoorderTotalPaymentss().subscribe((data) => this.orderTotalPayments = data);\n }\n }\n // if (this.takePayment) {\n // this.paymentLibComponent.TAKEPAYMENT = this.takePayment;\n // }\n }\n goToServiceRequestPage() {\n this.goToServiceRquestComponent.emit();\n }\n\n goToCaseTransationPage(event: any) {\n event.preventDefault();\n this.OrderslistService.setnavigationPage('servicerequestpage');\n this.OrderslistService.setisFromServiceRequestPage(false);\n this.paymentLibComponent.viewName = 'case-transactions';\n this.paymentLibComponent.ISBSENABLE = true;\n this.paymentLibComponent.isTakePayment = this.paymentLibComponent.TAKEPAYMENT;\n if (this.takePayment) {\n this.paymentLibComponent.isTakePayment = this.takePayment;\n }\n this.paymentLibComponent.SERVICEREQUEST = \"true\";\n this.paymentLibComponent.isFromServiceRequestPage = false;\n if(this.isServiceRequest !== 'false') {\n this.paymentLibComponent.isFromServiceRequestPage = true;\n }\n this.paymentLibComponent.isFromRefundStatusPage = false;\n this.paymentLibComponent.viewName = 'case-transactions';\n this.resetOrderData();\n let partUrl = this.paymentLibComponent.ISBSENABLE ? '&isBulkScanning=Enable' : '&isBulkScanning=Disable';\n partUrl += this.paymentLibComponent.ISTURNOFF ? '&isTurnOff=Enable' : '&isTurnOff=Disable';\n if(this.isServiceRequest === 'false') {\n partUrl += this.paymentLibComponent.TAKEPAYMENT ? '&takePayment=true' : '&takePayment=false';\n }\n partUrl += this.isStrategicFixEnable ? '&isStFixEnable=Enable' : '&isStFixEnable=Disable';\n partUrl += this.isServiceRequest !== 'false' ? '&servicerequest=true' : '&servicerequest=false';\n partUrl += `&caseType=${this.paymentLibComponent.CASETYPE}`;\n const url = `/payment-history/${this.paymentLibComponent.CCD_CASE_NUMBER}?view=case-transactions&selectedOption=${this.paymentLibComponent.SELECTED_OPTION}${partUrl}`;\n this.router.routeReuseStrategy.shouldReuseRoute = () => false;\n this.router.onSameUrlNavigation = 'reload';\n this.router.navigateByUrl(url);\n }\n\n chkForAddRemission(feeCode: string): boolean {\n if (this.chkForPBAPayment() && this.check4AllowedRoles2AccessRefund()) {\n if (this.orderDetail[0]['remissions'].length > 0) {\n for (const remission of this.orderDetail[0]['remissions']) {\n if (remission.fee_code === feeCode) {\n return false;\n }\n }\n }\n return true;\n } else {\n return false;\n }\n }\n\n chkForPBAPayment(): boolean {\n if (this.orderDetail !== null && this.orderDetail !== undefined) {\n this.orderDetail.forEach(orderDetail => {\n if (orderDetail.payments) {\n orderDetail.payments.forEach(payment => {\n if (payment.method.toLocaleLowerCase() === 'payment by account' && this.allowFurtherAccessAfter4Days(payment)) {\n this.paymentLibComponent.paymentReference = payment.reference;\n this.isPBA = true;\n }\n });\n }\n });\n if (this.isPBA) {\n return true;\n } else {\n return false;\n };\n }\n }\n\n addRemission(fee: IFee) {\n if(this.chkForAddRemission(fee.code)) {\n this.feeId = fee;\n this.viewStatus = 'addremission';\n this.payment = this.orderDetail[0].payments[0];\n this.paymentViewService.getApportionPaymentDetails(this.orderDetail[0].payments[0].reference).subscribe(\n paymentGroup => {\n this.paymentGroup = paymentGroup;\n\n this.paymentGroup.payments = this.paymentGroup.payments.filter\n (paymentGroupObj => paymentGroupObj['reference'].includes(this.paymentLibComponent.paymentReference));\n this.payment = this.paymentGroup.payments[0];\n // const paymentAllocation = this.paymentGroup.payments[0].payment_allocation;\n // this.isStatusAllocated = paymentAllocation.length > 0 && paymentAllocation[0].allocation_status === 'Allocated' || paymentAllocation.length === 0;\n },\n (error: any) => this.errorMessage = error.replace(/\"/g,\"\")\n );\n }\n }\n\n addRefundForRemission(payment: IPayment, remission: IRemission[],fees:any) {\n this.viewStatus = 'addrefundforremission';\n\n this.payment = payment;\n this.paymentViewService.getApportionPaymentDetails(this.payment.reference).subscribe(\n paymentGroup => {\n this.paymentGroup = paymentGroup;\n\n this.paymentGroup.payments = this.paymentGroup.payments.filter\n (paymentGroupObj => paymentGroupObj['reference'].includes(this.payment.reference));\n this.payment = this.paymentGroup.payments[0];\n this.remissions = remission;\n this.remissionFeeAmt = fees.filter(data=>data.code === this.remissions['fee_code'])[0].net_amount;\n // const paymentAllocation = this.paymentGroup.payments[0].payment_allocation;\n // this.isStatusAllocated = paymentAllocation.length > 0 && paymentAllocation[0].allocation_status === 'Allocated' || paymentAllocation.length === 0;\n },\n (error: any) => this.errorMessage = error\n );\n }\n cancelRemoval() {\n this.viewStatus = 'main';\n }\n\n removeFee(fee: any) {\n this.isRemoveBtnDisabled = true;\n this.paymentViewService.deleteFeeFromPaymentGroup(fee).subscribe(\n (success: any) => {\n window.location.reload();\n },\n (error: any) => {\n this.errorMessage = error;\n this.isRemoveBtnDisabled = false;\n }\n );\n }\n\n\n chkIssueRefundBtnEnable(payment: IPayment): boolean {\n if (this.check4AllowedRoles2AccessRefund() && this.allowFurtherAccessAfter4Days(payment) &&\n payment.method === 'payment by account' && payment.status.toLocaleLowerCase() === 'success') {\n this.isIssueRefunfBtnEnable = true;\n }\n if (this.isIssueRefunfBtnEnable) {\n return true;\n } else {\n return false;\n };\n }\n\n chkIsRefundRemissionBtnEnable(): boolean {\n if (this.orderDetail !== null && this.orderDetail !== undefined) {\n this.paymentLibComponent.isFromServiceRequestPage = true;\n this.orderDetail.forEach(orderDetail => {\n if (orderDetail.payments) {\n orderDetail.payments.forEach(payment => {\n if (payment.method.toLocaleLowerCase() === 'payment by account' && payment.status.toLocaleLowerCase() === 'success' && this.allowFurtherAccessAfter4Days(payment)) {\n this.isRefundRemissionBtnEnable = true;\n }\n });\n }\n });\n if (this.isRefundRemissionBtnEnable) {\n return true;\n } else {\n return false;\n };\n }\n }\n\n check4AllowedRoles2AccessRefund = (): boolean => {\n return this.allowedRolesToAccessRefund.some(role =>\n this.LOGGEDINUSERROLES.indexOf(role) !== -1\n );\n }\n\n allowFurtherAccessAfter4Days = (payment: IPayment): boolean => {\n if (payment !== null && payment !== undefined) {\n let tmp4DayAgo = new Date();\n tmp4DayAgo.setDate(tmp4DayAgo.getDate() - 4);\n return tmp4DayAgo >= new Date(payment.date_created);\n }\n }\n\n issueRefund(payment: IPayment) {\n if (payment !== null && payment !== undefined) {\n if(this.chkIssueRefundBtnEnable(payment)) {\n this.viewStatus = 'issuerefund';\n this.payment = payment;\n this.paymentLibComponent.isFromServiceRequestPage = true;\n this.isRefundRemission = true;\n }\n }\n }\n\n goToPayementView(paymentGroupReference: string, paymentReference: string, paymentMethod: string) {\n this.goToPaymentViewComponent({ paymentGroupReference, paymentReference, paymentMethod });\n }\n\n goToPaymentViewComponent(paymentGroup: any) {\n this.paymentLibComponent.paymentMethod = paymentGroup.paymentMethod;\n this.paymentLibComponent.isFromServiceRequestPage = true;\n this.paymentLibComponent.paymentGroupReference = paymentGroup.paymentGroupReference;\n this.paymentLibComponent.paymentReference = paymentGroup.paymentReference;\n this.OrderslistService.setOrderRef(this.orderRef);\n this.OrderslistService.setorderCCDEvent(this.orderCCDEvent);\n this.OrderslistService.setorderCreated(this.orderCreated);\n this.OrderslistService.setorderDetail(this.orderDetail);\n this.OrderslistService.setorderParty(this.orderParty);\n this.OrderslistService.setorderTotalPayments(this.orderTotalPayments);\n this.OrderslistService.setorderRemissionTotal(this.orderRemissionTotal);\n this.OrderslistService.setorderFeesTotal(this.orderFeesTotal);\n this.viewStatus = 'payment-view';\n }\n\n resetOrderData() {\n this.OrderslistService.setOrderRef(null);\n this.OrderslistService.setorderCCDEvent(null);\n this.OrderslistService.setorderCreated(null);\n this.OrderslistService.setorderDetail(null);\n this.OrderslistService.setorderParty(null);\n this.OrderslistService.setorderTotalPayments(null);\n this.OrderslistService.setorderRemissionTotal(null);\n this.OrderslistService.setorderFeesTotal(null);\n }\n}\n","export class IserviceRequestCardPayment {\n amount: string\n currency: string\n language: string\n \n constructor(amount : string) {\n this.amount = amount;\n this.currency = 'GBP';\n this.language = 'string';\n } \n}\n ","export class IserviceRequestPbaPayment {\n account_number: string;\n amount: string\n currency: string\n customer_reference: string\n organisation_name: string\n \n constructor(account_number : string, amount : string, customer_reference: string, orgName: string) {\n this.account_number = account_number;\n this.amount = amount;\n this.currency = 'GBP';\n this.customer_reference = customer_reference;\n this.organisation_name = orgName;\n } \n}\n ","import { Component, OnInit, Input} from '@angular/core';\nimport { PaymentViewService } from '../../services/payment-view/payment-view.service';\nimport { PaymentLibComponent } from '../../payment-lib.component';\nimport { IserviceRequestCardPayment } from '../../interfaces/IserviceRequestCardPayment';\nimport { IserviceRequestPbaPayment } from '../../interfaces/IserviceRequestPbaPayment';\n\nconst BS_ENABLE_FLAG = 'bulk-scan-enabling-fe';\n\n@Component({\n selector: 'ccpay-pba-payment',\n templateUrl: './pba-payment.component.html',\n styleUrls: ['./pba-payment.component.scss']\n})\nexport class PbaPaymentComponent implements OnInit {\n @Input() pbaPayOrderRef: any;\n viewStatus: string;\n pbaAccountList: string[];\n isPBAAccountHold: boolean = false;\n errorMsg: any;\n isCardPaymentSuccess: boolean = true;\n isInSufficiantFund: boolean = false;\n isPBAAccountNotExist: boolean = false;\n isPBAServerError: boolean = false;\n isGetPBAAccountSucceed: boolean = false;\n selectedPbaAccount: string = '';\n pbaAccountRef: string = '';\n isPbaAccountSelected: boolean = false;\n isCardPaymentSelected: boolean = false;\n isPBADropdownSelected: boolean = false;\n isContinueButtondisabled: boolean = true;\n isPBAAccountPaymentSuccess: boolean = false;\n pbaAccountrPaymentResult: any;\n orgName: string = '';\n\n constructor(private paymentLibComponent: PaymentLibComponent,\n private paymentViewService: PaymentViewService) {}\n\n ngOnInit() {\n this.pbaPayOrderRef = this.paymentLibComponent.pbaPayOrderRef;\n this.viewStatus = 'pba-payment';\n this.errorMsg = null;\n this.paymentViewService.getPBAaccountDetails()\n .subscribe(\n result => {\n this.isGetPBAAccountSucceed = true;\n this.orgName = result.organisationEntityResponse.name;\n this.pbaAccountList = result.organisationEntityResponse.paymentAccount;\n },\n error => {\n this.errorMsg = error;\n }\n );\n\n }\n selectpbaaccount(args) {\n if(args.currentTarget.id === 'pbaAccountNumber') {\n this.isPBADropdownSelected = true;\n this.selectedPbaAccount = args.target.value; \n }\n if(args.currentTarget.id === 'pbaAccountRef') {\n this.pbaAccountRef = args.target.value; \n }\n if(this.selectedPbaAccount !== '' && this.pbaAccountRef !== \"\") {\n this.isContinueButtondisabled = false;\n } else {\n this.isContinueButtondisabled = true;\n }\n }\n\n saveAndContinue() {\n\n if(this.isPbaAccountSelected) {\n this.isInSufficiantFund = false;\n this.isPBAAccountNotExist = false;\n this.isPBAServerError = false;\n this.isPBAAccountPaymentSuccess = false;\n if ( this.pbaAccountList.indexOf(this.selectedPbaAccount) !== -1 ) {\n const requestBody = new IserviceRequestPbaPayment(\n this.selectedPbaAccount, this.pbaPayOrderRef.orderTotalFees, this.pbaAccountRef, this.orgName);\n this.paymentViewService.postPBAaccountPayment(this.pbaPayOrderRef.orderRefId, requestBody)\n .subscribe(\n r => {\n try {\n this.pbaAccountrPaymentResult = JSON.parse(r);\n } catch(e) {\n this.pbaAccountrPaymentResult = r;\n }\n this.isPBAAccountPaymentSuccess = true;\n },\n e => {\n if(e.status == '402') {\n this.isInSufficiantFund = true; \n } else if(e.status == '410') {\n this.isPBAAccountNotExist = true;\n } else if(e.status == '412') {\n this.isPBAAccountHold = true;\n } else {\n this.isPBAServerError = true;\n }\n }\n );\n } else {\n this.isPBAServerError = true;\n }\n } else if (this.isCardPaymentSelected) {\n this.cardPayment();\n }\n\n }\n cardPayment() {\n this.isCardPaymentSuccess = true;\n const requestBody = new IserviceRequestCardPayment (\n this.pbaPayOrderRef.orderTotalFees);\n this.paymentViewService.postWays2PayCardPayment(this.pbaPayOrderRef.orderRefId, requestBody)\n .subscribe(\n result => {\n const paymentUrl = JSON.parse(result).next_url;\n window.location.href = paymentUrl;\n },\n error => {\n this.isCardPaymentSuccess = false;\n }\n );\n\n }\n selectPaymentMethod(type: string) {\n if(type === 'PBA') {\n this.isPbaAccountSelected = true;\n this.isCardPaymentSelected = false;\n this.isPBADropdownSelected = false\n this.isContinueButtondisabled = true;\n this.selectedPbaAccount = null;\n } else if (type === 'CARD') {\n this.isPbaAccountSelected = false;\n this.isCardPaymentSelected = true;\n this.isPBADropdownSelected = false\n this.isContinueButtondisabled = false;\n }\n }\n gotoCasetransationPage() {\n this.paymentLibComponent.viewName = 'case-transactions';\n this.paymentLibComponent.TAKEPAYMENT = false;\n this.paymentLibComponent.ISBSENABLE = true;\n this.paymentLibComponent.isFromServiceRequestPage = true;\n }\n}\n","import { NgModule } from '@angular/core';\nimport { HttpClientModule } from '@angular/common/http';\nimport { CommonModule } from '@angular/common';\n\nimport { PaymentListComponent } from './components/payment-list/payment-list.component';\nimport { PaymentViewComponent } from './components/payment-view/payment-view.component';\nimport { ProcessRefundComponent } from './components/process-refund/process-refund.component';\nimport { RefundListComponent } from './components/refund-list/refund-list.component';\n\nimport { CardDetailsComponent } from './components/card-details/card-details.component';\nimport { PageNotFoundComponent } from './components/page-not-found.component';\nimport { PaymentLibComponent } from './payment-lib.component';\nimport { StatusHistoryComponent } from './components/status-history/status-history.component';\nimport { PbaDetailsComponent } from './components/pba-details/pba-details.component';\nimport { LoggerService } from './services/shared/logger/logger.service';\nimport { ConsoleLoggerService } from './services/shared/logger/console-logger.service';\nimport { WebComponentHttpClient } from './services/shared/httpclient/webcomponent.http.client';\nimport { CaseTransactionsComponent } from './components/case-transactions/case-transactions.component';\nimport { FeeSummaryComponent } from './components/fee-summary/fee-summary.component';\nimport { ErrorBannerComponent } from './components/error-banner/error-banner.component';\nimport { MarkUnidentifiedPaymentComponent } from './components/mark-unidentified-payment/mark-unidentified-payment.component';\nimport { MarkUnsolicitedPaymentComponent } from './components/mark-unsolicited-payment/mark-unsolicited-payment.component';\nimport { UnprocessedPaymentsComponent } from './components/unprocessed-payments/unprocessed-payments.component';\nimport { ProcessedPaymentsComponent } from './components/processed-payments/processed-payments.component';\nimport { AllocatePaymentsComponent } from './components/allocate-payments/allocate-payments.component';\nimport { AddRemissionComponent } from './components/add-remission/add-remission.component';\nimport { FormsModule, ReactiveFormsModule } from '@angular/forms';\nimport { CcdHyphensPipe } from './pipes/ccd-hyphens.pipe';\nimport { CapitalizePipe } from './pipes/capitalize.pipe';\nimport { keyValuePipe } from './pipes/key-value.pipe';\nimport { SanitizeHtmlPipe } from './pipes/sanitize-html.pipe';\nimport { ReportsComponent } from './components/reports/reports.component';\nimport { XlFileService } from './services/xl-file/xl-file.service';\nimport { TableComponent } from './components/table/table.component';\nimport { MatTableModule } from '@angular/material/table';\nimport { MatPaginatorModule } from '@angular/material/paginator';\nimport { MatSortModule } from '@angular/material/sort';\nimport { MatFormFieldModule } from '@angular/material/form-field';\nimport { MatInputModule } from '@angular/material/input';\n// import { BrowserAnimationsModule } from '@angular/platform-browser/animations';\n// import { NoopAnimationsModule } from '@angular/platform-browser/animations';\nimport { RefundStatusComponent } from './components/refund-status/refund-status.component';\nimport { ServiceRequestComponent } from './components/service-request/service-request.component';\nimport { PbaPaymentComponent } from './components/pba-payment/pba-payment.component';\n\n@NgModule({\n imports: [\n CommonModule,\n HttpClientModule,\n FormsModule,\n ReactiveFormsModule,\n MatTableModule,\n MatPaginatorModule,\n MatSortModule,\n MatFormFieldModule,\n MatInputModule,\n // BrowserAnimationsModule,\n // NoopAnimationsModule\n ],\n declarations: [\n PaymentLibComponent,\n PaymentListComponent,\n PaymentViewComponent,\n PbaPaymentComponent,\n ProcessRefundComponent,\n RefundListComponent,\n CardDetailsComponent,\n PageNotFoundComponent,\n StatusHistoryComponent,\n MarkUnidentifiedPaymentComponent,\n MarkUnsolicitedPaymentComponent,\n UnprocessedPaymentsComponent,\n ProcessedPaymentsComponent,\n AllocatePaymentsComponent,\n PbaDetailsComponent,\n CaseTransactionsComponent,\n FeeSummaryComponent,\n AddRemissionComponent,\n CcdHyphensPipe,\n CapitalizePipe,\n keyValuePipe,\n SanitizeHtmlPipe,\n ReportsComponent,\n ErrorBannerComponent,\n TableComponent,\n RefundStatusComponent,\n ServiceRequestComponent\n ],\n exports: [PaymentLibComponent],\n providers: [\n { provide: LoggerService, useClass: ConsoleLoggerService },\n XlFileService,\n WebComponentHttpClient\n ]\n})\n\nexport class PaymentLibModule { }\n"],"mappings":"umDAMAA,EAAA,WAME,SAAAA,I,QAEAA,EAAaC,UAAAC,cAAb,SAAcC,GACZC,KAAKC,SAAWF,C,EAGlBH,EAAAC,UAAAK,cAAA,WACE,OAAOF,KAAKC,Q,EAGdL,EAAqBC,UAAAM,sBAArB,SAAsBC,GACpBJ,KAAKK,kBAAoBD,C,EAG3BR,EAAAC,UAAAS,sBAAA,WACE,OAAON,KAAKK,iB,EAGdT,EAAsBC,UAAAU,uBAAtB,SAAuBC,GACrBR,KAAKS,iBAAmBD,C,EAG1BZ,EAAAC,UAAAa,qBAAA,WACE,OAAOV,KAAKS,gB,EAEdb,EAAuBC,UAAAc,wBAAvB,SAAwBC,GACtBZ,KAAKa,qBAAuBD,C,EAE9BhB,EAAAC,UAAAiB,wBAAA,WACE,OAAOd,KAAKa,oB,IAnChB,G,yGAJC,CAAAE,KAAAC,aAAWC,KAAA,EACVC,WAAY,W,sCCMd,IAAAC,EAAA,WAoCE,SAAAA,IAnCQnB,KAAAoB,WAAoD,IAAIC,kBAAsC,MAC9FrB,KAAAsB,WAA2C,IAAID,kBAA6B,MAC5ErB,KAAAuB,SAAW,IAAIF,kBAAgB,IACvCrB,KAAAwB,YAAcxB,KAAKuB,SAASE,eACpBzB,KAAA0B,UAAY,IAAIL,kBAAyB,MACjDrB,KAAA2B,YAAc3B,KAAK0B,UAAUD,eACrBzB,KAAA4B,cAAgB,IAAIP,kBAAgB,IAC5CrB,KAAA6B,0BAA4B7B,KAAK4B,cAAcH,eACvCzB,KAAA8B,yBAA2B,IAAIT,kBAAyB,MAChErB,KAAA+B,4BAA8B/B,KAAK8B,yBAAyBL,eACpDzB,KAAAgC,WAAa,IAAIX,kBAAgB,IACzCrB,KAAAiC,cAAgBjC,KAA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ey7B,SAAUlpB,GACpCqb,GACA1rB,O"}
1
+ {"version":3,"names":["PaymentLibService","prototype","setApiRootUrl","apiRoot","this","API_ROOT","getApiRootUrl","setBulkScanApiRootUrl","bulkscanapiRoot","BULKSCAN_API_ROOT","getBulkScanApiRootUrl","setRefundndsApiRootUrl","refundsapiRoot","REFUNDS_API_ROOT","getRefundsApiRootUrl","setNoticationApiRootUrl","notificationapiRoot","NOTIFICATION_API_ROOT","getNoticationApiRootUrl","setCardPaymentReturnUrl","cardPaymentReturnUrl","CARDPAYMENTRETURNURL","getCardPaymentReturnUrl","type","Injectable","args","providedIn","OrderslistService","ordersList","BehaviorSubject","refundView","caseType","getcaseType","asObservable","feeExists","getFeeExist","ccdCaseNumber","getCCDCaseNumberforRefund","isFromServiceRequestPage","getisFromServiceRequestPage","OrderRefId","getOrderRefId","navigationPage","getnavigationPage","orderRef","getorderRef","orderCCDEvent","getorderCCDEvent","orderCreated","getorderCreated","orderParty","getorderParty","orderRemissionTotal","getorderRemissionTotal","orderFeesTotal","getorderFeesTotal","orderTotalPayments","getorderTotalPayments","rolesList","orderDetail","paymentPageView","setOrdersList","orderLevelFees","next","Object","assign","getOrdersList","setRefundView","refundList","getRefundView","setCaseType","getCaseType","setCCDCaseNumber","getCCDCaseNumber","setFeeExists","getFeeExists","setisFromServiceRequestPage","getisFromServiceRequestPages","setOrderRefId","getSelectedOrderRefId","setnavigationPage","getnavigationPageValue","setpaymentPageView","paymentpageList","getpaymentPageView","setUserRolesList","getUserRolesList","setorderDetail","getorderDetail","setOrderRef","getorderRefs","setorderCCDEvent","getorderCCDEvents","setorderCreated","getorderCreateds","setorderParty","getorderPartys","setorderRemissionTotal","getorderRemissionTotals","setorderFeesTotal","getorderFeesTotals","setorderTotalPayments","getoorderTotalPaymentss","PaymentLibComponent","paymentLibService","cd","unProcessedPaymentServiceId","isFromPayBubble","unProcessedPayment","orderPendingPayments","ngAfterContentChecked","detectChanges","ngOnInit","LOGGEDINUSERROLES","length","PAYMENT_GROUP_REF","paymentGroupReference","DCN_NUMBER","bspaymentdcn","REFUNDLIST","VIEW","viewName","isTakePayment","TAKEPAYMENT","Component","selector","template","ChangeDetectorRef","Input","CCD_CASE_NUMBER","EXC_REFERENCE","PAYMENT_METHOD","VIEWSERVICE","SERVICEREQUEST","SELECTED_OPTION","ISBSENABLE","ISSFENABLE","ISTURNOFF","CASETYPE","ISPAYMENTSTATUSENABLED","rootUrl","USERID","LOGGEDINUSEREMAIL","ErrorHandlerService","handleError","err","errorMessage","error","Error","message","status","undefined","JSON","parse","statusCode","messsage","stringify","throwError","getServerErrorMessage","isErrorExist","isDataNotExist","title","body","showError","LoggerService","invokeConsoleMethod","PaymentListService","http","logger","errorHandlerService","getPaymentByCcdCaseNumber","paymentMethod","info","get","withCredentials","pipe","catchError","HttpClient","PaymentListComponent","paymentListService","paymentLibComponent","_this","subscribe","payments","loadPaymentViewComponent","paymentReference","create","__values","o","s","Symbol","iterator","m","i","call","value","done","TypeError","WebComponentHttpClient","meta","post","url","options","opts","addHeaders","put","delete","patch","csrfToken","getTag","headers","forEach","element","document","cookie","split","find","row","startsWith","content","HttpHeaders","responseType","Meta","PaymentViewService","https","getPaymentDetails","getPaymentGroupDetails","getApportionPaymentDetails","getPBAaccountDetails","postWays2PayCardPayment","serviceRef","rurl","replace","postPBAaccountPayment","randomKey","Math","random","toString","join","setTimeout","console","log","postBSPayments","postBSUnidentifiedPayments","postBSUnsolicitedPayments","postBSAllocationPayments","postPaymentGroupWithRemissions","feeId","deleteFeeFromPaymentGroup","postPaymentToPayHub","paymentGroupRef","postPaymentAntennaToPayHub","downloadSelectedReport","reportName","startDate","endDate","downloadFailureReport","getBSfeature","getSiteID","getPartyDetails","caseNumber","postRefundsReason","postPaymentGroupWithRetroRemissions","postRefundRetroRemission","getPaymentFailure","NotificationService","getRefundNotification","reference","getAddressByPostcode","postcode","getNotificationPreview","getNotificationInstructionType","paymentChannel","PostRefundRetroRemission","contact_details","fees","payment_reference","refund_reason","total_refund_amount","is_over_payment","PaymentViewComponent","paymentViewService","notificationService","isRefundRemission","isAddFeeBtnEnabled","isIssueRefunfBtnEnable","allowedRolesToAccessRefund","remissions","allPaymentsFailure","isContinueBtnDisabled","selectedOption","dcnNumber","isTurnOff","serviceReference","viewStatus","paymentGroup","fee","isRemissionsMatch","rem","fee_code","code","push","paymentFees","filter","paymentGroupObj","includes","paymentAllocation","payment_allocation","isStatusAllocated","allocation_status","res","payment_failure_list","reverse","payment_failure_initiated","payment_failure_closed","e","errorMsg","defineProperty","method","channel","goToPaymentList","getOverPaymentValue","feesOverPayment","over_payment","goToServiceRequestPage","window","location","reload","goToCaseTransationPage","event","preventDefault","data","resetOrderData","addRemission","chkIsAddRemissionBtnEnable","payment","isFromPaymentDetailPage","checkForFees","processRefund","isConfirmationBtnDisabled","obj","id","version","apportion_amount","calculated_amount","updated_volume","volume","refund_amount","requestBody","contactDetailsObj","response","viewCompStatus","refundReference","refund_reference","refundAmount","gotoAddressPage","note","notification","notification_type","addRefundForRemission","remission","remissionFeeAmt","net_amount","goToPaymentViewComponent","issueRefund","paymentgrp","chkIsIssueRefundBtnEnable","getRemissionByFeeCode","feeCode","remissions_1","remissions_1_1","issue_refund","refund_enable","chkIsAddRefundBtnEnable","add_refund","add_remission","remission_enable","selectPymentOption","paymentType","continuePayment","isFullyRefund","gotoPaymentSelectPage","getContactDetails","notificationPreview","getTemplateInstructionType","goToPaymentFailuePage","selectedPaymentsStatus","goBackToPaymentView","templateInstructionType","showNotificationPreview","hideNotificationPreview","isServiceRequest","RefundsService","getRefundReasons","getRefundRejectReasons","getRefundActions","patchRefundActions","reviewerAction","getRefundList","refundstatus","selfexclusive","getRefundStatusHistory","getRefundStatusList","getUserDetails","postIssueRefund","putResendOrEdit","refundRef","notificationType","patchResubmitRefund","ProcessRefundComponent","formBuilder","router","activeRoute","getErrorMessage","sendmeback","refundActionList","refundRejectReasonList","isSendMeBackClicked","isRejectClicked","isOtherClicked","isSuccesspageEnable","refundActionsHasError","refundRejectReasonHasError","isReasonFieldEmpty","isReasonFieldInvalid","reasonFieldMinHasError","reasonFieldMaxHasError","isReasonEmpty","isReasonInvalid","successMsg","cpoDetails","isConfirmButtondisabled","processRefundForm","group","refundActionField","FormControl","Validators","compose","required","refundRejectReasonField","sendMeBackField","minLength","maxLength","pattern","enterReasonField","refundlistsource","ccd_case_number","isFromRefundListPage","isCPODown","paymentObj","checkRefundActions","getNotificationPreviewObj","notificationPreviewObj","processRefundSubmit","processRefundRequest","resetForm","controls","processFormError","errors","dirty","valid","reason","template_preview","from","from_email_address","from_mail_address","address_line","city","country","county","postal_code","html","template_id","subject","template_type","invalid","minlength","actualLength","maxlength","bodyTxt","loadRefundListPage","navigationpage","isRefundStatusView","loadRefundsHomePage","redirecttoRefundListPage","loadCaseTransactionPage","vals","field","goToCaseReview","navigate","relativeTo","FormBuilder","Router","ActivatedRoute","RefundListComponent","refundService","submittedRefundList","rejectedRefundList","approvalStatus","rejectStatus","isAuthorized","userLst","some","isApproveTableVisible","tableApprovalHeader","tableRejectedHeader","isRejectTableVisible","CardDetailsService","getCardDetails","CardDetailsComponent","cardDetailsService","pageTitle","cardDetails","PageNotFoundComponent","StatusHistoryService","getPaymentStatusesByReference","StatusHistoryComponent","statusHistoryService","statuses","ContactDetailsComponent","assignContactDetails","EventEmitter","assignContactDetailsInFefundsList","redirectToIssueRefund","isEmailSAddressClicked","isShowPickAddress","isPostcodeClicked","isManualAddressClicked","addressPostcodeList","isAddressBoxEmpty","isEmailEmpty","emailHasError","isPostcodeEmpty","postcodeHasError","isaddressLine1Empty","addressLine1HasError","addressLine2HasError","isTownOrCityEmpty","townOrCityHasError","isCountyEmpty","countyHasError","isMPostcodeEmpty","mpostcodeHasError","isCountryEmpty","emailAddressForm","email","postCodeForm","manualAddressForm","addressl1","addressl2","townorcity","mpostcode","addressObj","setEditDetails","isEditOperationInRefundList","setValue","patchValue","selectContactOption","isLinkedClied","finalFormSubmit","emailField","emit","postcodeValidation","fieldCtrls","str","postcodeField","refundsNotification","totalresults","postcodeAddress","addressLine","addressArray","ADDRESS","addressObject","POST_TOWN","LOCAL_CUSTODIAN_CODE_DESCRIPTION","POSTCODE","redirection","val","isEditOperation","Output","PbaDetailsComponent","noop","ConsoleLoggerService","apply","CaseTransactionsService","getPaymentGroups","BulkScaningPaymentService","getBSPaymentsByCCD","getBSPaymentsByDCN","dcn","postBSAllocatePayment","paymentRef","postBSPaymentStrategic","postBSWoPGStrategic","patchBSChangeStatus","calculateOutStandingAmount","feesTotal","paymentsTotal","remissionsTotal","toUpperCase","amount","hwf_amount","removeUnwantedString","input","replaceText","CaseTransactionsComponent","bulkScaningPaymentService","caseTransactionsService","paymentGroups","nonPayments","allPayments","totalPayments","totalRemissions","isExceptionRecord","isUnprocessedRecordSelected","isAnyFeeGroupAvilable","isHistoricGroupAvailable","isRemoveBtnDisabled","clAmountDue","overPaymentAmount","isFeeRecordsExist","isGrpOutstandingAmtPositive","isAddRemissionEnable","orderRemissionDetails","ispaymentGroupApisuccess","isPBA","isAddRemissionBtnEnabled","isRefundRemissionBtnEnable","isEligible4PBAPayment","currentDate","Date","check4AllowedRoles2AccessRefund","role","indexOf","check4AllowedRoles2AccessPBApayment","allowFurtherAccessAfter4Days","tmp4DayAgo","setDate","getDate","date_created","paymentView","payment_group_reference","goToPayementView","excReference","takePayment","serviceRequest","serviceRequestValue","isBulkScanEnable","toLocaleLowerCase","isStrategicFixEnable","calculateAmounts","calculateOrderFeesAmounts","totalRefundAmount","calculateRefundAmount","setDefaults","goToOrderViewDetailSection","checkForExceptionRecord","totalNonOffPayments","totalFees","getAllocationStatus","recordData","exception_record_reference","ccd_reference","case_reference","resetOrderVariables","isFeeOverPaymentExist_1","service_request_status","orderStatus","orderAddBtnEnable","orderRefId","orderTotalFees","orderReferenceObj","x","redirectToOrderFeeSearchPage","orderef","nonOffLinePayment","a","amount_due","b","allocationLen","remisison","totalRefundAmount_1","isFeeAmountZero_1","grpOutstandingAmount","isNewPaymentGroup_1","index","getGroupOutstandingAmount","redirectToFeeSearchPage","navigateByUrl","chkForAddRemission","redirectToremissionPage","redirectToReportsPage","loadFeeSummaryPage","selectedUnprocessedFeeEvent","unprocessedRecordId","getUnprocessedFeeCount","unProcessedRecordCount","unprocessedRecordCount","calculateAmountDue","confirmRemoveFee","cancelRemoval","removeFee","success","isCheckAmountdueExist","amountDue","chkIssueRefundBtnEnable","chkForPBAPayment","_b","_c","chkIsRefundRemissionBtnEnable","loadPBAAccountPage","pbaPayOrderRef","PaymentToPayhubRequest","currency","description","provider","toFixed","case_type","PayhubAntennaRequest","BS_ENABLE_FLAG","FeeSummaryComponent","service","platForm","isBackButtonEnable","isFeeAmountZero","totalAfterRemission","isPaymentExist","isRemissionsExist","bsPaymentDcnNumber","features","result","feature","uid","enable","getUnassignedPaymentlist","getPaymentGroup","unassignedPayments","responsible_service_id","upPaymentErrorMessage","currentFee","outStandingAmount","partUrl","cancelRemission","page","antennaReqBody","href","goToAllocatePage","Location","ErrorBannerComponent","UnidentifiedPaymentsRequest","unidentified_reason","payment_allocation_status","name","AllocatePaymentRequest","unAllocatedPayment","exceptionRecord","allocatedRequest","banked_date","date_banked","exception_record","document_control_number","dcn_reference","external_provider","giro_slip_no","bgc_reference","payer_name","payment_channel","payment_status","payment_method","payment_allocation_dto","MarkUnidentifiedPaymentComponent","isInvesticationDetailEmpty","investicationDetailHasError","investicationDetailMinHasError","investicationDetailMaxHasError","siteID","ccdReference","exceptionReference","getUnassignedPayment","markPaymentUnidentifiedForm","investicationDetail","unassignedRecord","beCcdNumber","beExceptionNumber","trimUnderscore","saveAndContinue","investicationField","formerror","investigationComment","confirmPayments","res1","res2","response2","reqBody","res3","gotoCasetransationPage","user_id","postStrategicBody","cancelMarkUnidentifiedPayments","UnsolicitedPaymentsRequest","responsible_office","responsible_person","email_id","receiving_office","receiving_email_address","sending_email_address","MarkUnsolicitedPaymentComponent","reasonHasError","reasonMinHasError","reasonMaxHasError","responsibleOfficeHasError","isResponsibleOfficeEmpty","isContinueButtondisabled","siteids","siteIDList","scrollTo","markPaymentUnsolicitedForm","responsibleOffice","responsiblePerson","emailId","selectedSiteId","reasonField","officeIdField","cancelMarkUnsolicitedPayments","checkingFormValue","formFields","valueExists","hasOwnProperty","selectchange","target","selectedSiteName","selectedIndex","text","UnprocessedPaymentsComponent","recordId","isRecordExist","isAllocateToExistingFeebtnEnabled","isMarkAsUnidentifiedbtnEnabled","isAllocatedToNewFeebtnEnabled","isExceptionCase","serviceId","unassignedRecordListLength","isStFixEnable","FEE_RECORDS_EXISTS","setValuesForUnassignedRecord","unassignedRecordList","unprocessedPaymentSelectEvent","formatUnassignedRecordId","ID","loadUnsolicitedPage","selectedRecordReference","validateButtons","resetButtons","PAYMENTREF","IS_OS_AMT_AVAILABLE","unprocessedPaymentUnSelectEvent","showDetailRow","unassignedRecordSelectedList","IS_BUTTON_ENABLE","PAYMENTSLENGTH","LEVEL","ProcessedPaymentsComponent","redirectToPaymentViewPage","NONPAYMENTS","IAllocationPaymentsRequest","explanation","userName","user_name","AllocatePaymentsComponent","isMoreDetailsBoxHide","otherPaymentExplanation","paymentReasonHasError","paymentExplanationHasError","isPaymentDetailsEmpty","isPaymentDetailsInvalid","paymentDetailsMinHasError","paymentDetailsMaxHasError","isUserNameEmpty","isUserNameInvalid","paymentReason","paymentExplanation","cookieUserName","userNameField","reasonList","overPayment","hwfReward","wrongFee","notIssueCase","otherDeduction","shortFall","helpWithFee","other","explanationList","referRefund","noRefund","noCase","holdCase","heldCase","refund","duplicate","humanerror","caseWithdrawn","overUnderPaymentForm","moreDetails","fstCon","scndCn","selectedPaymentGroup","gotoSummaryPage","cancelAllocatePayment","confirmAllocatePayement","enCookieUserName","decodeURIComponent","fullName","paymentDetailsField","paymentFormError","isEmptyCondtion","isOtherOptionSelected","isRemainingAmountGtZero","isRemainingAmountLtZero","finalServiceCall","reset","GroupOutstandingAmount","remainingToBeAssigned","paymentSectionLabel","feedbackUrlLabel","remainingAmount","afterFeeAllocateOutstanding","amountForAllocation","selectRadioButton","key","OrderListSelectEvent","AddRemissionRequest","hwf_reference","AddRetroRemissionRequest","PostIssueRefundRetroRemission","remissionReference","contactDeatils","AddRemissionComponent","Promise","resolve","refundListReason","refundListAmount","refundFees","hasErrors","option","selectedValue","retroRemission","isRemissionCodeEmpty","remissionCodeHasError","isAmountEmpty","amountHasError","isRemissionLessThanFeeError","refundHasError","isPaymentSuccess","isRemissionApplied","commonRefundReasons","class","Array","default","pattern1","pattern2","remessionPayment","remissionForm","remissionCode","refundReason","refundDDReason","feeAmount","feesList","array","onlySelf","refundPaymentReference","refundFeesList","refundReasons","recently_used","sort","localeCompare","changeRefundReason","creds","selected","noneSelected","item","querySelectorAll","el","classList","remove","check_en","v1","AppAmt","Volume","ele","getElementById","formArray","checked","at","removeAttribute","setAttribute","resetRemissionForm","remissionctrls","isRemissionLessThanFee","setErrors","confirmRemission","newNetAmount","remissionAmount","trim","LDUrl","routeReuseStrategy","shouldReuseRoute","onSameUrlNavigation","addRemissionCode","isFromCheckAnsPage","gotoAddRetroRemissionCodePage","isFromRefundStatusPage","iscancelClicked","selectedRefundReason","gotoCheckRetroRemissionPage","gotoAmountRetroRemission","gotoProcessRetroRemissionPage","gotoProcessRetroRemission","confirmRetroRemission","remissionamt","remission_reference","gotoIssueRefundConfirmation","reduce","c","displayRefundReason","gotoIssueRefundPage","gotoIssuePage","checkboxs","getElementsByTagName","j","fullRefund","quantity","amountToRefund","apportionAmount","elementId","getErrorClass","quantityUpdated","refundAmtForFeeVolumes","innerText","allowedRefundAmount","calAmtToRefund","amtToRefund","gotoContactDetailsPage","add","changeIssueRefundReason","confirmIssueRefund","map","gotoRefundReasonPage","localStorage","setItem","isRefundReasonsSelected","showReasonText","selectedRefundReasonCode","reasonLength","gotoPartialFeeRefundScreen","gotoServiceRequestPage","sendOrderDetail","sendOrderRef","gotoRemissionSuccess","gotoCasetransationPageCancelBtnClicked","changeRefundAmount","getFormattedCurrency","concat","CcdHyphensPipe","transform","match","Pipe","CapitalizePipe","slice","keyValuePipe","keys","SanitizeHtmlPipe","sanitizer","bypassSecurityTrustHtml","DomSanitizer","XlFileService","exportAsExcelFile","json","excelFileName","worksheet","workbook","XLSX","utils","json_to_sheet","header","setDataLossReportHeaders","autoFitColumns","setUnprocessedReportHeaders","setProcessedUnallocatedReportHeaders","setPaymentFailureReportHeaders","setShortFallReportHeaders","Sheets","SheetNames","excelBuffer","write","bookType","saveAsExcelFile","objectMaxLength","ColWidth","values","width","A1","v","B1","C1","D1","E1","F1","G1","H1","I1","J1","K1","L1","M1","N1","O1","buffer","fileName","Blob","FileSaver","saveAs","ReportsComponent","xlFileService","fmt","loc","isDownLoadButtondisabled","isStartDateLesthanEndDate","isDateBetwnMonth","isDateRangeBetnWeek","fromValidation","getToday","toISOString","getSelectedFromDate","validateDates","reportsForm","selectedStartDate","tranformDate","selectedEndDate","isDateRangeMoreThanWeek","isDateRangeMoreThanMonth","selectedreport","downloadReport","dataLossRptDefault","loss_resp","payment_asset_dcn","env_ref","env_item","resp_service_id","resp_service_name","bgc_batch","unProcessedRptDefault","exception_ref","ccd_ref","processedUnallocated","allocation_reason","ccd_exception_ref","ccd_case_ref","updated_by","shortFallsRptDefault","surplus_shortfall","balance","payment_amount","ccd_case_reference","ccd_exception_reference","processed_date","selectedReportName","applyDateFormat","substr","convertToFloatValue","Op","getFileName","toLowerCase","errorContent","stDt","formatDate","enDt","now","timestamp","getTwodigit","getHours","getMinutes","getSeconds","getCamelCaseString","strDate","parts","multiDateFormater","dateStr","date","amt","Number","parseFloat","TableComponent","cdRef","displayedColumns","STATUS","isApprovalFlow","DATASOURCE","dataSource","MatTableDataSource","actualcount","r","_a","user_full_name","serviceLst","service_type","ngAfterViewInit","paginator","applyFilter","filterValue","goToRefundProcessComponent","refundData","goToRefundViewComponent","isCallFromRefundList","ViewChild","MatPaginator","MatSort","IPutNotificationRequest","contactDetails","recipient_email_address","recipient_postal_address","IResubmitRefundRequest","refund_fees","RefundStatusComponent","refundButtonState","isResendOperationSuccess","isEditDetailsClicked","isEditAddressDeatilsClicked","isRefundBtnDisabled","isLastUpdatedByCurrentUser","isProcessRefund","notificationSentViewIndex","notificationSentView","refundlist","refundStatusForm","getRefundsNotification","getRefundsStatusHistoryList","refund_status","statusHistoryList","refundStatusHistories","status_history_dto_list","last_updated_by_current_user","notificationList","goToRefundView","gotoReviewDetailsPage","gotoReviewAndReSubmitPage","oldRefundReason","changedAmount","refundreason","notes","gotoAmountPage","goToReviewAndSubmitView","getRefundListReason","reason_code","refundCode","getRefundAmount","getRefundFees","fee_id","gotoReviewRefundConfirmationPage","resubmitRequest","gotoEditAddressDetails","addressDetails","getContactDetailsForRefundList","gotoEditDetailsPage","view","submitEditDetail","resendRequest","putResend","gotoRefundViewPageCancelBtnClicked","gotoRefundReviewAndSubmitViewPageCancelBtnClicked","showNotificationSentView","hideNotificationSentView","ServiceRequestComponent","goToServiceRquestComponent","paymentGroupList","goToPaymentViewComp","IserviceRequestCardPayment","language","IserviceRequestPbaPayment","account_number","customer_reference","orgName","organisation_name","PbaPaymentComponent","isPBAAccountHold","isCardPaymentSuccess","isInSufficiantFund","isPBAAccountNotExist","isPBAServerError","isGetPBAAccountSucceed","selectedPbaAccount","pbaAccountRef","isPbaAccountSelected","isCardPaymentSelected","isPBADropdownSelected","isPBAAccountPaymentSuccess","organisationEntityResponse","pbaAccountList","paymentAccount","selectpbaaccount","currentTarget","pbaAccountrPaymentResult","cardPayment","paymentUrl","next_url","selectPaymentMethod","NotificationPreviewRequest","service_name","personalisation","NotificationPreviewComponent","notificationPreviewEvent","today","previewJourney","notificationSent","notficationPreviewRequestBody","PaymentLibModule","NgModule","imports","CommonModule","HttpClientModule","FormsModule","ReactiveFormsModule","MatTableModule","MatPaginatorModule","MatSortModule","MatFormFieldModule","MatInputModule","declarations","exports","providers","provide","useClass"],"sources":["../../../projects/payment-lib/src/lib/payment-lib.service.ts","../../../projects/payment-lib/src/lib/services/orderslist.service.ts","../../../projects/payment-lib/src/lib/payment-lib.component.ts","../../../projects/payment-lib/src/lib/services/shared/error-handler.service.ts","../../../projects/payment-lib/src/lib/services/shared/logger/logger.service.ts","../../../projects/payment-lib/src/lib/services/payment-list/payment-list.service.ts","../../../projects/payment-lib/src/lib/components/payment-list/payment-list.component.ts","../../../node_modules/tslib/tslib.es6.js","../../../projects/payment-lib/src/lib/services/shared/httpclient/webcomponent.http.client.ts","../../../projects/payment-lib/src/lib/services/payment-view/payment-view.service.ts","../../../projects/payment-lib/src/lib/services/notification/notification.service.ts","../../../projects/payment-lib/src/lib/interfaces/PostRefundRetroRemission.ts","../../../projects/payment-lib/src/lib/components/payment-view/payment-view.component.ts","../../../projects/payment-lib/src/lib/services/refunds/refunds.service.ts","../../../projects/payment-lib/src/lib/components/process-refund/process-refund.component.ts","../../../projects/payment-lib/src/lib/components/refund-list/refund-list.component.ts","../../../projects/payment-lib/src/lib/services/card-details/card-details.service.ts","../../../projects/payment-lib/src/lib/components/card-details/card-details.component.ts","../../../projects/payment-lib/src/lib/components/page-not-found.component.ts","../../../projects/payment-lib/src/lib/services/status-history/status-history.service.ts","../../../projects/payment-lib/src/lib/components/status-history/status-history.component.ts","../../../projects/payment-lib/src/lib/components/contact-details/contact-details.component.ts","../../../projects/payment-lib/src/lib/components/pba-details/pba-details.component.ts","../../../projects/payment-lib/src/lib/services/shared/logger/console-logger.service.ts","../../../projects/payment-lib/src/lib/services/case-transactions/case-transactions.service.ts","../../../projects/payment-lib/src/lib/services/bulk-scaning-payment/bulk-scaning-payment.service.ts","../../../projects/payment-lib/src/lib/components/case-transactions/case-transactions.component.ts","../../../projects/payment-lib/src/lib/interfaces/PaymentToPayhubRequest.ts","../../../projects/payment-lib/src/lib/interfaces/PayhubAntennaRequest.ts","../../../projects/payment-lib/src/lib/components/fee-summary/fee-summary.component.ts","../../../projects/payment-lib/src/lib/components/error-banner/error-banner.component.ts","../../../projects/payment-lib/src/lib/interfaces/UnidentifiedPaymentsRequest.ts","../../../projects/payment-lib/src/lib/interfaces/AllocatePaymentRequest.ts","../../../projects/payment-lib/src/lib/components/mark-unidentified-payment/mark-unidentified-payment.component.ts","../../../projects/payment-lib/src/lib/interfaces/UnsolicitedPaymentsRequest.ts","../../../projects/payment-lib/src/lib/components/mark-unsolicited-payment/mark-unsolicited-payment.component.ts","../../../projects/payment-lib/src/lib/components/unprocessed-payments/unprocessed-payments.component.ts","../../../projects/payment-lib/src/lib/components/processed-payments/processed-payments.component.ts","../../../projects/payment-lib/src/lib/interfaces/IAllocationPaymentsRequest.ts","../../../projects/payment-lib/src/lib/components/allocate-payments/allocate-payments.component.ts","../../../projects/payment-lib/src/lib/interfaces/AddRemissionRequest.ts","../../../projects/payment-lib/src/lib/interfaces/AddRetroRemissionRequest.ts","../../../projects/payment-lib/src/lib/interfaces/PostIssueRefundRetroRemission.ts","../../../projects/payment-lib/src/lib/components/add-remission/add-remission.component.ts","../../../projects/payment-lib/src/lib/pipes/ccd-hyphens.pipe.ts","../../../projects/payment-lib/src/lib/pipes/capitalize.pipe.ts","../../../projects/payment-lib/src/lib/pipes/key-value.pipe.ts","../../../projects/payment-lib/src/lib/pipes/sanitize-html.pipe.ts","../../../projects/payment-lib/src/lib/services/xl-file/xl-file.service.ts","../../../projects/payment-lib/src/lib/components/reports/reports.component.ts","../../../projects/payment-lib/src/lib/components/table/table.component.ts","../../../projects/payment-lib/src/lib/interfaces/IPutNotificationRequest.ts","../../../projects/payment-lib/src/lib/interfaces/IResubmitRefundRequest.ts","../../../projects/payment-lib/src/lib/components/refund-status/refund-status.component.ts","../../../projects/payment-lib/src/lib/components/service-request/service-request.component.ts","../../../projects/payment-lib/src/lib/interfaces/IserviceRequestCardPayment.ts","../../../projects/payment-lib/src/lib/interfaces/IserviceRequestPbaPayment.ts","../../../projects/payment-lib/src/lib/components/pba-payment/pba-payment.component.ts","../../../projects/payment-lib/src/lib/interfaces/NotificationPreviewRequest.ts","../../../projects/payment-lib/src/lib/components/notification-preview/notification-preview.component.ts","../../../projects/payment-lib/src/lib/payment-lib.module.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\n\n@Injectable({\n providedIn: 'root'\n})\n\nexport class PaymentLibService {\n API_ROOT: string;\n BULKSCAN_API_ROOT: string;\n REFUNDS_API_ROOT: string;\n NOTIFICATION_API_ROOT: string;\n CARDPAYMENTRETURNURL: string;\n\n constructor() { }\n\n setApiRootUrl(apiRoot: string): void {\n this.API_ROOT = apiRoot;\n }\n\n getApiRootUrl(): string {\n return this.API_ROOT;\n }\n\n setBulkScanApiRootUrl(bulkscanapiRoot: string): void {\n this.BULKSCAN_API_ROOT = bulkscanapiRoot;\n }\n\n getBulkScanApiRootUrl(): string {\n return this.BULKSCAN_API_ROOT;\n }\n\n setRefundndsApiRootUrl(refundsapiRoot: string): void {\n this.REFUNDS_API_ROOT = refundsapiRoot;\n }\n\n getRefundsApiRootUrl(): string {\n return this.REFUNDS_API_ROOT;\n }\n setNoticationApiRootUrl(notificationapiRoot: string): void {\n this.NOTIFICATION_API_ROOT = notificationapiRoot;\n }\n\n getNoticationApiRootUrl(): string {\n return this.NOTIFICATION_API_ROOT;\n }\n setCardPaymentReturnUrl(cardPaymentReturnUrl: string):void {\n this.CARDPAYMENTRETURNURL = cardPaymentReturnUrl;\n }\n getCardPaymentReturnUrl(): string {\n return this.CARDPAYMENTRETURNURL;\n }\n}\n","import { Injectable } from '@angular/core';\nimport { Observable, BehaviorSubject } from 'rxjs';\nimport {IOrderReferenceFee} from '../interfaces/IOrderReferenceFee';\nimport { IRefundList } from '../interfaces/IRefundList';\nimport { IPaymentView } from '../interfaces/IPaymentView'; \n\n@Injectable({\n providedIn: 'root'\n})\nexport class OrderslistService {\n private ordersList: BehaviorSubject<IOrderReferenceFee[]> = new BehaviorSubject<IOrderReferenceFee[]>(null);\n private refundView: BehaviorSubject<IRefundList> = new BehaviorSubject<IRefundList>(null);\n private caseType = new BehaviorSubject(\"\");\n getcaseType = this.caseType.asObservable();\n private feeExists = new BehaviorSubject<boolean>(null);\n getFeeExist = this.feeExists.asObservable();\n private ccdCaseNumber = new BehaviorSubject(\"\");\n getCCDCaseNumberforRefund = this.ccdCaseNumber.asObservable();\n private isFromServiceRequestPage = new BehaviorSubject<boolean>(null);\n getisFromServiceRequestPage = this.isFromServiceRequestPage.asObservable();\n private OrderRefId = new BehaviorSubject(\"\");\n getOrderRefId = this.OrderRefId.asObservable();\n private navigationPage = new BehaviorSubject(\"\");\n getnavigationPage = this.navigationPage.asObservable();\n\n private orderRef = new BehaviorSubject(\"\");\n getorderRef = this.orderRef.asObservable();\n private orderCCDEvent = new BehaviorSubject(\"\");\n getorderCCDEvent = this.caseType.asObservable();\n private orderCreated = new BehaviorSubject<Date>(null);\n getorderCreated = this.orderCreated.asObservable();\n private orderParty = new BehaviorSubject(\"\");\n getorderParty = this.orderParty.asObservable();\n private orderRemissionTotal = new BehaviorSubject<number>(null);\n getorderRemissionTotal = this.orderRemissionTotal.asObservable();\n private orderFeesTotal = new BehaviorSubject<number>(null);\n getorderFeesTotal = this.orderFeesTotal.asObservable();\n private orderTotalPayments = new BehaviorSubject<number>(null);\n getorderTotalPayments = this.orderTotalPayments.asObservable();\n private rolesList: BehaviorSubject<any[]> = new BehaviorSubject<any[]>(null);\n\n private orderDetail: BehaviorSubject<any[]> = new BehaviorSubject<any[]>(null);\n\n private paymentPageView: BehaviorSubject<IPaymentView> = new BehaviorSubject<IPaymentView>(null);\n\n constructor() { }\n\n setOrdersList(orderLevelFees: IOrderReferenceFee[]): void {\n this.ordersList.next(Object.assign([], orderLevelFees));\n }\n getOrdersList() {\n return this.ordersList;\n }\n\n setRefundView(refundList: IRefundList): void {\n this.refundView.next(Object.assign([], refundList));\n }\n getRefundView() {\n return this.refundView;\n }\n\n setCaseType(caseType: string){\n this.caseType.next(caseType);\n }\n getCaseType(){\n return this.caseType;\n }\n\n setCCDCaseNumber(ccdCaseNumber: string){\n this.ccdCaseNumber.next(ccdCaseNumber);\n }\n getCCDCaseNumber(){\n return this.ccdCaseNumber;\n }\n\n setFeeExists(feeExists: boolean){\n this.feeExists.next(feeExists);\n }\n getFeeExists(){\n return this.feeExists;\n } \n\n setisFromServiceRequestPage(isFromServiceRequestPage: boolean){\n this.isFromServiceRequestPage.next(isFromServiceRequestPage);\n }\n getisFromServiceRequestPages(){\n return this.isFromServiceRequestPage;\n }\n\n setOrderRefId(OrderRefId: string){\n this.OrderRefId.next(OrderRefId);\n }\n getSelectedOrderRefId(){\n return this.OrderRefId;\n }\n\n setnavigationPage(navigationPage: string){\n this.navigationPage.next(navigationPage);\n }\n getnavigationPageValue(){\n return this.navigationPage;\n }\n\n setpaymentPageView(paymentpageList: IPaymentView): void {\n this.paymentPageView.next(Object.assign([], paymentpageList));\n }\n getpaymentPageView() {\n return this.paymentPageView;\n }\n\n setUserRolesList(rolesList:any[]): void {\n this.rolesList.next(Object.assign([], rolesList));\n }\n getUserRolesList() {\n return this.rolesList;\n }\n\n setorderDetail(orderDetail:any[]): void {\n this.orderDetail.next(Object.assign([], orderDetail));\n }\n getorderDetail() {\n return this.orderDetail;\n }\n\n setOrderRef(orderRef: string){\n this.orderRef.next(orderRef);\n }\n getorderRefs(){\n return this.orderRef;\n }\n\n setorderCCDEvent(orderCCDEvent: string){\n this.orderCCDEvent.next(orderCCDEvent);\n }\n getorderCCDEvents(){\n return this.orderCCDEvent;\n }\n\n setorderCreated(orderCreated: Date){\n this.orderCreated.next(orderCreated);\n }\n getorderCreateds(){\n return this.orderCreated;\n }\n\n setorderParty(orderParty: string){\n this.orderParty.next(orderParty);\n }\n getorderPartys(){\n return this.orderParty;\n }\n\n setorderRemissionTotal(orderRemissionTotal: number){\n this.orderRemissionTotal.next(orderRemissionTotal);\n }\n getorderRemissionTotals(){\n return this.orderRemissionTotal;\n }\n\n setorderFeesTotal(orderFeesTotal: number){\n this.orderFeesTotal.next(orderFeesTotal);\n }\n getorderFeesTotals(){\n return this.orderFeesTotal;\n }\n\n setorderTotalPayments(orderTotalPayments: number){\n this.orderTotalPayments.next(orderTotalPayments);\n }\n getoorderTotalPaymentss(){\n return this.orderTotalPayments;\n }\n}\n","import { ChangeDetectorRef, Component, Input, OnInit } from '@angular/core';\nimport { PaymentLibService } from './payment-lib.service';\nimport { IBSPayments } from './interfaces/IBSPayments';\nimport { OrderslistService } from './services/orderslist.service';\nimport { IPayment } from './interfaces/IPayment';\n\n@Component({\n selector: 'ccpay-payment-lib',\n template: `\n <ccpay-refund-list [USERID]=\"USERID\" [LOGGEDINUSERROLES]=\"LOGGEDINUSERROLES\" [LOGGEDINUSEREMAIL]=\"LOGGEDINUSEREMAIL\" *ngIf=\"viewName === 'refund-list'\"></ccpay-refund-list>\n <ccpay-payment-list *ngIf=\"viewName === 'payment-list'\"></ccpay-payment-list>\n <ccpay-refund-status\n [LOGGEDINUSERROLES]=\"LOGGEDINUSERROLES\"\n [API_ROOT]=\"API_ROOT\"\n *ngIf=\"viewName === 'refundstatuslist'\"> </ccpay-refund-status >\n <ccpay-payment-view [LOGGEDINUSERROLES]=\"LOGGEDINUSERROLES\" *ngIf=\"viewName === 'payment-view'\"\n [isTurnOff]=\"ISTURNOFF\" [isTakePayment]=\"TAKEPAYMENT\" [caseType]=\"CASETYPE\"\n [ISPAYMENTSTATUSENABLED] = \"ISPAYMENTSTATUSENABLED\"\n ></ccpay-payment-view>\n\n <ccpay-process-refund *ngIf=\"viewName === 'process-refund'\"\n [refundReference]=\"refundReference\"\n [refundlistsource]=\"refundlistsource\"\n ></ccpay-process-refund>\n <ccpay-pba-payment *ngIf=\"viewName === 'pba-payment'\"\n [pbaPayOrderRef]=\"pbaPayOrderRef\"\n ></ccpay-pba-payment>\n <ccpay-case-transactions [isTakePayment]=\"isTakePayment\" [isFromServiceRequestPage]=\"isFromServiceRequestPage\" [LOGGEDINUSERROLES]=\"LOGGEDINUSERROLES\" *ngIf=\"viewName === 'case-transactions'\"></ccpay-case-transactions>\n <app-mark-unidentified-payment *ngIf=\"viewName === 'unidentifiedPage'\"\n [caseType]=\"CASETYPE\"></app-mark-unidentified-payment>\n <app-mark-unsolicited-payment *ngIf=\"viewName === 'unsolicitedPage'\"\n [caseType]=\"CASETYPE\"></app-mark-unsolicited-payment>\n <app-allocate-payments *ngIf=\"viewName === 'allocate-payments'\"\n [isTurnOff]=\"ISTURNOFF\"\n [caseType]=\"CASETYPE\"\n ></app-allocate-payments>\n <ccpay-fee-summary *ngIf=\"viewName === 'fee-summary'\"\n [ccdCaseNumber]=\"CCD_CASE_NUMBER\"\n [paymentGroupRef]=\"paymentGroupReference\"\n [isTurnOff]=\"ISTURNOFF\"\n [caseType]=\"CASETYPE\"\n ></ccpay-fee-summary>\n <ccpay-reports *ngIf=\"viewName === 'reports'\"\n [ISPAYMENTSTATUSENABLED] = \"ISPAYMENTSTATUSENABLED\"\n ></ccpay-reports>\n `\n})\n\nexport class PaymentLibComponent implements OnInit {\n @Input('API_ROOT') API_ROOT: string;\n @Input('BULKSCAN_API_ROOT') BULKSCAN_API_ROOT: string;\n @Input('REFUNDS_API_ROOT') REFUNDS_API_ROOT: string;\n @Input('NOTIFICATION_API_ROOT') NOTIFICATION_API_ROOT: string;\n @Input('CARDPAYMENTRETURNURL') CARDPAYMENTRETURNURL: string;\n @Input('CCD_CASE_NUMBER') CCD_CASE_NUMBER: string;\n @Input('EXC_REFERENCE') EXC_REFERENCE: string;\n @Input('PAYMENT_METHOD') PAYMENT_METHOD: string;\n @Input('VIEW') VIEW: string;\n @Input('VIEWSERVICE') VIEWSERVICE: string;\n @Input('PAYMENT_GROUP_REF') PAYMENT_GROUP_REF?: string;\n @Input('TAKEPAYMENT') TAKEPAYMENT: boolean;\n @Input('SERVICEREQUEST') SERVICEREQUEST: string;\n @Input('DCN_NUMBER') DCN_NUMBER: string;\n @Input('SELECTED_OPTION') SELECTED_OPTION: string;\n @Input('ISBSENABLE') ISBSENABLE: Boolean;\n @Input('ISSFENABLE') ISSFENABLE: boolean;\n @Input('ISTURNOFF') ISTURNOFF: boolean;\n @Input('CASETYPE') CASETYPE: string;\n @Input('ISPAYMENTSTATUSENABLED') ISPAYMENTSTATUSENABLED: boolean;\n @Input('rootUrl') rootUrl: boolean;\n @Input('REFUNDLIST') REFUNDLIST: string;\n @Input('USERID') USERID: string;\n @Input('LOGGEDINUSERROLES') LOGGEDINUSERROLES: any[];\n @Input('LOGGEDINUSEREMAIL') LOGGEDINUSEREMAIL: string;\n @Input('isFromServiceRequestPage') isFromServiceRequestPage: boolean;\n\n paymentMethod: string;\n bspaymentdcn: string;\n unProcessedPaymentServiceId: string = null;\n paymentGroupReference: string;\n paymentReference: string;\n refundReference: string;\n isFromPayBubble: boolean = false;\n refundlistsource: any;\n viewName: string;\n isTurnOff: boolean;\n caseType: string;\n unProcessedPayment: IBSPayments = null;\n isRefundStatusView: boolean;\n isRedirectFromCaseTransactionPage: string;\n isCallFromRefundList: boolean;\n isFromRefundStatusPage: boolean;\n iscancelClicked : boolean;\n isFromPaymentDetailPage: boolean;\n pbaPayOrderRef: IPayment;\n isTakePayment: boolean;\n\n orderDetail: any[];\n orderRef: string;\n orderStatus: string;\n orderParty: string;\n orderCreated: Date;\n orderCCDEvent: string;\n serviceRequestValue: string;\n orderAddBtnEnable: boolean;\n orderFeesTotal: number = 0.00;\n orderRemissionTotal: number = 0.00;\n orderTotalPayments: number = 0.00;\n orderPendingPayments: number = 0.00;\n\n constructor(private paymentLibService: PaymentLibService,\n private cd: ChangeDetectorRef,\n private OrderslistService: OrderslistService) { }\n ngAfterContentChecked(): void {\n this.cd.detectChanges();\n }\n\n\n ngOnInit() {\n\n this.paymentLibService.setApiRootUrl(this.API_ROOT);\n this.paymentLibService.setBulkScanApiRootUrl(this.BULKSCAN_API_ROOT);\n this.paymentLibService.setRefundndsApiRootUrl(this.REFUNDS_API_ROOT);\n this.paymentLibService.setNoticationApiRootUrl(this.NOTIFICATION_API_ROOT);\n this.paymentLibService.setCardPaymentReturnUrl(this.CARDPAYMENTRETURNURL);\n\n if(this.LOGGEDINUSERROLES.length > 0) {\n this.OrderslistService.setUserRolesList(this.LOGGEDINUSERROLES);\n }\n if (this.PAYMENT_GROUP_REF) {\n this.paymentGroupReference = this.PAYMENT_GROUP_REF;\n }\n if (this.DCN_NUMBER) {\n this.bspaymentdcn = this.DCN_NUMBER;\n }\n if (this.REFUNDLIST === \"true\") {\n this.VIEW = 'refund-list';\n this.viewName = this.VIEW;\n }\n if (this.VIEW === 'fee-summary') {\n this.viewName = 'fee-summary';\n } else if (this.VIEW !== 'reports' && this.VIEW !== 'refund-list') {\n this.viewName = 'case-transactions';\n } else {\n this.viewName = this.VIEW;\n }\n\n if (this.isTakePayment) {\n this.TAKEPAYMENT = true;\n }\n if(this.API_ROOT == 'api/payment-history') {\n this.isFromPayBubble = true;\n }\n }\n}\n","import { Injectable } from '@angular/core';\nimport { HttpErrorResponse } from '@angular/common/http';\nimport { Observable, throwError } from 'rxjs';\n\n@Injectable({\n providedIn: 'root'\n})\n\n\nexport class ErrorHandlerService {\n\n constructor() { }\n\n\n handleError(err: HttpErrorResponse): Observable<any> {\n let errorMessage: string;\n if (err.error instanceof Error) {\n // A client-side or network error occurred.\n errorMessage = `An error occurred: ${err.error.message}`;\n } else {\n // The backend returned an unsuccessful response code.\n if (err.status === 404) {\n\n if (typeof err.error === 'string' && err.error !== undefined) {\n\n if(err.error.length > 60) {\n if (JSON.parse(err.error).statusCode !== undefined && JSON.parse(err.error).statusCode === 500)\n {\n errorMessage = 'Internal server error';\n } else {\n if(err.error.length > 60) {\n errorMessage = JSON.parse(err.error).error;\n } else {\n errorMessage = err.error;\n }\n\n }\n } else {\n errorMessage = err.error;\n }\n } else {\n errorMessage = JSON.parse(err.error).error;\n }\n\n }\n else if (err.status === 500) {\n errorMessage = 'Internal server error';\n } else if (err.error.messsage === undefined) {\n if( typeof err.error === 'object') {\n errorMessage = JSON.parse(JSON.stringify(err.error)).error;\n } else {\n if (typeof err.error === 'string' && err.error !== undefined) {\n\n if(err.error.length > 60) {\n if (JSON.parse(err.error).statusCode !== undefined && JSON.parse(err.error).statusCode === 500)\n {\n errorMessage = 'Internal server error';\n } else {\n if(err.error.length > 60) {\n errorMessage = JSON.parse(err.error).error;\n } else {\n errorMessage = err.error;\n }\n\n }\n } else {\n errorMessage = err.error;\n }\n } else {\n errorMessage = JSON.parse(err.error).error;\n }\n\n }\n\n } else {\n if (err.error.message !== undefined) {\n errorMessage = `${err.error.message}`;\n } else {\n errorMessage = `${err.error}`;\n }\n\n }\n }\n return throwError(errorMessage);\n }\n\n\n getServerErrorMessage(isErrorExist, isDataNotExist = false, error='') {\n const bodyContent = isDataNotExist ? error : 'Try again later';\n return {\n title: \"There is a problem with the service\",\n body: bodyContent,\n showError: isErrorExist\n };\n }\n}\n","import { Injectable } from '@angular/core';\n\nconst noop = (): any => undefined;\n\nexport abstract class Logger {\n\n info: any;\n warn: any;\n error: any;\n}\n\n@Injectable({\n providedIn: 'root'\n})\nexport class LoggerService implements Logger {\n\n info: any;\n warn: any;\n error: any;\n\n invokeConsoleMethod(type: string, args?: any): void {}\n}\n","import { Injectable } from '@angular/core';\nimport { HttpClient } from '@angular/common/http';\n\nimport { Observable } from 'rxjs/internal/Observable';\nimport {PaymentLibService} from '../../payment-lib.service';\nimport { IPayments } from '../../interfaces/IPayments';\nimport { catchError } from 'rxjs/operators';\nimport { ErrorHandlerService } from '../shared/error-handler.service';\nimport { LoggerService } from '../shared/logger/logger.service';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class PaymentListService {\n payments: IPayments;\n\n constructor(private http: HttpClient,\n private logger: LoggerService,\n private errorHandlerService: ErrorHandlerService,\n private paymentLibService: PaymentLibService) { }\n\n\n getPaymentByCcdCaseNumber(ccdCaseNumber: string, paymentMethod: string): Observable<IPayments> {\n this.logger.info('Payment-list-service getPaymentByCcdCaseNumber for: ', ccdCaseNumber);\n\n return this.http.get<IPayments>(`${this.paymentLibService.API_ROOT}/cases/${ccdCaseNumber}/payments`, {\n withCredentials: true\n })\n .pipe(\n catchError(this.errorHandlerService.handleError)\n );\n }\n}\n","import {Component, OnInit} from '@angular/core';\n\nimport {PaymentListService} from '../../services/payment-list/payment-list.service';\nimport {IPayments} from '../../interfaces/IPayments';\nimport {PaymentLibComponent} from '../../payment-lib.component';\nimport {IStatusHistory} from '../../interfaces/IStatusHistory';\n\n@Component({\n selector: 'ccpay-payment-list',\n templateUrl: './payment-list.component.html',\n styleUrls: ['./payment-list.component.css']\n})\nexport class PaymentListComponent implements OnInit {\n payments: IPayments;\n errorMessage: string;\n code: string;\n\n constructor(private paymentListService: PaymentListService,\n private paymentLibComponent: PaymentLibComponent) {\n }\n\n ngOnInit() {\n this.paymentListService.getPaymentByCcdCaseNumber(this.paymentLibComponent.CCD_CASE_NUMBER, this.paymentLibComponent.PAYMENT_METHOD)\n .subscribe(\n payments => this.payments = payments,\n (error: any) => this.errorMessage = <any>error\n );\n }\n\n loadPaymentViewComponent(paymentGroupReference: string, paymentReference: string, paymentMethod: string) {\n this.paymentLibComponent.paymentMethod = paymentMethod;\n this.paymentLibComponent.paymentGroupReference = paymentGroupReference;\n this.paymentLibComponent.paymentReference = paymentReference;\n this.paymentLibComponent.viewName = 'payment-view';\n }\n}\n","/******************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n if (typeof b !== \"function\" && b !== null)\r\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (_) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n var desc = Object.getOwnPropertyDescriptor(m, k);\r\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\r\n desc = { enumerable: true, get: function() { return m[k]; } };\r\n }\r\n Object.defineProperty(o, k2, desc);\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n});\r\n\r\nexport function __exportStar(m, o) {\r\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\r\n}\r\n\r\nexport function __values(o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n}\r\n\r\nexport function __spreadArray(to, from, pack) {\r\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\r\n if (ar || !(i in from)) {\r\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\r\n ar[i] = from[i];\r\n }\r\n }\r\n return to.concat(ar || Array.prototype.slice.call(from));\r\n}\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === \"return\" } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nvar __setModuleDefault = Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\r\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\r\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\r\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\r\n}\r\n\r\nexport function __classPrivateFieldIn(state, receiver) {\r\n if (receiver === null || (typeof receiver !== \"object\" && typeof receiver !== \"function\")) throw new TypeError(\"Cannot use 'in' operator on non-object\");\r\n return typeof state === \"function\" ? receiver === state : state.has(receiver);\r\n}\r\n","import { Injectable } from '@angular/core';\nimport { HttpClient, HttpHeaders } from '@angular/common/http';\nimport { Meta } from '@angular/platform-browser';\nimport { Observable } from 'rxjs';\n\n@Injectable()\nexport class WebComponentHttpClient {\n constructor(\n private http: HttpClient,\n private meta: Meta\n ) { }\n\n post(url: string, body: any | null, options?: any): Observable<any> {\n const opts = this.addHeaders(options || {});\n return this.http.post(url, body, opts);\n }\n\n put(url: string, body: any | null, options?: any): Observable<any> {\n const opts = this.addHeaders(options || {});\n return this.http.put(url, body, opts);\n }\n\n get(url: string, options?: any): Observable<any> {\n const opts = this.addHeaders(options || {});\n return this.http.get(url, opts);\n }\n\n delete(url: string, options?: any): Observable<any> {\n const opts = this.addHeaders(options || {});\n return this.http.delete(url, opts);\n }\n \n patch(url: string, body: any | null, options?: any): Observable<any> {\n const opts = this.addHeaders(options || {});\n return this.http.patch(url, body, opts);\n }\n\n addHeaders(options: any): any {\n const csrfToken = this.meta.getTag('name=csrf-token');\n const headers = {};\n \n if (options.headers) {\n options.headers.forEach(element => {\n headers[element] = options.headers.get(element);\n });\n }\n headers['X-Requested-With'] = 'XMLHttpRequest';\n if (csrfToken === null) {\n if( document.cookie.split(';').find(row => row.startsWith('XSRF-TOKEN')) !== undefined ) {\n headers['CSRF-Token'] = document.cookie.split(';').find(row => row.startsWith('XSRF-TOKEN')).split('=')[1]; \n } else {\n headers['CSRF-Token'] = document.cookie.split(';').find(row => row.startsWith(' XSRF-TOKEN')).split('=')[1];\n }\n \n } else {\n headers['CSRF-Token'] = csrfToken.content;\n }\n options.headers = new HttpHeaders(headers);\n options.responseType = 'text';\n return options;\n }\n}\n","import { Injectable } from '@angular/core';\nimport { HttpClient, HttpHeaders } from '@angular/common/http';\nimport { Observable } from 'rxjs/internal/Observable';\nimport { v4 as uuidv4 } from 'uuid';\nimport {IPayment} from '../../interfaces/IPayment';\nimport {PaymentLibService} from '../../payment-lib.service';\nimport { WebComponentHttpClient } from '../shared/httpclient/webcomponent.http.client';\nimport { ErrorHandlerService } from '../shared/error-handler.service';\nimport { catchError } from 'rxjs/operators';\nimport { LoggerService } from '../shared/logger/logger.service';\nimport {IPaymentGroup} from '../../interfaces/IPaymentGroup';\nimport { AddRemissionRequest } from '../../interfaces/AddRemissionRequest';\nimport { PaymentToPayhubRequest } from '../../interfaces/PaymentToPayhubRequest';\nimport { PayhubAntennaRequest } from '../../interfaces/PayhubAntennaRequest';\nimport { UnidentifiedPaymentsRequest } from '../../interfaces/UnidentifiedPaymentsRequest';\nimport { UnsolicitedPaymentsRequest } from '../../interfaces/UnsolicitedPaymentsRequest';\nimport { Meta } from '@angular/platform-browser';\nimport { AllocatePaymentRequest } from '../../interfaces/AllocatePaymentRequest';\nimport { IAllocationPaymentsRequest } from '../../interfaces/IAllocationPaymentsRequest';\nimport {IOrderReferenceFee} from '../../interfaces/IOrderReferenceFee';\nimport { BehaviorSubject } from 'rxjs';\nimport { IserviceRequestPbaPayment } from '../../interfaces/IserviceRequestPbaPayment';\nimport { IserviceRequestCardPayment } from '../../interfaces/IserviceRequestCardPayment';\nimport { RefundsRequest } from '../../interfaces/RefundsRequest';\nimport { AddRetroRemissionRequest } from '../../interfaces/AddRetroRemissionRequest';\nimport { PostRefundRetroRemission } from '../../interfaces/PostRefundRetroRemission';\nimport { PostIssueRefundRetroRemission } from '../../interfaces/PostIssueRefundRetroRemission';\nimport { error } from '@angular/compiler/src/util';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class PaymentViewService {\n private ordersList = <BehaviorSubject<IOrderReferenceFee[]>>new BehaviorSubject([]);\n\n private meta: Meta;\n\n\n constructor(private http: HttpClient,\n private https: WebComponentHttpClient,\n private logger: LoggerService,\n private errorHandlerService: ErrorHandlerService,\n private paymentLibService: PaymentLibService) { }\n\n getPaymentDetails(paymentReference: string, paymentMethod?: string): Observable<IPayment> {\n\n\n this.logger.info('Payment-view-service getPaymentDetails for: ', paymentReference);\n\n if(paymentMethod == undefined || paymentMethod == null){\n return this.http.get<IPayment>(`${this.paymentLibService.API_ROOT}/payments/${paymentReference}`, {\n withCredentials: true\n })\n .pipe(\n catchError(this.errorHandlerService.handleError)\n );\n }else{\n return this.http.get<IPayment>(paymentMethod === 'card' || paymentMethod === 'cash' || paymentMethod === 'cheque' || paymentMethod === 'postal order' ?\n `${this.paymentLibService.API_ROOT}/card-payments/${paymentReference}` :\n `${this.paymentLibService.API_ROOT}/credit-account-payments/${paymentReference}`, {\n withCredentials: true\n })\n .pipe(\n catchError(this.errorHandlerService.handleError)\n );\n\n }\n }\n\n getPaymentGroupDetails(paymentGroupReference: string): Observable<IPaymentGroup> {\n this.logger.info('Payment-view-service getPaymentGroupDetails for: ', paymentGroupReference);\n\n return this.http.get<IPayment>(`${this.paymentLibService.API_ROOT}/payment-groups/${paymentGroupReference}`, {\n withCredentials: true\n })\n .pipe(\n catchError(this.errorHandlerService.handleError)\n );\n }\n getApportionPaymentDetails(paymentReference: string): Observable<IPaymentGroup> {\n this.logger.info('Payment-view-service getPaymentGroupDetails for: ', paymentReference);\n\n return this.http.get<IPayment>(`${this.paymentLibService.API_ROOT}/payment-groups/fee-pay-apportion/${paymentReference}`, {\n withCredentials: true\n })\n .pipe(\n catchError(this.errorHandlerService.handleError)\n );\n }\n getPBAaccountDetails(): Observable<any> {\n const url = `${this.paymentLibService.API_ROOT}/pba-accounts`;\n return this.http.get(url, { withCredentials: true }).pipe(\n catchError(this.errorHandlerService.handleError)\n );\n }\n\n postWays2PayCardPayment(serviceRef: string, body: IserviceRequestCardPayment): Observable<any> {\n const url = `${this.paymentLibService.API_ROOT}/service-request/${serviceRef}/card-payments`;\n const rurl = this.paymentLibService.CARDPAYMENTRETURNURL.replace('.prod', '');\n body['return-url'] = `${rurl}/payment`;\n return this.https.post(url, body).pipe(\n catchError(this.errorHandlerService.handleError)\n );\n }\n \n postPBAaccountPayment(serviceRef: string, body: IserviceRequestPbaPayment): Observable<any> {\n let randomKey = 'idam-key-' + Math.random().toString().split('.').join('-');\n body['idempotency_key'] = randomKey;\n const url = `${this.paymentLibService.API_ROOT}/service-request/${serviceRef}/pba-payments`;\n setTimeout(() => {\n console.log('Good Night!');\n }, 4000);\n return this.https.post(url, body);\n }\n\n postBSPayments(body: AllocatePaymentRequest): Observable<any> {\n return this.https.post(`${this.paymentLibService.API_ROOT}/payment-groups/bulk-scan-payments`, body).pipe(\n catchError(this.errorHandlerService.handleError)\n );\n }\n postBSUnidentifiedPayments(body: UnidentifiedPaymentsRequest): Observable<any> {\n return this.https.post(`${this.paymentLibService.API_ROOT}/payment-allocations`, body).pipe(\n catchError(this.errorHandlerService.handleError)\n );\n }\n postBSUnsolicitedPayments(body: UnsolicitedPaymentsRequest): Observable<any> {\n return this.https.post(`${this.paymentLibService.API_ROOT}/payment-allocations`, body).pipe(\n catchError(this.errorHandlerService.handleError)\n );\n }\n postBSAllocationPayments(body: IAllocationPaymentsRequest): Observable<any> {\n return this.https.post(`${this.paymentLibService.API_ROOT}/payment-allocations`, body).pipe(\n catchError(this.errorHandlerService.handleError)\n );\n }\n\n postPaymentGroupWithRemissions(paymentGroupReference: string, feeId: number, body: AddRemissionRequest): Observable<any> {\n return this.https.post(`${this.paymentLibService.API_ROOT}/payment-groups/${paymentGroupReference}/fees/${feeId}/remissions`, body).pipe(\n catchError(this.errorHandlerService.handleError)\n );\n }\n\n deleteFeeFromPaymentGroup(feeId: number): Observable<any> {\n this.logger.info('Payment-view-service deleteFeeFromPaymentGroup for: ', feeId);\n return this.https.delete(`${this.paymentLibService.API_ROOT}/fees/${feeId}`).pipe(\n catchError(this.errorHandlerService.handleError)\n );\n }\n postPaymentToPayHub(body: PaymentToPayhubRequest, paymentGroupRef: string): Observable<any> {\n return this.https.post(`${this.paymentLibService.API_ROOT}/payment-groups/${paymentGroupRef}/card-payments`, body).pipe(\n catchError(this.errorHandlerService.handleError)\n );\n }\n\n postPaymentAntennaToPayHub(body: PayhubAntennaRequest, paymentGroupRef: string): Observable<any> {\n return this.https.post(`${this.paymentLibService.API_ROOT}/payment-groups/${paymentGroupRef}/telephony-card-payments`, body).pipe(\n catchError(this.errorHandlerService.handleError)\n );\n }\n downloadSelectedReport(reportName: string, startDate: string, endDate:string): Observable<any> {\n const url = `${this.paymentLibService.API_ROOT}/report/data?date_from=${startDate}&date_to=${endDate}&report_type=${reportName}`;\n return this.https.get(url, { withCredentials: true }).pipe( catchError(this.errorHandlerService.handleError));\n }\n downloadFailureReport(startDate: string, endDate:string): Observable<any> {\n const url = `${this.paymentLibService.API_ROOT}/payment-failures/failure-report?date_from=${startDate}&date_to=${endDate}`;\n return this.https.get(url, { withCredentials: true }).pipe( catchError(this.errorHandlerService.handleError));\n }\n getBSfeature(): Observable<any> {\n return this.https.get('api/payment-history/bulk-scan-feature', { withCredentials: true }).pipe( catchError(this.errorHandlerService.handleError));\n }\n getSiteID(): Observable<any> {\n return this.https.get('api/payment-history/refdata/legacy-sites', { withCredentials: true }).pipe( catchError(this.errorHandlerService.handleError));\n }\n getPartyDetails(caseNumber: string): Observable<any> {\n const url = `${this.paymentLibService.API_ROOT}/case-payment-orders?case_ids=${caseNumber}`;\n return this.https.get(url, { withCredentials: true }).pipe( catchError(this.errorHandlerService.handleError));\n }\n \n setOrdersList(orderLevelFees: IOrderReferenceFee[]): void {\n this.ordersList.next(Object.assign([], orderLevelFees));\n}\n getOrdersList() {\n return this.ordersList;\n }\n\n //issue refund\n postRefundsReason(body: PostRefundRetroRemission): Observable<any> {\n return this.https.post(`${this.paymentLibService.API_ROOT}/refund-for-payment`, body).pipe(\n catchError(this.errorHandlerService.handleError)\n );\n }\n\n // retro remissions\n postPaymentGroupWithRetroRemissions(paymentGroupReference: string, feeId: number, body: AddRetroRemissionRequest): Observable<any> {\n return this.https.post(`${this.paymentLibService.API_ROOT}/payment-groups/${paymentGroupReference}/fees/${feeId}/retro-remission`, body).pipe(\n catchError(this.errorHandlerService.handleError)\n );\n }\n\n postRefundRetroRemission(body:PostIssueRefundRetroRemission) {\n return this.https.post(`${this.paymentLibService.API_ROOT}/refund-retro-remission`, body).pipe(\n catchError(this.errorHandlerService.handleError)\n );\n }\n getPaymentFailure(paymentReference: string): Observable<any> {\n return this.https.get(`${this.paymentLibService.API_ROOT}/payment-failures/${paymentReference}`, {\n withCredentials: true\n }).pipe(\n catchError(this.errorHandlerService.handleError)\n );\n }\n}\n","import { Injectable } from '@angular/core';\nimport {HttpClient} from '@angular/common/http';\nimport {ErrorHandlerService} from '../shared/error-handler.service';\nimport { WebComponentHttpClient } from '../shared/httpclient/webcomponent.http.client';\nimport {PaymentLibService} from '../../payment-lib.service';\nimport {Observable} from 'rxjs/Observable';\nimport {catchError} from 'rxjs/operators';\nimport { IRefundsNotifications } from '../../interfaces/IRefundsNotifications';\nimport { NotificationPreviewRequest } from '../../interfaces/NotificationPreviewRequest';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class NotificationService {\n\n constructor(private http: HttpClient,\n private https: WebComponentHttpClient,\n private errorHandlerService: ErrorHandlerService,\n private paymentLibService: PaymentLibService\n ) { }\n\n getRefundNotification(reference: string): Observable<IRefundsNotifications> {\n return this.http.get<IRefundsNotifications>(`${this.paymentLibService.NOTIFICATION_API_ROOT}/${reference}`, {\n withCredentials: true\n })\n .pipe(\n catchError(this.errorHandlerService.handleError)\n );\n }\n\n getAddressByPostcode(postcode: string): Observable<any> {\n return this.http.get<any>(`${this.paymentLibService.NOTIFICATION_API_ROOT}/postcode-lookup/${postcode}`, {\n withCredentials: true\n })\n .pipe(\n catchError(this.errorHandlerService.handleError)\n );\n }\n\n getNotificationPreview(body: NotificationPreviewRequest): Observable<any> {\n return this.https.post(`${this.paymentLibService.NOTIFICATION_API_ROOT}/doc-preview`, body).pipe(\n catchError(this.errorHandlerService.handleError));\n }\n\n getNotificationInstructionType(paymentChannel: string, paymentMethod: string): any {\n if (paymentChannel === 'bulk scan' && paymentMethod === 'postal order') {\n return 'RefundWhenContacted';\n } else if (paymentChannel === 'bulk scan' && paymentMethod === 'cash') {\n return 'RefundWhenContacted';\n } else if (paymentChannel === 'online' && paymentMethod === 'card') {\n return 'SendRefund';\n } else if (paymentChannel === 'telephony' && paymentMethod === 'card') {\n return 'SendRefund';\n } else if (paymentChannel === 'online' && paymentMethod === 'payment by account') {\n return 'SendRefund';\n } else if (paymentChannel === 'bulk scan' && paymentMethod === 'cheque') {\n return 'SendRefund';\n }else {\n return 'Template'\n }\n }\n\n}\n","import { IFee } from \"./IFee\";\nimport { IRefundContactDetails } from \"./IRefundContactDetails\";\n\nexport class PostRefundRetroRemission {\n ccd_case_number: string;\n payment_reference: string;\n refund_reason: string;\n total_refund_amount: any;\n fees: any[];\n is_over_payment: boolean;\n contact_details: IRefundContactDetails\n \n constructor(contact_details:any,fees: any[], payment_reference : string,refund_reason:string, total_refund_amount : any, is_over_payment: string ) {\n this.contact_details = contact_details;\n this.fees = fees;\n this.payment_reference= payment_reference;\n this.refund_reason = refund_reason;\n\t this.total_refund_amount = total_refund_amount;\n this.is_over_payment = is_over_payment === 'op';\n } \n}","import { Component, OnInit, Input } from '@angular/core';\nimport { PaymentViewService } from '../../services/payment-view/payment-view.service';\nimport { NotificationService } from '../../services/notification/notification.service';\nimport { PaymentLibComponent } from '../../payment-lib.component';\nimport { IPaymentGroup } from '../../interfaces/IPaymentGroup';\nimport { IFee } from '../../interfaces/IFee';\nimport { IPayment } from '../../interfaces/IPayment';\nimport { IRemission } from '../../interfaces/IRemission';\nimport { PostRefundRetroRemission } from '../../interfaces/PostRefundRetroRemission';\nconst BS_ENABLE_FLAG = 'bulk-scan-enabling-fe';\nimport { ChangeDetectorRef } from '@angular/core';\nimport { IPaymentFailure } from '../../interfaces/IPaymentFailure';\nimport { OrderslistService } from '../../services/orderslist.service';\nimport { IRefundContactDetails } from '../../interfaces/IRefundContactDetails';\n\n@Component({\n selector: 'ccpay-payment-view',\n templateUrl: './payment-view.component.html',\n styleUrls: ['./payment-view.component.scss']\n})\n\nexport class PaymentViewComponent implements OnInit {\n @Input() isTurnOff: boolean;\n @Input() isTakePayment: boolean;\n @Input() caseType: boolean;\n @Input() orderRef: string;\n @Input() orderStatus: string;\n @Input() orderTotalPayments: number;\n @Input() payment: IPayment;\n @Input() LOGGEDINUSERROLES: string[];\n @Input() ISPAYMENTSTATUSENABLED: string;\n @Input() orderParty: string;\n @Input() orderCreated: Date;\n @Input() orderCCDEvent: string;\n @Input() orderFeesTotal: number;\n @Input() orderRemissionTotal: number;\n @Input() orderDetail: any[];\n fees: any;\n isFullyRefund: boolean;\n @Input(\"isServiceRequest\") isServiceRequest: string;\n errorMsg: string;\n paymentGroup: IPaymentGroup;\n errorMessage: string;\n ccdCaseNumber: string;\n selectedOption: string;\n dcnNumber: string;\n isStatusAllocated: boolean;\n isRemissionsMatch: boolean;\n feeId: IFee;\n viewStatus: string;\n isRefundRemission: boolean = false;\n isStrategicFixEnable: boolean;\n isAddFeeBtnEnabled: boolean = false;\n isIssueRefunfBtnEnable: boolean = false;\n allowedRolesToAccessRefund = ['payments-refund-approver', 'payments-refund'];\n remissions: IRemission[] = [];\n allPaymentsFailure: IPaymentFailure[] = [];\n selectedPaymentsStatus: IPaymentFailure;\n remissionFeeAmt: number;\n isRefundRemissionBtnEnable: boolean;\n serviceReference: string;\n isFromServiceRequestPage: boolean;\n isFromPaymentDetailPage: boolean;\n paymentFees: IFee[];\n paymentType: string;\n isContinueBtnDisabled: boolean = true;\n viewCompStatus: string;\n contactDetailsObj: IRefundContactDetails\n notification: any;\n isConfirmationBtnDisabled: boolean;\n refundReference: string;\n refundAmount: string;\n templateInstructionType: string;\n notificationPreview: boolean;\n constructor(private paymentViewService: PaymentViewService,\n private notificationService: NotificationService,\n private paymentLibComponent: PaymentLibComponent,\n private cd: ChangeDetectorRef,\n private OrderslistService: OrderslistService) {\n }\n\n ngAfterContentChecked(): void {\n this.cd.detectChanges();\n }\n\n ngOnInit() {\n this.ccdCaseNumber = this.paymentLibComponent.CCD_CASE_NUMBER;\n this.selectedOption = this.paymentLibComponent.SELECTED_OPTION;\n this.dcnNumber = this.paymentLibComponent.DCN_NUMBER;\n this.isTurnOff = this.paymentLibComponent.ISTURNOFF;\n this.serviceReference = this.paymentLibComponent.paymentGroupReference;\n this.viewStatus = 'paymentview';\n this.paymentViewService.getApportionPaymentDetails(this.paymentLibComponent.paymentReference).subscribe(\n paymentGroup => {\n let fees = [];\n paymentGroup.fees.forEach(fee => {\n this.isRemissionsMatch = false;\n\n paymentGroup.remissions.forEach(rem => {\n if (rem.fee_code === fee.code) {\n this.isRemissionsMatch = true;\n fee['remissions'] = rem;\n fees.push(fee);\n }\n });\n if (!this.isRemissionsMatch) {\n fees.push(fee);\n }\n });\n paymentGroup.fees = fees\n this.paymentFees =fees;\n this.paymentGroup = paymentGroup;\n\n this.paymentGroup.payments = this.paymentGroup.payments.filter\n (paymentGroupObj => paymentGroupObj['reference'].includes(this.paymentLibComponent.paymentReference));\n const paymentAllocation = this.paymentGroup.payments[0].payment_allocation;\n this.isStatusAllocated = paymentAllocation.length > 0 && paymentAllocation[0].allocation_status === 'Allocated' || paymentAllocation.length === 0;\n\n },\n (error: any) => this.errorMessage = error\n );\n this.paymentViewService.getPaymentFailure(this.paymentLibComponent.paymentReference).subscribe({\n next: (res) => {\n JSON.parse(res).payment_failure_list.reverse().forEach(payments => {\n\n this.allPaymentsFailure.push(payments.payment_failure_initiated);\n if(payments.payment_failure_closed) {\n this.allPaymentsFailure.push(payments.payment_failure_closed);\n }\n });\n this.allPaymentsFailure = this.allPaymentsFailure.reverse();\n },\n error: (e) => {\n this.allPaymentsFailure = [];\n this.errorMsg = \"Server error\"\n }\n })\n }\n\n get isCardPayment(): boolean {\n return this.paymentGroup.payments[0].method === 'card';\n }\n\n get isTelephonyPayment(): boolean {\n return this.paymentGroup.payments[0].channel === 'telephony';\n }\n\n public goToPaymentList(): void {\n this.paymentLibComponent.viewName = 'payment-list';\n }\n getOverPaymentValue() {\n let feesOverPayment = 0;\n this.paymentGroup.fees.forEach(fee => {\n feesOverPayment += fee.over_payment;\n });\n return feesOverPayment > 0 ? feesOverPayment : this.paymentGroup.payments[0].over_payment;\n\n }\n goToServiceRequestPage() {\n this.paymentLibComponent.viewName = 'case-transactions';\n this.paymentLibComponent.TAKEPAYMENT = false;\n this.paymentLibComponent.SERVICEREQUEST = 'true';\n this.paymentLibComponent.isFromServiceRequestPage = true;\n window.location.reload();\n }\n goToCaseTransationPage(event: any) {\n event.preventDefault();\n if (!this.paymentLibComponent.isFromServiceRequestPage) {\n this.OrderslistService.setnavigationPage('casetransactions');\n this.OrderslistService.setisFromServiceRequestPage(false);\n this.paymentLibComponent.viewName = 'case-transactions';\n this.paymentLibComponent.ISBSENABLE = true;\n this.resetOrderData();\n } else {\n this.OrderslistService.getorderRefs().subscribe((data) => this.orderRef = data);\n this.OrderslistService.getorderCCDEvents().subscribe((data) => this.orderCCDEvent = data);\n this.OrderslistService.getorderCreateds().subscribe((data) => this.orderCreated = data);\n this.OrderslistService.getorderDetail().subscribe((data) => this.orderDetail = data);\n this.OrderslistService.getorderPartys().subscribe((data) => this.orderParty = data);\n this.OrderslistService.getorderRemissionTotals().subscribe((data) => this.orderRemissionTotal = data);\n this.OrderslistService.getorderFeesTotals().subscribe((data) => this.orderFeesTotal = data);\n this.OrderslistService.getoorderTotalPaymentss().subscribe((data) => this.orderTotalPayments = data);\n this.viewStatus = 'order-full-view';\n }\n\n }\n\n addRemission(fee: IFee) {\n if(this.chkIsAddRemissionBtnEnable(fee)) {\n this.feeId = fee;\n this.paymentViewService.getApportionPaymentDetails(this.paymentGroup.payments[0].reference).subscribe(\n paymentGroup => {\n this.paymentGroup = paymentGroup;\n\n this.paymentGroup.payments = this.paymentGroup.payments.filter\n (paymentGroupObj => paymentGroupObj['reference'].includes(this.paymentLibComponent.paymentReference));\n this.payment = this.paymentGroup.payments[0];\n this.paymentLibComponent.isFromPaymentDetailPage = true;\n this.viewStatus = 'addremission';\n this.isRefundRemission = true;\n this.cd.detectChanges();\n },\n (error: any) => this.errorMessage = error\n );\n }\n }\n\n checkForFees(paymentGroup: any) {\n if(paymentGroup !== null && paymentGroup !== undefined)\n {\n if (paymentGroup.fees !== null && paymentGroup.fees !== undefined) {\n return true;\n }\n\n }\n return false;\n }\n processRefund() {\n this.isConfirmationBtnDisabled = true;\n this.errorMessage = '';\n const obj = this.paymentGroup.fees[0];\n this.fees = [{ id: obj.id, \n code: obj.code,\n version:obj.version, \n apportion_amount: obj.apportion_amount,\n calculated_amount: obj.calculated_amount,\n updated_volume: obj.updated_volume ? obj.updated_volume : obj.volume,\n volume: obj.volume,\n refund_amount: this.getOverPaymentValue() }];\n const requestBody = new PostRefundRetroRemission(this.contactDetailsObj,this.fees, this.paymentGroup.payments[0].reference, 'RR037', \n this.getOverPaymentValue(), 'op');\n this.paymentViewService.postRefundsReason(requestBody).subscribe(\n response => {\n if (JSON.parse(response)) {\n this.viewCompStatus = '';\n this.viewStatus = 'refundconfirmationpage';\n this.refundReference = JSON.parse(response).refund_reference;\n this.refundAmount = JSON.parse(response).refund_amount;\n }\n },\n (error: any) => {\n this.errorMessage = error;\n this.isConfirmationBtnDisabled = false;\n this.cd.detectChanges();\n })\n }\n gotoAddressPage(note?: IRefundContactDetails) {\n if (note) {\n this.notification = { contact_details: note, notification_type: note.notification_type };\n }\n this.errorMessage = '';\n this.viewCompStatus = 'overPaymentAddressCapture';\n }\n addRefundForRemission(payment: IPayment, remission: IRemission[],fees:any) {\n //if(!this.chkIsIssueRefundBtnEnable(payment)) {\n this.paymentViewService.getApportionPaymentDetails(payment.reference).subscribe(\n paymentGroup => {\n this.paymentGroup = paymentGroup;\n\n this.paymentGroup.payments = this.paymentGroup.payments.filter\n (paymentGroupObj => paymentGroupObj['reference'].includes(payment.reference));\n this.payment = this.paymentGroup.payments[0];\n this.remissions = remission;\n this.remissionFeeAmt = fees.filter(data=>data.code === this.remissions['fee_code'])[0].net_amount;\n this.viewStatus = 'addrefundforremission';\n // const paymentAllocation = this.paymentGroup.payments[0].payment_allocation;\n // this.isStatusAllocated = paymentAllocation.length > 0 && paymentAllocation[0].allocation_status === 'Allocated' || paymentAllocation.length === 0;\n },\n (error: any) => this.errorMessage = error\n );\n //}\n }\n\n goToPaymentViewComponent() {\n this.viewCompStatus = '';\n this.viewStatus = 'paymentview';\n }\n issueRefund(paymentgrp: IPaymentGroup) {\n if (paymentgrp !== null && paymentgrp !== undefined) {\n if(this.chkIsIssueRefundBtnEnable(paymentgrp.payments[0])) {\n if(paymentgrp.payments[0].over_payment > 0) {\n this.viewCompStatus = 'overpayment';\n } else {\n this.paymentGroup = paymentgrp;\n this.viewStatus = 'issuerefund';\n this.isRefundRemission = true;\n this.paymentLibComponent.isFromPaymentDetailPage = true;\n this.isFromPaymentDetailPage = true;\n this.isFromServiceRequestPage = false;\n }\n }\n }\n }\n getRemissionByFeeCode(feeCode: string, remissions: IRemission[]): IRemission {\n if (remissions && remissions.length > 0) {\n for (const remission of remissions) {\n if (remission.fee_code === feeCode) {\n return remission;\n }\n }\n }\n return null;\n }\n\n chkIsIssueRefundBtnEnable(payment: IPayment): boolean {\n if (payment !== null && payment !== undefined) {\n return payment.issue_refund && payment.refund_enable\n } else {\n return false;\n }\n }\n\n chkIsAddRefundBtnEnable(remission: IRemission): boolean {\n if (remission !== null && remission !== undefined) {\n return remission.add_refund;\n } else {\n return false;\n }\n }\n\n chkIsAddRemissionBtnEnable(fee: IFee): boolean {\n if (fee !== null && fee !== undefined) {\n return fee.add_remission && fee.remission_enable;\n } else {\n return false\n }\n}\n selectPymentOption(paymentType: string) {\n this.paymentType = paymentType;\n this.isContinueBtnDisabled = false;\n }\n continuePayment(paymentgrp: IPaymentGroup) {\n \n if (this.paymentType === 'op') {\n this.isFullyRefund = false\n this.viewCompStatus = 'overPaymentAddressCapture';\n } else if(this.paymentType === 'fp') {\n this.isFullyRefund = true\n this.paymentGroup = paymentgrp;\n this.viewStatus = 'issuerefund';\n this.viewCompStatus = \"\";\n this.isRefundRemission = true;\n this.paymentLibComponent.isFromPaymentDetailPage = true;\n this.isFromPaymentDetailPage = true;\n this.isFromServiceRequestPage = this.paymentLibComponent.isFromServiceRequestPage;\n }\n }\n gotoPaymentSelectPage(event: Event) {\n event.preventDefault();\n this.viewCompStatus = 'overpayment';\n }\n getContactDetails(obj:IRefundContactDetails) {\n this.contactDetailsObj = obj;\n this.notificationPreview = false;\n this.getTemplateInstructionType(this.paymentGroup.payments[0]);\n this.viewCompStatus = 'overpaymentcheckandanswer';\n \n }\n\n resetOrderData() {\n this.OrderslistService.setOrderRef(null);\n this.OrderslistService.setorderCCDEvent(null);\n this.OrderslistService.setorderCreated(null);\n this.OrderslistService.setorderDetail(null);\n this.OrderslistService.setorderParty(null);\n this.OrderslistService.setorderTotalPayments(null);\n this.OrderslistService.setorderRemissionTotal(null);\n this.OrderslistService.setorderFeesTotal(null);\n }\n\n goToPaymentFailuePage(payment: any) {\n this.viewStatus = 'payment-failure';\n this.selectedPaymentsStatus = payment;\n }\n goBackToPaymentView(event: any) {\n event.preventDefault();\n this.viewStatus = 'paymentview';\n }\n\n getTemplateInstructionType(payment: IPayment): void {\n\n if (payment == undefined || payment == null) {\n this.templateInstructionType = 'Template';\n }else{\n this.templateInstructionType = this.notificationService.getNotificationInstructionType(payment.channel, payment.method);\n }\n \n }\n\n showNotificationPreview(): void {\n this.notificationPreview = true;\n }\n\n hideNotificationPreview(): void {\n this.notificationPreview = false;\n }\n}\n","import { Injectable } from '@angular/core';\nimport {HttpClient, HttpHeaders} from '@angular/common/http';\nimport { Meta } from '@angular/platform-browser';\nimport {ErrorHandlerService} from '../shared/error-handler.service';\nimport { WebComponentHttpClient } from '../shared/httpclient/webcomponent.http.client';\nimport {PaymentLibService} from '../../payment-lib.service';\nimport {Observable} from 'rxjs/Observable';\nimport {catchError} from 'rxjs/operators';\nimport { IRefundReasons } from '../../interfaces/IRefundReasons';\nimport { IPatchRefundAction } from '../../interfaces/IPatchRefundAction';\nimport { IRefundList } from '../../interfaces/IRefundList';\nimport { IssueRefundRequest } from '../../interfaces/IssueRefundRequest';\nimport { IResubmitRefundRequest } from '../../interfaces/IResubmitRefundRequest';\nimport { IRefundStatusHistory } from '../../interfaces/IRefundStatusHistory';\nimport { IPutNotificationRequest } from '../../interfaces/IPutNotificationRequest';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class RefundsService {\n\n constructor(private http: HttpClient,\n private https: WebComponentHttpClient,\n private errorHandlerService: ErrorHandlerService,\n private paymentLibService: PaymentLibService,\n private meta: Meta\n ) { }\n\n getRefundReasons(): Observable<IRefundReasons[]> {\n return this.http.get<IRefundReasons[]>(`${this.paymentLibService.REFUNDS_API_ROOT}/reasons`, {\n withCredentials: true\n })\n .pipe(\n catchError(this.errorHandlerService.handleError)\n );\n }\n\n getRefundRejectReasons(): Observable<any> {\n return this.http.get<any>(`${this.paymentLibService.REFUNDS_API_ROOT}/rejection-reasons`, {\n withCredentials: true\n })\n .pipe(\n catchError(this.errorHandlerService.handleError)\n );\n }\n\n getRefundActions(refundReference: string): Observable<any> {\n return this.http.get<any>(`${this.paymentLibService.REFUNDS_API_ROOT}/${refundReference}/actions`, {\n withCredentials: true\n })\n .pipe(\n catchError(this.errorHandlerService.handleError)\n );\n }\n\npatchRefundActions(body:IPatchRefundAction, refundReference: string, reviewerAction: string): Observable<any> {\n // const opts = this.addHeaders({});\n return this.https.patch(`${this.paymentLibService.REFUNDS_API_ROOT}/${refundReference}/action/${reviewerAction}`, body)\n .pipe(\n catchError(this.errorHandlerService.handleError)\n );\n}\n\ngetRefundList(refundstatus?: string, selfexclusive?:boolean): Observable<IRefundList[]> {\n return this.http.get<IRefundList[]>(`${this.paymentLibService.REFUNDS_API_ROOT}?status=${refundstatus}&excludeCurrentUser=${selfexclusive}`, \n {\n withCredentials: true\n})\n .pipe(\n catchError(this.errorHandlerService.handleError)\n );\n}\n\ngetRefundStatusHistory(reference?: string) {\n return this.http.get<IRefundStatusHistory>(`${this.paymentLibService.REFUNDS_API_ROOT}/${reference}/status-history`, \n {\n withCredentials: true\n})\n .pipe(\n catchError(this.errorHandlerService.handleError)\n );\n}\n\ngetRefundStatusList(ccdCaseNumber:string): Observable<IRefundList[]> {\n return this.http.get<IRefundList[]>(`${this.paymentLibService.REFUNDS_API_ROOT}?ccdCaseNumber=${ccdCaseNumber}`, {\n withCredentials: true\n})\n .pipe(\n catchError(this.errorHandlerService.handleError)\n );\n}\n\ngetUserDetails(): Observable<any> {\n return this.http.get<any>(`${this.paymentLibService.REFUNDS_API_ROOT}/get-user-details`, {\n withCredentials: true\n })\n .pipe(\n catchError(this.errorHandlerService.handleError)\n );\n}\n \npostIssueRefund(body: IssueRefundRequest): Observable<any> {\n return this.https.post(`${this.paymentLibService.REFUNDS_API_ROOT}/refund`, body).pipe(\n catchError(this.errorHandlerService.handleError)\n );\n}\n\nputResendOrEdit(body: IPutNotificationRequest, refundRef:string, notificationType:string): Observable<any> {\n return this.https.put(`${this.paymentLibService.REFUNDS_API_ROOT}/resend/notification/${refundRef}?notificationType=${notificationType}`, body).pipe(\n catchError(this.errorHandlerService.handleError)\n );\n}\n\npatchResubmitRefund(body: IResubmitRefundRequest, refund_reference: string): Observable<any> {\n // const opts = this.addHeaders({});\n return this.https.patch(`${this.paymentLibService.REFUNDS_API_ROOT}/resubmit/${refund_reference}`, body).pipe(\n catchError(this.errorHandlerService.handleError)\n );\n}\n\naddHeaders(options: any): any {\n const csrfToken = this.meta.getTag('name=csrf-token');\n const headers = {};\n if (options.headers) {\n options.headers.forEach(element => {\n headers[element] = options.headers.get(element);\n });\n }\n headers['X-Requested-With'] = 'XMLHttpRequest';\n if (csrfToken.content === null) {\n if( document.cookie.split(';').find(row => row.startsWith('XSRF-TOKEN')) !== undefined ) {\n headers['CSRF-Token'] = document.cookie.split(';').find(row => row.startsWith('XSRF-TOKEN')).split('=')[1]; \n } else {\n headers['CSRF-Token'] = document.cookie.split(';').find(row => row.startsWith(' XSRF-TOKEN')).split('=')[1];\n }\n } else {\n headers['CSRF-Token'] = csrfToken.content;\n }\n options.headers = new HttpHeaders(headers);\n options.responseType = 'text';\n return options;\n}\n}\n","import {Component, OnInit, Input} from '@angular/core';\nimport { FormBuilder, FormGroup, Validators, FormControl } from '@angular/forms';\nimport {RefundsService} from '../../services/refunds/refunds.service';\nimport { IRefundAction } from '../../interfaces/IRefundAction';\nimport { IRefundList } from '../../interfaces/IRefundList';\nimport { IPayment } from '../../interfaces/IPayment';\nimport { IRefundRejectReason } from '../../interfaces/IRefundRejectReason';\nimport { OrderslistService } from '../../services/orderslist.service';\nimport { NotificationService } from '../../services/notification/notification.service';\nimport { PaymentViewService } from '../../services/payment-view/payment-view.service';\nimport { PaymentLibComponent } from '../../payment-lib.component';\nimport { ActivatedRoute,Router } from '@angular/router';\nimport { INotificationPreview } from '../../interfaces/INotificationPreview';\n\n@Component({\n selector: 'ccpay-process-refund',\n templateUrl: './process-refund.component.html',\n styleUrls: ['./process-refund.component.css']\n})\nexport class ProcessRefundComponent implements OnInit {\n @Input() refundReference: string;\n @Input() refundlistsource: IRefundList;\n\n processRefundForm: FormGroup;\n\n errorMessage = this.getErrorMessage(false, '', '', '');\n sendmeback: string = null;\n viewStatus: string;\n refundActionList: IRefundAction[] = []; \n refundRejectReasonList: IRefundRejectReason[] = []; \n isSendMeBackClicked: boolean = false;\n isRejectClicked: boolean = false;\n isOtherClicked: boolean = false;\n isSuccesspageEnable: boolean = false;\n\n refundActionsHasError: boolean = false;\n refundRejectReasonHasError: boolean = false;\n isReasonFieldEmpty: boolean = false;\n isReasonFieldInvalid: boolean = false;\n reasonFieldMinHasError: boolean = false;\n reasonFieldMaxHasError: boolean = false;\n isReasonEmpty: boolean = false;\n isReasonInvalid: boolean = false;\n successMsg: string = null;\n navigationpage: string;\n ccdCaseNumber: string;\n isFromRefundListPage: boolean;\n cpoDetails:any = null;\n isCPODown: boolean;\n isConfirmButtondisabled: boolean = true;\n paymentObj: IPayment;\n templateInstructionType: string;\n notificationPreview: boolean = false;\n notificationPreviewObj: INotificationPreview;\n constructor(private RefundsService: RefundsService,\n private paymentViewService: PaymentViewService,\n private formBuilder: FormBuilder,\n private OrderslistService: OrderslistService,\n private notificationService: NotificationService,\n private paymentLibComponent: PaymentLibComponent,\n private router: Router,\n private activeRoute: ActivatedRoute) {\n }\n\n ngOnInit() {\n this.viewStatus = 'RefundProcess';\n this.RefundsService.getRefundActions(this.refundReference).subscribe(\n refundActionList => {\n this.refundActionList = <any>refundActionList;\n },\n err => {\n this.errorMessage = this.getErrorMessage(true, err.statusCode, err.err, err);\n }\n );\n this.processRefundForm = this.formBuilder.group({\n refundActionField: new FormControl('', Validators.compose([\n Validators.required\n ])),\n refundRejectReasonField: new FormControl('', Validators.compose([\n Validators.required\n ])),\n sendMeBackField: new FormControl('', Validators.compose([\n Validators.required,\n Validators.minLength(3),\n Validators.maxLength(255),\n Validators.pattern('^([a-zA-Z0-9\\\\s,\\\\.]*)$'),\n\n ])),\n enterReasonField: new FormControl('', Validators.compose([\n Validators.required,\n Validators.maxLength(30),\n Validators.pattern('^([a-zA-Z0-9.\\\\s]*)$'),\n ])),\n });\n this.ccdCaseNumber = this.refundlistsource.ccd_case_number;\n\n if((typeof this.paymentLibComponent.TAKEPAYMENT === 'string' && this.paymentLibComponent.TAKEPAYMENT === 'false') || (typeof this.paymentLibComponent.TAKEPAYMENT === 'boolean' && !this.paymentLibComponent.TAKEPAYMENT) ) {\n this.isFromRefundListPage = true;\n }\n this.paymentViewService.getPartyDetails(this.ccdCaseNumber).subscribe(\n response => {\n this.cpoDetails = JSON.parse(response).content[0];\n\n },\n (error: any) => {\n this.errorMessage = <any>error.replace(/\"/g,\"\");\n this.isCPODown = true;\n }\n );\n this.getTemplateInstructionType(this.paymentObj,this.refundlistsource.payment_reference);\n }\n \n checkRefundActions(code: string) {\n this.refundActionsHasError = false;\n this.isReasonFieldEmpty = false;\n this.isReasonEmpty = false;\n this.isReasonInvalid = false;\n this.refundRejectReasonHasError = false;\n if(code === 'Return to caseworker') {\n this.isConfirmButtondisabled = true;\n this.isSendMeBackClicked = true;\n this.isRejectClicked = false;\n this.isOtherClicked = false;\n\n } else if (code === 'Approve') {\n this.isSendMeBackClicked = false;\n this.isConfirmButtondisabled = false;\n this.isRejectClicked = false;\n this.isOtherClicked = false;\n\n } else if (code === 'Reject') {\n this.isRejectClicked = true;\n this.isSendMeBackClicked = false;\n this.isOtherClicked = false;\n this.RefundsService.getRefundRejectReasons().subscribe(\n refundRejectReasonList => {\n this.refundRejectReasonList = <any>refundRejectReasonList;\n },\n err => {\n this.errorMessage = this.getErrorMessage(true, err.statusCode, err.err, err);\n }\n );\n } else if (code === 'RE005') {\n this.isOtherClicked = true;\n } else if (code !== 'RE005') {\n this.isOtherClicked = false;\n }\n }\n\n getNotificationPreviewObj(notificationPreviewObj : INotificationPreview){\n this.notificationPreviewObj = notificationPreviewObj;\n }\n\n processRefundSubmit() {\n let processRefundRequest;\n let status;\n this.resetForm([false, false, false, false, false, false, false, false], 'all');\n const controls = this.processRefundForm.controls;\n const processFormError = controls.sendMeBackField.errors;\n\n if (this.processRefundForm.dirty && controls.refundActionField.valid \n && (controls.refundActionField.value == 'Approve'\n || (controls.refundActionField.value == 'Reject' && controls.refundRejectReasonField.valid && controls.refundRejectReasonField.value != 'RE005')\n || (controls.refundActionField.value == 'Reject' && controls.refundRejectReasonField.value == 'RE005' && controls.enterReasonField.valid)\n || (controls.refundActionField.value == 'Return to caseworker' && controls.sendMeBackField.valid))) {\n if (controls.refundActionField.value === 'Approve'){\n status = 'APPROVE';\n if (this.notificationPreviewObj) {\n processRefundRequest = {\n code: '',\n reason: '',\n template_preview: {\n body: this.notificationPreviewObj.body,\n from: {\n from_email_address: this.notificationPreviewObj.from.from_email_address,\n from_mail_address: {\n address_line: this.notificationPreviewObj.from.from_mail_address.address_line,\n city: this.notificationPreviewObj.from.from_mail_address.city,\n country: this.notificationPreviewObj.from.from_mail_address.country,\n county: this.notificationPreviewObj.from.from_mail_address.county,\n postal_code: this.notificationPreviewObj.from.from_mail_address.postal_code\n }\n },\n html: this.notificationPreviewObj.html,\n id: this.notificationPreviewObj.template_id,\n subject: this.notificationPreviewObj.subject,\n template_type: this.notificationPreviewObj.template_type,\n version: 0\n }\n };\n\n } else {\n processRefundRequest = {\n code: '',\n reason: ''\n };\n }\n } else if (controls.refundActionField.value === 'Reject') {\n status = 'REJECT';\n\n if (this.notificationPreviewObj) {\n processRefundRequest = {\n code: controls.refundRejectReasonField.value ? controls.refundRejectReasonField.value : '',\n reason: controls.refundRejectReasonField.value == 'RE005' ? controls.enterReasonField.value : '',\n template_preview: {\n body: this.notificationPreviewObj.body,\n from: {\n from_email_address: this.notificationPreviewObj.from.from_email_address,\n from_mail_address: {\n address_line: this.notificationPreviewObj.from.from_mail_address.address_line,\n city: this.notificationPreviewObj.from.from_mail_address.city,\n country: this.notificationPreviewObj.from.from_mail_address.country,\n county: this.notificationPreviewObj.from.from_mail_address.county,\n postal_code: this.notificationPreviewObj.from.from_mail_address.postal_code\n }\n },\n html: this.notificationPreviewObj.html,\n id: this.notificationPreviewObj.template_id,\n subject: this.notificationPreviewObj.subject,\n template_type: this.notificationPreviewObj.template_type,\n version: 0\n }\n };\n } else {\n processRefundRequest = {\n code: controls.refundRejectReasonField.value ? controls.refundRejectReasonField.value : '',\n reason: controls.refundRejectReasonField.value == 'RE005' ? controls.enterReasonField.value : ''\n };\n }\n\n \n } else if (controls.refundActionField.value === 'Return to caseworker') {\n status = 'SENDBACK';\n\n if (this.notificationPreviewObj) {\n processRefundRequest = {\n code: '',\n reason: controls.sendMeBackField.value,\n template_preview: {\n body: this.notificationPreviewObj.body,\n from: {\n from_email_address: this.notificationPreviewObj.from.from_email_address,\n from_mail_address: {\n address_line: this.notificationPreviewObj.from.from_mail_address.address_line,\n city: this.notificationPreviewObj.from.from_mail_address.city,\n country: this.notificationPreviewObj.from.from_mail_address.country,\n county: this.notificationPreviewObj.from.from_mail_address.county,\n postal_code: this.notificationPreviewObj.from.from_mail_address.postal_code\n }\n },\n html: this.notificationPreviewObj.html,\n id: this.notificationPreviewObj.template_id,\n subject: this.notificationPreviewObj.subject,\n template_type: this.notificationPreviewObj.template_type,\n version: 0\n }\n };\n } else {\n processRefundRequest = {\n code: '',\n reason: controls.sendMeBackField.value\n };\n\n }\n\n \n }\n this.RefundsService.patchRefundActions(processRefundRequest, this.refundReference, status).subscribe(\n response => {\n this.isSuccesspageEnable = true;\n // this.successMsg = JSON.parse(response)['data'];\n this.successMsg = response.replace(/['\"]+/g, '');\n },\n err => {\n this.errorMessage = this.getErrorMessage(true, err.statusCode, err.err, err);\n }\n );\n } else {\n if(controls.refundActionField.value == \"\") {\n this.resetForm([true, false, false, false, false, false, false, false], 'action');\n }\n if(controls.refundActionField.value == 'Reject' && controls.refundRejectReasonField.value == \"\") {\n this.resetForm([false, true, false, false, false, false, false, false], 'rejectReason');\n }\n if(controls.refundActionField.value == 'Return to caseworker') {\n if(controls.sendMeBackField.value == '' ) {\n this.resetForm([false, false, true, false, false, false, false, false], 'addAreason');\n }\n if(controls.sendMeBackField.value != '' && controls.sendMeBackField.invalid ) {\n this.resetForm([false, false, false, true, false, false, false, false], 'addAreason');\n }\n if(processFormError && processFormError.minlength && processFormError.minlength.actualLength < 3 ) {\n this.resetForm([false, false, false, false, true, false, false, false], 'addAreason');\n }\n if(processFormError && processFormError.maxlength && processFormError.maxlength.actualLength > 255 ) {\n this.resetForm([false, false, false, false, false, true, false, false], 'addAreason');\n }\n }\n if(controls.refundActionField.value == 'Reject' && controls.refundRejectReasonField.value == 'RE005') {\n if(controls.enterReasonField.value === \"\") {\n this.resetForm([false, false, false, false, false, false, true, false], 'enterReason');\n }\n if(controls.enterReasonField.value!== \"\" && controls.enterReasonField.invalid) {\n this.resetForm([false, false, false, false, false, false, false, true], 'enterReason');\n }\n }\n }\n\n }\n getErrorMessage(isErrorExist, status, errorMsg, err) {\n let bodyTxt = 'Please try again later';\n if (status !== 500) {\n if (errorMsg !== undefined) {\n bodyTxt = errorMsg;\n } else {\n bodyTxt = err;\n }\n \n }\n return {\n title: 'Something went wrong',\n body: bodyTxt,\n showError: isErrorExist\n };\n }\n loadRefundListPage() {\n this.OrderslistService.getnavigationPageValue().subscribe((data) => this.navigationpage = data);\n if (this.navigationpage === 'casetransactions') {\n // window.location.href='/refund-list?takePayment=false&refundlist=true';\n // // this.OrderslistService.setnavigationPage('casetransactions');\n // // this.OrderslistService.setisFromServiceRequestPage(false);\n // // this.paymentLibComponent.VIEW ='case-transactions';\n // // this.paymentLibComponent.viewName = 'case-transactions';\n // // this.paymentLibComponent.ISBSENABLE = true;\n // // this.paymentLibComponent.isRefundStatusView = false;\n this.paymentLibComponent.viewName = 'refundstatuslist';\n this.paymentLibComponent.isRefundStatusView = true;\n } else {\n this.paymentLibComponent.viewName = 'refundstatuslist';\n this.paymentLibComponent.isRefundStatusView = true;\n }\n }\n loadRefundsHomePage() {\n if(typeof this.paymentLibComponent.TAKEPAYMENT === 'string' && this.paymentLibComponent.TAKEPAYMENT === 'false') {\n //window.location.href='/refund-list?takePayment=false&refundlist=true';\n this.paymentLibComponent.viewName = 'refund-list';\n }\n else {\n this.OrderslistService.setnavigationPage('casetransactions');\n this.OrderslistService.setisFromServiceRequestPage(false);\n this.paymentLibComponent.VIEW ='case-transactions';\n this.paymentLibComponent.viewName = 'case-transactions';\n this.paymentLibComponent.ISBSENABLE = true;\n this.paymentLibComponent.isRefundStatusView = false;\n }\n }\n redirecttoRefundListPage() {\n if((typeof this.paymentLibComponent.TAKEPAYMENT === 'string' && this.paymentLibComponent.TAKEPAYMENT === 'false') || (typeof this.paymentLibComponent.TAKEPAYMENT === 'boolean' && !this.paymentLibComponent.TAKEPAYMENT) ) {\n // window.location.href='/refund-list?takePayment=false&refundlist=true';\n this.paymentLibComponent.viewName = 'refund-list';\n }\n else {\n this.loadRefundListPage();\n }\n }\n loadCaseTransactionPage() {\n this.OrderslistService.setnavigationPage('casetransactions');\n this.OrderslistService.setisFromServiceRequestPage(false);\n this.paymentLibComponent.viewName = 'case-transactions';\n this.paymentLibComponent.ISBSENABLE = true;\n this.paymentLibComponent.isRefundStatusView = false;\n }\n\n resetForm(vals, field) {\n if(field==='action' || field==='all') {\n this.refundActionsHasError = vals[0];\n }\n if(field==='rejectReason' || field==='all') {\n this.refundRejectReasonHasError = vals[1];\n }\n if(field==='addAreason' || field==='all') {\n this.isReasonFieldEmpty = vals[2];\n this.isReasonFieldInvalid = vals[3];\n this.reasonFieldMinHasError = vals[4];\n this.reasonFieldMaxHasError = vals[5];\n }\n if(field==='enterReason' || field==='all') {\n this.isReasonEmpty = vals[6];\n this.isReasonInvalid = vals[7];\n }\n }\n\n goToCaseReview() {\n const isPayBubble = this.paymentLibComponent.isFromPayBubble;\n if(isPayBubble) {\n this.loadCaseTransactionPage();\n } else {\n this.router.navigate([`/cases/case-details/${this.ccdCaseNumber}`], {relativeTo: this.activeRoute});\n }\n }\n\n getTemplateInstructionType(payment: IPayment, paymentReference: string): void {\n\n if (payment == undefined || payment == null || payment.reference != paymentReference) {\n\n this.paymentViewService.getPaymentDetails(paymentReference).subscribe(\n payment => {\n this.paymentObj = payment;\n this.paymentObj.reference = paymentReference;\n this.templateInstructionType = this.notificationService.getNotificationInstructionType(this.paymentObj.channel, this.paymentObj.method);\n },\n (error: any) => {\n this.templateInstructionType = 'Template';\n })\n } else {\n this.templateInstructionType = this.notificationService.getNotificationInstructionType(payment.channel, payment.method);\n }\n }\n\n showNotificationPreview(): void {\n this.notificationPreview = true;\n }\n\n hideNotificationPreview(): void {\n this.notificationPreview = false;\n }\n}\n","import {Component, OnInit, Input} from '@angular/core';\nimport { RefundsService } from '../../services/refunds/refunds.service';\nimport { IRefundList } from '../../interfaces/IRefundList';\n\n@Component({\n selector: 'ccpay-refund-list',\n templateUrl: './refund-list.component.html',\n styleUrls: ['./refund-list.component.css']\n})\nexport class RefundListComponent implements OnInit {\n @Input('USERID') USERID: string;\n @Input('LOGGEDINUSERROLES') LOGGEDINUSERROLES: any[];\n @Input('LOGGEDINUSEREMAIL') LOGGEDINUSEREMAIL:string;\n\n constructor(private refundService: RefundsService) {\n }\n\n tableApprovalHeader: string;\n tableRejectedHeader: string;\n submittedRefundList: IRefundList[] = [];\n rejectedRefundList: IRefundList[] = [];\n // approvalStatus = 'Sent for approval';\n // rejectStatus = 'Update required';\n approvalStatus = 'Sent for approval';\n rejectStatus = 'Update required';\n errorMessage = null;\n isApproveTableVisible:boolean;\n isRejectTableVisible:boolean;\n dropdownvalue: string;\n isAuthorized: boolean = true;\n userLst\n ngOnInit() {\n \n this.userLst = this.LOGGEDINUSERROLES;\n\n \n if(this.LOGGEDINUSERROLES.some(i =>i.includes('payments-refund-approver'))){\n this.isAuthorized = true;\n } else {\n this.isApproveTableVisible = false;\n this.isAuthorized = false;\n }\n\n \n this.tableApprovalHeader = 'Refunds to be approved';\n this.tableRejectedHeader = 'Refunds returned to caseworker';\n\n if(this.isAuthorized) {\n this.refundService.getRefundList(this.approvalStatus,true).subscribe(\n refundList => {\n this.submittedRefundList = refundList['refund_list'];\n this.isApproveTableVisible = true;\n }\n ),\n (error: any) => {\n this.errorMessage = error.replace(/\"/g,\"\");\n };\n }\n\n this.refundService.getRefundList(this.rejectStatus,false).subscribe(\n refundList => {\n this.rejectedRefundList = refundList['refund_list'];\n this.isRejectTableVisible = true;\n }\n ),\n (error: any) => {\n this.errorMessage = error.replace(/\"/g,\"\");\n };\n\n }\n \n}","import { Injectable } from '@angular/core';\nimport {HttpClient} from '@angular/common/http';\nimport {Observable} from 'rxjs/internal/Observable';\n\nimport {ICardDetails} from '../../interfaces/ICardDetails';\nimport {PaymentLibService} from '../../payment-lib.service';\nimport { catchError } from 'rxjs/operators';\nimport { ErrorHandlerService } from '../shared/error-handler.service';\nimport { LoggerService } from '../shared/logger/logger.service';\n\n\n@Injectable({\n providedIn: 'root'\n})\nexport class CardDetailsService {\n\n constructor(private http: HttpClient,\n private logger: LoggerService,\n private errorHandlerService: ErrorHandlerService,\n private paymentLibService: PaymentLibService) { }\n\n getCardDetails(paymentReference: string): Observable<ICardDetails> {\n this.logger.info('Card-detail-service getCardDetails for: ', paymentReference);\n\n return this.http.get<ICardDetails>(`${this.paymentLibService.API_ROOT}/card-payments/${paymentReference}/details`, {\n withCredentials: true\n })\n .pipe(\n catchError(this.errorHandlerService.handleError)\n );\n }\n}\n","import { Component, OnInit } from '@angular/core';\nimport { CardDetailsService } from '../../services/card-details/card-details.service';\nimport {ICardDetails} from '../../interfaces/ICardDetails';\nimport { PaymentLibComponent } from '../../payment-lib.component';\n\n@Component({\n selector: 'ccpay-card-details',\n templateUrl: './card-details.component.html',\n styleUrls: ['./card-details.component.css']\n})\nexport class CardDetailsComponent implements OnInit {\n pageTitle: string = 'Card details';\n cardDetails: ICardDetails;\n paymentReference: string;\n errorMessage: string;\n\n constructor(private cardDetailsService: CardDetailsService,\n private paymentLibComponent: PaymentLibComponent) { }\n\n ngOnInit() {\n this.cardDetailsService.getCardDetails(this.paymentLibComponent.paymentReference).subscribe(\n cardDetails => this.cardDetails = cardDetails,\n (error: any) => this.errorMessage = <any>error\n );\n }\n\n get getPaymentReference(): string {\n return this.paymentReference;\n }\n\n}\n","import { Component } from '@angular/core';\n\n@Component({\n template: `\n <h1>This is not the page you were looking for!</h1>\n `\n})\nexport class PageNotFoundComponent { }\n","import { Injectable } from '@angular/core';\nimport { PaymentLibService } from '../../payment-lib.service';\nimport { HttpClient } from '@angular/common/http';\nimport { IStatusHistories } from '../../interfaces/IStatusHistories';\nimport { Observable } from 'rxjs/internal/Observable';\nimport { ErrorHandlerService } from '../shared/error-handler.service';\nimport { catchError } from 'rxjs/operators';\nimport { LoggerService } from '../shared/logger/logger.service';\n\n\n@Injectable({\n providedIn: 'root'\n})\nexport class StatusHistoryService {\n\n constructor(private http: HttpClient,\n private logger: LoggerService,\n private errorHandlerService: ErrorHandlerService,\n private paymentLibService: PaymentLibService) { }\n\n getPaymentStatusesByReference(paymentReference: string, paymentMethod: string): Observable<IStatusHistories> {\n this.logger.info('Status-history-service getPaymentStatusesByReference for: ', paymentReference);\n\n return this.http.get<IStatusHistories>(paymentMethod === 'card' || paymentMethod === 'cash' || paymentMethod === 'cheque' || paymentMethod === 'postal order' ?\n `${this.paymentLibService.API_ROOT}/card-payments/${paymentReference}/statuses` :\n `${this.paymentLibService.API_ROOT}/credit-account-payments/${paymentReference}/statuses`, {\n withCredentials: true\n })\n .pipe(\n catchError(this.errorHandlerService.handleError)\n );\n }\n}\n","import { Component, OnInit, Input } from '@angular/core';\nimport { IStatusHistories } from '../../interfaces/IStatusHistories';\nimport { StatusHistoryService } from '../../services/status-history/status-history.service';\nimport { PaymentLibComponent } from '../../payment-lib.component';\n\n@Component({\n selector: 'ccpay-payment-statuses',\n templateUrl: './status-history.component.html',\n styleUrls: ['./status-history.component.css']\n})\nexport class StatusHistoryComponent implements OnInit {\n @Input() isTakePayment: boolean;\n pageTitle: string = 'Payment status history';\n statuses: IStatusHistories;\n errorMessage: string;\n\n constructor(private statusHistoryService: StatusHistoryService,\n private paymentLibComponent: PaymentLibComponent) { }\n\n ngOnInit() {\n this.statusHistoryService.getPaymentStatusesByReference(this.paymentLibComponent.paymentReference, this.paymentLibComponent.paymentMethod).subscribe(\n statuses => this.statuses = statuses,\n (error: any) => this.errorMessage = <any>error.replace(/\"/g,\"\")\n );\n \n }\n\n}\n","import { Component, OnInit, Output, EventEmitter, Input } from '@angular/core';\nimport { FormBuilder, FormGroup, Validators, FormControl } from '@angular/forms';\nimport { PaymentLibComponent } from '../../payment-lib.component';\nimport { NotificationService } from '../../services/notification/notification.service';\n\n@Component({\n selector: 'ccpay-contact-details',\n templateUrl: './contact-details.component.html',\n styleUrls: ['./contact-details.component.css']\n})\nexport class ContactDetailsComponent implements OnInit {\n @Input('isEditOperation') isEditOperation: boolean;\n @Input('isEditOperationInRefundList') isEditOperationInRefundList: boolean;\n @Input('addressObj') addressObj: any;\n @Output() assignContactDetails: EventEmitter<any> = new EventEmitter();\n @Output() assignContactDetailsInFefundsList: EventEmitter<any> = new EventEmitter();\n @Output() redirectToIssueRefund: EventEmitter<any> = new EventEmitter();\n pageTitle: string = 'Payment status history';\n errorMessage: string;\n isEmailSAddressClicked: boolean = true;\n isShowPickAddress: boolean = false;\n isPostcodeClicked: boolean = false;\n isManualAddressClicked: boolean = false;\n emailAddressForm: FormGroup;\n postCodeForm: FormGroup;\n manualAddressForm: FormGroup;\n addressPostcodeList:any[] = [];\n postcodeAddress:any;\n isAddressBoxEmpty: boolean = false;\n\n isEmailEmpty: boolean = false;\n emailHasError: boolean = false;\n isPostcodeEmpty: boolean = false;\n postcodeHasError: boolean = false;\n isaddressLine1Empty: boolean = false;\n addressLine1HasError: boolean = false;\n addressLine2HasError: boolean = false;\n isTownOrCityEmpty: boolean = false;\n townOrCityHasError: boolean = false;\n isCountyEmpty: boolean = false;\n countyHasError: boolean = false;\n isMPostcodeEmpty: boolean = false;\n mpostcodeHasError: boolean = false;\n isCountryEmpty: boolean = false;\n\n constructor(private formBuilder: FormBuilder,\n private notificationService: NotificationService,\n private paymentLibComponent: PaymentLibComponent) { }\n\n ngOnInit() {\n this.resetForm([false,false,false,false,false,false,false,false,false,false,false,false,false,false], 'all');\n\n this.emailAddressForm = this.formBuilder.group({\n email: new FormControl('', Validators.compose([\n Validators.required,\n Validators.pattern('.+@+.+\\\\.+.+')\n ]))\n });\n this.postCodeForm = this.formBuilder.group({\n postcode: new FormControl('', Validators.compose([\n Validators.required,\n Validators.pattern('^([A-Za-z]{1,2}[0-9]{1,2}[A-Za-z]{0,1} ?[0-9][A-Za-z]{2})')\n ]))\n });\n this.manualAddressForm = this.formBuilder.group({\n addressl1: new FormControl('', Validators.compose([\n Validators.required,\n Validators.pattern('^[a-zA-Z0-9\\\\s,\\'-]*$')\n ])),\n addressl2: new FormControl('', Validators.compose([\n Validators.pattern('^[a-zA-Z0-9\\\\s,\\'-]*$')\n ])),\n townorcity: new FormControl('', Validators.compose([\n Validators.required,\n Validators.pattern('^[a-zA-Z0-9\\\\s,\\'-]*$')\n ])),\n county: new FormControl('', Validators.compose([\n Validators.pattern('^[a-zA-Z0-9\\\\s,\\'-]*$')\n ])),\n mpostcode: new FormControl('', Validators.compose([\n Validators.required,\n Validators.pattern('^([A-Za-z]{1,2}[0-9]{1,2}[A-Za-z]{0,1} ?[0-9][A-Za-z]{2})')\n ])),\n country: new FormControl('', Validators.compose([\n Validators.required\n ]))\n });\n if(this.addressObj !== undefined && this.addressObj !== '') {\n this.setEditDetails();\n }\n if(this.isEditOperationInRefundList === undefined) {\n this.isEditOperationInRefundList = false;\n }\n }\n setEditDetails() {\n if(this.addressObj.notification_type === 'EMAIL') {\n this.isEmailSAddressClicked = true;\n this.isPostcodeClicked = false;\n this.isManualAddressClicked = false;\n this.emailAddressForm.setValue({ email: this.addressObj.contact_details.email });\n } else if(this.addressObj.notification_type === 'LETTER') {\n this.isEmailSAddressClicked = false;\n this.isPostcodeClicked = true;\n this.isManualAddressClicked = true;\n this.manualAddressForm.patchValue({ \n addressl1: this.addressObj.contact_details.address_line,\n townorcity: this.addressObj.contact_details.city,\n county: this.addressObj.contact_details.county,\n country: this.addressObj.contact_details.country,\n mpostcode: this.addressObj.contact_details.postal_code\n });\n }\n }\n\n selectContactOption(type, isLinkedClied) {\n this.resetForm([false,false,false,false,false,false,false,false,false,false,false,false,false,false,false], 'all');\n if( type === 'Email' && isLinkedClied === 'false'){\n this.isEmailSAddressClicked = true;\n this.isPostcodeClicked = false;\n this.isManualAddressClicked = false;\n } else if(type === 'Postcode' && isLinkedClied === 'false') {\n this.isEmailSAddressClicked = false;\n this.isPostcodeClicked = true;\n this.isManualAddressClicked = false;\n } else if(type === 'Postcode' && isLinkedClied === 'true') {\n this.isEmailSAddressClicked = false;\n this.isPostcodeClicked = true;\n this.isManualAddressClicked = true;\n\n }\n }\n\n finalFormSubmit() {\n this.resetForm([false,false,false,false,false,false,false,false,false,false,false,false,false,false,false], 'all');\n if( this.isEmailSAddressClicked ){\n const emailField = this.emailAddressForm.controls.email;\n if (this.emailAddressForm.valid) {\n if(!this.isEditOperationInRefundList) {\n this.assignContactDetails.emit( {\n email: emailField.value,\n notification_type: 'EMAIL'\n } );\n } else {\n this.assignContactDetailsInFefundsList.emit({\n email: emailField.value,\n notification_type: 'EMAIL'\n } );\n }\n } else {\n if( emailField.value == '' ) {\n this.resetForm([true,false,false,false,false,false,false,false,false,false,false,false,false,false], 'email');\n }\n if(emailField.value != '' && emailField.invalid ) {\n this.resetForm([false,true,false,false,false,false,false,false,false,false,false,false,false,false], 'email');\n }\n }\n } else if( this.isPostcodeClicked && !this.isManualAddressClicked ) {\n this.postcodeValidation('FS');\n } else if(this.isPostcodeClicked && this.isManualAddressClicked) {\n const fieldCtrls = this.manualAddressForm.controls;\n if (this.manualAddressForm.valid) {\n if(!this.isEditOperationInRefundList) {\n this.assignContactDetails.emit({\n address_line: fieldCtrls.addressl1.value+' '+fieldCtrls.addressl2.value,\n city: fieldCtrls.townorcity.value,\n county: fieldCtrls.county.value,\n postal_code: fieldCtrls.mpostcode.value,\n country: fieldCtrls.country.value,\n notification_type: 'LETTER'\n });\n } else {\n this.assignContactDetailsInFefundsList.emit({\n address_line: fieldCtrls.addressl1.value+' '+fieldCtrls.addressl2.value,\n city: fieldCtrls.townorcity.value,\n county: fieldCtrls.county.value,\n postal_code: fieldCtrls.mpostcode.value,\n country: fieldCtrls.country.value,\n notification_type: 'LETTER'\n });\n }\n } else {\n if( fieldCtrls.addressl1.value == '' ) {\n this.resetForm([false,false,false,false,true,false,false,false,false,false,false,false,false,false], 'address1');\n }\n if(fieldCtrls.addressl1.value != '' && fieldCtrls.addressl1.invalid ) {\n this.resetForm([false,false,false,false,false,true,false,false,false,false,false,false,false,false], 'address1');\n }\n if(fieldCtrls.addressl2.value != '' && fieldCtrls.addressl2.invalid ) {\n this.resetForm([false,false,false,false,false,false,true,false,false,false,false,false,false,false], 'address2');\n }\n if( fieldCtrls.townorcity.value == '' ) {\n this.resetForm([false,false,false,false,false,false,false,true,false,false,false,false,false,false], 'town');\n }\n if(fieldCtrls.townorcity.value != '' && fieldCtrls.townorcity.invalid ) {\n this.resetForm([false,false,false,false,false,false,false,false,true,false,false,false,false,false], 'town');\n }\n if( fieldCtrls.county.value == '' ) {\n this.resetForm([false,false,false,false,false,false,false,false,false,true,false,false,false,false], 'county');\n }\n if(fieldCtrls.county.value != '' && fieldCtrls.county.invalid ) {\n this.resetForm([false,false,false,false,false,false,false,false,false,false,true,false,false,false], 'county');\n }\n if( fieldCtrls.mpostcode.value == '' ) {\n this.resetForm([false,false,false,false,false,false,false,false,false,false,false,true,false,false], 'mpostcode');\n }\n if(fieldCtrls.mpostcode.value != '' && fieldCtrls.mpostcode.invalid ) {\n this.resetForm([false,false,false,false,false,false,false,false,false,false,false,false,true,false], 'mpostcode');\n }\n if( fieldCtrls.country.value == '' ) {\n this.resetForm([false,false,false,false,false,false,false,false,false,false,false,false,false,true], 'country');\n }\n }\n\n }\n\n }\n\n postcodeValidation(str) {\n this.resetForm([false,false,false,false,false,false,false,false,false,false,false,false,false,false,false], 'all');\n const postcodeField = this.postCodeForm.controls.postcode;\n if (this.postCodeForm.valid) {\n if(str === 'FA') {\n this.notificationService.getAddressByPostcode(postcodeField.value).subscribe(\n refundsNotification => {\n this.addressPostcodeList = refundsNotification['results'];\n this.isShowPickAddress = refundsNotification['header'].totalresults > 0;\n if(!this.isShowPickAddress) {\n this.resetForm([false,false,false,true,false,false,false,false,false,false,false,false,false], 'postcode');\n }\n }\n ),\n (error: any) => {\n this.isShowPickAddress = false;\n this.errorMessage = error.replace(/\"/g,\"\");\n }; \n } else if (str === 'FS') {\n if(this.postcodeAddress !== undefined && this.postcodeAddress) {\n this.isAddressBoxEmpty = false;\n let addressLine=\"\";\n let addressArray = this.postcodeAddress.ADDRESS.split(\",\");\n for( let i=0; i<addressArray.length-2; i++ ) {\n addressLine +=addressArray[i]; \n }\n const addressObject = {\n address_line: addressLine,\n city: this.postcodeAddress.POST_TOWN,\n county: this.postcodeAddress.LOCAL_CUSTODIAN_CODE_DESCRIPTION,\n postal_code: this.postcodeAddress.POSTCODE,\n country: 'United Kingdom',\n notification_type: 'LETTER'\n };\n if(!this.isEditOperationInRefundList) {\n this.assignContactDetails.emit(addressObject);\n } else {\n this.assignContactDetailsInFefundsList.emit(addressObject);\n }\n } else {\n this.isAddressBoxEmpty = true;\n }\n }\n } else {\n if( postcodeField.value == '' ) {\n this.resetForm([false,false,true,false,false,false,false,false,false,false,false,false,false], 'postcode');\n }\n if(postcodeField.value != '' && postcodeField.invalid ) {\n this.resetForm([false,false,false,true,false,false,false,false,false,false,false,false,false], 'postcode');\n }\n }\n }\n redirection(event:any) {\n this.redirectToIssueRefund.emit(event);\n }\n resetForm(val, field) {\n if(field==='email' || field==='all') {\n this.isEmailEmpty = val[0];\n this.emailHasError = val[1];\n }\n if(field==='postcode' || field==='all') {\n this.isPostcodeEmpty = val[2];\n this.postcodeHasError = val[3];\n }\n if(field==='address1' || field==='all') {\n this.isaddressLine1Empty = val[4];\n this.addressLine1HasError = val[5];\n }\n if(field==='address2' || field==='all') {\n this.addressLine2HasError = val[6];\n }\n if(field==='town' || field==='all') {\n this.isTownOrCityEmpty = val[7];\n this.townOrCityHasError = val[8];\n }\n if(field==='county' || field==='all') {\n this.isCountyEmpty = val[9];\n this.countyHasError = val[10];\n }\n if(field==='mpostcode' || field==='all') {\n this.isMPostcodeEmpty = val[11];\n this.mpostcodeHasError = val[12];\n }\n if(field==='country' || field==='all') {\n this.isCountryEmpty = val[13];\n }\n \n }\n}\n","import { Component, Input, OnInit } from '@angular/core';\nimport { IPayment } from '../../interfaces/IPayment';\n\n@Component({\n selector: 'ccpay-pba-details',\n templateUrl: './pba-details.component.html',\n styleUrls: ['./pba-details.component.css']\n})\nexport class PbaDetailsComponent implements OnInit {\n @Input() payment: IPayment;\n\n constructor() { }\n\n ngOnInit() {\n }\n\n}\n","import { Injectable } from '@angular/core';\nimport { Logger } from './logger.service';\n\nexport let isDebugMode = false;\n\nconst noop = (): any => undefined;\n\n@Injectable({\n providedIn: 'root'\n})\nexport class ConsoleLoggerService implements Logger {\n\n get info() {\n if (isDebugMode) {\n return console.info.bind(console);\n } else {\n return noop;\n }\n }\n\n get warn() {\n if (isDebugMode) {\n return console.warn.bind(console);\n } else {\n return noop;\n }\n }\n\n get error() {\n if (isDebugMode) {\n return console.error.bind(console);\n } else {\n return noop;\n }\n }\n\n invokeConsoleMethod(type: string, args?: any): void {\n const logFn: Function = (console)[type] || console.log || noop;\n logFn.apply(console, [args]);\n }\n}\n","import { Injectable } from '@angular/core';\nimport {HttpClient} from '@angular/common/http';\nimport {LoggerService} from '../shared/logger/logger.service';\nimport {ErrorHandlerService} from '../shared/error-handler.service';\nimport {PaymentLibService} from '../../payment-lib.service';\nimport {Observable} from 'rxjs/Observable';\nimport {IPaymentGroup} from '../../interfaces/IPaymentGroup';\nimport {catchError} from 'rxjs/operators';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class CaseTransactionsService {\n\n constructor(private http: HttpClient,\n private logger: LoggerService,\n private errorHandlerService: ErrorHandlerService,\n private paymentLibService: PaymentLibService\n ) { }\n\n getPaymentGroups(ccdCaseNumber: string): Observable<IPaymentGroup[]> {\n this.logger.info('Case-transactions-service getPaymentGroups for: ', ccdCaseNumber);\n\n return this.http.get<IPaymentGroup[]>(`${this.paymentLibService.API_ROOT}/cases/${ccdCaseNumber}/paymentgroups`, {\n withCredentials: true\n })\n .pipe(\n catchError(this.errorHandlerService.handleError)\n );\n }\n}\n","import { Injectable } from '@angular/core';\nimport {HttpClient} from '@angular/common/http';\nimport {ErrorHandlerService} from '../shared/error-handler.service';\nimport { WebComponentHttpClient } from '../shared/httpclient/webcomponent.http.client';\nimport {PaymentLibService} from '../../payment-lib.service';\nimport {Observable} from 'rxjs/Observable';\nimport {catchError} from 'rxjs/operators';\nimport { IBSPayments } from '../../interfaces/IBSPayments';\nimport { AllocatePaymentRequest } from '../../interfaces/AllocatePaymentRequest';\nimport { IPaymentGroup } from '../../interfaces/IPaymentGroup';\n\n\n@Injectable({\n providedIn: 'root'\n})\nexport class BulkScaningPaymentService {\n\n constructor(private http: HttpClient,\n private https: WebComponentHttpClient,\n private errorHandlerService: ErrorHandlerService,\n private paymentLibService: PaymentLibService\n ) { }\n\n getBSPaymentsByCCD(ccdCaseNumber: string): Observable<IBSPayments> {\n return this.http.get<IBSPayments>(`${this.paymentLibService.BULKSCAN_API_ROOT}/cases/${ccdCaseNumber}`, {\n withCredentials: true\n })\n .pipe(\n catchError(this.errorHandlerService.handleError)\n );\n }\n getBSPaymentsByDCN(dcn: string): Observable<IBSPayments> {\n return this.http.get<IBSPayments>(`${this.paymentLibService.BULKSCAN_API_ROOT}/cases?document_control_number=${dcn}`, {\n withCredentials: true\n })\n .pipe(\n catchError(this.errorHandlerService.handleError)\n );\n }\n postBSAllocatePayment(body: AllocatePaymentRequest, paymentRef: string): Observable<any> {\n return this.https.post(`${this.paymentLibService.API_ROOT}/payment-groups/${paymentRef}/bulk-scan-payments`, body).pipe(\n catchError(this.errorHandlerService.handleError)\n );\n }\n postBSPaymentStrategic(body: AllocatePaymentRequest, paymentGroupRef: string): Observable<any> {\n return this.https.post(`${this.paymentLibService.API_ROOT}/payment-groups/${paymentGroupRef}/bulk-scan-payments-strategic`, body).pipe(\n catchError(this.errorHandlerService.handleError)\n );\n }\n postBSWoPGStrategic(body: AllocatePaymentRequest): Observable<any> {\n return this.https.post(`${this.paymentLibService.API_ROOT}/payment-groups/bulk-scan-payments-strategic`, body).pipe(\n catchError(this.errorHandlerService.handleError)\n );\n }\n patchBSChangeStatus(dcnNumber: string, status: string): Observable<any> {\n return this.https.patch(`${this.paymentLibService.API_ROOT}/bulk-scan-payments/${dcnNumber}/status/${status}`, status).pipe(\n catchError(this.errorHandlerService.handleError)\n );\n }\n calculateOutStandingAmount(paymentGroup: IPaymentGroup): number {\n let feesTotal = 0.00,\n paymentsTotal = 0.00,\n remissionsTotal = 0.00;\n\n if (paymentGroup.fees) {\n paymentGroup.fees.forEach(fee => {\n feesTotal = feesTotal + fee.calculated_amount;\n });\n }\n\n if (paymentGroup.payments) {\n paymentGroup.payments.forEach(payment => {\n if (payment.status.toUpperCase() === 'SUCCESS') {\n paymentsTotal = paymentsTotal + payment.amount;\n }\n });\n }\n\n if (paymentGroup.remissions) {\n paymentGroup.remissions.forEach(remission => {\n remissionsTotal = remissionsTotal + remission.hwf_amount;\n });\n } \n return (feesTotal - remissionsTotal) - paymentsTotal;\n }\n\n removeUnwantedString(input: string, replaceText: string) {\n const pattern = /[\\_]/gi;\n return input.replace(pattern, replaceText);\n }\n\n downloadSelectedReport(reportName: string, startDate: string, endDate:string): Observable<any> {\n return this.https.get(`${this.paymentLibService.BULKSCAN_API_ROOT}/report/data?date_from=${startDate}&date_to=${endDate}&report_type=${reportName}`, {\n withCredentials: true\n })\n .pipe(\n catchError(this.errorHandlerService.handleError)\n );\n}\n}\n","import { Component, OnInit, Input } from '@angular/core';\nimport { PaymentLibComponent } from '../../payment-lib.component';\nimport { IPaymentGroup } from '../../interfaces/IPaymentGroup';\nimport { CaseTransactionsService } from '../../services/case-transactions/case-transactions.service';\nimport { BulkScaningPaymentService } from '../../services/bulk-scaning-payment/bulk-scaning-payment.service';\nimport { PaymentViewService } from '../../services/payment-view/payment-view.service';\nimport { OrderslistService } from '../../services/orderslist.service';\nimport { IFee } from '../../interfaces/IFee';\nimport { IPayment } from '../../interfaces/IPayment';\nimport { IRemission } from '../../interfaces/IRemission';\nimport { IPaymentView } from '../../interfaces/IPaymentView';\nimport { IOrderReferenceFee } from '../../interfaces/IOrderReferenceFee';\nimport { Router } from '@angular/router';\n\nconst BS_ENABLE_FLAG = 'bulk-scan-enabling-fe';\n\n@Component({\n selector: 'ccpay-case-transactions',\n templateUrl: './case-transactions.component.html',\n styleUrls: ['./case-transactions.component.css']\n})\nexport class CaseTransactionsComponent implements OnInit {\n @Input('LOGGEDINUSERROLES') LOGGEDINUSERROLES: string[];\n @Input() isTakePayment: boolean;\n @Input() isFromServiceRequestPage: boolean;\n takePayment: boolean;\n ccdCaseNumber: string;\n excReference: string;\n paymentGroups: any[] = [];\n payments: IPayment[] = [];\n nonPayments: IPayment[] = [];\n allPayments: IPayment[] = [];\n remissions: IRemission[] = [];\n fees: IFee[] = [];\n errorMessage: string;\n totalFees: number;\n totalPayments: number = 0;\n totalNonOffPayments: number;\n totalRemissions: number = 0;\n selectedOption: string;\n dcnNumber: string;\n paymentRef: string;\n isTurnOff: boolean;\n isRefundRemission: boolean = true;\n isStrategicFixEnable: boolean;\n isAddFeeBtnEnabled: boolean = true;\n isExceptionRecord: boolean = false;\n isUnprocessedRecordSelected: boolean = false;\n exceptionRecordReference: string;\n isAnyFeeGroupAvilable: boolean = true;\n isHistoricGroupAvailable: boolean = false;\n isBulkScanEnable;\n isRemissionsMatch: boolean;\n viewStatus = 'main';\n isRemoveBtnDisabled: boolean = false;\n feeId: IFee;\n clAmountDue: number = 0;\n overPaymentAmount: number = 0;\n unprocessedRecordCount: number;\n isFeeRecordsExist: boolean = false;\n isGrpOutstandingAmtPositive: boolean = false;\n totalRefundAmount: number;\n caseType: String;\n // lsCcdNumber: any = ls.get<any>('ccdNumber');\n payment: IPayment;\n paymentGroup: IPaymentGroup;\n paymentView: IPaymentView;\n\n //Order changes\n orderDetail: any[] = [];\n\n isAddRemissionEnable: boolean = false;\n orderRemissionDetails: any[] = [];\n orderLevelFees: IOrderReferenceFee[] = [];\n ispaymentGroupApisuccess: boolean = false;\n cpoDetails: any = null;\n orderRef: string;\n orderStatus: string;\n orderParty: string;\n orderCreated: Date;\n orderCCDEvent: string;\n serviceRequestValue: string;\n orderAddBtnEnable: boolean;\n orderFeesTotal: number = 0.00;\n orderRemissionTotal: number = 0.00;\n orderTotalPayments: number = 0.00;\n orderPendingPayments: number = 0.00;\n isCPODown: boolean;\n test: boolean;\n isPBA: boolean = false;\n isIssueRefunfBtnEnable: boolean = false;\n isAddRemissionBtnEnabled: boolean = false;\n isRefundRemissionBtnEnable: boolean = false;\n allowedRolesToAccessRefund = ['payments-refund-approver', 'payments-refund'];\n isEligible4PBAPayment = ['pui-finance-manager', 'pui-user-manager', 'pui-organisation-manager', 'pui-case-manager'];\n currentDate = new Date();\n //isFromServiceRequestPage: boolean;\n navigationpage: string;\n remissionFeeAmt: number;\n constructor(private router: Router,\n private paymentViewService: PaymentViewService,\n private bulkScaningPaymentService: BulkScaningPaymentService,\n private caseTransactionsService: CaseTransactionsService,\n private paymentLibComponent: PaymentLibComponent,\n private OrderslistService: OrderslistService\n ) { }\n\n ngOnInit() {\n this.navigationpage = '';\n if(this.OrderslistService.getpaymentPageView() !== null) {\n this.OrderslistService.getpaymentPageView().subscribe((data) => this.paymentView = data);\n }\n if((this.LOGGEDINUSERROLES === undefined || this.LOGGEDINUSERROLES.length === 0 )&&this.OrderslistService.getUserRolesList() !== null) {\n this.OrderslistService.getUserRolesList().subscribe((data) => this.LOGGEDINUSERROLES = data);\n }\n if(this.OrderslistService.getnavigationPageValue() !== null) {\n this.OrderslistService.getnavigationPageValue().subscribe((data) => this.navigationpage = data);\n }\n\n if (this.paymentView !== undefined && this.paymentView !== null && this.paymentView.payment_group_reference !== undefined && this.navigationpage === 'paymentdetailspage') {\n this.goToPayementView(this.paymentView.payment_group_reference, this.paymentView.reference, this.paymentView.method);\n }\n this.isGrpOutstandingAmtPositive = false;\n this.ccdCaseNumber = this.paymentLibComponent.CCD_CASE_NUMBER;\n this.caseType = this.paymentLibComponent.CASETYPE;\n if (this.paymentLibComponent.CCD_CASE_NUMBER === '') {\n this.ccdCaseNumber = this.paymentLibComponent.EXC_REFERENCE;\n }\n this.excReference = this.paymentLibComponent.EXC_REFERENCE;\n this.takePayment = this.paymentLibComponent.TAKEPAYMENT;\n\n const serviceRequest = this.paymentLibComponent.SERVICEREQUEST;\n if ( serviceRequest !== undefined && serviceRequest.toString() === 'true' ) {\n this.serviceRequestValue = 'true';\n } else {\n this.serviceRequestValue = 'false';\n this.paymentLibComponent.isFromServiceRequestPage = false;\n }\n this.isBulkScanEnable = this.paymentLibComponent.ISBSENABLE;\n this.dcnNumber = this.paymentLibComponent.DCN_NUMBER;\n this.selectedOption = this.paymentLibComponent.SELECTED_OPTION.toLocaleLowerCase();\n this.isTurnOff = this.paymentLibComponent.ISTURNOFF;\n this.isStrategicFixEnable = this.paymentLibComponent.ISSFENABLE;\n if (!this.isTurnOff) {\n // if (this.lsCcdNumber !== this.ccdCaseNumber) {\n // this.router.navigateByUrl(`/ccd-search?takePayment=true`);\n // }\n\n this.caseTransactionsService.getPaymentGroups(this.ccdCaseNumber).subscribe(\n paymentGroups => {\n this.isAnyFeeGroupAvilable =true;\n this.paymentGroups = paymentGroups['payment_groups'];\n this.calculateAmounts();\n this.calculateOrderFeesAmounts();\n this.calculateRefundAmount();\n if (this.isFromServiceRequestPage) {\n this.OrderslistService.getSelectedOrderRefId().subscribe((data) => this.orderRef = data);\n this.goToOrderViewDetailSection(this.orderRef);\n } else {\n this.paymentViewService.getPartyDetails(this.ccdCaseNumber).subscribe(\n response => {\n this.cpoDetails = JSON.parse(response).content[0];\n\n },\n (error: any) => {\n this.errorMessage = <any>error ? error.replace(/\"/g,\"\") : \"\";\n this.isCPODown = true;\n }\n );\n\n }\n\n\n },\n (error: any) => {\n this.errorMessage = <any>error ? error.replace(/\"/g,\"\") : \"\";\n this.isAnyFeeGroupAvilable = false;\n this.setDefaults();\n }\n );\n } else {\n this.caseTransactionsService.getPaymentGroups(this.ccdCaseNumber).subscribe(\n paymentGroups => {\n this.isAnyFeeGroupAvilable =true;\n this.paymentGroups = paymentGroups['payment_groups'];\n this.calculateAmounts();\n this.calculateOrderFeesAmounts();\n this.totalRefundAmount = this.calculateRefundAmount();\n this.paymentViewService.getPartyDetails(this.ccdCaseNumber).subscribe(\n response => {\n this.cpoDetails = JSON.parse(response).content[0];\n\n },\n (error: any) => {\n this.errorMessage = <any>error ? error.replace(/\"/g,\"\") : \"\";\n this.setDefaults();\n this.isCPODown = true;\n }\n );\n\n },\n (error: any) => {\n this.errorMessage = <any>error ? error.replace(/\"/g,\"\") : \"\";\n this.isAnyFeeGroupAvilable = false;\n this.setDefaults();\n }\n );\n }\n\n if( this.paymentGroups !== undefined) {\n this.checkForExceptionRecord();\n }\n\n if(this.OrderslistService.getisFromServiceRequestPages() !== null) {\n this.OrderslistService.getisFromServiceRequestPages().subscribe((data) => this.isFromServiceRequestPage = data);\n }\n\n }\n\n setDefaults(): void {\n this.totalPayments = 0.00;\n this.totalRemissions = 0.00;\n this.totalNonOffPayments = 0.00;\n this.totalFees = 0.00;\n }\n\n getAllocationStatus(payments: any) {\n\n let paymentAllocation = payments.payment_allocation,\n isAllocationStatusExist = paymentAllocation.length > 0;\n return isAllocationStatusExist ? paymentAllocation[0].allocation_status : '-';\n //return \"-\";\n\n }\n\n checkForExceptionRecord(): void {\n\n if (this.paymentGroups.length === 0 && (this.selectedOption.toLocaleLowerCase() === 'ccdorexception' || this.selectedOption.toLocaleLowerCase() === 'rc')) {\n this.bulkScaningPaymentService.getBSPaymentsByCCD(this.ccdCaseNumber).subscribe(\n recordData => {\n if (recordData['data'] && recordData['data'].exception_record_reference && recordData['data'].exception_record_reference.length > 0 && recordData['data'].ccd_reference > 0) {\n this.isExceptionRecord = false;\n this.isAddFeeBtnEnabled = true;\n }\n\n if (recordData['data'] && recordData['data'].exception_record_reference && recordData['data'].exception_record_reference.length > 0 && recordData['data'].ccd_reference === undefined) {\n this.isExceptionRecord = true;\n this.isAddFeeBtnEnabled = false;\n }\n\n if (recordData['data'] && recordData['data'].exception_record_reference && recordData['data'].exception_record_reference.length === undefined && recordData['data'].ccd_reference > 0) {\n this.isExceptionRecord = false;\n this.isAddFeeBtnEnabled = true;\n }\n });\n }\n\n if (this.paymentGroups.length === 0 && this.selectedOption.toLocaleLowerCase() === 'dcn') {\n if (this.paymentLibComponent.CCD_CASE_NUMBER.length > 0 && this.paymentLibComponent.EXC_REFERENCE.length > 0) {\n this.isExceptionRecord = false;\n this.isAddFeeBtnEnabled = true;\n } else if (this.paymentLibComponent.CCD_CASE_NUMBER.length === 0 && this.paymentLibComponent.EXC_REFERENCE.length > 0) {\n this.isExceptionRecord = true;\n this.isAddFeeBtnEnabled = false;\n } else {\n this.isExceptionRecord = false;\n this.isAddFeeBtnEnabled = true;\n }\n }\n if (this.paymentGroups.length > 0)\n this.paymentGroups.forEach(paymentGroup => {\n if (paymentGroup.payments) {\n paymentGroup.payments.forEach(payment => {\n if (payment.case_reference !== undefined && payment.ccd_case_number === undefined) {\n this.isExceptionRecord = true;\n this.isAddFeeBtnEnabled = false;\n } else {\n this.isExceptionRecord = false;\n this.isAddFeeBtnEnabled = true;\n }\n\n });\n }\n });\n }\n\n calculateOrderFeesAmounts(): void {\n let feesTotal = 0.00;\n this.paymentGroups.forEach(paymentGroup => {\n this.resetOrderVariables();\n if (paymentGroup.fees) {\n paymentGroup.fees.forEach(fee => {\n this.orderFeesTotal = this.orderFeesTotal + fee.calculated_amount\n this.overPaymentAmount = this.overPaymentAmount + fee.over_payment\n }\n )\n }\n if (paymentGroup.remissions) {\n paymentGroup.remissions.forEach(remission => {\n this.orderRemissionTotal = this.orderRemissionTotal + remission.hwf_amount;\n });\n }\n\n if (paymentGroup.payments) {\n const isFeeOverPaymentExist = this.overPaymentAmount === 0;\n paymentGroup.payments.forEach(payment => {\n if(isFeeOverPaymentExist) {\n this.overPaymentAmount = this.overPaymentAmount + payment.over_payment\n }\n if (payment.status.toUpperCase() === 'SUCCESS') {\n this.orderTotalPayments = this.orderTotalPayments + payment.amount;\n }\n });\n }\n\n // this.orderPendingPayments = (this.orderFeesTotal - this.orderRemissionTotal) - this.orderTotalPayments;\n if (paymentGroup.service_request_status === 'Paid') {\n this.orderStatus = paymentGroup.service_request_status;\n this.orderAddBtnEnable = false;\n } else if (paymentGroup.service_request_status === 'Partially paid' || paymentGroup.service_request_status === 'Not paid') {\n this.orderStatus = paymentGroup.service_request_status;\n this.orderAddBtnEnable = true;\n } else if (paymentGroup.service_request_status === 'Disputed'){\n this.orderStatus = paymentGroup.service_request_status;\n this.orderAddBtnEnable = true;\n }\n\n //this.orderLevelFees.push({orderRefId:paymentGroup['payment_group_reference'],orderTotalFees: this.orderFeesTotal,orderStatus: this.orderStatus,orderParty:'Santosh', orderCCDEvent:'Case Creation',orderCreated: new Date(), orderAddBtnEnable: this.orderAddBtnEnable}); this.cpoDetails['createdTimestamp']\n if (this.cpoDetails !== null) {\n this.orderLevelFees.push({ orderRefId: paymentGroup['payment_group_reference'], orderTotalFees: this.orderFeesTotal, orderStatus: this.orderStatus, orderParty: this.cpoDetails['responsibleParty'], orderCCDEvent: this.cpoDetails['action'], orderCreated: paymentGroup['date_created'], orderAddBtnEnable: this.orderAddBtnEnable });\n\n } else {\n this.orderLevelFees.push({ orderRefId: paymentGroup['payment_group_reference'], orderTotalFees: this.orderFeesTotal, orderStatus: this.orderStatus, orderParty: '', orderCCDEvent: '', orderCreated: paymentGroup['date_created'], orderAddBtnEnable: this.orderAddBtnEnable });\n }\n\n if (this.orderStatus !== 'Paid') {\n this.OrderslistService.setOrdersList(this.orderLevelFees);\n }\n });\n };\n\n resetOrderVariables(): void {\n this.orderFeesTotal = 0.00;\n this.orderTotalPayments = 0.00;\n this.orderRemissionTotal = 0.00;\n this.orderPendingPayments = 0.00;\n this.isAddFeeBtnEnabled = true;\n\n };\n\n goToOrderViewDetailSection(orderReferenceObj: any) {\n if (this.isFromServiceRequestPage) {\n this.OrderslistService.setOrderRefId(orderReferenceObj);\n this.orderRef = orderReferenceObj;\n } else {\n this.OrderslistService.setOrderRefId(orderReferenceObj.orderRefId);\n this.orderRef = orderReferenceObj.orderRefId;\n }\n\n this.orderFeesTotal = 0.00;\n this.orderRemissionTotal = 0.00;\n this.orderTotalPayments = 0.00;\n this.orderPendingPayments = 0.00;\n\n this.orderDetail = this.paymentGroups.filter(x => x.payment_group_reference === this.orderRef);\n this.orderDetail.forEach(orderDetail => {\n if (orderDetail.fees) {\n orderDetail.fees.forEach(fee => {\n this.orderFeesTotal = this.orderFeesTotal + fee.calculated_amount;\n });\n }\n if (orderDetail.remissions) {\n orderDetail.remissions.forEach(remission => {\n this.orderRemissionTotal = this.orderRemissionTotal + remission.hwf_amount;\n });\n if (orderDetail.payments) {\n this.payment = orderDetail.payments[0];\n orderDetail.payments.forEach(payment => {\n if (payment.status.toUpperCase() === 'SUCCESS') {\n this.orderTotalPayments = this.orderTotalPayments + payment.amount;\n }\n });\n }\n }\n this.orderStatus = orderDetail.service_request_status;\n });\n //this.orderPendingPayments = (this.orderFeesTotal - this.orderRemissionTotal) - this.orderTotalPayments;\n // this.orderRef = orderReferenceObj.orderRefId;\n // if (this.orderPendingPayments <= 0.00) {\n // this.orderStatus = 'Paid';\n // } else if (this.orderFeesTotal > 0 && (this.orderTotalPayments > 0 || this.orderRemissionTotal > 0) && (this.orderTotalPayments < this.orderPendingPayments)) {\n // this.orderStatus = 'Partially paid'\n // } else {\n // this.orderStatus = 'Not paid'\n // }\n\n\n if (this.cpoDetails !== null) {\n this.orderParty = this.cpoDetails['responsibleParty'];\n this.orderCreated = this.cpoDetails['createdTimestamp'];\n this.orderCCDEvent = this.cpoDetails['action'];\n } else {\n this.orderParty = '';\n this.orderCCDEvent = '';\n this.orderCreated = orderReferenceObj.orderCreated;\n }\n this.viewStatus = 'order-full-view';\n }\n\n redirectToOrderFeeSearchPage(event: any, orderef: any) {\n if(orderef.orderAddBtnEnable) {\n event.preventDefault();\n this.paymentLibComponent.bspaymentdcn = null;\n this.paymentLibComponent.paymentGroupReference = orderef.orderRefId;\n this.paymentLibComponent.isTurnOff = this.isTurnOff;\n this.paymentLibComponent.viewName = 'fee-summary';\n }\n }\n\n\n\n\n calculateAmounts(): void {\n let feesTotal = 0.00,\n paymentsTotal = 0.00,\n remissionsTotal = 0.00,\n nonOffLinePayment = 0.00;\n\n this.paymentGroups.forEach(paymentGroup => {\n if (paymentGroup.fees) {\n paymentGroup.fees.forEach(fee => {\n // new feature Apportionment toggle changes\n if (!this.isTurnOff) {\n if (fee.date_created) {\n let a = fee.amount_due === undefined;\n let b = fee.amount_due <= 0;\n this.clAmountDue = a ? this.clAmountDue + fee.net_amount : b ? this.clAmountDue + 0 : this.clAmountDue + fee.amount_due;\n }\n fee['payment_group_reference'] = paymentGroup['payment_group_reference'];\n this.fees.push(fee);\n } else {\n feesTotal = feesTotal + fee.calculated_amount;\n this.fees.push(fee);\n }\n\n });\n }\n if (this.isTurnOff) {\n this.totalFees = feesTotal;\n }\n\n if (paymentGroup.payments) {\n paymentGroup.payments.forEach(payment => {\n // new feature Apportionment toggle changes\n if (!this.isTurnOff) {\n let allocationLen = payment.payment_allocation;\n\n if (payment.status.toUpperCase() === 'SUCCESS') {\n paymentsTotal = paymentsTotal + payment.amount;\n if (allocationLen.length === 0 || allocationLen.length > 0 && allocationLen[0].allocation_status === 'Allocated') {\n nonOffLinePayment = nonOffLinePayment + payment.amount;\n }\n if (allocationLen.length > 0) {\n this.nonPayments.push(payment);\n }\n }\n if (allocationLen.length === 0) {\n this.payments.push(payment);\n }\n payment.paymentGroupReference = paymentGroup.payment_group_reference\n this.allPayments.push(payment);\n } else {\n if (payment.status.toUpperCase() === 'SUCCESS') {\n paymentsTotal = paymentsTotal + payment.amount;\n this.payments.push(payment);\n }\n payment.paymentGroupReference = paymentGroup.payment_group_reference\n this.allPayments.push(payment);\n }\n });\n }\n this.totalPayments = paymentsTotal;\n // new feature Apportionment toggle changes\n if (!this.isTurnOff) {\n this.totalNonOffPayments = nonOffLinePayment;\n }\n\n if (paymentGroup.remissions) {\n paymentGroup.remissions.forEach(remisison => {\n remissionsTotal = remissionsTotal + remisison.hwf_amount;\n this.remissions.push(remisison);\n });\n }\n this.totalRemissions = remissionsTotal;\n });\n\n }\n\n calculateRefundAmount() {\n if (!this.isTurnOff) {\n let isNewPaymentGroup = false;\n\n this.paymentGroups.forEach((paymentGroup, index) => {\n let grpOutstandingAmount = 0.00,\n feesTotal = 0.00,\n paymentsTotal = 0.00,\n remissionsTotal = 0.00,\n fees = [];\n\n if (paymentGroup.fees) {\n // this.isFeeRecordsExist = true;\n paymentGroup.fees.forEach(fee => {\n feesTotal = feesTotal + fee.calculated_amount;\n\n this.isRemissionsMatch = false;\n if (paymentGroup.remissions) {\n paymentGroup.remissions.forEach(rem => {\n if (rem.fee_code === fee.code) {\n this.isRemissionsMatch = true;\n fee['remissions'] = rem;\n // if(!fees.find(k => k.code=fee.code))\n // {\n fees.push(fee);\n //}\n }\n });\n }\n if (!this.isRemissionsMatch) {\n fees.push(fee);\n }\n\n if (fee.date_created) {\n isNewPaymentGroup = true;\n } else {\n this.isHistoricGroupAvailable = true;\n this.paymentGroups[index]['old'] = true;\n }\n });\n this.paymentGroups[index].fees = fees;\n }\n if (paymentGroup.payments) {\n paymentGroup.payments.forEach(payment => {\n if (payment.status.toUpperCase() === 'SUCCESS') {\n paymentsTotal = paymentsTotal + payment.amount;\n }\n });\n }\n\n if (paymentGroup.remissions) {\n paymentGroup.remissions.forEach(remission => {\n remissionsTotal = remissionsTotal + remission.hwf_amount;\n });\n }\n grpOutstandingAmount = (feesTotal - remissionsTotal) - paymentsTotal;\n if (grpOutstandingAmount > 0 && isNewPaymentGroup) {\n this.isAnyFeeGroupAvilable = true;\n this.isFeeRecordsExist = true;\n this.paymentRef = paymentGroup.payment_group_reference;\n }\n if (paymentGroup.fees && paymentGroup.fees.length > 0 && grpOutstandingAmount <= 0 && isNewPaymentGroup) {\n this.isAnyFeeGroupAvilable = false;\n }\n });\n if ((!isNewPaymentGroup && this.isHistoricGroupAvailable) || (!isNewPaymentGroup && !this.isHistoricGroupAvailable)) {\n this.isAnyFeeGroupAvilable = false;\n }\n } else {\n let totalRefundAmount = 0,\n isFeeAmountZero = false;\n this.paymentGroups.forEach(paymentGroup => {\n let grpOutstandingAmount = 0.00,\n feesTotal = 0.00,\n paymentsTotal = 0.00,\n remissionsTotal = 0.00;\n if (paymentGroup.fees) {\n this.isFeeRecordsExist = true;\n paymentGroup.fees.forEach(fee => {\n feesTotal = feesTotal + fee.calculated_amount;\n if (fee.calculated_amount === 0) {\n isFeeAmountZero = true\n }\n });\n\n }\n\n if (paymentGroup.payments) {\n paymentGroup.payments.forEach(payment => {\n if (payment.status.toUpperCase() === 'SUCCESS') {\n paymentsTotal = paymentsTotal + payment.amount;\n }\n });\n }\n\n if (paymentGroup.remissions) {\n paymentGroup.remissions.forEach(remission => {\n remissionsTotal = remissionsTotal + remission.hwf_amount;\n });\n }\n grpOutstandingAmount = (feesTotal - remissionsTotal) - paymentsTotal;\n if (grpOutstandingAmount < 0) {\n if (totalRefundAmount === 0) {\n totalRefundAmount = grpOutstandingAmount;\n } else {\n totalRefundAmount = (totalRefundAmount + grpOutstandingAmount);\n }\n }\n else if (grpOutstandingAmount > 0 || (grpOutstandingAmount === 0 && isFeeAmountZero)) {\n this.isGrpOutstandingAmtPositive = true;\n }\n });\n return totalRefundAmount * -1;\n }\n }\n\n getGroupOutstandingAmount(paymentGroup: IPaymentGroup): number {\n return this.bulkScaningPaymentService.calculateOutStandingAmount(paymentGroup);\n }\n\n redirectToFeeSearchPage(event: any) {\n event.preventDefault();\n let url = this.isBulkScanEnable ? '&isBulkScanning=Enable' : '&isBulkScanning=Disable';\n url += this.isTurnOff ? '&isTurnOff=Enable' : '&isTurnOff=Disable';\n url += this.isStrategicFixEnable ? '&isStFixEnable=Enable' : '&isStFixEnable=Disable';\n url += `&caseType=${this.caseType}`\n this.router.navigateByUrl(`/fee-search?selectedOption=${this.selectedOption}&ccdCaseNumber=${this.ccdCaseNumber}${url}`);\n }\n\n addRemission(fee: IFee) {\n if(this.chkForAddRemission(fee.code)) {\n this.feeId = fee;\n this.viewStatus = 'addremission';\n this.paymentViewService.getApportionPaymentDetails(this.payment.reference).subscribe(\n paymentGroup => {\n this.paymentGroup = paymentGroup;\n\n this.paymentGroup.payments = this.paymentGroup.payments.filter\n (paymentGroupObj => paymentGroupObj['reference'].includes(this.paymentLibComponent.paymentReference));\n this.payment = this.paymentGroup.payments[0];\n // const paymentAllocation = this.paymentGroup.payments[0].payment_allocation;\n // this.isStatusAllocated = paymentAllocation.length > 0 && paymentAllocation[0].allocation_status === 'Allocated' || paymentAllocation.length === 0;\n },\n (error: any) => this.errorMessage = error? error.replace(/\"/g,\"\") : \"\"\n );\n }\n }\n\n addRefundForRemission(payment: IPayment, remission: IRemission[],fees:any) {\n this.paymentViewService.getApportionPaymentDetails(payment.reference).subscribe(\n paymentGroup => {\n this.paymentGroup = paymentGroup;\n this.paymentGroup.payments = paymentGroup.payments.filter\n (paymentGroupObj => paymentGroupObj.reference === payment.reference);\n this.payment = this.paymentGroup.payments[0];\n this.remissions = remission;\n this.remissionFeeAmt = fees.filter(data=>data.code === this.remissions['fee_code'])[0].net_amount;\n this.viewStatus = 'addrefundforremission';\n // const paymentAllocation = this.paymentGroup.payments[0].payment_allocation;\n // this.isStatusAllocated = paymentAllocation.length > 0 && paymentAllocation[0].allocation_status === 'Allocated' || paymentAllocation.length === 0;\n },\n (error: any) => this.errorMessage = error\n );\n }\n\n redirectToremissionPage(event: any) {\n event.preventDefault();\n this.paymentLibComponent.viewName = 'remission'\n }\n goToServiceRequestPage() {\n this.paymentLibComponent.viewName = 'case-transactions';\n this.paymentLibComponent.TAKEPAYMENT = false;\n this.paymentLibComponent.SERVICEREQUEST = 'true';\n this.paymentLibComponent.isFromServiceRequestPage = true;\n window.location.reload();\n }\n redirectToReportsPage(event: any) {\n event.preventDefault();\n this.router.navigateByUrl(`/reports?selectedOption=${this.selectedOption}&ccdCaseNumber=${this.ccdCaseNumber}`);\n }\n\n loadFeeSummaryPage(paymentGroup: IPaymentGroup) {\n this.paymentLibComponent.bspaymentdcn = null;\n this.paymentLibComponent.paymentGroupReference = paymentGroup.payment_group_reference;\n this.paymentLibComponent.isTurnOff = this.isTurnOff;\n this.paymentLibComponent.viewName = 'fee-summary';\n }\n\n goToPaymentViewComponent(paymentGroup: any) {\n this.paymentLibComponent.paymentMethod = paymentGroup.paymentMethod;\n this.paymentLibComponent.paymentGroupReference = paymentGroup.paymentGroupReference;\n this.paymentLibComponent.paymentReference = paymentGroup.paymentReference;\n this.paymentLibComponent.viewName = 'payment-view';\n }\n\n goToPayementView(paymentGroupReference: string, paymentReference: string, paymentMethod: string) {\n this.goToPaymentViewComponent({ paymentGroupReference, paymentReference, paymentMethod });\n }\n\n selectedUnprocessedFeeEvent(unprocessedRecordId: string) {\n if (unprocessedRecordId) {\n if (this.isTurnOff) {\n this.isAddFeeBtnEnabled = false;\n }\n this.isUnprocessedRecordSelected = true;\n } else {\n if (this.isTurnOff) {\n this.isAddFeeBtnEnabled = true;\n }\n this.isUnprocessedRecordSelected = false;\n }\n }\n\n getUnprocessedFeeCount(unProcessedRecordCount: number) {\n this.unprocessedRecordCount = unProcessedRecordCount;\n }\n\n calculateAmountDue(fee: IFee) {\n\n if (fee.date_created) {\n return fee.amount_due !== undefined ? fee.amount_due : fee.net_amount;\n } else {\n return \"0.00\";\n }\n }\n\n confirmRemoveFee(fee: IFee) {\n this.isRemoveBtnDisabled = false;\n this.feeId = fee;\n this.viewStatus = 'feeRemovalConfirmation';\n }\n\n cancelRemoval() {\n this.viewStatus = 'main';\n }\n\n removeFee(fee: any) {\n this.isRemoveBtnDisabled = true;\n this.paymentViewService.deleteFeeFromPaymentGroup(fee).subscribe(\n (success: any) => {\n window.location.reload();\n },\n (error: any) => {\n this.errorMessage = error;\n this.isRemoveBtnDisabled = false;\n }\n );\n }\n\n isCheckAmountdueExist(amountDue: any) {\n return typeof amountDue === 'undefined';\n }\n\n issueRefund(payment: IPayment) {\n if (payment !== null && payment !== undefined) {\n if(this.chkIssueRefundBtnEnable(payment)) {\n this.viewStatus = 'issuerefund';\n this.payment = payment;\n this.paymentLibComponent.isFromServiceRequestPage = true;\n this.isRefundRemission = true;\n }\n }\n }\n\n chkForAddRemission(feeCode: string): boolean {\n if (this.chkForPBAPayment() && this.check4AllowedRoles2AccessRefund()) {\n if (this.orderDetail[0]['remissions'].length > 0) {\n for (const remission of this.orderDetail[0]['remissions']) {\n if (remission.fee_code === feeCode) {\n return false;\n }\n }\n }\n return true;\n } else {\n return false;\n }\n }\n\n chkForPBAPayment(): boolean {\n if (this.orderDetail !== null && this.orderDetail !== undefined) {\n this.orderDetail.forEach(orderDetail => {\n if (orderDetail.payments) {\n orderDetail.payments.forEach(payment => {\n if (payment.method.toLocaleLowerCase() === 'payment by account' && this.allowFurtherAccessAfter4Days(payment)) {\n this.isPBA = true;\n }\n });\n }\n });\n if (this.isPBA) {\n return true;\n } else {\n return false;\n };\n }\n }\n\n chkIssueRefundBtnEnable(payment: IPayment): boolean {\n if (payment !== null && payment !== undefined) {\n return payment.issue_refund && payment.refund_enable\n } else {\n return false;\n }\n // if (this.check4AllowedRoles2AccessRefund() && this.allowFurtherAccessAfter4Days(payment) &&\n // payment.method === 'payment by account' && payment.status.toLocaleLowerCase() === 'success') {\n // this.isIssueRefunfBtnEnable = true;\n // }\n // if (this.isIssueRefunfBtnEnable) {\n // return true;\n // } else {\n // return false;\n // };\n }\n\n chkIsRefundRemissionBtnEnable(): boolean {\n if (this.orderDetail !== null && this.orderDetail !== undefined) {\n this.paymentLibComponent.isFromServiceRequestPage = true;\n this.orderDetail.forEach(orderDetail => {\n if (orderDetail.payments) {\n orderDetail.payments.forEach(payment => {\n if (payment.method.toLocaleLowerCase() === 'payment by account' && payment.status.toLocaleLowerCase() === 'success' && this.allowFurtherAccessAfter4Days(payment)) {\n this.isRefundRemissionBtnEnable = true;\n }\n });\n }\n });\n if (this.isRefundRemissionBtnEnable) {\n return true;\n } else {\n return false;\n };\n }\n }\n\n check4AllowedRoles2AccessRefund = (): boolean => {\n return this.allowedRolesToAccessRefund.some(role =>\n this.LOGGEDINUSERROLES.indexOf(role) !== -1\n );\n }\n check4AllowedRoles2AccessPBApayment = (): boolean => {\n return this.isEligible4PBAPayment.some(role =>\n this.LOGGEDINUSERROLES.indexOf(role) !== -1\n );\n }\n\n allowFurtherAccessAfter4Days = (payment: IPayment): boolean => {\n if (payment !== null && payment !== undefined) {\n let tmp4DayAgo = new Date();\n tmp4DayAgo.setDate(tmp4DayAgo.getDate() - 4);\n return tmp4DayAgo >= new Date(payment.date_created);\n }\n }\n\n loadPBAAccountPage(orderRef: IPayment) {\n this.paymentLibComponent.pbaPayOrderRef = orderRef;\n this.paymentLibComponent.viewName = 'pba-payment';\n }\n}\n","export class PaymentToPayhubRequest {\n currency = 'GBP';\n description = 'PayBubble payment';\n channel = 'telephony';\n provider = 'pci pal';\n case_type: string;\n\n ccd_case_number: string;\n amount: number;\n\n constructor(ccd_case_number: string, amount: number, caseType: string) {\n this.ccd_case_number = ccd_case_number;\n this.amount = <any>amount.toFixed(2);\n this.case_type= caseType;\n }\n}\n","export class PayhubAntennaRequest {\n currency = 'GBP';\n case_type: string;\n ccd_case_number: string;\n amount: number;\n\n constructor(ccd_case_number: string, amount: number, caseType: string) {\n this.ccd_case_number = ccd_case_number;\n this.amount = <any>amount.toFixed(2);\n this.case_type= caseType;\n }\n}\n","import { Component, OnInit, Input } from '@angular/core';\nimport { IPaymentGroup } from '../../interfaces/IPaymentGroup';\nimport { PaymentViewService } from '../../services/payment-view/payment-view.service';\nimport { BulkScaningPaymentService } from '../../services/bulk-scaning-payment/bulk-scaning-payment.service';\nimport { PaymentLibComponent } from '../../payment-lib.component';\nimport { IRemission } from '../../interfaces/IRemission';\nimport { IFee } from '../../interfaces/IFee';\nimport { PaymentToPayhubRequest } from '../../interfaces/PaymentToPayhubRequest';\nimport { PayhubAntennaRequest } from '../../interfaces/PayhubAntennaRequest';\nimport { SafeHtml } from '@angular/platform-browser';\nimport {Router} from '@angular/router';\nimport {Location} from '@angular/common';\nimport { OrderslistService } from '../../services/orderslist.service';\n\nconst BS_ENABLE_FLAG = 'bulk-scan-enabling-fe';\n\n@Component({\n selector: 'ccpay-fee-summary',\n templateUrl: './fee-summary.component.html',\n styleUrls: ['./fee-summary.component.scss']\n})\n\nexport class FeeSummaryComponent implements OnInit {\n @Input() paymentGroupRef: string;\n @Input() ccdCaseNumber: string;\n @Input() isTurnOff: string;\n @Input() caseType: string;\n\n\n bsPaymentDcnNumber: string;\n paymentGroup: IPaymentGroup;\n errorMessage: string;\n viewStatus = 'main';\n currentFee: IFee;\n totalFee: number;\n payhubHtml: SafeHtml;\n service: string = \"\";\n platForm: string = \"\";\n upPaymentErrorMessage: string;\n selectedOption:string;\n isBackButtonEnable: boolean = true;\n outStandingAmount: number;\n isFeeAmountZero: boolean = false;\n totalAfterRemission: number = 0;\n isConfirmationBtnDisabled: boolean = false;\n isRemoveBtnDisabled: boolean = false;\n isPaymentExist: boolean = false;\n isRemissionsExist: Boolean = false;\n isRemissionsMatch = false;\n isStrategicFixEnable: boolean;\n\n constructor(\n private router: Router,\n private bulkScaningPaymentService: BulkScaningPaymentService,\n private location: Location,\n private paymentViewService: PaymentViewService,\n private paymentLibComponent: PaymentLibComponent,\n private OrderslistService: OrderslistService\n ) {}\n\n ngOnInit() {\n this.viewStatus = 'main';\n this.caseType = this.paymentLibComponent.CASETYPE;\n this.bsPaymentDcnNumber = this.paymentLibComponent.bspaymentdcn;\n this.selectedOption = this.paymentLibComponent.SELECTED_OPTION.toLocaleLowerCase();\n this.isStrategicFixEnable = this.paymentLibComponent.ISSFENABLE;\n this.OrderslistService.setCaseType(this.paymentLibComponent.CASETYPE);\n\n this.platForm = 'Antenna';\n\n this.paymentViewService.getBSfeature().subscribe(\n features => {\n let result = JSON.parse(features).filter(feature => feature.uid === BS_ENABLE_FLAG);\n this.paymentLibComponent.ISBSENABLE = result[0] ? result[0].enable : false;\n },\n err => {\n this.paymentLibComponent.ISBSENABLE = false;\n }\n );\n if (this.bsPaymentDcnNumber) {\n this.getUnassignedPaymentlist();\n }\n this.getPaymentGroup();\n }\n\n getUnassignedPaymentlist() {\n if (this.selectedOption === 'dcn') {\n this.bulkScaningPaymentService.getBSPaymentsByDCN(this.paymentLibComponent.DCN_NUMBER).subscribe(\n unassignedPayments => {\n if(unassignedPayments['data'].payments) {\n this.service = unassignedPayments['data'].responsible_service_id;\n } else {\n this.upPaymentErrorMessage = 'error';\n }\n },\n (error: any) => this.upPaymentErrorMessage = error\n );\n } else {\n this.bulkScaningPaymentService.getBSPaymentsByCCD(this.ccdCaseNumber).subscribe(\n unassignedPayments => {\n if(unassignedPayments['data'].payments) {\n this.service = unassignedPayments['data'].responsible_service_id;\n } else {\n this.upPaymentErrorMessage = 'error';\n }\n },\n (error: any) => this.upPaymentErrorMessage = error\n );\n }\n\n }\n\n getRemissionByFeeCode(feeCode: string): IRemission {\n if (this.paymentGroup && this.paymentGroup.remissions && this.paymentGroup.remissions.length > 0) {\n for (const remission of this.paymentGroup.remissions) {\n if (remission.fee_code === feeCode) {\n return remission;\n }\n }\n }\n return null;\n }\n\n addRemission(fee: IFee) {\n this.currentFee = fee;\n this.viewStatus = 'add_remission';\n }\n\n getPaymentGroup() {\n let fees = [];\n this.paymentViewService.getPaymentGroupDetails(this.paymentGroupRef).subscribe(\n paymentGroup => {\n this.paymentGroup = paymentGroup;\n this.isPaymentExist = paymentGroup.payments ? paymentGroup.payments.length > 0 : false;\n this.isRemissionsExist = paymentGroup.remissions ? paymentGroup.remissions.length > 0 : false;\n\n if (paymentGroup.fees) {\n paymentGroup.fees.forEach(fee => {\n this.totalAfterRemission = this.totalAfterRemission + fee.net_amount;\n if(fee.calculated_amount === 0) {\n this.isFeeAmountZero = true;\n }\n if(paymentGroup.remissions) {\n this.isRemissionsMatch = false;\n paymentGroup.remissions.forEach(rem => {\n if(rem.fee_code === fee.code) {\n this.isRemissionsMatch = true;\n fee['remissions'] = rem;\n fees.push(fee);\n }\n });\n\n if(!this.isRemissionsMatch) {\n fees.push(fee);\n }\n } else {\n fees.push(fee);\n }\n });\n paymentGroup.fees = fees;\n }\n\n this.outStandingAmount = this.bulkScaningPaymentService.calculateOutStandingAmount(paymentGroup);\n },\n (error: any) => this.errorMessage = error.replace(/\"/g,\"\")\n );\n }\n\n confirmRemoveFee(fee: IFee){\n this.isRemoveBtnDisabled = false;\n this.currentFee = fee;\n this.viewStatus = 'feeRemovalConfirmation';\n }\n\n removeFee(fee: any){\n this.isRemoveBtnDisabled = true;\n this.paymentViewService.deleteFeeFromPaymentGroup(fee).subscribe(\n (success: any) => {\n if (this.paymentGroup.fees && this.paymentGroup.fees.length > 1){\n this.totalAfterRemission = 0;\n this.getPaymentGroup();\n this.viewStatus = 'main';\n return;\n }\n this.loadCaseTransactionPage();\n },\n (error: any) => {\n this.errorMessage = error;\n this.isRemoveBtnDisabled = false;\n }\n );\n }\n\n loadCaseTransactionPage() {\n this.paymentLibComponent.TAKEPAYMENT = true;\n this.paymentLibComponent.viewName = 'case-transactions';\n this.paymentViewService.getBSfeature().subscribe(\n features => {\n let result = JSON.parse(features).filter(feature => feature.uid === BS_ENABLE_FLAG);\n this.paymentLibComponent.ISBSENABLE = result[0] ? result[0].enable : false;\n },\n err => {\n this.paymentLibComponent.ISBSENABLE = false;\n }\n );\n\n let partUrl = `selectedOption=${this.paymentLibComponent.SELECTED_OPTION}`;\n partUrl +=this.bsPaymentDcnNumber ? `&dcn=${this.bsPaymentDcnNumber}` : '';\n partUrl +=this.paymentLibComponent.ISBSENABLE ? '&isBulkScanning=Enable' : '&isBulkScanning=Disable';\n partUrl +=this.paymentLibComponent.ISTURNOFF ? '&isTurnOff=Enable' : '&isTurnOff=Disable';\n partUrl +=this.paymentLibComponent.ISSFENABLE ? '&isStFixEnable=Enable' : '&isStFixEnable=Disable';\n partUrl +=`&caseType=${this.paymentLibComponent.CASETYPE}`;\n\n let url = `/payment-history/${this.ccdCaseNumber}?view=case-transactions&takePayment=true&${partUrl}`;\n this.router.navigateByUrl(url);\n }\n cancelRemission() {\n this.viewStatus = 'main';\n }\n redirectToFeeSearchPage(event: any, page?: string) {\n event.preventDefault();\n let partUrl =this.bsPaymentDcnNumber ? `&dcn=${this.bsPaymentDcnNumber}` : '';\n partUrl +=this.paymentLibComponent.ISBSENABLE ? '&isBulkScanning=Enable' : '&isBulkScanning=Disable';\n partUrl +=this.paymentLibComponent.ISTURNOFF ? '&isTurnOff=Enable' : '&isTurnOff=Disable';\n partUrl +=this.paymentLibComponent.ISSFENABLE ? '&isStFixEnable=Enable' : '&isStFixEnable=Disable';\n partUrl +=`&caseType=${this.paymentLibComponent.CASETYPE}`;\n\n if(this.viewStatus === 'feeRemovalConfirmation' || this.viewStatus === 'add_remission') {\n this.viewStatus = 'main';\n return;\n }\n let url = `/fee-search?ccdCaseNumber=${this.ccdCaseNumber}&selectedOption=${this.paymentLibComponent.SELECTED_OPTION}&paymentGroupRef=${this.paymentGroupRef}${partUrl}`;\n this.router.navigateByUrl(url);\n }\n takePayment() {\n this.isConfirmationBtnDisabled = true;\n const requestBody = new PaymentToPayhubRequest(this.ccdCaseNumber, this.outStandingAmount, this.caseType),\n antennaReqBody = new PayhubAntennaRequest(this.ccdCaseNumber, this.outStandingAmount, this.caseType);\n\n if(this.platForm === 'Antenna') {\n\n this.paymentViewService.postPaymentAntennaToPayHub(antennaReqBody, this.paymentGroupRef).subscribe(\n response => {\n this.isBackButtonEnable=false;\n window.location.href = '/makePaymentByTelephoneyProvider';\n },\n (error: any) => {\n this.errorMessage = error;\n this.isConfirmationBtnDisabled = false;\n this.router.navigateByUrl('/pci-pal-failure');\n }\n );\n }\n\n }\n\n goToAllocatePage(outStandingAmount: number, isFeeAmountZero: Boolean) {\n if (outStandingAmount > 0 || (outStandingAmount === 0 && isFeeAmountZero)) {\n this.paymentLibComponent.paymentGroupReference = this.paymentGroupRef;\n this.paymentLibComponent.viewName = 'allocate-payments';\n } else {\n this.loadCaseTransactionPage();\n }\n }\n isCheckAmountdueExist(amountDue: any) {\n return typeof amountDue === 'undefined';\n }\n}\n","import { Component, OnInit, Input } from '@angular/core';\n\n\n\n@Component({\n selector: 'ccpay-error-banner',\n templateUrl: './error-banner.component.html',\n styleUrls: ['./error-banner.component.scss']\n})\n\nexport class ErrorBannerComponent implements OnInit {\n @Input('errorMessage') errorMessage;\n\n constructor(\n ) {}\n\n ngOnInit() {\n\n }\n}\n","\nexport class UnidentifiedPaymentsRequest {\n payment_allocation_status: any;\n payment_group_reference: string;\n payment_reference: string;\n unidentified_reason: string;\n\n constructor(payment_group_reference: string, payment_reference : string, unidentified_reason: any) {\n this.payment_allocation_status = {\n description: '',\n name: \"Unidentified\"\n };\n this.payment_group_reference = payment_group_reference ;\n this.payment_reference= payment_reference;\n this.unidentified_reason= unidentified_reason;\n\n }\n\n\n\n}\n","import { IBSPayments } from \"./IBSPayments\";\n\nexport class AllocatePaymentRequest {\n amount: Number;\n banked_date: String;\n ccd_case_number: String;\n exception_record: string;\n currency: String;\n document_control_number: String;\n external_provider: String;\n giro_slip_no: String;\n payer_name: String;\n payment_channel: Object;\n payment_status: Object;\n payment_method: String;\n case_type: String;\n payment_allocation_dto?: {\n allocation_reason: String,\n allocation_status: String,\n explanation: String,\n payment_allocation_status: Object,\n payment_group_reference: String,\n payment_reference: String,\n reason: String,\n receiving_office: String,\n unidentified_reason: String,\n user_id: String,\n user_name: String,\n case_type: String\n }\n\n constructor(ccd_case_number : string, unAllocatedPayment: IBSPayments, caseType: string, exceptionRecord: string, allocatedRequest?: any) {\n this.amount = unAllocatedPayment.amount;\n this.banked_date = unAllocatedPayment.date_banked;\n this.ccd_case_number = ccd_case_number;\n this.exception_record = exceptionRecord;\n this.currency= unAllocatedPayment.currency;\n this.document_control_number = unAllocatedPayment.dcn_reference;\n this.external_provider = 'exela';\n this.giro_slip_no = unAllocatedPayment.bgc_reference;\n this.payer_name = unAllocatedPayment.payer_name;\n this.payment_channel = {\n description: '',\n name: 'bulk scan'\n };\n this.payment_status ={\n description: 'bulk scan payment completed',\n name: 'success'\n }\n this.payment_method = unAllocatedPayment.payment_method;\n this.case_type= caseType;\n if(allocatedRequest) {\n this.payment_allocation_dto = allocatedRequest;\n }\n\n }\n}\n","import { Component, OnInit, Input } from '@angular/core';\nimport { FormBuilder, FormGroup, Validators, FormControl } from '@angular/forms';\nimport { PaymentLibComponent } from '../../payment-lib.component';\nimport { PaymentViewService } from '../../services/payment-view/payment-view.service';\nimport {BulkScaningPaymentService} from '../../services/bulk-scaning-payment/bulk-scaning-payment.service';\nimport { IBSPayments } from '../../interfaces/IBSPayments';\nimport { UnidentifiedPaymentsRequest } from '../../interfaces/UnidentifiedPaymentsRequest';\nimport { AllocatePaymentRequest } from '../../interfaces/AllocatePaymentRequest';\n\n@Component({\n selector: 'app-mark-unidentified-payment',\n templateUrl: './mark-unidentified-payment.component.html',\n styleUrls: ['./mark-unidentified-payment.component.scss']\n})\nexport class MarkUnidentifiedPaymentComponent implements OnInit {\n @Input() caseType: string;\n markPaymentUnidentifiedForm: FormGroup;\n viewStatus: string;\n ccdCaseNumber: string;\n bspaymentdcn: string;\n isInvesticationDetailEmpty: boolean = false;\n investicationDetailHasError: boolean = false;\n investicationDetailMinHasError: boolean = false;\n investicationDetailMaxHasError: boolean = false;\n errorMessage = this.getErrorMessage(false);\n unassignedRecord:IBSPayments;\n siteID: string = null;\n investigationComment: string;\n isConfirmButtondisabled:Boolean = false;\n ccdReference: string = null;\n exceptionReference: string = null;\n isStrategicFixEnable: boolean = true;\n\n constructor(private formBuilder: FormBuilder,\n private paymentViewService: PaymentViewService,\n private paymentLibComponent: PaymentLibComponent,\n private bulkScaningPaymentService: BulkScaningPaymentService) { }\n\n ngOnInit() {\n this.viewStatus = 'mainForm';\n this.ccdCaseNumber = this.paymentLibComponent.CCD_CASE_NUMBER;\n this.bspaymentdcn = this.paymentLibComponent.bspaymentdcn;\n this.isStrategicFixEnable = this.paymentLibComponent.ISSFENABLE;\n this.getUnassignedPayment();\n\n this.markPaymentUnidentifiedForm = this.formBuilder.group({\n investicationDetail: new FormControl('', Validators.compose([\n Validators.required,\n Validators.minLength(3),\n Validators.maxLength(255),\n Validators.pattern('^([a-zA-Z0-9\\\\s,\\\\.]*)$')\n ]))\n });\n }\n getUnassignedPayment() {\n this.bulkScaningPaymentService.getBSPaymentsByDCN(this.bspaymentdcn).subscribe(\n unassignedPayments => {\n this.errorMessage = this.getErrorMessage(false);\n this.unassignedRecord = unassignedPayments['data'].payments.filter(payment => {\n return payment && payment.dcn_reference == this.bspaymentdcn;\n })[0];\n this.siteID = unassignedPayments['data'].responsible_service_id;\n const beCcdNumber = unassignedPayments['data'].ccd_reference,\n beExceptionNumber = unassignedPayments['data'].exception_record_reference,\n exceptionReference = beCcdNumber ? beCcdNumber === this.ccdCaseNumber ? null : this.ccdCaseNumber : this.ccdCaseNumber;\n this.ccdReference = beCcdNumber ? beCcdNumber : null;\n this.exceptionReference = beExceptionNumber ? beExceptionNumber : exceptionReference;\n },\n (error: any) => {\n this.errorMessage = this.getErrorMessage(true);\n }\n );\n }\n trimUnderscore(method: string){\n return this.bulkScaningPaymentService.removeUnwantedString(method,' ');\n }\n saveAndContinue() {\n this.resetForm([false, false, false, false]);\n const investicationField = this.markPaymentUnidentifiedForm.controls.investicationDetail;\n const formerror = investicationField.errors;\n if (this.markPaymentUnidentifiedForm.dirty && this.markPaymentUnidentifiedForm.valid) {\n this.investigationComment = this.markPaymentUnidentifiedForm.controls.investicationDetail.value;\n this.viewStatus = 'unidentifiedContinueConfirm';\n }else {\n if(investicationField.value == '' ) {\n this.resetForm([true, false, false, false]);\n }\n if(investicationField.value != '' && investicationField.invalid ) {\n this.resetForm([false, true, false, false]);\n }\n if(formerror && formerror.minlength && formerror.minlength.actualLength < 3 ) {\n this.resetForm([false, false, true, false]);\n }\n if(formerror && formerror.maxlength && formerror.maxlength.actualLength > 255 ) {\n this.resetForm([false, false, false, true]);\n }\n }\n }\n resetForm(val) {\n this.isInvesticationDetailEmpty = val[0];\n this.investicationDetailHasError = val[1];\n this.investicationDetailMinHasError = val[2];\n this.investicationDetailMaxHasError = val[3];\n }\n confirmPayments() {\n this.isConfirmButtondisabled = true;\n const reason = this.markPaymentUnidentifiedForm.get('investicationDetail').value;\n\n if(!this.isStrategicFixEnable) {\n let allocatedRequest = {\n allocation_status:'Unidentified',\n payment_allocation_status: {\n description: '',\n name: 'Unidentified'\n },\n unidentified_reason: reason,\n user_id: this.caseType,\n }\n const postStrategicBody = new AllocatePaymentRequest\n (this.ccdReference, this.unassignedRecord, this.caseType, this.exceptionReference, allocatedRequest);\n this.bulkScaningPaymentService.postBSWoPGStrategic(postStrategicBody).subscribe(\n res => {\n this.errorMessage = this.getErrorMessage(false);\n let response = JSON.parse(res);\n if (response.success) {\n this.gotoCasetransationPage();\n }\n },\n (error: any) => {\n this.errorMessage = this.getErrorMessage(true);\n this.isConfirmButtondisabled = false;\n });\n } else {\n this.bulkScaningPaymentService.patchBSChangeStatus(this.unassignedRecord.dcn_reference, 'PROCESSED').subscribe(\n res1 => {\n this.errorMessage = this.getErrorMessage(false);\n const requestBody = new AllocatePaymentRequest\n (this.ccdReference, this.unassignedRecord, this.siteID, this.exceptionReference)\n this.paymentViewService.postBSPayments(requestBody).subscribe(\n res2 => {\n this.errorMessage = this.getErrorMessage(false);\n const response2 = JSON.parse(res2),\n reqBody = new UnidentifiedPaymentsRequest\n (response2['data'].payment_group_reference, response2['data'].reference, reason);\n if (response2.success) {\n this.paymentViewService.postBSUnidentifiedPayments(reqBody).subscribe(\n res3 => {\n this.errorMessage = this.getErrorMessage(false);\n const response3 = JSON.parse(res3);\n if (response3.success) {\n this.gotoCasetransationPage();\n }\n },\n (error: any) => {\n this.bulkScaningPaymentService.patchBSChangeStatus(this.unassignedRecord.dcn_reference, 'COMPLETE').subscribe();\n this.errorMessage = this.getErrorMessage(true);\n this.isConfirmButtondisabled = false;\n }\n );\n }\n },\n (error: any) => {\n this.bulkScaningPaymentService.patchBSChangeStatus(this.unassignedRecord.dcn_reference, 'COMPLETE').subscribe();\n this.errorMessage = this.getErrorMessage(true);\n this.isConfirmButtondisabled = false;\n }\n );\n },\n (error: any) => {\n this.errorMessage = this.getErrorMessage(true);\n this.isConfirmButtondisabled = false;\n }\n );\n }\n }\n cancelMarkUnidentifiedPayments(type?:string){\n if(type && type === 'cancel') {\n if(this.markPaymentUnidentifiedForm.get('investicationDetail').value!==\"\"){\n this.viewStatus = 'unidentifiedCancelConfirm';\n } else {\n this.gotoCasetransationPage();\n }\n } else {\n this.viewStatus = 'mainForm';\n }\n }\n\n gotoCasetransationPage() {\n this.paymentLibComponent.viewName = 'case-transactions';\n this.paymentLibComponent.TAKEPAYMENT = true;\n this.paymentLibComponent.ISBSENABLE = true;\n }\n getErrorMessage(isErrorExist) {\n return {\n title: \"There is a problem with the service\",\n body: \"Try again later\",\n showError: isErrorExist\n };\n }\n}\n","\nexport class UnsolicitedPaymentsRequest {\n payment_allocation_status: any;\n payment_group_reference: string;\n payment_reference: string;\n receiving_office: string;\n receiving_email_address: string;\n sending_email_address: string;\n unidentified_reason: string;\n constructor(payment_group_reference: string, payment_reference : string, reason: string,responsible_office: string, responsible_person:string,email_id: string) {\n this.payment_allocation_status = {\n description: '',\n name: \"Transferred\"\n };\n this.payment_group_reference = payment_group_reference;\n this.payment_reference= payment_reference;\n this.unidentified_reason= reason;\n this.receiving_office= responsible_office;\n this.receiving_email_address= email_id;\n this.sending_email_address= responsible_person;\n }\n}\n","import { Component, OnInit, Input } from '@angular/core';\nimport { FormBuilder, FormGroup, Validators, FormControl } from '@angular/forms';\nimport { PaymentLibComponent } from '../../payment-lib.component';\nimport { BulkScaningPaymentService } from '../../services/bulk-scaning-payment/bulk-scaning-payment.service';\nimport { IBSPayments } from '../../interfaces/IBSPayments';\nimport { UnsolicitedPaymentsRequest } from '../../interfaces/UnsolicitedPaymentsRequest';\nimport { PaymentViewService } from '../../services/payment-view/payment-view.service';\nimport { AllocatePaymentRequest } from '../../interfaces/AllocatePaymentRequest';\nimport { ErrorHandlerService } from '../../services/shared/error-handler.service';\n\n\n@Component({\n selector: 'app-mark-unsolicited-payment',\n templateUrl: './mark-unsolicited-payment.component.html',\n styleUrls: ['./mark-unsolicited-payment.component.scss']\n})\nexport class MarkUnsolicitedPaymentComponent implements OnInit {\n @Input() caseType: string;\n markPaymentUnsolicitedForm: FormGroup;\n viewStatus: string;\n reasonHasError: boolean = false;\n isReasonEmpty: boolean = false;\n reasonMinHasError: boolean = false;\n reasonMaxHasError: boolean = false;\n responsibleOfficeHasError: boolean = false;\n isResponsibleOfficeEmpty: boolean = false;\n errorMessage = this.getErrorMessage(false);\n ccdCaseNumber: string;\n bspaymentdcn: string;\n unassignedRecord: IBSPayments;\n siteID: string = null;\n reason: string;\n responsiblePerson: string;\n responsibleOffice: string;\n emailId: string;\n isConfirmButtondisabled: Boolean = false;\n isContinueButtondisabled: Boolean = false;\n ccdReference: string = null;\n exceptionReference: string = null;\n selectedSiteId: string;\n selectedSiteName: string;\n isStrategicFixEnable: boolean = true;\n siteIDList;\n\n constructor(private formBuilder: FormBuilder,\n private paymentViewService: PaymentViewService,\n private paymentLibComponent: PaymentLibComponent,\n private bulkScaningPaymentService: BulkScaningPaymentService) { }\n\n ngOnInit() {\n this.resetForm([false,false,false,false,false,false], 'all');\n this.viewStatus = 'mainForm';\n this.ccdCaseNumber = this.paymentLibComponent.CCD_CASE_NUMBER;\n this.bspaymentdcn = this.paymentLibComponent.bspaymentdcn;\n this.isStrategicFixEnable = this.paymentLibComponent.ISSFENABLE;\n this.getUnassignedPayment();\n\n this.paymentViewService.getSiteID().subscribe(\n siteids => {\n this.isContinueButtondisabled = false;\n this.errorMessage = this.getErrorMessage(false);\n this.siteIDList = JSON.parse(siteids);\n },\n err => {\n window.scrollTo(0, 0);\n this.isContinueButtondisabled = true;\n this.errorMessage = this.getErrorMessage(true);\n }\n );\n \n this.markPaymentUnsolicitedForm = this.formBuilder.group({\n reason: new FormControl('', Validators.compose([\n Validators.required,\n Validators.minLength(3),\n Validators.maxLength(255),\n Validators.pattern('^([a-zA-Z0-9\\\\s,\\\\.]*)$')\n ])),\n responsibleOffice: new FormControl('', Validators.compose([\n Validators.required,\n Validators.pattern('^([a-zA-Z0-9\\\\s\\\\n,\\\\.-:]*)$')\n ])),\n responsiblePerson: new FormControl(''),\n emailId: new FormControl('')\n });\n }\n trimUnderscore(method: string){\n return this.bulkScaningPaymentService.removeUnwantedString(method,' ');\n }\n confirmPayments() {\n this.isConfirmButtondisabled = true;\n const controls = this.markPaymentUnsolicitedForm.controls;\n if(!this.isStrategicFixEnable) {\n let allocatedRequest = {\n allocation_status:'Transferred',\n payment_allocation_status: {\n description: '',\n name: 'Transferred'\n },\n unidentified_reason: controls.reason.value,\n receiving_office: this.selectedSiteId,\n user_id: this.caseType,\n }\n const postStrategicBody = new AllocatePaymentRequest\n (this.ccdReference, this.unassignedRecord, this.caseType, this.exceptionReference, allocatedRequest);\n this.bulkScaningPaymentService.postBSWoPGStrategic(postStrategicBody).subscribe(\n res => {\n this.errorMessage = this.getErrorMessage(false);\n let response = JSON.parse(res);\n if (response.success) {\n this.gotoCasetransationPage();\n }\n },\n (error: any) => {\n this.errorMessage = this.getErrorMessage(true);\n this.isConfirmButtondisabled = false;\n });\n } else {\n // controls.responsibleOffice.setValue('P219');\n this.bulkScaningPaymentService.patchBSChangeStatus(this.unassignedRecord.dcn_reference, 'PROCESSED').subscribe(\n res1 => {\n this.errorMessage = this.getErrorMessage(false);\n const response1 = JSON.parse(res1),\n requestBody = new AllocatePaymentRequest\n (this.ccdReference, this.unassignedRecord, this.siteID, this.exceptionReference)\n this.paymentViewService.postBSPayments(requestBody).subscribe(\n res2 => {\n this.errorMessage = this.getErrorMessage(false);\n const response2 = JSON.parse(res2),\n reqBody = new UnsolicitedPaymentsRequest\n (response2['data'].payment_group_reference, response2['data'].reference, controls.reason.value, this.selectedSiteId, controls.responsiblePerson.value, controls.emailId.value);\n if (response2.success) {\n this.paymentViewService.postBSUnsolicitedPayments(reqBody).subscribe(\n res3 => {\n this.errorMessage = this.getErrorMessage(false);\n const response3 = JSON.parse(res3);\n if (response3.success) {\n this.gotoCasetransationPage();\n }\n },\n (error: any) => {\n this.bulkScaningPaymentService.patchBSChangeStatus(this.unassignedRecord.dcn_reference, 'COMPLETE').subscribe();\n this.errorMessage = this.getErrorMessage(true);\n this.isConfirmButtondisabled = false;\n }\n );\n }\n },\n (error: any) => {\n this.bulkScaningPaymentService.patchBSChangeStatus(this.unassignedRecord.dcn_reference, 'COMPLETE').subscribe();\n this.errorMessage = this.getErrorMessage(true);\n this.isConfirmButtondisabled = false;\n }\n );\n },\n (error: any) => {\n this.errorMessage = this.getErrorMessage(true);\n this.isConfirmButtondisabled = false;\n }\n );\n }\n }\n saveAndContinue() {\n this.resetForm([false,false,false,false,false,false], 'all');\n const formerror = this.markPaymentUnsolicitedForm.controls.reason.errors;\n const reasonField = this.markPaymentUnsolicitedForm.controls.reason;\n //const officeIdField = this.selectedSiteId;\n const officeIdField = this.markPaymentUnsolicitedForm.controls.responsibleOffice;\n if (this.markPaymentUnsolicitedForm.dirty && this.markPaymentUnsolicitedForm.valid) {\n const controls = this.markPaymentUnsolicitedForm.controls;\n this.emailId = controls.emailId.value;\n this.responsibleOffice = officeIdField.value;\n this.responsiblePerson = controls.responsiblePerson.value;\n this.reason = controls.reason.value;\n this.viewStatus = 'unsolicitedContinueConfirm';\n }else {\n if( reasonField.value == '' ) {\n this.resetForm([true,false,false,false,false,false], 'reason');\n }\n if(reasonField.value != '' && this.markPaymentUnsolicitedForm.controls.reason.invalid ) {\n this.resetForm([false,true,false,false,false,false], 'reason');\n }\n if(formerror && formerror.minlength && formerror.minlength.actualLength < 3 ) {\n this.resetForm([false,false,true,false,false,false], 'reason');\n }\n if(formerror && formerror.maxlength && formerror.maxlength.actualLength > 255 ) {\n this.resetForm([false,false,false,true,false,false], 'reason');\n }\n if(officeIdField.value == '') {\n this.resetForm([false,false,false,false,true,false], 'responsibleOffice');\n }\n if(officeIdField.value != '' && officeIdField.invalid) {\n this.resetForm([false,false,false,false,false,true],'responsibleOffice');\n }\n }\n }\n resetForm(val, field) {\n if(field==='reason' || field==='all') {\n this.isReasonEmpty = val[0];\n this.reasonHasError = val[1];\n this.reasonMinHasError = val[2];\n this.reasonMaxHasError = val[3];\n }\n if(field==='responsibleOffice' || field==='all') {\n this.isResponsibleOfficeEmpty = val[4];\n this.responsibleOfficeHasError = val[5];\n }\n }\n\ncancelMarkUnsolicitedPayments(type?:string){\n if(type && type === 'cancel') {\n if(this.checkingFormValue()){\n this.viewStatus = 'unsolicitedCancelConfirm';\n } else {\n this.gotoCasetransationPage();\n }\n } else {\n this.markPaymentUnsolicitedForm.controls.responsibleOffice.setValue('');\n this.viewStatus = 'mainForm';\n }\n }\n checkingFormValue(){\n const formFields = this.markPaymentUnsolicitedForm.value;\n let valueExists = false;\n\n for (var field in formFields) {\n if (formFields.hasOwnProperty(field) && formFields[field] !==\"\") {\n valueExists = true;\n break;\n }\n }\n return valueExists;\n }\n gotoCasetransationPage() {\n this.paymentLibComponent.viewName = 'case-transactions';\n this.paymentLibComponent.TAKEPAYMENT = true;\n this.paymentLibComponent.ISBSENABLE = true;\n }\n getUnassignedPayment() {\n this.bulkScaningPaymentService.getBSPaymentsByDCN(this.bspaymentdcn).subscribe(\n unassignedPayments => {\n \n this.unassignedRecord = unassignedPayments['data'].payments.filter(payment => {\n return payment && payment.dcn_reference == this.bspaymentdcn;\n })[0];\n this.siteID = unassignedPayments['data'].responsible_service_id;\n const beCcdNumber = unassignedPayments['data'].ccd_reference,\n beExceptionNumber = unassignedPayments['data'].exception_record_reference,\n exceptionReference = beCcdNumber ? beCcdNumber === this.ccdCaseNumber ? null : this.ccdCaseNumber : this.ccdCaseNumber;\n this.ccdReference = beCcdNumber ? beCcdNumber : null;\n this.exceptionReference = beExceptionNumber ? beExceptionNumber : exceptionReference;\n },\n (error: any) => {\n this.errorMessage = this.getErrorMessage(true);\n }\n );\n }\n\n getErrorMessage(isErrorExist) {\n return {\n title: \"Something went wrong.\",\n body: \"Please try again later.\",\n showError: isErrorExist\n };\n }\n\n selectchange(args){ \n this.selectedSiteId = args.target.value; \n this.selectedSiteName = args.target.options[args.target.selectedIndex].text; \n } \n\n}\n","import { Component, OnInit, Output,Input, EventEmitter } from '@angular/core';\nimport { BulkScaningPaymentService } from '../../services/bulk-scaning-payment/bulk-scaning-payment.service';\nimport { PaymentLibComponent } from '../../payment-lib.component';\nimport { IBSPayments } from '../../interfaces/IBSPayments';\nimport {Router} from '@angular/router';\nimport { PaymentViewService } from '../../services/payment-view/payment-view.service';\nimport { OrderslistService } from '../../services/orderslist.service';\n\n@Component({\n selector: 'ccpay-app-unprocessed-payments',\n templateUrl: './unprocessed-payments.component.html',\n styleUrls: ['./unprocessed-payments.component.scss']\n})\nexport class UnprocessedPaymentsComponent implements OnInit {\n\n @Input('FEE_RECORDS_EXISTS') FEE_RECORDS_EXISTS: boolean;\n @Input('PAYMENTREF') PAYMENTREF: string;\n @Input('ISTURNOFF') ISTURNOFF: boolean;\n @Input('IS_BUTTON_ENABLE') IS_BUTTON_ENABLE: boolean;\n @Input('IS_OS_AMT_AVAILABLE') IS_OS_AMT_AVAILABLE: boolean;\n @Input('ISSFENABLE') ISSFENABLE: boolean;\n @Input('PAYMENTSLENGTH') PAYMENTSLENGTH:Number;\n @Input('LEVEL')LEVEL:Number;\n\n @Output() selectedUnprocessedFeeEvent: EventEmitter<string> = new EventEmitter();\n @Output() getUnprocessedFeeCount: EventEmitter<string> = new EventEmitter();\n\n viewStatus = 'main';\n unassignedRecordList: IBSPayments;\n upPaymentErrorMessage: string = null;\n ccdCaseNumber: string;\n recordId: string = null;\n isRecordExist: boolean = false;\n dcnNumber: string = null;\n selectedOption: string;\n isUnprocessedRecordSelected: boolean = true;\n isAllocateToExistingFeebtnEnabled: boolean = false;\n isMarkAsUnidentifiedbtnEnabled: boolean = false;\n isAllocatedToNewFeebtnEnabled: boolean = false;\n isExceptionCase: boolean = false;\n serviceId: string = null;\n isBulkScanEnable;\n isTurnOff: boolean = true;\n isStFixEnable;\n unassignedRecordSelectedList: IBSPayments;\n unassignedRecordListLength: number = 0;\n showContent: boolean;\n\n constructor(private router: Router,\n private bulkScaningPaymentService: BulkScaningPaymentService,\n private paymentLibComponent: PaymentLibComponent,\n private paymentViewService: PaymentViewService,\n private OrderslistService: OrderslistService\n ) { }\n\n ngOnInit() {\n // Todo ...\n this.ccdCaseNumber = this.paymentLibComponent.CCD_CASE_NUMBER;\n this.selectedOption = this.paymentLibComponent.SELECTED_OPTION.toLocaleLowerCase();\n this.dcnNumber = this.paymentLibComponent.DCN_NUMBER;\n this.isBulkScanEnable = this.paymentLibComponent.ISBSENABLE;\n this.isTurnOff = this.paymentLibComponent.ISTURNOFF;\n this.isStFixEnable = this.paymentLibComponent.ISSFENABLE;\n this.OrderslistService.getFeeExists().subscribe( (data) => this.FEE_RECORDS_EXISTS = data);\n this.getUnassignedPaymentlist();\n\n }\n\n getUnassignedPaymentlist() {\n if (this.selectedOption === 'dcn') {\n this.bulkScaningPaymentService.getBSPaymentsByDCN(this.dcnNumber).subscribe(\n unassignedPayments => {\n // unassignedPayments['data'].map(data => data.expandable=false);\n if(unassignedPayments['data'] && unassignedPayments['data'].payments) {\n this.setValuesForUnassignedRecord(unassignedPayments['data']);\n } else if(unassignedPayments['payments']) {\n this.setValuesForUnassignedRecord(unassignedPayments);\n } else {\n this.upPaymentErrorMessage = 'error';\n this.getUnprocessedFeeCount.emit('0');\n }\n },\n (error: any) => {\n this.upPaymentErrorMessage = error;\n this.getUnprocessedFeeCount.emit('0');\n }\n );\n } else {\n this.bulkScaningPaymentService.getBSPaymentsByCCD(this.ccdCaseNumber).subscribe(\n unassignedPayments => {\n // unassignedPayments['data'].map(data => data.expandable=false);\n if(unassignedPayments['data'] && unassignedPayments['data'].payments) {\n this.setValuesForUnassignedRecord(unassignedPayments['data']);\n } else if(unassignedPayments['payments']) {\n this.setValuesForUnassignedRecord(unassignedPayments);\n } else {\n this.upPaymentErrorMessage = 'error';\n this.getUnprocessedFeeCount.emit('0');\n }\n },\n (error: any) => {\n this.upPaymentErrorMessage = error;\n this.getUnprocessedFeeCount.emit('0');\n }\n );\n }\n\n }\n\n setValuesForUnassignedRecord(unassignedPayments) {\n\n this.unassignedRecordList = unassignedPayments.payments;\n if(this.unassignedRecordList){\n this.unassignedRecordListLength = unassignedPayments.payments.length\n }\n this.serviceId = unassignedPayments.responsible_service_id;\n if (unassignedPayments['ccd_reference'] === undefined) {\n this.isExceptionCase = true;\n }\n // this.isRecordExist = this.unassignedRecordList.length === 0;\n this.getUnprocessedFeeCount.emit(<any>this.unassignedRecordList.length);\n this.unprocessedPaymentSelectEvent(this.unassignedRecordList);\n }\n\n formatUnassignedRecordId(ID: Number) {\n return `unassignrecord-${ID}`;\n }\n\n trimUnderscore(method: string){\n return this.bulkScaningPaymentService.removeUnwantedString(method,' ');\n }\n\n redirectToFeeSearchPage(event: any, dcn_reference:any) {\n event.preventDefault();\n this.recordId = dcn_reference;\n let url = this.isBulkScanEnable ? '&isBulkScanning=Enable' : '&isBulkScanning=Disable';\n url += this.ISTURNOFF ? '&isTurnOff=Enable' : '&isTurnOff=Disable';\n url += this.isStFixEnable ? '&isStFixEnable=Enable' : '&isStFixEnable=Disable';\n url +=`&caseType=${this.paymentLibComponent.CASETYPE}`;\n\n this.router.navigateByUrl(`/fee-search?selectedOption=${this.selectedOption}&ccdCaseNumber=${this.ccdCaseNumber}&dcn=${this.recordId}${url}`);\n }\n\n loadUnsolicitedPage(viewName: string, dcn_reference:any) {\n this.recordId = dcn_reference;\n this.paymentLibComponent.bspaymentdcn = this.recordId;\n this.paymentLibComponent.viewName = viewName;\n }\n\n unprocessedPaymentSelectEvent(selectedRecordReference: any) {\n this.isUnprocessedRecordSelected = true;\n this.validateButtons();\n this.selectedUnprocessedFeeEvent.emit(selectedRecordReference);\n }\n\n resetButtons() {\n this.isUnprocessedRecordSelected = false;\n this.isAllocateToExistingFeebtnEnabled = false;\n this.isMarkAsUnidentifiedbtnEnabled = false;\n this.isAllocatedToNewFeebtnEnabled = false;\n }\n\n goToAllocatePage(dcn_reference:any) {\n this.paymentLibComponent.bspaymentdcn = dcn_reference;\n this.paymentLibComponent.unProcessedPaymentServiceId = this.serviceId\n this.paymentLibComponent.isTurnOff = this.ISTURNOFF;\n this.paymentLibComponent.ISSFENABLE = this.isStFixEnable;\n\n if(this.ISTURNOFF) {\n this.paymentLibComponent.paymentGroupReference = this.PAYMENTREF;\n this.paymentLibComponent.viewName = 'fee-summary';\n }else {\n this.paymentLibComponent.paymentGroupReference = null;\n this.paymentLibComponent.viewName = 'allocate-payments';\n }\n\n }\n\n validateButtons() {\n if ( this.isUnprocessedRecordSelected && this.isExceptionCase) {\n this.isMarkAsUnidentifiedbtnEnabled = true;\n } else if ( this.isUnprocessedRecordSelected && !this.isExceptionCase && this.FEE_RECORDS_EXISTS!== null && !this.FEE_RECORDS_EXISTS) {\n this.isAllocateToExistingFeebtnEnabled = false;\n this.isAllocatedToNewFeebtnEnabled = true;\n } else if( this.isUnprocessedRecordSelected && !this.isExceptionCase && (this.FEE_RECORDS_EXISTS === null || this.FEE_RECORDS_EXISTS) ) {\n if(!this.ISTURNOFF) {\n this.isAllocateToExistingFeebtnEnabled = true;\n this.isAllocatedToNewFeebtnEnabled = false;\n } else {\n this.isAllocateToExistingFeebtnEnabled = this.IS_OS_AMT_AVAILABLE;\n this.isAllocatedToNewFeebtnEnabled = true;\n }\n }\n }\n\n unprocessedPaymentUnSelectEvent(event: any) {\n event.preventDefault();\n this.recordId = null;\n this.isUnprocessedRecordSelected = false;\n this.isAllocateToExistingFeebtnEnabled = false;\n this.isAllocatedToNewFeebtnEnabled = false;\n this.isMarkAsUnidentifiedbtnEnabled = false;\n //this.validateButtons();\n this.selectedUnprocessedFeeEvent.emit('');\n }\n\n showDetailRow(event: any,obj: any, i: any) {\n event.preventDefault();\n\n this.unassignedRecordSelectedList = obj;\n\n }\n}\n","import { Component, OnInit, Input, Output, EventEmitter } from '@angular/core';\nimport { BulkScaningPaymentService } from '../../services/bulk-scaning-payment/bulk-scaning-payment.service';\nimport {IPayment} from '../../interfaces/IPayment';\nimport {Router} from '@angular/router';\n\n@Component({\n selector: 'ccpay-app-processed-payments',\n templateUrl: './processed-payments.component.html',\n styleUrls: ['./processed-payments.component.scss']\n})\nexport class ProcessedPaymentsComponent implements OnInit {\n\n @Input('NONPAYMENTS') NONPAYMENTS: IPayment[];\n @Output() goToPaymentViewComponent: EventEmitter<any> = new EventEmitter();\n\n constructor(\n private router: Router,\n private bulkScaningPaymentService: BulkScaningPaymentService\n ) { }\n ngOnInit() {\n }\n\n trimUnderscore(method: string){\n return this.bulkScaningPaymentService.removeUnwantedString(method,' ');\n }\n redirectToPaymentViewPage(paymentGroupReference: string, paymentReference: string, paymentMethod: string) {\n this.goToPaymentViewComponent.emit({paymentGroupReference, paymentReference, paymentMethod});\n }\n}\n","\nexport class IAllocationPaymentsRequest {\n payment_allocation_status: any;\n payment_group_reference: string;\n payment_reference: string;\n reason: string;\n explanation: string;\n user_name: string;\n constructor(payment_group_reference: string, payment_reference : string, reason? : string, explanation? : string, userName? : string) {\n this.payment_allocation_status = {\n description: '',\n name: \"Allocated\"\n };\n this.payment_group_reference = payment_group_reference;\n this.payment_reference= payment_reference;\n this.reason = reason ? reason : null;\n this.explanation = explanation ? explanation : null;\n this.user_name = userName ? userName : null;\n }\n}\n","import { Component, OnInit, Input } from '@angular/core';\nimport { FormBuilder, FormGroup, Validators, FormControl } from '@angular/forms';\nimport { PaymentLibComponent } from '../../payment-lib.component';\nimport { PaymentViewService } from '../../services/payment-view/payment-view.service';\nimport {CaseTransactionsService} from '../../services/case-transactions/case-transactions.service'; \nimport {BulkScaningPaymentService} from '../../services/bulk-scaning-payment/bulk-scaning-payment.service';\nimport { ErrorHandlerService } from '../../services/shared/error-handler.service';\nimport {IPaymentGroup} from '../../interfaces/IPaymentGroup';\nimport {IBSPayments} from '../../interfaces/IBSPayments';\nimport {AllocatePaymentRequest} from '../../interfaces/AllocatePaymentRequest';\nimport {IAllocationPaymentsRequest} from '../../interfaces/IAllocationPaymentsRequest';\nimport { IOrderReferenceFee } from '../../interfaces/IOrderReferenceFee';\nimport { OrderslistService } from '../../services/orderslist.service';\n\n\n\n@Component({\n selector: 'app-allocate-payments',\n templateUrl: './allocate-payments.component.html',\n styleUrls: ['./allocate-payments.component.scss']\n})\nexport class AllocatePaymentsComponent implements OnInit {\n @Input() isTurnOff: boolean;\n @Input() caseType: string;\n\n overUnderPaymentForm: FormGroup;\n viewStatus: string;\n ccdCaseNumber: string;\n bspaymentdcn: string;\n recordId:string;\n feedbackUrlLabel:string;\n unAllocatedPayment: IBSPayments = {\n amount: 0\n };\n siteID: string = null;\n errorMessage = this.errorHandlerService.getServerErrorMessage(false, false, '');\n paymentGroup: IPaymentGroup;\n paymentGroups: IPaymentGroup[] = [];\t\n remainingAmount: number;\n isRemainingAmountGtZero: boolean;\n isMoreDetailsBoxHide: boolean = true;\n isRemainingAmountLtZero: boolean;\n afterFeeAllocateOutstanding: number;\n amountForAllocation: number;\n isConfirmButtondisabled: boolean = false;\n isContinueButtondisabled: boolean = true;\n otherPaymentExplanation: string = null;\n selectedOption: string = null;\n isFeeAmountZero: boolean = false;\t\n\n paymentReasonHasError: boolean = false;\n paymentExplanationHasError: boolean = false;\n isPaymentDetailsEmpty: boolean = false;\n isPaymentDetailsInvalid: boolean = false;\n paymentDetailsMinHasError: boolean = false;\n paymentDetailsMaxHasError: boolean = false;\n isUserNameEmpty: boolean = false;\n isUserNameInvalid: boolean = false;\n ccdReference: string = null;\n exceptionReference: string = null;\n paymentReason: string = null;\n paymentExplanation: string = null;\n userName: string = null;\n paymentSectionLabel: any;\n paymentRef: string = null;\n isStrategicFixEnable: boolean = true;\n orderLevelFees: IOrderReferenceFee[] = [];\n cookieUserName: string[] = [];\n enCookieUserName: any;\n userNameField: string = null;\n\n reasonList: { [key: string]: { [key: string]: string } }= {\n overPayment: {\n hwfReward: 'Help with Fees (HWF) awarded. Please include the HWF reference number in the explanatory note',\n wrongFee: 'Incorrect payment received',\n notIssueCase: 'Unable to issue case',\n otherDeduction: 'Other'\n },\n shortFall: {\n helpWithFee: 'Help with Fees (HWF) application declined',\n wrongFee: 'Incorrect payment received',\n other: 'Other'\n }\n }\n explanationList = {\n overPayment: {\n referRefund: 'Details in case notes. Refund due',\n noRefund: 'Details in case notes. No refund due',\n noCase: 'No case created. Refund due',\n other: 'Other'\n },\n shortFall: {\n holdCase: 'I have put a stop on the case and contacted the applicant requesting the balance of payment',\n heldCase: 'I have put a stop on the case. The applicant needs to be contacted to request the balance of payment',\n other: 'Other'\n }\n }\n\n refund = {\n reason: {\n duplicate: 'Duplicate payment',\n humanerror: 'Human error',\n caseWithdrawn: 'Case withdrawn',\n other: 'Other'\n }\n }\n\n\n constructor(\n private errorHandlerService: ErrorHandlerService,\n private caseTransactionsService: CaseTransactionsService,\n private formBuilder: FormBuilder,\n private paymentViewService: PaymentViewService,\n private paymentLibComponent: PaymentLibComponent,\n private bulkScaningPaymentService: BulkScaningPaymentService,\n private OrderslistService: OrderslistService) { }\n\n ngOnInit() {\n this.viewStatus = 'mainForm';\n if (this.paymentLibComponent.paymentGroupReference !== null) {\n this.viewStatus = 'allocatePaymentConfirmation';\n }\n \n this.ccdCaseNumber = this.paymentLibComponent.CCD_CASE_NUMBER;\n this.bspaymentdcn = this.paymentLibComponent.bspaymentdcn;\n this.paymentRef = this.paymentLibComponent.paymentGroupReference;\n this.selectedOption = this.paymentLibComponent.SELECTED_OPTION;\n this.isStrategicFixEnable = this.paymentLibComponent.ISSFENABLE;\n this.isTurnOff = this.paymentLibComponent.isTurnOff;\n this.overUnderPaymentForm = this.formBuilder.group({\n moreDetails: new FormControl('', Validators.compose([\n Validators.required,\n Validators.minLength(3),\n Validators.maxLength(255),\n Validators.pattern('^([a-zA-Z0-9\\\\s,\\\\.]*)$')\n ])),\n userName: new FormControl('', Validators.compose([\n Validators.required,\n Validators.pattern('^([a-zA-Z0-9\\\\s]*)$')\n ])),\n });\n this.OrderslistService.getOrdersList().subscribe( (data) =>\n this.orderLevelFees = data.filter(data => data.orderStatus !== 'Paid'));\n this.OrderslistService.getCaseType().subscribe( (data) => this.caseType = data);\n this.getUnassignedPayment();\n }\n getGroupOutstandingAmount(paymentGroup: IPaymentGroup): number {\n return this.bulkScaningPaymentService.calculateOutStandingAmount(paymentGroup);\n }\n\n getPaymentGroupDetails(){\n\n if(!this.isTurnOff){\n this.paymentViewService.getPaymentGroupDetails(this.paymentRef).subscribe(\n paymentGroup => {\n this.errorMessage = this.errorHandlerService.getServerErrorMessage(false, false, '');\n this.paymentGroup = paymentGroup;\n this.saveAndContinue();\n },\n (error: any) => {\n this.errorMessage = this.errorHandlerService.getServerErrorMessage(true, false, '');\n }\n );\n }else {\n this.caseTransactionsService.getPaymentGroups(this.ccdCaseNumber).subscribe(\n paymentGroups => {\n this.errorMessage = this.errorHandlerService.getServerErrorMessage(false, false, '');\n this.paymentGroups = paymentGroups['payment_groups'].filter(paymentGroup => {\n paymentGroup.fees.forEach(fee => {\n if(fee.calculated_amount === 0) {\n this.isFeeAmountZero = true\n }\n });\n let fstCon = this.getGroupOutstandingAmount(<IPaymentGroup>paymentGroup),\n scndCn = fstCon > 0 || (fstCon == 0 && this.isFeeAmountZero) && paymentGroup.payment_group_reference === this.paymentRef;\n return this.paymentRef ? scndCn : fstCon > 0 || (fstCon == 0 && this.isFeeAmountZero);\n });\n },\n (error: any) => {\n this.errorMessage = this.errorHandlerService.getServerErrorMessage(true, false, '');\n }\n );\n }\n\n }\n\n selectedPaymentGroup(paymentGroup: IPaymentGroup) {\t\n this.isContinueButtondisabled = false;\t\n this.paymentGroup = paymentGroup;\t\n }\t\n\n gotoCasetransationPage() {\n this.paymentLibComponent.viewName = 'case-transactions';\n this.paymentLibComponent.isTurnOff = this.isTurnOff;\n this.paymentLibComponent.TAKEPAYMENT = true;\n this.paymentLibComponent.ISBSENABLE = true;\n }\n\n gotoSummaryPage(event: any) { \n event.preventDefault();\n this.paymentLibComponent.viewName = 'fee-summary';\n this.paymentLibComponent.isTurnOff = this.isTurnOff;\n this.paymentLibComponent.TAKEPAYMENT = true;\n this.paymentLibComponent.ISBSENABLE = true;\n }\n\n cancelAllocatePayment(event: any){\n event.preventDefault();\n this.resetForm([false, false, false, false, false, false, false, false], 'all');\n if(!this.isTurnOff){\n this.paymentLibComponent.viewName = 'fee-summary';\n this.paymentLibComponent.isTurnOff = this.isTurnOff;\n this.paymentLibComponent.TAKEPAYMENT = true;\n this.paymentLibComponent.ISBSENABLE = true;\n } else {\n this.viewStatus = 'mainForm';\t\n }\n }\n confirmAllocatePayement(){\n this.enCookieUserName = document.cookie.split(\";\").find(row => row.includes(\"user-info\")).split(\"=\")[1].split(\";\");\n this.cookieUserName = JSON.parse(decodeURIComponent(this.enCookieUserName));\n \n const fullName = this.cookieUserName['forename'] + ' ' + this.cookieUserName['surname'];\n\n const paymentDetailsField = this.overUnderPaymentForm.controls.moreDetails,\n paymentFormError = this.overUnderPaymentForm.controls.moreDetails.errors,\n userNameField = fullName,\n isEmptyCondtion = this.paymentReason && this.paymentExplanation,\n isOtherOptionSelected = this.paymentExplanation === 'Other';\n\n this.resetForm([false, false, false, false, false, false, false, false], 'all');\n if ( (!this.isRemainingAmountGtZero && !this.isRemainingAmountLtZero) || isEmptyCondtion && (!isOtherOptionSelected && userNameField.length > 0 || isOtherOptionSelected && userNameField.length > 0 && paymentDetailsField.valid)) {\n this.isConfirmButtondisabled = true;\n this.otherPaymentExplanation = this.paymentExplanation === 'Other' ? paymentDetailsField.value : this.paymentExplanation;\n this.userName = userNameField;\n this.finalServiceCall();\n }else {\n if(!this.paymentReason) {\n this.resetForm([true, false, false, false, false, false, false, false], 'reason');\n }\n if(!this.paymentExplanation) {\n this.resetForm([false, true, false, false, false, false, false, false], 'explanation');\n }\n if(this.paymentExplanation && isOtherOptionSelected) {\n if(paymentDetailsField.value == '' ) {\n this.resetForm([false, false, true, false, false, false, false, false], 'other');\n }\n if(paymentDetailsField.value != '' && paymentDetailsField.invalid ) {\n this.resetForm([false, false, false, true, false, false, false, false], 'other');\n }\n if(paymentFormError && paymentFormError.minlength && paymentFormError.minlength.actualLength < 3 ) {\n this.resetForm([false, false, false, false, true, false, false, false], 'other');\n }\n if(paymentFormError && paymentFormError.maxlength && paymentFormError.maxlength.actualLength > 255 ) {\n this.resetForm([false, false, false, false, false, true, false, false], 'other');\n }\n }\n if(userNameField.length === 0) {\n this.resetForm([false, false, false, false, false, false, true, false], 'username');\n }\n }\n }\n resetForm(vals, field) {\n if(field==='reason' || field==='all') {\n this.paymentReasonHasError = vals[0];\n }\n if(field==='explanation' || field==='all') {\n this.paymentExplanationHasError = vals[1];\n }\n if(field==='other' || field==='all') {\n this.isPaymentDetailsEmpty = vals[2];\n this.isPaymentDetailsInvalid = vals[3];\n this.paymentDetailsMinHasError = vals[4];\n this.paymentDetailsMaxHasError = vals[5];\n }\n if(field==='username' || field==='all') {\n this.isUserNameEmpty = vals[6];\n this.isUserNameInvalid = vals[7];\n }\n }\n finalServiceCall() {\n if(!this.isStrategicFixEnable) {\n let allocatedRequest = {\n reason: this.paymentReason,\n allocation_status:'Allocated',\n explanation: this.otherPaymentExplanation,\n payment_allocation_status: {\n description: '',\n name: 'Allocated'\n },\n payment_group_reference: this.paymentGroup.payment_group_reference,\n case_type: this.caseType,\n user_name: this.userName\n }\n const postStrategicBody = new AllocatePaymentRequest\n (this.ccdReference, this.unAllocatedPayment, this.caseType, this.exceptionReference, allocatedRequest);\n this.bulkScaningPaymentService.postBSPaymentStrategic(postStrategicBody , this.paymentGroup.payment_group_reference).subscribe(\n res => {\n this.errorMessage = this.errorHandlerService.getServerErrorMessage(false, false, '');\n let response = JSON.parse(res);\n if (response.success) {\n this.gotoCasetransationPage();\n }\n },\n (error: any) => {\n this.errorMessage = this.errorHandlerService.getServerErrorMessage(true, false, '');\n window.scrollTo(0, 0);\n this.isConfirmButtondisabled = false;\n });\n\n } else {\n this.bulkScaningPaymentService.patchBSChangeStatus(this.unAllocatedPayment.dcn_reference, 'PROCESSED').subscribe(\n res1 => {\n this.errorMessage = this.errorHandlerService.getServerErrorMessage(false, false, '');\n let response1 = JSON.parse(res1);\n if (response1.success) {\n const requestBody = new AllocatePaymentRequest\n (this.ccdReference, this.unAllocatedPayment, this.siteID, this.exceptionReference);\n this.bulkScaningPaymentService.postBSAllocatePayment(requestBody, this.paymentGroup.payment_group_reference).subscribe(\n res2 => {\n this.errorMessage = this.errorHandlerService.getServerErrorMessage(false, false, '');\n let response2 = JSON.parse(res2);\n const reqBody = new IAllocationPaymentsRequest\n (response2['data'].payment_group_reference, response2['data'].reference, this.paymentReason, this.otherPaymentExplanation, this.userName);\n if (response2.success) {\n this.paymentViewService.postBSAllocationPayments(reqBody).subscribe(\n \n res3 => {\n this.errorMessage = this.errorHandlerService.getServerErrorMessage(false, false, '');\n let response3 = JSON.parse(res3);\n if (response3.success) {\n this.gotoCasetransationPage();\n }\n },\n (error: any) => {\n this.bulkScaningPaymentService.patchBSChangeStatus(this.unAllocatedPayment.dcn_reference, 'COMPLETE').subscribe();\n this.errorMessage = this.errorHandlerService.getServerErrorMessage(true, false, '');\n window.scrollTo(0, 0);\n this.isConfirmButtondisabled = false;\n }\n );\n }\n },\n (error: any) => {\n this.bulkScaningPaymentService.patchBSChangeStatus(this.unAllocatedPayment.dcn_reference, 'COMPLETE').subscribe();\n this.errorMessage = this.errorHandlerService.getServerErrorMessage(true, false, '');\n window.scrollTo(0, 0);\n this.isConfirmButtondisabled = false;\n }\n );\n }\n },\n (error: any) => {\n this.errorMessage = this.errorHandlerService.getServerErrorMessage(true, false, '');\n window.scrollTo(0, 0);\n this.isConfirmButtondisabled = false;\n }\n ); \n }\n }\n\n saveAndContinue(){\n if(this.paymentGroup) {\n this.isMoreDetailsBoxHide = true;\n this.overUnderPaymentForm.get('moreDetails').reset();\n this.overUnderPaymentForm.get('moreDetails').setValue('');\n this.overUnderPaymentForm.get('userName').reset();\n this.overUnderPaymentForm.get('userName').setValue('');\n this.paymentReason = '';\n this.paymentExplanation = '';\n let GroupOutstandingAmount = this.getGroupOutstandingAmount(this.paymentGroup);\n const remainingToBeAssigned = this.unAllocatedPayment.amount - GroupOutstandingAmount;\n this.isRemainingAmountGtZero = remainingToBeAssigned > 0;\n this.isRemainingAmountLtZero = remainingToBeAssigned < 0;\n this.paymentSectionLabel = this.isRemainingAmountGtZero ? { \n title: 'There is an Over payment of',\n reason: 'Provide a reason. This will be used in the Refund process.',\n }: this.isRemainingAmountLtZero ? { \n title: 'There is an Under payment of',\n reason: 'Provide a reason',\n }: { \n title:'Amount left to be allocated',\n reason:'',\n };\n this.feedbackUrlLabel = this.isRemainingAmountGtZero ? 'CONFIRMALLOCATION_SURPLUS' : this.isRemainingAmountLtZero ? 'CONFIRMALLOCATION_SHORTFALL' : 'CONFIRMALLOCATION';\n this.remainingAmount = this.isRemainingAmountGtZero ? remainingToBeAssigned : this.isRemainingAmountLtZero ? remainingToBeAssigned * -1 : 0;\n this.afterFeeAllocateOutstanding = remainingToBeAssigned >= 0 ? 0 : (remainingToBeAssigned * -1);\n this.amountForAllocation = GroupOutstandingAmount >= this.unAllocatedPayment.amount ? this.unAllocatedPayment.amount : GroupOutstandingAmount;\n if(this.isTurnOff){\n this.viewStatus = 'allocatePaymentConfirmation';\t\n }\n }\n }\n getUnassignedPayment() {\n this.bulkScaningPaymentService.getBSPaymentsByDCN(this.bspaymentdcn).subscribe(\n unassignedPayments => {\n this.errorMessage = this.errorHandlerService.getServerErrorMessage(false, false, '');\n this.unAllocatedPayment = unassignedPayments['data'].payments.filter(payment => {\n return payment && payment.dcn_reference == this.bspaymentdcn;\n })[0];\n this.siteID = unassignedPayments['data'].responsible_service_id;\n const beCcdNumber = unassignedPayments['data'].ccd_reference,\n beExceptionNumber = unassignedPayments['data'].exception_record_reference,\n exceptionReference = beCcdNumber ? beCcdNumber === this.ccdCaseNumber ? null : this.ccdCaseNumber : this.ccdCaseNumber;\n this.ccdReference = beCcdNumber ? beCcdNumber : null;\n this.exceptionReference = beExceptionNumber ? beExceptionNumber : exceptionReference;\n this.getPaymentGroupDetails();\n },\n (error: any) => {\n this.errorMessage = this.errorHandlerService.getServerErrorMessage(true, false, '');\n }\n );\n }\n selectRadioButton(key, type) {\n this.isMoreDetailsBoxHide = true;\n if( type === 'explanation' && key === 'other' ){\n this.isPaymentDetailsEmpty = false;\n this.isPaymentDetailsInvalid = false;\n this.paymentDetailsMinHasError = false;\n this.paymentDetailsMaxHasError = false;\n this.isMoreDetailsBoxHide = false;\n }\n }\n OrderListSelectEvent(orderef: any){\n this.isContinueButtondisabled = false;\n this.recordId= orderef;\n }\n\n redirectToOrderFeeSearchPage() {\n // this.paymentLibComponent.bspaymentdcn = null;\n this.paymentLibComponent.paymentGroupReference = this.recordId;\n this.paymentLibComponent.isTurnOff = this.isTurnOff;\n this.paymentLibComponent.viewName = 'fee-summary';\n}\n}\n","import { IFee } from './IFee';\n\nexport class AddRemissionRequest {\n beneficiary_name: string;\n ccd_case_number: string;\n fee: IFee;\n hwf_amount: number;\n hwf_reference: string;\n payment_group_reference: string;\n case_type: string;\n\n constructor(ccd_case_number: string, fee: IFee, hwf_amount: number, hwf_reference: string, caseType: string) {\n this.ccd_case_number = ccd_case_number;\n this.fee = fee;\n this.hwf_amount = hwf_amount;\n this.hwf_reference = hwf_reference;\n this.case_type = caseType;\n }\n}\n","export class AddRetroRemissionRequest {\n hwf_amount: number;\n hwf_reference: string;\n\n constructor(hwf_amount: number, hwf_reference: string) {\n this.hwf_amount = hwf_amount;\n this.hwf_reference = hwf_reference;\n }\n}\n","import { IRefundContactDetails } from './IRefundContactDetails';\n\nexport class PostIssueRefundRetroRemission {\n remissionReference: string;\n contact_details: IRefundContactDetails;\n\n constructor(remissionReference : string, contactDeatils: any) {\n this.remissionReference= remissionReference;\n this.contact_details = contactDeatils;\n } \n}","import { Component, OnInit, Input, Output, EventEmitter} from '@angular/core';\nimport { FormBuilder, FormGroup, Validators, FormControl, RequiredValidator, FormArray } from '@angular/forms';\nimport { IFee } from '../../interfaces/IFee';\nimport {Router} from '@angular/router';\nimport { AddRemissionRequest } from '../../interfaces/AddRemissionRequest';\nimport { PaymentViewService } from '../../services/payment-view/payment-view.service';\nimport { PaymentLibComponent } from '../../payment-lib.component';\n\nimport { IPayment } from '../../interfaces/IPayment';\nimport { RefundsService } from '../../services/refunds/refunds.service';\nimport { NotificationService } from '../../services/notification/notification.service';\nimport { IRefundReasons } from '../../interfaces/IRefundReasons';\nimport { AddRetroRemissionRequest } from '../../interfaces/AddRetroRemissionRequest';\nimport { IRefundContactDetails } from '../../interfaces/IRefundContactDetails';\nimport { PostRefundRetroRemission } from '../../interfaces/PostRefundRetroRemission';\nimport { PostIssueRefundRetroRemission } from '../../interfaces/PostIssueRefundRetroRemission';\nimport {ChangeDetectorRef} from '@angular/core';\nimport { IRemission } from '../../interfaces/IRemission';\nimport { OrderslistService } from '../../services/orderslist.service';\nimport { IPaymentGroup } from '../../interfaces/IPaymentGroup';\n\nconst BS_ENABLE_FLAG = 'bulk-scan-enabling-fe';\nconst resolvedPromise = Promise.resolve(null);\n\n@Component({\n selector: 'ccpay-add-remission',\n templateUrl: './add-remission.component.html',\n styleUrls: ['./add-remission.component.scss']\n})\nexport class AddRemissionComponent implements OnInit {\n @Input() fee: IFee;\n @Input() fees: any [];\n @Input() payment: IPayment;\n @Input() remission: IRemission;\n @Input() ccdCaseNumber: string;\n @Input() caseType: string;\n @Input() viewCompStatus: string;\n @Input() paymentGroupRef: string;\n @Input() isTurnOff: boolean;\n @Input() isRefundRemission: boolean;\n @Input() isStrategicFixEnable: boolean;\n @Input() paidAmount: any;\n @Input() isFromRefundListPage: boolean;\n @Input() isFromPaymentDetailPage: boolean;\n @Input() isFromServiceRequestPage: boolean;\n @Input('isFullyRefund') isFullyRefund: boolean;\n @Input() feeamount: number;\n @Input() refundPaymentReference: string;\n @Input() isFromRefundStatusPage: boolean;\n @Input() changeRefundReason: string;\n @Input(\"isServiceRequest\") isServiceRequest: string;\n @Input('LOGGEDINUSERROLES') LOGGEDINUSERROLES: string[];\n @Input('orderDetail') orderDetail: any[];\n @Input('orderRef') orderRef: string;\n @Input('orderStatus') orderStatus: string;\n @Input('orderParty') orderParty: string;\n @Input('orderCreated') orderCreated: Date;\n @Input('orderCCDEvent') orderCCDEvent: string;\n @Input('takepayment') takePayment: boolean;\n @Input('orderFeesTotal') orderFeesTotal: number;\n @Input('orderTotalPayments') orderTotalPayments: number;\n @Input('orderRemissionTotal') orderRemissionTotal: number;\n @Output() cancelRemission: EventEmitter<void> = new EventEmitter();\n //@Output() refundListReason: EventEmitter<any> = new EventEmitter({reason:string, code:string});\n @Output() refundListReason = new EventEmitter<{reason: string, code: string}>();\n @Output() refundListAmount: EventEmitter<string> = new EventEmitter();\n @Output() refundFees: EventEmitter<IFee[]> = new EventEmitter<IFee[]>();\n refund = {\n reason: {\n duplicate: 'Duplicate payment',\n humanerror: 'Human error',\n caseWithdrawn: 'Case withdrawn',\n other: 'Other'\n }\n }\n contactDetailsObj: IRefundContactDetails;\n notification: any;\n remissionForm: FormGroup;\n hasErrors = false;\n viewStatus = 'main';\n errorMessage = null;\n option: string = null;\n isConfirmationBtnDisabled: boolean = false;\n bsPaymentDcnNumber: string;\n selectedValue = 'yes';\n amount: any;\n retroRemission: boolean = false;\n remissionReference: string = '';\n refundReference: string;\n refundAmount: string;\n paymentExplanationHasError: boolean = false;\n refundReason:string;\n selectedRefundReason: string;\n selectedRefundReasonCode: string;\n displayRefundReason: string;\n refundCode:string;\n remessionPayment:IPayment;\n isRemissionCodeEmpty: boolean = false;\n remissionCodeHasError: boolean = false;\n isAmountEmpty: boolean = false;\n isReasonEmpty: boolean = false;\n amountHasError: boolean = false;\n isRemissionLessThanFeeError: boolean = false;\n refundHasError:boolean = false;\n isPaymentSuccess: boolean = false;\n isRemissionApplied: boolean = false;\n remissionamt:number;\n elementId:any;\n // refundReasons: any[] = [];\n commonRefundReasons: any[] = [];\n showReasonText: boolean;\n isRefundReasonsSelected: boolean;\n default: string;\n reasonLength: number;\n refundReasons:IRefundReasons[];\n pattern1: string;\n pattern2: string;\n sendOrderDetail: any[];\n sendOrderRef: string;\n paymentReference : string;\n class='';\n errorMsg = new Array();\n totalRefundAmount: number;\n quantityUpdated: number;\n fullRefund: boolean;\n allowedRefundAmount: number;\n isRemissionsMatch: boolean;\n paymentFees: IFee[];\n paymentGroup: IPaymentGroup;\n isStatusAllocated: boolean;\n isFromCheckAnsPage: boolean;\n refundAmtForFeeVolumes: number;\n paymentObj: IPayment;\n templateInstructionType: string;\n notificationPreview: boolean;\n \n component: { account_number: string; amount: number; case_reference: string; ccd_case_number: string; channel: string; currency: string; customer_reference: string; date_created: string; date_updated: string; description: string; method: string; organisation_name: string; payment_allocation: any[]; reference: string; service_name: string; site_id: string; status: string; };\n\n constructor(private formBuilder: FormBuilder,\n private router: Router,\n private paymentViewService: PaymentViewService,\n private notificationService : NotificationService,\n private paymentLibComponent: PaymentLibComponent,\n private refundService: RefundsService,\n private cd: ChangeDetectorRef,\n private OrderslistService: OrderslistService) { }\n\n ngOnInit() {\n this.errorMessage = '';\n this.errorMsg = [];\n this.default = 'Select a different reason';\n this.pattern1 = '^([a-zA-Z0-9]{3})-([a-zA-Z0-9]{3})-([a-zA-Z0-9]{3})$';\n this.pattern2 = '^([A-Za-z]{2}[0-9]{2})-([0-9]{6})$';\n if(this.viewCompStatus !== '' && this.viewCompStatus !== undefined){\n this.viewStatus = '';\n }\n if(this.remission) {\n }\n if(this.fee) {\n this.amount = (this.fee.volume * this.fee.calculated_amount);\n }\n \n if (this.payment){\n this.paymentReference = this.payment.reference;\n this.remessionPayment = this.payment;\n if(this.payment.status === 'Success') {\n this.isPaymentSuccess = true;\n }\n }\n this.option = this.paymentLibComponent.SELECTED_OPTION;\n this.bsPaymentDcnNumber = this.paymentLibComponent.bspaymentdcn;\n this.remissionForm = this.formBuilder.group({\n remissionCode: new FormControl('',\n Validators.compose([\n Validators.required,\n Validators.pattern(`(${this.pattern1})|(${this.pattern2})`)\n ])\n ),\n amount: new FormControl('', Validators.compose([\n Validators.required,\n Validators.pattern('^[0-9]+(\\.[0-9]{1,2})?$')\n ])),\n refundReason: new FormControl('', Validators.compose([Validators.required])),\n refundDDReason: new FormControl('', Validators.compose([Validators.required])),\n reason: new FormControl(),\n feeAmount: new FormControl(),\n feesList: this.formBuilder.array([])\n });\n const remissionctrls=this.remissionForm.controls;\n remissionctrls['refundDDReason'].setValue('Select a different reason', {onlySelf: true});\n if(this.refundPaymentReference !== undefined && this.refundPaymentReference.length >0) {\n this.paymentReference = this.refundPaymentReference\n } else {\n this.paymentReference = (this.payment !== undefined) ? this.payment.reference : ''; \n }\n \n\n if(this.isFromServiceRequestPage) {\n this.paymentViewService.getApportionPaymentDetails(this.paymentReference).subscribe(\n paymentGroup => {\n let fees = [];\n paymentGroup.fees.forEach(fee => {\n this.isRemissionsMatch = false;\n \n paymentGroup.remissions.forEach(rem => {\n if (rem.fee_code === fee.code) {\n this.isRemissionsMatch = true;\n fee['remissions'] = rem;\n fees.push(fee);\n }\n });\n if (!this.isRemissionsMatch) {\n fees.push(fee);\n }\n });\n paymentGroup.fees = fees\n this.paymentFees =fees;\n this.fees = fees;\n this.paymentGroup = paymentGroup;\n \n this.paymentGroup.payments = this.paymentGroup.payments.filter\n (paymentGroupObj => paymentGroupObj['reference'].includes(this.paymentLibComponent.paymentReference));\n // const paymentAllocation = this.paymentGroup.payments[0].payment_allocation;\n // this.isStatusAllocated = paymentAllocation.length > 0 && paymentAllocation[0].allocation_status === 'Allocated' || paymentAllocation.length === 0;\n this.refundFeesList();\n },\n (error: any) => this.errorMessage = error\n );\n }\n\n \n if (this.fees && this.viewCompStatus === 'issuerefund') {\n this.refundFeesList();\n }\n\n if(this.viewCompStatus === ''){\n this.viewStatus = 'main';\n }\n \n if(this.viewCompStatus === 'issuerefundpage1'){\n this.refundService.getRefundReasons().subscribe(\n refundReasons => {\n this.refundReasons = refundReasons.filter((data) => data.recently_used === false);\n this.refundReasons = this.refundReasons.filter((data) => data.name !== 'Retrospective remission' && data.name !== 'Overpayment');\n this.cd.detectChanges();\n this.commonRefundReasons = refundReasons.filter((data) => data.recently_used === true);\n this.commonRefundReasons.sort((a, b) => a.toString().localeCompare(b));\n this.cd.detectChanges();\n } );\n this.refundReason = this.changeRefundReason;\n }\n\n if(this.viewCompStatus === 'processretroremissonpage' && this.isFromRefundListPage){\n this.viewStatus = 'processretroremissonpage';\n }\n if(this.orderDetail !== undefined){\n this.paymentViewService.getApportionPaymentDetails(this.orderDetail[0].payments[0].reference).subscribe(\n paymentGroup => {\n this.fees = paymentGroup.fees;\n this.paymentReference = paymentGroup.payments[0].reference;\n },\n (error: any) => this.errorMessage = error\n );\n }\n\n }\n goToPaymentViewComponent() {\n this.paymentLibComponent.paymentMethod = this.payment.method;\n this.paymentLibComponent.paymentGroupReference = this.paymentGroupRef;\n this.paymentLibComponent.paymentReference = this.paymentReference;\n //this.PaymentViewComponent.viewCompStatus = 'overpayment';\n this.paymentLibComponent.viewName = 'payment-view';\n }\n refundFeesList() {\n const creds = this.remissionForm.controls.feesList as FormArray;\n // if(creds.controls.length > 0) {\n for(var i=0;i<this.fees.length;i++) {\n creds.push(this.formBuilder.group({\n id: this.fees[i].id,\n code: this.fees[i].code,\n volume: this.fees[i].volume,\n calculated_amount: this.fees[i].calculated_amount,\n apportion_amount: this.fees[i].apportion_amount,\n ccd_case_number: this.fees[i].ccd_case_number,\n description: this.fees[i].description,\n net_amount: this.fees[i].net_amount,\n version: this.fees[i].version,\n refund_amount : [''],\n selected:[''] ,\n updated_volume: this.fees[i].volume\n }));\n }\n this.cd.detectChanges();\n //}\n }\n\n get feesList()\n {\n const dd =this.remissionForm.get('feesList') as FormArray ;\n return this.remissionForm.get('feesList') as FormArray;\n }\n\n noneSelected(){\n if(this.isFullyRefund) {\n return false;\n } else {\n if(!this.feesList.controls.some(item => item.get('selected').value === true)) {\n this.errorMsg = [];\n [].forEach.call(document.querySelectorAll('input'), function (el) {\n el.classList.remove('inline-error-class');\n });\n }\n return !this.feesList.controls.some(item => item.get('selected').value === true);\n }\n }\n \n check_en (i,v1: any, AppAmt,Volume) {\n const ele = document.getElementById(v1) as HTMLInputElement;\n const formArray = this.remissionForm.controls.feesList as FormArray;\n \n if(ele.checked){\n formArray.at(i).get('refund_amount').setValue(AppAmt);\n formArray.at(i).get('volume').setValue(Volume);\n formArray.at(i).get('selected').setValue(true);\n formArray.at(i).get('updated_volume').setValue(Volume);\n (<HTMLInputElement>document.getElementById('feeAmount_'+v1)).value = AppAmt;\n document.getElementById('feeAmount_'+v1).removeAttribute(\"disabled\"); \n if(Volume === 1) {\n (<HTMLInputElement>document.getElementById('VolumeUpdated_'+v1)).value = Volume;\n } else {\n (<HTMLInputElement>document.getElementById('feeVolumeUpdated_'+v1)).value = Volume;\n }\n \n if (document.getElementById('feeVolumeUpdated_'+v1) !== null) {\n document.getElementById('feeAmount_'+v1).removeAttribute(\"disabled\"); \n document.getElementById('feeVolumeUpdated_'+v1).removeAttribute(\"disabled\"); \n } \n this.cd.detectChanges(); \n } else {\n this.errorMsg = []; \n document.getElementById('feeAmount_'+v1).setAttribute(\"disabled\", \"true\"); \n this.remissionForm.value.feesList[i][\"refund_amount\"] = ''; \n this.remissionForm.value.feesList[i][\"volume\"] = ''; \n this.remissionForm.value.feesList[i][\"selected\"] = false; \n (<HTMLInputElement>document.getElementById('feeAmount_'+v1)).value = '';\n if(Volume>1) {\n this.remissionForm.value.feesList[i][\"volume\"] = ''; \n (<HTMLInputElement>document.getElementById('feeVolumeUpdated_'+v1)).value = '';\n }\n \n if (document.getElementById('feeVolumeUpdated_'+v1) !== null) {\n document.getElementById('feeVolumeUpdated_'+v1).removeAttribute(\"disabled\"); \n }\n this.cd.detectChanges();\n } \n }\n\n\n addRemission() {\n this.resetRemissionForm([false, false, false, false, false, false], 'All');\n const remissionctrls=this.remissionForm.controls,\n isRemissionLessThanFee = this.fee.calculated_amount > remissionctrls.amount.value;\n this.remissionForm.controls['refundReason'].setErrors(null);\n this.remissionForm.controls['refundDDReason'].setErrors(null);\n if (this.remissionForm.dirty && this.remissionForm.valid && isRemissionLessThanFee) {\n this.viewStatus = 'confirmation';\n }else {\n\n if(remissionctrls['remissionCode'].value == '' ) {\n this.resetRemissionForm([true, false, false, false, false, false], 'remissionCode');\n }\n if(remissionctrls['remissionCode'].value != '' && remissionctrls['remissionCode'].invalid ) {\n this.resetRemissionForm([false, true, false, false, false, false], 'remissionCode');\n }\n if(remissionctrls['amount'].value == '' ) {\n this.resetRemissionForm([false, false, true, false, false, false], 'amount');\n }\n if(remissionctrls['amount'].value != '' && remissionctrls['amount'].invalid ) {\n this.resetRemissionForm([false, true, false, true, false, false], 'amount');\n }\n if(remissionctrls.amount.valid && !isRemissionLessThanFee){\n this.resetRemissionForm([false, false, false, false, true, false], 'amount');\n }\n }\n }\n\n confirmRemission() {\n this.isConfirmationBtnDisabled = true;\n const newNetAmount = this.remissionForm.controls.amount.value,\n remissionAmount = this.fee.net_amount - newNetAmount,\n requestBody = new AddRemissionRequest\n (this.ccdCaseNumber, this.fee, remissionAmount, this.remissionForm.controls.remissionCode.value, this.caseType);\n this.paymentViewService.postPaymentGroupWithRemissions(decodeURIComponent(this.paymentGroupRef).trim(), this.fee.id, requestBody).subscribe(\n response => {\n if (JSON.parse(response).success) {\n let LDUrl = this.isTurnOff ? '&isTurnOff=Enable' : '&isTurnOff=Disable'\n LDUrl += `&caseType=${this.caseType}`\n if (this.paymentLibComponent.bspaymentdcn) {\n this.router.routeReuseStrategy.shouldReuseRoute = () => false;\n this.router.onSameUrlNavigation = 'reload';\n this.router.navigateByUrl(`/payment-history/${this.ccdCaseNumber}?view=fee-summary&selectedOption=${this.option}&paymentGroupRef=${this.paymentGroupRef}&dcn=${this.paymentLibComponent.bspaymentdcn}${LDUrl}`);\n }else {\n this.gotoCasetransationPage();\n }\n\n }\n },\n (error: any) => {\n this.errorMessage = error;\n this.isConfirmationBtnDisabled = false;\n }\n );\n }\n\n resetRemissionForm(val, field){\n if (field==='All'){\n this.isRemissionCodeEmpty = val[0];\n this.remissionCodeHasError = val[1];\n this.isAmountEmpty = val[2];\n this.amountHasError = val[3];\n this.isRemissionLessThanFeeError = val[4];\n this.isReasonEmpty = val[5];\n } else if(field==='remissionCode' || field==='All') {\n this.isRemissionCodeEmpty = val[0];\n this.remissionCodeHasError = val[1];\n } else if (field==='amount' || field==='All'){\n this.isAmountEmpty = val[2];\n this.amountHasError = val[3];\n this.isRemissionLessThanFeeError = val[4];\n } else if (field==='reason' || field==='All'){\n this.isReasonEmpty = val[5];\n }\n }\n\n // Add retro remission changes\n addRemissionCode() {\n this.errorMessage = false;\n // this.isFromCheckAnsPage = true;\n this.errorMsg = [];\n this.viewStatus = '';\n this.isRefundRemission = false;\n this.resetRemissionForm([false, false, false, false, false, false], 'All');\n const remissionctrls=this.remissionForm.controls\n // isRemissionLessThanFee = this.fee.calculated_amount >= remissionctrls.amount.value;\n this.remissionForm.controls['refundReason'].setErrors(null);\n this.remissionForm.controls['refundDDReason'].setErrors(null);\n this.remissionForm.controls['amount'].setErrors(null);\n if (this.remissionForm.dirty && this.remissionForm.valid ) {\n if (!this.isFromCheckAnsPage) {\n this.viewCompStatus = '';\n this.viewStatus = \"processretroremissonpage\";\n } else {\n this.viewCompStatus = '';\n this.viewStatus = 'checkretroremissionpage';\n }\n \n }else {\n\n if(remissionctrls['remissionCode'].value == '' ) {\n this.resetRemissionForm([true, false, false, false, false], 'remissionCode');\n }\n if(remissionctrls['remissionCode'].value != '' && remissionctrls['remissionCode'].invalid ) {\n this.resetRemissionForm([false, true, false, false, false], 'remissionCode');\n }\n if(remissionctrls['amount'].value == '' ) {\n this.resetRemissionForm([false, false, true, false, false], 'amount');\n }\n if(remissionctrls['amount'].value != '' && remissionctrls['amount'].invalid ) {\n this.resetRemissionForm([false, true, false, true, false], 'amount');\n }\n if(remissionctrls['reason'].value == '') {\n this.resetRemissionForm([false, false, false, true, false, true], 'reason');\n }\n if(remissionctrls.amount.valid){\n this.resetRemissionForm([false, false, false, false, true], 'amount');\n }\n\n }\n }\n\n\n gotoAddRetroRemissionCodePage() {\n this.errorMessage = false;\n this.isFromCheckAnsPage = false;\n this.errorMsg = [];\n if(this.isRefundRemission) {\n this.refundListAmount.emit();\n this.paymentLibComponent.isFromRefundStatusPage = true;\n return;\n }\n if ( this.isFromRefundListPage ) {\n this.paymentLibComponent.iscancelClicked = true;\n this.refundListReason.emit({reason: this.selectedRefundReason, code: this.refundReason});\n this.paymentLibComponent.isFromRefundStatusPage = true;\n return;\n }\n this.viewStatus = '';\n this.selectedValue = 'yes';\n this.viewCompStatus = \"addremission\";\n this.isRefundRemission = true;\n this.errorMessage = '';\n this.errorMsg = [];\n if(this.isFromPaymentDetailPage) {\n this.paymentLibComponent.viewName = 'payment-view';\n }\n }\n\n gotoCheckRetroRemissionPage(payment: IPayment) {\n this.paymentLibComponent.iscancelClicked = false;\n this.errorMessage = '';\n this.resetRemissionForm([false, false, false, false, false], 'All');\n if( !this.isRefundRemission) {\n var remissionctrls=this.remissionForm.controls,\n isRemissionLessThanFee = this.fee.calculated_amount >= remissionctrls.amount.value;\n if (this.remissionForm.dirty ) {\n if(remissionctrls['amount'].value == '' || remissionctrls['amount'].value < 0) {\n this.resetRemissionForm([false, false, true, false, false], 'amount');\n } else if(remissionctrls['amount'].value != '' && remissionctrls['amount'].invalid ) {\n this.resetRemissionForm([false, false, false, true, false], 'amount');\n } else if(remissionctrls.amount.valid && !isRemissionLessThanFee){\n this.resetRemissionForm([false, false, false, false, true], 'amount');\n } else {\n this.viewCompStatus = '';\n this.viewStatus = \"checkretroremissionpage\";\n }\n }\n } else {\n var remissionctrls=this.remissionForm.controls;\n //if (this.remissionForm.dirty ) {\n if(remissionctrls['amount'].value == '' || remissionctrls['amount'].value < 0 ) {\n this.resetRemissionForm([false, false, true, false, false], 'amount');\n } else {\n this.viewCompStatus = '';\n this.viewStatus = \"checkretroremissionpage\";\n this.refundListAmount.emit(remissionctrls['amount'].value);\n }\n //}\n\n }\n }\n gotoAmountRetroRemission() {\n this.isFromCheckAnsPage = false;\n this.viewStatus = 'processretroremissonpage';\n this.viewCompStatus = '';\n // this.isRefundRemission = true;\n this.errorMessage = '';\n }\n gotoProcessRetroRemissionPage() {\n this.isFromCheckAnsPage = true;\n this.viewStatus = '';\n this.viewCompStatus = 'addremission';\n this.isRefundRemission = true;\n this.errorMessage = '';\n this.errorMsg = [];\n }\n\n gotoProcessRetroRemission(note?: IRefundContactDetails) {\n if(note) {\n this.notification = { contact_details: note, notification_type: note.notification_type };\n }\n this.isFromCheckAnsPage = true;\n this.viewStatus = 'remissionAddressPage';\n this.viewCompStatus = '';\n this.isRefundRemission = true;\n this.errorMessage = '';\n }\n\n confirmRetroRemission() {\n if(!this.isConfirmationBtnDisabled) {\n this.retroRemission = true;\n this.remissionamt = this.remissionForm.controls.amount.value;\n const requestBody = new AddRetroRemissionRequest(this.remissionamt,this.remissionForm.controls.remissionCode.value )\n this.paymentViewService.postPaymentGroupWithRetroRemissions(decodeURIComponent(this.paymentGroupRef).trim(), this.fee.id, requestBody).subscribe(\n response => {\n if (JSON.parse(response)) {\n this.isRemissionApplied = true;\n this.viewCompStatus = '';\n this.viewStatus = 'retroremissionconfirmationpage';\n this.remissionReference =JSON.parse(response).remission_reference;\n }\n },\n (error: any) => {\n this.errorMessage = error;\n this.isConfirmationBtnDisabled = false;\n this.cd.detectChanges();\n }\n );\n }\n }\n\n processRefund() {\n this.errorMessage = '';\n this.errorMsg = [];\n this.isConfirmationBtnDisabled = true;\n if( this.isRefundRemission) {\n this.retroRemission = true;\n }\n if (this.remissionReference === undefined || this.remissionReference === '') {\n this.remissionReference = this.remission.remission_reference;\n }\n const requestBody = new PostIssueRefundRetroRemission(this.remissionReference, this.contactDetailsObj);\n this.paymentViewService.postRefundRetroRemission(requestBody).subscribe(\n response => {\n if (JSON.parse(response)) {\n this.viewCompStatus = '';\n this.viewStatus = 'refundconfirmationpage';\n this.refundReference = JSON.parse(response).refund_reference;\n this.refundAmount = JSON.parse(response).refund_amount;\n }\n },\n (error: any) => {\n this.errorMessage = error;\n this.isConfirmationBtnDisabled = false;\n })\n }\n\n // Issue Refund changes\n\n gotoIssueRefundConfirmation(payment: IPayment) {\n \n this.paymentLibComponent.iscancelClicked = false;\n if(this.paymentLibComponent.REFUNDLIST === \"true\") {\n this.isFromRefundListPage = true;\n }\n\n this.totalRefundAmount = this.remissionForm.value.feesList.reduce((a, c) => a + c.refund_amount * c.selected, 0);\n\n\n this.errorMessage = '';\n this.errorMsg = [];\n this.refundReason = this.remissionForm.controls['refundReason'].value === null ? this.remissionForm.controls['refundDDReason'].value : this.remissionForm.controls['refundReason'].value;\n if(!this.refundReason || this.refundReason === 'Select a different reason') {\n this.refundHasError = true;\n } else if(this.selectedRefundReason.includes('Other') && (this.remissionForm.controls['reason'].value == '' || this.remissionForm.controls['reason'].value == null)) {\n this.resetRemissionForm([false, false, false, true, false, true], 'reason');\n } else if (this.selectedRefundReason.includes('Other') && this.remissionForm.controls['reason'].value !== '') {\n this.refundHasError = false;\n this.refundReason += '-' + this.remissionForm.controls['reason'].value;\n this.displayRefundReason = this.selectedRefundReason + '-' + this.remissionForm.controls['reason'].value;\n if ( this.isFromRefundListPage ) {\n this.refundListReason.emit({reason: this.displayRefundReason, code: this.refundReason});\n } else {\n if(this.isFromCheckAnsPage) {\n this.totalRefundAmount = this.remissionForm.value.feesList.reduce((a, c) => a + c.refund_amount * c.selected, 0);\n this.isFromCheckAnsPage = false;\n this.viewStatus = 'checkissuerefundpage';\n this.viewCompStatus = '';\n this.notificationPreview = false;\n return;\n }\n this.viewCompStatus = '';\n this.viewStatus = 'contactDetailsPage';\n }\n\n } else {\n this.displayRefundReason = this.selectedRefundReason;\n if(this.isFromCheckAnsPage) {\n this.totalRefundAmount = this.remissionForm.value.feesList.reduce((a, c) => a + c.refund_amount * c.selected, 0);\n this.isFromCheckAnsPage = false;\n this.viewStatus = 'checkissuerefundpage';\n this.viewCompStatus = '';\n this.notificationPreview = false;\n return;\n }\n if ( this.isFromRefundListPage ) {\n this.paymentLibComponent.isFromRefundStatusPage = true;\n this.refundListReason.emit({reason: this.selectedRefundReason, code: this.refundReason});\n } else {\n this.viewCompStatus = '';\n this.viewStatus = 'contactDetailsPage';\n }\n\n }\n }\n\n gotoIssueRefundPage() {\n this.errorMessage = '';\n this.viewCompStatus = 'issuerefund';\n this.viewStatus = '';\n this.isRefundRemission = true;\n this.errorMessage = false;\n this.errorMsg = [];\n this.refundHasError = false;\n this.isReasonEmpty = false;\n }\n\n gotoIssuePage(isFullyRefund: any){\nif(isFullyRefund) {\n this.viewCompStatus = 'issuerefundpage1';\n this.getRefundReasons();\n} else {\n [].forEach.call(document.querySelectorAll('input'), function (el) {\n el.classList.remove('inline-error-class');\n });\n\n\t var checkboxs = document.getElementsByTagName('input');\n\t this.errorMessage = '';\n this.totalRefundAmount = 0;\n this.errorMsg = []; \n\t\t\tfor (var j=0;j<checkboxs.length;j++)\n\t\t\t{\n\t\t\t\tif(checkboxs[j].checked)\n\t\t\t\t{\n\t\t\t\t\tthis.fullRefund = false;\n\t\t\t\t\tlet quantity: number = +(<HTMLInputElement>document.getElementById('feeVolume_'+checkboxs[j].value)).value;\n let amountToRefund: number = +(<HTMLInputElement>document.getElementById('feeAmount_'+checkboxs[j].value)).value;\n\t\t\t\t\tlet apportionAmount: number = +(<HTMLInputElement>document.getElementById('feeApportionAmount_'+checkboxs[j].value)).value;\n\t\t\t\t\tlet calculatedAmount: number = +(<HTMLInputElement>document.getElementById('calculatedAmount_'+checkboxs[j].value)).value; \n \n if( amountToRefund === apportionAmount) {\n this.fullRefund = true;\n }\n\n if(amountToRefund === 0){\n this.elementId = 'feeAmount_'+checkboxs[j].value;\n this.errorMsg.push('You need to enter a refund amount');\n this.getErrorClass(this.elementId);\n\t\t\t\t\t}\n\n \n\n if (quantity === 1)\n {\n if(amountToRefund > 0 && amountToRefund > apportionAmount){\n this.elementId = 'feeAmount_'+checkboxs[j].value;\n this.errorMsg.push('The amount you want to refund is more than the amount paid');\n this.getErrorClass(this.elementId);\n }\n } \n\n\t\t\t\t\tif(quantity > 1) {\n\n\t\t\t\t\t\tthis.quantityUpdated = +(<HTMLInputElement>document.getElementById('feeVolumeUpdated_'+checkboxs[j].value)).value;\n\n if(this.quantityUpdated === 0){\n this.elementId = 'feeVolumeUpdated_'+checkboxs[j].value;\n this.errorMsg.push('You need to enter quantity')\n this.getErrorClass(this.elementId);\n }\n\n if (this.fullRefund && quantity !== this.quantityUpdated) {\n this.elementId = 'feeVolumeUpdated_'+checkboxs[j].value;\n this.errorMsg.push('The quantity you want to refund should be maximun available quantity');\n this.getErrorClass(this.elementId);\n }\n\n if (!this.fullRefund && this.quantityUpdated > 0 && amountToRefund > 0) {\n this.refundAmtForFeeVolumes = +(<HTMLInputElement>document.getElementById('feeVOl_'+checkboxs[j].value)).innerText;\n this.allowedRefundAmount = this.quantityUpdated * this.refundAmtForFeeVolumes;\n if( this.allowedRefundAmount !== amountToRefund) \n {\n this.elementId = 'feeAmount_'+checkboxs[j].value;\n this.errorMsg.push('The Amount to Refund should be equal to the product of Fee Amount and quantity');\n this.getErrorClass(this.elementId);\n }\n }\n\n if(!this.fullRefund && amountToRefund > apportionAmount)\n {\n this.elementId = 'feeAmount_'+checkboxs[j].value;\n this.errorMsg.push('The amount you want to refund is more than the amount paid');\n this.getErrorClass(this.elementId);\n }\n\t\n if( !this.fullRefund && this.quantityUpdated >0 && this.quantityUpdated > quantity){\n this.elementId = 'feeVolumeUpdated_'+checkboxs[j].value;\n this.errorMsg.push('The quantity you want to refund is more than the available quantity');\n this.getErrorClass(this.elementId);\n }\n }\n //this.remissionForm.value.feesList.find(id=>id=checkboxs[j].value)['refund_amount'] = apportionAmount;\n\t\t\t\t}\n\t\t\t}\n\n if(this.errorMsg.length === 0) {\n if (this.isFromCheckAnsPage) {\n this.isFromCheckAnsPage = false;\n this.totalRefundAmount = this.remissionForm.value.feesList.reduce((a, c) => a + c.refund_amount * c.selected, 0);\n this.fees = this.remissionForm.value.feesList.filter(value => value.selected===true);\n this.viewStatus = 'checkissuerefundpage'\n this.viewCompStatus = '';\n this.notificationPreview = false;\n return;\n } else if (this.isFromRefundStatusPage){\n var remissionctrls=this.remissionForm.controls;\n this.totalRefundAmount = this.remissionForm.value.feesList.reduce((a, c) => a + c.refund_amount * c.selected, 0);\n this.refundListAmount.emit(this.totalRefundAmount.toString());\n this.fees = this.remissionForm.value.feesList.filter(value => value.selected===true);\n this.refundFees.emit(this.fees);\n return;\n }\n this.viewCompStatus = 'issuerefundpage1';\n this.getRefundReasons();\n }\n }\n }\n\n calAmtToRefund(value,amount,volume, i: any) {\n const volumeFee = amount/volume;\n const amtToRefund = value * volumeFee;\n const formArray = this.remissionForm.controls.feesList as FormArray;\n formArray.at(i).get('refund_amount').setValue(amtToRefund);\n // formArray.at(i).get('volume').setValue(value);\n // (<HTMLInputElement>document.getElementById('feeAmount_'+i)).value = +amtToRefund;\n // const formControl = this.remissionForm.controls.feesList['volume'].at(i);\n // formControl.setValue(value);\n\n }\n gotoContactDetailsPage(note?: IRefundContactDetails) {\n if (note) {\n this.notification = { contact_details: note, notification_type: note.notification_type };\n }\n this.errorMessage = '';\n this.viewCompStatus = '';\n this.viewStatus = 'contactDetailsPage';\n this.isRefundRemission = true;\n this.errorMessage = false;\n }\n \n getRefundReasons(){\n if(this.viewCompStatus === 'issuerefundpage1'){\n this.refundService.getRefundReasons().subscribe(\n refundReasons => { \n this.refundReasons = refundReasons.filter((data) => data.recently_used === false);\n this.refundReasons = this.refundReasons.filter((data) => data.name !== 'Retrospective remission');\n this.cd.detectChanges();\n this.commonRefundReasons = refundReasons.filter((data) => data.recently_used === true);\n this.commonRefundReasons.sort((a, b) => a.toString().localeCompare(b));\n this.cd.detectChanges();\n } );\n }\n}\n getErrorClass(elementId) {\n if(this.errorMsg.length > 0) {\n const ele = document.getElementById(elementId);\n ele.classList.add('inline-error-class');\n }\n \n }\n\n changeIssueRefundReason() {\n this.isFromCheckAnsPage = true;\n this.errorMessage = '';\n this.errorMsg = [];\n this.refundHasError = false;\n this.isReasonEmpty = false;\n this.viewCompStatus = 'issuerefundpage1';\n this.viewStatus = '';\n this.isRefundRemission = true;\n }\n\n confirmIssueRefund(isFullyRefund: any) {\n this.isConfirmationBtnDisabled = true;\n this.errorMessage = '';\n this.errorMsg = [];\n if( this.isRefundRemission) {\n this.retroRemission = true;\n }\n if(isFullyRefund) {\n this.totalRefundAmount = this.payment.amount;\n }\n if(!isFullyRefund) {\n this.fees = this.remissionForm.value.feesList.filter(value => value.selected===true);\n }\n this.fees = this.fees.map(obj => ({ id: obj.id, \n code: obj.code,\n version:obj.version, \n apportion_amount: obj.apportion_amount,\n calculated_amount: obj.calculated_amount,\n updated_volume: obj.updated_volume ? obj.updated_volume : obj.volume,\n refund_amount:obj.refund_amount ? obj.refund_amount : this.totalRefundAmount }));\n \n \n const requestBody = new PostRefundRetroRemission(this.contactDetailsObj, this.fees,this.payment.reference, this.refundReason, \n this.totalRefundAmount, 'op');\n this.paymentViewService.postRefundsReason(requestBody).subscribe(\n response => {\n if (JSON.parse(response)) {\n this.viewCompStatus = '';\n this.viewStatus = 'refundconfirmationpage';\n this.refundReference =JSON.parse(response).refund_reference;\n if(JSON.parse(response).refund_amount) {\n this.refundAmount = JSON.parse(response).refund_amount;\n }\n }\n },\n (error: any) => {\n this.errorMessage = error;\n this.isConfirmationBtnDisabled = false;\n this.cd.detectChanges();\n })\n }\n\n gotoRefundReasonPage () {\n this.viewStatus = '';\n this.viewCompStatus = 'issuerefundpage1';\n \n }\n\n// Retro Refund\n\n // confirmRetroRefund() {\n // this.isConfirmationBtnDisabled = true;\n // this.errorMessage = '';\n // this.errorMsg = [];\n // if( this.isRefundRemission) {\n // this.retroRemission = true;\n // }\n\n // const requestBody = new PostRefundRetroRemission(this.payment.reference,'RR004-Retrospective remission', this.contactDetailsObj);\n // this.paymentViewService.postRefundsReason(requestBody).subscribe(\n // response => {\n // if (JSON.parse(response)) {\n // this.viewCompStatus = '';\n // this.viewStatus = 'retrorefundconfirmationpage';\n // this.refundReference =JSON.parse(response).refund_reference;\n // if(JSON.parse(response).refund_amount) {\n // this.refundAmount = JSON.parse(response).refund_amount;\n // }\n // }\n // },\n // (error: any) => {\n // this.errorMessage = error;\n // this.isConfirmationBtnDisabled = false;\n // });\n // }\n\n selectRadioButton(key, value) {\n localStorage.setItem(\"myradio\", value);\n const remissionctrls=this.remissionForm.controls;\n remissionctrls['refundDDReason'].setValue('Select a different reason', {onlySelf: true});\n remissionctrls['reason'].reset();\n this.isRefundReasonsSelected = true;\n this.errorMessage = false;\n this.errorMsg = [];\n this.isReasonEmpty = false;\n this.showReasonText = false;\n this.refundHasError = false;\n this.selectedRefundReason = value;\n this.selectedRefundReasonCode = key;\n if(this.selectedRefundReason.includes('Other')) {\n this.showReasonText = true;\n this.refundHasError = false;\n this.refundReason = value;\n }\n }\n\n selectchange(args) {\n const remissionctrls=this.remissionForm.controls;\n remissionctrls['refundReason'].reset();\n remissionctrls['reason'].reset();\n this.isRefundReasonsSelected = false;\n this.showReasonText = false;\n this.refundHasError = false;\n this.selectedRefundReason = args.target.options[args.target.options.selectedIndex].id;\n this.selectedRefundReasonCode = args.target.options[args.target.options.selectedIndex].value;\n this.reasonLength = (29-this.selectedRefundReason.split('- ')[1].length);\n\n if(this.selectedRefundReason.includes('Other')) {\n this.showReasonText = true;\n this.refundHasError = false;\n this.refundReason = args.target.options[args.target.options.selectedIndex].id;\n }\n\n\n }\n getContactDetails(obj:IRefundContactDetails, type) {\n this.contactDetailsObj = obj;\n this.viewCompStatus = '';\n this.notificationPreview = false;\n if(type == 'checkaddRefundpage'){\n this.getTemplateInstructionType(this.remessionPayment.reference,this.remessionPayment);\n }else if (type == 'checkissuerefundpage'){\n this.getTemplateInstructionType(this.payment.reference, this.payment);\n }else if(type == 'addrefundcheckandanswer'){\n this.getTemplateInstructionType(this.paymentReference, this.paymentObj);\n }\n this.viewStatus = type;\n }\n\n gotoPartialFeeRefundScreen() {\n\n if (this.isFromRefundStatusPage){\n var remissionctrls=this.remissionForm.controls;\n this.refundListReason.emit({reason: this.displayRefundReason, code: this.refundReason});\n return;\n }\n this.refundHasError = false;\n this.viewCompStatus = 'issuerefund';\n this.viewStatus = '';\n }\n\n \n\n gotoServiceRequestPage(event: any) {\n this.errorMessage ='';\n this.errorMsg = [];\n this.isFromCheckAnsPage = false;\n event.preventDefault();\n\n if (this.isFromRefundStatusPage){\n var remissionctrls=this.remissionForm.controls;\n this.totalRefundAmount = 0;\n this.refundListAmount.emit(this.totalRefundAmount.toString());\n return;\n }\n if (this.isFromServiceRequestPage && !this.isFromPaymentDetailPage) {\n this.viewStatus = 'order-full-view';\n this.viewCompStatus = '';\n } else if ( this.isFromRefundListPage ) {\n this.paymentLibComponent.iscancelClicked = true;\n this.refundListReason.emit({reason: this.selectedRefundReason, code: this.refundReason});\n this.paymentLibComponent.isFromRefundStatusPage = true;\n } else {\n this.paymentLibComponent.paymentMethod = this.payment.method;\n this.paymentLibComponent.paymentGroupReference = this.paymentLibComponent.paymentGroupReference\n this.paymentLibComponent.paymentReference = this.payment.reference;\n this.paymentLibComponent.viewName = 'payment-view';\n this.OrderslistService.setOrderRef(this.orderRef);\n this.OrderslistService.setorderCCDEvent(this.orderCCDEvent);\n this.OrderslistService.setorderCreated(this.orderCreated);\n this.OrderslistService.setorderDetail(this.orderDetail);\n this.OrderslistService.setorderParty(this.orderParty);\n this.OrderslistService.setorderTotalPayments(this.orderTotalPayments);\n this.OrderslistService.setorderRemissionTotal(this.orderRemissionTotal);\n this.OrderslistService.setorderFeesTotal(this.orderFeesTotal);\n this.viewStatus = 'payment-view';\n this.sendOrderDetail = this.orderDetail;\n this.sendOrderRef = this.orderRef;\n if(this.LOGGEDINUSERROLES === undefined) {\n this.OrderslistService.getUserRolesList().subscribe((data) => this.LOGGEDINUSERROLES = data);\n }\n this.viewCompStatus = '';\n }\n\n }\n gotoAddressPage(note?: IRefundContactDetails) {\n if (note) {\n this.notification = { contact_details: note, notification_type: note.notification_type };\n }\n this.errorMessage = '';\n this.viewCompStatus = 'addrefundforremission';\n this.viewStatus = '';\n this.isRefundRemission = true;\n this.errorMessage = false;\n }\n gotoRemissionSuccess(event: Event) {\n event.preventDefault();\n this.errorMessage = '';\n this.viewCompStatus = '';\n this.viewStatus = 'retroremissionconfirmationpage';\n this.isRefundRemission = true;\n this.errorMessage = false;\n }\n\n gotoCasetransationPage() {\n this.OrderslistService.setnavigationPage('casetransactions');\n this.errorMessage = '';\n this.errorMsg = [];\n this.paymentLibComponent.viewName = 'case-transactions';\n this.paymentLibComponent.VIEW = 'case-transactions';\n this.paymentLibComponent.ISTURNOFF = this.isTurnOff;\n this.paymentLibComponent.isFromServiceRequestPage = true;\n this.resetOrderData();\n let partUrl = this.bsPaymentDcnNumber ? `&dcn=${this.bsPaymentDcnNumber}` : '';\n partUrl += this.paymentLibComponent.ISBSENABLE ? '&isBulkScanning=Enable' : '&isBulkScanning=Disable';\n partUrl += this.paymentLibComponent.ISTURNOFF ? '&isTurnOff=Enable' : '&isTurnOff=Disable';\n partUrl += this.isStrategicFixEnable ? '&isStFixEnable=Enable' : '&isStFixEnable=Disable';\n partUrl += `&caseType=${this.caseType}`;\n const url = `/payment-history/${this.ccdCaseNumber}?view=case-transactions&takePayment=${this.paymentLibComponent.TAKEPAYMENT}&selectedOption=${this.option}${partUrl}`;\n this.router.routeReuseStrategy.shouldReuseRoute = () => false;\n this.router.onSameUrlNavigation = 'reload';\n this.router.navigateByUrl(url);\n }\n\n gotoCasetransationPageCancelBtnClicked(event: Event) {\n event.preventDefault();\n this.errorMsg = [];\n if( this.paymentLibComponent.isFromServiceRequestPage !== undefined && !this.paymentLibComponent.isFromServiceRequestPage) {\n this.OrderslistService.setnavigationPage('casetransactions');\n this.OrderslistService.setisFromServiceRequestPage(false);\n this.paymentLibComponent.VIEW ='case-transactions';\n this.paymentLibComponent.viewName = 'case-transactions';\n this.paymentLibComponent.ISBSENABLE = true;\n this.paymentLibComponent.isRefundStatusView = false;\n } else { \n\n if (this.paymentLibComponent.REFUNDLIST) {\n this.paymentLibComponent.viewName = 'refund-list';\n return;\n }\n if (this.paymentLibComponent.TAKEPAYMENT === undefined && this.paymentLibComponent.SERVICEREQUEST === undefined) {\n this.paymentLibComponent.SERVICEREQUEST = 'false';\n }\n this.OrderslistService.setisFromServiceRequestPage(false);\n this.OrderslistService.setpaymentPageView({method: '',payment_group_reference: '', reference:''});\n this.OrderslistService.setnavigationPage('casetransactions');\n this.errorMessage = '';\n this.paymentLibComponent.viewName = 'case-transactions';\n this.paymentLibComponent.ISTURNOFF = this.isTurnOff;\n this.paymentLibComponent.isFromServiceRequestPage = true;\n this.paymentLibComponent.ISBSENABLE = true;\n let partUrl = this.bsPaymentDcnNumber ? `&dcn=${this.bsPaymentDcnNumber}` : '';\n partUrl += this.paymentLibComponent.ISBSENABLE ? '&isBulkScanning=Enable' : '&isBulkScanning=Disable';\n partUrl += this.paymentLibComponent.ISTURNOFF ? '&isTurnOff=Enable' : '&isTurnOff=Disable';\n partUrl += this.isStrategicFixEnable ? '&isStFixEnable=Enable' : '&isStFixEnable=Disable';\n partUrl += `&caseType=${this.caseType}`;\n if(this.isFromPaymentDetailPage) {\n partUrl += this.paymentLibComponent.isFromPaymentDetailPage\n }\n\n if(!this.paymentLibComponent.SERVICEREQUEST) {\n const url = `/payment-history/${this.ccdCaseNumber}?view=case-transactions&takePayment=${this.paymentLibComponent.TAKEPAYMENT}&selectedOption=${this.option}${partUrl}`;\n this.router.routeReuseStrategy.shouldReuseRoute = () => false;\n this.router.onSameUrlNavigation = 'reload';\n this.router.navigateByUrl(url);\n } else {\n const url =`/payment-history/${this.ccdCaseNumber}?selectedOption=${this.option}${partUrl}`;\n this.router.routeReuseStrategy.shouldReuseRoute = () => false;\n this.router.onSameUrlNavigation = 'reload';\n this.router.navigateByUrl(url);\n }\n }\n\n }\n\n resetOrderData() {\n this.OrderslistService.setOrderRef(null);\n this.OrderslistService.setorderCCDEvent(null);\n this.OrderslistService.setorderCreated(null);\n this.OrderslistService.setorderDetail(null);\n this.OrderslistService.setorderParty(null);\n this.OrderslistService.setorderTotalPayments(null);\n this.OrderslistService.setorderRemissionTotal(null);\n this.OrderslistService.setorderFeesTotal(null);\n }\n\n changeRefundAmount() { \n this.isFromCheckAnsPage = true;\n this.viewCompStatus = 'issuerefund';\n this.viewStatus = '';\n }\n\n getFormattedCurrency(currency:number){\n if(currency.toString().includes(\".\")){\n return currency\n }\n return currency.toString().concat(\".00\");\n }\n\n showNotificationPreview(): void {\n this.notificationPreview = true;\n }\n\n hideNotificationPreview(): void {\n this.notificationPreview = false;\n }\n\n getTemplateInstructionType(paymentReference: string, payment?: IPayment): void {\n\n if (payment == undefined || payment == null || payment.reference != paymentReference) {\n this.paymentViewService.getPaymentDetails(paymentReference).subscribe(\n payment => {\n this.paymentObj = payment;\n this.paymentObj.reference = paymentReference;\n this.templateInstructionType = this.notificationService.getNotificationInstructionType(this.paymentObj.channel, this.paymentObj.method);\n },\n (error: any) => { \n this.templateInstructionType = 'Template';\n })\n } else {\n this.templateInstructionType = this.notificationService.getNotificationInstructionType(payment.channel, payment.method);\n }\n }\n\n}\n","import { Pipe, PipeTransform } from '@angular/core';\n@Pipe({\n name: 'ccdHyphens'\n})\nexport class CcdHyphensPipe implements PipeTransform {\n constructor() {}\n transform(value: any, args?: any): any {\n const pattern = /^([0-9]{4})+([0-9]{4})+([0-9]{4})+([0-9]{4})$/;\n if ( value.match(pattern)) {\n return value.replace(pattern,'$1-$2-$3-$4') \n }\n return value;\n }\n}\n","import { Pipe, PipeTransform } from '@angular/core';\n@Pipe({\n name: 'capitalize'\n})\nexport class CapitalizePipe implements PipeTransform {\n constructor() { }\n transform(s: any, args?: any): any {\n return s && s[0].toUpperCase() + s.slice(1) || \"\";\n }\n}\n","import { Pipe, PipeTransform } from '@angular/core';\n@Pipe({\n name: 'keyValue'\n})\nexport class keyValuePipe implements PipeTransform {\n constructor() {}\n transform(input: any): any {\n let keys = [];\n for (let key in input) {\n if (input.hasOwnProperty(key)) {\n keys.push({ key: key, value: input[key]});\n }\n }\n return keys;\n }\n}\n","import { Pipe, PipeTransform } from '@angular/core';\nimport { DomSanitizer, SafeHtml } from '@angular/platform-browser';\n\n@Pipe({ name: 'sanitizeHtml' })\nexport class SanitizeHtmlPipe implements PipeTransform {\n constructor(private sanitizer: DomSanitizer) {}\n transform(value: any): SafeHtml {\n return this.sanitizer.bypassSecurityTrustHtml(value);\n }\n}\n","import { Injectable } from '@angular/core';\nimport * as FileSaver from 'file-saver';\nimport * as XLSX from 'xlsx';\nimport * as XLSXStyle from 'xlsx-style';\n\n\nconst EXCEL_TYPE = 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=UTF-8';\nconst EXCEL_EXTENSION = '.xlsx';\n\n@Injectable()\nexport class XlFileService {\n\n constructor() { }\n\n public exportAsExcelFile(json: any[], excelFileName: string): void {\n let worksheet: XLSX.WorkSheet; \n let workbook: XLSX.WorkBook; \n if(excelFileName.match('Data_Loss')!== null){\n 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']});\n worksheet = this.setDataLossReportHeaders(worksheet);\n worksheet = this.autoFitColumns(worksheet,json);\n } else if(excelFileName.match('Unprocessed')!== null){\n worksheet = XLSX.utils.json_to_sheet(json,{header:['resp_service_id','resp_service_name','exception_ref','ccd_ref','date_banked','bgc_batch','payment_asset_dcn','env_ref','env_item','payment_method','amount']});\n worksheet = this.setUnprocessedReportHeaders(worksheet);\n worksheet = this.autoFitColumns(worksheet,json);\n } else if(excelFileName.match('Processed_Unallocated')!== null){\n worksheet = XLSX.utils.json_to_sheet(json,{header:['resp_service_id','resp_service_name','allocation_status','receiving_office','allocation_reason','ccd_exception_reference','ccd_case_reference','payment_asset_dcn','env_ref','env_item','date_banked','bgc_batch','payment_method','amount']});\n worksheet = this.setProcessedUnallocatedReportHeaders(worksheet);\n worksheet = this.autoFitColumns(worksheet,json);\n } else if(excelFileName.match('Payment failure')!== null){\n worksheet = XLSX.utils.json_to_sheet(json,{header:['payment_reference','ccd_reference','document_control_number','org_id','service_name','failure_reference','failure_reason','disputed_amount','event_name','event_date','representment_status','representment_date','refund_reference','refund_amount','refund_date']});\n worksheet = this.setPaymentFailureReportHeaders(worksheet);\n worksheet = this.autoFitColumns(worksheet,json);\n } else {\n worksheet = XLSX.utils.json_to_sheet(json,{header:['resp_service_id','resp_service_name','surplus_shortfall','balance','payment_amount','ccd_case_reference', 'ccd_exception_reference', 'processed_date', 'reason', 'explanation', 'user_name']});\n worksheet = this.setShortFallReportHeaders(worksheet);\n worksheet = this.autoFitColumns(worksheet,json);\n }\n workbook = { Sheets: { 'data': worksheet }, SheetNames: ['data'] };\n const excelBuffer: any = XLSX.write(workbook, { bookType: 'xlsx', type: 'array' });\n this.saveAsExcelFile(excelBuffer, excelFileName);\n }\n\n\nprivate autoFitColumns (worksheet: XLSX.WorkSheet,json:any) : XLSX.WorkSheet {\n let objectMaxLength = []; \n let ColWidth = [];\n let obj = <any>Object;\n for (let i = 0; i < json.length; i++) {\n let value = obj.values(json[i]);\n let key = obj.keys(json[i]);\n for (let j = 0; j < value.length; j++) {\n if(value[j] === null){\n value[j] = '';\n }\n objectMaxLength[j] =\n key[j].length >= value[j].length\n ? key[j].length+2\n : value[j].length+1;\n if( value[j].length === undefined){\n objectMaxLength[j] = key[j].length+2;\n }\n ColWidth.push({'width': +objectMaxLength[j]});\n }\n }\n worksheet['!cols'] = ColWidth;\n return worksheet;\n}\n\n\nprivate setDataLossReportHeaders (worksheet: XLSX.WorkSheet): XLSX.WorkSheet {\n worksheet.A1.v = \"Loss_Resp\";\n worksheet.B1.v = \"Payment_Asset_DCN\";\n worksheet.C1.v = \"Envelope_Ref\";\n worksheet.D1.v = \"Envelope_Item\";\n worksheet.E1.v = \"Resp_Service ID\";\n worksheet.F1.v = \"Resp_Service Name\";\n worksheet.G1.v = \"Date_Banked\";\n worksheet.H1.v = \"BGC_Batch\";\n worksheet.I1.v = \"Payment_Method\";\n worksheet.J1.v = \"Amount\";\n return worksheet;\n}\n\nprivate setUnprocessedReportHeaders (worksheet: XLSX.WorkSheet): XLSX.WorkSheet {\n worksheet.A1.v = \"Resp_Service ID\";\n worksheet.B1.v = \"Resp_Service Name\";\n worksheet.C1.v = \"Exception_Ref\";\n worksheet.D1.v = \"CCD_Ref\";\n worksheet.E1.v = \"Date_Banked\";\n worksheet.F1.v = \"BGC_Batch\";\n worksheet.G1.v = \"Payment_Asset_DCN\";\n worksheet.H1.v = \"Envelope_Ref\";\n worksheet.I1.v = \"Envelope_Item\";\n worksheet.J1.v = \"Payment_Method\";\n worksheet.K1.v = \"Amount\";\n return worksheet;\n}\n\nprivate setProcessedUnallocatedReportHeaders (worksheet: XLSX.WorkSheet): XLSX.WorkSheet {\n worksheet.A1.v = \"Resp_Service ID\";\n worksheet.B1.v = \"Resp_Service Name\";\n worksheet.C1.v = \"Allocation_Status\";\n worksheet.D1.v = \"Receiving_Office\";\n worksheet.E1.v = \"Allocation_Reason\";\n worksheet.F1.v = \"CCD_Exception_Ref\";\n worksheet.G1.v = \"CCD_Case_Ref\";\n worksheet.H1.v = \"Payment_Asset_DCN\";\n worksheet.I1.v = \"Envelope_Ref\";\n worksheet.J1.v = \"Envelope_Item\";\n worksheet.K1.v = \"Date_Banked\";\n worksheet.L1.v = \"BGC_Batch\";\n worksheet.M1.v = \"Payment_Method\";\n worksheet.N1.v = \"Amount\";\n return worksheet;\n}\n\nprivate setPaymentFailureReportHeaders (worksheet: XLSX.WorkSheet): XLSX.WorkSheet {\n worksheet.A1.v = \"Payment reference\";\n worksheet.B1.v = \"CCD reference\";\n worksheet.C1.v = \"Document Control Number\";\n worksheet.D1.v = \"OrgID\";\n worksheet.E1.v = \"Service name\";\n worksheet.F1.v = \"Failure reference\";\n worksheet.G1.v = \"Failure reason\";\n worksheet.H1.v = \"Disputed amount\";\n worksheet.I1.v = \"Event name\";\n worksheet.J1.v = \"Event date\";\n worksheet.K1.v = \"Representment status\";\n worksheet.L1.v = \"Representment date\";\n worksheet.M1.v = \"Refund reference\";\n worksheet.N1.v = \"Refund amount\";\n worksheet.O1.v = \"Refund date\";\n return worksheet;\n}\nprivate setShortFallReportHeaders (worksheet: XLSX.WorkSheet): XLSX.WorkSheet {\n worksheet.A1.v = \"Resp_Service ID\";\n worksheet.B1.v = \"Resp_Service Name\";\n worksheet.C1.v = \"Over Payment_Under Payment\";\n worksheet.D1.v = \"Balance\";\n worksheet.E1.v = \"Payment_Amount\";\n worksheet.F1.v = \"CCD_Case_Ref\";\n worksheet.G1.v = \"Exception_Ref\";\n worksheet.H1.v = \"Processed_Date\";\n worksheet.I1.v = \"Reason\";\n worksheet.J1.v = \"Explanation\";\n worksheet.K1.v = \"Updated Name\";\n return worksheet;\n}\n\nprivate saveAsExcelFile(buffer: any, fileName: string): void {\n const data: Blob = new Blob([buffer], {\n type: EXCEL_TYPE\n });\n FileSaver.saveAs(data, fileName + EXCEL_EXTENSION);\n }\n}\n","import { Component, Input, OnInit } from '@angular/core';\nimport { FormBuilder, FormGroup, FormControl } from '@angular/forms';\nimport { formatDate } from \"@angular/common\";\nimport {IPaymentGroup} from '../../interfaces/IPaymentGroup';\nimport { BulkScaningPaymentService } from '../../services/bulk-scaning-payment/bulk-scaning-payment.service';\nimport { ErrorHandlerService } from '../../services/shared/error-handler.service';\nimport { PaymentViewService } from '../../services/payment-view/payment-view.service';\nimport {XlFileService} from '../../services/xl-file/xl-file.service';\nimport { FindValueSubscriber } from 'rxjs/internal/operators/find';\n\n@Component({\n selector: 'ccpay-reports',\n templateUrl: './reports.component.html',\n styleUrls: ['./reports.component.scss']\n})\nexport class ReportsComponent implements OnInit {\n @Input() ISPAYMENTSTATUSENABLED: string;\n fmt = 'dd/MM/yyyy';\n loc = 'en-US';\n reportsForm: FormGroup;\n startDate: string;\n endDate: string;\n errorMeaagse: string;\n ccdCaseNumber: string;\n isDownLoadButtondisabled:Boolean = false;\n isStartDateLesthanEndDate: Boolean = false;\n isDateBetwnMonth: Boolean = false;\n isDateRangeBetnWeek: Boolean = false;\n errorMessage = this.errorHandlerService.getServerErrorMessage(false, false, '');\n paymentGroups: IPaymentGroup[] = [];\n\n constructor(\n private xlFileService: XlFileService,\n private errorHandlerService: ErrorHandlerService,\n private formBuilder: FormBuilder,\n private bulkScaningPaymentService: BulkScaningPaymentService,\n private paymentViewService: PaymentViewService) { }\n \n\n ngOnInit() {\n this.fromValidation();\n\n }\n\n getToday(): string {\n return new Date().toISOString().split('T')[0];\n }\n\n getSelectedFromDate(): void {\n this.validateDates(this.reportsForm.get('selectedreport').value);\n }\n\n validateDates(reportName){\n const selectedStartDate = this.tranformDate(this.reportsForm.get('startDate').value),\n selectedEndDate = this.tranformDate(this.reportsForm.get('endDate').value);\n const isDateRangeMoreThanWeek = (<any>new Date(selectedStartDate) - <any>new Date(selectedEndDate))/(1000 * 3600 * -24) > 7;\n const isDateRangeMoreThanMonth = (<any>new Date(selectedStartDate) - <any>new Date(selectedEndDate))/(1000 * 3600 * -24) > 30;\n if(new Date(selectedStartDate) > new Date(selectedEndDate) && selectedEndDate !== ''){\n this.reportsForm.get('startDate').setValue('');\n this.isDateRangeBetnWeek = false;\n this.isDateBetwnMonth = false;\n this.isStartDateLesthanEndDate = true;\n } else if(reportName && reportName ==='SURPLUS_AND_SHORTFALL' && isDateRangeMoreThanWeek ) {\n this.isDateRangeBetnWeek = true;\n this.isDateBetwnMonth = false;\n this.isStartDateLesthanEndDate = false;\n } else if(reportName && reportName ==='PAYMENT_FAILURE_EVENT' && isDateRangeMoreThanMonth ) {\n this.isDateRangeBetnWeek = false;\n this.isDateBetwnMonth = true;\n this.isStartDateLesthanEndDate = false;\n } else {\n this.isDateBetwnMonth = false;\n this.isDateRangeBetnWeek = false;\n this.isStartDateLesthanEndDate = false;\n }\n\n }\n\n fromValidation() {\n this.reportsForm = this.formBuilder.group({\n selectedreport: new FormControl('') ,\n startDate: new FormControl(''),\n endDate: new FormControl('') \n });\n}\n\ndownloadReport(){\n this.isDownLoadButtondisabled = true;\n const dataLossRptDefault = [{loss_resp:'',payment_asset_dcn:'',env_ref:'',env_item:'',resp_service_id:'',resp_service_name:'',date_banked:'',bgc_batch:'',payment_method:'',amount:''}],\n unProcessedRptDefault = [{resp_service_id:'',resp_service_name:'',exception_ref:'',ccd_ref:'',date_banked:'',bgc_batch:'',payment_asset_dcn:'',env_ref:'',env_item:'',payment_method:'',amount:''}],\n processedUnallocated =[{resp_service_id:'',resp_service_name:'',allocation_status:'',receiving_office:'',allocation_reason:'',ccd_exception_ref:'',ccd_case_ref:'',payment_asset_dcn:'',env_ref:'',env_item:'',date_banked:'',bgc_batch:'',payment_method:'',amount:'',updated_by:''}],\n shortFallsRptDefault = [{resp_service_id:'',resp_service_name:'',surplus_shortfall:'',balance:'',payment_amount:'',ccd_case_reference:'',ccd_exception_reference:'',processed_date:'', reason:'', explanation:'', user_name:''}],\n selectedReportName = this.reportsForm.get('selectedreport').value,\n selectedStartDate = this.tranformDate(this.reportsForm.get('startDate').value),\n selectedEndDate = this.tranformDate(this.reportsForm.get('endDate').value);\n\n if(selectedReportName === 'PROCESSED_UNALLOCATED' || selectedReportName === 'SURPLUS_AND_SHORTFALL' ){\n this.paymentViewService.downloadSelectedReport(selectedReportName,selectedStartDate,selectedEndDate).subscribe(\n response => {\n this.errorMessage = this.errorHandlerService.getServerErrorMessage(false, false, '');\n const result = JSON.parse(response);\n let res= {data: this.applyDateFormat(result)};\n if(res['data'].length === 0 && selectedReportName === 'PROCESSED_UNALLOCATED' ){\n res.data= processedUnallocated;\n } else if(res['data'].length === 0 && selectedReportName === 'SURPLUS_AND_SHORTFALL' ) {\n res.data= shortFallsRptDefault;\n } \n if(result['data'].length > 0) {\n for( var i=0; i< res['data'].length; i++) {\n if(res['data'][i][\"payment_asset_dcn\"] !== undefined) {\n res['data'][i]['env_ref'] = res['data'][i][\"payment_asset_dcn\"].substr(0,13);\n res['data'][i]['env_item'] = res['data'][i][\"payment_asset_dcn\"].substr(13,21);\n }\n if(res['data'][i][\"amount\"] !== undefined) {\n res['data'][i]['amount'] = this.convertToFloatValue(res['data'][i]['amount']);\n }\n if(res['data'][i][\"balance\"] !== undefined) {\n res['data'][i]['balance'] = this.convertToFloatValue(res['data'][i][\"balance\"]);\n }\n let Op = res['data'][i][\"surplus_shortfall\"];\n if(Op !== undefined) {\n res['data'][i]['surplus_shortfall'] = Op ==\"Surplus\" ? \"Over payment\":\"Under payment\";\n }\n if(res['data'][i][\"payment_amount\"] !== undefined) {\n res['data'][i]['payment_amount'] = this.convertToFloatValue(res['data'][i]['payment_amount']);\n }\n }\n } \n this.isDownLoadButtondisabled = false;\n this.xlFileService.exportAsExcelFile(res['data'], this.getFileName(this.reportsForm.get('selectedreport').value, selectedStartDate, selectedEndDate));\n },\n (error: any) => {\n this.isDownLoadButtondisabled = false;\n this.errorMessage = this.errorHandlerService.getServerErrorMessage(true, false, '');\n })\n\n } else if(selectedReportName === 'PAYMENT_FAILURE_EVENT') {\n\n this.paymentViewService.downloadFailureReport(selectedStartDate,selectedEndDate).subscribe(\n response => {\n this.errorMessage = this.errorHandlerService.getServerErrorMessage(false, false, '');\n const result = {data: JSON.parse(response)['payment_failure_report_list']};\n let res = {data: this.applyDateFormat(result)};\n if (result['data'].length > 0) {\n for ( var i=0; i< res['data'].length; i++) {\n if (res['data'][i][\"disputed_amount\"] !== undefined) {\n res['data'][i]['disputed_amount'] = this.convertToFloatValue(res['data'][i][\"disputed_amount\"]);\n }\n if (res['data'][i][\"representment_status\"] !== undefined) {\n res['data'][i]['representment_status'] = res['data'][i][\"representment_status\"].toLowerCase() === 'yes' ? 'Success' : 'Failure';\n }\n if (res['data'][i]['representment_status'] === undefined) {\n res['data'][i]['representment_status'] = 'No representment received';\n }\n if (res['data'][i]['representment_date'] === undefined) {\n res['data'][i]['representment_date'] = 'N/A';\n }\n if (res['data'][i]['refund_reference'] === undefined) {\n res['data'][i]['refund_reference'] = 'No refund available';\n }\n if (res['data'][i]['refund_amount'] === undefined) {\n res['data'][i]['refund_amount'] = 'N/A';\n }\n if (res['data'][i]['refund_date'] === undefined) {\n res['data'][i]['refund_date'] = 'N/A';\n }\n if (res['data'][i]['document_control_number'] === undefined) {\n res['data'][i]['document_control_number'] = 'N/A';\n }\n }\n }\n this.isDownLoadButtondisabled = false;\n this.xlFileService.exportAsExcelFile(res['data'], this.getFileName(this.reportsForm.get('selectedreport').value, selectedStartDate, selectedEndDate ));\n\n },\n (error: any) => {\n this.isDownLoadButtondisabled = false;\n const errorContent = error.replace(/[^a-zA-Z ]/g, '').trim();\n const statusCode = error.replace(/[^a-zA-Z0-9 ]/g, '').trim().split(' ')[0];\n if(statusCode === '404') {\n this.errorMessage = this.errorHandlerService.getServerErrorMessage(true, true, errorContent);\n }else {\n this.errorMessage = this.errorHandlerService.getServerErrorMessage(true, false, '');\n }\n })\n\n } else {\n this.bulkScaningPaymentService.downloadSelectedReport(selectedReportName,selectedStartDate,selectedEndDate).subscribe(\n response => {\n this.errorMessage = this.errorHandlerService.getServerErrorMessage(false, false, '');\n const result = JSON.parse(response);\n let res = {data: this.applyDateFormat(result)};\n if(res['data'].length === 0 && selectedReportName === 'DATA_LOSS' ){\n res.data= dataLossRptDefault;\n } else if(res['data'].length === 0 && selectedReportName === 'UNPROCESSED'){\n res.data = unProcessedRptDefault;\n }\n if(result['data'].length > 0) {\n for( var i=0; i< res['data'].length; i++) {\n if(res['data'][i][\"amount\"] !== undefined) {\n res['data'][i]['amount'] = this.convertToFloatValue(res['data'][i]['amount']);\n }\n if(res['data'][i][\"payment_asset_dcn\"] !== undefined) {\n res['data'][i]['env_ref'] = res['data'][i][\"payment_asset_dcn\"].substr(0,13);\n res['data'][i]['env_item'] = res['data'][i][\"payment_asset_dcn\"].substr(13,21);\n }\n }\n }\n this.isDownLoadButtondisabled = false;\n this.xlFileService.exportAsExcelFile(res['data'], this.getFileName(this.reportsForm.get('selectedreport').value, selectedStartDate, selectedEndDate ));\n },\n (error: any) => {\n this.isDownLoadButtondisabled = false;\n this.errorMessage = this.errorHandlerService.getServerErrorMessage(true, false, '');\n })\n }\n }\n\n getFileName(selectedOption: string, startDate: string, endDate: string ) {\n const loc = 'en-US',\n stDt = formatDate(startDate, 'ddMMyy', loc),\n enDt = formatDate(endDate, 'ddMMyy', loc),\n now = new Date(),\n currentDate = formatDate(now, 'ddMMyy', loc),\n timestamp = `${currentDate}_${this.getTwodigit(now.getHours())}${this.getTwodigit(now.getMinutes())}${this.getTwodigit(now.getSeconds())}`,\n selectedOptionTxt = this.getCamelCaseString(selectedOption);\n \n return selectedOptionTxt+'_'+stDt+'_To_'+enDt+'_Run_'+ timestamp;\n } \n tranformDate(strDate: string) {\n let result = '';\n if (strDate) {\n let parts = strDate.split('-');\n result = `${parts[1]}/${parts[2]}/${parts[0]}`;\n }\n return result;\n }\n getTwodigit(input: number){\n return (\"0\" + input).slice(-2);\n }\n getCamelCaseString(selectedOption) {\n let result;\n switch(selectedOption) { \n case 'UNPROCESSED': { \n result = 'Unprocessed';\n break; \n } \n case 'DATA_LOSS': { \n result = 'Data_Loss';\n break; \n } \n case 'PROCESSED_UNALLOCATED': { \n result = 'Processed_Unallocated';\n break; \n } \n case 'SURPLUS_AND_SHORTFALL': { \n result = 'Over Payment_Under Payment';\n break; \n } \n case 'PAYMENT_FAILURE_EVENT': { \n result = 'Payment failure event';\n break; \n }\n default: { \n result = selectedOption;\n break; \n } \n } \n return result;\n }\n applyDateFormat(res) {\n return res['data'].map(value => {\n if (value['date_banked']) {\n value['date_banked'] = formatDate(value['date_banked'], this.fmt, this.loc);\n }\n if (value['event_date'] && value['event_date'].indexOf(',') === -1) {\n value['event_date'] = formatDate(value['event_date'], this.fmt, this.loc);\n } else if (value['event_date'] && value['event_date'].indexOf(',') !== -1) {\n value['event_date'] = this.multiDateFormater(value['event_date'])\n }\n\n if (value['representment_date'] && value['representment_date'].indexOf(',') === -1) {\n value['representment_date'] = formatDate(value['representment_date'], this.fmt, this.loc);\n } else if (value['representment_date'] && value['representment_date'].indexOf(',') !== -1) {\n value['representment_date'] = this.multiDateFormater(value['representment_date'])\n }\n\n if (value['refund_date'] && value['refund_date'].indexOf(',') === -1) {\n value['refund_date'] = formatDate(value['refund_date'], this.fmt, this.loc);\n } else if (value['refund_date'] && value['refund_date'].indexOf(',') !== -1) {\n value['refund_date'] = this.multiDateFormater(value['refund_date'])\n }\n return value;\n });\n }\n multiDateFormater(dateStr) {\n return dateStr.split(',').map((date) => formatDate(date, this.fmt, this.loc)).join(',');\n }\n \n convertToFloatValue(amt) {\n return amt ? Number.parseFloat(amt).toFixed(2): '0.00';\n }\n}\n","import {Component, ViewChild, Input, ChangeDetectorRef} from '@angular/core';\nimport {PaymentLibComponent} from '../../payment-lib.component';\nimport { MatTableDataSource} from '@angular/material/table';\nimport {MatSort } from '@angular/material/sort';\nimport {Sort } from '@angular/material/sort';\nimport {MatPaginator } from '@angular/material/paginator';\nimport { IRefundList } from '../../interfaces/IRefundList';\nimport { OrderslistService } from '../../services/orderslist.service';\nimport { THIS_EXPR } from '@angular/compiler/src/output/output_ast';\nimport { ActivatedRoute,Router } from '@angular/router';\n@Component({\n selector: 'ccpay-table',\n templateUrl: './table.component.html',\n styleUrls: ['./table.component.css']\n})\nexport class TableComponent {\n @Input('DATASOURCE') DATASOURCE: any[];\n @Input('STATUS') STATUS: string;\n @Input('errorMessage') errorMessage: string;\n isApprovalFlow: boolean;\n // displayedColumns = ['ccdCaseNumber', 'refundReference', 'reason', 'createBy', 'updateDate', 'Action'];\n displayedColumns = ['ccd_case_number', 'refund_reference', 'user_full_name','date_created', 'date_updated', 'Action'];\n \n dataSource: MatTableDataSource<any>;\n userLst;\n serviceLst;\n actualcount: number;\n count: number;\n refundList: IRefundList[];\n @ViewChild(MatPaginator) paginator: MatPaginator;\n @ViewChild(MatSort) sort: MatSort;\n constructor(\n private paymentLibComponent: PaymentLibComponent,\n private cdRef: ChangeDetectorRef,\n private OrderslistService: OrderslistService,\n private router: Router,\n private activeRoute: ActivatedRoute\n ) {}\n ngOnInit() {\n this.errorMessage = this.errorMessage;\n if(this.STATUS.toLowerCase() === 'sent for approval') {\n this.isApprovalFlow = true;\n } else {\n this.isApprovalFlow = false;\n }\n this.refundList = this.DATASOURCE;\n this.dataSource = new MatTableDataSource(this.refundList);\n this.actualcount = this.dataSource.data.length;\n if( this.refundList !== undefined) {\n this.userLst = this.refundList.reduce((r,{user_full_name}) => (r[user_full_name]='', r) , {});\n this.userLst = Object.keys(this.userLst);\n this.userLst.sort((a, b) => a.toString().localeCompare(b));\n this.serviceLst = this.refundList.reduce((r,{service_type}) => (r[service_type]='', r) , {});\n this.serviceLst = Object.keys(this.serviceLst);\n this.serviceLst.sort((a, b) => a.toString().localeCompare(b));\n }\n \n }\n \n /**\n * Set the paginator and sort after the view init since this component will\n * be able to query its view for the initialized paginator and sort.\n */\n ngAfterViewInit() {\n \n this.dataSource.sort = this.sort;\n\n //const sortState: Sort = {active: 'date_updated', direction: 'desc'};\n // this.sort.active = sortState.active;\n // this.sort.direction = sortState.direction;\n // this.sort.sortChange.emit(sortState);\n this.dataSource.paginator = this.paginator;\n this.dataSource.sort = this.sort;\n this.cdRef.detectChanges();\n }\n applyFilter(filterValue: string) {\n filterValue = filterValue.trim(); // Remove whitespace\n filterValue = filterValue.toLowerCase(); // Datasource defaults to lowercase matches\n this.dataSource.filter = filterValue;\n }\n selectchange(args){\n this.dataSource.filter = args.target.value;\n this.actualcount = this.dataSource.data.length;\n this.dataSource.paginator = this.paginator;\n }\n goToRefundProcessComponent(refundReference: string, refundData: IRefundList ) {\n this.paymentLibComponent.refundlistsource = refundData;\n this.paymentLibComponent.refundReference = refundReference;\n this.paymentLibComponent.viewName = 'process-refund';\n }\n goToRefundViewComponent(refundReference: string, refundData: IRefundList ) {\n this.OrderslistService.setRefundView(refundData);\n this.paymentLibComponent.viewName='refundstatuslist';\n this.paymentLibComponent.CCD_CASE_NUMBER = refundData.ccd_case_number;\n this.paymentLibComponent.isRefundStatusView = true;\n this.paymentLibComponent.isCallFromRefundList = true;\n }\n goToCaseReview(ccdCaseNumber: string, refundData: IRefundList ) {\n this.router.navigate([`/cases/case-details/${ccdCaseNumber}`], {relativeTo: this.activeRoute});\n }\n}","import { IRefundContactDetails } from './IRefundContactDetails';\n\nexport class IPutNotificationRequest {\n recipient_email_address?: string;\n recipient_postal_address?: IRefundContactDetails\n \n constructor(contactDetails: any, notificationType: string) {\n if(notificationType === 'EMAIL') {\n this.recipient_email_address = contactDetails;\n } else if(notificationType === 'LETTER') {\n this.recipient_postal_address = contactDetails;\n }\n } \n}","import { IFee } from \"./IFee\";\nimport { IRefundContactDetails } from \"./IRefundContactDetails\";\nexport class IResubmitRefundRequest {\n refund_reason: string;\n amount: number;\n contact_details: IRefundContactDetails;\n refund_fees: IFee[];\n \n constructor(refund_reason : string, amount: number,contact_details:any,refund_fees: any[]) {\n this.refund_reason= refund_reason;\n this.amount = amount;\n this.contact_details = contact_details;\n this.refund_fees = refund_fees;\n } \n }\n ","import { Component, OnInit, Input } from '@angular/core';\nimport { RefundsService } from '../../services/refunds/refunds.service';\nimport { NotificationService } from '../../services/notification/notification.service';\nimport { FormBuilder, FormGroup, Validators, FormControl } from '@angular/forms';\nimport { IRefundList } from '../../interfaces/IRefundList';\nimport { IRefundsNotifications } from '../../interfaces/IRefundsNotifications';\nimport { OrderslistService } from '../../services/orderslist.service';\nimport { IPutNotificationRequest } from '../../interfaces/IPutNotificationRequest';\nimport { IRefundContactDetails } from '../../interfaces/IRefundContactDetails';\nimport { IRefundStatus } from '../../interfaces/IRefundStatus';\nimport { IResubmitRefundRequest } from '../../interfaces/IResubmitRefundRequest';\nimport { PaymentLibComponent } from '../../payment-lib.component';\nimport { PaymentViewService } from '../../services/payment-view/payment-view.service';\nimport { IPayment } from '../../interfaces/IPayment';\nimport { IFee } from '../../interfaces/IFee';\nimport { IRefundFee } from '../../interfaces/IRefundFee';\n\n@Component({\n selector: 'ccpay-refund-status',\n templateUrl: './refund-status.component.html',\n styleUrls: ['./refund-status.component.css']\n})\nexport class RefundStatusComponent implements OnInit {\n @Input('LOGGEDINUSERROLES') LOGGEDINUSERROLES: string[] = [];\n @Input('API_ROOT') API_ROOT: string;\n @Input() ccdCaseNumber: string;\n @Input() isTurnOff: boolean;\n @Input() orderParty: string;\n refundStatusForm: FormGroup;\n selectedRefundReason: string;\n rejectedRefundList: IRefundList[] = [];\n notificationList: any;\n notification:any;\n approvalStatus = 'Sent for approval';\n rejectStatus = 'Update required';\n errorMessage = null;\n viewName: string;\n refundReason: string;\n refundlist: IRefundList;\n bsPaymentDcnNumber: string;\n isCallFromRefundList: boolean;\n refundButtonState: string = '';\n isAmountEmpty: boolean = false;\n isReasonEmpty: boolean = false;\n amountHasError: boolean = false;\n isRemissionLessThanFeeError: boolean = false;\n refundHasError: boolean = false;\n refundReasons: any[] = [];\n refundStatusHistories: IRefundStatus[];\n refundNotifications: IRefundStatus[];\n isResendOperationSuccess: boolean = false;\n isEditDetailsClicked: boolean = false;\n isEditAddressDeatilsClicked: boolean = false;\n addressDetails: IRefundContactDetails;\n refundReference: string;\n refundAmount: string;\n refundCode: string;\n isRefundBtnDisabled: boolean = true;\n isFromPayBubble: boolean = false;\n oldRefundReason: string;\n refundreason: string;\n navigationpage: string;\n isLastUpdatedByCurrentUser: boolean = true;\n isProcessRefund: boolean = false;\n changedAmount: number;\n isRemissionsMatch: boolean;\n payment: IPayment;\n changeRefundReason: string;\n fees: IFee [];\n refundFees: IRefundFee[];\n paymentObj: IPayment;\n templateInstructionType: string;\n notificationSentViewIndex: number = -1;\n notificationPreview: boolean = false;\n notificationSentView: boolean = false;\n allowedRolesToAccessRefund = ['payments-refund-approver', 'payments-refund', 'payments'];\n\n constructor(private formBuilder: FormBuilder,\n private refundService: RefundsService,\n private notificationService: NotificationService,\n private paymentLibComponent: PaymentLibComponent,\n private OrderslistService: OrderslistService,\n private paymentViewService: PaymentViewService) { }\n\n ngOnInit() {\n\n this.resetRemissionForm([false, false, false, false], 'All');\n this.bsPaymentDcnNumber = this.paymentLibComponent.bspaymentdcn;\n this.isCallFromRefundList = this.paymentLibComponent.isCallFromRefundList;\n if(this.API_ROOT == 'api/payment-history') {\n this.isFromPayBubble = true;\n }\n if (this.paymentLibComponent.isRefundStatusView) {\n this.viewName = 'refundview';\n this.OrderslistService.getRefundView().subscribe((data) => this.refundlist = data);\n this.OrderslistService.getCCDCaseNumberforRefund.subscribe((data) => this.ccdCaseNumber = data);\n } else {\n this.viewName = 'refundstatuslist';\n this.refundService.getRefundStatusList(this.ccdCaseNumber).subscribe(\n refundList => {\n this.rejectedRefundList = refundList['refund_list'];\n }\n ),\n (error: any) => {\n this.errorMessage = error.replace(/\"/g, \"\");\n };\n }\n\n\n this.refundStatusForm = this.formBuilder.group({\n amount: new FormControl('', Validators.compose([\n Validators.required,\n Validators.pattern('^[0-9]+(\\.[0-9]{1,2})?$')\n ])),\n refundReason: new FormControl('', Validators.compose([Validators.required])),\n reason: new FormControl()\n });\n\n if(this.refundlist !== undefined) {\n this.getRefundsNotification();\n this.getRefundsStatusHistoryList();\n\n if (this.LOGGEDINUSERROLES.some(i => i.includes('payments-refund-approver'))) {\n this.isProcessRefund = true;\n this.refundButtonState = this.refundlist.refund_status.name;\n return;\n }\n\n if (this.LOGGEDINUSERROLES.some(i => i.includes('payments-refund'))) {\n this.isProcessRefund = false;\n this.refundButtonState = this.refundlist.refund_status.name;\n }\n }\n \n }\n\n getRefundsStatusHistoryList() {\n if(this.refundlist !== undefined) {\n this.refundService.getRefundStatusHistory(this.refundlist.refund_reference).subscribe(\n statusHistoryList => {\n this.refundStatusHistories = statusHistoryList.status_history_dto_list;\n this.isLastUpdatedByCurrentUser = statusHistoryList.last_updated_by_current_user;\n }\n ),\n (error: any) => {\n this.errorMessage = error.replace(/\"/g,\"\");\n };\n }\n }\n\n getRefundsNotification() {\n this.notificationService.getRefundNotification(this.refundlist.refund_reference).subscribe(\n refundsNotification => {\n this.notificationList = refundsNotification['notifications'];\n }\n ),\n (error: any) => {\n this.errorMessage = error.replace(/\"/g,\"\");\n }; \n }\n\n goToRefundView(refundlist: IRefundList, navigationpage: string) {\n this.OrderslistService.setRefundView(refundlist);\n this.OrderslistService.setCCDCaseNumber(this.ccdCaseNumber);\n this.paymentLibComponent.viewName = 'refundstatuslist';\n this.paymentLibComponent.isRefundStatusView = true;\n this.refundlist = refundlist;\n this.OrderslistService.setnavigationPage(navigationpage);\n }\n\n loadCaseTransactionPage() {\n this.OrderslistService.setnavigationPage('casetransactions');\n this.OrderslistService.setisFromServiceRequestPage(false);\n this.paymentLibComponent.viewName = 'case-transactions';\n this.paymentLibComponent.ISBSENABLE = true;\n this.paymentLibComponent.isRefundStatusView = false;\n }\n\n loadRefundListPage() {\n this.OrderslistService.getnavigationPageValue().subscribe((data) => this.navigationpage = data);\n if (this.navigationpage === 'casetransactions') {\n this.loadCaseTransactionPage();\n } else {\n this.paymentLibComponent.viewName = 'refund-list';\n }\n }\n\n gotoReviewDetailsPage(event:any) {\n // event.preventDefault();\n this.errorMessage = false;\n this.paymentLibComponent.isRefundStatusView = true;\n this.ngOnInit();\n }\n\n gotoReviewAndReSubmitPage() {\n this.viewName = 'reviewandsubmitview';\n this.getTemplateInstructionType(this.paymentObj, this.refundlist.payment_reference);\n this.oldRefundReason = this.refundlist.reason;\n this.changedAmount = this.refundlist.amount;\n this.refundreason = this.refundStatusHistories.filter(data => data.status.toLowerCase() === 'update required')[0].notes;\n this.refundService.getRefundReasons().subscribe(\n refundReasons => {\n this.refundReasons = refundReasons;\n });\n }\n gotoRefundReasonPage(refundReason:string) {\n this.isRefundBtnDisabled = false;\n this.paymentLibComponent.REFUNDLIST = \"true\";\n this.paymentLibComponent.isFromRefundStatusPage = true;\n this.ccdCaseNumber = this.paymentLibComponent.CCD_CASE_NUMBER;\n this.errorMessage = false;\n this.changeRefundReason = refundReason;\n this.viewName = 'issuerefundpage1';\n }\n\n gotoAmountPage() {\n this.errorMessage = false;\n this.paymentLibComponent.REFUNDLIST = \"true\";\n this.isRefundBtnDisabled = false;\n this.ccdCaseNumber = this.paymentLibComponent.CCD_CASE_NUMBER;\n this.paymentLibComponent.isFromRefundStatusPage = true;\n if(this.refundlist.reason == 'Retrospective remission') {\n this.viewName = 'processretroremissonpage';\n } else {\n this.viewName = 'issuerefund';\n }\n }\n\n goToReviewAndSubmitView() {\n const remissionctrls = this.refundStatusForm.controls\n if (this.refundStatusForm.dirty) {\n if (remissionctrls['amount'].value == '') {\n this.resetRemissionForm([true, false, false, false], 'amount');\n }\n else if (remissionctrls['amount'].value != '' && remissionctrls['amount'].invalid) {\n this.resetRemissionForm([false, true, false, false], 'amount');\n }\n else if (remissionctrls['reason'].value == '') {\n this.resetRemissionForm([false, false, false, true], 'reason');\n } else {\n this.refundlist.reason = remissionctrls['reason'].value;\n this.viewName = 'reviewandsubmitview';\n }\n }\n\n }\n\n resetRemissionForm(val, field) {\n if (field === 'All') {\n this.isAmountEmpty = val[0];\n this.amountHasError = val[1];\n this.isRemissionLessThanFeeError = val[2];\n this.isReasonEmpty = val[3];\n } else if (field === 'amount' || field === 'All') {\n this.isAmountEmpty = val[0];\n this.amountHasError = val[1];\n this.isRemissionLessThanFeeError = val[2];\n } else if (field === 'reason' || field === 'All') {\n this.isReasonEmpty = val[3];\n }\n }\n\n selectRadioButton(key, value) {\n this.refundHasError = false;\n this.selectedRefundReason = key;\n if (key === 'Other') {\n this.refundHasError = false;\n this.refundReason = key;\n }\n }\n\n getRefundListReason(refundListReason: any) {\n if (this.paymentLibComponent.isFromRefundStatusPage && !this.paymentLibComponent.iscancelClicked) {\n if(refundListReason.reason != undefined && refundListReason.reason != null && refundListReason.reason != this.refundlist.reason){\n this.refundlist.reason = refundListReason.reason;\n this.refundlist.reason_code = refundListReason.code.split('-')[0].trim();\n this.refundlist.code = refundListReason.code;\n this.refundCode = refundListReason.code;\n }\n } else {\n this.isRefundBtnDisabled = true;\n }\n this.notificationPreview = false;\n this.viewName = 'reviewandsubmitview';\n this.paymentLibComponent.CCD_CASE_NUMBER = this.ccdCaseNumber;\n }\n\n getRefundAmount(amount: number) {\n if (this.paymentLibComponent.isFromRefundStatusPage && !this.paymentLibComponent.iscancelClicked) {\n if (amount > 0) {\n this.changedAmount = amount;\n // this.refundlist.amount = amount;\n }\n } else {\n this.isRefundBtnDisabled = true;\n }\n this.notificationPreview = false;\n this.viewName = 'reviewandsubmitview';\n this.paymentLibComponent.CCD_CASE_NUMBER = this.ccdCaseNumber;\n }\n\n getRefundFees(fees: IFee[])\n {\n this.fees = fees;\n this.refundFees = this.fees.map(obj => ({\n fee_id: obj.id,\n code: obj.code,\n version: obj.version,\n volume: obj.updated_volume ? obj.updated_volume : obj.volume,\n refund_amount: obj.refund_amount\n }));\n }\n\n gotoReviewRefundConfirmationPage() {\n // if (this.oldRefundReason === this.refundlist.reason) {\n // this.refundCode = '';\n // }\n if (this.refundFees === undefined) {\n this.refundFees = this.refundlist['refund_fees'];\n }\n if(this.refundlist.reason == 'Retrospective remission') {\n this.refundFees[0].refund_amount = this.changedAmount;\n }\n this.refundCode = this.refundlist.code;\n const resubmitRequest = new IResubmitRefundRequest(this.refundCode, this.changedAmount, this.refundlist.contact_details, this.refundFees);\n this.refundService.patchResubmitRefund(resubmitRequest, this.refundlist.refund_reference).subscribe(\n response => {\n if (JSON.parse(response)) {\n this.refundReference = JSON.parse(response).refund_reference;\n this.refundAmount = JSON.parse(response).refund_amount;\n this.viewName = 'reviewrefundconfirmationpage';\n }\n },\n (error: any) => {\n this.errorMessage = error.replace(/\"/g,\"\");\n }\n );\n }\n\n gotoEditAddressDetails(note: IRefundsNotifications) {\n this.notification = note;\n this.isEditDetailsClicked = true;\n this.viewName = 'refundEditView'\n }\n getContactDetails(obj:IRefundContactDetails) {\n this.addressDetails = obj;\n this.getTemplateInstructionType(this.paymentObj,this.refundlist.payment_reference);\n this.notificationPreview = false;\n this.viewName = 'revieweditdetailsconfirmationpage';\n }\n getContactDetailsForRefundList(obj:IRefundContactDetails) {\n this.refundlist.contact_details = obj;\n this.getTemplateInstructionType(this.paymentObj,this.refundlist.payment_reference);\n this.notificationPreview = false;\n this.isEditDetailsClicked = false;\n this.isRefundBtnDisabled = false;\n this.viewName = 'reviewandsubmitview';\n }\n gotoEditDetailsPage(note?: any, view?: string) {\n if(note) {\n this.notification = { contact_details: note, notification_type: note.notification_type };\n }\n this.isEditDetailsClicked = true;\n this.viewName = view;\n }\n submitEditDetail() {\n this.isResendOperationSuccess = false;\n const contactDetails = this.addressDetails.notification_type === 'EMAIL' ? this.addressDetails.email :\n {\n address_line: this.addressDetails.address_line,\n city: this.addressDetails.city,\n county: this.addressDetails.county,\n country: this.addressDetails.country,\n postal_code: this.addressDetails.postal_code,\n };\n const resendRequest = new IPutNotificationRequest(contactDetails, this.addressDetails.notification_type);\n\n this.refundService.putResendOrEdit(resendRequest, this.refundlist.refund_reference, this.addressDetails.notification_type).subscribe(\n (response) => {\n this.isResendOperationSuccess = response;\n },\n (error: any) => {\n this.isResendOperationSuccess = false;\n this.errorMessage = error.replace(/\"/g,\"\");\n }\n );\n }\n putResend(notification: IRefundsNotifications) {\n this.isResendOperationSuccess = false;\n const contactDetails = notification.notification_type === 'EMAIL' ? notification.contact_details.email :\n {\n address_line :notification.contact_details.address_line,\n city: notification.contact_details.city,\n county: notification.contact_details.county,\n country: notification.contact_details.country,\n postal_code: notification.contact_details.postal_code,\n };\n const resendRequest = new IPutNotificationRequest(contactDetails, notification.notification_type);\n\n this.refundService.putResendOrEdit(resendRequest, this.refundlist.refund_reference, notification.notification_type).subscribe(\n (response) => {\n this.isResendOperationSuccess = response;\n },\n (error: any) => {\n this.isResendOperationSuccess = false;\n this.errorMessage = error.replace(/\"/g,\"\");\n }\n );\n\n }\n\n gotoRefundViewPageCancelBtnClicked(event: Event) {\n event.preventDefault();\n this.isEditDetailsClicked = false;\n this.viewName = 'refundview';\n }\n\n gotoRefundReviewAndSubmitViewPageCancelBtnClicked(event: Event) {\n event.preventDefault();\n this.isEditDetailsClicked = false;\n this.viewName = 'reviewandsubmitview';\n }\n\n goToRefundProcessComponent(refundReference: string, refundList: IRefundList) {\n this.paymentLibComponent.refundlistsource = refundList;\n this.paymentLibComponent.refundReference = refundReference;\n this.paymentLibComponent.isFromPayBubble = true;\n this.paymentLibComponent.viewName = 'process-refund';\n }\n\n getTemplateInstructionType(payment: IPayment, paymentReference: string): void {\n\n if (payment == undefined || payment == null || payment.reference != paymentReference) {\n\n this.paymentViewService.getPaymentDetails(paymentReference).subscribe(\n payment => {\n this.paymentObj = payment;\n this.paymentObj.reference = paymentReference;\n this.templateInstructionType = this.notificationService.getNotificationInstructionType(this.paymentObj.channel, this.paymentObj.method);\n },\n (error: any) => {\n this.templateInstructionType = 'Template';\n })\n } else {\n this.templateInstructionType = this.notificationService.getNotificationInstructionType(payment.channel, payment.method);\n }\n }\n\n showNotificationPreview(): void {\n this.notificationPreview = true;\n }\n\n hideNotificationPreview(): void {\n this.notificationPreview = false;\n }\n\n showNotificationSentView(index: number): void {\n this.notificationSentViewIndex = index;\n this.notificationSentView = true;\n }\n\n hideNotificationSentView(): void {\n this.notificationSentViewIndex = -1;\n this.notificationSentView = false;\n }\n\n}\n","import { THIS_EXPR } from '@angular/compiler/src/output/output_ast';\nimport { Component, Input, OnInit, Output, EventEmitter, ChangeDetectorRef } from '@angular/core';\nimport { PaymentLibComponent } from '../../payment-lib.component';\nimport { IPayment } from '../../interfaces/IPayment';\nimport { IRemission } from '../../interfaces/IRemission';\nimport { IPaymentView } from '../../interfaces/IPaymentView';\nimport { IOrderReferenceFee } from '../../interfaces/IOrderReferenceFee';\nimport { IFee } from '../../interfaces/IFee';\nimport { IPaymentGroup } from '../../interfaces/IPaymentGroup';\nimport { Router } from '@angular/router';\nimport { PaymentViewService } from '../../services/payment-view/payment-view.service';\nimport { NotificationService } from '../../services/notification/notification.service';\nimport { OrderslistService } from '../../services/orderslist.service';\nimport { IRefundContactDetails } from '../../interfaces/IRefundContactDetails';\nimport { PostRefundRetroRemission } from '../../interfaces/PostRefundRetroRemission';\n\n@Component({\n selector: 'ccpay-service-request',\n templateUrl: './service-request.component.html',\n styleUrls: ['./service-request.component.scss']\n})\nexport class ServiceRequestComponent implements OnInit {\n @Input('LOGGEDINUSERROLES') LOGGEDINUSERROLES: string[];\n @Input('viewStatus') viewStatus: string;\n @Input('orderDetail') orderDetail: any[];\n @Input('orderRef') orderRef: string;\n @Input('orderStatus') orderStatus: string;\n @Input('orderParty') orderParty: string;\n @Input('orderCreated') orderCreated: Date;\n @Input('orderCCDEvent') orderCCDEvent: string;\n @Input('orderFeesTotal') orderFeesTotal: number;\n @Input('orderTotalPayments') orderTotalPayments: number;\n @Input('orderRemissionTotal') orderRemissionTotal: number;\n @Input('paymentGroupList') paymentGroupList: IPaymentGroup;\n @Input('takePayment') takePayment: boolean;\n @Input('ccdCaseNumber') ccdCaseNumber: boolean;\n @Input(\"isServiceRequest\") isServiceRequest: string;\n @Output() goToServiceRquestComponent: EventEmitter<any> = new EventEmitter();\n\n viewCompStatus;\n servicerequest: string;\n paymentType: string;\n excReference: string;\n paymentGroups: any[] = [];\n payments: IPayment[] = [];\n nonPayments: IPayment[] = [];\n allPayments: IPayment[] = [];\n remissions: IRemission[] = [];\n paymentFees: IFee[];\n fees: any;\n errorMessage: string;\n totalFees: number;\n totalPayments: number;\n totalNonOffPayments: number;\n totalRemissions: number;\n selectedOption: string;\n dcnNumber: string;\n paymentRef: string;\n isTurnOff: boolean;\n isRefundRemission: boolean = true;\n isStrategicFixEnable: boolean;\n isAddFeeBtnEnabled: boolean = true;\n isExceptionRecord: boolean = false;\n isUnprocessedRecordSelected: boolean = false;\n exceptionRecordReference: string;\n isAnyFeeGroupAvilable: boolean = true;\n isHistoricGroupAvailable: boolean = false;\n isBulkScanEnable;\n isRemissionsMatch: boolean;\n isRemoveBtnDisabled: boolean = false;\n feeId: IFee;\n clAmountDue: number = 0;\n unprocessedRecordCount: number;\n isFeeRecordsExist: boolean = false;\n isGrpOutstandingAmtPositive: boolean = false;\n totalRefundAmount: Number;\n caseType: String;\n isConfirmationBtnDisabled: boolean;\n refundReference: string;\n refundAmount: string;\n payment: IPayment;\n paymentGroup: IPaymentGroup;\n paymentView: IPaymentView;\n\n isAddRemissionEnable: boolean = false;\n orderRemissionDetails: any[] = [];\n orderLevelFees: IOrderReferenceFee[] = [];\n cpoDetails: any = null;\n serviceRequestValue: string;\n orderAddBtnEnable: boolean;\n isFromPaymentDetailPage: boolean;\n contactDetailsObj: IRefundContactDetails\n notification: any;\n isCPODown: boolean;\n test: boolean;\n isPBA: boolean = false;\n isIssueRefunfBtnEnable: boolean = false;\n isAddRemissionBtnEnabled: boolean = false;\n isRefundRemissionBtnEnable: boolean = false;\n allowedRolesToAccessRefund = ['payments-refund-approver', 'payments-refund'];\n isFromServiceRequestPage: boolean;\n navigationpage: string;\n remissionFeeAmt: number;\n isContinueBtnDisabled: boolean = true;\n isFullyRefund: boolean;\n templateInstructionType: string;\n notificationPreview: boolean;\n\n constructor(\n private paymentLibComponent: PaymentLibComponent,\n private paymentViewService: PaymentViewService,\n private OrderslistService: OrderslistService,\n private notificationService: NotificationService,\n private cd: ChangeDetectorRef,\n private router: Router) { }\n\n ngOnInit() {\n this.isTurnOff = this.paymentLibComponent.ISTURNOFF;\n this.isServiceRequest = 'false';\n if (this.viewStatus === undefined) {\n this.viewStatus = this.paymentLibComponent.viewName;\n }\n if(this.paymentLibComponent.isFromServiceRequestPage && this.paymentLibComponent.isFromPaymentDetailPage) {\n if(this.paymentLibComponent.isFromPaymentDetailPage && this.paymentLibComponent.isFromServiceRequestPage) {\n this.OrderslistService.getorderRefs().subscribe((data) => this.orderRef = data);\n this.OrderslistService.getorderCCDEvents().subscribe((data) => this.orderCCDEvent = data);\n this.OrderslistService.getorderCreateds().subscribe((data) => this.orderCreated = data);\n this.OrderslistService.getorderDetail().subscribe((data) => this.orderDetail = data);\n this.OrderslistService.getorderPartys().subscribe((data) => this.orderParty = data);\n this.OrderslistService.getorderRemissionTotals().subscribe((data) => this.orderRemissionTotal = data);\n this.OrderslistService.getorderFeesTotals().subscribe((data) => this.orderFeesTotal = data);\n this.OrderslistService.getoorderTotalPaymentss().subscribe((data) => this.orderTotalPayments = data);\n }\n \n \n }\n if(this.paymentLibComponent.isFromServiceRequestPage && this.paymentLibComponent.TAKEPAYMENT) {\n this.isServiceRequest = 'false';\n }\n\n\n }\n goToServiceRequestPage() {\n this.goToServiceRquestComponent.emit();\n }\n\n goToCaseTransationPage(event: any) {\n event.preventDefault();\n this.OrderslistService.setnavigationPage('servicerequestpage');\n this.OrderslistService.setisFromServiceRequestPage(false);\n this.paymentLibComponent.viewName = 'case-transactions';\n this.paymentLibComponent.ISBSENABLE = true;\n this.paymentLibComponent.isTakePayment = this.paymentLibComponent.TAKEPAYMENT;\n if (this.takePayment) {\n this.paymentLibComponent.isTakePayment = this.takePayment;\n }\n //this.paymentLibComponent.SERVICEREQUEST = \"true\";\n this.paymentLibComponent.isFromServiceRequestPage = false;\n if(this.isServiceRequest !== 'false') {\n this.paymentLibComponent.isFromServiceRequestPage = true;\n }\n this.paymentLibComponent.isFromRefundStatusPage = false;\n this.paymentLibComponent.viewName = 'case-transactions';\n this.resetOrderData();\n let partUrl = this.paymentLibComponent.ISBSENABLE ? '&isBulkScanning=Enable' : '&isBulkScanning=Disable';\n partUrl += this.paymentLibComponent.ISTURNOFF ? '&isTurnOff=Enable' : '&isTurnOff=Disable';\n if(this.isServiceRequest === 'false') {\n partUrl += this.paymentLibComponent.TAKEPAYMENT ? '&takePayment=true' : '&takePayment=false';\n }\n partUrl += this.isStrategicFixEnable ? '&isStFixEnable=Enable' : '&isStFixEnable=Disable';\n partUrl += this.isServiceRequest !== 'false' ? '&servicerequest=true' : '&servicerequest=false';\n partUrl += `&caseType=${this.paymentLibComponent.CASETYPE}`;\n const url = `/payment-history/${this.paymentLibComponent.CCD_CASE_NUMBER}?view=case-transactions&selectedOption=${this.paymentLibComponent.SELECTED_OPTION}${partUrl}`;\n this.router.routeReuseStrategy.shouldReuseRoute = () => false;\n this.router.onSameUrlNavigation = 'reload';\n this.router.navigateByUrl(url);\n }\n\n addRemission(fee: IFee) {\n if(this.chkIsAddRemissionBtnEnable(fee)) {\n this.feeId = fee;\n this.viewStatus = 'addremission';\n this.payment = this.orderDetail[0].payments[0];\n this.paymentViewService.getApportionPaymentDetails(this.orderDetail[0].payments[0].reference).subscribe(\n paymentGroup => {\n this.paymentGroup = paymentGroup;\n\n this.paymentGroup.payments = this.paymentGroup.payments.filter\n (paymentGroupObj => paymentGroupObj['reference'].includes(this.paymentLibComponent.paymentReference));\n this.payment = this.paymentGroup.payments[0];\n \n // const paymentAllocation = this.paymentGroup.payments[0].payment_allocation;\n // this.isStatusAllocated = paymentAllocation.length > 0 && paymentAllocation[0].allocation_status === 'Allocated' || paymentAllocation.length === 0;\n \n },\n (error: any) => this.errorMessage = error.replace(/\"/g,\"\")\n );\n }\n }\n\n addRefundForRemission(payment: IPayment, remission: IRemission[],fees:any) {\n this.paymentLibComponent.isFromServiceRequestPage = true;\n this.paymentViewService.getApportionPaymentDetails(payment.reference).subscribe(\n paymentGroup => {\n this.paymentGroup = paymentGroup;\n this.paymentGroup.payments = this.paymentGroup.payments.filter\n (paymentGroupObj => paymentGroupObj.reference === payment.reference);\n this.payment = this.paymentGroup.payments[0];\n this.remissions = remission;\n this.remissionFeeAmt = fees.filter(data=>data.code === this.remissions['fee_code'])[0].net_amount;\n this.viewStatus = 'addrefundforremission';\n // const paymentAllocation = this.paymentGroup.payments[0].payment_allocation;\n // this.isStatusAllocated = paymentAllocation.length > 0 && paymentAllocation[0].allocation_status === 'Allocated' || paymentAllocation.length === 0;\n },\n (error: any) => this.errorMessage = error\n );\n }\n cancelRemoval() {\n this.viewStatus = 'main';\n }\n\n removeFee(fee: any) {\n this.isRemoveBtnDisabled = true;\n this.paymentViewService.deleteFeeFromPaymentGroup(fee).subscribe(\n (success: any) => {\n window.location.reload();\n },\n (error: any) => {\n this.errorMessage = error;\n this.isRemoveBtnDisabled = false;\n }\n );\n }\n\n issueRefund(payment: IPayment) {\n if (payment !== null && payment !== undefined) {\n if( this.chkIsIssueRefundBtnEnable(payment)) {\n this.paymentViewService.getApportionPaymentDetails(payment.reference).subscribe(\n paymentGroup => {\n paymentGroup.payments = paymentGroup.payments.filter\n (paymentGroupObj => paymentGroupObj['reference'].includes(payment.reference));\n if(payment.over_payment > 0) {\n this.viewStatus = '';\n this.payment = payment;\n this.paymentGroupList = paymentGroup;\n this.viewCompStatus = 'overpayment';\n } else {\n this.viewStatus = 'issuerefund';\n this.viewCompStatus = '';\n this.paymentFees = paymentGroup.fees;\n this.payment = payment;\n this.paymentLibComponent.isFromServiceRequestPage = true;\n this.isRefundRemission = true;\n }\n },\n (error: any) => this.errorMessage = error\n );\n }\n }\n }\n\n goToPayementView(paymentGroupReference: string, paymentReference: string, paymentMethod: string) {\n this.goToPaymentViewComponent({ paymentGroupReference, paymentReference, paymentMethod });\n }\n\n goToPaymentViewComponent(paymentGroup: any) {\n this.paymentLibComponent.paymentMethod = paymentGroup.paymentMethod;\n this.paymentLibComponent.isFromServiceRequestPage = true;\n this.paymentLibComponent.paymentGroupReference = paymentGroup.paymentGroupReference;\n this.paymentLibComponent.paymentReference = paymentGroup.paymentReference;\n this.OrderslistService.setOrderRef(this.orderRef);\n this.OrderslistService.setorderCCDEvent(this.orderCCDEvent);\n this.OrderslistService.setorderCreated(this.orderCreated);\n this.OrderslistService.setorderDetail(this.orderDetail);\n this.OrderslistService.setorderParty(this.orderParty);\n this.OrderslistService.setorderTotalPayments(this.orderTotalPayments);\n this.OrderslistService.setorderRemissionTotal(this.orderRemissionTotal);\n this.OrderslistService.setorderFeesTotal(this.orderFeesTotal);\n this.viewStatus = 'payment-view';\n }\n\n chkIsIssueRefundBtnEnable(payment: IPayment): boolean {\n if (payment !== null && payment !== undefined) {\n return payment.issue_refund && payment.refund_enable\n } else {\n return false;\n }\n }\n\n chkIsAddRefundBtnEnable(remission: IRemission): boolean {\n if (remission !== null && remission !== undefined) {\n return remission.add_refund;\n } else {\n return false;\n }\n }\n\n chkIsAddRemissionBtnEnable(fee: IFee): boolean {\n if (fee !== null && fee !== undefined) {\n return fee.add_remission && fee.remission_enable;\n } else {\n return false\n }\n }\n resetOrderData() {\n this.OrderslistService.setOrderRef(null);\n this.OrderslistService.setorderCCDEvent(null);\n this.OrderslistService.setorderCreated(null);\n this.OrderslistService.setorderDetail(null);\n this.OrderslistService.setorderParty(null);\n this.OrderslistService.setorderTotalPayments(null);\n this.OrderslistService.setorderRemissionTotal(null);\n this.OrderslistService.setorderFeesTotal(null);\n }\n\n selectPymentOption(paymentType: string) {\n this.paymentType = paymentType;\n this.isContinueBtnDisabled = false;\n }\n goToPaymentViewComp() {\n this.viewCompStatus = '';\n this.viewStatus = 'paymentview';\n }\n continuePayment(paymentgrp: IPaymentGroup) {\n \n if (this.paymentType === 'op') {\n this.isFullyRefund = false\n this.viewStatus = '';\n this.viewCompStatus = 'overPaymentAddressCapture';\n } else if(this.paymentType === 'fp') {\n this.isFullyRefund = true\n this.paymentGroupList = paymentgrp;\n this.viewStatus = 'issuerefund';\n this.viewCompStatus = \"\";\n this.isRefundRemission = true;\n this.paymentLibComponent.isFromPaymentDetailPage = true;\n this.isFromPaymentDetailPage = true;\n this.isFromServiceRequestPage = this.paymentLibComponent.isFromServiceRequestPage;\n }\n }\n getContactDetails(obj:IRefundContactDetails) {\n this.contactDetailsObj = obj;\n this.viewStatus = '';\n this.viewCompStatus = 'overpaymentcheckandanswer';\n this.getTemplateInstructionType(this.paymentGroupList.payments[0]);\n this.notificationPreview = false;\n }\n gotoPaymentSelectPage(event: Event) {\n event.preventDefault();\n this.viewStatus = '';\n this.viewCompStatus = 'overpayment';\n }\n gotoAddressPage(note?: IRefundContactDetails) {\n if (note) {\n this.notification = { contact_details: note, notification_type: note.notification_type };\n }\n this.errorMessage = '';\n this.viewStatus = '';\n this.viewCompStatus = 'overPaymentAddressCapture';\n }\n processRefund() {\n this.isConfirmationBtnDisabled = true;\n this.errorMessage = '';\n const obj = this.paymentGroupList.fees[0];\n this.fees = [{ id: obj.id, \n code: obj.code,\n version:obj.version, \n apportion_amount: obj.apportion_amount,\n calculated_amount: obj.calculated_amount,\n updated_volume: obj.updated_volume ? obj.updated_volume : obj.volume,\n volume: obj.volume,\n refund_amount: this.getOverPaymentValue() }];\n const requestBody = new PostRefundRetroRemission(this.contactDetailsObj,this.fees, this.paymentGroupList.payments[0].reference, 'RR037', \n this.getOverPaymentValue(), 'op');\n this.paymentViewService.postRefundsReason(requestBody).subscribe(\n response => {\n if (JSON.parse(response)) {\n this.viewCompStatus = '';\n this.viewStatus = 'refundconfirmationpage';\n this.refundReference = JSON.parse(response).refund_reference;\n this.refundAmount = JSON.parse(response).refund_amount;\n }\n },\n (error: any) => {\n this.errorMessage = error;\n this.isConfirmationBtnDisabled = false;\n this.cd.detectChanges();\n })\n }\n\n getOverPaymentValue() {\n let feesOverPayment = 0;\n this.paymentGroupList.fees.forEach(fee => {\n feesOverPayment += fee.over_payment;\n });\n return feesOverPayment > 0 ? feesOverPayment : this.paymentGroupList.payments[0].over_payment;\n\n }\n\n getTemplateInstructionType(payment: IPayment): void {\n\n if (payment == undefined || payment == null) {\n this.templateInstructionType = 'Template';\n } else {\n this.templateInstructionType = this.notificationService.getNotificationInstructionType(payment.channel, payment.method);\n }\n \n }\n\n showNotificationPreview(): void {\n this.notificationPreview = true;\n }\n\n hideNotificationPreview(): void {\n this.notificationPreview = false;\n }\n}","export class IserviceRequestCardPayment {\n amount: string\n currency: string\n language: string\n \n constructor(amount : string) {\n this.amount = amount;\n this.currency = 'GBP';\n this.language = 'string';\n } \n}\n ","export class IserviceRequestPbaPayment {\n account_number: string;\n amount: string\n currency: string\n customer_reference: string\n organisation_name: string\n \n constructor(account_number : string, amount : string, customer_reference: string, orgName: string) {\n this.account_number = account_number;\n this.amount = amount;\n this.currency = 'GBP';\n this.customer_reference = customer_reference;\n this.organisation_name = orgName;\n } \n}\n ","import { Component, OnInit, Input} from '@angular/core';\nimport { PaymentViewService } from '../../services/payment-view/payment-view.service';\nimport { PaymentLibComponent } from '../../payment-lib.component';\nimport { IserviceRequestCardPayment } from '../../interfaces/IserviceRequestCardPayment';\nimport { IserviceRequestPbaPayment } from '../../interfaces/IserviceRequestPbaPayment';\n\nconst BS_ENABLE_FLAG = 'bulk-scan-enabling-fe';\n\n@Component({\n selector: 'ccpay-pba-payment',\n templateUrl: './pba-payment.component.html',\n styleUrls: ['./pba-payment.component.scss']\n})\nexport class PbaPaymentComponent implements OnInit {\n @Input() pbaPayOrderRef: any;\n viewStatus: string;\n pbaAccountList: string[];\n isPBAAccountHold: boolean = false;\n errorMsg: any;\n isCardPaymentSuccess: boolean = true;\n isInSufficiantFund: boolean = false;\n isPBAAccountNotExist: boolean = false;\n isPBAServerError: boolean = false;\n isGetPBAAccountSucceed: boolean = false;\n selectedPbaAccount: string = '';\n pbaAccountRef: string = '';\n isPbaAccountSelected: boolean = false;\n isCardPaymentSelected: boolean = false;\n isPBADropdownSelected: boolean = false;\n isContinueButtondisabled: boolean = true;\n isPBAAccountPaymentSuccess: boolean = false;\n pbaAccountrPaymentResult: any;\n orgName: string = '';\n\n constructor(private paymentLibComponent: PaymentLibComponent,\n private paymentViewService: PaymentViewService) {}\n\n ngOnInit() {\n this.pbaPayOrderRef = this.paymentLibComponent.pbaPayOrderRef;\n this.viewStatus = 'pba-payment';\n this.errorMsg = null;\n this.paymentViewService.getPBAaccountDetails()\n .subscribe(\n result => {\n this.isGetPBAAccountSucceed = true;\n this.orgName = result.organisationEntityResponse.name;\n this.pbaAccountList = result.organisationEntityResponse.paymentAccount;\n },\n error => {\n this.errorMsg = error;\n }\n );\n\n }\n selectpbaaccount(args) {\n if(args.currentTarget.id === 'pbaAccountNumber') {\n this.isPBADropdownSelected = true;\n this.selectedPbaAccount = args.target.value; \n }\n if(args.currentTarget.id === 'pbaAccountRef') {\n this.pbaAccountRef = args.target.value; \n }\n if(this.selectedPbaAccount !== '' && this.pbaAccountRef !== \"\") {\n this.isContinueButtondisabled = false;\n } else {\n this.isContinueButtondisabled = true;\n }\n }\n\n saveAndContinue() {\n\n if(this.isPbaAccountSelected) {\n this.isInSufficiantFund = false;\n this.isPBAAccountNotExist = false;\n this.isPBAServerError = false;\n this.isPBAAccountPaymentSuccess = false;\n this.isContinueButtondisabled = true;\n if ( this.pbaAccountList.indexOf(this.selectedPbaAccount) !== -1 ) {\n const requestBody = new IserviceRequestPbaPayment(\n this.selectedPbaAccount, this.pbaPayOrderRef.orderTotalFees, this.pbaAccountRef, this.orgName);\n this.paymentViewService.postPBAaccountPayment(this.pbaPayOrderRef.orderRefId, requestBody)\n .subscribe(\n r => {\n try {\n this.pbaAccountrPaymentResult = JSON.parse(r);\n } catch(e) {\n this.pbaAccountrPaymentResult = r;\n }\n this.isPBAAccountPaymentSuccess = true;\n },\n e => {\n if(e.status == '402') {\n this.isInSufficiantFund = true; \n } else if(e.status == '410') {\n this.isPBAAccountNotExist = true;\n } else if(e.status == '412') {\n this.isPBAAccountHold = true;\n } else {\n this.isPBAServerError = true;\n }\n }\n );\n } else {\n this.isPBAServerError = true;\n }\n } else if (this.isCardPaymentSelected) {\n this.cardPayment();\n }\n\n }\n cardPayment() {\n this.isCardPaymentSuccess = true;\n const requestBody = new IserviceRequestCardPayment (\n this.pbaPayOrderRef.orderTotalFees);\n this.paymentViewService.postWays2PayCardPayment(this.pbaPayOrderRef.orderRefId, requestBody)\n .subscribe(\n result => {\n const paymentUrl = JSON.parse(result).next_url;\n window.location.href = paymentUrl;\n },\n error => {\n this.isCardPaymentSuccess = false;\n }\n );\n\n }\n selectPaymentMethod(type: string) {\n if(type === 'PBA') {\n this.isPbaAccountSelected = true;\n this.isCardPaymentSelected = false;\n this.isPBADropdownSelected = false\n this.isContinueButtondisabled = true;\n this.selectedPbaAccount = null;\n } else if (type === 'CARD') {\n this.isPbaAccountSelected = false;\n this.isCardPaymentSelected = true;\n this.isPBADropdownSelected = false\n this.isContinueButtondisabled = false;\n }\n }\n gotoCasetransationPage() {\n this.paymentLibComponent.viewName = 'case-transactions';\n this.paymentLibComponent.TAKEPAYMENT = false;\n this.paymentLibComponent.ISBSENABLE = true;\n this.paymentLibComponent.isFromServiceRequestPage = true;\n }\n}\n","import { IPayment } from './IPayment';\nimport { IRefundContactDetails } from './IRefundContactDetails';\n\nexport class NotificationPreviewRequest {\n notification_type?: string;\n payment_channel?: string;\n payment_method?: string;\n payment_reference?: string;\n personalisation?: {\n ccd_case_number?: string;\n refund_amount?: number;\n refund_reason?: string;\n refund_reference?: string;\n }\n recipient_email_address?: string;\n recipient_postal_address?: {\n address_line?: string;\n city?: string;\n county?: string;\n country?: string;\n postal_code?: string;\n }\n service_name?: string;\n\n constructor(payment: IPayment, contactDetails: IRefundContactDetails, refund_reason: string, refund_amount: number, refund_reference: string, payment_reference: string) {\n \n if (contactDetails !== undefined && contactDetails !== null) {\n this.notification_type = contactDetails.notification_type.toUpperCase();\n }\n\n if (payment !== undefined && payment !== null) {\n this.payment_reference = payment.reference;\n this.payment_method = payment.method;\n this.payment_channel = payment.channel;\n this.service_name = payment.service_name;\n } else {\n this.payment_reference = payment_reference;\n }\n\n this.personalisation = {\n ccd_case_number: (payment !== undefined && payment !== null) ? payment.ccd_case_number : '',\n refund_reason: refund_reason,\n refund_amount: refund_amount,\n refund_reference: refund_reference\n };\n\n if (this.notification_type === \"EMAIL\") {\n this.recipient_email_address = contactDetails.email;\n this.recipient_postal_address = null;\n } else if (this.notification_type === \"LETTER\") {\n this.recipient_postal_address = {\n address_line: contactDetails.address_line,\n city: contactDetails.city,\n county: contactDetails.county,\n country: contactDetails.country,\n postal_code: contactDetails.postal_code\n };\n this.recipient_email_address = null;\n }\n\n }\n}","import { Component, Input, OnInit } from '@angular/core';\nimport { IPayment } from '../../interfaces/IPayment';\nimport { INotificationPreview } from '../../interfaces/INotificationPreview';\nimport { IRefundContactDetails } from '../../interfaces/IRefundContactDetails';\nimport { NotificationPreviewRequest } from '../../interfaces/NotificationPreviewRequest';\nimport { NotificationService } from '../../services/notification/notification.service';\nimport { ErrorHandlerService } from '../../services/shared/error-handler.service';\nimport { Output, EventEmitter } from '@angular/core';\n\n@Component({\n selector: 'app-notification-preview',\n templateUrl: './notification-preview.component.html',\n styleUrls: ['./notification-preview.component.scss']\n})\nexport class NotificationPreviewComponent implements OnInit {\n @Input() payment: IPayment;\n @Input() contactDetails: IRefundContactDetails;\n @Input() refundReason: string;\n @Input() refundAmount: number;\n @Input() paymentReference: string;\n @Input() refundReference: string;\n @Input() previewJourney: string;\n @Input() notificationSent: INotificationPreview;\n\n @Output() notificationPreviewEvent = new EventEmitter<INotificationPreview>();\n\n notification: INotificationPreview;\n notificationPreviewRequest: NotificationPreviewRequest;\n today: number = Date.now();\n errorMessage = this.errorHandlerService.getServerErrorMessage(false, false, '');\n\n constructor(private errorHandlerService: ErrorHandlerService,\n private notificationService: NotificationService) { }\n\n ngOnInit() {\n\n if (this.previewJourney != undefined && this.previewJourney != null && this.previewJourney === 'Notifications sent') {\n\n this.notification = this.notificationSent;\n\n if (this.notification != undefined && this.notification != null && this.notification.template_type === 'letter') {\n this.notification.body = this.notification.body.replace(/\\r\\n/g, '<br/>');\n }\n } else {\n\n const notficationPreviewRequestBody = new NotificationPreviewRequest(this.payment, this.contactDetails,\n this.refundReason, this.refundAmount, this.refundReference, this.paymentReference);\n\n this.notificationService.getNotificationPreview(notficationPreviewRequestBody).subscribe(\n res => {\n this.errorMessage = this.errorHandlerService.getServerErrorMessage(false, false, '');\n this.notification = JSON.parse(res);\n\n if (this.notification != undefined && this.notification != null && this.notification.template_type === 'letter') {\n this.notification.body = this.notification.body.replace(/\\r\\n/g, '<br/>');\n }\n },\n (error: any) => {\n this.errorMessage = this.errorHandlerService.getServerErrorMessage(true, false, '');\n console.log(this.errorMessage);\n }\n );\n\n this.notificationPreviewEvent.emit(this.notification);\n\n }\n }\n\n}\n","import { NgModule } from '@angular/core';\nimport { HttpClientModule } from '@angular/common/http';\nimport { CommonModule } from '@angular/common';\n\nimport { PaymentListComponent } from './components/payment-list/payment-list.component';\nimport { PaymentViewComponent } from './components/payment-view/payment-view.component';\nimport { ProcessRefundComponent } from './components/process-refund/process-refund.component';\nimport { RefundListComponent } from './components/refund-list/refund-list.component';\n\nimport { CardDetailsComponent } from './components/card-details/card-details.component';\nimport { PageNotFoundComponent } from './components/page-not-found.component';\nimport { PaymentLibComponent } from './payment-lib.component';\nimport { StatusHistoryComponent } from './components/status-history/status-history.component';\nimport { ContactDetailsComponent } from './components/contact-details/contact-details.component';\nimport { PbaDetailsComponent } from './components/pba-details/pba-details.component';\nimport { LoggerService } from './services/shared/logger/logger.service';\nimport { ConsoleLoggerService } from './services/shared/logger/console-logger.service';\nimport { WebComponentHttpClient } from './services/shared/httpclient/webcomponent.http.client';\nimport { CaseTransactionsComponent } from './components/case-transactions/case-transactions.component';\nimport { FeeSummaryComponent } from './components/fee-summary/fee-summary.component';\nimport { ErrorBannerComponent } from './components/error-banner/error-banner.component';\nimport { MarkUnidentifiedPaymentComponent } from './components/mark-unidentified-payment/mark-unidentified-payment.component';\nimport { MarkUnsolicitedPaymentComponent } from './components/mark-unsolicited-payment/mark-unsolicited-payment.component';\nimport { UnprocessedPaymentsComponent } from './components/unprocessed-payments/unprocessed-payments.component';\nimport { ProcessedPaymentsComponent } from './components/processed-payments/processed-payments.component';\nimport { AllocatePaymentsComponent } from './components/allocate-payments/allocate-payments.component';\nimport { AddRemissionComponent } from './components/add-remission/add-remission.component';\nimport { FormsModule, ReactiveFormsModule } from '@angular/forms';\nimport { CcdHyphensPipe } from './pipes/ccd-hyphens.pipe';\nimport { CapitalizePipe } from './pipes/capitalize.pipe';\nimport { keyValuePipe } from './pipes/key-value.pipe';\nimport { SanitizeHtmlPipe } from './pipes/sanitize-html.pipe';\nimport { ReportsComponent } from './components/reports/reports.component';\nimport { XlFileService } from './services/xl-file/xl-file.service';\nimport { TableComponent } from './components/table/table.component';\nimport { MatTableModule } from '@angular/material/table';\nimport { MatPaginatorModule } from '@angular/material/paginator';\nimport { MatSortModule } from '@angular/material/sort';\nimport { MatFormFieldModule } from '@angular/material/form-field';\nimport { MatInputModule } from '@angular/material/input';\n// import { BrowserAnimationsModule } from '@angular/platform-browser/animations';\n// import { NoopAnimationsModule } from '@angular/platform-browser/animations';\nimport { RefundStatusComponent } from './components/refund-status/refund-status.component';\nimport { ServiceRequestComponent } from './components/service-request/service-request.component';\nimport { PbaPaymentComponent } from './components/pba-payment/pba-payment.component';\nimport { NotificationPreviewComponent } from './components/notification-preview/notification-preview.component';\n\n@NgModule({\n imports: [\n CommonModule,\n HttpClientModule,\n FormsModule,\n ReactiveFormsModule,\n MatTableModule,\n MatPaginatorModule,\n MatSortModule,\n MatFormFieldModule,\n MatInputModule,\n // BrowserAnimationsModule,\n // NoopAnimationsModule\n ],\n declarations: [\n PaymentLibComponent,\n PaymentListComponent,\n PaymentViewComponent,\n PbaPaymentComponent,\n ContactDetailsComponent,\n ProcessRefundComponent,\n RefundListComponent,\n CardDetailsComponent,\n PageNotFoundComponent,\n StatusHistoryComponent,\n MarkUnidentifiedPaymentComponent,\n MarkUnsolicitedPaymentComponent,\n UnprocessedPaymentsComponent,\n ProcessedPaymentsComponent,\n AllocatePaymentsComponent,\n PbaDetailsComponent,\n CaseTransactionsComponent,\n FeeSummaryComponent,\n AddRemissionComponent,\n CcdHyphensPipe,\n CapitalizePipe,\n keyValuePipe,\n SanitizeHtmlPipe,\n ReportsComponent,\n ErrorBannerComponent,\n TableComponent,\n RefundStatusComponent,\n ServiceRequestComponent,\n NotificationPreviewComponent\n ],\n exports: [PaymentLibComponent],\n providers: [\n { provide: LoggerService, useClass: ConsoleLoggerService },\n XlFileService,\n WebComponentHttpClient\n ]\n})\n\nexport class PaymentLibModule { }\n"],"mappings":"umDAMAA,EAAA,WAOE,SAAAA,I,QAEAA,EAAaC,UAAAC,cAAb,SAAcC,GACZC,KAAKC,SAAWF,C,EAGlBH,EAAAC,UAAAK,cAAA,WACE,OAAOF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