{"version":3,"sources":["webpack:///./src/views/order/Track.vue?2d7d","webpack:///./src/views/order/Track.vue?6e00","webpack:///./src/views/order/Track.vue","webpack:///./src/views/order/Track.vue?6781"],"names":["_withScopeId","n","_pushScopeId","_popScopeId","_hoisted_1","class","_hoisted_2","key","_hoisted_3","_hoisted_4","_hoisted_5","_hoisted_6","_hoisted_7","_hoisted_8","viewBox","fill","xmlns","_hoisted_9","_createElementVNode","d","_hoisted_10","_hoisted_11","_hoisted_12","_hoisted_13","_hoisted_14","_hoisted_15","_hoisted_16","_hoisted_17","_hoisted_18","_hoisted_19","_hoisted_20","_hoisted_21","_hoisted_22","_hoisted_23","_hoisted_24","_hoisted_25","_hoisted_26","render","_ctx","_cache","$props","$setup","$data","$options","_openBlock","_createElementBlock","detailedOrder","_toDisplayString","$t","orderId","_Fragment","_renderList","statuses","s","index","_normalizeClass","status","length","translation","_createCommentVNode","_createTextVNode","Date","createdAt","toLocaleString","driver","driverInfo","firstName","lastName","href","phoneNumber","onClick","_withModifiers","trackAnotherOrder","onSubmit","trackOrder","_withDirectives","error","v$","orderKey","$error","type","placeholder","$event","onBlur","$touch","disabled","loading","_vModelText","defineComponent","name","setup","useVuelidate","data","validations","required","minLength","computed","this","$store","getters","created","$route","query","id","toString","methods","$validate","isFormCorrect","dispatch","OrderActions","PUBLIC_FETCH_ORDER_BY_ID","orderStatus","toast","useToast","message","commit","OrderMutations","SET_ORDER_DETAILS","reset","$reset","__exports__"],"mappings":"kHAAA,W,yDCEMA,EAAe,SAAAC,GAAC,OAAKC,yBAAa,mBAAmBD,EAAEA,IAAIE,0BAAcF,GACzEG,EAAa,CAAEC,MAAO,wDACtBC,EAAa,CACjBC,IAAK,EACLF,MAAO,kBAEHG,EAAa,CAAEH,MAAO,sCACtBI,EAAa,CAAEJ,MAAO,QACtBK,EAAa,CAAEL,MAAO,sBACtBM,EAAa,CAAC,YACdC,EAAa,CAAC,YACdC,EAAa,CACjBN,IAAK,EACL,cAAe,OACfF,MAAO,6EAC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U,EAAK6B,SACrB,EAAKQ,SAAU,EAJD,mBAMN,EAAKY,OAAOU,SAAZ,iBAA+BC,OAAaC,0BAA4B,CAAE7D,YANpE,aAOJ,EAAKH,cAAciE,YAAYtB,KAP3B,OAQL,cARK,MASL,sBATK,MAUL,aAVK,QAaL,cAbK,QAgBL,eAhBK,MAiBL,mBAjBK,MAkBL,YAlBK,gCAWR,EAAKjC,OAAS,EAXN,oCAcR,EAAKA,OAAS,EAdN,oCAmBR,EAAKA,OAAS,EAnBN,oCAsBR,EAAKA,OAAS,EAtBN,kFA0BNwD,EAAQC,iBACdD,EAAMpC,MAAM,KAAMsC,SAAW,kCA3BjB,yBA6BZ,EAAK5B,SAAU,EA7BH,gFAgChBd,kBAjCO,WAkCLyB,KAAKC,OAAOiB,OAAZ,iBAA6BC,OAAeC,mBAAqB,MACjEpB,KAAKnB,SAAW,KAGpBwC,MAtE6B,WAuE3BrB,KAAKpB,GAAG0C,SACRtB,KAAKnB,SAAW,M,iCCzEpB,MAAM0C,EAA2B,IAAgB,EAAQ,CAAC,CAAC,SAASnF,GAAQ,CAAC,YAAY,qBAE1E,gB","file":"js/chunk-7ef369af.014c8c09.js","sourcesContent":["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!./Track.vue?vue&type=style&index=0&id=5abb2566&scoped=true&lang=scss\"","import { toDisplayString as _toDisplayString, createElementVNode as _createElementVNode, vModelText as _vModelText, normalizeClass as _normalizeClass, withDirectives as _withDirectives, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, createTextVNode as _createTextVNode, withModifiers as _withModifiers, renderList as _renderList, Fragment as _Fragment, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-5abb2566\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = { class: \"h-full flex items-center justify-center flex-col p-5\" }\nconst _hoisted_2 = {\n key: 0,\n class: \"form-container\"\n}\nconst _hoisted_3 = { class: \"text-center text-xl font-bold mb-3\" }\nconst _hoisted_4 = { class: \"mb-3\" }\nconst _hoisted_5 = { class: \"mb-4 relative h-42\" }\nconst _hoisted_6 = [\"disabled\"]\nconst _hoisted_7 = [\"disabled\"]\nconst _hoisted_8 = {\n key: 0,\n \"aria-hidden\": \"true\",\n class: \"inline w-4 h-4 text-gray-200 animate-spin dark:text-gray-600 fill-blue-600\",\n viewBox: \"0 0 100 101\",\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\"\n}\nconst _hoisted_9 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"path\", {\n d: \"M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z\",\n fill: \"primary\"\n}, null, -1))\nconst _hoisted_10 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"path\", {\n d: \"M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z\",\n fill: \"currentFill\"\n}, null, -1))\nconst _hoisted_11 = [\n _hoisted_9,\n _hoisted_10\n]\nconst _hoisted_12 = {\n key: 1,\n class: \"border rounded-lg shadow-md px-6 py-5 bg-white\"\n}\nconst _hoisted_13 = { class: \"flex justify-between items-center mb-4\" }\nconst _hoisted_14 = { class: \"text-2xl font-bold text-gray-800\" }\nconst _hoisted_15 = { class: \"text-sm text-gray-600\" }\nconst _hoisted_16 = { class: \"flex flex-col sm:flex-row items-center w-full text-sm font-medium text-center text-gray-500 dark:text-gray-400 sm:text-base\" }\nconst _hoisted_17 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"hr\", { class: \"my-6\" }, null, -1))\nconst _hoisted_18 = { class: \"grid grid-cols-1 sm:grid-cols-2 gap-4 mb-4\" }\nconst _hoisted_19 = { class: \"text-lg font-semibold text-gray-800 mb-2\" }\nconst _hoisted_20 = { class: \"text-sm text-gray-600 space-y-1\" }\nconst _hoisted_21 = { key: 0 }\nconst _hoisted_22 = { class: \"text-lg font-semibold text-gray-800 mb-2\" }\nconst _hoisted_23 = { class: \"text-sm text-gray-600 space-y-1\" }\nconst _hoisted_24 = [\"href\"]\nconst _hoisted_25 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"hr\", { class: \"my-6\" }, null, -1))\nconst _hoisted_26 = { class: \"flex justify-center mt-4\" }\n\nexport function render(_ctx: any,_cache: any,$props: any,$setup: any,$data: any,$options: any) {\n return (_openBlock(), _createElementBlock(\"div\", _hoisted_1, [\n (!_ctx.detailedOrder)\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_2, [\n _createElementVNode(\"h2\", _hoisted_3, _toDisplayString(_ctx.$t('orders.track_order_view_title')), 1),\n _createElementVNode(\"p\", _hoisted_4, _toDisplayString(_ctx.$t('orders.track_order_view_pargh')), 1),\n _createElementVNode(\"form\", {\n onSubmit: _cache[2] || (_cache[2] = _withModifiers(\n//@ts-ignore\n(...args) => (_ctx.trackOrder && _ctx.trackOrder(...args)), [\"prevent\"]))\n }, [\n _createElementVNode(\"div\", _hoisted_5, [\n _withDirectives(_createElementVNode(\"input\", {\n class: _normalizeClass([{error: _ctx.v$.orderKey.$error && _ctx.orderKey}, \"h-42 absolute p-3.5 top-0 start-0 w-full h-full block appearance-none bg-transparent\"]),\n type: \"text\",\n placeholder: \"\",\n \"onUpdate:modelValue\": _cache[0] || (_cache[0] = ($event: any) => ((_ctx.orderKey) = $event)),\n onBlur: _cache[1] || (_cache[1] = \n//@ts-ignore\n(...args) => (_ctx.v$.orderKey.$touch && _ctx.v$.orderKey.$touch(...args))),\n disabled: _ctx.loading\n }, null, 42, _hoisted_6), [\n [_vModelText, _ctx.orderKey]\n ]),\n _createElementVNode(\"label\", {\n class: _normalizeClass([{error: _ctx.v$.orderKey.$error && _ctx.orderKey}, \"absolute text-placeholder top-2 start-4 text-base bg-white py-0 px-1 -z-1 duration-300 origin-0 cursor-text\"])\n }, _toDisplayString(_ctx.$t('orders.track_order_input')), 3)\n ]),\n _createElementVNode(\"button\", {\n type: \"submit\",\n disabled: _ctx.loading,\n class: \"w-full primary px-2 py-2 flex justify-center items-center gap-2\"\n }, [\n (_ctx.loading)\n ? (_openBlock(), _createElementBlock(\"svg\", _hoisted_8, _hoisted_11))\n : _createCommentVNode(\"\", true),\n _createTextVNode(\" \" + _toDisplayString(_ctx.$t('buttons.trackOrder')), 1)\n ], 8, _hoisted_7)\n ], 32)\n ]))\n : (_openBlock(), _createElementBlock(\"div\", _hoisted_12, [\n _createElementVNode(\"div\", _hoisted_13, [\n _createElementVNode(\"h3\", _hoisted_14, _toDisplayString(_ctx.$t('orders.details')), 1),\n _createElementVNode(\"span\", _hoisted_15, \"Order #\" + _toDisplayString(_ctx.detailedOrder.orderId), 1)\n ]),\n _createElementVNode(\"ol\", _hoisted_16, [\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(_ctx.statuses, (s, index) => {\n return (_openBlock(), _createElementBlock(\"li\", {\n key: index,\n class: \"flex items-center w-full sm:w-auto mb-4 sm:mb-0\"\n }, [\n _createElementVNode(\"span\", {\n class: _normalizeClass([\"p-2 rounded font-bold text-sm w-full text-center truncate\", [index <= _ctx.status ? 'primary' : 'bg-gray-200', index < _ctx.statuses.length-1 ? 'sm:w-48' : 'sm:w-24']])\n }, _toDisplayString(_ctx.$t(s.translation)), 3),\n (index < _ctx.statuses.length-1)\n ? (_openBlock(), _createElementBlock(\"div\", {\n key: 0,\n class: _normalizeClass([\"hidden sm:flex w-full h-0.5 dark:bg-gray-700\", index < _ctx.status ? 'primary' : 'bg-gray-200'])\n }, null, 2))\n : _createCommentVNode(\"\", true)\n ]))\n }), 128))\n ]),\n _hoisted_17,\n _createElementVNode(\"div\", _hoisted_18, [\n _createElementVNode(\"div\", null, [\n _createElementVNode(\"h4\", _hoisted_19, _toDisplayString(_ctx.$t('orders.information')), 1),\n _createElementVNode(\"ul\", _hoisted_20, [\n _createElementVNode(\"li\", null, [\n _createElementVNode(\"strong\", null, _toDisplayString(_ctx.$t('orders.orderID')) + \":\", 1),\n _createTextVNode(_toDisplayString(_ctx.detailedOrder.orderId), 1)\n ]),\n _createElementVNode(\"li\", null, [\n _createElementVNode(\"strong\", null, _toDisplayString(_ctx.$t('table.createdAt')) + \": \", 1),\n _createTextVNode(_toDisplayString(new Date(_ctx.detailedOrder.createdAt).toLocaleString()), 1)\n ])\n ])\n ]),\n (_ctx.detailedOrder.driver)\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_21, [\n _createElementVNode(\"h4\", _hoisted_22, _toDisplayString(_ctx.$t('orders.driverInfo')), 1),\n _createElementVNode(\"ul\", _hoisted_23, [\n _createElementVNode(\"li\", null, [\n _createElementVNode(\"strong\", null, _toDisplayString(_ctx.$t('drivers.name')) + \": \", 1),\n _createTextVNode(_toDisplayString(_ctx.detailedOrder.driver?.driverInfo.firstName) + \" \" + _toDisplayString(_ctx.detailedOrder.driver?.driverInfo.lastName), 1)\n ]),\n _createElementVNode(\"li\", null, [\n _createElementVNode(\"strong\", null, _toDisplayString(_ctx.$t('drivers.phone')) + \": \", 1),\n _createElementVNode(\"a\", {\n href: `tel:${_ctx.detailedOrder.driver?.driverInfo.phoneNumber}`,\n class: \"text-blue-500 hover:underline\"\n }, _toDisplayString(_ctx.detailedOrder.driver?.driverInfo.phoneNumber), 9, _hoisted_24)\n ])\n ])\n ]))\n : _createCommentVNode(\"\", true)\n ]),\n _hoisted_25,\n _createElementVNode(\"div\", _hoisted_26, [\n _createElementVNode(\"a\", {\n onClick: _cache[3] || (_cache[3] = _withModifiers(\n//@ts-ignore\n(...args) => (_ctx.trackAnotherOrder && _ctx.trackAnotherOrder(...args)), [\"prevent\"])),\n href: \"#\",\n class: \"text-blue-500 hover:underline cursor-pointer\"\n }, _toDisplayString(_ctx.$t('orders.track_another_order')), 1)\n ])\n ]))\n ]))\n}","\nimport { defineComponent } from 'vue'\nimport { OrderActions } from '@/store/modules/orders/actions'\nimport { OrderMutations } from '@/store/modules/orders/mutations'\nimport { useToast } from 'vue-toastification'\nimport { required, minLength } from '@/customValidators'\nimport useVuelidate from '@vuelidate/core'\n\nexport default defineComponent({\n name: 'OrderTracker',\n setup: () => ({ v$: useVuelidate() }),\n data () {\n return {\n orderKey: '',\n status: 0,\n loading: false,\n statuses: [\n { status: 'preparing', translation: 'orders.statuses.preparing' },\n { status: 'picked_up', translation: 'orders.statuses.picked_up' },\n { status: 'on_the_way', translation: 'orders.statuses.on_the_way' },\n { status: 'delivered', translation: 'orders.statuses.delivered' }\n ]\n }\n },\n validations: function () {\n return {\n orderKey: { required, minLength: minLength(4) } // { required, minLength: minLength(8) }\n }\n },\n computed: {\n detailedOrder () {\n return this.$store.getters['orders/getDetailedOrder']\n }\n },\n created () {\n // Access the order ID from the query parameters when the component is created\n if (this.$route.query.id) {\n this.orderKey = this.$route.query.id?.toString()\n }\n },\n methods: {\n async trackOrder () {\n const isFormCorrect = await this.v$.$validate()\n if (!isFormCorrect) return\n const orderId = this.orderKey\n this.loading = true\n try {\n await this.$store.dispatch(`orders/${OrderActions.PUBLIC_FETCH_ORDER_BY_ID}`, { orderId })\n switch (this.detailedOrder.orderStatus.name) {\n case 'preparing':\n case 'ready_for_pick_up':\n case 'assigned':\n this.status = 0\n break\n case 'picked_up':\n this.status = 1\n break\n case 'on_the_way':\n case 'at_the_address':\n case 'delayed':\n this.status = 2\n break\n default:\n this.status = 3\n break\n }\n } catch (error:any) {\n const toast = useToast()\n toast.error(error.message || 'Failed to fetch order details.') // Show error message\n } finally {\n this.loading = false\n }\n },\n trackAnotherOrder () {\n this.$store.commit(`orders/${OrderMutations.SET_ORDER_DETAILS}`, null)\n this.orderKey = ''\n }\n },\n reset () {\n this.v$.$reset()\n this.orderKey = ''\n }\n})\n","import { render } from \"./Track.vue?vue&type=template&id=5abb2566&scoped=true&ts=true\"\nimport script from \"./Track.vue?vue&type=script&lang=ts\"\nexport * from \"./Track.vue?vue&type=script&lang=ts\"\n\nimport \"./Track.vue?vue&type=style&index=0&id=5abb2566&scoped=true&lang=scss\"\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-5abb2566\"]])\n\nexport default __exports__"],"sourceRoot":""}