diff --git a/frontend/src/utils/constants.ts b/frontend/src/utils/constants.ts index 0d9db15..9eac6e9 100644 --- a/frontend/src/utils/constants.ts +++ b/frontend/src/utils/constants.ts @@ -1,3 +1,9 @@ +export const departments = [ + { value: 'aho', label: 'Административно-хозяйственный отдел' }, + { value: 'gkh', label: 'Жилищно-коммунальное хозяйство' }, + { value: 'general', label: 'Общий отдел' } +] as const; + export const requestTypes = [ { value: 'hardware', label: 'Проблемы с оборудованием' }, { value: 'software', label: 'Проблемы с программным обеспечением' }, @@ -6,12 +12,6 @@ export const requestTypes = [ { value: 'other', label: 'Другое' } ] as const; -export const departments = [ - { value: 'aho', label: 'Административно-хозяйственный отдел' }, - { value: 'gkh', label: 'Жилищно-коммунальное хозяйство' }, - { value: 'general', label: 'Общий отдел' } -] as const; - export function getRequestTypeLabel(value: string): string { return requestTypes.find(type => type.value === value)?.label || value; } \ No newline at end of file diff --git a/frontend/src/views/admin/AddEmployeeView.vue b/frontend/src/views/admin/AddEmployeeView.vue index ad9d866..2a54874 100644 --- a/frontend/src/views/admin/AddEmployeeView.vue +++ b/frontend/src/views/admin/AddEmployeeView.vue @@ -80,6 +80,7 @@ template> import { ref } from 'vue'; import { useRouter } from 'vue-router'; import { departments } from '@/utils/constants'; +type Department = typeof departments[number]; const router = useRouter(); const isSubmitting = ref(false); @@ -92,6 +93,7 @@ const form = ref({ password: '' }); +// @vue-ignore const handleSubmit = async () => { try { isSubmitting.value = true;