{"version":3,"sources":["webpack:///./src/views/account/zones/Zones.vue?bc75","webpack:///./src/views/account/zones/Zones.vue","webpack:///./src/views/account/zones/Zones.vue?c75c","webpack:///./src/views/account/zones/Zones.vue?eb7a"],"names":["_hoisted_1","class","_hoisted_2","ref","_hoisted_3","_hoisted_4","_hoisted_5","_createElementVNode","_hoisted_6","_hoisted_7","_hoisted_8","_hoisted_9","_hoisted_10","key","style","_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","render","_ctx","_cache","$props","$setup","$data","$options","_component_BaseIcon","_resolveComponent","_component_PageTitle","_component_SearchInput","_component_TableGhost","_component_Pagination","_component_ZoneMap","_component_BaseModal","_component_ZoneDarkStoreSettings","_component_ConfirmationModal","_openBlock","_createElementBlock","_Fragment","_createVNode","_Transition","default","_withCtx","shortTable","onClick","$event","startAnimation","name","_createCommentVNode","title","placeholder","$t","modelValue","searchValue","$router","push","classNames","_createTextVNode","_toDisplayString","_normalizeStyle","height","loading","_renderList","zones","zone","zIndex","id","darkstores","length","ds","i","selectedZone","highlightIndex","showDetails","selectedZoneToDelete","_createBlock","row","col","pagination","totalItems","current","total","basicPagination","pageSize","onPageChanged","coordinatesGroup","allZoneCoordinates","drawEnabled","editablePolygon","draggablePolygon","zoom","_","showZoneDetails","width","onClose","polygon","onSync","header","hasIcon","cancelText","confirmText","onConfirm","deleteZone","onCancel","defineComponent","components","SearchInput","defineAsyncComponent","PageTitle","BaseIcon","Pagination","TableGhost","BaseModal","ZoneMap","ConfirmationModal","ZoneDarkStoreSettings","data","methods","this","ZoneModel","convertToMapPolygonFormat","$store","dispatch","ZoneActions","DELETE_ZONE","FETCH_ZONES","pageNumber","container","$refs","zonesContent","map","zonesMap","classList","add","remove","val","$route","query","Number","search","params","JSON","parse","stringify","latest","filter","z","watch","immediate","handler","router","queries","mounted","document","documentElement","clientH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,IAAMkG,EAAUjC,KAAKkB,OAAOC,MAC5Bc,EAAQzB,WAAa,IACrBwB,OAAO/F,KAAK,CAAEkF,MAAO,iCAAKc,GAAP,IAAgBZ,OAAQrB,KAAKjE,kBAGpDmG,QAhG6B,WAgGtB,WACLlC,KAAK1D,OAAS6F,SAASC,gBAAgBC,aAAe,IACtDC,iBAAiB,UAAU,WACzB,EAAKhG,OAAS6F,SAASC,gBAAgBC,aAAe,QAG1DE,SAAU,CACR9F,MADQ,WAEN,OAAOuD,KAAKG,OAAOqC,QAAQ,mBAE7BhF,WAJQ,WAKN,OAAOwC,KAAKG,OAAOqC,QAAQ,wBAE7BjG,QAPQ,WAQN,OAAOyD,KAAKG,OAAOqC,QAAQ,qBAE7BxE,mBAVQ,SAUYyE,GAClB,OAAOA,EAAGhG,MAAMmE,KAAI,SAACgB,GACnB,sBACK3B,OAAUC,0BAA0B0B,EAAEnD,iB,iCCpHnD,MAAMiE,EAA2B,IAAgB,EAAQ,CAAC,CAAC,SAAS7I,KAErD,gB,kCCTf","file":"js/chunk-13e4ed22.2b445dbc.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, normalizeStyle as _normalizeStyle, renderList as _renderList, Fragment as _Fragment, createBlock as _createBlock, Transition as _Transition, withCtx as _withCtx } from \"vue\"\n\nconst _hoisted_1 = { class: \"flex justify-between flex-nowrap\" }\nconst _hoisted_2 = {\n ref: \"zonesContent\",\n class: \"w-537 h-screen flex flex-col justify-between flex-nowrap transition-all duration-300 ease-in-out transform-x\"\n}\nconst _hoisted_3 = { class: \"pt-14 px-5 relative\" }\nconst _hoisted_4 = { class: \"px-2\" }\nconst _hoisted_5 = /*#__PURE__*/_createElementVNode(\"span\", { class: \"ml-2 text-lightRed font-semibold text-xs leading-4\" }, \"Close the map\", -1)\nconst _hoisted_6 = { class: \"flex justify-between mb-7\" }\nconst _hoisted_7 = { class: \"flex justify-start\" }\nconst _hoisted_8 = { class: \"relative h-42 w-288 me-3\" }\nconst _hoisted_9 = { class: \"h-full\" }\nconst _hoisted_10 = {\n key: 0,\n class: \"bg-white opacity-100 z-40\",\n style: {\"width\":\"50%\"}\n}\nconst _hoisted_11 = {\n key: 1,\n class: \"bg-white opacity-100 z-40\",\n style: {\"width\":\"25%\"}\n}\nconst _hoisted_12 = { key: 0 }\nconst _hoisted_13 = { key: 0 }\nconst _hoisted_14 = { key: 0 }\nconst _hoisted_15 = {\n key: 1,\n class: \"flex justify-start flex-wrap\"\n}\nconst _hoisted_16 = { class: \"flex justify-end gap-6\" }\nconst _hoisted_17 = [\"onClick\"]\nconst _hoisted_18 = { class: \"relative\" }\nconst _hoisted_19 = {\n key: 0,\n class: \"store-badge absolute rounded-full bg-green-600 text-white text-center\"\n}\nconst _hoisted_20 = [\"onClick\"]\nconst _hoisted_21 = [\"onClick\"]\nconst _hoisted_22 = [\"onClick\"]\nconst _hoisted_23 = {\n key: 0,\n class: \"text-center text-darkText text-lg px-4 mt-32 font-bold\"\n}\nconst _hoisted_24 = {\n ref: \"zonesMap\",\n class: \"h-screen z-10 h-full calculated-width transition-all duration-300 ease-in-out\"\n}\n\nexport function render(_ctx: any,_cache: any,$props: any,$setup: any,$data: any,$options: any) {\n const _component_BaseIcon = _resolveComponent(\"BaseIcon\")!\n const _component_PageTitle = _resolveComponent(\"PageTitle\")!\n const _component_SearchInput = _resolveComponent(\"SearchInput\")!\n const _component_TableGhost = _resolveComponent(\"TableGhost\")!\n const _component_Pagination = _resolveComponent(\"Pagination\")!\n const _component_ZoneMap = _resolveComponent(\"ZoneMap\")!\n const _component_BaseModal = _resolveComponent(\"BaseModal\")!\n const _component_ZoneDarkStoreSettings = _resolveComponent(\"ZoneDarkStoreSettings\")!\n const _component_ConfirmationModal = _resolveComponent(\"ConfirmationModal\")!\n\n return (_openBlock(), _createElementBlock(_Fragment, null, [\n _createVNode(_Transition, null, {\n default: _withCtx(() => [\n _createElementVNode(\"div\", _hoisted_1, [\n _createElementVNode(\"div\", _hoisted_2, [\n _createElementVNode(\"div\", _hoisted_3, [\n (_ctx.shortTable)\n ? (_openBlock(), _createElementBlock(\"div\", {\n key: 0,\n onClick: _cache[0] || (_cache[0] = ($event: any) => (_ctx.startAnimation())),\n class: \"z-20 cursor-pointer absolute -right-18 top-110 ps-1 py-2 bg-white rounded-6 rounded transform -rotate-90\"\n }, [\n _createElementVNode(\"div\", _hoisted_4, [\n _createVNode(_component_BaseIcon, {\n style: {\"width\":\"12px\"},\n name: \"redarrow\"\n }),\n _hoisted_5\n ])\n ]))\n : _createCommentVNode(\"\", true),\n _createVNode(_component_PageTitle, { title: \"zones.list\" }),\n _createElementVNode(\"div\", _hoisted_6, [\n _createElementVNode(\"div\", _hoisted_7, [\n _createElementVNode(\"div\", _hoisted_8, [\n _createVNode(_component_SearchInput, {\n placeholder: _ctx.$t('zones.search'),\n modelValue: _ctx.searchValue,\n \"onUpdate:modelValue\": _cache[1] || (_cache[1] = ($event: any) => ((_ctx.searchValue) = $event))\n }, null, 8, [\"placeholder\", \"modelValue\"])\n ])\n ]),\n _createElementVNode(\"div\", null, [\n _createElementVNode(\"button\", {\n class: \"primary flex items-center px-5 py-3\",\n onClick: _cache[2] || (_cache[2] = ($event: any) => (_ctx.$router.push('/zones/add-new')))\n }, [\n _createVNode(_component_BaseIcon, {\n name: \"plus\",\n classNames: \"text-xl me-1\"\n }),\n _createTextVNode(\" \" + _toDisplayString(_ctx.$t('buttons.addNewZone')), 1)\n ])\n ])\n ])\n ]),\n _createElementVNode(\"div\", _hoisted_9, [\n _createElementVNode(\"div\", {\n style: _normalizeStyle({height: _ctx.height + 'px'}),\n class: \"tableFixHead px-5\"\n }, [\n _createElementVNode(\"table\", null, [\n _createElementVNode(\"thead\", null, [\n _createElementVNode(\"tr\", null, [\n _createElementVNode(\"th\", {\n class: \"bg-white opacity-100 z-40\",\n style: _normalizeStyle(_ctx.shortTable ? 'width: 80%' : 'width: 25%')\n }, _toDisplayString(_ctx.$t('table.name')), 5),\n (!_ctx.shortTable)\n ? (_openBlock(), _createElementBlock(\"th\", _hoisted_10, _toDisplayString(_ctx.$t('table.darkstores')), 1))\n : _createCommentVNode(\"\", true),\n (!_ctx.shortTable)\n ? (_openBlock(), _createElementBlock(\"th\", _hoisted_11))\n : _createCommentVNode(\"\", true)\n ])\n ]),\n (!_ctx.loading)\n ? (_openBlock(), _createElementBlock(\"tbody\", _hoisted_12, [\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(_ctx.zones, (zone, zIndex) => {\n return (_openBlock(), _createElementBlock(\"tr\", {\n key: zone.id\n }, [\n _createElementVNode(\"td\", null, _toDisplayString(zone.name), 1),\n (!_ctx.shortTable)\n ? (_openBlock(), _createElementBlock(\"td\", _hoisted_13, [\n (!zone.darkstores.length)\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_14, \"-\"))\n : (_openBlock(), _createElementBlock(\"div\", _hoisted_15, [\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(zone.darkstores, (ds, i) => {\n return (_openBlock(), _createElementBlock(\"span\", {\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 key: i\n }, _toDisplayString(ds.name), 1))\n }), 128))\n ]))\n ]))\n : _createCommentVNode(\"\", true),\n _createElementVNode(\"td\", _hoisted_16, [\n _createElementVNode(\"button\", {\n onClick: () => _ctx.selectedZone = zone\n }, [\n _createElementVNode(\"div\", _hoisted_18, [\n (zone.darkstores.length)\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_19, _toDisplayString(zone.darkstores.length), 1))\n : _createCommentVNode(\"\", true),\n _createVNode(_component_BaseIcon, { name: \"store\" })\n ])\n ], 8, _hoisted_17),\n _createElementVNode(\"button\", {\n onClick: ($event: any) => (_ctx.$router.push(`/zones/edit/${zone.id}`))\n }, [\n _createVNode(_component_BaseIcon, { name: \"edit\" })\n ], 8, _hoisted_20),\n _createElementVNode(\"button\", {\n onClick: ($event: any) => (_ctx.shortTable ? _ctx.highlightIndex = zIndex : _ctx.showDetails(zone))\n }, [\n _createVNode(_component_BaseIcon, { name: \"mappin\" })\n ], 8, _hoisted_21),\n _createElementVNode(\"button\", {\n onClick: ($event: any) => (_ctx.selectedZoneToDelete = zone)\n }, [\n _createVNode(_component_BaseIcon, { name: \"trash\" })\n ], 8, _hoisted_22)\n ])\n ]))\n }), 128))\n ]))\n : _createCommentVNode(\"\", true),\n (_ctx.loading)\n ? (_openBlock(), _createBlock(_component_TableGhost, {\n key: 1,\n \"col-margin\": \"my-0\",\n row: 10,\n col: 3\n }))\n : _createCommentVNode(\"\", true)\n ]),\n (!_ctx.zones.length && !_ctx.loading)\n ? (_openBlock(), _createElementBlock(\"p\", _hoisted_23, _toDisplayString(_ctx.$t('validation.noItemsToShow')), 1))\n : _createCommentVNode(\"\", true)\n ], 4)\n ]),\n _createElementVNode(\"div\", null, [\n (_ctx.pagination && _ctx.pagination.totalItems)\n ? (_openBlock(), _createBlock(_component_Pagination, {\n key: 0,\n current: _ctx.current,\n total: _ctx.pagination.totalItems,\n \"page-range\": 2,\n basicPagination: _ctx.shortTable,\n \"per-page\": _ctx.pagination.pageSize,\n onPageChanged: _cache[3] || (_cache[3] = ($event: any) => (_ctx.current = $event)),\n \"text-before-input\": \"Go to page\"\n }, null, 8, [\"current\", \"total\", \"basicPagination\", \"per-page\"]))\n : _createCommentVNode(\"\", true)\n ])\n ], 512),\n _createElementVNode(\"div\", _hoisted_24, [\n _createVNode(_component_ZoneMap, {\n id: \"all-zone-view\",\n coordinatesGroup: _ctx.allZoneCoordinates,\n drawEnabled: false,\n editablePolygon: false,\n draggablePolygon: false,\n highlightIndex: _ctx.highlightIndex,\n zoom: 13\n }, null, 8, [\"coordinatesGroup\", \"highlightIndex\"])\n ], 512)\n ])\n ]),\n _: 1\n }),\n (_ctx.showZoneDetails)\n ? (_openBlock(), _createBlock(_component_BaseModal, {\n key: 0,\n title: _ctx.showZoneDetails.name,\n width: '746',\n onClose: _cache[4] || (_cache[4] = ($event: any) => (_ctx.showZoneDetails = null))\n }, {\n default: _withCtx(() => [\n _createVNode(_component_ZoneMap, {\n coordinatesGroup: _ctx.showZoneDetails.polygon,\n editablePolygon: false,\n draggablePolygon: false,\n drawEnabled: false,\n style: {\"height\":\"500px\"},\n zoom: 13\n }, null, 8, [\"coordinatesGroup\"])\n ]),\n _: 1\n }, 8, [\"title\"]))\n : _createCommentVNode(\"\", true),\n (_ctx.selectedZone)\n ? (_openBlock(), _createBlock(_component_BaseModal, {\n key: 1,\n title: _ctx.selectedZone.name,\n width: '746',\n onClose: _cache[5] || (_cache[5] = ($event: any) => (_ctx.selectedZone = null))\n }, {\n default: _withCtx(() => [\n _createVNode(_component_ZoneDarkStoreSettings, {\n zone: _ctx.selectedZone,\n onSync: _ctx.onSync\n }, null, 8, [\"zone\", \"onSync\"])\n ]),\n _: 1\n }, 8, [\"title\"]))\n : _createCommentVNode(\"\", true),\n (_ctx.selectedZoneToDelete)\n ? (_openBlock(), _createBlock(_component_ConfirmationModal, {\n key: 2,\n header: _ctx.$t('zones.deleteConfirmation.header'),\n hasIcon: false,\n title: _ctx.$t('zones.deleteConfirmation.title', [_ctx.selectedZoneToDelete.name]),\n cancelText: _ctx.$t('buttons.no'),\n confirmText: _ctx.$t('buttons.yesDelete'),\n onConfirm: _ctx.deleteZone,\n onCancel: _cache[6] || (_cache[6] = ($event: any) => (_ctx.selectedZoneToDelete = null))\n }, null, 8, [\"header\", \"title\", \"cancelText\", \"confirmText\", \"onConfirm\"]))\n : _createCommentVNode(\"\", true)\n ], 64))\n}","\nimport { defineAsyncComponent, defineComponent } from 'vue'\nimport { ZoneActions } from '@/store/modules/zones/actions'\nimport router from '@/router'\nimport { ZoneInterface } from '@/shared/interfaces/zone.interface'\nimport { PaginationInterface } from '@/shared/interfaces/pagination.interface'\nimport { ZoneModel } from '@/shared/models/zone.model'\n\nexport default defineComponent({\n components: {\n SearchInput: defineAsyncComponent(() => import('@/shared/components/SearchInput.vue')),\n PageTitle: defineAsyncComponent(() => import('@/shared/components/PageTitle.vue')),\n BaseIcon: defineAsyncComponent(() => import('@/shared/components/base-icon/BaseIcon.vue')),\n Pagination: defineAsyncComponent(() => import('@/shared/components/Pagination.vue')),\n TableGhost: defineAsyncComponent(() => import('@/shared/components/ghosts/TableGhost.vue')),\n BaseModal: defineAsyncComponent(() => import('@/shared/components/modals/BaseModal.vue')),\n ZoneMap: defineAsyncComponent(() => import('@/views/account/zones/components/ZoneMap.vue')),\n ConfirmationModal: defineAsyncComponent(() => import('@/shared/components/modals/ConfirmationModal.vue')),\n ZoneDarkStoreSettings: defineAsyncComponent(() => import('@/views/account/zones/components/ZoneDarkStoreSettings.vue'))\n },\n data () {\n return {\n searchValue: '',\n height: 400,\n current: 1,\n highlightIndex: -1,\n shortTable: true,\n showZoneDetails: null,\n selectedZone: null as any,\n selectedZoneToDelete: null as any\n }\n },\n methods: {\n showDetails (zone:ZoneInterface) {\n this.showZoneDetails = {\n ...zone,\n polygon: [ZoneModel.convertToMapPolygonFormat(zone.polygon)]\n } as any\n },\n async deleteZone () {\n if (this.selectedZoneToDelete) {\n await this.$store.dispatch(`zones/${ZoneActions.DELETE_ZONE}`, this.selectedZoneToDelete?.id)\n this.current = 1\n this.selectedZoneToDelete = null\n this.$store.dispatch(`zones/${ZoneActions.FETCH_ZONES}`, { pageSize: 10, pageNumber: 1 })\n }\n },\n startAnimation (): void {\n const container: any = this.$refs.zonesContent\n const map: any = this.$refs.zonesMap\n if (this.shortTable) {\n container.classList.add('animate-to-end')\n map.classList.add('w-0')\n map.classList.remove('calculated-width')\n } else {\n container.classList.remove('animate-to-end')\n map.classList.add('calculated-width')\n map.classList.remove('w-0')\n }\n this.shortTable = !this.shortTable\n },\n async onSync () {\n const val = this.$route\n this.current = this.$route.query.pageNumber ? Number(this.$route.query.pageNumber) : 1\n if (val.query.search) {\n this.searchValue = val.query.search as any\n }\n let params = JSON.parse(JSON.stringify(val.query))\n params = { pageSize: 10, pageNumber: val.query.pageNumber ? val.query.pageNumber : 1, ...params }\n await this.$store.dispatch(`zones/${ZoneActions.FETCH_ZONES}`, params)\n\n if (this.selectedZone) {\n const latest = this.zones.filter(z => z.id === this.selectedZone.id)\n if (latest.length) {\n this.selectedZone = latest[0]\n }\n }\n }\n },\n watch: {\n $route: {\n immediate: true,\n handler (val) {\n if (val.name === 'Zones') {\n this.highlightIndex = -1\n this.current = this.$route.query.pageNumber ? Number(this.$route.query.pageNumber) : 1\n if (val.query.search) {\n this.searchValue = val.query.search\n }\n let params = JSON.parse(JSON.stringify(val.query))\n params = { pageSize: 10, pageNumber: val.query.pageNumber ? val.query.pageNumber : 1, ...params }\n this.$store.dispatch(`zones/${ZoneActions.FETCH_ZONES}`, params)\n }\n }\n },\n current (val) {\n router.push({ query: { ...this.$route.query, pageNumber: val } })\n },\n searchValue () {\n const queries = this.$route.query\n queries.pageNumber = '1'\n router.push({ query: { ...queries, search: this.searchValue } })\n }\n },\n mounted () {\n this.height = document.documentElement.clientHeight - 260\n addEventListener('resize', () => {\n this.height = document.documentElement.clientHeight - 260\n })\n },\n computed: {\n zones (): ZoneInterface[] {\n return this.$store.getters['zones/getZones']\n },\n pagination (): PaginationInterface {\n return this.$store.getters['zones/getPagination']\n },\n loading (): boolean {\n return this.$store.getters['zones/getLoading']\n },\n allZoneCoordinates (vm) {\n return vm.zones.map((z: ZoneInterface) => {\n return [\n ...ZoneModel.convertToMapPolygonFormat(z.polygon)\n ]\n })\n }\n }\n})\n","import { render } from \"./Zones.vue?vue&type=template&id=724200a0&ts=true\"\nimport script from \"./Zones.vue?vue&type=script&lang=ts\"\nexport * from \"./Zones.vue?vue&type=script&lang=ts\"\n\nimport \"./Zones.vue?vue&type=style&index=0&id=724200a0&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!./Zones.vue?vue&type=style&index=0&id=724200a0&lang=scss\""],"sourceRoot":""}