{"version":3,"sources":["webpack:///./src/pages/accounts/Accounts.vue?0d15","webpack:///./src/pages/accounts/Accounts.vue","webpack:///./src/pages/accounts/Accounts.vue?0ad6","webpack:///./src/pages/accounts/Accounts.vue?5d2e"],"names":["render","_vm","this","_h","$createElement","_c","_self","staticClass","state","_v","_s","user","firstName","getDate","_m","attrs","COLUMNS","accounts","on","onRowClick","scopedSlots","_u","key","fn","props","column","field","class","_getAccountTypeColor","row","type","accountNumber","_formattedBalance","availableBalance","selectedAccount","onShowList","staticRenderFns","userModule","orgModule","showList","label","sortable","Intl","DateTimeFormat","month","day","year","format","Date","params","amount","Getter","State","components","CustomTable","AccountDetails","component"],"mappings":"yHAAA,IAAIA,EAAS,WAAa,IAAIC,EAAIC,KAASC,EAAGF,EAAIG,eAAmBC,EAAGJ,EAAIK,MAAMD,IAAIF,EAAG,OAAOE,EAAG,MAAM,CAACE,YAAY,yBAAyB,CAAEN,EAAIO,MAAc,SAAEH,EAAG,MAAM,CAACE,YAAY,iBAAiB,CAACF,EAAG,MAAM,CAACE,YAAY,sCAAsC,CAACF,EAAG,OAAO,CAACE,YAAY,2BAA2B,CAACN,EAAIQ,GAAG,WAAWR,EAAIS,GAAGT,EAAIU,KAAKC,WAAW,OAAOP,EAAG,OAAO,CAACE,YAAY,0BAA0B,CAACN,EAAIQ,GAAGR,EAAIS,GAAGT,EAAIY,cAAcZ,EAAIa,GAAG,GAAGT,EAAG,MAAM,CAACE,YAAY,UAAU,CAACF,EAAG,cAAc,CAACU,MAAM,CAAC,QAAUd,EAAIe,QAAQ,KAAOf,EAAIgB,SAAS,MAAO,EAAM,WAAa,aAAaC,GAAG,CAAC,eAAejB,EAAIkB,YAAYC,YAAYnB,EAAIoB,GAAG,CAAC,CAACC,IAAI,YAAYC,GAAG,SAASC,GAAO,MAAO,CAACnB,EAAG,MAAM,CAAyB,SAAvBmB,EAAMC,OAAOC,MAAkBrB,EAAG,OAAO,CAACE,YAAY,4MAA4MoB,MAAM1B,EAAI2B,qB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yG,0BA2CE,EAAA9B,MAAe,CACb+B,UAAU,EACVL,gBAAiB,MA7CrB,8CAKE,WACE,MAAO,CACL,CACER,MAAO,OACPc,MAAO,eACPC,UAAU,GAEZ,CACEf,MAAO,gBACPc,MAAO,iBACPC,UAAU,GAEZ,CACEf,MAAO,kBACPc,MAAO,oBACPC,UAAU,GAEZ,CACEf,MAAO,iBACPc,MAAO,kBACPC,UAAU,GAEZ,CACEf,MAAO,mBACPc,MAAO,oBACPC,UAAU,MA9BlB,mBAmCE,WACE,OAAO,IAAIC,KAAKC,eAAe,QAAS,CACtCC,MAAO,OACPC,IAAK,UACLC,KAAM,YACLC,OAAO,IAAIC,QAxClB,wBAgDE,SAAWC,GACT/C,KAAKM,MAAM0B,gBAAkBe,EAAOpB,IACpC3B,KAAKM,MAAM+B,UAAW,IAlD1B,wBAqDE,WACErC,KAAKM,MAAM+B,UAAW,EACtBrC,KAAKM,MAAM0B,gBAAkB,OAvDjC,kCA0DE,SAAqBJ,GACnB,OAAQA,GACN,IAAK,WACH,MAAO,eACT,QACE,MAAO,iBA/Df,+BAmEE,SAAkBoB,GAChB,OAAO,eAAeA,OApE1B,GAAsC,QACC,gBAApCb,EAAWc,OAAO,mB,qCACW,gBAA7Bd,EAAWe,MAAM,a,2BACW,gBAA5Bd,EAAUc,MAAM,a,+BAHE,EAAQ,gBAN5B,eAAU,CACTC,WAAY,CACVC,YAAA,OACAC,eAAA,WAGiB,WCrGkuB,I,YCOnvBC,EAAY,eACd,EACAxD,EACAoC,GACA,EACA,KACA,KACA,MAIa,aAAAoB,E","file":"js/chunk-2d0cc644.081951a8.js","sourcesContent":["var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:\"p-8 lg:px-16 lg:py-10\"},[(_vm.state.showList)?_c('div',{staticClass:\"flex flex-col\"},[_c('div',{staticClass:\"flex flex-col justify-between mb-7\"},[_c('span',{staticClass:\"text-2xl font-extrabold\"},[_vm._v(\"Welcome \"+_vm._s(_vm.user.firstName)+\"!\")]),_c('span',{staticClass:\"font-medium opacity-50\"},[_vm._v(_vm._s(_vm.getDate))])]),_vm._m(0),_c('div',{staticClass:\"w-full\"},[_c('CustomTable',{attrs:{\"columns\":_vm.COLUMNS,\"rows\":_vm.accounts,\"sort\":false,\"styleClass\":\"vgt-table\"},on:{\"on-row-click\":_vm.onRowClick},scopedSlots:_vm._u([{key:\"table-row\",fn:function(props){return [_c('div',[(props.column.field === 'type')?_c('span',{staticClass:\"\\n rounded-full\\n uppercase\\n px-4\\n py-2\\n text-xs\\n font-semibold\\n text-black\\n \",class:_vm._getAccountTypeColor(props.row.type)},[_vm._v(\" \"+_vm._s(props.row.type)+\" \")]):(props.column.field === 'accountNumber')?_c('span',{staticClass:\"text-sm text-blue-900\"},[_vm._v(\" \"+_vm._s(props.row.accountNumber)+\" \")]):(\n props.column.field === 'fundsInClearing' ||\n props.column.field === 'currentBalance'\n )?_c('span',{staticClass:\"text-sm text-blue-900\"},[_c('span',[_vm._v(\"PHP\")]),_vm._v(\" \"+_vm._s(_vm._formattedBalance(props.row[props.column.field]))+\" \")]):(props.column.field === 'availableBalance')?_c('span',[_c('span',{staticClass:\"bg-blue-100 font-semibold text-white mr-2 px-1 rounded\"},[_vm._v(\"PHP\")]),_c('span',{staticClass:\"text-lg font-black text-blue-900\"},[_vm._v(\" \"+_vm._s(_vm._formattedBalance(props.row.availableBalance))+\" \")])]):_c('span',{staticClass:\"text-sm text-blue-900\"},[_vm._v(\" \"+_vm._s(props.row[props.column.field])+\" \")])])]}}],null,false,2072036475)})],1)]):_c('div',[_c('AccountDetails',{attrs:{\"account\":_vm.state.selectedAccount},on:{\"on-show-list\":_vm.onShowList}})],1)])}\nvar staticRenderFns = [function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:\"flex flex-col justify-start mb-4\"},[_c('span',{staticClass:\"font-extrabold uppercase block\"},[_vm._v(\"Your Accounts\")])])}]\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\n\n\n\n\n\n\n\n\nimport { Vue, Component } from \"vue-property-decorator\";\nimport { namespace } from \"vuex-class\";\n\nimport { UserInfo, OrgAccount } from \"@/types\";\nimport { formatCurrency } from \"@/utils/common\";\nimport { CustomTable, AccountDetails } from \"@components\";\n\nconst userModule = namespace(\"user\");\nconst orgModule = namespace(\"org\");\n\ninterface State {\n showList: boolean;\n selectedAccount: null | OrgAccount;\n}\n\n@Component({\n components: {\n CustomTable,\n AccountDetails,\n },\n})\nexport default class Accounts extends Vue {\n @userModule.Getter(\"userInfoExists\") userInfoExists!: boolean;\n @userModule.State(\"userInfo\") user!: UserInfo;\n @orgModule.State(\"accounts\") accounts!: Array;\n\n get COLUMNS() {\n return [\n {\n field: \"type\",\n label: \"Account Type\",\n sortable: false,\n },\n {\n field: \"accountNumber\",\n label: \"Account Number\",\n sortable: false,\n },\n {\n field: \"fundsInClearing\",\n label: \"Funds in Clearing\",\n sortable: false,\n },\n {\n field: \"currentBalance\",\n label: \"Current Balance\",\n sortable: false,\n },\n {\n field: \"availableBalance\",\n label: \"Available Balance\",\n sortable: false,\n },\n ];\n }\n\n get getDate(): string {\n return new Intl.DateTimeFormat(\"en-US\", {\n month: \"long\",\n day: \"numeric\",\n year: \"numeric\",\n }).format(new Date());\n }\n\n state: State = {\n showList: true,\n selectedAccount: null,\n };\n\n onRowClick(params: Record) {\n this.state.selectedAccount = params.row;\n this.state.showList = false;\n }\n\n onShowList() {\n this.state.showList = true;\n this.state.selectedAccount = null;\n }\n\n _getAccountTypeColor(type: string) {\n switch (type) {\n case \"checking\":\n return \"bg-green-200\";\n default:\n return \"bg-blue-200\";\n }\n }\n\n _formattedBalance(amount: number) {\n return formatCurrency(amount);\n }\n}\n","import mod from \"-!../../../node_modules/.pnpm/cache-loader@4.1.0_webpack@4.46.0/node_modules/cache-loader/dist/cjs.js??ref--15-0!../../../node_modules/.pnpm/thread-loader@2.1.3_webpack@4.46.0/node_modules/thread-loader/dist/cjs.js!../../../node_modules/.pnpm/babel-loader@8.2.3_7f185b6b63b1b293762538aa414d8c1b/node_modules/babel-loader/lib/index.js!../../../node_modules/.pnpm/ts-loader@6.2.2_typescript@3.9.10/node_modules/ts-loader/index.js??ref--15-3!../../../node_modules/.pnpm/cache-loader@4.1.0_webpack@4.46.0/node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../node_modules/.pnpm/vue-loader@15.9.8_679359cdb69c218f2f8f476b2ba08796/node_modules/vue-loader/lib/index.js??vue-loader-options!./Accounts.vue?vue&type=script&lang=ts&\"; export default mod; export * from \"-!../../../node_modules/.pnpm/cache-loader@4.1.0_webpack@4.46.0/node_modules/cache-loader/dist/cjs.js??ref--15-0!../../../node_modules/.pnpm/thread-loader@2.1.3_webpack@4.46.0/node_modules/thread-loader/dist/cjs.js!../../../node_modules/.pnpm/babel-loader@8.2.3_7f185b6b63b1b293762538aa414d8c1b/node_modules/babel-loader/lib/index.js!../../../node_modules/.pnpm/ts-loader@6.2.2_typescript@3.9.10/node_modules/ts-loader/index.js??ref--15-3!../../../node_modules/.pnpm/cache-loader@4.1.0_webpack@4.46.0/node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../node_modules/.pnpm/vue-loader@15.9.8_679359cdb69c218f2f8f476b2ba08796/node_modules/vue-loader/lib/index.js??vue-loader-options!./Accounts.vue?vue&type=script&lang=ts&\"","import { render, staticRenderFns } from \"./Accounts.vue?vue&type=template&id=5f8f7b90&\"\nimport script from \"./Accounts.vue?vue&type=script&lang=ts&\"\nexport * from \"./Accounts.vue?vue&type=script&lang=ts&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/.pnpm/vue-loader@15.9.8_679359cdb69c218f2f8f476b2ba08796/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"],"sourceRoot":""}