@hmcts/ccpay-web-component 5.2.9-beta04 → 5.2.9-beta08

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.
@@ -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","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","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","console","log","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","isRequestNotPaid","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","FEE_RECORDS_EXISTS","recordId","isRecordExist","isAllocateToExistingFeebtnEnabled","isMarkAsUnidentifiedbtnEnabled","isAllocatedToNewFeebtnEnabled","isExceptionCase","serviceId","unassignedRecordListLength","isStFixEnable","setValuesForUnassignedRecord","unassignedRecordList","unprocessedPaymentSelectEvent","formatUnassignedRecordId","ID","loadUnsolicitedPage","selectedRecordReference","validateButtons","resetButtons","PAYMENTREF","IS_REQUEST_NOT_PAID","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 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 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 isRequestNotPaid: 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 this.isRequestNotPaid = 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 = false;\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 @Input('IS_REQUEST_NOT_PAID') IS_REQUEST_NOT_PAID: boolean;\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.dcnNumber = this.paymentLibComponent.DCN_NUMBER;\n this.ccdCaseNumber = this.paymentLibComponent.CCD_CASE_NUMBER;\n this.selectedOption = this.paymentLibComponent.SELECTED_OPTION.toLocaleLowerCase();\n this.isBulkScanEnable = this.paymentLibComponent.ISBSENABLE;\n this.isTurnOff = this.paymentLibComponent.ISTURNOFF;\n this.isStFixEnable = this.paymentLibComponent.ISSFENABLE;\n this.OrderslistService.getFeeExists().subscribe((data) => {\n if (data === null) {\n this.FEE_RECORDS_EXISTS = false\n }\n else {\n this.FEE_RECORDS_EXISTS = data\n }\n });\n\n this.getUnassignedPaymentlist();\n }\n\n getUnassignedPaymentlist() {\n if (this.selectedOption === 'dcn') {\n this.bulkScaningPaymentService.getBSPaymentsByDCN(this.dcnNumber).subscribe(\n unassignedPayments => {\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 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.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.IS_REQUEST_NOT_PAID) {\n this.isAllocateToExistingFeebtnEnabled = false;\n this.isAllocatedToNewFeebtnEnabled = true;\n } else if( this.isUnprocessedRecordSelected && !this.isExceptionCase && this.IS_REQUEST_NOT_PAID ) {\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\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,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C,KAAA8wC,WAAS5wC,KAAA,EACR6wC,QAAS,CACPC,eACAC,mBACAC,cACAC,sBACAC,iBACAC,qBACAC,gBACAC,qBACAC,kBAIFC,aAAc,CACZzsC,EACA2E,EACAmG,EACA++B,GACAhwB,EACA9G,EACAqF,EACAe,EACAI,EACAG,EACAiQ,GACAoC,GACA2B,GACA6B,GACAO,GACApS,EACA2B,EACAoH,EACA0N,GACA8H,GACAI,GACAE,GACAE,GACAmD,GACAvX,GACA6b,GACA+B,GACAiD,GACAqC,IAEFmB,QAAS,CAAC1sC,GACV2sC,UAAW,CACT,CAAEC,QAAS/oC,EAAegpC,SAAUjvB,GACpCif,GACA92B,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","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","console","log","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","setTimeout","ORDER_REF_FEES","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","requestBody_1","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 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 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 @Input('ORDER_LEVEL_FEES') ORDER_REF_FEES: any[];\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 setTimeout(() => {\n if ( this.isUnprocessedRecordSelected && this.isExceptionCase) {\n this.isMarkAsUnidentifiedbtnEnabled = true;\n } else if ( this.isUnprocessedRecordSelected && !this.isExceptionCase && this.ORDER_REF_FEES.length === 0) {\n this.isAllocateToExistingFeebtnEnabled = false;\n this.isAllocatedToNewFeebtnEnabled = true;\n } else if( this.isUnprocessedRecordSelected && !this.isExceptionCase && this.ORDER_REF_FEES.length > 0) {\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 },400);\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 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 if(this.paymentLibComponent.isFromServiceRequestPage && this.paymentLibComponent.TAKEPAYMENT) {\n this.isServiceRequest = 'false';\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\n // Check we on XUI\n if(this.router.url.startsWith('/cases/case-details/')) {\n // Use ccpay-case-transactions component\n this.viewStatus = 'case-transactions';\n } else {\n // Reload Paybubble case-transactions page.\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\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}\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\n setTimeout(() => {\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\n }, 5000);\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,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,sBAAwBD,C,EAG/BhB,EAAAC,UAAAiB,wBAAA,WACE,OAAOd,KAAKa,qB,EAEdjB,EAAuBC,UAAAkB,wBAAvB,SAAwBC,GACtBhB,KAAKiB,qBAAuBD,C,EAE9BpB,EAAAC,UAAAqB,wBAAA,WACE,OAAOlB,KAAKiB,oB,IA3ChB,G,yGAJC,CAAAE,KAAAC,aAAWC,KAAA,EACVC,WAAY,W,sCCMd,IAAAC,EAAA,WAoCE,SAAAA,IAnCQvB,KAAAwB,WAAoD,IAAIC,kBAAsC,MAC9FzB,KAAA0B,WAA2C,IAAID,kBAA6B,MAC5EzB,KAAA2B,SAAW,IAAIF,kBAAgB,IACvCzB,KAAA4B,YAAc5B,KAAK2B,SAASE,eACpB7B,KAAA8B,UAAY,I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