{"version":3,"sources":["webpack:///./src/views/policies/components/PolicyTransactions.vue?b909","webpack:///./src/views/policies/PolicyDetails_Investment.vue?8532","webpack:///./src/views/policies/components/PolicyTransactions.vue?e601","webpack:///./src/views/policies/components/PolicyTransactions.vue","webpack:///./src/views/policies/components/PolicyTransactions.vue?582e","webpack:///./src/views/policies/components/PolicyTransactions.vue?4528","webpack:///./src/views/policies/PolicyDetails_Investment.vue","webpack:///./src/views/policies/PolicyDetails_Investment.vue?fefe","webpack:///./src/views/policies/PolicyDetails_Investment.vue?9989","webpack:///./src/views/policies/PolicyDetails_Investment.vue?0ebe"],"names":["_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_PolicyTransactions_vue_vue_type_style_index_0_id_7cc7c519_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0__","__webpack_require__","_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_PolicyTransactions_vue_vue_type_style_index_0_id_7cc7c519_scoped_true_lang_css___WEBPACK_IMPORTED_MODULE_0___default","n","render","_vm","this","_h","$createElement","_c","_self","staticClass","attrs","route-name","_v","icon","fixed-width","_s","policyDetails","categoryName","subCategoryName","providerName","policyNo","title","statusName","_f","inceptionDate","policyEndDateString","totalFundValue","fundValueDate","totalPremiumsPaid","IsExternalBroker","_e","policy-id","policyId","contact-id","contactId","id","FundMixType","displayTransactions","staticRenderFns","PolicyTransactionsvue_type_template_id_7cc7c519_scoped_true_render","text","variant","on","click","downloadPolicyTransactionsData","DownloadPolicyTransaction","prepend","sm","autocomplete","model","value","callback","$$v","filterString","expression","transactions","length","striped","hover","items","fields","filter","PolicyTransactionsvue_type_template_id_7cc7c519_scoped_true_staticRenderFns","PolicyTransactionsvue_type_script_lang_ts_PolicyTransactions","_Vue","PolicyTransactions","_this","Object","classCallCheck","key","label","sortable","formatter","item","toLocaleString","style","currency","inherits","createClass","_mounted","asyncToGenerator","regeneratorRuntime","mark","_callee","wrap","_context","prev","next","getPolicyTransactions","stop","mounted","apply","arguments","_getPolicyTransactions","_callee2","api","i","_context2","Error","ApiFactory","CreateDataClient","policyTransactions_GetByPolicyId","sent","transactionDate","FormatDate","format","base64","binaryString","window","atob","binaryLen","bytes","Uint8Array","ascii","charCodeAt","_DownloadPolicyTransaction","_callee3","data","blob","link","fileName","_context3","store","Show","externalBroker_DownloadPolicyTransaction","base64ToArrayBuffer","Blob","type","contentType","document","createElement","href","URL","createObjectURL","download","Hide","t0","Failure","_downloadPolicyTransactionsData","_callee4","_context4","externalBroker_DownloadPolicyTransactionData","vue_runtime_esm","tslib_es6","vue_property_decorator","vue_class_component_esm","PolicyTransactionsvue_type_script_lang_ts_","components_PolicyTransactionsvue_type_script_lang_ts_","component","componentNormalizer","components_PolicyTransactions","PolicyDetails_Investmentvue_type_script_lang_ts_PolicyDetails_Investment","PolicyDetails_Investment","ClientPortalApiClient","_created","parseInt","$route","params","getPolicyDetails","created","_getPolicyDetails","result","policies_GetByPolicyId","console","log","get","Date","maturityDate","isExternalBroker","components","PolicyValues","FundPerformanceChart","FundValuePerformanceChart","FundMixChart","PolicyFunds","BackButton","PolicyDetails_Investmentvue_type_script_lang_ts_","policies_PolicyDetails_Investmentvue_type_script_lang_ts_","PolicyDetails_Investment_component","__webpack_exports__","_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_PolicyDetails_Investment_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0__","_node_modules_mini_css_extract_plugin_dist_loader_js_ref_6_oneOf_1_0_node_modules_css_loader_index_js_ref_6_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_6_oneOf_1_2_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_PolicyDetails_Investment_vue_vue_type_style_index_0_lang_css___WEBPACK_IMPORTED_MODULE_0___default"],"mappings":"kHAAA,IAAAA,EAAAC,EAAA,QAAAC,EAAAD,EAAAE,EAAAH,GAAkhBE,EAAG,uECArhB,IAAAE,EAAA,WAA0B,IAAAC,EAAAC,KAAaC,EAAAF,EAAAG,eAA0BC,EAAAJ,EAAAK,MAAAD,IAAAF,EAAwB,OAAAE,EAAA,OAAiBE,YAAA,OAAkB,CAAAF,EAAA,OAAYE,YAAA,UAAqB,CAAAF,EAAA,cAAmBE,YAAA,OAAAC,MAAA,CAA0BC,aAAA,aAAyB,CAAAR,EAAAS,GAAA,2BAAAL,EAAA,OAA8CE,YAAA,UAAqB,CAAAF,EAAA,OAAYE,YAAA,yLAAoM,CAAAF,EAAA,OAAYE,YAAA,+BAA0C,CAAAF,EAAA,qBAA0BE,YAAA,aAAAC,MAAA,CAAgCG,KAAA,aAAAC,cAAA,OAAsC,GAAAP,EAAA,OAAgBE,YAAA,kBAA6B,CAAAF,EAAA,MAAAJ,EAAAS,GAAAT,EAAAY,GAAAZ,EAAAa,cAAAC,iBAAAV,EAAA,KAAoEE,YAAA,QAAmB,CAAAN,EAAAS,GAAAT,EAAAY,GAAAZ,EAAAa,cAAAE,sBAAAX,EAAA,OAAkEE,YAAA,0BAAqC,CAAAF,EAAA,MAAAJ,EAAAS,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,KAAKY,cAAcuJ,eAAiB,IAAID,KAAK,cACzD,aACA9D,EAAA,KAAWC,OAAOrG,KAAKY,cAAcuJ,gBA1C7C,CAAAlG,IAAA,mBAAAgG,IAAA,WA8CI,OAAO3C,EAAA,KAAU8C,mBA9CrB,CAAAnG,IAAA,cAAAgG,IAAA,WAkDI,OAAOjK,KAAKyB,iBAAmB,EAAI,MAlDvC2H,EAAA,CAAsDV,EAAA,YAAjCS,EAAwBR,EAAA,MAX5C5E,OAAA8E,EAAA,KAAA9E,CAAU,CACTsG,WAAY,CACVC,eAAA,KACAzG,mBAAAqF,EACAqB,uBAAA,KACAC,4BAAA,KACAC,eAAA,KACAC,cAAA,KACAC,aAAA,SAGiBxB,GAAA,IAAAyB,EAAA,ECvVgZC,EAAA,ECQjaC,aAAY/G,OAAAkF,EAAA,KAAAlF,CACd8G,EACA/K,EACAoC,GACF,EACA,KACA,KACA,OAIe6I,EAAA,WAAAD,sECnBf,IAAAE,EAAArL,EAAA,QAAAsL,EAAAtL,EAAAE,EAAAmL,GAA8eC,EAAG","file":"js/chunk-f7346d22.ffce1799.js","sourcesContent":["import mod from \"-!../../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../../../node_modules/css-loader/index.js??ref--6-oneOf-1-1!../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./PolicyTransactions.vue?vue&type=style&index=0&id=7cc7c519&scoped=true&lang=css&\"; export default mod; export * from \"-!../../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../../../node_modules/css-loader/index.js??ref--6-oneOf-1-1!../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./PolicyTransactions.vue?vue&type=style&index=0&id=7cc7c519&scoped=true&lang=css&\"","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:\"row\"},[_c('div',{staticClass:\"col-12\"},[_c('BackButton',{staticClass:\"mb-3\",attrs:{\"route-name\":\"policies\"}},[_vm._v(\"Back to Portfolio\")])],1),_c('div',{staticClass:\"col-12\"},[_c('div',{staticClass:\"\\n        policy-details-header\\n        d-flex\\n        mb-3\\n        bg-white\\n        rounded\\n        pt-3\\n        pl-3\\n        pr-3\\n        border\\n        flex-wrap\\n      \"},[_c('div',{staticClass:\"header-icon mr-3 bg-success\"},[_c('font-awesome-icon',{staticClass:\"text-white\",attrs:{\"icon\":\"chart-line\",\"fixed-width\":\"\"}})],1),_c('div',{staticClass:\"flex-fill mr-3\"},[_c('h4',[_vm._v(_vm._s(_vm.policyDetails.categoryName))]),_c('p',{staticClass:\"mb-3\"},[_vm._v(_vm._s(_vm.policyDetails.subCategoryName))])]),_c('div',{staticClass:\"flex-grow-1 text-right\"},[_c('h4',[_vm._v(_vm._s(_vm.policyDetails.providerName))]),_c('p',{staticClass:\"mb-3\"},[_vm._v(_vm._s(_vm.policyDetails.policyNo))])])]),_c('div',{staticClass:\"row align-items-stretch\"},[_c('div',{staticClass:\"col-12 col-lg-6\"},[_c('b-card',{staticClass:\"mb-3\"},[_c('div',{staticClass:\"text-primary font-weight-bold\"},[_c('div',{staticClass:\"d-flex\"},[_c('div',{staticClass:\"flex-fill\"},[_c('p',[_vm._v(\"Policy Details\")])]),_c('div',{staticClass:\"text-right\"},[_c('font-awesome-icon',{attrs:{\"icon\":\"info-circle\"}})],1)]),_c('div',{staticClass:\"border-bottom mb-3\"})]),_c('div',{staticClass:\"card-body-section\"},[_c('div',{staticClass:\"row text-secondary\"},[_c('div',{staticClass:\"\\n                  col-12 col-sm-6\\n                  mb-3\\n                  clearfix\\n                  d-flex\\n                  align-items-center\\n                \",attrs:{\"title\":\"Policy Number\"}},[_c('font-awesome-icon',{staticClass:\"mr-2 float-left\",attrs:{\"fixed-width\":\"\",\"icon\":\"hashtag\"}}),_c('div',{staticClass:\"float-left\"},[_c('p',{staticClass:\"label\"},[_vm._v(\"Policy Number\")]),_c('p',{staticClass:\"detail\"},[_vm._v(_vm._s(_vm.policyDetails.policyNo))])])],1),_c('div',{staticClass:\"\\n                  col-12 col-sm-6\\n                  mb-3\\n                  clearfix\\n                  d-flex\\n                  align-items-center\\n                \",attrs:{\"title\":\"Policy Status\"}},[_c('font-awesome-icon',{staticClass:\"mr-2\",attrs:{\"fixed-width\":\"\",\"icon\":\"file\"}}),_c('div',{staticClass:\"float-left\"},[_c('p',{staticClass:\"label\"},[_vm._v(\"Policy Status\")]),_c('p',{staticClass:\"detail\"},[_vm._v(_vm._s(_vm.policyDetails.statusName))])])],1),_c('div',{staticClass:\"\\n                  col-12 col-sm-6\\n                  mb-3\\n                  clearfix\\n                  d-flex\\n                  align-items-center\\n                \",attrs:{\"title\":\"Policy Start Date\"}},[_c('font-awesome-icon',{staticClass:\"mr-2\",attrs:{\"fixed-width\":\"\",\"icon\":\"calendar-check\"}}),_c('div',{staticClass:\"float-left\"},[_c('p',{staticClass:\"label\"},[_vm._v(\"Policy Start Date\")]),_c('p',{staticClass:\"detail\"},[_vm._v(\"\\n                    \"+_vm._s(_vm._f(\"formatDate\")(_vm.policyDetails.inceptionDate))+\"\\n                  \")])])],1),_c('div',{staticClass:\"\\n                  col-12 col-sm-6\\n                  mb-3\\n                  clearfix\\n                  d-flex\\n                  align-items-center\\n                \",attrs:{\"title\":\"Policy End Date\"}},[_c('font-awesome-icon',{staticClass:\"mr-2\",attrs:{\"fixed-width\":\"\",\"icon\":\"calendar-times\"}}),_c('div',{staticClass:\"float-left\"},[_c('p',{staticClass:\"label\"},[_vm._v(\"Policy End Date\")]),_c('p',{staticClass:\"detail\"},[_vm._v(_vm._s(_vm.policyEndDateString))])])],1),_c('div',{staticClass:\"\\n                  col-12 col-sm-6\\n                  mb-3\\n                  clearfix\\n                  d-flex\\n                  align-items-center\\n                \",attrs:{\"title\":\"Total Fund Value\"}},[_c('font-awesome-icon',{staticClass:\"mr-2\",attrs:{\"fixed-width\":\"\",\"icon\":\"euro-sign\"}}),_c('div',{staticClass:\"float-left\"},[_c('p',{staticClass:\"label\"},[_vm._v(\"Total Fund Value\")]),_c('p',{staticClass:\"detail\"},[_vm._v(\"\\n                    €\"+_vm._s(_vm._f(\"formatNumber\")(_vm.policyDetails.totalFundValue,\"0,0.00\"))+\"\\n                  \")])])],1),_c('div',{staticClass:\"\\n                  col-12 col-sm-6\\n                  mb-3\\n                  clearfix\\n                  d-flex\\n                  align-items-center\\n                \",attrs:{\"title\":\"Fund Value Date\"}},[_c('font-awesome-icon',{staticClass:\"mr-2\",attrs:{\"fixed-width\":\"\",\"icon\":\"calendar-day\"}}),_c('div',{staticClass:\"float-left\"},[_c('p',{staticClass:\"label\"},[_vm._v(\"Fund Value Date\")]),_c('p',{staticClass:\"detail\"},[_vm._v(\"\\n                    \"+_vm._s(_vm._f(\"formatDate\")(_vm.policyDetails.fundValueDate))+\"\\n                  \")])])],1),_c('div',{staticClass:\"col-12 col-sm-6 clearfix d-flex align-items-center\",attrs:{\"title\":\"Total Paid In\"}},[_c('font-awesome-icon',{staticClass:\"mr-2\",attrs:{\"fixed-width\":\"\",\"icon\":\"coins\"}}),_c('div',{staticClass:\"float-left\"},[_c('p',{staticClass:\"label\"},[_vm._v(\"Total Paid In\")]),_c('p',{staticClass:\"detail\"},[_vm._v(\"\\n                    €\"+_vm._s(_vm._f(\"formatNumber\")(_vm.policyDetails.totalPremiumsPaid,\"0,0.00\"))+\"\\n                  \")])])],1)])])]),(!_vm.IsExternalBroker)?_c('PolicyValues',{attrs:{\"policy-id\":_vm.policyId,\"contact-id\":_vm.contactId}}):_vm._e(),(_vm.IsExternalBroker)?_c('PolicyFunds',{attrs:{\"policy-id\":_vm.policyId,\"contact-id\":_vm.contactId}}):_vm._e(),(!_vm.IsExternalBroker)?_c('FundPerformanceChart',{attrs:{\"policy-id\":_vm.policyId,\"contact-id\":_vm.contactId}}):_vm._e()],1),_c('div',{staticClass:\"col-12 col-lg-6\"},[(!_vm.IsExternalBroker)?_c('PolicyFunds',{attrs:{\"policy-id\":_vm.policyId,\"contact-id\":_vm.contactId}}):_vm._e(),_c('FundMixChart',{attrs:{\"id\":_vm.FundMixType,\"policy-id\":_vm.policyId,\"contact-id\":_vm.contactId}})],1)]),(_vm.displayTransactions())?_c('PolicyTransactions',{attrs:{\"policy-id\":_vm.policyId}}):_vm._e()],1)])}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('b-card',{staticClass:\"mb-3\"},[_c('div',{staticClass:\"text-primary font-weight-bold\"},[_c('div',{staticClass:\"d-flex\"},[_c('div',{staticClass:\"flex-fill\"},[_c('p',[_vm._v(\"Transactions\")])]),_c('div',{staticClass:\"text-right\"},[_c('b-dropdown',{staticClass:\"download-button\",attrs:{\"id\":\"dropdown-left\",\"text\":\"Download\",\"variant\":\"primary\"}},[_c('b-dropdown-item',{on:{\"click\":_vm.downloadPolicyTransactionsData}},[_c('font-awesome-icon',{staticClass:\"mr-2\",attrs:{\"icon\":\"file-alt\"}}),_vm._v(\"\\n            CSV\")],1),_c('b-dropdown-item',{on:{\"click\":_vm.DownloadPolicyTransaction}},[_c('font-awesome-icon',{staticClass:\"mr-2\",attrs:{\"icon\":\"file-pdf\"}}),_vm._v(\"\\n            PDF\")],1)],1)],1)]),_c('div',{staticClass:\"border-bottom mb-3\"}),_c('div',{staticClass:\"col md-2\"},[_c('b-input-group',{staticClass:\"mt-3 mb-3\",attrs:{\"prepend\":\"Search\"}},[_c('b-col',{attrs:{\"sm\":\"4\"}},[_c('b-form-input',{attrs:{\"autocomplete\":\"off\"},model:{value:(_vm.filterString),callback:function ($$v) {_vm.filterString=$$v},expression:\"filterString\"}})],1)],1)],1)]),(_vm.transactions)?_c('div',{staticClass:\"card-body-section\"},[(_vm.transactions.length > 0)?_c('b-table',{attrs:{\"striped\":\"\",\"hover\":\"\",\"items\":_vm.transactions,\"fields\":_vm.fields,\"filter\":_vm.filterString}}):_c('div',[_vm._v(\"No Transactions\")])],1):_vm._e()])}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\r\nimport Component from \"vue-class-component\";\r\nimport Vue from \"vue\";\r\nimport { PolicyTransactionDto } from \"../../../api/ClientPortalApiClient\";\r\nimport { Prop } from \"vue-property-decorator\";\r\nimport ApiFactory from \"@/api/ApiFactory\";\r\nimport { FormatDate } from \"../../../filters/FormatDate\";\r\nimport { LoadingSpinnerService } from \"@/store\";\r\n\r\n@Component({})\r\nexport default class PolicyTransactions extends Vue {\r\n  @Prop() policyId: number | undefined;\r\n  private transactions: PolicyTransactionDto[] | null = [];\r\n  private filterString: string | null = \"\";\r\n  private fields = [\r\n    {\r\n      key: \"transactionType\",\r\n      label: \"Type\",\r\n      sortable: false\r\n    },\r\n    {\r\n      key: \"transactionDate\",\r\n      label: \"Date\",\r\n      sortable: true\r\n    },\r\n    {\r\n      key: \"transactionAmount\",\r\n      label: \"Amount\",\r\n      sortable: false,\r\n      formatter: (value: any, key: any, item: any) =>\r\n        value.toLocaleString(\"en-IE\", { style: \"currency\", currency: \"EUR\" })\r\n    },\r\n    {\r\n      key: \"balance\",\r\n      label: \"Balance\",\r\n      sortable: false,\r\n      formatter: (value: any, key: any, item: any) =>\r\n        value.toLocaleString(\"en-IE\", { style: \"currency\", currency: \"EUR\" })\r\n    },\r\n    {\r\n      key: \"transactionNotes\",\r\n      label: \"Notes\",\r\n      sortable: false\r\n    }\r\n  ];\r\n  async mounted() {\r\n    await this.getPolicyTransactions();\r\n  }\r\n\r\n  private async getPolicyTransactions() {\r\n    if (!this.policyId) throw new Error(\"Policy id not valid\");\r\n    const api = ApiFactory.CreateDataClient();\r\n    this.transactions = await api.policyTransactions_GetByPolicyId(\r\n      this.policyId\r\n    );\r\n\r\n    if (this.transactions) {\r\n      for (var i = 0; i < this.transactions.length; i++) {\r\n        this.transactions[i].transactionDate = FormatDate.format(\r\n          this.transactions[i].transactionDate\r\n        );\r\n      }\r\n    }\r\n  }\r\n\r\n  private base64ToArrayBuffer(base64: string) {\r\n    var binaryString = window.atob(base64);\r\n    var binaryLen = binaryString.length;\r\n    var bytes = new Uint8Array(binaryLen);\r\n    for (var i = 0; i < binaryLen; i++) {\r\n      var ascii = binaryString.charCodeAt(i);\r\n      bytes[i] = ascii;\r\n    }\r\n    return bytes;\r\n  }\r\n\r\n  private async DownloadPolicyTransaction() {\r\n    LoadingSpinnerService.Show(\"Creating Policy Transaction...\");\r\n    try {\r\n      if (!this.policyId) throw new Error(\"Policy id not valid\");\r\n      const api = ApiFactory.CreateDataClient();\r\n      const data = await api.externalBroker_DownloadPolicyTransaction(\r\n        this.policyId\r\n      );\r\n      if (data.data && data.fileName) {\r\n        var bytes = this.base64ToArrayBuffer(data.data);\r\n        const blob = new Blob([bytes], { type: data.contentType });\r\n        var link = document.createElement(\"a\");\r\n        link.href = window.URL.createObjectURL(blob);\r\n        var fileName = data.fileName;\r\n        link.download = fileName;\r\n        LoadingSpinnerService.Hide();\r\n        link.click();\r\n      }\r\n    } catch (error) {\r\n      LoadingSpinnerService.Failure(\"Something went wrong. Please try again.\");\r\n    }\r\n  }\r\n\r\n  private async downloadPolicyTransactionsData() {\r\n    LoadingSpinnerService.Show(\"Downloading transaction history...\");\r\n    try {\r\n      if (!this.policyId) throw new Error(\"Policy id not valid\");\r\n      const api = ApiFactory.CreateDataClient();\r\n      const data = await api.externalBroker_DownloadPolicyTransactionData(\r\n        this.policyId\r\n      );\r\n      if (data.data && data.fileName) {\r\n        var bytes = this.base64ToArrayBuffer(data.data);\r\n        const blob = new Blob([bytes], { type: data.contentType });\r\n        var link = document.createElement(\"a\");\r\n        link.href = window.URL.createObjectURL(blob);\r\n        var fileName = data.fileName;\r\n        link.download = fileName;\r\n        LoadingSpinnerService.Hide();\r\n        link.click();\r\n      }\r\n    } catch (error) {\r\n      LoadingSpinnerService.Failure(\"Something went wrong. Please try again.\");\r\n    }\r\n  }\r\n}\r\n","import mod from \"-!../../../../node_modules/cache-loader/dist/cjs.js??ref--14-0!../../../../node_modules/thread-loader/dist/cjs.js!../../../../node_modules/babel-loader/lib/index.js!../../../../node_modules/ts-loader/index.js??ref--14-3!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./PolicyTransactions.vue?vue&type=script&lang=ts&\"; export default mod; export * from \"-!../../../../node_modules/cache-loader/dist/cjs.js??ref--14-0!../../../../node_modules/thread-loader/dist/cjs.js!../../../../node_modules/babel-loader/lib/index.js!../../../../node_modules/ts-loader/index.js??ref--14-3!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./PolicyTransactions.vue?vue&type=script&lang=ts&\"","import { render, staticRenderFns } from \"./PolicyTransactions.vue?vue&type=template&id=7cc7c519&scoped=true&\"\nimport script from \"./PolicyTransactions.vue?vue&type=script&lang=ts&\"\nexport * from \"./PolicyTransactions.vue?vue&type=script&lang=ts&\"\nimport style0 from \"./PolicyTransactions.vue?vue&type=style&index=0&id=7cc7c519&scoped=true&lang=css&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n  script,\n  render,\n  staticRenderFns,\n  false,\n  null,\n  \"7cc7c519\",\n  null\n  \n)\n\nexport default component.exports","\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\r\nimport Component from \"vue-class-component\";\r\nimport Vue from \"vue\";\r\nimport {\r\n  PolicyFundDto,\r\n  PolicyBenefitDto,\r\n  PolicyValuesDto,\r\n  PolicyDto,\r\n  PerformanceChartSeriesDto,\r\n  PerformanceChartDataDto\r\n} from \"@/api/ClientPortalApiClient\";\r\nimport ApiFactory from \"@/api/ApiFactory\";\r\nimport AlertService from \"@/services/alert.service\";\r\nimport { SEE_OTHER } from \"http-status-codes\";\r\nimport { LoadingSpinnerService, RoleStore } from \"@/store\";\r\nimport { Dictionary } from \"vuex\";\r\nimport FundPerformanceChart from \"@/views/policies/charts/FundPerformanceChart.vue\";\r\nimport FundValuePerformanceChart from \"@/views/policies/charts/FundValuePerformanceChart.vue\";\r\nimport FundMixChart from \"@/views/policies/charts/FundMixChart.vue\";\r\nimport PolicyValues from \"@/views/policies/components/PolicyValues.vue\";\r\nimport PolicyTransactions from \"@/views/policies/components/PolicyTransactions.vue\";\r\nimport PolicyFunds from \"@/views/policies/components/PolicyFunds.vue\";\r\nimport BackButton from \"@/components/BackButton.vue\";\r\nimport { FormatDate } from \"@/filters/FormatDate\";\r\n\r\n@Component({\r\n  components: {\r\n    PolicyValues,\r\n    PolicyTransactions,\r\n    FundPerformanceChart,\r\n    FundValuePerformanceChart,\r\n    FundMixChart,\r\n    PolicyFunds,\r\n    BackButton\r\n  }\r\n})\r\nexport default class PolicyDetails_Investment extends Vue {\r\n  private policyDetails: PolicyDto = new PolicyDto();\r\n  private policyId: number | undefined;\r\n  private contactId: number | undefined;\r\n\r\n  async created() {\r\n    LoadingSpinnerService.Show(\"Loading policy details...\");\r\n    try {\r\n      this.contactId = parseInt(this.$route.params.contactId);\r\n      this.policyId = parseInt(this.$route.params.policyId);\r\n      await this.getPolicyDetails();\r\n      LoadingSpinnerService.Hide();\r\n    } catch (e) {\r\n      LoadingSpinnerService.Failure(\r\n        \"Failed to load policy details. Please try again.\"\r\n      );\r\n    }\r\n  }\r\n\r\n  private async getPolicyDetails() {\r\n    if (!this.policyId || !this.contactId)\r\n      throw new Error(\"Request is not valid\");\r\n    const api = ApiFactory.CreateDataClient();\r\n    const result = await api.policies_GetByPolicyId(\r\n      this.contactId,\r\n      this.policyId\r\n    );\r\n    this.policyDetails = result || new PolicyDto();\r\n  }\r\n\r\n  private displayTransactions(): boolean {\r\n    if (this.policyDetails) {\r\n      if (this.policyDetails.categoryName === \"Cash\") {\r\n        return true;\r\n      } else console.log(\"CategoryName: Empty\");\r\n    }\r\n    return false;\r\n  }\r\n\r\n  get policyEndDateString(): string {\r\n    return new Date(this.policyDetails.maturityDate) <= new Date(\"01/01/1900\")\r\n      ? \"Open Ended\"\r\n      : FormatDate.format(this.policyDetails.maturityDate);\r\n  }\r\n\r\n  get IsExternalBroker(): boolean {\r\n    return RoleStore.isExternalBroker;\r\n  }\r\n\r\n  get FundMixType(): number {\r\n    return this.IsExternalBroker ? 3 : 2;\r\n  }\r\n\r\n  private base64ToArrayBuffer(base64: string) {\r\n    var binaryString = window.atob(base64);\r\n    var binaryLen = binaryString.length;\r\n    var bytes = new Uint8Array(binaryLen);\r\n    for (var i = 0; i < binaryLen; i++) {\r\n      var ascii = binaryString.charCodeAt(i);\r\n      bytes[i] = ascii;\r\n    }\r\n    return bytes;\r\n  }\r\n}\r\n","import mod from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--14-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/ts-loader/index.js??ref--14-3!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./PolicyDetails_Investment.vue?vue&type=script&lang=ts&\"; export default mod; export * from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--14-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/ts-loader/index.js??ref--14-3!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./PolicyDetails_Investment.vue?vue&type=script&lang=ts&\"","import { render, staticRenderFns } from \"./PolicyDetails_Investment.vue?vue&type=template&id=2c41816e&\"\nimport script from \"./PolicyDetails_Investment.vue?vue&type=script&lang=ts&\"\nexport * from \"./PolicyDetails_Investment.vue?vue&type=script&lang=ts&\"\nimport style0 from \"./PolicyDetails_Investment.vue?vue&type=style&index=0&lang=css&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n  script,\n  render,\n  staticRenderFns,\n  false,\n  null,\n  null,\n  null\n  \n)\n\nexport default component.exports","import mod from \"-!../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../../node_modules/css-loader/index.js??ref--6-oneOf-1-1!../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./PolicyDetails_Investment.vue?vue&type=style&index=0&lang=css&\"; export default mod; export * from \"-!../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../../node_modules/css-loader/index.js??ref--6-oneOf-1-1!../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./PolicyDetails_Investment.vue?vue&type=style&index=0&lang=css&\""],"sourceRoot":""}