{"version":3,"sources":["webpack:///./src/views/admin/users/AdminUser.vue?dadc","webpack:///./src/views/admin/users/AdminUser.vue","webpack:///./src/views/admin/users/AdminUser.vue?731a","webpack:///./src/views/admin/users/AdminUser.vue?aa70","webpack:///./src/features/useRoleByRouteInAdmin.ts","webpack:///./src/components/ui/modals/ConfirmDeleteModal.vue?34c2","webpack:///./src/components/ui/modals/ConfirmDeleteModal.vue","webpack:///./src/components/ui/modals/ConfirmDeleteModal.vue?25ca","webpack:///./src/helpers/debounce.ts","webpack:///./src/components/ui/modals/ConfirmDeleteModal.vue?8f89","webpack:///./src/helpers/user.ts","webpack:///./src/helpers/showResponseErrorMessage.ts"],"names":["_withScopeId","n","_pushScopeId","_popScopeId","_hoisted_1","class","_hoisted_2","key","_hoisted_3","_hoisted_4","_hoisted_5","_hoisted_6","_hoisted_7","_createElementVNode","_hoisted_8","_hoisted_9","_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","_hoisted_27","_hoisted_28","_hoisted_29","_hoisted_30","_hoisted_31","_hoisted_32","_hoisted_33","_hoisted_34","_hoisted_35","_hoisted_36","_hoisted_37","_hoisted_38","_hoisted_39","_hoisted_40","_hoisted_41","_hoisted_42","_hoisted_43","_hoisted_44","_hoisted_45","_hoisted_46","_hoisted_47","_hoisted_48","_hoisted_49","_hoisted_50","_hoisted_51","_hoisted_52","_hoisted_53","_hoisted_54","_hoisted_55","_hoisted_56","_hoisted_57","render","_ctx","_cache","$props","$setup","$data","$options","_$setup$user","_$setup$user$detailsI","_$setup$user2","_$setup$user2$details","_$setup$user3","_$setup$user3$details","_$setup$user4","_$setup$user4$details","_component_router_link","_resolveComponent","_openBlock","_createElementBlock","user","_toDisplayString","detailsId","companyName","companyAddress","getFirstLastName","email","phone","roleByRoute","UserRoles","LAWYER","isExist","zeptoAccId","_createCommentVNode","abnAcn","chargebeeCustomerId","onClick","onCheckConnection","_createTextVNode","verifiedEmail","$event","resendEmail","type","isInvited","isOpenedDeleteLawyerModal","src","require","toEditUser","toEditUserDetails","estates","length","_createVNode","modelValue","searchQuery","placeholder","theme","toCreateEstate","LANDOWNER","_Fragment","_renderList","estate","toEstate","_id","title","address","_normalizeClass","yellow","isRefundable","isActive","_withModifiers","to","name","params","userId","estateId","setItemForDelete","isOpen","showConfirmDeleteModal","deleteItem","itemForDelete","onClose","onConfirm","deleteEstate","id","onDeleteLawyer","_defineComponent","__name","setup","__props","expose","__expose","useRoleByRouteInAdmin","toast","useToast","router","currentRoute","value","ref","watch","debounceSearch","onMounted","fetchUser","getEstates","store","dispatch","then","res","data","userData","success","sendLawyerInvite","EstateApi","lawyerInvitation","catch","error","userKey","filterEstatesByLandownerId","filter","landownerId","debounce","currentEstate","find","push","showResponseErrorMessage","checkLawyerConnection","UserApi","deleteLawyer","__returned__","ConfirmDeleteModal","InputSearch","UserInterface","EstateInterface","Object","defineProperty","enumerable","__exports__","cov_1axvepug94","f","s","b","meta","role","immediate","_createBlock","close","confirm","_withCtx","description","text","isLeadsPage","_","props","Boolean","required","Number","String","customText","emits","emit","computed","LotAssignmentModal","fn","delay","cov_2irbpckthq","timeout","args","clearTimeout","setTimeout","cov_1fefz040v6","firstName","lastName","getFullName","middleName","cov_uu553htkh","_error$response","response","message"],"mappings":"2JAEA,MAAMA,EAAeC,IAAMC,yBAAa,mBAAmBD,EAAEA,IAAIE,0BAAcF,GACzEG,EAAa,CAAEC,MAAO,iBACtBC,EAAa,CACjBC,IAAK,EACLF,MAAO,oBAEHG,EAAa,CAAEH,MAAO,QACtBI,EAAa,CAAEJ,MAAO,WACtBK,EAAa,CAAEL,MAAO,SACtBM,EAAa,CAAEN,MAAO,OACtBO,EAA2BZ,EAAa,IAAmBa,gCAAoB,MAAO,CAAER,MAAO,aAAe,iBAAkB,IAChIS,EAAa,CAAET,MAAO,aAC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T,IAC5B,IAAA4D,GADuDD,IAAApC,EAAA,KAAAoC,IAAAnC,EAAA,KAC9DxB,IAAO2D,IAAAlC,EAAA,QAAAkC,IAAAnC,EAAA,KACS,QAAlBoC,EAAI5D,EAAM6D,gBAAQ,IAAAD,GAAdA,EAAgBnE,KAAKqE,SAASH,IAAAlC,EAAA,QAAAkC,IAAAnC,EAAA,KAChC9C,EAAMsB,MAAMA,EAAM6D,SAASpE,KAAKqE,WAC3BH,IAAAlC,EAAA,QAAAkC,IAAAnC,EAAA,KACL9C,EAAMsB,MAAM,0BAEf2D,IAAAlC,EAAA","file":"js/admin32.e654da22.js","sourcesContent":["import { createElementVNode as _createElementVNode, toDisplayString as _toDisplayString, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, createTextVNode as _createTextVNode, createVNode as _createVNode, renderList as _renderList, Fragment as _Fragment, normalizeClass as _normalizeClass, resolveComponent as _resolveComponent, withModifiers as _withModifiers, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-661c2d38\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = { class: \"admin-page-wr\" }\nconst _hoisted_2 = {\n key: 0,\n class: \"dashboard-header\"\n}\nconst _hoisted_3 = { class: \"card\" }\nconst _hoisted_4 = { class: \"info-wr\" }\nconst _hoisted_5 = { class: \"block\" }\nconst _hoisted_6 = { class: \"row\" }\nconst _hoisted_7 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"div\", { class: \"row-title\" }, \"Company name:\", -1))\nconst _hoisted_8 = { class: \"row-value\" }\nconst _hoisted_9 = { class: \"row\" }\nconst _hoisted_10 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"div\", { class: \"row-title\" }, \"Company address:\", -1))\nconst _hoisted_11 = { class: \"row-value\" }\nconst _hoisted_12 = { class: \"row\" }\nconst _hoisted_13 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"div\", { class: \"row-title\" }, \"Contact person:\", -1))\nconst _hoisted_14 = { class: \"row-value\" }\nconst _hoisted_15 = { class: \"row\" }\nconst _hoisted_16 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"div\", { class: \"row-title\" }, \"Email:\", -1))\nconst _hoisted_17 = { class: \"row-value\" }\nconst _hoisted_18 = { class: \"row\" }\nconst _hoisted_19 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"div\", { class: \"row-title\" }, \"Phone:\", -1))\nconst _hoisted_20 = { class: \"row-value\" }\nconst _hoisted_21 = {\n key: 0,\n class: \"row\"\n}\nconst _hoisted_22 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"div\", { class: \"row-title\" }, \"Zepo contact id:\", -1))\nconst _hoisted_23 = { class: \"row-value\" }\nconst _hoisted_24 = {\n key: 1,\n class: \"row\"\n}\nconst _hoisted_25 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"div\", { class: \"row-title\" }, \"ABN / ACN:\", -1))\nconst _hoisted_26 = { class: \"row-value\" }\nconst _hoisted_27 = {\n key: 2,\n class: \"row\"\n}\nconst _hoisted_28 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"div\", { class: \"row-title\" }, \"Chargebee:\", -1))\nconst _hoisted_29 = { class: \"row-value\" }\nconst _hoisted_30 = { class: \"row\" }\nconst _hoisted_31 = {\n key: 0,\n class: \"row\"\n}\nconst _hoisted_32 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"div\", { class: \"row-title\" }, \"Status:\", -1))\nconst _hoisted_33 = {\n key: 0,\n class: \"row-value\"\n}\nconst _hoisted_34 = {\n key: 1,\n class: \"row-value\"\n}\nconst _hoisted_35 = {\n key: 1,\n class: \"row\"\n}\nconst _hoisted_36 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"div\", { class: \"row-title\" }, \"Status:\", -1))\nconst _hoisted_37 = { class: \"row-value\" }\nconst _hoisted_38 = {\n key: 3,\n class: \"row row--delete-user\"\n}\nconst _hoisted_39 = [\"src\"]\nconst _hoisted_40 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"span\", null, \"Delete Trust Account\", -1))\nconst _hoisted_41 = { class: \"title-main\" }\nconst _hoisted_42 = { class: \"subtitle-main\" }\nconst _hoisted_43 = { class: \"filters\" }\nconst _hoisted_44 = { class: \"buttons\" }\nconst _hoisted_45 = { class: \"table-wrapper\" }\nconst _hoisted_46 = { class: \"table-default\" }\nconst _hoisted_47 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"th\", null, \"Title\", -1))\nconst _hoisted_48 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"th\", null, \"Address\", -1))\nconst _hoisted_49 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"th\", null, \"Initial Deposit\", -1))\nconst _hoisted_50 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"th\", null, \"Status\", -1))\nconst _hoisted_51 = { key: 0 }\nconst _hoisted_52 = [\"onClick\"]\nconst _hoisted_53 = { class: \"bold\" }\nconst _hoisted_54 = { class: \"status\" }\nconst _hoisted_55 = {\n key: 0,\n class: \"actions\"\n}\nconst _hoisted_56 = { class: \"actions-wr\" }\nconst _hoisted_57 = [\"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\n return (_openBlock(), _createElementBlock(\"div\", _hoisted_1, [\n ($setup.user)\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_2, [\n _createElementVNode(\"div\", _hoisted_3, [\n _createElementVNode(\"div\", _hoisted_4, [\n _createElementVNode(\"div\", _hoisted_5, [\n _createElementVNode(\"div\", _hoisted_6, [\n _hoisted_7,\n _createElementVNode(\"div\", _hoisted_8, _toDisplayString($setup.user.detailsId.companyName), 1)\n ]),\n _createElementVNode(\"div\", _hoisted_9, [\n _hoisted_10,\n _createElementVNode(\"div\", _hoisted_11, _toDisplayString($setup.user.detailsId.companyAddress), 1)\n ]),\n _createElementVNode(\"div\", _hoisted_12, [\n _hoisted_13,\n _createElementVNode(\"div\", _hoisted_14, _toDisplayString($setup.getFirstLastName($setup.user)), 1)\n ]),\n _createElementVNode(\"div\", _hoisted_15, [\n _hoisted_16,\n _createElementVNode(\"div\", _hoisted_17, _toDisplayString($setup.user.email), 1)\n ]),\n _createElementVNode(\"div\", _hoisted_18, [\n _hoisted_19,\n _createElementVNode(\"div\", _hoisted_20, _toDisplayString($setup.user.phone), 1)\n ]),\n ($setup.roleByRoute === $setup.UserRoles.LAWYER)\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_21, [\n _hoisted_22,\n _createElementVNode(\"div\", _hoisted_23, _toDisplayString($setup.user?.detailsId?.isExist ? $setup.user.detailsId.zeptoAccId : \"-\"), 1)\n ]))\n : _createCommentVNode(\"\", true),\n ($setup.roleByRoute !== $setup.UserRoles.LAWYER)\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_24, [\n _hoisted_25,\n _createElementVNode(\"div\", _hoisted_26, _toDisplayString($setup.user.detailsId.abnAcn), 1)\n ]))\n : _createCommentVNode(\"\", true),\n ($setup.roleByRoute !== $setup.UserRoles.LAWYER)\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_27, [\n _hoisted_28,\n _createElementVNode(\"div\", _hoisted_29, _toDisplayString($setup.user?.detailsId?.chargebeeCustomerId ? $setup.user.detailsId.chargebeeCustomerId : \"-\"), 1)\n ]))\n : _createCommentVNode(\"\", true),\n _createElementVNode(\"div\", _hoisted_30, [\n ($setup.roleByRoute === $setup.UserRoles.LAWYER)\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_31, [\n _hoisted_32,\n ($setup.user?.detailsId?.isExist)\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_33, \"Active\"))\n : (_openBlock(), _createElementBlock(\"div\", _hoisted_34, [\n (!$setup.user?.detailsId?.isExist)\n ? (_openBlock(), _createElementBlock(\"button\", {\n key: 0,\n class: \"button resend\",\n onClick: $setup.onCheckConnection\n }, \"Check connection\"))\n : _createCommentVNode(\"\", true)\n ]))\n ]))\n : (_openBlock(), _createElementBlock(\"div\", _hoisted_35, [\n _hoisted_36,\n _createElementVNode(\"div\", _hoisted_37, [\n _createTextVNode(_toDisplayString($setup.user.verifiedEmail ? \"Active\" : \"\"), 1),\n (!$setup.user.verifiedEmail)\n ? (_openBlock(), _createElementBlock(\"button\", {\n key: 0,\n class: \"button resend\",\n onClick: _cache[0] || (_cache[0] = ($event: any) => ($setup.resendEmail($setup.user))),\n type: \"button\"\n }, _toDisplayString($setup.user.detailsId.isInvited ? 'Resend invite' : 'Send invite'), 1))\n : _createCommentVNode(\"\", true)\n ])\n ]))\n ]),\n ($setup.roleByRoute === $setup.UserRoles.LAWYER)\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_38, [\n _createElementVNode(\"button\", {\n class: \"button button-with-icon\",\n onClick: _cache[1] || (_cache[1] = ($event: any) => ($setup.isOpenedDeleteLawyerModal = true))\n }, [\n _createElementVNode(\"img\", {\n src: require(`@/assets/icons/trash.svg`)\n }, null, 8, _hoisted_39),\n _hoisted_40\n ])\n ]))\n : _createCommentVNode(\"\", true)\n ])\n ]),\n _createElementVNode(\"div\", { class: \"controls\" }, [\n _createElementVNode(\"button\", {\n class: \"button default edit\",\n onClick: $setup.toEditUser\n }, \"Edit User\"),\n _createElementVNode(\"button\", {\n class: \"button default edit\",\n onClick: $setup.toEditUserDetails\n }, \"Edit Company Details\")\n ])\n ]),\n _createElementVNode(\"h3\", _hoisted_41, _toDisplayString($setup.roleByRoute === $setup.UserRoles.LAWYER ? \"Connected Estates\" : \"Estates\"), 1),\n _createElementVNode(\"h3\", _hoisted_42, _toDisplayString(`${$setup.estates.length} estate${$setup.estates.length > 1 ? \"s\" : \"\"}`), 1)\n ]))\n : _createCommentVNode(\"\", true),\n _createElementVNode(\"div\", _hoisted_43, [\n _createVNode($setup[\"InputSearch\"], {\n modelValue: $setup.searchQuery,\n \"onUpdate:modelValue\": _cache[2] || (_cache[2] = ($event: any) => (($setup.searchQuery) = $event)),\n placeholder: \"Search\",\n theme: \"filter\"\n }, null, 8, [\"modelValue\"]),\n _createElementVNode(\"div\", _hoisted_44, [\n ($setup.roleByRoute !== $setup.UserRoles.LAWYER)\n ? (_openBlock(), _createElementBlock(\"button\", {\n key: 0,\n class: \"button default primary add-btn-primary\",\n onClick: $setup.toCreateEstate\n }, \"Add Estate\"))\n : _createCommentVNode(\"\", true)\n ])\n ]),\n _createElementVNode(\"div\", _hoisted_45, [\n _createElementVNode(\"table\", _hoisted_46, [\n _createElementVNode(\"thead\", null, [\n _createElementVNode(\"tr\", null, [\n _hoisted_47,\n _hoisted_48,\n _hoisted_49,\n _hoisted_50,\n ($setup.roleByRoute === $setup.UserRoles.LANDOWNER)\n ? (_openBlock(), _createElementBlock(\"th\", _hoisted_51, \"Action\"))\n : _createCommentVNode(\"\", true)\n ])\n ]),\n _createElementVNode(\"tbody\", null, [\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList($setup.estates, (estate) => {\n return (_openBlock(), _createElementBlock(\"tr\", {\n onClick: ($event: any) => ($setup.toEstate(estate._id))\n }, [\n _createElementVNode(\"td\", _hoisted_53, _toDisplayString(estate.title), 1),\n _createElementVNode(\"td\", null, _toDisplayString(estate.address), 1),\n _createElementVNode(\"td\", null, [\n _createElementVNode(\"div\", {\n class: _normalizeClass([\"badge success\", { yellow: !estate.isRefundable }])\n }, _toDisplayString(estate.isRefundable ? \"Refundable\" : \"Not refundable\"), 3)\n ]),\n _createElementVNode(\"td\", _hoisted_54, _toDisplayString(estate.isActive ? \"Active\" : \"Draft\"), 1),\n ($setup.roleByRoute === $setup.UserRoles.LANDOWNER)\n ? (_openBlock(), _createElementBlock(\"td\", _hoisted_55, [\n _createElementVNode(\"div\", _hoisted_56, [\n _createVNode(_component_router_link, {\n class: \"icon edit\",\n onClick: _cache[3] || (_cache[3] = _withModifiers(() => {}, [\"stop\"])),\n to: { name: $setup.roleByRoute === $setup.UserRoles.LAWYER ? 'AdminEstateUpdateLawyer' : 'AdminEstateUpdate', params: { userId: $setup.userId, estateId: estate._id } }\n }, null, 8, [\"to\"]),\n _createElementVNode(\"button\", {\n class: \"icon trash\",\n onClick: _withModifiers(($event: any) => ($setup.setItemForDelete(estate)), [\"stop\"])\n }, null, 8, _hoisted_57)\n ])\n ]))\n : _createCommentVNode(\"\", true)\n ], 8, _hoisted_52))\n }), 256))\n ])\n ])\n ]),\n _createVNode($setup[\"ConfirmDeleteModal\"], {\n isOpen: $setup.showConfirmDeleteModal,\n deleteItem: $setup.itemForDelete.title,\n onClose: _cache[4] || (_cache[4] = ($event: any) => ($setup.showConfirmDeleteModal = false)),\n onConfirm: _cache[5] || (_cache[5] = ($event: any) => ($setup.deleteEstate($setup.itemForDelete.id)))\n }, null, 8, [\"isOpen\", \"deleteItem\"]),\n _createVNode($setup[\"ConfirmDeleteModal\"], {\n isOpen: $setup.isOpenedDeleteLawyerModal,\n onClose: _cache[6] || (_cache[6] = ($event: any) => ($setup.isOpenedDeleteLawyerModal = false)),\n onConfirm: $setup.onDeleteLawyer,\n deleteItem: $setup.getFirstLastName($setup.user)\n }, null, 8, [\"isOpen\", \"deleteItem\"])\n ]))\n}","import { defineComponent as _defineComponent } from 'vue'\nimport ConfirmDeleteModal from \"@/components/ui/modals/ConfirmDeleteModal.vue\";\nimport InputSearch from \"@/components/ui/input/InputSearch.vue\";\nimport {onMounted, ref, watch} from \"vue\";\nimport router from \"@/router\";\nimport store from \"@/store\";\nimport {UserInterface} from \"@/types/UserInterface\";\nimport {EstateInterface} from \"@/types/EstateInterface\";\nimport {getFirstLastName} from \"@/helpers/user\";\nimport {debounce} from \"@/helpers/debounce\";\nimport {useToast} from \"vue-toastification\";\nimport {UserRoles} from \"@/enums/UserRoles\";\nimport {useRoleByRouteInAdmin} from \"@/features/useRoleByRouteInAdmin\";\nimport UserApi from \"@/services/api/userApi\";\nimport EstateApi from \"@/services/api/estateApi\";\nimport { showResponseErrorMessage } from \"@/helpers/showResponseErrorMessage\";\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'AdminUser',\n setup(__props, { expose: __expose }) {\n __expose();\n\nconst {roleByRoute} = useRoleByRouteInAdmin();\n\nconst toast = useToast();\nconst userId = router.currentRoute.value.params.userId;\nconst estates = ref([]);\nconst user = ref(null);\nconst searchQuery = ref(\"\");\nconst showConfirmDeleteModal = ref(false);\nconst itemForDelete = ref({ id: \"\", title: \"\" });\nconst isOpenedDeleteLawyerModal = ref(false);\n\nwatch(\n () => searchQuery.value,\n () => {\n debounceSearch();\n }\n);\n\nonMounted(() => {\n fetchUser();\n getEstates();\n});\n\nconst fetchUser = () => {\n store.dispatch(\"user/getUser\", userId).then((res) => {\n user.value = res.data;\n });\n};\nconst resendEmail = (userData: UserInterface) => {\n store\n .dispatch(\"user/resendActivationEmail\", {\n email: userData.email,\n userId: userData._id,\n })\n .then(() => {\n toast.success(\"Email was successfully sent\");\n if (!user.value.detailsId.isInvited) {\n user.value.detailsId.isInvited = true;\n }\n });\n};\nconst sendLawyerInvite = () => {\n EstateApi.lawyerInvitation(userId)\n .then(() => {\n fetchUser();\n toast.success(\"The invite was sent successfully\");\n })\n .catch(() => {\n toast.error(\"Something went wrong\");\n });\n};\nconst getEstates = () => {\n const userKey =\n roleByRoute.value === UserRoles.LAWYER ? \"lawyerId\" : \"landownerId\";\n store\n .dispatch(\"estate/getEstates\", {\n [userKey]: userId,\n title: searchQuery.value,\n })\n .then((res) => {\n estates.value = filterEstatesByLandownerId(res.data);\n });\n};\nconst filterEstatesByLandownerId = (estates: EstateInterface[]) => {\n return estates.filter((estate) => estate.landownerId._id === userId);\n};\n\nconst debounceSearch = debounce(getEstates);\nconst toEstate = (id: string) => {\n const currentEstate = estates.value.find((estate) => estate._id === id);\n const landownerId = currentEstate?.landownerId._id;\n router.push({\n name: \"AdminEstate\",\n params: { userId: landownerId, estateId: id },\n });\n};\nconst toCreateEstate = () => {\n router.push({\n name: \"AdminEstateCreate\",\n });\n};\nconst toEditUser = () => {\n router.push({\n name:\n roleByRoute.value === UserRoles.LAWYER\n ? \"AdminLawyerUpdate\"\n : \"AdminUserUpdate\",\n params: { userId },\n });\n};\nconst toEditUserDetails = () => {\n router.push({\n name:\n roleByRoute.value === UserRoles.LAWYER\n ? \"AdminLawyerDetailsUpdate\"\n : \"AdminLandownerDetailsUpdate\",\n params: { userId },\n });\n};\nconst deleteEstate = (id: string) => {\n store\n .dispatch(\"estate/deleteEstate\", id)\n .then(() => {\n getEstates();\n toast.success(\"The estate was successfully deleted\");\n })\n .catch((error) => {\n showResponseErrorMessage(error);\n });\n};\nconst setItemForDelete = (estate: EstateInterface) => {\n itemForDelete.value = { id: estate._id, title: estate.title };\n showConfirmDeleteModal.value = true;\n};\nconst onCheckConnection = () => {\n EstateApi.checkLawyerConnection(userId)\n .then(() => {\n toast.success(\"Zepto contact is verified\");\n fetchUser();\n })\n .catch((error) => {\n showResponseErrorMessage(error);\n });\n};\nconst onDeleteLawyer = () => {\n UserApi.deleteLawyer(user.value._id)\n .then(() => {\n router.push({ name: \"AdminLawyers\" });\n toast.success(\"The trust account was successfully deleted\");\n })\n .catch((error) => {\n showResponseErrorMessage(error);\n });\n};\n\nconst __returned__ = { roleByRoute, toast, userId, estates, user, searchQuery, showConfirmDeleteModal, itemForDelete, isOpenedDeleteLawyerModal, fetchUser, resendEmail, sendLawyerInvite, getEstates, filterEstatesByLandownerId, debounceSearch, toEstate, toCreateEstate, toEditUser, toEditUserDetails, deleteEstate, setItemForDelete, onCheckConnection, onDeleteLawyer, ConfirmDeleteModal, InputSearch, onMounted, ref, watch, get router() { return router }, get store() { return store }, get UserInterface() { return UserInterface }, get EstateInterface() { return EstateInterface }, get getFirstLastName() { return getFirstLastName }, get debounce() { return debounce }, get useToast() { return useToast }, get UserRoles() { return UserRoles }, get useRoleByRouteInAdmin() { return useRoleByRouteInAdmin }, get UserApi() { return UserApi }, get EstateApi() { return EstateApi }, get showResponseErrorMessage() { return showResponseErrorMessage } }\nObject.defineProperty(__returned__, '__isScriptSetup', { enumerable: false, value: true })\nreturn __returned__\n}\n\n})","import { render } from \"./AdminUser.vue?vue&type=template&id=661c2d38&scoped=true&ts=true&lang=pug\"\nimport script from \"./AdminUser.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./AdminUser.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./AdminUser.vue?vue&type=style&index=0&id=661c2d38&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-661c2d38\"]])\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!./AdminUser.vue?vue&type=style&index=0&id=661c2d38&lang=scss&scoped=true\"","import { ref, Ref, watch } from \"vue\";\nimport router from \"@/router\";\nimport { UserRoles } from \"@/enums/UserRoles\";\n\nexport function useRoleByRouteInAdmin(): { roleByRoute: Ref } {\n const roleByRoute = ref(\"\" as UserRoles);\n\n watch(\n () => router.currentRoute.value,\n (value) => {\n roleByRoute.value =\n value.meta.role && value.meta.role === UserRoles.LAWYER\n ? UserRoles.LAWYER\n : UserRoles.LANDOWNER;\n },\n {\n immediate: true,\n }\n );\n\n return { roleByRoute };\n}\n","import { createElementVNode as _createElementVNode, toDisplayString as _toDisplayString, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, createTextVNode as _createTextVNode, withCtx as _withCtx, createBlock as _createBlock, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from \"vue\"\n\nconst _withScopeId = n => (_pushScopeId(\"data-v-68a6733c\"),n=n(),_popScopeId(),n)\nconst _hoisted_1 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode(\"span\", { class: \"text-semi-bold\" }, \"Confirm action\", -1))\nconst _hoisted_2 = { class: \"text-semi-bold\" }\nconst _hoisted_3 = { key: 0 }\n\nexport function render(_ctx: any,_cache: any,$props: any,$setup: any,$data: any,$options: any) {\n return (_openBlock(), _createBlock($setup[\"LotAssignmentModal\"], {\n \"is-open\": $props.isOpen,\n onClose: $setup.close,\n onConfirm: $setup.confirm\n }, {\n title: _withCtx(() => [\n _hoisted_1\n ]),\n description: _withCtx(() => [\n _createElementVNode(\"span\", null, _toDisplayString($setup.text) + \" \", 1),\n _createElementVNode(\"span\", _hoisted_2, _toDisplayString($props.deleteItem), 1),\n ($setup.isLeadsPage)\n ? (_openBlock(), _createElementBlock(\"span\", _hoisted_3, \" \" + _toDisplayString($props.deleteItem > 1 ? \"leads\" : \"lead\"), 1))\n : _createCommentVNode(\"\", true),\n _createTextVNode(\"?\")\n ]),\n _: 1\n }, 8, [\"is-open\"]))\n}","import { defineComponent as _defineComponent } from 'vue'\nimport LotAssignmentModal from \"@/components/ui/modals/LotAssignmentModal.vue\";\nimport { computed } from \"vue\";\nimport router from \"@/router\";\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'ConfirmDeleteModal',\n props: {\n isOpen: {\n type: Boolean,\n required: true,\n },\n deleteItem: {\n type: [Number, String],\n },\n customText: {\n type: String,\n required: false,\n },\n},\n emits: [\"close\", \"confirm\"],\n setup(__props, { expose: __expose, emit: emits }) {\n __expose();\n\nconst props = __props;\n\n\n\n\nconst text = computed(() => {\n if (props.customText) {\n return props.customText;\n }\n return \"Are you sure you want to delete\";\n});\n\nconst isLeadsPage = computed(() => {\n return router.currentRoute.value.name === \"Leads\";\n});\n\nconst close = () => {\n emits(\"close\");\n};\n\nconst confirm = () => {\n emits(\"confirm\");\n emits(\"close\");\n};\n\n\nconst __returned__ = { emits, props, text, isLeadsPage, close, confirm, LotAssignmentModal, computed, get router() { return router } }\nObject.defineProperty(__returned__, '__isScriptSetup', { enumerable: false, value: true })\nreturn __returned__\n}\n\n})","import { render } from \"./ConfirmDeleteModal.vue?vue&type=template&id=68a6733c&scoped=true&ts=true&lang=pug\"\nimport script from \"./ConfirmDeleteModal.vue?vue&type=script&lang=ts&setup=true\"\nexport * from \"./ConfirmDeleteModal.vue?vue&type=script&lang=ts&setup=true\"\n\nimport \"./ConfirmDeleteModal.vue?vue&type=style&index=0&id=68a6733c&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-68a6733c\"]])\n\nexport default __exports__","export const debounce = (fn: any, delay = 400, immediate = false) => {\n let timeout: number | undefined;\n return (...args: any[]) => {\n if (immediate && !timeout) fn(...args);\n clearTimeout(timeout);\n\n timeout = setTimeout(() => {\n fn(...args);\n }, delay);\n };\n};\n","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!./ConfirmDeleteModal.vue?vue&type=style&index=0&id=68a6733c&lang=scss&scoped=true\"","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 { AxiosError } from \"axios\";\nimport { useToast } from \"vue-toastification\";\nconst toast = useToast();\n\nexport const showResponseErrorMessage = (error: AxiosError): void => {\n if (error) {\n if (error.response?.data.message) {\n toast.error(error.response.data.message);\n } else {\n toast.error(\"Something went wrong\");\n }\n }\n};\n"],"sourceRoot":""}