diff --git a/src/app/(dashboard)/grid/page.tsx b/src/app/(dashboard)/grid/page.tsx index 5e2cc64..c6f8c5b 100644 --- a/src/app/(dashboard)/grid/page.tsx +++ b/src/app/(dashboard)/grid/page.tsx @@ -35,7 +35,9 @@ export default async function GridPage({ searchParams }: GridPageProps) { } // 3. Load real product data for the selected supplier + console.log(`\n>>> [GridPage] Fetching data for: ${codeFournisseur}, shop: ${magasin}`); const rows = await getGridData(codeFournisseur, magasin, filters); + console.log(`>>> [GridPage] Received ${rows.length} rows from getGridData`); const selectedFournisseur = fournisseurs.find((f: { code: string; nom: string }) => f.code === codeFournisseur); return ( diff --git a/src/features/grid/api/get-product-rows.ts b/src/features/grid/api/get-product-rows.ts index 025f539..b02fad0 100644 --- a/src/features/grid/api/get-product-rows.ts +++ b/src/features/grid/api/get-product-rows.ts @@ -18,7 +18,9 @@ interface GetProductRowsInput { export async function getProductRows(input: GetProductRowsInput): Promise { const { codeFournisseur, magasin = "TOTAL", filters } = input; - + console.log(`\n>>> [getProductRows] RECEIVED CALL for supplier: ${codeFournisseur}, magasin: ${magasin}`); + console.log(`>>> [getProductRows] filters:`, JSON.stringify(filters)); + try { // Self-healing: Ensure codeGammeInit column exists and is populated if (!isSchemaInitialized) {