Роли, переделывание отчета, изменение на главной странице

This commit is contained in:
brusnitsyn
2026-01-11 23:37:18 +09:00
parent eb019504d7
commit d4f077cdaf
59 changed files with 2099 additions and 366 deletions

View File

@@ -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