{"version":3,"sources":["webpack:///./src/views/account/reports/components/ProductivityPerDay.vue?2e0c","webpack:///./src/views/account/reports/components/ProductivityPerDay.vue","webpack:///./src/views/account/reports/components/ProductivityPerDay.vue?c108"],"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","onExpandPanelClick","_createCommentVNode","tableData","reports","exportData","exportReports","loading","reportType","pagination","tableFields","exportFields","id","width","buttons","edit","delete","export","onMenuEvent","menuEvent","onSort","clickSort","onGetReports","$emit","defineComponent","components","SearchInput","defineAsyncComponent","BaseIcon","FilterPanel","PageTitle","DynamicTable","data","sortable","currentSort","sort","sortName","this","model","type","calendarType","dataLoading","fetchDataOnExpand","dataRequested","actionName","selectedReport","methods","eventName","$store","dispatch","OrderActions","FETCH_ORDER_STATUSES","VehiclesActions","FETCH_VEHICLE_TYPES","e","console","log","field","map","el","router","push","query","$route","orderBy","watch","val","queries","pageNumber","username","vehicleTypes","immediate","handler","length","target","orderId","reportName","statuses","filterItems","label","value","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,E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AAGqB,UAGRN,EAASrC,KAAKvC,QAAQ,GAC5B4E,EAAO/B,eAAgB,EACvB+B,EAAO1C,KAAO8C,EACdJ,EAAOjC,aAAc,KAGzBwC,MAAO,CACLzE,WAAY,CACV+B,KAAM2C,SAGVC,SAAU,CACRb,aADQ,WAEN,OAAOjC,KAAKW,OAAOoC,QAAQ,4BACxB1B,KAAI,SAACC,GACJ,MAAO,CACL/C,GAAI+C,EAAG/C,GACPmE,MAAOpB,EAAGqB,WAIlB5E,QAVQ,WAWN,OAAOiC,KAAKW,OAAOoC,QAAQ,sCAE7B9E,cAbQ,WAcN,OAAO+B,KAAKW,OAAOoC,QAAQ,4CAE7B3E,WAhBQ,WAiBN,OAAO4B,KAAKW,OAAOoC,QAAQ,yCAE7B7E,QAnBQ,WAoBN,OAAO8B,KAAKW,OAAOoC,QAAQ,uBAE7BP,SAtBQ,WAuBN,OAAOxC,KAAKW,OAAOoC,QAAQ,+B,qBCnKjC,MAAMC,EAA2B,IAAgB,EAAQ,CAAC,CAAC,SAASlH,KAErD","file":"js/chunk-2d0a34f9.a9b3966e.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.productivityDayTitle\" })\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.onExpandPanelClick($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: 'date', name: 'Created Date', width: '18%' },\n { id: 'driverId', name: 'Driver Id', width: '18%' },\n { id: 'username', name: 'Driver username', width: '18%' },\n { id: 'driverFullName', name: 'Driver Full Name', width: '18%' },\n { id: 'ordersCount', name: 'Orders Count', width: '18%' },\n { id: 'orderStatus', name: 'Order Status', width: '18%' },\n { id: 'orderStatusId', name: 'Orders Status Id', width: '18%' },\n { id: 'trackingId', name: 'Tracking Id', width: '18%' },\n ],\n buttons: { edit: true, delete: true, export: true},\n onMenuEvent: _cache[4] || (_cache[4] = ($event: any) => (_ctx.menuEvent($event))),\n onSort: _cache[5] || (_cache[5] = ($event: any) => (_ctx.clickSort($event))),\n onGetReports: _cache[6] || (_cache[6] = ($event: any) => (_ctx.$emit('getReports', $event)))\n }, null, 8, [\"tableData\", \"exportData\", \"loading\", \"reportType\", \"pagination\", \"tableFields\"])\n ])\n ], 64))\n}","\nimport { defineAsyncComponent, defineComponent } from 'vue'\nimport router from '@/router'\nimport { OrderActions } from '@/store/modules/orders/actions'\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 tableFields: [\n { id: 'date', name: 'Created Date', width: '8%', sortable: true, currentSort: false, sort: null, sortName: 'order_created_at' },\n { id: 'username', name: 'Driver username', width: '16%', sortable: false, currentSort: false, sort: null, sortName: 'username' },\n { id: 'driverFullName', name: 'Driver full name', width: '16%', sortable: false, currentSort: false, sort: null, sortName: 'driver_full_name' },\n { id: 'driverId', name: 'Driver Id', width: '12%', sortable: false, currentSort: false, sort: null, sortName: 'driver_id' },\n { id: 'orderStatus', name: 'Order Status', width: '16%', sortable: false, currentSort: false, sort: null, sortName: 'order_status' },\n // { id: 'orderStatusId', name: 'Order Status Id', width: '12%', sortable: true, currentSort: false, sort: null, sortName: 'order_status_id' },\n { id: 'ordersCount', name: 'Orders Count', width: '14%', sortable: true, currentSort: false, sort: null, sortName: 'orders_count' },\n { id: 'trackingId', name: 'Tracking Id', width: '14%', sortable: false, currentSort: false, sort: null, sortName: 'tracking_id' }\n ],\n showFilterModal: false,\n filters: [\n { name: this.$t('filters.date'), model: 'productivityDate', type: 'date', calendarType: 'datepicker' },\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 { name: this.$t('filters.ordersCount'), model: 'ordersCount', type: 'number' },\n {\n name: this.$t('filters.vehicleType'),\n model: 'vehicleTypeId',\n dataLoading: true,\n fetchDataOnExpand: true,\n dataRequested: false,\n actionName: 'vehicleTypes',\n type: 'radio',\n data: []\n },\n { name: this.$t('filters.trackingId'), model: 'trackingId', type: 'number' }\n ],\n searchValue: null as any,\n selectedReport: this.reportType\n }\n },\n methods: {\n onExpandPanelClick (eventName: string): void {\n if (eventName === 'orderStatus') {\n this.$store.dispatch(`orders/${OrderActions.FETCH_ORDER_STATUSES}`)\n }\n if (eventName === '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 searchValue (val) {\n const queries = this.$route.query\n queries.pageNumber = '1'\n router.push({ query: { ...queries, username: this.searchValue } })\n },\n vehicleTypes: {\n immediate: true,\n handler (val) {\n if (!val.length) return\n const target = this.filters[3]\n target.dataRequested = true\n target.data = val\n target.dataLoading = false\n }\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 if (val.query.orderId) {\n this.searchValue = val.query.orderId\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[1]\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 vehicleTypes (): any[] {\n return this.$store.getters['vehicles/getVehicleTypes']\n .map((el: any) => {\n return {\n id: el.id,\n label: el.value\n }\n })\n },\n reports () {\n return this.$store.getters['reports/getProductivityDayReports']\n },\n exportReports () {\n return this.$store.getters['reports/getProductivityDayExportReports']\n },\n pagination () {\n return this.$store.getters['reports/getProductivityDayPagination']\n },\n loading () {\n return this.$store.getters['reports/getLoading']\n },\n statuses (): any {\n return this.$store.getters['orders/getOrderStatuses']\n }\n }\n})\n","import { render } from \"./ProductivityPerDay.vue?vue&type=template&id=0e3b6506&ts=true\"\nimport script from \"./ProductivityPerDay.vue?vue&type=script&lang=ts\"\nexport * from \"./ProductivityPerDay.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":""}