{"version":3,"sources":["webpack:///./src/views/account/workshifts/WorkShifts.vue?19d7","webpack:///./src/views/account/workshifts/WorkShifts.vue?46e5","webpack:///./src/views/account/workshifts/WorkShifts.vue","webpack:///./src/views/account/workshifts/WorkShifts.vue?3182"],"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","_createElementVNode","_hoisted_14","_hoisted_15","_hoisted_16","render","_ctx","_cache","$props","$setup","$data","$options","_component_PageTitle","_resolveComponent","_component_SearchInput","_component_BaseIcon","_component_FilterPanel","_component_TableGhost","_component_Pagination","_component_AddShift","_component_BaseModal","_openBlock","_createElementBlock","_Fragment","_createVNode","title","modelValue","searchValue","$event","placeholder","$t","onClick","showFilterModal","name","filters","onClose","onFetchData","onExpand","_createCommentVNode","showModal","isEdit","selectedShift","classNames","_createTextVNode","_toDisplayString","_normalizeStyle","height","loading","_renderList","workShifts","shift","id","darkstoreId","shiftStart","shiftEnd","description","editShift","_createBlock","row","col","length","pagination","totalItems","current","total","pageSize","onPageChanged","width","onRefresh","this","getWorkShifts","default","_withCtx","_","defineComponent","components","SearchInput","defineAsyncComponent","FilterPanel","TableGhost","AddShift","Pagination","BaseModal","PageTitle","BaseIcon","data","model","type","dataLoading","fetchDataOnExpand","dataRequested","actionName","computed","$store","getters","darkstores","mounted","document","documentElement","clientHeight","addEventListener","watch","val","router","push","query","$route","pageNumber","queries","search","undefined","immediate","handler","target","Number","params","JSON","parse","stringify","dispatch","WorkShiftActions","FETCH_WORK_SHIFTS","methods","event","DarkStoresActions","FETCH_DARKSTORES","__exports__"],"mappings":"yIAAA,W,uFCEMA,EAAe,SAAAC,GAAC,OAAKC,yBAAa,mBAAmBD,EAAEA,IAAIE,0BAAcF,GACzEG,EAAa,CAAEC,MAAO,mBACtBC,EAAa,CAAED,MAAO,6B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,qBAAmCC,OAAiBC,mBAAqBN,OAKjFO,QAAS,CACPlE,UADO,SACIN,GACTmB,KAAK5B,cAAgBS,EACrBmB,KAAK9B,WAAY,EACjB8B,KAAK7B,QAAS,GAEhBH,SANO,SAMGsF,GACM,eAAVA,IACGtD,KAAK0B,WAAWnC,QACnBS,KAAKwB,OAAO0B,SAAZ,qBAAmCK,OAAkBC,kBAAoB,CAAElB,WAAY,EAAG1C,SAAU,W,iCChG9G,MAAM6D,EAA2B,IAAgB,EAAQ,CAAC,CAAC,SAASzH,GAAQ,CAAC,YAAY,qBAE1E","file":"js/chunk-3b8e75f0.966dabc5.js","sourcesContent":["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!./WorkShifts.vue?vue&type=style&index=0&id=c39571b2&scoped=true&lang=css\"","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, createBlock as _createBlock, normalizeStyle as _normalizeStyle, withCtx as _withCtx, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-c39571b2\"),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\":\"20%\"}\n}\nconst _hoisted_9 = {\n class: \"bg-white opacity-100 z-40\",\n style: {\"width\":\"20%\"}\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\":\"10%\"}\n}\nconst _hoisted_12 = {\n class: \"bg-white opacity-100 z-40\",\n style: {\"width\":\"30%\"}\n}\nconst _hoisted_13 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"th\", {\n class: \"bg-white opacity-100 z-40\",\n style: {\"width\":\"6%\"}\n}, null, -1))\nconst _hoisted_14 = { key: 0 }\nconst _hoisted_15 = [\"onClick\"]\nconst _hoisted_16 = {\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_AddShift = _resolveComponent(\"AddShift\")!\n const _component_BaseModal = _resolveComponent(\"BaseModal\")!\n\n return (_openBlock(), _createElementBlock(_Fragment, null, [\n _createElementVNode(\"div\", _hoisted_1, [\n _createVNode(_component_PageTitle, { title: \"workShifts.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 modelValue: _ctx.searchValue,\n \"onUpdate:modelValue\": _cache[0] || (_cache[0] = ($event: any) => ((_ctx.searchValue) = $event)),\n placeholder: _ctx.$t('workShifts.shiftSearch')\n }, null, 8, [\"modelValue\", \"placeholder\"])\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.onExpand($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.showModal = true; _ctx.isEdit = false; _ctx.selectedShift = null}),\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.addShift')), 1)\n ])\n ])\n ])\n ]),\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\", _hoisted_8, _toDisplayString(_ctx.$t('table.name')), 1),\n _createElementVNode(\"th\", _hoisted_9, _toDisplayString(_ctx.$t('table.darkstore')), 1),\n _createElementVNode(\"th\", _hoisted_10, _toDisplayString(_ctx.$t('table.startDate')), 1),\n _createElementVNode(\"th\", _hoisted_11, _toDisplayString(_ctx.$t('table.endDate')), 1),\n _createElementVNode(\"th\", _hoisted_12, _toDisplayString(_ctx.$t('table.description')), 1),\n _hoisted_13\n ])\n ]),\n (!_ctx.loading)\n ? (_openBlock(), _createElementBlock(\"tbody\", _hoisted_14, [\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(_ctx.workShifts, (shift) => {\n return (_openBlock(), _createElementBlock(\"tr\", {\n key: shift.id\n }, [\n _createElementVNode(\"td\", null, _toDisplayString(shift.name), 1),\n _createElementVNode(\"td\", null, _toDisplayString(shift.darkstoreId.name), 1),\n _createElementVNode(\"td\", null, _toDisplayString(shift.shiftStart), 1),\n _createElementVNode(\"td\", null, _toDisplayString(shift.shiftEnd), 1),\n _createElementVNode(\"td\", null, _toDisplayString(shift.description), 1),\n _createElementVNode(\"td\", null, [\n _createElementVNode(\"button\", {\n onClick: ($event: any) => (_ctx.editShift(shift))\n }, [\n _createVNode(_component_BaseIcon, { name: \"edit\" })\n ], 8, _hoisted_15)\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: 6\n }))\n : _createCommentVNode(\"\", true)\n ]),\n (!_ctx.workShifts.length && !_ctx.loading)\n ? (_openBlock(), _createElementBlock(\"p\", _hoisted_16, _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 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 ? 'Update work shift' : 'Add new work shift',\n width: '488',\n onClose: _cache[7] || (_cache[7] = ($event: any) => (_ctx.showModal = $event)),\n onRefresh: this.getWorkShifts\n }, {\n default: _withCtx(() => [\n _createVNode(_component_AddShift, {\n onClose: _cache[6] || (_cache[6] = ($event: any) => (_ctx.showModal = false)),\n selectedShift: _ctx.selectedShift,\n isEdit: _ctx.isEdit,\n onRefresh: _ctx.getWorkShifts\n }, null, 8, [\"selectedShift\", \"isEdit\", \"onRefresh\"])\n ]),\n _: 1\n }, 8, [\"loading\", \"title\", \"onRefresh\"]))\n : _createCommentVNode(\"\", true)\n ], 64))\n}","\nimport { defineAsyncComponent, defineComponent } from 'vue'\nimport { PaginationInterface } from '@/shared/interfaces/pagination.interface'\nimport { WorkShiftActions } from '@/store/modules/work-shifts/actions'\nimport { WorkShiftInterface } from '@/shared/interfaces/work-shift.interface'\nimport { DarkStoresActions } from '@/store/modules/darkstores/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 AddShift: defineAsyncComponent(() => import('@/views/account/workshifts/components/AddShift.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 },\n data () {\n return {\n showModal: false,\n current: 1,\n height: 450,\n showFilterModal: false,\n searchValue: '',\n selectedShift: {} as WorkShiftInterface,\n isEdit: false,\n filters: [\n {\n name: 'Darkstores',\n model: 'darkstoreIds',\n type: 'checkbox',\n dataLoading: true,\n fetchDataOnExpand: true,\n dataRequested: false,\n actionName: 'darkstores',\n data: []\n }\n ]\n }\n },\n computed: {\n workShifts (): WorkShiftInterface[] {\n return this.$store.getters['workShifts/getWorkShifts']\n },\n pagination (): PaginationInterface {\n return this.$store.getters['workShifts/getPagination']\n },\n loading (): boolean {\n return this.$store.getters['workShifts/getLoading']\n },\n darkstores (): any {\n return this.$store.getters['darkstores/getDarkStoresAsDictionary']\n }\n },\n mounted () {\n this.height = document.documentElement.clientHeight - 280\n addEventListener('resize', () => {\n this.height = document.documentElement.clientHeight - 280\n })\n },\n watch: {\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 ? this.searchValue : undefined } })\n },\n darkstores: {\n immediate: true,\n handler (val) {\n const target = this.filters[0]\n target.data = val\n target.dataLoading = false\n }\n },\n $route: {\n immediate: true,\n handler (val) {\n if (val.name === 'WorkShifts') {\n this.current = val.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(`workShifts/${WorkShiftActions.FETCH_WORK_SHIFTS}`, params)\n }\n }\n }\n },\n methods: {\n editShift (shift: WorkShiftInterface): void {\n this.selectedShift = shift\n this.showModal = true\n this.isEdit = true\n },\n onExpand (event: any): void {\n if (event === 'darkstores') {\n if (!this.darkstores.length) {\n this.$store.dispatch(`darkstores/${DarkStoresActions.FETCH_DARKSTORES}`, { pageNumber: 1, pageSize: 100 })\n }\n }\n }\n }\n})\n","import { render } from \"./WorkShifts.vue?vue&type=template&id=c39571b2&scoped=true&ts=true\"\nimport script from \"./WorkShifts.vue?vue&type=script&lang=ts\"\nexport * from \"./WorkShifts.vue?vue&type=script&lang=ts\"\n\nimport \"./WorkShifts.vue?vue&type=style&index=0&id=c39571b2&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-c39571b2\"]])\n\nexport default __exports__"],"sourceRoot":""}