{"version":3,"sources":["webpack:///./@core/pages/client-management/views/policy-management/PolicyList.vue?22f2","webpack:///./@core/pages/client-management/views/policy-management/PolicyList.vue","webpack:///./@core/pages/client-management/views/policy-management/PolicyList.vue?5db0","webpack:///./@core/pages/client-management/views/policy-management/PolicyList.vue?821e"],"names":["render","_vm","this","_h","$createElement","_c","_self","staticClass","attrs","columns","mainPolicies","on","rowClick","staticRenderFns","clientPolicyStore","label","key","type","disabled","options","LineOfBusinessOptions","model","get","idx","productMetadata","status","set","NBRProductStatusOptions","formatRoleNicely","role","roles","split","map","foundRoleName","PolicyRoles","find","option","value","result","replace","toUpperCase","substring","join","index","policy","$router","push","path","oid","$route","params","clientOid","searchParamDto","clientOids","listPolicies","Action","State","components","AppFormTable","component"],"mappings":"uHAAA,IAAIA,EAAS,WAAa,IAAIC,EAAIC,KAASC,EAAGF,EAAIG,eAAmBC,EAAGJ,EAAIK,MAAMD,IAAIF,EAAG,OAAOE,EAAG,MAAM,CAACA,EAAG,MAAM,CAACE,YAAY,WAAW,CAACF,EAAG,eAAe,CAACG,MAAM,CAAC,UAAW,EAAM,OAASP,EAAIQ,QAAQ,KAAOR,EAAIS,aAAa,QAAU,EAAE,MAAO,EAAK,cAAe,GAAMC,GAAG,CAAC,6BAA6BV,EAAIW,aAAa,MAC/TC,EAAkB,G,oQC0BhBC,EAAoB,eAAU,qBAOf,EAArB,uKASE,WAAW,WACT,MAAO,CACL,CACEC,MAAO,eACPC,IAAK,OACLC,KAAM,OACNC,UAAU,GAEZ,CACEH,MAAO,oCACPC,IAAK,eACLC,KAAM,OACNC,UAAU,GAEZ,CACEH,MAAO,mBACPC,IAAK,OACLC,KAAM,WACNE,QAASC,EAAA,KACTF,UAAU,GAEZ,CACEH,MAAO,iBACPM,MAAO,CACLC,IAAK,SAACC,GAAD,uBAAS,EAAKb,aAAaa,GAAKC,uBAAhC,aAAS,EAAwCC,QACtDC,IAAK,cAIPT,KAAM,WACNE,QAAS,GAAF,sBACFQ,EAAA,MADE,eAEF,SAELT,UAAU,GAEZ,CACEH,MAAO,cACPM,MAAO,CACLC,IAAK,SAACC,GAAD,OAAS,EAAKK,iBAAiB,EAAKlB,aAAaa,GAAKM,OAC3DH,IAAK,cAIPT,KAAM,OACNC,UAAU,MAtDlB,8BA2DE,WAA+C,IAA7BY,EAA6B,uDAAF,GAI3C,MAHqB,kBAAVA,IACTA,EAAQA,EAAMC,MAAM,MAEfD,EAAME,KAAI,SAAAH,GAAO,MAChBI,EAAa,UAAGC,EAAA,KAAYC,MAAK,SAAAC,GAAM,OAAIA,EAAOC,QAAUR,YAA/C,aAAG,EAAmDd,MACzE,IAAK,qBAAQkB,GACX,OAAOA,EAET,IAAMK,EAAST,EAAKU,QAAQ,WAAY,OACxC,OAAOD,EAAO,GAAGE,cAAgBF,EAAOG,UAAU,MACjDC,KAAK,QAtEZ,sBAyEE,SAAUC,GACR,IAAMC,EAAS1C,KAAKQ,aAAaiC,GACjCzC,KAAK2C,QAAQC,KAAK,CAAEC,KAAM,WAAF,OAAaH,EAAOI,IAApB,iBA3E5B,qBA8EE,WACE,OAAO9C,KAAK+C,OAAOC,OAAOC,YA/E9B,8EAkFE,qGACEjD,KAAKkD,eAAiB,CACpBC,WAAY,CAACnD,KAAKiD,YAFtB,SAIQjD,KAAKoD,aAAapD,KAAKkD,gBAJ/B,gDAlFF,8DAAwC,QAEtC,gBADCtC,EAAkByC,Q,mCAInB,gBADCzC,EAAkB0C,O,mCAJA,EAAU,gBAL9B,eAAU,CACTC,WAAY,CACVC,eAAA,SAGiB,WClCsa,I,YCOvbC,EAAY,eACd,EACA3D,EACAa,GACA,EACA,KACA,WACA,MAIa,aAAA8C,E","file":"js/chunk-2d22585e.6069fb39.js","sourcesContent":["var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',[_c('div',{staticClass:\"content\"},[_c('AppFormTable',{attrs:{\"vertical\":false,\"fields\":_vm.columns,\"data\":_vm.mainPolicies,\"maxSize\":0,\"show\":true,\"isPagination\":true},on:{\"app-form-table-row-clicked\":_vm.rowClick}})],1)])}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nimport { Component, Vue } from 'vue-property-decorator'\nimport { namespace } from 'vuex-class'\nimport AppFormTable from '@core/components/AppFormTable.vue'\nimport { FilterPoliciesDTO, PolicySearchDto } from '@core/pages/new-business-register/api'\nimport { TableFormStructure } from '@master/model/structure/FormStructure'\nimport { ClientPolicyDto } from '@core/pages/CommissionModule/api'\nimport { LineOfBusinessOptions } from '@master/model/options/LineOfBusinessOptions'\nimport { PolicyRoles } from '@master/model/options/PolicyRoles'\nimport { isEmpty } from 'lodash/fp'\nimport { NBRProductCISStatusOptions, NBRProductStatusOptions } from '@master/model/options/NBRProductStatusOptions'\n\nconst clientPolicyStore = namespace('ClientPolicyStore')\n\n@Component({\n components: {\n AppFormTable\n }\n})\nexport default class PolicyList extends Vue {\n @clientPolicyStore.Action\n private listPolicies\n\n @clientPolicyStore.State\n private mainPolicies: (ClientPolicyDto & Partial)[]\n\n private searchParamDto: FilterPoliciesDTO\n\n get columns (): TableFormStructure> {\n return [\n {\n label: 'Product Name',\n key: 'name',\n type: 'text',\n disabled: true\n },\n {\n label: 'Policy Number / Investment Number',\n key: 'policyNumber',\n type: 'text',\n disabled: true\n },\n {\n label: 'Line of Business',\n key: 'type',\n type: 'dropdown',\n options: LineOfBusinessOptions,\n disabled: true\n },\n {\n label: 'Product Status',\n model: {\n get: (idx) => this.mainPolicies[idx].productMetadata?.status,\n set: () => {\n //\n }\n },\n type: 'dropdown',\n options: [\n ...NBRProductStatusOptions,\n ...NBRProductCISStatusOptions\n ],\n disabled: true\n },\n {\n label: 'Policy Role',\n model: {\n get: (idx) => this.formatRoleNicely(this.mainPolicies[idx].role),\n set: () => {\n // nothign to be done\n }\n },\n type: 'text',\n disabled: true\n }\n ]\n }\n\n formatRoleNicely (roles: string | string[] = []) {\n if (typeof roles === 'string') {\n roles = roles.split(',')\n }\n return roles.map(role => {\n const foundRoleName = PolicyRoles.find(option => option.value === role)?.label\n if (!isEmpty(foundRoleName)) {\n return foundRoleName\n }\n const result = role.replace(/([A-Z])/g, ' $1')\n return result[0].toUpperCase() + result.substring(1)\n }).join(', ')\n }\n\n rowClick (index: number) {\n const policy = this.mainPolicies[index]\n this.$router.push({ path: `/policy/${policy.oid}/overview` })\n }\n\n get clientOid () {\n return this.$route.params.clientOid\n }\n\n async mounted () {\n this.searchParamDto = {\n clientOids: [this.clientOid]\n }\n await this.listPolicies(this.searchParamDto)\n }\n}\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!./PolicyList.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!./PolicyList.vue?vue&type=script&lang=ts&\"","import { render, staticRenderFns } from \"./PolicyList.vue?vue&type=template&id=2a82e401&scoped=true&\"\nimport script from \"./PolicyList.vue?vue&type=script&lang=ts&\"\nexport * from \"./PolicyList.vue?vue&type=script&lang=ts&\"\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 \"2a82e401\",\n null\n \n)\n\nexport default component.exports"],"sourceRoot":""}