Роли, переделывание отчета, изменение на главной странице
This commit is contained in:
@@ -7,7 +7,7 @@ export const useAuthStore = defineStore('authStore', () => {
|
||||
const user = usePage().props.user
|
||||
const token = user?.token
|
||||
const permissions = user?.permissions
|
||||
const availableDepartments = ref([])
|
||||
const availableDepartments = ref(user?.available_departments)
|
||||
|
||||
// Инициализация axios с токеном
|
||||
if (token?.value) {
|
||||
@@ -21,7 +21,7 @@ export const useAuthStore = defineStore('authStore', () => {
|
||||
const isNurse = computed(() => user.role === 'nurse')
|
||||
const isHeadOfDepartment = computed(() => user.role === 'head_of_department')
|
||||
const isStatistician = computed(() => user.role === 'statistician')
|
||||
const userDepartment = computed(() => user.department || '')
|
||||
const userDepartment = computed(() => user.current_department || '')
|
||||
|
||||
const clearAuthData = () => {
|
||||
user.value = null
|
||||
|
||||
Reference in New Issue
Block a user