@hmcts/ccpay-web-component 5.0.10-beta010 → 5.0.10-beta011

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","PostRefundRetroRemission","contact_details","fees","payment_reference","refund_reason","total_refund_amount","is_over_payment","PaymentViewComponent","paymentViewService","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","reference","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","goToPaymentFailuePage","selectedPaymentsStatus","goBackToPaymentView","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","checkRefundActions","processRefundSubmit","processRefundRequest","resetForm","controls","processFormError","errors","dirty","valid","reason","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","NotificationService","getRefundNotification","getAddressByPostcode","postcode","ContactDetailsComponent","notificationService","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","county","mpostcode","country","addressObj","setEditDetails","isEditOperationInRefundList","setValue","patchValue","address_line","city","postal_code","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","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","totalPayments","totalRemissions","totalNonOffPayments","totalFees","getAllocationStatus","recordData","exception_record_reference","ccd_reference","case_reference","resetOrderVariables","isFeeOverPaymentExist_1","service_request_status","orderStatus","orderAddBtnEnable","orderRefId","orderTotalFees","orderReferenceObj","x","redirectToOrderFeeSearchPage","orderef","nonOffLinePayment","a","amount_due","b","allocationLen","remisison","totalRefundAmount_1","isFeeAmountZero_1","grpOutstandingAmount","isNewPaymentGroup_1","index","getGroupOutstandingAmount","redirectToFeeSearchPage","navigateByUrl","chkForAddRemission","redirectToremissionPage","redirectToReportsPage","loadFeeSummaryPage","selectedUnprocessedFeeEvent","unprocessedRecordId","getUnprocessedFeeCount","unProcessedRecordCount","unprocessedRecordCount","calculateAmountDue","confirmRemoveFee","cancelRemoval","removeFee","success","isCheckAmountdueExist","amountDue","chkIssueRefundBtnEnable","chkForPBAPayment","_b","_c","chkIsRefundRemissionBtnEnable","loadPBAAccountPage","pbaPayOrderRef","PaymentToPayhubRequest","currency","description","provider","toFixed","case_type","PayhubAntennaRequest","BS_ENABLE_FLAG","FeeSummaryComponent","service","platForm","isBackButtonEnable","isFeeAmountZero","totalAfterRemission","isPaymentExist","isRemissionsExist","bsPaymentDcnNumber","features","result","feature","uid","enable","getUnassignedPaymentlist","getPaymentGroup","unassignedPayments","responsible_service_id","upPaymentErrorMessage","currentFee","outStandingAmount","partUrl","cancelRemission","page","antennaReqBody","href","goToAllocatePage","Location","ErrorBannerComponent","UnidentifiedPaymentsRequest","unidentified_reason","payment_allocation_status","name","AllocatePaymentRequest","unAllocatedPayment","exceptionRecord","allocatedRequest","banked_date","date_banked","exception_record","document_control_number","dcn_reference","external_provider","giro_slip_no","bgc_reference","payer_name","payment_channel","payment_status","payment_method","payment_allocation_dto","MarkUnidentifiedPaymentComponent","isInvesticationDetailEmpty","investicationDetailHasError","investicationDetailMinHasError","investicationDetailMaxHasError","siteID","ccdReference","exceptionReference","getUnassignedPayment","markPaymentUnidentifiedForm","investicationDetail","unassignedRecord","beCcdNumber","beExceptionNumber","trimUnderscore","saveAndContinue","investicationField","formerror","investigationComment","confirmPayments","res1","res2","response2","reqBody","res3","gotoCasetransationPage","user_id","postStrategicBody","cancelMarkUnidentifiedPayments","UnsolicitedPaymentsRequest","responsible_office","responsible_person","email_id","receiving_office","receiving_email_address","sending_email_address","MarkUnsolicitedPaymentComponent","reasonHasError","reasonMinHasError","reasonMaxHasError","responsibleOfficeHasError","isResponsibleOfficeEmpty","isContinueButtondisabled","siteids","siteIDList","scrollTo","markPaymentUnsolicitedForm","responsibleOffice","responsiblePerson","emailId","selectedSiteId","reasonField","officeIdField","cancelMarkUnsolicitedPayments","checkingFormValue","formFields","valueExists","hasOwnProperty","selectchange","target","selectedSiteName","selectedIndex","text","UnprocessedPaymentsComponent","recordId","isRecordExist","isAllocateToExistingFeebtnEnabled","isMarkAsUnidentifiedbtnEnabled","isAllocatedToNewFeebtnEnabled","isExceptionCase","serviceId","unassignedRecordListLength","isStFixEnable","FEE_RECORDS_EXISTS","setValuesForUnassignedRecord","unassignedRecordList","unprocessedPaymentSelectEvent","formatUnassignedRecordId","ID","loadUnsolicitedPage","selectedRecordReference","validateButtons","resetButtons","PAYMENTREF","IS_OS_AMT_AVAILABLE","unprocessedPaymentUnSelectEvent","showDetailRow","unassignedRecordSelectedList","IS_BUTTON_ENABLE","PAYMENTSLENGTH","LEVEL","ProcessedPaymentsComponent","redirectToPaymentViewPage","NONPAYMENTS","IAllocationPaymentsRequest","explanation","userName","user_name","AllocatePaymentsComponent","isMoreDetailsBoxHide","otherPaymentExplanation","paymentReasonHasError","paymentExplanationHasError","isPaymentDetailsEmpty","isPaymentDetailsInvalid","paymentDetailsMinHasError","paymentDetailsMaxHasError","isUserNameEmpty","isUserNameInvalid","paymentReason","paymentExplanation","cookieUserName","userNameField","reasonList","overPayment","hwfReward","wrongFee","notIssueCase","otherDeduction","shortFall","helpWithFee","other","explanationList","referRefund","noRefund","noCase","holdCase","heldCase","refund","duplicate","humanerror","caseWithdrawn","overUnderPaymentForm","moreDetails","fstCon","scndCn","selectedPaymentGroup","gotoSummaryPage","cancelAllocatePayment","confirmAllocatePayement","enCookieUserName","decodeURIComponent","fullName","paymentDetailsField","paymentFormError","isEmptyCondtion","isOtherOptionSelected","isRemainingAmountGtZero","isRemainingAmountLtZero","finalServiceCall","reset","GroupOutstandingAmount","remainingToBeAssigned","paymentSectionLabel","feedbackUrlLabel","remainingAmount","afterFeeAllocateOutstanding","amountForAllocation","selectRadioButton","key","OrderListSelectEvent","AddRemissionRequest","hwf_reference","AddRetroRemissionRequest","PostIssueRefundRetroRemission","remissionReference","contactDeatils","AddRemissionComponent","Promise","resolve","refundListReason","refundListAmount","refundFees","hasErrors","option","selectedValue","retroRemission","isRemissionCodeEmpty","remissionCodeHasError","isAmountEmpty","amountHasError","isRemissionLessThanFeeError","refundHasError","isPaymentSuccess","isRemissionApplied","commonRefundReasons","class","Array","default","pattern1","pattern2","remessionPayment","remissionForm","remissionCode","refundReason","refundDDReason","feeAmount","feesList","array","onlySelf","refundPaymentReference","refundFeesList","refundReasons","recently_used","sort","localeCompare","changeRefundReason","creds","selected","noneSelected","item","querySelectorAll","el","classList","remove","check_en","v1","AppAmt","Volume","ele","getElementById","formArray","checked","at","removeAttribute","setAttribute","resetRemissionForm","remissionctrls","isRemissionLessThanFee","setErrors","confirmRemission","newNetAmount","remissionAmount","trim","LDUrl","routeReuseStrategy","shouldReuseRoute","onSameUrlNavigation","addRemissionCode","isFromCheckAnsPage","gotoAddRetroRemissionCodePage","iscancelClicked","isFromRefundStatusPage","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","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","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","refundlist","isEliginbleToAccess","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","refundCode","getRefundAmount","getRefundFees","fee_id","gotoReviewRefundConfirmationPage","resubmitRequest","gotoEditAddressDetails","addressDetails","getContactDetailsForRefundList","gotoEditDetailsPage","submitEditDetail","resendRequest","putResend","Event","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","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/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/services/notification/notification.service.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/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}","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 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 }\n}","import { Injectable } from '@angular/core';\nimport { HttpErrorResponse } from '@angular/common/http';\nimport { Observable, throwError } from 'rxjs';\n\n@Injectable({\n providedIn: 'root'\n})\n\n\nexport class ErrorHandlerService {\n\n constructor() { }\n\n\n handleError(err: HttpErrorResponse): Observable<any> {\n let errorMessage: string;\n if (err.error instanceof Error) {\n // A client-side or network error occurred.\n errorMessage = `An error occurred: ${err.error.message}`;\n } else {\n // The backend returned an unsuccessful response code.\n if (err.status === 404) {\n\n if (typeof err.error === 'string' && err.error !== undefined) {\n\n if(err.error.length > 60) {\n if (JSON.parse(err.error).statusCode !== undefined && JSON.parse(err.error).statusCode === 500)\n {\n errorMessage = 'Internal server error';\n } else {\n if(err.error.length > 60) {\n errorMessage = JSON.parse(err.error).error;\n } else {\n errorMessage = err.error;\n }\n\n }\n } else {\n errorMessage = err.error;\n }\n } else {\n errorMessage = JSON.parse(err.error).error;\n }\n\n }\n else if (err.status === 500) {\n errorMessage = 'Internal server error';\n } else if (err.error.messsage === undefined) {\n if( typeof err.error === 'object') {\n errorMessage = JSON.parse(JSON.stringify(err.error)).error;\n } else {\n if (typeof err.error === 'string' && err.error !== undefined) {\n\n if(err.error.length > 60) {\n if (JSON.parse(err.error).statusCode !== undefined && JSON.parse(err.error).statusCode === 500)\n {\n errorMessage = 'Internal server error';\n } else {\n if(err.error.length > 60) {\n errorMessage = JSON.parse(err.error).error;\n } else {\n errorMessage = err.error;\n }\n\n }\n } else {\n errorMessage = err.error;\n }\n } else {\n errorMessage = JSON.parse(err.error).error;\n }\n\n }\n\n } else {\n if (err.error.message !== undefined) {\n errorMessage = `${err.error.message}`;\n } else {\n errorMessage = `${err.error}`;\n }\n\n }\n }\n return throwError(errorMessage);\n }\n\n\n getServerErrorMessage(isErrorExist, isDataNotExist = false, error='') {\n const bodyContent = isDataNotExist ? error : 'Try again later';\n return {\n title: \"There is a problem with the service\",\n body: bodyContent,\n showError: isErrorExist\n };\n }\n}\n","import { Injectable } from '@angular/core';\n\nconst noop = (): any => undefined;\n\nexport abstract class Logger {\n\n info: any;\n warn: any;\n error: any;\n}\n\n@Injectable({\n providedIn: 'root'\n})\nexport class LoggerService implements Logger {\n\n info: any;\n warn: any;\n error: any;\n\n invokeConsoleMethod(type: string, args?: any): void {}\n}\n","import { Injectable } from '@angular/core';\nimport { HttpClient } from '@angular/common/http';\n\nimport { Observable } from 'rxjs/internal/Observable';\nimport {PaymentLibService} from '../../payment-lib.service';\nimport { IPayments } from '../../interfaces/IPayments';\nimport { catchError } from 'rxjs/operators';\nimport { ErrorHandlerService } from '../shared/error-handler.service';\nimport { LoggerService } from '../shared/logger/logger.service';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class PaymentListService {\n payments: IPayments;\n\n constructor(private http: HttpClient,\n private logger: LoggerService,\n private errorHandlerService: ErrorHandlerService,\n private paymentLibService: PaymentLibService) { }\n\n\n getPaymentByCcdCaseNumber(ccdCaseNumber: string, paymentMethod: string): Observable<IPayments> {\n this.logger.info('Payment-list-service getPaymentByCcdCaseNumber for: ', ccdCaseNumber);\n\n return this.http.get<IPayments>(`${this.paymentLibService.API_ROOT}/cases/${ccdCaseNumber}/payments`, {\n withCredentials: true\n })\n .pipe(\n catchError(this.errorHandlerService.handleError)\n );\n }\n}\n","import {Component, OnInit} from '@angular/core';\n\nimport {PaymentListService} from '../../services/payment-list/payment-list.service';\nimport {IPayments} from '../../interfaces/IPayments';\nimport {PaymentLibComponent} from '../../payment-lib.component';\nimport {IStatusHistory} from '../../interfaces/IStatusHistory';\n\n@Component({\n selector: 'ccpay-payment-list',\n templateUrl: './payment-list.component.html',\n styleUrls: ['./payment-list.component.css']\n})\nexport class PaymentListComponent implements OnInit {\n payments: IPayments;\n errorMessage: string;\n code: string;\n\n constructor(private paymentListService: PaymentListService,\n private paymentLibComponent: PaymentLibComponent) {\n }\n\n ngOnInit() {\n this.paymentListService.getPaymentByCcdCaseNumber(this.paymentLibComponent.CCD_CASE_NUMBER, this.paymentLibComponent.PAYMENT_METHOD)\n .subscribe(\n payments => this.payments = payments,\n (error: any) => this.errorMessage = <any>error\n );\n }\n\n loadPaymentViewComponent(paymentGroupReference: string, paymentReference: string, paymentMethod: string) {\n this.paymentLibComponent.paymentMethod = paymentMethod;\n this.paymentLibComponent.paymentGroupReference = paymentGroupReference;\n this.paymentLibComponent.paymentReference = paymentReference;\n this.paymentLibComponent.viewName = 'payment-view';\n }\n}\n","/******************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n if (typeof b !== \"function\" && b !== null)\r\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (_) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n var desc = Object.getOwnPropertyDescriptor(m, k);\r\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\r\n desc = { enumerable: true, get: function() { return m[k]; } };\r\n }\r\n Object.defineProperty(o, k2, desc);\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n});\r\n\r\nexport function __exportStar(m, o) {\r\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\r\n}\r\n\r\nexport function __values(o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n}\r\n\r\nexport function __spreadArray(to, from, pack) {\r\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\r\n if (ar || !(i in from)) {\r\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\r\n ar[i] = from[i];\r\n }\r\n }\r\n return to.concat(ar || Array.prototype.slice.call(from));\r\n}\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === \"return\" } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nvar __setModuleDefault = Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\r\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\r\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\r\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\r\n}\r\n\r\nexport function __classPrivateFieldIn(state, receiver) {\r\n if (receiver === null || (typeof receiver !== \"object\" && typeof receiver !== \"function\")) throw new TypeError(\"Cannot use 'in' operator on non-object\");\r\n return typeof state === \"function\" ? receiver === state : state.has(receiver);\r\n}\r\n","import { Injectable } from '@angular/core';\nimport { HttpClient, HttpHeaders } from '@angular/common/http';\nimport { Meta } from '@angular/platform-browser';\nimport { Observable } from 'rxjs';\n\n@Injectable()\nexport class WebComponentHttpClient {\n constructor(\n private http: HttpClient,\n private meta: Meta\n ) { }\n\n post(url: string, body: any | null, options?: any): Observable<any> {\n const opts = this.addHeaders(options || {});\n return this.http.post(url, body, opts);\n }\n\n put(url: string, body: any | null, options?: any): Observable<any> {\n const opts = this.addHeaders(options || {});\n return this.http.put(url, body, opts);\n }\n\n get(url: string, options?: any): Observable<any> {\n const opts = this.addHeaders(options || {});\n return this.http.get(url, opts);\n }\n\n delete(url: string, options?: any): Observable<any> {\n const opts = this.addHeaders(options || {});\n return this.http.delete(url, opts);\n }\n \n patch(url: string, body: any | null, options?: any): Observable<any> {\n const opts = this.addHeaders(options || {});\n return this.http.patch(url, body, opts);\n }\n\n addHeaders(options: any): any {\n const csrfToken = this.meta.getTag('name=csrf-token');\n const headers = {};\n \n if (options.headers) {\n options.headers.forEach(element => {\n headers[element] = options.headers.get(element);\n });\n }\n headers['X-Requested-With'] = 'XMLHttpRequest';\n if (csrfToken === null) {\n if( document.cookie.split(';').find(row => row.startsWith('XSRF-TOKEN')) !== undefined ) {\n headers['CSRF-Token'] = document.cookie.split(';').find(row => row.startsWith('XSRF-TOKEN')).split('=')[1]; \n } else {\n headers['CSRF-Token'] = document.cookie.split(';').find(row => row.startsWith(' XSRF-TOKEN')).split('=')[1];\n }\n } else {\n headers['CSRF-Token'] = csrfToken.content;\n }\n options.headers = new HttpHeaders(headers);\n options.responseType = 'text';\n return options;\n }\n}\n","import { Injectable } from '@angular/core';\nimport { HttpClient, HttpHeaders } from '@angular/common/http';\nimport { Observable } from 'rxjs/internal/Observable';\nimport { v4 as uuidv4 } from 'uuid';\nimport {IPayment} from '../../interfaces/IPayment';\nimport {PaymentLibService} from '../../payment-lib.service';\nimport { WebComponentHttpClient } from '../shared/httpclient/webcomponent.http.client';\nimport { ErrorHandlerService } from '../shared/error-handler.service';\nimport { catchError } from 'rxjs/operators';\nimport { LoggerService } from '../shared/logger/logger.service';\nimport {IPaymentGroup} from '../../interfaces/IPaymentGroup';\nimport { AddRemissionRequest } from '../../interfaces/AddRemissionRequest';\nimport { PaymentToPayhubRequest } from '../../interfaces/PaymentToPayhubRequest';\nimport { PayhubAntennaRequest } from '../../interfaces/PayhubAntennaRequest';\nimport { UnidentifiedPaymentsRequest } from '../../interfaces/UnidentifiedPaymentsRequest';\nimport { UnsolicitedPaymentsRequest } from '../../interfaces/UnsolicitedPaymentsRequest';\nimport { Meta } from '@angular/platform-browser';\nimport { AllocatePaymentRequest } from '../../interfaces/AllocatePaymentRequest';\nimport { IAllocationPaymentsRequest } from '../../interfaces/IAllocationPaymentsRequest';\nimport {IOrderReferenceFee} from '../../interfaces/IOrderReferenceFee';\nimport { BehaviorSubject } from 'rxjs';\nimport { IserviceRequestPbaPayment } from '../../interfaces/IserviceRequestPbaPayment';\nimport { IserviceRequestCardPayment } from '../../interfaces/IserviceRequestCardPayment';\nimport { RefundsRequest } from '../../interfaces/RefundsRequest';\nimport { AddRetroRemissionRequest } from '../../interfaces/AddRetroRemissionRequest';\nimport { PostRefundRetroRemission } from '../../interfaces/PostRefundRetroRemission';\nimport { PostIssueRefundRetroRemission } from '../../interfaces/PostIssueRefundRetroRemission';\nimport { error } from '@angular/compiler/src/util';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class PaymentViewService {\n private ordersList = <BehaviorSubject<IOrderReferenceFee[]>>new BehaviorSubject([]);\n\n private meta: Meta;\n\n constructor(private http: HttpClient,\n private https: WebComponentHttpClient,\n private logger: LoggerService,\n private errorHandlerService: ErrorHandlerService,\n private paymentLibService: PaymentLibService) { }\n\n getPaymentDetails(paymentReference: string, paymentMethod: string): Observable<IPayment> {\n this.logger.info('Payment-view-service getPaymentDetails for: ', paymentReference);\n\n return this.http.get<IPayment>(paymentMethod === 'card' || paymentMethod === 'cash' || paymentMethod === 'cheque' || paymentMethod === 'postal order' ?\n `${this.paymentLibService.API_ROOT}/card-payments/${paymentReference}` :\n `${this.paymentLibService.API_ROOT}/credit-account-payments/${paymentReference}`, {\n withCredentials: true\n })\n .pipe(\n catchError(this.errorHandlerService.handleError)\n );\n }\n\n getPaymentGroupDetails(paymentGroupReference: string): Observable<IPaymentGroup> {\n this.logger.info('Payment-view-service getPaymentGroupDetails for: ', paymentGroupReference);\n\n return this.http.get<IPayment>(`${this.paymentLibService.API_ROOT}/payment-groups/${paymentGroupReference}`, {\n withCredentials: true\n })\n .pipe(\n catchError(this.errorHandlerService.handleError)\n );\n }\n getApportionPaymentDetails(paymentReference: string): Observable<IPaymentGroup> {\n this.logger.info('Payment-view-service getPaymentGroupDetails for: ', paymentReference);\n\n return this.http.get<IPayment>(`${this.paymentLibService.API_ROOT}/payment-groups/fee-pay-apportion/${paymentReference}`, {\n withCredentials: true\n })\n .pipe(\n catchError(this.errorHandlerService.handleError)\n );\n }\n getPBAaccountDetails(): Observable<any> {\n const url = `${this.paymentLibService.API_ROOT}/pba-accounts`;\n return this.http.get(url, { withCredentials: true }).pipe(\n catchError(this.errorHandlerService.handleError)\n );\n }\n\n postWays2PayCardPayment(serviceRef: string, body: IserviceRequestCardPayment): Observable<any> {\n const url = `${this.paymentLibService.API_ROOT}/service-request/${serviceRef}/card-payments`;\n const rurl = this.paymentLibService.CARDPAYMENTRETURNURL.replace('.prod', '');\n body['return-url'] = `${rurl}/payment`;\n return this.https.post(url, body).pipe(\n catchError(this.errorHandlerService.handleError)\n );\n }\n \n postPBAaccountPayment(serviceRef: string, body: IserviceRequestPbaPayment): Observable<any> {\n let randomKey = 'idam-key-' + Math.random().toString().split('.').join('-');\n body['idempotency_key'] = randomKey; \n const url = `${this.paymentLibService.API_ROOT}/service-request/${serviceRef}/pba-payments`;\n 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 { 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 { 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 constructor(private paymentViewService: PaymentViewService,\n private paymentLibComponent: PaymentLibComponent,\n private cd: ChangeDetectorRef,\n private OrderslistService: OrderslistService) {\n }\n\n ngAfterContentChecked(): void {\n this.cd.detectChanges();\n }\n\n ngOnInit() {\n this.ccdCaseNumber = this.paymentLibComponent.CCD_CASE_NUMBER;\n this.selectedOption = this.paymentLibComponent.SELECTED_OPTION;\n this.dcnNumber = this.paymentLibComponent.DCN_NUMBER;\n this.isTurnOff = this.paymentLibComponent.ISTURNOFF;\n this.serviceReference = this.paymentLibComponent.paymentGroupReference;\n this.viewStatus = 'paymentview';\n this.paymentViewService.getApportionPaymentDetails(this.paymentLibComponent.paymentReference).subscribe(\n paymentGroup => {\n let fees = [];\n paymentGroup.fees.forEach(fee => {\n this.isRemissionsMatch = false;\n\n paymentGroup.remissions.forEach(rem => {\n if (rem.fee_code === fee.code) {\n this.isRemissionsMatch = true;\n fee['remissions'] = rem;\n fees.push(fee);\n }\n });\n if (!this.isRemissionsMatch) {\n fees.push(fee);\n }\n });\n paymentGroup.fees = fees\n this.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.viewCompStatus = 'overpaymentcheckandanswer';\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}","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}","import {Component, OnInit, Input} from '@angular/core';\nimport { FormBuilder, FormGroup, Validators, FormControl } from '@angular/forms';\nimport {RefundsService} from '../../services/refunds/refunds.service';\nimport { IRefundAction } from '../../interfaces/IRefundAction';\nimport { IRefundList } from '../../interfaces/IRefundList';\nimport { IRefundRejectReason } from '../../interfaces/IRefundRejectReason';\nimport { OrderslistService } from '../../services/orderslist.service';\nimport { PaymentViewService } from '../../services/payment-view/payment-view.service';\nimport { PaymentLibComponent } from '../../payment-lib.component';\nimport { ActivatedRoute,Router } from '@angular/router';\n\n@Component({\n selector: 'ccpay-process-refund',\n templateUrl: './process-refund.component.html',\n styleUrls: ['./process-refund.component.css']\n})\nexport class ProcessRefundComponent implements OnInit {\n @Input() refundReference: string;\n @Input() refundlistsource: IRefundList;\n\n processRefundForm: FormGroup;\n\n errorMessage = this.getErrorMessage(false, '', '', '');\n sendmeback: string = null;\n viewStatus: string;\n refundActionList: IRefundAction[] = []; \n refundRejectReasonList: IRefundRejectReason[] = []; \n isSendMeBackClicked: boolean = false;\n isRejectClicked: boolean = false;\n isOtherClicked: boolean = false;\n isSuccesspageEnable: boolean = false;\n\n refundActionsHasError: boolean = false;\n refundRejectReasonHasError: boolean = false;\n isReasonFieldEmpty: boolean = false;\n isReasonFieldInvalid: boolean = false;\n reasonFieldMinHasError: boolean = false;\n reasonFieldMaxHasError: boolean = false;\n isReasonEmpty: boolean = false;\n isReasonInvalid: boolean = false;\n successMsg: string = null;\n navigationpage: string;\n ccdCaseNumber: string;\n isFromRefundListPage: boolean;\n cpoDetails:any = null;\n isCPODown: boolean;\n isConfirmButtondisabled: boolean = true;\n constructor(private RefundsService: RefundsService,\n private paymentViewService: PaymentViewService,\n private formBuilder: FormBuilder,\n private OrderslistService: OrderslistService,\n private paymentLibComponent: PaymentLibComponent,\n private router: Router,\n private activeRoute: ActivatedRoute) {\n }\n\n ngOnInit() {\n this.viewStatus = 'RefundProcess';\n this.RefundsService.getRefundActions(this.refundReference).subscribe(\n refundActionList => {\n this.refundActionList = <any>refundActionList;\n },\n err => {\n this.errorMessage = this.getErrorMessage(true, err.statusCode, err.err, err);\n }\n );\n this.processRefundForm = this.formBuilder.group({\n refundActionField: new FormControl('', Validators.compose([\n Validators.required\n ])),\n refundRejectReasonField: new FormControl('', Validators.compose([\n Validators.required\n ])),\n sendMeBackField: new FormControl('', Validators.compose([\n Validators.required,\n Validators.minLength(3),\n Validators.maxLength(255),\n Validators.pattern('^([a-zA-Z0-9\\\\s,\\\\.]*)$'),\n\n ])),\n enterReasonField: new FormControl('', Validators.compose([\n Validators.required,\n Validators.maxLength(30),\n Validators.pattern('^([a-zA-Z0-9.\\\\s]*)$'),\n ])),\n });\n this.ccdCaseNumber = this.refundlistsource.ccd_case_number;\n\n if((typeof this.paymentLibComponent.TAKEPAYMENT === 'string' && this.paymentLibComponent.TAKEPAYMENT === 'false') || (typeof this.paymentLibComponent.TAKEPAYMENT === 'boolean' && !this.paymentLibComponent.TAKEPAYMENT) ) {\n this.isFromRefundListPage = true;\n }\n 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 }\n \n checkRefundActions(code: string) {\n this.refundActionsHasError = false;\n this.isReasonFieldEmpty = false;\n this.isReasonEmpty = false;\n this.isReasonInvalid = false;\n this.refundRejectReasonHasError = false;\n if(code === 'Return to caseworker') {\n this.isConfirmButtondisabled = true;\n this.isSendMeBackClicked = true;\n this.isRejectClicked = false;\n this.isOtherClicked = false;\n\n } else if (code === 'Approve') {\n this.isSendMeBackClicked = false;\n this.isConfirmButtondisabled = false;\n this.isRejectClicked = false;\n this.isOtherClicked = false;\n\n } else if (code === 'Reject') {\n this.isRejectClicked = true;\n this.isSendMeBackClicked = false;\n this.isOtherClicked = false;\n this.RefundsService.getRefundRejectReasons().subscribe(\n refundRejectReasonList => {\n this.refundRejectReasonList = <any>refundRejectReasonList;\n },\n err => {\n this.errorMessage = this.getErrorMessage(true, err.statusCode, err.err, err);\n }\n );\n } else if (code === 'RE005') {\n this.isOtherClicked = true;\n } else if (code !== 'RE005') {\n this.isOtherClicked = false;\n }\n }\n processRefundSubmit() {\n let processRefundRequest;\n let status;\n this.resetForm([false, false, false, false, false, false, false, false], 'all');\n const controls = this.processRefundForm.controls;\n const processFormError = controls.sendMeBackField.errors;\n\n if (this.processRefundForm.dirty && controls.refundActionField.valid \n && (controls.refundActionField.value == 'Approve'\n || (controls.refundActionField.value == 'Reject' && controls.refundRejectReasonField.valid && controls.refundRejectReasonField.value != 'RE005')\n || (controls.refundActionField.value == 'Reject' && controls.refundRejectReasonField.value == 'RE005' && controls.enterReasonField.valid)\n || (controls.refundActionField.value == 'Return to caseworker' && controls.sendMeBackField.valid))) {\n if (controls.refundActionField.value === 'Approve'){\n status = 'APPROVE';\n processRefundRequest = {\n code:'',\n reason: ''\n };\n } else if (controls.refundActionField.value === 'Reject') {\n status = 'REJECT';\n\n processRefundRequest = {\n code: controls.refundRejectReasonField.value ? controls.refundRejectReasonField.value : '',\n reason: controls.refundRejectReasonField.value == 'RE005' ? controls.enterReasonField.value : ''\n };\n } else if (controls.refundActionField.value === 'Return to caseworker') {\n status = 'SENDBACK';\n\n processRefundRequest = {\n code: '',\n reason: controls.sendMeBackField.value\n };\n }\n this.RefundsService.patchRefundActions(processRefundRequest, this.refundReference, status).subscribe(\n response => {\n this.isSuccesspageEnable = true;\n // this.successMsg = JSON.parse(response)['data'];\n this.successMsg = response.replace(/['\"]+/g, '');\n },\n err => {\n this.errorMessage = this.getErrorMessage(true, err.statusCode, err.err, err);\n }\n );\n } else {\n if(controls.refundActionField.value == \"\") {\n this.resetForm([true, false, false, false, false, false, false, false], 'action');\n }\n if(controls.refundActionField.value == 'Reject' && controls.refundRejectReasonField.value == \"\") {\n this.resetForm([false, true, false, false, false, false, false, false], 'rejectReason');\n }\n if(controls.refundActionField.value == 'Return to caseworker') {\n if(controls.sendMeBackField.value == '' ) {\n this.resetForm([false, false, true, false, false, false, false, false], 'addAreason');\n }\n if(controls.sendMeBackField.value != '' && controls.sendMeBackField.invalid ) {\n this.resetForm([false, false, false, true, false, false, false, false], 'addAreason');\n }\n if(processFormError && processFormError.minlength && processFormError.minlength.actualLength < 3 ) {\n this.resetForm([false, false, false, false, true, false, false, false], 'addAreason');\n }\n if(processFormError && processFormError.maxlength && processFormError.maxlength.actualLength > 255 ) {\n this.resetForm([false, false, false, false, false, true, false, false], 'addAreason');\n }\n }\n if(controls.refundActionField.value == 'Reject' && controls.refundRejectReasonField.value == 'RE005') {\n if(controls.enterReasonField.value === \"\") {\n this.resetForm([false, false, false, false, false, false, true, false], 'enterReason');\n }\n if(controls.enterReasonField.value!== \"\" && controls.enterReasonField.invalid) {\n this.resetForm([false, false, false, false, false, false, false, true], 'enterReason');\n }\n }\n }\n\n }\n getErrorMessage(isErrorExist, status, errorMsg, err) {\n let bodyTxt = 'Please try again later';\n if (status !== 500) {\n if (errorMsg !== undefined) {\n bodyTxt = errorMsg;\n } else {\n bodyTxt = err;\n }\n \n }\n return {\n title: 'Something went wrong',\n body: bodyTxt,\n showError: isErrorExist\n };\n }\n loadRefundListPage() {\n this.OrderslistService.getnavigationPageValue().subscribe((data) => this.navigationpage = data);\n if (this.navigationpage === 'casetransactions') {\n // window.location.href='/refund-list?takePayment=false&refundlist=true';\n // // this.OrderslistService.setnavigationPage('casetransactions');\n // // this.OrderslistService.setisFromServiceRequestPage(false);\n // // this.paymentLibComponent.VIEW ='case-transactions';\n // // this.paymentLibComponent.viewName = 'case-transactions';\n // // this.paymentLibComponent.ISBSENABLE = true;\n // // this.paymentLibComponent.isRefundStatusView = false;\n this.paymentLibComponent.viewName = 'refundstatuslist';\n this.paymentLibComponent.isRefundStatusView = true;\n } else {\n this.paymentLibComponent.viewName = 'refundstatuslist';\n this.paymentLibComponent.isRefundStatusView = true;\n }\n }\n loadRefundsHomePage() {\n if(typeof this.paymentLibComponent.TAKEPAYMENT === 'string' && this.paymentLibComponent.TAKEPAYMENT === 'false') {\n //window.location.href='/refund-list?takePayment=false&refundlist=true';\n this.paymentLibComponent.viewName = 'refund-list';\n }\n else {\n this.OrderslistService.setnavigationPage('casetransactions');\n this.OrderslistService.setisFromServiceRequestPage(false);\n this.paymentLibComponent.VIEW ='case-transactions';\n this.paymentLibComponent.viewName = 'case-transactions';\n this.paymentLibComponent.ISBSENABLE = true;\n this.paymentLibComponent.isRefundStatusView = false;\n }\n }\n redirecttoRefundListPage() {\n if((typeof this.paymentLibComponent.TAKEPAYMENT === 'string' && this.paymentLibComponent.TAKEPAYMENT === 'false') || (typeof this.paymentLibComponent.TAKEPAYMENT === 'boolean' && !this.paymentLibComponent.TAKEPAYMENT) ) {\n // window.location.href='/refund-list?takePayment=false&refundlist=true';\n this.paymentLibComponent.viewName = 'refund-list';\n }\n else {\n this.loadRefundListPage();\n }\n }\n loadCaseTransactionPage() {\n this.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}","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 { 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';\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}/notifications/${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}/search/places/v1/postcode?postcode=${postcode}`, {\n withCredentials: true\n })\n .pipe(\n catchError(this.errorHandlerService.handleError)\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('^[a-z0-9._%+-]+@[a-z0-9-]+\\\\.[a-z]{2,4}$')\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['data']['results'];\n this.isShowPickAddress = refundsNotification['data']['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;\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 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 }\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}","import { Component, OnInit, Input } from '@angular/core';\n\n\n\n@Component({\n selector: 'ccpay-error-banner',\n templateUrl: './error-banner.component.html',\n styleUrls: ['./error-banner.component.scss']\n})\n\nexport class ErrorBannerComponent implements OnInit {\n @Input('errorMessage') errorMessage;\n\n constructor(\n ) {}\n\n ngOnInit() {\n\n }\n}\n","\nexport class UnidentifiedPaymentsRequest {\n payment_allocation_status: any;\n payment_group_reference: string;\n payment_reference: string;\n unidentified_reason: string;\n\n constructor(payment_group_reference: string, payment_reference : string, unidentified_reason: any) {\n this.payment_allocation_status = {\n description: '',\n name: \"Unidentified\"\n };\n this.payment_group_reference = payment_group_reference ;\n this.payment_reference= payment_reference;\n this.unidentified_reason= unidentified_reason;\n\n }\n\n\n\n}\n","import { IBSPayments } from \"./IBSPayments\";\n\nexport class AllocatePaymentRequest {\n amount: Number;\n banked_date: String;\n ccd_case_number: String;\n exception_record: string;\n currency: String;\n document_control_number: String;\n external_provider: String;\n giro_slip_no: String;\n payer_name: String;\n payment_channel: Object;\n payment_status: Object;\n payment_method: String;\n case_type: String;\n payment_allocation_dto?: {\n allocation_reason: String,\n allocation_status: String,\n explanation: String,\n payment_allocation_status: Object,\n payment_group_reference: String,\n payment_reference: String,\n reason: String,\n receiving_office: String,\n unidentified_reason: String,\n user_id: String,\n user_name: String,\n case_type: String\n }\n\n constructor(ccd_case_number : string, unAllocatedPayment: IBSPayments, caseType: string, exceptionRecord: string, allocatedRequest?: any) {\n this.amount = unAllocatedPayment.amount;\n this.banked_date = unAllocatedPayment.date_banked;\n this.ccd_case_number = ccd_case_number;\n this.exception_record = exceptionRecord;\n this.currency= unAllocatedPayment.currency;\n this.document_control_number = unAllocatedPayment.dcn_reference;\n this.external_provider = 'exela';\n this.giro_slip_no = unAllocatedPayment.bgc_reference;\n this.payer_name = unAllocatedPayment.payer_name;\n this.payment_channel = {\n description: '',\n name: 'bulk scan'\n };\n this.payment_status ={\n description: 'bulk scan payment completed',\n name: 'success'\n }\n this.payment_method = unAllocatedPayment.payment_method;\n this.case_type= caseType;\n if(allocatedRequest) {\n this.payment_allocation_dto = allocatedRequest;\n }\n\n }\n}\n","import { Component, OnInit, Input } from '@angular/core';\nimport { FormBuilder, FormGroup, Validators, FormControl } from '@angular/forms';\nimport { PaymentLibComponent } from '../../payment-lib.component';\nimport { PaymentViewService } from '../../services/payment-view/payment-view.service';\nimport {BulkScaningPaymentService} from '../../services/bulk-scaning-payment/bulk-scaning-payment.service';\nimport { IBSPayments } from '../../interfaces/IBSPayments';\nimport { UnidentifiedPaymentsRequest } from '../../interfaces/UnidentifiedPaymentsRequest';\nimport { AllocatePaymentRequest } from '../../interfaces/AllocatePaymentRequest';\n\n@Component({\n selector: 'app-mark-unidentified-payment',\n templateUrl: './mark-unidentified-payment.component.html',\n styleUrls: ['./mark-unidentified-payment.component.scss']\n})\nexport class MarkUnidentifiedPaymentComponent implements OnInit {\n @Input() caseType: string;\n markPaymentUnidentifiedForm: FormGroup;\n viewStatus: string;\n ccdCaseNumber: string;\n bspaymentdcn: string;\n isInvesticationDetailEmpty: boolean = false;\n investicationDetailHasError: boolean = false;\n investicationDetailMinHasError: boolean = false;\n investicationDetailMaxHasError: boolean = false;\n errorMessage = this.getErrorMessage(false);\n unassignedRecord:IBSPayments;\n siteID: string = null;\n investigationComment: string;\n isConfirmButtondisabled:Boolean = false;\n ccdReference: string = null;\n exceptionReference: string = null;\n isStrategicFixEnable: boolean = true;\n\n constructor(private formBuilder: FormBuilder,\n private paymentViewService: PaymentViewService,\n private paymentLibComponent: PaymentLibComponent,\n private bulkScaningPaymentService: BulkScaningPaymentService) { }\n\n ngOnInit() {\n this.viewStatus = 'mainForm';\n this.ccdCaseNumber = this.paymentLibComponent.CCD_CASE_NUMBER;\n this.bspaymentdcn = this.paymentLibComponent.bspaymentdcn;\n this.isStrategicFixEnable = this.paymentLibComponent.ISSFENABLE;\n this.getUnassignedPayment();\n\n this.markPaymentUnidentifiedForm = this.formBuilder.group({\n investicationDetail: new FormControl('', Validators.compose([\n Validators.required,\n Validators.minLength(3),\n Validators.maxLength(255),\n Validators.pattern('^([a-zA-Z0-9\\\\s,\\\\.]*)$')\n ]))\n });\n }\n getUnassignedPayment() {\n this.bulkScaningPaymentService.getBSPaymentsByDCN(this.bspaymentdcn).subscribe(\n unassignedPayments => {\n this.errorMessage = this.getErrorMessage(false);\n this.unassignedRecord = unassignedPayments['data'].payments.filter(payment => {\n return payment && payment.dcn_reference == this.bspaymentdcn;\n })[0];\n this.siteID = unassignedPayments['data'].responsible_service_id;\n const beCcdNumber = unassignedPayments['data'].ccd_reference,\n beExceptionNumber = unassignedPayments['data'].exception_record_reference,\n exceptionReference = beCcdNumber ? beCcdNumber === this.ccdCaseNumber ? null : this.ccdCaseNumber : this.ccdCaseNumber;\n this.ccdReference = beCcdNumber ? beCcdNumber : null;\n this.exceptionReference = beExceptionNumber ? beExceptionNumber : exceptionReference;\n },\n (error: any) => {\n this.errorMessage = this.getErrorMessage(true);\n }\n );\n }\n trimUnderscore(method: string){\n return this.bulkScaningPaymentService.removeUnwantedString(method,' ');\n }\n saveAndContinue() {\n this.resetForm([false, false, false, false]);\n const investicationField = this.markPaymentUnidentifiedForm.controls.investicationDetail;\n const formerror = investicationField.errors;\n if (this.markPaymentUnidentifiedForm.dirty && this.markPaymentUnidentifiedForm.valid) {\n this.investigationComment = this.markPaymentUnidentifiedForm.controls.investicationDetail.value;\n this.viewStatus = 'unidentifiedContinueConfirm';\n }else {\n if(investicationField.value == '' ) {\n this.resetForm([true, false, false, false]);\n }\n if(investicationField.value != '' && investicationField.invalid ) {\n this.resetForm([false, true, false, false]);\n }\n if(formerror && formerror.minlength && formerror.minlength.actualLength < 3 ) {\n this.resetForm([false, false, true, false]);\n }\n if(formerror && formerror.maxlength && formerror.maxlength.actualLength > 255 ) {\n this.resetForm([false, false, false, true]);\n }\n }\n }\n resetForm(val) {\n this.isInvesticationDetailEmpty = val[0];\n this.investicationDetailHasError = val[1];\n this.investicationDetailMinHasError = val[2];\n this.investicationDetailMaxHasError = val[3];\n }\n confirmPayments() {\n this.isConfirmButtondisabled = true;\n const reason = this.markPaymentUnidentifiedForm.get('investicationDetail').value;\n\n if(!this.isStrategicFixEnable) {\n let allocatedRequest = {\n allocation_status:'Unidentified',\n payment_allocation_status: {\n description: '',\n name: 'Unidentified'\n },\n unidentified_reason: reason,\n user_id: this.caseType,\n }\n const postStrategicBody = new AllocatePaymentRequest\n (this.ccdReference, this.unassignedRecord, this.caseType, this.exceptionReference, allocatedRequest);\n this.bulkScaningPaymentService.postBSWoPGStrategic(postStrategicBody).subscribe(\n res => {\n this.errorMessage = this.getErrorMessage(false);\n let response = JSON.parse(res);\n if (response.success) {\n this.gotoCasetransationPage();\n }\n },\n (error: any) => {\n this.errorMessage = this.getErrorMessage(true);\n this.isConfirmButtondisabled = false;\n });\n } else {\n this.bulkScaningPaymentService.patchBSChangeStatus(this.unassignedRecord.dcn_reference, 'PROCESSED').subscribe(\n res1 => {\n this.errorMessage = this.getErrorMessage(false);\n const requestBody = new AllocatePaymentRequest\n (this.ccdReference, this.unassignedRecord, this.siteID, this.exceptionReference)\n this.paymentViewService.postBSPayments(requestBody).subscribe(\n res2 => {\n this.errorMessage = this.getErrorMessage(false);\n const response2 = JSON.parse(res2),\n reqBody = new UnidentifiedPaymentsRequest\n (response2['data'].payment_group_reference, response2['data'].reference, reason);\n if (response2.success) {\n this.paymentViewService.postBSUnidentifiedPayments(reqBody).subscribe(\n res3 => {\n this.errorMessage = this.getErrorMessage(false);\n const response3 = JSON.parse(res3);\n if (response3.success) {\n this.gotoCasetransationPage();\n }\n },\n (error: any) => {\n this.bulkScaningPaymentService.patchBSChangeStatus(this.unassignedRecord.dcn_reference, 'COMPLETE').subscribe();\n this.errorMessage = this.getErrorMessage(true);\n this.isConfirmButtondisabled = false;\n }\n );\n }\n },\n (error: any) => {\n this.bulkScaningPaymentService.patchBSChangeStatus(this.unassignedRecord.dcn_reference, 'COMPLETE').subscribe();\n this.errorMessage = this.getErrorMessage(true);\n this.isConfirmButtondisabled = false;\n }\n );\n },\n (error: any) => {\n this.errorMessage = this.getErrorMessage(true);\n this.isConfirmButtondisabled = false;\n }\n );\n }\n }\n cancelMarkUnidentifiedPayments(type?:string){\n if(type && type === 'cancel') {\n if(this.markPaymentUnidentifiedForm.get('investicationDetail').value!==\"\"){\n this.viewStatus = 'unidentifiedCancelConfirm';\n } else {\n this.gotoCasetransationPage();\n }\n } else {\n this.viewStatus = 'mainForm';\n }\n }\n\n gotoCasetransationPage() {\n this.paymentLibComponent.viewName = 'case-transactions';\n this.paymentLibComponent.TAKEPAYMENT = true;\n this.paymentLibComponent.ISBSENABLE = true;\n }\n getErrorMessage(isErrorExist) {\n return {\n title: \"There is a problem with the service\",\n body: \"Try again later\",\n showError: isErrorExist\n };\n }\n}\n","\nexport class UnsolicitedPaymentsRequest {\n payment_allocation_status: any;\n payment_group_reference: string;\n payment_reference: string;\n receiving_office: string;\n receiving_email_address: string;\n sending_email_address: string;\n unidentified_reason: string;\n constructor(payment_group_reference: string, payment_reference : string, reason: string,responsible_office: string, responsible_person:string,email_id: string) {\n this.payment_allocation_status = {\n description: '',\n name: \"Transferred\"\n };\n this.payment_group_reference = payment_group_reference;\n this.payment_reference= payment_reference;\n this.unidentified_reason= reason;\n this.receiving_office= responsible_office;\n this.receiving_email_address= email_id;\n this.sending_email_address= responsible_person;\n }\n}\n","import { Component, OnInit, Input } from '@angular/core';\nimport { FormBuilder, FormGroup, Validators, FormControl } from '@angular/forms';\nimport { PaymentLibComponent } from '../../payment-lib.component';\nimport { BulkScaningPaymentService } from '../../services/bulk-scaning-payment/bulk-scaning-payment.service';\nimport { IBSPayments } from '../../interfaces/IBSPayments';\nimport { UnsolicitedPaymentsRequest } from '../../interfaces/UnsolicitedPaymentsRequest';\nimport { PaymentViewService } from '../../services/payment-view/payment-view.service';\nimport { AllocatePaymentRequest } from '../../interfaces/AllocatePaymentRequest';\nimport { ErrorHandlerService } from '../../services/shared/error-handler.service';\n\n\n@Component({\n selector: 'app-mark-unsolicited-payment',\n templateUrl: './mark-unsolicited-payment.component.html',\n styleUrls: ['./mark-unsolicited-payment.component.scss']\n})\nexport class MarkUnsolicitedPaymentComponent implements OnInit {\n @Input() caseType: string;\n markPaymentUnsolicitedForm: FormGroup;\n viewStatus: string;\n reasonHasError: boolean = false;\n isReasonEmpty: boolean = false;\n reasonMinHasError: boolean = false;\n reasonMaxHasError: boolean = false;\n responsibleOfficeHasError: boolean = false;\n isResponsibleOfficeEmpty: boolean = false;\n errorMessage = this.getErrorMessage(false);\n ccdCaseNumber: string;\n bspaymentdcn: string;\n unassignedRecord: IBSPayments;\n siteID: string = null;\n reason: string;\n responsiblePerson: string;\n responsibleOffice: string;\n emailId: string;\n isConfirmButtondisabled: Boolean = false;\n isContinueButtondisabled: Boolean = false;\n ccdReference: string = null;\n exceptionReference: string = null;\n selectedSiteId: string;\n selectedSiteName: string;\n isStrategicFixEnable: boolean = true;\n siteIDList;\n\n constructor(private formBuilder: FormBuilder,\n private paymentViewService: PaymentViewService,\n private paymentLibComponent: PaymentLibComponent,\n private bulkScaningPaymentService: BulkScaningPaymentService) { }\n\n ngOnInit() {\n this.resetForm([false,false,false,false,false,false], 'all');\n this.viewStatus = 'mainForm';\n this.ccdCaseNumber = this.paymentLibComponent.CCD_CASE_NUMBER;\n this.bspaymentdcn = this.paymentLibComponent.bspaymentdcn;\n this.isStrategicFixEnable = this.paymentLibComponent.ISSFENABLE;\n this.getUnassignedPayment();\n\n this.paymentViewService.getSiteID().subscribe(\n siteids => {\n this.isContinueButtondisabled = false;\n this.errorMessage = this.getErrorMessage(false);\n this.siteIDList = JSON.parse(siteids);\n },\n err => {\n window.scrollTo(0, 0);\n this.isContinueButtondisabled = true;\n this.errorMessage = this.getErrorMessage(true);\n }\n );\n \n this.markPaymentUnsolicitedForm = this.formBuilder.group({\n reason: new FormControl('', Validators.compose([\n Validators.required,\n Validators.minLength(3),\n Validators.maxLength(255),\n Validators.pattern('^([a-zA-Z0-9\\\\s,\\\\.]*)$')\n ])),\n responsibleOffice: new FormControl('', Validators.compose([\n Validators.required,\n Validators.pattern('^([a-zA-Z0-9\\\\s\\\\n,\\\\.-:]*)$')\n ])),\n responsiblePerson: new FormControl(''),\n emailId: new FormControl('')\n });\n }\n trimUnderscore(method: string){\n return this.bulkScaningPaymentService.removeUnwantedString(method,' ');\n }\n confirmPayments() {\n this.isConfirmButtondisabled = true;\n const controls = this.markPaymentUnsolicitedForm.controls;\n if(!this.isStrategicFixEnable) {\n let allocatedRequest = {\n allocation_status:'Transferred',\n payment_allocation_status: {\n description: '',\n name: 'Transferred'\n },\n unidentified_reason: controls.reason.value,\n receiving_office: this.selectedSiteId,\n user_id: this.caseType,\n }\n const postStrategicBody = new AllocatePaymentRequest\n (this.ccdReference, this.unassignedRecord, this.caseType, this.exceptionReference, allocatedRequest);\n this.bulkScaningPaymentService.postBSWoPGStrategic(postStrategicBody).subscribe(\n res => {\n this.errorMessage = this.getErrorMessage(false);\n let response = JSON.parse(res);\n if (response.success) {\n this.gotoCasetransationPage();\n }\n },\n (error: any) => {\n this.errorMessage = this.getErrorMessage(true);\n this.isConfirmButtondisabled = false;\n });\n } else {\n // controls.responsibleOffice.setValue('P219');\n this.bulkScaningPaymentService.patchBSChangeStatus(this.unassignedRecord.dcn_reference, 'PROCESSED').subscribe(\n res1 => {\n this.errorMessage = this.getErrorMessage(false);\n const response1 = JSON.parse(res1),\n requestBody = new AllocatePaymentRequest\n (this.ccdReference, this.unassignedRecord, this.siteID, this.exceptionReference)\n this.paymentViewService.postBSPayments(requestBody).subscribe(\n res2 => {\n this.errorMessage = this.getErrorMessage(false);\n const response2 = JSON.parse(res2),\n reqBody = new UnsolicitedPaymentsRequest\n (response2['data'].payment_group_reference, response2['data'].reference, controls.reason.value, this.selectedSiteId, controls.responsiblePerson.value, controls.emailId.value);\n if (response2.success) {\n this.paymentViewService.postBSUnsolicitedPayments(reqBody).subscribe(\n res3 => {\n this.errorMessage = this.getErrorMessage(false);\n const response3 = JSON.parse(res3);\n if (response3.success) {\n this.gotoCasetransationPage();\n }\n },\n (error: any) => {\n this.bulkScaningPaymentService.patchBSChangeStatus(this.unassignedRecord.dcn_reference, 'COMPLETE').subscribe();\n this.errorMessage = this.getErrorMessage(true);\n this.isConfirmButtondisabled = false;\n }\n );\n }\n },\n (error: any) => {\n this.bulkScaningPaymentService.patchBSChangeStatus(this.unassignedRecord.dcn_reference, 'COMPLETE').subscribe();\n this.errorMessage = this.getErrorMessage(true);\n this.isConfirmButtondisabled = false;\n }\n );\n },\n (error: any) => {\n this.errorMessage = this.getErrorMessage(true);\n this.isConfirmButtondisabled = false;\n }\n );\n }\n }\n saveAndContinue() {\n this.resetForm([false,false,false,false,false,false], 'all');\n const formerror = this.markPaymentUnsolicitedForm.controls.reason.errors;\n const reasonField = this.markPaymentUnsolicitedForm.controls.reason;\n //const officeIdField = this.selectedSiteId;\n const officeIdField = this.markPaymentUnsolicitedForm.controls.responsibleOffice;\n if (this.markPaymentUnsolicitedForm.dirty && this.markPaymentUnsolicitedForm.valid) {\n const controls = this.markPaymentUnsolicitedForm.controls;\n this.emailId = controls.emailId.value;\n this.responsibleOffice = officeIdField.value;\n this.responsiblePerson = controls.responsiblePerson.value;\n this.reason = controls.reason.value;\n this.viewStatus = 'unsolicitedContinueConfirm';\n }else {\n if( reasonField.value == '' ) {\n this.resetForm([true,false,false,false,false,false], 'reason');\n }\n if(reasonField.value != '' && this.markPaymentUnsolicitedForm.controls.reason.invalid ) {\n this.resetForm([false,true,false,false,false,false], 'reason');\n }\n if(formerror && formerror.minlength && formerror.minlength.actualLength < 3 ) {\n this.resetForm([false,false,true,false,false,false], 'reason');\n }\n if(formerror && formerror.maxlength && formerror.maxlength.actualLength > 255 ) {\n this.resetForm([false,false,false,true,false,false], 'reason');\n }\n if(officeIdField.value == '') {\n this.resetForm([false,false,false,false,true,false], 'responsibleOffice');\n }\n if(officeIdField.value != '' && officeIdField.invalid) {\n this.resetForm([false,false,false,false,false,true],'responsibleOffice');\n }\n }\n }\n resetForm(val, field) {\n if(field==='reason' || field==='all') {\n this.isReasonEmpty = val[0];\n this.reasonHasError = val[1];\n this.reasonMinHasError = val[2];\n this.reasonMaxHasError = val[3];\n }\n if(field==='responsibleOffice' || field==='all') {\n this.isResponsibleOfficeEmpty = val[4];\n this.responsibleOfficeHasError = val[5];\n }\n }\n\ncancelMarkUnsolicitedPayments(type?:string){\n if(type && type === 'cancel') {\n if(this.checkingFormValue()){\n this.viewStatus = 'unsolicitedCancelConfirm';\n } else {\n this.gotoCasetransationPage();\n }\n } else {\n this.markPaymentUnsolicitedForm.controls.responsibleOffice.setValue('');\n this.viewStatus = 'mainForm';\n }\n }\n checkingFormValue(){\n const formFields = this.markPaymentUnsolicitedForm.value;\n let valueExists = false;\n\n for (var field in formFields) {\n if (formFields.hasOwnProperty(field) && formFields[field] !==\"\") {\n valueExists = true;\n break;\n }\n }\n return valueExists;\n }\n gotoCasetransationPage() {\n this.paymentLibComponent.viewName = 'case-transactions';\n this.paymentLibComponent.TAKEPAYMENT = true;\n this.paymentLibComponent.ISBSENABLE = true;\n }\n getUnassignedPayment() {\n this.bulkScaningPaymentService.getBSPaymentsByDCN(this.bspaymentdcn).subscribe(\n unassignedPayments => {\n \n this.unassignedRecord = unassignedPayments['data'].payments.filter(payment => {\n return payment && payment.dcn_reference == this.bspaymentdcn;\n })[0];\n this.siteID = unassignedPayments['data'].responsible_service_id;\n const beCcdNumber = unassignedPayments['data'].ccd_reference,\n beExceptionNumber = unassignedPayments['data'].exception_record_reference,\n exceptionReference = beCcdNumber ? beCcdNumber === this.ccdCaseNumber ? null : this.ccdCaseNumber : this.ccdCaseNumber;\n this.ccdReference = beCcdNumber ? beCcdNumber : null;\n this.exceptionReference = beExceptionNumber ? beExceptionNumber : exceptionReference;\n },\n (error: any) => {\n this.errorMessage = this.getErrorMessage(true);\n }\n );\n }\n\n getErrorMessage(isErrorExist) {\n return {\n title: \"Something went wrong.\",\n body: \"Please try again later.\",\n showError: isErrorExist\n };\n }\n\n selectchange(args){ \n this.selectedSiteId = args.target.value; \n this.selectedSiteName = args.target.options[args.target.selectedIndex].text; \n } \n\n}\n","import { Component, OnInit, Output,Input, EventEmitter } from '@angular/core';\nimport { BulkScaningPaymentService } from '../../services/bulk-scaning-payment/bulk-scaning-payment.service';\nimport { PaymentLibComponent } from '../../payment-lib.component';\nimport { IBSPayments } from '../../interfaces/IBSPayments';\nimport {Router} from '@angular/router';\nimport { PaymentViewService } from '../../services/payment-view/payment-view.service';\nimport { OrderslistService } from '../../services/orderslist.service';\n\n@Component({\n selector: 'ccpay-app-unprocessed-payments',\n templateUrl: './unprocessed-payments.component.html',\n styleUrls: ['./unprocessed-payments.component.scss']\n})\nexport class UnprocessedPaymentsComponent implements OnInit {\n\n @Input('FEE_RECORDS_EXISTS') FEE_RECORDS_EXISTS: boolean;\n @Input('PAYMENTREF') PAYMENTREF: string;\n @Input('ISTURNOFF') ISTURNOFF: boolean;\n @Input('IS_BUTTON_ENABLE') IS_BUTTON_ENABLE: boolean;\n @Input('IS_OS_AMT_AVAILABLE') IS_OS_AMT_AVAILABLE: boolean;\n @Input('ISSFENABLE') ISSFENABLE: boolean;\n @Input('PAYMENTSLENGTH') PAYMENTSLENGTH:Number;\n @Input('LEVEL')LEVEL:Number;\n\n @Output() selectedUnprocessedFeeEvent: EventEmitter<string> = new EventEmitter();\n @Output() getUnprocessedFeeCount: EventEmitter<string> = new EventEmitter();\n\n viewStatus = 'main';\n unassignedRecordList: IBSPayments;\n upPaymentErrorMessage: string = null;\n ccdCaseNumber: string;\n recordId: string = null;\n isRecordExist: boolean = false;\n dcnNumber: string = null;\n selectedOption: string;\n isUnprocessedRecordSelected: boolean = true;\n isAllocateToExistingFeebtnEnabled: boolean = false;\n isMarkAsUnidentifiedbtnEnabled: boolean = false;\n isAllocatedToNewFeebtnEnabled: boolean = false;\n isExceptionCase: boolean = false;\n serviceId: string = null;\n isBulkScanEnable;\n isTurnOff: boolean = true;\n isStFixEnable;\n unassignedRecordSelectedList: IBSPayments;\n unassignedRecordListLength: number = 0;\n showContent: boolean;\n\n constructor(private router: Router,\n private bulkScaningPaymentService: BulkScaningPaymentService,\n private paymentLibComponent: PaymentLibComponent,\n private paymentViewService: PaymentViewService,\n private OrderslistService: OrderslistService\n ) { }\n\n ngOnInit() {\n // Todo ...\n this.ccdCaseNumber = this.paymentLibComponent.CCD_CASE_NUMBER;\n this.selectedOption = this.paymentLibComponent.SELECTED_OPTION.toLocaleLowerCase();\n this.dcnNumber = this.paymentLibComponent.DCN_NUMBER;\n this.isBulkScanEnable = this.paymentLibComponent.ISBSENABLE;\n this.isTurnOff = this.paymentLibComponent.ISTURNOFF;\n this.isStFixEnable = this.paymentLibComponent.ISSFENABLE;\n this.OrderslistService.getFeeExists().subscribe( (data) => this.FEE_RECORDS_EXISTS = data);\n this.getUnassignedPaymentlist();\n\n }\n\n getUnassignedPaymentlist() {\n if (this.selectedOption === 'dcn') {\n this.bulkScaningPaymentService.getBSPaymentsByDCN(this.dcnNumber).subscribe(\n unassignedPayments => {\n // unassignedPayments['data'].map(data => data.expandable=false);\n if(unassignedPayments['data'] && unassignedPayments['data'].payments) {\n this.setValuesForUnassignedRecord(unassignedPayments['data']);\n } else if(unassignedPayments['payments']) {\n this.setValuesForUnassignedRecord(unassignedPayments);\n } else {\n this.upPaymentErrorMessage = 'error';\n this.getUnprocessedFeeCount.emit('0');\n }\n },\n (error: any) => {\n this.upPaymentErrorMessage = error;\n this.getUnprocessedFeeCount.emit('0');\n }\n );\n } else {\n this.bulkScaningPaymentService.getBSPaymentsByCCD(this.ccdCaseNumber).subscribe(\n unassignedPayments => {\n // unassignedPayments['data'].map(data => data.expandable=false);\n if(unassignedPayments['data'] && unassignedPayments['data'].payments) {\n this.setValuesForUnassignedRecord(unassignedPayments['data']);\n } else if(unassignedPayments['payments']) {\n this.setValuesForUnassignedRecord(unassignedPayments);\n } else {\n this.upPaymentErrorMessage = 'error';\n this.getUnprocessedFeeCount.emit('0');\n }\n },\n (error: any) => {\n this.upPaymentErrorMessage = error;\n this.getUnprocessedFeeCount.emit('0');\n }\n );\n }\n\n }\n\n setValuesForUnassignedRecord(unassignedPayments) {\n\n this.unassignedRecordList = unassignedPayments.payments;\n if(this.unassignedRecordList){\n this.unassignedRecordListLength = unassignedPayments.payments.length\n }\n this.serviceId = unassignedPayments.responsible_service_id;\n if (unassignedPayments['ccd_reference'] === undefined) {\n this.isExceptionCase = true;\n }\n // this.isRecordExist = this.unassignedRecordList.length === 0;\n this.getUnprocessedFeeCount.emit(<any>this.unassignedRecordList.length);\n this.unprocessedPaymentSelectEvent(this.unassignedRecordList);\n }\n\n formatUnassignedRecordId(ID: Number) {\n return `unassignrecord-${ID}`;\n }\n\n trimUnderscore(method: string){\n return this.bulkScaningPaymentService.removeUnwantedString(method,' ');\n }\n\n redirectToFeeSearchPage(event: any, dcn_reference:any) {\n event.preventDefault();\n this.recordId = dcn_reference;\n let url = this.isBulkScanEnable ? '&isBulkScanning=Enable' : '&isBulkScanning=Disable';\n url += this.ISTURNOFF ? '&isTurnOff=Enable' : '&isTurnOff=Disable';\n url += this.isStFixEnable ? '&isStFixEnable=Enable' : '&isStFixEnable=Disable';\n url +=`&caseType=${this.paymentLibComponent.CASETYPE}`;\n\n this.router.navigateByUrl(`/fee-search?selectedOption=${this.selectedOption}&ccdCaseNumber=${this.ccdCaseNumber}&dcn=${this.recordId}${url}`);\n }\n\n loadUnsolicitedPage(viewName: string, dcn_reference:any) {\n this.recordId = dcn_reference;\n this.paymentLibComponent.bspaymentdcn = this.recordId;\n this.paymentLibComponent.viewName = viewName;\n }\n\n unprocessedPaymentSelectEvent(selectedRecordReference: any) {\n this.isUnprocessedRecordSelected = true;\n this.validateButtons();\n this.selectedUnprocessedFeeEvent.emit(selectedRecordReference);\n }\n\n resetButtons() {\n this.isUnprocessedRecordSelected = false;\n this.isAllocateToExistingFeebtnEnabled = false;\n this.isMarkAsUnidentifiedbtnEnabled = false;\n this.isAllocatedToNewFeebtnEnabled = false;\n }\n\n goToAllocatePage(dcn_reference:any) {\n this.paymentLibComponent.bspaymentdcn = dcn_reference;\n this.paymentLibComponent.unProcessedPaymentServiceId = this.serviceId\n this.paymentLibComponent.isTurnOff = this.ISTURNOFF;\n this.paymentLibComponent.ISSFENABLE = this.isStFixEnable;\n\n if(this.ISTURNOFF) {\n this.paymentLibComponent.paymentGroupReference = this.PAYMENTREF;\n this.paymentLibComponent.viewName = 'fee-summary';\n }else {\n this.paymentLibComponent.paymentGroupReference = null;\n this.paymentLibComponent.viewName = 'allocate-payments';\n }\n\n }\n\n validateButtons() {\n if ( this.isUnprocessedRecordSelected && this.isExceptionCase) {\n this.isMarkAsUnidentifiedbtnEnabled = true;\n } else if ( this.isUnprocessedRecordSelected && !this.isExceptionCase && !this.FEE_RECORDS_EXISTS) {\n this.isAllocateToExistingFeebtnEnabled = false;\n this.isAllocatedToNewFeebtnEnabled = true;\n } else if( this.isUnprocessedRecordSelected && !this.isExceptionCase && this.FEE_RECORDS_EXISTS ) {\n if(!this.ISTURNOFF) {\n this.isAllocateToExistingFeebtnEnabled = true;\n this.isAllocatedToNewFeebtnEnabled = false;\n } else {\n this.isAllocateToExistingFeebtnEnabled = this.IS_OS_AMT_AVAILABLE;\n this.isAllocatedToNewFeebtnEnabled = true;\n }\n }\n }\n\n unprocessedPaymentUnSelectEvent(event: any) {\n event.preventDefault();\n this.recordId = null;\n this.isUnprocessedRecordSelected = false;\n this.isAllocateToExistingFeebtnEnabled = false;\n this.isAllocatedToNewFeebtnEnabled = false;\n this.isMarkAsUnidentifiedbtnEnabled = false;\n //this.validateButtons();\n this.selectedUnprocessedFeeEvent.emit('');\n }\n\n showDetailRow(event: any,obj: any, i: any) {\n event.preventDefault();\n\n this.unassignedRecordSelectedList = obj;\n\n }\n}\n","import { Component, OnInit, Input, Output, EventEmitter } from '@angular/core';\nimport { BulkScaningPaymentService } from '../../services/bulk-scaning-payment/bulk-scaning-payment.service';\nimport {IPayment} from '../../interfaces/IPayment';\nimport {Router} from '@angular/router';\n\n@Component({\n selector: 'ccpay-app-processed-payments',\n templateUrl: './processed-payments.component.html',\n styleUrls: ['./processed-payments.component.scss']\n})\nexport class ProcessedPaymentsComponent implements OnInit {\n\n @Input('NONPAYMENTS') NONPAYMENTS: IPayment[];\n @Output() goToPaymentViewComponent: EventEmitter<any> = new EventEmitter();\n\n constructor(\n private router: Router,\n private bulkScaningPaymentService: BulkScaningPaymentService\n ) { }\n ngOnInit() {\n }\n\n trimUnderscore(method: string){\n return this.bulkScaningPaymentService.removeUnwantedString(method,' ');\n }\n redirectToPaymentViewPage(paymentGroupReference: string, paymentReference: string, paymentMethod: string) {\n this.goToPaymentViewComponent.emit({paymentGroupReference, paymentReference, paymentMethod});\n }\n}\n","\nexport class IAllocationPaymentsRequest {\n payment_allocation_status: any;\n payment_group_reference: string;\n payment_reference: string;\n reason: string;\n explanation: string;\n user_name: string;\n constructor(payment_group_reference: string, payment_reference : string, reason? : string, explanation? : string, userName? : string) {\n this.payment_allocation_status = {\n description: '',\n name: \"Allocated\"\n };\n this.payment_group_reference = payment_group_reference;\n this.payment_reference= payment_reference;\n this.reason = reason ? reason : null;\n this.explanation = explanation ? explanation : null;\n this.user_name = userName ? userName : null;\n }\n}\n","import { Component, OnInit, Input } from '@angular/core';\nimport { FormBuilder, FormGroup, Validators, FormControl } from '@angular/forms';\nimport { PaymentLibComponent } from '../../payment-lib.component';\nimport { PaymentViewService } from '../../services/payment-view/payment-view.service';\nimport {CaseTransactionsService} from '../../services/case-transactions/case-transactions.service'; \nimport {BulkScaningPaymentService} from '../../services/bulk-scaning-payment/bulk-scaning-payment.service';\nimport { ErrorHandlerService } from '../../services/shared/error-handler.service';\nimport {IPaymentGroup} from '../../interfaces/IPaymentGroup';\nimport {IBSPayments} from '../../interfaces/IBSPayments';\nimport {AllocatePaymentRequest} from '../../interfaces/AllocatePaymentRequest';\nimport {IAllocationPaymentsRequest} from '../../interfaces/IAllocationPaymentsRequest';\nimport { IOrderReferenceFee } from '../../interfaces/IOrderReferenceFee';\nimport { OrderslistService } from '../../services/orderslist.service';\n\n\n\n@Component({\n selector: 'app-allocate-payments',\n templateUrl: './allocate-payments.component.html',\n styleUrls: ['./allocate-payments.component.scss']\n})\nexport class AllocatePaymentsComponent implements OnInit {\n @Input() isTurnOff: boolean;\n @Input() caseType: string;\n\n overUnderPaymentForm: FormGroup;\n viewStatus: string;\n ccdCaseNumber: string;\n bspaymentdcn: string;\n recordId:string;\n feedbackUrlLabel:string;\n unAllocatedPayment: IBSPayments = {\n amount: 0\n };\n siteID: string = null;\n errorMessage = this.errorHandlerService.getServerErrorMessage(false, false, '');\n paymentGroup: IPaymentGroup;\n paymentGroups: IPaymentGroup[] = [];\t\n remainingAmount: number;\n isRemainingAmountGtZero: boolean;\n isMoreDetailsBoxHide: boolean = true;\n isRemainingAmountLtZero: boolean;\n afterFeeAllocateOutstanding: number;\n amountForAllocation: number;\n isConfirmButtondisabled: boolean = false;\n isContinueButtondisabled: boolean = true;\n otherPaymentExplanation: string = null;\n selectedOption: string = null;\n isFeeAmountZero: boolean = false;\t\n\n paymentReasonHasError: boolean = false;\n paymentExplanationHasError: boolean = false;\n isPaymentDetailsEmpty: boolean = false;\n isPaymentDetailsInvalid: boolean = false;\n paymentDetailsMinHasError: boolean = false;\n paymentDetailsMaxHasError: boolean = false;\n isUserNameEmpty: boolean = false;\n isUserNameInvalid: boolean = false;\n ccdReference: string = null;\n exceptionReference: string = null;\n paymentReason: string = null;\n paymentExplanation: string = null;\n userName: string = null;\n paymentSectionLabel: any;\n paymentRef: string = null;\n isStrategicFixEnable: boolean = true;\n orderLevelFees: IOrderReferenceFee[] = [];\n cookieUserName: string[] = [];\n enCookieUserName: any;\n userNameField: string = null;\n\n reasonList: { [key: string]: { [key: string]: string } }= {\n overPayment: {\n hwfReward: 'Help with Fees (HWF) awarded. Please include the HWF reference number in the explanatory note',\n wrongFee: 'Incorrect payment received',\n notIssueCase: 'Unable to issue case',\n otherDeduction: 'Other'\n },\n shortFall: {\n helpWithFee: 'Help with Fees (HWF) application declined',\n wrongFee: 'Incorrect payment received',\n other: 'Other'\n }\n }\n explanationList = {\n overPayment: {\n referRefund: 'Details in case notes. Refund due',\n noRefund: 'Details in case notes. No refund due',\n noCase: 'No case created. Refund due',\n other: 'Other'\n },\n shortFall: {\n holdCase: 'I have put a stop on the case and contacted the applicant requesting the balance of payment',\n heldCase: 'I have put a stop on the case. The applicant needs to be contacted to request the balance of payment',\n other: 'Other'\n }\n }\n\n refund = {\n reason: {\n duplicate: 'Duplicate payment',\n humanerror: 'Human error',\n caseWithdrawn: 'Case withdrawn',\n other: 'Other'\n }\n }\n\n\n constructor(\n private errorHandlerService: ErrorHandlerService,\n private caseTransactionsService: CaseTransactionsService,\n private formBuilder: FormBuilder,\n private paymentViewService: PaymentViewService,\n private paymentLibComponent: PaymentLibComponent,\n private bulkScaningPaymentService: BulkScaningPaymentService,\n private OrderslistService: OrderslistService) { }\n\n ngOnInit() {\n this.viewStatus = 'mainForm';\n if (this.paymentLibComponent.paymentGroupReference !== null) {\n this.viewStatus = 'allocatePaymentConfirmation';\n }\n \n this.ccdCaseNumber = this.paymentLibComponent.CCD_CASE_NUMBER;\n this.bspaymentdcn = this.paymentLibComponent.bspaymentdcn;\n this.paymentRef = this.paymentLibComponent.paymentGroupReference;\n this.selectedOption = this.paymentLibComponent.SELECTED_OPTION;\n this.isStrategicFixEnable = this.paymentLibComponent.ISSFENABLE;\n this.isTurnOff = this.paymentLibComponent.isTurnOff;\n this.overUnderPaymentForm = this.formBuilder.group({\n moreDetails: new FormControl('', Validators.compose([\n Validators.required,\n Validators.minLength(3),\n Validators.maxLength(255),\n Validators.pattern('^([a-zA-Z0-9\\\\s,\\\\.]*)$')\n ])),\n userName: new FormControl('', Validators.compose([\n Validators.required,\n Validators.pattern('^([a-zA-Z0-9\\\\s]*)$')\n ])),\n });\n this.OrderslistService.getOrdersList().subscribe( (data) =>\n this.orderLevelFees = data.filter(data => data.orderStatus !== 'Paid'));\n this.OrderslistService.getCaseType().subscribe( (data) => this.caseType = data);\n this.getUnassignedPayment();\n }\n getGroupOutstandingAmount(paymentGroup: IPaymentGroup): number {\n return this.bulkScaningPaymentService.calculateOutStandingAmount(paymentGroup);\n }\n\n getPaymentGroupDetails(){\n\n if(!this.isTurnOff){\n this.paymentViewService.getPaymentGroupDetails(this.paymentRef).subscribe(\n paymentGroup => {\n this.errorMessage = this.errorHandlerService.getServerErrorMessage(false, false, '');\n this.paymentGroup = paymentGroup;\n this.saveAndContinue();\n },\n (error: any) => {\n this.errorMessage = this.errorHandlerService.getServerErrorMessage(true, false, '');\n }\n );\n }else {\n this.caseTransactionsService.getPaymentGroups(this.ccdCaseNumber).subscribe(\n paymentGroups => {\n this.errorMessage = this.errorHandlerService.getServerErrorMessage(false, false, '');\n this.paymentGroups = paymentGroups['payment_groups'].filter(paymentGroup => {\n paymentGroup.fees.forEach(fee => {\n if(fee.calculated_amount === 0) {\n this.isFeeAmountZero = true\n }\n });\n let fstCon = this.getGroupOutstandingAmount(<IPaymentGroup>paymentGroup),\n scndCn = fstCon > 0 || (fstCon == 0 && this.isFeeAmountZero) && paymentGroup.payment_group_reference === this.paymentRef;\n return this.paymentRef ? scndCn : fstCon > 0 || (fstCon == 0 && this.isFeeAmountZero);\n });\n },\n (error: any) => {\n this.errorMessage = this.errorHandlerService.getServerErrorMessage(true, false, '');\n }\n );\n }\n\n }\n\n selectedPaymentGroup(paymentGroup: IPaymentGroup) {\t\n this.isContinueButtondisabled = false;\t\n this.paymentGroup = paymentGroup;\t\n }\t\n\n gotoCasetransationPage() {\n this.paymentLibComponent.viewName = 'case-transactions';\n this.paymentLibComponent.isTurnOff = this.isTurnOff;\n this.paymentLibComponent.TAKEPAYMENT = true;\n this.paymentLibComponent.ISBSENABLE = true;\n }\n\n gotoSummaryPage(event: any) { \n event.preventDefault();\n this.paymentLibComponent.viewName = 'fee-summary';\n this.paymentLibComponent.isTurnOff = this.isTurnOff;\n this.paymentLibComponent.TAKEPAYMENT = true;\n this.paymentLibComponent.ISBSENABLE = true;\n }\n\n cancelAllocatePayment(event: any){\n event.preventDefault();\n this.resetForm([false, false, false, false, false, false, false, false], 'all');\n if(!this.isTurnOff){\n this.paymentLibComponent.viewName = 'fee-summary';\n this.paymentLibComponent.isTurnOff = this.isTurnOff;\n this.paymentLibComponent.TAKEPAYMENT = true;\n this.paymentLibComponent.ISBSENABLE = true;\n } else {\n this.viewStatus = 'mainForm';\t\n }\n }\n confirmAllocatePayement(){\n this.enCookieUserName = document.cookie.split(\";\").find(row => row.includes(\"user-info\")).split(\"=\")[1].split(\";\");\n this.cookieUserName = JSON.parse(decodeURIComponent(this.enCookieUserName));\n \n const fullName = this.cookieUserName['forename'] + ' ' + this.cookieUserName['surname'];\n\n const paymentDetailsField = this.overUnderPaymentForm.controls.moreDetails,\n paymentFormError = this.overUnderPaymentForm.controls.moreDetails.errors,\n userNameField = fullName,\n isEmptyCondtion = this.paymentReason && this.paymentExplanation,\n isOtherOptionSelected = this.paymentExplanation === 'Other';\n\n this.resetForm([false, false, false, false, false, false, false, false], 'all');\n if ( (!this.isRemainingAmountGtZero && !this.isRemainingAmountLtZero) || isEmptyCondtion && (!isOtherOptionSelected && userNameField.length > 0 || isOtherOptionSelected && userNameField.length > 0 && paymentDetailsField.valid)) {\n this.isConfirmButtondisabled = true;\n this.otherPaymentExplanation = this.paymentExplanation === 'Other' ? paymentDetailsField.value : this.paymentExplanation;\n this.userName = userNameField;\n this.finalServiceCall();\n }else {\n if(!this.paymentReason) {\n this.resetForm([true, false, false, false, false, false, false, false], 'reason');\n }\n if(!this.paymentExplanation) {\n this.resetForm([false, true, false, false, false, false, false, false], 'explanation');\n }\n if(this.paymentExplanation && isOtherOptionSelected) {\n if(paymentDetailsField.value == '' ) {\n this.resetForm([false, false, true, false, false, false, false, false], 'other');\n }\n if(paymentDetailsField.value != '' && paymentDetailsField.invalid ) {\n this.resetForm([false, false, false, true, false, false, false, false], 'other');\n }\n if(paymentFormError && paymentFormError.minlength && paymentFormError.minlength.actualLength < 3 ) {\n this.resetForm([false, false, false, false, true, false, false, false], 'other');\n }\n if(paymentFormError && paymentFormError.maxlength && paymentFormError.maxlength.actualLength > 255 ) {\n this.resetForm([false, false, false, false, false, true, false, false], 'other');\n }\n }\n if(userNameField.length === 0) {\n this.resetForm([false, false, false, false, false, false, true, false], 'username');\n }\n }\n }\n resetForm(vals, field) {\n if(field==='reason' || field==='all') {\n this.paymentReasonHasError = vals[0];\n }\n if(field==='explanation' || field==='all') {\n this.paymentExplanationHasError = vals[1];\n }\n if(field==='other' || field==='all') {\n this.isPaymentDetailsEmpty = vals[2];\n this.isPaymentDetailsInvalid = vals[3];\n this.paymentDetailsMinHasError = vals[4];\n this.paymentDetailsMaxHasError = vals[5];\n }\n if(field==='username' || field==='all') {\n this.isUserNameEmpty = vals[6];\n this.isUserNameInvalid = vals[7];\n }\n }\n finalServiceCall() {\n if(!this.isStrategicFixEnable) {\n let allocatedRequest = {\n reason: this.paymentReason,\n allocation_status:'Allocated',\n explanation: this.otherPaymentExplanation,\n payment_allocation_status: {\n description: '',\n name: 'Allocated'\n },\n payment_group_reference: this.paymentGroup.payment_group_reference,\n case_type: this.caseType,\n user_name: this.userName\n }\n const postStrategicBody = new AllocatePaymentRequest\n (this.ccdReference, this.unAllocatedPayment, this.caseType, this.exceptionReference, allocatedRequest);\n this.bulkScaningPaymentService.postBSPaymentStrategic(postStrategicBody , this.paymentGroup.payment_group_reference).subscribe(\n res => {\n this.errorMessage = this.errorHandlerService.getServerErrorMessage(false, false, '');\n let response = JSON.parse(res);\n if (response.success) {\n this.gotoCasetransationPage();\n }\n },\n (error: any) => {\n this.errorMessage = this.errorHandlerService.getServerErrorMessage(true, false, '');\n window.scrollTo(0, 0);\n this.isConfirmButtondisabled = false;\n });\n\n } else {\n this.bulkScaningPaymentService.patchBSChangeStatus(this.unAllocatedPayment.dcn_reference, 'PROCESSED').subscribe(\n res1 => {\n this.errorMessage = this.errorHandlerService.getServerErrorMessage(false, false, '');\n let response1 = JSON.parse(res1);\n if (response1.success) {\n const requestBody = new AllocatePaymentRequest\n (this.ccdReference, this.unAllocatedPayment, this.siteID, this.exceptionReference);\n this.bulkScaningPaymentService.postBSAllocatePayment(requestBody, this.paymentGroup.payment_group_reference).subscribe(\n res2 => {\n this.errorMessage = this.errorHandlerService.getServerErrorMessage(false, false, '');\n let response2 = JSON.parse(res2);\n const reqBody = new IAllocationPaymentsRequest\n (response2['data'].payment_group_reference, response2['data'].reference, this.paymentReason, this.otherPaymentExplanation, this.userName);\n if (response2.success) {\n this.paymentViewService.postBSAllocationPayments(reqBody).subscribe(\n \n res3 => {\n this.errorMessage = this.errorHandlerService.getServerErrorMessage(false, false, '');\n let response3 = JSON.parse(res3);\n if (response3.success) {\n this.gotoCasetransationPage();\n }\n },\n (error: any) => {\n this.bulkScaningPaymentService.patchBSChangeStatus(this.unAllocatedPayment.dcn_reference, 'COMPLETE').subscribe();\n this.errorMessage = this.errorHandlerService.getServerErrorMessage(true, false, '');\n window.scrollTo(0, 0);\n this.isConfirmButtondisabled = false;\n }\n );\n }\n },\n (error: any) => {\n this.bulkScaningPaymentService.patchBSChangeStatus(this.unAllocatedPayment.dcn_reference, 'COMPLETE').subscribe();\n this.errorMessage = this.errorHandlerService.getServerErrorMessage(true, false, '');\n window.scrollTo(0, 0);\n this.isConfirmButtondisabled = false;\n }\n );\n }\n },\n (error: any) => {\n this.errorMessage = this.errorHandlerService.getServerErrorMessage(true, false, '');\n window.scrollTo(0, 0);\n this.isConfirmButtondisabled = false;\n }\n ); \n }\n }\n\n saveAndContinue(){\n if(this.paymentGroup) {\n this.isMoreDetailsBoxHide = true;\n this.overUnderPaymentForm.get('moreDetails').reset();\n this.overUnderPaymentForm.get('moreDetails').setValue('');\n this.overUnderPaymentForm.get('userName').reset();\n this.overUnderPaymentForm.get('userName').setValue('');\n this.paymentReason = '';\n this.paymentExplanation = '';\n let GroupOutstandingAmount = this.getGroupOutstandingAmount(this.paymentGroup);\n const remainingToBeAssigned = this.unAllocatedPayment.amount - GroupOutstandingAmount;\n this.isRemainingAmountGtZero = remainingToBeAssigned > 0;\n this.isRemainingAmountLtZero = remainingToBeAssigned < 0;\n this.paymentSectionLabel = this.isRemainingAmountGtZero ? { \n title: 'There is an Over payment of',\n reason: 'Provide a reason. This will be used in the Refund process.',\n }: this.isRemainingAmountLtZero ? { \n title: 'There is an Under payment of',\n reason: 'Provide a reason',\n }: { \n title:'Amount left to be allocated',\n reason:'',\n };\n this.feedbackUrlLabel = this.isRemainingAmountGtZero ? 'CONFIRMALLOCATION_SURPLUS' : this.isRemainingAmountLtZero ? 'CONFIRMALLOCATION_SHORTFALL' : 'CONFIRMALLOCATION';\n this.remainingAmount = this.isRemainingAmountGtZero ? remainingToBeAssigned : this.isRemainingAmountLtZero ? remainingToBeAssigned * -1 : 0;\n this.afterFeeAllocateOutstanding = remainingToBeAssigned >= 0 ? 0 : (remainingToBeAssigned * -1);\n this.amountForAllocation = GroupOutstandingAmount >= this.unAllocatedPayment.amount ? this.unAllocatedPayment.amount : GroupOutstandingAmount;\n if(this.isTurnOff){\n this.viewStatus = 'allocatePaymentConfirmation';\t\n }\n }\n }\n getUnassignedPayment() {\n this.bulkScaningPaymentService.getBSPaymentsByDCN(this.bspaymentdcn).subscribe(\n unassignedPayments => {\n this.errorMessage = this.errorHandlerService.getServerErrorMessage(false, false, '');\n this.unAllocatedPayment = unassignedPayments['data'].payments.filter(payment => {\n return payment && payment.dcn_reference == this.bspaymentdcn;\n })[0];\n this.siteID = unassignedPayments['data'].responsible_service_id;\n const beCcdNumber = unassignedPayments['data'].ccd_reference,\n beExceptionNumber = unassignedPayments['data'].exception_record_reference,\n exceptionReference = beCcdNumber ? beCcdNumber === this.ccdCaseNumber ? null : this.ccdCaseNumber : this.ccdCaseNumber;\n this.ccdReference = beCcdNumber ? beCcdNumber : null;\n this.exceptionReference = beExceptionNumber ? beExceptionNumber : exceptionReference;\n this.getPaymentGroupDetails();\n },\n (error: any) => {\n this.errorMessage = this.errorHandlerService.getServerErrorMessage(true, false, '');\n }\n );\n }\n selectRadioButton(key, type) {\n this.isMoreDetailsBoxHide = true;\n if( type === 'explanation' && key === 'other' ){\n this.isPaymentDetailsEmpty = false;\n this.isPaymentDetailsInvalid = false;\n this.paymentDetailsMinHasError = false;\n this.paymentDetailsMaxHasError = false;\n this.isMoreDetailsBoxHide = false;\n }\n }\n OrderListSelectEvent(orderef: any){\n this.isContinueButtondisabled = false;\n this.recordId= orderef;\n }\n\n redirectToOrderFeeSearchPage() {\n // this.paymentLibComponent.bspaymentdcn = null;\n this.paymentLibComponent.paymentGroupReference = this.recordId;\n this.paymentLibComponent.isTurnOff = this.isTurnOff;\n this.paymentLibComponent.viewName = 'fee-summary';\n}\n}\n","import { IFee } from './IFee';\n\nexport class AddRemissionRequest {\n beneficiary_name: string;\n ccd_case_number: string;\n fee: IFee;\n hwf_amount: number;\n hwf_reference: string;\n payment_group_reference: string;\n case_type: string;\n\n constructor(ccd_case_number: string, fee: IFee, hwf_amount: number, hwf_reference: string, caseType: string) {\n this.ccd_case_number = ccd_case_number;\n this.fee = fee;\n this.hwf_amount = hwf_amount;\n this.hwf_reference = hwf_reference;\n this.case_type = caseType;\n }\n}\n","export class AddRetroRemissionRequest {\n hwf_amount: number;\n hwf_reference: string;\n\n constructor(hwf_amount: number, hwf_reference: string) {\n this.hwf_amount = hwf_amount;\n this.hwf_reference = hwf_reference;\n }\n}\n","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 { 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 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 \n component: { account_number: string; amount: number; case_reference: string; ccd_case_number: string; channel: string; currency: string; customer_reference: string; date_created: string; date_updated: string; description: string; method: string; organisation_name: string; payment_allocation: any[]; reference: string; service_name: string; site_id: string; status: string; };\n\n constructor(private formBuilder: FormBuilder,\n private router: Router,\n private paymentViewService: PaymentViewService,\n private paymentLibComponent: PaymentLibComponent,\n private refundService: RefundsService,\n private cd: ChangeDetectorRef,\n private OrderslistService: OrderslistService) { }\n\n ngOnInit() {\n this.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.paymentLibComponent.iscancelClicked = true;\n this.refundListAmount.emit();\n this.paymentLibComponent.isFromRefundStatusPage = true;\n return;\n }\n if ( this.isFromRefundListPage ) {\n this.paymentLibComponent.iscancelClicked = true;\n this.refundListReason.emit({reason: this.selectedRefundReason, code: this.refundReason});\n this.paymentLibComponent.isFromRefundStatusPage = true;\n return;\n }\n this.viewStatus = '';\n this.selectedValue = 'yes';\n this.viewCompStatus = \"addremission\";\n this.isRefundRemission = true;\n this.errorMessage = '';\n 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 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 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 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\", key);\n const remissionctrls=this.remissionForm.controls;\n remissionctrls['refundDDReason'].setValue('Select a different reason', {onlySelf: true});\n remissionctrls['reason'].reset();\n this.isRefundReasonsSelected = true;\n this.errorMessage = false;\n this.errorMsg = [];\n this.isReasonEmpty = false;\n this.showReasonText = false;\n this.refundHasError = false;\n this.selectedRefundReason = key;\n if(this.selectedRefundReason.includes('Other')) {\n this.showReasonText = true;\n this.refundHasError = false;\n this.refundReason = key;\n }\n }\n\n selectchange(args) {\n const remissionctrls=this.remissionForm.controls;\n remissionctrls['refundReason'].reset();\n remissionctrls['reason'].reset();\n this.isRefundReasonsSelected = false;\n this.showReasonText = false;\n this.refundHasError = false;\n this.selectedRefundReason = args.target.options[args.target.options.selectedIndex].id;\n this.reasonLength = (29-this.selectedRefundReason.split('- ')[1].length);\n\n if(this.selectedRefundReason.includes('Other')) {\n this.showReasonText = true;\n this.refundHasError = false;\n this.refundReason = args.target.options[args.target.options.selectedIndex].id;\n }\n\n\n }\n getContactDetails(obj:IRefundContactDetails, type) {\n this.contactDetailsObj = obj;\n this.viewCompStatus = '';\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 = this.remissionForm.value.feesList.reduce((a, c) => a + c.refund_amount * c.selected, 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 this.OrderslistService.setnavigationPage('casetransactions');\n this.OrderslistService.setisFromServiceRequestPage(false);\n this.paymentLibComponent.VIEW ='case-transactions';\n this.paymentLibComponent.viewName = 'case-transactions';\n this.paymentLibComponent.ISBSENABLE = true;\n this.paymentLibComponent.isRefundStatusView = false;\n this.resetOrderData(); let partUrl = this.bsPaymentDcnNumber ? `&dcn=${this.bsPaymentDcnNumber}` : '';\n partUrl += this.paymentLibComponent.ISBSENABLE ? '&isBulkScanning=Enable' : '&isBulkScanning=Disable';\n partUrl += this.paymentLibComponent.ISTURNOFF ? '&isTurnOff=Enable' : '&isTurnOff=Disable';\n partUrl += this.isStrategicFixEnable ? '&isStFixEnable=Enable' : '&isStFixEnable=Disable';\n partUrl += `&caseType=${this.caseType}`;\n const url = `/payment-history/${this.ccdCaseNumber}?view=case-transactions&takePayment=${this.paymentLibComponent.TAKEPAYMENT}&selectedOption=${this.option}${partUrl}`;\n this.router.routeReuseStrategy.shouldReuseRoute = () => false;\n this.router.onSameUrlNavigation = 'reload';\n this.router.navigateByUrl(url);\n } else { \n\n if (this.paymentLibComponent.REFUNDLIST) {\n this.paymentLibComponent.viewName = 'refund-list';\n return;\n }\n if (this.paymentLibComponent.TAKEPAYMENT === undefined && this.paymentLibComponent.SERVICEREQUEST === undefined) {\n this.paymentLibComponent.SERVICEREQUEST = 'false';\n }\n this.OrderslistService.setisFromServiceRequestPage(false);\n this.OrderslistService.setpaymentPageView({method: '',payment_group_reference: '', reference:''});\n this.OrderslistService.setnavigationPage('casetransactions');\n this.errorMessage = '';\n this.paymentLibComponent.viewName = 'case-transactions';\n this.paymentLibComponent.ISTURNOFF = this.isTurnOff;\n this.paymentLibComponent.isFromServiceRequestPage = true;\n this.paymentLibComponent.ISBSENABLE = true;\n let partUrl = this.bsPaymentDcnNumber ? `&dcn=${this.bsPaymentDcnNumber}` : '';\n partUrl += this.paymentLibComponent.ISBSENABLE ? '&isBulkScanning=Enable' : '&isBulkScanning=Disable';\n partUrl += this.paymentLibComponent.ISTURNOFF ? '&isTurnOff=Enable' : '&isTurnOff=Disable';\n partUrl += this.isStrategicFixEnable ? '&isStFixEnable=Enable' : '&isStFixEnable=Disable';\n partUrl += `&caseType=${this.caseType}`;\n if(this.isFromPaymentDetailPage) {\n partUrl += this.paymentLibComponent.isFromPaymentDetailPage\n }\n\n if(!this.paymentLibComponent.SERVICEREQUEST) {\n const url = `/payment-history/${this.ccdCaseNumber}?view=case-transactions&takePayment=${this.paymentLibComponent.TAKEPAYMENT}&selectedOption=${this.option}${partUrl}`;\n this.router.routeReuseStrategy.shouldReuseRoute = () => false;\n this.router.onSameUrlNavigation = 'reload';\n this.router.navigateByUrl(url);\n } else {\n const url =`/payment-history/${this.ccdCaseNumber}?selectedOption=${this.option}${partUrl}`;\n this.router.routeReuseStrategy.shouldReuseRoute = () => false;\n this.router.onSameUrlNavigation = 'reload';\n this.router.navigateByUrl(url);\n }\n }\n\n }\n\n resetOrderData() {\n this.OrderslistService.setOrderRef(null);\n this.OrderslistService.setorderCCDEvent(null);\n this.OrderslistService.setorderCreated(null);\n this.OrderslistService.setorderDetail(null);\n this.OrderslistService.setorderParty(null);\n this.OrderslistService.setorderTotalPayments(null);\n this.OrderslistService.setorderRemissionTotal(null);\n this.OrderslistService.setorderFeesTotal(null);\n }\n\n 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}\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','org_id','service_name','failure_reference','failure_reason','disputed_amount','event_name','event_date','representment_status','representment_date','refund_reference','refund_amount','refund_date']});\n worksheet = this.setPaymentFailureReportHeaders(worksheet);\n worksheet = this.autoFitColumns(worksheet,json);\n } else {\n worksheet = XLSX.utils.json_to_sheet(json,{header:['resp_service_id','resp_service_name','surplus_shortfall','balance','payment_amount','ccd_case_reference', 'ccd_exception_reference', 'processed_date', 'reason', 'explanation', 'user_name']});\n worksheet = this.setShortFallReportHeaders(worksheet);\n worksheet = this.autoFitColumns(worksheet,json);\n }\n workbook = { Sheets: { 'data': worksheet }, SheetNames: ['data'] };\n const excelBuffer: any = XLSX.write(workbook, { bookType: 'xlsx', type: 'array' });\n this.saveAsExcelFile(excelBuffer, excelFileName);\n }\n\n\nprivate autoFitColumns (worksheet: XLSX.WorkSheet,json:any) : XLSX.WorkSheet {\n let objectMaxLength = []; \n let ColWidth = [];\n let obj = <any>Object;\n for (let i = 0; i < json.length; i++) {\n let value = obj.values(json[i]);\n let key = obj.keys(json[i]);\n for (let j = 0; j < value.length; j++) {\n if(value[j] === null){\n value[j] = '';\n }\n objectMaxLength[j] =\n key[j].length >= value[j].length\n ? key[j].length+2\n : value[j].length+1;\n if( value[j].length === undefined){\n objectMaxLength[j] = key[j].length+2;\n }\n ColWidth.push({'width': +objectMaxLength[j]});\n }\n }\n worksheet['!cols'] = ColWidth;\n return worksheet;\n}\n\n\nprivate setDataLossReportHeaders (worksheet: XLSX.WorkSheet): XLSX.WorkSheet {\n worksheet.A1.v = \"Loss_Resp\";\n worksheet.B1.v = \"Payment_Asset_DCN\";\n worksheet.C1.v = \"Envelope_Ref\";\n worksheet.D1.v = \"Envelope_Item\";\n worksheet.E1.v = \"Resp_Service ID\";\n worksheet.F1.v = \"Resp_Service Name\";\n worksheet.G1.v = \"Date_Banked\";\n worksheet.H1.v = \"BGC_Batch\";\n worksheet.I1.v = \"Payment_Method\";\n worksheet.J1.v = \"Amount\";\n return worksheet;\n}\n\nprivate setUnprocessedReportHeaders (worksheet: XLSX.WorkSheet): XLSX.WorkSheet {\n worksheet.A1.v = \"Resp_Service ID\";\n worksheet.B1.v = \"Resp_Service Name\";\n worksheet.C1.v = \"Exception_Ref\";\n worksheet.D1.v = \"CCD_Ref\";\n worksheet.E1.v = \"Date_Banked\";\n worksheet.F1.v = \"BGC_Batch\";\n worksheet.G1.v = \"Payment_Asset_DCN\";\n worksheet.H1.v = \"Envelope_Ref\";\n worksheet.I1.v = \"Envelope_Item\";\n worksheet.J1.v = \"Payment_Method\";\n worksheet.K1.v = \"Amount\";\n return worksheet;\n}\n\nprivate setProcessedUnallocatedReportHeaders (worksheet: XLSX.WorkSheet): XLSX.WorkSheet {\n worksheet.A1.v = \"Resp_Service ID\";\n worksheet.B1.v = \"Resp_Service Name\";\n worksheet.C1.v = \"Allocation_Status\";\n worksheet.D1.v = \"Receiving_Office\";\n worksheet.E1.v = \"Allocation_Reason\";\n worksheet.F1.v = \"CCD_Exception_Ref\";\n worksheet.G1.v = \"CCD_Case_Ref\";\n worksheet.H1.v = \"Payment_Asset_DCN\";\n worksheet.I1.v = \"Envelope_Ref\";\n worksheet.J1.v = \"Envelope_Item\";\n worksheet.K1.v = \"Date_Banked\";\n worksheet.L1.v = \"BGC_Batch\";\n worksheet.M1.v = \"Payment_Method\";\n worksheet.N1.v = \"Amount\";\n return worksheet;\n}\n\nprivate setPaymentFailureReportHeaders (worksheet: XLSX.WorkSheet): XLSX.WorkSheet {\n worksheet.A1.v = \"Payment reference\";\n worksheet.B1.v = \"CCD reference\";\n worksheet.C1.v = \"OrgID\";\n worksheet.D1.v = \"Service name\";\n worksheet.E1.v = \"Failure reference\";\n worksheet.F1.v = \"Failure reason\";\n worksheet.G1.v = \"Disputed amount\";\n worksheet.H1.v = \"Event name\";\n worksheet.I1.v = \"Event date\";\n worksheet.J1.v = \"Representment status\";\n worksheet.K1.v = \"Representment date\";\n worksheet.L1.v = \"Refund reference\";\n worksheet.M1.v = \"Refund amount\";\n worksheet.N1.v = \"Refund date\";\n return worksheet;\n}\nprivate setShortFallReportHeaders (worksheet: XLSX.WorkSheet): XLSX.WorkSheet {\n worksheet.A1.v = \"Resp_Service ID\";\n worksheet.B1.v = \"Resp_Service Name\";\n worksheet.C1.v = \"Over Payment_Under Payment\";\n worksheet.D1.v = \"Balance\";\n worksheet.E1.v = \"Payment_Amount\";\n worksheet.F1.v = \"CCD_Case_Ref\";\n worksheet.G1.v = \"Exception_Ref\";\n worksheet.H1.v = \"Processed_Date\";\n worksheet.I1.v = \"Reason\";\n worksheet.J1.v = \"Explanation\";\n worksheet.K1.v = \"Updated Name\";\n return worksheet;\n}\n\nprivate saveAsExcelFile(buffer: any, fileName: string): void {\n const data: Blob = new Blob([buffer], {\n type: EXCEL_TYPE\n });\n FileSaver.saveAs(data, fileName + EXCEL_EXTENSION);\n }\n}","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 }\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}","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';\nconst BS_ENABLE_FLAG = 'bulk-scan-enabling-fe';\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 @Input() isEliginbleToAccess: boolean;\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 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 allowedRolesToAccessRefund = ['payments-refund-approver', 'payments-refund'];\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.paymentLibComponent.isRefundStatusView) {\n this.viewName = 'refundview';\n this.OrderslistService.getRefundView().subscribe((data) => this.refundlist = data);\n this.OrderslistService.getCCDCaseNumberforRefund.subscribe((data) => this.ccdCaseNumber = data);\n } else {\n this.viewName = 'refundstatuslist';\n if(this.isEliginbleToAccess) {\n this.refundService.getRefundStatusList(this.ccdCaseNumber).subscribe(\n refundList => {\n this.rejectedRefundList = refundList['refund_list'];\n }\n ),\n (error: any) => {\n this.errorMessage = error.replace(/\"/g,\"\");\n };\n } else {\n this.rejectedRefundList = [];\n }\n\n }\n\n\n this.refundStatusForm = this.formBuilder.group({\n amount: new FormControl('', Validators.compose([\n Validators.required,\n Validators.pattern('^[0-9]+(\\.[0-9]{1,2})?$')\n ])),\n refundReason: new FormControl('', Validators.compose([Validators.required])),\n reason: new FormControl()\n });\n\n if(this.refundlist !== undefined) {\n this.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 isFromPayBubble = (): boolean => { \n return this.API_ROOT === 'api/payment-history';\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.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 this.refundlist.reason = refundListReason.reason;\n this.refundlist.code = refundListReason.code;\n this.refundCode = refundListReason.code;\n } else {\n this.isRefundBtnDisabled = true;\n }\n this.viewName = 'reviewandsubmitview';\n this.paymentLibComponent.CCD_CASE_NUMBER = this.ccdCaseNumber;\n }\n\n getRefundAmount(amount: number) {\n if (this.paymentLibComponent.isFromRefundStatusPage && !this.paymentLibComponent.iscancelClicked) {\n if (amount > 0) {\n this.changedAmount = amount;\n // this.refundlist.amount = amount;\n }\n } else {\n this.isRefundBtnDisabled = true;\n }\n this.viewName = 'reviewandsubmitview';\n this.paymentLibComponent.CCD_CASE_NUMBER = this.ccdCaseNumber;\n }\n\n getRefundFees(fees: IFee[])\n {\n this.fees = fees;\n this.refundFees = this.fees.map(obj => ({ fee_id: obj.id, code: obj.code, version:obj.version, volume: obj.volume,refund_amount:obj.refund_amount }));\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 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.viewName = 'revieweditdetailsconfirmationpage';\n }\n getContactDetailsForRefundList(obj:IRefundContactDetails) {\n this.refundlist.contact_details = obj;\n this.isEditDetailsClicked = false;\n this.isRefundBtnDisabled = false;\n this.viewName = 'reviewandsubmitview';\n }\n gotoEditDetailsPage(note?: any) {\n if(note) {\n this.notification = { contact_details: note, notification_type: note.notification_type };\n }\n this.isEditDetailsClicked = true;\n this.viewName = 'refundEditView'\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 gotoCasetransationPageCancelBtnClicked(Event: Event) {\n event.preventDefault();\n this.viewName = 'refundstatuslist';\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}","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 { 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\n constructor(\n private paymentLibComponent: PaymentLibComponent,\n private paymentViewService: PaymentViewService,\n private OrderslistService: OrderslistService,\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 }\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}","export class IserviceRequestCardPayment {\n amount: string\n currency: string\n language: string\n \n constructor(amount : string) {\n this.amount = amount;\n this.currency = 'GBP';\n this.language = 'string';\n } \n}\n ","export class IserviceRequestPbaPayment {\n account_number: string;\n amount: string\n currency: string\n customer_reference: string\n organisation_name: string\n \n constructor(account_number : string, amount : string, customer_reference: string, orgName: string) {\n this.account_number = account_number;\n this.amount = amount;\n this.currency = 'GBP';\n this.customer_reference = customer_reference;\n this.organisation_name = orgName;\n } \n}\n ","import { Component, OnInit, Input} from '@angular/core';\nimport { PaymentViewService } from '../../services/payment-view/payment-view.service';\nimport { PaymentLibComponent } from '../../payment-lib.component';\nimport { IserviceRequestCardPayment } from '../../interfaces/IserviceRequestCardPayment';\nimport { IserviceRequestPbaPayment } from '../../interfaces/IserviceRequestPbaPayment';\n\nconst BS_ENABLE_FLAG = 'bulk-scan-enabling-fe';\n\n@Component({\n selector: 'ccpay-pba-payment',\n templateUrl: './pba-payment.component.html',\n styleUrls: ['./pba-payment.component.scss']\n})\nexport class PbaPaymentComponent implements OnInit {\n @Input() pbaPayOrderRef: any;\n viewStatus: string;\n pbaAccountList: string[];\n isPBAAccountHold: boolean = false;\n errorMsg: any;\n isCardPaymentSuccess: boolean = true;\n isInSufficiantFund: boolean = false;\n isPBAAccountNotExist: boolean = false;\n isPBAServerError: boolean = false;\n isGetPBAAccountSucceed: boolean = false;\n selectedPbaAccount: string = '';\n pbaAccountRef: string = '';\n isPbaAccountSelected: boolean = false;\n isCardPaymentSelected: boolean = false;\n isPBADropdownSelected: boolean = false;\n isContinueButtondisabled: boolean = true;\n isPBAAccountPaymentSuccess: boolean = false;\n pbaAccountrPaymentResult: any;\n orgName: string = '';\n\n constructor(private paymentLibComponent: PaymentLibComponent,\n private paymentViewService: PaymentViewService) {}\n\n ngOnInit() {\n this.pbaPayOrderRef = this.paymentLibComponent.pbaPayOrderRef;\n this.viewStatus = 'pba-payment';\n this.errorMsg = null;\n this.paymentViewService.getPBAaccountDetails()\n .subscribe(\n result => {\n this.isGetPBAAccountSucceed = true;\n this.orgName = result.organisationEntityResponse.name;\n this.pbaAccountList = result.organisationEntityResponse.paymentAccount;\n },\n error => {\n this.errorMsg = error;\n }\n );\n\n }\n selectpbaaccount(args) {\n if(args.currentTarget.id === 'pbaAccountNumber') {\n this.isPBADropdownSelected = true;\n this.selectedPbaAccount = args.target.value; \n }\n if(args.currentTarget.id === 'pbaAccountRef') {\n this.pbaAccountRef = args.target.value; \n }\n if(this.selectedPbaAccount !== '' && this.pbaAccountRef !== \"\") {\n this.isContinueButtondisabled = false;\n } else {\n this.isContinueButtondisabled = true;\n }\n }\n\n saveAndContinue() {\n\n if(this.isPbaAccountSelected) {\n this.isInSufficiantFund = false;\n this.isPBAAccountNotExist = false;\n this.isPBAServerError = false;\n this.isPBAAccountPaymentSuccess = false;\n if ( this.pbaAccountList.indexOf(this.selectedPbaAccount) !== -1 ) {\n const requestBody = new IserviceRequestPbaPayment(\n this.selectedPbaAccount, this.pbaPayOrderRef.orderTotalFees, this.pbaAccountRef, this.orgName);\n this.paymentViewService.postPBAaccountPayment(this.pbaPayOrderRef.orderRefId, requestBody)\n .subscribe(\n r => {\n try {\n this.pbaAccountrPaymentResult = JSON.parse(r);\n } catch(e) {\n this.pbaAccountrPaymentResult = r;\n }\n this.isPBAAccountPaymentSuccess = true;\n },\n e => {\n if(e.status == '402') {\n this.isInSufficiantFund = true; \n } else if(e.status == '410') {\n this.isPBAAccountNotExist = true;\n } else if(e.status == '412') {\n this.isPBAAccountHold = true;\n } else {\n this.isPBAServerError = true;\n }\n }\n );\n } else {\n this.isPBAServerError = true;\n }\n } else if (this.isCardPaymentSelected) {\n this.cardPayment();\n }\n\n }\n cardPayment() {\n this.isCardPaymentSuccess = true;\n const requestBody = new IserviceRequestCardPayment (\n this.pbaPayOrderRef.orderTotalFees);\n this.paymentViewService.postWays2PayCardPayment(this.pbaPayOrderRef.orderRefId, requestBody)\n .subscribe(\n result => {\n const paymentUrl = JSON.parse(result).next_url;\n window.location.href = paymentUrl;\n },\n error => {\n this.isCardPaymentSuccess = false;\n }\n );\n\n }\n selectPaymentMethod(type: string) {\n if(type === 'PBA') {\n this.isPbaAccountSelected = true;\n this.isCardPaymentSelected = false;\n this.isPBADropdownSelected = false\n this.isContinueButtondisabled = true;\n this.selectedPbaAccount = null;\n } else if (type === 'CARD') {\n this.isPbaAccountSelected = false;\n this.isCardPaymentSelected = true;\n this.isPBADropdownSelected = false\n this.isContinueButtondisabled = false;\n }\n }\n gotoCasetransationPage() {\n this.paymentLibComponent.viewName = 'case-transactions';\n this.paymentLibComponent.TAKEPAYMENT = false;\n this.paymentLibComponent.ISBSENABLE = true;\n this.paymentLibComponent.isFromServiceRequestPage = true;\n }\n}\n","import { NgModule } from '@angular/core';\nimport { HttpClientModule } from '@angular/common/http';\nimport { CommonModule } from '@angular/common';\n\nimport { PaymentListComponent } from './components/payment-list/payment-list.component';\nimport { PaymentViewComponent } from './components/payment-view/payment-view.component';\nimport { ProcessRefundComponent } from './components/process-refund/process-refund.component';\nimport { RefundListComponent } from './components/refund-list/refund-list.component';\n\nimport { CardDetailsComponent } from './components/card-details/card-details.component';\nimport { PageNotFoundComponent } from './components/page-not-found.component';\nimport { PaymentLibComponent } from './payment-lib.component';\nimport { StatusHistoryComponent } from './components/status-history/status-history.component';\nimport { 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';\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 ],\n exports: [PaymentLibComponent],\n providers: [\n { provide: LoggerService, useClass: ConsoleLoggerService },\n XlFileService,\n WebComponentHttpClient\n ]\n})\n\nexport class PaymentLibModule { }"],"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,I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ACAC,qBACAC,gBACAC,qBACAC,kBAIFC,aAAc,CACZnqC,EACA2E,EACA2F,EACA09B,GACA5vB,EACAlG,EACAqE,EACAe,EACAI,EACAG,EACA0Q,GACAoC,GACA2B,GACA4B,GACAO,GACAlS,EACA2B,EACAmH,EACAyN,GACA6H,GACAI,GACAE,GACAE,GACAkD,GACApX,GACA0b,GACA+B,GACA2C,IAEF+C,QAAS,CAACpqC,GACVqqC,UAAW,CACT,CAAEC,QAASzmC,EAAe0mC,SAAU9tB,GACpC8e,GACAx1B,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","PostRefundRetroRemission","contact_details","fees","payment_reference","refund_reason","total_refund_amount","is_over_payment","PaymentViewComponent","paymentViewService","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","reference","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","goToPaymentFailuePage","selectedPaymentsStatus","goBackToPaymentView","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","checkRefundActions","processRefundSubmit","processRefundRequest","resetForm","controls","processFormError","errors","dirty","valid","reason","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","NotificationService","getRefundNotification","getAddressByPostcode","postcode","ContactDetailsComponent","notificationService","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","county","mpostcode","country","addressObj","setEditDetails","isEditOperationInRefundList","setValue","patchValue","address_line","city","postal_code","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","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","iscancelClicked","isFromRefundStatusPage","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","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","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","refundlist","isEliginbleToAccess","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","refundCode","getRefundAmount","getRefundFees","fee_id","gotoReviewRefundConfirmationPage","resubmitRequest","gotoEditAddressDetails","addressDetails","getContactDetailsForRefundList","gotoEditDetailsPage","submitEditDetail","resendRequest","putResend","Event","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","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/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/services/notification/notification.service.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/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}","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 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 }\n}","import { Injectable } from '@angular/core';\nimport { HttpErrorResponse } from '@angular/common/http';\nimport { Observable, throwError } from 'rxjs';\n\n@Injectable({\n providedIn: 'root'\n})\n\n\nexport class ErrorHandlerService {\n\n constructor() { }\n\n\n handleError(err: HttpErrorResponse): Observable<any> {\n let errorMessage: string;\n if (err.error instanceof Error) {\n // A client-side or network error occurred.\n errorMessage = `An error occurred: ${err.error.message}`;\n } else {\n // The backend returned an unsuccessful response code.\n if (err.status === 404) {\n\n if (typeof err.error === 'string' && err.error !== undefined) {\n\n if(err.error.length > 60) {\n if (JSON.parse(err.error).statusCode !== undefined && JSON.parse(err.error).statusCode === 500)\n {\n errorMessage = 'Internal server error';\n } else {\n if(err.error.length > 60) {\n errorMessage = JSON.parse(err.error).error;\n } else {\n errorMessage = err.error;\n }\n\n }\n } else {\n errorMessage = err.error;\n }\n } else {\n errorMessage = JSON.parse(err.error).error;\n }\n\n }\n else if (err.status === 500) {\n errorMessage = 'Internal server error';\n } else if (err.error.messsage === undefined) {\n if( typeof err.error === 'object') {\n errorMessage = JSON.parse(JSON.stringify(err.error)).error;\n } else {\n if (typeof err.error === 'string' && err.error !== undefined) {\n\n if(err.error.length > 60) {\n if (JSON.parse(err.error).statusCode !== undefined && JSON.parse(err.error).statusCode === 500)\n {\n errorMessage = 'Internal server error';\n } else {\n if(err.error.length > 60) {\n errorMessage = JSON.parse(err.error).error;\n } else {\n errorMessage = err.error;\n }\n\n }\n } else {\n errorMessage = err.error;\n }\n } else {\n errorMessage = JSON.parse(err.error).error;\n }\n\n }\n\n } else {\n if (err.error.message !== undefined) {\n errorMessage = `${err.error.message}`;\n } else {\n errorMessage = `${err.error}`;\n }\n\n }\n }\n return throwError(errorMessage);\n }\n\n\n getServerErrorMessage(isErrorExist, isDataNotExist = false, error='') {\n const bodyContent = isDataNotExist ? error : 'Try again later';\n return {\n title: \"There is a problem with the service\",\n body: bodyContent,\n showError: isErrorExist\n };\n }\n}\n","import { Injectable } from '@angular/core';\n\nconst noop = (): any => undefined;\n\nexport abstract class Logger {\n\n info: any;\n warn: any;\n error: any;\n}\n\n@Injectable({\n providedIn: 'root'\n})\nexport class LoggerService implements Logger {\n\n info: any;\n warn: any;\n error: any;\n\n invokeConsoleMethod(type: string, args?: any): void {}\n}\n","import { Injectable } from '@angular/core';\nimport { HttpClient } from '@angular/common/http';\n\nimport { Observable } from 'rxjs/internal/Observable';\nimport {PaymentLibService} from '../../payment-lib.service';\nimport { IPayments } from '../../interfaces/IPayments';\nimport { catchError } from 'rxjs/operators';\nimport { ErrorHandlerService } from '../shared/error-handler.service';\nimport { LoggerService } from '../shared/logger/logger.service';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class PaymentListService {\n payments: IPayments;\n\n constructor(private http: HttpClient,\n private logger: LoggerService,\n private errorHandlerService: ErrorHandlerService,\n private paymentLibService: PaymentLibService) { }\n\n\n getPaymentByCcdCaseNumber(ccdCaseNumber: string, paymentMethod: string): Observable<IPayments> {\n this.logger.info('Payment-list-service getPaymentByCcdCaseNumber for: ', ccdCaseNumber);\n\n return this.http.get<IPayments>(`${this.paymentLibService.API_ROOT}/cases/${ccdCaseNumber}/payments`, {\n withCredentials: true\n })\n .pipe(\n catchError(this.errorHandlerService.handleError)\n );\n }\n}\n","import {Component, OnInit} from '@angular/core';\n\nimport {PaymentListService} from '../../services/payment-list/payment-list.service';\nimport {IPayments} from '../../interfaces/IPayments';\nimport {PaymentLibComponent} from '../../payment-lib.component';\nimport {IStatusHistory} from '../../interfaces/IStatusHistory';\n\n@Component({\n selector: 'ccpay-payment-list',\n templateUrl: './payment-list.component.html',\n styleUrls: ['./payment-list.component.css']\n})\nexport class PaymentListComponent implements OnInit {\n payments: IPayments;\n errorMessage: string;\n code: string;\n\n constructor(private paymentListService: PaymentListService,\n private paymentLibComponent: PaymentLibComponent) {\n }\n\n ngOnInit() {\n this.paymentListService.getPaymentByCcdCaseNumber(this.paymentLibComponent.CCD_CASE_NUMBER, this.paymentLibComponent.PAYMENT_METHOD)\n .subscribe(\n payments => this.payments = payments,\n (error: any) => this.errorMessage = <any>error\n );\n }\n\n loadPaymentViewComponent(paymentGroupReference: string, paymentReference: string, paymentMethod: string) {\n this.paymentLibComponent.paymentMethod = paymentMethod;\n this.paymentLibComponent.paymentGroupReference = paymentGroupReference;\n this.paymentLibComponent.paymentReference = paymentReference;\n this.paymentLibComponent.viewName = 'payment-view';\n }\n}\n","/******************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n if (typeof b !== \"function\" && b !== null)\r\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (_) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n var desc = Object.getOwnPropertyDescriptor(m, k);\r\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\r\n desc = { enumerable: true, get: function() { return m[k]; } };\r\n }\r\n Object.defineProperty(o, k2, desc);\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n});\r\n\r\nexport function __exportStar(m, o) {\r\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\r\n}\r\n\r\nexport function __values(o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n}\r\n\r\nexport function __spreadArray(to, from, pack) {\r\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\r\n if (ar || !(i in from)) {\r\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\r\n ar[i] = from[i];\r\n }\r\n }\r\n return to.concat(ar || Array.prototype.slice.call(from));\r\n}\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === \"return\" } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nvar __setModuleDefault = Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\r\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\r\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\r\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\r\n}\r\n\r\nexport function __classPrivateFieldIn(state, receiver) {\r\n if (receiver === null || (typeof receiver !== \"object\" && typeof receiver !== \"function\")) throw new TypeError(\"Cannot use 'in' operator on non-object\");\r\n return typeof state === \"function\" ? receiver === state : state.has(receiver);\r\n}\r\n","import { Injectable } from '@angular/core';\nimport { HttpClient, HttpHeaders } from '@angular/common/http';\nimport { Meta } from '@angular/platform-browser';\nimport { Observable } from 'rxjs';\n\n@Injectable()\nexport class WebComponentHttpClient {\n constructor(\n private http: HttpClient,\n private meta: Meta\n ) { }\n\n post(url: string, body: any | null, options?: any): Observable<any> {\n const opts = this.addHeaders(options || {});\n return this.http.post(url, body, opts);\n }\n\n put(url: string, body: any | null, options?: any): Observable<any> {\n const opts = this.addHeaders(options || {});\n return this.http.put(url, body, opts);\n }\n\n get(url: string, options?: any): Observable<any> {\n const opts = this.addHeaders(options || {});\n return this.http.get(url, opts);\n }\n\n delete(url: string, options?: any): Observable<any> {\n const opts = this.addHeaders(options || {});\n return this.http.delete(url, opts);\n }\n \n patch(url: string, body: any | null, options?: any): Observable<any> {\n const opts = this.addHeaders(options || {});\n return this.http.patch(url, body, opts);\n }\n\n addHeaders(options: any): any {\n const csrfToken = this.meta.getTag('name=csrf-token');\n const headers = {};\n \n if (options.headers) {\n options.headers.forEach(element => {\n headers[element] = options.headers.get(element);\n });\n }\n headers['X-Requested-With'] = 'XMLHttpRequest';\n if (csrfToken === null) {\n if( document.cookie.split(';').find(row => row.startsWith('XSRF-TOKEN')) !== undefined ) {\n headers['CSRF-Token'] = document.cookie.split(';').find(row => row.startsWith('XSRF-TOKEN')).split('=')[1]; \n } else {\n headers['CSRF-Token'] = document.cookie.split(';').find(row => row.startsWith(' XSRF-TOKEN')).split('=')[1];\n }\n } else {\n headers['CSRF-Token'] = csrfToken.content;\n }\n options.headers = new HttpHeaders(headers);\n options.responseType = 'text';\n return options;\n }\n}\n","import { Injectable } from '@angular/core';\nimport { HttpClient, HttpHeaders } from '@angular/common/http';\nimport { Observable } from 'rxjs/internal/Observable';\nimport { v4 as uuidv4 } from 'uuid';\nimport {IPayment} from '../../interfaces/IPayment';\nimport {PaymentLibService} from '../../payment-lib.service';\nimport { WebComponentHttpClient } from '../shared/httpclient/webcomponent.http.client';\nimport { ErrorHandlerService } from '../shared/error-handler.service';\nimport { catchError } from 'rxjs/operators';\nimport { LoggerService } from '../shared/logger/logger.service';\nimport {IPaymentGroup} from '../../interfaces/IPaymentGroup';\nimport { AddRemissionRequest } from '../../interfaces/AddRemissionRequest';\nimport { PaymentToPayhubRequest } from '../../interfaces/PaymentToPayhubRequest';\nimport { PayhubAntennaRequest } from '../../interfaces/PayhubAntennaRequest';\nimport { UnidentifiedPaymentsRequest } from '../../interfaces/UnidentifiedPaymentsRequest';\nimport { UnsolicitedPaymentsRequest } from '../../interfaces/UnsolicitedPaymentsRequest';\nimport { Meta } from '@angular/platform-browser';\nimport { AllocatePaymentRequest } from '../../interfaces/AllocatePaymentRequest';\nimport { IAllocationPaymentsRequest } from '../../interfaces/IAllocationPaymentsRequest';\nimport {IOrderReferenceFee} from '../../interfaces/IOrderReferenceFee';\nimport { BehaviorSubject } from 'rxjs';\nimport { IserviceRequestPbaPayment } from '../../interfaces/IserviceRequestPbaPayment';\nimport { IserviceRequestCardPayment } from '../../interfaces/IserviceRequestCardPayment';\nimport { RefundsRequest } from '../../interfaces/RefundsRequest';\nimport { AddRetroRemissionRequest } from '../../interfaces/AddRetroRemissionRequest';\nimport { PostRefundRetroRemission } from '../../interfaces/PostRefundRetroRemission';\nimport { PostIssueRefundRetroRemission } from '../../interfaces/PostIssueRefundRetroRemission';\nimport { error } from '@angular/compiler/src/util';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class PaymentViewService {\n private ordersList = <BehaviorSubject<IOrderReferenceFee[]>>new BehaviorSubject([]);\n\n private meta: Meta;\n\n constructor(private http: HttpClient,\n private https: WebComponentHttpClient,\n private logger: LoggerService,\n private errorHandlerService: ErrorHandlerService,\n private paymentLibService: PaymentLibService) { }\n\n getPaymentDetails(paymentReference: string, paymentMethod: string): Observable<IPayment> {\n this.logger.info('Payment-view-service getPaymentDetails for: ', paymentReference);\n\n return this.http.get<IPayment>(paymentMethod === 'card' || paymentMethod === 'cash' || paymentMethod === 'cheque' || paymentMethod === 'postal order' ?\n `${this.paymentLibService.API_ROOT}/card-payments/${paymentReference}` :\n `${this.paymentLibService.API_ROOT}/credit-account-payments/${paymentReference}`, {\n withCredentials: true\n })\n .pipe(\n catchError(this.errorHandlerService.handleError)\n );\n }\n\n getPaymentGroupDetails(paymentGroupReference: string): Observable<IPaymentGroup> {\n this.logger.info('Payment-view-service getPaymentGroupDetails for: ', paymentGroupReference);\n\n return this.http.get<IPayment>(`${this.paymentLibService.API_ROOT}/payment-groups/${paymentGroupReference}`, {\n withCredentials: true\n })\n .pipe(\n catchError(this.errorHandlerService.handleError)\n );\n }\n getApportionPaymentDetails(paymentReference: string): Observable<IPaymentGroup> {\n this.logger.info('Payment-view-service getPaymentGroupDetails for: ', paymentReference);\n\n return this.http.get<IPayment>(`${this.paymentLibService.API_ROOT}/payment-groups/fee-pay-apportion/${paymentReference}`, {\n withCredentials: true\n })\n .pipe(\n catchError(this.errorHandlerService.handleError)\n );\n }\n getPBAaccountDetails(): Observable<any> {\n const url = `${this.paymentLibService.API_ROOT}/pba-accounts`;\n return this.http.get(url, { withCredentials: true }).pipe(\n catchError(this.errorHandlerService.handleError)\n );\n }\n\n postWays2PayCardPayment(serviceRef: string, body: IserviceRequestCardPayment): Observable<any> {\n const url = `${this.paymentLibService.API_ROOT}/service-request/${serviceRef}/card-payments`;\n const rurl = this.paymentLibService.CARDPAYMENTRETURNURL.replace('.prod', '');\n body['return-url'] = `${rurl}/payment`;\n return this.https.post(url, body).pipe(\n catchError(this.errorHandlerService.handleError)\n );\n }\n \n postPBAaccountPayment(serviceRef: string, body: IserviceRequestPbaPayment): Observable<any> {\n let randomKey = 'idam-key-' + Math.random().toString().split('.').join('-');\n body['idempotency_key'] = randomKey; \n const url = `${this.paymentLibService.API_ROOT}/service-request/${serviceRef}/pba-payments`;\n 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 { 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 { 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 constructor(private paymentViewService: PaymentViewService,\n private paymentLibComponent: PaymentLibComponent,\n private cd: ChangeDetectorRef,\n private OrderslistService: OrderslistService) {\n }\n\n ngAfterContentChecked(): void {\n this.cd.detectChanges();\n }\n\n ngOnInit() {\n this.ccdCaseNumber = this.paymentLibComponent.CCD_CASE_NUMBER;\n this.selectedOption = this.paymentLibComponent.SELECTED_OPTION;\n this.dcnNumber = this.paymentLibComponent.DCN_NUMBER;\n this.isTurnOff = this.paymentLibComponent.ISTURNOFF;\n this.serviceReference = this.paymentLibComponent.paymentGroupReference;\n this.viewStatus = 'paymentview';\n this.paymentViewService.getApportionPaymentDetails(this.paymentLibComponent.paymentReference).subscribe(\n paymentGroup => {\n let fees = [];\n paymentGroup.fees.forEach(fee => {\n this.isRemissionsMatch = false;\n\n paymentGroup.remissions.forEach(rem => {\n if (rem.fee_code === fee.code) {\n this.isRemissionsMatch = true;\n fee['remissions'] = rem;\n fees.push(fee);\n }\n });\n if (!this.isRemissionsMatch) {\n fees.push(fee);\n }\n });\n paymentGroup.fees = fees\n this.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.viewCompStatus = 'overpaymentcheckandanswer';\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}","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}","import {Component, OnInit, Input} from '@angular/core';\nimport { FormBuilder, FormGroup, Validators, FormControl } from '@angular/forms';\nimport {RefundsService} from '../../services/refunds/refunds.service';\nimport { IRefundAction } from '../../interfaces/IRefundAction';\nimport { IRefundList } from '../../interfaces/IRefundList';\nimport { IRefundRejectReason } from '../../interfaces/IRefundRejectReason';\nimport { OrderslistService } from '../../services/orderslist.service';\nimport { PaymentViewService } from '../../services/payment-view/payment-view.service';\nimport { PaymentLibComponent } from '../../payment-lib.component';\nimport { ActivatedRoute,Router } from '@angular/router';\n\n@Component({\n selector: 'ccpay-process-refund',\n templateUrl: './process-refund.component.html',\n styleUrls: ['./process-refund.component.css']\n})\nexport class ProcessRefundComponent implements OnInit {\n @Input() refundReference: string;\n @Input() refundlistsource: IRefundList;\n\n processRefundForm: FormGroup;\n\n errorMessage = this.getErrorMessage(false, '', '', '');\n sendmeback: string = null;\n viewStatus: string;\n refundActionList: IRefundAction[] = []; \n refundRejectReasonList: IRefundRejectReason[] = []; \n isSendMeBackClicked: boolean = false;\n isRejectClicked: boolean = false;\n isOtherClicked: boolean = false;\n isSuccesspageEnable: boolean = false;\n\n refundActionsHasError: boolean = false;\n refundRejectReasonHasError: boolean = false;\n isReasonFieldEmpty: boolean = false;\n isReasonFieldInvalid: boolean = false;\n reasonFieldMinHasError: boolean = false;\n reasonFieldMaxHasError: boolean = false;\n isReasonEmpty: boolean = false;\n isReasonInvalid: boolean = false;\n successMsg: string = null;\n navigationpage: string;\n ccdCaseNumber: string;\n isFromRefundListPage: boolean;\n cpoDetails:any = null;\n isCPODown: boolean;\n isConfirmButtondisabled: boolean = true;\n constructor(private RefundsService: RefundsService,\n private paymentViewService: PaymentViewService,\n private formBuilder: FormBuilder,\n private OrderslistService: OrderslistService,\n private paymentLibComponent: PaymentLibComponent,\n private router: Router,\n private activeRoute: ActivatedRoute) {\n }\n\n ngOnInit() {\n this.viewStatus = 'RefundProcess';\n this.RefundsService.getRefundActions(this.refundReference).subscribe(\n refundActionList => {\n this.refundActionList = <any>refundActionList;\n },\n err => {\n this.errorMessage = this.getErrorMessage(true, err.statusCode, err.err, err);\n }\n );\n this.processRefundForm = this.formBuilder.group({\n refundActionField: new FormControl('', Validators.compose([\n Validators.required\n ])),\n refundRejectReasonField: new FormControl('', Validators.compose([\n Validators.required\n ])),\n sendMeBackField: new FormControl('', Validators.compose([\n Validators.required,\n Validators.minLength(3),\n Validators.maxLength(255),\n Validators.pattern('^([a-zA-Z0-9\\\\s,\\\\.]*)$'),\n\n ])),\n enterReasonField: new FormControl('', Validators.compose([\n Validators.required,\n Validators.maxLength(30),\n Validators.pattern('^([a-zA-Z0-9.\\\\s]*)$'),\n ])),\n });\n this.ccdCaseNumber = this.refundlistsource.ccd_case_number;\n\n if((typeof this.paymentLibComponent.TAKEPAYMENT === 'string' && this.paymentLibComponent.TAKEPAYMENT === 'false') || (typeof this.paymentLibComponent.TAKEPAYMENT === 'boolean' && !this.paymentLibComponent.TAKEPAYMENT) ) {\n this.isFromRefundListPage = true;\n }\n 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 }\n \n checkRefundActions(code: string) {\n this.refundActionsHasError = false;\n this.isReasonFieldEmpty = false;\n this.isReasonEmpty = false;\n this.isReasonInvalid = false;\n this.refundRejectReasonHasError = false;\n if(code === 'Return to caseworker') {\n this.isConfirmButtondisabled = true;\n this.isSendMeBackClicked = true;\n this.isRejectClicked = false;\n this.isOtherClicked = false;\n\n } else if (code === 'Approve') {\n this.isSendMeBackClicked = false;\n this.isConfirmButtondisabled = false;\n this.isRejectClicked = false;\n this.isOtherClicked = false;\n\n } else if (code === 'Reject') {\n this.isRejectClicked = true;\n this.isSendMeBackClicked = false;\n this.isOtherClicked = false;\n this.RefundsService.getRefundRejectReasons().subscribe(\n refundRejectReasonList => {\n this.refundRejectReasonList = <any>refundRejectReasonList;\n },\n err => {\n this.errorMessage = this.getErrorMessage(true, err.statusCode, err.err, err);\n }\n );\n } else if (code === 'RE005') {\n this.isOtherClicked = true;\n } else if (code !== 'RE005') {\n this.isOtherClicked = false;\n }\n }\n processRefundSubmit() {\n let processRefundRequest;\n let status;\n this.resetForm([false, false, false, false, false, false, false, false], 'all');\n const controls = this.processRefundForm.controls;\n const processFormError = controls.sendMeBackField.errors;\n\n if (this.processRefundForm.dirty && controls.refundActionField.valid \n && (controls.refundActionField.value == 'Approve'\n || (controls.refundActionField.value == 'Reject' && controls.refundRejectReasonField.valid && controls.refundRejectReasonField.value != 'RE005')\n || (controls.refundActionField.value == 'Reject' && controls.refundRejectReasonField.value == 'RE005' && controls.enterReasonField.valid)\n || (controls.refundActionField.value == 'Return to caseworker' && controls.sendMeBackField.valid))) {\n if (controls.refundActionField.value === 'Approve'){\n status = 'APPROVE';\n processRefundRequest = {\n code:'',\n reason: ''\n };\n } else if (controls.refundActionField.value === 'Reject') {\n status = 'REJECT';\n\n processRefundRequest = {\n code: controls.refundRejectReasonField.value ? controls.refundRejectReasonField.value : '',\n reason: controls.refundRejectReasonField.value == 'RE005' ? controls.enterReasonField.value : ''\n };\n } else if (controls.refundActionField.value === 'Return to caseworker') {\n status = 'SENDBACK';\n\n processRefundRequest = {\n code: '',\n reason: controls.sendMeBackField.value\n };\n }\n this.RefundsService.patchRefundActions(processRefundRequest, this.refundReference, status).subscribe(\n response => {\n this.isSuccesspageEnable = true;\n // this.successMsg = JSON.parse(response)['data'];\n this.successMsg = response.replace(/['\"]+/g, '');\n },\n err => {\n this.errorMessage = this.getErrorMessage(true, err.statusCode, err.err, err);\n }\n );\n } else {\n if(controls.refundActionField.value == \"\") {\n this.resetForm([true, false, false, false, false, false, false, false], 'action');\n }\n if(controls.refundActionField.value == 'Reject' && controls.refundRejectReasonField.value == \"\") {\n this.resetForm([false, true, false, false, false, false, false, false], 'rejectReason');\n }\n if(controls.refundActionField.value == 'Return to caseworker') {\n if(controls.sendMeBackField.value == '' ) {\n this.resetForm([false, false, true, false, false, false, false, false], 'addAreason');\n }\n if(controls.sendMeBackField.value != '' && controls.sendMeBackField.invalid ) {\n this.resetForm([false, false, false, true, false, false, false, false], 'addAreason');\n }\n if(processFormError && processFormError.minlength && processFormError.minlength.actualLength < 3 ) {\n this.resetForm([false, false, false, false, true, false, false, false], 'addAreason');\n }\n if(processFormError && processFormError.maxlength && processFormError.maxlength.actualLength > 255 ) {\n this.resetForm([false, false, false, false, false, true, false, false], 'addAreason');\n }\n }\n if(controls.refundActionField.value == 'Reject' && controls.refundRejectReasonField.value == 'RE005') {\n if(controls.enterReasonField.value === \"\") {\n this.resetForm([false, false, false, false, false, false, true, false], 'enterReason');\n }\n if(controls.enterReasonField.value!== \"\" && controls.enterReasonField.invalid) {\n this.resetForm([false, false, false, false, false, false, false, true], 'enterReason');\n }\n }\n }\n\n }\n getErrorMessage(isErrorExist, status, errorMsg, err) {\n let bodyTxt = 'Please try again later';\n if (status !== 500) {\n if (errorMsg !== undefined) {\n bodyTxt = errorMsg;\n } else {\n bodyTxt = err;\n }\n \n }\n return {\n title: 'Something went wrong',\n body: bodyTxt,\n showError: isErrorExist\n };\n }\n loadRefundListPage() {\n this.OrderslistService.getnavigationPageValue().subscribe((data) => this.navigationpage = data);\n if (this.navigationpage === 'casetransactions') {\n // window.location.href='/refund-list?takePayment=false&refundlist=true';\n // // this.OrderslistService.setnavigationPage('casetransactions');\n // // this.OrderslistService.setisFromServiceRequestPage(false);\n // // this.paymentLibComponent.VIEW ='case-transactions';\n // // this.paymentLibComponent.viewName = 'case-transactions';\n // // this.paymentLibComponent.ISBSENABLE = true;\n // // this.paymentLibComponent.isRefundStatusView = false;\n this.paymentLibComponent.viewName = 'refundstatuslist';\n this.paymentLibComponent.isRefundStatusView = true;\n } else {\n this.paymentLibComponent.viewName = 'refundstatuslist';\n this.paymentLibComponent.isRefundStatusView = true;\n }\n }\n loadRefundsHomePage() {\n if(typeof this.paymentLibComponent.TAKEPAYMENT === 'string' && this.paymentLibComponent.TAKEPAYMENT === 'false') {\n //window.location.href='/refund-list?takePayment=false&refundlist=true';\n this.paymentLibComponent.viewName = 'refund-list';\n }\n else {\n this.OrderslistService.setnavigationPage('casetransactions');\n this.OrderslistService.setisFromServiceRequestPage(false);\n this.paymentLibComponent.VIEW ='case-transactions';\n this.paymentLibComponent.viewName = 'case-transactions';\n this.paymentLibComponent.ISBSENABLE = true;\n this.paymentLibComponent.isRefundStatusView = false;\n }\n }\n redirecttoRefundListPage() {\n if((typeof this.paymentLibComponent.TAKEPAYMENT === 'string' && this.paymentLibComponent.TAKEPAYMENT === 'false') || (typeof this.paymentLibComponent.TAKEPAYMENT === 'boolean' && !this.paymentLibComponent.TAKEPAYMENT) ) {\n // window.location.href='/refund-list?takePayment=false&refundlist=true';\n this.paymentLibComponent.viewName = 'refund-list';\n }\n else {\n this.loadRefundListPage();\n }\n }\n loadCaseTransactionPage() {\n this.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}","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 { 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';\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}/notifications/${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}/search/places/v1/postcode?postcode=${postcode}`, {\n withCredentials: true\n })\n .pipe(\n catchError(this.errorHandlerService.handleError)\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('^[a-z0-9._%+-]+@[a-z0-9-]+\\\\.[a-z]{2,4}$')\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['data']['results'];\n this.isShowPickAddress = refundsNotification['data']['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}","import { Component, OnInit, Input } from '@angular/core';\n\n\n\n@Component({\n selector: 'ccpay-error-banner',\n templateUrl: './error-banner.component.html',\n styleUrls: ['./error-banner.component.scss']\n})\n\nexport class ErrorBannerComponent implements OnInit {\n @Input('errorMessage') errorMessage;\n\n constructor(\n ) {}\n\n ngOnInit() {\n\n }\n}\n","\nexport class UnidentifiedPaymentsRequest {\n payment_allocation_status: any;\n payment_group_reference: string;\n payment_reference: string;\n unidentified_reason: string;\n\n constructor(payment_group_reference: string, payment_reference : string, unidentified_reason: any) {\n this.payment_allocation_status = {\n description: '',\n name: \"Unidentified\"\n };\n this.payment_group_reference = payment_group_reference ;\n this.payment_reference= payment_reference;\n this.unidentified_reason= unidentified_reason;\n\n }\n\n\n\n}\n","import { IBSPayments } from \"./IBSPayments\";\n\nexport class AllocatePaymentRequest {\n amount: Number;\n banked_date: String;\n ccd_case_number: String;\n exception_record: string;\n currency: String;\n document_control_number: String;\n external_provider: String;\n giro_slip_no: String;\n payer_name: String;\n payment_channel: Object;\n payment_status: Object;\n payment_method: String;\n case_type: String;\n payment_allocation_dto?: {\n allocation_reason: String,\n allocation_status: String,\n explanation: String,\n payment_allocation_status: Object,\n payment_group_reference: String,\n payment_reference: String,\n reason: String,\n receiving_office: String,\n unidentified_reason: String,\n user_id: String,\n user_name: String,\n case_type: String\n }\n\n constructor(ccd_case_number : string, unAllocatedPayment: IBSPayments, caseType: string, exceptionRecord: string, allocatedRequest?: any) {\n this.amount = unAllocatedPayment.amount;\n this.banked_date = unAllocatedPayment.date_banked;\n this.ccd_case_number = ccd_case_number;\n this.exception_record = exceptionRecord;\n this.currency= unAllocatedPayment.currency;\n this.document_control_number = unAllocatedPayment.dcn_reference;\n this.external_provider = 'exela';\n this.giro_slip_no = unAllocatedPayment.bgc_reference;\n this.payer_name = unAllocatedPayment.payer_name;\n this.payment_channel = {\n description: '',\n name: 'bulk scan'\n };\n this.payment_status ={\n description: 'bulk scan payment completed',\n name: 'success'\n }\n this.payment_method = unAllocatedPayment.payment_method;\n this.case_type= caseType;\n if(allocatedRequest) {\n this.payment_allocation_dto = allocatedRequest;\n }\n\n }\n}\n","import { Component, OnInit, Input } from '@angular/core';\nimport { FormBuilder, FormGroup, Validators, FormControl } from '@angular/forms';\nimport { PaymentLibComponent } from '../../payment-lib.component';\nimport { PaymentViewService } from '../../services/payment-view/payment-view.service';\nimport {BulkScaningPaymentService} from '../../services/bulk-scaning-payment/bulk-scaning-payment.service';\nimport { IBSPayments } from '../../interfaces/IBSPayments';\nimport { UnidentifiedPaymentsRequest } from '../../interfaces/UnidentifiedPaymentsRequest';\nimport { AllocatePaymentRequest } from '../../interfaces/AllocatePaymentRequest';\n\n@Component({\n selector: 'app-mark-unidentified-payment',\n templateUrl: './mark-unidentified-payment.component.html',\n styleUrls: ['./mark-unidentified-payment.component.scss']\n})\nexport class MarkUnidentifiedPaymentComponent implements OnInit {\n @Input() caseType: string;\n markPaymentUnidentifiedForm: FormGroup;\n viewStatus: string;\n ccdCaseNumber: string;\n bspaymentdcn: string;\n isInvesticationDetailEmpty: boolean = false;\n investicationDetailHasError: boolean = false;\n investicationDetailMinHasError: boolean = false;\n investicationDetailMaxHasError: boolean = false;\n errorMessage = this.getErrorMessage(false);\n unassignedRecord:IBSPayments;\n siteID: string = null;\n investigationComment: string;\n isConfirmButtondisabled:Boolean = false;\n ccdReference: string = null;\n exceptionReference: string = null;\n isStrategicFixEnable: boolean = true;\n\n constructor(private formBuilder: FormBuilder,\n private paymentViewService: PaymentViewService,\n private paymentLibComponent: PaymentLibComponent,\n private bulkScaningPaymentService: BulkScaningPaymentService) { }\n\n ngOnInit() {\n this.viewStatus = 'mainForm';\n this.ccdCaseNumber = this.paymentLibComponent.CCD_CASE_NUMBER;\n this.bspaymentdcn = this.paymentLibComponent.bspaymentdcn;\n this.isStrategicFixEnable = this.paymentLibComponent.ISSFENABLE;\n this.getUnassignedPayment();\n\n this.markPaymentUnidentifiedForm = this.formBuilder.group({\n investicationDetail: new FormControl('', Validators.compose([\n Validators.required,\n Validators.minLength(3),\n Validators.maxLength(255),\n Validators.pattern('^([a-zA-Z0-9\\\\s,\\\\.]*)$')\n ]))\n });\n }\n getUnassignedPayment() {\n this.bulkScaningPaymentService.getBSPaymentsByDCN(this.bspaymentdcn).subscribe(\n unassignedPayments => {\n this.errorMessage = this.getErrorMessage(false);\n this.unassignedRecord = unassignedPayments['data'].payments.filter(payment => {\n return payment && payment.dcn_reference == this.bspaymentdcn;\n })[0];\n this.siteID = unassignedPayments['data'].responsible_service_id;\n const beCcdNumber = unassignedPayments['data'].ccd_reference,\n beExceptionNumber = unassignedPayments['data'].exception_record_reference,\n exceptionReference = beCcdNumber ? beCcdNumber === this.ccdCaseNumber ? null : this.ccdCaseNumber : this.ccdCaseNumber;\n this.ccdReference = beCcdNumber ? beCcdNumber : null;\n this.exceptionReference = beExceptionNumber ? beExceptionNumber : exceptionReference;\n },\n (error: any) => {\n this.errorMessage = this.getErrorMessage(true);\n }\n );\n }\n trimUnderscore(method: string){\n return this.bulkScaningPaymentService.removeUnwantedString(method,' ');\n }\n saveAndContinue() {\n this.resetForm([false, false, false, false]);\n const investicationField = this.markPaymentUnidentifiedForm.controls.investicationDetail;\n const formerror = investicationField.errors;\n if (this.markPaymentUnidentifiedForm.dirty && this.markPaymentUnidentifiedForm.valid) {\n this.investigationComment = this.markPaymentUnidentifiedForm.controls.investicationDetail.value;\n this.viewStatus = 'unidentifiedContinueConfirm';\n }else {\n if(investicationField.value == '' ) {\n this.resetForm([true, false, false, false]);\n }\n if(investicationField.value != '' && investicationField.invalid ) {\n this.resetForm([false, true, false, false]);\n }\n if(formerror && formerror.minlength && formerror.minlength.actualLength < 3 ) {\n this.resetForm([false, false, true, false]);\n }\n if(formerror && formerror.maxlength && formerror.maxlength.actualLength > 255 ) {\n this.resetForm([false, false, false, true]);\n }\n }\n }\n resetForm(val) {\n this.isInvesticationDetailEmpty = val[0];\n this.investicationDetailHasError = val[1];\n this.investicationDetailMinHasError = val[2];\n this.investicationDetailMaxHasError = val[3];\n }\n confirmPayments() {\n this.isConfirmButtondisabled = true;\n const reason = this.markPaymentUnidentifiedForm.get('investicationDetail').value;\n\n if(!this.isStrategicFixEnable) {\n let allocatedRequest = {\n allocation_status:'Unidentified',\n payment_allocation_status: {\n description: '',\n name: 'Unidentified'\n },\n unidentified_reason: reason,\n user_id: this.caseType,\n }\n const postStrategicBody = new AllocatePaymentRequest\n (this.ccdReference, this.unassignedRecord, this.caseType, this.exceptionReference, allocatedRequest);\n this.bulkScaningPaymentService.postBSWoPGStrategic(postStrategicBody).subscribe(\n res => {\n this.errorMessage = this.getErrorMessage(false);\n let response = JSON.parse(res);\n if (response.success) {\n this.gotoCasetransationPage();\n }\n },\n (error: any) => {\n this.errorMessage = this.getErrorMessage(true);\n this.isConfirmButtondisabled = false;\n });\n } else {\n this.bulkScaningPaymentService.patchBSChangeStatus(this.unassignedRecord.dcn_reference, 'PROCESSED').subscribe(\n res1 => {\n this.errorMessage = this.getErrorMessage(false);\n const requestBody = new AllocatePaymentRequest\n (this.ccdReference, this.unassignedRecord, this.siteID, this.exceptionReference)\n this.paymentViewService.postBSPayments(requestBody).subscribe(\n res2 => {\n this.errorMessage = this.getErrorMessage(false);\n const response2 = JSON.parse(res2),\n reqBody = new UnidentifiedPaymentsRequest\n (response2['data'].payment_group_reference, response2['data'].reference, reason);\n if (response2.success) {\n this.paymentViewService.postBSUnidentifiedPayments(reqBody).subscribe(\n res3 => {\n this.errorMessage = this.getErrorMessage(false);\n const response3 = JSON.parse(res3);\n if (response3.success) {\n this.gotoCasetransationPage();\n }\n },\n (error: any) => {\n this.bulkScaningPaymentService.patchBSChangeStatus(this.unassignedRecord.dcn_reference, 'COMPLETE').subscribe();\n this.errorMessage = this.getErrorMessage(true);\n this.isConfirmButtondisabled = false;\n }\n );\n }\n },\n (error: any) => {\n this.bulkScaningPaymentService.patchBSChangeStatus(this.unassignedRecord.dcn_reference, 'COMPLETE').subscribe();\n this.errorMessage = this.getErrorMessage(true);\n this.isConfirmButtondisabled = false;\n }\n );\n },\n (error: any) => {\n this.errorMessage = this.getErrorMessage(true);\n this.isConfirmButtondisabled = false;\n }\n );\n }\n }\n cancelMarkUnidentifiedPayments(type?:string){\n if(type && type === 'cancel') {\n if(this.markPaymentUnidentifiedForm.get('investicationDetail').value!==\"\"){\n this.viewStatus = 'unidentifiedCancelConfirm';\n } else {\n this.gotoCasetransationPage();\n }\n } else {\n this.viewStatus = 'mainForm';\n }\n }\n\n gotoCasetransationPage() {\n this.paymentLibComponent.viewName = 'case-transactions';\n this.paymentLibComponent.TAKEPAYMENT = true;\n this.paymentLibComponent.ISBSENABLE = true;\n }\n getErrorMessage(isErrorExist) {\n return {\n title: \"There is a problem with the service\",\n body: \"Try again later\",\n showError: isErrorExist\n };\n }\n}\n","\nexport class UnsolicitedPaymentsRequest {\n payment_allocation_status: any;\n payment_group_reference: string;\n payment_reference: string;\n receiving_office: string;\n receiving_email_address: string;\n sending_email_address: string;\n unidentified_reason: string;\n constructor(payment_group_reference: string, payment_reference : string, reason: string,responsible_office: string, responsible_person:string,email_id: string) {\n this.payment_allocation_status = {\n description: '',\n name: \"Transferred\"\n };\n this.payment_group_reference = payment_group_reference;\n this.payment_reference= payment_reference;\n this.unidentified_reason= reason;\n this.receiving_office= responsible_office;\n this.receiving_email_address= email_id;\n this.sending_email_address= responsible_person;\n }\n}\n","import { Component, OnInit, Input } from '@angular/core';\nimport { FormBuilder, FormGroup, Validators, FormControl } from '@angular/forms';\nimport { PaymentLibComponent } from '../../payment-lib.component';\nimport { BulkScaningPaymentService } from '../../services/bulk-scaning-payment/bulk-scaning-payment.service';\nimport { IBSPayments } from '../../interfaces/IBSPayments';\nimport { UnsolicitedPaymentsRequest } from '../../interfaces/UnsolicitedPaymentsRequest';\nimport { PaymentViewService } from '../../services/payment-view/payment-view.service';\nimport { AllocatePaymentRequest } from '../../interfaces/AllocatePaymentRequest';\nimport { ErrorHandlerService } from '../../services/shared/error-handler.service';\n\n\n@Component({\n selector: 'app-mark-unsolicited-payment',\n templateUrl: './mark-unsolicited-payment.component.html',\n styleUrls: ['./mark-unsolicited-payment.component.scss']\n})\nexport class MarkUnsolicitedPaymentComponent implements OnInit {\n @Input() caseType: string;\n markPaymentUnsolicitedForm: FormGroup;\n viewStatus: string;\n reasonHasError: boolean = false;\n isReasonEmpty: boolean = false;\n reasonMinHasError: boolean = false;\n reasonMaxHasError: boolean = false;\n responsibleOfficeHasError: boolean = false;\n isResponsibleOfficeEmpty: boolean = false;\n errorMessage = this.getErrorMessage(false);\n ccdCaseNumber: string;\n bspaymentdcn: string;\n unassignedRecord: IBSPayments;\n siteID: string = null;\n reason: string;\n responsiblePerson: string;\n responsibleOffice: string;\n emailId: string;\n isConfirmButtondisabled: Boolean = false;\n isContinueButtondisabled: Boolean = false;\n ccdReference: string = null;\n exceptionReference: string = null;\n selectedSiteId: string;\n selectedSiteName: string;\n isStrategicFixEnable: boolean = true;\n siteIDList;\n\n constructor(private formBuilder: FormBuilder,\n private paymentViewService: PaymentViewService,\n private paymentLibComponent: PaymentLibComponent,\n private bulkScaningPaymentService: BulkScaningPaymentService) { }\n\n ngOnInit() {\n this.resetForm([false,false,false,false,false,false], 'all');\n this.viewStatus = 'mainForm';\n this.ccdCaseNumber = this.paymentLibComponent.CCD_CASE_NUMBER;\n this.bspaymentdcn = this.paymentLibComponent.bspaymentdcn;\n this.isStrategicFixEnable = this.paymentLibComponent.ISSFENABLE;\n this.getUnassignedPayment();\n\n this.paymentViewService.getSiteID().subscribe(\n siteids => {\n this.isContinueButtondisabled = false;\n this.errorMessage = this.getErrorMessage(false);\n this.siteIDList = JSON.parse(siteids);\n },\n err => {\n window.scrollTo(0, 0);\n this.isContinueButtondisabled = true;\n this.errorMessage = this.getErrorMessage(true);\n }\n );\n \n this.markPaymentUnsolicitedForm = this.formBuilder.group({\n reason: new FormControl('', Validators.compose([\n Validators.required,\n Validators.minLength(3),\n Validators.maxLength(255),\n Validators.pattern('^([a-zA-Z0-9\\\\s,\\\\.]*)$')\n ])),\n responsibleOffice: new FormControl('', Validators.compose([\n Validators.required,\n Validators.pattern('^([a-zA-Z0-9\\\\s\\\\n,\\\\.-:]*)$')\n ])),\n responsiblePerson: new FormControl(''),\n emailId: new FormControl('')\n });\n }\n trimUnderscore(method: string){\n return this.bulkScaningPaymentService.removeUnwantedString(method,' ');\n }\n confirmPayments() {\n this.isConfirmButtondisabled = true;\n const controls = this.markPaymentUnsolicitedForm.controls;\n if(!this.isStrategicFixEnable) {\n let allocatedRequest = {\n allocation_status:'Transferred',\n payment_allocation_status: {\n description: '',\n name: 'Transferred'\n },\n unidentified_reason: controls.reason.value,\n receiving_office: this.selectedSiteId,\n user_id: this.caseType,\n }\n const postStrategicBody = new AllocatePaymentRequest\n (this.ccdReference, this.unassignedRecord, this.caseType, this.exceptionReference, allocatedRequest);\n this.bulkScaningPaymentService.postBSWoPGStrategic(postStrategicBody).subscribe(\n res => {\n this.errorMessage = this.getErrorMessage(false);\n let response = JSON.parse(res);\n if (response.success) {\n this.gotoCasetransationPage();\n }\n },\n (error: any) => {\n this.errorMessage = this.getErrorMessage(true);\n this.isConfirmButtondisabled = false;\n });\n } else {\n // controls.responsibleOffice.setValue('P219');\n this.bulkScaningPaymentService.patchBSChangeStatus(this.unassignedRecord.dcn_reference, 'PROCESSED').subscribe(\n res1 => {\n this.errorMessage = this.getErrorMessage(false);\n const response1 = JSON.parse(res1),\n requestBody = new AllocatePaymentRequest\n (this.ccdReference, this.unassignedRecord, this.siteID, this.exceptionReference)\n this.paymentViewService.postBSPayments(requestBody).subscribe(\n res2 => {\n this.errorMessage = this.getErrorMessage(false);\n const response2 = JSON.parse(res2),\n reqBody = new UnsolicitedPaymentsRequest\n (response2['data'].payment_group_reference, response2['data'].reference, controls.reason.value, this.selectedSiteId, controls.responsiblePerson.value, controls.emailId.value);\n if (response2.success) {\n this.paymentViewService.postBSUnsolicitedPayments(reqBody).subscribe(\n res3 => {\n this.errorMessage = this.getErrorMessage(false);\n const response3 = JSON.parse(res3);\n if (response3.success) {\n this.gotoCasetransationPage();\n }\n },\n (error: any) => {\n this.bulkScaningPaymentService.patchBSChangeStatus(this.unassignedRecord.dcn_reference, 'COMPLETE').subscribe();\n this.errorMessage = this.getErrorMessage(true);\n this.isConfirmButtondisabled = false;\n }\n );\n }\n },\n (error: any) => {\n this.bulkScaningPaymentService.patchBSChangeStatus(this.unassignedRecord.dcn_reference, 'COMPLETE').subscribe();\n this.errorMessage = this.getErrorMessage(true);\n this.isConfirmButtondisabled = false;\n }\n );\n },\n (error: any) => {\n this.errorMessage = this.getErrorMessage(true);\n this.isConfirmButtondisabled = false;\n }\n );\n }\n }\n saveAndContinue() {\n this.resetForm([false,false,false,false,false,false], 'all');\n const formerror = this.markPaymentUnsolicitedForm.controls.reason.errors;\n const reasonField = this.markPaymentUnsolicitedForm.controls.reason;\n //const officeIdField = this.selectedSiteId;\n const officeIdField = this.markPaymentUnsolicitedForm.controls.responsibleOffice;\n if (this.markPaymentUnsolicitedForm.dirty && this.markPaymentUnsolicitedForm.valid) {\n const controls = this.markPaymentUnsolicitedForm.controls;\n this.emailId = controls.emailId.value;\n this.responsibleOffice = officeIdField.value;\n this.responsiblePerson = controls.responsiblePerson.value;\n this.reason = controls.reason.value;\n this.viewStatus = 'unsolicitedContinueConfirm';\n }else {\n if( reasonField.value == '' ) {\n this.resetForm([true,false,false,false,false,false], 'reason');\n }\n if(reasonField.value != '' && this.markPaymentUnsolicitedForm.controls.reason.invalid ) {\n this.resetForm([false,true,false,false,false,false], 'reason');\n }\n if(formerror && formerror.minlength && formerror.minlength.actualLength < 3 ) {\n this.resetForm([false,false,true,false,false,false], 'reason');\n }\n if(formerror && formerror.maxlength && formerror.maxlength.actualLength > 255 ) {\n this.resetForm([false,false,false,true,false,false], 'reason');\n }\n if(officeIdField.value == '') {\n this.resetForm([false,false,false,false,true,false], 'responsibleOffice');\n }\n if(officeIdField.value != '' && officeIdField.invalid) {\n this.resetForm([false,false,false,false,false,true],'responsibleOffice');\n }\n }\n }\n resetForm(val, field) {\n if(field==='reason' || field==='all') {\n this.isReasonEmpty = val[0];\n this.reasonHasError = val[1];\n this.reasonMinHasError = val[2];\n this.reasonMaxHasError = val[3];\n }\n if(field==='responsibleOffice' || field==='all') {\n this.isResponsibleOfficeEmpty = val[4];\n this.responsibleOfficeHasError = val[5];\n }\n }\n\ncancelMarkUnsolicitedPayments(type?:string){\n if(type && type === 'cancel') {\n if(this.checkingFormValue()){\n this.viewStatus = 'unsolicitedCancelConfirm';\n } else {\n this.gotoCasetransationPage();\n }\n } else {\n this.markPaymentUnsolicitedForm.controls.responsibleOffice.setValue('');\n this.viewStatus = 'mainForm';\n }\n }\n checkingFormValue(){\n const formFields = this.markPaymentUnsolicitedForm.value;\n let valueExists = false;\n\n for (var field in formFields) {\n if (formFields.hasOwnProperty(field) && formFields[field] !==\"\") {\n valueExists = true;\n break;\n }\n }\n return valueExists;\n }\n gotoCasetransationPage() {\n this.paymentLibComponent.viewName = 'case-transactions';\n this.paymentLibComponent.TAKEPAYMENT = true;\n this.paymentLibComponent.ISBSENABLE = true;\n }\n getUnassignedPayment() {\n this.bulkScaningPaymentService.getBSPaymentsByDCN(this.bspaymentdcn).subscribe(\n unassignedPayments => {\n \n this.unassignedRecord = unassignedPayments['data'].payments.filter(payment => {\n return payment && payment.dcn_reference == this.bspaymentdcn;\n })[0];\n this.siteID = unassignedPayments['data'].responsible_service_id;\n const beCcdNumber = unassignedPayments['data'].ccd_reference,\n beExceptionNumber = unassignedPayments['data'].exception_record_reference,\n exceptionReference = beCcdNumber ? beCcdNumber === this.ccdCaseNumber ? null : this.ccdCaseNumber : this.ccdCaseNumber;\n this.ccdReference = beCcdNumber ? beCcdNumber : null;\n this.exceptionReference = beExceptionNumber ? beExceptionNumber : exceptionReference;\n },\n (error: any) => {\n this.errorMessage = this.getErrorMessage(true);\n }\n );\n }\n\n getErrorMessage(isErrorExist) {\n return {\n title: \"Something went wrong.\",\n body: \"Please try again later.\",\n showError: isErrorExist\n };\n }\n\n selectchange(args){ \n this.selectedSiteId = args.target.value; \n this.selectedSiteName = args.target.options[args.target.selectedIndex].text; \n } \n\n}\n","import { Component, OnInit, Output,Input, EventEmitter } from '@angular/core';\nimport { BulkScaningPaymentService } from '../../services/bulk-scaning-payment/bulk-scaning-payment.service';\nimport { PaymentLibComponent } from '../../payment-lib.component';\nimport { IBSPayments } from '../../interfaces/IBSPayments';\nimport {Router} from '@angular/router';\nimport { PaymentViewService } from '../../services/payment-view/payment-view.service';\nimport { OrderslistService } from '../../services/orderslist.service';\n\n@Component({\n selector: 'ccpay-app-unprocessed-payments',\n templateUrl: './unprocessed-payments.component.html',\n styleUrls: ['./unprocessed-payments.component.scss']\n})\nexport class UnprocessedPaymentsComponent implements OnInit {\n\n @Input('FEE_RECORDS_EXISTS') FEE_RECORDS_EXISTS: boolean;\n @Input('PAYMENTREF') PAYMENTREF: string;\n @Input('ISTURNOFF') ISTURNOFF: boolean;\n @Input('IS_BUTTON_ENABLE') IS_BUTTON_ENABLE: boolean;\n @Input('IS_OS_AMT_AVAILABLE') IS_OS_AMT_AVAILABLE: boolean;\n @Input('ISSFENABLE') ISSFENABLE: boolean;\n @Input('PAYMENTSLENGTH') PAYMENTSLENGTH:Number;\n @Input('LEVEL')LEVEL:Number;\n\n @Output() selectedUnprocessedFeeEvent: EventEmitter<string> = new EventEmitter();\n @Output() getUnprocessedFeeCount: EventEmitter<string> = new EventEmitter();\n\n viewStatus = 'main';\n unassignedRecordList: IBSPayments;\n upPaymentErrorMessage: string = null;\n ccdCaseNumber: string;\n recordId: string = null;\n isRecordExist: boolean = false;\n dcnNumber: string = null;\n selectedOption: string;\n isUnprocessedRecordSelected: boolean = true;\n isAllocateToExistingFeebtnEnabled: boolean = false;\n isMarkAsUnidentifiedbtnEnabled: boolean = false;\n isAllocatedToNewFeebtnEnabled: boolean = false;\n isExceptionCase: boolean = false;\n serviceId: string = null;\n isBulkScanEnable;\n isTurnOff: boolean = true;\n isStFixEnable;\n unassignedRecordSelectedList: IBSPayments;\n unassignedRecordListLength: number = 0;\n showContent: boolean;\n\n constructor(private router: Router,\n private bulkScaningPaymentService: BulkScaningPaymentService,\n private paymentLibComponent: PaymentLibComponent,\n private paymentViewService: PaymentViewService,\n private OrderslistService: OrderslistService\n ) { }\n\n ngOnInit() {\n // Todo ...\n this.ccdCaseNumber = this.paymentLibComponent.CCD_CASE_NUMBER;\n this.selectedOption = this.paymentLibComponent.SELECTED_OPTION.toLocaleLowerCase();\n this.dcnNumber = this.paymentLibComponent.DCN_NUMBER;\n this.isBulkScanEnable = this.paymentLibComponent.ISBSENABLE;\n this.isTurnOff = this.paymentLibComponent.ISTURNOFF;\n this.isStFixEnable = this.paymentLibComponent.ISSFENABLE;\n this.OrderslistService.getFeeExists().subscribe( (data) => this.FEE_RECORDS_EXISTS = data);\n this.getUnassignedPaymentlist();\n\n }\n\n getUnassignedPaymentlist() {\n if (this.selectedOption === 'dcn') {\n this.bulkScaningPaymentService.getBSPaymentsByDCN(this.dcnNumber).subscribe(\n unassignedPayments => {\n // unassignedPayments['data'].map(data => data.expandable=false);\n if(unassignedPayments['data'] && unassignedPayments['data'].payments) {\n this.setValuesForUnassignedRecord(unassignedPayments['data']);\n } else if(unassignedPayments['payments']) {\n this.setValuesForUnassignedRecord(unassignedPayments);\n } else {\n this.upPaymentErrorMessage = 'error';\n this.getUnprocessedFeeCount.emit('0');\n }\n },\n (error: any) => {\n this.upPaymentErrorMessage = error;\n this.getUnprocessedFeeCount.emit('0');\n }\n );\n } else {\n this.bulkScaningPaymentService.getBSPaymentsByCCD(this.ccdCaseNumber).subscribe(\n unassignedPayments => {\n // unassignedPayments['data'].map(data => data.expandable=false);\n if(unassignedPayments['data'] && unassignedPayments['data'].payments) {\n this.setValuesForUnassignedRecord(unassignedPayments['data']);\n } else if(unassignedPayments['payments']) {\n this.setValuesForUnassignedRecord(unassignedPayments);\n } else {\n this.upPaymentErrorMessage = 'error';\n this.getUnprocessedFeeCount.emit('0');\n }\n },\n (error: any) => {\n this.upPaymentErrorMessage = error;\n this.getUnprocessedFeeCount.emit('0');\n }\n );\n }\n\n }\n\n setValuesForUnassignedRecord(unassignedPayments) {\n\n this.unassignedRecordList = unassignedPayments.payments;\n if(this.unassignedRecordList){\n this.unassignedRecordListLength = unassignedPayments.payments.length\n }\n this.serviceId = unassignedPayments.responsible_service_id;\n if (unassignedPayments['ccd_reference'] === undefined) {\n this.isExceptionCase = true;\n }\n // this.isRecordExist = this.unassignedRecordList.length === 0;\n this.getUnprocessedFeeCount.emit(<any>this.unassignedRecordList.length);\n this.unprocessedPaymentSelectEvent(this.unassignedRecordList);\n }\n\n formatUnassignedRecordId(ID: Number) {\n return `unassignrecord-${ID}`;\n }\n\n trimUnderscore(method: string){\n return this.bulkScaningPaymentService.removeUnwantedString(method,' ');\n }\n\n redirectToFeeSearchPage(event: any, dcn_reference:any) {\n event.preventDefault();\n this.recordId = dcn_reference;\n let url = this.isBulkScanEnable ? '&isBulkScanning=Enable' : '&isBulkScanning=Disable';\n url += this.ISTURNOFF ? '&isTurnOff=Enable' : '&isTurnOff=Disable';\n url += this.isStFixEnable ? '&isStFixEnable=Enable' : '&isStFixEnable=Disable';\n url +=`&caseType=${this.paymentLibComponent.CASETYPE}`;\n\n this.router.navigateByUrl(`/fee-search?selectedOption=${this.selectedOption}&ccdCaseNumber=${this.ccdCaseNumber}&dcn=${this.recordId}${url}`);\n }\n\n loadUnsolicitedPage(viewName: string, dcn_reference:any) {\n this.recordId = dcn_reference;\n this.paymentLibComponent.bspaymentdcn = this.recordId;\n this.paymentLibComponent.viewName = viewName;\n }\n\n unprocessedPaymentSelectEvent(selectedRecordReference: any) {\n this.isUnprocessedRecordSelected = true;\n this.validateButtons();\n this.selectedUnprocessedFeeEvent.emit(selectedRecordReference);\n }\n\n resetButtons() {\n this.isUnprocessedRecordSelected = false;\n this.isAllocateToExistingFeebtnEnabled = false;\n this.isMarkAsUnidentifiedbtnEnabled = false;\n this.isAllocatedToNewFeebtnEnabled = false;\n }\n\n goToAllocatePage(dcn_reference:any) {\n this.paymentLibComponent.bspaymentdcn = dcn_reference;\n this.paymentLibComponent.unProcessedPaymentServiceId = this.serviceId\n this.paymentLibComponent.isTurnOff = this.ISTURNOFF;\n this.paymentLibComponent.ISSFENABLE = this.isStFixEnable;\n\n if(this.ISTURNOFF) {\n this.paymentLibComponent.paymentGroupReference = this.PAYMENTREF;\n this.paymentLibComponent.viewName = 'fee-summary';\n }else {\n this.paymentLibComponent.paymentGroupReference = null;\n this.paymentLibComponent.viewName = 'allocate-payments';\n }\n\n }\n\n validateButtons() {\n if ( this.isUnprocessedRecordSelected && this.isExceptionCase) {\n this.isMarkAsUnidentifiedbtnEnabled = true;\n } else if ( this.isUnprocessedRecordSelected && !this.isExceptionCase && !this.FEE_RECORDS_EXISTS) {\n this.isAllocateToExistingFeebtnEnabled = false;\n this.isAllocatedToNewFeebtnEnabled = true;\n } else if( this.isUnprocessedRecordSelected && !this.isExceptionCase && this.FEE_RECORDS_EXISTS ) {\n if(!this.ISTURNOFF) {\n this.isAllocateToExistingFeebtnEnabled = true;\n this.isAllocatedToNewFeebtnEnabled = false;\n } else {\n this.isAllocateToExistingFeebtnEnabled = this.IS_OS_AMT_AVAILABLE;\n this.isAllocatedToNewFeebtnEnabled = true;\n }\n }\n }\n\n unprocessedPaymentUnSelectEvent(event: any) {\n event.preventDefault();\n this.recordId = null;\n this.isUnprocessedRecordSelected = false;\n this.isAllocateToExistingFeebtnEnabled = false;\n this.isAllocatedToNewFeebtnEnabled = false;\n this.isMarkAsUnidentifiedbtnEnabled = false;\n //this.validateButtons();\n this.selectedUnprocessedFeeEvent.emit('');\n }\n\n showDetailRow(event: any,obj: any, i: any) {\n event.preventDefault();\n\n this.unassignedRecordSelectedList = obj;\n\n }\n}\n","import { Component, OnInit, Input, Output, EventEmitter } from '@angular/core';\nimport { BulkScaningPaymentService } from '../../services/bulk-scaning-payment/bulk-scaning-payment.service';\nimport {IPayment} from '../../interfaces/IPayment';\nimport {Router} from '@angular/router';\n\n@Component({\n selector: 'ccpay-app-processed-payments',\n templateUrl: './processed-payments.component.html',\n styleUrls: ['./processed-payments.component.scss']\n})\nexport class ProcessedPaymentsComponent implements OnInit {\n\n @Input('NONPAYMENTS') NONPAYMENTS: IPayment[];\n @Output() goToPaymentViewComponent: EventEmitter<any> = new EventEmitter();\n\n constructor(\n private router: Router,\n private bulkScaningPaymentService: BulkScaningPaymentService\n ) { }\n ngOnInit() {\n }\n\n trimUnderscore(method: string){\n return this.bulkScaningPaymentService.removeUnwantedString(method,' ');\n }\n redirectToPaymentViewPage(paymentGroupReference: string, paymentReference: string, paymentMethod: string) {\n this.goToPaymentViewComponent.emit({paymentGroupReference, paymentReference, paymentMethod});\n }\n}\n","\nexport class IAllocationPaymentsRequest {\n payment_allocation_status: any;\n payment_group_reference: string;\n payment_reference: string;\n reason: string;\n explanation: string;\n user_name: string;\n constructor(payment_group_reference: string, payment_reference : string, reason? : string, explanation? : string, userName? : string) {\n this.payment_allocation_status = {\n description: '',\n name: \"Allocated\"\n };\n this.payment_group_reference = payment_group_reference;\n this.payment_reference= payment_reference;\n this.reason = reason ? reason : null;\n this.explanation = explanation ? explanation : null;\n this.user_name = userName ? userName : null;\n }\n}\n","import { Component, OnInit, Input } from '@angular/core';\nimport { FormBuilder, FormGroup, Validators, FormControl } from '@angular/forms';\nimport { PaymentLibComponent } from '../../payment-lib.component';\nimport { PaymentViewService } from '../../services/payment-view/payment-view.service';\nimport {CaseTransactionsService} from '../../services/case-transactions/case-transactions.service'; \nimport {BulkScaningPaymentService} from '../../services/bulk-scaning-payment/bulk-scaning-payment.service';\nimport { ErrorHandlerService } from '../../services/shared/error-handler.service';\nimport {IPaymentGroup} from '../../interfaces/IPaymentGroup';\nimport {IBSPayments} from '../../interfaces/IBSPayments';\nimport {AllocatePaymentRequest} from '../../interfaces/AllocatePaymentRequest';\nimport {IAllocationPaymentsRequest} from '../../interfaces/IAllocationPaymentsRequest';\nimport { IOrderReferenceFee } from '../../interfaces/IOrderReferenceFee';\nimport { OrderslistService } from '../../services/orderslist.service';\n\n\n\n@Component({\n selector: 'app-allocate-payments',\n templateUrl: './allocate-payments.component.html',\n styleUrls: ['./allocate-payments.component.scss']\n})\nexport class AllocatePaymentsComponent implements OnInit {\n @Input() isTurnOff: boolean;\n @Input() caseType: string;\n\n overUnderPaymentForm: FormGroup;\n viewStatus: string;\n ccdCaseNumber: string;\n bspaymentdcn: string;\n recordId:string;\n feedbackUrlLabel:string;\n unAllocatedPayment: IBSPayments = {\n amount: 0\n };\n siteID: string = null;\n errorMessage = this.errorHandlerService.getServerErrorMessage(false, false, '');\n paymentGroup: IPaymentGroup;\n paymentGroups: IPaymentGroup[] = [];\t\n remainingAmount: number;\n isRemainingAmountGtZero: boolean;\n isMoreDetailsBoxHide: boolean = true;\n isRemainingAmountLtZero: boolean;\n afterFeeAllocateOutstanding: number;\n amountForAllocation: number;\n isConfirmButtondisabled: boolean = false;\n isContinueButtondisabled: boolean = true;\n otherPaymentExplanation: string = null;\n selectedOption: string = null;\n isFeeAmountZero: boolean = false;\t\n\n paymentReasonHasError: boolean = false;\n paymentExplanationHasError: boolean = false;\n isPaymentDetailsEmpty: boolean = false;\n isPaymentDetailsInvalid: boolean = false;\n paymentDetailsMinHasError: boolean = false;\n paymentDetailsMaxHasError: boolean = false;\n isUserNameEmpty: boolean = false;\n isUserNameInvalid: boolean = false;\n ccdReference: string = null;\n exceptionReference: string = null;\n paymentReason: string = null;\n paymentExplanation: string = null;\n userName: string = null;\n paymentSectionLabel: any;\n paymentRef: string = null;\n isStrategicFixEnable: boolean = true;\n orderLevelFees: IOrderReferenceFee[] = [];\n cookieUserName: string[] = [];\n enCookieUserName: any;\n userNameField: string = null;\n\n reasonList: { [key: string]: { [key: string]: string } }= {\n overPayment: {\n hwfReward: 'Help with Fees (HWF) awarded. Please include the HWF reference number in the explanatory note',\n wrongFee: 'Incorrect payment received',\n notIssueCase: 'Unable to issue case',\n otherDeduction: 'Other'\n },\n shortFall: {\n helpWithFee: 'Help with Fees (HWF) application declined',\n wrongFee: 'Incorrect payment received',\n other: 'Other'\n }\n }\n explanationList = {\n overPayment: {\n referRefund: 'Details in case notes. Refund due',\n noRefund: 'Details in case notes. No refund due',\n noCase: 'No case created. Refund due',\n other: 'Other'\n },\n shortFall: {\n holdCase: 'I have put a stop on the case and contacted the applicant requesting the balance of payment',\n heldCase: 'I have put a stop on the case. The applicant needs to be contacted to request the balance of payment',\n other: 'Other'\n }\n }\n\n refund = {\n reason: {\n duplicate: 'Duplicate payment',\n humanerror: 'Human error',\n caseWithdrawn: 'Case withdrawn',\n other: 'Other'\n }\n }\n\n\n constructor(\n private errorHandlerService: ErrorHandlerService,\n private caseTransactionsService: CaseTransactionsService,\n private formBuilder: FormBuilder,\n private paymentViewService: PaymentViewService,\n private paymentLibComponent: PaymentLibComponent,\n private bulkScaningPaymentService: BulkScaningPaymentService,\n private OrderslistService: OrderslistService) { }\n\n ngOnInit() {\n this.viewStatus = 'mainForm';\n if (this.paymentLibComponent.paymentGroupReference !== null) {\n this.viewStatus = 'allocatePaymentConfirmation';\n }\n \n this.ccdCaseNumber = this.paymentLibComponent.CCD_CASE_NUMBER;\n this.bspaymentdcn = this.paymentLibComponent.bspaymentdcn;\n this.paymentRef = this.paymentLibComponent.paymentGroupReference;\n this.selectedOption = this.paymentLibComponent.SELECTED_OPTION;\n this.isStrategicFixEnable = this.paymentLibComponent.ISSFENABLE;\n this.isTurnOff = this.paymentLibComponent.isTurnOff;\n this.overUnderPaymentForm = this.formBuilder.group({\n moreDetails: new FormControl('', Validators.compose([\n Validators.required,\n Validators.minLength(3),\n Validators.maxLength(255),\n Validators.pattern('^([a-zA-Z0-9\\\\s,\\\\.]*)$')\n ])),\n userName: new FormControl('', Validators.compose([\n Validators.required,\n Validators.pattern('^([a-zA-Z0-9\\\\s]*)$')\n ])),\n });\n this.OrderslistService.getOrdersList().subscribe( (data) =>\n this.orderLevelFees = data.filter(data => data.orderStatus !== 'Paid'));\n this.OrderslistService.getCaseType().subscribe( (data) => this.caseType = data);\n this.getUnassignedPayment();\n }\n getGroupOutstandingAmount(paymentGroup: IPaymentGroup): number {\n return this.bulkScaningPaymentService.calculateOutStandingAmount(paymentGroup);\n }\n\n getPaymentGroupDetails(){\n\n if(!this.isTurnOff){\n this.paymentViewService.getPaymentGroupDetails(this.paymentRef).subscribe(\n paymentGroup => {\n this.errorMessage = this.errorHandlerService.getServerErrorMessage(false, false, '');\n this.paymentGroup = paymentGroup;\n this.saveAndContinue();\n },\n (error: any) => {\n this.errorMessage = this.errorHandlerService.getServerErrorMessage(true, false, '');\n }\n );\n }else {\n this.caseTransactionsService.getPaymentGroups(this.ccdCaseNumber).subscribe(\n paymentGroups => {\n this.errorMessage = this.errorHandlerService.getServerErrorMessage(false, false, '');\n this.paymentGroups = paymentGroups['payment_groups'].filter(paymentGroup => {\n paymentGroup.fees.forEach(fee => {\n if(fee.calculated_amount === 0) {\n this.isFeeAmountZero = true\n }\n });\n let fstCon = this.getGroupOutstandingAmount(<IPaymentGroup>paymentGroup),\n scndCn = fstCon > 0 || (fstCon == 0 && this.isFeeAmountZero) && paymentGroup.payment_group_reference === this.paymentRef;\n return this.paymentRef ? scndCn : fstCon > 0 || (fstCon == 0 && this.isFeeAmountZero);\n });\n },\n (error: any) => {\n this.errorMessage = this.errorHandlerService.getServerErrorMessage(true, false, '');\n }\n );\n }\n\n }\n\n selectedPaymentGroup(paymentGroup: IPaymentGroup) {\t\n this.isContinueButtondisabled = false;\t\n this.paymentGroup = paymentGroup;\t\n }\t\n\n gotoCasetransationPage() {\n this.paymentLibComponent.viewName = 'case-transactions';\n this.paymentLibComponent.isTurnOff = this.isTurnOff;\n this.paymentLibComponent.TAKEPAYMENT = true;\n this.paymentLibComponent.ISBSENABLE = true;\n }\n\n gotoSummaryPage(event: any) { \n event.preventDefault();\n this.paymentLibComponent.viewName = 'fee-summary';\n this.paymentLibComponent.isTurnOff = this.isTurnOff;\n this.paymentLibComponent.TAKEPAYMENT = true;\n this.paymentLibComponent.ISBSENABLE = true;\n }\n\n cancelAllocatePayment(event: any){\n event.preventDefault();\n this.resetForm([false, false, false, false, false, false, false, false], 'all');\n if(!this.isTurnOff){\n this.paymentLibComponent.viewName = 'fee-summary';\n this.paymentLibComponent.isTurnOff = this.isTurnOff;\n this.paymentLibComponent.TAKEPAYMENT = true;\n this.paymentLibComponent.ISBSENABLE = true;\n } else {\n this.viewStatus = 'mainForm';\t\n }\n }\n confirmAllocatePayement(){\n this.enCookieUserName = document.cookie.split(\";\").find(row => row.includes(\"user-info\")).split(\"=\")[1].split(\";\");\n this.cookieUserName = JSON.parse(decodeURIComponent(this.enCookieUserName));\n \n const fullName = this.cookieUserName['forename'] + ' ' + this.cookieUserName['surname'];\n\n const paymentDetailsField = this.overUnderPaymentForm.controls.moreDetails,\n paymentFormError = this.overUnderPaymentForm.controls.moreDetails.errors,\n userNameField = fullName,\n isEmptyCondtion = this.paymentReason && this.paymentExplanation,\n isOtherOptionSelected = this.paymentExplanation === 'Other';\n\n this.resetForm([false, false, false, false, false, false, false, false], 'all');\n if ( (!this.isRemainingAmountGtZero && !this.isRemainingAmountLtZero) || isEmptyCondtion && (!isOtherOptionSelected && userNameField.length > 0 || isOtherOptionSelected && userNameField.length > 0 && paymentDetailsField.valid)) {\n this.isConfirmButtondisabled = true;\n this.otherPaymentExplanation = this.paymentExplanation === 'Other' ? paymentDetailsField.value : this.paymentExplanation;\n this.userName = userNameField;\n this.finalServiceCall();\n }else {\n if(!this.paymentReason) {\n this.resetForm([true, false, false, false, false, false, false, false], 'reason');\n }\n if(!this.paymentExplanation) {\n this.resetForm([false, true, false, false, false, false, false, false], 'explanation');\n }\n if(this.paymentExplanation && isOtherOptionSelected) {\n if(paymentDetailsField.value == '' ) {\n this.resetForm([false, false, true, false, false, false, false, false], 'other');\n }\n if(paymentDetailsField.value != '' && paymentDetailsField.invalid ) {\n this.resetForm([false, false, false, true, false, false, false, false], 'other');\n }\n if(paymentFormError && paymentFormError.minlength && paymentFormError.minlength.actualLength < 3 ) {\n this.resetForm([false, false, false, false, true, false, false, false], 'other');\n }\n if(paymentFormError && paymentFormError.maxlength && paymentFormError.maxlength.actualLength > 255 ) {\n this.resetForm([false, false, false, false, false, true, false, false], 'other');\n }\n }\n if(userNameField.length === 0) {\n this.resetForm([false, false, false, false, false, false, true, false], 'username');\n }\n }\n }\n resetForm(vals, field) {\n if(field==='reason' || field==='all') {\n this.paymentReasonHasError = vals[0];\n }\n if(field==='explanation' || field==='all') {\n this.paymentExplanationHasError = vals[1];\n }\n if(field==='other' || field==='all') {\n this.isPaymentDetailsEmpty = vals[2];\n this.isPaymentDetailsInvalid = vals[3];\n this.paymentDetailsMinHasError = vals[4];\n this.paymentDetailsMaxHasError = vals[5];\n }\n if(field==='username' || field==='all') {\n this.isUserNameEmpty = vals[6];\n this.isUserNameInvalid = vals[7];\n }\n }\n finalServiceCall() {\n if(!this.isStrategicFixEnable) {\n let allocatedRequest = {\n reason: this.paymentReason,\n allocation_status:'Allocated',\n explanation: this.otherPaymentExplanation,\n payment_allocation_status: {\n description: '',\n name: 'Allocated'\n },\n payment_group_reference: this.paymentGroup.payment_group_reference,\n case_type: this.caseType,\n user_name: this.userName\n }\n const postStrategicBody = new AllocatePaymentRequest\n (this.ccdReference, this.unAllocatedPayment, this.caseType, this.exceptionReference, allocatedRequest);\n this.bulkScaningPaymentService.postBSPaymentStrategic(postStrategicBody , this.paymentGroup.payment_group_reference).subscribe(\n res => {\n this.errorMessage = this.errorHandlerService.getServerErrorMessage(false, false, '');\n let response = JSON.parse(res);\n if (response.success) {\n this.gotoCasetransationPage();\n }\n },\n (error: any) => {\n this.errorMessage = this.errorHandlerService.getServerErrorMessage(true, false, '');\n window.scrollTo(0, 0);\n this.isConfirmButtondisabled = false;\n });\n\n } else {\n this.bulkScaningPaymentService.patchBSChangeStatus(this.unAllocatedPayment.dcn_reference, 'PROCESSED').subscribe(\n res1 => {\n this.errorMessage = this.errorHandlerService.getServerErrorMessage(false, false, '');\n let response1 = JSON.parse(res1);\n if (response1.success) {\n const requestBody = new AllocatePaymentRequest\n (this.ccdReference, this.unAllocatedPayment, this.siteID, this.exceptionReference);\n this.bulkScaningPaymentService.postBSAllocatePayment(requestBody, this.paymentGroup.payment_group_reference).subscribe(\n res2 => {\n this.errorMessage = this.errorHandlerService.getServerErrorMessage(false, false, '');\n let response2 = JSON.parse(res2);\n const reqBody = new IAllocationPaymentsRequest\n (response2['data'].payment_group_reference, response2['data'].reference, this.paymentReason, this.otherPaymentExplanation, this.userName);\n if (response2.success) {\n this.paymentViewService.postBSAllocationPayments(reqBody).subscribe(\n \n res3 => {\n this.errorMessage = this.errorHandlerService.getServerErrorMessage(false, false, '');\n let response3 = JSON.parse(res3);\n if (response3.success) {\n this.gotoCasetransationPage();\n }\n },\n (error: any) => {\n this.bulkScaningPaymentService.patchBSChangeStatus(this.unAllocatedPayment.dcn_reference, 'COMPLETE').subscribe();\n this.errorMessage = this.errorHandlerService.getServerErrorMessage(true, false, '');\n window.scrollTo(0, 0);\n this.isConfirmButtondisabled = false;\n }\n );\n }\n },\n (error: any) => {\n this.bulkScaningPaymentService.patchBSChangeStatus(this.unAllocatedPayment.dcn_reference, 'COMPLETE').subscribe();\n this.errorMessage = this.errorHandlerService.getServerErrorMessage(true, false, '');\n window.scrollTo(0, 0);\n this.isConfirmButtondisabled = false;\n }\n );\n }\n },\n (error: any) => {\n this.errorMessage = this.errorHandlerService.getServerErrorMessage(true, false, '');\n window.scrollTo(0, 0);\n this.isConfirmButtondisabled = false;\n }\n ); \n }\n }\n\n saveAndContinue(){\n if(this.paymentGroup) {\n this.isMoreDetailsBoxHide = true;\n this.overUnderPaymentForm.get('moreDetails').reset();\n this.overUnderPaymentForm.get('moreDetails').setValue('');\n this.overUnderPaymentForm.get('userName').reset();\n this.overUnderPaymentForm.get('userName').setValue('');\n this.paymentReason = '';\n this.paymentExplanation = '';\n let GroupOutstandingAmount = this.getGroupOutstandingAmount(this.paymentGroup);\n const remainingToBeAssigned = this.unAllocatedPayment.amount - GroupOutstandingAmount;\n this.isRemainingAmountGtZero = remainingToBeAssigned > 0;\n this.isRemainingAmountLtZero = remainingToBeAssigned < 0;\n this.paymentSectionLabel = this.isRemainingAmountGtZero ? { \n title: 'There is an Over payment of',\n reason: 'Provide a reason. This will be used in the Refund process.',\n }: this.isRemainingAmountLtZero ? { \n title: 'There is an Under payment of',\n reason: 'Provide a reason',\n }: { \n title:'Amount left to be allocated',\n reason:'',\n };\n this.feedbackUrlLabel = this.isRemainingAmountGtZero ? 'CONFIRMALLOCATION_SURPLUS' : this.isRemainingAmountLtZero ? 'CONFIRMALLOCATION_SHORTFALL' : 'CONFIRMALLOCATION';\n this.remainingAmount = this.isRemainingAmountGtZero ? remainingToBeAssigned : this.isRemainingAmountLtZero ? remainingToBeAssigned * -1 : 0;\n this.afterFeeAllocateOutstanding = remainingToBeAssigned >= 0 ? 0 : (remainingToBeAssigned * -1);\n this.amountForAllocation = GroupOutstandingAmount >= this.unAllocatedPayment.amount ? this.unAllocatedPayment.amount : GroupOutstandingAmount;\n if(this.isTurnOff){\n this.viewStatus = 'allocatePaymentConfirmation';\t\n }\n }\n }\n getUnassignedPayment() {\n this.bulkScaningPaymentService.getBSPaymentsByDCN(this.bspaymentdcn).subscribe(\n unassignedPayments => {\n this.errorMessage = this.errorHandlerService.getServerErrorMessage(false, false, '');\n this.unAllocatedPayment = unassignedPayments['data'].payments.filter(payment => {\n return payment && payment.dcn_reference == this.bspaymentdcn;\n })[0];\n this.siteID = unassignedPayments['data'].responsible_service_id;\n const beCcdNumber = unassignedPayments['data'].ccd_reference,\n beExceptionNumber = unassignedPayments['data'].exception_record_reference,\n exceptionReference = beCcdNumber ? beCcdNumber === this.ccdCaseNumber ? null : this.ccdCaseNumber : this.ccdCaseNumber;\n this.ccdReference = beCcdNumber ? beCcdNumber : null;\n this.exceptionReference = beExceptionNumber ? beExceptionNumber : exceptionReference;\n this.getPaymentGroupDetails();\n },\n (error: any) => {\n this.errorMessage = this.errorHandlerService.getServerErrorMessage(true, false, '');\n }\n );\n }\n selectRadioButton(key, type) {\n this.isMoreDetailsBoxHide = true;\n if( type === 'explanation' && key === 'other' ){\n this.isPaymentDetailsEmpty = false;\n this.isPaymentDetailsInvalid = false;\n this.paymentDetailsMinHasError = false;\n this.paymentDetailsMaxHasError = false;\n this.isMoreDetailsBoxHide = false;\n }\n }\n OrderListSelectEvent(orderef: any){\n this.isContinueButtondisabled = false;\n this.recordId= orderef;\n }\n\n redirectToOrderFeeSearchPage() {\n // this.paymentLibComponent.bspaymentdcn = null;\n this.paymentLibComponent.paymentGroupReference = this.recordId;\n this.paymentLibComponent.isTurnOff = this.isTurnOff;\n this.paymentLibComponent.viewName = 'fee-summary';\n}\n}\n","import { IFee } from './IFee';\n\nexport class AddRemissionRequest {\n beneficiary_name: string;\n ccd_case_number: string;\n fee: IFee;\n hwf_amount: number;\n hwf_reference: string;\n payment_group_reference: string;\n case_type: string;\n\n constructor(ccd_case_number: string, fee: IFee, hwf_amount: number, hwf_reference: string, caseType: string) {\n this.ccd_case_number = ccd_case_number;\n this.fee = fee;\n this.hwf_amount = hwf_amount;\n this.hwf_reference = hwf_reference;\n this.case_type = caseType;\n }\n}\n","export class AddRetroRemissionRequest {\n hwf_amount: number;\n hwf_reference: string;\n\n constructor(hwf_amount: number, hwf_reference: string) {\n this.hwf_amount = hwf_amount;\n this.hwf_reference = hwf_reference;\n }\n}\n","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 { 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 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 \n component: { account_number: string; amount: number; case_reference: string; ccd_case_number: string; channel: string; currency: string; customer_reference: string; date_created: string; date_updated: string; description: string; method: string; organisation_name: string; payment_allocation: any[]; reference: string; service_name: string; site_id: string; status: string; };\n\n constructor(private formBuilder: FormBuilder,\n private router: Router,\n private paymentViewService: PaymentViewService,\n private paymentLibComponent: PaymentLibComponent,\n private refundService: RefundsService,\n private cd: ChangeDetectorRef,\n private OrderslistService: OrderslistService) { }\n\n ngOnInit() {\n this.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.paymentLibComponent.iscancelClicked = true;\n this.refundListAmount.emit();\n this.paymentLibComponent.isFromRefundStatusPage = true;\n return;\n }\n if ( this.isFromRefundListPage ) {\n this.paymentLibComponent.iscancelClicked = true;\n this.refundListReason.emit({reason: this.selectedRefundReason, code: this.refundReason});\n this.paymentLibComponent.isFromRefundStatusPage = true;\n return;\n }\n this.viewStatus = '';\n this.selectedValue = 'yes';\n this.viewCompStatus = \"addremission\";\n this.isRefundRemission = true;\n this.errorMessage = '';\n 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 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 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 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\", key);\n const remissionctrls=this.remissionForm.controls;\n remissionctrls['refundDDReason'].setValue('Select a different reason', {onlySelf: true});\n remissionctrls['reason'].reset();\n this.isRefundReasonsSelected = true;\n this.errorMessage = false;\n this.errorMsg = [];\n this.isReasonEmpty = false;\n this.showReasonText = false;\n this.refundHasError = false;\n this.selectedRefundReason = key;\n if(this.selectedRefundReason.includes('Other')) {\n this.showReasonText = true;\n this.refundHasError = false;\n this.refundReason = key;\n }\n }\n\n selectchange(args) {\n const remissionctrls=this.remissionForm.controls;\n remissionctrls['refundReason'].reset();\n remissionctrls['reason'].reset();\n this.isRefundReasonsSelected = false;\n this.showReasonText = false;\n this.refundHasError = false;\n this.selectedRefundReason = args.target.options[args.target.options.selectedIndex].id;\n this.reasonLength = (29-this.selectedRefundReason.split('- ')[1].length);\n\n if(this.selectedRefundReason.includes('Other')) {\n this.showReasonText = true;\n this.refundHasError = false;\n this.refundReason = args.target.options[args.target.options.selectedIndex].id;\n }\n\n\n }\n getContactDetails(obj:IRefundContactDetails, type) {\n this.contactDetailsObj = obj;\n this.viewCompStatus = '';\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 = this.remissionForm.value.feesList.reduce((a, c) => a + c.refund_amount * c.selected, 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 this.OrderslistService.setnavigationPage('casetransactions');\n this.OrderslistService.setisFromServiceRequestPage(false);\n this.paymentLibComponent.VIEW ='case-transactions';\n this.paymentLibComponent.viewName = 'case-transactions';\n this.paymentLibComponent.ISBSENABLE = true;\n this.paymentLibComponent.isRefundStatusView = false;\n this.resetOrderData(); let partUrl = this.bsPaymentDcnNumber ? `&dcn=${this.bsPaymentDcnNumber}` : '';\n partUrl += this.paymentLibComponent.ISBSENABLE ? '&isBulkScanning=Enable' : '&isBulkScanning=Disable';\n partUrl += this.paymentLibComponent.ISTURNOFF ? '&isTurnOff=Enable' : '&isTurnOff=Disable';\n partUrl += this.isStrategicFixEnable ? '&isStFixEnable=Enable' : '&isStFixEnable=Disable';\n partUrl += `&caseType=${this.caseType}`;\n const url = `/payment-history/${this.ccdCaseNumber}?view=case-transactions&takePayment=${this.paymentLibComponent.TAKEPAYMENT}&selectedOption=${this.option}${partUrl}`;\n this.router.routeReuseStrategy.shouldReuseRoute = () => false;\n this.router.onSameUrlNavigation = 'reload';\n this.router.navigateByUrl(url);\n } else { \n\n if (this.paymentLibComponent.REFUNDLIST) {\n this.paymentLibComponent.viewName = 'refund-list';\n return;\n }\n if (this.paymentLibComponent.TAKEPAYMENT === undefined && this.paymentLibComponent.SERVICEREQUEST === undefined) {\n this.paymentLibComponent.SERVICEREQUEST = 'false';\n }\n this.OrderslistService.setisFromServiceRequestPage(false);\n this.OrderslistService.setpaymentPageView({method: '',payment_group_reference: '', reference:''});\n this.OrderslistService.setnavigationPage('casetransactions');\n this.errorMessage = '';\n this.paymentLibComponent.viewName = 'case-transactions';\n this.paymentLibComponent.ISTURNOFF = this.isTurnOff;\n this.paymentLibComponent.isFromServiceRequestPage = true;\n this.paymentLibComponent.ISBSENABLE = true;\n let partUrl = this.bsPaymentDcnNumber ? `&dcn=${this.bsPaymentDcnNumber}` : '';\n partUrl += this.paymentLibComponent.ISBSENABLE ? '&isBulkScanning=Enable' : '&isBulkScanning=Disable';\n partUrl += this.paymentLibComponent.ISTURNOFF ? '&isTurnOff=Enable' : '&isTurnOff=Disable';\n partUrl += this.isStrategicFixEnable ? '&isStFixEnable=Enable' : '&isStFixEnable=Disable';\n partUrl += `&caseType=${this.caseType}`;\n if(this.isFromPaymentDetailPage) {\n partUrl += this.paymentLibComponent.isFromPaymentDetailPage\n }\n\n if(!this.paymentLibComponent.SERVICEREQUEST) {\n const url = `/payment-history/${this.ccdCaseNumber}?view=case-transactions&takePayment=${this.paymentLibComponent.TAKEPAYMENT}&selectedOption=${this.option}${partUrl}`;\n this.router.routeReuseStrategy.shouldReuseRoute = () => false;\n this.router.onSameUrlNavigation = 'reload';\n this.router.navigateByUrl(url);\n } else {\n const url =`/payment-history/${this.ccdCaseNumber}?selectedOption=${this.option}${partUrl}`;\n this.router.routeReuseStrategy.shouldReuseRoute = () => false;\n this.router.onSameUrlNavigation = 'reload';\n this.router.navigateByUrl(url);\n }\n }\n\n }\n\n resetOrderData() {\n this.OrderslistService.setOrderRef(null);\n this.OrderslistService.setorderCCDEvent(null);\n this.OrderslistService.setorderCreated(null);\n this.OrderslistService.setorderDetail(null);\n this.OrderslistService.setorderParty(null);\n this.OrderslistService.setorderTotalPayments(null);\n this.OrderslistService.setorderRemissionTotal(null);\n this.OrderslistService.setorderFeesTotal(null);\n }\n\n 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}\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','org_id','service_name','failure_reference','failure_reason','disputed_amount','event_name','event_date','representment_status','representment_date','refund_reference','refund_amount','refund_date']});\n worksheet = this.setPaymentFailureReportHeaders(worksheet);\n worksheet = this.autoFitColumns(worksheet,json);\n } else {\n worksheet = XLSX.utils.json_to_sheet(json,{header:['resp_service_id','resp_service_name','surplus_shortfall','balance','payment_amount','ccd_case_reference', 'ccd_exception_reference', 'processed_date', 'reason', 'explanation', 'user_name']});\n worksheet = this.setShortFallReportHeaders(worksheet);\n worksheet = this.autoFitColumns(worksheet,json);\n }\n workbook = { Sheets: { 'data': worksheet }, SheetNames: ['data'] };\n const excelBuffer: any = XLSX.write(workbook, { bookType: 'xlsx', type: 'array' });\n this.saveAsExcelFile(excelBuffer, excelFileName);\n }\n\n\nprivate autoFitColumns (worksheet: XLSX.WorkSheet,json:any) : XLSX.WorkSheet {\n let objectMaxLength = []; \n let ColWidth = [];\n let obj = <any>Object;\n for (let i = 0; i < json.length; i++) {\n let value = obj.values(json[i]);\n let key = obj.keys(json[i]);\n for (let j = 0; j < value.length; j++) {\n if(value[j] === null){\n value[j] = '';\n }\n objectMaxLength[j] =\n key[j].length >= value[j].length\n ? key[j].length+2\n : value[j].length+1;\n if( value[j].length === undefined){\n objectMaxLength[j] = key[j].length+2;\n }\n ColWidth.push({'width': +objectMaxLength[j]});\n }\n }\n worksheet['!cols'] = ColWidth;\n return worksheet;\n}\n\n\nprivate setDataLossReportHeaders (worksheet: XLSX.WorkSheet): XLSX.WorkSheet {\n worksheet.A1.v = \"Loss_Resp\";\n worksheet.B1.v = \"Payment_Asset_DCN\";\n worksheet.C1.v = \"Envelope_Ref\";\n worksheet.D1.v = \"Envelope_Item\";\n worksheet.E1.v = \"Resp_Service ID\";\n worksheet.F1.v = \"Resp_Service Name\";\n worksheet.G1.v = \"Date_Banked\";\n worksheet.H1.v = \"BGC_Batch\";\n worksheet.I1.v = \"Payment_Method\";\n worksheet.J1.v = \"Amount\";\n return worksheet;\n}\n\nprivate setUnprocessedReportHeaders (worksheet: XLSX.WorkSheet): XLSX.WorkSheet {\n worksheet.A1.v = \"Resp_Service ID\";\n worksheet.B1.v = \"Resp_Service Name\";\n worksheet.C1.v = \"Exception_Ref\";\n worksheet.D1.v = \"CCD_Ref\";\n worksheet.E1.v = \"Date_Banked\";\n worksheet.F1.v = \"BGC_Batch\";\n worksheet.G1.v = \"Payment_Asset_DCN\";\n worksheet.H1.v = \"Envelope_Ref\";\n worksheet.I1.v = \"Envelope_Item\";\n worksheet.J1.v = \"Payment_Method\";\n worksheet.K1.v = \"Amount\";\n return worksheet;\n}\n\nprivate setProcessedUnallocatedReportHeaders (worksheet: XLSX.WorkSheet): XLSX.WorkSheet {\n worksheet.A1.v = \"Resp_Service ID\";\n worksheet.B1.v = \"Resp_Service Name\";\n worksheet.C1.v = \"Allocation_Status\";\n worksheet.D1.v = \"Receiving_Office\";\n worksheet.E1.v = \"Allocation_Reason\";\n worksheet.F1.v = \"CCD_Exception_Ref\";\n worksheet.G1.v = \"CCD_Case_Ref\";\n worksheet.H1.v = \"Payment_Asset_DCN\";\n worksheet.I1.v = \"Envelope_Ref\";\n worksheet.J1.v = \"Envelope_Item\";\n worksheet.K1.v = \"Date_Banked\";\n worksheet.L1.v = \"BGC_Batch\";\n worksheet.M1.v = \"Payment_Method\";\n worksheet.N1.v = \"Amount\";\n return worksheet;\n}\n\nprivate setPaymentFailureReportHeaders (worksheet: XLSX.WorkSheet): XLSX.WorkSheet {\n worksheet.A1.v = \"Payment reference\";\n worksheet.B1.v = \"CCD reference\";\n worksheet.C1.v = \"OrgID\";\n worksheet.D1.v = \"Service name\";\n worksheet.E1.v = \"Failure reference\";\n worksheet.F1.v = \"Failure reason\";\n worksheet.G1.v = \"Disputed amount\";\n worksheet.H1.v = \"Event name\";\n worksheet.I1.v = \"Event date\";\n worksheet.J1.v = \"Representment status\";\n worksheet.K1.v = \"Representment date\";\n worksheet.L1.v = \"Refund reference\";\n worksheet.M1.v = \"Refund amount\";\n worksheet.N1.v = \"Refund date\";\n return worksheet;\n}\nprivate setShortFallReportHeaders (worksheet: XLSX.WorkSheet): XLSX.WorkSheet {\n worksheet.A1.v = \"Resp_Service ID\";\n worksheet.B1.v = \"Resp_Service Name\";\n worksheet.C1.v = \"Over Payment_Under Payment\";\n worksheet.D1.v = \"Balance\";\n worksheet.E1.v = \"Payment_Amount\";\n worksheet.F1.v = \"CCD_Case_Ref\";\n worksheet.G1.v = \"Exception_Ref\";\n worksheet.H1.v = \"Processed_Date\";\n worksheet.I1.v = \"Reason\";\n worksheet.J1.v = \"Explanation\";\n worksheet.K1.v = \"Updated Name\";\n return worksheet;\n}\n\nprivate saveAsExcelFile(buffer: any, fileName: string): void {\n const data: Blob = new Blob([buffer], {\n type: EXCEL_TYPE\n });\n FileSaver.saveAs(data, fileName + EXCEL_EXTENSION);\n }\n}","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 }\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}","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';\nconst BS_ENABLE_FLAG = 'bulk-scan-enabling-fe';\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 @Input() isEliginbleToAccess: boolean;\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 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 allowedRolesToAccessRefund = ['payments-refund-approver', 'payments-refund'];\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.paymentLibComponent.isRefundStatusView) {\n this.viewName = 'refundview';\n this.OrderslistService.getRefundView().subscribe((data) => this.refundlist = data);\n this.OrderslistService.getCCDCaseNumberforRefund.subscribe((data) => this.ccdCaseNumber = data);\n } else {\n this.viewName = 'refundstatuslist';\n if(this.isEliginbleToAccess) {\n this.refundService.getRefundStatusList(this.ccdCaseNumber).subscribe(\n refundList => {\n this.rejectedRefundList = refundList['refund_list'];\n }\n ),\n (error: any) => {\n this.errorMessage = error.replace(/\"/g,\"\");\n };\n } else {\n this.rejectedRefundList = [];\n }\n\n }\n\n\n this.refundStatusForm = this.formBuilder.group({\n amount: new FormControl('', Validators.compose([\n Validators.required,\n Validators.pattern('^[0-9]+(\\.[0-9]{1,2})?$')\n ])),\n refundReason: new FormControl('', Validators.compose([Validators.required])),\n reason: new FormControl()\n });\n\n if(this.refundlist !== undefined) {\n this.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 isFromPayBubble = (): boolean => { \n return this.API_ROOT === 'api/payment-history';\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.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 this.refundlist.reason = refundListReason.reason;\n this.refundlist.code = refundListReason.code;\n this.refundCode = refundListReason.code;\n } else {\n this.isRefundBtnDisabled = true;\n }\n this.viewName = 'reviewandsubmitview';\n this.paymentLibComponent.CCD_CASE_NUMBER = this.ccdCaseNumber;\n }\n\n getRefundAmount(amount: number) {\n if (this.paymentLibComponent.isFromRefundStatusPage && !this.paymentLibComponent.iscancelClicked) {\n if (amount > 0) {\n this.changedAmount = amount;\n // this.refundlist.amount = amount;\n }\n } else {\n this.isRefundBtnDisabled = true;\n }\n this.viewName = 'reviewandsubmitview';\n this.paymentLibComponent.CCD_CASE_NUMBER = this.ccdCaseNumber;\n }\n\n getRefundFees(fees: IFee[])\n {\n this.fees = fees;\n this.refundFees = this.fees.map(obj => ({ fee_id: obj.id, code: obj.code, version:obj.version, volume: obj.volume,refund_amount:obj.refund_amount }));\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 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.viewName = 'revieweditdetailsconfirmationpage';\n }\n getContactDetailsForRefundList(obj:IRefundContactDetails) {\n this.refundlist.contact_details = obj;\n this.isEditDetailsClicked = false;\n this.isRefundBtnDisabled = false;\n this.viewName = 'reviewandsubmitview';\n }\n gotoEditDetailsPage(note?: any) {\n if(note) {\n this.notification = { contact_details: note, notification_type: note.notification_type };\n }\n this.isEditDetailsClicked = true;\n this.viewName = 'refundEditView'\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 gotoCasetransationPageCancelBtnClicked(Event: Event) {\n event.preventDefault();\n this.viewName = 'refundstatuslist';\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}","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 { 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\n constructor(\n private paymentLibComponent: PaymentLibComponent,\n private paymentViewService: PaymentViewService,\n private OrderslistService: OrderslistService,\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 }\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}","export class IserviceRequestCardPayment {\n amount: string\n currency: string\n language: string\n \n constructor(amount : string) {\n this.amount = amount;\n this.currency = 'GBP';\n this.language = 'string';\n } \n}\n ","export class IserviceRequestPbaPayment {\n account_number: string;\n amount: string\n currency: string\n customer_reference: string\n organisation_name: string\n \n constructor(account_number : string, amount : string, customer_reference: string, orgName: string) {\n this.account_number = account_number;\n this.amount = amount;\n this.currency = 'GBP';\n this.customer_reference = customer_reference;\n this.organisation_name = orgName;\n } \n}\n ","import { Component, OnInit, Input} from '@angular/core';\nimport { PaymentViewService } from '../../services/payment-view/payment-view.service';\nimport { PaymentLibComponent } from '../../payment-lib.component';\nimport { IserviceRequestCardPayment } from '../../interfaces/IserviceRequestCardPayment';\nimport { IserviceRequestPbaPayment } from '../../interfaces/IserviceRequestPbaPayment';\n\nconst BS_ENABLE_FLAG = 'bulk-scan-enabling-fe';\n\n@Component({\n selector: 'ccpay-pba-payment',\n templateUrl: './pba-payment.component.html',\n styleUrls: ['./pba-payment.component.scss']\n})\nexport class PbaPaymentComponent implements OnInit {\n @Input() pbaPayOrderRef: any;\n viewStatus: string;\n pbaAccountList: string[];\n isPBAAccountHold: boolean = false;\n errorMsg: any;\n isCardPaymentSuccess: boolean = true;\n isInSufficiantFund: boolean = false;\n isPBAAccountNotExist: boolean = false;\n isPBAServerError: boolean = false;\n isGetPBAAccountSucceed: boolean = false;\n selectedPbaAccount: string = '';\n pbaAccountRef: string = '';\n isPbaAccountSelected: boolean = false;\n isCardPaymentSelected: boolean = false;\n isPBADropdownSelected: boolean = false;\n isContinueButtondisabled: boolean = true;\n isPBAAccountPaymentSuccess: boolean = false;\n pbaAccountrPaymentResult: any;\n orgName: string = '';\n\n constructor(private paymentLibComponent: PaymentLibComponent,\n private paymentViewService: PaymentViewService) {}\n\n ngOnInit() {\n this.pbaPayOrderRef = this.paymentLibComponent.pbaPayOrderRef;\n this.viewStatus = 'pba-payment';\n this.errorMsg = null;\n this.paymentViewService.getPBAaccountDetails()\n .subscribe(\n result => {\n this.isGetPBAAccountSucceed = true;\n this.orgName = result.organisationEntityResponse.name;\n this.pbaAccountList = result.organisationEntityResponse.paymentAccount;\n },\n error => {\n this.errorMsg = error;\n }\n );\n\n }\n selectpbaaccount(args) {\n if(args.currentTarget.id === 'pbaAccountNumber') {\n this.isPBADropdownSelected = true;\n this.selectedPbaAccount = args.target.value; \n }\n if(args.currentTarget.id === 'pbaAccountRef') {\n this.pbaAccountRef = args.target.value; \n }\n if(this.selectedPbaAccount !== '' && this.pbaAccountRef !== \"\") {\n this.isContinueButtondisabled = false;\n } else {\n this.isContinueButtondisabled = true;\n }\n }\n\n saveAndContinue() {\n\n if(this.isPbaAccountSelected) {\n this.isInSufficiantFund = false;\n this.isPBAAccountNotExist = false;\n this.isPBAServerError = false;\n this.isPBAAccountPaymentSuccess = false;\n if ( this.pbaAccountList.indexOf(this.selectedPbaAccount) !== -1 ) {\n const requestBody = new IserviceRequestPbaPayment(\n this.selectedPbaAccount, this.pbaPayOrderRef.orderTotalFees, this.pbaAccountRef, this.orgName);\n this.paymentViewService.postPBAaccountPayment(this.pbaPayOrderRef.orderRefId, requestBody)\n .subscribe(\n r => {\n try {\n this.pbaAccountrPaymentResult = JSON.parse(r);\n } catch(e) {\n this.pbaAccountrPaymentResult = r;\n }\n this.isPBAAccountPaymentSuccess = true;\n },\n e => {\n if(e.status == '402') {\n this.isInSufficiantFund = true; \n } else if(e.status == '410') {\n this.isPBAAccountNotExist = true;\n } else if(e.status == '412') {\n this.isPBAAccountHold = true;\n } else {\n this.isPBAServerError = true;\n }\n }\n );\n } else {\n this.isPBAServerError = true;\n }\n } else if (this.isCardPaymentSelected) {\n this.cardPayment();\n }\n\n }\n cardPayment() {\n this.isCardPaymentSuccess = true;\n const requestBody = new IserviceRequestCardPayment (\n this.pbaPayOrderRef.orderTotalFees);\n this.paymentViewService.postWays2PayCardPayment(this.pbaPayOrderRef.orderRefId, requestBody)\n .subscribe(\n result => {\n const paymentUrl = JSON.parse(result).next_url;\n window.location.href = paymentUrl;\n },\n error => {\n this.isCardPaymentSuccess = false;\n }\n );\n\n }\n selectPaymentMethod(type: string) {\n if(type === 'PBA') {\n this.isPbaAccountSelected = true;\n this.isCardPaymentSelected = false;\n this.isPBADropdownSelected = false\n this.isContinueButtondisabled = true;\n this.selectedPbaAccount = null;\n } else if (type === 'CARD') {\n this.isPbaAccountSelected = false;\n this.isCardPaymentSelected = true;\n this.isPBADropdownSelected = false\n this.isContinueButtondisabled = false;\n }\n }\n gotoCasetransationPage() {\n this.paymentLibComponent.viewName = 'case-transactions';\n this.paymentLibComponent.TAKEPAYMENT = false;\n this.paymentLibComponent.ISBSENABLE = true;\n this.paymentLibComponent.isFromServiceRequestPage = true;\n }\n}\n","import { NgModule } from '@angular/core';\nimport { HttpClientModule } from '@angular/common/http';\nimport { CommonModule } from '@angular/common';\n\nimport { PaymentListComponent } from './components/payment-list/payment-list.component';\nimport { PaymentViewComponent } from './components/payment-view/payment-view.component';\nimport { ProcessRefundComponent } from './components/process-refund/process-refund.component';\nimport { RefundListComponent } from './components/refund-list/refund-list.component';\n\nimport { CardDetailsComponent } from './components/card-details/card-details.component';\nimport { PageNotFoundComponent } from './components/page-not-found.component';\nimport { PaymentLibComponent } from './payment-lib.component';\nimport { StatusHistoryComponent } from './components/status-history/status-history.component';\nimport { 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';\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 ],\n exports: [PaymentLibComponent],\n providers: [\n { provide: LoggerService, useClass: ConsoleLoggerService },\n XlFileService,\n WebComponentHttpClient\n ]\n})\n\nexport class PaymentLibModule { }"],"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,SAAwB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