1
0
mirror of https://gitlab.com/MoonTestUse1/AdministrationItDepartmens.git synced 2025-08-14 00:25:46 +02:00

Починка добавления сотрудника 1

This commit is contained in:
MoonTestUse1
2024-12-29 21:30:31 +06:00
parent 3df33fa6e6
commit 0cc7abef5f
2 changed files with 8 additions and 6 deletions

View File

@@ -1,3 +1,9 @@
export const departments = [
{ value: 'aho', label: 'Административно-хозяйственный отдел' },
{ value: 'gkh', label: 'Жилищно-коммунальное хозяйство' },
{ value: 'general', label: 'Общий отдел' }
] as const;
export const requestTypes = [ export const requestTypes = [
{ value: 'hardware', label: 'Проблемы с оборудованием' }, { value: 'hardware', label: 'Проблемы с оборудованием' },
{ value: 'software', label: 'Проблемы с программным обеспечением' }, { value: 'software', label: 'Проблемы с программным обеспечением' },
@@ -6,12 +12,6 @@ export const requestTypes = [
{ value: 'other', label: 'Другое' } { value: 'other', label: 'Другое' }
] as const; ] as const;
export const departments = [
{ value: 'aho', label: 'Административно-хозяйственный отдел' },
{ value: 'gkh', label: 'Жилищно-коммунальное хозяйство' },
{ value: 'general', label: 'Общий отдел' }
] as const;
export function getRequestTypeLabel(value: string): string { export function getRequestTypeLabel(value: string): string {
return requestTypes.find(type => type.value === value)?.label || value; return requestTypes.find(type => type.value === value)?.label || value;
} }

View File

@@ -80,6 +80,7 @@ template>
import { ref } from 'vue'; import { ref } from 'vue';
import { useRouter } from 'vue-router'; import { useRouter } from 'vue-router';
import { departments } from '@/utils/constants'; import { departments } from '@/utils/constants';
type Department = typeof departments[number];
const router = useRouter(); const router = useRouter();
const isSubmitting = ref(false); const isSubmitting = ref(false);
@@ -92,6 +93,7 @@ const form = ref({
password: '' password: ''
}); });
// @vue-ignore
const handleSubmit = async () => { const handleSubmit = async () => {
try { try {
isSubmitting.value = true; isSubmitting.value = true;