48 lines
1.0 KiB
TypeScript
48 lines
1.0 KiB
TypeScript
// --- TYPES & export INTERFACES (File: types.ts) ---
|
|
// In un progetto reale, metti queste interfacce in un file separato 'types.ts'
|
|
|
|
export interface UserData {
|
|
name: string;
|
|
role: string;
|
|
id: string;
|
|
}
|
|
|
|
export interface AttendanceRecord {
|
|
id: number;
|
|
site: string;
|
|
date: string;
|
|
in: string;
|
|
out: string | null;
|
|
status: 'complete' | 'incomplete';
|
|
}
|
|
|
|
export interface DocumentItem {
|
|
id: number;
|
|
name: string;
|
|
type: string;
|
|
site: string;
|
|
date: string;
|
|
}
|
|
|
|
export interface OfficeItem {
|
|
id: number;
|
|
name: string;
|
|
status: 'online' | 'offline';
|
|
temp: number;
|
|
lights: boolean;
|
|
power: number;
|
|
}
|
|
|
|
export type ScreenName = 'home' | 'attendance' | 'documents' | 'smart-office' | 'profile';
|
|
|
|
export type PermitType = 'Ferie' | 'Permesso' | 'Malattia';
|
|
|
|
export interface PermitRecord {
|
|
id: number;
|
|
type: PermitType;
|
|
startDate: string;
|
|
endDate?: string; // Opzionale per permessi giornalieri
|
|
startTime?: string; // Solo per permessi
|
|
endTime?: string; // Solo per permessi
|
|
status: 'Approvato' | 'In Attesa' | 'Rifiutato';
|
|
} |