Files
mariani_mobile/types/types.ts
leonardo 6e5b9cde68 feat: Implement document management features
- Added a new DocumentsScreen for managing user documents with search and date filtering capabilities.
- Created AddDocumentModal for uploading documents with file selection and custom title options.
- Introduced SiteDocumentsScreen to display documents related to specific construction sites.
- Implemented SitesScreen for listing construction sites with search functionality.
- Updated ProfileScreen to link to the new DocumentsScreen.
- Refactored RangePickerModal for selecting date ranges in document filtering.
- Improved date formatting utilities for better timestamp handling.
- Added necessary API calls for document and site management.
- Updated types to reflect changes in document structure and site information.
- Added expo-document-picker dependency for document selection functionality.
2025-12-17 18:03:54 +01:00

67 lines
1.2 KiB
TypeScript

// --- TYPES & export INTERFACES (File: types.ts) ---
import { DateType } from "react-native-ui-datepicker";
export interface UserData {
name: string;
surname: string;
username: string;
role?: string;
email?: 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;
title: string;
url: string;
updated_at: string;
}
export interface OfficeItem {
id: number;
name: string;
status: 'online' | 'offline';
temp: number;
lights: boolean;
power: number;
}
export interface TimeOffRequestType {
id: number;
name: string;
color: string;
abbreviation: string;
time_required: number;
deleted: number;
}
export interface TimeOffRequest {
id: number;
id_type: number;
id_user: number;
start_date: DateType;
end_date?: DateType | null;
start_time?: string | null;
end_time?: string | null;
message?: string | null;
status: number;
timeOffRequestType: TimeOffRequestType;
}
export interface ConstructionSite {
id: number;
// id_client: number;
name: string;
code: string;
attachments_count: number;
}