@hmcts/ccpay-web-component 5.0.8-beta11 → 5.0.8-beta14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (94) hide show
  1. package/bundles/hmcts-ccpay-web-component.umd.js +931 -648
  2. package/bundles/hmcts-ccpay-web-component.umd.js.map +1 -1
  3. package/bundles/hmcts-ccpay-web-component.umd.min.js +2 -2
  4. package/bundles/hmcts-ccpay-web-component.umd.min.js.map +1 -1
  5. package/esm2015/lib/components/add-remission/add-remission.component.js +135 -50
  6. package/esm2015/lib/components/allocate-payments/allocate-payments.component.js +27 -23
  7. package/esm2015/lib/components/card-details/card-details.component.js +14 -14
  8. package/esm2015/lib/components/case-transactions/case-transactions.component.js +26 -22
  9. package/esm2015/lib/components/error-banner/error-banner.component.js +16 -13
  10. package/esm2015/lib/components/fee-summary/fee-summary.component.js +34 -24
  11. package/esm2015/lib/components/mark-unidentified-payment/mark-unidentified-payment.component.js +20 -19
  12. package/esm2015/lib/components/mark-unsolicited-payment/mark-unsolicited-payment.component.js +20 -19
  13. package/esm2015/lib/components/page-not-found.component.js +10 -8
  14. package/esm2015/lib/components/payment-list/payment-list.component.js +14 -14
  15. package/esm2015/lib/components/payment-view/payment-view.component.js +80 -34
  16. package/esm2015/lib/components/pba-details/pba-details.component.js +16 -13
  17. package/esm2015/lib/components/pba-payment/pba-payment.component.js +18 -17
  18. package/esm2015/lib/components/process-refund/process-refund.component.js +26 -22
  19. package/esm2015/lib/components/processed-payments/processed-payments.component.js +22 -18
  20. package/esm2015/lib/components/refund-list/refund-list.component.js +25 -18
  21. package/esm2015/lib/components/refund-status/refund-status.component.js +38 -25
  22. package/esm2015/lib/components/reports/reports.component.js +21 -20
  23. package/esm2015/lib/components/service-request/service-request.component.js +76 -33
  24. package/esm2015/lib/components/status-history/status-history.component.js +18 -17
  25. package/esm2015/lib/components/table/table.component.js +37 -24
  26. package/esm2015/lib/components/unprocessed-payments/unprocessed-payments.component.js +57 -29
  27. package/esm2015/lib/payment-lib.component.js +114 -41
  28. package/esm2015/lib/payment-lib.module.js +55 -53
  29. package/esm2015/lib/payment-lib.service.js +11 -9
  30. package/esm2015/lib/pipes/capitalize.pipe.js +11 -9
  31. package/esm2015/lib/pipes/ccd-hyphens.pipe.js +11 -9
  32. package/esm2015/lib/pipes/key-value.pipe.js +11 -9
  33. package/esm2015/lib/pipes/sanitize-html.pipe.js +9 -9
  34. package/esm2015/lib/services/bulk-scaning-payment/bulk-scaning-payment.service.js +14 -14
  35. package/esm2015/lib/services/card-details/card-details.service.js +14 -14
  36. package/esm2015/lib/services/case-transactions/case-transactions.service.js +14 -14
  37. package/esm2015/lib/services/orderslist.service.js +11 -9
  38. package/esm2015/lib/services/payment-list/payment-list.service.js +14 -14
  39. package/esm2015/lib/services/payment-view/payment-view.service.js +15 -15
  40. package/esm2015/lib/services/refunds/refunds.service.js +15 -15
  41. package/esm2015/lib/services/shared/error-handler.service.js +11 -9
  42. package/esm2015/lib/services/shared/httpclient/webcomponent.http.client.js +10 -10
  43. package/esm2015/lib/services/shared/logger/console-logger.service.js +10 -8
  44. package/esm2015/lib/services/shared/logger/logger.service.js +10 -8
  45. package/esm2015/lib/services/status-history/status-history.service.js +14 -14
  46. package/esm2015/lib/services/xl-file/xl-file.service.js +9 -7
  47. package/esm5/lib/components/add-remission/add-remission.component.js +132 -48
  48. package/esm5/lib/components/allocate-payments/allocate-payments.component.js +24 -21
  49. package/esm5/lib/components/card-details/card-details.component.js +12 -13
  50. package/esm5/lib/components/case-transactions/case-transactions.component.js +23 -21
  51. package/esm5/lib/components/error-banner/error-banner.component.js +14 -12
  52. package/esm5/lib/components/fee-summary/fee-summary.component.js +31 -23
  53. package/esm5/lib/components/mark-unidentified-payment/mark-unidentified-payment.component.js +17 -17
  54. package/esm5/lib/components/mark-unsolicited-payment/mark-unsolicited-payment.component.js +17 -17
  55. package/esm5/lib/components/page-not-found.component.js +7 -6
  56. package/esm5/lib/components/payment-list/payment-list.component.js +11 -12
  57. package/esm5/lib/components/payment-view/payment-view.component.js +79 -35
  58. package/esm5/lib/components/pba-details/pba-details.component.js +14 -12
  59. package/esm5/lib/components/pba-payment/pba-payment.component.js +15 -15
  60. package/esm5/lib/components/process-refund/process-refund.component.js +23 -20
  61. package/esm5/lib/components/processed-payments/processed-payments.component.js +19 -16
  62. package/esm5/lib/components/refund-list/refund-list.component.js +22 -16
  63. package/esm5/lib/components/refund-status/refund-status.component.js +35 -23
  64. package/esm5/lib/components/reports/reports.component.js +18 -18
  65. package/esm5/lib/components/service-request/service-request.component.js +73 -32
  66. package/esm5/lib/components/status-history/status-history.component.js +15 -15
  67. package/esm5/lib/components/table/table.component.js +34 -22
  68. package/esm5/lib/components/unprocessed-payments/unprocessed-payments.component.js +54 -27
  69. package/esm5/lib/payment-lib.component.js +111 -39
  70. package/esm5/lib/payment-lib.module.js +52 -51
  71. package/esm5/lib/payment-lib.service.js +8 -7
  72. package/esm5/lib/pipes/capitalize.pipe.js +8 -7
  73. package/esm5/lib/pipes/ccd-hyphens.pipe.js +8 -7
  74. package/esm5/lib/pipes/key-value.pipe.js +8 -7
  75. package/esm5/lib/pipes/sanitize-html.pipe.js +6 -7
  76. package/esm5/lib/services/bulk-scaning-payment/bulk-scaning-payment.service.js +11 -12
  77. package/esm5/lib/services/card-details/card-details.service.js +11 -12
  78. package/esm5/lib/services/case-transactions/case-transactions.service.js +11 -12
  79. package/esm5/lib/services/orderslist.service.js +8 -7
  80. package/esm5/lib/services/payment-list/payment-list.service.js +11 -12
  81. package/esm5/lib/services/payment-view/payment-view.service.js +12 -13
  82. package/esm5/lib/services/refunds/refunds.service.js +12 -13
  83. package/esm5/lib/services/shared/error-handler.service.js +8 -7
  84. package/esm5/lib/services/shared/httpclient/webcomponent.http.client.js +7 -8
  85. package/esm5/lib/services/shared/logger/console-logger.service.js +10 -9
  86. package/esm5/lib/services/shared/logger/logger.service.js +7 -6
  87. package/esm5/lib/services/status-history/status-history.service.js +11 -12
  88. package/esm5/lib/services/xl-file/xl-file.service.js +6 -5
  89. package/fesm2015/hmcts-ccpay-web-component.js +1009 -725
  90. package/fesm2015/hmcts-ccpay-web-component.js.map +1 -1
  91. package/fesm5/hmcts-ccpay-web-component.js +933 -650
  92. package/fesm5/hmcts-ccpay-web-component.js.map +1 -1
  93. package/hmcts-ccpay-web-component.metadata.json +1 -1
  94. package/package.json +2 -2
@@ -1 +1 @@
1
- {"version":3,"file":"hmcts-ccpay-web-component.umd.js","sources":["../../../node_modules/tslib/tslib.es6.js","ng://@hmcts/ccpay-web-component/lib/payment-lib.service.ts","ng://@hmcts/ccpay-web-component/lib/services/orderslist.service.ts","ng://@hmcts/ccpay-web-component/lib/payment-lib.component.ts","ng://@hmcts/ccpay-web-component/lib/services/shared/error-handler.service.ts","ng://@hmcts/ccpay-web-component/lib/services/shared/logger/logger.service.ts","ng://@hmcts/ccpay-web-component/lib/services/payment-list/payment-list.service.ts","ng://@hmcts/ccpay-web-component/lib/components/payment-list/payment-list.component.ts","ng://@hmcts/ccpay-web-component/lib/services/shared/httpclient/webcomponent.http.client.ts","ng://@hmcts/ccpay-web-component/lib/services/payment-view/payment-view.service.ts","ng://@hmcts/ccpay-web-component/lib/components/payment-view/payment-view.component.ts","ng://@hmcts/ccpay-web-component/lib/services/refunds/refunds.service.ts","ng://@hmcts/ccpay-web-component/lib/components/process-refund/process-refund.component.ts","ng://@hmcts/ccpay-web-component/lib/components/refund-list/refund-list.component.ts","ng://@hmcts/ccpay-web-component/lib/services/card-details/card-details.service.ts","ng://@hmcts/ccpay-web-component/lib/components/card-details/card-details.component.ts","ng://@hmcts/ccpay-web-component/lib/components/page-not-found.component.ts","ng://@hmcts/ccpay-web-component/lib/services/status-history/status-history.service.ts","ng://@hmcts/ccpay-web-component/lib/components/status-history/status-history.component.ts","ng://@hmcts/ccpay-web-component/lib/components/pba-details/pba-details.component.ts","ng://@hmcts/ccpay-web-component/lib/services/shared/logger/console-logger.service.ts","ng://@hmcts/ccpay-web-component/lib/services/case-transactions/case-transactions.service.ts","ng://@hmcts/ccpay-web-component/lib/services/bulk-scaning-payment/bulk-scaning-payment.service.ts","ng://@hmcts/ccpay-web-component/lib/components/case-transactions/case-transactions.component.ts","ng://@hmcts/ccpay-web-component/lib/interfaces/PaymentToPayhubRequest.ts","ng://@hmcts/ccpay-web-component/lib/interfaces/PayhubAntennaRequest.ts","ng://@hmcts/ccpay-web-component/lib/components/fee-summary/fee-summary.component.ts","ng://@hmcts/ccpay-web-component/lib/components/error-banner/error-banner.component.ts","ng://@hmcts/ccpay-web-component/lib/interfaces/UnidentifiedPaymentsRequest.ts","ng://@hmcts/ccpay-web-component/lib/interfaces/AllocatePaymentRequest.ts","ng://@hmcts/ccpay-web-component/lib/components/mark-unidentified-payment/mark-unidentified-payment.component.ts","ng://@hmcts/ccpay-web-component/lib/interfaces/UnsolicitedPaymentsRequest.ts","ng://@hmcts/ccpay-web-component/lib/components/mark-unsolicited-payment/mark-unsolicited-payment.component.ts","ng://@hmcts/ccpay-web-component/lib/components/unprocessed-payments/unprocessed-payments.component.ts","ng://@hmcts/ccpay-web-component/lib/components/processed-payments/processed-payments.component.ts","ng://@hmcts/ccpay-web-component/lib/interfaces/IAllocationPaymentsRequest.ts","ng://@hmcts/ccpay-web-component/lib/components/allocate-payments/allocate-payments.component.ts","ng://@hmcts/ccpay-web-component/lib/interfaces/AddRemissionRequest.ts","ng://@hmcts/ccpay-web-component/lib/interfaces/AddRetroRemissionRequest.ts","ng://@hmcts/ccpay-web-component/lib/interfaces/PostRefundRetroRemission.ts","ng://@hmcts/ccpay-web-component/lib/interfaces/PostIssueRefundRetroRemission.ts","ng://@hmcts/ccpay-web-component/lib/components/add-remission/add-remission.component.ts","ng://@hmcts/ccpay-web-component/lib/pipes/ccd-hyphens.pipe.ts","ng://@hmcts/ccpay-web-component/lib/pipes/capitalize.pipe.ts","ng://@hmcts/ccpay-web-component/lib/pipes/key-value.pipe.ts","ng://@hmcts/ccpay-web-component/lib/pipes/sanitize-html.pipe.ts","ng://@hmcts/ccpay-web-component/lib/services/xl-file/xl-file.service.ts","ng://@hmcts/ccpay-web-component/lib/components/reports/reports.component.ts","ng://@hmcts/ccpay-web-component/lib/components/table/table.component.ts","ng://@hmcts/ccpay-web-component/lib/interfaces/IResubmitRefundRequest.ts","ng://@hmcts/ccpay-web-component/lib/components/refund-status/refund-status.component.ts","ng://@hmcts/ccpay-web-component/lib/components/service-request/service-request.component.ts","ng://@hmcts/ccpay-web-component/lib/interfaces/IserviceRequestCardPayment.ts","ng://@hmcts/ccpay-web-component/lib/interfaces/IserviceRequestPbaPayment.ts","ng://@hmcts/ccpay-web-component/lib/components/pba-payment/pba-payment.component.ts","ng://@hmcts/ccpay-web-component/lib/payment-lib.module.ts"],"sourcesContent":["/*! *****************************************************************************\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 (b.hasOwnProperty(p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\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 function __createBinding(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, exports) {\r\n for (var p in m) if (p !== \"default\" && !exports.hasOwnProperty(p)) exports[p] = 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\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\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 __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\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 (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];\r\n result.default = 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, privateMap) {\r\n if (!privateMap.has(receiver)) {\r\n throw new TypeError(\"attempted to get private field on non-instance\");\r\n }\r\n return privateMap.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, privateMap, value) {\r\n if (!privateMap.has(receiver)) {\r\n throw new TypeError(\"attempted to set private field on non-instance\");\r\n }\r\n privateMap.set(receiver, value);\r\n return value;\r\n}\r\n","import { Injectable } from '@angular/core';\n\n@Injectable({\n providedIn: 'root'\n})\n\nexport class PaymentLibService {\n API_ROOT: string;\n BULKSCAN_API_ROOT: string;\n REFUNDS_API_ROOT: string;\n CARDPAYMENTRETURNURL: string;\n\n constructor() { }\n\n setApiRootUrl(apiRoot: string): void {\n this.API_ROOT = apiRoot;\n }\n\n getApiRootUrl(): string {\n return this.API_ROOT;\n }\n\n setBulkScanApiRootUrl(bulkscanapiRoot: string): void {\n this.BULKSCAN_API_ROOT = bulkscanapiRoot;\n }\n\n getBulkScanApiRootUrl(): string {\n return this.BULKSCAN_API_ROOT;\n }\n\n setRefundndsApiRootUrl(refundsapiRoot: string): void {\n this.REFUNDS_API_ROOT = refundsapiRoot;\n }\n\n getRefundsApiRootUrl(): string {\n return this.REFUNDS_API_ROOT;\n }\n setCardPaymentReturnUrl(cardPaymentReturnUrl: string):void {\n this.CARDPAYMENTRETURNURL = cardPaymentReturnUrl;\n }\n getCardPaymentReturnUrl(): string {\n return this.CARDPAYMENTRETURNURL;\n }\n}\n","import { Injectable } from '@angular/core';\nimport { Observable, BehaviorSubject } from 'rxjs';\nimport {IOrderReferenceFee} from '../interfaces/IOrderReferenceFee';\nimport { IRefundList } from '../interfaces/IRefundList';\nimport { IPaymentView } from '../interfaces/IPaymentView'; \n\n@Injectable({\n providedIn: 'root'\n})\nexport class OrderslistService {\n private ordersList: BehaviorSubject<IOrderReferenceFee[]> = new BehaviorSubject<IOrderReferenceFee[]>(null);\n private refundView: BehaviorSubject<IRefundList> = new BehaviorSubject<IRefundList>(null);\n private caseType = new BehaviorSubject(\"\");\n getcaseType = this.caseType.asObservable();\n private feeExists = new BehaviorSubject<boolean>(null);\n getFeeExist = this.feeExists.asObservable();\n private ccdCaseNumber = new BehaviorSubject(\"\");\n getCCDCaseNumberforRefund = this.ccdCaseNumber.asObservable();\n private isFromServiceRequestPage = new BehaviorSubject<boolean>(null);\n getisFromServiceRequestPage = this.isFromServiceRequestPage.asObservable();\n private OrderRefId = new BehaviorSubject(\"\");\n getOrderRefId = this.OrderRefId.asObservable();\n private navigationPage = new BehaviorSubject(\"\");\n getnavigationPage = this.navigationPage.asObservable();\n\n private orderRef = new BehaviorSubject(\"\");\n getorderRef = this.orderRef.asObservable();\n private orderCCDEvent = new BehaviorSubject(\"\");\n getorderCCDEvent = this.caseType.asObservable();\n private orderCreated = new BehaviorSubject<Date>(null);\n getorderCreated = this.orderCreated.asObservable();\n private orderParty = new BehaviorSubject(\"\");\n getorderParty = this.orderParty.asObservable();\n private orderRemissionTotal = new BehaviorSubject<number>(null);\n getorderRemissionTotal = this.orderRemissionTotal.asObservable();\n private orderFeesTotal = new BehaviorSubject<number>(null);\n getorderFeesTotal = this.orderFeesTotal.asObservable();\n private orderTotalPayments = new BehaviorSubject<number>(null);\n getorderTotalPayments = this.orderTotalPayments.asObservable();\n private rolesList: BehaviorSubject<any[]> = new BehaviorSubject<any[]>(null);\n\n private orderDetail: BehaviorSubject<any[]> = new BehaviorSubject<any[]>(null);\n\n private paymentPageView: BehaviorSubject<IPaymentView> = new BehaviorSubject<IPaymentView>(null);\n\n constructor() { }\n\n setOrdersList(orderLevelFees: IOrderReferenceFee[]): void {\n this.ordersList.next(Object.assign([], orderLevelFees));\n }\n getOrdersList() {\n return this.ordersList;\n }\n\n setRefundView(refundList: IRefundList): void {\n this.refundView.next(Object.assign([], refundList));\n }\n getRefundView() {\n return this.refundView;\n }\n\n setCaseType(caseType: string){\n this.caseType.next(caseType);\n }\n getCaseType(){\n return this.caseType;\n }\n\n setCCDCaseNumber(ccdCaseNumber: string){\n this.ccdCaseNumber.next(ccdCaseNumber);\n }\n getCCDCaseNumber(){\n return this.ccdCaseNumber;\n }\n\n setFeeExists(feeExists: boolean){\n this.feeExists.next(feeExists);\n }\n getFeeExists(){\n return this.feeExists;\n } \n\n setisFromServiceRequestPage(isFromServiceRequestPage: boolean){\n this.isFromServiceRequestPage.next(isFromServiceRequestPage);\n }\n getisFromServiceRequestPages(){\n return this.isFromServiceRequestPage;\n }\n\n setOrderRefId(OrderRefId: string){\n this.OrderRefId.next(OrderRefId);\n }\n getSelectedOrderRefId(){\n return this.OrderRefId;\n }\n\n setnavigationPage(navigationPage: string){\n this.navigationPage.next(navigationPage);\n }\n getnavigationPageValue(){\n return this.navigationPage;\n }\n\n setpaymentPageView(paymentpageList: IPaymentView): void {\n this.paymentPageView.next(Object.assign([], paymentpageList));\n }\n getpaymentPageView() {\n return this.paymentPageView;\n }\n\n setUserRolesList(rolesList:any[]): void {\n this.rolesList.next(Object.assign([], rolesList));\n }\n getUserRolesList() {\n return this.rolesList;\n }\n\n setorderDetail(orderDetail:any[]): void {\n this.orderDetail.next(Object.assign([], orderDetail));\n }\n getorderDetail() {\n return this.orderDetail;\n }\n\n setOrderRef(orderRef: string){\n this.orderRef.next(orderRef);\n }\n getorderRefs(){\n return this.orderRef;\n }\n\n setorderCCDEvent(orderCCDEvent: string){\n this.orderCCDEvent.next(orderCCDEvent);\n }\n getorderCCDEvents(){\n return this.orderCCDEvent;\n }\n\n setorderCreated(orderCreated: Date){\n this.orderCreated.next(orderCreated);\n }\n getorderCreateds(){\n return this.orderCreated;\n }\n\n setorderParty(orderParty: string){\n this.orderParty.next(orderParty);\n }\n getorderPartys(){\n return this.orderParty;\n }\n\n setorderRemissionTotal(orderRemissionTotal: number){\n this.orderRemissionTotal.next(orderRemissionTotal);\n }\n getorderRemissionTotals(){\n return this.orderRemissionTotal;\n }\n\n setorderFeesTotal(orderFeesTotal: number){\n this.orderFeesTotal.next(orderFeesTotal);\n }\n getorderFeesTotals(){\n return this.orderFeesTotal;\n }\n\n setorderTotalPayments(orderTotalPayments: number){\n this.orderTotalPayments.next(orderTotalPayments);\n }\n getoorderTotalPaymentss(){\n return this.orderTotalPayments;\n }\n}\n","import { ChangeDetectorRef, Component, Input, OnInit } from '@angular/core';\nimport { PaymentLibService } from './payment-lib.service';\nimport { IBSPayments } from './interfaces/IBSPayments';\nimport { OrderslistService } from './services/orderslist.service';\nimport { IPayment } from './interfaces/IPayment';\n\n@Component({\n selector: 'ccpay-payment-lib',\n template: `\n <ccpay-refund-list [USERID]=\"USERID\" [LOGGEDINUSERROLES]=\"LOGGEDINUSERROLES\" [LOGGEDINUSEREMAIL]=\"LOGGEDINUSEREMAIL\" *ngIf=\"viewName === 'refund-list'\"></ccpay-refund-list>\n <ccpay-payment-list *ngIf=\"viewName === 'payment-list'\"></ccpay-payment-list>\n <ccpay-refund-status\n [LOGGEDINUSERROLES]=\"LOGGEDINUSERROLES\"\n [API_ROOT]=\"API_ROOT\"\n *ngIf=\"viewName === 'refundstatuslist'\"> </ccpay-refund-status >\n <ccpay-payment-view [LOGGEDINUSERROLES]=\"LOGGEDINUSERROLES\" *ngIf=\"viewName === 'payment-view'\"\n [isTurnOff]=\"ISTURNOFF\" [isTakePayment]=\"TAKEPAYMENT\" [caseType]=\"CASETYPE\"\n [ISPAYMENTSTATUSENABLED] = \"ISPAYMENTSTATUSENABLED\"\n ></ccpay-payment-view>\n\n <ccpay-process-refund *ngIf=\"viewName === 'process-refund'\"\n [refundReference]=\"refundReference\"\n [refundlistsource]=\"refundlistsource\"\n ></ccpay-process-refund>\n <ccpay-pba-payment *ngIf=\"viewName === 'pba-payment'\"\n [pbaPayOrderRef]=\"pbaPayOrderRef\"\n ></ccpay-pba-payment>\n <ccpay-case-transactions [isTakePayment]=\"isTakePayment\" [LOGGEDINUSERROLES]=\"LOGGEDINUSERROLES\" *ngIf=\"viewName === 'case-transactions'\"></ccpay-case-transactions>\n <app-mark-unidentified-payment *ngIf=\"viewName === 'unidentifiedPage'\"\n [caseType]=\"CASETYPE\"></app-mark-unidentified-payment>\n <app-mark-unsolicited-payment *ngIf=\"viewName === 'unsolicitedPage'\"\n [caseType]=\"CASETYPE\"></app-mark-unsolicited-payment>\n <app-allocate-payments *ngIf=\"viewName === 'allocate-payments'\"\n [isTurnOff]=\"ISTURNOFF\"\n [caseType]=\"CASETYPE\"\n ></app-allocate-payments>\n <ccpay-fee-summary *ngIf=\"viewName === 'fee-summary'\"\n [ccdCaseNumber]=\"CCD_CASE_NUMBER\"\n [paymentGroupRef]=\"paymentGroupReference\"\n [isTurnOff]=\"ISTURNOFF\"\n [caseType]=\"CASETYPE\"\n ></ccpay-fee-summary>\n <ccpay-reports *ngIf=\"viewName === 'reports'\"\n [ISPAYMENTSTATUSENABLED] = \"ISPAYMENTSTATUSENABLED\"\n ></ccpay-reports>\n `\n})\n\nexport class PaymentLibComponent implements OnInit {\n @Input('API_ROOT') API_ROOT: string;\n @Input('BULKSCAN_API_ROOT') BULKSCAN_API_ROOT: string;\n @Input('REFUNDS_API_ROOT') REFUNDS_API_ROOT: string;\n @Input('CARDPAYMENTRETURNURL') CARDPAYMENTRETURNURL: string;\n @Input('CCD_CASE_NUMBER') CCD_CASE_NUMBER: string;\n @Input('EXC_REFERENCE') EXC_REFERENCE: string;\n @Input('PAYMENT_METHOD') PAYMENT_METHOD: string;\n @Input('VIEW') VIEW: string;\n @Input('VIEWSERVICE') VIEWSERVICE: string;\n @Input('PAYMENT_GROUP_REF') PAYMENT_GROUP_REF?: string;\n @Input('TAKEPAYMENT') TAKEPAYMENT: boolean;\n @Input('SERVICEREQUEST') SERVICEREQUEST: string;\n @Input('DCN_NUMBER') DCN_NUMBER: string;\n @Input('SELECTED_OPTION') SELECTED_OPTION: string;\n @Input('ISBSENABLE') ISBSENABLE: Boolean;\n @Input('ISSFENABLE') ISSFENABLE: boolean;\n @Input('ISTURNOFF') ISTURNOFF: boolean;\n @Input('CASETYPE') CASETYPE: string;\n @Input('ISPAYMENTSTATUSENABLED') ISPAYMENTSTATUSENABLED: boolean;\n @Input('rootUrl') rootUrl: boolean;\n @Input('REFUNDLIST') REFUNDLIST: string;\n @Input('USERID') USERID: string;\n @Input('LOGGEDINUSERROLES') LOGGEDINUSERROLES: any[];\n @Input('LOGGEDINUSEREMAIL') LOGGEDINUSEREMAIL: string;\n @Input('isFromServiceRequestPage') isFromServiceRequestPage: boolean;\n\n paymentMethod: string;\n bspaymentdcn: string;\n unProcessedPaymentServiceId: string = null;\n paymentGroupReference: string;\n paymentReference: string;\n refundReference: string;\n refundlistsource: any;\n viewName: string;\n isTurnOff: boolean;\n caseType: string;\n unProcessedPayment: IBSPayments = null;\n isRefundStatusView: boolean;\n isRedirectFromCaseTransactionPage: string;\n isCallFromRefundList: boolean;\n isFromRefundStatusPage: boolean;\n iscancelClicked : boolean;\n isFromPaymentDetailPage: boolean;\n pbaPayOrderRef: IPayment;\n isTakePayment: boolean;\n\n orderDetail: any[];\n orderRef: string;\n orderStatus: string;\n orderParty: string;\n orderCreated: Date;\n orderCCDEvent: string;\n serviceRequestValue: string;\n orderAddBtnEnable: boolean;\n orderFeesTotal: number = 0.00;\n orderRemissionTotal: number = 0.00;\n orderTotalPayments: number = 0.00;\n orderPendingPayments: number = 0.00;\n\n constructor(private paymentLibService: PaymentLibService,\n private cd: ChangeDetectorRef,\n private OrderslistService: OrderslistService) { }\n ngAfterContentChecked(): void {\n this.cd.detectChanges();\n }\n\n\n ngOnInit() {\n this.paymentLibService.setApiRootUrl(this.API_ROOT);\n this.paymentLibService.setBulkScanApiRootUrl(this.BULKSCAN_API_ROOT);\n this.paymentLibService.setRefundndsApiRootUrl(this.REFUNDS_API_ROOT);\n this.paymentLibService.setCardPaymentReturnUrl(this.CARDPAYMENTRETURNURL);\n\n if(this.LOGGEDINUSERROLES.length > 0) {\n this.OrderslistService.setUserRolesList(this.LOGGEDINUSERROLES);\n }\n if (this.PAYMENT_GROUP_REF) {\n this.paymentGroupReference = this.PAYMENT_GROUP_REF;\n }\n if (this.DCN_NUMBER) {\n this.bspaymentdcn = this.DCN_NUMBER;\n }\n if (this.REFUNDLIST === \"true\") {\n this.VIEW = 'refund-list';\n this.viewName = this.VIEW;\n }\n if (this.VIEW === 'fee-summary') {\n this.viewName = 'fee-summary';\n } else if (this.VIEW !== 'reports' && this.VIEW !== 'refund-list') {\n this.viewName = 'case-transactions';\n } else {\n this.viewName = this.VIEW;\n }\n\n if (this.isTakePayment) {\n this.TAKEPAYMENT = true;\n }\n }\n}\n","import { Injectable } from '@angular/core';\nimport { _throw } from 'rxjs/observable/throw';\nimport { Observable } from 'rxjs/internal/Observable';\nimport { HttpErrorResponse } from '@angular/common/http';\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 _throw(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","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 { Component, OnInit, Input, Output, EventEmitter } from '@angular/core';\nimport { PaymentViewService } from '../../services/payment-view/payment-view.service';\nimport { PaymentLibComponent } from '../../payment-lib.component';\nimport { IPaymentGroup } from '../../interfaces/IPaymentGroup';\nimport { IFee } from '../../interfaces/IFee';\nimport { IPayment } from '../../interfaces/IPayment';\nimport { IRemission } from '../../interfaces/IRemission';\nconst BS_ENABLE_FLAG = 'bulk-scan-enabling-fe';\nimport { ChangeDetectorRef } from '@angular/core';\nimport { IPaymentFailure } from '../../interfaces/IPaymentFailure';\nimport { OrderslistService } from '../../services/orderslist.service';\n\n@Component({\n selector: 'ccpay-payment-view',\n templateUrl: './payment-view.component.html',\n styleUrls: ['./payment-view.component.css']\n})\nexport class PaymentViewComponent implements OnInit {\n @Input() isTurnOff: boolean;\n @Input() isTakePayment: boolean;\n @Input() caseType: boolean;\n @Input() orderRef: string;\n @Input() orderStatus: string;\n @Input() orderTotalPayments: number;\n @Input() payment: IPayment;\n @Input() LOGGEDINUSERROLES: string[];\n @Input() ISPAYMENTSTATUSENABLED: string;\n @Input() orderParty: string;\n @Input() orderCreated: Date;\n @Input() orderCCDEvent: string;\n @Input() orderFeesTotal: number;\n @Input() orderRemissionTotal: number;\n @Input() orderDetail: any[];\n @Input(\"isServiceRequest\") isServiceRequest: string;\n errorMsg: string;\n paymentGroup: IPaymentGroup;\n errorMessage: string;\n ccdCaseNumber: string;\n selectedOption: string;\n dcnNumber: string;\n isStatusAllocated: boolean;\n isRemissionsMatch: boolean;\n feeId: IFee;\n viewStatus: string;\n isRefundRemission: boolean = false;\n isStrategicFixEnable: boolean;\n isAddFeeBtnEnabled: boolean = false;\n isIssueRefunfBtnEnable: boolean = false;\n allowedRolesToAccessRefund = ['payments-refund-approver', 'payments-refund'];\n remissions: IRemission[] = [];\n allPaymentsFailure: IPaymentFailure[] = [];\n selectedPaymentsStatus: IPaymentFailure;\n remissionFeeAmt: number;\n isRefundRemissionBtnEnable: boolean;\n serviceReference: string;\n isFromServiceRequestPage: boolean;\n isFromPaymentDetailPage: boolean;\n\n constructor(private paymentViewService: PaymentViewService,\n private paymentLibComponent: PaymentLibComponent,\n private cd: ChangeDetectorRef,\n private OrderslistService: OrderslistService) {\n }\n\n ngAfterContentChecked(): void {\n this.cd.detectChanges();\n }\n\n ngOnInit() {\n this.ccdCaseNumber = this.paymentLibComponent.CCD_CASE_NUMBER;\n this.selectedOption = this.paymentLibComponent.SELECTED_OPTION;\n this.dcnNumber = this.paymentLibComponent.DCN_NUMBER;\n this.isTurnOff = this.paymentLibComponent.ISTURNOFF;\n this.serviceReference = this.paymentLibComponent.paymentGroupReference;\n this.viewStatus = 'paymentview';\n this.paymentViewService.getApportionPaymentDetails(this.paymentLibComponent.paymentReference).subscribe(\n paymentGroup => {\n let fees = [];\n paymentGroup.fees.forEach(fee => {\n this.isRemissionsMatch = false;\n\n paymentGroup.remissions.forEach(rem => {\n if (rem.fee_code === fee.code) {\n this.isRemissionsMatch = true;\n fee['remissions'] = rem;\n fees.push(fee);\n }\n });\n if (!this.isRemissionsMatch) {\n fees.push(fee);\n }\n });\n paymentGroup.fees = fees\n this.paymentGroup = paymentGroup;\n\n this.paymentGroup.payments = this.paymentGroup.payments.filter\n (paymentGroupObj => paymentGroupObj['reference'].includes(this.paymentLibComponent.paymentReference));\n const paymentAllocation = this.paymentGroup.payments[0].payment_allocation;\n this.isStatusAllocated = paymentAllocation.length > 0 && paymentAllocation[0].allocation_status === 'Allocated' || paymentAllocation.length === 0;\n\n },\n (error: any) => this.errorMessage = error\n );\n this.paymentViewService.getPaymentFailure(this.paymentLibComponent.paymentReference).subscribe({\n next: (res) => {\n JSON.parse(res).payment_failure_list.reverse().forEach(payments => {\n\n this.allPaymentsFailure.push(payments.payment_failure_initiated);\n if(payments.payment_failure_closed) {\n this.allPaymentsFailure.push(payments.payment_failure_closed);\n }\n });\n this.allPaymentsFailure = this.allPaymentsFailure.reverse();\n },\n error: (e) => {\n this.allPaymentsFailure = [];\n this.errorMsg = \"Server error\"\n }\n })\n }\n\n get isCardPayment(): boolean {\n return this.paymentGroup.payments[0].method === 'card';\n }\n\n get isTelephonyPayment(): boolean {\n return this.paymentGroup.payments[0].channel === 'telephony';\n }\n\n public goToPaymentList(): void {\n this.paymentLibComponent.viewName = 'payment-list';\n }\n goToServiceRequestPage() {\n this.paymentLibComponent.viewName = 'case-transactions';\n this.paymentLibComponent.TAKEPAYMENT = false;\n this.paymentLibComponent.SERVICEREQUEST = 'true';\n this.paymentLibComponent.isFromServiceRequestPage = true;\n window.location.reload();\n }\n goToCaseTransationPage(event: any) {\n event.preventDefault();\n if (!this.paymentLibComponent.isFromServiceRequestPage) {\n this.OrderslistService.setnavigationPage('casetransactions');\n this.OrderslistService.setisFromServiceRequestPage(false);\n this.paymentLibComponent.viewName = 'case-transactions';\n this.paymentLibComponent.ISBSENABLE = true;\n this.resetOrderData();\n } else {\n this.OrderslistService.getorderRefs().subscribe((data) => this.orderRef = data);\n this.OrderslistService.getorderCCDEvents().subscribe((data) => this.orderCCDEvent = data);\n this.OrderslistService.getorderCreateds().subscribe((data) => this.orderCreated = data);\n this.OrderslistService.getorderDetail().subscribe((data) => this.orderDetail = data);\n this.OrderslistService.getorderPartys().subscribe((data) => this.orderParty = data);\n this.OrderslistService.getorderRemissionTotals().subscribe((data) => this.orderRemissionTotal = data);\n this.OrderslistService.getorderFeesTotals().subscribe((data) => this.orderFeesTotal = data);\n this.OrderslistService.getoorderTotalPaymentss().subscribe((data) => this.orderTotalPayments = data);\n this.viewStatus = 'order-full-view';\n }\n\n }\n\n addRemission(fee: IFee) {\n if(this.chkForAddRemission(fee.code)) {\n this.feeId = fee;\n this.paymentViewService.getApportionPaymentDetails(this.paymentGroup.payments[0].reference).subscribe(\n paymentGroup => {\n this.paymentGroup = paymentGroup;\n\n this.paymentGroup.payments = this.paymentGroup.payments.filter\n (paymentGroupObj => paymentGroupObj['reference'].includes(this.paymentLibComponent.paymentReference));\n this.payment = this.paymentGroup.payments[0];\n this.paymentLibComponent.isFromPaymentDetailPage = true;\n this.viewStatus = 'addremission';\n this.isRefundRemission = true;\n this.cd.detectChanges();\n },\n (error: any) => this.errorMessage = error\n );\n }\n }\n\n checkForFees(paymentGroup: any) {\n if(paymentGroup !== null && paymentGroup !== undefined)\n {\n if (paymentGroup.fees !== null && paymentGroup.fees !== undefined) {\n return true;\n }\n\n }\n return false;\n }\n\n addRefundForRemission(payment: IPayment, remission: IRemission[],fees:any) {\n if(this.chkIsRefundRemissionBtnEnable()) {\n this.payment = payment;\n this.paymentViewService.getApportionPaymentDetails(this.payment.reference).subscribe(\n paymentGroup => {\n this.paymentGroup = paymentGroup;\n\n this.paymentGroup.payments = this.paymentGroup.payments.filter\n (paymentGroupObj => paymentGroupObj['reference'].includes(this.payment.reference));\n this.payment = this.paymentGroup.payments[0];\n this.remissions = remission;\n this.remissionFeeAmt = fees.filter(data=>data.code === this.remissions['fee_code'])[0].net_amount;\n this.viewStatus = 'addrefundforremission';\n // const paymentAllocation = this.paymentGroup.payments[0].payment_allocation;\n // this.isStatusAllocated = paymentAllocation.length > 0 && paymentAllocation[0].allocation_status === 'Allocated' || paymentAllocation.length === 0;\n },\n (error: any) => this.errorMessage = error\n );\n }\n }\n\n chkIsRefundRemissionBtnEnable(): boolean {\n if (this.paymentGroup !== null && this.paymentGroup !== undefined) {\n this.paymentGroup.payments.forEach(payment => {\n if (payment.method.toLocaleLowerCase() === 'payment by account' && payment.status.toLocaleLowerCase() === 'success' && this.allowFurtherAccessAfter4Days(payment)) {\n this.isRefundRemissionBtnEnable = true;\n }\n });\n if (this.isRefundRemissionBtnEnable) {\n return true;\n } else {\n return false;\n };\n }\n }\n\n issueRefund(paymentgrp: IPaymentGroup) {\n if (paymentgrp !== null && paymentgrp !== undefined) {\n if(this.chkIssueRefundBtnEnable(paymentgrp.payments[0])) {\n this.paymentGroup = paymentgrp;\n this.viewStatus = 'issuerefund';\n this.isRefundRemission = true;\n this.paymentLibComponent.isFromPaymentDetailPage = true;\n this.isFromPaymentDetailPage = true;\n this.isFromServiceRequestPage = this.paymentLibComponent.isFromServiceRequestPage;\n }\n }\n }\n\n getRemissionByFeeCode(feeCode: string, remissions: IRemission[]): IRemission {\n if (remissions && remissions.length > 0) {\n for (const remission of remissions) {\n if (remission.fee_code === feeCode) {\n return remission;\n }\n }\n }\n return null;\n }\n\n chkIssueRefundBtnEnable(payment: IPayment): boolean {\n if (this.check4AllowedRoles2AccessRefund() && this.allowFurtherAccessAfter4Days(payment) &&\n payment.method === 'payment by account' && payment.status.toLocaleLowerCase() === 'success') {\n this.isIssueRefunfBtnEnable = true;\n }\n if (this.isIssueRefunfBtnEnable) {\n return true;\n } else {\n return false;\n };\n }\n\n chkForPBAPayment(): boolean {\n if (this.paymentGroup !== null && this.paymentGroup !== undefined) {\n let payment = this.paymentGroup.payments[0];\n if (payment.method.toLocaleLowerCase() === 'payment by account' && this.allowFurtherAccessAfter4Days(payment)) {\n return true;\n }\n return false;\n }\n }\n\n chkForAddRemission(feeCode: string): boolean {\n if (this.chkForPBAPayment() && this.check4AllowedRoles2AccessRefund() && this.allowFurtherAccessAfter4Days(this.paymentGroup.payments[0])) {\n if (this.paymentGroup.remissions && this.paymentGroup.remissions.length > 0) {\n for (const remission of this.paymentGroup.remissions) {\n if (remission.fee_code === feeCode) {\n return false;\n }\n }\n return true;\n }\n return true;\n\n } else {\n return false;\n }\n }\n\n check4AllowedRoles2AccessRefund = (): boolean => {\n return this.allowedRolesToAccessRefund.some(role =>\n this.LOGGEDINUSERROLES.indexOf(role) !== -1\n );\n }\n\n allowFurtherAccessAfter4Days = (payment: IPayment): boolean => {\n if(payment !== null && payment !== undefined) {\n let tmp4DayAgo = new Date();\n tmp4DayAgo.setDate(tmp4DayAgo.getDate() - 4);\n return tmp4DayAgo >= new Date(payment.date_created);\n }\n }\n\n resetOrderData() {\n this.OrderslistService.setOrderRef(null);\n this.OrderslistService.setorderCCDEvent(null);\n this.OrderslistService.setorderCreated(null);\n this.OrderslistService.setorderDetail(null);\n this.OrderslistService.setorderParty(null);\n this.OrderslistService.setorderTotalPayments(null);\n this.OrderslistService.setorderRemissionTotal(null);\n this.OrderslistService.setorderFeesTotal(null);\n }\n\n goToPaymentFailuePage(payment: any) {\n this.viewStatus = 'payment-failure';\n this.selectedPaymentsStatus = payment;\n }\n goBackToPaymentView(event: any) {\n event.preventDefault();\n this.viewStatus = 'paymentview';\n }\n}\n","import { Injectable } from '@angular/core';\nimport {HttpClient, HttpHeaders} from '@angular/common/http';\nimport { Meta } from '@angular/platform-browser';\nimport {ErrorHandlerService} from '../shared/error-handler.service';\nimport { WebComponentHttpClient } from '../shared/httpclient/webcomponent.http.client';\nimport {PaymentLibService} from '../../payment-lib.service';\nimport {Observable} from 'rxjs/Observable';\nimport {catchError} from 'rxjs/operators';\nimport { IRefundReasons } from '../../interfaces/IRefundReasons';\nimport { IPatchRefundAction } from '../../interfaces/IPatchRefundAction';\nimport { IRefundList } from '../../interfaces/IRefundList';\nimport { IssueRefundRequest } from '../../interfaces/IssueRefundRequest';\nimport { IResubmitRefundRequest } from '../../interfaces/IResubmitRefundRequest';\nimport { IRefundStatusHistory } from '../../interfaces/IRefundStatusHistory';\n@Injectable({\n providedIn: 'root'\n})\nexport class RefundsService {\n\n constructor(private http: HttpClient,\n private https: WebComponentHttpClient,\n private errorHandlerService: ErrorHandlerService,\n private paymentLibService: PaymentLibService,\n private meta: Meta\n ) { }\n\n getRefundReasons(): Observable<IRefundReasons[]> {\n return this.http.get<IRefundReasons[]>(`${this.paymentLibService.REFUNDS_API_ROOT}/reasons`, {\n withCredentials: true\n })\n .pipe(\n catchError(this.errorHandlerService.handleError)\n );\n }\n\n getRefundRejectReasons(): Observable<any> {\n return this.http.get<any>(`${this.paymentLibService.REFUNDS_API_ROOT}/rejection-reasons`, {\n withCredentials: true\n })\n .pipe(\n catchError(this.errorHandlerService.handleError)\n );\n }\n\n getRefundActions(refundReference: string): Observable<any> {\n return this.http.get<any>(`${this.paymentLibService.REFUNDS_API_ROOT}/${refundReference}/actions`, {\n withCredentials: true\n })\n .pipe(\n catchError(this.errorHandlerService.handleError)\n );\n }\n\npatchRefundActions(body:IPatchRefundAction, refundReference: string, reviewerAction: string): Observable<any> {\n // const opts = this.addHeaders({});\n return this.https.patch(`${this.paymentLibService.REFUNDS_API_ROOT}/${refundReference}/action/${reviewerAction}`, body)\n .pipe(\n catchError(this.errorHandlerService.handleError)\n );\n}\n\ngetRefundList(refundstatus?: string, selfexclusive?:boolean): Observable<IRefundList[]> {\n return this.http.get<IRefundList[]>(`${this.paymentLibService.REFUNDS_API_ROOT}?status=${refundstatus}&excludeCurrentUser=${selfexclusive}`, \n {\n withCredentials: true\n})\n .pipe(\n catchError(this.errorHandlerService.handleError)\n );\n}\n\ngetRefundStatusHistory(reference?: string) {\n return this.http.get<IRefundStatusHistory>(`${this.paymentLibService.REFUNDS_API_ROOT}/${reference}/status-history`, \n {\n withCredentials: true\n})\n .pipe(\n catchError(this.errorHandlerService.handleError)\n );\n}\n\ngetRefundStatusList(ccdCaseNumber:string): Observable<IRefundList[]> {\n return this.http.get<IRefundList[]>(`${this.paymentLibService.REFUNDS_API_ROOT}?ccdCaseNumber=${ccdCaseNumber}`, {\n withCredentials: true\n})\n .pipe(\n catchError(this.errorHandlerService.handleError)\n );\n}\n\ngetUserDetails(): Observable<any> {\n return this.http.get<any>(`${this.paymentLibService.REFUNDS_API_ROOT}/get-user-details`, {\n withCredentials: true\n })\n .pipe(\n catchError(this.errorHandlerService.handleError)\n );\n}\n \npostIssueRefund(body: IssueRefundRequest): Observable<any> {\n return this.https.post(`${this.paymentLibService.REFUNDS_API_ROOT}/refund`, body).pipe(\n catchError(this.errorHandlerService.handleError)\n );\n}\n\npatchResubmitRefund(body: IResubmitRefundRequest, refund_reference: string): Observable<any> {\n // const opts = this.addHeaders({});\n return this.https.patch(`${this.paymentLibService.REFUNDS_API_ROOT}/resubmit/${refund_reference}`, body).pipe(\n catchError(this.errorHandlerService.handleError)\n );\n}\n\naddHeaders(options: any): any {\n const csrfToken = this.meta.getTag('name=csrf-token');\n const headers = {};\n if (options.headers) {\n options.headers.forEach(element => {\n headers[element] = options.headers.get(element);\n });\n }\n headers['X-Requested-With'] = 'XMLHttpRequest';\n if (csrfToken.content === null) {\n if( document.cookie.split(';').find(row => row.startsWith('XSRF-TOKEN')) !== undefined ) {\n headers['CSRF-Token'] = document.cookie.split(';').find(row => row.startsWith('XSRF-TOKEN')).split('=')[1]; \n } else {\n headers['CSRF-Token'] = document.cookie.split(';').find(row => row.startsWith(' XSRF-TOKEN')).split('=')[1];\n }\n } else {\n headers['CSRF-Token'] = csrfToken.content;\n }\n options.headers = new HttpHeaders(headers);\n options.responseType = 'text';\n return options;\n}\n}\n","import {Component, OnInit, Input} from '@angular/core';\nimport { FormBuilder, FormGroup, Validators, FormControl } from '@angular/forms';\nimport {RefundsService} from '../../services/refunds/refunds.service';\nimport { IRefundAction } from '../../interfaces/IRefundAction';\nimport { IRefundList } from '../../interfaces/IRefundList';\nimport { IRefundRejectReason } from '../../interfaces/IRefundRejectReason';\nimport { OrderslistService } from '../../services/orderslist.service';\nimport { PaymentLibComponent } from '../../payment-lib.component';\nimport { ActivatedRoute,Router } from '@angular/router';\n\n@Component({\n selector: 'ccpay-process-refund',\n templateUrl: './process-refund.component.html',\n styleUrls: ['./process-refund.component.css']\n})\nexport class ProcessRefundComponent implements OnInit {\n @Input() refundReference: string;\n @Input() refundlistsource: IRefundList;\n\n processRefundForm: FormGroup;\n\n errorMessage = this.getErrorMessage(false, '', '', '');\n sendmeback: string = null;\n viewStatus: string;\n refundActionList: IRefundAction[] = []; \n refundRejectReasonList: IRefundRejectReason[] = []; \n isSendMeBackClicked: boolean = false;\n isRejectClicked: boolean = false;\n isOtherClicked: boolean = false;\n isSuccesspageEnable: boolean = false;\n\n refundActionsHasError: boolean = false;\n refundRejectReasonHasError: boolean = false;\n isReasonFieldEmpty: boolean = false;\n isReasonFieldInvalid: boolean = false;\n reasonFieldMinHasError: boolean = false;\n reasonFieldMaxHasError: boolean = false;\n isReasonEmpty: boolean = false;\n isReasonInvalid: boolean = false;\n successMsg: string = null;\n navigationpage: string;\n ccdCaseNumber: string;\n isFromRefundListPage: boolean;\n\n isConfirmButtondisabled: boolean = true;\n constructor(private RefundsService: RefundsService,\n private formBuilder: FormBuilder,\n private OrderslistService: OrderslistService,\n private paymentLibComponent: PaymentLibComponent,\n private router: Router,\n private activeRoute: ActivatedRoute) {\n }\n\n ngOnInit() {\n this.viewStatus = 'RefundProcess';\n this.RefundsService.getRefundActions(this.refundReference).subscribe(\n refundActionList => {\n this.refundActionList = <any>refundActionList;\n },\n err => {\n this.errorMessage = this.getErrorMessage(true, err.statusCode, err.err, err);\n }\n );\n this.processRefundForm = this.formBuilder.group({\n refundActionField: new FormControl('', Validators.compose([\n Validators.required\n ])),\n refundRejectReasonField: new FormControl('', Validators.compose([\n Validators.required\n ])),\n sendMeBackField: new FormControl('', Validators.compose([\n Validators.required,\n Validators.minLength(3),\n Validators.maxLength(255),\n Validators.pattern('^([a-zA-Z0-9\\\\s,\\\\.]*)$'),\n\n ])),\n enterReasonField: new FormControl('', Validators.compose([\n Validators.required,\n Validators.maxLength(30),\n Validators.pattern('^([a-zA-Z0-9.\\\\s]*)$'),\n ])),\n });\n this.ccdCaseNumber = this.refundlistsource.ccd_case_number;\n\n if((typeof this.paymentLibComponent.TAKEPAYMENT === 'string' && this.paymentLibComponent.TAKEPAYMENT === 'false') || (typeof this.paymentLibComponent.TAKEPAYMENT === 'boolean' && !this.paymentLibComponent.TAKEPAYMENT) ) {\n this.isFromRefundListPage = true;\n }\n }\n checkRefundActions(code: string) {\n this.refundActionsHasError = false;\n this.isReasonFieldEmpty = false;\n this.isReasonEmpty = false;\n this.isReasonInvalid = false;\n this.refundRejectReasonHasError = false;\n if(code === 'Return to caseworker') {\n this.isConfirmButtondisabled = true;\n this.isSendMeBackClicked = true;\n this.isRejectClicked = false;\n this.isOtherClicked = false;\n\n } else if (code === 'Approve') {\n this.isSendMeBackClicked = false;\n this.isConfirmButtondisabled = false;\n this.isRejectClicked = false;\n this.isOtherClicked = false;\n\n } else if (code === 'Reject') {\n this.isRejectClicked = true;\n this.isSendMeBackClicked = false;\n this.isOtherClicked = false;\n this.RefundsService.getRefundRejectReasons().subscribe(\n refundRejectReasonList => {\n this.refundRejectReasonList = <any>refundRejectReasonList;\n },\n err => {\n this.errorMessage = this.getErrorMessage(true, err.statusCode, err.err, err);\n }\n );\n } else if (code === 'RE005') {\n this.isOtherClicked = true;\n } else if (code !== 'RE005') {\n this.isOtherClicked = false;\n }\n }\n processRefundSubmit() {\n let processRefundRequest;\n let status;\n this.resetForm([false, false, false, false, false, false, false, false], 'all');\n const controls = this.processRefundForm.controls;\n const processFormError = controls.sendMeBackField.errors;\n\n if (this.processRefundForm.dirty && controls.refundActionField.valid \n && (controls.refundActionField.value == 'Approve'\n || (controls.refundActionField.value == 'Reject' && controls.refundRejectReasonField.valid && controls.refundRejectReasonField.value != 'RE005')\n || (controls.refundActionField.value == 'Reject' && controls.refundRejectReasonField.value == 'RE005' && controls.enterReasonField.valid)\n || (controls.refundActionField.value == 'Return to caseworker' && controls.sendMeBackField.valid))) {\n if (controls.refundActionField.value === 'Approve'){\n status = 'APPROVE';\n processRefundRequest = {\n code:'',\n reason: ''\n };\n } else if (controls.refundActionField.value === 'Reject') {\n status = 'REJECT';\n\n processRefundRequest = {\n code: controls.refundRejectReasonField.value ? controls.refundRejectReasonField.value : '',\n reason: controls.refundRejectReasonField.value == 'RE005' ? controls.enterReasonField.value : ''\n };\n } else if (controls.refundActionField.value === 'Return to caseworker') {\n status = 'SENDBACK';\n\n processRefundRequest = {\n code: '',\n reason: controls.sendMeBackField.value\n };\n }\n this.RefundsService.patchRefundActions(processRefundRequest, this.refundReference, status).subscribe(\n response => {\n this.isSuccesspageEnable = true;\n // this.successMsg = JSON.parse(response)['data'];\n this.successMsg = response.replace(/['\"]+/g, '');\n },\n err => {\n this.errorMessage = this.getErrorMessage(true, err.statusCode, err.err, err);\n }\n );\n } else {\n if(controls.refundActionField.value == \"\") {\n this.resetForm([true, false, false, false, false, false, false, false], 'action');\n }\n if(controls.refundActionField.value == 'Reject' && controls.refundRejectReasonField.value == \"\") {\n this.resetForm([false, true, false, false, false, false, false, false], 'rejectReason');\n }\n if(controls.refundActionField.value == 'Return to caseworker') {\n if(controls.sendMeBackField.value == '' ) {\n this.resetForm([false, false, true, false, false, false, false, false], 'addAreason');\n }\n if(controls.sendMeBackField.value != '' && controls.sendMeBackField.invalid ) {\n this.resetForm([false, false, false, true, false, false, false, false], 'addAreason');\n }\n if(processFormError && processFormError.minlength && processFormError.minlength.actualLength < 3 ) {\n this.resetForm([false, false, false, false, true, false, false, false], 'addAreason');\n }\n if(processFormError && processFormError.maxlength && processFormError.maxlength.actualLength > 255 ) {\n this.resetForm([false, false, false, false, false, true, false, false], 'addAreason');\n }\n }\n if(controls.refundActionField.value == 'Reject' && controls.refundRejectReasonField.value == 'RE005') {\n if(controls.enterReasonField.value === \"\") {\n this.resetForm([false, false, false, false, false, false, true, false], 'enterReason');\n }\n if(controls.enterReasonField.value!== \"\" && controls.enterReasonField.invalid) {\n this.resetForm([false, false, false, false, false, false, false, true], 'enterReason');\n }\n }\n }\n\n }\n getErrorMessage(isErrorExist, status, errorMsg, err) {\n let bodyTxt = 'Please try again later';\n if (status !== 500) {\n if (errorMsg !== undefined) {\n bodyTxt = errorMsg;\n } else {\n bodyTxt = err;\n }\n \n }\n return {\n title: 'Something went wrong',\n body: bodyTxt,\n showError: isErrorExist\n };\n }\n loadRefundListPage() {\n this.OrderslistService.getnavigationPageValue().subscribe((data) => this.navigationpage = data);\n if (this.navigationpage === 'casetransactions') {\n // window.location.href='/refund-list?takePayment=false&refundlist=true';\n // // this.OrderslistService.setnavigationPage('casetransactions');\n // // this.OrderslistService.setisFromServiceRequestPage(false);\n // // this.paymentLibComponent.VIEW ='case-transactions';\n // // this.paymentLibComponent.viewName = 'case-transactions';\n // // this.paymentLibComponent.ISBSENABLE = true;\n // // this.paymentLibComponent.isRefundStatusView = false;\n this.paymentLibComponent.viewName = 'refundstatuslist';\n this.paymentLibComponent.isRefundStatusView = true;\n } else {\n this.paymentLibComponent.viewName = 'refundstatuslist';\n this.paymentLibComponent.isRefundStatusView = true;\n }\n }\n loadRefundsHomePage() {\n if(typeof this.paymentLibComponent.TAKEPAYMENT === 'string' && this.paymentLibComponent.TAKEPAYMENT === 'false') {\n //window.location.href='/refund-list?takePayment=false&refundlist=true';\n this.paymentLibComponent.viewName = 'refund-list';\n }\n else {\n this.OrderslistService.setnavigationPage('casetransactions');\n this.OrderslistService.setisFromServiceRequestPage(false);\n this.paymentLibComponent.VIEW ='case-transactions';\n this.paymentLibComponent.viewName = 'case-transactions';\n this.paymentLibComponent.ISBSENABLE = true;\n this.paymentLibComponent.isRefundStatusView = false;\n }\n }\n redirecttoRefundListPage() {\n if((typeof this.paymentLibComponent.TAKEPAYMENT === 'string' && this.paymentLibComponent.TAKEPAYMENT === 'false') || (typeof this.paymentLibComponent.TAKEPAYMENT === 'boolean' && !this.paymentLibComponent.TAKEPAYMENT) ) {\n // window.location.href='/refund-list?takePayment=false&refundlist=true';\n this.paymentLibComponent.viewName = 'refund-list';\n }\n else {\n this.loadRefundListPage();\n }\n }\n // loadCaseTransactionPage() {\n // this.paymentLibComponent.isRefundStatusView = false;\n // this.paymentLibCo}mponent.TAKEPAYMENT = true;\n // this.paymentLibComponent.viewName = 'case-transactions';\n // this.paymentViewService.getBSfeature().subscribe(\n // features => {\n // let result = JSON.parse(features).filter(feature => feature.uid === BS_ENABLE_FLAG);\n // this.paymentLibComponent.ISBSENABLE = result[0] ? result[0].enable : false;\n // },\n // err => {\n // this.paymentLibComponent.ISBSENABLE = false;\n // }\n // );\n\n // let partUrl = `selectedOption=${this.paymentLibComponent.SELECTED_OPTION}`;\n // partUrl += this.bsPaymentDcnNumber ? `&dcn=${this.bsPaymentDcnNumber}` : '';\n // partUrl += this.paymentLibComponent.ISBSENABLE ? '&isBulkScanning=Enable' : '&isBulkScanning=Disable';\n // partUrl += this.paymentLibComponent.ISTURNOFF ? '&isTurnOff=Enable' : '&isTurnOff=Disable';\n // partUrl += this.paymentLibComponent.ISSFENABLE ? '&isStFixEnable=Enable' : '&isStFixEnable=Disable';\n // partUrl += `&caseType=${this.paymentLibComponent.CASETYPE}`;\n // partUrl += this.isNewPcipalOff ? '&isNewPcipalOff=Enable' : '&isNewPcipalOff=Disable';\n // partUrl += this.isOldPcipalOff ? '&isOldPcipalOff=Enable' : '&isOldPcipalOff=Disable';\n // let url = `/payment-history/${this.ccdCaseNumber}?view=case-transactions&takePayment=true&${partUrl}`;\n // this.router.navigateByUrl(url);\n // }\n\n resetForm(vals, field) {\n if(field==='action' || field==='all') {\n this.refundActionsHasError = vals[0];\n }\n if(field==='rejectReason' || field==='all') {\n this.refundRejectReasonHasError = vals[1];\n }\n if(field==='addAreason' || field==='all') {\n this.isReasonFieldEmpty = vals[2];\n this.isReasonFieldInvalid = vals[3];\n this.reasonFieldMinHasError = vals[4];\n this.reasonFieldMaxHasError = vals[5];\n }\n if(field==='enterReason' || field==='all') {\n this.isReasonEmpty = vals[6];\n this.isReasonInvalid = vals[7];\n }\n }\n\n goToCaseReview() {\n this.router.navigate([`/cases/case-details/${this.ccdCaseNumber}`], {relativeTo: this.activeRoute});\n }\n}\n","import {Component, OnInit, Input} from '@angular/core';\nimport { RefundsService } from '../../services/refunds/refunds.service';\nimport { IRefundList } from '../../interfaces/IRefundList';\n\n@Component({\n selector: 'ccpay-refund-list',\n templateUrl: './refund-list.component.html',\n styleUrls: ['./refund-list.component.css']\n})\nexport class RefundListComponent implements OnInit {\n @Input('USERID') USERID: string;\n @Input('LOGGEDINUSERROLES') LOGGEDINUSERROLES: any[];\n @Input('LOGGEDINUSEREMAIL') LOGGEDINUSEREMAIL:string;\n\n constructor(private refundService: RefundsService) {\n }\n\n tableApprovalHeader: string;\n tableRejectedHeader: string;\n submittedRefundList: IRefundList[] = [];\n rejectedRefundList: IRefundList[] = [];\n approvalStatus = 'Sent for approval';\n rejectStatus = 'Update required';\n // approvalStatus = 'sent for approval';\n // rejectStatus = 'sent back';\n errorMessage = null;\n isApproveTableVisible:boolean;\n isRejectTableVisible:boolean;\n dropdownvalue: string;\n isAuthorized: boolean = true;\n userLst\n ngOnInit() {\n \n this.userLst = this.LOGGEDINUSERROLES;\n\n \n if(this.LOGGEDINUSERROLES.some(i =>i.includes('payments-refund-approver'))){\n this.isAuthorized = true;\n } else {\n this.isApproveTableVisible = false;\n this.isAuthorized = false;\n }\n\n \n this.tableApprovalHeader = 'Refunds to be approved';\n this.tableRejectedHeader = 'Refunds returned to caseworker';\n\n if(this.isAuthorized) {\n this.refundService.getRefundList(this.approvalStatus,true).subscribe(\n refundList => {\n this.submittedRefundList = refundList['refund_list'];\n this.isApproveTableVisible = true;\n }\n ),\n (error: any) => {\n this.errorMessage = error.replace(/\"/g,\"\");\n };\n }\n\n this.refundService.getRefundList(this.rejectStatus,false).subscribe(\n refundList => {\n this.rejectedRefundList = refundList['refund_list'];\n this.isRejectTableVisible = true;\n }\n ),\n (error: any) => {\n this.errorMessage = error.replace(/\"/g,\"\");\n };\n\n }\n \n}","import { Injectable } from '@angular/core';\nimport {HttpClient} from '@angular/common/http';\nimport {Observable} from 'rxjs/internal/Observable';\n\nimport {ICardDetails} from '../../interfaces/ICardDetails';\nimport {PaymentLibService} from '../../payment-lib.service';\nimport { catchError } from 'rxjs/operators';\nimport { ErrorHandlerService } from '../shared/error-handler.service';\nimport { LoggerService } from '../shared/logger/logger.service';\n\n\n@Injectable({\n providedIn: 'root'\n})\nexport class CardDetailsService {\n\n constructor(private http: HttpClient,\n private logger: LoggerService,\n private errorHandlerService: ErrorHandlerService,\n private paymentLibService: PaymentLibService) { }\n\n getCardDetails(paymentReference: string): Observable<ICardDetails> {\n this.logger.info('Card-detail-service getCardDetails for: ', paymentReference);\n\n return this.http.get<ICardDetails>(`${this.paymentLibService.API_ROOT}/card-payments/${paymentReference}/details`, {\n withCredentials: true\n })\n .pipe(\n catchError(this.errorHandlerService.handleError)\n );\n }\n}\n","import { Component, OnInit } from '@angular/core';\nimport { CardDetailsService } from '../../services/card-details/card-details.service';\nimport {ICardDetails} from '../../interfaces/ICardDetails';\nimport { PaymentLibComponent } from '../../payment-lib.component';\n\n@Component({\n selector: 'ccpay-card-details',\n templateUrl: './card-details.component.html',\n styleUrls: ['./card-details.component.css']\n})\nexport class CardDetailsComponent implements OnInit {\n pageTitle: string = 'Card details';\n cardDetails: ICardDetails;\n paymentReference: string;\n errorMessage: string;\n\n constructor(private cardDetailsService: CardDetailsService,\n private paymentLibComponent: PaymentLibComponent) { }\n\n ngOnInit() {\n this.cardDetailsService.getCardDetails(this.paymentLibComponent.paymentReference).subscribe(\n cardDetails => this.cardDetails = cardDetails,\n (error: any) => this.errorMessage = <any>error\n );\n }\n\n get getPaymentReference(): string {\n return this.paymentReference;\n }\n\n}\n","import { Component } from '@angular/core';\n\n@Component({\n template: `\n <h1>This is not the page you were looking for!</h1>\n `\n})\nexport class PageNotFoundComponent { }\n","import { Injectable } from '@angular/core';\nimport { PaymentLibService } from '../../payment-lib.service';\nimport { HttpClient } from '@angular/common/http';\nimport { IStatusHistories } from '../../interfaces/IStatusHistories';\nimport { Observable } from 'rxjs/internal/Observable';\nimport { ErrorHandlerService } from '../shared/error-handler.service';\nimport { catchError } from 'rxjs/operators';\nimport { LoggerService } from '../shared/logger/logger.service';\n\n\n@Injectable({\n providedIn: 'root'\n})\nexport class StatusHistoryService {\n\n constructor(private http: HttpClient,\n private logger: LoggerService,\n private errorHandlerService: ErrorHandlerService,\n private paymentLibService: PaymentLibService) { }\n\n getPaymentStatusesByReference(paymentReference: string, paymentMethod: string): Observable<IStatusHistories> {\n this.logger.info('Status-history-service getPaymentStatusesByReference for: ', paymentReference);\n\n return this.http.get<IStatusHistories>(paymentMethod === 'card' || paymentMethod === 'cash' || paymentMethod === 'cheque' || paymentMethod === 'postal order' ?\n `${this.paymentLibService.API_ROOT}/card-payments/${paymentReference}/statuses` :\n `${this.paymentLibService.API_ROOT}/credit-account-payments/${paymentReference}/statuses`, {\n withCredentials: true\n })\n .pipe(\n catchError(this.errorHandlerService.handleError)\n );\n }\n}\n","import { Component, OnInit, Input } from '@angular/core';\nimport { IStatusHistories } from '../../interfaces/IStatusHistories';\nimport { StatusHistoryService } from '../../services/status-history/status-history.service';\nimport { PaymentLibComponent } from '../../payment-lib.component';\n\n@Component({\n selector: 'ccpay-payment-statuses',\n templateUrl: './status-history.component.html',\n styleUrls: ['./status-history.component.css']\n})\nexport class StatusHistoryComponent implements OnInit {\n @Input() isTakePayment: boolean;\n pageTitle: string = 'Payment status history';\n statuses: IStatusHistories;\n errorMessage: string;\n\n constructor(private statusHistoryService: StatusHistoryService,\n private paymentLibComponent: PaymentLibComponent) { }\n\n ngOnInit() {\n this.statusHistoryService.getPaymentStatusesByReference(this.paymentLibComponent.paymentReference, this.paymentLibComponent.paymentMethod).subscribe(\n statuses => this.statuses = statuses,\n (error: any) => this.errorMessage = <any>error.replace(/\"/g,\"\")\n );\n \n }\n\n}\n","import { Component, Input, OnInit } from '@angular/core';\nimport { IPayment } from '../../interfaces/IPayment';\n\n@Component({\n selector: 'ccpay-pba-details',\n templateUrl: './pba-details.component.html',\n styleUrls: ['./pba-details.component.css']\n})\nexport class PbaDetailsComponent implements OnInit {\n @Input() payment: IPayment;\n\n constructor() { }\n\n ngOnInit() {\n }\n\n}\n","import { Injectable } from '@angular/core';\nimport { Logger } from './logger.service';\n\nexport let isDebugMode = false;\n\nconst noop = (): any => undefined;\n\n@Injectable({\n providedIn: 'root'\n})\nexport class ConsoleLoggerService implements Logger {\n\n get info() {\n if (isDebugMode) {\n return console.info.bind(console);\n } else {\n return noop;\n }\n }\n\n get warn() {\n if (isDebugMode) {\n return console.warn.bind(console);\n } else {\n return noop;\n }\n }\n\n get error() {\n if (isDebugMode) {\n return console.error.bind(console);\n } else {\n return noop;\n }\n }\n\n invokeConsoleMethod(type: string, args?: any): void {\n const logFn: Function = (console)[type] || console.log || noop;\n logFn.apply(console, [args]);\n }\n}\n","import { Injectable } from '@angular/core';\nimport {HttpClient} from '@angular/common/http';\nimport {LoggerService} from '../shared/logger/logger.service';\nimport {ErrorHandlerService} from '../shared/error-handler.service';\nimport {PaymentLibService} from '../../payment-lib.service';\nimport {Observable} from 'rxjs/Observable';\nimport {IPaymentGroup} from '../../interfaces/IPaymentGroup';\nimport {catchError} from 'rxjs/operators';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class CaseTransactionsService {\n\n constructor(private http: HttpClient,\n private logger: LoggerService,\n private errorHandlerService: ErrorHandlerService,\n private paymentLibService: PaymentLibService\n ) { }\n\n getPaymentGroups(ccdCaseNumber: string): Observable<IPaymentGroup[]> {\n this.logger.info('Case-transactions-service getPaymentGroups for: ', ccdCaseNumber);\n\n return this.http.get<IPaymentGroup[]>(`${this.paymentLibService.API_ROOT}/cases/${ccdCaseNumber}/paymentgroups`, {\n withCredentials: true\n })\n .pipe(\n catchError(this.errorHandlerService.handleError)\n );\n }\n}\n","import { Injectable } from '@angular/core';\nimport {HttpClient} from '@angular/common/http';\nimport {ErrorHandlerService} from '../shared/error-handler.service';\nimport { WebComponentHttpClient } from '../shared/httpclient/webcomponent.http.client';\nimport {PaymentLibService} from '../../payment-lib.service';\nimport {Observable} from 'rxjs/Observable';\nimport {catchError} from 'rxjs/operators';\nimport { IBSPayments } from '../../interfaces/IBSPayments';\nimport { AllocatePaymentRequest } from '../../interfaces/AllocatePaymentRequest';\nimport { IPaymentGroup } from '../../interfaces/IPaymentGroup';\n\n\n@Injectable({\n providedIn: 'root'\n})\nexport class BulkScaningPaymentService {\n\n constructor(private http: HttpClient,\n private https: WebComponentHttpClient,\n private errorHandlerService: ErrorHandlerService,\n private paymentLibService: PaymentLibService\n ) { }\n\n getBSPaymentsByCCD(ccdCaseNumber: string): Observable<IBSPayments> {\n return this.http.get<IBSPayments>(`${this.paymentLibService.BULKSCAN_API_ROOT}/cases/${ccdCaseNumber}`, {\n withCredentials: true\n })\n .pipe(\n catchError(this.errorHandlerService.handleError)\n );\n }\n getBSPaymentsByDCN(dcn: string): Observable<IBSPayments> {\n return this.http.get<IBSPayments>(`${this.paymentLibService.BULKSCAN_API_ROOT}/cases?document_control_number=${dcn}`, {\n withCredentials: true\n })\n .pipe(\n catchError(this.errorHandlerService.handleError)\n );\n }\n postBSAllocatePayment(body: AllocatePaymentRequest, paymentRef: string): Observable<any> {\n return this.https.post(`${this.paymentLibService.API_ROOT}/payment-groups/${paymentRef}/bulk-scan-payments`, body).pipe(\n catchError(this.errorHandlerService.handleError)\n );\n }\n postBSPaymentStrategic(body: AllocatePaymentRequest, paymentGroupRef: string): Observable<any> {\n return this.https.post(`${this.paymentLibService.API_ROOT}/payment-groups/${paymentGroupRef}/bulk-scan-payments-strategic`, body).pipe(\n catchError(this.errorHandlerService.handleError)\n );\n }\n postBSWoPGStrategic(body: AllocatePaymentRequest): Observable<any> {\n return this.https.post(`${this.paymentLibService.API_ROOT}/payment-groups/bulk-scan-payments-strategic`, body).pipe(\n catchError(this.errorHandlerService.handleError)\n );\n }\n patchBSChangeStatus(dcnNumber: string, status: string): Observable<any> {\n return this.https.patch(`${this.paymentLibService.API_ROOT}/bulk-scan-payments/${dcnNumber}/status/${status}`, status).pipe(\n catchError(this.errorHandlerService.handleError)\n );\n }\n calculateOutStandingAmount(paymentGroup: IPaymentGroup): number {\n let feesTotal = 0.00,\n paymentsTotal = 0.00,\n remissionsTotal = 0.00;\n\n if (paymentGroup.fees) {\n paymentGroup.fees.forEach(fee => {\n feesTotal = feesTotal + fee.calculated_amount;\n });\n }\n\n if (paymentGroup.payments) {\n paymentGroup.payments.forEach(payment => {\n if (payment.status.toUpperCase() === 'SUCCESS') {\n paymentsTotal = paymentsTotal + payment.amount;\n }\n });\n }\n\n if (paymentGroup.remissions) {\n paymentGroup.remissions.forEach(remission => {\n remissionsTotal = remissionsTotal + remission.hwf_amount;\n });\n } \n return (feesTotal - remissionsTotal) - paymentsTotal;\n }\n\n removeUnwantedString(input: string, replaceText: string) {\n const pattern = /[\\_]/gi;\n return input.replace(pattern, replaceText);\n }\n\n downloadSelectedReport(reportName: string, startDate: string, endDate:string): Observable<any> {\n return this.https.get(`${this.paymentLibService.BULKSCAN_API_ROOT}/report/data?date_from=${startDate}&date_to=${endDate}&report_type=${reportName}`, {\n withCredentials: true\n })\n .pipe(\n catchError(this.errorHandlerService.handleError)\n );\n}\n}\n","import { Component, OnInit, Input } from '@angular/core';\nimport { PaymentLibComponent } from '../../payment-lib.component';\nimport { IPaymentGroup } from '../../interfaces/IPaymentGroup';\nimport { CaseTransactionsService } from '../../services/case-transactions/case-transactions.service';\nimport { BulkScaningPaymentService } from '../../services/bulk-scaning-payment/bulk-scaning-payment.service';\nimport { PaymentViewService } from '../../services/payment-view/payment-view.service';\nimport { OrderslistService } from '../../services/orderslist.service';\nimport { IFee } from '../../interfaces/IFee';\nimport { IPayment } from '../../interfaces/IPayment';\nimport { IRemission } from '../../interfaces/IRemission';\nimport { IPaymentView } from '../../interfaces/IPaymentView';\nimport { IOrderReferenceFee } from '../../interfaces/IOrderReferenceFee';\nimport { Router } from '@angular/router';\n\nconst BS_ENABLE_FLAG = 'bulk-scan-enabling-fe';\n\n@Component({\n selector: 'ccpay-case-transactions',\n templateUrl: './case-transactions.component.html',\n styleUrls: ['./case-transactions.component.css']\n})\nexport class CaseTransactionsComponent implements OnInit {\n @Input('LOGGEDINUSERROLES') LOGGEDINUSERROLES: string[];\n @Input() isTakePayment: boolean;\n takePayment: boolean;\n ccdCaseNumber: string;\n excReference: string;\n paymentGroups: any[] = [];\n payments: IPayment[] = [];\n nonPayments: IPayment[] = [];\n allPayments: IPayment[] = [];\n remissions: IRemission[] = [];\n fees: IFee[] = [];\n errorMessage: string;\n totalFees: number;\n totalPayments: number;\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 unprocessedRecordCount: number;\n isFeeRecordsExist: boolean = false;\n isGrpOutstandingAmtPositive: boolean = false;\n totalRefundAmount: Number;\n caseType: String;\n // lsCcdNumber: any = ls.get<any>('ccdNumber');\n payment: IPayment;\n paymentGroup: IPaymentGroup;\n paymentView: IPaymentView;\n\n //Order changes\n orderDetail: any[] = [];\n\n isAddRemissionEnable: boolean = false;\n orderRemissionDetails: any[] = [];\n orderLevelFees: IOrderReferenceFee[] = [];\n ispaymentGroupApisuccess: boolean = false;\n cpoDetails: any = null;\n orderRef: string;\n orderStatus: string;\n orderParty: string;\n orderCreated: Date;\n orderCCDEvent: string;\n serviceRequestValue: string;\n orderAddBtnEnable: boolean;\n orderFeesTotal: number = 0.00;\n orderRemissionTotal: number = 0.00;\n orderTotalPayments: number = 0.00;\n orderPendingPayments: number = 0.00;\n isCPODown: boolean;\n test: boolean;\n isPBA: boolean = false;\n isIssueRefunfBtnEnable: boolean = false;\n isAddRemissionBtnEnabled: boolean = false;\n isRefundRemissionBtnEnable: boolean = false;\n allowedRolesToAccessRefund = ['payments-refund-approver', 'payments-refund'];\n isEligible4PBAPayment = ['pui-finance-manager', 'pui-user-manager', 'pui-organisation-manager', 'pui-case-manager'];\n currentDate = new Date();\n isFromServiceRequestPage: boolean;\n navigationpage: string;\n remissionFeeAmt: number;\n constructor(private router: Router,\n private paymentViewService: PaymentViewService,\n private bulkScaningPaymentService: BulkScaningPaymentService,\n private caseTransactionsService: CaseTransactionsService,\n private paymentLibComponent: PaymentLibComponent,\n private OrderslistService: OrderslistService\n ) { }\n\n ngOnInit() {\n this.navigationpage = '';\n if(this.OrderslistService.getpaymentPageView() !== null) {\n this.OrderslistService.getpaymentPageView().subscribe((data) => this.paymentView = data);\n }\n if((this.LOGGEDINUSERROLES === undefined || this.LOGGEDINUSERROLES.length === 0 )&&this.OrderslistService.getUserRolesList() !== null) {\n this.OrderslistService.getUserRolesList().subscribe((data) => this.LOGGEDINUSERROLES = data);\n }\n if(this.OrderslistService.getnavigationPageValue() !== null) {\n this.OrderslistService.getnavigationPageValue().subscribe((data) => this.navigationpage = data);\n }\n \n if (this.paymentView !== undefined && this.paymentView !== null && this.paymentView.payment_group_reference !== undefined && this.navigationpage === 'paymentdetailspage') {\n this.goToPayementView(this.paymentView.payment_group_reference, this.paymentView.reference, this.paymentView.method);\n }\n this.isGrpOutstandingAmtPositive = false;\n this.ccdCaseNumber = this.paymentLibComponent.CCD_CASE_NUMBER;\n this.caseType = this.paymentLibComponent.CASETYPE;\n if (this.paymentLibComponent.CCD_CASE_NUMBER === '') {\n this.ccdCaseNumber = this.paymentLibComponent.EXC_REFERENCE;\n }\n this.excReference = this.paymentLibComponent.EXC_REFERENCE;\n this.takePayment = this.paymentLibComponent.TAKEPAYMENT;\n \n const serviceRequest = this.paymentLibComponent.SERVICEREQUEST;\n if ( serviceRequest !== undefined && serviceRequest.toString() === 'true' ) {\n this.serviceRequestValue = 'true';\n } else {\n this.serviceRequestValue = 'false';\n }\n this.isBulkScanEnable = this.paymentLibComponent.ISBSENABLE;\n this.dcnNumber = this.paymentLibComponent.DCN_NUMBER;\n this.selectedOption = this.paymentLibComponent.SELECTED_OPTION.toLocaleLowerCase();\n this.isTurnOff = this.paymentLibComponent.ISTURNOFF;\n this.isStrategicFixEnable = this.paymentLibComponent.ISSFENABLE;\n if (!this.isTurnOff) {\n // if (this.lsCcdNumber !== this.ccdCaseNumber) {\n // this.router.navigateByUrl(`/ccd-search?takePayment=true`);\n // }\n\n this.caseTransactionsService.getPaymentGroups(this.ccdCaseNumber).subscribe(\n paymentGroups => {\n this.isAnyFeeGroupAvilable =true;\n this.paymentGroups = paymentGroups['payment_groups'];\n this.calculateAmounts();\n this.calculateOrderFeesAmounts();\n this.calculateRefundAmount();\n if (this.isFromServiceRequestPage) {\n this.OrderslistService.getSelectedOrderRefId().subscribe((data) => this.orderRef = data);\n this.goToOrderViewDetailSection(this.orderRef);\n } else {\n this.paymentViewService.getPartyDetails(this.ccdCaseNumber).subscribe(\n response => {\n this.cpoDetails = JSON.parse(response).content[0];\n\n },\n (error: any) => {\n this.errorMessage = <any>error ? error.replace(/\"/g,\"\") : \"\";\n this.isCPODown = true;\n }\n );\n\n }\n\n\n },\n (error: any) => {\n this.errorMessage = <any>error ? error.replace(/\"/g,\"\") : \"\";\n this.isAnyFeeGroupAvilable = false;\n this.setDefaults();\n }\n );\n } else {\n this.caseTransactionsService.getPaymentGroups(this.ccdCaseNumber).subscribe(\n paymentGroups => {\n this.isAnyFeeGroupAvilable =true;\n this.paymentGroups = paymentGroups['payment_groups'];\n this.calculateAmounts();\n this.calculateOrderFeesAmounts();\n this.totalRefundAmount = this.calculateRefundAmount();\n this.paymentViewService.getPartyDetails(this.ccdCaseNumber).subscribe(\n response => {\n this.cpoDetails = JSON.parse(response).content[0];\n\n },\n (error: any) => {\n this.errorMessage = <any>error ? error.replace(/\"/g,\"\") : \"\";\n this.setDefaults();\n this.isCPODown = true;\n }\n );\n\n },\n (error: any) => {\n this.errorMessage = <any>error ? error.replace(/\"/g,\"\") : \"\";\n this.isAnyFeeGroupAvilable = false;\n this.setDefaults();\n }\n );\n }\n\n if( this.paymentGroups !== undefined) {\n this.checkForExceptionRecord();\n }\n\n if(this.OrderslistService.getisFromServiceRequestPages() !== null) {\n this.OrderslistService.getisFromServiceRequestPages().subscribe((data) => this.isFromServiceRequestPage = data);\n }\n\n }\n\n setDefaults(): void {\n this.totalPayments = 0.00;\n this.totalRemissions = 0.00;\n this.totalNonOffPayments = 0.00;\n this.totalFees = 0.00;\n }\n\n getAllocationStatus(payments: any) {\n\n let paymentAllocation = payments.payment_allocation,\n isAllocationStatusExist = paymentAllocation.length > 0;\n return isAllocationStatusExist ? paymentAllocation[0].allocation_status : '-';\n //return \"-\";\n\n }\n\n checkForExceptionRecord(): void {\n\n if (this.paymentGroups.length === 0 && (this.selectedOption.toLocaleLowerCase() === 'ccdorexception' || this.selectedOption.toLocaleLowerCase() === 'rc')) {\n this.bulkScaningPaymentService.getBSPaymentsByCCD(this.ccdCaseNumber).subscribe(\n recordData => {\n if (recordData['data'] && recordData['data'].exception_record_reference && recordData['data'].exception_record_reference.length > 0 && recordData['data'].ccd_reference > 0) {\n this.isExceptionRecord = false;\n this.isAddFeeBtnEnabled = true;\n }\n\n if (recordData['data'] && recordData['data'].exception_record_reference && recordData['data'].exception_record_reference.length > 0 && recordData['data'].ccd_reference === undefined) {\n this.isExceptionRecord = true;\n this.isAddFeeBtnEnabled = false;\n }\n\n if (recordData['data'] && recordData['data'].exception_record_reference && recordData['data'].exception_record_reference.length === undefined && recordData['data'].ccd_reference > 0) {\n this.isExceptionRecord = false;\n this.isAddFeeBtnEnabled = true;\n }\n });\n }\n\n if (this.paymentGroups.length === 0 && this.selectedOption.toLocaleLowerCase() === 'dcn') {\n if (this.paymentLibComponent.CCD_CASE_NUMBER.length > 0 && this.paymentLibComponent.EXC_REFERENCE.length > 0) {\n this.isExceptionRecord = false;\n this.isAddFeeBtnEnabled = true;\n } else if (this.paymentLibComponent.CCD_CASE_NUMBER.length === 0 && this.paymentLibComponent.EXC_REFERENCE.length > 0) {\n this.isExceptionRecord = true;\n this.isAddFeeBtnEnabled = false;\n } else {\n this.isExceptionRecord = false;\n this.isAddFeeBtnEnabled = true;\n }\n }\n if (this.paymentGroups.length > 0)\n this.paymentGroups.forEach(paymentGroup => {\n if (paymentGroup.payments) {\n paymentGroup.payments.forEach(payment => {\n if (payment.case_reference !== undefined && payment.ccd_case_number === undefined) {\n this.isExceptionRecord = true;\n this.isAddFeeBtnEnabled = false;\n } else {\n this.isExceptionRecord = false;\n this.isAddFeeBtnEnabled = true;\n }\n\n });\n }\n });\n }\n\n calculateOrderFeesAmounts(): void {\n let feesTotal = 0.00;\n this.paymentGroups.forEach(paymentGroup => {\n this.resetOrderVariables();\n if (paymentGroup.fees) {\n paymentGroup.fees.forEach(fee => {\n this.orderFeesTotal = this.orderFeesTotal + fee.calculated_amount\n }\n )\n }\n if (paymentGroup.remissions) {\n paymentGroup.remissions.forEach(remission => {\n this.orderRemissionTotal = this.orderRemissionTotal + remission.hwf_amount;\n });\n }\n\n if (paymentGroup.payments) {\n paymentGroup.payments.forEach(payment => {\n if (payment.status.toUpperCase() === 'SUCCESS') {\n this.orderTotalPayments = this.orderTotalPayments + payment.amount;\n }\n });\n }\n\n // this.orderPendingPayments = (this.orderFeesTotal - this.orderRemissionTotal) - this.orderTotalPayments;\n if (paymentGroup.service_request_status === 'Paid') {\n this.orderStatus = paymentGroup.service_request_status;\n this.orderAddBtnEnable = false;\n } else if (paymentGroup.service_request_status === 'Partially paid' || paymentGroup.service_request_status === 'Not paid') {\n this.orderStatus = paymentGroup.service_request_status;\n this.orderAddBtnEnable = true;\n }\n\n //this.orderLevelFees.push({orderRefId:paymentGroup['payment_group_reference'],orderTotalFees: this.orderFeesTotal,orderStatus: this.orderStatus,orderParty:'Santosh', orderCCDEvent:'Case Creation',orderCreated: new Date(), orderAddBtnEnable: this.orderAddBtnEnable}); this.cpoDetails['createdTimestamp']\n if (this.cpoDetails !== null) {\n this.orderLevelFees.push({ orderRefId: paymentGroup['payment_group_reference'], orderTotalFees: this.orderFeesTotal, orderStatus: this.orderStatus, orderParty: this.cpoDetails['responsibleParty'], orderCCDEvent: this.cpoDetails['action'], orderCreated: paymentGroup['date_created'], orderAddBtnEnable: this.orderAddBtnEnable });\n\n } else {\n this.orderLevelFees.push({ orderRefId: paymentGroup['payment_group_reference'], orderTotalFees: this.orderFeesTotal, orderStatus: this.orderStatus, orderParty: '', orderCCDEvent: '', orderCreated: paymentGroup['date_created'], orderAddBtnEnable: this.orderAddBtnEnable });\n }\n\n if (this.orderStatus !== 'Paid') {\n this.OrderslistService.setOrdersList(this.orderLevelFees);\n }\n });\n };\n\n resetOrderVariables(): void {\n this.orderFeesTotal = 0.00;\n this.orderTotalPayments = 0.00;\n this.orderRemissionTotal = 0.00;\n this.orderPendingPayments = 0.00;\n this.isAddFeeBtnEnabled = true;\n\n };\n\n goToOrderViewDetailSection(orderReferenceObj: any) {\n if (this.isFromServiceRequestPage) {\n this.OrderslistService.setOrderRefId(orderReferenceObj);\n this.orderRef = orderReferenceObj;\n } else {\n this.OrderslistService.setOrderRefId(orderReferenceObj.orderRefId);\n this.orderRef = orderReferenceObj.orderRefId;\n }\n\n this.orderFeesTotal = 0.00;\n this.orderRemissionTotal = 0.00;\n this.orderTotalPayments = 0.00;\n this.orderPendingPayments = 0.00;\n\n this.orderDetail = this.paymentGroups.filter(x => x.payment_group_reference === this.orderRef);\n this.orderDetail.forEach(orderDetail => {\n if (orderDetail.fees) {\n orderDetail.fees.forEach(fee => {\n this.orderFeesTotal = this.orderFeesTotal + fee.calculated_amount;\n });\n }\n if (orderDetail.remissions) {\n orderDetail.remissions.forEach(remission => {\n this.orderRemissionTotal = this.orderRemissionTotal + remission.hwf_amount;\n });\n if (orderDetail.payments) {\n this.payment = orderDetail.payments[0];\n orderDetail.payments.forEach(payment => {\n if (payment.status.toUpperCase() === 'SUCCESS') {\n this.orderTotalPayments = this.orderTotalPayments + payment.amount;\n }\n });\n }\n }\n this.orderStatus = orderDetail.service_request_status;\n });\n //this.orderPendingPayments = (this.orderFeesTotal - this.orderRemissionTotal) - this.orderTotalPayments;\n // this.orderRef = orderReferenceObj.orderRefId;\n // if (this.orderPendingPayments <= 0.00) {\n // this.orderStatus = 'Paid';\n // } else if (this.orderFeesTotal > 0 && (this.orderTotalPayments > 0 || this.orderRemissionTotal > 0) && (this.orderTotalPayments < this.orderPendingPayments)) {\n // this.orderStatus = 'Partially paid'\n // } else {\n // this.orderStatus = 'Not paid'\n // }\n\n\n if (this.cpoDetails !== null) {\n this.orderParty = this.cpoDetails['responsibleParty'];\n this.orderCreated = this.cpoDetails['createdTimestamp'];\n this.orderCCDEvent = this.cpoDetails['action'];\n } else {\n this.orderParty = '';\n this.orderCCDEvent = '';\n this.orderCreated = orderReferenceObj.orderCreated;\n }\n this.viewStatus = 'order-full-view';\n }\n\n redirectToOrderFeeSearchPage(event: any, orderef: any) {\n if(orderef.orderAddBtnEnable) {\n event.preventDefault();\n this.paymentLibComponent.bspaymentdcn = null;\n this.paymentLibComponent.paymentGroupReference = orderef.orderRefId;\n this.paymentLibComponent.isTurnOff = this.isTurnOff;\n this.paymentLibComponent.viewName = 'fee-summary';\n }\n }\n\n\n\n\n calculateAmounts(): void {\n let feesTotal = 0.00,\n paymentsTotal = 0.00,\n remissionsTotal = 0.00,\n nonOffLinePayment = 0.00;\n\n this.paymentGroups.forEach(paymentGroup => {\n if (paymentGroup.fees) {\n paymentGroup.fees.forEach(fee => {\n // new feature Apportionment toggle changes\n if (!this.isTurnOff) {\n if (fee.date_created) {\n let a = fee.amount_due === undefined;\n let b = fee.amount_due <= 0;\n this.clAmountDue = a ? this.clAmountDue + fee.net_amount : b ? this.clAmountDue + 0 : this.clAmountDue + fee.amount_due;\n }\n fee['payment_group_reference'] = paymentGroup['payment_group_reference'];\n this.fees.push(fee);\n } else {\n feesTotal = feesTotal + fee.calculated_amount;\n this.fees.push(fee);\n }\n\n });\n }\n if (this.isTurnOff) {\n this.totalFees = feesTotal;\n }\n\n if (paymentGroup.payments) {\n paymentGroup.payments.forEach(payment => {\n // new feature Apportionment toggle changes\n if (!this.isTurnOff) {\n let allocationLen = payment.payment_allocation;\n\n if (payment.status.toUpperCase() === 'SUCCESS') {\n paymentsTotal = paymentsTotal + payment.amount;\n if (allocationLen.length === 0 || allocationLen.length > 0 && allocationLen[0].allocation_status === 'Allocated') {\n nonOffLinePayment = nonOffLinePayment + payment.amount;\n }\n if (allocationLen.length > 0) {\n this.nonPayments.push(payment);\n }\n }\n if (allocationLen.length === 0) {\n this.payments.push(payment);\n }\n payment.paymentGroupReference = paymentGroup.payment_group_reference\n this.allPayments.push(payment);\n } else {\n if (payment.status.toUpperCase() === 'SUCCESS') {\n paymentsTotal = paymentsTotal + payment.amount;\n this.payments.push(payment);\n }\n payment.paymentGroupReference = paymentGroup.payment_group_reference\n this.allPayments.push(payment);\n }\n });\n }\n this.totalPayments = paymentsTotal;\n // new feature Apportionment toggle changes\n if (!this.isTurnOff) {\n this.totalNonOffPayments = nonOffLinePayment;\n }\n\n if (paymentGroup.remissions) {\n paymentGroup.remissions.forEach(remisison => {\n remissionsTotal = remissionsTotal + remisison.hwf_amount;\n this.remissions.push(remisison);\n });\n }\n this.totalRemissions = remissionsTotal;\n });\n\n }\n\n calculateRefundAmount() {\n if (!this.isTurnOff) {\n let isNewPaymentGroup = false;\n\n this.paymentGroups.forEach((paymentGroup, index) => {\n let grpOutstandingAmount = 0.00,\n feesTotal = 0.00,\n paymentsTotal = 0.00,\n remissionsTotal = 0.00,\n fees = [];\n\n if (paymentGroup.fees) {\n // this.isFeeRecordsExist = true;\n paymentGroup.fees.forEach(fee => {\n feesTotal = feesTotal + fee.calculated_amount;\n\n this.isRemissionsMatch = false;\n if (paymentGroup.remissions) {\n paymentGroup.remissions.forEach(rem => {\n if (rem.fee_code === fee.code) {\n this.isRemissionsMatch = true;\n fee['remissions'] = rem;\n // if(!fees.find(k => k.code=fee.code))\n // {\n fees.push(fee);\n //}\n }\n });\n }\n if (!this.isRemissionsMatch) {\n fees.push(fee);\n }\n\n if (fee.date_created) {\n isNewPaymentGroup = true;\n } else {\n this.isHistoricGroupAvailable = true;\n this.paymentGroups[index]['old'] = true;\n }\n });\n this.paymentGroups[index].fees = fees;\n }\n if (paymentGroup.payments) {\n paymentGroup.payments.forEach(payment => {\n if (payment.status.toUpperCase() === 'SUCCESS') {\n paymentsTotal = paymentsTotal + payment.amount;\n }\n });\n }\n\n if (paymentGroup.remissions) {\n paymentGroup.remissions.forEach(remission => {\n remissionsTotal = remissionsTotal + remission.hwf_amount;\n });\n }\n grpOutstandingAmount = (feesTotal - remissionsTotal) - paymentsTotal;\n if (grpOutstandingAmount > 0 && isNewPaymentGroup) {\n this.isAnyFeeGroupAvilable = true;\n this.isFeeRecordsExist = true;\n this.paymentRef = paymentGroup.payment_group_reference;\n }\n if (paymentGroup.fees && paymentGroup.fees.length > 0 && grpOutstandingAmount <= 0 && isNewPaymentGroup) {\n this.isAnyFeeGroupAvilable = false;\n }\n });\n if ((!isNewPaymentGroup && this.isHistoricGroupAvailable) || (!isNewPaymentGroup && !this.isHistoricGroupAvailable)) {\n this.isAnyFeeGroupAvilable = false;\n }\n } else {\n let totalRefundAmount = 0,\n isFeeAmountZero = false;\n this.paymentGroups.forEach(paymentGroup => {\n let grpOutstandingAmount = 0.00,\n feesTotal = 0.00,\n paymentsTotal = 0.00,\n remissionsTotal = 0.00;\n if (paymentGroup.fees) {\n this.isFeeRecordsExist = true;\n paymentGroup.fees.forEach(fee => {\n feesTotal = feesTotal + fee.calculated_amount;\n if (fee.calculated_amount === 0) {\n isFeeAmountZero = true\n }\n });\n\n }\n\n if (paymentGroup.payments) {\n paymentGroup.payments.forEach(payment => {\n if (payment.status.toUpperCase() === 'SUCCESS') {\n paymentsTotal = paymentsTotal + payment.amount;\n }\n });\n }\n\n if (paymentGroup.remissions) {\n paymentGroup.remissions.forEach(remission => {\n remissionsTotal = remissionsTotal + remission.hwf_amount;\n });\n }\n grpOutstandingAmount = (feesTotal - remissionsTotal) - paymentsTotal;\n if (grpOutstandingAmount < 0) {\n if (totalRefundAmount === 0) {\n totalRefundAmount = grpOutstandingAmount;\n } else {\n totalRefundAmount = (totalRefundAmount + grpOutstandingAmount);\n }\n }\n else if (grpOutstandingAmount > 0 || (grpOutstandingAmount === 0 && isFeeAmountZero)) {\n this.isGrpOutstandingAmtPositive = true;\n }\n });\n return totalRefundAmount * -1;\n }\n }\n\n getGroupOutstandingAmount(paymentGroup: IPaymentGroup): number {\n return this.bulkScaningPaymentService.calculateOutStandingAmount(paymentGroup);\n }\n\n redirectToFeeSearchPage(event: any) {\n event.preventDefault();\n let url = this.isBulkScanEnable ? '&isBulkScanning=Enable' : '&isBulkScanning=Disable';\n url += this.isTurnOff ? '&isTurnOff=Enable' : '&isTurnOff=Disable';\n url += this.isStrategicFixEnable ? '&isStFixEnable=Enable' : '&isStFixEnable=Disable';\n url += `&caseType=${this.caseType}`\n this.router.navigateByUrl(`/fee-search?selectedOption=${this.selectedOption}&ccdCaseNumber=${this.ccdCaseNumber}${url}`);\n }\n\n addRemission(fee: IFee) {\n if(this.chkForAddRemission(fee.code)) {\n this.feeId = fee;\n this.viewStatus = 'addremission';\n this.paymentViewService.getApportionPaymentDetails(this.payment.reference).subscribe(\n paymentGroup => {\n this.paymentGroup = paymentGroup;\n\n this.paymentGroup.payments = this.paymentGroup.payments.filter\n (paymentGroupObj => paymentGroupObj['reference'].includes(this.paymentLibComponent.paymentReference));\n this.payment = this.paymentGroup.payments[0];\n // const paymentAllocation = this.paymentGroup.payments[0].payment_allocation;\n // this.isStatusAllocated = paymentAllocation.length > 0 && paymentAllocation[0].allocation_status === 'Allocated' || paymentAllocation.length === 0;\n },\n (error: any) => this.errorMessage = error? error.replace(/\"/g,\"\") : \"\"\n );\n }\n }\n\n addRefundForRemission(payment: IPayment, remission: IRemission[],fees:any) {\n this.viewStatus = 'addrefundforremission';\n\n this.payment = payment;\n this.paymentViewService.getApportionPaymentDetails(this.payment.reference).subscribe(\n paymentGroup => {\n this.paymentGroup = paymentGroup;\n\n this.paymentGroup.payments = this.paymentGroup.payments.filter\n (paymentGroupObj => paymentGroupObj['reference'].includes(this.payment.reference));\n this.payment = this.paymentGroup.payments[0];\n this.remissions = remission;\n this.remissionFeeAmt = fees.filter(data=>data.code === this.remissions['fee_code'])[0].net_amount;\n // const paymentAllocation = this.paymentGroup.payments[0].payment_allocation;\n // this.isStatusAllocated = paymentAllocation.length > 0 && paymentAllocation[0].allocation_status === 'Allocated' || paymentAllocation.length === 0;\n },\n (error: any) => this.errorMessage = error\n );\n }\n\n redirectToremissionPage(event: any) {\n event.preventDefault();\n this.paymentLibComponent.viewName = 'remission'\n }\n goToServiceRequestPage() {\n this.paymentLibComponent.viewName = 'case-transactions';\n this.paymentLibComponent.TAKEPAYMENT = false;\n this.paymentLibComponent.SERVICEREQUEST = 'true';\n this.paymentLibComponent.isFromServiceRequestPage = true;\n window.location.reload();\n }\n redirectToReportsPage(event: any) {\n event.preventDefault();\n this.router.navigateByUrl(`/reports?selectedOption=${this.selectedOption}&ccdCaseNumber=${this.ccdCaseNumber}`);\n }\n\n loadFeeSummaryPage(paymentGroup: IPaymentGroup) {\n this.paymentLibComponent.bspaymentdcn = null;\n this.paymentLibComponent.paymentGroupReference = paymentGroup.payment_group_reference;\n this.paymentLibComponent.isTurnOff = this.isTurnOff;\n this.paymentLibComponent.viewName = 'fee-summary';\n }\n\n goToPaymentViewComponent(paymentGroup: any) {\n this.paymentLibComponent.paymentMethod = paymentGroup.paymentMethod;\n this.paymentLibComponent.paymentGroupReference = paymentGroup.paymentGroupReference;\n this.paymentLibComponent.paymentReference = paymentGroup.paymentReference;\n this.paymentLibComponent.viewName = 'payment-view';\n }\n\n goToPayementView(paymentGroupReference: string, paymentReference: string, paymentMethod: string) {\n this.goToPaymentViewComponent({ paymentGroupReference, paymentReference, paymentMethod });\n }\n\n selectedUnprocessedFeeEvent(unprocessedRecordId: string) {\n if (unprocessedRecordId) {\n if (this.isTurnOff) {\n this.isAddFeeBtnEnabled = false;\n }\n this.isUnprocessedRecordSelected = true;\n } else {\n if (this.isTurnOff) {\n this.isAddFeeBtnEnabled = true;\n }\n this.isUnprocessedRecordSelected = false;\n }\n }\n\n getUnprocessedFeeCount(unProcessedRecordCount: number) {\n this.unprocessedRecordCount = unProcessedRecordCount;\n }\n\n calculateAmountDue(fee: IFee) {\n\n if (fee.date_created) {\n return fee.amount_due !== undefined ? fee.amount_due : fee.net_amount;\n } else {\n return \"0.00\";\n }\n }\n\n confirmRemoveFee(fee: IFee) {\n this.isRemoveBtnDisabled = false;\n this.feeId = fee;\n this.viewStatus = 'feeRemovalConfirmation';\n }\n\n cancelRemoval() {\n this.viewStatus = 'main';\n }\n\n removeFee(fee: any) {\n this.isRemoveBtnDisabled = true;\n this.paymentViewService.deleteFeeFromPaymentGroup(fee).subscribe(\n (success: any) => {\n window.location.reload();\n },\n (error: any) => {\n this.errorMessage = error;\n this.isRemoveBtnDisabled = false;\n }\n );\n }\n\n isCheckAmountdueExist(amountDue: any) {\n return typeof amountDue === 'undefined';\n }\n\n issueRefund(payment: IPayment) {\n if (payment !== null && payment !== undefined) {\n if(this.chkIssueRefundBtnEnable(payment)) {\n this.viewStatus = 'issuerefund';\n this.payment = payment;\n this.paymentLibComponent.isFromServiceRequestPage = true;\n this.isRefundRemission = true;\n }\n }\n }\n\n chkForAddRemission(feeCode: string): boolean {\n if (this.chkForPBAPayment() && this.check4AllowedRoles2AccessRefund()) {\n if (this.orderDetail[0]['remissions'].length > 0) {\n for (const remission of this.orderDetail[0]['remissions']) {\n if (remission.fee_code === feeCode) {\n return false;\n }\n }\n }\n return true;\n } else {\n return false;\n }\n }\n\n chkForPBAPayment(): boolean {\n if (this.orderDetail !== null && this.orderDetail !== undefined) {\n this.orderDetail.forEach(orderDetail => {\n if (orderDetail.payments) {\n orderDetail.payments.forEach(payment => {\n if (payment.method.toLocaleLowerCase() === 'payment by account' && this.allowFurtherAccessAfter4Days(payment)) {\n this.isPBA = true;\n }\n });\n }\n });\n if (this.isPBA) {\n return true;\n } else {\n return false;\n };\n }\n }\n\n chkIssueRefundBtnEnable(payment: IPayment): boolean {\n if (this.check4AllowedRoles2AccessRefund() && this.allowFurtherAccessAfter4Days(payment) &&\n payment.method === 'payment by account' && payment.status.toLocaleLowerCase() === 'success') {\n this.isIssueRefunfBtnEnable = true;\n }\n if (this.isIssueRefunfBtnEnable) {\n return true;\n } else {\n return false;\n };\n }\n\n chkIsRefundRemissionBtnEnable(): boolean {\n if (this.orderDetail !== null && this.orderDetail !== undefined) {\n this.paymentLibComponent.isFromServiceRequestPage = true;\n this.orderDetail.forEach(orderDetail => {\n if (orderDetail.payments) {\n orderDetail.payments.forEach(payment => {\n if (payment.method.toLocaleLowerCase() === 'payment by account' && payment.status.toLocaleLowerCase() === 'success' && this.allowFurtherAccessAfter4Days(payment)) {\n this.isRefundRemissionBtnEnable = true;\n }\n });\n }\n });\n if (this.isRefundRemissionBtnEnable) {\n return true;\n } else {\n return false;\n };\n }\n }\n\n check4AllowedRoles2AccessRefund = (): boolean => {\n return this.allowedRolesToAccessRefund.some(role =>\n this.LOGGEDINUSERROLES.indexOf(role) !== -1\n );\n }\n check4AllowedRoles2AccessPBApayment = (): boolean => {\n return this.isEligible4PBAPayment.some(role =>\n this.LOGGEDINUSERROLES.indexOf(role) !== -1\n );\n }\n\n allowFurtherAccessAfter4Days = (payment: IPayment): boolean => {\n if (payment !== null && payment !== undefined) {\n let tmp4DayAgo = new Date();\n tmp4DayAgo.setDate(tmp4DayAgo.getDate() - 4);\n return tmp4DayAgo >= new Date(payment.date_created);\n }\n }\n\n loadPBAAccountPage(orderRef: IPayment) {\n this.paymentLibComponent.pbaPayOrderRef = orderRef;\n this.paymentLibComponent.viewName = 'pba-payment';\n }\n}\n","export class PaymentToPayhubRequest {\n currency = 'GBP';\n description = 'PayBubble payment';\n channel = 'telephony';\n provider = 'pci pal';\n case_type: string;\n\n ccd_case_number: string;\n amount: number;\n\n constructor(ccd_case_number: string, amount: number, caseType: string) {\n this.ccd_case_number = ccd_case_number;\n this.amount = <any>amount.toFixed(2);\n this.case_type= caseType;\n }\n}\n","export class PayhubAntennaRequest {\n currency = 'GBP';\n case_type: string;\n ccd_case_number: string;\n amount: number;\n\n constructor(ccd_case_number: string, amount: number, caseType: string) {\n this.ccd_case_number = ccd_case_number;\n this.amount = <any>amount.toFixed(2);\n this.case_type= caseType;\n }\n}\n","import { Component, OnInit, Input } from '@angular/core';\nimport { IPaymentGroup } from '../../interfaces/IPaymentGroup';\nimport { PaymentViewService } from '../../services/payment-view/payment-view.service';\nimport { BulkScaningPaymentService } from '../../services/bulk-scaning-payment/bulk-scaning-payment.service';\nimport { PaymentLibComponent } from '../../payment-lib.component';\nimport { IRemission } from '../../interfaces/IRemission';\nimport { IFee } from '../../interfaces/IFee';\nimport { PaymentToPayhubRequest } from '../../interfaces/PaymentToPayhubRequest';\nimport { PayhubAntennaRequest } from '../../interfaces/PayhubAntennaRequest';\nimport { SafeHtml } from '@angular/platform-browser';\nimport {Router} from '@angular/router';\nimport {Location} from '@angular/common';\nimport { OrderslistService } from '../../services/orderslist.service';\n\nconst BS_ENABLE_FLAG = 'bulk-scan-enabling-fe';\n\n@Component({\n selector: 'ccpay-fee-summary',\n templateUrl: './fee-summary.component.html',\n styleUrls: ['./fee-summary.component.scss']\n})\n\nexport class FeeSummaryComponent implements OnInit {\n @Input() paymentGroupRef: string;\n @Input() ccdCaseNumber: string;\n @Input() isTurnOff: string;\n @Input() caseType: string;\n\n\n bsPaymentDcnNumber: string;\n paymentGroup: IPaymentGroup;\n errorMessage: string;\n viewStatus = 'main';\n currentFee: IFee;\n totalFee: number;\n payhubHtml: SafeHtml;\n service: string = \"\";\n platForm: string = \"\";\n upPaymentErrorMessage: string;\n selectedOption:string;\n isBackButtonEnable: boolean = true;\n outStandingAmount: number;\n isFeeAmountZero: boolean = false;\n totalAfterRemission: number = 0;\n isConfirmationBtnDisabled: boolean = false;\n isRemoveBtnDisabled: boolean = false;\n isPaymentExist: boolean = false;\n isRemissionsExist: Boolean = false;\n isRemissionsMatch = false;\n isStrategicFixEnable: boolean;\n\n constructor(\n private router: Router,\n private bulkScaningPaymentService: BulkScaningPaymentService,\n private location: Location,\n private paymentViewService: PaymentViewService,\n private paymentLibComponent: PaymentLibComponent,\n private OrderslistService: OrderslistService\n ) {}\n\n ngOnInit() {\n this.viewStatus = 'main';\n this.caseType = this.paymentLibComponent.CASETYPE;\n this.bsPaymentDcnNumber = this.paymentLibComponent.bspaymentdcn;\n this.selectedOption = this.paymentLibComponent.SELECTED_OPTION.toLocaleLowerCase();\n this.isStrategicFixEnable = this.paymentLibComponent.ISSFENABLE;\n this.OrderslistService.setCaseType(this.paymentLibComponent.CASETYPE);\n\n this.platForm = 'Antenna';\n\n this.paymentViewService.getBSfeature().subscribe(\n features => {\n let result = JSON.parse(features).filter(feature => feature.uid === BS_ENABLE_FLAG);\n this.paymentLibComponent.ISBSENABLE = result[0] ? result[0].enable : false;\n },\n err => {\n this.paymentLibComponent.ISBSENABLE = false;\n }\n );\n if (this.bsPaymentDcnNumber) {\n this.getUnassignedPaymentlist();\n }\n this.getPaymentGroup();\n }\n\n getUnassignedPaymentlist() {\n if (this.selectedOption === 'dcn') {\n this.bulkScaningPaymentService.getBSPaymentsByDCN(this.paymentLibComponent.DCN_NUMBER).subscribe(\n unassignedPayments => {\n if(unassignedPayments['data'].payments) {\n this.service = unassignedPayments['data'].responsible_service_id;\n } else {\n this.upPaymentErrorMessage = 'error';\n }\n },\n (error: any) => this.upPaymentErrorMessage = error\n );\n } else {\n this.bulkScaningPaymentService.getBSPaymentsByCCD(this.ccdCaseNumber).subscribe(\n unassignedPayments => {\n if(unassignedPayments['data'].payments) {\n this.service = unassignedPayments['data'].responsible_service_id;\n } else {\n this.upPaymentErrorMessage = 'error';\n }\n },\n (error: any) => this.upPaymentErrorMessage = error\n );\n }\n\n }\n\n getRemissionByFeeCode(feeCode: string): IRemission {\n if (this.paymentGroup && this.paymentGroup.remissions && this.paymentGroup.remissions.length > 0) {\n for (const remission of this.paymentGroup.remissions) {\n if (remission.fee_code === feeCode) {\n return remission;\n }\n }\n }\n return null;\n }\n\n addRemission(fee: IFee) {\n this.currentFee = fee;\n this.viewStatus = 'add_remission';\n }\n\n getPaymentGroup() {\n let fees = [];\n this.paymentViewService.getPaymentGroupDetails(this.paymentGroupRef).subscribe(\n paymentGroup => {\n this.paymentGroup = paymentGroup;\n this.isPaymentExist = paymentGroup.payments ? paymentGroup.payments.length > 0 : false;\n this.isRemissionsExist = paymentGroup.remissions ? paymentGroup.remissions.length > 0 : false;\n\n if (paymentGroup.fees) {\n paymentGroup.fees.forEach(fee => {\n this.totalAfterRemission = this.totalAfterRemission + fee.net_amount;\n if(fee.calculated_amount === 0) {\n this.isFeeAmountZero = true;\n }\n this.isRemissionsMatch = false;\n paymentGroup.remissions.forEach(rem => {\n if(rem.fee_code === fee.code) {\n this.isRemissionsMatch = true;\n fee['remissions'] = rem;\n fees.push(fee);\n }\n });\n\n if(!this.isRemissionsMatch) {\n fees.push(fee);\n }\n });\n paymentGroup.fees = fees;\n }\n\n this.outStandingAmount = this.bulkScaningPaymentService.calculateOutStandingAmount(paymentGroup);\n },\n (error: any) => this.errorMessage = error.replace(/\"/g,\"\")\n );\n }\n\n confirmRemoveFee(fee: IFee){\n this.isRemoveBtnDisabled = false;\n this.currentFee = fee;\n this.viewStatus = 'feeRemovalConfirmation';\n }\n\n removeFee(fee: any){\n this.isRemoveBtnDisabled = true;\n this.paymentViewService.deleteFeeFromPaymentGroup(fee).subscribe(\n (success: any) => {\n if (this.paymentGroup.fees && this.paymentGroup.fees.length > 1){\n this.totalAfterRemission = 0;\n this.getPaymentGroup();\n this.viewStatus = 'main';\n return;\n }\n this.loadCaseTransactionPage();\n },\n (error: any) => {\n this.errorMessage = error;\n this.isRemoveBtnDisabled = false;\n }\n );\n }\n\n loadCaseTransactionPage() {\n this.paymentLibComponent.TAKEPAYMENT = true;\n this.paymentLibComponent.viewName = 'case-transactions';\n this.paymentViewService.getBSfeature().subscribe(\n features => {\n let result = JSON.parse(features).filter(feature => feature.uid === BS_ENABLE_FLAG);\n this.paymentLibComponent.ISBSENABLE = result[0] ? result[0].enable : false;\n },\n err => {\n this.paymentLibComponent.ISBSENABLE = false;\n }\n );\n\n let partUrl = `selectedOption=${this.paymentLibComponent.SELECTED_OPTION}`;\n partUrl +=this.bsPaymentDcnNumber ? `&dcn=${this.bsPaymentDcnNumber}` : '';\n partUrl +=this.paymentLibComponent.ISBSENABLE ? '&isBulkScanning=Enable' : '&isBulkScanning=Disable';\n partUrl +=this.paymentLibComponent.ISTURNOFF ? '&isTurnOff=Enable' : '&isTurnOff=Disable';\n partUrl +=this.paymentLibComponent.ISSFENABLE ? '&isStFixEnable=Enable' : '&isStFixEnable=Disable';\n partUrl +=`&caseType=${this.paymentLibComponent.CASETYPE}`;\n\n let url = `/payment-history/${this.ccdCaseNumber}?view=case-transactions&takePayment=true&${partUrl}`;\n this.router.navigateByUrl(url);\n }\n cancelRemission() {\n this.viewStatus = 'main';\n }\n redirectToFeeSearchPage(event: any, page?: string) {\n event.preventDefault();\n let partUrl =this.bsPaymentDcnNumber ? `&dcn=${this.bsPaymentDcnNumber}` : '';\n partUrl +=this.paymentLibComponent.ISBSENABLE ? '&isBulkScanning=Enable' : '&isBulkScanning=Disable';\n partUrl +=this.paymentLibComponent.ISTURNOFF ? '&isTurnOff=Enable' : '&isTurnOff=Disable';\n partUrl +=this.paymentLibComponent.ISSFENABLE ? '&isStFixEnable=Enable' : '&isStFixEnable=Disable';\n partUrl +=`&caseType=${this.paymentLibComponent.CASETYPE}`;\n\n if(this.viewStatus === 'feeRemovalConfirmation' || this.viewStatus === 'add_remission') {\n this.viewStatus = 'main';\n return;\n }\n let url = `/fee-search?ccdCaseNumber=${this.ccdCaseNumber}&selectedOption=${this.paymentLibComponent.SELECTED_OPTION}&paymentGroupRef=${this.paymentGroupRef}${partUrl}`;\n this.router.navigateByUrl(url);\n }\n takePayment() {\n this.isConfirmationBtnDisabled = true;\n const requestBody = new PaymentToPayhubRequest(this.ccdCaseNumber, this.outStandingAmount, this.caseType),\n antennaReqBody = new PayhubAntennaRequest(this.ccdCaseNumber, this.outStandingAmount, this.caseType);\n\n if(this.platForm === 'Antenna') {\n\n this.paymentViewService.postPaymentAntennaToPayHub(antennaReqBody, this.paymentGroupRef).subscribe(\n response => {\n this.isBackButtonEnable=false;\n window.location.href = '/makePaymentByTelephoneyProvider';\n },\n (error: any) => {\n this.errorMessage = error;\n this.isConfirmationBtnDisabled = false;\n this.router.navigateByUrl('/pci-pal-failure');\n }\n );\n }\n\n }\n\n goToAllocatePage(outStandingAmount: number, isFeeAmountZero: Boolean) {\n if (outStandingAmount > 0 || (outStandingAmount === 0 && isFeeAmountZero)) {\n this.paymentLibComponent.paymentGroupReference = this.paymentGroupRef;\n this.paymentLibComponent.viewName = 'allocate-payments';\n } else {\n this.loadCaseTransactionPage();\n }\n }\n isCheckAmountdueExist(amountDue: any) {\n return typeof amountDue === 'undefined';\n }\n}\n","import { Component, OnInit, Input } from '@angular/core';\n\n\n\n@Component({\n selector: 'ccpay-error-banner',\n templateUrl: './error-banner.component.html',\n styleUrls: ['./error-banner.component.scss']\n})\n\nexport class ErrorBannerComponent implements OnInit {\n @Input('errorMessage') errorMessage;\n\n constructor(\n ) {}\n\n ngOnInit() {\n\n }\n}\n","\nexport class UnidentifiedPaymentsRequest {\n payment_allocation_status: any;\n payment_group_reference: string;\n payment_reference: string;\n unidentified_reason: string;\n\n constructor(payment_group_reference: string, payment_reference : string, unidentified_reason: any) {\n this.payment_allocation_status = {\n description: '',\n name: \"Unidentified\"\n };\n this.payment_group_reference = payment_group_reference ;\n this.payment_reference= payment_reference;\n this.unidentified_reason= unidentified_reason;\n\n }\n\n\n\n}\n","import { IBSPayments } from \"./IBSPayments\";\n\nexport class AllocatePaymentRequest {\n amount: Number;\n banked_date: String;\n ccd_case_number: String;\n exception_record: string;\n currency: String;\n document_control_number: String;\n external_provider: String;\n giro_slip_no: String;\n payer_name: String;\n payment_channel: Object;\n payment_status: Object;\n payment_method: String;\n case_type: String;\n payment_allocation_dto?: {\n allocation_reason: String,\n allocation_status: String,\n explanation: String,\n payment_allocation_status: Object,\n payment_group_reference: String,\n payment_reference: String,\n reason: String,\n receiving_office: String,\n unidentified_reason: String,\n user_id: String,\n user_name: String,\n case_type: String\n }\n\n constructor(ccd_case_number : string, unAllocatedPayment: IBSPayments, caseType: string, exceptionRecord: string, allocatedRequest?: any) {\n this.amount = unAllocatedPayment.amount;\n this.banked_date = unAllocatedPayment.date_banked;\n this.ccd_case_number = ccd_case_number;\n this.exception_record = exceptionRecord;\n this.currency= unAllocatedPayment.currency;\n this.document_control_number = unAllocatedPayment.dcn_reference;\n this.external_provider = 'exela';\n this.giro_slip_no = unAllocatedPayment.bgc_reference;\n this.payer_name = unAllocatedPayment.payer_name;\n this.payment_channel = {\n description: '',\n name: 'bulk scan'\n };\n this.payment_status ={\n description: 'bulk scan payment completed',\n name: 'success'\n }\n this.payment_method = unAllocatedPayment.payment_method;\n this.case_type= caseType;\n if(allocatedRequest) {\n this.payment_allocation_dto = allocatedRequest;\n }\n\n }\n}\n","import { Component, OnInit, Input } from '@angular/core';\nimport { FormBuilder, FormGroup, Validators, FormControl } from '@angular/forms';\nimport { PaymentLibComponent } from '../../payment-lib.component';\nimport { PaymentViewService } from '../../services/payment-view/payment-view.service';\nimport {BulkScaningPaymentService} from '../../services/bulk-scaning-payment/bulk-scaning-payment.service';\nimport { IBSPayments } from '../../interfaces/IBSPayments';\nimport { UnidentifiedPaymentsRequest } from '../../interfaces/UnidentifiedPaymentsRequest';\nimport { AllocatePaymentRequest } from '../../interfaces/AllocatePaymentRequest';\n\n@Component({\n selector: 'app-mark-unidentified-payment',\n templateUrl: './mark-unidentified-payment.component.html',\n styleUrls: ['./mark-unidentified-payment.component.scss']\n})\nexport class MarkUnidentifiedPaymentComponent implements OnInit {\n @Input() caseType: string;\n markPaymentUnidentifiedForm: FormGroup;\n viewStatus: string;\n ccdCaseNumber: string;\n bspaymentdcn: string;\n isInvesticationDetailEmpty: boolean = false;\n investicationDetailHasError: boolean = false;\n investicationDetailMinHasError: boolean = false;\n investicationDetailMaxHasError: boolean = false;\n errorMessage = this.getErrorMessage(false);\n unassignedRecord:IBSPayments;\n siteID: string = null;\n investigationComment: string;\n isConfirmButtondisabled:Boolean = false;\n ccdReference: string = null;\n exceptionReference: string = null;\n isStrategicFixEnable: boolean = true;\n\n constructor(private formBuilder: FormBuilder,\n private paymentViewService: PaymentViewService,\n private paymentLibComponent: PaymentLibComponent,\n private bulkScaningPaymentService: BulkScaningPaymentService) { }\n\n ngOnInit() {\n this.viewStatus = 'mainForm';\n this.ccdCaseNumber = this.paymentLibComponent.CCD_CASE_NUMBER;\n this.bspaymentdcn = this.paymentLibComponent.bspaymentdcn;\n this.isStrategicFixEnable = this.paymentLibComponent.ISSFENABLE;\n this.getUnassignedPayment();\n\n this.markPaymentUnidentifiedForm = this.formBuilder.group({\n investicationDetail: new FormControl('', Validators.compose([\n Validators.required,\n Validators.minLength(3),\n Validators.maxLength(255),\n Validators.pattern('^([a-zA-Z0-9\\\\s,\\\\.]*)$')\n ]))\n });\n }\n getUnassignedPayment() {\n this.bulkScaningPaymentService.getBSPaymentsByDCN(this.bspaymentdcn).subscribe(\n unassignedPayments => {\n this.errorMessage = this.getErrorMessage(false);\n this.unassignedRecord = unassignedPayments['data'].payments.filter(payment => {\n return payment && payment.dcn_reference == this.bspaymentdcn;\n })[0];\n this.siteID = unassignedPayments['data'].responsible_service_id;\n const beCcdNumber = unassignedPayments['data'].ccd_reference,\n beExceptionNumber = unassignedPayments['data'].exception_record_reference,\n exceptionReference = beCcdNumber ? beCcdNumber === this.ccdCaseNumber ? null : this.ccdCaseNumber : this.ccdCaseNumber;\n this.ccdReference = beCcdNumber ? beCcdNumber : null;\n this.exceptionReference = beExceptionNumber ? beExceptionNumber : exceptionReference;\n },\n (error: any) => {\n this.errorMessage = this.getErrorMessage(true);\n }\n );\n }\n trimUnderscore(method: string){\n return this.bulkScaningPaymentService.removeUnwantedString(method,' ');\n }\n saveAndContinue() {\n this.resetForm([false, false, false, false]);\n const investicationField = this.markPaymentUnidentifiedForm.controls.investicationDetail;\n const formerror = investicationField.errors;\n if (this.markPaymentUnidentifiedForm.dirty && this.markPaymentUnidentifiedForm.valid) {\n this.investigationComment = this.markPaymentUnidentifiedForm.controls.investicationDetail.value;\n this.viewStatus = 'unidentifiedContinueConfirm';\n }else {\n if(investicationField.value == '' ) {\n this.resetForm([true, false, false, false]);\n }\n if(investicationField.value != '' && investicationField.invalid ) {\n this.resetForm([false, true, false, false]);\n }\n if(formerror && formerror.minlength && formerror.minlength.actualLength < 3 ) {\n this.resetForm([false, false, true, false]);\n }\n if(formerror && formerror.maxlength && formerror.maxlength.actualLength > 255 ) {\n this.resetForm([false, false, false, true]);\n }\n }\n }\n resetForm(val) {\n this.isInvesticationDetailEmpty = val[0];\n this.investicationDetailHasError = val[1];\n this.investicationDetailMinHasError = val[2];\n this.investicationDetailMaxHasError = val[3];\n }\n confirmPayments() {\n this.isConfirmButtondisabled = true;\n const reason = this.markPaymentUnidentifiedForm.get('investicationDetail').value;\n\n if(!this.isStrategicFixEnable) {\n let allocatedRequest = {\n allocation_status:'Unidentified',\n payment_allocation_status: {\n description: '',\n name: 'Unidentified'\n },\n unidentified_reason: reason,\n user_id: this.caseType,\n }\n const postStrategicBody = new AllocatePaymentRequest\n (this.ccdReference, this.unassignedRecord, this.caseType, this.exceptionReference, allocatedRequest);\n this.bulkScaningPaymentService.postBSWoPGStrategic(postStrategicBody).subscribe(\n res => {\n this.errorMessage = this.getErrorMessage(false);\n let response = JSON.parse(res);\n if (response.success) {\n this.gotoCasetransationPage();\n }\n },\n (error: any) => {\n this.errorMessage = this.getErrorMessage(true);\n this.isConfirmButtondisabled = false;\n });\n } else {\n this.bulkScaningPaymentService.patchBSChangeStatus(this.unassignedRecord.dcn_reference, 'PROCESSED').subscribe(\n res1 => {\n this.errorMessage = this.getErrorMessage(false);\n const requestBody = new AllocatePaymentRequest\n (this.ccdReference, this.unassignedRecord, this.siteID, this.exceptionReference)\n this.paymentViewService.postBSPayments(requestBody).subscribe(\n res2 => {\n this.errorMessage = this.getErrorMessage(false);\n const response2 = JSON.parse(res2),\n reqBody = new UnidentifiedPaymentsRequest\n (response2['data'].payment_group_reference, response2['data'].reference, reason);\n if (response2.success) {\n this.paymentViewService.postBSUnidentifiedPayments(reqBody).subscribe(\n res3 => {\n this.errorMessage = this.getErrorMessage(false);\n const response3 = JSON.parse(res3);\n if (response3.success) {\n this.gotoCasetransationPage();\n }\n },\n (error: any) => {\n this.bulkScaningPaymentService.patchBSChangeStatus(this.unassignedRecord.dcn_reference, 'COMPLETE').subscribe();\n this.errorMessage = this.getErrorMessage(true);\n this.isConfirmButtondisabled = false;\n }\n );\n }\n },\n (error: any) => {\n this.bulkScaningPaymentService.patchBSChangeStatus(this.unassignedRecord.dcn_reference, 'COMPLETE').subscribe();\n this.errorMessage = this.getErrorMessage(true);\n this.isConfirmButtondisabled = false;\n }\n );\n },\n (error: any) => {\n this.errorMessage = this.getErrorMessage(true);\n this.isConfirmButtondisabled = false;\n }\n );\n }\n }\n cancelMarkUnidentifiedPayments(type?:string){\n if(type && type === 'cancel') {\n if(this.markPaymentUnidentifiedForm.get('investicationDetail').value!==\"\"){\n this.viewStatus = 'unidentifiedCancelConfirm';\n } else {\n this.gotoCasetransationPage();\n }\n } else {\n this.viewStatus = 'mainForm';\n }\n }\n\n gotoCasetransationPage() {\n this.paymentLibComponent.viewName = 'case-transactions';\n this.paymentLibComponent.TAKEPAYMENT = true;\n this.paymentLibComponent.ISBSENABLE = true;\n }\n getErrorMessage(isErrorExist) {\n return {\n title: \"There is a problem with the service\",\n body: \"Try again later\",\n showError: isErrorExist\n };\n }\n}\n","\nexport class UnsolicitedPaymentsRequest {\n payment_allocation_status: any;\n payment_group_reference: string;\n payment_reference: string;\n receiving_office: string;\n receiving_email_address: string;\n sending_email_address: string;\n unidentified_reason: string;\n constructor(payment_group_reference: string, payment_reference : string, reason: string,responsible_office: string, responsible_person:string,email_id: string) {\n this.payment_allocation_status = {\n description: '',\n name: \"Transferred\"\n };\n this.payment_group_reference = payment_group_reference;\n this.payment_reference= payment_reference;\n this.unidentified_reason= reason;\n this.receiving_office= responsible_office;\n this.receiving_email_address= email_id;\n this.sending_email_address= responsible_person;\n }\n}\n","import { Component, OnInit, Input } from '@angular/core';\nimport { FormBuilder, FormGroup, Validators, FormControl } from '@angular/forms';\nimport { PaymentLibComponent } from '../../payment-lib.component';\nimport { BulkScaningPaymentService } from '../../services/bulk-scaning-payment/bulk-scaning-payment.service';\nimport { IBSPayments } from '../../interfaces/IBSPayments';\nimport { UnsolicitedPaymentsRequest } from '../../interfaces/UnsolicitedPaymentsRequest';\nimport { PaymentViewService } from '../../services/payment-view/payment-view.service';\nimport { AllocatePaymentRequest } from '../../interfaces/AllocatePaymentRequest';\nimport { ErrorHandlerService } from '../../services/shared/error-handler.service';\n\n\n@Component({\n selector: 'app-mark-unsolicited-payment',\n templateUrl: './mark-unsolicited-payment.component.html',\n styleUrls: ['./mark-unsolicited-payment.component.scss']\n})\nexport class MarkUnsolicitedPaymentComponent implements OnInit {\n @Input() caseType: string;\n markPaymentUnsolicitedForm: FormGroup;\n viewStatus: string;\n reasonHasError: boolean = false;\n isReasonEmpty: boolean = false;\n reasonMinHasError: boolean = false;\n reasonMaxHasError: boolean = false;\n responsibleOfficeHasError: boolean = false;\n isResponsibleOfficeEmpty: boolean = false;\n errorMessage = this.getErrorMessage(false);\n ccdCaseNumber: string;\n bspaymentdcn: string;\n unassignedRecord: IBSPayments;\n siteID: string = null;\n reason: string;\n responsiblePerson: string;\n responsibleOffice: string;\n emailId: string;\n isConfirmButtondisabled: Boolean = false;\n isContinueButtondisabled: Boolean = false;\n ccdReference: string = null;\n exceptionReference: string = null;\n selectedSiteId: string;\n selectedSiteName: string;\n isStrategicFixEnable: boolean = true;\n siteIDList;\n\n constructor(private formBuilder: FormBuilder,\n private paymentViewService: PaymentViewService,\n private paymentLibComponent: PaymentLibComponent,\n private bulkScaningPaymentService: BulkScaningPaymentService) { }\n\n ngOnInit() {\n this.resetForm([false,false,false,false,false,false], 'all');\n this.viewStatus = 'mainForm';\n this.ccdCaseNumber = this.paymentLibComponent.CCD_CASE_NUMBER;\n this.bspaymentdcn = this.paymentLibComponent.bspaymentdcn;\n this.isStrategicFixEnable = this.paymentLibComponent.ISSFENABLE;\n this.getUnassignedPayment();\n\n this.paymentViewService.getSiteID().subscribe(\n siteids => {\n this.isContinueButtondisabled = false;\n this.errorMessage = this.getErrorMessage(false);\n this.siteIDList = JSON.parse(siteids);\n },\n err => {\n window.scrollTo(0, 0);\n this.isContinueButtondisabled = true;\n this.errorMessage = this.getErrorMessage(true);\n }\n );\n \n this.markPaymentUnsolicitedForm = this.formBuilder.group({\n reason: new FormControl('', Validators.compose([\n Validators.required,\n Validators.minLength(3),\n Validators.maxLength(255),\n Validators.pattern('^([a-zA-Z0-9\\\\s,\\\\.]*)$')\n ])),\n responsibleOffice: new FormControl('', Validators.compose([\n Validators.required,\n Validators.pattern('^([a-zA-Z0-9\\\\s\\\\n,\\\\.-:]*)$')\n ])),\n responsiblePerson: new FormControl(''),\n emailId: new FormControl('')\n });\n }\n trimUnderscore(method: string){\n return this.bulkScaningPaymentService.removeUnwantedString(method,' ');\n }\n confirmPayments() {\n this.isConfirmButtondisabled = true;\n const controls = this.markPaymentUnsolicitedForm.controls;\n if(!this.isStrategicFixEnable) {\n let allocatedRequest = {\n allocation_status:'Transferred',\n payment_allocation_status: {\n description: '',\n name: 'Transferred'\n },\n unidentified_reason: controls.reason.value,\n receiving_office: this.selectedSiteId,\n user_id: this.caseType,\n }\n const postStrategicBody = new AllocatePaymentRequest\n (this.ccdReference, this.unassignedRecord, this.caseType, this.exceptionReference, allocatedRequest);\n this.bulkScaningPaymentService.postBSWoPGStrategic(postStrategicBody).subscribe(\n res => {\n this.errorMessage = this.getErrorMessage(false);\n let response = JSON.parse(res);\n if (response.success) {\n this.gotoCasetransationPage();\n }\n },\n (error: any) => {\n this.errorMessage = this.getErrorMessage(true);\n this.isConfirmButtondisabled = false;\n });\n } else {\n // controls.responsibleOffice.setValue('P219');\n this.bulkScaningPaymentService.patchBSChangeStatus(this.unassignedRecord.dcn_reference, 'PROCESSED').subscribe(\n res1 => {\n this.errorMessage = this.getErrorMessage(false);\n const response1 = JSON.parse(res1),\n requestBody = new AllocatePaymentRequest\n (this.ccdReference, this.unassignedRecord, this.siteID, this.exceptionReference)\n this.paymentViewService.postBSPayments(requestBody).subscribe(\n res2 => {\n this.errorMessage = this.getErrorMessage(false);\n const response2 = JSON.parse(res2),\n reqBody = new UnsolicitedPaymentsRequest\n (response2['data'].payment_group_reference, response2['data'].reference, controls.reason.value, this.selectedSiteId, controls.responsiblePerson.value, controls.emailId.value);\n if (response2.success) {\n this.paymentViewService.postBSUnsolicitedPayments(reqBody).subscribe(\n res3 => {\n this.errorMessage = this.getErrorMessage(false);\n const response3 = JSON.parse(res3);\n if (response3.success) {\n this.gotoCasetransationPage();\n }\n },\n (error: any) => {\n this.bulkScaningPaymentService.patchBSChangeStatus(this.unassignedRecord.dcn_reference, 'COMPLETE').subscribe();\n this.errorMessage = this.getErrorMessage(true);\n this.isConfirmButtondisabled = false;\n }\n );\n }\n },\n (error: any) => {\n this.bulkScaningPaymentService.patchBSChangeStatus(this.unassignedRecord.dcn_reference, 'COMPLETE').subscribe();\n this.errorMessage = this.getErrorMessage(true);\n this.isConfirmButtondisabled = false;\n }\n );\n },\n (error: any) => {\n this.errorMessage = this.getErrorMessage(true);\n this.isConfirmButtondisabled = false;\n }\n );\n }\n }\n saveAndContinue() {\n this.resetForm([false,false,false,false,false,false], 'all');\n const formerror = this.markPaymentUnsolicitedForm.controls.reason.errors;\n const reasonField = this.markPaymentUnsolicitedForm.controls.reason;\n //const officeIdField = this.selectedSiteId;\n const officeIdField = this.markPaymentUnsolicitedForm.controls.responsibleOffice;\n if (this.markPaymentUnsolicitedForm.dirty && this.markPaymentUnsolicitedForm.valid) {\n const controls = this.markPaymentUnsolicitedForm.controls;\n this.emailId = controls.emailId.value;\n this.responsibleOffice = officeIdField.value;\n this.responsiblePerson = controls.responsiblePerson.value;\n this.reason = controls.reason.value;\n this.viewStatus = 'unsolicitedContinueConfirm';\n }else {\n if( reasonField.value == '' ) {\n this.resetForm([true,false,false,false,false,false], 'reason');\n }\n if(reasonField.value != '' && this.markPaymentUnsolicitedForm.controls.reason.invalid ) {\n this.resetForm([false,true,false,false,false,false], 'reason');\n }\n if(formerror && formerror.minlength && formerror.minlength.actualLength < 3 ) {\n this.resetForm([false,false,true,false,false,false], 'reason');\n }\n if(formerror && formerror.maxlength && formerror.maxlength.actualLength > 255 ) {\n this.resetForm([false,false,false,true,false,false], 'reason');\n }\n if(officeIdField.value == '') {\n this.resetForm([false,false,false,false,true,false], 'responsibleOffice');\n }\n if(officeIdField.value != '' && officeIdField.invalid) {\n this.resetForm([false,false,false,false,false,true],'responsibleOffice');\n }\n }\n }\n resetForm(val, field) {\n if(field==='reason' || field==='all') {\n this.isReasonEmpty = val[0];\n this.reasonHasError = val[1];\n this.reasonMinHasError = val[2];\n this.reasonMaxHasError = val[3];\n }\n if(field==='responsibleOffice' || field==='all') {\n this.isResponsibleOfficeEmpty = val[4];\n this.responsibleOfficeHasError = val[5];\n }\n }\n\ncancelMarkUnsolicitedPayments(type?:string){\n if(type && type === 'cancel') {\n if(this.checkingFormValue()){\n this.viewStatus = 'unsolicitedCancelConfirm';\n } else {\n this.gotoCasetransationPage();\n }\n } else {\n this.markPaymentUnsolicitedForm.controls.responsibleOffice.setValue('');\n this.viewStatus = 'mainForm';\n }\n }\n checkingFormValue(){\n const formFields = this.markPaymentUnsolicitedForm.value;\n let valueExists = false;\n\n for (var field in formFields) {\n if (formFields.hasOwnProperty(field) && formFields[field] !==\"\") {\n valueExists = true;\n break;\n }\n }\n return valueExists;\n }\n gotoCasetransationPage() {\n this.paymentLibComponent.viewName = 'case-transactions';\n this.paymentLibComponent.TAKEPAYMENT = true;\n this.paymentLibComponent.ISBSENABLE = true;\n }\n getUnassignedPayment() {\n this.bulkScaningPaymentService.getBSPaymentsByDCN(this.bspaymentdcn).subscribe(\n unassignedPayments => {\n \n this.unassignedRecord = unassignedPayments['data'].payments.filter(payment => {\n return payment && payment.dcn_reference == this.bspaymentdcn;\n })[0];\n this.siteID = unassignedPayments['data'].responsible_service_id;\n const beCcdNumber = unassignedPayments['data'].ccd_reference,\n beExceptionNumber = unassignedPayments['data'].exception_record_reference,\n exceptionReference = beCcdNumber ? beCcdNumber === this.ccdCaseNumber ? null : this.ccdCaseNumber : this.ccdCaseNumber;\n this.ccdReference = beCcdNumber ? beCcdNumber : null;\n this.exceptionReference = beExceptionNumber ? beExceptionNumber : exceptionReference;\n },\n (error: any) => {\n this.errorMessage = this.getErrorMessage(true);\n }\n );\n }\n\n getErrorMessage(isErrorExist) {\n return {\n title: \"Something went wrong.\",\n body: \"Please try again later.\",\n showError: isErrorExist\n };\n }\n\n selectchange(args){ \n this.selectedSiteId = args.target.value; \n this.selectedSiteName = args.target.options[args.target.selectedIndex].text; \n } \n\n}\n","import { Component, OnInit, Output,Input, EventEmitter } from '@angular/core';\nimport { BulkScaningPaymentService } from '../../services/bulk-scaning-payment/bulk-scaning-payment.service';\nimport { PaymentLibComponent } from '../../payment-lib.component';\nimport { IBSPayments } from '../../interfaces/IBSPayments';\nimport {Router} from '@angular/router';\nimport { PaymentViewService } from '../../services/payment-view/payment-view.service';\nimport { OrderslistService } from '../../services/orderslist.service';\n\n@Component({\n selector: 'ccpay-app-unprocessed-payments',\n templateUrl: './unprocessed-payments.component.html',\n styleUrls: ['./unprocessed-payments.component.scss']\n})\nexport class UnprocessedPaymentsComponent implements OnInit {\n\n @Input('FEE_RECORDS_EXISTS') FEE_RECORDS_EXISTS: boolean;\n @Input('PAYMENTREF') PAYMENTREF: string;\n @Input('ISTURNOFF') ISTURNOFF: boolean;\n @Input('IS_BUTTON_ENABLE') IS_BUTTON_ENABLE: boolean;\n @Input('IS_OS_AMT_AVAILABLE') IS_OS_AMT_AVAILABLE: boolean;\n @Input('ISSFENABLE') ISSFENABLE: boolean;\n @Input('PAYMENTSLENGTH') PAYMENTSLENGTH:Number;\n @Input('LEVEL')LEVEL:Number;\n\n @Output() selectedUnprocessedFeeEvent: EventEmitter<string> = new EventEmitter();\n @Output() getUnprocessedFeeCount: EventEmitter<string> = new EventEmitter();\n\n viewStatus = 'main';\n unassignedRecordList: IBSPayments;\n upPaymentErrorMessage: string = null;\n ccdCaseNumber: string;\n recordId: string = null;\n isRecordExist: boolean = false;\n dcnNumber: string = null;\n selectedOption: string;\n isUnprocessedRecordSelected: boolean = true;\n isAllocateToExistingFeebtnEnabled: boolean = false;\n isMarkAsUnidentifiedbtnEnabled: boolean = false;\n isAllocatedToNewFeebtnEnabled: boolean = false;\n isExceptionCase: boolean = false;\n serviceId: string = null;\n isBulkScanEnable;\n isTurnOff: boolean = true;\n isStFixEnable;\n unassignedRecordSelectedList: IBSPayments;\n unassignedRecordListLength: number = 0;\n showContent: boolean;\n\n constructor(private router: Router,\n private bulkScaningPaymentService: BulkScaningPaymentService,\n private paymentLibComponent: PaymentLibComponent,\n private paymentViewService: PaymentViewService,\n private OrderslistService: OrderslistService\n ) { }\n\n ngOnInit() {\n // Todo ...\n this.ccdCaseNumber = this.paymentLibComponent.CCD_CASE_NUMBER;\n this.selectedOption = this.paymentLibComponent.SELECTED_OPTION.toLocaleLowerCase();\n this.dcnNumber = this.paymentLibComponent.DCN_NUMBER;\n this.isBulkScanEnable = this.paymentLibComponent.ISBSENABLE;\n this.isTurnOff = this.paymentLibComponent.ISTURNOFF;\n this.isStFixEnable = this.paymentLibComponent.ISSFENABLE;\n this.OrderslistService.getFeeExists().subscribe( (data) => this.FEE_RECORDS_EXISTS = data);\n this.getUnassignedPaymentlist();\n\n }\n\n getUnassignedPaymentlist() {\n if (this.selectedOption === 'dcn') {\n this.bulkScaningPaymentService.getBSPaymentsByDCN(this.dcnNumber).subscribe(\n unassignedPayments => {\n // unassignedPayments['data'].map(data => data.expandable=false);\n if(unassignedPayments['data'] && unassignedPayments['data'].payments) {\n this.setValuesForUnassignedRecord(unassignedPayments['data']);\n } else if(unassignedPayments['payments']) {\n this.setValuesForUnassignedRecord(unassignedPayments);\n } else {\n this.upPaymentErrorMessage = 'error';\n this.getUnprocessedFeeCount.emit('0');\n }\n },\n (error: any) => {\n this.upPaymentErrorMessage = error;\n this.getUnprocessedFeeCount.emit('0');\n }\n );\n } else {\n this.bulkScaningPaymentService.getBSPaymentsByCCD(this.ccdCaseNumber).subscribe(\n unassignedPayments => {\n // unassignedPayments['data'].map(data => data.expandable=false);\n if(unassignedPayments['data'] && unassignedPayments['data'].payments) {\n this.setValuesForUnassignedRecord(unassignedPayments['data']);\n } else if(unassignedPayments['payments']) {\n this.setValuesForUnassignedRecord(unassignedPayments);\n } else {\n this.upPaymentErrorMessage = 'error';\n this.getUnprocessedFeeCount.emit('0');\n }\n },\n (error: any) => {\n this.upPaymentErrorMessage = error;\n this.getUnprocessedFeeCount.emit('0');\n }\n );\n }\n\n }\n\n setValuesForUnassignedRecord(unassignedPayments) {\n\n this.unassignedRecordList = unassignedPayments.payments;\n if(this.unassignedRecordList){\n this.unassignedRecordListLength = unassignedPayments.payments.length\n }\n this.serviceId = unassignedPayments.responsible_service_id;\n if (unassignedPayments['ccd_reference'] === undefined) {\n this.isExceptionCase = true;\n }\n // this.isRecordExist = this.unassignedRecordList.length === 0;\n this.getUnprocessedFeeCount.emit(<any>this.unassignedRecordList.length);\n this.unprocessedPaymentSelectEvent(this.unassignedRecordList);\n }\n\n formatUnassignedRecordId(ID: Number) {\n return `unassignrecord-${ID}`;\n }\n\n trimUnderscore(method: string){\n return this.bulkScaningPaymentService.removeUnwantedString(method,' ');\n }\n\n redirectToFeeSearchPage(event: any, dcn_reference:any) {\n event.preventDefault();\n this.recordId = dcn_reference;\n let url = this.isBulkScanEnable ? '&isBulkScanning=Enable' : '&isBulkScanning=Disable';\n url += this.ISTURNOFF ? '&isTurnOff=Enable' : '&isTurnOff=Disable';\n url += this.isStFixEnable ? '&isStFixEnable=Enable' : '&isStFixEnable=Disable';\n url +=`&caseType=${this.paymentLibComponent.CASETYPE}`;\n\n this.router.navigateByUrl(`/fee-search?selectedOption=${this.selectedOption}&ccdCaseNumber=${this.ccdCaseNumber}&dcn=${this.recordId}${url}`);\n }\n\n loadUnsolicitedPage(viewName: string, dcn_reference:any) {\n this.recordId = dcn_reference;\n this.paymentLibComponent.bspaymentdcn = this.recordId;\n this.paymentLibComponent.viewName = viewName;\n }\n\n unprocessedPaymentSelectEvent(selectedRecordReference: any) {\n this.isUnprocessedRecordSelected = true;\n this.validateButtons();\n this.selectedUnprocessedFeeEvent.emit(selectedRecordReference);\n }\n\n resetButtons() {\n this.isUnprocessedRecordSelected = false;\n this.isAllocateToExistingFeebtnEnabled = false;\n this.isMarkAsUnidentifiedbtnEnabled = false;\n this.isAllocatedToNewFeebtnEnabled = false;\n }\n\n goToAllocatePage(dcn_reference:any) {\n this.paymentLibComponent.bspaymentdcn = dcn_reference;\n this.paymentLibComponent.unProcessedPaymentServiceId = this.serviceId\n this.paymentLibComponent.isTurnOff = this.ISTURNOFF;\n this.paymentLibComponent.ISSFENABLE = this.isStFixEnable;\n\n if(this.ISTURNOFF) {\n this.paymentLibComponent.paymentGroupReference = this.PAYMENTREF;\n this.paymentLibComponent.viewName = 'fee-summary';\n }else {\n this.paymentLibComponent.paymentGroupReference = null;\n this.paymentLibComponent.viewName = 'allocate-payments';\n }\n\n }\n\n validateButtons() {\n if ( this.isUnprocessedRecordSelected && this.isExceptionCase) {\n this.isMarkAsUnidentifiedbtnEnabled = true;\n } else if ( this.isUnprocessedRecordSelected && !this.isExceptionCase && !this.FEE_RECORDS_EXISTS) {\n this.isAllocateToExistingFeebtnEnabled = false;\n this.isAllocatedToNewFeebtnEnabled = true;\n } else if( this.isUnprocessedRecordSelected && !this.isExceptionCase && this.FEE_RECORDS_EXISTS ) {\n if(!this.ISTURNOFF) {\n this.isAllocateToExistingFeebtnEnabled = true;\n this.isAllocatedToNewFeebtnEnabled = false;\n } else {\n this.isAllocateToExistingFeebtnEnabled = this.IS_OS_AMT_AVAILABLE;\n this.isAllocatedToNewFeebtnEnabled = true;\n }\n }\n }\n\n unprocessedPaymentUnSelectEvent(event: any) {\n event.preventDefault();\n this.recordId = null;\n this.isUnprocessedRecordSelected = false;\n this.isAllocateToExistingFeebtnEnabled = false;\n this.isAllocatedToNewFeebtnEnabled = false;\n this.isMarkAsUnidentifiedbtnEnabled = false;\n //this.validateButtons();\n this.selectedUnprocessedFeeEvent.emit('');\n }\n\n showDetailRow(event: any,obj: any, i: any) {\n event.preventDefault();\n\n this.unassignedRecordSelectedList = obj;\n\n }\n}\n","import { Component, OnInit, Input, Output, EventEmitter } from '@angular/core';\nimport { BulkScaningPaymentService } from '../../services/bulk-scaning-payment/bulk-scaning-payment.service';\nimport {IPayment} from '../../interfaces/IPayment';\nimport {Router} from '@angular/router';\n\n@Component({\n selector: 'ccpay-app-processed-payments',\n templateUrl: './processed-payments.component.html',\n styleUrls: ['./processed-payments.component.scss']\n})\nexport class ProcessedPaymentsComponent implements OnInit {\n\n @Input('NONPAYMENTS') NONPAYMENTS: IPayment[];\n @Output() goToPaymentViewComponent: EventEmitter<any> = new EventEmitter();\n\n constructor(\n private router: Router,\n private bulkScaningPaymentService: BulkScaningPaymentService\n ) { }\n ngOnInit() {\n }\n\n trimUnderscore(method: string){\n return this.bulkScaningPaymentService.removeUnwantedString(method,' ');\n }\n redirectToPaymentViewPage(paymentGroupReference: string, paymentReference: string, paymentMethod: string) {\n this.goToPaymentViewComponent.emit({paymentGroupReference, paymentReference, paymentMethod});\n }\n}\n","\nexport class IAllocationPaymentsRequest {\n payment_allocation_status: any;\n payment_group_reference: string;\n payment_reference: string;\n reason: string;\n explanation: string;\n user_name: string;\n constructor(payment_group_reference: string, payment_reference : string, reason? : string, explanation? : string, userName? : string) {\n this.payment_allocation_status = {\n description: '',\n name: \"Allocated\"\n };\n this.payment_group_reference = payment_group_reference;\n this.payment_reference= payment_reference;\n this.reason = reason ? reason : null;\n this.explanation = explanation ? explanation : null;\n this.user_name = userName ? userName : null;\n }\n}\n","import { Component, OnInit, Input } from '@angular/core';\nimport { FormBuilder, FormGroup, Validators, FormControl } from '@angular/forms';\nimport { PaymentLibComponent } from '../../payment-lib.component';\nimport { PaymentViewService } from '../../services/payment-view/payment-view.service';\nimport {CaseTransactionsService} from '../../services/case-transactions/case-transactions.service'; \nimport {BulkScaningPaymentService} from '../../services/bulk-scaning-payment/bulk-scaning-payment.service';\nimport { ErrorHandlerService } from '../../services/shared/error-handler.service';\nimport {IPaymentGroup} from '../../interfaces/IPaymentGroup';\nimport {IBSPayments} from '../../interfaces/IBSPayments';\nimport {AllocatePaymentRequest} from '../../interfaces/AllocatePaymentRequest';\nimport {IAllocationPaymentsRequest} from '../../interfaces/IAllocationPaymentsRequest';\nimport { IOrderReferenceFee } from '../../interfaces/IOrderReferenceFee';\nimport { OrderslistService } from '../../services/orderslist.service';\n\n\n\n@Component({\n selector: 'app-allocate-payments',\n templateUrl: './allocate-payments.component.html',\n styleUrls: ['./allocate-payments.component.scss']\n})\nexport class AllocatePaymentsComponent implements OnInit {\n @Input() isTurnOff: boolean;\n @Input() caseType: string;\n\n overUnderPaymentForm: FormGroup;\n viewStatus: string;\n ccdCaseNumber: string;\n bspaymentdcn: string;\n recordId:string;\n feedbackUrlLabel:string;\n unAllocatedPayment: IBSPayments = {\n amount: 0\n };\n siteID: string = null;\n errorMessage = this.errorHandlerService.getServerErrorMessage(false, false, '');\n paymentGroup: IPaymentGroup;\n paymentGroups: IPaymentGroup[] = [];\t\n remainingAmount: number;\n isRemainingAmountGtZero: boolean;\n isMoreDetailsBoxHide: boolean = true;\n isRemainingAmountLtZero: boolean;\n afterFeeAllocateOutstanding: number;\n amountForAllocation: number;\n isConfirmButtondisabled: boolean = false;\n isContinueButtondisabled: boolean = true;\n otherPaymentExplanation: string = null;\n selectedOption: string = null;\n isFeeAmountZero: boolean = false;\t\n\n paymentReasonHasError: boolean = false;\n paymentExplanationHasError: boolean = false;\n isPaymentDetailsEmpty: boolean = false;\n isPaymentDetailsInvalid: boolean = false;\n paymentDetailsMinHasError: boolean = false;\n paymentDetailsMaxHasError: boolean = false;\n isUserNameEmpty: boolean = false;\n isUserNameInvalid: boolean = false;\n ccdReference: string = null;\n exceptionReference: string = null;\n paymentReason: string = null;\n paymentExplanation: string = null;\n userName: string = null;\n paymentSectionLabel: any;\n paymentRef: string = null;\n isStrategicFixEnable: boolean = true;\n orderLevelFees: IOrderReferenceFee[] = [];\n cookieUserName: string[] = [];\n enCookieUserName: any;\n userNameField: string = null;\n\n reasonList: { [key: string]: { [key: string]: string } }= {\n overPayment: {\n hwfReward: 'Help with Fees (HWF) awarded. Please include the HWF reference number in the explanatory note',\n wrongFee: 'Incorrect payment received',\n notIssueCase: 'Unable to issue case',\n otherDeduction: 'Other'\n },\n shortFall: {\n helpWithFee: 'Help with Fees (HWF) application declined',\n wrongFee: 'Incorrect payment received',\n other: 'Other'\n }\n }\n explanationList = {\n overPayment: {\n referRefund: 'Details in case notes. Refund due',\n noRefund: 'Details in case notes. No refund due',\n noCase: 'No case created. Refund due',\n other: 'Other'\n },\n shortFall: {\n holdCase: 'I have put a stop on the case and contacted the applicant requesting the balance of payment',\n heldCase: 'I have put a stop on the case. The applicant needs to be contacted to request the balance of payment',\n other: 'Other'\n }\n }\n\n refund = {\n reason: {\n duplicate: 'Duplicate payment',\n humanerror: 'Human error',\n caseWithdrawn: 'Case withdrawn',\n other: 'Other'\n }\n }\n\n\n constructor(\n private errorHandlerService: ErrorHandlerService,\n private caseTransactionsService: CaseTransactionsService,\n private formBuilder: FormBuilder,\n private paymentViewService: PaymentViewService,\n private paymentLibComponent: PaymentLibComponent,\n private bulkScaningPaymentService: BulkScaningPaymentService,\n private OrderslistService: OrderslistService) { }\n\n ngOnInit() {\n this.viewStatus = 'mainForm';\n if (this.paymentLibComponent.paymentGroupReference !== null) {\n this.viewStatus = 'allocatePaymentConfirmation';\n }\n \n this.ccdCaseNumber = this.paymentLibComponent.CCD_CASE_NUMBER;\n this.bspaymentdcn = this.paymentLibComponent.bspaymentdcn;\n this.paymentRef = this.paymentLibComponent.paymentGroupReference;\n this.selectedOption = this.paymentLibComponent.SELECTED_OPTION;\n this.isStrategicFixEnable = this.paymentLibComponent.ISSFENABLE;\n this.isTurnOff = this.paymentLibComponent.isTurnOff;\n this.overUnderPaymentForm = this.formBuilder.group({\n moreDetails: new FormControl('', Validators.compose([\n Validators.required,\n Validators.minLength(3),\n Validators.maxLength(255),\n Validators.pattern('^([a-zA-Z0-9\\\\s,\\\\.]*)$')\n ])),\n userName: new FormControl('', Validators.compose([\n Validators.required,\n Validators.pattern('^([a-zA-Z0-9\\\\s]*)$')\n ])),\n });\n this.OrderslistService.getOrdersList().subscribe( (data) =>\n this.orderLevelFees = data.filter(data => data.orderStatus !== 'Paid'));\n this.OrderslistService.getCaseType().subscribe( (data) => this.caseType = data);\n this.getUnassignedPayment();\n }\n getGroupOutstandingAmount(paymentGroup: IPaymentGroup): number {\n return this.bulkScaningPaymentService.calculateOutStandingAmount(paymentGroup);\n }\n\n getPaymentGroupDetails(){\n\n if(!this.isTurnOff){\n this.paymentViewService.getPaymentGroupDetails(this.paymentRef).subscribe(\n paymentGroup => {\n this.errorMessage = this.errorHandlerService.getServerErrorMessage(false, false, '');\n this.paymentGroup = paymentGroup;\n this.saveAndContinue();\n },\n (error: any) => {\n this.errorMessage = this.errorHandlerService.getServerErrorMessage(true, false, '');\n }\n );\n }else {\n this.caseTransactionsService.getPaymentGroups(this.ccdCaseNumber).subscribe(\n paymentGroups => {\n this.errorMessage = this.errorHandlerService.getServerErrorMessage(false, false, '');\n this.paymentGroups = paymentGroups['payment_groups'].filter(paymentGroup => {\n paymentGroup.fees.forEach(fee => {\n if(fee.calculated_amount === 0) {\n this.isFeeAmountZero = true\n }\n });\n let fstCon = this.getGroupOutstandingAmount(<IPaymentGroup>paymentGroup),\n scndCn = fstCon > 0 || (fstCon == 0 && this.isFeeAmountZero) && paymentGroup.payment_group_reference === this.paymentRef;\n return this.paymentRef ? scndCn : fstCon > 0 || (fstCon == 0 && this.isFeeAmountZero);\n });\n },\n (error: any) => {\n this.errorMessage = this.errorHandlerService.getServerErrorMessage(true, false, '');\n }\n );\n }\n\n }\n\n selectedPaymentGroup(paymentGroup: IPaymentGroup) {\t\n this.isContinueButtondisabled = false;\t\n this.paymentGroup = paymentGroup;\t\n }\t\n\n gotoCasetransationPage() {\n this.paymentLibComponent.viewName = 'case-transactions';\n this.paymentLibComponent.isTurnOff = this.isTurnOff;\n this.paymentLibComponent.TAKEPAYMENT = true;\n this.paymentLibComponent.ISBSENABLE = true;\n }\n\n gotoSummaryPage(event: any) { \n event.preventDefault();\n this.paymentLibComponent.viewName = 'fee-summary';\n this.paymentLibComponent.isTurnOff = this.isTurnOff;\n this.paymentLibComponent.TAKEPAYMENT = true;\n this.paymentLibComponent.ISBSENABLE = true;\n }\n\n cancelAllocatePayment(event: any){\n event.preventDefault();\n this.resetForm([false, false, false, false, false, false, false, false], 'all');\n if(!this.isTurnOff){\n this.paymentLibComponent.viewName = 'fee-summary';\n this.paymentLibComponent.isTurnOff = this.isTurnOff;\n this.paymentLibComponent.TAKEPAYMENT = true;\n this.paymentLibComponent.ISBSENABLE = true;\n } else {\n this.viewStatus = 'mainForm';\t\n }\n }\n confirmAllocatePayement(){\n this.enCookieUserName = document.cookie.split(\";\").find(row => row.includes(\"user-info\")).split(\"=\")[1].split(\";\");\n this.cookieUserName = JSON.parse(decodeURIComponent(this.enCookieUserName));\n \n const fullName = this.cookieUserName['forename'] + ' ' + this.cookieUserName['surname'];\n\n const paymentDetailsField = this.overUnderPaymentForm.controls.moreDetails,\n paymentFormError = this.overUnderPaymentForm.controls.moreDetails.errors,\n userNameField = fullName,\n isEmptyCondtion = this.paymentReason && this.paymentExplanation,\n isOtherOptionSelected = this.paymentExplanation === 'Other';\n\n this.resetForm([false, false, false, false, false, false, false, false], 'all');\n if ( (!this.isRemainingAmountGtZero && !this.isRemainingAmountLtZero) || isEmptyCondtion && (!isOtherOptionSelected && userNameField.length > 0 || isOtherOptionSelected && userNameField.length > 0 && paymentDetailsField.valid)) {\n this.isConfirmButtondisabled = true;\n this.otherPaymentExplanation = this.paymentExplanation === 'Other' ? paymentDetailsField.value : this.paymentExplanation;\n this.userName = userNameField;\n this.finalServiceCall();\n }else {\n if(!this.paymentReason) {\n this.resetForm([true, false, false, false, false, false, false, false], 'reason');\n }\n if(!this.paymentExplanation) {\n this.resetForm([false, true, false, false, false, false, false, false], 'explanation');\n }\n if(this.paymentExplanation && isOtherOptionSelected) {\n if(paymentDetailsField.value == '' ) {\n this.resetForm([false, false, true, false, false, false, false, false], 'other');\n }\n if(paymentDetailsField.value != '' && paymentDetailsField.invalid ) {\n this.resetForm([false, false, false, true, false, false, false, false], 'other');\n }\n if(paymentFormError && paymentFormError.minlength && paymentFormError.minlength.actualLength < 3 ) {\n this.resetForm([false, false, false, false, true, false, false, false], 'other');\n }\n if(paymentFormError && paymentFormError.maxlength && paymentFormError.maxlength.actualLength > 255 ) {\n this.resetForm([false, false, false, false, false, true, false, false], 'other');\n }\n }\n if(userNameField.length === 0) {\n this.resetForm([false, false, false, false, false, false, true, false], 'username');\n }\n }\n }\n resetForm(vals, field) {\n if(field==='reason' || field==='all') {\n this.paymentReasonHasError = vals[0];\n }\n if(field==='explanation' || field==='all') {\n this.paymentExplanationHasError = vals[1];\n }\n if(field==='other' || field==='all') {\n this.isPaymentDetailsEmpty = vals[2];\n this.isPaymentDetailsInvalid = vals[3];\n this.paymentDetailsMinHasError = vals[4];\n this.paymentDetailsMaxHasError = vals[5];\n }\n if(field==='username' || field==='all') {\n this.isUserNameEmpty = vals[6];\n this.isUserNameInvalid = vals[7];\n }\n }\n finalServiceCall() {\n if(!this.isStrategicFixEnable) {\n let allocatedRequest = {\n reason: this.paymentReason,\n allocation_status:'Allocated',\n explanation: this.otherPaymentExplanation,\n payment_allocation_status: {\n description: '',\n name: 'Allocated'\n },\n payment_group_reference: this.paymentGroup.payment_group_reference,\n case_type: this.caseType,\n user_name: this.userName\n }\n const postStrategicBody = new AllocatePaymentRequest\n (this.ccdReference, this.unAllocatedPayment, this.caseType, this.exceptionReference, allocatedRequest);\n this.bulkScaningPaymentService.postBSPaymentStrategic(postStrategicBody , this.paymentGroup.payment_group_reference).subscribe(\n res => {\n this.errorMessage = this.errorHandlerService.getServerErrorMessage(false, false, '');\n let response = JSON.parse(res);\n if (response.success) {\n this.gotoCasetransationPage();\n }\n },\n (error: any) => {\n this.errorMessage = this.errorHandlerService.getServerErrorMessage(true, false, '');\n window.scrollTo(0, 0);\n this.isConfirmButtondisabled = false;\n });\n\n } else {\n this.bulkScaningPaymentService.patchBSChangeStatus(this.unAllocatedPayment.dcn_reference, 'PROCESSED').subscribe(\n res1 => {\n this.errorMessage = this.errorHandlerService.getServerErrorMessage(false, false, '');\n let response1 = JSON.parse(res1);\n if (response1.success) {\n const requestBody = new AllocatePaymentRequest\n (this.ccdReference, this.unAllocatedPayment, this.siteID, this.exceptionReference);\n this.bulkScaningPaymentService.postBSAllocatePayment(requestBody, this.paymentGroup.payment_group_reference).subscribe(\n res2 => {\n this.errorMessage = this.errorHandlerService.getServerErrorMessage(false, false, '');\n let response2 = JSON.parse(res2);\n const reqBody = new IAllocationPaymentsRequest\n (response2['data'].payment_group_reference, response2['data'].reference, this.paymentReason, this.otherPaymentExplanation, this.userName);\n if (response2.success) {\n this.paymentViewService.postBSAllocationPayments(reqBody).subscribe(\n \n res3 => {\n this.errorMessage = this.errorHandlerService.getServerErrorMessage(false, false, '');\n let response3 = JSON.parse(res3);\n if (response3.success) {\n this.gotoCasetransationPage();\n }\n },\n (error: any) => {\n this.bulkScaningPaymentService.patchBSChangeStatus(this.unAllocatedPayment.dcn_reference, 'COMPLETE').subscribe();\n this.errorMessage = this.errorHandlerService.getServerErrorMessage(true, false, '');\n window.scrollTo(0, 0);\n this.isConfirmButtondisabled = false;\n }\n );\n }\n },\n (error: any) => {\n this.bulkScaningPaymentService.patchBSChangeStatus(this.unAllocatedPayment.dcn_reference, 'COMPLETE').subscribe();\n this.errorMessage = this.errorHandlerService.getServerErrorMessage(true, false, '');\n window.scrollTo(0, 0);\n this.isConfirmButtondisabled = false;\n }\n );\n }\n },\n (error: any) => {\n this.errorMessage = this.errorHandlerService.getServerErrorMessage(true, false, '');\n window.scrollTo(0, 0);\n this.isConfirmButtondisabled = false;\n }\n ); \n }\n }\n\n saveAndContinue(){\n if(this.paymentGroup) {\n this.isMoreDetailsBoxHide = true;\n this.overUnderPaymentForm.get('moreDetails').reset();\n this.overUnderPaymentForm.get('moreDetails').setValue('');\n this.overUnderPaymentForm.get('userName').reset();\n this.overUnderPaymentForm.get('userName').setValue('');\n this.paymentReason = '';\n this.paymentExplanation = '';\n let GroupOutstandingAmount = this.getGroupOutstandingAmount(this.paymentGroup);\n const remainingToBeAssigned = this.unAllocatedPayment.amount - GroupOutstandingAmount;\n this.isRemainingAmountGtZero = remainingToBeAssigned > 0;\n this.isRemainingAmountLtZero = remainingToBeAssigned < 0;\n this.paymentSectionLabel = this.isRemainingAmountGtZero ? { \n title: 'There is an Over payment of',\n reason: 'Provide a reason. This will be used in the Refund process.',\n }: this.isRemainingAmountLtZero ? { \n title: 'There is an Under payment of',\n reason: 'Provide a reason',\n }: { \n title:'Amount left to be allocated',\n reason:'',\n };\n this.feedbackUrlLabel = this.isRemainingAmountGtZero ? 'CONFIRMALLOCATION_SURPLUS' : this.isRemainingAmountLtZero ? 'CONFIRMALLOCATION_SHORTFALL' : 'CONFIRMALLOCATION';\n this.remainingAmount = this.isRemainingAmountGtZero ? remainingToBeAssigned : this.isRemainingAmountLtZero ? remainingToBeAssigned * -1 : 0;\n this.afterFeeAllocateOutstanding = remainingToBeAssigned >= 0 ? 0 : (remainingToBeAssigned * -1);\n this.amountForAllocation = GroupOutstandingAmount >= this.unAllocatedPayment.amount ? this.unAllocatedPayment.amount : GroupOutstandingAmount;\n if(this.isTurnOff){\n this.viewStatus = 'allocatePaymentConfirmation';\t\n }\n }\n }\n getUnassignedPayment() {\n this.bulkScaningPaymentService.getBSPaymentsByDCN(this.bspaymentdcn).subscribe(\n unassignedPayments => {\n this.errorMessage = this.errorHandlerService.getServerErrorMessage(false, false, '');\n this.unAllocatedPayment = unassignedPayments['data'].payments.filter(payment => {\n return payment && payment.dcn_reference == this.bspaymentdcn;\n })[0];\n this.siteID = unassignedPayments['data'].responsible_service_id;\n const beCcdNumber = unassignedPayments['data'].ccd_reference,\n beExceptionNumber = unassignedPayments['data'].exception_record_reference,\n exceptionReference = beCcdNumber ? beCcdNumber === this.ccdCaseNumber ? null : this.ccdCaseNumber : this.ccdCaseNumber;\n this.ccdReference = beCcdNumber ? beCcdNumber : null;\n this.exceptionReference = beExceptionNumber ? beExceptionNumber : exceptionReference;\n this.getPaymentGroupDetails();\n },\n (error: any) => {\n this.errorMessage = this.errorHandlerService.getServerErrorMessage(true, false, '');\n }\n );\n }\n selectRadioButton(key, type) {\n this.isMoreDetailsBoxHide = true;\n if( type === 'explanation' && key === 'other' ){\n this.isPaymentDetailsEmpty = false;\n this.isPaymentDetailsInvalid = false;\n this.paymentDetailsMinHasError = false;\n this.paymentDetailsMaxHasError = false;\n this.isMoreDetailsBoxHide = false;\n }\n }\n OrderListSelectEvent(orderef: any){\n this.isContinueButtondisabled = false;\n this.recordId= orderef;\n }\n\n redirectToOrderFeeSearchPage() {\n // this.paymentLibComponent.bspaymentdcn = null;\n this.paymentLibComponent.paymentGroupReference = this.recordId;\n this.paymentLibComponent.isTurnOff = this.isTurnOff;\n this.paymentLibComponent.viewName = 'fee-summary';\n}\n}\n","import { IFee } from './IFee';\n\nexport class AddRemissionRequest {\n beneficiary_name: string;\n ccd_case_number: string;\n fee: IFee;\n hwf_amount: number;\n hwf_reference: string;\n payment_group_reference: string;\n case_type: string;\n\n constructor(ccd_case_number: string, fee: IFee, hwf_amount: number, hwf_reference: string, caseType: string) {\n this.ccd_case_number = ccd_case_number;\n this.fee = fee;\n this.hwf_amount = hwf_amount;\n this.hwf_reference = hwf_reference;\n this.case_type = caseType;\n }\n}\n","export class AddRetroRemissionRequest {\n hwf_amount: number;\n hwf_reference: string;\n\n constructor(hwf_amount: number, hwf_reference: string) {\n this.hwf_amount = hwf_amount;\n this.hwf_reference = hwf_reference;\n }\n}\n","export class PostRefundRetroRemission {\n payment_reference: string;\n refund_reason: string;\n \n constructor(payment_reference : string, refund_reason : string) {\n this.payment_reference= payment_reference;\n this.refund_reason = refund_reason;\n } \n}","export class PostIssueRefundRetroRemission {\n remissionReference: string;\n \n constructor(remissionReference : string) {\n this.remissionReference= remissionReference;\n } \n}","import { Component, OnInit, Input, Output, EventEmitter} from '@angular/core';\nimport { FormBuilder, FormGroup, Validators, FormControl, RequiredValidator } from '@angular/forms';\nimport { IFee } from '../../interfaces/IFee';\nimport {Router} from '@angular/router';\nimport { AddRemissionRequest } from '../../interfaces/AddRemissionRequest';\nimport { PaymentViewService } from '../../services/payment-view/payment-view.service';\nimport { PaymentLibComponent } from '../../payment-lib.component';\nimport { IPayment } from '../../interfaces/IPayment';\nimport { RefundsService } from '../../services/refunds/refunds.service';\nimport { IRefundReasons } from '../../interfaces/IRefundReasons';\nimport { RefundsRequest } from '../../interfaces/RefundsRequest';\nimport { AddRetroRemissionRequest } from '../../interfaces/AddRetroRemissionRequest';\nimport { IssueRefundRequest } from '../../interfaces/IssueRefundRequest';\nimport { PostRefundRetroRemission } from '../../interfaces/PostRefundRetroRemission';\nimport { PostIssueRefundRetroRemission } from '../../interfaces/PostIssueRefundRetroRemission';\nimport {ChangeDetectorRef} from '@angular/core';\nimport { IRemission } from '../../interfaces/IRemission';\nimport { OrderslistService } from '../../services/orderslist.service';\n\nconst BS_ENABLE_FLAG = 'bulk-scan-enabling-fe';\n\n@Component({\n selector: 'ccpay-add-remission',\n templateUrl: './add-remission.component.html',\n styleUrls: ['./add-remission.component.scss']\n})\nexport class AddRemissionComponent implements OnInit {\n @Input() fee: IFee;\n @Input() payment: IPayment;\n @Input() remission: IRemission;\n @Input() ccdCaseNumber: string;\n @Input() caseType: string;\n @Input() viewCompStatus: string;\n @Input() paymentGroupRef: string;\n @Input() isTurnOff: boolean;\n @Input() isRefundRemission: boolean;\n @Input() isStrategicFixEnable: boolean;\n @Input() paidAmount: any;\n @Input() isFromRefundListPage: boolean;\n @Input() isFromPaymentDetailPage: boolean;\n @Input() isFromServiceRequestPage: boolean;\n @Input() feeamount: number;\n @Input('LOGGEDINUSERROLES') LOGGEDINUSERROLES: string[];\n @Input('orderDetail') orderDetail: any[];\n @Input('orderRef') orderRef: string;\n @Input('orderStatus') orderStatus: string;\n @Input('orderParty') orderParty: string;\n @Input('orderCreated') orderCreated: Date;\n @Input('orderCCDEvent') orderCCDEvent: string;\n @Input('takepayment') takePayment: boolean;\n @Input('orderFeesTotal') orderFeesTotal: number;\n @Input('orderTotalPayments') orderTotalPayments: number;\n @Input('orderRemissionTotal') orderRemissionTotal: number;\n @Output() cancelRemission: EventEmitter<void> = new EventEmitter();\n //@Output() refundListReason: EventEmitter<any> = new EventEmitter({reason:string, code:string});\n @Output() refundListReason = new EventEmitter<{reason: string, code: string}>();\n @Output() refundListAmount: EventEmitter<string> = new EventEmitter();\n\n refund = {\n reason: {\n duplicate: 'Duplicate payment',\n humanerror: 'Human error',\n caseWithdrawn: 'Case withdrawn',\n other: 'Other'\n }\n }\n\n remissionForm: FormGroup;\n hasErrors = false;\n viewStatus = 'main';\n errorMessage = null;\n option: string = null;\n isConfirmationBtnDisabled: boolean = false;\n bsPaymentDcnNumber: string;\n selectedValue = 'yes';\n amount: any;\n retroRemission: boolean = false;\n remissionReference: string = '';\n refundReference: string;\n refundAmount: string;\n paymentExplanationHasError: boolean = false;\n refundReason:string;\n selectedRefundReason: string;\n displayRefundReason: string;\n refundCode:string;\n remessionPayment:IPayment;\n isRemissionCodeEmpty: boolean = false;\n remissionCodeHasError: boolean = false;\n isAmountEmpty: boolean = false;\n isReasonEmpty: boolean = false;\n amountHasError: boolean = false;\n isRemissionLessThanFeeError: boolean = false;\n refundHasError:boolean = false;\n isPaymentSuccess: boolean = false;\n isRemissionApplied: boolean = false;\n remissionamt:number;\n // refundReasons: any[] = [];\n commonRefundReasons: any[] = [];\n showReasonText: boolean;\n isRefundReasonsSelected: boolean;\n default: string;\n reasonLength: number;\n refundReasons:IRefundReasons[];\n pattern1: string;\n pattern2: string;\n sendOrderDetail: any[];\n sendOrderRef: string;\n component: { account_number: string; amount: number; case_reference: string; ccd_case_number: string; channel: string; currency: string; customer_reference: string; date_created: string; date_updated: string; description: string; method: string; organisation_name: string; payment_allocation: any[]; reference: string; service_name: string; site_id: string; status: string; };\n\n constructor(private formBuilder: FormBuilder,\n private router: Router,\n private paymentViewService: PaymentViewService,\n private paymentLibComponent: PaymentLibComponent,\n private refundService: RefundsService,\n private cd: ChangeDetectorRef,\n private OrderslistService: OrderslistService) { }\n\n ngOnInit() {\n this.default = 'Select a different reason';\n this.pattern1 = '^([a-zA-Z0-9]{3})-([a-zA-Z0-9]{3})-([a-zA-Z0-9]{3})$';\n this.pattern2 = '^([A-Za-z]{2}[0-9]{2})-([0-9]{6})$';\n if(this.viewCompStatus !== '' && this.viewCompStatus !== undefined){\n this.viewStatus = '';\n }\n if(this.remission) {\n }\n if(this.fee) {\n this.amount = (this.fee.volume * this.fee.calculated_amount);\n }\n if (this.payment){\n this.remessionPayment = this.payment;\n if(this.payment.status === 'Success') {\n this.isPaymentSuccess = true;\n }\n }\n this.option = this.paymentLibComponent.SELECTED_OPTION;\n this.bsPaymentDcnNumber = this.paymentLibComponent.bspaymentdcn;\n this.remissionForm = this.formBuilder.group({\n remissionCode: new FormControl('',\n Validators.compose([\n Validators.required,\n Validators.pattern(`(${this.pattern1})|(${this.pattern2})`)\n ])\n ),\n amount: new FormControl('', Validators.compose([\n Validators.required,\n Validators.pattern('^[0-9]+(\\.[0-9]{1,2})?$')\n ])),\n refundReason: new FormControl('', Validators.compose([Validators.required])),\n refundDDReason: new FormControl('', Validators.compose([Validators.required])),\n reason: new FormControl()\n });\n const remissionctrls=this.remissionForm.controls;\n remissionctrls['refundDDReason'].setValue('Select a different reason', {onlySelf: true});\n\n if(this.viewCompStatus === ''){\n this.viewStatus = 'main';\n }\n\n if(this.viewCompStatus === 'issuerefund'){\n this.refundService.getRefundReasons().subscribe(\n refundReasons => {\n this.refundReasons = refundReasons.filter((data) => data.recently_used === false);\n this.refundReasons = this.refundReasons.filter((data) => data.name !== 'Retrospective remission');\n this.cd.detectChanges();\n this.commonRefundReasons = refundReasons.filter((data) => data.recently_used === true);\n this.commonRefundReasons.sort((a, b) => a.toString().localeCompare(b));\n this.cd.detectChanges();\n } );\n }\n\n if(this.viewCompStatus === 'processretroremissonpage' && this.isFromRefundListPage){\n this.viewStatus = 'processretroremissonpage';\n }\n\n }\n\n addRemission() {\n this.resetRemissionForm([false, false, false, false, false, false], 'All');\n const remissionctrls=this.remissionForm.controls,\n isRemissionLessThanFee = this.fee.calculated_amount > remissionctrls.amount.value;\n this.remissionForm.controls['refundReason'].setErrors(null);\n this.remissionForm.controls['refundDDReason'].setErrors(null);\n if (this.remissionForm.dirty && this.remissionForm.valid && isRemissionLessThanFee) {\n this.viewStatus = 'confirmation';\n }else {\n\n if(remissionctrls['remissionCode'].value == '' ) {\n this.resetRemissionForm([true, false, false, false, false, false], 'remissionCode');\n }\n if(remissionctrls['remissionCode'].value != '' && remissionctrls['remissionCode'].invalid ) {\n this.resetRemissionForm([false, true, false, false, false, false], 'remissionCode');\n }\n if(remissionctrls['amount'].value == '' ) {\n this.resetRemissionForm([false, false, true, false, false, false], 'amount');\n }\n if(remissionctrls['amount'].value != '' && remissionctrls['amount'].invalid ) {\n this.resetRemissionForm([false, true, false, true, false, false], 'amount');\n }\n if(remissionctrls.amount.valid && !isRemissionLessThanFee){\n this.resetRemissionForm([false, false, false, false, true, false], 'amount');\n }\n }\n }\n\n confirmRemission() {\n this.isConfirmationBtnDisabled = true;\n const newNetAmount = this.remissionForm.controls.amount.value,\n remissionAmount = this.fee.net_amount - newNetAmount,\n requestBody = new AddRemissionRequest\n (this.ccdCaseNumber, this.fee, remissionAmount, this.remissionForm.controls.remissionCode.value, this.caseType);\n this.paymentViewService.postPaymentGroupWithRemissions(decodeURIComponent(this.paymentGroupRef).trim(), this.fee.id, requestBody).subscribe(\n response => {\n if (JSON.parse(response).success) {\n let LDUrl = this.isTurnOff ? '&isTurnOff=Enable' : '&isTurnOff=Disable'\n LDUrl += `&caseType=${this.caseType}`\n if (this.paymentLibComponent.bspaymentdcn) {\n this.router.routeReuseStrategy.shouldReuseRoute = () => false;\n this.router.onSameUrlNavigation = 'reload';\n this.router.navigateByUrl(`/payment-history/${this.ccdCaseNumber}?view=fee-summary&selectedOption=${this.option}&paymentGroupRef=${this.paymentGroupRef}&dcn=${this.paymentLibComponent.bspaymentdcn}${LDUrl}`);\n }else {\n this.gotoCasetransationPage();\n }\n\n }\n },\n (error: any) => {\n this.errorMessage = error;\n this.isConfirmationBtnDisabled = false;\n }\n );\n }\n\n resetRemissionForm(val, field){\n if (field==='All'){\n this.isRemissionCodeEmpty = val[0];\n this.remissionCodeHasError = val[1];\n this.isAmountEmpty = val[2];\n this.amountHasError = val[3];\n this.isRemissionLessThanFeeError = val[4];\n this.isReasonEmpty = val[5];\n } else if(field==='remissionCode' || field==='All') {\n this.isRemissionCodeEmpty = val[0];\n this.remissionCodeHasError = val[1];\n } else if (field==='amount' || field==='All'){\n this.isAmountEmpty = val[2];\n this.amountHasError = val[3];\n this.isRemissionLessThanFeeError = val[4];\n } else if (field==='reason' || field==='All'){\n this.isReasonEmpty = val[5];\n }\n }\n\n // Add retro remission changes\n addRemissionCode() {\n this.errorMessage = false;\n this.viewStatus = '';\n this.isRefundRemission = false;\n this.resetRemissionForm([false, false, false, false, false, false], 'All');\n const remissionctrls=this.remissionForm.controls\n // isRemissionLessThanFee = this.fee.calculated_amount >= remissionctrls.amount.value;\n this.remissionForm.controls['refundReason'].setErrors(null);\n this.remissionForm.controls['refundDDReason'].setErrors(null);\n this.remissionForm.controls['amount'].setErrors(null);\n if (this.remissionForm.dirty && this.remissionForm.valid ) {\n this.viewCompStatus = '';\n this.viewStatus = \"processretroremissonpage\";\n }else {\n\n if(remissionctrls['remissionCode'].value == '' ) {\n this.resetRemissionForm([true, false, false, false, false], 'remissionCode');\n }\n if(remissionctrls['remissionCode'].value != '' && remissionctrls['remissionCode'].invalid ) {\n this.resetRemissionForm([false, true, false, false, false], 'remissionCode');\n }\n if(remissionctrls['amount'].value == '' ) {\n this.resetRemissionForm([false, false, true, false, false], 'amount');\n }\n if(remissionctrls['amount'].value != '' && remissionctrls['amount'].invalid ) {\n this.resetRemissionForm([false, true, false, true, false], 'amount');\n }\n if(remissionctrls['reason'].value == '') {\n this.resetRemissionForm([false, false, false, true, false, true], 'reason');\n }\n if(remissionctrls.amount.valid){\n this.resetRemissionForm([false, false, false, false, true], 'amount');\n }\n\n }\n }\n\n\n gotoAddRetroRemissionCodePage() {\n this.errorMessage = false;\n if(this.isRefundRemission) {\n this.paymentLibComponent.iscancelClicked = true;\n this.refundListAmount.emit();\n this.paymentLibComponent.isFromRefundStatusPage = true;\n return;\n }\n if ( this.isFromRefundListPage ) {\n this.paymentLibComponent.iscancelClicked = true;\n this.refundListReason.emit({reason: this.selectedRefundReason, code: this.refundReason});\n this.paymentLibComponent.isFromRefundStatusPage = true;\n return;\n }\n this.viewStatus = '';\n this.selectedValue = 'yes';\n this.viewCompStatus = \"addremission\";\n this.isRefundRemission = true;\n this.errorMessage = '';\n if(this.isFromPaymentDetailPage) {\n this.paymentLibComponent.viewName = 'payment-view';\n }\n }\n\n gotoCheckRetroRemissionPage(payment: IPayment) {\n this.paymentLibComponent.iscancelClicked = false;\n this.errorMessage = '';\n this.resetRemissionForm([false, false, false, false, false], 'All');\n if( !this.isRefundRemission) {\n var remissionctrls=this.remissionForm.controls,\n isRemissionLessThanFee = this.fee.calculated_amount >= remissionctrls.amount.value;\n if (this.remissionForm.dirty ) {\n if(remissionctrls['amount'].value == '' || remissionctrls['amount'].value < 0) {\n this.resetRemissionForm([false, false, true, false, false], 'amount');\n } else if(remissionctrls['amount'].value != '' && remissionctrls['amount'].invalid ) {\n this.resetRemissionForm([false, false, false, true, false], 'amount');\n } else if(remissionctrls.amount.valid && !isRemissionLessThanFee){\n this.resetRemissionForm([false, false, false, false, true], 'amount');\n } else {\n this.viewCompStatus = '';\n this.viewStatus = \"checkretroremissionpage\";\n }\n }\n } else {\n var remissionctrls=this.remissionForm.controls;\n //if (this.remissionForm.dirty ) {\n if(remissionctrls['amount'].value == '' || remissionctrls['amount'].value < 0 ) {\n this.resetRemissionForm([false, false, true, false, false], 'amount');\n } else {\n this.viewCompStatus = '';\n this.viewStatus = \"checkretroremissionpage\";\n this.refundListAmount.emit(remissionctrls['amount'].value);\n }\n //}\n\n }\n }\n\n gotoProcessRetroRemissionPage() {\n this.viewStatus = '';\n this.viewCompStatus = 'addremission';\n this.isRefundRemission = true;\n this.errorMessage = '';\n }\n\n confirmRetroRemission() {\n if(!this.isConfirmationBtnDisabled) {\n this.retroRemission = true;\n this.remissionamt = this.remissionForm.controls.amount.value;\n const requestBody = new AddRetroRemissionRequest(this.remissionamt,this.remissionForm.controls.remissionCode.value )\n this.paymentViewService.postPaymentGroupWithRetroRemissions(decodeURIComponent(this.paymentGroupRef).trim(), this.fee.id, requestBody).subscribe(\n response => {\n if (JSON.parse(response)) {\n this.isRemissionApplied = true;\n this.viewCompStatus = '';\n this.viewStatus = 'retroremissionconfirmationpage';\n this.remissionReference =JSON.parse(response).remission_reference;\n }\n },\n (error: any) => {\n this.errorMessage = error;\n this.isConfirmationBtnDisabled = false;\n this.cd.detectChanges();\n }\n );\n }\n }\n\n processRefund() {\n this.errorMessage = '';\n this.isConfirmationBtnDisabled = true;\n if( this.isRefundRemission) {\n this.retroRemission = true;\n }\n if (this.remissionReference === undefined || this.remissionReference === '') {\n this.remissionReference = this.remission.remission_reference;\n }\n const requestBody = new PostIssueRefundRetroRemission(this.remissionReference);\n this.paymentViewService.postRefundRetroRemission(requestBody).subscribe(\n response => {\n if (JSON.parse(response)) {\n this.viewCompStatus = '';\n this.viewStatus = 'refundconfirmationpage';\n this.refundReference = JSON.parse(response).refund_reference;\n this.refundAmount = JSON.parse(response).refund_amount;\n }\n },\n (error: any) => {\n this.errorMessage = error;\n this.isConfirmationBtnDisabled = false;\n })\n }\n\n // Issue Refund changes\n\n gotoIssueRefundConfirmation(payment: IPayment) {\n this.paymentLibComponent.iscancelClicked = false;\n if(this.paymentLibComponent.REFUNDLIST === \"true\") {\n this.isFromRefundListPage = true;\n }\n this.errorMessage = '';\n this.refundReason = this.remissionForm.controls['refundReason'].value === null ? this.remissionForm.controls['refundDDReason'].value : this.remissionForm.controls['refundReason'].value;\n if(!this.refundReason || this.refundReason === 'Select a different reason') {\n this.refundHasError = true;\n } else if(this.selectedRefundReason.includes('Other') && (this.remissionForm.controls['reason'].value == '' || this.remissionForm.controls['reason'].value == null)) {\n this.resetRemissionForm([false, false, false, true, false, true], 'reason');\n } else if (this.selectedRefundReason.includes('Other') && this.remissionForm.controls['reason'].value !== '') {\n this.refundHasError = false;\n this.refundReason += '-' + this.remissionForm.controls['reason'].value;\n this.displayRefundReason = this.selectedRefundReason + '-' + this.remissionForm.controls['reason'].value;\n if ( this.isFromRefundListPage ) {\n this.refundListReason.emit({reason: this.displayRefundReason, code: this.refundReason});\n } else {\n this.viewCompStatus = '';\n this.viewStatus = 'checkissuerefundpage';\n }\n\n } else {\n this.displayRefundReason = this.selectedRefundReason;\n if ( this.isFromRefundListPage ) {\n this.paymentLibComponent.isFromRefundStatusPage = true;\n this.refundListReason.emit({reason: this.selectedRefundReason, code: this.refundReason});\n } else {\n this.viewCompStatus = '';\n this.viewStatus = 'checkissuerefundpage';\n }\n\n }\n }\n\n gotoIssueRefundPage() {\n this.errorMessage = '';\n this.viewCompStatus = 'issuerefund';\n this.viewStatus = '';\n this.isRefundRemission = true;\n this.errorMessage = false;\n this.refundHasError = false;\n this.isReasonEmpty = false;\n }\n\n changeIssueRefundReason() {\n // this.remissionForm.controls['refundReason'].setValue('Duplicate payment');\n this.errorMessage = '';\n this.refundHasError = false;\n this.isReasonEmpty = false;\n this.viewCompStatus = 'issuerefund';\n this.viewStatus = '';\n this.isRefundRemission = true;\n }\n\n confirmIssueRefund() {\n this.isConfirmationBtnDisabled = true;\n this.errorMessage = '';\n if( this.isRefundRemission) {\n this.retroRemission = true;\n }\n\n const requestBody = new PostRefundRetroRemission(this.payment.reference,this.refundReason);\n this.paymentViewService.postRefundsReason(requestBody).subscribe(\n response => {\n if (JSON.parse(response)) {\n this.viewCompStatus = '';\n this.viewStatus = 'refundconfirmationpage';\n this.refundReference =JSON.parse(response).refund_reference;\n if(JSON.parse(response).refund_amount) {\n this.refundAmount = JSON.parse(response).refund_amount;\n }\n }\n },\n (error: any) => {\n this.errorMessage = error;\n this.isConfirmationBtnDisabled = false;\n this.cd.detectChanges();\n })\n }\n\n// Retro Refund\n\n confirmRetroRefund() {\n this.isConfirmationBtnDisabled = true;\n this.errorMessage = '';\n if( this.isRefundRemission) {\n this.retroRemission = true;\n }\n\n const requestBody = new PostRefundRetroRemission(this.payment.reference,'RR004-Retrospective remission');\n this.paymentViewService.postRefundsReason(requestBody).subscribe(\n response => {\n if (JSON.parse(response)) {\n this.viewCompStatus = '';\n this.viewStatus = 'retrorefundconfirmationpage';\n this.refundReference =JSON.parse(response).refund_reference;\n if(JSON.parse(response).refund_amount) {\n this.refundAmount = JSON.parse(response).refund_amount;\n }\n }\n },\n (error: any) => {\n this.errorMessage = error;\n this.isConfirmationBtnDisabled = false;\n });\n }\n\n selectRadioButton(key, value) {\n localStorage.setItem(\"myradio\", key);\n const remissionctrls=this.remissionForm.controls;\n remissionctrls['refundDDReason'].setValue('Select a different reason', {onlySelf: true});\n remissionctrls['reason'].reset();\n this.isRefundReasonsSelected = true;\n this.errorMessage = false;\n this.isReasonEmpty = false;\n this.showReasonText = false;\n this.refundHasError = false;\n this.selectedRefundReason = key;\n if(this.selectedRefundReason.includes('Other')) {\n this.showReasonText = true;\n this.refundHasError = false;\n this.refundReason = key;\n }\n }\n\n selectchange(args) {\n const remissionctrls=this.remissionForm.controls;\n remissionctrls['refundReason'].reset();\n remissionctrls['reason'].reset();\n this.isRefundReasonsSelected = false;\n this.showReasonText = false;\n this.refundHasError = false;\n this.selectedRefundReason = args.target.options[args.target.options.selectedIndex].id;\n this.reasonLength = (29-this.selectedRefundReason.split('- ')[1].length);\n\n if(this.selectedRefundReason.includes('Other')) {\n this.showReasonText = true;\n this.refundHasError = false;\n this.refundReason = args.target.options[args.target.options.selectedIndex].id;\n }\n\n\n }\n\n gotoServiceRequestPage(event: any) {\n this.errorMessage ='';\n event.preventDefault();\n if (this.isFromServiceRequestPage && !this.isFromPaymentDetailPage) {\n this.viewStatus = 'order-full-view';\n this.viewCompStatus = '';\n } else if ( this.isFromRefundListPage ) {\n this.paymentLibComponent.iscancelClicked = true;\n this.refundListReason.emit({reason: this.selectedRefundReason, code: this.refundReason});\n this.paymentLibComponent.isFromRefundStatusPage = true;\n } else {\n this.paymentLibComponent.paymentMethod = this.payment.method;\n this.paymentLibComponent.paymentGroupReference = this.paymentLibComponent.paymentGroupReference\n this.paymentLibComponent.paymentReference = this.payment.reference;\n this.paymentLibComponent.viewName = 'payment-view';\n this.OrderslistService.setOrderRef(this.orderRef);\n this.OrderslistService.setorderCCDEvent(this.orderCCDEvent);\n this.OrderslistService.setorderCreated(this.orderCreated);\n this.OrderslistService.setorderDetail(this.orderDetail);\n this.OrderslistService.setorderParty(this.orderParty);\n this.OrderslistService.setorderTotalPayments(this.orderTotalPayments);\n this.OrderslistService.setorderRemissionTotal(this.orderRemissionTotal);\n this.OrderslistService.setorderFeesTotal(this.orderFeesTotal);\n this.viewStatus = 'payment-view';\n this.sendOrderDetail = this.orderDetail;\n this.sendOrderRef = this.orderRef;\n if(this.LOGGEDINUSERROLES === undefined) {\n this.OrderslistService.getUserRolesList().subscribe((data) => this.LOGGEDINUSERROLES = data);\n }\n this.viewCompStatus = '';\n }\n // if (this.paymentLibComponent.TAKEPAYMENT === undefined && this.paymentLibComponent.SERVICEREQUEST === undefined) {\n // this.paymentLibComponent.SERVICEREQUEST = 'false';\n // this.paymentLibComponent.TAKEPAYMENT = false;\n // }\n // if (this.isFromServiceRequestPage) {\n // //this.paymentLibComponent.TAKEPAYMENT = false;\n // this.paymentLibComponent.isFromRefundStatusPage = false;\n // this.viewStatus = 'main'\n // this.paymentLibComponent.viewName = 'case-transactions';\n // this.OrderslistService.setisFromServiceRequestPage(true);\n // this.OrderslistService.setnavigationPage('servicerequestpage');\n // }\n // if ( this.isFromRefundListPage ) {\n // this.paymentLibComponent.iscancelClicked = true;\n // this.refundListReason.emit({reason: this.selectedRefundReason, code: this.refundReason});\n // this.paymentLibComponent.isFromRefundStatusPage = true;\n // }\n // if(!this.paymentLibComponent.isFromRefundStatusPage) {\n // if(this.payment) {\n // this.OrderslistService.setpaymentPageView({method: this.payment.method,payment_group_reference: this.paymentGroupRef, reference:this.payment.reference});\n // }\n // if (this.isFromServiceRequestPage) {\n // this.OrderslistService.setnavigationPage('servicerequestpage');\n // } else {\n // this.OrderslistService.setnavigationPage('paymentdetailspage');\n // }\n // this.errorMessage = '';\n // this.paymentLibComponent.viewName = 'case-transactions';\n // // this.paymentLibComponent.TAKEPAYMENT = true;\n // this.paymentLibComponent.ISTURNOFF = this.isTurnOff;\n\n // this.paymentLibComponent.isFromServiceRequestPage = true;\n // this.paymentLibComponent.ISBSENABLE = true;\n // let partUrl = this.bsPaymentDcnNumber ? `&dcn=${this.bsPaymentDcnNumber}` : '';\n // partUrl += this.paymentLibComponent.ISBSENABLE ? '&isBulkScanning=Enable' : '&isBulkScanning=Disable';\n // partUrl += this.paymentLibComponent.ISTURNOFF ? '&isTurnOff=Enable' : '&isTurnOff=Disable';\n // partUrl += this.isStrategicFixEnable ? '&isStFixEnable=Enable' : '&isStFixEnable=Disable';\n // partUrl += `&caseType=${this.caseType}`;\n // if(this.isFromPaymentDetailPage) {\n // partUrl += this.paymentLibComponent.isFromPaymentDetailPage\n // }\n // if(!this.paymentLibComponent.TAKEPAYMENT) {\n // this.paymentLibComponent.TAKEPAYMENT = undefined;\n // }\n // if ( this.paymentLibComponent.SERVICEREQUEST) {\n // const url = `/payment-history/${this.ccdCaseNumber}?view=case-transactions&selectedOption=${this.option}${partUrl}`;\n // this.router.routeReuseStrategy.shouldReuseRoute = () => false;\n // this.router.onSameUrlNavigation = 'reload';\n // this.router.navigateByUrl(url);\n // } else {\n // const url = `/payment-history/${this.ccdCaseNumber}?view=case-transactions&takePayment=${this.paymentLibComponent.TAKEPAYMENT}&selectedOption=${this.option}${partUrl}`;\n // this.router.routeReuseStrategy.shouldReuseRoute = () => false;\n // this.router.onSameUrlNavigation = 'reload';\n // this.router.navigateByUrl(url);\n // }\n\n // } else {\n // this.paymentLibComponent.viewName === 'refundstatuslist';\n // this.paymentLibComponent.isFromRefundStatusPage = true;\n // }\n }\n\n gotoCasetransationPage() {\n this.OrderslistService.setnavigationPage('casetransactions');\n this.errorMessage = '';\n this.paymentLibComponent.viewName = 'case-transactions';\n this.paymentLibComponent.VIEW = 'case-transactions';\n this.paymentLibComponent.ISTURNOFF = this.isTurnOff;\n this.paymentLibComponent.isFromServiceRequestPage = true;\n this.resetOrderData();\n let partUrl = this.bsPaymentDcnNumber ? `&dcn=${this.bsPaymentDcnNumber}` : '';\n partUrl += this.paymentLibComponent.ISBSENABLE ? '&isBulkScanning=Enable' : '&isBulkScanning=Disable';\n partUrl += this.paymentLibComponent.ISTURNOFF ? '&isTurnOff=Enable' : '&isTurnOff=Disable';\n partUrl += this.isStrategicFixEnable ? '&isStFixEnable=Enable' : '&isStFixEnable=Disable';\n partUrl += `&caseType=${this.caseType}`;\n const url = `/payment-history/${this.ccdCaseNumber}?view=case-transactions&takePayment=${this.paymentLibComponent.TAKEPAYMENT}&selectedOption=${this.option}${partUrl}`;\n this.router.routeReuseStrategy.shouldReuseRoute = () => false;\n this.router.onSameUrlNavigation = 'reload';\n this.router.navigateByUrl(url);\n }\n\n gotoCasetransationPageCancelBtnClicked(event: Event) {\n event.preventDefault();\n if( !this.paymentLibComponent.isFromServiceRequestPage) {\n this.OrderslistService.setnavigationPage('casetransactions');\n this.OrderslistService.setisFromServiceRequestPage(false);\n this.paymentLibComponent.VIEW ='case-transactions';\n this.paymentLibComponent.viewName = 'case-transactions';\n this.paymentLibComponent.ISBSENABLE = true;\n this.paymentLibComponent.isRefundStatusView = false;\n // this.OrderslistService.setnavigationPage('casetransactions');\n // this.OrderslistService.setisFromServiceRequestPage(false);\n // this.paymentLibComponent.VIEW ='case-transactions';\n // this.paymentLibComponent.viewName = 'case-transactions';\n // this.paymentLibComponent.ISBSENABLE = true;\n // this.paymentLibComponent.isRefundStatusView = false;\n // this.resetOrderData(); let partUrl = this.bsPaymentDcnNumber ? `&dcn=${this.bsPaymentDcnNumber}` : '';\n // partUrl += this.paymentLibComponent.ISBSENABLE ? '&isBulkScanning=Enable' : '&isBulkScanning=Disable';\n // partUrl += this.paymentLibComponent.ISTURNOFF ? '&isTurnOff=Enable' : '&isTurnOff=Disable';\n // partUrl += this.isStrategicFixEnable ? '&isStFixEnable=Enable' : '&isStFixEnable=Disable';\n // partUrl += `&caseType=${this.caseType}`;\n // const url = `/payment-history/${this.ccdCaseNumber}?view=case-transactions&takePayment=${this.paymentLibComponent.TAKEPAYMENT}&selectedOption=${this.option}${partUrl}`;\n // this.router.routeReuseStrategy.shouldReuseRoute = () => false;\n // this.router.onSameUrlNavigation = 'reload';\n // this.router.navigateByUrl(url);\n } else {\n\n if (this.paymentLibComponent.REFUNDLIST) {\n this.paymentLibComponent.viewName = 'refund-list';\n return;\n }\n if (this.paymentLibComponent.TAKEPAYMENT === undefined && this.paymentLibComponent.SERVICEREQUEST === undefined) {\n this.paymentLibComponent.SERVICEREQUEST = 'false';\n }\n this.OrderslistService.setisFromServiceRequestPage(false);\n this.OrderslistService.setpaymentPageView({method: '',payment_group_reference: '', reference:''});\n this.OrderslistService.setnavigationPage('casetransactions');\n this.errorMessage = '';\n this.paymentLibComponent.viewName = 'case-transactions';\n this.paymentLibComponent.ISTURNOFF = this.isTurnOff;\n this.paymentLibComponent.isFromServiceRequestPage = true;\n this.paymentLibComponent.ISBSENABLE = true;\n let partUrl = this.bsPaymentDcnNumber ? `&dcn=${this.bsPaymentDcnNumber}` : '';\n partUrl += this.paymentLibComponent.ISBSENABLE ? '&isBulkScanning=Enable' : '&isBulkScanning=Disable';\n partUrl += this.paymentLibComponent.ISTURNOFF ? '&isTurnOff=Enable' : '&isTurnOff=Disable';\n partUrl += this.isStrategicFixEnable ? '&isStFixEnable=Enable' : '&isStFixEnable=Disable';\n partUrl += `&caseType=${this.caseType}`;\n if(this.isFromPaymentDetailPage) {\n partUrl += this.paymentLibComponent.isFromPaymentDetailPage\n }\n\n if(!this.paymentLibComponent.SERVICEREQUEST) {\n const url = `/payment-history/${this.ccdCaseNumber}?view=case-transactions&takePayment=${this.paymentLibComponent.TAKEPAYMENT}&selectedOption=${this.option}${partUrl}`;\n this.router.routeReuseStrategy.shouldReuseRoute = () => false;\n this.router.onSameUrlNavigation = 'reload';\n this.router.navigateByUrl(url);\n } else {\n const url =`/payment-history/${this.ccdCaseNumber}?selectedOption=${this.option}${partUrl}`;\n this.router.routeReuseStrategy.shouldReuseRoute = () => false;\n this.router.onSameUrlNavigation = 'reload';\n this.router.navigateByUrl(url);\n }\n }\n\n }\n\n resetOrderData() {\n this.OrderslistService.setOrderRef(null);\n this.OrderslistService.setorderCCDEvent(null);\n this.OrderslistService.setorderCreated(null);\n this.OrderslistService.setorderDetail(null);\n this.OrderslistService.setorderParty(null);\n this.OrderslistService.setorderTotalPayments(null);\n this.OrderslistService.setorderRemissionTotal(null);\n this.OrderslistService.setorderFeesTotal(null);\n }\n\n\n getFormattedCurrency(currency:number){\n if(currency.toString().includes(\".\")){\n return currency\n }\n return currency.toString().concat(\".00\");\n }\n\n}\n","import { Pipe, PipeTransform } from '@angular/core';\n@Pipe({\n name: 'ccdHyphens'\n})\nexport class CcdHyphensPipe implements PipeTransform {\n constructor() {}\n transform(value: any, args?: any): any {\n const pattern = /^([0-9]{4})+([0-9]{4})+([0-9]{4})+([0-9]{4})$/;\n if ( value.match(pattern)) {\n return value.replace(pattern,'$1-$2-$3-$4') \n }\n return value;\n }\n}\n","import { Pipe, PipeTransform } from '@angular/core';\n@Pipe({\n name: 'capitalize'\n})\nexport class CapitalizePipe implements PipeTransform {\n constructor() { }\n transform(s: any, args?: any): any {\n return s && s[0].toUpperCase() + s.slice(1) || \"\";\n }\n}\n","import { Pipe, PipeTransform } from '@angular/core';\n@Pipe({\n name: 'keyValue'\n})\nexport class keyValuePipe implements PipeTransform {\n constructor() {}\n transform(input: any): any {\n let keys = [];\n for (let key in input) {\n if (input.hasOwnProperty(key)) {\n keys.push({ key: key, value: input[key]});\n }\n }\n return keys;\n }\n}\n","import { Pipe, PipeTransform } from '@angular/core';\nimport { DomSanitizer, SafeHtml } from '@angular/platform-browser';\n\n@Pipe({ name: 'sanitizeHtml' })\nexport class SanitizeHtmlPipe implements PipeTransform {\n constructor(private sanitizer: DomSanitizer) {}\n transform(value: any): SafeHtml {\n return this.sanitizer.bypassSecurityTrustHtml(value);\n }\n}\n","import { Injectable } from '@angular/core';\nimport * as FileSaver from 'file-saver';\nimport * as XLSX from 'xlsx';\nimport * as XLSXStyle from 'xlsx-style';\n\n\nconst EXCEL_TYPE = 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=UTF-8';\nconst EXCEL_EXTENSION = '.xlsx';\n\n@Injectable()\nexport class XlFileService {\n\n constructor() { }\n\n public exportAsExcelFile(json: any[], excelFileName: string): void {\n let worksheet: XLSX.WorkSheet; \n let workbook: XLSX.WorkBook; \n console.log(excelFileName);\n\n if(excelFileName.match('Data_Loss')!== null){\n worksheet = XLSX.utils.json_to_sheet(json,{header:['loss_resp','payment_asset_dcn','env_ref','env_item','resp_service_id','resp_service_name','date_banked','bgc_batch','payment_method','amount']});\n worksheet = this.setDataLossReportHeaders(worksheet);\n worksheet = this.autoFitColumns(worksheet,json);\n } else if(excelFileName.match('Unprocessed')!== null){\n worksheet = XLSX.utils.json_to_sheet(json,{header:['resp_service_id','resp_service_name','exception_ref','ccd_ref','date_banked','bgc_batch','payment_asset_dcn','env_ref','env_item','payment_method','amount']});\n worksheet = this.setUnprocessedReportHeaders(worksheet);\n worksheet = this.autoFitColumns(worksheet,json);\n } else if(excelFileName.match('Processed_Unallocated')!== null){\n worksheet = XLSX.utils.json_to_sheet(json,{header:['resp_service_id','resp_service_name','allocation_status','receiving_office','allocation_reason','ccd_exception_reference','ccd_case_reference','payment_asset_dcn','env_ref','env_item','date_banked','bgc_batch','payment_method','amount']});\n worksheet = this.setProcessedUnallocatedReportHeaders(worksheet);\n worksheet = this.autoFitColumns(worksheet,json);\n } else if(excelFileName.match('Payment failure')!== null){\n worksheet = XLSX.utils.json_to_sheet(json,{header:['payment_reference','ccd_reference','org_id','service_name','failure_reference','failure_reason','disputed_amount','event_name','event_date','representment_status','representment_date','refund_reference','refund_amount','refund_date']});\n worksheet = this.setPaymentFailureReportHeaders(worksheet);\n worksheet = this.autoFitColumns(worksheet,json);\n } else {\n worksheet = XLSX.utils.json_to_sheet(json,{header:['resp_service_id','resp_service_name','surplus_shortfall','balance','payment_amount','ccd_case_reference', 'ccd_exception_reference', 'processed_date', 'reason', 'explanation', 'user_name']});\n worksheet = this.setShortFallReportHeaders(worksheet);\n worksheet = this.autoFitColumns(worksheet,json);\n }\n workbook = { Sheets: { 'data': worksheet }, SheetNames: ['data'] };\n const excelBuffer: any = XLSX.write(workbook, { bookType: 'xlsx', type: 'array' });\n this.saveAsExcelFile(excelBuffer, excelFileName);\n }\n\n\nprivate autoFitColumns (worksheet: XLSX.WorkSheet,json:any) : XLSX.WorkSheet {\n let objectMaxLength = []; \n let ColWidth = [];\n let obj = <any>Object;\n for (let i = 0; i < json.length; i++) {\n let value = obj.values(json[i]);\n let key = obj.keys(json[i]);\n for (let j = 0; j < value.length; j++) {\n if(value[j] === null){\n value[j] = '';\n }\n objectMaxLength[j] =\n key[j].length >= value[j].length\n ? key[j].length+2\n : value[j].length+1;\n if( value[j].length === undefined){\n objectMaxLength[j] = key[j].length+2;\n }\n ColWidth.push({'width': +objectMaxLength[j]});\n }\n }\n worksheet['!cols'] = ColWidth;\n return worksheet;\n}\n\n\nprivate setDataLossReportHeaders (worksheet: XLSX.WorkSheet): XLSX.WorkSheet {\n worksheet.A1.v = \"Loss_Resp\";\n worksheet.B1.v = \"Payment_Asset_DCN\";\n worksheet.C1.v = \"Envelope_Ref\";\n worksheet.D1.v = \"Envelope_Item\";\n worksheet.E1.v = \"Resp_Service ID\";\n worksheet.F1.v = \"Resp_Service Name\";\n worksheet.G1.v = \"Date_Banked\";\n worksheet.H1.v = \"BGC_Batch\";\n worksheet.I1.v = \"Payment_Method\";\n worksheet.J1.v = \"Amount\";\n return worksheet;\n}\n\nprivate setUnprocessedReportHeaders (worksheet: XLSX.WorkSheet): XLSX.WorkSheet {\n worksheet.A1.v = \"Resp_Service ID\";\n worksheet.B1.v = \"Resp_Service Name\";\n worksheet.C1.v = \"Exception_Ref\";\n worksheet.D1.v = \"CCD_Ref\";\n worksheet.E1.v = \"Date_Banked\";\n worksheet.F1.v = \"BGC_Batch\";\n worksheet.G1.v = \"Payment_Asset_DCN\";\n worksheet.H1.v = \"Envelope_Ref\";\n worksheet.I1.v = \"Envelope_Item\";\n worksheet.J1.v = \"Payment_Method\";\n worksheet.K1.v = \"Amount\";\n return worksheet;\n}\n\nprivate setProcessedUnallocatedReportHeaders (worksheet: XLSX.WorkSheet): XLSX.WorkSheet {\n worksheet.A1.v = \"Resp_Service ID\";\n worksheet.B1.v = \"Resp_Service Name\";\n worksheet.C1.v = \"Allocation_Status\";\n worksheet.D1.v = \"Receiving_Office\";\n worksheet.E1.v = \"Allocation_Reason\";\n worksheet.F1.v = \"CCD_Exception_Ref\";\n worksheet.G1.v = \"CCD_Case_Ref\";\n worksheet.H1.v = \"Payment_Asset_DCN\";\n worksheet.I1.v = \"Envelope_Ref\";\n worksheet.J1.v = \"Envelope_Item\";\n worksheet.K1.v = \"Date_Banked\";\n worksheet.L1.v = \"BGC_Batch\";\n worksheet.M1.v = \"Payment_Method\";\n worksheet.N1.v = \"Amount\";\n return worksheet;\n}\n\nprivate setPaymentFailureReportHeaders (worksheet: XLSX.WorkSheet): XLSX.WorkSheet {\n worksheet.A1.v = \"Payment reference\";\n worksheet.B1.v = \"CCD reference\";\n worksheet.C1.v = \"OrgID\";\n worksheet.D1.v = \"Service name\";\n worksheet.E1.v = \"Failure reference\";\n worksheet.F1.v = \"Failure reason\";\n worksheet.G1.v = \"Disputed amount\";\n worksheet.H1.v = \"Event name\";\n worksheet.I1.v = \"Event date\";\n worksheet.J1.v = \"Representment status\";\n worksheet.K1.v = \"Representment date\";\n worksheet.L1.v = \"Refund reference\";\n worksheet.M1.v = \"Refund amount\";\n worksheet.N1.v = \"Refund date\";\n return worksheet;\n}\nprivate setShortFallReportHeaders (worksheet: XLSX.WorkSheet): XLSX.WorkSheet {\n worksheet.A1.v = \"Resp_Service ID\";\n worksheet.B1.v = \"Resp_Service Name\";\n worksheet.C1.v = \"Over Payment_Under Payment\";\n worksheet.D1.v = \"Balance\";\n worksheet.E1.v = \"Payment_Amount\";\n worksheet.F1.v = \"CCD_Case_Ref\";\n worksheet.G1.v = \"Exception_Ref\";\n worksheet.H1.v = \"Processed_Date\";\n worksheet.I1.v = \"Reason\";\n worksheet.J1.v = \"Explanation\";\n worksheet.K1.v = \"Updated Name\";\n return worksheet;\n}\n\nprivate saveAsExcelFile(buffer: any, fileName: string): void {\n const data: Blob = new Blob([buffer], {\n type: EXCEL_TYPE\n });\n FileSaver.saveAs(data, fileName + EXCEL_EXTENSION);\n }\n}\n","import { Component, Input, OnInit } from '@angular/core';\nimport { FormBuilder, FormGroup, FormControl } from '@angular/forms';\nimport { formatDate } from \"@angular/common\";\nimport {IPaymentGroup} from '../../interfaces/IPaymentGroup';\nimport { BulkScaningPaymentService } from '../../services/bulk-scaning-payment/bulk-scaning-payment.service';\nimport { ErrorHandlerService } from '../../services/shared/error-handler.service';\nimport { PaymentViewService } from '../../services/payment-view/payment-view.service';\nimport {XlFileService} from '../../services/xl-file/xl-file.service';\nimport { FindValueSubscriber } from 'rxjs/internal/operators/find';\n\n@Component({\n selector: 'ccpay-reports',\n templateUrl: './reports.component.html',\n styleUrls: ['./reports.component.scss']\n})\nexport class ReportsComponent implements OnInit {\n @Input() ISPAYMENTSTATUSENABLED: string;\n fmt = 'dd/MM/yyyy';\n loc = 'en-US';\n reportsForm: FormGroup;\n startDate: string;\n endDate: string;\n errorMeaagse: string;\n ccdCaseNumber: string;\n isDownLoadButtondisabled:Boolean = false;\n isStartDateLesthanEndDate: Boolean = false;\n isDateBetwnMonth: Boolean = false;\n isDateRangeBetnWeek: Boolean = false;\n errorMessage = this.errorHandlerService.getServerErrorMessage(false, false, '');\n paymentGroups: IPaymentGroup[] = [];\n\n constructor(\n private xlFileService: XlFileService,\n private errorHandlerService: ErrorHandlerService,\n private formBuilder: FormBuilder,\n private bulkScaningPaymentService: BulkScaningPaymentService,\n private paymentViewService: PaymentViewService) { }\n \n\n ngOnInit() {\n this.fromValidation();\n\n }\n\n getToday(): string {\n return new Date().toISOString().split('T')[0];\n }\n\n getSelectedFromDate(): void {\n this.validateDates(this.reportsForm.get('selectedreport').value);\n }\n\n validateDates(reportName){\n const selectedStartDate = this.tranformDate(this.reportsForm.get('startDate').value),\n selectedEndDate = this.tranformDate(this.reportsForm.get('endDate').value);\n const isDateRangeMoreThanWeek = (<any>new Date(selectedStartDate) - <any>new Date(selectedEndDate))/(1000 * 3600 * -24) > 7;\n const isDateRangeMoreThanMonth = (<any>new Date(selectedStartDate) - <any>new Date(selectedEndDate))/(1000 * 3600 * -24) > 30;\n if(new Date(selectedStartDate) > new Date(selectedEndDate) && selectedEndDate !== ''){\n this.reportsForm.get('startDate').setValue('');\n this.isDateRangeBetnWeek = false;\n this.isDateBetwnMonth = false;\n this.isStartDateLesthanEndDate = true;\n } else if(reportName && reportName ==='SURPLUS_AND_SHORTFALL' && isDateRangeMoreThanWeek ) {\n this.isDateRangeBetnWeek = true;\n this.isDateBetwnMonth = false;\n this.isStartDateLesthanEndDate = false;\n } else if(reportName && reportName ==='PAYMENT_FAILURE_EVENT' && isDateRangeMoreThanMonth ) {\n this.isDateRangeBetnWeek = false;\n this.isDateBetwnMonth = true;\n this.isStartDateLesthanEndDate = false;\n } else {\n this.isDateBetwnMonth = false;\n this.isDateRangeBetnWeek = false;\n this.isStartDateLesthanEndDate = false;\n }\n\n }\n\n fromValidation() {\n this.reportsForm = this.formBuilder.group({\n selectedreport: new FormControl('') ,\n startDate: new FormControl(''),\n endDate: new FormControl('') \n });\n}\n\ndownloadReport(){\n this.isDownLoadButtondisabled = true;\n const dataLossRptDefault = [{loss_resp:'',payment_asset_dcn:'',env_ref:'',env_item:'',resp_service_id:'',resp_service_name:'',date_banked:'',bgc_batch:'',payment_method:'',amount:''}],\n unProcessedRptDefault = [{resp_service_id:'',resp_service_name:'',exception_ref:'',ccd_ref:'',date_banked:'',bgc_batch:'',payment_asset_dcn:'',env_ref:'',env_item:'',payment_method:'',amount:''}],\n processedUnallocated =[{resp_service_id:'',resp_service_name:'',allocation_status:'',receiving_office:'',allocation_reason:'',ccd_exception_ref:'',ccd_case_ref:'',payment_asset_dcn:'',env_ref:'',env_item:'',date_banked:'',bgc_batch:'',payment_method:'',amount:'',updated_by:''}],\n shortFallsRptDefault = [{resp_service_id:'',resp_service_name:'',surplus_shortfall:'',balance:'',payment_amount:'',ccd_case_reference:'',ccd_exception_reference:'',processed_date:'', reason:'', explanation:'', user_name:''}],\n selectedReportName = this.reportsForm.get('selectedreport').value,\n selectedStartDate = this.tranformDate(this.reportsForm.get('startDate').value),\n selectedEndDate = this.tranformDate(this.reportsForm.get('endDate').value);\n\n if(selectedReportName === 'PROCESSED_UNALLOCATED' || selectedReportName === 'SURPLUS_AND_SHORTFALL' ){\n this.paymentViewService.downloadSelectedReport(selectedReportName,selectedStartDate,selectedEndDate).subscribe(\n response => {\n this.errorMessage = this.errorHandlerService.getServerErrorMessage(false, false, '');\n const result = JSON.parse(response);\n let res= {data: this.applyDateFormat(result)};\n if(res['data'].length === 0 && selectedReportName === 'PROCESSED_UNALLOCATED' ){\n res.data= processedUnallocated;\n } else if(res['data'].length === 0 && selectedReportName === 'SURPLUS_AND_SHORTFALL' ) {\n res.data= shortFallsRptDefault;\n } \n if(result['data'].length > 0) {\n for( var i=0; i< res['data'].length; i++) {\n if(res['data'][i][\"payment_asset_dcn\"] !== undefined) {\n res['data'][i]['env_ref'] = res['data'][i][\"payment_asset_dcn\"].substr(0,13);\n res['data'][i]['env_item'] = res['data'][i][\"payment_asset_dcn\"].substr(13,21);\n }\n if(res['data'][i][\"amount\"] !== undefined) {\n res['data'][i]['amount'] = this.convertToFloatValue(res['data'][i]['amount']);\n }\n if(res['data'][i][\"balance\"] !== undefined) {\n res['data'][i]['balance'] = this.convertToFloatValue(res['data'][i][\"balance\"]);\n }\n let Op = res['data'][i][\"surplus_shortfall\"];\n if(Op !== undefined) {\n res['data'][i]['surplus_shortfall'] = Op ==\"Surplus\" ? \"Over payment\":\"Under payment\";\n }\n if(res['data'][i][\"payment_amount\"] !== undefined) {\n res['data'][i]['payment_amount'] = this.convertToFloatValue(res['data'][i]['payment_amount']);\n }\n }\n } \n this.isDownLoadButtondisabled = false;\n this.xlFileService.exportAsExcelFile(res['data'], this.getFileName(this.reportsForm.get('selectedreport').value, selectedStartDate, selectedEndDate));\n },\n (error: any) => {\n this.isDownLoadButtondisabled = false;\n this.errorMessage = this.errorHandlerService.getServerErrorMessage(true, false, '');\n })\n\n } else if(selectedReportName === 'PAYMENT_FAILURE_EVENT') {\n\n this.paymentViewService.downloadFailureReport(selectedStartDate,selectedEndDate).subscribe(\n response => {\n this.errorMessage = this.errorHandlerService.getServerErrorMessage(false, false, '');\n const result = {data: JSON.parse(response)['payment_failure_report_list']};\n let res = {data: this.applyDateFormat(result)};\n if (result['data'].length > 0) {\n for ( var i=0; i< res['data'].length; i++) {\n if (res['data'][i][\"disputed_amount\"] !== undefined) {\n res['data'][i]['disputed_amount'] = this.convertToFloatValue(res['data'][i][\"disputed_amount\"]);\n }\n if (res['data'][i][\"representment_status\"] !== undefined) {\n res['data'][i]['representment_status'] = res['data'][i][\"representment_status\"].toLowerCase() === 'yes' ? 'Success' : 'Failure';\n }\n if (res['data'][i]['representment_status'] === undefined) {\n res['data'][i]['representment_status'] = 'No representment received';\n }\n if (res['data'][i]['representment_date'] === undefined) {\n res['data'][i]['representment_date'] = 'N/A';\n }\n if (res['data'][i]['refund_reference'] === undefined) {\n res['data'][i]['refund_reference'] = 'No refund available';\n }\n if (res['data'][i]['refund_amount'] === undefined) {\n res['data'][i]['refund_amount'] = 'N/A';\n }\n if (res['data'][i]['refund_date'] === undefined) {\n res['data'][i]['refund_date'] = 'N/A';\n }\n }\n }\n this.isDownLoadButtondisabled = false;\n this.xlFileService.exportAsExcelFile(res['data'], this.getFileName(this.reportsForm.get('selectedreport').value, selectedStartDate, selectedEndDate ));\n\n },\n (error: any) => {\n this.isDownLoadButtondisabled = false;\n const errorContent = error.replace(/[^a-zA-Z ]/g, '').trim();\n const statusCode = error.replace(/[^a-zA-Z0-9 ]/g, '').trim().split(' ')[0];\n if(statusCode === '404') {\n this.errorMessage = this.errorHandlerService.getServerErrorMessage(true, true, errorContent);\n }else {\n this.errorMessage = this.errorHandlerService.getServerErrorMessage(true, false, '');\n }\n })\n\n } else {\n this.bulkScaningPaymentService.downloadSelectedReport(selectedReportName,selectedStartDate,selectedEndDate).subscribe(\n response => {\n this.errorMessage = this.errorHandlerService.getServerErrorMessage(false, false, '');\n const result = JSON.parse(response);\n let res = {data: this.applyDateFormat(result)};\n if(res['data'].length === 0 && selectedReportName === 'DATA_LOSS' ){\n res.data= dataLossRptDefault;\n } else if(res['data'].length === 0 && selectedReportName === 'UNPROCESSED'){\n res.data = unProcessedRptDefault;\n }\n if(result['data'].length > 0) {\n for( var i=0; i< res['data'].length; i++) {\n if(res['data'][i][\"amount\"] !== undefined) {\n res['data'][i]['amount'] = this.convertToFloatValue(res['data'][i]['amount']);\n }\n if(res['data'][i][\"payment_asset_dcn\"] !== undefined) {\n res['data'][i]['env_ref'] = res['data'][i][\"payment_asset_dcn\"].substr(0,13);\n res['data'][i]['env_item'] = res['data'][i][\"payment_asset_dcn\"].substr(13,21);\n }\n }\n }\n this.isDownLoadButtondisabled = false;\n this.xlFileService.exportAsExcelFile(res['data'], this.getFileName(this.reportsForm.get('selectedreport').value, selectedStartDate, selectedEndDate ));\n },\n (error: any) => {\n this.isDownLoadButtondisabled = false;\n this.errorMessage = this.errorHandlerService.getServerErrorMessage(true, false, '');\n })\n }\n }\n\n getFileName(selectedOption: string, startDate: string, endDate: string ) {\n const loc = 'en-US',\n stDt = formatDate(startDate, 'ddMMyy', loc),\n enDt = formatDate(endDate, 'ddMMyy', loc),\n now = new Date(),\n currentDate = formatDate(now, 'ddMMyy', loc),\n timestamp = `${currentDate}_${this.getTwodigit(now.getHours())}${this.getTwodigit(now.getMinutes())}${this.getTwodigit(now.getSeconds())}`,\n selectedOptionTxt = this.getCamelCaseString(selectedOption);\n \n return selectedOptionTxt+'_'+stDt+'_To_'+enDt+'_Run_'+ timestamp;\n } \n tranformDate(strDate: string) {\n let result = '';\n if (strDate) {\n let parts = strDate.split('-');\n result = `${parts[1]}/${parts[2]}/${parts[0]}`;\n }\n return result;\n }\n getTwodigit(input: number){\n return (\"0\" + input).slice(-2);\n }\n getCamelCaseString(selectedOption) {\n let result;\n switch(selectedOption) { \n case 'UNPROCESSED': { \n result = 'Unprocessed';\n break; \n } \n case 'DATA_LOSS': { \n result = 'Data_Loss';\n break; \n } \n case 'PROCESSED_UNALLOCATED': { \n result = 'Processed_Unallocated';\n break; \n } \n case 'SURPLUS_AND_SHORTFALL': { \n result = 'Over Payment_Under Payment';\n break; \n } \n case 'PAYMENT_FAILURE_EVENT': { \n result = 'Payment failure event';\n break; \n }\n default: { \n result = selectedOption;\n break; \n } \n } \n return result;\n }\n applyDateFormat(res) {\n return res['data'].map(value => {\n if (value['date_banked']) {\n value['date_banked'] = formatDate(value['date_banked'], this.fmt, this.loc);\n }\n if (value['event_date'] && value['event_date'].indexOf(',') === -1) {\n value['event_date'] = formatDate(value['event_date'], this.fmt, this.loc);\n } else if (value['event_date'] && value['event_date'].indexOf(',') !== -1) {\n value['event_date'] = this.multiDateFormater(value['event_date'])\n }\n\n if (value['representment_date'] && value['representment_date'].indexOf(',') === -1) {\n value['representment_date'] = formatDate(value['representment_date'], this.fmt, this.loc);\n } else if (value['representment_date'] && value['representment_date'].indexOf(',') !== -1) {\n value['representment_date'] = this.multiDateFormater(value['representment_date'])\n }\n\n if (value['refund_date'] && value['refund_date'].indexOf(',') === -1) {\n value['refund_date'] = formatDate(value['refund_date'], this.fmt, this.loc);\n } else if (value['refund_date'] && value['refund_date'].indexOf(',') !== -1) {\n value['refund_date'] = this.multiDateFormater(value['refund_date'])\n }\n return value;\n });\n }\n multiDateFormater(dateStr) {\n return dateStr.split(',').map((date) => formatDate(date, this.fmt, this.loc)).join(',');\n }\n \n convertToFloatValue(amt) {\n return amt ? Number.parseFloat(amt).toFixed(2): '0.00';\n }\n}\n","import {Component, ViewChild, Input, ChangeDetectorRef} from '@angular/core';\nimport {PaymentLibComponent} from '../../payment-lib.component';\nimport { MatTableDataSource} from '@angular/material/table';\nimport {MatSort } from '@angular/material/sort';\nimport {Sort } from '@angular/material/sort';\nimport {MatPaginator } from '@angular/material/paginator';\nimport { IRefundList } from '../../interfaces/IRefundList';\nimport { OrderslistService } from '../../services/orderslist.service';\nimport { THIS_EXPR } from '@angular/compiler/src/output/output_ast';\nimport { ActivatedRoute,Router } from '@angular/router';\n@Component({\n selector: 'ccpay-table',\n templateUrl: './table.component.html',\n styleUrls: ['./table.component.css']\n})\nexport class TableComponent {\n @Input('DATASOURCE') DATASOURCE: any[];\n @Input('STATUS') STATUS: string;\n @Input('errorMessage') errorMessage: string;\n isApprovalFlow: boolean;\n // displayedColumns = ['ccdCaseNumber', 'refundReference', 'reason', 'createBy', 'updateDate', 'Action'];\n displayedColumns = ['ccd_case_number', 'refund_reference', 'user_full_name','date_created', 'date_updated', 'Action'];\n \n dataSource: MatTableDataSource<any>;\n userLst;\n actualcount: number;\n count: number;\n refundList: IRefundList[];\n @ViewChild(MatPaginator) paginator: MatPaginator;\n @ViewChild(MatSort) sort: MatSort;\n constructor(\n private paymentLibComponent: PaymentLibComponent,\n private cdRef: ChangeDetectorRef,\n private OrderslistService: OrderslistService,\n private router: Router,\n private activeRoute: ActivatedRoute\n ) {}\n ngOnInit() {\n this.errorMessage = this.errorMessage;\n if(this.STATUS.toLowerCase() === 'sent for approval') {\n this.isApprovalFlow = true;\n } else {\n this.isApprovalFlow = false;\n }\n this.refundList = this.DATASOURCE;\n this.dataSource = new MatTableDataSource(this.refundList);\n this.actualcount = this.dataSource.data.length;\n if( this.refundList !== undefined) {\n this.userLst = this.refundList.reduce((r,{user_full_name}) => (r[user_full_name]='', r) , {});\n this.userLst = Object.keys(this.userLst);\n }\n this.userLst.sort((a, b) => a.toString().localeCompare(b));\n }\n /**\n * Set the paginator and sort after the view init since this component will\n * be able to query its view for the initialized paginator and sort.\n */\n ngAfterViewInit() {\n \n this.dataSource.sort = this.sort;\n\n //const sortState: Sort = {active: 'date_updated', direction: 'desc'};\n // this.sort.active = sortState.active;\n // this.sort.direction = sortState.direction;\n // this.sort.sortChange.emit(sortState);\n this.dataSource.paginator = this.paginator;\n this.dataSource.sort = this.sort;\n this.cdRef.detectChanges();\n }\n applyFilter(filterValue: string) {\n filterValue = filterValue.trim(); // Remove whitespace\n filterValue = filterValue.toLowerCase(); // Datasource defaults to lowercase matches\n this.dataSource.filter = filterValue;\n }\n selectchange(args){\n this.dataSource.filter = args.target.value;\n this.actualcount = this.dataSource.data.length;\n this.dataSource.paginator = this.paginator;\n }\n goToRefundProcessComponent(refundReference: string, refundData: IRefundList ) {\n this.paymentLibComponent.refundlistsource = refundData;\n this.paymentLibComponent.refundReference = refundReference;\n this.paymentLibComponent.viewName = 'process-refund';\n }\n goToRefundViewComponent(refundReference: string, refundData: IRefundList ) {\n this.OrderslistService.setRefundView(refundData);\n this.paymentLibComponent.viewName='refundstatuslist';\n this.paymentLibComponent.CCD_CASE_NUMBER = refundData.ccd_case_number;\n this.paymentLibComponent.isRefundStatusView = true;\n this.paymentLibComponent.isCallFromRefundList = true;\n }\n goToCaseReview(ccdCaseNumber: string, refundData: IRefundList ) {\n this.router.navigate([`/cases/case-details/${ccdCaseNumber}`], {relativeTo: this.activeRoute});\n }\n}","export class IResubmitRefundRequest {\n refund_reason: string;\n amount: number;\n \n \n constructor(refund_reason : string, amount: number) {\n this.refund_reason= refund_reason;\n this.amount = amount;\n \n } \n }\n ","import { Component, OnInit, Input } from '@angular/core';\nimport { RefundsService } from '../../services/refunds/refunds.service';\nimport { FormBuilder, FormGroup, Validators, FormControl, RequiredValidator } from '@angular/forms';\nimport { IRefundList } from '../../interfaces/IRefundList';\nimport { PaymentViewService } from '../../services/payment-view/payment-view.service';\nimport { Router } from '@angular/router';\nimport { OrderslistService } from '../../services/orderslist.service';\nimport { IRefundStatus } from '../../interfaces/IRefundStatus';\nimport { IResubmitRefundRequest } from '../../interfaces/IResubmitRefundRequest';\nimport { PaymentLibComponent } from '../../payment-lib.component';\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() isEliginbleToAccess: boolean;\n refundStatusForm: FormGroup;\n selectedRefundReason: string;\n rejectedRefundList: IRefundList[] = [];\n approvalStatus = 'Sent for approval';\n rejectStatus = 'Update required';\n // approvalStatus = 'sent for approval';\n // rejectStatus = 'sent back';\n errorMessage = null;\n viewName: string;\n refundReason: string;\n refundlist: IRefundList;\n bsPaymentDcnNumber: string;\n isCallFromRefundList: boolean;\n refundButtonState: string = '';\n isAmountEmpty: boolean = false;\n isReasonEmpty: boolean = false;\n amountHasError: boolean = false;\n isRemissionLessThanFeeError: boolean = false;\n refundHasError: boolean = false;\n refundReasons: any[] = [];\n refundStatusHistories: IRefundStatus[];\n refundReference: string;\n refundAmount: string;\n refundCode: string;\n isRefundBtnDisabled: boolean = true;\n oldRefundReason: string;\n refundreason: string;\n navigationpage: string;\n isLastUpdatedByCurrentUser: boolean = true;\n isProcessRefund: boolean = false;\n changedAmount: number;\n constructor(private formBuilder: FormBuilder,\n private refundService: RefundsService,\n private paymentLibComponent: PaymentLibComponent,\n private paymentViewService: PaymentViewService,\n private router: Router,\n private OrderslistService: OrderslistService) { }\n\n ngOnInit() {\n\n // if (this.check4AllowedRoles2AccessRefund()) {\n this.resetRemissionForm([false, false, false, false], 'All');\n this.bsPaymentDcnNumber = this.paymentLibComponent.bspaymentdcn;\n this.isCallFromRefundList = this.paymentLibComponent.isCallFromRefundList;\n // if(this.paymentLibComponent.isFromRefundStatusPage) {\n // this.viewName = 'reviewandsubmitview';\n // }\n if (this.paymentLibComponent.isRefundStatusView) {\n this.viewName = 'refundview';\n this.OrderslistService.getRefundView().subscribe((data) => this.refundlist = data);\n this.OrderslistService.getCCDCaseNumberforRefund.subscribe((data) => this.ccdCaseNumber = data);\n } else {\n this.viewName = 'refundstatuslist';\n if(this.isEliginbleToAccess) {\n this.refundService.getRefundStatusList(this.ccdCaseNumber).subscribe(\n refundList => {\n this.rejectedRefundList = refundList['refund_list'];\n }\n ),\n (error: any) => {\n this.errorMessage = error.replace(/\"/g,\"\");\n };\n } else {\n this.rejectedRefundList = [];\n }\n\n }\n\n\n this.refundStatusForm = this.formBuilder.group({\n amount: new FormControl('', Validators.compose([\n Validators.required,\n Validators.pattern('^[0-9]+(\\.[0-9]{1,2})?$')\n ])),\n refundReason: new FormControl('', Validators.compose([Validators.required])),\n reason: new FormControl()\n });\n\n if(this.refundlist !== undefined) {\n this.getRefundsStatusHistoryList();\n\n if (this.LOGGEDINUSERROLES.some(i => i.includes('payments-refund-approver'))) {\n this.isProcessRefund = true;\n this.refundButtonState = this.refundlist.refund_status.name;\n return;\n }\n\n if (this.LOGGEDINUSERROLES.some(i => i.includes('payments-refund'))) {\n this.isProcessRefund = false;\n this.refundButtonState = this.refundlist.refund_status.name;\n }\n }\n //}\n }\n\n 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 goToRefundView(refundlist: IRefundList, navigationpage: string) {\n this.OrderslistService.setRefundView(refundlist);\n this.OrderslistService.setCCDCaseNumber(this.ccdCaseNumber);\n this.paymentLibComponent.viewName = 'refundstatuslist';\n this.paymentLibComponent.isRefundStatusView = true;\n this.refundlist = refundlist;\n this.OrderslistService.setnavigationPage(navigationpage);\n }\n\n loadCaseTransactionPage() {\n this.OrderslistService.setnavigationPage('casetransactions');\n this.OrderslistService.setisFromServiceRequestPage(false);\n this.paymentLibComponent.viewName = 'case-transactions';\n this.paymentLibComponent.ISBSENABLE = true;\n this.paymentLibComponent.isRefundStatusView = false;\n }\n\n loadRefundListPage() {\n this.OrderslistService.getnavigationPageValue().subscribe((data) => this.navigationpage = data);\n if (this.navigationpage === 'casetransactions') {\n this.loadCaseTransactionPage();\n } else {\n this.paymentLibComponent.viewName = 'refund-list';\n }\n }\n\n gotoReviewDetailsPage(event:any) {\n // event.preventDefault();\n this.errorMessage = false;\n this.paymentLibComponent.isRefundStatusView = true;\n this.ngOnInit();\n }\n\n gotoReviewAndReSubmitPage() {\n this.viewName = 'reviewandsubmitview';\n this.oldRefundReason = this.refundlist.reason;\n this.changedAmount = this.refundlist.amount;\n this.refundreason = this.refundStatusHistories.filter(data => data.status.toLowerCase() === 'update required')[0].notes;\n this.refundService.getRefundReasons().subscribe(\n refundReasons => {\n this.refundReasons = refundReasons;\n });\n }\n gotoRefundReasonPage() {\n this.isRefundBtnDisabled = false;\n this.paymentLibComponent.REFUNDLIST = \"true\";\n this.paymentLibComponent.isFromRefundStatusPage = true;\n this.ccdCaseNumber = this.paymentLibComponent.CCD_CASE_NUMBER;\n this.errorMessage = false;\n this.viewName = 'issuerefund';\n }\n\n gotoAmountPage() {\n this.errorMessage = false;\n this.paymentLibComponent.REFUNDLIST = \"true\";\n this.isRefundBtnDisabled = false;\n this.ccdCaseNumber = this.paymentLibComponent.CCD_CASE_NUMBER;\n this.paymentLibComponent.isFromRefundStatusPage = true;\n this.viewName = 'processretroremissonpage';\n }\n\n goToReviewAndSubmitView() {\n const remissionctrls = this.refundStatusForm.controls\n if (this.refundStatusForm.dirty) {\n if (remissionctrls['amount'].value == '') {\n this.resetRemissionForm([true, false, false, false], 'amount');\n }\n else if (remissionctrls['amount'].value != '' && remissionctrls['amount'].invalid) {\n this.resetRemissionForm([false, true, false, false], 'amount');\n }\n else if (remissionctrls['reason'].value == '') {\n this.resetRemissionForm([false, false, false, true], 'reason');\n } else {\n this.refundlist.reason = remissionctrls['reason'].value;\n this.viewName = 'reviewandsubmitview';\n }\n }\n\n }\n\n resetRemissionForm(val, field) {\n if (field === 'All') {\n this.isAmountEmpty = val[0];\n this.amountHasError = val[1];\n this.isRemissionLessThanFeeError = val[2];\n this.isReasonEmpty = val[3];\n } else if (field === 'amount' || field === 'All') {\n this.isAmountEmpty = val[0];\n this.amountHasError = val[1];\n this.isRemissionLessThanFeeError = val[2];\n } else if (field === 'reason' || field === 'All') {\n this.isReasonEmpty = val[3];\n }\n }\n\n selectRadioButton(key, value) {\n this.refundHasError = false;\n this.selectedRefundReason = key;\n if (key === 'Other') {\n this.refundHasError = false;\n this.refundReason = key;\n }\n }\n\n getRefundListReason(refundListReason: any) {\n if (this.paymentLibComponent.isFromRefundStatusPage && !this.paymentLibComponent.iscancelClicked) {\n this.refundlist.reason = refundListReason.reason;\n this.refundCode = refundListReason.code;\n } else {\n this.isRefundBtnDisabled = true;\n }\n this.viewName = 'reviewandsubmitview';\n this.paymentLibComponent.CCD_CASE_NUMBER = this.ccdCaseNumber;\n }\n\n getRefundAmount(amount: number) {\n if (this.paymentLibComponent.isFromRefundStatusPage && !this.paymentLibComponent.iscancelClicked) {\n if (amount > 0) {\n this.changedAmount = amount;\n // this.refundlist.amount = amount;\n }\n } else {\n this.isRefundBtnDisabled = true;\n }\n this.viewName = 'reviewandsubmitview';\n this.paymentLibComponent.CCD_CASE_NUMBER = this.ccdCaseNumber;\n }\n\n gotoReviewRefundConfirmationPage() {\n if (this.oldRefundReason === this.refundlist.reason) {\n this.refundCode = '';\n }\n const resubmitRequest = new IResubmitRefundRequest(this.refundCode, this.changedAmount);\n this.refundService.patchResubmitRefund(resubmitRequest, this.refundlist.refund_reference).subscribe(\n response => {\n if (JSON.parse(response)) {\n this.refundReference = JSON.parse(response).refund_reference;\n this.refundAmount = JSON.parse(response).refund_amount;\n this.viewName = 'reviewrefundconfirmationpage';\n }\n },\n (error: any) => {\n this.errorMessage = error.replace(/\"/g,\"\");\n }\n );\n\n }\n\n goToRefundProcessComponent(refundReference: string, refundList: IRefundList) {\n this.paymentLibComponent.refundlistsource = refundList;\n this.paymentLibComponent.refundReference = refundReference;\n this.paymentLibComponent.viewName = 'process-refund';\n }\n\n}\n","import { THIS_EXPR } from '@angular/compiler/src/output/output_ast';\nimport { Component, Input, OnInit, Output, EventEmitter } from '@angular/core';\nimport { PaymentLibComponent } from '../../payment-lib.component';\nimport { IPayment } from '../../interfaces/IPayment';\nimport { IRemission } from '../../interfaces/IRemission';\nimport { IPaymentView } from '../../interfaces/IPaymentView';\nimport { IOrderReferenceFee } from '../../interfaces/IOrderReferenceFee';\nimport { IFee } from '../../interfaces/IFee';\nimport { IPaymentGroup } from '../../interfaces/IPaymentGroup';\nimport { Router } from '@angular/router';\nimport { PaymentViewService } from '../../services/payment-view/payment-view.service';\nimport { OrderslistService } from '../../services/orderslist.service';\n\n@Component({\n selector: 'ccpay-service-request',\n templateUrl: './service-request.component.html',\n styleUrls: ['./service-request.component.css']\n})\nexport class ServiceRequestComponent implements OnInit {\n @Input('LOGGEDINUSERROLES') LOGGEDINUSERROLES: string[];\n @Input('viewStatus') viewStatus: string;\n @Input('orderDetail') orderDetail: any[];\n @Input('orderRef') orderRef: string;\n @Input('orderStatus') orderStatus: string;\n @Input('orderParty') orderParty: string;\n @Input('orderCreated') orderCreated: Date;\n @Input('orderCCDEvent') orderCCDEvent: string;\n @Input('orderFeesTotal') orderFeesTotal: number;\n @Input('orderTotalPayments') orderTotalPayments: number;\n @Input('orderRemissionTotal') orderRemissionTotal: number;\n @Input('takePayment') takePayment: boolean;\n @Input('ccdCaseNumber') ccdCaseNumber: boolean;\n @Input(\"isServiceRequest\") isServiceRequest: string;\n @Output() goToServiceRquestComponent: EventEmitter<any> = new EventEmitter();\n\n\n servicerequest: string;\n // ccdCaseNumber: string;\n excReference: string;\n paymentGroups: any[] = [];\n payments: IPayment[] = [];\n nonPayments: IPayment[] = [];\n allPayments: IPayment[] = [];\n remissions: IRemission[] = [];\n fees: IFee[] = [];\n errorMessage: string;\n totalFees: number;\n totalPayments: number;\n totalNonOffPayments: number;\n totalRemissions: number;\n selectedOption: string;\n dcnNumber: string;\n paymentRef: string;\n isTurnOff: boolean;\n isRefundRemission: boolean = true;\n isStrategicFixEnable: boolean;\n isAddFeeBtnEnabled: boolean = true;\n isExceptionRecord: boolean = false;\n isUnprocessedRecordSelected: boolean = false;\n exceptionRecordReference: string;\n isAnyFeeGroupAvilable: boolean = true;\n isHistoricGroupAvailable: boolean = false;\n isBulkScanEnable;\n isRemissionsMatch: boolean;\n isRemoveBtnDisabled: boolean = false;\n feeId: IFee;\n clAmountDue: number = 0;\n unprocessedRecordCount: number;\n isFeeRecordsExist: boolean = false;\n isGrpOutstandingAmtPositive: boolean = false;\n totalRefundAmount: Number;\n caseType: String;\n // lsCcdNumber: any = ls.get<any>('ccdNumber');\n payment: IPayment;\n paymentGroup: IPaymentGroup;\n paymentView: IPaymentView;\n\n\n isAddRemissionEnable: boolean = false;\n orderRemissionDetails: any[] = [];\n orderLevelFees: IOrderReferenceFee[] = [];\n cpoDetails: any = null;\n serviceRequestValue: string;\n orderAddBtnEnable: boolean;\n\n isCPODown: boolean;\n test: boolean;\n isPBA: boolean = false;\n isIssueRefunfBtnEnable: boolean = false;\n isAddRemissionBtnEnabled: boolean = false;\n isRefundRemissionBtnEnable: boolean = false;\n allowedRolesToAccessRefund = ['payments-refund-approver', 'payments-refund'];\n isFromServiceRequestPage: boolean;\n navigationpage: string;\n remissionFeeAmt: number;\n\n constructor(\n private paymentLibComponent: PaymentLibComponent,\n private paymentViewService: PaymentViewService,\n private OrderslistService: OrderslistService,\n private router: Router) { }\n\n ngOnInit() {\n if (this.viewStatus === undefined) {\n this.viewStatus = this.paymentLibComponent.viewName;\n }\n if(this.paymentLibComponent.isFromServiceRequestPage && this.paymentLibComponent.isFromPaymentDetailPage) {\n if(this.paymentLibComponent.isFromPaymentDetailPage && this.paymentLibComponent.isFromServiceRequestPage) {\n this.OrderslistService.getorderRefs().subscribe((data) => this.orderRef = data);\n this.OrderslistService.getorderCCDEvents().subscribe((data) => this.orderCCDEvent = data);\n this.OrderslistService.getorderCreateds().subscribe((data) => this.orderCreated = data);\n this.OrderslistService.getorderDetail().subscribe((data) => this.orderDetail = data);\n this.OrderslistService.getorderPartys().subscribe((data) => this.orderParty = data);\n this.OrderslistService.getorderRemissionTotals().subscribe((data) => this.orderRemissionTotal = data);\n this.OrderslistService.getorderFeesTotals().subscribe((data) => this.orderFeesTotal = data);\n this.OrderslistService.getoorderTotalPaymentss().subscribe((data) => this.orderTotalPayments = data);\n }\n }\n // if (this.takePayment) {\n // this.paymentLibComponent.TAKEPAYMENT = this.takePayment;\n // }\n }\n goToServiceRequestPage() {\n this.goToServiceRquestComponent.emit();\n }\n\n goToCaseTransationPage(event: any) {\n event.preventDefault();\n this.OrderslistService.setnavigationPage('servicerequestpage');\n this.OrderslistService.setisFromServiceRequestPage(false);\n this.paymentLibComponent.viewName = 'case-transactions';\n this.paymentLibComponent.ISBSENABLE = true;\n this.paymentLibComponent.isTakePayment = this.paymentLibComponent.TAKEPAYMENT;\n if (this.takePayment) {\n this.paymentLibComponent.isTakePayment = this.takePayment;\n }\n this.paymentLibComponent.SERVICEREQUEST = \"true\";\n this.paymentLibComponent.isFromServiceRequestPage = false;\n if(this.isServiceRequest !== 'false') {\n this.paymentLibComponent.isFromServiceRequestPage = true;\n }\n this.paymentLibComponent.isFromRefundStatusPage = false;\n this.paymentLibComponent.viewName = 'case-transactions';\n this.resetOrderData();\n let partUrl = this.paymentLibComponent.ISBSENABLE ? '&isBulkScanning=Enable' : '&isBulkScanning=Disable';\n partUrl += this.paymentLibComponent.ISTURNOFF ? '&isTurnOff=Enable' : '&isTurnOff=Disable';\n if(this.isServiceRequest === 'false') {\n partUrl += this.paymentLibComponent.TAKEPAYMENT ? '&takePayment=true' : '&takePayment=false';\n }\n partUrl += this.isStrategicFixEnable ? '&isStFixEnable=Enable' : '&isStFixEnable=Disable';\n partUrl += this.isServiceRequest !== 'false' ? '&servicerequest=true' : '&servicerequest=false';\n partUrl += `&caseType=${this.paymentLibComponent.CASETYPE}`;\n const url = `/payment-history/${this.paymentLibComponent.CCD_CASE_NUMBER}?view=case-transactions&selectedOption=${this.paymentLibComponent.SELECTED_OPTION}${partUrl}`;\n this.router.routeReuseStrategy.shouldReuseRoute = () => false;\n this.router.onSameUrlNavigation = 'reload';\n this.router.navigateByUrl(url);\n }\n\n chkForAddRemission(feeCode: string): boolean {\n if (this.chkForPBAPayment() && this.check4AllowedRoles2AccessRefund()) {\n if (this.orderDetail[0]['remissions'].length > 0) {\n for (const remission of this.orderDetail[0]['remissions']) {\n if (remission.fee_code === feeCode) {\n return false;\n }\n }\n }\n return true;\n } else {\n return false;\n }\n }\n\n chkForPBAPayment(): boolean {\n if (this.orderDetail !== null && this.orderDetail !== undefined) {\n this.orderDetail.forEach(orderDetail => {\n if (orderDetail.payments) {\n orderDetail.payments.forEach(payment => {\n if (payment.method.toLocaleLowerCase() === 'payment by account' && this.allowFurtherAccessAfter4Days(payment)) {\n this.paymentLibComponent.paymentReference = payment.reference;\n this.isPBA = true;\n }\n });\n }\n });\n if (this.isPBA) {\n return true;\n } else {\n return false;\n };\n }\n }\n\n addRemission(fee: IFee) {\n if(this.chkForAddRemission(fee.code)) {\n this.feeId = fee;\n this.viewStatus = 'addremission';\n this.payment = this.orderDetail[0].payments[0];\n this.paymentViewService.getApportionPaymentDetails(this.orderDetail[0].payments[0].reference).subscribe(\n paymentGroup => {\n this.paymentGroup = paymentGroup;\n\n this.paymentGroup.payments = this.paymentGroup.payments.filter\n (paymentGroupObj => paymentGroupObj['reference'].includes(this.paymentLibComponent.paymentReference));\n this.payment = this.paymentGroup.payments[0];\n // const paymentAllocation = this.paymentGroup.payments[0].payment_allocation;\n // this.isStatusAllocated = paymentAllocation.length > 0 && paymentAllocation[0].allocation_status === 'Allocated' || paymentAllocation.length === 0;\n },\n (error: any) => this.errorMessage = error.replace(/\"/g,\"\")\n );\n }\n }\n\n addRefundForRemission(payment: IPayment, remission: IRemission[],fees:any) {\n this.viewStatus = 'addrefundforremission';\n\n this.payment = payment;\n this.paymentViewService.getApportionPaymentDetails(this.payment.reference).subscribe(\n paymentGroup => {\n this.paymentGroup = paymentGroup;\n\n this.paymentGroup.payments = this.paymentGroup.payments.filter\n (paymentGroupObj => paymentGroupObj['reference'].includes(this.payment.reference));\n this.payment = this.paymentGroup.payments[0];\n this.remissions = remission;\n this.remissionFeeAmt = fees.filter(data=>data.code === this.remissions['fee_code'])[0].net_amount;\n // const paymentAllocation = this.paymentGroup.payments[0].payment_allocation;\n // this.isStatusAllocated = paymentAllocation.length > 0 && paymentAllocation[0].allocation_status === 'Allocated' || paymentAllocation.length === 0;\n },\n (error: any) => this.errorMessage = error\n );\n }\n cancelRemoval() {\n this.viewStatus = 'main';\n }\n\n removeFee(fee: any) {\n this.isRemoveBtnDisabled = true;\n this.paymentViewService.deleteFeeFromPaymentGroup(fee).subscribe(\n (success: any) => {\n window.location.reload();\n },\n (error: any) => {\n this.errorMessage = error;\n this.isRemoveBtnDisabled = false;\n }\n );\n }\n\n\n chkIssueRefundBtnEnable(payment: IPayment): boolean {\n if (this.check4AllowedRoles2AccessRefund() && this.allowFurtherAccessAfter4Days(payment) &&\n payment.method === 'payment by account' && payment.status.toLocaleLowerCase() === 'success') {\n this.isIssueRefunfBtnEnable = true;\n }\n if (this.isIssueRefunfBtnEnable) {\n return true;\n } else {\n return false;\n };\n }\n\n chkIsRefundRemissionBtnEnable(): boolean {\n if (this.orderDetail !== null && this.orderDetail !== undefined) {\n this.paymentLibComponent.isFromServiceRequestPage = true;\n this.orderDetail.forEach(orderDetail => {\n if (orderDetail.payments) {\n orderDetail.payments.forEach(payment => {\n if (payment.method.toLocaleLowerCase() === 'payment by account' && payment.status.toLocaleLowerCase() === 'success' && this.allowFurtherAccessAfter4Days(payment)) {\n this.isRefundRemissionBtnEnable = true;\n }\n });\n }\n });\n if (this.isRefundRemissionBtnEnable) {\n return true;\n } else {\n return false;\n };\n }\n }\n\n check4AllowedRoles2AccessRefund = (): boolean => {\n return this.allowedRolesToAccessRefund.some(role =>\n this.LOGGEDINUSERROLES.indexOf(role) !== -1\n );\n }\n\n allowFurtherAccessAfter4Days = (payment: IPayment): boolean => {\n if (payment !== null && payment !== undefined) {\n let tmp4DayAgo = new Date();\n tmp4DayAgo.setDate(tmp4DayAgo.getDate() - 4);\n return tmp4DayAgo >= new Date(payment.date_created);\n }\n }\n\n issueRefund(payment: IPayment) {\n if (payment !== null && payment !== undefined) {\n if(this.chkIssueRefundBtnEnable(payment)) {\n this.viewStatus = 'issuerefund';\n this.payment = payment;\n this.paymentLibComponent.isFromServiceRequestPage = true;\n this.isRefundRemission = true;\n }\n }\n }\n\n goToPayementView(paymentGroupReference: string, paymentReference: string, paymentMethod: string) {\n this.goToPaymentViewComponent({ paymentGroupReference, paymentReference, paymentMethod });\n }\n\n goToPaymentViewComponent(paymentGroup: any) {\n this.paymentLibComponent.paymentMethod = paymentGroup.paymentMethod;\n this.paymentLibComponent.isFromServiceRequestPage = true;\n this.paymentLibComponent.paymentGroupReference = paymentGroup.paymentGroupReference;\n this.paymentLibComponent.paymentReference = paymentGroup.paymentReference;\n this.OrderslistService.setOrderRef(this.orderRef);\n this.OrderslistService.setorderCCDEvent(this.orderCCDEvent);\n this.OrderslistService.setorderCreated(this.orderCreated);\n this.OrderslistService.setorderDetail(this.orderDetail);\n this.OrderslistService.setorderParty(this.orderParty);\n this.OrderslistService.setorderTotalPayments(this.orderTotalPayments);\n this.OrderslistService.setorderRemissionTotal(this.orderRemissionTotal);\n this.OrderslistService.setorderFeesTotal(this.orderFeesTotal);\n this.viewStatus = 'payment-view';\n }\n\n resetOrderData() {\n this.OrderslistService.setOrderRef(null);\n this.OrderslistService.setorderCCDEvent(null);\n this.OrderslistService.setorderCreated(null);\n this.OrderslistService.setorderDetail(null);\n this.OrderslistService.setorderParty(null);\n this.OrderslistService.setorderTotalPayments(null);\n this.OrderslistService.setorderRemissionTotal(null);\n this.OrderslistService.setorderFeesTotal(null);\n }\n}\n","export class IserviceRequestCardPayment {\n amount: string\n currency: string\n language: string\n \n constructor(amount : string) {\n this.amount = amount;\n this.currency = 'GBP';\n this.language = 'string';\n } \n}\n ","export class IserviceRequestPbaPayment {\n account_number: string;\n amount: string\n currency: string\n customer_reference: string\n organisation_name: string\n \n constructor(account_number : string, amount : string, customer_reference: string, orgName: string) {\n this.account_number = account_number;\n this.amount = amount;\n this.currency = 'GBP';\n this.customer_reference = customer_reference;\n this.organisation_name = orgName;\n } \n}\n ","import { Component, OnInit, Input} from '@angular/core';\nimport { PaymentViewService } from '../../services/payment-view/payment-view.service';\nimport { PaymentLibComponent } from '../../payment-lib.component';\nimport { IserviceRequestCardPayment } from '../../interfaces/IserviceRequestCardPayment';\nimport { IserviceRequestPbaPayment } from '../../interfaces/IserviceRequestPbaPayment';\n\nconst BS_ENABLE_FLAG = 'bulk-scan-enabling-fe';\n\n@Component({\n selector: 'ccpay-pba-payment',\n templateUrl: './pba-payment.component.html',\n styleUrls: ['./pba-payment.component.scss']\n})\nexport class PbaPaymentComponent implements OnInit {\n @Input() pbaPayOrderRef: any;\n viewStatus: string;\n pbaAccountList: string[];\n isPBAAccountHold: boolean = false;\n errorMsg: any;\n isCardPaymentSuccess: boolean = true;\n isInSufficiantFund: boolean = false;\n isPBAAccountNotExist: boolean = false;\n isPBAServerError: boolean = false;\n isGetPBAAccountSucceed: boolean = false;\n selectedPbaAccount: string = '';\n pbaAccountRef: string = '';\n isPbaAccountSelected: boolean = false;\n isCardPaymentSelected: boolean = false;\n isPBADropdownSelected: boolean = false;\n isContinueButtondisabled: boolean = true;\n isPBAAccountPaymentSuccess: boolean = false;\n pbaAccountrPaymentResult: any;\n orgName: string = '';\n\n constructor(private paymentLibComponent: PaymentLibComponent,\n private paymentViewService: PaymentViewService) {}\n\n ngOnInit() {\n this.pbaPayOrderRef = this.paymentLibComponent.pbaPayOrderRef;\n this.viewStatus = 'pba-payment';\n this.errorMsg = null;\n this.paymentViewService.getPBAaccountDetails()\n .subscribe(\n result => {\n this.isGetPBAAccountSucceed = true;\n this.orgName = result.organisationEntityResponse.name;\n this.pbaAccountList = result.organisationEntityResponse.paymentAccount;\n },\n error => {\n this.errorMsg = error;\n }\n );\n\n }\n selectpbaaccount(args) {\n if(args.currentTarget.id === 'pbaAccountNumber') {\n this.isPBADropdownSelected = true;\n this.selectedPbaAccount = args.target.value; \n }\n if(args.currentTarget.id === 'pbaAccountRef') {\n this.pbaAccountRef = args.target.value; \n }\n if(this.selectedPbaAccount !== '' && this.pbaAccountRef !== \"\") {\n this.isContinueButtondisabled = false;\n } else {\n this.isContinueButtondisabled = true;\n }\n }\n\n saveAndContinue() {\n\n if(this.isPbaAccountSelected) {\n this.isInSufficiantFund = false;\n this.isPBAAccountNotExist = false;\n this.isPBAServerError = false;\n this.isPBAAccountPaymentSuccess = false;\n if ( this.pbaAccountList.indexOf(this.selectedPbaAccount) !== -1 ) {\n const requestBody = new IserviceRequestPbaPayment(\n this.selectedPbaAccount, this.pbaPayOrderRef.orderTotalFees, this.pbaAccountRef, this.orgName);\n this.paymentViewService.postPBAaccountPayment(this.pbaPayOrderRef.orderRefId, requestBody)\n .subscribe(\n r => {\n try {\n this.pbaAccountrPaymentResult = JSON.parse(r);\n } catch(e) {\n this.pbaAccountrPaymentResult = r;\n }\n this.isPBAAccountPaymentSuccess = true;\n },\n e => {\n if(e.status == '402') {\n this.isInSufficiantFund = true; \n } else if(e.status == '410') {\n this.isPBAAccountNotExist = true;\n } else if(e.status == '412') {\n this.isPBAAccountHold = true;\n } else {\n this.isPBAServerError = true;\n }\n }\n );\n } else {\n this.isPBAServerError = true;\n }\n } else if (this.isCardPaymentSelected) {\n this.cardPayment();\n }\n\n }\n cardPayment() {\n this.isCardPaymentSuccess = true;\n const requestBody = new IserviceRequestCardPayment (\n this.pbaPayOrderRef.orderTotalFees);\n this.paymentViewService.postWays2PayCardPayment(this.pbaPayOrderRef.orderRefId, requestBody)\n .subscribe(\n result => {\n const paymentUrl = JSON.parse(result).next_url;\n window.location.href = paymentUrl;\n },\n error => {\n this.isCardPaymentSuccess = false;\n }\n );\n\n }\n selectPaymentMethod(type: string) {\n if(type === 'PBA') {\n this.isPbaAccountSelected = true;\n this.isCardPaymentSelected = false;\n this.isPBADropdownSelected = false\n this.isContinueButtondisabled = true;\n this.selectedPbaAccount = null;\n } else if (type === 'CARD') {\n this.isPbaAccountSelected = false;\n this.isCardPaymentSelected = true;\n this.isPBADropdownSelected = false\n this.isContinueButtondisabled = false;\n }\n }\n gotoCasetransationPage() {\n this.paymentLibComponent.viewName = 'case-transactions';\n this.paymentLibComponent.TAKEPAYMENT = false;\n this.paymentLibComponent.ISBSENABLE = true;\n this.paymentLibComponent.isFromServiceRequestPage = true;\n }\n}\n","import { NgModule } from '@angular/core';\nimport { HttpClientModule } from '@angular/common/http';\nimport { CommonModule } from '@angular/common';\n\nimport { PaymentListComponent } from './components/payment-list/payment-list.component';\nimport { PaymentViewComponent } from './components/payment-view/payment-view.component';\nimport { ProcessRefundComponent } from './components/process-refund/process-refund.component';\nimport { RefundListComponent } from './components/refund-list/refund-list.component';\n\nimport { CardDetailsComponent } from './components/card-details/card-details.component';\nimport { PageNotFoundComponent } from './components/page-not-found.component';\nimport { PaymentLibComponent } from './payment-lib.component';\nimport { StatusHistoryComponent } from './components/status-history/status-history.component';\nimport { PbaDetailsComponent } from './components/pba-details/pba-details.component';\nimport { LoggerService } from './services/shared/logger/logger.service';\nimport { ConsoleLoggerService } from './services/shared/logger/console-logger.service';\nimport { WebComponentHttpClient } from './services/shared/httpclient/webcomponent.http.client';\nimport { CaseTransactionsComponent } from './components/case-transactions/case-transactions.component';\nimport { FeeSummaryComponent } from './components/fee-summary/fee-summary.component';\nimport { ErrorBannerComponent } from './components/error-banner/error-banner.component';\nimport { MarkUnidentifiedPaymentComponent } from './components/mark-unidentified-payment/mark-unidentified-payment.component';\nimport { MarkUnsolicitedPaymentComponent } from './components/mark-unsolicited-payment/mark-unsolicited-payment.component';\nimport { UnprocessedPaymentsComponent } from './components/unprocessed-payments/unprocessed-payments.component';\nimport { ProcessedPaymentsComponent } from './components/processed-payments/processed-payments.component';\nimport { AllocatePaymentsComponent } from './components/allocate-payments/allocate-payments.component';\nimport { AddRemissionComponent } from './components/add-remission/add-remission.component';\nimport { FormsModule, ReactiveFormsModule } from '@angular/forms';\nimport { CcdHyphensPipe } from './pipes/ccd-hyphens.pipe';\nimport { CapitalizePipe } from './pipes/capitalize.pipe';\nimport { keyValuePipe } from './pipes/key-value.pipe';\nimport { SanitizeHtmlPipe } from './pipes/sanitize-html.pipe';\nimport { ReportsComponent } from './components/reports/reports.component';\nimport { XlFileService } from './services/xl-file/xl-file.service';\nimport { TableComponent } from './components/table/table.component';\nimport { MatTableModule } from '@angular/material/table';\nimport { MatPaginatorModule } from '@angular/material/paginator';\nimport { MatSortModule } from '@angular/material/sort';\nimport { MatFormFieldModule } from '@angular/material/form-field';\nimport { MatInputModule } from '@angular/material/input';\n// import { BrowserAnimationsModule } from '@angular/platform-browser/animations';\n// import { NoopAnimationsModule } from '@angular/platform-browser/animations';\nimport { RefundStatusComponent } from './components/refund-status/refund-status.component';\nimport { ServiceRequestComponent } from './components/service-request/service-request.component';\nimport { PbaPaymentComponent } from './components/pba-payment/pba-payment.component';\n\n@NgModule({\n imports: [\n CommonModule,\n HttpClientModule,\n FormsModule,\n ReactiveFormsModule,\n MatTableModule,\n MatPaginatorModule,\n MatSortModule,\n MatFormFieldModule,\n MatInputModule,\n // BrowserAnimationsModule,\n // NoopAnimationsModule\n ],\n declarations: [\n PaymentLibComponent,\n PaymentListComponent,\n PaymentViewComponent,\n PbaPaymentComponent,\n ProcessRefundComponent,\n RefundListComponent,\n CardDetailsComponent,\n PageNotFoundComponent,\n StatusHistoryComponent,\n MarkUnidentifiedPaymentComponent,\n MarkUnsolicitedPaymentComponent,\n UnprocessedPaymentsComponent,\n ProcessedPaymentsComponent,\n AllocatePaymentsComponent,\n PbaDetailsComponent,\n CaseTransactionsComponent,\n FeeSummaryComponent,\n AddRemissionComponent,\n CcdHyphensPipe,\n CapitalizePipe,\n keyValuePipe,\n SanitizeHtmlPipe,\n ReportsComponent,\n ErrorBannerComponent,\n TableComponent,\n RefundStatusComponent,\n ServiceRequestComponent\n ],\n exports: [PaymentLibComponent],\n providers: [\n { provide: LoggerService, useClass: ConsoleLoggerService },\n XlFileService,\n WebComponentHttpClient\n ]\n})\n\nexport class PaymentLibModule { }\n"],"names":["Injectable","BehaviorSubject","ChangeDetectorRef","Component","Input","_throw","catchError","HttpClient","HttpHeaders","Meta","FormControl","Validators","FormBuilder","Router","ActivatedRoute","noop","BS_ENABLE_FLAG","Location","EventEmitter","Output","Pipe","DomSanitizer","XLSX.utils","XLSX.write","FileSaver.saveAs","formatDate","MatTableDataSource","ViewChild","MatPaginator","MatSort","NgModule","CommonModule","HttpClientModule","FormsModule","ReactiveFormsModule","MatTableModule","MatPaginatorModule","MatSortModule","MatFormFieldModule","MatInputModule"],"mappings":";;;;;;IAAA;IACA;AACA;IACA;IACA;AACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;AACA;IACA,IAAI,aAAa,GAAG,SAAS,CAAC,EAAE,CAAC,EAAE;IACnC,IAAI,aAAa,GAAG,MAAM,CAAC,cAAc;IACzC,SAAS,EAAE,SAAS,EAAE,EAAE,EAAE,YAAY,KAAK,IAAI,UAAU,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,SAAS,GAAG,CAAC,CAAC,EAAE,CAAC;IACpF,QAAQ,UAAU,CAAC,EAAE,CAAC,EAAE,EAAE,KAAK,IAAI,CAAC,IAAI,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AChB,oBAAoB;4BACpB,cAAc;4BACd,qBAAqB;4BACrB,uBAAuB;yBACxB;wBACD,OAAO,EAAE,CAAC,mBAAmB,CAAC;wBAC9B,SAAS,EAAE;4BACT,EAAE,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,oBAAoB,EAAE;4BAC1D,aAAa;4BACb,sBAAsB;yBACvB;qBACF;;QAE+B,uBAAC;KAnDjC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"hmcts-ccpay-web-component.umd.js","sources":["../../../node_modules/tslib/tslib.es6.js","ng://@hmcts/ccpay-web-component/lib/payment-lib.service.ts","ng://@hmcts/ccpay-web-component/lib/services/orderslist.service.ts","ng://@hmcts/ccpay-web-component/lib/payment-lib.component.ts","ng://@hmcts/ccpay-web-component/lib/services/shared/error-handler.service.ts","ng://@hmcts/ccpay-web-component/lib/services/shared/logger/logger.service.ts","ng://@hmcts/ccpay-web-component/lib/services/payment-list/payment-list.service.ts","ng://@hmcts/ccpay-web-component/lib/components/payment-list/payment-list.component.ts","ng://@hmcts/ccpay-web-component/lib/services/shared/httpclient/webcomponent.http.client.ts","ng://@hmcts/ccpay-web-component/lib/services/payment-view/payment-view.service.ts","ng://@hmcts/ccpay-web-component/lib/components/payment-view/payment-view.component.ts","ng://@hmcts/ccpay-web-component/lib/services/refunds/refunds.service.ts","ng://@hmcts/ccpay-web-component/lib/components/process-refund/process-refund.component.ts","ng://@hmcts/ccpay-web-component/lib/components/refund-list/refund-list.component.ts","ng://@hmcts/ccpay-web-component/lib/services/card-details/card-details.service.ts","ng://@hmcts/ccpay-web-component/lib/components/card-details/card-details.component.ts","ng://@hmcts/ccpay-web-component/lib/components/page-not-found.component.ts","ng://@hmcts/ccpay-web-component/lib/services/status-history/status-history.service.ts","ng://@hmcts/ccpay-web-component/lib/components/status-history/status-history.component.ts","ng://@hmcts/ccpay-web-component/lib/components/pba-details/pba-details.component.ts","ng://@hmcts/ccpay-web-component/lib/services/shared/logger/console-logger.service.ts","ng://@hmcts/ccpay-web-component/lib/services/case-transactions/case-transactions.service.ts","ng://@hmcts/ccpay-web-component/lib/services/bulk-scaning-payment/bulk-scaning-payment.service.ts","ng://@hmcts/ccpay-web-component/lib/components/case-transactions/case-transactions.component.ts","ng://@hmcts/ccpay-web-component/lib/interfaces/PaymentToPayhubRequest.ts","ng://@hmcts/ccpay-web-component/lib/interfaces/PayhubAntennaRequest.ts","ng://@hmcts/ccpay-web-component/lib/components/fee-summary/fee-summary.component.ts","ng://@hmcts/ccpay-web-component/lib/components/error-banner/error-banner.component.ts","ng://@hmcts/ccpay-web-component/lib/interfaces/UnidentifiedPaymentsRequest.ts","ng://@hmcts/ccpay-web-component/lib/interfaces/AllocatePaymentRequest.ts","ng://@hmcts/ccpay-web-component/lib/components/mark-unidentified-payment/mark-unidentified-payment.component.ts","ng://@hmcts/ccpay-web-component/lib/interfaces/UnsolicitedPaymentsRequest.ts","ng://@hmcts/ccpay-web-component/lib/components/mark-unsolicited-payment/mark-unsolicited-payment.component.ts","ng://@hmcts/ccpay-web-component/lib/components/unprocessed-payments/unprocessed-payments.component.ts","ng://@hmcts/ccpay-web-component/lib/components/processed-payments/processed-payments.component.ts","ng://@hmcts/ccpay-web-component/lib/interfaces/IAllocationPaymentsRequest.ts","ng://@hmcts/ccpay-web-component/lib/components/allocate-payments/allocate-payments.component.ts","ng://@hmcts/ccpay-web-component/lib/interfaces/AddRemissionRequest.ts","ng://@hmcts/ccpay-web-component/lib/interfaces/AddRetroRemissionRequest.ts","ng://@hmcts/ccpay-web-component/lib/interfaces/PostRefundRetroRemission.ts","ng://@hmcts/ccpay-web-component/lib/interfaces/PostIssueRefundRetroRemission.ts","ng://@hmcts/ccpay-web-component/lib/components/add-remission/add-remission.component.ts","ng://@hmcts/ccpay-web-component/lib/pipes/ccd-hyphens.pipe.ts","ng://@hmcts/ccpay-web-component/lib/pipes/capitalize.pipe.ts","ng://@hmcts/ccpay-web-component/lib/pipes/key-value.pipe.ts","ng://@hmcts/ccpay-web-component/lib/pipes/sanitize-html.pipe.ts","ng://@hmcts/ccpay-web-component/lib/services/xl-file/xl-file.service.ts","ng://@hmcts/ccpay-web-component/lib/components/reports/reports.component.ts","ng://@hmcts/ccpay-web-component/lib/components/table/table.component.ts","ng://@hmcts/ccpay-web-component/lib/interfaces/IResubmitRefundRequest.ts","ng://@hmcts/ccpay-web-component/lib/components/refund-status/refund-status.component.ts","ng://@hmcts/ccpay-web-component/lib/components/service-request/service-request.component.ts","ng://@hmcts/ccpay-web-component/lib/interfaces/IserviceRequestCardPayment.ts","ng://@hmcts/ccpay-web-component/lib/interfaces/IserviceRequestPbaPayment.ts","ng://@hmcts/ccpay-web-component/lib/components/pba-payment/pba-payment.component.ts","ng://@hmcts/ccpay-web-component/lib/payment-lib.module.ts"],"sourcesContent":["/*! *****************************************************************************\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 (b.hasOwnProperty(p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\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 function __createBinding(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, exports) {\r\n for (var p in m) if (p !== \"default\" && !exports.hasOwnProperty(p)) exports[p] = 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\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\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 __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\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 (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];\r\n result.default = 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, privateMap) {\r\n if (!privateMap.has(receiver)) {\r\n throw new TypeError(\"attempted to get private field on non-instance\");\r\n }\r\n return privateMap.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, privateMap, value) {\r\n if (!privateMap.has(receiver)) {\r\n throw new TypeError(\"attempted to set private field on non-instance\");\r\n }\r\n privateMap.set(receiver, value);\r\n return value;\r\n}\r\n","import { Injectable } from '@angular/core';\n\n@Injectable({\n providedIn: 'root'\n})\n\nexport class PaymentLibService {\n API_ROOT: string;\n BULKSCAN_API_ROOT: string;\n REFUNDS_API_ROOT: string;\n CARDPAYMENTRETURNURL: string;\n\n constructor() { }\n\n setApiRootUrl(apiRoot: string): void {\n this.API_ROOT = apiRoot;\n }\n\n getApiRootUrl(): string {\n return this.API_ROOT;\n }\n\n setBulkScanApiRootUrl(bulkscanapiRoot: string): void {\n this.BULKSCAN_API_ROOT = bulkscanapiRoot;\n }\n\n getBulkScanApiRootUrl(): string {\n return this.BULKSCAN_API_ROOT;\n }\n\n setRefundndsApiRootUrl(refundsapiRoot: string): void {\n this.REFUNDS_API_ROOT = refundsapiRoot;\n }\n\n getRefundsApiRootUrl(): string {\n return this.REFUNDS_API_ROOT;\n }\n setCardPaymentReturnUrl(cardPaymentReturnUrl: string):void {\n this.CARDPAYMENTRETURNURL = cardPaymentReturnUrl;\n }\n getCardPaymentReturnUrl(): string {\n return this.CARDPAYMENTRETURNURL;\n }\n}\n","import { Injectable } from '@angular/core';\nimport { Observable, BehaviorSubject } from 'rxjs';\nimport {IOrderReferenceFee} from '../interfaces/IOrderReferenceFee';\nimport { IRefundList } from '../interfaces/IRefundList';\nimport { IPaymentView } from '../interfaces/IPaymentView'; \n\n@Injectable({\n providedIn: 'root'\n})\nexport class OrderslistService {\n private ordersList: BehaviorSubject<IOrderReferenceFee[]> = new BehaviorSubject<IOrderReferenceFee[]>(null);\n private refundView: BehaviorSubject<IRefundList> = new BehaviorSubject<IRefundList>(null);\n private caseType = new BehaviorSubject(\"\");\n getcaseType = this.caseType.asObservable();\n private feeExists = new BehaviorSubject<boolean>(null);\n getFeeExist = this.feeExists.asObservable();\n private ccdCaseNumber = new BehaviorSubject(\"\");\n getCCDCaseNumberforRefund = this.ccdCaseNumber.asObservable();\n private isFromServiceRequestPage = new BehaviorSubject<boolean>(null);\n getisFromServiceRequestPage = this.isFromServiceRequestPage.asObservable();\n private OrderRefId = new BehaviorSubject(\"\");\n getOrderRefId = this.OrderRefId.asObservable();\n private navigationPage = new BehaviorSubject(\"\");\n getnavigationPage = this.navigationPage.asObservable();\n\n private orderRef = new BehaviorSubject(\"\");\n getorderRef = this.orderRef.asObservable();\n private orderCCDEvent = new BehaviorSubject(\"\");\n getorderCCDEvent = this.caseType.asObservable();\n private orderCreated = new BehaviorSubject<Date>(null);\n getorderCreated = this.orderCreated.asObservable();\n private orderParty = new BehaviorSubject(\"\");\n getorderParty = this.orderParty.asObservable();\n private orderRemissionTotal = new BehaviorSubject<number>(null);\n getorderRemissionTotal = this.orderRemissionTotal.asObservable();\n private orderFeesTotal = new BehaviorSubject<number>(null);\n getorderFeesTotal = this.orderFeesTotal.asObservable();\n private orderTotalPayments = new BehaviorSubject<number>(null);\n getorderTotalPayments = this.orderTotalPayments.asObservable();\n private rolesList: BehaviorSubject<any[]> = new BehaviorSubject<any[]>(null);\n\n private orderDetail: BehaviorSubject<any[]> = new BehaviorSubject<any[]>(null);\n\n private paymentPageView: BehaviorSubject<IPaymentView> = new BehaviorSubject<IPaymentView>(null);\n\n constructor() { }\n\n setOrdersList(orderLevelFees: IOrderReferenceFee[]): void {\n this.ordersList.next(Object.assign([], orderLevelFees));\n }\n getOrdersList() {\n return this.ordersList;\n }\n\n setRefundView(refundList: IRefundList): void {\n this.refundView.next(Object.assign([], refundList));\n }\n getRefundView() {\n return this.refundView;\n }\n\n setCaseType(caseType: string){\n this.caseType.next(caseType);\n }\n getCaseType(){\n return this.caseType;\n }\n\n setCCDCaseNumber(ccdCaseNumber: string){\n this.ccdCaseNumber.next(ccdCaseNumber);\n }\n getCCDCaseNumber(){\n return this.ccdCaseNumber;\n }\n\n setFeeExists(feeExists: boolean){\n this.feeExists.next(feeExists);\n }\n getFeeExists(){\n return this.feeExists;\n } \n\n setisFromServiceRequestPage(isFromServiceRequestPage: boolean){\n this.isFromServiceRequestPage.next(isFromServiceRequestPage);\n }\n getisFromServiceRequestPages(){\n return this.isFromServiceRequestPage;\n }\n\n setOrderRefId(OrderRefId: string){\n this.OrderRefId.next(OrderRefId);\n }\n getSelectedOrderRefId(){\n return this.OrderRefId;\n }\n\n setnavigationPage(navigationPage: string){\n this.navigationPage.next(navigationPage);\n }\n getnavigationPageValue(){\n return this.navigationPage;\n }\n\n setpaymentPageView(paymentpageList: IPaymentView): void {\n this.paymentPageView.next(Object.assign([], paymentpageList));\n }\n getpaymentPageView() {\n return this.paymentPageView;\n }\n\n setUserRolesList(rolesList:any[]): void {\n this.rolesList.next(Object.assign([], rolesList));\n }\n getUserRolesList() {\n return this.rolesList;\n }\n\n setorderDetail(orderDetail:any[]): void {\n this.orderDetail.next(Object.assign([], orderDetail));\n }\n getorderDetail() {\n return this.orderDetail;\n }\n\n setOrderRef(orderRef: string){\n this.orderRef.next(orderRef);\n }\n getorderRefs(){\n return this.orderRef;\n }\n\n setorderCCDEvent(orderCCDEvent: string){\n this.orderCCDEvent.next(orderCCDEvent);\n }\n getorderCCDEvents(){\n return this.orderCCDEvent;\n }\n\n setorderCreated(orderCreated: Date){\n this.orderCreated.next(orderCreated);\n }\n getorderCreateds(){\n return this.orderCreated;\n }\n\n setorderParty(orderParty: string){\n this.orderParty.next(orderParty);\n }\n getorderPartys(){\n return this.orderParty;\n }\n\n setorderRemissionTotal(orderRemissionTotal: number){\n this.orderRemissionTotal.next(orderRemissionTotal);\n }\n getorderRemissionTotals(){\n return this.orderRemissionTotal;\n }\n\n setorderFeesTotal(orderFeesTotal: number){\n this.orderFeesTotal.next(orderFeesTotal);\n }\n getorderFeesTotals(){\n return this.orderFeesTotal;\n }\n\n setorderTotalPayments(orderTotalPayments: number){\n this.orderTotalPayments.next(orderTotalPayments);\n }\n getoorderTotalPaymentss(){\n return this.orderTotalPayments;\n }\n}\n","import { ChangeDetectorRef, Component, Input, OnInit } from '@angular/core';\nimport { PaymentLibService } from './payment-lib.service';\nimport { IBSPayments } from './interfaces/IBSPayments';\nimport { OrderslistService } from './services/orderslist.service';\nimport { IPayment } from './interfaces/IPayment';\n\n@Component({\n selector: 'ccpay-payment-lib',\n template: `\n <ccpay-refund-list [USERID]=\"USERID\" [LOGGEDINUSERROLES]=\"LOGGEDINUSERROLES\" [LOGGEDINUSEREMAIL]=\"LOGGEDINUSEREMAIL\" *ngIf=\"viewName === 'refund-list'\"></ccpay-refund-list>\n <ccpay-payment-list *ngIf=\"viewName === 'payment-list'\"></ccpay-payment-list>\n <ccpay-refund-status\n [LOGGEDINUSERROLES]=\"LOGGEDINUSERROLES\"\n [API_ROOT]=\"API_ROOT\"\n *ngIf=\"viewName === 'refundstatuslist'\"> </ccpay-refund-status >\n <ccpay-payment-view [LOGGEDINUSERROLES]=\"LOGGEDINUSERROLES\" *ngIf=\"viewName === 'payment-view'\"\n [isTurnOff]=\"ISTURNOFF\" [isTakePayment]=\"TAKEPAYMENT\" [caseType]=\"CASETYPE\"\n [ISPAYMENTSTATUSENABLED] = \"ISPAYMENTSTATUSENABLED\"\n ></ccpay-payment-view>\n\n <ccpay-process-refund *ngIf=\"viewName === 'process-refund'\"\n [refundReference]=\"refundReference\"\n [refundlistsource]=\"refundlistsource\"\n ></ccpay-process-refund>\n <ccpay-pba-payment *ngIf=\"viewName === 'pba-payment'\"\n [pbaPayOrderRef]=\"pbaPayOrderRef\"\n ></ccpay-pba-payment>\n <ccpay-case-transactions [isTakePayment]=\"isTakePayment\" [LOGGEDINUSERROLES]=\"LOGGEDINUSERROLES\" *ngIf=\"viewName === 'case-transactions'\"></ccpay-case-transactions>\n <app-mark-unidentified-payment *ngIf=\"viewName === 'unidentifiedPage'\"\n [caseType]=\"CASETYPE\"></app-mark-unidentified-payment>\n <app-mark-unsolicited-payment *ngIf=\"viewName === 'unsolicitedPage'\"\n [caseType]=\"CASETYPE\"></app-mark-unsolicited-payment>\n <app-allocate-payments *ngIf=\"viewName === 'allocate-payments'\"\n [isTurnOff]=\"ISTURNOFF\"\n [caseType]=\"CASETYPE\"\n ></app-allocate-payments>\n <ccpay-fee-summary *ngIf=\"viewName === 'fee-summary'\"\n [ccdCaseNumber]=\"CCD_CASE_NUMBER\"\n [paymentGroupRef]=\"paymentGroupReference\"\n [isTurnOff]=\"ISTURNOFF\"\n [caseType]=\"CASETYPE\"\n ></ccpay-fee-summary>\n <ccpay-reports *ngIf=\"viewName === 'reports'\"\n [ISPAYMENTSTATUSENABLED] = \"ISPAYMENTSTATUSENABLED\"\n ></ccpay-reports>\n `\n})\n\nexport class PaymentLibComponent implements OnInit {\n @Input('API_ROOT') API_ROOT: string;\n @Input('BULKSCAN_API_ROOT') BULKSCAN_API_ROOT: string;\n @Input('REFUNDS_API_ROOT') REFUNDS_API_ROOT: string;\n @Input('CARDPAYMENTRETURNURL') CARDPAYMENTRETURNURL: string;\n @Input('CCD_CASE_NUMBER') CCD_CASE_NUMBER: string;\n @Input('EXC_REFERENCE') EXC_REFERENCE: string;\n @Input('PAYMENT_METHOD') PAYMENT_METHOD: string;\n @Input('VIEW') VIEW: string;\n @Input('VIEWSERVICE') VIEWSERVICE: string;\n @Input('PAYMENT_GROUP_REF') PAYMENT_GROUP_REF?: string;\n @Input('TAKEPAYMENT') TAKEPAYMENT: boolean;\n @Input('SERVICEREQUEST') SERVICEREQUEST: string;\n @Input('DCN_NUMBER') DCN_NUMBER: string;\n @Input('SELECTED_OPTION') SELECTED_OPTION: string;\n @Input('ISBSENABLE') ISBSENABLE: Boolean;\n @Input('ISSFENABLE') ISSFENABLE: boolean;\n @Input('ISTURNOFF') ISTURNOFF: boolean;\n @Input('CASETYPE') CASETYPE: string;\n @Input('ISPAYMENTSTATUSENABLED') ISPAYMENTSTATUSENABLED: boolean;\n @Input('rootUrl') rootUrl: boolean;\n @Input('REFUNDLIST') REFUNDLIST: string;\n @Input('USERID') USERID: string;\n @Input('LOGGEDINUSERROLES') LOGGEDINUSERROLES: any[];\n @Input('LOGGEDINUSEREMAIL') LOGGEDINUSEREMAIL: string;\n @Input('isFromServiceRequestPage') isFromServiceRequestPage: boolean;\n\n paymentMethod: string;\n bspaymentdcn: string;\n unProcessedPaymentServiceId: string = null;\n paymentGroupReference: string;\n paymentReference: string;\n refundReference: string;\n refundlistsource: any;\n viewName: string;\n isTurnOff: boolean;\n caseType: string;\n unProcessedPayment: IBSPayments = null;\n isRefundStatusView: boolean;\n isRedirectFromCaseTransactionPage: string;\n isCallFromRefundList: boolean;\n isFromRefundStatusPage: boolean;\n iscancelClicked : boolean;\n isFromPaymentDetailPage: boolean;\n pbaPayOrderRef: IPayment;\n isTakePayment: boolean;\n\n orderDetail: any[];\n orderRef: string;\n orderStatus: string;\n orderParty: string;\n orderCreated: Date;\n orderCCDEvent: string;\n serviceRequestValue: string;\n orderAddBtnEnable: boolean;\n orderFeesTotal: number = 0.00;\n orderRemissionTotal: number = 0.00;\n orderTotalPayments: number = 0.00;\n orderPendingPayments: number = 0.00;\n\n constructor(private paymentLibService: PaymentLibService,\n private cd: ChangeDetectorRef,\n private OrderslistService: OrderslistService) { }\n ngAfterContentChecked(): void {\n this.cd.detectChanges();\n }\n\n\n ngOnInit() {\n this.paymentLibService.setApiRootUrl(this.API_ROOT);\n this.paymentLibService.setBulkScanApiRootUrl(this.BULKSCAN_API_ROOT);\n this.paymentLibService.setRefundndsApiRootUrl(this.REFUNDS_API_ROOT);\n this.paymentLibService.setCardPaymentReturnUrl(this.CARDPAYMENTRETURNURL);\n\n if(this.LOGGEDINUSERROLES.length > 0) {\n this.OrderslistService.setUserRolesList(this.LOGGEDINUSERROLES);\n }\n if (this.PAYMENT_GROUP_REF) {\n this.paymentGroupReference = this.PAYMENT_GROUP_REF;\n }\n if (this.DCN_NUMBER) {\n this.bspaymentdcn = this.DCN_NUMBER;\n }\n if (this.REFUNDLIST === \"true\") {\n this.VIEW = 'refund-list';\n this.viewName = this.VIEW;\n }\n if (this.VIEW === 'fee-summary') {\n this.viewName = 'fee-summary';\n } else if (this.VIEW !== 'reports' && this.VIEW !== 'refund-list') {\n this.viewName = 'case-transactions';\n } else {\n this.viewName = this.VIEW;\n }\n\n if (this.isTakePayment) {\n this.TAKEPAYMENT = true;\n }\n }\n}\n","import { Injectable } from '@angular/core';\nimport { _throw } from 'rxjs/observable/throw';\nimport { Observable } from 'rxjs/internal/Observable';\nimport { HttpErrorResponse } from '@angular/common/http';\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 _throw(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","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 { Component, OnInit, Input, Output, EventEmitter } from '@angular/core';\nimport { PaymentViewService } from '../../services/payment-view/payment-view.service';\nimport { PaymentLibComponent } from '../../payment-lib.component';\nimport { IPaymentGroup } from '../../interfaces/IPaymentGroup';\nimport { IFee } from '../../interfaces/IFee';\nimport { IPayment } from '../../interfaces/IPayment';\nimport { IRemission } from '../../interfaces/IRemission';\nconst BS_ENABLE_FLAG = 'bulk-scan-enabling-fe';\nimport { ChangeDetectorRef } from '@angular/core';\nimport { IPaymentFailure } from '../../interfaces/IPaymentFailure';\nimport { OrderslistService } from '../../services/orderslist.service';\n\n@Component({\n selector: 'ccpay-payment-view',\n templateUrl: './payment-view.component.html',\n styleUrls: ['./payment-view.component.css']\n})\nexport class PaymentViewComponent implements OnInit {\n @Input() isTurnOff: boolean;\n @Input() isTakePayment: boolean;\n @Input() caseType: boolean;\n @Input() orderRef: string;\n @Input() orderStatus: string;\n @Input() orderTotalPayments: number;\n @Input() payment: IPayment;\n @Input() LOGGEDINUSERROLES: string[];\n @Input() ISPAYMENTSTATUSENABLED: string;\n @Input() orderParty: string;\n @Input() orderCreated: Date;\n @Input() orderCCDEvent: string;\n @Input() orderFeesTotal: number;\n @Input() orderRemissionTotal: number;\n @Input() orderDetail: any[];\n @Input(\"isServiceRequest\") isServiceRequest: string;\n errorMsg: string;\n paymentGroup: IPaymentGroup;\n errorMessage: string;\n ccdCaseNumber: string;\n selectedOption: string;\n dcnNumber: string;\n isStatusAllocated: boolean;\n isRemissionsMatch: boolean;\n feeId: IFee;\n viewStatus: string;\n isRefundRemission: boolean = false;\n isStrategicFixEnable: boolean;\n isAddFeeBtnEnabled: boolean = false;\n isIssueRefunfBtnEnable: boolean = false;\n allowedRolesToAccessRefund = ['payments-refund-approver', 'payments-refund'];\n remissions: IRemission[] = [];\n allPaymentsFailure: IPaymentFailure[] = [];\n selectedPaymentsStatus: IPaymentFailure;\n remissionFeeAmt: number;\n isRefundRemissionBtnEnable: boolean;\n serviceReference: string;\n isFromServiceRequestPage: boolean;\n isFromPaymentDetailPage: boolean;\n\n constructor(private paymentViewService: PaymentViewService,\n private paymentLibComponent: PaymentLibComponent,\n private cd: ChangeDetectorRef,\n private OrderslistService: OrderslistService) {\n }\n\n ngAfterContentChecked(): void {\n this.cd.detectChanges();\n }\n\n ngOnInit() {\n this.ccdCaseNumber = this.paymentLibComponent.CCD_CASE_NUMBER;\n this.selectedOption = this.paymentLibComponent.SELECTED_OPTION;\n this.dcnNumber = this.paymentLibComponent.DCN_NUMBER;\n this.isTurnOff = this.paymentLibComponent.ISTURNOFF;\n this.serviceReference = this.paymentLibComponent.paymentGroupReference;\n this.viewStatus = 'paymentview';\n this.paymentViewService.getApportionPaymentDetails(this.paymentLibComponent.paymentReference).subscribe(\n paymentGroup => {\n let fees = [];\n paymentGroup.fees.forEach(fee => {\n this.isRemissionsMatch = false;\n\n paymentGroup.remissions.forEach(rem => {\n if (rem.fee_code === fee.code) {\n this.isRemissionsMatch = true;\n fee['remissions'] = rem;\n fees.push(fee);\n }\n });\n if (!this.isRemissionsMatch) {\n fees.push(fee);\n }\n });\n paymentGroup.fees = fees\n this.paymentGroup = paymentGroup;\n\n this.paymentGroup.payments = this.paymentGroup.payments.filter\n (paymentGroupObj => paymentGroupObj['reference'].includes(this.paymentLibComponent.paymentReference));\n const paymentAllocation = this.paymentGroup.payments[0].payment_allocation;\n this.isStatusAllocated = paymentAllocation.length > 0 && paymentAllocation[0].allocation_status === 'Allocated' || paymentAllocation.length === 0;\n\n },\n (error: any) => this.errorMessage = error\n );\n this.paymentViewService.getPaymentFailure(this.paymentLibComponent.paymentReference).subscribe({\n next: (res) => {\n JSON.parse(res).payment_failure_list.reverse().forEach(payments => {\n\n this.allPaymentsFailure.push(payments.payment_failure_initiated);\n if(payments.payment_failure_closed) {\n this.allPaymentsFailure.push(payments.payment_failure_closed);\n }\n });\n this.allPaymentsFailure = this.allPaymentsFailure.reverse();\n },\n error: (e) => {\n this.allPaymentsFailure = [];\n this.errorMsg = \"Server error\"\n }\n })\n }\n\n get isCardPayment(): boolean {\n return this.paymentGroup.payments[0].method === 'card';\n }\n\n get isTelephonyPayment(): boolean {\n return this.paymentGroup.payments[0].channel === 'telephony';\n }\n\n public goToPaymentList(): void {\n this.paymentLibComponent.viewName = 'payment-list';\n }\n goToServiceRequestPage() {\n this.paymentLibComponent.viewName = 'case-transactions';\n this.paymentLibComponent.TAKEPAYMENT = false;\n this.paymentLibComponent.SERVICEREQUEST = 'true';\n this.paymentLibComponent.isFromServiceRequestPage = true;\n window.location.reload();\n }\n goToCaseTransationPage(event: any) {\n event.preventDefault();\n if (!this.paymentLibComponent.isFromServiceRequestPage) {\n this.OrderslistService.setnavigationPage('casetransactions');\n this.OrderslistService.setisFromServiceRequestPage(false);\n this.paymentLibComponent.viewName = 'case-transactions';\n this.paymentLibComponent.ISBSENABLE = true;\n this.resetOrderData();\n } else {\n this.OrderslistService.getorderRefs().subscribe((data) => this.orderRef = data);\n this.OrderslistService.getorderCCDEvents().subscribe((data) => this.orderCCDEvent = data);\n this.OrderslistService.getorderCreateds().subscribe((data) => this.orderCreated = data);\n this.OrderslistService.getorderDetail().subscribe((data) => this.orderDetail = data);\n this.OrderslistService.getorderPartys().subscribe((data) => this.orderParty = data);\n this.OrderslistService.getorderRemissionTotals().subscribe((data) => this.orderRemissionTotal = data);\n this.OrderslistService.getorderFeesTotals().subscribe((data) => this.orderFeesTotal = data);\n this.OrderslistService.getoorderTotalPaymentss().subscribe((data) => this.orderTotalPayments = data);\n this.viewStatus = 'order-full-view';\n }\n\n }\n\n addRemission(fee: IFee) {\n if(this.chkForAddRemission(fee.code)) {\n this.feeId = fee;\n this.paymentViewService.getApportionPaymentDetails(this.paymentGroup.payments[0].reference).subscribe(\n paymentGroup => {\n this.paymentGroup = paymentGroup;\n\n this.paymentGroup.payments = this.paymentGroup.payments.filter\n (paymentGroupObj => paymentGroupObj['reference'].includes(this.paymentLibComponent.paymentReference));\n this.payment = this.paymentGroup.payments[0];\n this.paymentLibComponent.isFromPaymentDetailPage = true;\n this.viewStatus = 'addremission';\n this.isRefundRemission = true;\n this.cd.detectChanges();\n },\n (error: any) => this.errorMessage = error\n );\n }\n }\n\n checkForFees(paymentGroup: any) {\n if(paymentGroup !== null && paymentGroup !== undefined)\n {\n if (paymentGroup.fees !== null && paymentGroup.fees !== undefined) {\n return true;\n }\n\n }\n return false;\n }\n\n addRefundForRemission(payment: IPayment, remission: IRemission[],fees:any) {\n if(this.chkIsRefundRemissionBtnEnable()) {\n this.payment = payment;\n this.paymentViewService.getApportionPaymentDetails(this.payment.reference).subscribe(\n paymentGroup => {\n this.paymentGroup = paymentGroup;\n\n this.paymentGroup.payments = this.paymentGroup.payments.filter\n (paymentGroupObj => paymentGroupObj['reference'].includes(this.payment.reference));\n this.payment = this.paymentGroup.payments[0];\n this.remissions = remission;\n this.remissionFeeAmt = fees.filter(data=>data.code === this.remissions['fee_code'])[0].net_amount;\n this.viewStatus = 'addrefundforremission';\n // const paymentAllocation = this.paymentGroup.payments[0].payment_allocation;\n // this.isStatusAllocated = paymentAllocation.length > 0 && paymentAllocation[0].allocation_status === 'Allocated' || paymentAllocation.length === 0;\n },\n (error: any) => this.errorMessage = error\n );\n }\n }\n\n chkIsRefundRemissionBtnEnable(): boolean {\n if (this.paymentGroup !== null && this.paymentGroup !== undefined) {\n this.paymentGroup.payments.forEach(payment => {\n if (payment.method.toLocaleLowerCase() === 'payment by account' && payment.status.toLocaleLowerCase() === 'success' && this.allowFurtherAccessAfter4Days(payment)) {\n this.isRefundRemissionBtnEnable = true;\n }\n });\n if (this.isRefundRemissionBtnEnable) {\n return true;\n } else {\n return false;\n };\n }\n }\n\n issueRefund(paymentgrp: IPaymentGroup) {\n if (paymentgrp !== null && paymentgrp !== undefined) {\n if(this.chkIssueRefundBtnEnable(paymentgrp.payments[0])) {\n this.paymentGroup = paymentgrp;\n this.viewStatus = 'issuerefund';\n this.isRefundRemission = true;\n this.paymentLibComponent.isFromPaymentDetailPage = true;\n this.isFromPaymentDetailPage = true;\n this.isFromServiceRequestPage = this.paymentLibComponent.isFromServiceRequestPage;\n }\n }\n }\n\n getRemissionByFeeCode(feeCode: string, remissions: IRemission[]): IRemission {\n if (remissions && remissions.length > 0) {\n for (const remission of remissions) {\n if (remission.fee_code === feeCode) {\n return remission;\n }\n }\n }\n return null;\n }\n\n chkIssueRefundBtnEnable(payment: IPayment): boolean {\n if (this.check4AllowedRoles2AccessRefund() && this.allowFurtherAccessAfter4Days(payment) &&\n payment.method === 'payment by account' && payment.status.toLocaleLowerCase() === 'success') {\n this.isIssueRefunfBtnEnable = true;\n }\n if (this.isIssueRefunfBtnEnable) {\n return true;\n } else {\n return false;\n };\n }\n\n chkForPBAPayment(): boolean {\n if (this.paymentGroup !== null && this.paymentGroup !== undefined) {\n let payment = this.paymentGroup.payments[0];\n if (payment.method.toLocaleLowerCase() === 'payment by account' && this.allowFurtherAccessAfter4Days(payment)) {\n return true;\n }\n return false;\n }\n }\n\n chkForAddRemission(feeCode: string): boolean {\n if (this.chkForPBAPayment() && this.check4AllowedRoles2AccessRefund() && this.allowFurtherAccessAfter4Days(this.paymentGroup.payments[0])) {\n if (this.paymentGroup.remissions && this.paymentGroup.remissions.length > 0) {\n for (const remission of this.paymentGroup.remissions) {\n if (remission.fee_code === feeCode) {\n return false;\n }\n }\n return true;\n }\n return true;\n\n } else {\n return false;\n }\n }\n\n check4AllowedRoles2AccessRefund = (): boolean => {\n return this.allowedRolesToAccessRefund.some(role =>\n this.LOGGEDINUSERROLES.indexOf(role) !== -1\n );\n }\n\n allowFurtherAccessAfter4Days = (payment: IPayment): boolean => {\n if(payment !== null && payment !== undefined) {\n let tmp4DayAgo = new Date();\n tmp4DayAgo.setDate(tmp4DayAgo.getDate() - 4);\n return tmp4DayAgo >= new Date(payment.date_created);\n }\n }\n\n resetOrderData() {\n this.OrderslistService.setOrderRef(null);\n this.OrderslistService.setorderCCDEvent(null);\n this.OrderslistService.setorderCreated(null);\n this.OrderslistService.setorderDetail(null);\n this.OrderslistService.setorderParty(null);\n this.OrderslistService.setorderTotalPayments(null);\n this.OrderslistService.setorderRemissionTotal(null);\n this.OrderslistService.setorderFeesTotal(null);\n }\n\n goToPaymentFailuePage(payment: any) {\n this.viewStatus = 'payment-failure';\n this.selectedPaymentsStatus = payment;\n }\n goBackToPaymentView(event: any) {\n event.preventDefault();\n this.viewStatus = 'paymentview';\n }\n}\n","import { Injectable } from '@angular/core';\nimport {HttpClient, HttpHeaders} from '@angular/common/http';\nimport { Meta } from '@angular/platform-browser';\nimport {ErrorHandlerService} from '../shared/error-handler.service';\nimport { WebComponentHttpClient } from '../shared/httpclient/webcomponent.http.client';\nimport {PaymentLibService} from '../../payment-lib.service';\nimport {Observable} from 'rxjs/Observable';\nimport {catchError} from 'rxjs/operators';\nimport { IRefundReasons } from '../../interfaces/IRefundReasons';\nimport { IPatchRefundAction } from '../../interfaces/IPatchRefundAction';\nimport { IRefundList } from '../../interfaces/IRefundList';\nimport { IssueRefundRequest } from '../../interfaces/IssueRefundRequest';\nimport { IResubmitRefundRequest } from '../../interfaces/IResubmitRefundRequest';\nimport { IRefundStatusHistory } from '../../interfaces/IRefundStatusHistory';\n@Injectable({\n providedIn: 'root'\n})\nexport class RefundsService {\n\n constructor(private http: HttpClient,\n private https: WebComponentHttpClient,\n private errorHandlerService: ErrorHandlerService,\n private paymentLibService: PaymentLibService,\n private meta: Meta\n ) { }\n\n getRefundReasons(): Observable<IRefundReasons[]> {\n return this.http.get<IRefundReasons[]>(`${this.paymentLibService.REFUNDS_API_ROOT}/reasons`, {\n withCredentials: true\n })\n .pipe(\n catchError(this.errorHandlerService.handleError)\n );\n }\n\n getRefundRejectReasons(): Observable<any> {\n return this.http.get<any>(`${this.paymentLibService.REFUNDS_API_ROOT}/rejection-reasons`, {\n withCredentials: true\n })\n .pipe(\n catchError(this.errorHandlerService.handleError)\n );\n }\n\n getRefundActions(refundReference: string): Observable<any> {\n return this.http.get<any>(`${this.paymentLibService.REFUNDS_API_ROOT}/${refundReference}/actions`, {\n withCredentials: true\n })\n .pipe(\n catchError(this.errorHandlerService.handleError)\n );\n }\n\npatchRefundActions(body:IPatchRefundAction, refundReference: string, reviewerAction: string): Observable<any> {\n // const opts = this.addHeaders({});\n return this.https.patch(`${this.paymentLibService.REFUNDS_API_ROOT}/${refundReference}/action/${reviewerAction}`, body)\n .pipe(\n catchError(this.errorHandlerService.handleError)\n );\n}\n\ngetRefundList(refundstatus?: string, selfexclusive?:boolean): Observable<IRefundList[]> {\n return this.http.get<IRefundList[]>(`${this.paymentLibService.REFUNDS_API_ROOT}?status=${refundstatus}&excludeCurrentUser=${selfexclusive}`, \n {\n withCredentials: true\n})\n .pipe(\n catchError(this.errorHandlerService.handleError)\n );\n}\n\ngetRefundStatusHistory(reference?: string) {\n return this.http.get<IRefundStatusHistory>(`${this.paymentLibService.REFUNDS_API_ROOT}/${reference}/status-history`, \n {\n withCredentials: true\n})\n .pipe(\n catchError(this.errorHandlerService.handleError)\n );\n}\n\ngetRefundStatusList(ccdCaseNumber:string): Observable<IRefundList[]> {\n return this.http.get<IRefundList[]>(`${this.paymentLibService.REFUNDS_API_ROOT}?ccdCaseNumber=${ccdCaseNumber}`, {\n withCredentials: true\n})\n .pipe(\n catchError(this.errorHandlerService.handleError)\n );\n}\n\ngetUserDetails(): Observable<any> {\n return this.http.get<any>(`${this.paymentLibService.REFUNDS_API_ROOT}/get-user-details`, {\n withCredentials: true\n })\n .pipe(\n catchError(this.errorHandlerService.handleError)\n );\n}\n \npostIssueRefund(body: IssueRefundRequest): Observable<any> {\n return this.https.post(`${this.paymentLibService.REFUNDS_API_ROOT}/refund`, body).pipe(\n catchError(this.errorHandlerService.handleError)\n );\n}\n\npatchResubmitRefund(body: IResubmitRefundRequest, refund_reference: string): Observable<any> {\n // const opts = this.addHeaders({});\n return this.https.patch(`${this.paymentLibService.REFUNDS_API_ROOT}/resubmit/${refund_reference}`, body).pipe(\n catchError(this.errorHandlerService.handleError)\n );\n}\n\naddHeaders(options: any): any {\n const csrfToken = this.meta.getTag('name=csrf-token');\n const headers = {};\n if (options.headers) {\n options.headers.forEach(element => {\n headers[element] = options.headers.get(element);\n });\n }\n headers['X-Requested-With'] = 'XMLHttpRequest';\n if (csrfToken.content === null) {\n if( document.cookie.split(';').find(row => row.startsWith('XSRF-TOKEN')) !== undefined ) {\n headers['CSRF-Token'] = document.cookie.split(';').find(row => row.startsWith('XSRF-TOKEN')).split('=')[1]; \n } else {\n headers['CSRF-Token'] = document.cookie.split(';').find(row => row.startsWith(' XSRF-TOKEN')).split('=')[1];\n }\n } else {\n headers['CSRF-Token'] = csrfToken.content;\n }\n options.headers = new HttpHeaders(headers);\n options.responseType = 'text';\n return options;\n}\n}\n","import {Component, OnInit, Input} from '@angular/core';\nimport { FormBuilder, FormGroup, Validators, FormControl } from '@angular/forms';\nimport {RefundsService} from '../../services/refunds/refunds.service';\nimport { IRefundAction } from '../../interfaces/IRefundAction';\nimport { IRefundList } from '../../interfaces/IRefundList';\nimport { IRefundRejectReason } from '../../interfaces/IRefundRejectReason';\nimport { OrderslistService } from '../../services/orderslist.service';\nimport { PaymentLibComponent } from '../../payment-lib.component';\nimport { ActivatedRoute,Router } from '@angular/router';\n\n@Component({\n selector: 'ccpay-process-refund',\n templateUrl: './process-refund.component.html',\n styleUrls: ['./process-refund.component.css']\n})\nexport class ProcessRefundComponent implements OnInit {\n @Input() refundReference: string;\n @Input() refundlistsource: IRefundList;\n\n processRefundForm: FormGroup;\n\n errorMessage = this.getErrorMessage(false, '', '', '');\n sendmeback: string = null;\n viewStatus: string;\n refundActionList: IRefundAction[] = []; \n refundRejectReasonList: IRefundRejectReason[] = []; \n isSendMeBackClicked: boolean = false;\n isRejectClicked: boolean = false;\n isOtherClicked: boolean = false;\n isSuccesspageEnable: boolean = false;\n\n refundActionsHasError: boolean = false;\n refundRejectReasonHasError: boolean = false;\n isReasonFieldEmpty: boolean = false;\n isReasonFieldInvalid: boolean = false;\n reasonFieldMinHasError: boolean = false;\n reasonFieldMaxHasError: boolean = false;\n isReasonEmpty: boolean = false;\n isReasonInvalid: boolean = false;\n successMsg: string = null;\n navigationpage: string;\n ccdCaseNumber: string;\n isFromRefundListPage: boolean;\n\n isConfirmButtondisabled: boolean = true;\n constructor(private RefundsService: RefundsService,\n private formBuilder: FormBuilder,\n private OrderslistService: OrderslistService,\n private paymentLibComponent: PaymentLibComponent,\n private router: Router,\n private activeRoute: ActivatedRoute) {\n }\n\n ngOnInit() {\n this.viewStatus = 'RefundProcess';\n this.RefundsService.getRefundActions(this.refundReference).subscribe(\n refundActionList => {\n this.refundActionList = <any>refundActionList;\n },\n err => {\n this.errorMessage = this.getErrorMessage(true, err.statusCode, err.err, err);\n }\n );\n this.processRefundForm = this.formBuilder.group({\n refundActionField: new FormControl('', Validators.compose([\n Validators.required\n ])),\n refundRejectReasonField: new FormControl('', Validators.compose([\n Validators.required\n ])),\n sendMeBackField: new FormControl('', Validators.compose([\n Validators.required,\n Validators.minLength(3),\n Validators.maxLength(255),\n Validators.pattern('^([a-zA-Z0-9\\\\s,\\\\.]*)$'),\n\n ])),\n enterReasonField: new FormControl('', Validators.compose([\n Validators.required,\n Validators.maxLength(30),\n Validators.pattern('^([a-zA-Z0-9.\\\\s]*)$'),\n ])),\n });\n this.ccdCaseNumber = this.refundlistsource.ccd_case_number;\n\n if((typeof this.paymentLibComponent.TAKEPAYMENT === 'string' && this.paymentLibComponent.TAKEPAYMENT === 'false') || (typeof this.paymentLibComponent.TAKEPAYMENT === 'boolean' && !this.paymentLibComponent.TAKEPAYMENT) ) {\n this.isFromRefundListPage = true;\n }\n }\n checkRefundActions(code: string) {\n this.refundActionsHasError = false;\n this.isReasonFieldEmpty = false;\n this.isReasonEmpty = false;\n this.isReasonInvalid = false;\n this.refundRejectReasonHasError = false;\n if(code === 'Return to caseworker') {\n this.isConfirmButtondisabled = true;\n this.isSendMeBackClicked = true;\n this.isRejectClicked = false;\n this.isOtherClicked = false;\n\n } else if (code === 'Approve') {\n this.isSendMeBackClicked = false;\n this.isConfirmButtondisabled = false;\n this.isRejectClicked = false;\n this.isOtherClicked = false;\n\n } else if (code === 'Reject') {\n this.isRejectClicked = true;\n this.isSendMeBackClicked = false;\n this.isOtherClicked = false;\n this.RefundsService.getRefundRejectReasons().subscribe(\n refundRejectReasonList => {\n this.refundRejectReasonList = <any>refundRejectReasonList;\n },\n err => {\n this.errorMessage = this.getErrorMessage(true, err.statusCode, err.err, err);\n }\n );\n } else if (code === 'RE005') {\n this.isOtherClicked = true;\n } else if (code !== 'RE005') {\n this.isOtherClicked = false;\n }\n }\n processRefundSubmit() {\n let processRefundRequest;\n let status;\n this.resetForm([false, false, false, false, false, false, false, false], 'all');\n const controls = this.processRefundForm.controls;\n const processFormError = controls.sendMeBackField.errors;\n\n if (this.processRefundForm.dirty && controls.refundActionField.valid \n && (controls.refundActionField.value == 'Approve'\n || (controls.refundActionField.value == 'Reject' && controls.refundRejectReasonField.valid && controls.refundRejectReasonField.value != 'RE005')\n || (controls.refundActionField.value == 'Reject' && controls.refundRejectReasonField.value == 'RE005' && controls.enterReasonField.valid)\n || (controls.refundActionField.value == 'Return to caseworker' && controls.sendMeBackField.valid))) {\n if (controls.refundActionField.value === 'Approve'){\n status = 'APPROVE';\n processRefundRequest = {\n code:'',\n reason: ''\n };\n } else if (controls.refundActionField.value === 'Reject') {\n status = 'REJECT';\n\n processRefundRequest = {\n code: controls.refundRejectReasonField.value ? controls.refundRejectReasonField.value : '',\n reason: controls.refundRejectReasonField.value == 'RE005' ? controls.enterReasonField.value : ''\n };\n } else if (controls.refundActionField.value === 'Return to caseworker') {\n status = 'SENDBACK';\n\n processRefundRequest = {\n code: '',\n reason: controls.sendMeBackField.value\n };\n }\n this.RefundsService.patchRefundActions(processRefundRequest, this.refundReference, status).subscribe(\n response => {\n this.isSuccesspageEnable = true;\n // this.successMsg = JSON.parse(response)['data'];\n this.successMsg = response.replace(/['\"]+/g, '');\n },\n err => {\n this.errorMessage = this.getErrorMessage(true, err.statusCode, err.err, err);\n }\n );\n } else {\n if(controls.refundActionField.value == \"\") {\n this.resetForm([true, false, false, false, false, false, false, false], 'action');\n }\n if(controls.refundActionField.value == 'Reject' && controls.refundRejectReasonField.value == \"\") {\n this.resetForm([false, true, false, false, false, false, false, false], 'rejectReason');\n }\n if(controls.refundActionField.value == 'Return to caseworker') {\n if(controls.sendMeBackField.value == '' ) {\n this.resetForm([false, false, true, false, false, false, false, false], 'addAreason');\n }\n if(controls.sendMeBackField.value != '' && controls.sendMeBackField.invalid ) {\n this.resetForm([false, false, false, true, false, false, false, false], 'addAreason');\n }\n if(processFormError && processFormError.minlength && processFormError.minlength.actualLength < 3 ) {\n this.resetForm([false, false, false, false, true, false, false, false], 'addAreason');\n }\n if(processFormError && processFormError.maxlength && processFormError.maxlength.actualLength > 255 ) {\n this.resetForm([false, false, false, false, false, true, false, false], 'addAreason');\n }\n }\n if(controls.refundActionField.value == 'Reject' && controls.refundRejectReasonField.value == 'RE005') {\n if(controls.enterReasonField.value === \"\") {\n this.resetForm([false, false, false, false, false, false, true, false], 'enterReason');\n }\n if(controls.enterReasonField.value!== \"\" && controls.enterReasonField.invalid) {\n this.resetForm([false, false, false, false, false, false, false, true], 'enterReason');\n }\n }\n }\n\n }\n getErrorMessage(isErrorExist, status, errorMsg, err) {\n let bodyTxt = 'Please try again later';\n if (status !== 500) {\n if (errorMsg !== undefined) {\n bodyTxt = errorMsg;\n } else {\n bodyTxt = err;\n }\n \n }\n return {\n title: 'Something went wrong',\n body: bodyTxt,\n showError: isErrorExist\n };\n }\n loadRefundListPage() {\n this.OrderslistService.getnavigationPageValue().subscribe((data) => this.navigationpage = data);\n if (this.navigationpage === 'casetransactions') {\n // window.location.href='/refund-list?takePayment=false&refundlist=true';\n // // this.OrderslistService.setnavigationPage('casetransactions');\n // // this.OrderslistService.setisFromServiceRequestPage(false);\n // // this.paymentLibComponent.VIEW ='case-transactions';\n // // this.paymentLibComponent.viewName = 'case-transactions';\n // // this.paymentLibComponent.ISBSENABLE = true;\n // // this.paymentLibComponent.isRefundStatusView = false;\n this.paymentLibComponent.viewName = 'refundstatuslist';\n this.paymentLibComponent.isRefundStatusView = true;\n } else {\n this.paymentLibComponent.viewName = 'refundstatuslist';\n this.paymentLibComponent.isRefundStatusView = true;\n }\n }\n loadRefundsHomePage() {\n if(typeof this.paymentLibComponent.TAKEPAYMENT === 'string' && this.paymentLibComponent.TAKEPAYMENT === 'false') {\n //window.location.href='/refund-list?takePayment=false&refundlist=true';\n this.paymentLibComponent.viewName = 'refund-list';\n }\n else {\n this.OrderslistService.setnavigationPage('casetransactions');\n this.OrderslistService.setisFromServiceRequestPage(false);\n this.paymentLibComponent.VIEW ='case-transactions';\n this.paymentLibComponent.viewName = 'case-transactions';\n this.paymentLibComponent.ISBSENABLE = true;\n this.paymentLibComponent.isRefundStatusView = false;\n }\n }\n redirecttoRefundListPage() {\n if((typeof this.paymentLibComponent.TAKEPAYMENT === 'string' && this.paymentLibComponent.TAKEPAYMENT === 'false') || (typeof this.paymentLibComponent.TAKEPAYMENT === 'boolean' && !this.paymentLibComponent.TAKEPAYMENT) ) {\n // window.location.href='/refund-list?takePayment=false&refundlist=true';\n this.paymentLibComponent.viewName = 'refund-list';\n }\n else {\n this.loadRefundListPage();\n }\n }\n // loadCaseTransactionPage() {\n // this.paymentLibComponent.isRefundStatusView = false;\n // this.paymentLibCo}mponent.TAKEPAYMENT = true;\n // this.paymentLibComponent.viewName = 'case-transactions';\n // this.paymentViewService.getBSfeature().subscribe(\n // features => {\n // let result = JSON.parse(features).filter(feature => feature.uid === BS_ENABLE_FLAG);\n // this.paymentLibComponent.ISBSENABLE = result[0] ? result[0].enable : false;\n // },\n // err => {\n // this.paymentLibComponent.ISBSENABLE = false;\n // }\n // );\n\n // let partUrl = `selectedOption=${this.paymentLibComponent.SELECTED_OPTION}`;\n // partUrl += this.bsPaymentDcnNumber ? `&dcn=${this.bsPaymentDcnNumber}` : '';\n // partUrl += this.paymentLibComponent.ISBSENABLE ? '&isBulkScanning=Enable' : '&isBulkScanning=Disable';\n // partUrl += this.paymentLibComponent.ISTURNOFF ? '&isTurnOff=Enable' : '&isTurnOff=Disable';\n // partUrl += this.paymentLibComponent.ISSFENABLE ? '&isStFixEnable=Enable' : '&isStFixEnable=Disable';\n // partUrl += `&caseType=${this.paymentLibComponent.CASETYPE}`;\n // partUrl += this.isNewPcipalOff ? '&isNewPcipalOff=Enable' : '&isNewPcipalOff=Disable';\n // partUrl += this.isOldPcipalOff ? '&isOldPcipalOff=Enable' : '&isOldPcipalOff=Disable';\n // let url = `/payment-history/${this.ccdCaseNumber}?view=case-transactions&takePayment=true&${partUrl}`;\n // this.router.navigateByUrl(url);\n // }\n\n resetForm(vals, field) {\n if(field==='action' || field==='all') {\n this.refundActionsHasError = vals[0];\n }\n if(field==='rejectReason' || field==='all') {\n this.refundRejectReasonHasError = vals[1];\n }\n if(field==='addAreason' || field==='all') {\n this.isReasonFieldEmpty = vals[2];\n this.isReasonFieldInvalid = vals[3];\n this.reasonFieldMinHasError = vals[4];\n this.reasonFieldMaxHasError = vals[5];\n }\n if(field==='enterReason' || field==='all') {\n this.isReasonEmpty = vals[6];\n this.isReasonInvalid = vals[7];\n }\n }\n\n goToCaseReview() {\n this.router.navigate([`/cases/case-details/${this.ccdCaseNumber}`], {relativeTo: this.activeRoute});\n }\n}\n","import {Component, OnInit, Input} from '@angular/core';\nimport { RefundsService } from '../../services/refunds/refunds.service';\nimport { IRefundList } from '../../interfaces/IRefundList';\n\n@Component({\n selector: 'ccpay-refund-list',\n templateUrl: './refund-list.component.html',\n styleUrls: ['./refund-list.component.css']\n})\nexport class RefundListComponent implements OnInit {\n @Input('USERID') USERID: string;\n @Input('LOGGEDINUSERROLES') LOGGEDINUSERROLES: any[];\n @Input('LOGGEDINUSEREMAIL') LOGGEDINUSEREMAIL:string;\n\n constructor(private refundService: RefundsService) {\n }\n\n tableApprovalHeader: string;\n tableRejectedHeader: string;\n submittedRefundList: IRefundList[] = [];\n rejectedRefundList: IRefundList[] = [];\n approvalStatus = 'Sent for approval';\n rejectStatus = 'Update required';\n // approvalStatus = 'sent for approval';\n // rejectStatus = 'sent back';\n errorMessage = null;\n isApproveTableVisible:boolean;\n isRejectTableVisible:boolean;\n dropdownvalue: string;\n isAuthorized: boolean = true;\n userLst\n ngOnInit() {\n \n this.userLst = this.LOGGEDINUSERROLES;\n\n \n if(this.LOGGEDINUSERROLES.some(i =>i.includes('payments-refund-approver'))){\n this.isAuthorized = true;\n } else {\n this.isApproveTableVisible = false;\n this.isAuthorized = false;\n }\n\n \n this.tableApprovalHeader = 'Refunds to be approved';\n this.tableRejectedHeader = 'Refunds returned to caseworker';\n\n if(this.isAuthorized) {\n this.refundService.getRefundList(this.approvalStatus,true).subscribe(\n refundList => {\n this.submittedRefundList = refundList['refund_list'];\n this.isApproveTableVisible = true;\n }\n ),\n (error: any) => {\n this.errorMessage = error.replace(/\"/g,\"\");\n };\n }\n\n this.refundService.getRefundList(this.rejectStatus,false).subscribe(\n refundList => {\n this.rejectedRefundList = refundList['refund_list'];\n this.isRejectTableVisible = true;\n }\n ),\n (error: any) => {\n this.errorMessage = error.replace(/\"/g,\"\");\n };\n\n }\n \n}","import { Injectable } from '@angular/core';\nimport {HttpClient} from '@angular/common/http';\nimport {Observable} from 'rxjs/internal/Observable';\n\nimport {ICardDetails} from '../../interfaces/ICardDetails';\nimport {PaymentLibService} from '../../payment-lib.service';\nimport { catchError } from 'rxjs/operators';\nimport { ErrorHandlerService } from '../shared/error-handler.service';\nimport { LoggerService } from '../shared/logger/logger.service';\n\n\n@Injectable({\n providedIn: 'root'\n})\nexport class CardDetailsService {\n\n constructor(private http: HttpClient,\n private logger: LoggerService,\n private errorHandlerService: ErrorHandlerService,\n private paymentLibService: PaymentLibService) { }\n\n getCardDetails(paymentReference: string): Observable<ICardDetails> {\n this.logger.info('Card-detail-service getCardDetails for: ', paymentReference);\n\n return this.http.get<ICardDetails>(`${this.paymentLibService.API_ROOT}/card-payments/${paymentReference}/details`, {\n withCredentials: true\n })\n .pipe(\n catchError(this.errorHandlerService.handleError)\n );\n }\n}\n","import { Component, OnInit } from '@angular/core';\nimport { CardDetailsService } from '../../services/card-details/card-details.service';\nimport {ICardDetails} from '../../interfaces/ICardDetails';\nimport { PaymentLibComponent } from '../../payment-lib.component';\n\n@Component({\n selector: 'ccpay-card-details',\n templateUrl: './card-details.component.html',\n styleUrls: ['./card-details.component.css']\n})\nexport class CardDetailsComponent implements OnInit {\n pageTitle: string = 'Card details';\n cardDetails: ICardDetails;\n paymentReference: string;\n errorMessage: string;\n\n constructor(private cardDetailsService: CardDetailsService,\n private paymentLibComponent: PaymentLibComponent) { }\n\n ngOnInit() {\n this.cardDetailsService.getCardDetails(this.paymentLibComponent.paymentReference).subscribe(\n cardDetails => this.cardDetails = cardDetails,\n (error: any) => this.errorMessage = <any>error\n );\n }\n\n get getPaymentReference(): string {\n return this.paymentReference;\n }\n\n}\n","import { Component } from '@angular/core';\n\n@Component({\n template: `\n <h1>This is not the page you were looking for!</h1>\n `\n})\nexport class PageNotFoundComponent { }\n","import { Injectable } from '@angular/core';\nimport { PaymentLibService } from '../../payment-lib.service';\nimport { HttpClient } from '@angular/common/http';\nimport { IStatusHistories } from '../../interfaces/IStatusHistories';\nimport { Observable } from 'rxjs/internal/Observable';\nimport { ErrorHandlerService } from '../shared/error-handler.service';\nimport { catchError } from 'rxjs/operators';\nimport { LoggerService } from '../shared/logger/logger.service';\n\n\n@Injectable({\n providedIn: 'root'\n})\nexport class StatusHistoryService {\n\n constructor(private http: HttpClient,\n private logger: LoggerService,\n private errorHandlerService: ErrorHandlerService,\n private paymentLibService: PaymentLibService) { }\n\n getPaymentStatusesByReference(paymentReference: string, paymentMethod: string): Observable<IStatusHistories> {\n this.logger.info('Status-history-service getPaymentStatusesByReference for: ', paymentReference);\n\n return this.http.get<IStatusHistories>(paymentMethod === 'card' || paymentMethod === 'cash' || paymentMethod === 'cheque' || paymentMethod === 'postal order' ?\n `${this.paymentLibService.API_ROOT}/card-payments/${paymentReference}/statuses` :\n `${this.paymentLibService.API_ROOT}/credit-account-payments/${paymentReference}/statuses`, {\n withCredentials: true\n })\n .pipe(\n catchError(this.errorHandlerService.handleError)\n );\n }\n}\n","import { Component, OnInit, Input } from '@angular/core';\nimport { IStatusHistories } from '../../interfaces/IStatusHistories';\nimport { StatusHistoryService } from '../../services/status-history/status-history.service';\nimport { PaymentLibComponent } from '../../payment-lib.component';\n\n@Component({\n selector: 'ccpay-payment-statuses',\n templateUrl: './status-history.component.html',\n styleUrls: ['./status-history.component.css']\n})\nexport class StatusHistoryComponent implements OnInit {\n @Input() isTakePayment: boolean;\n pageTitle: string = 'Payment status history';\n statuses: IStatusHistories;\n errorMessage: string;\n\n constructor(private statusHistoryService: StatusHistoryService,\n private paymentLibComponent: PaymentLibComponent) { }\n\n ngOnInit() {\n this.statusHistoryService.getPaymentStatusesByReference(this.paymentLibComponent.paymentReference, this.paymentLibComponent.paymentMethod).subscribe(\n statuses => this.statuses = statuses,\n (error: any) => this.errorMessage = <any>error.replace(/\"/g,\"\")\n );\n \n }\n\n}\n","import { Component, Input, OnInit } from '@angular/core';\nimport { IPayment } from '../../interfaces/IPayment';\n\n@Component({\n selector: 'ccpay-pba-details',\n templateUrl: './pba-details.component.html',\n styleUrls: ['./pba-details.component.css']\n})\nexport class PbaDetailsComponent implements OnInit {\n @Input() payment: IPayment;\n\n constructor() { }\n\n ngOnInit() {\n }\n\n}\n","import { Injectable } from '@angular/core';\nimport { Logger } from './logger.service';\n\nexport let isDebugMode = false;\n\nconst noop = (): any => undefined;\n\n@Injectable({\n providedIn: 'root'\n})\nexport class ConsoleLoggerService implements Logger {\n\n get info() {\n if (isDebugMode) {\n return console.info.bind(console);\n } else {\n return noop;\n }\n }\n\n get warn() {\n if (isDebugMode) {\n return console.warn.bind(console);\n } else {\n return noop;\n }\n }\n\n get error() {\n if (isDebugMode) {\n return console.error.bind(console);\n } else {\n return noop;\n }\n }\n\n invokeConsoleMethod(type: string, args?: any): void {\n const logFn: Function = (console)[type] || console.log || noop;\n logFn.apply(console, [args]);\n }\n}\n","import { Injectable } from '@angular/core';\nimport {HttpClient} from '@angular/common/http';\nimport {LoggerService} from '../shared/logger/logger.service';\nimport {ErrorHandlerService} from '../shared/error-handler.service';\nimport {PaymentLibService} from '../../payment-lib.service';\nimport {Observable} from 'rxjs/Observable';\nimport {IPaymentGroup} from '../../interfaces/IPaymentGroup';\nimport {catchError} from 'rxjs/operators';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class CaseTransactionsService {\n\n constructor(private http: HttpClient,\n private logger: LoggerService,\n private errorHandlerService: ErrorHandlerService,\n private paymentLibService: PaymentLibService\n ) { }\n\n getPaymentGroups(ccdCaseNumber: string): Observable<IPaymentGroup[]> {\n this.logger.info('Case-transactions-service getPaymentGroups for: ', ccdCaseNumber);\n\n return this.http.get<IPaymentGroup[]>(`${this.paymentLibService.API_ROOT}/cases/${ccdCaseNumber}/paymentgroups`, {\n withCredentials: true\n })\n .pipe(\n catchError(this.errorHandlerService.handleError)\n );\n }\n}\n","import { Injectable } from '@angular/core';\nimport {HttpClient} from '@angular/common/http';\nimport {ErrorHandlerService} from '../shared/error-handler.service';\nimport { WebComponentHttpClient } from '../shared/httpclient/webcomponent.http.client';\nimport {PaymentLibService} from '../../payment-lib.service';\nimport {Observable} from 'rxjs/Observable';\nimport {catchError} from 'rxjs/operators';\nimport { IBSPayments } from '../../interfaces/IBSPayments';\nimport { AllocatePaymentRequest } from '../../interfaces/AllocatePaymentRequest';\nimport { IPaymentGroup } from '../../interfaces/IPaymentGroup';\n\n\n@Injectable({\n providedIn: 'root'\n})\nexport class BulkScaningPaymentService {\n\n constructor(private http: HttpClient,\n private https: WebComponentHttpClient,\n private errorHandlerService: ErrorHandlerService,\n private paymentLibService: PaymentLibService\n ) { }\n\n getBSPaymentsByCCD(ccdCaseNumber: string): Observable<IBSPayments> {\n return this.http.get<IBSPayments>(`${this.paymentLibService.BULKSCAN_API_ROOT}/cases/${ccdCaseNumber}`, {\n withCredentials: true\n })\n .pipe(\n catchError(this.errorHandlerService.handleError)\n );\n }\n getBSPaymentsByDCN(dcn: string): Observable<IBSPayments> {\n return this.http.get<IBSPayments>(`${this.paymentLibService.BULKSCAN_API_ROOT}/cases?document_control_number=${dcn}`, {\n withCredentials: true\n })\n .pipe(\n catchError(this.errorHandlerService.handleError)\n );\n }\n postBSAllocatePayment(body: AllocatePaymentRequest, paymentRef: string): Observable<any> {\n return this.https.post(`${this.paymentLibService.API_ROOT}/payment-groups/${paymentRef}/bulk-scan-payments`, body).pipe(\n catchError(this.errorHandlerService.handleError)\n );\n }\n postBSPaymentStrategic(body: AllocatePaymentRequest, paymentGroupRef: string): Observable<any> {\n return this.https.post(`${this.paymentLibService.API_ROOT}/payment-groups/${paymentGroupRef}/bulk-scan-payments-strategic`, body).pipe(\n catchError(this.errorHandlerService.handleError)\n );\n }\n postBSWoPGStrategic(body: AllocatePaymentRequest): Observable<any> {\n return this.https.post(`${this.paymentLibService.API_ROOT}/payment-groups/bulk-scan-payments-strategic`, body).pipe(\n catchError(this.errorHandlerService.handleError)\n );\n }\n patchBSChangeStatus(dcnNumber: string, status: string): Observable<any> {\n return this.https.patch(`${this.paymentLibService.API_ROOT}/bulk-scan-payments/${dcnNumber}/status/${status}`, status).pipe(\n catchError(this.errorHandlerService.handleError)\n );\n }\n calculateOutStandingAmount(paymentGroup: IPaymentGroup): number {\n let feesTotal = 0.00,\n paymentsTotal = 0.00,\n remissionsTotal = 0.00;\n\n if (paymentGroup.fees) {\n paymentGroup.fees.forEach(fee => {\n feesTotal = feesTotal + fee.calculated_amount;\n });\n }\n\n if (paymentGroup.payments) {\n paymentGroup.payments.forEach(payment => {\n if (payment.status.toUpperCase() === 'SUCCESS') {\n paymentsTotal = paymentsTotal + payment.amount;\n }\n });\n }\n\n if (paymentGroup.remissions) {\n paymentGroup.remissions.forEach(remission => {\n remissionsTotal = remissionsTotal + remission.hwf_amount;\n });\n } \n return (feesTotal - remissionsTotal) - paymentsTotal;\n }\n\n removeUnwantedString(input: string, replaceText: string) {\n const pattern = /[\\_]/gi;\n return input.replace(pattern, replaceText);\n }\n\n downloadSelectedReport(reportName: string, startDate: string, endDate:string): Observable<any> {\n return this.https.get(`${this.paymentLibService.BULKSCAN_API_ROOT}/report/data?date_from=${startDate}&date_to=${endDate}&report_type=${reportName}`, {\n withCredentials: true\n })\n .pipe(\n catchError(this.errorHandlerService.handleError)\n );\n}\n}\n","import { Component, OnInit, Input } from '@angular/core';\nimport { PaymentLibComponent } from '../../payment-lib.component';\nimport { IPaymentGroup } from '../../interfaces/IPaymentGroup';\nimport { CaseTransactionsService } from '../../services/case-transactions/case-transactions.service';\nimport { BulkScaningPaymentService } from '../../services/bulk-scaning-payment/bulk-scaning-payment.service';\nimport { PaymentViewService } from '../../services/payment-view/payment-view.service';\nimport { OrderslistService } from '../../services/orderslist.service';\nimport { IFee } from '../../interfaces/IFee';\nimport { IPayment } from '../../interfaces/IPayment';\nimport { IRemission } from '../../interfaces/IRemission';\nimport { IPaymentView } from '../../interfaces/IPaymentView';\nimport { IOrderReferenceFee } from '../../interfaces/IOrderReferenceFee';\nimport { Router } from '@angular/router';\n\nconst BS_ENABLE_FLAG = 'bulk-scan-enabling-fe';\n\n@Component({\n selector: 'ccpay-case-transactions',\n templateUrl: './case-transactions.component.html',\n styleUrls: ['./case-transactions.component.css']\n})\nexport class CaseTransactionsComponent implements OnInit {\n @Input('LOGGEDINUSERROLES') LOGGEDINUSERROLES: string[];\n @Input() isTakePayment: boolean;\n takePayment: boolean;\n ccdCaseNumber: string;\n excReference: string;\n paymentGroups: any[] = [];\n payments: IPayment[] = [];\n nonPayments: IPayment[] = [];\n allPayments: IPayment[] = [];\n remissions: IRemission[] = [];\n fees: IFee[] = [];\n errorMessage: string;\n totalFees: number;\n totalPayments: number;\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 unprocessedRecordCount: number;\n isFeeRecordsExist: boolean = false;\n isGrpOutstandingAmtPositive: boolean = false;\n totalRefundAmount: Number;\n caseType: String;\n // lsCcdNumber: any = ls.get<any>('ccdNumber');\n payment: IPayment;\n paymentGroup: IPaymentGroup;\n paymentView: IPaymentView;\n\n //Order changes\n orderDetail: any[] = [];\n\n isAddRemissionEnable: boolean = false;\n orderRemissionDetails: any[] = [];\n orderLevelFees: IOrderReferenceFee[] = [];\n ispaymentGroupApisuccess: boolean = false;\n cpoDetails: any = null;\n orderRef: string;\n orderStatus: string;\n orderParty: string;\n orderCreated: Date;\n orderCCDEvent: string;\n serviceRequestValue: string;\n orderAddBtnEnable: boolean;\n orderFeesTotal: number = 0.00;\n orderRemissionTotal: number = 0.00;\n orderTotalPayments: number = 0.00;\n orderPendingPayments: number = 0.00;\n isCPODown: boolean;\n test: boolean;\n isPBA: boolean = false;\n isIssueRefunfBtnEnable: boolean = false;\n isAddRemissionBtnEnabled: boolean = false;\n isRefundRemissionBtnEnable: boolean = false;\n allowedRolesToAccessRefund = ['payments-refund-approver', 'payments-refund'];\n isEligible4PBAPayment = ['pui-finance-manager', 'pui-user-manager', 'pui-organisation-manager', 'pui-case-manager'];\n currentDate = new Date();\n isFromServiceRequestPage: boolean;\n navigationpage: string;\n remissionFeeAmt: number;\n constructor(private router: Router,\n private paymentViewService: PaymentViewService,\n private bulkScaningPaymentService: BulkScaningPaymentService,\n private caseTransactionsService: CaseTransactionsService,\n private paymentLibComponent: PaymentLibComponent,\n private OrderslistService: OrderslistService\n ) { }\n\n ngOnInit() {\n this.navigationpage = '';\n if(this.OrderslistService.getpaymentPageView() !== null) {\n this.OrderslistService.getpaymentPageView().subscribe((data) => this.paymentView = data);\n }\n if((this.LOGGEDINUSERROLES === undefined || this.LOGGEDINUSERROLES.length === 0 )&&this.OrderslistService.getUserRolesList() !== null) {\n this.OrderslistService.getUserRolesList().subscribe((data) => this.LOGGEDINUSERROLES = data);\n }\n if(this.OrderslistService.getnavigationPageValue() !== null) {\n this.OrderslistService.getnavigationPageValue().subscribe((data) => this.navigationpage = data);\n }\n \n if (this.paymentView !== undefined && this.paymentView !== null && this.paymentView.payment_group_reference !== undefined && this.navigationpage === 'paymentdetailspage') {\n this.goToPayementView(this.paymentView.payment_group_reference, this.paymentView.reference, this.paymentView.method);\n }\n this.isGrpOutstandingAmtPositive = false;\n this.ccdCaseNumber = this.paymentLibComponent.CCD_CASE_NUMBER;\n this.caseType = this.paymentLibComponent.CASETYPE;\n if (this.paymentLibComponent.CCD_CASE_NUMBER === '') {\n this.ccdCaseNumber = this.paymentLibComponent.EXC_REFERENCE;\n }\n this.excReference = this.paymentLibComponent.EXC_REFERENCE;\n this.takePayment = this.paymentLibComponent.TAKEPAYMENT;\n \n const serviceRequest = this.paymentLibComponent.SERVICEREQUEST;\n if ( serviceRequest !== undefined && serviceRequest.toString() === 'true' ) {\n this.serviceRequestValue = 'true';\n } else {\n this.serviceRequestValue = 'false';\n }\n this.isBulkScanEnable = this.paymentLibComponent.ISBSENABLE;\n this.dcnNumber = this.paymentLibComponent.DCN_NUMBER;\n this.selectedOption = this.paymentLibComponent.SELECTED_OPTION.toLocaleLowerCase();\n this.isTurnOff = this.paymentLibComponent.ISTURNOFF;\n this.isStrategicFixEnable = this.paymentLibComponent.ISSFENABLE;\n if (!this.isTurnOff) {\n // if (this.lsCcdNumber !== this.ccdCaseNumber) {\n // this.router.navigateByUrl(`/ccd-search?takePayment=true`);\n // }\n\n this.caseTransactionsService.getPaymentGroups(this.ccdCaseNumber).subscribe(\n paymentGroups => {\n this.isAnyFeeGroupAvilable =true;\n this.paymentGroups = paymentGroups['payment_groups'];\n this.calculateAmounts();\n this.calculateOrderFeesAmounts();\n this.calculateRefundAmount();\n if (this.isFromServiceRequestPage) {\n this.OrderslistService.getSelectedOrderRefId().subscribe((data) => this.orderRef = data);\n this.goToOrderViewDetailSection(this.orderRef);\n } else {\n this.paymentViewService.getPartyDetails(this.ccdCaseNumber).subscribe(\n response => {\n this.cpoDetails = JSON.parse(response).content[0];\n\n },\n (error: any) => {\n this.errorMessage = <any>error ? error.replace(/\"/g,\"\") : \"\";\n this.isCPODown = true;\n }\n );\n\n }\n\n\n },\n (error: any) => {\n this.errorMessage = <any>error ? error.replace(/\"/g,\"\") : \"\";\n this.isAnyFeeGroupAvilable = false;\n this.setDefaults();\n }\n );\n } else {\n this.caseTransactionsService.getPaymentGroups(this.ccdCaseNumber).subscribe(\n paymentGroups => {\n this.isAnyFeeGroupAvilable =true;\n this.paymentGroups = paymentGroups['payment_groups'];\n this.calculateAmounts();\n this.calculateOrderFeesAmounts();\n this.totalRefundAmount = this.calculateRefundAmount();\n this.paymentViewService.getPartyDetails(this.ccdCaseNumber).subscribe(\n response => {\n this.cpoDetails = JSON.parse(response).content[0];\n\n },\n (error: any) => {\n this.errorMessage = <any>error ? error.replace(/\"/g,\"\") : \"\";\n this.setDefaults();\n this.isCPODown = true;\n }\n );\n\n },\n (error: any) => {\n this.errorMessage = <any>error ? error.replace(/\"/g,\"\") : \"\";\n this.isAnyFeeGroupAvilable = false;\n this.setDefaults();\n }\n );\n }\n\n if( this.paymentGroups !== undefined) {\n this.checkForExceptionRecord();\n }\n\n if(this.OrderslistService.getisFromServiceRequestPages() !== null) {\n this.OrderslistService.getisFromServiceRequestPages().subscribe((data) => this.isFromServiceRequestPage = data);\n }\n\n }\n\n setDefaults(): void {\n this.totalPayments = 0.00;\n this.totalRemissions = 0.00;\n this.totalNonOffPayments = 0.00;\n this.totalFees = 0.00;\n }\n\n getAllocationStatus(payments: any) {\n\n let paymentAllocation = payments.payment_allocation,\n isAllocationStatusExist = paymentAllocation.length > 0;\n return isAllocationStatusExist ? paymentAllocation[0].allocation_status : '-';\n //return \"-\";\n\n }\n\n checkForExceptionRecord(): void {\n\n if (this.paymentGroups.length === 0 && (this.selectedOption.toLocaleLowerCase() === 'ccdorexception' || this.selectedOption.toLocaleLowerCase() === 'rc')) {\n this.bulkScaningPaymentService.getBSPaymentsByCCD(this.ccdCaseNumber).subscribe(\n recordData => {\n if (recordData['data'] && recordData['data'].exception_record_reference && recordData['data'].exception_record_reference.length > 0 && recordData['data'].ccd_reference > 0) {\n this.isExceptionRecord = false;\n this.isAddFeeBtnEnabled = true;\n }\n\n if (recordData['data'] && recordData['data'].exception_record_reference && recordData['data'].exception_record_reference.length > 0 && recordData['data'].ccd_reference === undefined) {\n this.isExceptionRecord = true;\n this.isAddFeeBtnEnabled = false;\n }\n\n if (recordData['data'] && recordData['data'].exception_record_reference && recordData['data'].exception_record_reference.length === undefined && recordData['data'].ccd_reference > 0) {\n this.isExceptionRecord = false;\n this.isAddFeeBtnEnabled = true;\n }\n });\n }\n\n if (this.paymentGroups.length === 0 && this.selectedOption.toLocaleLowerCase() === 'dcn') {\n if (this.paymentLibComponent.CCD_CASE_NUMBER.length > 0 && this.paymentLibComponent.EXC_REFERENCE.length > 0) {\n this.isExceptionRecord = false;\n this.isAddFeeBtnEnabled = true;\n } else if (this.paymentLibComponent.CCD_CASE_NUMBER.length === 0 && this.paymentLibComponent.EXC_REFERENCE.length > 0) {\n this.isExceptionRecord = true;\n this.isAddFeeBtnEnabled = false;\n } else {\n this.isExceptionRecord = false;\n this.isAddFeeBtnEnabled = true;\n }\n }\n if (this.paymentGroups.length > 0)\n this.paymentGroups.forEach(paymentGroup => {\n if (paymentGroup.payments) {\n paymentGroup.payments.forEach(payment => {\n if (payment.case_reference !== undefined && payment.ccd_case_number === undefined) {\n this.isExceptionRecord = true;\n this.isAddFeeBtnEnabled = false;\n } else {\n this.isExceptionRecord = false;\n this.isAddFeeBtnEnabled = true;\n }\n\n });\n }\n });\n }\n\n calculateOrderFeesAmounts(): void {\n let feesTotal = 0.00;\n this.paymentGroups.forEach(paymentGroup => {\n this.resetOrderVariables();\n if (paymentGroup.fees) {\n paymentGroup.fees.forEach(fee => {\n this.orderFeesTotal = this.orderFeesTotal + fee.calculated_amount\n }\n )\n }\n if (paymentGroup.remissions) {\n paymentGroup.remissions.forEach(remission => {\n this.orderRemissionTotal = this.orderRemissionTotal + remission.hwf_amount;\n });\n }\n\n if (paymentGroup.payments) {\n paymentGroup.payments.forEach(payment => {\n if (payment.status.toUpperCase() === 'SUCCESS') {\n this.orderTotalPayments = this.orderTotalPayments + payment.amount;\n }\n });\n }\n\n // this.orderPendingPayments = (this.orderFeesTotal - this.orderRemissionTotal) - this.orderTotalPayments;\n if (paymentGroup.service_request_status === 'Paid') {\n this.orderStatus = paymentGroup.service_request_status;\n this.orderAddBtnEnable = false;\n } else if (paymentGroup.service_request_status === 'Partially paid' || paymentGroup.service_request_status === 'Not paid') {\n this.orderStatus = paymentGroup.service_request_status;\n this.orderAddBtnEnable = true;\n }\n\n //this.orderLevelFees.push({orderRefId:paymentGroup['payment_group_reference'],orderTotalFees: this.orderFeesTotal,orderStatus: this.orderStatus,orderParty:'Santosh', orderCCDEvent:'Case Creation',orderCreated: new Date(), orderAddBtnEnable: this.orderAddBtnEnable}); this.cpoDetails['createdTimestamp']\n if (this.cpoDetails !== null) {\n this.orderLevelFees.push({ orderRefId: paymentGroup['payment_group_reference'], orderTotalFees: this.orderFeesTotal, orderStatus: this.orderStatus, orderParty: this.cpoDetails['responsibleParty'], orderCCDEvent: this.cpoDetails['action'], orderCreated: paymentGroup['date_created'], orderAddBtnEnable: this.orderAddBtnEnable });\n\n } else {\n this.orderLevelFees.push({ orderRefId: paymentGroup['payment_group_reference'], orderTotalFees: this.orderFeesTotal, orderStatus: this.orderStatus, orderParty: '', orderCCDEvent: '', orderCreated: paymentGroup['date_created'], orderAddBtnEnable: this.orderAddBtnEnable });\n }\n\n if (this.orderStatus !== 'Paid') {\n this.OrderslistService.setOrdersList(this.orderLevelFees);\n }\n });\n };\n\n resetOrderVariables(): void {\n this.orderFeesTotal = 0.00;\n this.orderTotalPayments = 0.00;\n this.orderRemissionTotal = 0.00;\n this.orderPendingPayments = 0.00;\n this.isAddFeeBtnEnabled = true;\n\n };\n\n goToOrderViewDetailSection(orderReferenceObj: any) {\n if (this.isFromServiceRequestPage) {\n this.OrderslistService.setOrderRefId(orderReferenceObj);\n this.orderRef = orderReferenceObj;\n } else {\n this.OrderslistService.setOrderRefId(orderReferenceObj.orderRefId);\n this.orderRef = orderReferenceObj.orderRefId;\n }\n\n this.orderFeesTotal = 0.00;\n this.orderRemissionTotal = 0.00;\n this.orderTotalPayments = 0.00;\n this.orderPendingPayments = 0.00;\n\n this.orderDetail = this.paymentGroups.filter(x => x.payment_group_reference === this.orderRef);\n this.orderDetail.forEach(orderDetail => {\n if (orderDetail.fees) {\n orderDetail.fees.forEach(fee => {\n this.orderFeesTotal = this.orderFeesTotal + fee.calculated_amount;\n });\n }\n if (orderDetail.remissions) {\n orderDetail.remissions.forEach(remission => {\n this.orderRemissionTotal = this.orderRemissionTotal + remission.hwf_amount;\n });\n if (orderDetail.payments) {\n this.payment = orderDetail.payments[0];\n orderDetail.payments.forEach(payment => {\n if (payment.status.toUpperCase() === 'SUCCESS') {\n this.orderTotalPayments = this.orderTotalPayments + payment.amount;\n }\n });\n }\n }\n this.orderStatus = orderDetail.service_request_status;\n });\n //this.orderPendingPayments = (this.orderFeesTotal - this.orderRemissionTotal) - this.orderTotalPayments;\n // this.orderRef = orderReferenceObj.orderRefId;\n // if (this.orderPendingPayments <= 0.00) {\n // this.orderStatus = 'Paid';\n // } else if (this.orderFeesTotal > 0 && (this.orderTotalPayments > 0 || this.orderRemissionTotal > 0) && (this.orderTotalPayments < this.orderPendingPayments)) {\n // this.orderStatus = 'Partially paid'\n // } else {\n // this.orderStatus = 'Not paid'\n // }\n\n\n if (this.cpoDetails !== null) {\n this.orderParty = this.cpoDetails['responsibleParty'];\n this.orderCreated = this.cpoDetails['createdTimestamp'];\n this.orderCCDEvent = this.cpoDetails['action'];\n } else {\n this.orderParty = '';\n this.orderCCDEvent = '';\n this.orderCreated = orderReferenceObj.orderCreated;\n }\n this.viewStatus = 'order-full-view';\n }\n\n redirectToOrderFeeSearchPage(event: any, orderef: any) {\n if(orderef.orderAddBtnEnable) {\n event.preventDefault();\n this.paymentLibComponent.bspaymentdcn = null;\n this.paymentLibComponent.paymentGroupReference = orderef.orderRefId;\n this.paymentLibComponent.isTurnOff = this.isTurnOff;\n this.paymentLibComponent.viewName = 'fee-summary';\n }\n }\n\n\n\n\n calculateAmounts(): void {\n let feesTotal = 0.00,\n paymentsTotal = 0.00,\n remissionsTotal = 0.00,\n nonOffLinePayment = 0.00;\n\n this.paymentGroups.forEach(paymentGroup => {\n if (paymentGroup.fees) {\n paymentGroup.fees.forEach(fee => {\n // new feature Apportionment toggle changes\n if (!this.isTurnOff) {\n if (fee.date_created) {\n let a = fee.amount_due === undefined;\n let b = fee.amount_due <= 0;\n this.clAmountDue = a ? this.clAmountDue + fee.net_amount : b ? this.clAmountDue + 0 : this.clAmountDue + fee.amount_due;\n }\n fee['payment_group_reference'] = paymentGroup['payment_group_reference'];\n this.fees.push(fee);\n } else {\n feesTotal = feesTotal + fee.calculated_amount;\n this.fees.push(fee);\n }\n\n });\n }\n if (this.isTurnOff) {\n this.totalFees = feesTotal;\n }\n\n if (paymentGroup.payments) {\n paymentGroup.payments.forEach(payment => {\n // new feature Apportionment toggle changes\n if (!this.isTurnOff) {\n let allocationLen = payment.payment_allocation;\n\n if (payment.status.toUpperCase() === 'SUCCESS') {\n paymentsTotal = paymentsTotal + payment.amount;\n if (allocationLen.length === 0 || allocationLen.length > 0 && allocationLen[0].allocation_status === 'Allocated') {\n nonOffLinePayment = nonOffLinePayment + payment.amount;\n }\n if (allocationLen.length > 0) {\n this.nonPayments.push(payment);\n }\n }\n if (allocationLen.length === 0) {\n this.payments.push(payment);\n }\n payment.paymentGroupReference = paymentGroup.payment_group_reference\n this.allPayments.push(payment);\n } else {\n if (payment.status.toUpperCase() === 'SUCCESS') {\n paymentsTotal = paymentsTotal + payment.amount;\n this.payments.push(payment);\n }\n payment.paymentGroupReference = paymentGroup.payment_group_reference\n this.allPayments.push(payment);\n }\n });\n }\n this.totalPayments = paymentsTotal;\n // new feature Apportionment toggle changes\n if (!this.isTurnOff) {\n this.totalNonOffPayments = nonOffLinePayment;\n }\n\n if (paymentGroup.remissions) {\n paymentGroup.remissions.forEach(remisison => {\n remissionsTotal = remissionsTotal + remisison.hwf_amount;\n this.remissions.push(remisison);\n });\n }\n this.totalRemissions = remissionsTotal;\n });\n\n }\n\n calculateRefundAmount() {\n if (!this.isTurnOff) {\n let isNewPaymentGroup = false;\n\n this.paymentGroups.forEach((paymentGroup, index) => {\n let grpOutstandingAmount = 0.00,\n feesTotal = 0.00,\n paymentsTotal = 0.00,\n remissionsTotal = 0.00,\n fees = [];\n\n if (paymentGroup.fees) {\n // this.isFeeRecordsExist = true;\n paymentGroup.fees.forEach(fee => {\n feesTotal = feesTotal + fee.calculated_amount;\n\n this.isRemissionsMatch = false;\n if (paymentGroup.remissions) {\n paymentGroup.remissions.forEach(rem => {\n if (rem.fee_code === fee.code) {\n this.isRemissionsMatch = true;\n fee['remissions'] = rem;\n // if(!fees.find(k => k.code=fee.code))\n // {\n fees.push(fee);\n //}\n }\n });\n }\n if (!this.isRemissionsMatch) {\n fees.push(fee);\n }\n\n if (fee.date_created) {\n isNewPaymentGroup = true;\n } else {\n this.isHistoricGroupAvailable = true;\n this.paymentGroups[index]['old'] = true;\n }\n });\n this.paymentGroups[index].fees = fees;\n }\n if (paymentGroup.payments) {\n paymentGroup.payments.forEach(payment => {\n if (payment.status.toUpperCase() === 'SUCCESS') {\n paymentsTotal = paymentsTotal + payment.amount;\n }\n });\n }\n\n if (paymentGroup.remissions) {\n paymentGroup.remissions.forEach(remission => {\n remissionsTotal = remissionsTotal + remission.hwf_amount;\n });\n }\n grpOutstandingAmount = (feesTotal - remissionsTotal) - paymentsTotal;\n if (grpOutstandingAmount > 0 && isNewPaymentGroup) {\n this.isAnyFeeGroupAvilable = true;\n this.isFeeRecordsExist = true;\n this.paymentRef = paymentGroup.payment_group_reference;\n }\n if (paymentGroup.fees && paymentGroup.fees.length > 0 && grpOutstandingAmount <= 0 && isNewPaymentGroup) {\n this.isAnyFeeGroupAvilable = false;\n }\n });\n if ((!isNewPaymentGroup && this.isHistoricGroupAvailable) || (!isNewPaymentGroup && !this.isHistoricGroupAvailable)) {\n this.isAnyFeeGroupAvilable = false;\n }\n } else {\n let totalRefundAmount = 0,\n isFeeAmountZero = false;\n this.paymentGroups.forEach(paymentGroup => {\n let grpOutstandingAmount = 0.00,\n feesTotal = 0.00,\n paymentsTotal = 0.00,\n remissionsTotal = 0.00;\n if (paymentGroup.fees) {\n this.isFeeRecordsExist = true;\n paymentGroup.fees.forEach(fee => {\n feesTotal = feesTotal + fee.calculated_amount;\n if (fee.calculated_amount === 0) {\n isFeeAmountZero = true\n }\n });\n\n }\n\n if (paymentGroup.payments) {\n paymentGroup.payments.forEach(payment => {\n if (payment.status.toUpperCase() === 'SUCCESS') {\n paymentsTotal = paymentsTotal + payment.amount;\n }\n });\n }\n\n if (paymentGroup.remissions) {\n paymentGroup.remissions.forEach(remission => {\n remissionsTotal = remissionsTotal + remission.hwf_amount;\n });\n }\n grpOutstandingAmount = (feesTotal - remissionsTotal) - paymentsTotal;\n if (grpOutstandingAmount < 0) {\n if (totalRefundAmount === 0) {\n totalRefundAmount = grpOutstandingAmount;\n } else {\n totalRefundAmount = (totalRefundAmount + grpOutstandingAmount);\n }\n }\n else if (grpOutstandingAmount > 0 || (grpOutstandingAmount === 0 && isFeeAmountZero)) {\n this.isGrpOutstandingAmtPositive = true;\n }\n });\n return totalRefundAmount * -1;\n }\n }\n\n getGroupOutstandingAmount(paymentGroup: IPaymentGroup): number {\n return this.bulkScaningPaymentService.calculateOutStandingAmount(paymentGroup);\n }\n\n redirectToFeeSearchPage(event: any) {\n event.preventDefault();\n let url = this.isBulkScanEnable ? '&isBulkScanning=Enable' : '&isBulkScanning=Disable';\n url += this.isTurnOff ? '&isTurnOff=Enable' : '&isTurnOff=Disable';\n url += this.isStrategicFixEnable ? '&isStFixEnable=Enable' : '&isStFixEnable=Disable';\n url += `&caseType=${this.caseType}`\n this.router.navigateByUrl(`/fee-search?selectedOption=${this.selectedOption}&ccdCaseNumber=${this.ccdCaseNumber}${url}`);\n }\n\n addRemission(fee: IFee) {\n if(this.chkForAddRemission(fee.code)) {\n this.feeId = fee;\n this.viewStatus = 'addremission';\n this.paymentViewService.getApportionPaymentDetails(this.payment.reference).subscribe(\n paymentGroup => {\n this.paymentGroup = paymentGroup;\n\n this.paymentGroup.payments = this.paymentGroup.payments.filter\n (paymentGroupObj => paymentGroupObj['reference'].includes(this.paymentLibComponent.paymentReference));\n this.payment = this.paymentGroup.payments[0];\n // const paymentAllocation = this.paymentGroup.payments[0].payment_allocation;\n // this.isStatusAllocated = paymentAllocation.length > 0 && paymentAllocation[0].allocation_status === 'Allocated' || paymentAllocation.length === 0;\n },\n (error: any) => this.errorMessage = error? error.replace(/\"/g,\"\") : \"\"\n );\n }\n }\n\n addRefundForRemission(payment: IPayment, remission: IRemission[],fees:any) {\n this.viewStatus = 'addrefundforremission';\n\n this.payment = payment;\n this.paymentViewService.getApportionPaymentDetails(this.payment.reference).subscribe(\n paymentGroup => {\n this.paymentGroup = paymentGroup;\n\n this.paymentGroup.payments = this.paymentGroup.payments.filter\n (paymentGroupObj => paymentGroupObj['reference'].includes(this.payment.reference));\n this.payment = this.paymentGroup.payments[0];\n this.remissions = remission;\n this.remissionFeeAmt = fees.filter(data=>data.code === this.remissions['fee_code'])[0].net_amount;\n // const paymentAllocation = this.paymentGroup.payments[0].payment_allocation;\n // this.isStatusAllocated = paymentAllocation.length > 0 && paymentAllocation[0].allocation_status === 'Allocated' || paymentAllocation.length === 0;\n },\n (error: any) => this.errorMessage = error\n );\n }\n\n redirectToremissionPage(event: any) {\n event.preventDefault();\n this.paymentLibComponent.viewName = 'remission'\n }\n goToServiceRequestPage() {\n this.paymentLibComponent.viewName = 'case-transactions';\n this.paymentLibComponent.TAKEPAYMENT = false;\n this.paymentLibComponent.SERVICEREQUEST = 'true';\n this.paymentLibComponent.isFromServiceRequestPage = true;\n window.location.reload();\n }\n redirectToReportsPage(event: any) {\n event.preventDefault();\n this.router.navigateByUrl(`/reports?selectedOption=${this.selectedOption}&ccdCaseNumber=${this.ccdCaseNumber}`);\n }\n\n loadFeeSummaryPage(paymentGroup: IPaymentGroup) {\n this.paymentLibComponent.bspaymentdcn = null;\n this.paymentLibComponent.paymentGroupReference = paymentGroup.payment_group_reference;\n this.paymentLibComponent.isTurnOff = this.isTurnOff;\n this.paymentLibComponent.viewName = 'fee-summary';\n }\n\n goToPaymentViewComponent(paymentGroup: any) {\n this.paymentLibComponent.paymentMethod = paymentGroup.paymentMethod;\n this.paymentLibComponent.paymentGroupReference = paymentGroup.paymentGroupReference;\n this.paymentLibComponent.paymentReference = paymentGroup.paymentReference;\n this.paymentLibComponent.viewName = 'payment-view';\n }\n\n goToPayementView(paymentGroupReference: string, paymentReference: string, paymentMethod: string) {\n this.goToPaymentViewComponent({ paymentGroupReference, paymentReference, paymentMethod });\n }\n\n selectedUnprocessedFeeEvent(unprocessedRecordId: string) {\n if (unprocessedRecordId) {\n if (this.isTurnOff) {\n this.isAddFeeBtnEnabled = false;\n }\n this.isUnprocessedRecordSelected = true;\n } else {\n if (this.isTurnOff) {\n this.isAddFeeBtnEnabled = true;\n }\n this.isUnprocessedRecordSelected = false;\n }\n }\n\n getUnprocessedFeeCount(unProcessedRecordCount: number) {\n this.unprocessedRecordCount = unProcessedRecordCount;\n }\n\n calculateAmountDue(fee: IFee) {\n\n if (fee.date_created) {\n return fee.amount_due !== undefined ? fee.amount_due : fee.net_amount;\n } else {\n return \"0.00\";\n }\n }\n\n confirmRemoveFee(fee: IFee) {\n this.isRemoveBtnDisabled = false;\n this.feeId = fee;\n this.viewStatus = 'feeRemovalConfirmation';\n }\n\n cancelRemoval() {\n this.viewStatus = 'main';\n }\n\n removeFee(fee: any) {\n this.isRemoveBtnDisabled = true;\n this.paymentViewService.deleteFeeFromPaymentGroup(fee).subscribe(\n (success: any) => {\n window.location.reload();\n },\n (error: any) => {\n this.errorMessage = error;\n this.isRemoveBtnDisabled = false;\n }\n );\n }\n\n isCheckAmountdueExist(amountDue: any) {\n return typeof amountDue === 'undefined';\n }\n\n issueRefund(payment: IPayment) {\n if (payment !== null && payment !== undefined) {\n if(this.chkIssueRefundBtnEnable(payment)) {\n this.viewStatus = 'issuerefund';\n this.payment = payment;\n this.paymentLibComponent.isFromServiceRequestPage = true;\n this.isRefundRemission = true;\n }\n }\n }\n\n chkForAddRemission(feeCode: string): boolean {\n if (this.chkForPBAPayment() && this.check4AllowedRoles2AccessRefund()) {\n if (this.orderDetail[0]['remissions'].length > 0) {\n for (const remission of this.orderDetail[0]['remissions']) {\n if (remission.fee_code === feeCode) {\n return false;\n }\n }\n }\n return true;\n } else {\n return false;\n }\n }\n\n chkForPBAPayment(): boolean {\n if (this.orderDetail !== null && this.orderDetail !== undefined) {\n this.orderDetail.forEach(orderDetail => {\n if (orderDetail.payments) {\n orderDetail.payments.forEach(payment => {\n if (payment.method.toLocaleLowerCase() === 'payment by account' && this.allowFurtherAccessAfter4Days(payment)) {\n this.isPBA = true;\n }\n });\n }\n });\n if (this.isPBA) {\n return true;\n } else {\n return false;\n };\n }\n }\n\n chkIssueRefundBtnEnable(payment: IPayment): boolean {\n if (this.check4AllowedRoles2AccessRefund() && this.allowFurtherAccessAfter4Days(payment) &&\n payment.method === 'payment by account' && payment.status.toLocaleLowerCase() === 'success') {\n this.isIssueRefunfBtnEnable = true;\n }\n if (this.isIssueRefunfBtnEnable) {\n return true;\n } else {\n return false;\n };\n }\n\n chkIsRefundRemissionBtnEnable(): boolean {\n if (this.orderDetail !== null && this.orderDetail !== undefined) {\n this.paymentLibComponent.isFromServiceRequestPage = true;\n this.orderDetail.forEach(orderDetail => {\n if (orderDetail.payments) {\n orderDetail.payments.forEach(payment => {\n if (payment.method.toLocaleLowerCase() === 'payment by account' && payment.status.toLocaleLowerCase() === 'success' && this.allowFurtherAccessAfter4Days(payment)) {\n this.isRefundRemissionBtnEnable = true;\n }\n });\n }\n });\n if (this.isRefundRemissionBtnEnable) {\n return true;\n } else {\n return false;\n };\n }\n }\n\n check4AllowedRoles2AccessRefund = (): boolean => {\n return this.allowedRolesToAccessRefund.some(role =>\n this.LOGGEDINUSERROLES.indexOf(role) !== -1\n );\n }\n check4AllowedRoles2AccessPBApayment = (): boolean => {\n return this.isEligible4PBAPayment.some(role =>\n this.LOGGEDINUSERROLES.indexOf(role) !== -1\n );\n }\n\n allowFurtherAccessAfter4Days = (payment: IPayment): boolean => {\n if (payment !== null && payment !== undefined) {\n let tmp4DayAgo = new Date();\n tmp4DayAgo.setDate(tmp4DayAgo.getDate() - 4);\n return tmp4DayAgo >= new Date(payment.date_created);\n }\n }\n\n loadPBAAccountPage(orderRef: IPayment) {\n this.paymentLibComponent.pbaPayOrderRef = orderRef;\n this.paymentLibComponent.viewName = 'pba-payment';\n }\n}\n","export class PaymentToPayhubRequest {\n currency = 'GBP';\n description = 'PayBubble payment';\n channel = 'telephony';\n provider = 'pci pal';\n case_type: string;\n\n ccd_case_number: string;\n amount: number;\n\n constructor(ccd_case_number: string, amount: number, caseType: string) {\n this.ccd_case_number = ccd_case_number;\n this.amount = <any>amount.toFixed(2);\n this.case_type= caseType;\n }\n}\n","export class PayhubAntennaRequest {\n currency = 'GBP';\n case_type: string;\n ccd_case_number: string;\n amount: number;\n\n constructor(ccd_case_number: string, amount: number, caseType: string) {\n this.ccd_case_number = ccd_case_number;\n this.amount = <any>amount.toFixed(2);\n this.case_type= caseType;\n }\n}\n","import { Component, OnInit, Input } from '@angular/core';\nimport { IPaymentGroup } from '../../interfaces/IPaymentGroup';\nimport { PaymentViewService } from '../../services/payment-view/payment-view.service';\nimport { BulkScaningPaymentService } from '../../services/bulk-scaning-payment/bulk-scaning-payment.service';\nimport { PaymentLibComponent } from '../../payment-lib.component';\nimport { IRemission } from '../../interfaces/IRemission';\nimport { IFee } from '../../interfaces/IFee';\nimport { PaymentToPayhubRequest } from '../../interfaces/PaymentToPayhubRequest';\nimport { PayhubAntennaRequest } from '../../interfaces/PayhubAntennaRequest';\nimport { SafeHtml } from '@angular/platform-browser';\nimport {Router} from '@angular/router';\nimport {Location} from '@angular/common';\nimport { OrderslistService } from '../../services/orderslist.service';\n\nconst BS_ENABLE_FLAG = 'bulk-scan-enabling-fe';\n\n@Component({\n selector: 'ccpay-fee-summary',\n templateUrl: './fee-summary.component.html',\n styleUrls: ['./fee-summary.component.scss']\n})\n\nexport class FeeSummaryComponent implements OnInit {\n @Input() paymentGroupRef: string;\n @Input() ccdCaseNumber: string;\n @Input() isTurnOff: string;\n @Input() caseType: string;\n\n\n bsPaymentDcnNumber: string;\n paymentGroup: IPaymentGroup;\n errorMessage: string;\n viewStatus = 'main';\n currentFee: IFee;\n totalFee: number;\n payhubHtml: SafeHtml;\n service: string = \"\";\n platForm: string = \"\";\n upPaymentErrorMessage: string;\n selectedOption:string;\n isBackButtonEnable: boolean = true;\n outStandingAmount: number;\n isFeeAmountZero: boolean = false;\n totalAfterRemission: number = 0;\n isConfirmationBtnDisabled: boolean = false;\n isRemoveBtnDisabled: boolean = false;\n isPaymentExist: boolean = false;\n isRemissionsExist: Boolean = false;\n isRemissionsMatch = false;\n isStrategicFixEnable: boolean;\n\n constructor(\n private router: Router,\n private bulkScaningPaymentService: BulkScaningPaymentService,\n private location: Location,\n private paymentViewService: PaymentViewService,\n private paymentLibComponent: PaymentLibComponent,\n private OrderslistService: OrderslistService\n ) {}\n\n ngOnInit() {\n this.viewStatus = 'main';\n this.caseType = this.paymentLibComponent.CASETYPE;\n this.bsPaymentDcnNumber = this.paymentLibComponent.bspaymentdcn;\n this.selectedOption = this.paymentLibComponent.SELECTED_OPTION.toLocaleLowerCase();\n this.isStrategicFixEnable = this.paymentLibComponent.ISSFENABLE;\n this.OrderslistService.setCaseType(this.paymentLibComponent.CASETYPE);\n\n this.platForm = 'Antenna';\n\n this.paymentViewService.getBSfeature().subscribe(\n features => {\n let result = JSON.parse(features).filter(feature => feature.uid === BS_ENABLE_FLAG);\n this.paymentLibComponent.ISBSENABLE = result[0] ? result[0].enable : false;\n },\n err => {\n this.paymentLibComponent.ISBSENABLE = false;\n }\n );\n if (this.bsPaymentDcnNumber) {\n this.getUnassignedPaymentlist();\n }\n this.getPaymentGroup();\n }\n\n getUnassignedPaymentlist() {\n if (this.selectedOption === 'dcn') {\n this.bulkScaningPaymentService.getBSPaymentsByDCN(this.paymentLibComponent.DCN_NUMBER).subscribe(\n unassignedPayments => {\n if(unassignedPayments['data'].payments) {\n this.service = unassignedPayments['data'].responsible_service_id;\n } else {\n this.upPaymentErrorMessage = 'error';\n }\n },\n (error: any) => this.upPaymentErrorMessage = error\n );\n } else {\n this.bulkScaningPaymentService.getBSPaymentsByCCD(this.ccdCaseNumber).subscribe(\n unassignedPayments => {\n if(unassignedPayments['data'].payments) {\n this.service = unassignedPayments['data'].responsible_service_id;\n } else {\n this.upPaymentErrorMessage = 'error';\n }\n },\n (error: any) => this.upPaymentErrorMessage = error\n );\n }\n\n }\n\n getRemissionByFeeCode(feeCode: string): IRemission {\n if (this.paymentGroup && this.paymentGroup.remissions && this.paymentGroup.remissions.length > 0) {\n for (const remission of this.paymentGroup.remissions) {\n if (remission.fee_code === feeCode) {\n return remission;\n }\n }\n }\n return null;\n }\n\n addRemission(fee: IFee) {\n this.currentFee = fee;\n this.viewStatus = 'add_remission';\n }\n\n getPaymentGroup() {\n let fees = [];\n this.paymentViewService.getPaymentGroupDetails(this.paymentGroupRef).subscribe(\n paymentGroup => {\n this.paymentGroup = paymentGroup;\n this.isPaymentExist = paymentGroup.payments ? paymentGroup.payments.length > 0 : false;\n this.isRemissionsExist = paymentGroup.remissions ? paymentGroup.remissions.length > 0 : false;\n\n if (paymentGroup.fees) {\n paymentGroup.fees.forEach(fee => {\n this.totalAfterRemission = this.totalAfterRemission + fee.net_amount;\n if(fee.calculated_amount === 0) {\n this.isFeeAmountZero = true;\n }\n this.isRemissionsMatch = false;\n paymentGroup.remissions.forEach(rem => {\n if(rem.fee_code === fee.code) {\n this.isRemissionsMatch = true;\n fee['remissions'] = rem;\n fees.push(fee);\n }\n });\n\n if(!this.isRemissionsMatch) {\n fees.push(fee);\n }\n });\n paymentGroup.fees = fees;\n }\n\n this.outStandingAmount = this.bulkScaningPaymentService.calculateOutStandingAmount(paymentGroup);\n },\n (error: any) => this.errorMessage = error.replace(/\"/g,\"\")\n );\n }\n\n confirmRemoveFee(fee: IFee){\n this.isRemoveBtnDisabled = false;\n this.currentFee = fee;\n this.viewStatus = 'feeRemovalConfirmation';\n }\n\n removeFee(fee: any){\n this.isRemoveBtnDisabled = true;\n this.paymentViewService.deleteFeeFromPaymentGroup(fee).subscribe(\n (success: any) => {\n if (this.paymentGroup.fees && this.paymentGroup.fees.length > 1){\n this.totalAfterRemission = 0;\n this.getPaymentGroup();\n this.viewStatus = 'main';\n return;\n }\n this.loadCaseTransactionPage();\n },\n (error: any) => {\n this.errorMessage = error;\n this.isRemoveBtnDisabled = false;\n }\n );\n }\n\n loadCaseTransactionPage() {\n this.paymentLibComponent.TAKEPAYMENT = true;\n this.paymentLibComponent.viewName = 'case-transactions';\n this.paymentViewService.getBSfeature().subscribe(\n features => {\n let result = JSON.parse(features).filter(feature => feature.uid === BS_ENABLE_FLAG);\n this.paymentLibComponent.ISBSENABLE = result[0] ? result[0].enable : false;\n },\n err => {\n this.paymentLibComponent.ISBSENABLE = false;\n }\n );\n\n let partUrl = `selectedOption=${this.paymentLibComponent.SELECTED_OPTION}`;\n partUrl +=this.bsPaymentDcnNumber ? `&dcn=${this.bsPaymentDcnNumber}` : '';\n partUrl +=this.paymentLibComponent.ISBSENABLE ? '&isBulkScanning=Enable' : '&isBulkScanning=Disable';\n partUrl +=this.paymentLibComponent.ISTURNOFF ? '&isTurnOff=Enable' : '&isTurnOff=Disable';\n partUrl +=this.paymentLibComponent.ISSFENABLE ? '&isStFixEnable=Enable' : '&isStFixEnable=Disable';\n partUrl +=`&caseType=${this.paymentLibComponent.CASETYPE}`;\n\n let url = `/payment-history/${this.ccdCaseNumber}?view=case-transactions&takePayment=true&${partUrl}`;\n this.router.navigateByUrl(url);\n }\n cancelRemission() {\n this.viewStatus = 'main';\n }\n redirectToFeeSearchPage(event: any, page?: string) {\n event.preventDefault();\n let partUrl =this.bsPaymentDcnNumber ? `&dcn=${this.bsPaymentDcnNumber}` : '';\n partUrl +=this.paymentLibComponent.ISBSENABLE ? '&isBulkScanning=Enable' : '&isBulkScanning=Disable';\n partUrl +=this.paymentLibComponent.ISTURNOFF ? '&isTurnOff=Enable' : '&isTurnOff=Disable';\n partUrl +=this.paymentLibComponent.ISSFENABLE ? '&isStFixEnable=Enable' : '&isStFixEnable=Disable';\n partUrl +=`&caseType=${this.paymentLibComponent.CASETYPE}`;\n\n if(this.viewStatus === 'feeRemovalConfirmation' || this.viewStatus === 'add_remission') {\n this.viewStatus = 'main';\n return;\n }\n let url = `/fee-search?ccdCaseNumber=${this.ccdCaseNumber}&selectedOption=${this.paymentLibComponent.SELECTED_OPTION}&paymentGroupRef=${this.paymentGroupRef}${partUrl}`;\n this.router.navigateByUrl(url);\n }\n takePayment() {\n this.isConfirmationBtnDisabled = true;\n const requestBody = new PaymentToPayhubRequest(this.ccdCaseNumber, this.outStandingAmount, this.caseType),\n antennaReqBody = new PayhubAntennaRequest(this.ccdCaseNumber, this.outStandingAmount, this.caseType);\n\n if(this.platForm === 'Antenna') {\n\n this.paymentViewService.postPaymentAntennaToPayHub(antennaReqBody, this.paymentGroupRef).subscribe(\n response => {\n this.isBackButtonEnable=false;\n window.location.href = '/makePaymentByTelephoneyProvider';\n },\n (error: any) => {\n this.errorMessage = error;\n this.isConfirmationBtnDisabled = false;\n this.router.navigateByUrl('/pci-pal-failure');\n }\n );\n }\n\n }\n\n goToAllocatePage(outStandingAmount: number, isFeeAmountZero: Boolean) {\n if (outStandingAmount > 0 || (outStandingAmount === 0 && isFeeAmountZero)) {\n this.paymentLibComponent.paymentGroupReference = this.paymentGroupRef;\n this.paymentLibComponent.viewName = 'allocate-payments';\n } else {\n this.loadCaseTransactionPage();\n }\n }\n isCheckAmountdueExist(amountDue: any) {\n return typeof amountDue === 'undefined';\n }\n}\n","import { Component, OnInit, Input } from '@angular/core';\n\n\n\n@Component({\n selector: 'ccpay-error-banner',\n templateUrl: './error-banner.component.html',\n styleUrls: ['./error-banner.component.scss']\n})\n\nexport class ErrorBannerComponent implements OnInit {\n @Input('errorMessage') errorMessage;\n\n constructor(\n ) {}\n\n ngOnInit() {\n\n }\n}\n","\nexport class UnidentifiedPaymentsRequest {\n payment_allocation_status: any;\n payment_group_reference: string;\n payment_reference: string;\n unidentified_reason: string;\n\n constructor(payment_group_reference: string, payment_reference : string, unidentified_reason: any) {\n this.payment_allocation_status = {\n description: '',\n name: \"Unidentified\"\n };\n this.payment_group_reference = payment_group_reference ;\n this.payment_reference= payment_reference;\n this.unidentified_reason= unidentified_reason;\n\n }\n\n\n\n}\n","import { IBSPayments } from \"./IBSPayments\";\n\nexport class AllocatePaymentRequest {\n amount: Number;\n banked_date: String;\n ccd_case_number: String;\n exception_record: string;\n currency: String;\n document_control_number: String;\n external_provider: String;\n giro_slip_no: String;\n payer_name: String;\n payment_channel: Object;\n payment_status: Object;\n payment_method: String;\n case_type: String;\n payment_allocation_dto?: {\n allocation_reason: String,\n allocation_status: String,\n explanation: String,\n payment_allocation_status: Object,\n payment_group_reference: String,\n payment_reference: String,\n reason: String,\n receiving_office: String,\n unidentified_reason: String,\n user_id: String,\n user_name: String,\n case_type: String\n }\n\n constructor(ccd_case_number : string, unAllocatedPayment: IBSPayments, caseType: string, exceptionRecord: string, allocatedRequest?: any) {\n this.amount = unAllocatedPayment.amount;\n this.banked_date = unAllocatedPayment.date_banked;\n this.ccd_case_number = ccd_case_number;\n this.exception_record = exceptionRecord;\n this.currency= unAllocatedPayment.currency;\n this.document_control_number = unAllocatedPayment.dcn_reference;\n this.external_provider = 'exela';\n this.giro_slip_no = unAllocatedPayment.bgc_reference;\n this.payer_name = unAllocatedPayment.payer_name;\n this.payment_channel = {\n description: '',\n name: 'bulk scan'\n };\n this.payment_status ={\n description: 'bulk scan payment completed',\n name: 'success'\n }\n this.payment_method = unAllocatedPayment.payment_method;\n this.case_type= caseType;\n if(allocatedRequest) {\n this.payment_allocation_dto = allocatedRequest;\n }\n\n }\n}\n","import { Component, OnInit, Input } from '@angular/core';\nimport { FormBuilder, FormGroup, Validators, FormControl } from '@angular/forms';\nimport { PaymentLibComponent } from '../../payment-lib.component';\nimport { PaymentViewService } from '../../services/payment-view/payment-view.service';\nimport {BulkScaningPaymentService} from '../../services/bulk-scaning-payment/bulk-scaning-payment.service';\nimport { IBSPayments } from '../../interfaces/IBSPayments';\nimport { UnidentifiedPaymentsRequest } from '../../interfaces/UnidentifiedPaymentsRequest';\nimport { AllocatePaymentRequest } from '../../interfaces/AllocatePaymentRequest';\n\n@Component({\n selector: 'app-mark-unidentified-payment',\n templateUrl: './mark-unidentified-payment.component.html',\n styleUrls: ['./mark-unidentified-payment.component.scss']\n})\nexport class MarkUnidentifiedPaymentComponent implements OnInit {\n @Input() caseType: string;\n markPaymentUnidentifiedForm: FormGroup;\n viewStatus: string;\n ccdCaseNumber: string;\n bspaymentdcn: string;\n isInvesticationDetailEmpty: boolean = false;\n investicationDetailHasError: boolean = false;\n investicationDetailMinHasError: boolean = false;\n investicationDetailMaxHasError: boolean = false;\n errorMessage = this.getErrorMessage(false);\n unassignedRecord:IBSPayments;\n siteID: string = null;\n investigationComment: string;\n isConfirmButtondisabled:Boolean = false;\n ccdReference: string = null;\n exceptionReference: string = null;\n isStrategicFixEnable: boolean = true;\n\n constructor(private formBuilder: FormBuilder,\n private paymentViewService: PaymentViewService,\n private paymentLibComponent: PaymentLibComponent,\n private bulkScaningPaymentService: BulkScaningPaymentService) { }\n\n ngOnInit() {\n this.viewStatus = 'mainForm';\n this.ccdCaseNumber = this.paymentLibComponent.CCD_CASE_NUMBER;\n this.bspaymentdcn = this.paymentLibComponent.bspaymentdcn;\n this.isStrategicFixEnable = this.paymentLibComponent.ISSFENABLE;\n this.getUnassignedPayment();\n\n this.markPaymentUnidentifiedForm = this.formBuilder.group({\n investicationDetail: new FormControl('', Validators.compose([\n Validators.required,\n Validators.minLength(3),\n Validators.maxLength(255),\n Validators.pattern('^([a-zA-Z0-9\\\\s,\\\\.]*)$')\n ]))\n });\n }\n getUnassignedPayment() {\n this.bulkScaningPaymentService.getBSPaymentsByDCN(this.bspaymentdcn).subscribe(\n unassignedPayments => {\n this.errorMessage = this.getErrorMessage(false);\n this.unassignedRecord = unassignedPayments['data'].payments.filter(payment => {\n return payment && payment.dcn_reference == this.bspaymentdcn;\n })[0];\n this.siteID = unassignedPayments['data'].responsible_service_id;\n const beCcdNumber = unassignedPayments['data'].ccd_reference,\n beExceptionNumber = unassignedPayments['data'].exception_record_reference,\n exceptionReference = beCcdNumber ? beCcdNumber === this.ccdCaseNumber ? null : this.ccdCaseNumber : this.ccdCaseNumber;\n this.ccdReference = beCcdNumber ? beCcdNumber : null;\n this.exceptionReference = beExceptionNumber ? beExceptionNumber : exceptionReference;\n },\n (error: any) => {\n this.errorMessage = this.getErrorMessage(true);\n }\n );\n }\n trimUnderscore(method: string){\n return this.bulkScaningPaymentService.removeUnwantedString(method,' ');\n }\n saveAndContinue() {\n this.resetForm([false, false, false, false]);\n const investicationField = this.markPaymentUnidentifiedForm.controls.investicationDetail;\n const formerror = investicationField.errors;\n if (this.markPaymentUnidentifiedForm.dirty && this.markPaymentUnidentifiedForm.valid) {\n this.investigationComment = this.markPaymentUnidentifiedForm.controls.investicationDetail.value;\n this.viewStatus = 'unidentifiedContinueConfirm';\n }else {\n if(investicationField.value == '' ) {\n this.resetForm([true, false, false, false]);\n }\n if(investicationField.value != '' && investicationField.invalid ) {\n this.resetForm([false, true, false, false]);\n }\n if(formerror && formerror.minlength && formerror.minlength.actualLength < 3 ) {\n this.resetForm([false, false, true, false]);\n }\n if(formerror && formerror.maxlength && formerror.maxlength.actualLength > 255 ) {\n this.resetForm([false, false, false, true]);\n }\n }\n }\n resetForm(val) {\n this.isInvesticationDetailEmpty = val[0];\n this.investicationDetailHasError = val[1];\n this.investicationDetailMinHasError = val[2];\n this.investicationDetailMaxHasError = val[3];\n }\n confirmPayments() {\n this.isConfirmButtondisabled = true;\n const reason = this.markPaymentUnidentifiedForm.get('investicationDetail').value;\n\n if(!this.isStrategicFixEnable) {\n let allocatedRequest = {\n allocation_status:'Unidentified',\n payment_allocation_status: {\n description: '',\n name: 'Unidentified'\n },\n unidentified_reason: reason,\n user_id: this.caseType,\n }\n const postStrategicBody = new AllocatePaymentRequest\n (this.ccdReference, this.unassignedRecord, this.caseType, this.exceptionReference, allocatedRequest);\n this.bulkScaningPaymentService.postBSWoPGStrategic(postStrategicBody).subscribe(\n res => {\n this.errorMessage = this.getErrorMessage(false);\n let response = JSON.parse(res);\n if (response.success) {\n this.gotoCasetransationPage();\n }\n },\n (error: any) => {\n this.errorMessage = this.getErrorMessage(true);\n this.isConfirmButtondisabled = false;\n });\n } else {\n this.bulkScaningPaymentService.patchBSChangeStatus(this.unassignedRecord.dcn_reference, 'PROCESSED').subscribe(\n res1 => {\n this.errorMessage = this.getErrorMessage(false);\n const requestBody = new AllocatePaymentRequest\n (this.ccdReference, this.unassignedRecord, this.siteID, this.exceptionReference)\n this.paymentViewService.postBSPayments(requestBody).subscribe(\n res2 => {\n this.errorMessage = this.getErrorMessage(false);\n const response2 = JSON.parse(res2),\n reqBody = new UnidentifiedPaymentsRequest\n (response2['data'].payment_group_reference, response2['data'].reference, reason);\n if (response2.success) {\n this.paymentViewService.postBSUnidentifiedPayments(reqBody).subscribe(\n res3 => {\n this.errorMessage = this.getErrorMessage(false);\n const response3 = JSON.parse(res3);\n if (response3.success) {\n this.gotoCasetransationPage();\n }\n },\n (error: any) => {\n this.bulkScaningPaymentService.patchBSChangeStatus(this.unassignedRecord.dcn_reference, 'COMPLETE').subscribe();\n this.errorMessage = this.getErrorMessage(true);\n this.isConfirmButtondisabled = false;\n }\n );\n }\n },\n (error: any) => {\n this.bulkScaningPaymentService.patchBSChangeStatus(this.unassignedRecord.dcn_reference, 'COMPLETE').subscribe();\n this.errorMessage = this.getErrorMessage(true);\n this.isConfirmButtondisabled = false;\n }\n );\n },\n (error: any) => {\n this.errorMessage = this.getErrorMessage(true);\n this.isConfirmButtondisabled = false;\n }\n );\n }\n }\n cancelMarkUnidentifiedPayments(type?:string){\n if(type && type === 'cancel') {\n if(this.markPaymentUnidentifiedForm.get('investicationDetail').value!==\"\"){\n this.viewStatus = 'unidentifiedCancelConfirm';\n } else {\n this.gotoCasetransationPage();\n }\n } else {\n this.viewStatus = 'mainForm';\n }\n }\n\n gotoCasetransationPage() {\n this.paymentLibComponent.viewName = 'case-transactions';\n this.paymentLibComponent.TAKEPAYMENT = true;\n this.paymentLibComponent.ISBSENABLE = true;\n }\n getErrorMessage(isErrorExist) {\n return {\n title: \"There is a problem with the service\",\n body: \"Try again later\",\n showError: isErrorExist\n };\n }\n}\n","\nexport class UnsolicitedPaymentsRequest {\n payment_allocation_status: any;\n payment_group_reference: string;\n payment_reference: string;\n receiving_office: string;\n receiving_email_address: string;\n sending_email_address: string;\n unidentified_reason: string;\n constructor(payment_group_reference: string, payment_reference : string, reason: string,responsible_office: string, responsible_person:string,email_id: string) {\n this.payment_allocation_status = {\n description: '',\n name: \"Transferred\"\n };\n this.payment_group_reference = payment_group_reference;\n this.payment_reference= payment_reference;\n this.unidentified_reason= reason;\n this.receiving_office= responsible_office;\n this.receiving_email_address= email_id;\n this.sending_email_address= responsible_person;\n }\n}\n","import { Component, OnInit, Input } from '@angular/core';\nimport { FormBuilder, FormGroup, Validators, FormControl } from '@angular/forms';\nimport { PaymentLibComponent } from '../../payment-lib.component';\nimport { BulkScaningPaymentService } from '../../services/bulk-scaning-payment/bulk-scaning-payment.service';\nimport { IBSPayments } from '../../interfaces/IBSPayments';\nimport { UnsolicitedPaymentsRequest } from '../../interfaces/UnsolicitedPaymentsRequest';\nimport { PaymentViewService } from '../../services/payment-view/payment-view.service';\nimport { AllocatePaymentRequest } from '../../interfaces/AllocatePaymentRequest';\nimport { ErrorHandlerService } from '../../services/shared/error-handler.service';\n\n\n@Component({\n selector: 'app-mark-unsolicited-payment',\n templateUrl: './mark-unsolicited-payment.component.html',\n styleUrls: ['./mark-unsolicited-payment.component.scss']\n})\nexport class MarkUnsolicitedPaymentComponent implements OnInit {\n @Input() caseType: string;\n markPaymentUnsolicitedForm: FormGroup;\n viewStatus: string;\n reasonHasError: boolean = false;\n isReasonEmpty: boolean = false;\n reasonMinHasError: boolean = false;\n reasonMaxHasError: boolean = false;\n responsibleOfficeHasError: boolean = false;\n isResponsibleOfficeEmpty: boolean = false;\n errorMessage = this.getErrorMessage(false);\n ccdCaseNumber: string;\n bspaymentdcn: string;\n unassignedRecord: IBSPayments;\n siteID: string = null;\n reason: string;\n responsiblePerson: string;\n responsibleOffice: string;\n emailId: string;\n isConfirmButtondisabled: Boolean = false;\n isContinueButtondisabled: Boolean = false;\n ccdReference: string = null;\n exceptionReference: string = null;\n selectedSiteId: string;\n selectedSiteName: string;\n isStrategicFixEnable: boolean = true;\n siteIDList;\n\n constructor(private formBuilder: FormBuilder,\n private paymentViewService: PaymentViewService,\n private paymentLibComponent: PaymentLibComponent,\n private bulkScaningPaymentService: BulkScaningPaymentService) { }\n\n ngOnInit() {\n this.resetForm([false,false,false,false,false,false], 'all');\n this.viewStatus = 'mainForm';\n this.ccdCaseNumber = this.paymentLibComponent.CCD_CASE_NUMBER;\n this.bspaymentdcn = this.paymentLibComponent.bspaymentdcn;\n this.isStrategicFixEnable = this.paymentLibComponent.ISSFENABLE;\n this.getUnassignedPayment();\n\n this.paymentViewService.getSiteID().subscribe(\n siteids => {\n this.isContinueButtondisabled = false;\n this.errorMessage = this.getErrorMessage(false);\n this.siteIDList = JSON.parse(siteids);\n },\n err => {\n window.scrollTo(0, 0);\n this.isContinueButtondisabled = true;\n this.errorMessage = this.getErrorMessage(true);\n }\n );\n \n this.markPaymentUnsolicitedForm = this.formBuilder.group({\n reason: new FormControl('', Validators.compose([\n Validators.required,\n Validators.minLength(3),\n Validators.maxLength(255),\n Validators.pattern('^([a-zA-Z0-9\\\\s,\\\\.]*)$')\n ])),\n responsibleOffice: new FormControl('', Validators.compose([\n Validators.required,\n Validators.pattern('^([a-zA-Z0-9\\\\s\\\\n,\\\\.-:]*)$')\n ])),\n responsiblePerson: new FormControl(''),\n emailId: new FormControl('')\n });\n }\n trimUnderscore(method: string){\n return this.bulkScaningPaymentService.removeUnwantedString(method,' ');\n }\n confirmPayments() {\n this.isConfirmButtondisabled = true;\n const controls = this.markPaymentUnsolicitedForm.controls;\n if(!this.isStrategicFixEnable) {\n let allocatedRequest = {\n allocation_status:'Transferred',\n payment_allocation_status: {\n description: '',\n name: 'Transferred'\n },\n unidentified_reason: controls.reason.value,\n receiving_office: this.selectedSiteId,\n user_id: this.caseType,\n }\n const postStrategicBody = new AllocatePaymentRequest\n (this.ccdReference, this.unassignedRecord, this.caseType, this.exceptionReference, allocatedRequest);\n this.bulkScaningPaymentService.postBSWoPGStrategic(postStrategicBody).subscribe(\n res => {\n this.errorMessage = this.getErrorMessage(false);\n let response = JSON.parse(res);\n if (response.success) {\n this.gotoCasetransationPage();\n }\n },\n (error: any) => {\n this.errorMessage = this.getErrorMessage(true);\n this.isConfirmButtondisabled = false;\n });\n } else {\n // controls.responsibleOffice.setValue('P219');\n this.bulkScaningPaymentService.patchBSChangeStatus(this.unassignedRecord.dcn_reference, 'PROCESSED').subscribe(\n res1 => {\n this.errorMessage = this.getErrorMessage(false);\n const response1 = JSON.parse(res1),\n requestBody = new AllocatePaymentRequest\n (this.ccdReference, this.unassignedRecord, this.siteID, this.exceptionReference)\n this.paymentViewService.postBSPayments(requestBody).subscribe(\n res2 => {\n this.errorMessage = this.getErrorMessage(false);\n const response2 = JSON.parse(res2),\n reqBody = new UnsolicitedPaymentsRequest\n (response2['data'].payment_group_reference, response2['data'].reference, controls.reason.value, this.selectedSiteId, controls.responsiblePerson.value, controls.emailId.value);\n if (response2.success) {\n this.paymentViewService.postBSUnsolicitedPayments(reqBody).subscribe(\n res3 => {\n this.errorMessage = this.getErrorMessage(false);\n const response3 = JSON.parse(res3);\n if (response3.success) {\n this.gotoCasetransationPage();\n }\n },\n (error: any) => {\n this.bulkScaningPaymentService.patchBSChangeStatus(this.unassignedRecord.dcn_reference, 'COMPLETE').subscribe();\n this.errorMessage = this.getErrorMessage(true);\n this.isConfirmButtondisabled = false;\n }\n );\n }\n },\n (error: any) => {\n this.bulkScaningPaymentService.patchBSChangeStatus(this.unassignedRecord.dcn_reference, 'COMPLETE').subscribe();\n this.errorMessage = this.getErrorMessage(true);\n this.isConfirmButtondisabled = false;\n }\n );\n },\n (error: any) => {\n this.errorMessage = this.getErrorMessage(true);\n this.isConfirmButtondisabled = false;\n }\n );\n }\n }\n saveAndContinue() {\n this.resetForm([false,false,false,false,false,false], 'all');\n const formerror = this.markPaymentUnsolicitedForm.controls.reason.errors;\n const reasonField = this.markPaymentUnsolicitedForm.controls.reason;\n //const officeIdField = this.selectedSiteId;\n const officeIdField = this.markPaymentUnsolicitedForm.controls.responsibleOffice;\n if (this.markPaymentUnsolicitedForm.dirty && this.markPaymentUnsolicitedForm.valid) {\n const controls = this.markPaymentUnsolicitedForm.controls;\n this.emailId = controls.emailId.value;\n this.responsibleOffice = officeIdField.value;\n this.responsiblePerson = controls.responsiblePerson.value;\n this.reason = controls.reason.value;\n this.viewStatus = 'unsolicitedContinueConfirm';\n }else {\n if( reasonField.value == '' ) {\n this.resetForm([true,false,false,false,false,false], 'reason');\n }\n if(reasonField.value != '' && this.markPaymentUnsolicitedForm.controls.reason.invalid ) {\n this.resetForm([false,true,false,false,false,false], 'reason');\n }\n if(formerror && formerror.minlength && formerror.minlength.actualLength < 3 ) {\n this.resetForm([false,false,true,false,false,false], 'reason');\n }\n if(formerror && formerror.maxlength && formerror.maxlength.actualLength > 255 ) {\n this.resetForm([false,false,false,true,false,false], 'reason');\n }\n if(officeIdField.value == '') {\n this.resetForm([false,false,false,false,true,false], 'responsibleOffice');\n }\n if(officeIdField.value != '' && officeIdField.invalid) {\n this.resetForm([false,false,false,false,false,true],'responsibleOffice');\n }\n }\n }\n resetForm(val, field) {\n if(field==='reason' || field==='all') {\n this.isReasonEmpty = val[0];\n this.reasonHasError = val[1];\n this.reasonMinHasError = val[2];\n this.reasonMaxHasError = val[3];\n }\n if(field==='responsibleOffice' || field==='all') {\n this.isResponsibleOfficeEmpty = val[4];\n this.responsibleOfficeHasError = val[5];\n }\n }\n\ncancelMarkUnsolicitedPayments(type?:string){\n if(type && type === 'cancel') {\n if(this.checkingFormValue()){\n this.viewStatus = 'unsolicitedCancelConfirm';\n } else {\n this.gotoCasetransationPage();\n }\n } else {\n this.markPaymentUnsolicitedForm.controls.responsibleOffice.setValue('');\n this.viewStatus = 'mainForm';\n }\n }\n checkingFormValue(){\n const formFields = this.markPaymentUnsolicitedForm.value;\n let valueExists = false;\n\n for (var field in formFields) {\n if (formFields.hasOwnProperty(field) && formFields[field] !==\"\") {\n valueExists = true;\n break;\n }\n }\n return valueExists;\n }\n gotoCasetransationPage() {\n this.paymentLibComponent.viewName = 'case-transactions';\n this.paymentLibComponent.TAKEPAYMENT = true;\n this.paymentLibComponent.ISBSENABLE = true;\n }\n getUnassignedPayment() {\n this.bulkScaningPaymentService.getBSPaymentsByDCN(this.bspaymentdcn).subscribe(\n unassignedPayments => {\n \n this.unassignedRecord = unassignedPayments['data'].payments.filter(payment => {\n return payment && payment.dcn_reference == this.bspaymentdcn;\n })[0];\n this.siteID = unassignedPayments['data'].responsible_service_id;\n const beCcdNumber = unassignedPayments['data'].ccd_reference,\n beExceptionNumber = unassignedPayments['data'].exception_record_reference,\n exceptionReference = beCcdNumber ? beCcdNumber === this.ccdCaseNumber ? null : this.ccdCaseNumber : this.ccdCaseNumber;\n this.ccdReference = beCcdNumber ? beCcdNumber : null;\n this.exceptionReference = beExceptionNumber ? beExceptionNumber : exceptionReference;\n },\n (error: any) => {\n this.errorMessage = this.getErrorMessage(true);\n }\n );\n }\n\n getErrorMessage(isErrorExist) {\n return {\n title: \"Something went wrong.\",\n body: \"Please try again later.\",\n showError: isErrorExist\n };\n }\n\n selectchange(args){ \n this.selectedSiteId = args.target.value; \n this.selectedSiteName = args.target.options[args.target.selectedIndex].text; \n } \n\n}\n","import { Component, OnInit, Output,Input, EventEmitter } from '@angular/core';\nimport { BulkScaningPaymentService } from '../../services/bulk-scaning-payment/bulk-scaning-payment.service';\nimport { PaymentLibComponent } from '../../payment-lib.component';\nimport { IBSPayments } from '../../interfaces/IBSPayments';\nimport {Router} from '@angular/router';\nimport { PaymentViewService } from '../../services/payment-view/payment-view.service';\nimport { OrderslistService } from '../../services/orderslist.service';\n\n@Component({\n selector: 'ccpay-app-unprocessed-payments',\n templateUrl: './unprocessed-payments.component.html',\n styleUrls: ['./unprocessed-payments.component.scss']\n})\nexport class UnprocessedPaymentsComponent implements OnInit {\n\n @Input('FEE_RECORDS_EXISTS') FEE_RECORDS_EXISTS: boolean;\n @Input('PAYMENTREF') PAYMENTREF: string;\n @Input('ISTURNOFF') ISTURNOFF: boolean;\n @Input('IS_BUTTON_ENABLE') IS_BUTTON_ENABLE: boolean;\n @Input('IS_OS_AMT_AVAILABLE') IS_OS_AMT_AVAILABLE: boolean;\n @Input('ISSFENABLE') ISSFENABLE: boolean;\n @Input('PAYMENTSLENGTH') PAYMENTSLENGTH:Number;\n @Input('LEVEL')LEVEL:Number;\n\n @Output() selectedUnprocessedFeeEvent: EventEmitter<string> = new EventEmitter();\n @Output() getUnprocessedFeeCount: EventEmitter<string> = new EventEmitter();\n\n viewStatus = 'main';\n unassignedRecordList: IBSPayments;\n upPaymentErrorMessage: string = null;\n ccdCaseNumber: string;\n recordId: string = null;\n isRecordExist: boolean = false;\n dcnNumber: string = null;\n selectedOption: string;\n isUnprocessedRecordSelected: boolean = true;\n isAllocateToExistingFeebtnEnabled: boolean = false;\n isMarkAsUnidentifiedbtnEnabled: boolean = false;\n isAllocatedToNewFeebtnEnabled: boolean = false;\n isExceptionCase: boolean = false;\n serviceId: string = null;\n isBulkScanEnable;\n isTurnOff: boolean = true;\n isStFixEnable;\n unassignedRecordSelectedList: IBSPayments;\n unassignedRecordListLength: number = 0;\n showContent: boolean;\n\n constructor(private router: Router,\n private bulkScaningPaymentService: BulkScaningPaymentService,\n private paymentLibComponent: PaymentLibComponent,\n private paymentViewService: PaymentViewService,\n private OrderslistService: OrderslistService\n ) { }\n\n ngOnInit() {\n // Todo ...\n this.ccdCaseNumber = this.paymentLibComponent.CCD_CASE_NUMBER;\n this.selectedOption = this.paymentLibComponent.SELECTED_OPTION.toLocaleLowerCase();\n this.dcnNumber = this.paymentLibComponent.DCN_NUMBER;\n this.isBulkScanEnable = this.paymentLibComponent.ISBSENABLE;\n this.isTurnOff = this.paymentLibComponent.ISTURNOFF;\n this.isStFixEnable = this.paymentLibComponent.ISSFENABLE;\n this.OrderslistService.getFeeExists().subscribe( (data) => this.FEE_RECORDS_EXISTS = data);\n this.getUnassignedPaymentlist();\n\n }\n\n getUnassignedPaymentlist() {\n if (this.selectedOption === 'dcn') {\n this.bulkScaningPaymentService.getBSPaymentsByDCN(this.dcnNumber).subscribe(\n unassignedPayments => {\n // unassignedPayments['data'].map(data => data.expandable=false);\n if(unassignedPayments['data'] && unassignedPayments['data'].payments) {\n this.setValuesForUnassignedRecord(unassignedPayments['data']);\n } else if(unassignedPayments['payments']) {\n this.setValuesForUnassignedRecord(unassignedPayments);\n } else {\n this.upPaymentErrorMessage = 'error';\n this.getUnprocessedFeeCount.emit('0');\n }\n },\n (error: any) => {\n this.upPaymentErrorMessage = error;\n this.getUnprocessedFeeCount.emit('0');\n }\n );\n } else {\n this.bulkScaningPaymentService.getBSPaymentsByCCD(this.ccdCaseNumber).subscribe(\n unassignedPayments => {\n // unassignedPayments['data'].map(data => data.expandable=false);\n if(unassignedPayments['data'] && unassignedPayments['data'].payments) {\n this.setValuesForUnassignedRecord(unassignedPayments['data']);\n } else if(unassignedPayments['payments']) {\n this.setValuesForUnassignedRecord(unassignedPayments);\n } else {\n this.upPaymentErrorMessage = 'error';\n this.getUnprocessedFeeCount.emit('0');\n }\n },\n (error: any) => {\n this.upPaymentErrorMessage = error;\n this.getUnprocessedFeeCount.emit('0');\n }\n );\n }\n\n }\n\n setValuesForUnassignedRecord(unassignedPayments) {\n\n this.unassignedRecordList = unassignedPayments.payments;\n if(this.unassignedRecordList){\n this.unassignedRecordListLength = unassignedPayments.payments.length\n }\n this.serviceId = unassignedPayments.responsible_service_id;\n if (unassignedPayments['ccd_reference'] === undefined) {\n this.isExceptionCase = true;\n }\n // this.isRecordExist = this.unassignedRecordList.length === 0;\n this.getUnprocessedFeeCount.emit(<any>this.unassignedRecordList.length);\n this.unprocessedPaymentSelectEvent(this.unassignedRecordList);\n }\n\n formatUnassignedRecordId(ID: Number) {\n return `unassignrecord-${ID}`;\n }\n\n trimUnderscore(method: string){\n return this.bulkScaningPaymentService.removeUnwantedString(method,' ');\n }\n\n redirectToFeeSearchPage(event: any, dcn_reference:any) {\n event.preventDefault();\n this.recordId = dcn_reference;\n let url = this.isBulkScanEnable ? '&isBulkScanning=Enable' : '&isBulkScanning=Disable';\n url += this.ISTURNOFF ? '&isTurnOff=Enable' : '&isTurnOff=Disable';\n url += this.isStFixEnable ? '&isStFixEnable=Enable' : '&isStFixEnable=Disable';\n url +=`&caseType=${this.paymentLibComponent.CASETYPE}`;\n\n this.router.navigateByUrl(`/fee-search?selectedOption=${this.selectedOption}&ccdCaseNumber=${this.ccdCaseNumber}&dcn=${this.recordId}${url}`);\n }\n\n loadUnsolicitedPage(viewName: string, dcn_reference:any) {\n this.recordId = dcn_reference;\n this.paymentLibComponent.bspaymentdcn = this.recordId;\n this.paymentLibComponent.viewName = viewName;\n }\n\n unprocessedPaymentSelectEvent(selectedRecordReference: any) {\n this.isUnprocessedRecordSelected = true;\n this.validateButtons();\n this.selectedUnprocessedFeeEvent.emit(selectedRecordReference);\n }\n\n resetButtons() {\n this.isUnprocessedRecordSelected = false;\n this.isAllocateToExistingFeebtnEnabled = false;\n this.isMarkAsUnidentifiedbtnEnabled = false;\n this.isAllocatedToNewFeebtnEnabled = false;\n }\n\n goToAllocatePage(dcn_reference:any) {\n this.paymentLibComponent.bspaymentdcn = dcn_reference;\n this.paymentLibComponent.unProcessedPaymentServiceId = this.serviceId\n this.paymentLibComponent.isTurnOff = this.ISTURNOFF;\n this.paymentLibComponent.ISSFENABLE = this.isStFixEnable;\n\n if(this.ISTURNOFF) {\n this.paymentLibComponent.paymentGroupReference = this.PAYMENTREF;\n this.paymentLibComponent.viewName = 'fee-summary';\n }else {\n this.paymentLibComponent.paymentGroupReference = null;\n this.paymentLibComponent.viewName = 'allocate-payments';\n }\n\n }\n\n validateButtons() {\n if ( this.isUnprocessedRecordSelected && this.isExceptionCase) {\n this.isMarkAsUnidentifiedbtnEnabled = true;\n } else if ( this.isUnprocessedRecordSelected && !this.isExceptionCase && !this.FEE_RECORDS_EXISTS) {\n this.isAllocateToExistingFeebtnEnabled = false;\n this.isAllocatedToNewFeebtnEnabled = true;\n } else if( this.isUnprocessedRecordSelected && !this.isExceptionCase && this.FEE_RECORDS_EXISTS ) {\n if(!this.ISTURNOFF) {\n this.isAllocateToExistingFeebtnEnabled = true;\n this.isAllocatedToNewFeebtnEnabled = false;\n } else {\n this.isAllocateToExistingFeebtnEnabled = this.IS_OS_AMT_AVAILABLE;\n this.isAllocatedToNewFeebtnEnabled = true;\n }\n }\n }\n\n unprocessedPaymentUnSelectEvent(event: any) {\n event.preventDefault();\n this.recordId = null;\n this.isUnprocessedRecordSelected = false;\n this.isAllocateToExistingFeebtnEnabled = false;\n this.isAllocatedToNewFeebtnEnabled = false;\n this.isMarkAsUnidentifiedbtnEnabled = false;\n //this.validateButtons();\n this.selectedUnprocessedFeeEvent.emit('');\n }\n\n showDetailRow(event: any,obj: any, i: any) {\n event.preventDefault();\n\n this.unassignedRecordSelectedList = obj;\n\n }\n}\n","import { Component, OnInit, Input, Output, EventEmitter } from '@angular/core';\nimport { BulkScaningPaymentService } from '../../services/bulk-scaning-payment/bulk-scaning-payment.service';\nimport {IPayment} from '../../interfaces/IPayment';\nimport {Router} from '@angular/router';\n\n@Component({\n selector: 'ccpay-app-processed-payments',\n templateUrl: './processed-payments.component.html',\n styleUrls: ['./processed-payments.component.scss']\n})\nexport class ProcessedPaymentsComponent implements OnInit {\n\n @Input('NONPAYMENTS') NONPAYMENTS: IPayment[];\n @Output() goToPaymentViewComponent: EventEmitter<any> = new EventEmitter();\n\n constructor(\n private router: Router,\n private bulkScaningPaymentService: BulkScaningPaymentService\n ) { }\n ngOnInit() {\n }\n\n trimUnderscore(method: string){\n return this.bulkScaningPaymentService.removeUnwantedString(method,' ');\n }\n redirectToPaymentViewPage(paymentGroupReference: string, paymentReference: string, paymentMethod: string) {\n this.goToPaymentViewComponent.emit({paymentGroupReference, paymentReference, paymentMethod});\n }\n}\n","\nexport class IAllocationPaymentsRequest {\n payment_allocation_status: any;\n payment_group_reference: string;\n payment_reference: string;\n reason: string;\n explanation: string;\n user_name: string;\n constructor(payment_group_reference: string, payment_reference : string, reason? : string, explanation? : string, userName? : string) {\n this.payment_allocation_status = {\n description: '',\n name: \"Allocated\"\n };\n this.payment_group_reference = payment_group_reference;\n this.payment_reference= payment_reference;\n this.reason = reason ? reason : null;\n this.explanation = explanation ? explanation : null;\n this.user_name = userName ? userName : null;\n }\n}\n","import { Component, OnInit, Input } from '@angular/core';\nimport { FormBuilder, FormGroup, Validators, FormControl } from '@angular/forms';\nimport { PaymentLibComponent } from '../../payment-lib.component';\nimport { PaymentViewService } from '../../services/payment-view/payment-view.service';\nimport {CaseTransactionsService} from '../../services/case-transactions/case-transactions.service'; \nimport {BulkScaningPaymentService} from '../../services/bulk-scaning-payment/bulk-scaning-payment.service';\nimport { ErrorHandlerService } from '../../services/shared/error-handler.service';\nimport {IPaymentGroup} from '../../interfaces/IPaymentGroup';\nimport {IBSPayments} from '../../interfaces/IBSPayments';\nimport {AllocatePaymentRequest} from '../../interfaces/AllocatePaymentRequest';\nimport {IAllocationPaymentsRequest} from '../../interfaces/IAllocationPaymentsRequest';\nimport { IOrderReferenceFee } from '../../interfaces/IOrderReferenceFee';\nimport { OrderslistService } from '../../services/orderslist.service';\n\n\n\n@Component({\n selector: 'app-allocate-payments',\n templateUrl: './allocate-payments.component.html',\n styleUrls: ['./allocate-payments.component.scss']\n})\nexport class AllocatePaymentsComponent implements OnInit {\n @Input() isTurnOff: boolean;\n @Input() caseType: string;\n\n overUnderPaymentForm: FormGroup;\n viewStatus: string;\n ccdCaseNumber: string;\n bspaymentdcn: string;\n recordId:string;\n feedbackUrlLabel:string;\n unAllocatedPayment: IBSPayments = {\n amount: 0\n };\n siteID: string = null;\n errorMessage = this.errorHandlerService.getServerErrorMessage(false, false, '');\n paymentGroup: IPaymentGroup;\n paymentGroups: IPaymentGroup[] = [];\t\n remainingAmount: number;\n isRemainingAmountGtZero: boolean;\n isMoreDetailsBoxHide: boolean = true;\n isRemainingAmountLtZero: boolean;\n afterFeeAllocateOutstanding: number;\n amountForAllocation: number;\n isConfirmButtondisabled: boolean = false;\n isContinueButtondisabled: boolean = true;\n otherPaymentExplanation: string = null;\n selectedOption: string = null;\n isFeeAmountZero: boolean = false;\t\n\n paymentReasonHasError: boolean = false;\n paymentExplanationHasError: boolean = false;\n isPaymentDetailsEmpty: boolean = false;\n isPaymentDetailsInvalid: boolean = false;\n paymentDetailsMinHasError: boolean = false;\n paymentDetailsMaxHasError: boolean = false;\n isUserNameEmpty: boolean = false;\n isUserNameInvalid: boolean = false;\n ccdReference: string = null;\n exceptionReference: string = null;\n paymentReason: string = null;\n paymentExplanation: string = null;\n userName: string = null;\n paymentSectionLabel: any;\n paymentRef: string = null;\n isStrategicFixEnable: boolean = true;\n orderLevelFees: IOrderReferenceFee[] = [];\n cookieUserName: string[] = [];\n enCookieUserName: any;\n userNameField: string = null;\n\n reasonList: { [key: string]: { [key: string]: string } }= {\n overPayment: {\n hwfReward: 'Help with Fees (HWF) awarded. Please include the HWF reference number in the explanatory note',\n wrongFee: 'Incorrect payment received',\n notIssueCase: 'Unable to issue case',\n otherDeduction: 'Other'\n },\n shortFall: {\n helpWithFee: 'Help with Fees (HWF) application declined',\n wrongFee: 'Incorrect payment received',\n other: 'Other'\n }\n }\n explanationList = {\n overPayment: {\n referRefund: 'Details in case notes. Refund due',\n noRefund: 'Details in case notes. No refund due',\n noCase: 'No case created. Refund due',\n other: 'Other'\n },\n shortFall: {\n holdCase: 'I have put a stop on the case and contacted the applicant requesting the balance of payment',\n heldCase: 'I have put a stop on the case. The applicant needs to be contacted to request the balance of payment',\n other: 'Other'\n }\n }\n\n refund = {\n reason: {\n duplicate: 'Duplicate payment',\n humanerror: 'Human error',\n caseWithdrawn: 'Case withdrawn',\n other: 'Other'\n }\n }\n\n\n constructor(\n private errorHandlerService: ErrorHandlerService,\n private caseTransactionsService: CaseTransactionsService,\n private formBuilder: FormBuilder,\n private paymentViewService: PaymentViewService,\n private paymentLibComponent: PaymentLibComponent,\n private bulkScaningPaymentService: BulkScaningPaymentService,\n private OrderslistService: OrderslistService) { }\n\n ngOnInit() {\n this.viewStatus = 'mainForm';\n if (this.paymentLibComponent.paymentGroupReference !== null) {\n this.viewStatus = 'allocatePaymentConfirmation';\n }\n \n this.ccdCaseNumber = this.paymentLibComponent.CCD_CASE_NUMBER;\n this.bspaymentdcn = this.paymentLibComponent.bspaymentdcn;\n this.paymentRef = this.paymentLibComponent.paymentGroupReference;\n this.selectedOption = this.paymentLibComponent.SELECTED_OPTION;\n this.isStrategicFixEnable = this.paymentLibComponent.ISSFENABLE;\n this.isTurnOff = this.paymentLibComponent.isTurnOff;\n this.overUnderPaymentForm = this.formBuilder.group({\n moreDetails: new FormControl('', Validators.compose([\n Validators.required,\n Validators.minLength(3),\n Validators.maxLength(255),\n Validators.pattern('^([a-zA-Z0-9\\\\s,\\\\.]*)$')\n ])),\n userName: new FormControl('', Validators.compose([\n Validators.required,\n Validators.pattern('^([a-zA-Z0-9\\\\s]*)$')\n ])),\n });\n this.OrderslistService.getOrdersList().subscribe( (data) =>\n this.orderLevelFees = data.filter(data => data.orderStatus !== 'Paid'));\n this.OrderslistService.getCaseType().subscribe( (data) => this.caseType = data);\n this.getUnassignedPayment();\n }\n getGroupOutstandingAmount(paymentGroup: IPaymentGroup): number {\n return this.bulkScaningPaymentService.calculateOutStandingAmount(paymentGroup);\n }\n\n getPaymentGroupDetails(){\n\n if(!this.isTurnOff){\n this.paymentViewService.getPaymentGroupDetails(this.paymentRef).subscribe(\n paymentGroup => {\n this.errorMessage = this.errorHandlerService.getServerErrorMessage(false, false, '');\n this.paymentGroup = paymentGroup;\n this.saveAndContinue();\n },\n (error: any) => {\n this.errorMessage = this.errorHandlerService.getServerErrorMessage(true, false, '');\n }\n );\n }else {\n this.caseTransactionsService.getPaymentGroups(this.ccdCaseNumber).subscribe(\n paymentGroups => {\n this.errorMessage = this.errorHandlerService.getServerErrorMessage(false, false, '');\n this.paymentGroups = paymentGroups['payment_groups'].filter(paymentGroup => {\n paymentGroup.fees.forEach(fee => {\n if(fee.calculated_amount === 0) {\n this.isFeeAmountZero = true\n }\n });\n let fstCon = this.getGroupOutstandingAmount(<IPaymentGroup>paymentGroup),\n scndCn = fstCon > 0 || (fstCon == 0 && this.isFeeAmountZero) && paymentGroup.payment_group_reference === this.paymentRef;\n return this.paymentRef ? scndCn : fstCon > 0 || (fstCon == 0 && this.isFeeAmountZero);\n });\n },\n (error: any) => {\n this.errorMessage = this.errorHandlerService.getServerErrorMessage(true, false, '');\n }\n );\n }\n\n }\n\n selectedPaymentGroup(paymentGroup: IPaymentGroup) {\t\n this.isContinueButtondisabled = false;\t\n this.paymentGroup = paymentGroup;\t\n }\t\n\n gotoCasetransationPage() {\n this.paymentLibComponent.viewName = 'case-transactions';\n this.paymentLibComponent.isTurnOff = this.isTurnOff;\n this.paymentLibComponent.TAKEPAYMENT = true;\n this.paymentLibComponent.ISBSENABLE = true;\n }\n\n gotoSummaryPage(event: any) { \n event.preventDefault();\n this.paymentLibComponent.viewName = 'fee-summary';\n this.paymentLibComponent.isTurnOff = this.isTurnOff;\n this.paymentLibComponent.TAKEPAYMENT = true;\n this.paymentLibComponent.ISBSENABLE = true;\n }\n\n cancelAllocatePayment(event: any){\n event.preventDefault();\n this.resetForm([false, false, false, false, false, false, false, false], 'all');\n if(!this.isTurnOff){\n this.paymentLibComponent.viewName = 'fee-summary';\n this.paymentLibComponent.isTurnOff = this.isTurnOff;\n this.paymentLibComponent.TAKEPAYMENT = true;\n this.paymentLibComponent.ISBSENABLE = true;\n } else {\n this.viewStatus = 'mainForm';\t\n }\n }\n confirmAllocatePayement(){\n this.enCookieUserName = document.cookie.split(\";\").find(row => row.includes(\"user-info\")).split(\"=\")[1].split(\";\");\n this.cookieUserName = JSON.parse(decodeURIComponent(this.enCookieUserName));\n \n const fullName = this.cookieUserName['forename'] + ' ' + this.cookieUserName['surname'];\n\n const paymentDetailsField = this.overUnderPaymentForm.controls.moreDetails,\n paymentFormError = this.overUnderPaymentForm.controls.moreDetails.errors,\n userNameField = fullName,\n isEmptyCondtion = this.paymentReason && this.paymentExplanation,\n isOtherOptionSelected = this.paymentExplanation === 'Other';\n\n this.resetForm([false, false, false, false, false, false, false, false], 'all');\n if ( (!this.isRemainingAmountGtZero && !this.isRemainingAmountLtZero) || isEmptyCondtion && (!isOtherOptionSelected && userNameField.length > 0 || isOtherOptionSelected && userNameField.length > 0 && paymentDetailsField.valid)) {\n this.isConfirmButtondisabled = true;\n this.otherPaymentExplanation = this.paymentExplanation === 'Other' ? paymentDetailsField.value : this.paymentExplanation;\n this.userName = userNameField;\n this.finalServiceCall();\n }else {\n if(!this.paymentReason) {\n this.resetForm([true, false, false, false, false, false, false, false], 'reason');\n }\n if(!this.paymentExplanation) {\n this.resetForm([false, true, false, false, false, false, false, false], 'explanation');\n }\n if(this.paymentExplanation && isOtherOptionSelected) {\n if(paymentDetailsField.value == '' ) {\n this.resetForm([false, false, true, false, false, false, false, false], 'other');\n }\n if(paymentDetailsField.value != '' && paymentDetailsField.invalid ) {\n this.resetForm([false, false, false, true, false, false, false, false], 'other');\n }\n if(paymentFormError && paymentFormError.minlength && paymentFormError.minlength.actualLength < 3 ) {\n this.resetForm([false, false, false, false, true, false, false, false], 'other');\n }\n if(paymentFormError && paymentFormError.maxlength && paymentFormError.maxlength.actualLength > 255 ) {\n this.resetForm([false, false, false, false, false, true, false, false], 'other');\n }\n }\n if(userNameField.length === 0) {\n this.resetForm([false, false, false, false, false, false, true, false], 'username');\n }\n }\n }\n resetForm(vals, field) {\n if(field==='reason' || field==='all') {\n this.paymentReasonHasError = vals[0];\n }\n if(field==='explanation' || field==='all') {\n this.paymentExplanationHasError = vals[1];\n }\n if(field==='other' || field==='all') {\n this.isPaymentDetailsEmpty = vals[2];\n this.isPaymentDetailsInvalid = vals[3];\n this.paymentDetailsMinHasError = vals[4];\n this.paymentDetailsMaxHasError = vals[5];\n }\n if(field==='username' || field==='all') {\n this.isUserNameEmpty = vals[6];\n this.isUserNameInvalid = vals[7];\n }\n }\n finalServiceCall() {\n if(!this.isStrategicFixEnable) {\n let allocatedRequest = {\n reason: this.paymentReason,\n allocation_status:'Allocated',\n explanation: this.otherPaymentExplanation,\n payment_allocation_status: {\n description: '',\n name: 'Allocated'\n },\n payment_group_reference: this.paymentGroup.payment_group_reference,\n case_type: this.caseType,\n user_name: this.userName\n }\n const postStrategicBody = new AllocatePaymentRequest\n (this.ccdReference, this.unAllocatedPayment, this.caseType, this.exceptionReference, allocatedRequest);\n this.bulkScaningPaymentService.postBSPaymentStrategic(postStrategicBody , this.paymentGroup.payment_group_reference).subscribe(\n res => {\n this.errorMessage = this.errorHandlerService.getServerErrorMessage(false, false, '');\n let response = JSON.parse(res);\n if (response.success) {\n this.gotoCasetransationPage();\n }\n },\n (error: any) => {\n this.errorMessage = this.errorHandlerService.getServerErrorMessage(true, false, '');\n window.scrollTo(0, 0);\n this.isConfirmButtondisabled = false;\n });\n\n } else {\n this.bulkScaningPaymentService.patchBSChangeStatus(this.unAllocatedPayment.dcn_reference, 'PROCESSED').subscribe(\n res1 => {\n this.errorMessage = this.errorHandlerService.getServerErrorMessage(false, false, '');\n let response1 = JSON.parse(res1);\n if (response1.success) {\n const requestBody = new AllocatePaymentRequest\n (this.ccdReference, this.unAllocatedPayment, this.siteID, this.exceptionReference);\n this.bulkScaningPaymentService.postBSAllocatePayment(requestBody, this.paymentGroup.payment_group_reference).subscribe(\n res2 => {\n this.errorMessage = this.errorHandlerService.getServerErrorMessage(false, false, '');\n let response2 = JSON.parse(res2);\n const reqBody = new IAllocationPaymentsRequest\n (response2['data'].payment_group_reference, response2['data'].reference, this.paymentReason, this.otherPaymentExplanation, this.userName);\n if (response2.success) {\n this.paymentViewService.postBSAllocationPayments(reqBody).subscribe(\n \n res3 => {\n this.errorMessage = this.errorHandlerService.getServerErrorMessage(false, false, '');\n let response3 = JSON.parse(res3);\n if (response3.success) {\n this.gotoCasetransationPage();\n }\n },\n (error: any) => {\n this.bulkScaningPaymentService.patchBSChangeStatus(this.unAllocatedPayment.dcn_reference, 'COMPLETE').subscribe();\n this.errorMessage = this.errorHandlerService.getServerErrorMessage(true, false, '');\n window.scrollTo(0, 0);\n this.isConfirmButtondisabled = false;\n }\n );\n }\n },\n (error: any) => {\n this.bulkScaningPaymentService.patchBSChangeStatus(this.unAllocatedPayment.dcn_reference, 'COMPLETE').subscribe();\n this.errorMessage = this.errorHandlerService.getServerErrorMessage(true, false, '');\n window.scrollTo(0, 0);\n this.isConfirmButtondisabled = false;\n }\n );\n }\n },\n (error: any) => {\n this.errorMessage = this.errorHandlerService.getServerErrorMessage(true, false, '');\n window.scrollTo(0, 0);\n this.isConfirmButtondisabled = false;\n }\n ); \n }\n }\n\n saveAndContinue(){\n if(this.paymentGroup) {\n this.isMoreDetailsBoxHide = true;\n this.overUnderPaymentForm.get('moreDetails').reset();\n this.overUnderPaymentForm.get('moreDetails').setValue('');\n this.overUnderPaymentForm.get('userName').reset();\n this.overUnderPaymentForm.get('userName').setValue('');\n this.paymentReason = '';\n this.paymentExplanation = '';\n let GroupOutstandingAmount = this.getGroupOutstandingAmount(this.paymentGroup);\n const remainingToBeAssigned = this.unAllocatedPayment.amount - GroupOutstandingAmount;\n this.isRemainingAmountGtZero = remainingToBeAssigned > 0;\n this.isRemainingAmountLtZero = remainingToBeAssigned < 0;\n this.paymentSectionLabel = this.isRemainingAmountGtZero ? { \n title: 'There is an Over payment of',\n reason: 'Provide a reason. This will be used in the Refund process.',\n }: this.isRemainingAmountLtZero ? { \n title: 'There is an Under payment of',\n reason: 'Provide a reason',\n }: { \n title:'Amount left to be allocated',\n reason:'',\n };\n this.feedbackUrlLabel = this.isRemainingAmountGtZero ? 'CONFIRMALLOCATION_SURPLUS' : this.isRemainingAmountLtZero ? 'CONFIRMALLOCATION_SHORTFALL' : 'CONFIRMALLOCATION';\n this.remainingAmount = this.isRemainingAmountGtZero ? remainingToBeAssigned : this.isRemainingAmountLtZero ? remainingToBeAssigned * -1 : 0;\n this.afterFeeAllocateOutstanding = remainingToBeAssigned >= 0 ? 0 : (remainingToBeAssigned * -1);\n this.amountForAllocation = GroupOutstandingAmount >= this.unAllocatedPayment.amount ? this.unAllocatedPayment.amount : GroupOutstandingAmount;\n if(this.isTurnOff){\n this.viewStatus = 'allocatePaymentConfirmation';\t\n }\n }\n }\n getUnassignedPayment() {\n this.bulkScaningPaymentService.getBSPaymentsByDCN(this.bspaymentdcn).subscribe(\n unassignedPayments => {\n this.errorMessage = this.errorHandlerService.getServerErrorMessage(false, false, '');\n this.unAllocatedPayment = unassignedPayments['data'].payments.filter(payment => {\n return payment && payment.dcn_reference == this.bspaymentdcn;\n })[0];\n this.siteID = unassignedPayments['data'].responsible_service_id;\n const beCcdNumber = unassignedPayments['data'].ccd_reference,\n beExceptionNumber = unassignedPayments['data'].exception_record_reference,\n exceptionReference = beCcdNumber ? beCcdNumber === this.ccdCaseNumber ? null : this.ccdCaseNumber : this.ccdCaseNumber;\n this.ccdReference = beCcdNumber ? beCcdNumber : null;\n this.exceptionReference = beExceptionNumber ? beExceptionNumber : exceptionReference;\n this.getPaymentGroupDetails();\n },\n (error: any) => {\n this.errorMessage = this.errorHandlerService.getServerErrorMessage(true, false, '');\n }\n );\n }\n selectRadioButton(key, type) {\n this.isMoreDetailsBoxHide = true;\n if( type === 'explanation' && key === 'other' ){\n this.isPaymentDetailsEmpty = false;\n this.isPaymentDetailsInvalid = false;\n this.paymentDetailsMinHasError = false;\n this.paymentDetailsMaxHasError = false;\n this.isMoreDetailsBoxHide = false;\n }\n }\n OrderListSelectEvent(orderef: any){\n this.isContinueButtondisabled = false;\n this.recordId= orderef;\n }\n\n redirectToOrderFeeSearchPage() {\n // this.paymentLibComponent.bspaymentdcn = null;\n this.paymentLibComponent.paymentGroupReference = this.recordId;\n this.paymentLibComponent.isTurnOff = this.isTurnOff;\n this.paymentLibComponent.viewName = 'fee-summary';\n}\n}\n","import { IFee } from './IFee';\n\nexport class AddRemissionRequest {\n beneficiary_name: string;\n ccd_case_number: string;\n fee: IFee;\n hwf_amount: number;\n hwf_reference: string;\n payment_group_reference: string;\n case_type: string;\n\n constructor(ccd_case_number: string, fee: IFee, hwf_amount: number, hwf_reference: string, caseType: string) {\n this.ccd_case_number = ccd_case_number;\n this.fee = fee;\n this.hwf_amount = hwf_amount;\n this.hwf_reference = hwf_reference;\n this.case_type = caseType;\n }\n}\n","export class AddRetroRemissionRequest {\n hwf_amount: number;\n hwf_reference: string;\n\n constructor(hwf_amount: number, hwf_reference: string) {\n this.hwf_amount = hwf_amount;\n this.hwf_reference = hwf_reference;\n }\n}\n","export class PostRefundRetroRemission {\n payment_reference: string;\n refund_reason: string;\n \n constructor(payment_reference : string, refund_reason : string) {\n this.payment_reference= payment_reference;\n this.refund_reason = refund_reason;\n } \n}","export class PostIssueRefundRetroRemission {\n remissionReference: string;\n \n constructor(remissionReference : string) {\n this.remissionReference= remissionReference;\n } \n}","import { Component, OnInit, Input, Output, EventEmitter} from '@angular/core';\nimport { FormBuilder, FormGroup, Validators, FormControl, RequiredValidator } from '@angular/forms';\nimport { IFee } from '../../interfaces/IFee';\nimport {Router} from '@angular/router';\nimport { AddRemissionRequest } from '../../interfaces/AddRemissionRequest';\nimport { PaymentViewService } from '../../services/payment-view/payment-view.service';\nimport { PaymentLibComponent } from '../../payment-lib.component';\nimport { IPayment } from '../../interfaces/IPayment';\nimport { RefundsService } from '../../services/refunds/refunds.service';\nimport { IRefundReasons } from '../../interfaces/IRefundReasons';\nimport { RefundsRequest } from '../../interfaces/RefundsRequest';\nimport { AddRetroRemissionRequest } from '../../interfaces/AddRetroRemissionRequest';\nimport { IssueRefundRequest } from '../../interfaces/IssueRefundRequest';\nimport { PostRefundRetroRemission } from '../../interfaces/PostRefundRetroRemission';\nimport { PostIssueRefundRetroRemission } from '../../interfaces/PostIssueRefundRetroRemission';\nimport {ChangeDetectorRef} from '@angular/core';\nimport { IRemission } from '../../interfaces/IRemission';\nimport { OrderslistService } from '../../services/orderslist.service';\n\nconst BS_ENABLE_FLAG = 'bulk-scan-enabling-fe';\n\n@Component({\n selector: 'ccpay-add-remission',\n templateUrl: './add-remission.component.html',\n styleUrls: ['./add-remission.component.scss']\n})\nexport class AddRemissionComponent implements OnInit {\n @Input() fee: IFee;\n @Input() payment: IPayment;\n @Input() remission: IRemission;\n @Input() ccdCaseNumber: string;\n @Input() caseType: string;\n @Input() viewCompStatus: string;\n @Input() paymentGroupRef: string;\n @Input() isTurnOff: boolean;\n @Input() isRefundRemission: boolean;\n @Input() isStrategicFixEnable: boolean;\n @Input() paidAmount: any;\n @Input() isFromRefundListPage: boolean;\n @Input() isFromPaymentDetailPage: boolean;\n @Input() isFromServiceRequestPage: boolean;\n @Input() feeamount: number;\n @Input('LOGGEDINUSERROLES') LOGGEDINUSERROLES: string[];\n @Input('orderDetail') orderDetail: any[];\n @Input('orderRef') orderRef: string;\n @Input('orderStatus') orderStatus: string;\n @Input('orderParty') orderParty: string;\n @Input('orderCreated') orderCreated: Date;\n @Input('orderCCDEvent') orderCCDEvent: string;\n @Input('takepayment') takePayment: boolean;\n @Input('orderFeesTotal') orderFeesTotal: number;\n @Input('orderTotalPayments') orderTotalPayments: number;\n @Input('orderRemissionTotal') orderRemissionTotal: number;\n @Output() cancelRemission: EventEmitter<void> = new EventEmitter();\n //@Output() refundListReason: EventEmitter<any> = new EventEmitter({reason:string, code:string});\n @Output() refundListReason = new EventEmitter<{reason: string, code: string}>();\n @Output() refundListAmount: EventEmitter<string> = new EventEmitter();\n\n refund = {\n reason: {\n duplicate: 'Duplicate payment',\n humanerror: 'Human error',\n caseWithdrawn: 'Case withdrawn',\n other: 'Other'\n }\n }\n\n remissionForm: FormGroup;\n hasErrors = false;\n viewStatus = 'main';\n errorMessage = null;\n option: string = null;\n isConfirmationBtnDisabled: boolean = false;\n bsPaymentDcnNumber: string;\n selectedValue = 'yes';\n amount: any;\n retroRemission: boolean = false;\n remissionReference: string = '';\n refundReference: string;\n refundAmount: string;\n paymentExplanationHasError: boolean = false;\n refundReason:string;\n selectedRefundReason: string;\n displayRefundReason: string;\n refundCode:string;\n remessionPayment:IPayment;\n isRemissionCodeEmpty: boolean = false;\n remissionCodeHasError: boolean = false;\n isAmountEmpty: boolean = false;\n isReasonEmpty: boolean = false;\n amountHasError: boolean = false;\n isRemissionLessThanFeeError: boolean = false;\n refundHasError:boolean = false;\n isPaymentSuccess: boolean = false;\n isRemissionApplied: boolean = false;\n remissionamt:number;\n // refundReasons: any[] = [];\n commonRefundReasons: any[] = [];\n showReasonText: boolean;\n isRefundReasonsSelected: boolean;\n default: string;\n reasonLength: number;\n refundReasons:IRefundReasons[];\n pattern1: string;\n pattern2: string;\n sendOrderDetail: any[];\n sendOrderRef: string;\n component: { account_number: string; amount: number; case_reference: string; ccd_case_number: string; channel: string; currency: string; customer_reference: string; date_created: string; date_updated: string; description: string; method: string; organisation_name: string; payment_allocation: any[]; reference: string; service_name: string; site_id: string; status: string; };\n\n constructor(private formBuilder: FormBuilder,\n private router: Router,\n private paymentViewService: PaymentViewService,\n private paymentLibComponent: PaymentLibComponent,\n private refundService: RefundsService,\n private cd: ChangeDetectorRef,\n private OrderslistService: OrderslistService) { }\n\n ngOnInit() {\n this.default = 'Select a different reason';\n this.pattern1 = '^([a-zA-Z0-9]{3})-([a-zA-Z0-9]{3})-([a-zA-Z0-9]{3})$';\n this.pattern2 = '^([A-Za-z]{2}[0-9]{2})-([0-9]{6})$';\n if(this.viewCompStatus !== '' && this.viewCompStatus !== undefined){\n this.viewStatus = '';\n }\n if(this.remission) {\n }\n if(this.fee) {\n this.amount = (this.fee.volume * this.fee.calculated_amount);\n }\n if (this.payment){\n this.remessionPayment = this.payment;\n if(this.payment.status === 'Success') {\n this.isPaymentSuccess = true;\n }\n }\n this.option = this.paymentLibComponent.SELECTED_OPTION;\n this.bsPaymentDcnNumber = this.paymentLibComponent.bspaymentdcn;\n this.remissionForm = this.formBuilder.group({\n remissionCode: new FormControl('',\n Validators.compose([\n Validators.required,\n Validators.pattern(`(${this.pattern1})|(${this.pattern2})`)\n ])\n ),\n amount: new FormControl('', Validators.compose([\n Validators.required,\n Validators.pattern('^[0-9]+(\\.[0-9]{1,2})?$')\n ])),\n refundReason: new FormControl('', Validators.compose([Validators.required])),\n refundDDReason: new FormControl('', Validators.compose([Validators.required])),\n reason: new FormControl()\n });\n const remissionctrls=this.remissionForm.controls;\n remissionctrls['refundDDReason'].setValue('Select a different reason', {onlySelf: true});\n\n if(this.viewCompStatus === ''){\n this.viewStatus = 'main';\n }\n\n if(this.viewCompStatus === 'issuerefund'){\n this.refundService.getRefundReasons().subscribe(\n refundReasons => {\n this.refundReasons = refundReasons.filter((data) => data.recently_used === false);\n this.refundReasons = this.refundReasons.filter((data) => data.name !== 'Retrospective remission');\n this.cd.detectChanges();\n this.commonRefundReasons = refundReasons.filter((data) => data.recently_used === true);\n this.commonRefundReasons.sort((a, b) => a.toString().localeCompare(b));\n this.cd.detectChanges();\n } );\n }\n\n if(this.viewCompStatus === 'processretroremissonpage' && this.isFromRefundListPage){\n this.viewStatus = 'processretroremissonpage';\n }\n\n }\n\n addRemission() {\n this.resetRemissionForm([false, false, false, false, false, false], 'All');\n const remissionctrls=this.remissionForm.controls,\n isRemissionLessThanFee = this.fee.calculated_amount > remissionctrls.amount.value;\n this.remissionForm.controls['refundReason'].setErrors(null);\n this.remissionForm.controls['refundDDReason'].setErrors(null);\n if (this.remissionForm.dirty && this.remissionForm.valid && isRemissionLessThanFee) {\n this.viewStatus = 'confirmation';\n }else {\n\n if(remissionctrls['remissionCode'].value == '' ) {\n this.resetRemissionForm([true, false, false, false, false, false], 'remissionCode');\n }\n if(remissionctrls['remissionCode'].value != '' && remissionctrls['remissionCode'].invalid ) {\n this.resetRemissionForm([false, true, false, false, false, false], 'remissionCode');\n }\n if(remissionctrls['amount'].value == '' ) {\n this.resetRemissionForm([false, false, true, false, false, false], 'amount');\n }\n if(remissionctrls['amount'].value != '' && remissionctrls['amount'].invalid ) {\n this.resetRemissionForm([false, true, false, true, false, false], 'amount');\n }\n if(remissionctrls.amount.valid && !isRemissionLessThanFee){\n this.resetRemissionForm([false, false, false, false, true, false], 'amount');\n }\n }\n }\n\n confirmRemission() {\n this.isConfirmationBtnDisabled = true;\n const newNetAmount = this.remissionForm.controls.amount.value,\n remissionAmount = this.fee.net_amount - newNetAmount,\n requestBody = new AddRemissionRequest\n (this.ccdCaseNumber, this.fee, remissionAmount, this.remissionForm.controls.remissionCode.value, this.caseType);\n this.paymentViewService.postPaymentGroupWithRemissions(decodeURIComponent(this.paymentGroupRef).trim(), this.fee.id, requestBody).subscribe(\n response => {\n if (JSON.parse(response).success) {\n let LDUrl = this.isTurnOff ? '&isTurnOff=Enable' : '&isTurnOff=Disable'\n LDUrl += `&caseType=${this.caseType}`\n if (this.paymentLibComponent.bspaymentdcn) {\n this.router.routeReuseStrategy.shouldReuseRoute = () => false;\n this.router.onSameUrlNavigation = 'reload';\n this.router.navigateByUrl(`/payment-history/${this.ccdCaseNumber}?view=fee-summary&selectedOption=${this.option}&paymentGroupRef=${this.paymentGroupRef}&dcn=${this.paymentLibComponent.bspaymentdcn}${LDUrl}`);\n }else {\n this.gotoCasetransationPage();\n }\n\n }\n },\n (error: any) => {\n this.errorMessage = error;\n this.isConfirmationBtnDisabled = false;\n }\n );\n }\n\n resetRemissionForm(val, field){\n if (field==='All'){\n this.isRemissionCodeEmpty = val[0];\n this.remissionCodeHasError = val[1];\n this.isAmountEmpty = val[2];\n this.amountHasError = val[3];\n this.isRemissionLessThanFeeError = val[4];\n this.isReasonEmpty = val[5];\n } else if(field==='remissionCode' || field==='All') {\n this.isRemissionCodeEmpty = val[0];\n this.remissionCodeHasError = val[1];\n } else if (field==='amount' || field==='All'){\n this.isAmountEmpty = val[2];\n this.amountHasError = val[3];\n this.isRemissionLessThanFeeError = val[4];\n } else if (field==='reason' || field==='All'){\n this.isReasonEmpty = val[5];\n }\n }\n\n // Add retro remission changes\n addRemissionCode() {\n this.errorMessage = false;\n this.viewStatus = '';\n this.isRefundRemission = false;\n this.resetRemissionForm([false, false, false, false, false, false], 'All');\n const remissionctrls=this.remissionForm.controls\n // isRemissionLessThanFee = this.fee.calculated_amount >= remissionctrls.amount.value;\n this.remissionForm.controls['refundReason'].setErrors(null);\n this.remissionForm.controls['refundDDReason'].setErrors(null);\n this.remissionForm.controls['amount'].setErrors(null);\n if (this.remissionForm.dirty && this.remissionForm.valid ) {\n this.viewCompStatus = '';\n this.viewStatus = \"processretroremissonpage\";\n }else {\n\n if(remissionctrls['remissionCode'].value == '' ) {\n this.resetRemissionForm([true, false, false, false, false], 'remissionCode');\n }\n if(remissionctrls['remissionCode'].value != '' && remissionctrls['remissionCode'].invalid ) {\n this.resetRemissionForm([false, true, false, false, false], 'remissionCode');\n }\n if(remissionctrls['amount'].value == '' ) {\n this.resetRemissionForm([false, false, true, false, false], 'amount');\n }\n if(remissionctrls['amount'].value != '' && remissionctrls['amount'].invalid ) {\n this.resetRemissionForm([false, true, false, true, false], 'amount');\n }\n if(remissionctrls['reason'].value == '') {\n this.resetRemissionForm([false, false, false, true, false, true], 'reason');\n }\n if(remissionctrls.amount.valid){\n this.resetRemissionForm([false, false, false, false, true], 'amount');\n }\n\n }\n }\n\n\n gotoAddRetroRemissionCodePage() {\n this.errorMessage = false;\n if(this.isRefundRemission) {\n this.paymentLibComponent.iscancelClicked = true;\n this.refundListAmount.emit();\n this.paymentLibComponent.isFromRefundStatusPage = true;\n return;\n }\n if ( this.isFromRefundListPage ) {\n this.paymentLibComponent.iscancelClicked = true;\n this.refundListReason.emit({reason: this.selectedRefundReason, code: this.refundReason});\n this.paymentLibComponent.isFromRefundStatusPage = true;\n return;\n }\n this.viewStatus = '';\n this.selectedValue = 'yes';\n this.viewCompStatus = \"addremission\";\n this.isRefundRemission = true;\n this.errorMessage = '';\n if(this.isFromPaymentDetailPage) {\n this.paymentLibComponent.viewName = 'payment-view';\n }\n }\n\n gotoCheckRetroRemissionPage(payment: IPayment) {\n this.paymentLibComponent.iscancelClicked = false;\n this.errorMessage = '';\n this.resetRemissionForm([false, false, false, false, false], 'All');\n if( !this.isRefundRemission) {\n var remissionctrls=this.remissionForm.controls,\n isRemissionLessThanFee = this.fee.calculated_amount >= remissionctrls.amount.value;\n if (this.remissionForm.dirty ) {\n if(remissionctrls['amount'].value == '' || remissionctrls['amount'].value < 0) {\n this.resetRemissionForm([false, false, true, false, false], 'amount');\n } else if(remissionctrls['amount'].value != '' && remissionctrls['amount'].invalid ) {\n this.resetRemissionForm([false, false, false, true, false], 'amount');\n } else if(remissionctrls.amount.valid && !isRemissionLessThanFee){\n this.resetRemissionForm([false, false, false, false, true], 'amount');\n } else {\n this.viewCompStatus = '';\n this.viewStatus = \"checkretroremissionpage\";\n }\n }\n } else {\n var remissionctrls=this.remissionForm.controls;\n //if (this.remissionForm.dirty ) {\n if(remissionctrls['amount'].value == '' || remissionctrls['amount'].value < 0 ) {\n this.resetRemissionForm([false, false, true, false, false], 'amount');\n } else {\n this.viewCompStatus = '';\n this.viewStatus = \"checkretroremissionpage\";\n this.refundListAmount.emit(remissionctrls['amount'].value);\n }\n //}\n\n }\n }\n\n gotoProcessRetroRemissionPage() {\n this.viewStatus = '';\n this.viewCompStatus = 'addremission';\n this.isRefundRemission = true;\n this.errorMessage = '';\n }\n\n confirmRetroRemission() {\n if(!this.isConfirmationBtnDisabled) {\n this.retroRemission = true;\n this.remissionamt = this.remissionForm.controls.amount.value;\n const requestBody = new AddRetroRemissionRequest(this.remissionamt,this.remissionForm.controls.remissionCode.value )\n this.paymentViewService.postPaymentGroupWithRetroRemissions(decodeURIComponent(this.paymentGroupRef).trim(), this.fee.id, requestBody).subscribe(\n response => {\n if (JSON.parse(response)) {\n this.isRemissionApplied = true;\n this.viewCompStatus = '';\n this.viewStatus = 'retroremissionconfirmationpage';\n this.remissionReference =JSON.parse(response).remission_reference;\n }\n },\n (error: any) => {\n this.errorMessage = error;\n this.isConfirmationBtnDisabled = false;\n this.cd.detectChanges();\n }\n );\n }\n }\n\n processRefund() {\n this.errorMessage = '';\n this.isConfirmationBtnDisabled = true;\n if( this.isRefundRemission) {\n this.retroRemission = true;\n }\n if (this.remissionReference === undefined || this.remissionReference === '') {\n this.remissionReference = this.remission.remission_reference;\n }\n const requestBody = new PostIssueRefundRetroRemission(this.remissionReference);\n this.paymentViewService.postRefundRetroRemission(requestBody).subscribe(\n response => {\n if (JSON.parse(response)) {\n this.viewCompStatus = '';\n this.viewStatus = 'refundconfirmationpage';\n this.refundReference = JSON.parse(response).refund_reference;\n this.refundAmount = JSON.parse(response).refund_amount;\n }\n },\n (error: any) => {\n this.errorMessage = error;\n this.isConfirmationBtnDisabled = false;\n })\n }\n\n // Issue Refund changes\n\n gotoIssueRefundConfirmation(payment: IPayment) {\n this.paymentLibComponent.iscancelClicked = false;\n if(this.paymentLibComponent.REFUNDLIST === \"true\") {\n this.isFromRefundListPage = true;\n }\n this.errorMessage = '';\n this.refundReason = this.remissionForm.controls['refundReason'].value === null ? this.remissionForm.controls['refundDDReason'].value : this.remissionForm.controls['refundReason'].value;\n if(!this.refundReason || this.refundReason === 'Select a different reason') {\n this.refundHasError = true;\n } else if(this.selectedRefundReason.includes('Other') && (this.remissionForm.controls['reason'].value == '' || this.remissionForm.controls['reason'].value == null)) {\n this.resetRemissionForm([false, false, false, true, false, true], 'reason');\n } else if (this.selectedRefundReason.includes('Other') && this.remissionForm.controls['reason'].value !== '') {\n this.refundHasError = false;\n this.refundReason += '-' + this.remissionForm.controls['reason'].value;\n this.displayRefundReason = this.selectedRefundReason + '-' + this.remissionForm.controls['reason'].value;\n if ( this.isFromRefundListPage ) {\n this.refundListReason.emit({reason: this.displayRefundReason, code: this.refundReason});\n } else {\n this.viewCompStatus = '';\n this.viewStatus = 'checkissuerefundpage';\n }\n\n } else {\n this.displayRefundReason = this.selectedRefundReason;\n if ( this.isFromRefundListPage ) {\n this.paymentLibComponent.isFromRefundStatusPage = true;\n this.refundListReason.emit({reason: this.selectedRefundReason, code: this.refundReason});\n } else {\n this.viewCompStatus = '';\n this.viewStatus = 'checkissuerefundpage';\n }\n\n }\n }\n\n gotoIssueRefundPage() {\n this.errorMessage = '';\n this.viewCompStatus = 'issuerefund';\n this.viewStatus = '';\n this.isRefundRemission = true;\n this.errorMessage = false;\n this.refundHasError = false;\n this.isReasonEmpty = false;\n }\n\n changeIssueRefundReason() {\n // this.remissionForm.controls['refundReason'].setValue('Duplicate payment');\n this.errorMessage = '';\n this.refundHasError = false;\n this.isReasonEmpty = false;\n this.viewCompStatus = 'issuerefund';\n this.viewStatus = '';\n this.isRefundRemission = true;\n }\n\n confirmIssueRefund() {\n this.isConfirmationBtnDisabled = true;\n this.errorMessage = '';\n if( this.isRefundRemission) {\n this.retroRemission = true;\n }\n\n const requestBody = new PostRefundRetroRemission(this.payment.reference,this.refundReason);\n this.paymentViewService.postRefundsReason(requestBody).subscribe(\n response => {\n if (JSON.parse(response)) {\n this.viewCompStatus = '';\n this.viewStatus = 'refundconfirmationpage';\n this.refundReference =JSON.parse(response).refund_reference;\n if(JSON.parse(response).refund_amount) {\n this.refundAmount = JSON.parse(response).refund_amount;\n }\n }\n },\n (error: any) => {\n this.errorMessage = error;\n this.isConfirmationBtnDisabled = false;\n this.cd.detectChanges();\n })\n }\n\n// Retro Refund\n\n confirmRetroRefund() {\n this.isConfirmationBtnDisabled = true;\n this.errorMessage = '';\n if( this.isRefundRemission) {\n this.retroRemission = true;\n }\n\n const requestBody = new PostRefundRetroRemission(this.payment.reference,'RR004-Retrospective remission');\n this.paymentViewService.postRefundsReason(requestBody).subscribe(\n response => {\n if (JSON.parse(response)) {\n this.viewCompStatus = '';\n this.viewStatus = 'retrorefundconfirmationpage';\n this.refundReference =JSON.parse(response).refund_reference;\n if(JSON.parse(response).refund_amount) {\n this.refundAmount = JSON.parse(response).refund_amount;\n }\n }\n },\n (error: any) => {\n this.errorMessage = error;\n this.isConfirmationBtnDisabled = false;\n });\n }\n\n selectRadioButton(key, value) {\n localStorage.setItem(\"myradio\", key);\n const remissionctrls=this.remissionForm.controls;\n remissionctrls['refundDDReason'].setValue('Select a different reason', {onlySelf: true});\n remissionctrls['reason'].reset();\n this.isRefundReasonsSelected = true;\n this.errorMessage = false;\n this.isReasonEmpty = false;\n this.showReasonText = false;\n this.refundHasError = false;\n this.selectedRefundReason = key;\n if(this.selectedRefundReason.includes('Other')) {\n this.showReasonText = true;\n this.refundHasError = false;\n this.refundReason = key;\n }\n }\n\n selectchange(args) {\n const remissionctrls=this.remissionForm.controls;\n remissionctrls['refundReason'].reset();\n remissionctrls['reason'].reset();\n this.isRefundReasonsSelected = false;\n this.showReasonText = false;\n this.refundHasError = false;\n this.selectedRefundReason = args.target.options[args.target.options.selectedIndex].id;\n this.reasonLength = (29-this.selectedRefundReason.split('- ')[1].length);\n\n if(this.selectedRefundReason.includes('Other')) {\n this.showReasonText = true;\n this.refundHasError = false;\n this.refundReason = args.target.options[args.target.options.selectedIndex].id;\n }\n\n\n }\n\n gotoServiceRequestPage(event: any) {\n this.errorMessage ='';\n event.preventDefault();\n if (this.isFromServiceRequestPage && !this.isFromPaymentDetailPage) {\n this.viewStatus = 'order-full-view';\n this.viewCompStatus = '';\n } else if ( this.isFromRefundListPage ) {\n this.paymentLibComponent.iscancelClicked = true;\n this.refundListReason.emit({reason: this.selectedRefundReason, code: this.refundReason});\n this.paymentLibComponent.isFromRefundStatusPage = true;\n } else {\n this.paymentLibComponent.paymentMethod = this.payment.method;\n this.paymentLibComponent.paymentGroupReference = this.paymentLibComponent.paymentGroupReference\n this.paymentLibComponent.paymentReference = this.payment.reference;\n this.paymentLibComponent.viewName = 'payment-view';\n this.OrderslistService.setOrderRef(this.orderRef);\n this.OrderslistService.setorderCCDEvent(this.orderCCDEvent);\n this.OrderslistService.setorderCreated(this.orderCreated);\n this.OrderslistService.setorderDetail(this.orderDetail);\n this.OrderslistService.setorderParty(this.orderParty);\n this.OrderslistService.setorderTotalPayments(this.orderTotalPayments);\n this.OrderslistService.setorderRemissionTotal(this.orderRemissionTotal);\n this.OrderslistService.setorderFeesTotal(this.orderFeesTotal);\n this.viewStatus = 'payment-view';\n this.sendOrderDetail = this.orderDetail;\n this.sendOrderRef = this.orderRef;\n if(this.LOGGEDINUSERROLES === undefined) {\n this.OrderslistService.getUserRolesList().subscribe((data) => this.LOGGEDINUSERROLES = data);\n }\n this.viewCompStatus = '';\n }\n // if (this.paymentLibComponent.TAKEPAYMENT === undefined && this.paymentLibComponent.SERVICEREQUEST === undefined) {\n // this.paymentLibComponent.SERVICEREQUEST = 'false';\n // this.paymentLibComponent.TAKEPAYMENT = false;\n // }\n // if (this.isFromServiceRequestPage) {\n // //this.paymentLibComponent.TAKEPAYMENT = false;\n // this.paymentLibComponent.isFromRefundStatusPage = false;\n // this.viewStatus = 'main'\n // this.paymentLibComponent.viewName = 'case-transactions';\n // this.OrderslistService.setisFromServiceRequestPage(true);\n // this.OrderslistService.setnavigationPage('servicerequestpage');\n // }\n // if ( this.isFromRefundListPage ) {\n // this.paymentLibComponent.iscancelClicked = true;\n // this.refundListReason.emit({reason: this.selectedRefundReason, code: this.refundReason});\n // this.paymentLibComponent.isFromRefundStatusPage = true;\n // }\n // if(!this.paymentLibComponent.isFromRefundStatusPage) {\n // if(this.payment) {\n // this.OrderslistService.setpaymentPageView({method: this.payment.method,payment_group_reference: this.paymentGroupRef, reference:this.payment.reference});\n // }\n // if (this.isFromServiceRequestPage) {\n // this.OrderslistService.setnavigationPage('servicerequestpage');\n // } else {\n // this.OrderslistService.setnavigationPage('paymentdetailspage');\n // }\n // this.errorMessage = '';\n // this.paymentLibComponent.viewName = 'case-transactions';\n // // this.paymentLibComponent.TAKEPAYMENT = true;\n // this.paymentLibComponent.ISTURNOFF = this.isTurnOff;\n\n // this.paymentLibComponent.isFromServiceRequestPage = true;\n // this.paymentLibComponent.ISBSENABLE = true;\n // let partUrl = this.bsPaymentDcnNumber ? `&dcn=${this.bsPaymentDcnNumber}` : '';\n // partUrl += this.paymentLibComponent.ISBSENABLE ? '&isBulkScanning=Enable' : '&isBulkScanning=Disable';\n // partUrl += this.paymentLibComponent.ISTURNOFF ? '&isTurnOff=Enable' : '&isTurnOff=Disable';\n // partUrl += this.isStrategicFixEnable ? '&isStFixEnable=Enable' : '&isStFixEnable=Disable';\n // partUrl += `&caseType=${this.caseType}`;\n // if(this.isFromPaymentDetailPage) {\n // partUrl += this.paymentLibComponent.isFromPaymentDetailPage\n // }\n // if(!this.paymentLibComponent.TAKEPAYMENT) {\n // this.paymentLibComponent.TAKEPAYMENT = undefined;\n // }\n // if ( this.paymentLibComponent.SERVICEREQUEST) {\n // const url = `/payment-history/${this.ccdCaseNumber}?view=case-transactions&selectedOption=${this.option}${partUrl}`;\n // this.router.routeReuseStrategy.shouldReuseRoute = () => false;\n // this.router.onSameUrlNavigation = 'reload';\n // this.router.navigateByUrl(url);\n // } else {\n // const url = `/payment-history/${this.ccdCaseNumber}?view=case-transactions&takePayment=${this.paymentLibComponent.TAKEPAYMENT}&selectedOption=${this.option}${partUrl}`;\n // this.router.routeReuseStrategy.shouldReuseRoute = () => false;\n // this.router.onSameUrlNavigation = 'reload';\n // this.router.navigateByUrl(url);\n // }\n\n // } else {\n // this.paymentLibComponent.viewName === 'refundstatuslist';\n // this.paymentLibComponent.isFromRefundStatusPage = true;\n // }\n }\n\n gotoCasetransationPage() {\n this.OrderslistService.setnavigationPage('casetransactions');\n this.errorMessage = '';\n this.paymentLibComponent.viewName = 'case-transactions';\n this.paymentLibComponent.VIEW = 'case-transactions';\n this.paymentLibComponent.ISTURNOFF = this.isTurnOff;\n this.paymentLibComponent.isFromServiceRequestPage = true;\n this.resetOrderData();\n let partUrl = this.bsPaymentDcnNumber ? `&dcn=${this.bsPaymentDcnNumber}` : '';\n partUrl += this.paymentLibComponent.ISBSENABLE ? '&isBulkScanning=Enable' : '&isBulkScanning=Disable';\n partUrl += this.paymentLibComponent.ISTURNOFF ? '&isTurnOff=Enable' : '&isTurnOff=Disable';\n partUrl += this.isStrategicFixEnable ? '&isStFixEnable=Enable' : '&isStFixEnable=Disable';\n partUrl += `&caseType=${this.caseType}`;\n const url = `/payment-history/${this.ccdCaseNumber}?view=case-transactions&takePayment=${this.paymentLibComponent.TAKEPAYMENT}&selectedOption=${this.option}${partUrl}`;\n this.router.routeReuseStrategy.shouldReuseRoute = () => false;\n this.router.onSameUrlNavigation = 'reload';\n this.router.navigateByUrl(url);\n }\n\n gotoCasetransationPageCancelBtnClicked(event: Event) {\n event.preventDefault();\n if( !this.paymentLibComponent.isFromServiceRequestPage) {\n this.OrderslistService.setnavigationPage('casetransactions');\n this.OrderslistService.setisFromServiceRequestPage(false);\n this.paymentLibComponent.VIEW ='case-transactions';\n this.paymentLibComponent.viewName = 'case-transactions';\n this.paymentLibComponent.ISBSENABLE = true;\n this.paymentLibComponent.isRefundStatusView = false;\n // this.OrderslistService.setnavigationPage('casetransactions');\n // this.OrderslistService.setisFromServiceRequestPage(false);\n // this.paymentLibComponent.VIEW ='case-transactions';\n // this.paymentLibComponent.viewName = 'case-transactions';\n // this.paymentLibComponent.ISBSENABLE = true;\n // this.paymentLibComponent.isRefundStatusView = false;\n // this.resetOrderData(); let partUrl = this.bsPaymentDcnNumber ? `&dcn=${this.bsPaymentDcnNumber}` : '';\n // partUrl += this.paymentLibComponent.ISBSENABLE ? '&isBulkScanning=Enable' : '&isBulkScanning=Disable';\n // partUrl += this.paymentLibComponent.ISTURNOFF ? '&isTurnOff=Enable' : '&isTurnOff=Disable';\n // partUrl += this.isStrategicFixEnable ? '&isStFixEnable=Enable' : '&isStFixEnable=Disable';\n // partUrl += `&caseType=${this.caseType}`;\n // const url = `/payment-history/${this.ccdCaseNumber}?view=case-transactions&takePayment=${this.paymentLibComponent.TAKEPAYMENT}&selectedOption=${this.option}${partUrl}`;\n // this.router.routeReuseStrategy.shouldReuseRoute = () => false;\n // this.router.onSameUrlNavigation = 'reload';\n // this.router.navigateByUrl(url);\n } else {\n\n if (this.paymentLibComponent.REFUNDLIST) {\n this.paymentLibComponent.viewName = 'refund-list';\n return;\n }\n if (this.paymentLibComponent.TAKEPAYMENT === undefined && this.paymentLibComponent.SERVICEREQUEST === undefined) {\n this.paymentLibComponent.SERVICEREQUEST = 'false';\n }\n this.OrderslistService.setisFromServiceRequestPage(false);\n this.OrderslistService.setpaymentPageView({method: '',payment_group_reference: '', reference:''});\n this.OrderslistService.setnavigationPage('casetransactions');\n this.errorMessage = '';\n this.paymentLibComponent.viewName = 'case-transactions';\n this.paymentLibComponent.ISTURNOFF = this.isTurnOff;\n this.paymentLibComponent.isFromServiceRequestPage = true;\n this.paymentLibComponent.ISBSENABLE = true;\n let partUrl = this.bsPaymentDcnNumber ? `&dcn=${this.bsPaymentDcnNumber}` : '';\n partUrl += this.paymentLibComponent.ISBSENABLE ? '&isBulkScanning=Enable' : '&isBulkScanning=Disable';\n partUrl += this.paymentLibComponent.ISTURNOFF ? '&isTurnOff=Enable' : '&isTurnOff=Disable';\n partUrl += this.isStrategicFixEnable ? '&isStFixEnable=Enable' : '&isStFixEnable=Disable';\n partUrl += `&caseType=${this.caseType}`;\n if(this.isFromPaymentDetailPage) {\n partUrl += this.paymentLibComponent.isFromPaymentDetailPage\n }\n\n if(!this.paymentLibComponent.SERVICEREQUEST) {\n const url = `/payment-history/${this.ccdCaseNumber}?view=case-transactions&takePayment=${this.paymentLibComponent.TAKEPAYMENT}&selectedOption=${this.option}${partUrl}`;\n this.router.routeReuseStrategy.shouldReuseRoute = () => false;\n this.router.onSameUrlNavigation = 'reload';\n this.router.navigateByUrl(url);\n } else {\n const url =`/payment-history/${this.ccdCaseNumber}?selectedOption=${this.option}${partUrl}`;\n this.router.routeReuseStrategy.shouldReuseRoute = () => false;\n this.router.onSameUrlNavigation = 'reload';\n this.router.navigateByUrl(url);\n }\n }\n\n }\n\n resetOrderData() {\n this.OrderslistService.setOrderRef(null);\n this.OrderslistService.setorderCCDEvent(null);\n this.OrderslistService.setorderCreated(null);\n this.OrderslistService.setorderDetail(null);\n this.OrderslistService.setorderParty(null);\n this.OrderslistService.setorderTotalPayments(null);\n this.OrderslistService.setorderRemissionTotal(null);\n this.OrderslistService.setorderFeesTotal(null);\n }\n\n\n getFormattedCurrency(currency:number){\n if(currency.toString().includes(\".\")){\n return currency\n }\n return currency.toString().concat(\".00\");\n }\n\n}\n","import { Pipe, PipeTransform } from '@angular/core';\n@Pipe({\n name: 'ccdHyphens'\n})\nexport class CcdHyphensPipe implements PipeTransform {\n constructor() {}\n transform(value: any, args?: any): any {\n const pattern = /^([0-9]{4})+([0-9]{4})+([0-9]{4})+([0-9]{4})$/;\n if ( value.match(pattern)) {\n return value.replace(pattern,'$1-$2-$3-$4') \n }\n return value;\n }\n}\n","import { Pipe, PipeTransform } from '@angular/core';\n@Pipe({\n name: 'capitalize'\n})\nexport class CapitalizePipe implements PipeTransform {\n constructor() { }\n transform(s: any, args?: any): any {\n return s && s[0].toUpperCase() + s.slice(1) || \"\";\n }\n}\n","import { Pipe, PipeTransform } from '@angular/core';\n@Pipe({\n name: 'keyValue'\n})\nexport class keyValuePipe implements PipeTransform {\n constructor() {}\n transform(input: any): any {\n let keys = [];\n for (let key in input) {\n if (input.hasOwnProperty(key)) {\n keys.push({ key: key, value: input[key]});\n }\n }\n return keys;\n }\n}\n","import { Pipe, PipeTransform } from '@angular/core';\nimport { DomSanitizer, SafeHtml } from '@angular/platform-browser';\n\n@Pipe({ name: 'sanitizeHtml' })\nexport class SanitizeHtmlPipe implements PipeTransform {\n constructor(private sanitizer: DomSanitizer) {}\n transform(value: any): SafeHtml {\n return this.sanitizer.bypassSecurityTrustHtml(value);\n }\n}\n","import { Injectable } from '@angular/core';\nimport * as FileSaver from 'file-saver';\nimport * as XLSX from 'xlsx';\nimport * as XLSXStyle from 'xlsx-style';\n\n\nconst EXCEL_TYPE = 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=UTF-8';\nconst EXCEL_EXTENSION = '.xlsx';\n\n@Injectable()\nexport class XlFileService {\n\n constructor() { }\n\n public exportAsExcelFile(json: any[], excelFileName: string): void {\n let worksheet: XLSX.WorkSheet; \n let workbook: XLSX.WorkBook; \n console.log(excelFileName);\n\n if(excelFileName.match('Data_Loss')!== null){\n worksheet = XLSX.utils.json_to_sheet(json,{header:['loss_resp','payment_asset_dcn','env_ref','env_item','resp_service_id','resp_service_name','date_banked','bgc_batch','payment_method','amount']});\n worksheet = this.setDataLossReportHeaders(worksheet);\n worksheet = this.autoFitColumns(worksheet,json);\n } else if(excelFileName.match('Unprocessed')!== null){\n worksheet = XLSX.utils.json_to_sheet(json,{header:['resp_service_id','resp_service_name','exception_ref','ccd_ref','date_banked','bgc_batch','payment_asset_dcn','env_ref','env_item','payment_method','amount']});\n worksheet = this.setUnprocessedReportHeaders(worksheet);\n worksheet = this.autoFitColumns(worksheet,json);\n } else if(excelFileName.match('Processed_Unallocated')!== null){\n worksheet = XLSX.utils.json_to_sheet(json,{header:['resp_service_id','resp_service_name','allocation_status','receiving_office','allocation_reason','ccd_exception_reference','ccd_case_reference','payment_asset_dcn','env_ref','env_item','date_banked','bgc_batch','payment_method','amount']});\n worksheet = this.setProcessedUnallocatedReportHeaders(worksheet);\n worksheet = this.autoFitColumns(worksheet,json);\n } else if(excelFileName.match('Payment failure')!== null){\n worksheet = XLSX.utils.json_to_sheet(json,{header:['payment_reference','ccd_reference','org_id','service_name','failure_reference','failure_reason','disputed_amount','event_name','event_date','representment_status','representment_date','refund_reference','refund_amount','refund_date']});\n worksheet = this.setPaymentFailureReportHeaders(worksheet);\n worksheet = this.autoFitColumns(worksheet,json);\n } else {\n worksheet = XLSX.utils.json_to_sheet(json,{header:['resp_service_id','resp_service_name','surplus_shortfall','balance','payment_amount','ccd_case_reference', 'ccd_exception_reference', 'processed_date', 'reason', 'explanation', 'user_name']});\n worksheet = this.setShortFallReportHeaders(worksheet);\n worksheet = this.autoFitColumns(worksheet,json);\n }\n workbook = { Sheets: { 'data': worksheet }, SheetNames: ['data'] };\n const excelBuffer: any = XLSX.write(workbook, { bookType: 'xlsx', type: 'array' });\n this.saveAsExcelFile(excelBuffer, excelFileName);\n }\n\n\nprivate autoFitColumns (worksheet: XLSX.WorkSheet,json:any) : XLSX.WorkSheet {\n let objectMaxLength = []; \n let ColWidth = [];\n let obj = <any>Object;\n for (let i = 0; i < json.length; i++) {\n let value = obj.values(json[i]);\n let key = obj.keys(json[i]);\n for (let j = 0; j < value.length; j++) {\n if(value[j] === null){\n value[j] = '';\n }\n objectMaxLength[j] =\n key[j].length >= value[j].length\n ? key[j].length+2\n : value[j].length+1;\n if( value[j].length === undefined){\n objectMaxLength[j] = key[j].length+2;\n }\n ColWidth.push({'width': +objectMaxLength[j]});\n }\n }\n worksheet['!cols'] = ColWidth;\n return worksheet;\n}\n\n\nprivate setDataLossReportHeaders (worksheet: XLSX.WorkSheet): XLSX.WorkSheet {\n worksheet.A1.v = \"Loss_Resp\";\n worksheet.B1.v = \"Payment_Asset_DCN\";\n worksheet.C1.v = \"Envelope_Ref\";\n worksheet.D1.v = \"Envelope_Item\";\n worksheet.E1.v = \"Resp_Service ID\";\n worksheet.F1.v = \"Resp_Service Name\";\n worksheet.G1.v = \"Date_Banked\";\n worksheet.H1.v = \"BGC_Batch\";\n worksheet.I1.v = \"Payment_Method\";\n worksheet.J1.v = \"Amount\";\n return worksheet;\n}\n\nprivate setUnprocessedReportHeaders (worksheet: XLSX.WorkSheet): XLSX.WorkSheet {\n worksheet.A1.v = \"Resp_Service ID\";\n worksheet.B1.v = \"Resp_Service Name\";\n worksheet.C1.v = \"Exception_Ref\";\n worksheet.D1.v = \"CCD_Ref\";\n worksheet.E1.v = \"Date_Banked\";\n worksheet.F1.v = \"BGC_Batch\";\n worksheet.G1.v = \"Payment_Asset_DCN\";\n worksheet.H1.v = \"Envelope_Ref\";\n worksheet.I1.v = \"Envelope_Item\";\n worksheet.J1.v = \"Payment_Method\";\n worksheet.K1.v = \"Amount\";\n return worksheet;\n}\n\nprivate setProcessedUnallocatedReportHeaders (worksheet: XLSX.WorkSheet): XLSX.WorkSheet {\n worksheet.A1.v = \"Resp_Service ID\";\n worksheet.B1.v = \"Resp_Service Name\";\n worksheet.C1.v = \"Allocation_Status\";\n worksheet.D1.v = \"Receiving_Office\";\n worksheet.E1.v = \"Allocation_Reason\";\n worksheet.F1.v = \"CCD_Exception_Ref\";\n worksheet.G1.v = \"CCD_Case_Ref\";\n worksheet.H1.v = \"Payment_Asset_DCN\";\n worksheet.I1.v = \"Envelope_Ref\";\n worksheet.J1.v = \"Envelope_Item\";\n worksheet.K1.v = \"Date_Banked\";\n worksheet.L1.v = \"BGC_Batch\";\n worksheet.M1.v = \"Payment_Method\";\n worksheet.N1.v = \"Amount\";\n return worksheet;\n}\n\nprivate setPaymentFailureReportHeaders (worksheet: XLSX.WorkSheet): XLSX.WorkSheet {\n worksheet.A1.v = \"Payment reference\";\n worksheet.B1.v = \"CCD reference\";\n worksheet.C1.v = \"OrgID\";\n worksheet.D1.v = \"Service name\";\n worksheet.E1.v = \"Failure reference\";\n worksheet.F1.v = \"Failure reason\";\n worksheet.G1.v = \"Disputed amount\";\n worksheet.H1.v = \"Event name\";\n worksheet.I1.v = \"Event date\";\n worksheet.J1.v = \"Representment status\";\n worksheet.K1.v = \"Representment date\";\n worksheet.L1.v = \"Refund reference\";\n worksheet.M1.v = \"Refund amount\";\n worksheet.N1.v = \"Refund date\";\n return worksheet;\n}\nprivate setShortFallReportHeaders (worksheet: XLSX.WorkSheet): XLSX.WorkSheet {\n worksheet.A1.v = \"Resp_Service ID\";\n worksheet.B1.v = \"Resp_Service Name\";\n worksheet.C1.v = \"Over Payment_Under Payment\";\n worksheet.D1.v = \"Balance\";\n worksheet.E1.v = \"Payment_Amount\";\n worksheet.F1.v = \"CCD_Case_Ref\";\n worksheet.G1.v = \"Exception_Ref\";\n worksheet.H1.v = \"Processed_Date\";\n worksheet.I1.v = \"Reason\";\n worksheet.J1.v = \"Explanation\";\n worksheet.K1.v = \"Updated Name\";\n return worksheet;\n}\n\nprivate saveAsExcelFile(buffer: any, fileName: string): void {\n const data: Blob = new Blob([buffer], {\n type: EXCEL_TYPE\n });\n FileSaver.saveAs(data, fileName + EXCEL_EXTENSION);\n }\n}\n","import { Component, Input, OnInit } from '@angular/core';\nimport { FormBuilder, FormGroup, FormControl } from '@angular/forms';\nimport { formatDate } from \"@angular/common\";\nimport {IPaymentGroup} from '../../interfaces/IPaymentGroup';\nimport { BulkScaningPaymentService } from '../../services/bulk-scaning-payment/bulk-scaning-payment.service';\nimport { ErrorHandlerService } from '../../services/shared/error-handler.service';\nimport { PaymentViewService } from '../../services/payment-view/payment-view.service';\nimport {XlFileService} from '../../services/xl-file/xl-file.service';\nimport { FindValueSubscriber } from 'rxjs/internal/operators/find';\n\n@Component({\n selector: 'ccpay-reports',\n templateUrl: './reports.component.html',\n styleUrls: ['./reports.component.scss']\n})\nexport class ReportsComponent implements OnInit {\n @Input() ISPAYMENTSTATUSENABLED: string;\n fmt = 'dd/MM/yyyy';\n loc = 'en-US';\n reportsForm: FormGroup;\n startDate: string;\n endDate: string;\n errorMeaagse: string;\n ccdCaseNumber: string;\n isDownLoadButtondisabled:Boolean = false;\n isStartDateLesthanEndDate: Boolean = false;\n isDateBetwnMonth: Boolean = false;\n isDateRangeBetnWeek: Boolean = false;\n errorMessage = this.errorHandlerService.getServerErrorMessage(false, false, '');\n paymentGroups: IPaymentGroup[] = [];\n\n constructor(\n private xlFileService: XlFileService,\n private errorHandlerService: ErrorHandlerService,\n private formBuilder: FormBuilder,\n private bulkScaningPaymentService: BulkScaningPaymentService,\n private paymentViewService: PaymentViewService) { }\n \n\n ngOnInit() {\n this.fromValidation();\n\n }\n\n getToday(): string {\n return new Date().toISOString().split('T')[0];\n }\n\n getSelectedFromDate(): void {\n this.validateDates(this.reportsForm.get('selectedreport').value);\n }\n\n validateDates(reportName){\n const selectedStartDate = this.tranformDate(this.reportsForm.get('startDate').value),\n selectedEndDate = this.tranformDate(this.reportsForm.get('endDate').value);\n const isDateRangeMoreThanWeek = (<any>new Date(selectedStartDate) - <any>new Date(selectedEndDate))/(1000 * 3600 * -24) > 7;\n const isDateRangeMoreThanMonth = (<any>new Date(selectedStartDate) - <any>new Date(selectedEndDate))/(1000 * 3600 * -24) > 30;\n if(new Date(selectedStartDate) > new Date(selectedEndDate) && selectedEndDate !== ''){\n this.reportsForm.get('startDate').setValue('');\n this.isDateRangeBetnWeek = false;\n this.isDateBetwnMonth = false;\n this.isStartDateLesthanEndDate = true;\n } else if(reportName && reportName ==='SURPLUS_AND_SHORTFALL' && isDateRangeMoreThanWeek ) {\n this.isDateRangeBetnWeek = true;\n this.isDateBetwnMonth = false;\n this.isStartDateLesthanEndDate = false;\n } else if(reportName && reportName ==='PAYMENT_FAILURE_EVENT' && isDateRangeMoreThanMonth ) {\n this.isDateRangeBetnWeek = false;\n this.isDateBetwnMonth = true;\n this.isStartDateLesthanEndDate = false;\n } else {\n this.isDateBetwnMonth = false;\n this.isDateRangeBetnWeek = false;\n this.isStartDateLesthanEndDate = false;\n }\n\n }\n\n fromValidation() {\n this.reportsForm = this.formBuilder.group({\n selectedreport: new FormControl('') ,\n startDate: new FormControl(''),\n endDate: new FormControl('') \n });\n}\n\ndownloadReport(){\n this.isDownLoadButtondisabled = true;\n const dataLossRptDefault = [{loss_resp:'',payment_asset_dcn:'',env_ref:'',env_item:'',resp_service_id:'',resp_service_name:'',date_banked:'',bgc_batch:'',payment_method:'',amount:''}],\n unProcessedRptDefault = [{resp_service_id:'',resp_service_name:'',exception_ref:'',ccd_ref:'',date_banked:'',bgc_batch:'',payment_asset_dcn:'',env_ref:'',env_item:'',payment_method:'',amount:''}],\n processedUnallocated =[{resp_service_id:'',resp_service_name:'',allocation_status:'',receiving_office:'',allocation_reason:'',ccd_exception_ref:'',ccd_case_ref:'',payment_asset_dcn:'',env_ref:'',env_item:'',date_banked:'',bgc_batch:'',payment_method:'',amount:'',updated_by:''}],\n shortFallsRptDefault = [{resp_service_id:'',resp_service_name:'',surplus_shortfall:'',balance:'',payment_amount:'',ccd_case_reference:'',ccd_exception_reference:'',processed_date:'', reason:'', explanation:'', user_name:''}],\n selectedReportName = this.reportsForm.get('selectedreport').value,\n selectedStartDate = this.tranformDate(this.reportsForm.get('startDate').value),\n selectedEndDate = this.tranformDate(this.reportsForm.get('endDate').value);\n\n if(selectedReportName === 'PROCESSED_UNALLOCATED' || selectedReportName === 'SURPLUS_AND_SHORTFALL' ){\n this.paymentViewService.downloadSelectedReport(selectedReportName,selectedStartDate,selectedEndDate).subscribe(\n response => {\n this.errorMessage = this.errorHandlerService.getServerErrorMessage(false, false, '');\n const result = JSON.parse(response);\n let res= {data: this.applyDateFormat(result)};\n if(res['data'].length === 0 && selectedReportName === 'PROCESSED_UNALLOCATED' ){\n res.data= processedUnallocated;\n } else if(res['data'].length === 0 && selectedReportName === 'SURPLUS_AND_SHORTFALL' ) {\n res.data= shortFallsRptDefault;\n } \n if(result['data'].length > 0) {\n for( var i=0; i< res['data'].length; i++) {\n if(res['data'][i][\"payment_asset_dcn\"] !== undefined) {\n res['data'][i]['env_ref'] = res['data'][i][\"payment_asset_dcn\"].substr(0,13);\n res['data'][i]['env_item'] = res['data'][i][\"payment_asset_dcn\"].substr(13,21);\n }\n if(res['data'][i][\"amount\"] !== undefined) {\n res['data'][i]['amount'] = this.convertToFloatValue(res['data'][i]['amount']);\n }\n if(res['data'][i][\"balance\"] !== undefined) {\n res['data'][i]['balance'] = this.convertToFloatValue(res['data'][i][\"balance\"]);\n }\n let Op = res['data'][i][\"surplus_shortfall\"];\n if(Op !== undefined) {\n res['data'][i]['surplus_shortfall'] = Op ==\"Surplus\" ? \"Over payment\":\"Under payment\";\n }\n if(res['data'][i][\"payment_amount\"] !== undefined) {\n res['data'][i]['payment_amount'] = this.convertToFloatValue(res['data'][i]['payment_amount']);\n }\n }\n } \n this.isDownLoadButtondisabled = false;\n this.xlFileService.exportAsExcelFile(res['data'], this.getFileName(this.reportsForm.get('selectedreport').value, selectedStartDate, selectedEndDate));\n },\n (error: any) => {\n this.isDownLoadButtondisabled = false;\n this.errorMessage = this.errorHandlerService.getServerErrorMessage(true, false, '');\n })\n\n } else if(selectedReportName === 'PAYMENT_FAILURE_EVENT') {\n\n this.paymentViewService.downloadFailureReport(selectedStartDate,selectedEndDate).subscribe(\n response => {\n this.errorMessage = this.errorHandlerService.getServerErrorMessage(false, false, '');\n const result = {data: JSON.parse(response)['payment_failure_report_list']};\n let res = {data: this.applyDateFormat(result)};\n if (result['data'].length > 0) {\n for ( var i=0; i< res['data'].length; i++) {\n if (res['data'][i][\"disputed_amount\"] !== undefined) {\n res['data'][i]['disputed_amount'] = this.convertToFloatValue(res['data'][i][\"disputed_amount\"]);\n }\n if (res['data'][i][\"representment_status\"] !== undefined) {\n res['data'][i]['representment_status'] = res['data'][i][\"representment_status\"].toLowerCase() === 'yes' ? 'Success' : 'Failure';\n }\n if (res['data'][i]['representment_status'] === undefined) {\n res['data'][i]['representment_status'] = 'No representment received';\n }\n if (res['data'][i]['representment_date'] === undefined) {\n res['data'][i]['representment_date'] = 'N/A';\n }\n if (res['data'][i]['refund_reference'] === undefined) {\n res['data'][i]['refund_reference'] = 'No refund available';\n }\n if (res['data'][i]['refund_amount'] === undefined) {\n res['data'][i]['refund_amount'] = 'N/A';\n }\n if (res['data'][i]['refund_date'] === undefined) {\n res['data'][i]['refund_date'] = 'N/A';\n }\n }\n }\n this.isDownLoadButtondisabled = false;\n this.xlFileService.exportAsExcelFile(res['data'], this.getFileName(this.reportsForm.get('selectedreport').value, selectedStartDate, selectedEndDate ));\n\n },\n (error: any) => {\n this.isDownLoadButtondisabled = false;\n const errorContent = error.replace(/[^a-zA-Z ]/g, '').trim();\n const statusCode = error.replace(/[^a-zA-Z0-9 ]/g, '').trim().split(' ')[0];\n if(statusCode === '404') {\n this.errorMessage = this.errorHandlerService.getServerErrorMessage(true, true, errorContent);\n }else {\n this.errorMessage = this.errorHandlerService.getServerErrorMessage(true, false, '');\n }\n })\n\n } else {\n this.bulkScaningPaymentService.downloadSelectedReport(selectedReportName,selectedStartDate,selectedEndDate).subscribe(\n response => {\n this.errorMessage = this.errorHandlerService.getServerErrorMessage(false, false, '');\n const result = JSON.parse(response);\n let res = {data: this.applyDateFormat(result)};\n if(res['data'].length === 0 && selectedReportName === 'DATA_LOSS' ){\n res.data= dataLossRptDefault;\n } else if(res['data'].length === 0 && selectedReportName === 'UNPROCESSED'){\n res.data = unProcessedRptDefault;\n }\n if(result['data'].length > 0) {\n for( var i=0; i< res['data'].length; i++) {\n if(res['data'][i][\"amount\"] !== undefined) {\n res['data'][i]['amount'] = this.convertToFloatValue(res['data'][i]['amount']);\n }\n if(res['data'][i][\"payment_asset_dcn\"] !== undefined) {\n res['data'][i]['env_ref'] = res['data'][i][\"payment_asset_dcn\"].substr(0,13);\n res['data'][i]['env_item'] = res['data'][i][\"payment_asset_dcn\"].substr(13,21);\n }\n }\n }\n this.isDownLoadButtondisabled = false;\n this.xlFileService.exportAsExcelFile(res['data'], this.getFileName(this.reportsForm.get('selectedreport').value, selectedStartDate, selectedEndDate ));\n },\n (error: any) => {\n this.isDownLoadButtondisabled = false;\n this.errorMessage = this.errorHandlerService.getServerErrorMessage(true, false, '');\n })\n }\n }\n\n getFileName(selectedOption: string, startDate: string, endDate: string ) {\n const loc = 'en-US',\n stDt = formatDate(startDate, 'ddMMyy', loc),\n enDt = formatDate(endDate, 'ddMMyy', loc),\n now = new Date(),\n currentDate = formatDate(now, 'ddMMyy', loc),\n timestamp = `${currentDate}_${this.getTwodigit(now.getHours())}${this.getTwodigit(now.getMinutes())}${this.getTwodigit(now.getSeconds())}`,\n selectedOptionTxt = this.getCamelCaseString(selectedOption);\n \n return selectedOptionTxt+'_'+stDt+'_To_'+enDt+'_Run_'+ timestamp;\n } \n tranformDate(strDate: string) {\n let result = '';\n if (strDate) {\n let parts = strDate.split('-');\n result = `${parts[1]}/${parts[2]}/${parts[0]}`;\n }\n return result;\n }\n getTwodigit(input: number){\n return (\"0\" + input).slice(-2);\n }\n getCamelCaseString(selectedOption) {\n let result;\n switch(selectedOption) { \n case 'UNPROCESSED': { \n result = 'Unprocessed';\n break; \n } \n case 'DATA_LOSS': { \n result = 'Data_Loss';\n break; \n } \n case 'PROCESSED_UNALLOCATED': { \n result = 'Processed_Unallocated';\n break; \n } \n case 'SURPLUS_AND_SHORTFALL': { \n result = 'Over Payment_Under Payment';\n break; \n } \n case 'PAYMENT_FAILURE_EVENT': { \n result = 'Payment failure event';\n break; \n }\n default: { \n result = selectedOption;\n break; \n } \n } \n return result;\n }\n applyDateFormat(res) {\n return res['data'].map(value => {\n if (value['date_banked']) {\n value['date_banked'] = formatDate(value['date_banked'], this.fmt, this.loc);\n }\n if (value['event_date'] && value['event_date'].indexOf(',') === -1) {\n value['event_date'] = formatDate(value['event_date'], this.fmt, this.loc);\n } else if (value['event_date'] && value['event_date'].indexOf(',') !== -1) {\n value['event_date'] = this.multiDateFormater(value['event_date'])\n }\n\n if (value['representment_date'] && value['representment_date'].indexOf(',') === -1) {\n value['representment_date'] = formatDate(value['representment_date'], this.fmt, this.loc);\n } else if (value['representment_date'] && value['representment_date'].indexOf(',') !== -1) {\n value['representment_date'] = this.multiDateFormater(value['representment_date'])\n }\n\n if (value['refund_date'] && value['refund_date'].indexOf(',') === -1) {\n value['refund_date'] = formatDate(value['refund_date'], this.fmt, this.loc);\n } else if (value['refund_date'] && value['refund_date'].indexOf(',') !== -1) {\n value['refund_date'] = this.multiDateFormater(value['refund_date'])\n }\n return value;\n });\n }\n multiDateFormater(dateStr) {\n return dateStr.split(',').map((date) => formatDate(date, this.fmt, this.loc)).join(',');\n }\n \n convertToFloatValue(amt) {\n return amt ? Number.parseFloat(amt).toFixed(2): '0.00';\n }\n}\n","import {Component, ViewChild, Input, ChangeDetectorRef} from '@angular/core';\nimport {PaymentLibComponent} from '../../payment-lib.component';\nimport { MatTableDataSource} from '@angular/material/table';\nimport {MatSort } from '@angular/material/sort';\nimport {Sort } from '@angular/material/sort';\nimport {MatPaginator } from '@angular/material/paginator';\nimport { IRefundList } from '../../interfaces/IRefundList';\nimport { OrderslistService } from '../../services/orderslist.service';\nimport { THIS_EXPR } from '@angular/compiler/src/output/output_ast';\nimport { ActivatedRoute,Router } from '@angular/router';\n@Component({\n selector: 'ccpay-table',\n templateUrl: './table.component.html',\n styleUrls: ['./table.component.css']\n})\nexport class TableComponent {\n @Input('DATASOURCE') DATASOURCE: any[];\n @Input('STATUS') STATUS: string;\n @Input('errorMessage') errorMessage: string;\n isApprovalFlow: boolean;\n // displayedColumns = ['ccdCaseNumber', 'refundReference', 'reason', 'createBy', 'updateDate', 'Action'];\n displayedColumns = ['ccd_case_number', 'refund_reference', 'user_full_name','date_created', 'date_updated', 'Action'];\n \n dataSource: MatTableDataSource<any>;\n userLst;\n actualcount: number;\n count: number;\n refundList: IRefundList[];\n @ViewChild(MatPaginator) paginator: MatPaginator;\n @ViewChild(MatSort) sort: MatSort;\n constructor(\n private paymentLibComponent: PaymentLibComponent,\n private cdRef: ChangeDetectorRef,\n private OrderslistService: OrderslistService,\n private router: Router,\n private activeRoute: ActivatedRoute\n ) {}\n ngOnInit() {\n this.errorMessage = this.errorMessage;\n if(this.STATUS.toLowerCase() === 'sent for approval') {\n this.isApprovalFlow = true;\n } else {\n this.isApprovalFlow = false;\n }\n this.refundList = this.DATASOURCE;\n this.dataSource = new MatTableDataSource(this.refundList);\n this.actualcount = this.dataSource.data.length;\n if( this.refundList !== undefined) {\n this.userLst = this.refundList.reduce((r,{user_full_name}) => (r[user_full_name]='', r) , {});\n this.userLst = Object.keys(this.userLst);\n }\n this.userLst.sort((a, b) => a.toString().localeCompare(b));\n }\n /**\n * Set the paginator and sort after the view init since this component will\n * be able to query its view for the initialized paginator and sort.\n */\n ngAfterViewInit() {\n \n this.dataSource.sort = this.sort;\n\n //const sortState: Sort = {active: 'date_updated', direction: 'desc'};\n // this.sort.active = sortState.active;\n // this.sort.direction = sortState.direction;\n // this.sort.sortChange.emit(sortState);\n this.dataSource.paginator = this.paginator;\n this.dataSource.sort = this.sort;\n this.cdRef.detectChanges();\n }\n applyFilter(filterValue: string) {\n filterValue = filterValue.trim(); // Remove whitespace\n filterValue = filterValue.toLowerCase(); // Datasource defaults to lowercase matches\n this.dataSource.filter = filterValue;\n }\n selectchange(args){\n this.dataSource.filter = args.target.value;\n this.actualcount = this.dataSource.data.length;\n this.dataSource.paginator = this.paginator;\n }\n goToRefundProcessComponent(refundReference: string, refundData: IRefundList ) {\n this.paymentLibComponent.refundlistsource = refundData;\n this.paymentLibComponent.refundReference = refundReference;\n this.paymentLibComponent.viewName = 'process-refund';\n }\n goToRefundViewComponent(refundReference: string, refundData: IRefundList ) {\n this.OrderslistService.setRefundView(refundData);\n this.paymentLibComponent.viewName='refundstatuslist';\n this.paymentLibComponent.CCD_CASE_NUMBER = refundData.ccd_case_number;\n this.paymentLibComponent.isRefundStatusView = true;\n this.paymentLibComponent.isCallFromRefundList = true;\n }\n goToCaseReview(ccdCaseNumber: string, refundData: IRefundList ) {\n this.router.navigate([`/cases/case-details/${ccdCaseNumber}`], {relativeTo: this.activeRoute});\n }\n}","export class IResubmitRefundRequest {\n refund_reason: string;\n amount: number;\n \n \n constructor(refund_reason : string, amount: number) {\n this.refund_reason= refund_reason;\n this.amount = amount;\n \n } \n }\n ","import { Component, OnInit, Input } from '@angular/core';\nimport { RefundsService } from '../../services/refunds/refunds.service';\nimport { FormBuilder, FormGroup, Validators, FormControl, RequiredValidator } from '@angular/forms';\nimport { IRefundList } from '../../interfaces/IRefundList';\nimport { PaymentViewService } from '../../services/payment-view/payment-view.service';\nimport { Router } from '@angular/router';\nimport { OrderslistService } from '../../services/orderslist.service';\nimport { IRefundStatus } from '../../interfaces/IRefundStatus';\nimport { IResubmitRefundRequest } from '../../interfaces/IResubmitRefundRequest';\nimport { PaymentLibComponent } from '../../payment-lib.component';\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() isEliginbleToAccess: boolean;\n refundStatusForm: FormGroup;\n selectedRefundReason: string;\n rejectedRefundList: IRefundList[] = [];\n approvalStatus = 'Sent for approval';\n rejectStatus = 'Update required';\n // approvalStatus = 'sent for approval';\n // rejectStatus = 'sent back';\n errorMessage = null;\n viewName: string;\n refundReason: string;\n refundlist: IRefundList;\n bsPaymentDcnNumber: string;\n isCallFromRefundList: boolean;\n refundButtonState: string = '';\n isAmountEmpty: boolean = false;\n isReasonEmpty: boolean = false;\n amountHasError: boolean = false;\n isRemissionLessThanFeeError: boolean = false;\n refundHasError: boolean = false;\n refundReasons: any[] = [];\n refundStatusHistories: IRefundStatus[];\n refundReference: string;\n refundAmount: string;\n refundCode: string;\n isRefundBtnDisabled: boolean = true;\n oldRefundReason: string;\n refundreason: string;\n navigationpage: string;\n isLastUpdatedByCurrentUser: boolean = true;\n isProcessRefund: boolean = false;\n changedAmount: number;\n constructor(private formBuilder: FormBuilder,\n private refundService: RefundsService,\n private paymentLibComponent: PaymentLibComponent,\n private paymentViewService: PaymentViewService,\n private router: Router,\n private OrderslistService: OrderslistService) { }\n\n ngOnInit() {\n\n // if (this.check4AllowedRoles2AccessRefund()) {\n this.resetRemissionForm([false, false, false, false], 'All');\n this.bsPaymentDcnNumber = this.paymentLibComponent.bspaymentdcn;\n this.isCallFromRefundList = this.paymentLibComponent.isCallFromRefundList;\n // if(this.paymentLibComponent.isFromRefundStatusPage) {\n // this.viewName = 'reviewandsubmitview';\n // }\n if (this.paymentLibComponent.isRefundStatusView) {\n this.viewName = 'refundview';\n this.OrderslistService.getRefundView().subscribe((data) => this.refundlist = data);\n this.OrderslistService.getCCDCaseNumberforRefund.subscribe((data) => this.ccdCaseNumber = data);\n } else {\n this.viewName = 'refundstatuslist';\n if(this.isEliginbleToAccess) {\n this.refundService.getRefundStatusList(this.ccdCaseNumber).subscribe(\n refundList => {\n this.rejectedRefundList = refundList['refund_list'];\n }\n ),\n (error: any) => {\n this.errorMessage = error.replace(/\"/g,\"\");\n };\n } else {\n this.rejectedRefundList = [];\n }\n\n }\n\n\n this.refundStatusForm = this.formBuilder.group({\n amount: new FormControl('', Validators.compose([\n Validators.required,\n Validators.pattern('^[0-9]+(\\.[0-9]{1,2})?$')\n ])),\n refundReason: new FormControl('', Validators.compose([Validators.required])),\n reason: new FormControl()\n });\n\n if(this.refundlist !== undefined) {\n this.getRefundsStatusHistoryList();\n\n if (this.LOGGEDINUSERROLES.some(i => i.includes('payments-refund-approver'))) {\n this.isProcessRefund = true;\n this.refundButtonState = this.refundlist.refund_status.name;\n return;\n }\n\n if (this.LOGGEDINUSERROLES.some(i => i.includes('payments-refund'))) {\n this.isProcessRefund = false;\n this.refundButtonState = this.refundlist.refund_status.name;\n }\n }\n //}\n }\n\n 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 goToRefundView(refundlist: IRefundList, navigationpage: string) {\n this.OrderslistService.setRefundView(refundlist);\n this.OrderslistService.setCCDCaseNumber(this.ccdCaseNumber);\n this.paymentLibComponent.viewName = 'refundstatuslist';\n this.paymentLibComponent.isRefundStatusView = true;\n this.refundlist = refundlist;\n this.OrderslistService.setnavigationPage(navigationpage);\n }\n\n loadCaseTransactionPage() {\n this.OrderslistService.setnavigationPage('casetransactions');\n this.OrderslistService.setisFromServiceRequestPage(false);\n this.paymentLibComponent.viewName = 'case-transactions';\n this.paymentLibComponent.ISBSENABLE = true;\n this.paymentLibComponent.isRefundStatusView = false;\n }\n\n loadRefundListPage() {\n this.OrderslistService.getnavigationPageValue().subscribe((data) => this.navigationpage = data);\n if (this.navigationpage === 'casetransactions') {\n this.loadCaseTransactionPage();\n } else {\n this.paymentLibComponent.viewName = 'refund-list';\n }\n }\n\n gotoReviewDetailsPage(event:any) {\n // event.preventDefault();\n this.errorMessage = false;\n this.paymentLibComponent.isRefundStatusView = true;\n this.ngOnInit();\n }\n\n gotoReviewAndReSubmitPage() {\n this.viewName = 'reviewandsubmitview';\n this.oldRefundReason = this.refundlist.reason;\n this.changedAmount = this.refundlist.amount;\n this.refundreason = this.refundStatusHistories.filter(data => data.status.toLowerCase() === 'update required')[0].notes;\n this.refundService.getRefundReasons().subscribe(\n refundReasons => {\n this.refundReasons = refundReasons;\n });\n }\n gotoRefundReasonPage() {\n this.isRefundBtnDisabled = false;\n this.paymentLibComponent.REFUNDLIST = \"true\";\n this.paymentLibComponent.isFromRefundStatusPage = true;\n this.ccdCaseNumber = this.paymentLibComponent.CCD_CASE_NUMBER;\n this.errorMessage = false;\n this.viewName = 'issuerefund';\n }\n\n gotoAmountPage() {\n this.errorMessage = false;\n this.paymentLibComponent.REFUNDLIST = \"true\";\n this.isRefundBtnDisabled = false;\n this.ccdCaseNumber = this.paymentLibComponent.CCD_CASE_NUMBER;\n this.paymentLibComponent.isFromRefundStatusPage = true;\n this.viewName = 'processretroremissonpage';\n }\n\n goToReviewAndSubmitView() {\n const remissionctrls = this.refundStatusForm.controls\n if (this.refundStatusForm.dirty) {\n if (remissionctrls['amount'].value == '') {\n this.resetRemissionForm([true, false, false, false], 'amount');\n }\n else if (remissionctrls['amount'].value != '' && remissionctrls['amount'].invalid) {\n this.resetRemissionForm([false, true, false, false], 'amount');\n }\n else if (remissionctrls['reason'].value == '') {\n this.resetRemissionForm([false, false, false, true], 'reason');\n } else {\n this.refundlist.reason = remissionctrls['reason'].value;\n this.viewName = 'reviewandsubmitview';\n }\n }\n\n }\n\n resetRemissionForm(val, field) {\n if (field === 'All') {\n this.isAmountEmpty = val[0];\n this.amountHasError = val[1];\n this.isRemissionLessThanFeeError = val[2];\n this.isReasonEmpty = val[3];\n } else if (field === 'amount' || field === 'All') {\n this.isAmountEmpty = val[0];\n this.amountHasError = val[1];\n this.isRemissionLessThanFeeError = val[2];\n } else if (field === 'reason' || field === 'All') {\n this.isReasonEmpty = val[3];\n }\n }\n\n selectRadioButton(key, value) {\n this.refundHasError = false;\n this.selectedRefundReason = key;\n if (key === 'Other') {\n this.refundHasError = false;\n this.refundReason = key;\n }\n }\n\n getRefundListReason(refundListReason: any) {\n if (this.paymentLibComponent.isFromRefundStatusPage && !this.paymentLibComponent.iscancelClicked) {\n this.refundlist.reason = refundListReason.reason;\n this.refundCode = refundListReason.code;\n } else {\n this.isRefundBtnDisabled = true;\n }\n this.viewName = 'reviewandsubmitview';\n this.paymentLibComponent.CCD_CASE_NUMBER = this.ccdCaseNumber;\n }\n\n getRefundAmount(amount: number) {\n if (this.paymentLibComponent.isFromRefundStatusPage && !this.paymentLibComponent.iscancelClicked) {\n if (amount > 0) {\n this.changedAmount = amount;\n // this.refundlist.amount = amount;\n }\n } else {\n this.isRefundBtnDisabled = true;\n }\n this.viewName = 'reviewandsubmitview';\n this.paymentLibComponent.CCD_CASE_NUMBER = this.ccdCaseNumber;\n }\n\n gotoReviewRefundConfirmationPage() {\n if (this.oldRefundReason === this.refundlist.reason) {\n this.refundCode = '';\n }\n const resubmitRequest = new IResubmitRefundRequest(this.refundCode, this.changedAmount);\n this.refundService.patchResubmitRefund(resubmitRequest, this.refundlist.refund_reference).subscribe(\n response => {\n if (JSON.parse(response)) {\n this.refundReference = JSON.parse(response).refund_reference;\n this.refundAmount = JSON.parse(response).refund_amount;\n this.viewName = 'reviewrefundconfirmationpage';\n }\n },\n (error: any) => {\n this.errorMessage = error.replace(/\"/g,\"\");\n }\n );\n\n }\n\n goToRefundProcessComponent(refundReference: string, refundList: IRefundList) {\n this.paymentLibComponent.refundlistsource = refundList;\n this.paymentLibComponent.refundReference = refundReference;\n this.paymentLibComponent.viewName = 'process-refund';\n }\n\n}\n","import { THIS_EXPR } from '@angular/compiler/src/output/output_ast';\nimport { Component, Input, OnInit, Output, EventEmitter } from '@angular/core';\nimport { PaymentLibComponent } from '../../payment-lib.component';\nimport { IPayment } from '../../interfaces/IPayment';\nimport { IRemission } from '../../interfaces/IRemission';\nimport { IPaymentView } from '../../interfaces/IPaymentView';\nimport { IOrderReferenceFee } from '../../interfaces/IOrderReferenceFee';\nimport { IFee } from '../../interfaces/IFee';\nimport { IPaymentGroup } from '../../interfaces/IPaymentGroup';\nimport { Router } from '@angular/router';\nimport { PaymentViewService } from '../../services/payment-view/payment-view.service';\nimport { OrderslistService } from '../../services/orderslist.service';\n\n@Component({\n selector: 'ccpay-service-request',\n templateUrl: './service-request.component.html',\n styleUrls: ['./service-request.component.css']\n})\nexport class ServiceRequestComponent implements OnInit {\n @Input('LOGGEDINUSERROLES') LOGGEDINUSERROLES: string[];\n @Input('viewStatus') viewStatus: string;\n @Input('orderDetail') orderDetail: any[];\n @Input('orderRef') orderRef: string;\n @Input('orderStatus') orderStatus: string;\n @Input('orderParty') orderParty: string;\n @Input('orderCreated') orderCreated: Date;\n @Input('orderCCDEvent') orderCCDEvent: string;\n @Input('orderFeesTotal') orderFeesTotal: number;\n @Input('orderTotalPayments') orderTotalPayments: number;\n @Input('orderRemissionTotal') orderRemissionTotal: number;\n @Input('takePayment') takePayment: boolean;\n @Input('ccdCaseNumber') ccdCaseNumber: boolean;\n @Input(\"isServiceRequest\") isServiceRequest: string;\n @Output() goToServiceRquestComponent: EventEmitter<any> = new EventEmitter();\n\n\n servicerequest: string;\n // ccdCaseNumber: string;\n excReference: string;\n paymentGroups: any[] = [];\n payments: IPayment[] = [];\n nonPayments: IPayment[] = [];\n allPayments: IPayment[] = [];\n remissions: IRemission[] = [];\n fees: IFee[] = [];\n errorMessage: string;\n totalFees: number;\n totalPayments: number;\n totalNonOffPayments: number;\n totalRemissions: number;\n selectedOption: string;\n dcnNumber: string;\n paymentRef: string;\n isTurnOff: boolean;\n isRefundRemission: boolean = true;\n isStrategicFixEnable: boolean;\n isAddFeeBtnEnabled: boolean = true;\n isExceptionRecord: boolean = false;\n isUnprocessedRecordSelected: boolean = false;\n exceptionRecordReference: string;\n isAnyFeeGroupAvilable: boolean = true;\n isHistoricGroupAvailable: boolean = false;\n isBulkScanEnable;\n isRemissionsMatch: boolean;\n isRemoveBtnDisabled: boolean = false;\n feeId: IFee;\n clAmountDue: number = 0;\n unprocessedRecordCount: number;\n isFeeRecordsExist: boolean = false;\n isGrpOutstandingAmtPositive: boolean = false;\n totalRefundAmount: Number;\n caseType: String;\n // lsCcdNumber: any = ls.get<any>('ccdNumber');\n payment: IPayment;\n paymentGroup: IPaymentGroup;\n paymentView: IPaymentView;\n\n\n isAddRemissionEnable: boolean = false;\n orderRemissionDetails: any[] = [];\n orderLevelFees: IOrderReferenceFee[] = [];\n cpoDetails: any = null;\n serviceRequestValue: string;\n orderAddBtnEnable: boolean;\n\n isCPODown: boolean;\n test: boolean;\n isPBA: boolean = false;\n isIssueRefunfBtnEnable: boolean = false;\n isAddRemissionBtnEnabled: boolean = false;\n isRefundRemissionBtnEnable: boolean = false;\n allowedRolesToAccessRefund = ['payments-refund-approver', 'payments-refund'];\n isFromServiceRequestPage: boolean;\n navigationpage: string;\n remissionFeeAmt: number;\n\n constructor(\n private paymentLibComponent: PaymentLibComponent,\n private paymentViewService: PaymentViewService,\n private OrderslistService: OrderslistService,\n private router: Router) { }\n\n ngOnInit() {\n if (this.viewStatus === undefined) {\n this.viewStatus = this.paymentLibComponent.viewName;\n }\n if(this.paymentLibComponent.isFromServiceRequestPage && this.paymentLibComponent.isFromPaymentDetailPage) {\n if(this.paymentLibComponent.isFromPaymentDetailPage && this.paymentLibComponent.isFromServiceRequestPage) {\n this.OrderslistService.getorderRefs().subscribe((data) => this.orderRef = data);\n this.OrderslistService.getorderCCDEvents().subscribe((data) => this.orderCCDEvent = data);\n this.OrderslistService.getorderCreateds().subscribe((data) => this.orderCreated = data);\n this.OrderslistService.getorderDetail().subscribe((data) => this.orderDetail = data);\n this.OrderslistService.getorderPartys().subscribe((data) => this.orderParty = data);\n this.OrderslistService.getorderRemissionTotals().subscribe((data) => this.orderRemissionTotal = data);\n this.OrderslistService.getorderFeesTotals().subscribe((data) => this.orderFeesTotal = data);\n this.OrderslistService.getoorderTotalPaymentss().subscribe((data) => this.orderTotalPayments = data);\n }\n }\n // if (this.takePayment) {\n // this.paymentLibComponent.TAKEPAYMENT = this.takePayment;\n // }\n }\n goToServiceRequestPage() {\n this.goToServiceRquestComponent.emit();\n }\n\n goToCaseTransationPage(event: any) {\n event.preventDefault();\n this.OrderslistService.setnavigationPage('servicerequestpage');\n this.OrderslistService.setisFromServiceRequestPage(false);\n this.paymentLibComponent.viewName = 'case-transactions';\n this.paymentLibComponent.ISBSENABLE = true;\n this.paymentLibComponent.isTakePayment = this.paymentLibComponent.TAKEPAYMENT;\n if (this.takePayment) {\n this.paymentLibComponent.isTakePayment = this.takePayment;\n }\n this.paymentLibComponent.SERVICEREQUEST = \"true\";\n this.paymentLibComponent.isFromServiceRequestPage = false;\n if(this.isServiceRequest !== 'false') {\n this.paymentLibComponent.isFromServiceRequestPage = true;\n }\n this.paymentLibComponent.isFromRefundStatusPage = false;\n this.paymentLibComponent.viewName = 'case-transactions';\n this.resetOrderData();\n let partUrl = this.paymentLibComponent.ISBSENABLE ? '&isBulkScanning=Enable' : '&isBulkScanning=Disable';\n partUrl += this.paymentLibComponent.ISTURNOFF ? '&isTurnOff=Enable' : '&isTurnOff=Disable';\n if(this.isServiceRequest === 'false') {\n partUrl += this.paymentLibComponent.TAKEPAYMENT ? '&takePayment=true' : '&takePayment=false';\n }\n partUrl += this.isStrategicFixEnable ? '&isStFixEnable=Enable' : '&isStFixEnable=Disable';\n partUrl += this.isServiceRequest !== 'false' ? '&servicerequest=true' : '&servicerequest=false';\n partUrl += `&caseType=${this.paymentLibComponent.CASETYPE}`;\n const url = `/payment-history/${this.paymentLibComponent.CCD_CASE_NUMBER}?view=case-transactions&selectedOption=${this.paymentLibComponent.SELECTED_OPTION}${partUrl}`;\n this.router.routeReuseStrategy.shouldReuseRoute = () => false;\n this.router.onSameUrlNavigation = 'reload';\n this.router.navigateByUrl(url);\n }\n\n chkForAddRemission(feeCode: string): boolean {\n if (this.chkForPBAPayment() && this.check4AllowedRoles2AccessRefund()) {\n if (this.orderDetail[0]['remissions'].length > 0) {\n for (const remission of this.orderDetail[0]['remissions']) {\n if (remission.fee_code === feeCode) {\n return false;\n }\n }\n }\n return true;\n } else {\n return false;\n }\n }\n\n chkForPBAPayment(): boolean {\n if (this.orderDetail !== null && this.orderDetail !== undefined) {\n this.orderDetail.forEach(orderDetail => {\n if (orderDetail.payments) {\n orderDetail.payments.forEach(payment => {\n if (payment.method.toLocaleLowerCase() === 'payment by account' && this.allowFurtherAccessAfter4Days(payment)) {\n this.paymentLibComponent.paymentReference = payment.reference;\n this.isPBA = true;\n }\n });\n }\n });\n if (this.isPBA) {\n return true;\n } else {\n return false;\n };\n }\n }\n\n addRemission(fee: IFee) {\n if(this.chkForAddRemission(fee.code)) {\n this.feeId = fee;\n this.viewStatus = 'addremission';\n this.payment = this.orderDetail[0].payments[0];\n this.paymentViewService.getApportionPaymentDetails(this.orderDetail[0].payments[0].reference).subscribe(\n paymentGroup => {\n this.paymentGroup = paymentGroup;\n\n this.paymentGroup.payments = this.paymentGroup.payments.filter\n (paymentGroupObj => paymentGroupObj['reference'].includes(this.paymentLibComponent.paymentReference));\n this.payment = this.paymentGroup.payments[0];\n // const paymentAllocation = this.paymentGroup.payments[0].payment_allocation;\n // this.isStatusAllocated = paymentAllocation.length > 0 && paymentAllocation[0].allocation_status === 'Allocated' || paymentAllocation.length === 0;\n },\n (error: any) => this.errorMessage = error.replace(/\"/g,\"\")\n );\n }\n }\n\n addRefundForRemission(payment: IPayment, remission: IRemission[],fees:any) {\n this.viewStatus = 'addrefundforremission';\n\n this.payment = payment;\n this.paymentViewService.getApportionPaymentDetails(this.payment.reference).subscribe(\n paymentGroup => {\n this.paymentGroup = paymentGroup;\n\n this.paymentGroup.payments = this.paymentGroup.payments.filter\n (paymentGroupObj => paymentGroupObj['reference'].includes(this.payment.reference));\n this.payment = this.paymentGroup.payments[0];\n this.remissions = remission;\n this.remissionFeeAmt = fees.filter(data=>data.code === this.remissions['fee_code'])[0].net_amount;\n // const paymentAllocation = this.paymentGroup.payments[0].payment_allocation;\n // this.isStatusAllocated = paymentAllocation.length > 0 && paymentAllocation[0].allocation_status === 'Allocated' || paymentAllocation.length === 0;\n },\n (error: any) => this.errorMessage = error\n );\n }\n cancelRemoval() {\n this.viewStatus = 'main';\n }\n\n removeFee(fee: any) {\n this.isRemoveBtnDisabled = true;\n this.paymentViewService.deleteFeeFromPaymentGroup(fee).subscribe(\n (success: any) => {\n window.location.reload();\n },\n (error: any) => {\n this.errorMessage = error;\n this.isRemoveBtnDisabled = false;\n }\n );\n }\n\n\n chkIssueRefundBtnEnable(payment: IPayment): boolean {\n if (this.check4AllowedRoles2AccessRefund() && this.allowFurtherAccessAfter4Days(payment) &&\n payment.method === 'payment by account' && payment.status.toLocaleLowerCase() === 'success') {\n this.isIssueRefunfBtnEnable = true;\n }\n if (this.isIssueRefunfBtnEnable) {\n return true;\n } else {\n return false;\n };\n }\n\n chkIsRefundRemissionBtnEnable(): boolean {\n if (this.orderDetail !== null && this.orderDetail !== undefined) {\n this.paymentLibComponent.isFromServiceRequestPage = true;\n this.orderDetail.forEach(orderDetail => {\n if (orderDetail.payments) {\n orderDetail.payments.forEach(payment => {\n if (payment.method.toLocaleLowerCase() === 'payment by account' && payment.status.toLocaleLowerCase() === 'success' && this.allowFurtherAccessAfter4Days(payment)) {\n this.isRefundRemissionBtnEnable = true;\n }\n });\n }\n });\n if (this.isRefundRemissionBtnEnable) {\n return true;\n } else {\n return false;\n };\n }\n }\n\n check4AllowedRoles2AccessRefund = (): boolean => {\n return this.allowedRolesToAccessRefund.some(role =>\n this.LOGGEDINUSERROLES.indexOf(role) !== -1\n );\n }\n\n allowFurtherAccessAfter4Days = (payment: IPayment): boolean => {\n if (payment !== null && payment !== undefined) {\n let tmp4DayAgo = new Date();\n tmp4DayAgo.setDate(tmp4DayAgo.getDate() - 4);\n return tmp4DayAgo >= new Date(payment.date_created);\n }\n }\n\n issueRefund(payment: IPayment) {\n if (payment !== null && payment !== undefined) {\n if(this.chkIssueRefundBtnEnable(payment)) {\n this.viewStatus = 'issuerefund';\n this.payment = payment;\n this.paymentLibComponent.isFromServiceRequestPage = true;\n this.isRefundRemission = true;\n }\n }\n }\n\n goToPayementView(paymentGroupReference: string, paymentReference: string, paymentMethod: string) {\n this.goToPaymentViewComponent({ paymentGroupReference, paymentReference, paymentMethod });\n }\n\n goToPaymentViewComponent(paymentGroup: any) {\n this.paymentLibComponent.paymentMethod = paymentGroup.paymentMethod;\n this.paymentLibComponent.isFromServiceRequestPage = true;\n this.paymentLibComponent.paymentGroupReference = paymentGroup.paymentGroupReference;\n this.paymentLibComponent.paymentReference = paymentGroup.paymentReference;\n this.OrderslistService.setOrderRef(this.orderRef);\n this.OrderslistService.setorderCCDEvent(this.orderCCDEvent);\n this.OrderslistService.setorderCreated(this.orderCreated);\n this.OrderslistService.setorderDetail(this.orderDetail);\n this.OrderslistService.setorderParty(this.orderParty);\n this.OrderslistService.setorderTotalPayments(this.orderTotalPayments);\n this.OrderslistService.setorderRemissionTotal(this.orderRemissionTotal);\n this.OrderslistService.setorderFeesTotal(this.orderFeesTotal);\n this.viewStatus = 'payment-view';\n }\n\n resetOrderData() {\n this.OrderslistService.setOrderRef(null);\n this.OrderslistService.setorderCCDEvent(null);\n this.OrderslistService.setorderCreated(null);\n this.OrderslistService.setorderDetail(null);\n this.OrderslistService.setorderParty(null);\n this.OrderslistService.setorderTotalPayments(null);\n this.OrderslistService.setorderRemissionTotal(null);\n this.OrderslistService.setorderFeesTotal(null);\n }\n}\n","export class IserviceRequestCardPayment {\n amount: string\n currency: string\n language: string\n \n constructor(amount : string) {\n this.amount = amount;\n this.currency = 'GBP';\n this.language = 'string';\n } \n}\n ","export class IserviceRequestPbaPayment {\n account_number: string;\n amount: string\n currency: string\n customer_reference: string\n organisation_name: string\n \n constructor(account_number : string, amount : string, customer_reference: string, orgName: string) {\n this.account_number = account_number;\n this.amount = amount;\n this.currency = 'GBP';\n this.customer_reference = customer_reference;\n this.organisation_name = orgName;\n } \n}\n ","import { Component, OnInit, Input} from '@angular/core';\nimport { PaymentViewService } from '../../services/payment-view/payment-view.service';\nimport { PaymentLibComponent } from '../../payment-lib.component';\nimport { IserviceRequestCardPayment } from '../../interfaces/IserviceRequestCardPayment';\nimport { IserviceRequestPbaPayment } from '../../interfaces/IserviceRequestPbaPayment';\n\nconst BS_ENABLE_FLAG = 'bulk-scan-enabling-fe';\n\n@Component({\n selector: 'ccpay-pba-payment',\n templateUrl: './pba-payment.component.html',\n styleUrls: ['./pba-payment.component.scss']\n})\nexport class PbaPaymentComponent implements OnInit {\n @Input() pbaPayOrderRef: any;\n viewStatus: string;\n pbaAccountList: string[];\n isPBAAccountHold: boolean = false;\n errorMsg: any;\n isCardPaymentSuccess: boolean = true;\n isInSufficiantFund: boolean = false;\n isPBAAccountNotExist: boolean = false;\n isPBAServerError: boolean = false;\n isGetPBAAccountSucceed: boolean = false;\n selectedPbaAccount: string = '';\n pbaAccountRef: string = '';\n isPbaAccountSelected: boolean = false;\n isCardPaymentSelected: boolean = false;\n isPBADropdownSelected: boolean = false;\n isContinueButtondisabled: boolean = true;\n isPBAAccountPaymentSuccess: boolean = false;\n pbaAccountrPaymentResult: any;\n orgName: string = '';\n\n constructor(private paymentLibComponent: PaymentLibComponent,\n private paymentViewService: PaymentViewService) {}\n\n ngOnInit() {\n this.pbaPayOrderRef = this.paymentLibComponent.pbaPayOrderRef;\n this.viewStatus = 'pba-payment';\n this.errorMsg = null;\n this.paymentViewService.getPBAaccountDetails()\n .subscribe(\n result => {\n this.isGetPBAAccountSucceed = true;\n this.orgName = result.organisationEntityResponse.name;\n this.pbaAccountList = result.organisationEntityResponse.paymentAccount;\n },\n error => {\n this.errorMsg = error;\n }\n );\n\n }\n selectpbaaccount(args) {\n if(args.currentTarget.id === 'pbaAccountNumber') {\n this.isPBADropdownSelected = true;\n this.selectedPbaAccount = args.target.value; \n }\n if(args.currentTarget.id === 'pbaAccountRef') {\n this.pbaAccountRef = args.target.value; \n }\n if(this.selectedPbaAccount !== '' && this.pbaAccountRef !== \"\") {\n this.isContinueButtondisabled = false;\n } else {\n this.isContinueButtondisabled = true;\n }\n }\n\n saveAndContinue() {\n\n if(this.isPbaAccountSelected) {\n this.isInSufficiantFund = false;\n this.isPBAAccountNotExist = false;\n this.isPBAServerError = false;\n this.isPBAAccountPaymentSuccess = false;\n if ( this.pbaAccountList.indexOf(this.selectedPbaAccount) !== -1 ) {\n const requestBody = new IserviceRequestPbaPayment(\n this.selectedPbaAccount, this.pbaPayOrderRef.orderTotalFees, this.pbaAccountRef, this.orgName);\n this.paymentViewService.postPBAaccountPayment(this.pbaPayOrderRef.orderRefId, requestBody)\n .subscribe(\n r => {\n try {\n this.pbaAccountrPaymentResult = JSON.parse(r);\n } catch(e) {\n this.pbaAccountrPaymentResult = r;\n }\n this.isPBAAccountPaymentSuccess = true;\n },\n e => {\n if(e.status == '402') {\n this.isInSufficiantFund = true; \n } else if(e.status == '410') {\n this.isPBAAccountNotExist = true;\n } else if(e.status == '412') {\n this.isPBAAccountHold = true;\n } else {\n this.isPBAServerError = true;\n }\n }\n );\n } else {\n this.isPBAServerError = true;\n }\n } else if (this.isCardPaymentSelected) {\n this.cardPayment();\n }\n\n }\n cardPayment() {\n this.isCardPaymentSuccess = true;\n const requestBody = new IserviceRequestCardPayment (\n this.pbaPayOrderRef.orderTotalFees);\n this.paymentViewService.postWays2PayCardPayment(this.pbaPayOrderRef.orderRefId, requestBody)\n .subscribe(\n result => {\n const paymentUrl = JSON.parse(result).next_url;\n window.location.href = paymentUrl;\n },\n error => {\n this.isCardPaymentSuccess = false;\n }\n );\n\n }\n selectPaymentMethod(type: string) {\n if(type === 'PBA') {\n this.isPbaAccountSelected = true;\n this.isCardPaymentSelected = false;\n this.isPBADropdownSelected = false\n this.isContinueButtondisabled = true;\n this.selectedPbaAccount = null;\n } else if (type === 'CARD') {\n this.isPbaAccountSelected = false;\n this.isCardPaymentSelected = true;\n this.isPBADropdownSelected = false\n this.isContinueButtondisabled = false;\n }\n }\n gotoCasetransationPage() {\n this.paymentLibComponent.viewName = 'case-transactions';\n this.paymentLibComponent.TAKEPAYMENT = false;\n this.paymentLibComponent.ISBSENABLE = true;\n this.paymentLibComponent.isFromServiceRequestPage = true;\n }\n}\n","import { NgModule } from '@angular/core';\nimport { HttpClientModule } from '@angular/common/http';\nimport { CommonModule } from '@angular/common';\n\nimport { PaymentListComponent } from './components/payment-list/payment-list.component';\nimport { PaymentViewComponent } from './components/payment-view/payment-view.component';\nimport { ProcessRefundComponent } from './components/process-refund/process-refund.component';\nimport { RefundListComponent } from './components/refund-list/refund-list.component';\n\nimport { CardDetailsComponent } from './components/card-details/card-details.component';\nimport { PageNotFoundComponent } from './components/page-not-found.component';\nimport { PaymentLibComponent } from './payment-lib.component';\nimport { StatusHistoryComponent } from './components/status-history/status-history.component';\nimport { PbaDetailsComponent } from './components/pba-details/pba-details.component';\nimport { LoggerService } from './services/shared/logger/logger.service';\nimport { ConsoleLoggerService } from './services/shared/logger/console-logger.service';\nimport { WebComponentHttpClient } from './services/shared/httpclient/webcomponent.http.client';\nimport { CaseTransactionsComponent } from './components/case-transactions/case-transactions.component';\nimport { FeeSummaryComponent } from './components/fee-summary/fee-summary.component';\nimport { ErrorBannerComponent } from './components/error-banner/error-banner.component';\nimport { MarkUnidentifiedPaymentComponent } from './components/mark-unidentified-payment/mark-unidentified-payment.component';\nimport { MarkUnsolicitedPaymentComponent } from './components/mark-unsolicited-payment/mark-unsolicited-payment.component';\nimport { UnprocessedPaymentsComponent } from './components/unprocessed-payments/unprocessed-payments.component';\nimport { ProcessedPaymentsComponent } from './components/processed-payments/processed-payments.component';\nimport { AllocatePaymentsComponent } from './components/allocate-payments/allocate-payments.component';\nimport { AddRemissionComponent } from './components/add-remission/add-remission.component';\nimport { FormsModule, ReactiveFormsModule } from '@angular/forms';\nimport { CcdHyphensPipe } from './pipes/ccd-hyphens.pipe';\nimport { CapitalizePipe } from './pipes/capitalize.pipe';\nimport { keyValuePipe } from './pipes/key-value.pipe';\nimport { SanitizeHtmlPipe } from './pipes/sanitize-html.pipe';\nimport { ReportsComponent } from './components/reports/reports.component';\nimport { XlFileService } from './services/xl-file/xl-file.service';\nimport { TableComponent } from './components/table/table.component';\nimport { MatTableModule } from '@angular/material/table';\nimport { MatPaginatorModule } from '@angular/material/paginator';\nimport { MatSortModule } from '@angular/material/sort';\nimport { MatFormFieldModule } from '@angular/material/form-field';\nimport { MatInputModule } from '@angular/material/input';\n// import { BrowserAnimationsModule } from '@angular/platform-browser/animations';\n// import { NoopAnimationsModule } from '@angular/platform-browser/animations';\nimport { RefundStatusComponent } from './components/refund-status/refund-status.component';\nimport { ServiceRequestComponent } from './components/service-request/service-request.component';\nimport { PbaPaymentComponent } from './components/pba-payment/pba-payment.component';\n\n@NgModule({\n imports: [\n CommonModule,\n HttpClientModule,\n FormsModule,\n ReactiveFormsModule,\n MatTableModule,\n MatPaginatorModule,\n MatSortModule,\n MatFormFieldModule,\n MatInputModule,\n // BrowserAnimationsModule,\n // NoopAnimationsModule\n ],\n declarations: [\n PaymentLibComponent,\n PaymentListComponent,\n PaymentViewComponent,\n PbaPaymentComponent,\n ProcessRefundComponent,\n RefundListComponent,\n CardDetailsComponent,\n PageNotFoundComponent,\n StatusHistoryComponent,\n MarkUnidentifiedPaymentComponent,\n MarkUnsolicitedPaymentComponent,\n UnprocessedPaymentsComponent,\n ProcessedPaymentsComponent,\n AllocatePaymentsComponent,\n PbaDetailsComponent,\n CaseTransactionsComponent,\n FeeSummaryComponent,\n AddRemissionComponent,\n CcdHyphensPipe,\n CapitalizePipe,\n keyValuePipe,\n SanitizeHtmlPipe,\n ReportsComponent,\n ErrorBannerComponent,\n TableComponent,\n RefundStatusComponent,\n ServiceRequestComponent\n ],\n exports: [PaymentLibComponent],\n providers: [\n { provide: LoggerService, useClass: ConsoleLoggerService },\n XlFileService,\n WebComponentHttpClient\n ]\n})\n\nexport class PaymentLibModule { }\n"],"names":["Injectable","BehaviorSubject","ChangeDetectorRef","Input","Component","_throw","catchError","HttpClient","HttpHeaders","Meta","FormControl","Validators","FormBuilder","Router","ActivatedRoute","noop","BS_ENABLE_FLAG","Location","EventEmitter","Output","Pipe","DomSanitizer","XLSX.utils","XLSX.write","FileSaver.saveAs","formatDate","MatTableDataSource","ViewChild","MatPaginator","MatSort","NgModule","CommonModule","HttpClientModule","FormsModule","ReactiveFormsModule","MatTableModule","MatPaginatorModule","MatSortModule","MatFormFieldModule","MatInputModule"],"mappings":";;;;;;IAAA;IACA;AACA;IACA;IACA;AACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;AACA;IACA,IAAI,aAAa,GAAG,SAAS,CAAC,EAAE,CAAC,EAAE;IACnC,IAAI,aAAa,GAAG,MAAM,CAAC,cAAc;IACzC,SAAS,EAAE,SAAS,EAAE,EAAE,EAAE,YAAY,KAAK,IAAI,UAAU,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,SAAS,GAAG,CAAC,CAAC,EAAE,CAAC;IACpF,QAAQ,UA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