{"version":3,"sources":["webpack:///./src/views/account/reports/components/DriverPerformance.vue?b713","webpack:///./src/views/account/reports/components/DriverPerformance.vue","webpack:///./src/views/account/reports/components/DriverPerformance.vue?3697"],"names":["_hoisted_1","class","_hoisted_2","_hoisted_3","_hoisted_4","_hoisted_5","_hoisted_6","key","_hoisted_7","render","_ctx","_cache","$props","$setup","$data","$options","_component_PageTitle","_resolveComponent","_component_SearchInput","_component_BaseIcon","_component_FilterPanel","_component_DynamicTable","_openBlock","_createElementBlock","_Fragment","_createElementVNode","_createVNode","title","placeholder","$t","modelValue","searchValue","$event","onClick","showFilterModal","name","filters","onClose","onFetchData","onExpand","_createCommentVNode","tableData","reports","exportData","exportReports","loading","reportType","pagination","tableFields","exportFields","id","width","buttons","edit","delete","export","onSort","clickSort","onMenuEvent","menuEvent","defineComponent","components","SearchInput","defineAsyncComponent","BaseIcon","FilterPanel","PageTitle","DynamicTable","data","sortable","currentSort","sort","sortName","this","model","type","calendarType","selectedReport","methods","event","$store","dispatch","VehiclesActions","FETCH_VEHICLE_TYPES","e","console","log","field","map","el","router","push","query","$route","orderBy","watch","immediate","handler","val","reportName","queries","pageNumber","username","props","String","computed","getters","__exports__"],"mappings":"yIAEMA,EAAa,CAAEC,MAAO,mBACtBC,EAAa,CAAED,MAAO,wBACtBE,EAAa,CAAEF,MAAO,sBACtBG,EAAa,CAAEH,MAAO,4BACtBI,EAAa,CAAEJ,MAAO,UACtBK,EAAa,CAAEC,IAAK,GACpBC,EAAa,CAAEP,MAAO,QAEtB,SAAUQ,EAAOC,EAAUC,EAAYC,EAAYC,EAAYC,EAAWC,GAC9E,IAAMC,EAAuBC,8BAAkB,aACzCC,EAAyBD,8BAAkB,eAC3CE,EAAsBF,8BAAkB,YACxCG,EAAyBH,8BAAkB,eAC3CI,EAA0BJ,8BAAkB,gBAElD,OAAQK,yBAAcC,gCAAoBC,cAAW,KAAM,CACzDC,gCAAoB,MAAOzB,EAAY,CACrCyB,gCAAoB,MAAOvB,EAAY,C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lG,KAErD","file":"js/chunk-2d0c86bf.524c7bfd.js","sourcesContent":["import { resolveComponent as _resolveComponent, createVNode as _createVNode, createElementVNode as _createElementVNode, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, 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 justify-start\" }\nconst _hoisted_4 = { class: \"relative h-42 w-288 me-3\" }\nconst _hoisted_5 = { class: \"w-full\" }\nconst _hoisted_6 = { key: 0 }\nconst _hoisted_7 = { class: \"px-5\" }\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_SearchInput = _resolveComponent(\"SearchInput\")!\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.driverPerformance\" })\n ]),\n _createElementVNode(\"div\", _hoisted_3, [\n _createElementVNode(\"div\", _hoisted_4, [\n _createVNode(_component_SearchInput, {\n placeholder: _ctx.$t('placeholders.username'),\n modelValue: _ctx.searchValue,\n \"onUpdate:modelValue\": _cache[0] || (_cache[0] = ($event: any) => ((_ctx.searchValue) = $event))\n }, null, 8, [\"placeholder\", \"modelValue\"])\n ]),\n _createElementVNode(\"button\", {\n onClick: _cache[1] || (_cache[1] = ($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 (_ctx.showFilterModal)\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_6, [\n _createVNode(_component_FilterPanel, {\n filters: _ctx.filters,\n onClose: _cache[2] || (_cache[2] = ($event: any) => (_ctx.showFilterModal = false)),\n onFetchData: _cache[3] || (_cache[3] = ($event: any) => (_ctx.onExpand($event)))\n }, null, 8, [\"filters\"])\n ]))\n : _createCommentVNode(\"\", true)\n ])\n ]),\n _createElementVNode(\"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 exportFields: [\n { id: 'driverFullName', name: 'Driver', width: '18%' },\n { id: 'coveredDistance', name: 'Covered Distance', width: '18%' },\n { id: 'avgSpeed', name: 'Average Speed', width: '18%' },\n { id: 'totalStops', name: 'Total Stops', width: '18%' },\n ],\n buttons: { edit: true, delete: true, export: true},\n onSort: _cache[4] || (_cache[4] = ($event: any) => (_ctx.clickSort($event))),\n onMenuEvent: _cache[5] || (_cache[5] = ($event: any) => (_ctx.menuEvent($event)))\n }, null, 8, [\"tableData\", \"exportData\", \"loading\", \"reportType\", \"pagination\", \"tableFields\"])\n ])\n ], 64))\n}","\nimport { defineComponent, defineAsyncComponent } from 'vue'\nimport router from '@/router'\nimport { VehiclesActions } from '@/store/modules/vehicles/actions'\n\nexport default defineComponent({\n components: {\n SearchInput: defineAsyncComponent(() => import('@/shared/components/SearchInput.vue')),\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 showFilterModal: false,\n tableFields: [\n { id: 'driverFullName', name: 'Driver', width: '18%', sortable: false, currentSort: false, sort: null, sortName: 'driver_full_name' },\n { id: 'coveredDistance', name: 'Covered Distance', width: '18%', sortable: false, currentSort: false, sort: null, sortName: 'order_status' },\n { id: 'avgSpeed', name: 'Average Speed', width: '18%', sortable: true, currentSort: false, sort: null, sortName: 'orders_count' },\n { id: 'totalStops', name: 'Total Stops', width: '20%', sortable: false, currentSort: false, sort: null }\n ],\n filters: [\n { name: this.$t('filters.createdAt'), model: 'locationDate', type: 'date', calendarType: 'range' }\n ],\n selectedReport: this.reportType,\n searchValue: null as any\n }\n },\n methods: {\n onExpand (event: any): void {\n if (event === 'vehicleTypes') {\n this.$store.dispatch(`vehicles/${[VehiclesActions.FETCH_VEHICLE_TYPES]}`)\n }\n },\n menuEvent (e: any): void {\n console.log(e)\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 },\n watch: {\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 searchValue () {\n const queries = this.$route.query\n queries.pageNumber = '1'\n router.push({ query: { ...queries, username: this.searchValue } })\n }\n },\n props: {\n reportType: {\n type: String\n }\n },\n computed: {\n reports () {\n return this.$store.getters['reports/getPerformanceReports']\n },\n exportReports () {\n return this.$store.getters['reports/getPerformanceExportReports']\n },\n pagination () {\n return this.$store.getters['reports/getPerformancePagination']\n },\n loading () {\n return this.$store.getters['reports/getLoading']\n }\n }\n})\n","import { render } from \"./DriverPerformance.vue?vue&type=template&id=7672350a&ts=true\"\nimport script from \"./DriverPerformance.vue?vue&type=script&lang=ts\"\nexport * from \"./DriverPerformance.vue?vue&type=script&lang=ts\"\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__"],"sourceRoot":""}