{"version":3,"sources":["webpack:///./src/views/account/vehicles/Vehicles.vue?b693","webpack:///./src/views/account/vehicles/Vehicles.vue","webpack:///./src/views/account/vehicles/Vehicles.vue?9252","webpack:///./src/views/account/vehicles/Vehicles.vue?2e55"],"names":["_withScopeId","n","_pushScopeId","_popScopeId","_hoisted_1","class","_hoisted_2","_hoisted_3","_hoisted_4","_hoisted_5","_hoisted_6","_hoisted_7","key","_hoisted_8","style","_hoisted_9","_hoisted_10","_hoisted_11","_hoisted_12","_hoisted_13","_hoisted_14","_hoisted_15","_hoisted_16","_createElementVNode","_hoisted_17","_hoisted_18","_hoisted_19","_hoisted_20","_hoisted_21","_hoisted_22","_hoisted_23","_hoisted_24","_hoisted_25","_hoisted_26","_hoisted_27","_hoisted_28","render","_ctx","_cache","$props","$setup","$data","$options","_component_PageTitle","_resolveComponent","_component_SearchInput","_component_BaseIcon","_component_FilterPanel","_component_TableGhost","_component_Pagination","_component_EditVehicle","_component_BaseModal","_component_AssignVehicle","_openBlock","_createElementBlock","_Fragment","_createVNode","title","placeholder","$t","modelValue","searchValue","$event","onClick","showFilterModal","name","filters","onClose","onFetchData","onExpandPanel","_createCommentVNode","addVehicle","classNames","_createTextVNode","_toDisplayString","_normalizeStyle","height","loading","_renderList","vehicles","vehicle","id","model","make","licenseNo","vehicleType","value","ref_for","ref","checked","isActivated","toggleActivate","type","owner","driverInfo","length","driver","createDriverFullName","unassignDriver","_withModifiers","assignToDriver","editVehicle","deleteVehicle","_createBlock","row","col","pagination","totalItems","current","total","pageSize","onPageChanged","showModal","isEdit","width","default","_withCtx","onFetchVehicles","getVehicles","$route","editedVehicle","_","showAssignModal","selectedVehicle","driverIds","defineComponent","components","SearchInput","defineAsyncComponent","FilterPanel","TableGhost","AssignVehicle","Pagination","BaseModal","PageTitle","BaseIcon","EditVehicle","data","isFree","this","label","dataLoading","fetchDataOnExpand","dataRequested","actionName","mounted","document","documentElement","clientHeight","addEventListener","computed","$store","getters","workShifts","map","el","vehicleTypes","watch","val","router","push","query","pageNumber","queries","search","immediate","handler","target","Number","methods","route","params","dispatch","VehiclesActions","FETCH_VEHICLES","DELETE_VEHICLE","vehicleId","then","toast","useToast","success","timeout","ACTIVATE_VEHICLE","catch","inputRef","$refs","DEACTIVATE_VEHICLE","driverId","payload","DriverActions","UNASSIGN_VEHICLE","WorkShiftActions","FETCH_WORK_SHIFTS","FETCH_VEHICLE_TYPES","__exports__"],"mappings":"mJAEMA,EAAe,SAAAC,GAAC,OAAKC,yBAAa,mBAAmBD,EAAEA,IAAIE,0BAAcF,GACzEG,EAAa,CAAEC,MAAO,mBACtBC,EAAa,CAAED,MAAO,6BACtBE,EAAa,CAAEF,MAAO,sBACtBG,EAAa,CAAEH,MAAO,wBACtBI,EAAa,CAAEJ,MAAO,4BACtBK,EAAa,CAAEL,MAAO,UACtBM,EAAa,CAAEC,IAAK,GACpBC,EAAa,CACjBR,MAAO,4BACPS,MAAO,CAAC,MAAQ,QAEZC,EAAa,CACjBV,MAAO,4BACPS,MAAO,CAAC,MAAQ,QAEZE,EAAc,CAClBX,MAAO,4BACPS,MAAO,CAAC,MAAQ,QAEZG,EAAc,CAClBZ,MAAO,4BACPS,MAAO,CAAC,MAAQ,QAEZI,EAAc,CAClBb,MAAO,4BACPS,MAAO,CAAC,MAAQ,QAEZK,EAAc,CAClBd,MAAO,4BACPS,MAAO,CAAC,MAAQ,QAEZM,EAAc,CAClBf,MAAO,4BACPS,MAAO,CAAC,MAAQ,OAEZO,EAAc,CAClBhB,MAAO,4BACPS,MAAO,CAAC,MAAQ,QAEZQ,EAA4BtB,GAAa,kBAAmBuB,gCAAoB,KAAM,CAC1FlB,MAAO,4BACPS,MAAO,CAAC,MAAQ,QACf,MAAO,MACJU,EAAc,CAAEZ,IAAK,GACrBa,EAAc,CAAEpB,MAAO,UACvBqB,EAAc,CAAC,UAAW,WAC1BC,EAA4B3B,GAAa,kBAAmBuB,gCAAoB,OAAQ,CAAElB,MAAO,UAAY,MAAO,MACpHuB,EAAc,C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Z,mBAAiCC,OAAgBa,oBAAsB,CAAEV,UAAW/F,IAAMsG,OAAM,WAC9F,IAAMC,EAAW,EAAKC,MAAM,kBAAoBxG,GAChDuG,EAAS/F,SAAU,MAIzBS,eA/CO,SA+CS8E,EAAmBW,GAAgB,WAC3CC,EAAU,CACdZ,YACAW,YAEFhD,KAAKY,OAAOqB,SAAZ,kBAAgC,CAACiB,OAAcC,mBAAqBF,GAASX,MAAK,WAChF,EAAK3D,YAAY,EAAKC,YAG1BlD,cAxDO,SAwDQ2E,GACM,WAAfA,EACFL,KAAKY,OAAOqB,SAAZ,qBAAmCmB,OAAiBC,mBAAqB,CAAE9B,WAAY,EAAGpD,SAAU,MAC5E,iBAAfkC,GACTL,KAAKY,OAAOqB,SAAZ,mBAAiC,CAACC,OAAgBoB,2B,iCCrN1D,MAAMC,EAA2B,IAAgB,EAAQ,CAAC,CAAC,SAAS9J,GAAQ,CAAC,YAAY,qBAE1E,gB,2DCTf","file":"js/chunk-d6f5385e.044aff40.js","sourcesContent":["import { resolveComponent as _resolveComponent, createVNode as _createVNode, createElementVNode as _createElementVNode, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, toDisplayString as _toDisplayString, createTextVNode as _createTextVNode, renderList as _renderList, Fragment as _Fragment, withModifiers as _withModifiers, createBlock as _createBlock, normalizeStyle as _normalizeStyle, withCtx as _withCtx, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-71e77f7a\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = { class: \"pt-14 pb-5 px-5\" }\nconst _hoisted_2 = { class: \"flex justify-between mb-7\" }\nconst _hoisted_3 = { class: \"flex justify-start\" }\nconst _hoisted_4 = { class: \"flex justify-between\" }\nconst _hoisted_5 = { class: \"relative h-42 w-288 me-3\" }\nconst _hoisted_6 = { class: \"w-full\" }\nconst _hoisted_7 = { key: 0 }\nconst _hoisted_8 = {\n class: \"bg-white opacity-100 z-40\",\n style: {\"width\":\"10%\"}\n}\nconst _hoisted_9 = {\n class: \"bg-white opacity-100 z-40\",\n style: {\"width\":\"10%\"}\n}\nconst _hoisted_10 = {\n class: \"bg-white opacity-100 z-40\",\n style: {\"width\":\"10%\"}\n}\nconst _hoisted_11 = {\n class: \"bg-white opacity-100 z-40\",\n style: {\"width\":\"12%\"}\n}\nconst _hoisted_12 = {\n class: \"bg-white opacity-100 z-40\",\n style: {\"width\":\"10%\"}\n}\nconst _hoisted_13 = {\n class: \"bg-white opacity-100 z-40\",\n style: {\"width\":\"10%\"}\n}\nconst _hoisted_14 = {\n class: \"bg-white opacity-100 z-40\",\n style: {\"width\":\"8%\"}\n}\nconst _hoisted_15 = {\n class: \"bg-white opacity-100 z-40\",\n style: {\"width\":\"20%\"}\n}\nconst _hoisted_16 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"th\", {\n class: \"bg-white opacity-100 z-40\",\n style: {\"width\":\"10%\"}\n}, null, -1))\nconst _hoisted_17 = { key: 0 }\nconst _hoisted_18 = { class: \"switch\" }\nconst _hoisted_19 = [\"checked\", \"onClick\"]\nconst _hoisted_20 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"span\", { class: \"slider\" }, null, -1))\nconst _hoisted_21 = { class: \"w-400\" }\nconst _hoisted_22 = {\n key: 0,\n class: \"\"\n}\nconst _hoisted_23 = { class: \"flex justify-start flex-wrap\" }\nconst _hoisted_24 = [\"onClick\"]\nconst _hoisted_25 = { class: \"flex justify-between\" }\nconst _hoisted_26 = [\"onClick\"]\nconst _hoisted_27 = [\"onClick\"]\nconst _hoisted_28 = {\n key: 0,\n class: \"text-center text-darkText text-lg px-4 mt-32 font-bold\"\n}\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_TableGhost = _resolveComponent(\"TableGhost\")!\n const _component_Pagination = _resolveComponent(\"Pagination\")!\n const _component_EditVehicle = _resolveComponent(\"EditVehicle\")!\n const _component_BaseModal = _resolveComponent(\"BaseModal\")!\n const _component_AssignVehicle = _resolveComponent(\"AssignVehicle\")!\n\n return (_openBlock(), _createElementBlock(_Fragment, null, [\n _createElementVNode(\"div\", _hoisted_1, [\n _createVNode(_component_PageTitle, { title: \"vehicles.title\" }),\n _createElementVNode(\"div\", _hoisted_2, [\n _createElementVNode(\"div\", _hoisted_3, [\n _createElementVNode(\"div\", _hoisted_4, [\n _createElementVNode(\"div\", _hoisted_5, [\n _createVNode(_component_SearchInput, {\n placeholder: _ctx.$t('vehicles.search'),\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_6, [\n _createVNode(_component_BaseIcon, { name: \"filter\" })\n ])\n ]),\n (_ctx.showFilterModal)\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_7, [\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.onExpandPanel($event)))\n }, null, 8, [\"filters\"])\n ]))\n : _createCommentVNode(\"\", true)\n ])\n ]),\n _createElementVNode(\"div\", null, [\n _createElementVNode(\"button\", {\n onClick: _cache[4] || (_cache[4] = ($event: any) => (_ctx.addVehicle())),\n class: \"primary flex items-center px-5 py-3\"\n }, [\n _createVNode(_component_BaseIcon, {\n name: \"plus\",\n classNames: \"text-xl me-1\"\n }),\n _createTextVNode(\" \" + _toDisplayString(_ctx.$t('buttons.addVehicle')), 1)\n ])\n ])\n ])\n ]),\n _createElementVNode(\"div\", {\n class: \"px-5 tableFixHead\",\n style: _normalizeStyle({height: _ctx.height + 'px'})\n }, [\n _createElementVNode(\"table\", null, [\n _createElementVNode(\"thead\", null, [\n _createElementVNode(\"tr\", null, [\n _createElementVNode(\"th\", _hoisted_8, _toDisplayString(_ctx.$t('table.vehicleModel')), 1),\n _createElementVNode(\"th\", _hoisted_9, _toDisplayString(_ctx.$t('table.vehicleMake')), 1),\n _createElementVNode(\"th\", _hoisted_10, _toDisplayString(_ctx.$t('table.vehicleName')), 1),\n _createElementVNode(\"th\", _hoisted_11, _toDisplayString(_ctx.$t('table.vehicleNumber')), 1),\n _createElementVNode(\"th\", _hoisted_12, _toDisplayString(_ctx.$t('table.vehicleType')), 1),\n _createElementVNode(\"th\", _hoisted_13, _toDisplayString(_ctx.$t('table.isActive')), 1),\n _createElementVNode(\"th\", _hoisted_14, _toDisplayString(_ctx.$t('table.owner')), 1),\n _createElementVNode(\"th\", _hoisted_15, _toDisplayString(_ctx.$t('table.assignedTo')), 1),\n _hoisted_16\n ])\n ]),\n (!_ctx.loading)\n ? (_openBlock(), _createElementBlock(\"tbody\", _hoisted_17, [\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(_ctx.vehicles, (vehicle) => {\n return (_openBlock(), _createElementBlock(\"tr\", {\n key: vehicle.id\n }, [\n _createElementVNode(\"td\", null, _toDisplayString(vehicle.model), 1),\n _createElementVNode(\"td\", null, _toDisplayString(vehicle.make), 1),\n _createElementVNode(\"td\", null, _toDisplayString(vehicle.name), 1),\n _createElementVNode(\"td\", null, _toDisplayString(vehicle.licenseNo), 1),\n _createElementVNode(\"td\", null, _toDisplayString(vehicle.vehicleType.value), 1),\n _createElementVNode(\"td\", null, [\n _createElementVNode(\"label\", _hoisted_18, [\n _createElementVNode(\"input\", {\n ref_for: true,\n ref: 'activationInput' + vehicle.id,\n checked: vehicle.isActivated,\n onClick: ($event: any) => (_ctx.toggleActivate(vehicle.id, vehicle.isActivated ? 'deactivate' : 'activate')),\n type: \"checkbox\"\n }, null, 8, _hoisted_19),\n _hoisted_20\n ])\n ]),\n _createElementVNode(\"td\", null, _toDisplayString(vehicle.owner), 1),\n _createElementVNode(\"td\", _hoisted_21, [\n (vehicle.driverInfo && vehicle.driverInfo.length)\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_22, [\n _createElementVNode(\"div\", _hoisted_23, [\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(vehicle.driverInfo, (driver) => {\n return (_openBlock(), _createElementBlock(\"span\", {\n key: driver.id,\n class: \"my-1 rounded bg-backgroundPurple me-2 leading-3 flex justify-center items-center h-6 text-xs text-purple px-1.5 py-1 border border-purple\"\n }, [\n _createTextVNode(_toDisplayString(_ctx.createDriverFullName(driver.driverInfo)) + \" \", 1),\n _createVNode(_component_BaseIcon, {\n onClick: ($event: any) => (_ctx.unassignDriver(vehicle.id, driver.id)),\n \"class-names\": \"w-3.5 cursor-pointer text-purple\",\n name: \"purple-close\"\n }, null, 8, [\"onClick\"])\n ]))\n }), 128))\n ])\n ]))\n : (_openBlock(), _createElementBlock(\"button\", {\n key: 1,\n onClick: _withModifiers(($event: any) => (_ctx.assignToDriver(vehicle)), [\"stop\"]),\n class: \"primary py-1.5 px-4\"\n }, _toDisplayString(_ctx.$t('buttons.assignVehicle')), 9, _hoisted_24))\n ]),\n _createElementVNode(\"td\", null, [\n _createElementVNode(\"div\", _hoisted_25, [\n _createElementVNode(\"button\", {\n onClick: ($event: any) => (_ctx.editVehicle(vehicle))\n }, [\n _createVNode(_component_BaseIcon, { name: \"edit\" })\n ], 8, _hoisted_26),\n _createElementVNode(\"button\", {\n onClick: ($event: any) => (_ctx.deleteVehicle(vehicle))\n }, [\n _createVNode(_component_BaseIcon, { name: \"trash\" })\n ], 8, _hoisted_27)\n ])\n ])\n ]))\n }), 128))\n ]))\n : _createCommentVNode(\"\", true),\n (_ctx.loading)\n ? (_openBlock(), _createBlock(_component_TableGhost, {\n key: 1,\n \"col-margin\": \"my-1\",\n row: 10,\n col: 8\n }))\n : _createCommentVNode(\"\", true)\n ]),\n (!_ctx.vehicles.length && !_ctx.loading)\n ? (_openBlock(), _createElementBlock(\"p\", _hoisted_28, _toDisplayString(_ctx.$t('validation.noItemsToShow')), 1))\n : _createCommentVNode(\"\", true)\n ], 4),\n (_ctx.pagination && _ctx.pagination.totalItems)\n ? (_openBlock(), _createBlock(_component_Pagination, {\n key: 0,\n current: _ctx.current,\n \"hide-info-section\": false,\n total: _ctx.pagination.totalItems,\n \"page-range\": 2,\n \"per-page\": _ctx.pagination.pageSize,\n onPageChanged: _cache[5] || (_cache[5] = ($event: any) => (_ctx.current = $event)),\n \"text-before-input\": \"Go to page\"\n }, null, 8, [\"current\", \"total\", \"per-page\"]))\n : _createCommentVNode(\"\", true),\n (_ctx.showModal)\n ? (_openBlock(), _createBlock(_component_BaseModal, {\n key: 1,\n loading: _ctx.loading,\n title: _ctx.isEdit ? _ctx.$t('vehicles.updateVehicle') : _ctx.$t('vehicles.addVehicle'),\n width: '488',\n onClose: _cache[8] || (_cache[8] = ($event: any) => (_ctx.showModal = $event))\n }, {\n default: _withCtx(() => [\n _createVNode(_component_EditVehicle, {\n onClose: _cache[6] || (_cache[6] = ($event: any) => (_ctx.showModal = false)),\n onFetchVehicles: _cache[7] || (_cache[7] = ($event: any) => (_ctx.getVehicles(_ctx.$route))),\n vehicle: _ctx.editedVehicle\n }, null, 8, [\"vehicle\"])\n ]),\n _: 1\n }, 8, [\"loading\", \"title\"]))\n : _createCommentVNode(\"\", true),\n (_ctx.showAssignModal)\n ? (_openBlock(), _createBlock(_component_BaseModal, {\n key: 2,\n title: _ctx.$t('vehicles.assignDriver'),\n width: '488',\n onClose: _cache[11] || (_cache[11] = ($event: any) => (_ctx.showAssignModal = $event))\n }, {\n default: _withCtx(() => [\n _createVNode(_component_AssignVehicle, {\n onClose: _cache[9] || (_cache[9] = ($event: any) => (_ctx.showAssignModal = false)),\n vehicle: _ctx.selectedVehicle,\n driverIds: _ctx.driverIds,\n onFetchVehicles: _cache[10] || (_cache[10] = ($event: any) => (_ctx.getVehicles(_ctx.$route)))\n }, null, 8, [\"vehicle\", \"driverIds\"])\n ]),\n _: 1\n }, 8, [\"title\"]))\n : _createCommentVNode(\"\", true)\n ], 64))\n}","\nimport { defineComponent, defineAsyncComponent } from 'vue'\nimport { PaginationInterface } from '@/shared/interfaces/pagination.interface'\nimport { VehiclesActions } from '@/store/modules/vehicles/actions'\nimport { VehicleInterface } from '@/shared/interfaces/vehicle.interface'\nimport { DriverActions } from '@/store/modules/drivers/actions'\nimport { useToast } from 'vue-toastification'\nimport { WorkShiftActions } from '@/store/modules/work-shifts/actions'\nimport router from '@/router'\n\nexport default defineComponent({\n components: {\n SearchInput: defineAsyncComponent(() => import('@/shared/components/SearchInput.vue')),\n FilterPanel: defineAsyncComponent(() => import('@/shared/components/filter/FilterPanel.vue')),\n TableGhost: defineAsyncComponent(() => import('@/shared/components/ghosts/TableGhost.vue')),\n AssignVehicle: defineAsyncComponent(() => import('@/views/account/vehicles/components/AssignVehicle.vue')),\n Pagination: defineAsyncComponent(() => import('@/shared/components/Pagination.vue')),\n BaseModal: defineAsyncComponent(() => import('@/shared/components/modals/BaseModal.vue')),\n PageTitle: defineAsyncComponent(() => import('@/shared/components/PageTitle.vue')),\n BaseIcon: defineAsyncComponent(() => import('@/shared/components/base-icon/BaseIcon.vue')),\n EditVehicle: defineAsyncComponent(() => import('@/views/account/vehicles/components/EditVehicle.vue'))\n },\n data () {\n return {\n showModal: false,\n showAssignModal: false,\n editedVehicle: {} as VehicleInterface,\n driverIds: null as any,\n selectedVehicle: null as any,\n showFilterModal: false,\n searchValue: null as any,\n current: 1,\n isFree: false,\n isEdit: false,\n value: null,\n height: 400,\n filters: [\n {\n name: this.$t('filters.isActivated'),\n model: 'isActivated',\n type: 'radio',\n data: [\n { id: 1, label: this.$t('filters.yes') },\n { id: 0, label: this.$t('filters.no') }\n ]\n },\n {\n name: this.$t('filters.owner'),\n model: 'owner',\n type: 'radio',\n data: [\n { id: 'driver', label: this.$t('vehicles.vehicleOwners.driver') },\n { id: 'Tasleem', label: this.$t('vehicles.vehicleOwners.tasleem') }\n ]\n },\n {\n name: this.$t('filters.isFree'),\n model: 'isFree',\n type: 'radio',\n data: [\n { id: 1, label: this.$t('filters.yes') },\n { id: 0, label: this.$t('filters.no') }\n ]\n },\n {\n name: this.$t('filters.assignedShift'),\n model: 'shiftId',\n dataLoading: true,\n fetchDataOnExpand: true,\n dataRequested: false,\n actionName: 'shifts',\n type: 'radio',\n data: []\n },\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 ]\n }\n },\n mounted () {\n this.height = document.documentElement.clientHeight - 280\n addEventListener('resize', () => {\n this.height = document.documentElement.clientHeight - 280\n })\n },\n computed: {\n vehicles (): VehicleInterface[] {\n return this.$store.getters['vehicles/getVehicles']\n },\n pagination (): PaginationInterface {\n return this.$store.getters['vehicles/getPagination']\n },\n workShifts (): any[] {\n return this.$store.getters['workShifts/getWorkShiftsForSelect']\n .map((el: any) => {\n return {\n id: el.id,\n label: el.value\n }\n })\n },\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 loading (): boolean {\n return this.$store.getters['vehicles/getLoading']\n }\n },\n watch: {\n current (val) {\n router.push({ query: { ...this.$route.query, pageNumber: val } })\n },\n searchValue (val) {\n const queries = this.$route.query\n queries.pageNumber = '1'\n router.push({ query: { ...queries, search: this.searchValue } })\n },\n workShifts: {\n immediate: true,\n handler (val) {\n if (!val.length) return\n const target = this.filters[3]\n target.data = val\n target.dataLoading = false\n }\n },\n vehicleTypes: {\n immediate: true,\n handler (val) {\n if (!val.length) return\n const target = this.filters[4]\n target.dataRequested = true\n target.data = val\n target.dataLoading = false\n }\n },\n $route: {\n immediate: true,\n handler (val) {\n if (val.name === 'Vehicles') {\n this.current = this.$route.query.pageNumber ? Number(this.$route.query.pageNumber) : 1\n this.getVehicles(val)\n }\n }\n }\n },\n methods: {\n getVehicles (route: any): void {\n if (route.query.search) {\n this.searchValue = route.query.search\n }\n const params = { pageSize: 10, pageNumber: route.query.pageNumber ? route.query.pageNumber : 1, ...route.query }\n this.$store.dispatch(`vehicles/${VehiclesActions.FETCH_VEHICLES}`, params)\n },\n assignToDriver (vehicle: any): void {\n this.driverIds = vehicle.driverInfo ? vehicle.driverInfo.map((el: any) => el.id) : []\n this.selectedVehicle = vehicle\n this.showAssignModal = true\n },\n editVehicle (vehicle: VehicleInterface): void {\n this.showModal = true\n this.isEdit = true\n this.editedVehicle = vehicle\n },\n deleteVehicle (vehicle: VehicleInterface): void {\n this.$store.dispatch(`vehicles/${VehiclesActions.DELETE_VEHICLE}`, { vehicleId: vehicle.id }).then(() => {\n this.getVehicles(this.$route)\n const toast = useToast()\n toast.success(this.$t('messages.deleteVehicle'), {\n timeout: 3000\n })\n })\n },\n addVehicle (): void {\n this.showModal = true\n this.isEdit = false\n this.driverIds = null\n this.selectedVehicle = null\n this.editedVehicle = {} as VehicleInterface\n },\n toggleActivate (id: number, type: 'activate' | 'deactivate'): void {\n if (type === 'activate') {\n this.$store.dispatch(`vehicles/${VehiclesActions.ACTIVATE_VEHICLE}`, { vehicleId: id }).catch(() => {\n const inputRef = this.$refs['activationInput' + id] as any\n inputRef.checked = false\n })\n } else {\n this.$store.dispatch(`vehicles/${VehiclesActions.DEACTIVATE_VEHICLE}`, { vehicleId: id }).catch(() => {\n const inputRef = this.$refs['activationInput' + id] as any\n inputRef.checked = true\n })\n }\n },\n unassignDriver (vehicleId: number, driverId: number): void {\n const payload = {\n vehicleId,\n driverId\n }\n this.$store.dispatch(`drivers/${[DriverActions.UNASSIGN_VEHICLE]}`, payload).then(() => {\n this.getVehicles(this.$route)\n })\n },\n onExpandPanel (actionName: string): void {\n if (actionName === 'shifts') {\n this.$store.dispatch(`workShifts/${WorkShiftActions.FETCH_WORK_SHIFTS}`, { pageNumber: 1, pageSize: 100 })\n } else if (actionName === 'vehicleTypes') {\n this.$store.dispatch(`vehicles/${[VehiclesActions.FETCH_VEHICLE_TYPES]}`)\n }\n }\n }\n})\n","import { render } from \"./Vehicles.vue?vue&type=template&id=71e77f7a&scoped=true&ts=true\"\nimport script from \"./Vehicles.vue?vue&type=script&lang=ts\"\nexport * from \"./Vehicles.vue?vue&type=script&lang=ts\"\n\nimport \"./Vehicles.vue?vue&type=style&index=0&id=71e77f7a&scoped=true&lang=css\"\n\nimport exportComponent from \"/usr/src/app/node_modules/vue-loader-v16/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['render',render],['__scopeId',\"data-v-71e77f7a\"]])\n\nexport default __exports__","export * from \"-!../../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--7-oneOf-1-0!../../../../node_modules/css-loader/dist/cjs.js??ref--7-oneOf-1-1!../../../../node_modules/vue-loader-v16/dist/stylePostLoader.js!../../../../node_modules/postcss-loader/src/index.js??ref--7-oneOf-1-2!../../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../../node_modules/vue-loader-v16/dist/index.js??ref--1-1!./Vehicles.vue?vue&type=style&index=0&id=71e77f7a&scoped=true&lang=css\""],"sourceRoot":""}