{"version":3,"sources":["webpack:///./src/views/finance/settlements/SettlementList.vue?10ec","webpack:///../../../src/components/VSnackbar/VSnackbar.ts","webpack:///./src/constants/withdrawal-status/index.js","webpack:///./src/components/VToast.vue?6c18","webpack:///src/components/VToast.vue","webpack:///./src/components/VToast.vue?3160","webpack:///./src/components/VToast.vue","webpack:///./src/views/finance/settlements/SettlementList.vue?cd82","webpack:///./src/views/finance/settlements/storeModule.js","webpack:///./src/views/finance/settlements/useSettlementList.js","webpack:///./src/constants/settlement-status/index.js","webpack:///src/views/finance/settlements/SettlementList.vue","webpack:///./src/views/finance/settlements/SettlementList.vue?91c0","webpack:///./src/views/finance/settlements/SettlementList.vue"],"names":["mixins","VSheet","Colorable","Toggleable","PositionableFactory","extend","name","props","app","Boolean","centered","contentClass","type","String","default","multiLine","text","timeout","Number","transition","validator","v","vertical","data","activeTimeout","computed","classes","this","absolute","isActive","bottom","top","hasBackground","left","right","outlined","isDark","light","Themeable","options","call","styles","bar","footer","insetFooter","$vuetify","application","paddingBottom","convertToUnit","paddingLeft","paddingRight","paddingTop","watch","mounted","setTimeout","created","$attrs","hasOwnProperty","removed","deprecate","methods","genActions","$createElement","staticClass","getSlot","attrs","class","genContent","role","genWrapper","setColor","setBackgroundColor","setTextColor","color","style","directives","value","on","pointerenter","window","clearTimeout","pointerleave","genTransition","includes","render","h","PENDING","PROCESSING","COMPLETED","CANCELLED","_vm","_h","_c","_self","snackbar","scopedSlots","_u","key","fn","ref","_l","msg","code","_v","_s","message","_b","$event","visible","model","callback","$$v","$set","expression","icon","staticRenderFns","setup","messages","mdiCheck","show","console","log","icons","mdiCancel","component","VBtn","VIcon","VSnackbar","shopFilterItems","shopFilterModel","statusFilterItems","statusFilterModel","datesFilter","_g","mdiCalendar","dateRangeText","menuDateRangeFilterModel","$refs","menuDateRangeFilter","save","loading","preventDefault","applyFilters","apply","arguments","resetFilters","tableColumns","settlementItems","settlementItemsLength","item","getSettlementPdf","id","settlementCode","formatDate","startDate","dateStyle","endDate","formatCurrency","processingVolume","settledAmount","commissionEarned","resolveStatusVariant","withdrawalStatusCode","withdrawalStatus","withdrawalCode","_e","mdiDownloadBoxOutline","namespaced","state","getters","mutations","actions","fetchSettlementListConfig","Promise","resolve","reject","axios","get","then","response","catch","error","fetchShopsByMerchantConfig","ctx","merchantId","params","fetchSettlements","queryParams","fetchSettlement","useSettlementList","STORE_MODULE_NAME","store","hasModule","registerModule","settlementStoreModule","onUnmounted","unregisterModule","sortable","align","searchQuery","aMonthAgo","Date","setMonth","getMonth","toISOString","substring","datesRangeSelected","sortBy","sortDesc","vtoast","dispatch","q","status","shopId","periodType","from","to","records","count","finally","fetchConfig","config","shops","settlementId","pdfUrl","open","errors","DRAFT","PUBLISHED","components","VToast","join","onMounted","settlementStatus","avatarText","mdiSquareEditOutline","mdiFileDocumentOutline","mdiDotsVertical","mdiDeleteOutline","mdiPlus","mdiExportVariant","mdiAccountOutline","mdiPublish","mdiPublishOff","VAutocomplete","VCard","VCardText","VCardTitle","VChip","VCol","VDataTable","VDatePicker","VDivider","VMenu","VRow","VSelect","VTextField"],"mappings":"kHAAA,W,oCCAA,8GAoBeA,sBACbC,OACAC,OACAC,OACAC,eAAoB,CAClB,WACA,SACA,OACA,QACA,SAGFC,OAAO,CACPC,KAAM,aAENC,MAAO,CACLC,IAAKC,QACLC,SAAUD,QACVE,aAAc,CACZC,KAAMC,OACNC,QAAS,IAEXC,UAAWN,QACXO,KAAMP,QACNQ,QAAS,CACPL,KAAM,CAACM,OAAQL,QACfC,QAAS,KAEXK,WAAY,CACVP,KAAM,CAACH,QAASI,QAChBC,QAAS,qBACTM,UAAWC,GAAkB,kBAANA,IAAwB,IAANA,GAE3CC,SAAUb,SAGZc,KAAMA,KAAA,CACJC,eAAgB,IAGlBC,SAAU,CACRC,UACE,MAAO,CACL,oBAAqBC,KAAKC,SAC1B,kBAAmBD,KAAKE,SACxB,kBAAmBF,KAAKG,SAAWH,KAAKI,IACxC,oBAAqBJ,KAAKjB,SAC1B,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,eAEAlH,QACA,aACA6F,EAAA,gBACA9D,EAAA,sBACAC,EAAA,aACAF,EAAA,YACAqD,EAAA,gBACAtE,EAAA,gBACAD,EAAA,kBACAG,EAAA,kBACAD,EAAA,YACAE,EAAA,yBACAI,EAAA,mBACAsE,EAAA,QACAvK,EAAA,QACAqG,EAAA,iBACAuB,EAAA,iBACAuB,EAAA,iBACApC,EAAA,aACAR,EAAA,aACAG,EAAA,YACA2E,EAAA,qBACA3D,GACA4B,IAEAtD,EAAA9G,eAAA,IAAA2G,EAAAxD,MAAA2J,KAAA,QAMA,OAJAC,eAAA,KACAZ,MAGA,CACAX,SACA9D,kBACAD,eACAqD,cACAkC,mBACAxG,kBACAD,kBACAG,oBACAD,oBACAE,cACAG,gBACAC,2BACAsE,qBACA1D,wBACAR,UACArG,UACA4H,mBACAuE,kBACAzE,uBACAyB,mBACApC,mBACAR,eACAG,eACA2E,cACAnE,kBACAI,sBAGAnC,MAAA,CACAiH,6BACAC,+BACAC,uBACAC,wBACAC,gBACAC,wBACAC,yBACA3G,mBACA4G,mBACAC,sBACA7E,iCC3RyZ,I,qNCQrZ1C,EAAY,eACd,EACAxC,EACA+B,GACA,EACA,KACA,KACA,MAIa,aAAAS,EAAiB,QAmBhC,IAAkBA,EAAW,CAACwH,gBAAA,KAAcvH,OAAA,KAAKwH,QAAA,KAAMC,UAAA,OAAUC,WAAA,OAAWC,QAAA,KAAMC,OAAA,KAAKC,aAAA,KAAWC,cAAA,KAAYC,WAAA,KAAS9H,QAAA,KAAM+H,QAAA,KAAMC,OAAA,KAAKC,UAAA,KAAQC,aAAA","file":"js/chunk-7f86beee.160e3549.js","sourcesContent":["export * from \"-!../../../../node_modules/@vue/cli-service/node_modules/mini-css-extract-plugin/dist/loader.js??ref--9-oneOf-1-0!../../../../node_modules/css-loader/dist/cjs.js??ref--9-oneOf-1-1!../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../node_modules/postcss-loader/src/index.js??ref--9-oneOf-1-2!../../../../node_modules/sass-loader/dist/cjs.js??ref--9-oneOf-1-3!../../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./SettlementList.vue?vue&type=style&index=0&id=4a81780c&prod&lang=scss&\"","// Styles\nimport './VSnackbar.sass'\n\n// Components\nimport VSheet from '../VSheet/VSheet'\n\n// Mixins\nimport Colorable from '../../mixins/colorable'\nimport Themeable from '../../mixins/themeable'\nimport Toggleable from '../../mixins/toggleable'\nimport { factory as PositionableFactory } from '../../mixins/positionable'\n\n// Utilities\nimport mixins from '../../util/mixins'\nimport { convertToUnit, getSlot } from '../../util/helpers'\nimport { deprecate, removed } from '../../util/console'\n\n// Types\nimport { PropType, VNode } from 'vue'\n\nexport default mixins(\n VSheet,\n Colorable,\n Toggleable,\n PositionableFactory([\n 'absolute',\n 'bottom',\n 'left',\n 'right',\n 'top',\n ])\n/* @vue/component */\n).extend({\n name: 'v-snackbar',\n\n props: {\n app: Boolean,\n centered: Boolean,\n contentClass: {\n type: String,\n default: '',\n },\n multiLine: Boolean,\n text: Boolean,\n timeout: {\n type: [Number, String],\n default: 5000,\n },\n transition: {\n type: [Boolean, String] as PropType,\n default: 'v-snack-transition',\n validator: v => typeof v === 'string' || v === false,\n },\n vertical: Boolean,\n },\n\n data: () => ({\n activeTimeout: -1,\n }),\n\n computed: {\n classes (): object {\n return {\n 'v-snack--absolute': this.absolute,\n 'v-snack--active': this.isActive,\n 'v-snack--bottom': this.bottom || !this.top,\n 'v-snack--centered': this.centered,\n 'v-snack--has-background': this.hasBackground,\n 'v-snack--left': this.left,\n 'v-snack--multi-line': this.multiLine && !this.vertical,\n 'v-snack--right': this.right,\n 'v-snack--text': this.text,\n 'v-snack--top': this.top,\n 'v-snack--vertical': this.vertical,\n }\n },\n // Text and outlined styles both\n // use transparent backgrounds\n hasBackground (): boolean {\n return (\n !this.text &&\n !this.outlined\n )\n },\n // Snackbar is dark by default\n // override themeable logic.\n isDark (): boolean {\n return this.hasBackground\n ? !this.light\n : Themeable.options.computed.isDark.call(this)\n },\n styles (): object {\n if (this.absolute || !this.app) return {}\n\n const {\n bar,\n bottom,\n footer,\n insetFooter,\n left,\n right,\n top,\n } = this.$vuetify.application\n\n return {\n paddingBottom: convertToUnit(bottom + footer + insetFooter),\n paddingLeft: convertToUnit(left),\n paddingRight: convertToUnit(right),\n paddingTop: convertToUnit(bar + top),\n }\n },\n },\n\n watch: {\n isActive: 'setTimeout',\n timeout: 'setTimeout',\n },\n\n mounted () {\n if (this.isActive) this.setTimeout()\n },\n\n created () {\n /* istanbul ignore next */\n if (this.$attrs.hasOwnProperty('auto-height')) {\n removed('auto-height', this)\n }\n\n /* istanbul ignore next */\n // eslint-disable-next-line eqeqeq\n if (this.timeout == 0) {\n deprecate('timeout=\"0\"', '-1', this)\n }\n },\n\n methods: {\n genActions () {\n return this.$createElement('div', {\n staticClass: 'v-snack__action ',\n }, [\n getSlot(this, 'action', {\n attrs: { class: 'v-snack__btn' },\n }),\n ])\n },\n genContent () {\n return this.$createElement('div', {\n staticClass: 'v-snack__content',\n class: {\n [this.contentClass]: true,\n },\n attrs: {\n role: 'status',\n 'aria-live': 'polite',\n },\n }, [getSlot(this)])\n },\n genWrapper () {\n const setColor = this.hasBackground\n ? this.setBackgroundColor\n : this.setTextColor\n\n const data = setColor(this.color, {\n staticClass: 'v-snack__wrapper',\n class: VSheet.options.computed.classes.call(this),\n style: VSheet.options.computed.styles.call(this),\n directives: [{\n name: 'show',\n value: this.isActive,\n }],\n on: {\n pointerenter: () => window.clearTimeout(this.activeTimeout),\n pointerleave: this.setTimeout,\n },\n })\n\n return this.$createElement('div', data, [\n this.genContent(),\n this.genActions(),\n ])\n },\n genTransition () {\n return this.$createElement('transition', {\n props: { name: this.transition },\n }, [this.genWrapper()])\n },\n setTimeout () {\n window.clearTimeout(this.activeTimeout)\n\n const timeout = Number(this.timeout)\n\n if (\n !this.isActive ||\n // TODO: remove 0 in v3\n [0, -1].includes(timeout)\n ) {\n return\n }\n\n this.activeTimeout = window.setTimeout(() => {\n this.isActive = false\n }, timeout)\n },\n },\n\n render (h): VNode {\n return h('div', {\n staticClass: 'v-snack',\n class: this.classes,\n style: this.styles,\n }, [\n this.transition !== false\n ? this.genTransition()\n : this.genWrapper(),\n ])\n },\n})\n","const PENDING = 'PENDING'\nconst PROCESSING = 'PROCESSING'\nconst COMPLETED = 'COMPLETED'\nconst CANCELLED = 'CANCELLED'\n\nexport default {\n PENDING,\n PROCESSING,\n COMPLETED,\n CANCELLED,\n}\n","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('v-snackbar',{attrs:{\"timeout\":_vm.snackbar.timeout,\"color\":_vm.snackbar.color,\"multi-line\":\"\",\"bottom\":\"\"},scopedSlots:_vm._u([{key:\"action\",fn:function(ref){\nvar attrs = ref.attrs;\nreturn [_vm._l((_vm.snackbar.messages),function(msg){return _c('div',{key:msg.code,staticClass:\"mr-5\"},[_vm._v(\" \"+_vm._s(msg.message)+\" \")])}),_c('v-btn',_vm._b({attrs:{\"color\":\"error\",\"text\":\"\"},on:{\"click\":function($event){_vm.snackbar.visible = false}}},'v-btn',attrs,false),[_vm._v(\" Close \")])]}}]),model:{value:(_vm.snackbar.visible),callback:function ($$v) {_vm.$set(_vm.snackbar, \"visible\", $$v)},expression:\"snackbar.visible\"}},[_c('v-icon',{attrs:{\"left\":\"\"}},[_vm._v(\" \"+_vm._s(_vm.snackbar.icon)+\" \")])],1)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","\n\n\n","import mod from \"-!../../node_modules/cache-loader/dist/cjs.js??ref--13-0!../../node_modules/@vue/cli-plugin-babel/node_modules/thread-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./VToast.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../node_modules/cache-loader/dist/cjs.js??ref--13-0!../../node_modules/@vue/cli-plugin-babel/node_modules/thread-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./VToast.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./VToast.vue?vue&type=template&id=33138c2e&\"\nimport script from \"./VToast.vue?vue&type=script&lang=js&\"\nexport * from \"./VToast.vue?vue&type=script&lang=js&\"\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\n\n/* vuetify-loader */\nimport installComponents from \"!../../node_modules/vuetify-loader/lib/runtime/installComponents.js\"\nimport { VBtn } from 'vuetify/lib/components/VBtn';\nimport { VIcon } from 'vuetify/lib/components/VIcon';\nimport { VSnackbar } from 'vuetify/lib/components/VSnackbar';\ninstallComponents(component, {VBtn,VIcon,VSnackbar})\n","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{attrs:{\"id\":\"settlement-list\"}},[_c('v-card',[_c('v-card-title',[_vm._v(\" Settlements \")]),_c('v-row',{staticClass:\"px-2 ma-0\"},[_c('v-col',{attrs:{\"cols\":\"12\",\"sm\":\"4\"}},[_c('v-autocomplete',{attrs:{\"placeholder\":\"Select Shop\",\"items\":_vm.shopFilterItems,\"item-text\":\"text\",\"item-value\":\"value\",\"outlined\":\"\",\"dense\":\"\",\"clearable\":\"\",\"hide-details\":\"\"},model:{value:(_vm.shopFilterModel),callback:function ($$v) {_vm.shopFilterModel=$$v},expression:\"shopFilterModel\"}})],1),_c('v-col',{attrs:{\"cols\":\"12\",\"sm\":\"4\"}},[_c('v-select',{attrs:{\"placeholder\":\"Select Status\",\"items\":_vm.statusFilterItems,\"item-text\":\"text\",\"item-value\":\"value\",\"outlined\":\"\",\"dense\":\"\",\"clearable\":\"\",\"hide-details\":\"\"},model:{value:(_vm.statusFilterModel),callback:function ($$v) {_vm.statusFilterModel=$$v},expression:\"statusFilterModel\"}})],1),_c('v-col',{attrs:{\"cols\":\"12\",\"sm\":\"4\"}},[_c('v-menu',{ref:\"menuDateRangeFilter\",attrs:{\"return-value\":_vm.datesFilter,\"close-on-content-click\":false,\"transition\":\"scale-transition\",\"offset-y\":\"\",\"min-width\":\"auto\",\"hide-details\":\"\"},on:{\"update:returnValue\":function($event){_vm.datesFilter=$event},\"update:return-value\":function($event){_vm.datesFilter=$event}},scopedSlots:_vm._u([{key:\"activator\",fn:function(ref){\nvar on = ref.on;\nvar attrs = ref.attrs;\nreturn [_c('v-text-field',_vm._g(_vm._b({attrs:{\"label\":\"Period\",\"prepend-icon\":_vm.icons.mdiCalendar,\"readonly\":\"\",\"hide-details\":\"\"},model:{value:(_vm.dateRangeText),callback:function ($$v) {_vm.dateRangeText=$$v},expression:\"dateRangeText\"}},'v-text-field',attrs,false),on))]}}]),model:{value:(_vm.menuDateRangeFilterModel),callback:function ($$v) {_vm.menuDateRangeFilterModel=$$v},expression:\"menuDateRangeFilterModel\"}},[_c('v-date-picker',{attrs:{\"range\":\"\",\"no-title\":\"\",\"scrollable\":\"\"},model:{value:(_vm.datesFilter),callback:function ($$v) {_vm.datesFilter=$$v},expression:\"datesFilter\"}},[_c('v-btn',{attrs:{\"block\":\"\",\"outlined\":\"\",\"small\":\"\"},on:{\"click\":function($event){return _vm.$refs.menuDateRangeFilter.save(_vm.datesFilter)}}},[_vm._v(\" OK \")])],1)],1)],1)],1),_c('v-divider',{staticClass:\"mt-4\"}),_c('v-card-text',{staticClass:\"d-flex align-center flex-wrap pb-0\"},[_c('v-btn',{ref:\"btnApplyFilters\",staticClass:\"me-3 mb-4\",attrs:{\"color\":\"primary\",\"loading\":_vm.loading},on:{\"click\":function($event){$event.preventDefault();return _vm.applyFilters.apply(null, arguments)}}},[_vm._v(\" Apply Filters \")]),_c('v-btn',{staticClass:\"me-3 mb-4\",attrs:{\"color\":\"secondary\",\"outlined\":\"\",\"type\":\"reset\"},on:{\"click\":function($event){$event.preventDefault();return _vm.resetFilters.apply(null, arguments)}}},[_vm._v(\" Reset \")])],1),_c('v-data-table',{ref:\"settlementsTable\",attrs:{\"headers\":_vm.tableColumns,\"items\":_vm.settlementItems,\"options\":_vm.options,\"server-items-length\":_vm.settlementItemsLength,\"items-per-page\":10,\"loading\":_vm.loading},on:{\"update:options\":function($event){_vm.options=$event}},scopedSlots:_vm._u([{key:\"item.settlementCode\",fn:function(ref){\nvar item = ref.item;\nreturn [_c('div',{staticClass:\"d-flex align-left\"},[_c('a',{attrs:{\"href\":\"#\"},on:{\"click\":function($event){return _vm.getSettlementPdf(item.id)}}},[_vm._v(_vm._s(item.settlementCode))])])]}},{key:\"item.startDate\",fn:function(ref){\nvar item = ref.item;\nreturn [_c('div',{staticClass:\"align-center\"},[_vm._v(\" \"+_vm._s(_vm.formatDate(item.startDate, { dateStyle: \"short\" }))+\" - \"+_vm._s(_vm.formatDate(item.endDate, { dateStyle: \"short\" }))+\" \")])]}},{key:\"item.processingVolume\",fn:function(ref){\nvar item = ref.item;\nreturn [_c('div',{staticClass:\"d-flex align-center\"},[_c('span',{staticClass:\"text-capitalize text--primary align-right\"},[_vm._v(\"$ \"+_vm._s(_vm.formatCurrency(item.processingVolume)))])])]}},{key:\"item.settledAmount\",fn:function(ref){\nvar item = ref.item;\nreturn [_c('div',{staticClass:\"d-flex align-center\"},[_c('span',{staticClass:\"text-capitalize text--primary align-right\"},[_vm._v(\"$ \"+_vm._s(_vm.formatCurrency(item.settledAmount)))])])]}},{key:\"item.commissionEarned\",fn:function(ref){\nvar item = ref.item;\nreturn [_c('div',{staticClass:\"d-flex align-center\"},[_c('span',{staticClass:\"text-capitalize text--primary align-right\"},[_vm._v(\"$ \"+_vm._s(_vm.formatCurrency(item.commissionEarned)))])])]}},{key:\"item.withdrawalStatusCode\",fn:function(ref){\nvar item = ref.item;\nreturn [_c('v-chip',{staticClass:\"v-chip-light-bg text-capitalize align-center\",class:((_vm.resolveStatusVariant(item.withdrawalStatusCode)) + \"--text\"),attrs:{\"small\":\"\",\"color\":_vm.resolveStatusVariant(item.withdrawalStatusCode)}},[_vm._v(\" \"+_vm._s(item.withdrawalStatusCode == null ? 'PENDING' : item.withdrawalStatusCode)+\" \")]),(_vm.withdrawalStatus.COMPLETED)?_c('div',[_c('span',[_vm._v(_vm._s(item.withdrawalCode))])]):_vm._e()]}},{key:\"item.actions\",fn:function(ref){\nvar item = ref.item;\nreturn [_c('v-icon',{on:{\"click\":function($event){return _vm.getSettlementPdf(item.id)}}},[_vm._v(_vm._s(_vm.icons.mdiDownloadBoxOutline))])]}}],null,true)})],1),_c('v-toast',{ref:\"vtoast\"})],1)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","import axios from '@axios'\n\nexport default {\n namespaced: true,\n state: {},\n getters: {},\n mutations: {},\n actions: {\n fetchSettlementListConfig() {\n return new Promise((resolve, reject) => {\n axios\n .get('/finance/settlement/page-setups/list')\n .then(response => resolve(response))\n .catch(error => reject(error))\n })\n },\n fetchShopsByMerchantConfig(ctx, { merchantId }) {\n return new Promise((resolve, reject) => {\n axios\n .get(`/finance/page-setups/merchants/${merchantId}/shops`)\n .then(response => resolve(response))\n .catch(error => reject(error))\n })\n },\n getSettlementPdf(ctx, params) {\n return new Promise((resolve, reject) => {\n axios\n .get(`/finance/settlements/${params.id}/pdf-url`)\n .then(response => resolve(response))\n .catch(error => reject(error))\n })\n },\n fetchSettlements(ctx, queryParams) {\n return new Promise((resolve, reject) => {\n axios\n .get('/finance/settlements', { params: queryParams })\n .then(response => resolve(response))\n .catch(error => reject(error))\n })\n },\n fetchSettlement(ctx, { id }) {\n return new Promise((resolve, reject) => {\n axios\n .get(`/finance/settlements/${id}`)\n .then(response => resolve(response))\n .catch(error => reject(error))\n })\n },\n },\n}\n","import { ref, watch, onUnmounted } from '@vue/composition-api'\nimport store from '@/store'\nimport withdrawalStatus from '@/constants/withdrawal-status'\nimport settlementStoreModule from '@/views/finance/settlements/storeModule'\n\nexport default function useSettlementList() {\n const STORE_MODULE_NAME = 'finance-settlements'\n\n // Register module\n if (!store.hasModule(STORE_MODULE_NAME)) {\n store.registerModule(STORE_MODULE_NAME, settlementStoreModule)\n }\n\n onUnmounted(() => {\n if (store.hasModule(STORE_MODULE_NAME)) {\n store.unregisterModule(STORE_MODULE_NAME)\n }\n })\n\n const tableColumns = [\n { text: 'UID', value: 'settlementCode', sortable: false },\n { text: 'PERIOD', value: 'startDate', sortable: false, align: 'center' },\n { text: 'SHOP', value: 'shopName', sortable: false },\n {\n text: 'CURRENCY', value: 'currencyCode', sortable: false, align: 'center',\n },\n {\n text: 'PROCESSING VOLUME', value: 'processingVolume', sortable: false, align: 'right',\n },\n {\n text: 'COMMISSION EARNED', value: 'commissionEarned', sortable: false, align: 'right',\n },\n {\n text: 'SETTLED AMOUNT', value: 'settledAmount', sortable: false, align: 'right',\n },\n {\n text: 'WITHDRAWAL STATUS', value: 'withdrawalStatusCode', sortable: false, align: 'center',\n },\n {\n text: 'ACTIONS',\n value: 'actions',\n align: 'center',\n sortable: false,\n },\n ]\n\n const searchQuery = ref('')\n\n const shopFilterModel = ref(null)\n const shopFilterItems = ref([])\n\n const statusFilterModel = ref(null)\n const statusFilterItems = ref([])\n\n const aMonthAgo = new Date()\n aMonthAgo.setMonth(aMonthAgo.getMonth() - 1)\n const datesFilter = ref([aMonthAgo.toISOString().substring(0, 10), new Date().toISOString().substring(0, 10)])\n\n const datesRangeSelected = ref([])\n\n const settlementItems = ref([])\n const settlementItemsLength = ref(0)\n\n const loading = ref(false)\n\n const options = ref({\n sortBy: ['createdAt'],\n sortDesc: [true],\n })\n\n const menuDateRangeFilterModel = ref(false)\n const vtoast = ref(null)\n\n // fetch data\n const fetchSettlements = () => {\n loading.value = true\n\n store\n .dispatch(`${STORE_MODULE_NAME}/fetchSettlements`, {\n q: searchQuery.value,\n options: options.value,\n status: statusFilterModel.value,\n shopId: shopFilterModel.value,\n periodType: 'CUSTOM',\n from: datesFilter.value[0],\n to: datesFilter.value[1],\n })\n .then(response => {\n const { records, count } = response.data\n settlementItems.value = records\n settlementItemsLength.value = count\n })\n .catch(error => error).finally(() => {\n loading.value = false\n })\n }\n\n watch([options], () => {\n fetchSettlements()\n })\n\n const applyFilters = () => {\n fetchSettlements()\n }\n\n const resetFilters = () => {\n searchQuery.value = ''\n shopFilterModel.value = null\n statusFilterModel.value = null\n datesFilter.value = [aMonthAgo.toISOString().substring(0, 10), new Date().toISOString().substring(0, 10)]\n datesRangeSelected.value = []\n settlementItemsLength.value = 0\n }\n\n const fetchConfig = () => {\n loading.value = true\n store\n .dispatch(`${STORE_MODULE_NAME}/fetchSettlementListConfig`)\n .then(response => {\n const config = response.data\n shopFilterItems.value = config.shops\n statusFilterItems.value = config.withdrawalStatus\n })\n .catch(error => error).finally(() => {\n loading.value = false\n })\n }\n\n const getSettlementPdf = settlementId => {\n loading.value = true\n console.log('fgdgdfgdfgdfgdfgfd')\n store\n .dispatch(`${STORE_MODULE_NAME}/getSettlementPdf`, { id: settlementId })\n .then(response => {\n console.log(response)\n const pdfUrl = response.data\n window.open(pdfUrl, '_blank')\n })\n .catch(error => {\n vtoast.value.show(error.response.data.errors, 'error')\n\n return error\n })\n .finally(() => {\n loading.value = false\n })\n }\n\n // *===============================================---*\n // *--------- UI ---------------------------------------*\n // *===============================================---*\n const resolveStatusVariant = status => {\n if (status === withdrawalStatus.PENDING) return 'secondary'\n if (status === withdrawalStatus.COMPLETED) return 'success'\n if (status === withdrawalStatus.PROCESSING) return 'default'\n if (status === withdrawalStatus.CANCELLED) return 'error'\n\n return 'primary'\n }\n\n return {\n vtoast,\n settlementItems,\n settlementItemsLength,\n tableColumns,\n searchQuery,\n shopFilterItems,\n shopFilterModel,\n statusFilterItems,\n statusFilterModel,\n datesFilter,\n datesRangeSelected,\n menuDateRangeFilterModel,\n loading,\n options,\n withdrawalStatus,\n applyFilters,\n resetFilters,\n fetchSettlements,\n getSettlementPdf,\n fetchConfig,\n resolveStatusVariant,\n }\n}\n","const DRAFT = 'DRAFT'\nconst PUBLISHED = 'PUBLISHED'\nconst CANCELLED = 'CANCELLED'\n\nexport default {\n DRAFT,\n PUBLISHED,\n CANCELLED,\n}\n","\n\n\n\n\n","import mod from \"-!../../../../node_modules/cache-loader/dist/cjs.js??ref--13-0!../../../../node_modules/@vue/cli-plugin-babel/node_modules/thread-loader/dist/cjs.js!../../../../node_modules/babel-loader/lib/index.js!../../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./SettlementList.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../../node_modules/cache-loader/dist/cjs.js??ref--13-0!../../../../node_modules/@vue/cli-plugin-babel/node_modules/thread-loader/dist/cjs.js!../../../../node_modules/babel-loader/lib/index.js!../../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./SettlementList.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./SettlementList.vue?vue&type=template&id=4a81780c&\"\nimport script from \"./SettlementList.vue?vue&type=script&lang=js&\"\nexport * from \"./SettlementList.vue?vue&type=script&lang=js&\"\nimport style0 from \"./SettlementList.vue?vue&type=style&index=0&id=4a81780c&prod&lang=scss&\"\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\n\n/* vuetify-loader */\nimport installComponents from \"!../../../../node_modules/vuetify-loader/lib/runtime/installComponents.js\"\nimport { VAutocomplete } from 'vuetify/lib/components/VAutocomplete';\nimport { VBtn } from 'vuetify/lib/components/VBtn';\nimport { VCard } from 'vuetify/lib/components/VCard';\nimport { VCardText } from 'vuetify/lib/components/VCard';\nimport { VCardTitle } from 'vuetify/lib/components/VCard';\nimport { VChip } from 'vuetify/lib/components/VChip';\nimport { VCol } from 'vuetify/lib/components/VGrid';\nimport { VDataTable } from 'vuetify/lib/components/VDataTable';\nimport { VDatePicker } from 'vuetify/lib/components/VDatePicker';\nimport { VDivider } from 'vuetify/lib/components/VDivider';\nimport { VIcon } from 'vuetify/lib/components/VIcon';\nimport { VMenu } from 'vuetify/lib/components/VMenu';\nimport { VRow } from 'vuetify/lib/components/VGrid';\nimport { VSelect } from 'vuetify/lib/components/VSelect';\nimport { VTextField } from 'vuetify/lib/components/VTextField';\ninstallComponents(component, {VAutocomplete,VBtn,VCard,VCardText,VCardTitle,VChip,VCol,VDataTable,VDatePicker,VDivider,VIcon,VMenu,VRow,VSelect,VTextField})\n"],"sourceRoot":""}