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

Проверка

This commit is contained in:
MoonTestUse1
2024-12-28 05:32:33 +06:00
commit f9543463c4
84 changed files with 6811 additions and 0 deletions

View File

@@ -0,0 +1,31 @@
import { ref } from 'vue';
export function useNotification() {
const show = ref(false);
const message = ref('');
const type = ref<'success' | 'error'>('success');
function showNotification(newMessage: string, newType: 'success' | 'error' = 'success', duration = 3000) {
message.value = newMessage;
type.value = newType;
show.value = true;
if (duration > 0) {
setTimeout(() => {
show.value = false;
}, duration);
}
}
function hideNotification() {
show.value = false;
}
return {
show,
message,
type,
showNotification,
hideNotification
};
}

View File

@@ -0,0 +1,17 @@
export const requestTypes = [
{ value: 'hardware', label: 'Проблемы с оборудованием' },
{ value: 'software', label: 'Проблемы с программным обеспечением' },
{ value: 'network', label: 'Проблемы с сетью' },
{ value: 'access', label: 'Доступ к системам' },
{ 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;
}