diff --git a/src/data/mockData.ts b/src/data/mockData.ts index a8da767..e7b22aa 100644 --- a/src/data/mockData.ts +++ b/src/data/mockData.ts @@ -61,7 +61,7 @@ export const MOCK_USERS: User[] = [ id: 'user-manager-1', email: 'manager@grand-palace.ru', name: 'Елена Смирнова', - role: 'hotel_manager', + role: 'hotel_admin', hotelId: 'hotel-1', hotelName: 'Grand Palace Hotel', hotelSlug: 'grand-palace', diff --git a/src/lib/utils.ts b/src/lib/utils.ts index 9b31ea2..ac746f5 100644 --- a/src/lib/utils.ts +++ b/src/lib/utils.ts @@ -100,9 +100,14 @@ export const ROOM_STATUS_COLORS: Record = { // ─── Role ───────────────────────────────────────────────────────────────────── export const ROLE_LABELS: Record = { - super_admin: 'Супер-администратор', - hotel_manager: 'Менеджер отеля', - housekeeper: 'Горничная', + super_admin: 'Супер-администратор', + hotel_admin: 'Системный администратор', + manager: 'Менеджер', + housekeeper: 'Горничная', + receptionist: 'Ресепшн', + accountant: 'Бухгалтер', + security: 'Охрана', + technician: 'Тех. специалист', } // ─── Plan ───────────────────────────────────────────────────────────────────── diff --git a/src/pages/ApiDocsPage.tsx b/src/pages/ApiDocsPage.tsx index a51fbec..6a544a2 100644 --- a/src/pages/ApiDocsPage.tsx +++ b/src/pages/ApiDocsPage.tsx @@ -21,14 +21,14 @@ const API_ENDPOINTS: ApiEndpoint[] = [ { method: 'GET', path: '/hotels', summary: 'Список отелей', tags: ['Hotels'], auth: true, roles: ['super_admin'], response: '{ "data": Hotel[], "total": number }' }, { method: 'POST', path: '/hotels', summary: 'Создать отель', tags: ['Hotels'], auth: true, roles: ['super_admin'] }, { method: 'GET', path: '/hotels/:hotelId', summary: 'Получить отель', tags: ['Hotels'], auth: true }, - { method: 'PATCH', path: '/hotels/:hotelId', summary: 'Обновить отель', tags: ['Hotels'], auth: true, roles: ['super_admin', 'hotel_manager'] }, + { method: 'PATCH', path: '/hotels/:hotelId', summary: 'Обновить отель', tags: ['Hotels'], auth: true, roles: ['super_admin', 'hotel_admin'] }, { method: 'DELETE', path: '/hotels/:hotelId', summary: 'Удалить отель', tags: ['Hotels'], auth: true, roles: ['super_admin'] }, // Rooms { method: 'GET', path: '/hotels/:hotelId/rooms', summary: 'Список номеров', tags: ['Rooms'], auth: true }, - { method: 'POST', path: '/hotels/:hotelId/rooms', summary: 'Создать номер', tags: ['Rooms'], auth: true, roles: ['hotel_manager'] }, - { method: 'PATCH', path: '/hotels/:hotelId/rooms/:roomId', summary: 'Обновить номер', tags: ['Rooms'], auth: true, roles: ['hotel_manager'] }, - { method: 'DELETE', path: '/hotels/:hotelId/rooms/:roomId', summary: 'Удалить номер', tags: ['Rooms'], auth: true, roles: ['hotel_manager'] }, + { method: 'POST', path: '/hotels/:hotelId/rooms', summary: 'Создать номер', tags: ['Rooms'], auth: true, roles: ['hotel_admin'] }, + { method: 'PATCH', path: '/hotels/:hotelId/rooms/:roomId', summary: 'Обновить номер', tags: ['Rooms'], auth: true, roles: ['hotel_admin'] }, + { method: 'DELETE', path: '/hotels/:hotelId/rooms/:roomId', summary: 'Удалить номер', tags: ['Rooms'], auth: true, roles: ['hotel_admin'] }, // Bookings { method: 'GET', path: '/hotels/:hotelId/bookings', summary: 'Список бронирований (с фильтрацией по датам)', tags: ['Bookings'], auth: true, response: '{ "data": Booking[], "total": number }' }, @@ -39,8 +39,8 @@ const API_ENDPOINTS: ApiEndpoint[] = [ // Channels { method: 'GET', path: '/hotels/:hotelId/channels', summary: 'Список каналов', tags: ['Channels'], auth: true }, - { method: 'PATCH', path: '/hotels/:hotelId/channels/:channelId', summary: 'Настроить канал', tags: ['Channels'], auth: true, roles: ['hotel_manager'] }, - { method: 'POST', path: '/hotels/:hotelId/channels/:channelId/sync', summary: 'Запустить синхронизацию', tags: ['Channels'], auth: true, roles: ['hotel_manager'] }, + { method: 'PATCH', path: '/hotels/:hotelId/channels/:channelId', summary: 'Настроить канал', tags: ['Channels'], auth: true, roles: ['hotel_admin'] }, + { method: 'POST', path: '/hotels/:hotelId/channels/:channelId/sync', summary: 'Запустить синхронизацию', tags: ['Channels'], auth: true, roles: ['hotel_admin'] }, // Housekeeping { method: 'GET', path: '/hotels/:hotelId/housekeeping/tasks', summary: 'Список задач', tags: ['Housekeeping'], auth: true }, diff --git a/src/types/index.ts b/src/types/index.ts index 578b9ad..adbe473 100644 --- a/src/types/index.ts +++ b/src/types/index.ts @@ -1,6 +1,6 @@ // ─── Auth ──────────────────────────────────────────────────────────────────── -export type Role = 'super_admin' | 'hotel_manager' | 'housekeeper' +export type Role = 'super_admin' | 'hotel_admin' | 'manager' | 'housekeeper' | 'receptionist' | 'accountant' | 'security' | 'technician' export interface User { id: string