First UI draft
This commit is contained in:
48
types/types.ts
Normal file
48
types/types.ts
Normal file
@ -0,0 +1,48 @@
|
||||
// --- 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';
|
||||
}
|
||||
Reference in New Issue
Block a user