{"version":3,"sources":["webpack:///./src/helpers/user.ts","webpack:///./src/views/admin/stages/AdminStage.vue?af80","webpack:///./src/views/admin/stages/AdminStage.vue","webpack:///./src/views/admin/stages/AdminStage.vue?8cf6","webpack:///./src/views/admin/stages/AdminStage.vue?f45f"],"names":["getFirstLastName","user","cov_1fefz040v6","f","s","b","firstName","lastName","getFullName","middleName","_withScopeId","n","_pushScopeId","_popScopeId","_hoisted_1","class","_hoisted_2","_hoisted_3","_hoisted_4","_hoisted_5","_createElementVNode","_hoisted_6","_hoisted_7","_hoisted_8","key","_hoisted_9","_hoisted_10","_hoisted_11","_hoisted_12","_hoisted_13","_hoisted_14","_hoisted_15","_hoisted_16","_hoisted_17","_hoisted_18","render","_ctx","_cache","$props","$setup","$data","$options","_component_router_link","_resolveComponent","_component_router_view","_openBlock","_createElementBlock","_createVNode","to","name","params","userId","default","_withCtx","_createTextVNode","_toDisplayString","_","estateId","estate","title","stage","_normalizeClass","getStageStatusClass","status","stageId","_createCommentVNode","modelValue","currentTab","$event","list","tabs","slots","customSwitch","item","onClick","toTab","label","role","UserRoles","SUPER_ADMIN","_defineComponent","__name","setup","__props","expose","__expose","router","currentRoute","value","ref","find","fullPath","includes","tab","push","replace","onMounted","store","dispatch","then","res","data","__returned__","SwitchComponent","UserInterface","EstateInterface","StageInterface","Object","defineProperty","enumerable","__exports__"],"mappings":"6/IAEM,SAAUA,EAAiBC,GAC/B,OADkDC,IAAAC,EAAA,KAAAD,IAAAE,EAAA,KAC3CH,GAAIC,IAAAG,EAAA,QAAG,GAAGJ,EAAKK,WAASJ,IAAAG,EAAA,QAAGJ,EAAKK,YAASJ,IAAAG,EAAA,QAAG,OAAMJ,EAAKM,UAAQL,IAAAG,EAAA,QAAGJ,EAAKM,WAAQL,IAAAG,EAAA,QAAG,QAAIH,IAAAG,EAAA,QAAG,IAE5F,SAAUG,EAAYP,GAC1B,OAD6CC,IAAAC,EAAA,KAAAD,IAAAE,EAAA,KACtCH,GAAIC,IAAAG,EAA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AMH,aAAYQ,QAAOqB,yBAAWP,aAAK,aAAe,OAAOH,cAAU,YAAc,OAAOW,cAASM,6BAAiB,oBAAsB,OAAOC,oBAAiB,sBAAwB,OAAOC,sBAAmB,qBAAuB,OAAOC,qBAAkB,gBAAkB,OAAO5B,gBAAa,uBAAyB,OAAO9E,uBAAoB,0BAA4B,OAAO8D,2BAE5c,OADA6C,OAAOC,eAAeN,EAAc,kBAAmB,CAAEO,YAAY,EAAOrB,OAAO,IAC5Ec,K,iCC3CP,MAAMQ,EAA2B,IAAgB,EAAQ,CAAC,CAAC,SAAS3E,GAAQ,CAAC,YAAY,qBAE1E,gB,oCCTf,W","file":"js/admin25.4be42ffe.js","sourcesContent":["import { UserInterface } from \"@/types/UserInterface\";\n\nexport function getFirstLastName(user: UserInterface) {\n return user ? `${user.firstName ? user.firstName : \"\"} ${user.lastName ? user.lastName : \"\"}` : \"\";\n}\nexport function getFullName(user: UserInterface) {\n return user ? `${user.firstName} ${user.middleName} ${user.lastName}` : \"\";\n}\n","import { toDisplayString as _toDisplayString, createTextVNode as _createTextVNode, resolveComponent as _resolveComponent, withCtx as _withCtx, createVNode as _createVNode, createElementVNode as _createElementVNode, normalizeClass as _normalizeClass, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-4b10c49d\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = { class: \"admin-page-wr\" }\nconst _hoisted_2 = { class: \"dashboard-header\" }\nconst _hoisted_3 = { class: \"breadcrumb-wrapper-main\" }\nconst _hoisted_4 = { class: \"breadcrumb\" }\nconst _hoisted_5 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"div\", { class: \"delimiter\" }, null, -1))\nconst _hoisted_6 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"div\", { class: \"delimiter\" }, null, -1))\nconst _hoisted_7 = { class: \"current-breadcrumb\" }\nconst _hoisted_8 = {\n key: 0,\n class: \"card\"\n}\nconst _hoisted_9 = { class: \"info-wr\" }\nconst _hoisted_10 = { class: \"block\" }\nconst _hoisted_11 = { class: \"row\" }\nconst _hoisted_12 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"div\", { class: \"row-title\" }, \"Stage:\", -1))\nconst _hoisted_13 = { class: \"row-value\" }\nconst _hoisted_14 = { class: \"row\" }\nconst _hoisted_15 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"div\", { class: \"row-title\" }, \"Status:\", -1))\nconst _hoisted_16 = { class: \"controls\" }\nconst _hoisted_17 = { class: \"wrapper-switch\" }\nconst _hoisted_18 = [\"onClick\"]\n\nexport function render(_ctx: any,_cache: any,$props: any,$setup: any,$data: any,$options: any) {\n const _component_router_link = _resolveComponent(\"router-link\")!\n const _component_router_view = _resolveComponent(\"router-view\")!\n\n return (_openBlock(), _createElementBlock(\"div\", _hoisted_1, [\n _createElementVNode(\"div\", _hoisted_2, [\n _createElementVNode(\"div\", _hoisted_3, [\n _createElementVNode(\"div\", _hoisted_4, [\n _createVNode(_component_router_link, {\n to: { name: 'AdminUser', params: { userId: $setup.userId } }\n }, {\n default: _withCtx(() => [\n _createTextVNode(_toDisplayString($setup.getFirstLastName($setup.user)), 1)\n ]),\n _: 1\n }, 8, [\"to\"]),\n _hoisted_5,\n _createVNode(_component_router_link, {\n to: { name: 'AdminEstate', params: { userId: $setup.userId, estateId: $setup.estateId } }\n }, {\n default: _withCtx(() => [\n _createTextVNode(_toDisplayString($setup.estate ? $setup.estate.title : \"\"), 1)\n ]),\n _: 1\n }, 8, [\"to\"]),\n _hoisted_6,\n _createElementVNode(\"div\", _hoisted_7, \"Stage \" + _toDisplayString($setup.stage ? $setup.stage.title : \"\"), 1)\n ])\n ])\n ]),\n ($setup.stage)\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_8, [\n _createElementVNode(\"div\", _hoisted_9, [\n _createElementVNode(\"div\", _hoisted_10, [\n _createElementVNode(\"div\", _hoisted_11, [\n _hoisted_12,\n _createElementVNode(\"div\", _hoisted_13, _toDisplayString($setup.stage.title), 1)\n ]),\n _createElementVNode(\"div\", _hoisted_14, [\n _hoisted_15,\n _createElementVNode(\"div\", {\n class: _normalizeClass([\"badge\", $setup.getStageStatusClass($setup.stage.status)])\n }, _toDisplayString($setup.stage.status), 3)\n ])\n ])\n ]),\n _createElementVNode(\"div\", _hoisted_16, [\n _createVNode(_component_router_link, {\n class: \"button default edit\",\n to: { name: 'AdminStageUpdate', params: { userId: $setup.userId, estateId: $setup.estateId, stageId: $setup.stageId } }\n }, {\n default: _withCtx(() => [\n _createTextVNode(\"Edit Stage\")\n ]),\n _: 1\n }, 8, [\"to\"])\n ])\n ]))\n : _createCommentVNode(\"\", true),\n _createElementVNode(\"div\", _hoisted_17, [\n _createVNode($setup[\"SwitchComponent\"], {\n modelValue: $setup.currentTab,\n \"onUpdate:modelValue\": _cache[0] || (_cache[0] = ($event: any) => (($setup.currentTab) = $event)),\n list: $setup.tabs,\n slots: ['customSwitch']\n }, {\n customSwitch: _withCtx((item) => [\n _createElementVNode(\"span\", {\n class: \"switch-item--text\",\n onClick: ($event: any) => ($setup.toTab(item.label))\n }, _toDisplayString(item.label), 9, _hoisted_18)\n ]),\n _: 1\n }, 8, [\"modelValue\"])\n ]),\n _createVNode(_component_router_view, {\n role: $setup.UserRoles.SUPER_ADMIN\n }, null, 8, [\"role\"])\n ]))\n}","import { defineComponent as _defineComponent } from 'vue'\nimport { onMounted, ref } from \"vue\";\nimport router from \"@/router\";\nimport store from \"@/store\";\nimport SwitchComponent from \"@/components/ui/SwitchComponent.vue\";\nimport { UserInterface } from \"@/types/UserInterface\";\nimport { EstateInterface } from \"@/types/EstateInterface\";\nimport { StageInterface } from \"@/types/StageInterface\";\nimport { UserRoles } from \"@/enums/UserRoles\";\nimport { getFirstLastName } from \"@/helpers/user\";\nimport { getStageStatusClass } from \"@/helpers/status\";\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'AdminStage',\n setup(__props, { expose: __expose }) {\n __expose();\n\nconst userId = router.currentRoute.value.params.userId;\nconst estateId = router.currentRoute.value.params.estateId;\nconst stageId = router.currentRoute.value.params.stageId;\nconst user = ref(null);\nconst estate = ref(null);\nconst stage = ref(null);\nconst tabs = [{ label: \"lots\" }, { label: \"map\" }];\nconst currentTab = ref(\n tabs.find((label) => router.currentRoute.value.fullPath.includes(label.label))\n);\nfunction toTab(tab: string) {\n if (currentTab.value.label !== tab) {\n router.push(\n router.currentRoute.value.fullPath.replace(currentTab.value.label, tab)\n );\n }\n}\n\nonMounted(() => {\n store.dispatch(\"user/getUser\", userId).then((res) => {\n user.value = res.data;\n });\n store.dispatch(\"estate/getEstate\", estateId).then((res) => {\n estate.value = res.data;\n });\n store.dispatch(\"stage/getStage\", stageId).then((res) => {\n stage.value = res.data;\n });\n});\n\nconst __returned__ = { userId, estateId, stageId, user, estate, stage, tabs, currentTab, toTab, onMounted, ref, get router() { return router }, get store() { return store }, SwitchComponent, get UserInterface() { return UserInterface }, get EstateInterface() { return EstateInterface }, get StageInterface() { return StageInterface }, get UserRoles() { return UserRoles }, get getFirstLastName() { return getFirstLastName }, get getStageStatusClass() { return getStageStatusClass } }\nObject.defineProperty(__returned__, '__isScriptSetup', { enumerable: false, value: true })\nreturn __returned__\n}\n\n})","import { render } from \"./AdminStage.vue?vue&type=template&id=4b10c49d&scoped=true&ts=true&lang=pug\"\nimport script from \"./AdminStage.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./AdminStage.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./AdminStage.vue?vue&type=style&index=0&id=4b10c49d&lang=scss&scoped=true\"\n\nimport exportComponent from \"/codebuild/output/src264950160/src/lottrackr-front/node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['render',render],['__scopeId',\"data-v-4b10c49d\"]])\n\nexport default __exports__","export * from \"-!../../../../node_modules/@vue/cli-service/node_modules/mini-css-extract-plugin/dist/loader.js??ref--9-oneOf-1-0!../../../../node_modules/@vue/cli-service/node_modules/css-loader/dist/cjs.js??ref--9-oneOf-1-1!../../../../node_modules/@vue/cli-service/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/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../../node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist/index.js??ref--1-1!./AdminStage.vue?vue&type=style&index=0&id=4b10c49d&lang=scss&scoped=true\""],"sourceRoot":""}