{"version":3,"sources":["webpack:///./src/views/finance/settlements/storeModule.js","webpack:///../../../src/components/VSnackbar/VSnackbar.ts","webpack:///./src/views/finance/settlements/SettlementList.vue?dd50","webpack:///./src/constants/withdrawal-status/index.js","webpack:///./src/components/VToast.vue?4f80","webpack:///src/components/VToast.vue","webpack:///./src/components/VToast.vue?3160","webpack:///./src/components/VToast.vue","webpack:///./src/views/finance/settlements/SettlementList.vue?a74a","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":["namespaced","state","getters","mutations","actions","fetchSettlementListConfig","Promise","resolve","reject","axios","get","then","response","catch","error","fetchShopsByMerchantConfig","ctx","merchantId","downloadSettlementPdf","params","id","responseType","headers","Accept","fetchSettlements","queryParams","fetchSettlement","addSettlement","settlementData","post","publishSettlement","url","value","settlementCode","put","unpublishSettlement","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","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","domProps","_s","message","_b","$event","visible","_v","model","callback","$$v","$set","expression","icon","staticRenderFns","setup","messages","mdiCheck","show","mdiCancel","icons","component","VBtn","VIcon","VSnackbar","shopFilterItems","shopFilterModel","statusFilterItems","statusFilterModel","datesFilter","_g","mdiCalendar","dateRangeText","menuDateRangeFilterModel","$refs","menuDateRangeFilter","save","loading","preventDefault","applyFilters","apply","arguments","resetFilters","tableColumns","settlementItems","searchQuery","settlementItemsLength","item","formatDate","createdAt","dateStyle","shop","startDate","endDate","formatCurrency","openingBalance","closingBalance","balanceToBeSettled","resolveStatusVariant","withdrawalStatusCode","mdiDownloadBoxOutline","useSettlementList","STORE_MODULE_NAME","store","hasModule","registerModule","settlementStoreModule","onUnmounted","unregisterModule","sortable","align","aMonthAgo","Date","setMonth","getMonth","toISOString","substring","datesRangeSelected","sortBy","sortDesc","vtoast","dispatch","q","status","shopId","periodType","from","to","records","count","finally","fetchConfig","config","shops","withdrawalStatus","settlementId","URL","createObjectURL","Blob","link","document","createElement","href","fileName","filename","setAttribute","body","appendChild","click","remove","revokeObjectURL","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,gBAEe,QACbA,YAAY,EACZC,MAAO,GACPC,QAAS,GACTC,UAAW,GACXC,QAAS,CACPC,4BACE,OAAO,IAAIC,QAAQ,CAACC,EAASC,KAC3BC,OACGC,IAAI,wCACJC,KAAKC,GAAYL,EAAQK,IACzBC,MAAMC,GAASN,EAAOM,OAG7BC,2BAA2BC,GAAK,WAAEC,IAChC,OAAO,IAAIX,QAAQ,CAACC,EAASC,KAC3BC,OACGC,IAAK,kCAAiCO,WACtCN,KAAKC,GAAYL,EAAQK,IACzBC,MAAMC,GAASN,EAAOM,OAG7BI,sBAAsBF,EAAKG,GACzB,OAAO,IAAIb,QAAQ,CAACC,EAASC,KAC3BC,OACGC,IAAK,w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KAAYC,WAAA,KAASlH,QAAA,KAAMmH,QAAA,KAAMC,OAAA,KAAKC,UAAA,KAAQC,aAAA","file":"js/chunk-0d0c1fa0.fcc0b0fb.js","sourcesContent":["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/page-setups/settlement-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 downloadSettlementPdf(ctx, params) {\n return new Promise((resolve, reject) => {\n axios\n .get(`/finance/settlements/${params.id}/settlement-pdf`, {\n responseType: 'blob',\n headers: {\n 'Content-Type': 'application/pdf',\n Accept: 'application/pdf',\n },\n })\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 addSettlement(ctx, settlementData) {\n // console.log(\"settlementData en store: \" + JSON.stringify(settlementData));\n // TODO: ver por que no funciona el request sin el JSON.stringify\n return new Promise((resolve, reject) => {\n axios\n .post('/finance/settlements', settlementData)\n .then(response => resolve(response))\n .catch(error => reject(error))\n })\n },\n publishSettlement(ctx, settlementData) {\n const url = `/finance/settlements/${settlementData.value.settlementCode}/publish`\n\n return new Promise((resolve, reject) => {\n axios\n .put(url)\n .then(response => resolve(response))\n .catch(error => reject(error))\n })\n },\n unpublishSettlement(ctx, settlementData) {\n const url = `/finance/settlements/${settlementData.value.settlementCode}/unpublish`\n\n return new Promise((resolve, reject) => {\n axios\n .put(url)\n .then(response => resolve(response))\n .catch(error => reject(error))\n })\n },\n },\n}\n","// 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","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=7e945e14&prod&lang=scss&\"","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\"},[_c('span',{domProps:{\"innerHTML\":_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=bf5c1112&\"\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\":\"Dates Range\",\"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,\"search\":_vm.searchQuery,\"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.downloadSettlementPdf(item.id)}}},[_vm._v(_vm._s(item.settlementCode))])])]}},{key:\"item.createdAt\",fn:function(ref){\nvar item = ref.item;\nreturn [_c('div',{staticClass:\"d-flex align-center\"},[_c('span',{staticClass:\"text-capitalize\"},[_vm._v(_vm._s(_vm.formatDate(item.createdAt, { dateStyle: \"short\" })))])])]}},{key:\"item.shop\",fn:function(ref){\nvar item = ref.item;\nreturn [_c('div',{staticClass:\"d-flex align-center\"},[_c('span',{staticClass:\"text-capitalize font-weight-semibold text--primary\"},[_vm._v(_vm._s(item.shop))])])]}},{key:\"item.startDate\",fn:function(ref){\nvar item = ref.item;\nreturn [_c('div',{staticClass:\"d-flex align-center\"},[_c('span',{staticClass:\"text-capitalize\"},[_vm._v(_vm._s(_vm.formatDate(item.startDate, { dateStyle: \"short\" })))])])]}},{key:\"item.endDate\",fn:function(ref){\nvar item = ref.item;\nreturn [_c('div',{staticClass:\"d-flex align-center\"},[_c('span',{staticClass:\"text-capitalize\"},[_vm._v(_vm._s(_vm.formatDate(item.endDate, { dateStyle: \"short\" })))])])]}},{key:\"item.openingBalance\",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.openingBalance)))])])]}},{key:\"item.closingBalance\",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.closingBalance)))])])]}},{key:\"item.balanceToBeSettled\",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.balanceToBeSettled)))])])]}},{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)+\" \")])]}},{key:\"item.actions\",fn:function(ref){\nvar item = ref.item;\nreturn [_c('v-icon',{on:{\"click\":function($event){return _vm.downloadSettlementPdf(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 { 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: 'CREATED ON', value: 'createdAt' },\n { text: 'SETTLEMENT TYPE', value: 'settlementTypeCode' },\n { text: 'SHOP', value: 'shopName' },\n { text: 'FROM DATE', value: 'startDate', sortable: false },\n { text: 'TO DATE', value: 'endDate', sortable: false },\n {\n text: 'CURRENCY', value: 'currencyCode', sortable: false, align: 'center',\n },\n {\n text: 'AMOUNT', value: 'balanceToBeSettled', sortable: false, align: 'right',\n },\n {\n text: '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 downloadSettlementPdf = settlementId => {\n loading.value = true\n store\n .dispatch(`${STORE_MODULE_NAME}/downloadSettlementPdf`, { id: settlementId })\n .then(response => {\n const url = window.URL.createObjectURL(new Blob([response.data], { type: 'application/pdf' }))\n const link = document.createElement('a')\n link.href = url\n\n const fileName = response.headers.filename\n\n link.setAttribute('download', fileName)\n document.body.appendChild(link)\n link.click()\n link.remove()\n\n window.URL.revokeObjectURL(url)\n vtoast.value.show([{ message: 'the file has been downloaded', code: '000' }], 'info')\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 applyFilters,\n resetFilters,\n fetchSettlements,\n downloadSettlementPdf,\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=7e945e14&\"\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=7e945e14&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":""}