deploy: notesfrais — 2026-04-29 09:57:19
This commit is contained in:
@@ -0,0 +1,127 @@
|
||||
// ─── Utilisateur ─────────────────────────────────────────────
|
||||
export interface User {
|
||||
id: number;
|
||||
name: string;
|
||||
email: string;
|
||||
}
|
||||
|
||||
// ─── Société ─────────────────────────────────────────────────
|
||||
export interface Company {
|
||||
id: number;
|
||||
name: string;
|
||||
email: string;
|
||||
is_active: boolean;
|
||||
created_at: string;
|
||||
}
|
||||
|
||||
// ─── Catégorie ───────────────────────────────────────────────
|
||||
export interface Category {
|
||||
id: number;
|
||||
name: string;
|
||||
sort_order: number;
|
||||
is_active: boolean;
|
||||
}
|
||||
|
||||
// ─── Invité ───────────────────────────────────────────────────
|
||||
export interface Guest {
|
||||
name: string;
|
||||
company?: string | null;
|
||||
sort_order?: number;
|
||||
}
|
||||
|
||||
// ─── Image de facture ────────────────────────────────────────
|
||||
export interface InvoiceImage {
|
||||
path: string;
|
||||
order: number;
|
||||
}
|
||||
|
||||
// ─── Facture ─────────────────────────────────────────────────
|
||||
export type InvoiceStatus = 'pending' | 'reimbursed';
|
||||
|
||||
export interface Invoice {
|
||||
id: string;
|
||||
user_id: number;
|
||||
company_id: number;
|
||||
company_name: string;
|
||||
category_id: number;
|
||||
category_name: string;
|
||||
supplier?: string;
|
||||
amount: number;
|
||||
invoice_date: string; // YYYY-MM-DD
|
||||
comment?: string;
|
||||
images: InvoiceImage[];
|
||||
pdf_path?: string;
|
||||
pdf_filename?: string;
|
||||
add_to_tracking: boolean;
|
||||
tracking_added: boolean;
|
||||
email_sent: boolean;
|
||||
sent_at?: string;
|
||||
status: InvoiceStatus;
|
||||
guests: Guest[];
|
||||
created_at: string;
|
||||
updated_at: string;
|
||||
}
|
||||
|
||||
// ─── Création facture ────────────────────────────────────────
|
||||
export interface CreateInvoicePayload {
|
||||
company_id: number;
|
||||
category_id: number;
|
||||
supplier?: string;
|
||||
amount: number;
|
||||
invoice_date: string;
|
||||
comment?: string;
|
||||
images: InvoiceImage[];
|
||||
add_to_tracking: boolean;
|
||||
guests: Guest[];
|
||||
}
|
||||
|
||||
// ─── Réponse liste factures ──────────────────────────────────
|
||||
export interface InvoicesListResponse {
|
||||
data: Invoice[];
|
||||
total: number;
|
||||
page: number;
|
||||
limit: number;
|
||||
}
|
||||
|
||||
// ─── Récapitulatif par société ───────────────────────────────
|
||||
export interface InvoiceSummaryItem {
|
||||
company_name: string;
|
||||
status: InvoiceStatus;
|
||||
total: string;
|
||||
count: number;
|
||||
}
|
||||
|
||||
// ─── Filtres de listing ──────────────────────────────────────
|
||||
export interface InvoiceFilters {
|
||||
company_ids?: number[];
|
||||
category_ids?: number[];
|
||||
status?: InvoiceStatus | '';
|
||||
date_from?: string;
|
||||
date_to?: string;
|
||||
search?: string;
|
||||
sort_by?: string;
|
||||
sort_dir?: 'asc' | 'desc';
|
||||
page?: number;
|
||||
limit?: number;
|
||||
}
|
||||
|
||||
// ─── Config SMTP ─────────────────────────────────────────────
|
||||
export interface SmtpConfig {
|
||||
smtp_host: string;
|
||||
smtp_port: number;
|
||||
smtp_secure: boolean;
|
||||
smtp_user: string;
|
||||
smtp_from_name: string;
|
||||
smtp_from_email: string;
|
||||
has_password: boolean;
|
||||
}
|
||||
|
||||
// ─── Config Graph + SharePoint ───────────────────────────────
|
||||
export interface AppSettings {
|
||||
graph_tenant_id?: string;
|
||||
graph_client_id?: string;
|
||||
sharepoint_site_id?: string;
|
||||
sharepoint_item_id?: string;
|
||||
sharepoint_sheet_name?: string;
|
||||
has_secret?: string;
|
||||
}
|
||||
Reference in New Issue
Block a user