This commit is contained in:
brusnitsyn
2026-02-20 17:28:16 +09:00
parent 94e374c32b
commit 52a80ccd3b
41 changed files with 2555 additions and 206 deletions

View File

@@ -6,7 +6,7 @@ import {router, useForm} from "@inertiajs/vue3";
const authStore = useAuthStore()
const userOptions = computed(() => {
return authStore.availableRoles.map(itm => {
return authStore.availableRoles?.map(itm => {
return {
label: itm.name,
value: itm.role_id
@@ -15,7 +15,7 @@ const userOptions = computed(() => {
})
const formRole = useForm({
role_id: authStore.user.role.role_id
role_id: authStore.user.role?.role_id
})
const onChangeRole = (roleId) => {
formRole.post('/user/role/change', {