Non puoi selezionare più di 25 argomenti Gli argomenti devono iniziare con una lettera o un numero, possono includere trattini ('-') e possono essere lunghi fino a 35 caratteri.
 
 
 

1 riga
38 KiB

  1. {"ast":null,"code":"import { createCommentVNode as _createCommentVNode, createElementVNode as _createElementVNode, vModelText as _vModelText, withDirectives as _withDirectives, toDisplayString as _toDisplayString, openBlock as _openBlock, createElementBlock as _createElementBlock, resolveComponent as _resolveComponent, withCtx as _withCtx, createVNode as _createVNode, vModelSelect as _vModelSelect, createTextVNode as _createTextVNode, renderList as _renderList, Fragment as _Fragment, createBlock as _createBlock, withModifiers as _withModifiers } from \"vue\";\nconst _hoisted_1 = {\n class: \"form-group\"\n};\nconst _hoisted_2 = {\n key: 0,\n class: \"text-danger\"\n};\nconst _hoisted_3 = {\n class: \"form-group\"\n};\nconst _hoisted_4 = {\n key: 0,\n class: \"text-danger\"\n};\nconst _hoisted_5 = {\n class: \"form-group\"\n};\nconst _hoisted_6 = {\n class: \"input-group\"\n};\nconst _hoisted_7 = {\n key: 0,\n class: \"text-danger\"\n};\nconst _hoisted_8 = {\n class: \"form-group\"\n};\nconst _hoisted_9 = {\n class: \"input-group\"\n};\nconst _hoisted_10 = {\n class: \"user-checkbox-list\"\n};\nconst _hoisted_11 = {\n class: \"row checkbox-container\"\n};\nconst _hoisted_12 = {\n class: \"d-flex justify-content-center\"\n};\nconst _hoisted_13 = [\"disabled\"];\nconst _hoisted_14 = {\n key: 0,\n class: \"spinner-border spinner-border-sm\",\n role: \"status\",\n \"aria-hidden\": \"true\"\n};\nconst _hoisted_15 = {\n key: 1\n};\nexport function render(_ctx, _cache, $props, $setup, $data, $options) {\n const _component_BCol = _resolveComponent(\"BCol\");\n const _component_BRow = _resolveComponent(\"BRow\");\n const _component_BFormCheckbox = _resolveComponent(\"BFormCheckbox\");\n const _component_BFormInput = _resolveComponent(\"BFormInput\");\n const _component_BFormGroup = _resolveComponent(\"BFormGroup\");\n const _component_BFormRadio = _resolveComponent(\"BFormRadio\");\n const _component_BCardBody = _resolveComponent(\"BCardBody\");\n const _component_BCard = _resolveComponent(\"BCard\");\n const _component_Layout = _resolveComponent(\"Layout\");\n return _openBlock(), _createBlock(_component_Layout, null, {\n default: _withCtx(() => [_createVNode(_component_BRow, null, {\n default: _withCtx(() => [_createVNode(_component_BCard, null, {\n default: _withCtx(() => [_createElementVNode(\"form\", {\n onSubmit: _cache[13] || (_cache[13] = _withModifiers((...args) => $setup.editUser && $setup.editUser(...args), [\"prevent\"]))\n }, [_createVNode(_component_BRow, {\n class: \"g-3\"\n }, {\n default: _withCtx(() => [_createCommentVNode(\" Form fields \"), _createVNode(_component_BCol, {\n class: \"col-lg-6 mb-2\"\n }, {\n default: _withCtx(() => [_createElementVNode(\"div\", _hoisted_1, [_cache[14] || (_cache[14] = _createElementVNode(\"label\", {\n class: \"form-label\"\n }, \"نام \", -1 /* HOISTED */)), _withDirectives(_createElementVNode(\"input\", {\n \"onUpdate:modelValue\": _cache[0] || (_cache[0] = $event => $setup.name = $event),\n type: \"text\",\n class: \"form-control\",\n placeholder: \"نام کاربر را وارد نمایید\"\n }, null, 512 /* NEED_PATCH */), [[_vModelText, $setup.name]]), $setup.errors.name ? (_openBlock(), _createElementBlock(\"small\", _hoisted_2, _toDisplayString($setup.errors.name), 1 /* TEXT */)) : _createCommentVNode(\"v-if\", true)])]),\n _: 1 /* STABLE */\n }), _createVNode(_component_BCol, {\n class: \"col-lg-6 mb-2\"\n }, {\n default: _withCtx(() => [_createElementVNode(\"div\", _hoisted_3, [_cache[15] || (_cache[15] = _createElementVNode(\"label\", {\n class: \"form-label\"\n }, \"موبایل\", -1 /* HOISTED */)), _withDirectives(_createElementVNode(\"input\", {\n \"onUpdate:modelValue\": _cache[1] || (_cache[1] = $event => $setup.mobile = $event),\n type: \"text\",\n class: \"form-control\",\n placeholder: \"شماره موبایل کاربر را وارد نمایید\"\n }, null, 512 /* NEED_PATCH */), [[_vModelText, $setup.mobile]]), $setup.errors.mobile ? (_openBlock(), _createElementBlock(\"small\", _hoisted_4, _toDisplayString($setup.errors.mobile), 1 /* TEXT */)) : _createCommentVNode(\"v-if\", true)])]),\n _: 1 /* STABLE */\n })]),\n _: 1 /* STABLE */\n }), _createVNode(_component_BRow, {\n class: \"g-3\"\n }, {\n default: _withCtx(() => [_createCommentVNode(\" User Type \"), _createVNode(_component_BCol, {\n class: \"col-lg-6 mb-2\"\n }, {\n default: _withCtx(() => [_createElementVNode(\"div\", _hoisted_5, [_cache[18] || (_cache[18] = _createElementVNode(\"label\", {\n class: \"form-label\"\n }, \"نوع کاربر\", -1 /* HOISTED */)), _createElementVNode(\"div\", _hoisted_6, [$setup.role != 0 ? _withDirectives((_openBlock(), _createElementBlock(\"select\", {\n key: 0,\n class: \"form-select\",\n \"onUpdate:modelValue\": _cache[2] || (_cache[2] = $event => $setup.role = $event)\n }, _cache[16] || (_cache[16] = [_createElementVNode(\"option\", {\n disabled: \"\",\n value: \"\"\n }, \"نوع کاربر\", -1 /* HOISTED */), _createElementVNode(\"option\", {\n value: \"1\"\n }, \"کاربر\", -1 /* HOISTED */), _createElementVNode(\"option\", {\n value: \"2\"\n }, \"اپراتور\", -1 /* HOISTED */)]), 512 /* NEED_PATCH */)), [[_vModelSelect, $setup.role]]) : $setup.role == 0 ? _withDirectives((_openBlock(), _createElementBlock(\"select\", {\n key: 1,\n class: \"form-select\",\n \"onUpdate:modelValue\": _cache[3] || (_cache[3] = $event => $setup.role = $event)\n }, _cache[17] || (_cache[17] = [_createElementVNode(\"option\", {\n disabled: \"\",\n value: \"\"\n }, \"نوع کاربر\", -1 /* HOISTED */), _createElementVNode(\"option\", {\n value: \"1\"\n }, \"کاربر\", -1 /* HOISTED */), _createElementVNode(\"option\", {\n value: \"2\"\n }, \"اپراتور\", -1 /* HOISTED */), _createElementVNode(\"option\", {\n value: \"0\"\n }, \"مدیر\", -1 /* HOISTED */)]), 512 /* NEED_PATCH */)), [[_vModelSelect, $setup.role]]) : _createCommentVNode(\"v-if\", true)]), $setup.errors.role ? (_openBlock(), _createElementBlock(\"small\", _hoisted_7, _toDisplayString($setup.errors.role), 1 /* TEXT */)) : _createCommentVNode(\"v-if\", true)])]),\n _: 1 /* STABLE */\n }), _createVNode(_component_BCol, {\n class: \"col-lg-6 mb-2\"\n }, {\n default: _withCtx(() => [_createElementVNode(\"div\", _hoisted_8, [_cache[20] || (_cache[20] = _createElementVNode(\"label\", {\n class: \"form-label\"\n }, \"رمز عبور\", -1 /* HOISTED */)), _createElementVNode(\"div\", _hoisted_9, [_cache[19] || (_cache[19] = _createElementVNode(\"span\", {\n class: \"input-group-text\"\n }, [_createElementVNode(\"i\", {\n class: \"feather icon-lock\"\n })], -1 /* HOISTED */)), _withDirectives(_createElementVNode(\"input\", {\n \"onUpdate:modelValue\": _cache[4] || (_cache[4] = $event => _ctx.Password = $event),\n type: \"password\",\n class: \"form-control\",\n placeholder: \"رمز عبور خود را وارد نمایید\"\n }, null, 512 /* NEED_PATCH */), [[_vModelText, _ctx.Password]])]), _createCommentVNode(\" <small v-if=\\\"errors.password\\\" class=\\\"text-danger\\\">{{\\r\\n errors.password\\r\\n }}</small> \")])]),\n _: 1 /* STABLE */\n })]),\n _: 1 /* STABLE */\n }), $setup.role == `2` ? (_openBlock(), _createBlock(_component_BCard, {\n key: 0,\n style: {\n \"margin-top\": \"10px\"\n },\n class: \"p-4\"\n }, {\n default: _withCtx(() => [_createCommentVNode(\" Access Checkboxes \"), _createVNode(_component_BRow, {\n class: \"g-3 justify-content-center\"\n }, {\n default: _withCtx(() => [_createVNode(_component_BCol, {\n cols: \"6\",\n class: \"d-flex\"\n }, {\n default: _withCtx(() => [_createVNode(_component_BFormCheckbox, {\n class: \"ml-3\",\n checked: $setup.access?.includes('user'),\n onChange: _cache[5] || (_cache[5] = $event => $setup.toggleAccess('user'))\n }, {\n default: _withCtx(() => _cache[21] || (_cache[21] = [_createTextVNode(\"دسترسی به کاربران\")])),\n _: 1 /* STABLE */\n }, 8 /* PROPS */, [\"checked\"])]),\n _: 1 /* STABLE */\n }), _createVNode(_component_BCol, {\n cols: \"6\",\n class: \"d-flex\"\n }, {\n default: _withCtx(() => [_createVNode(_component_BFormCheckbox, {\n class: \"ml-3\",\n checked: $setup.access?.includes('subjects'),\n onChange: _cache[6] || (_cache[6] = $event => $setup.toggleAccess('subjects'))\n }, {\n default: _withCtx(() => _cache[22] || (_cache[22] = [_createTextVNode(\"دسترسی به موضوع ها\")])),\n _: 1 /* STABLE */\n }, 8 /* PROPS */, [\"checked\"])]),\n _: 1 /* STABLE */\n }), _createVNode(_component_BCol, {\n cols: \"6\",\n class: \"d-flex\"\n }, {\n default: _withCtx(() => [_createVNode(_component_BFormCheckbox, {\n class: \"ml-3\",\n checked: $setup.access?.includes('private_meeting'),\n onChange: _cache[7] || (_cache[7] = $event => $setup.toggleAccess('private_meeting'))\n }, {\n default: _withCtx(() => _cache[23] || (_cache[23] = [_createTextVNode(\"دسترسی به ملاقات\")])),\n _: 1 /* STABLE */\n }, 8 /* PROPS */, [\"checked\"])]),\n _: 1 /* STABLE */\n }), _createVNode(_component_BCol, {\n cols: \"6\",\n class: \"d-flex\"\n }, {\n default: _withCtx(() => [_createVNode(_component_BFormCheckbox, {\n class: \"ml-3\",\n checked: $setup.access?.includes('meeting'),\n onChange: _cache[8] || (_cache[8] = $event => $setup.toggleAccess('meeting'))\n }, {\n default: _withCtx(() => _cache[24] || (_cache[24] = [_createTextVNode(\"دسترسی به جلسات\")])),\n _: 1 /* STABLE */\n }, 8 /* PROPS */, [\"checked\"])]),\n _: 1 /* STABLE */\n }), $setup.access.includes('meeting') || $setup.access?.includes('private_meeting') ? (_openBlock(), _createBlock(_component_BCol, {\n key: 0,\n md: \"12\"\n }, {\n default: _withCtx(() => [_createVNode(_component_BCard, {\n class: \"shadow rounded\"\n }, {\n default: _withCtx(() => [_createVNode(_component_BCardBody, {\n class: \"p-4\"\n }, {\n default: _withCtx(() => [_cache[25] || (_cache[25] = _createElementVNode(\"h4\", {\n class: \"checkbox-label mb-3\"\n }, \" اپراتور مورد نظر را انتخاب کنید \", -1 /* HOISTED */)), _createVNode(_component_BFormGroup, {\n class: \"mb-4\"\n }, {\n default: _withCtx(() => [_createVNode(_component_BFormInput, {\n placeholder: \"جستجوی اپراتور ها...\",\n class: \"search-input\",\n modelValue: $setup.UserSearchQuery,\n \"onUpdate:modelValue\": _cache[9] || (_cache[9] = $event => $setup.UserSearchQuery = $event)\n }, null, 8 /* PROPS */, [\"modelValue\"])]),\n _: 1 /* STABLE */\n }), _createElementVNode(\"div\", _hoisted_10, [_createElementVNode(\"div\", _hoisted_11, [(_openBlock(true), _createElementBlock(_Fragment, null, _renderList($setup.filteredUsers, user => {\n return _openBlock(), _createBlock(_component_BCol, {\n key: user.id,\n md: \"4\",\n class: \"mb-3\"\n }, {\n default: _withCtx(() => [_createVNode(_component_BFormRadio, {\n modelValue: $setup.selectedOperator,\n \"onUpdate:modelValue\": _cache[10] || (_cache[10] = $event => $setup.selectedOperator = $event),\n value: user.id,\n class: \"radio-item custom-radio\"\n }, {\n default: _withCtx(() => [_createElementVNode(\"strong\", null, _toDisplayString(user.name), 1 /* TEXT */)]),\n _: 2 /* DYNAMIC */\n }, 1032 /* PROPS, DYNAMIC_SLOTS */, [\"modelValue\", \"value\"])]),\n _: 2 /* DYNAMIC */\n }, 1024 /* DYNAMIC_SLOTS */);\n }), 128 /* KEYED_FRAGMENT */))])])]),\n _: 1 /* STABLE */\n })]),\n _: 1 /* STABLE */\n })]),\n _: 1 /* STABLE */\n })) : _createCommentVNode(\"v-if\", true), _createVNode(_component_BCol, {\n cols: \"6\",\n class: \"d-flex\"\n }, {\n default: _withCtx(() => [_createVNode(_component_BFormCheckbox, {\n class: \"ml-3\",\n checked: $setup.access?.includes('locations'),\n onChange: _cache[11] || (_cache[11] = $event => $setup.toggleAccess('locations'))\n }, {\n default: _withCtx(() => _cache[26] || (_cache[26] = [_createTextVNode(\"دسترسی به موقعیت ها\")])),\n _: 1 /* STABLE */\n }, 8 /* PROPS */, [\"checked\"])]),\n _: 1 /* STABLE */\n }), _createVNode(_component_BCol, {\n cols: \"6\",\n class: \"d-flex\"\n }, {\n default: _withCtx(() => [_createVNode(_component_BFormCheckbox, {\n class: \"ml-3\",\n checked: $setup.access?.includes('note'),\n onChange: _cache[12] || (_cache[12] = $event => $setup.toggleAccess('note'))\n }, {\n default: _withCtx(() => _cache[27] || (_cache[27] = [_createTextVNode(\"دسترسی به یادداشت ها\")])),\n _: 1 /* STABLE */\n }, 8 /* PROPS */, [\"checked\"])]),\n _: 1 /* STABLE */\n })]),\n _: 1 /* STABLE */\n })]),\n _: 1 /* STABLE */\n })) : _createCommentVNode(\"v-if\", true), _createElementVNode(\"div\", _hoisted_12, [_createElementVNode(\"button\", {\n type: \"submit\",\n class: \"btn btn-primary\",\n disabled: $setup.loading,\n style: {\n \"width\": \"auto\"\n }\n }, [$setup.loading ? (_openBlock(), _createElementBlock(\"span\", _hoisted_14)) : _createCommentVNode(\"v-if\", true), !$setup.loading ? (_openBlock(), _createElementBlock(\"span\", _hoisted_15, \"ذخیره\")) : _createCommentVNode(\"v-if\", true)], 8 /* PROPS */, _hoisted_13)])], 32 /* NEED_HYDRATION */)]),\n _: 1 /* STABLE */\n })]),\n _: 1 /* STABLE */\n })]),\n _: 1 /* STABLE */\n });\n}","map":{"version":3,"names":["class","key","role","_createBlock","_component_Layout","default","_withCtx","_createVNode","_component_BRow","_component_BCard","_createElementVNode","onSubmit","_cache","_withModifiers","args","$setup","editUser","_createCommentVNode","_component_BCol","_hoisted_1","$event","name","type","placeholder","errors","_createElementBlock","_hoisted_2","_toDisplayString","_","_hoisted_3","mobile","_hoisted_4","_hoisted_5","_hoisted_6","disabled","value","_hoisted_7","_hoisted_8","_hoisted_9","_ctx","Password","style","cols","_component_BFormCheckbox","checked","access","includes","onChange","toggleAccess","_createTextVNode","md","_component_BCardBody","_component_BFormGroup","_component_BFormInput","modelValue","UserSearchQuery","_hoisted_10","_hoisted_11","_Fragment","_renderList","filteredUsers","user","id","_component_BFormRadio","selectedOperator","_hoisted_12","loading","_hoisted_14","_hoisted_15","_hoisted_13"],"sources":["C:\\Users\\hp\\Desktop\\satari\\Vue\\Admin\\src\\views\\live-preview\\pages\\editUser.vue"],"sourcesContent":["<script>\r\nimport Layout from \"@/layout/custom.vue\";\r\nimport { onMounted, ref, computed } from \"vue\";\r\nimport { useRoute } from \"vue-router\";\r\nimport axios from \"axios\";\r\nimport Swal from \"sweetalert2\";\r\nimport \"vue3-toastify/dist/index.css\";\r\nimport { toast } from \"vue3-toastify\";\r\n\r\nexport default {\r\n name: \"SAMPLE-PAGE\",\r\n components: {\r\n Layout,\r\n },\r\n setup() {\r\n const loading = ref(false)\r\n const errors = ref({});\r\n const users = ref();\r\n const token = localStorage.getItem(\"token\");\r\n const url = process.env.VUE_APP_ROOT_URL;\r\n const route = useRoute();\r\n const user = ref();\r\n const name = ref();\r\n const role = ref();\r\n const mobile = ref();\r\n const access = ref();\r\n const password = ref();\r\n const UserSearchQuery = ref();\r\n const selectedOperator = ref();\r\n const getUser = () => {\r\n axios\r\n .get(`${url}/admin/user/${route.params.id}`, {\r\n headers: {\r\n \"Content-Type\": \"application/json\",\r\n Authorization: `Bearer ${token} `,\r\n },\r\n })\r\n .then((resp) => {\r\n console.log(resp);\r\n user.value = resp.data;\r\n console.log(user.value);\r\n name.value = user.value.name;\r\n mobile.value = user.value.mobile;\r\n role.value = user.value.role;\r\n access.value = JSON.parse(user.value.access);\r\n })\r\n .catch((error) => {\r\n console.error(\"Error fetching users:\", error);\r\n });\r\n };\r\n\r\n const filteredUsers = computed(() => {\r\n if (!UserSearchQuery.value) return users.value; // Return all users if search query is empty\r\n return users.value.filter((user) =>\r\n user.name.toLowerCase().includes(UserSearchQuery.value.toLowerCase())\r\n );\r\n });\r\n\r\n const getUsers = () => {\r\n axios\r\n .get(`${url}/admin/users`, {\r\n headers: {\r\n \"Content-Type\": \"application/json\",\r\n Authorization: `Bearer ${token} `,\r\n },\r\n })\r\n .then((resp) => {\r\n console.log(resp);\r\n\r\n users.value = resp.data;\r\n console.log(users.value);\r\n })\r\n .catch((error) => {\r\n console.error(\"Error fetching users:\", error);\r\n });\r\n };\r\n\r\n const toggleAccess = (permission) => {\r\n if (!Array.isArray(access.value)) {\r\n access.value = [];\r\n }\r\n\r\n if (access.value.includes(permission)) {\r\n access.value = access.value.filter((item) => item !== permission);\r\n } else {\r\n access.value = [...access.value, permission];\r\n }\r\n };\r\n\r\n const validateForm = () => {\r\n errors.value = {};\r\n if (!name.value) errors.value.name = \"وارد کردن نام الزامی می باشد\";\r\n if (!mobile.value)\r\n errors.value.mobile = \"وارد کردن شماره موبایل الزامی می باشد\";\r\n if (!role.value) errors.value.role = \"انتخاب نوع کاربر الزامی است\";\r\n return Object.keys(errors.value).length === 0;\r\n };\r\n\r\n const editUser = async () => {\r\n if (!validateForm()) return;\r\n loading.value = true;\r\n try {\r\n const formData = new FormData();\r\n formData.append(\"name\", name.value);\r\n formData.append(\"mobile\", mobile.value);\r\n if (password.value) {\r\n formData.append(\"password\", password.value);\r\n }\r\n\r\n formData.append(\"role\", role.value);\r\n formData.append(\"id\", route.params.id);\r\n access.value.forEach((item) => {\r\n formData.append(\"access[]\", item);\r\n });\r\n const response = await axios.post(`${url}/admin/edit-user`, formData, {\r\n headers: {\r\n \"Content-Type\": \"application/json\",\r\n Authorization: `Bearer ${token} `,\r\n },\r\n });\r\n console.log(response);\r\n\r\n if (response.data.status == true) {\r\n toast.success(\"کاربر با موفقیت ویرایش شد!\", {\r\n position: \"top-right\",\r\n autoClose: 1000,\r\n });\r\n } else {\r\n Swal.fire({\r\n icon: \"error\",\r\n title: \"خطا\",\r\n text: \"ویرایش کاربر با مشکل مواجه شد. لطفا دوباره امتحان کنید.\",\r\n });\r\n }\r\n } catch (error) {\r\n console.log(error);\r\n Swal.fire({\r\n icon: \"error\",\r\n title: \"خطا\",\r\n text: `ویرایش کاربر با مشکل مواجه شد: ${error.response.data.message}`,\r\n });\r\n } finally {\r\n loading.value = false;\r\n }\r\n };\r\n\r\n onMounted(() => {\r\n getUser();\r\n getUsers();\r\n });\r\n return {\r\n name,\r\n mobile,\r\n password,\r\n role,\r\n access,\r\n toggleAccess,\r\n filteredUsers,\r\n UserSearchQuery,\r\n selectedOperator,\r\n editUser,\r\n errors,\r\n loading\r\n };\r\n },\r\n};\r\n</script>\r\n\r\n<template>\r\n <Layout>\r\n <BRow>\r\n <BCard>\r\n <form @submit.prevent=\"editUser\">\r\n <BRow class=\"g-3\">\r\n <!-- Form fields -->\r\n <BCol class=\"col-lg-6 mb-2\">\r\n <div class=\"form-group\">\r\n <label class=\"form-label\">نام </label>\r\n <input\r\n v-model=\"name\"\r\n type=\"text\"\r\n class=\"form-control\"\r\n placeholder=\"نام کاربر را وارد نمایید\"\r\n />\r\n <small v-if=\"errors.name\" class=\"text-danger\">{{\r\n errors.name\r\n }}</small>\r\n </div>\r\n </BCol>\r\n\r\n <BCol class=\"col-lg-6 mb-2\">\r\n <div class=\"form-group\">\r\n <label class=\"form-label\">موبایل</label>\r\n <input\r\n v-model=\"mobile\"\r\n type=\"text\"\r\n class=\"form-control\"\r\n placeholder=\"شماره موبایل کاربر را وارد نمایید\"\r\n />\r\n <small v-if=\"errors.mobile\" class=\"text-danger\">{{\r\n errors.mobile\r\n }}</small>\r\n </div>\r\n </BCol>\r\n </BRow>\r\n\r\n <BRow class=\"g-3\">\r\n <!-- User Type -->\r\n <BCol class=\"col-lg-6 mb-2\">\r\n <div class=\"form-group\">\r\n <label class=\"form-label\">نوع کاربر</label>\r\n <div class=\"input-group\">\r\n <select v-if=\"role != 0\" class=\"form-select\" v-model=\"role\">\r\n <option disabled value=\"\">نوع کاربر</option>\r\n <option value=\"1\">کاربر</option>\r\n <option value=\"2\">اپراتور</option>\r\n </select>\r\n <select\r\n v-else-if=\"role == 0\"\r\n class=\"form-select\"\r\n v-model=\"role\"\r\n >\r\n <option disabled value=\"\">نوع کاربر</option>\r\n <option value=\"1\">کاربر</option>\r\n <option value=\"2\">اپراتور</option>\r\n <option value=\"0\">مدیر</option>\r\n </select>\r\n </div>\r\n <small v-if=\"errors.role\" class=\"text-danger\">{{\r\n errors.role\r\n }}</small>\r\n </div>\r\n </BCol>\r\n\r\n <BCol class=\"col-lg-6 mb-2\">\r\n <div class=\"form-group\">\r\n <label class=\"form-label\">رمز عبور</label>\r\n <div class=\"input-group\">\r\n <span class=\"input-group-text\">\r\n <i class=\"feather icon-lock\"></i>\r\n </span>\r\n <input\r\n v-model=\"Password\"\r\n type=\"password\"\r\n class=\"form-control\"\r\n placeholder=\"رمز عبور خود را وارد نمایید\"\r\n />\r\n </div>\r\n <!-- <small v-if=\"errors.password\" class=\"text-danger\">{{\r\n errors.password\r\n }}</small> -->\r\n </div>\r\n </BCol>\r\n </BRow>\r\n\r\n <BCard style=\"margin-top: 10px\" v-if=\"role == `2`\" class=\"p-4\">\r\n <!-- Access Checkboxes -->\r\n <BRow class=\"g-3 justify-content-center\">\r\n <BCol cols=\"6\" class=\"d-flex\">\r\n <BFormCheckbox\r\n class=\"ml-3\"\r\n :checked=\"access?.includes('user')\"\r\n @change=\"toggleAccess('user')\"\r\n >دسترسی به کاربران</BFormCheckbox\r\n >\r\n </BCol>\r\n <BCol cols=\"6\" class=\"d-flex\">\r\n <BFormCheckbox\r\n class=\"ml-3\"\r\n :checked=\"access?.includes('subjects')\"\r\n @change=\"toggleAccess('subjects')\"\r\n >دسترسی به موضوع ها</BFormCheckbox\r\n >\r\n </BCol>\r\n\r\n <BCol cols=\"6\" class=\"d-flex\">\r\n <BFormCheckbox\r\n class=\"ml-3\"\r\n :checked=\"access?.includes('private_meeting')\"\r\n @change=\"toggleAccess('private_meeting')\"\r\n >دسترسی به ملاقات</BFormCheckbox\r\n >\r\n </BCol>\r\n\r\n <BCol cols=\"6\" class=\"d-flex\">\r\n <BFormCheckbox\r\n class=\"ml-3\"\r\n :checked=\"access?.includes('meeting')\"\r\n @change=\"toggleAccess('meeting')\"\r\n >دسترسی به جلسات</BFormCheckbox\r\n >\r\n </BCol>\r\n <BCol\r\n v-if=\"\r\n access.includes('meeting') ||\r\n access?.includes('private_meeting')\r\n \"\r\n md=\"12\"\r\n >\r\n <BCard class=\"shadow rounded\">\r\n <BCardBody class=\"p-4\">\r\n <h4 class=\"checkbox-label mb-3\">\r\n اپراتور مورد نظر را انتخاب کنید\r\n </h4>\r\n\r\n <BFormGroup class=\"mb-4\">\r\n <BFormInput\r\n placeholder=\"جستجوی اپراتور ها...\"\r\n class=\"search-input\"\r\n v-model=\"UserSearchQuery\"\r\n />\r\n </BFormGroup>\r\n\r\n <div class=\"user-checkbox-list\">\r\n <div class=\"row checkbox-container\">\r\n <BCol\r\n v-for=\"user in filteredUsers\"\r\n :key=\"user.id\"\r\n md=\"4\"\r\n class=\"mb-3\"\r\n >\r\n <BFormRadio\r\n v-model=\"selectedOperator\"\r\n :value=\"user.id\"\r\n class=\"radio-item custom-radio\"\r\n >\r\n <strong>{{ user.name }}</strong>\r\n </BFormRadio>\r\n </BCol>\r\n </div>\r\n </div>\r\n </BCardBody>\r\n </BCard>\r\n </BCol>\r\n\r\n <BCol cols=\"6\" class=\"d-flex\">\r\n <BFormCheckbox\r\n class=\"ml-3\"\r\n :checked=\"access?.includes('locations')\"\r\n @change=\"toggleAccess('locations')\"\r\n >دسترسی به موقعیت ها</BFormCheckbox\r\n >\r\n </BCol>\r\n <BCol cols=\"6\" class=\"d-flex\">\r\n <BFormCheckbox\r\n class=\"ml-3\"\r\n :checked=\"access?.includes('note')\"\r\n @change=\"toggleAccess('note')\"\r\n >دسترسی به یادداشت ها</BFormCheckbox\r\n >\r\n </BCol>\r\n </BRow>\r\n </BCard>\r\n\r\n\r\n <div class=\"d-flex justify-content-center\">\r\n <button type=\"submit\" class=\"btn btn-primary\" :disabled=\"loading\" style=\"width: auto;\">\r\n <span\r\n v-if=\"loading\"\r\n class=\"spinner-border spinner-border-sm\"\r\n role=\"status\"\r\n aria-hidden=\"true\"\r\n ></span>\r\n <span v-if=\"!loading\">ذخیره</span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