{"version":3,"sources":["webpack:///./src/views/account/reports/components/DriverRevenueReport.vue?8ac3","webpack:///./src/views/account/reports/components/DriverRevenueReport.vue","webpack:///./src/views/account/reports/components/DriverRevenueReport.vue?15c9","webpack:///./src/views/account/reports/components/DriverRevenueReport.vue?d277","webpack:///./node_modules/core-js/modules/es.array.find-index.js"],"names":["_hoisted_1","class","_hoisted_2","_hoisted_3","_hoisted_4","_hoisted_5","_hoisted_6","key","_hoisted_7","_hoisted_8","_hoisted_9","render","_ctx","_cache","$props","$setup","$data","$options","_component_PageTitle","_resolveComponent","_component_Multiselect","_component_BaseIcon","_component_FilterPanel","_component_DynamicTable","_openBlock","_createElementBlock","_Fragment","_createElementVNode","_createVNode","title","modelValue","selectedDriver","$event","options","drivers","label","valueProp","object","loading","driverLoading","noOptionsText","placeholder","$t","canClear","searchable","driverSearchable","onSearchChange","handleSearch","onOpen","onClose","onClick","showFilterModal","name","_createCommentVNode","filters","onFetchData","onExpandPanelClick","tableData","reports","exportData","exportReports","reportType","pagination","tableFields","scrollable","exportFields","id","onSort","clickSort","buttons","edit","delete","export","onMenuEvent","menuEvent","onGetReports","$emit","onNavigateToLink","onRedirectToOrder","_toDisplayString","defineComponent","components","Multiselect","BaseIcon","defineAsyncComponent","FilterPanel","PageTitle","DynamicTable","data","width","sortable","currentSort","sort","sortName","type","this","model","calendarType","dataLoading","fetchDataOnExpand","dataRequested","actionName","undefined","selectedReport","debounce","searchText","length","$store","dispatch","DriverActions","FETCH_DRIVERS_AUTOCOMPLETE","pageNumber","pageSize","search","methods","e","console","log","eventName","OrderActions","FETCH_ORDER_STATUSES","field","map","el","router","push","query","$route","orderBy","item","path","orderId","watch","val","queries","driverId","immediate","handler","reportName","statuses","filterItems","value","target","props","String","computed","getters","driver","userName","hasSelected","findIndex","d","__exports__","$","$findIndex","addToUnscopables","FIND_INDEX","SKIPS_HOLES","Array","proto","forced","callbackfn","arguments"],"mappings":"yIAEMA,EAAa,CAAEC,MAAO,mBACtBC,EAAa,C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KAAMkD,SAGVC,SAAU,CACRvF,QADQ,WAEN,OAAOqC,KAAKY,OAAOuC,QAAQ,qCAE7BtF,cAJQ,WAKN,OAAOmC,KAAKY,OAAOuC,QAAQ,2CAE7BpF,WAPQ,WAQN,OAAOiC,KAAKY,OAAOuC,QAAQ,wCAE7B5G,QAVQ,WAWN,OAAOyD,KAAKY,OAAOuC,QAAQ,uBAE7BhH,QAbQ,WAaD,WACCA,EAAU6D,KAAKY,OAAOuC,QAAQ,kCACjCxB,KAAI,SAACyB,GAAD,MAAkB,CAAE/F,KAAM+F,EAAOC,SAAUlF,GAAIiF,EAAOZ,aAC7D,GAAIxC,KAAKhE,eAAgB,CACvB,IAAMsH,EAAcnH,EAAQoH,WAAU,SAACC,GAAD,OAAWA,EAAErF,KAAO,EAAKnC,eAAemC,MAC9E,OAAOmF,GAAe,EAAInH,EAAnB,CAA8B6D,KAAKhE,gBAAnC,sBAAsDG,IAE/D,OAAOA,GAETK,cAtBQ,WAuBN,OAAOwD,KAAKY,OAAOuC,QAAQ,uBAE7BP,SAzBQ,WA0BN,OAAO5C,KAAKY,OAAOuC,QAAQ,+B,iCCjLjC,MAAMM,EAA2B,IAAgB,EAAQ,CAAC,CAAC,SAAS7I,KAErD,gB,oCCTf,W,2DCCA,IAAI8I,EAAI,EAAQ,QACZC,EAAa,EAAQ,QAAgCJ,UACrDK,EAAmB,EAAQ,QAE3BC,EAAa,YACbC,GAAc,EAGdD,IAAc,IAAIE,MAAM,GAAGF,IAAY,WAAcC,GAAc,KAIvEJ,EAAE,CAAEX,OAAQ,QAASiB,OAAO,EAAMC,OAAQH,GAAe,CACvDP,UAAW,SAAmBW,GAC5B,OAAOP,EAAW3D,KAAMkE,EAAYC,UAAUxD,OAAS,EAAIwD,UAAU,QAAK5D,MAK9EqD,EAAiBC","file":"js/chunk-32ac52db.09b1171b.js","sourcesContent":["import { resolveComponent as _resolveComponent, createVNode as _createVNode, createElementVNode as _createElementVNode, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, toDisplayString as _toDisplayString, Fragment as _Fragment } from \"vue\"\n\nconst _hoisted_1 = { class: \"pt-14 pb-5 px-5\" }\nconst _hoisted_2 = { class: \"flex justify-between\" }\nconst _hoisted_3 = { class: \"flex pb-4\" }\nconst _hoisted_4 = { class: \"relative h-42 w-288 me-3 driverInput\" }\nconst _hoisted_5 = { class: \"w-full\" }\nconst _hoisted_6 = { key: 1 }\nconst _hoisted_7 = {\n key: 0,\n class: \"px-5\"\n}\nconst _hoisted_8 = {\n key: 1,\n class: \"flex items-center justify-center p-10\"\n}\nconst _hoisted_9 = { class: \"text-xl font-bold text-black\" }\n\nexport function render(_ctx: any,_cache: any,$props: any,$setup: any,$data: any,$options: any) {\n const _component_PageTitle = _resolveComponent(\"PageTitle\")!\n const _component_Multiselect = _resolveComponent(\"Multiselect\")!\n const _component_BaseIcon = _resolveComponent(\"BaseIcon\")!\n const _component_FilterPanel = _resolveComponent(\"FilterPanel\")!\n const _component_DynamicTable = _resolveComponent(\"DynamicTable\")!\n\n return (_openBlock(), _createElementBlock(_Fragment, null, [\n _createElementVNode(\"div\", _hoisted_1, [\n _createElementVNode(\"div\", _hoisted_2, [\n _createVNode(_component_PageTitle, { title: \"reports.driverRevenue.title\" })\n ]),\n _createElementVNode(\"div\", _hoisted_3, [\n _createElementVNode(\"div\", _hoisted_4, [\n _createVNode(_component_Multiselect, {\n modelValue: _ctx.selectedDriver,\n \"onUpdate:modelValue\": _cache[0] || (_cache[0] = ($event: any) => ((_ctx.selectedDriver) = $event)),\n options: _ctx.drivers,\n label: \"name\",\n valueProp: \"id\",\n object: \"true\",\n loading: _ctx.driverLoading,\n noOptionsText: '',\n placeholder: _ctx.$t('placeholders.driversSearch'),\n canClear: false,\n searchable: _ctx.driverSearchable,\n onSearchChange: _ctx.handleSearch ,\n onOpen: _cache[1] || (_cache[1] = () => _ctx.driverSearchable = true),\n onClose: _cache[2] || (_cache[2] = () => _ctx.driverSearchable = false)\n }, null, 8, [\"modelValue\", \"options\", \"loading\", \"placeholder\", \"searchable\", \"onSearchChange\"])\n ]),\n (_ctx.selectedDriver)\n ? (_openBlock(), _createElementBlock(\"button\", {\n key: 0,\n onClick: _cache[3] || (_cache[3] = ($event: any) => (_ctx.showFilterModal = true)),\n class: \"border border-inputBorder w-42 h-42\"\n }, [\n _createElementVNode(\"span\", _hoisted_5, [\n _createVNode(_component_BaseIcon, { name: \"filter\" })\n ])\n ]))\n : _createCommentVNode(\"\", true),\n (_ctx.showFilterModal)\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_6, [\n _createVNode(_component_FilterPanel, {\n filters: _ctx.filters,\n onClose: _cache[4] || (_cache[4] = ($event: any) => (_ctx.showFilterModal = false)),\n onFetchData: _cache[5] || (_cache[5] = ($event: any) => (_ctx.onExpandPanelClick($event)))\n }, null, 8, [\"filters\"])\n ]))\n : _createCommentVNode(\"\", true)\n ])\n ]),\n (_ctx.selectedDriver)\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_7, [\n _createVNode(_component_DynamicTable, {\n tableData: _ctx.reports,\n exportData: _ctx.exportReports,\n loading: _ctx.loading,\n reportType: _ctx.reportType,\n pagination: _ctx.pagination,\n tableFields: _ctx.tableFields,\n scrollable: true,\n exportFields: [\n { id: 'orderId', name: 'Order Id' },\n { id: 'orderStatus', name: 'Order Status' },\n { id: 'orderCreatedAt', name: 'Order Created At' },\n { id: 'orderDeliveredAt', name: 'Order Delivered At' },\n { id: 'orderTotal', name: 'Order Total' },\n { id: 'username', name: 'Driver' },\n { id: 'driverFullName', name: 'Driver Full Name' },\n { id: 'customerPhoneNumber', name: 'Customer Phone Number' },\n { id: 'addressAddressLine1', name: 'Customer Address' },\n { id: 'addressBuilding', name: 'Customer Address Building' },\n { id: 'addressDistrict', name: 'Customer Address District' },\n { id: 'addressFlat', name: 'Customer Address Flat' },\n { id: 'addressFloor', name: 'Customer Address Floor' },\n { id: 'addressPhone', name: 'Customer Address Phone' },\n { id: 'settlementDate', name: 'Settlement Date' },\n { id: 'settlementNo', name: 'Settlement No (Smart ID)' },\n { id: 'settlementStatus', name: 'Settlement Status' },\n { id: 'adminUsername', name: 'Admin' },\n ],\n onSort: _cache[6] || (_cache[6] = ($event: any) => (_ctx.clickSort($event))),\n buttons: { edit: true, delete: true, export: true},\n onMenuEvent: _cache[7] || (_cache[7] = ($event: any) => (_ctx.menuEvent($event))),\n onGetReports: _cache[8] || (_cache[8] = ($event: any) => (_ctx.$emit('getReports', $event))),\n onNavigateToLink: _cache[9] || (_cache[9] = ($event: any) => (_ctx.onRedirectToOrder($event)))\n }, null, 8, [\"tableData\", \"exportData\", \"loading\", \"reportType\", \"pagination\", \"tableFields\", \"exportFields\"])\n ]))\n : (_openBlock(), _createElementBlock(\"div\", _hoisted_8, [\n _createElementVNode(\"span\", _hoisted_9, _toDisplayString(_ctx.$t('reports.driverRevenue.selectDriverMessage')), 1)\n ]))\n ], 64))\n}","\nimport { defineAsyncComponent, defineComponent } from 'vue'\nimport router from '@/router'\nimport { DriverActions } from '@/store/modules/drivers/actions'\nimport { Driver } from '@/shared/interfaces/driver.interface'\nimport { debounce } from 'lodash'\nimport { DriverRevenueInterface } from '@/shared/interfaces/reports/driver-revenue.interface'\nimport { OrderActions } from '@/store/modules/orders/actions'\nimport Multiselect from '@vueform/multiselect'\n\nexport default defineComponent({\n components: {\n Multiselect,\n BaseIcon: defineAsyncComponent(() => import('@/shared/components/base-icon/BaseIcon.vue')),\n FilterPanel: defineAsyncComponent(() => import('@/shared/components/filter/FilterPanel.vue')),\n PageTitle: defineAsyncComponent(() => import('@/shared/components/PageTitle.vue')),\n DynamicTable: defineAsyncComponent(() => import('@/shared/components/dynamic-table/DynamicTable.vue'))\n },\n data () {\n return {\n selectedDriver: null as any,\n showFilterModal: false,\n tableFields: [\n { id: 'orderId', name: 'Order Id', width: '15%', sortable: false, currentSort: false, sort: null, sortName: 'order_id', type: 'link' },\n { id: 'orderStatus', name: 'Order Status', width: '15%', sortable: false, currentSort: false, sort: null },\n { id: 'orderCreatedAt', name: 'Order Created At', width: '15%', sortable: false, currentSort: false, sort: null },\n { id: 'orderDeliveredAt', name: 'Order Delivered At', width: '15%', sortable: false, currentSort: false, sort: null },\n { id: 'orderTotal', name: 'Order Total', width: '15%', sortable: false, currentSort: false, sort: null },\n { id: 'username', name: 'Driver', width: '15%', sortable: false, currentSort: false, sort: null },\n { id: 'driverFullName', name: 'Driver Full Name', width: '15%', sortable: false, currentSort: false, sort: null },\n { id: 'customerPhoneNumber', name: 'Customer Phone Number', width: '15%', sortable: false, currentSort: false, sort: null },\n { id: 'addressAddressLine1', name: 'Customer Address', width: '15%', sortable: false, currentSort: false, sort: null },\n { id: 'addressBuilding', name: 'Customer Address Building', width: '15%', sortable: false, currentSort: false, sort: null },\n { id: 'addressDistrict', name: 'Customer Address District', width: '15%', sortable: false, currentSort: false, sort: null },\n { id: 'addressFlat', name: 'Customer Address Flat', width: '15%', sortable: false, currentSort: false, sort: null },\n { id: 'addressFloor', name: 'Customer Address Floor', width: '15%', sortable: false, currentSort: false, sort: null },\n { id: 'addressPhone', name: 'Customer Address Phone', width: '15%', sortable: false, currentSort: false, sort: null },\n { id: 'settlementDate', name: 'Settlement Date', width: '15%', sortable: false, currentSort: false, sort: null },\n { id: 'settlementNo', name: 'Settlement No (Smart ID)', width: '15%', sortable: false, currentSort: false, sort: null },\n { id: 'settlementStatus', name: 'Settlement Status', width: '15%', sortable: false, currentSort: false, sort: null },\n { id: 'adminUsername', name: 'Admin', width: '15%', sortable: false, currentSort: false, sort: null }\n ],\n filters: [\n { name: this.$t('filters.date'), model: 'orderCreatedAt', type: 'date', calendarType: 'range' },\n { name: this.$t('filters.orderId'), model: 'orderIds', type: 'text' },\n {\n name: this.$t('filters.orderStatus'),\n model: 'status',\n dataLoading: true,\n fetchDataOnExpand: true,\n dataRequested: false,\n actionName: 'orderStatus',\n type: 'radio',\n data: []\n },\n {\n name: this.$t('filters.settlementStatus'),\n model: 'settlementStatus',\n type: 'radio',\n data: [\n { id: undefined, label: this.$t('filters.all') },\n { id: 'init', label: this.$t('orders.settlementStatus.init') },\n { id: 'requested', label: this.$t('orders.settlementStatus.requested') },\n { id: 'approved', label: this.$t('orders.settlementStatus.approved') },\n { id: 'rejected', label: this.$t('orders.settlementStatus.rejected') }\n ]\n }\n ],\n selectedReport: this.reportType,\n handleSearch: debounce((searchText: string) => {\n if (!searchText.length) return\n this.$store.dispatch(`drivers/${DriverActions.FETCH_DRIVERS_AUTOCOMPLETE}`,\n {\n pageNumber: 1,\n pageSize: 1000, // we need to get all the data\n search: searchText\n }\n )\n }, 1000),\n driverSearchable: false\n }\n },\n methods: {\n menuEvent (e: any): void {\n console.log(e)\n },\n onExpandPanelClick (eventName: string): void {\n if (eventName === 'orderStatus') {\n this.$store.dispatch(`orders/${OrderActions.FETCH_ORDER_STATUSES}`)\n }\n },\n clickSort (field: any): void {\n this.tableFields = this.tableFields?.map((el: any) => {\n if (el.id === field.id) {\n el.currentSort = true\n if (el.sort === null) {\n el.sort = 'asc'\n } else if (el.sort === 'asc') {\n el.sort = 'desc'\n } else if (el.sort === 'desc') {\n el.sort = null\n }\n } else {\n el.currentSort = false\n el.sort = null\n }\n return el\n })\n router.push({ query: { ...this.$route.query, orderBy: field.sortName, sort: field.sort } })\n },\n onRedirectToOrder (item: any): void {\n router.push({ path: '/orders/all', query: { id: item.orderId } })\n }\n },\n watch: {\n selectedDriver (val) {\n const queries = this.$route.query\n queries.pageNumber = '1'\n router.push({ query: { ...queries, driverId: this.selectedDriver.id } })\n },\n $route: {\n immediate: true,\n handler (val: any) {\n if (val.query.orderBy) {\n this.tableFields = this.tableFields.map((el: any) => {\n if (el.id === val.query.orderBy) {\n el.currentSort = true\n el.sort = val.query.sort\n }\n return el\n })\n }\n }\n },\n selectedReport (val) {\n if (val) {\n router.push({ query: { reportName: val.name } })\n }\n },\n statuses (val: any) {\n if (!val.length) return\n const filterItems = val.map((el: any) => {\n return {\n id: el.id,\n label: el.value\n }\n })\n const target = this.filters[2]\n target.dataRequested = true\n target.data = filterItems\n target.dataLoading = false\n }\n },\n props: {\n reportType: {\n type: String\n }\n },\n computed: {\n reports (): DriverRevenueInterface[] {\n return this.$store.getters['reports/getDriversRevenueReports']\n },\n exportReports () {\n return this.$store.getters['reports/getDriversRevenueExportReports']\n },\n pagination () {\n return this.$store.getters['reports/getDriversRevenuePagination']\n },\n loading (): boolean {\n return this.$store.getters['reports/getLoading']\n },\n drivers (): Driver[] {\n const drivers = this.$store.getters['drivers/getDriversAutocomplete']\n .map((driver: any) => ({ name: driver.userName, id: driver.driverId }))\n if (this.selectedDriver) {\n const hasSelected = drivers.findIndex((d:any) => d.id === this.selectedDriver.id)\n return hasSelected > -1 ? drivers : [this.selectedDriver, ...drivers]\n }\n return drivers\n },\n driverLoading (): boolean {\n return this.$store.getters['drivers/getLoading']\n },\n statuses (): any {\n return this.$store.getters['orders/getOrderStatuses']\n }\n }\n})\n","import { render } from \"./DriverRevenueReport.vue?vue&type=template&id=8c30e87c&ts=true\"\nimport script from \"./DriverRevenueReport.vue?vue&type=script&lang=ts\"\nexport * from \"./DriverRevenueReport.vue?vue&type=script&lang=ts\"\n\nimport \"./DriverRevenueReport.vue?vue&type=style&index=0&id=8c30e87c&lang=scss\"\n\nimport exportComponent from \"/usr/src/app/node_modules/vue-loader-v16/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['render',render]])\n\nexport default __exports__","export * from \"-!../../../../../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-v16/dist/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-v16/dist/index.js??ref--1-1!./DriverRevenueReport.vue?vue&type=style&index=0&id=8c30e87c&lang=scss\"","'use strict';\nvar $ = require('../internals/export');\nvar $findIndex = require('../internals/array-iteration').findIndex;\nvar addToUnscopables = require('../internals/add-to-unscopables');\n\nvar FIND_INDEX = 'findIndex';\nvar SKIPS_HOLES = true;\n\n// Shouldn't skip holes\nif (FIND_INDEX in []) Array(1)[FIND_INDEX](function () { SKIPS_HOLES = false; });\n\n// `Array.prototype.findIndex` method\n// https://tc39.es/ecma262/#sec-array.prototype.findindex\n$({ target: 'Array', proto: true, forced: SKIPS_HOLES }, {\n findIndex: function findIndex(callbackfn /* , that = undefined */) {\n return $findIndex(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);\n }\n});\n\n// https://tc39.es/ecma262/#sec-array.prototype-@@unscopables\naddToUnscopables(FIND_INDEX);\n"],"sourceRoot":""}