refactor: reorganize component files and update import paths; add PsItem and PsProduct interfaces

This commit is contained in:
Vincent Guillet
2025-11-12 12:34:58 +01:00
parent f063a245b9
commit bcc71b965b
92 changed files with 1694 additions and 2815 deletions

View File

@@ -0,0 +1,7 @@
export interface ProductListItem {
id: number;
name: string;
id_manufacturer?: number;
id_supplier?: number;
id_category_default?: number;
}

View File

@@ -0,0 +1,5 @@
export interface PsItem {
id: number;
name: string;
active?: boolean;
}

View File

@@ -0,0 +1,15 @@
export interface PsProduct {
name: string;
description?: string; // texte saisi libre
categoryId: number; // id_category_default + associations
manufacturerId: number;
supplierId: number;
images?: File[]; // optionnel
// Champs “hors Presta” injectés dans la description :
conditionLabel?: string; // ex. "Occasion"
complete?: boolean; // Complet
hasManual?: boolean; // Notice
priceTtc: number; // saisi côté UI (TTC)
vatRate?: number; // ex: 0.20 (20%). Défaut: 0.20 si non fourni
quantity: number; // stock souhaité (pour id_product_attribute = 0)
}