Files
mariani_mobile/types/types.ts

81 lines
1.4 KiB
TypeScript

import { DateType } from "react-native-ui-datepicker";
export interface UserData {
name: string;
surname: string;
username: string;
role?: string;
email?: string;
id: string;
}
export interface ActivityItem {
id: string;
type: 'document' | 'attendance' | 'permit';
title: string;
subtitle: string;
date_display: string;
}
export interface AttendanceRecord {
id: number;
site: string;
subactivity: string;
date: string;
in: string;
out: string | null;
time: number | null;
}
export interface DocumentItem {
id: number;
mimetype: string;
title: string;
url: string;
updated_at: string;
}
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;
}
export interface HaArea {
id: string;
name: string;
floor_id: string | null;
floor_name: string | null;
device_count?: number;
}
export interface HaEntity {
entity_id: string;
name: string;
state: string;
}