feat(grid): implement product streaming with JSON chunks for grid client

This commit is contained in:
Michael committed 2026-05-26 13:31:26 +02:00
1 parent 8809819658
commit e6f40d3d81
13 files changed
+580 -98

No files matched your search

@@ -5,6 +5,7 @@ import { sessionSnapshots } from "@/db/schema";
import { eq, desc } from "drizzle-orm";
import { z } from "zod";
import { auth } from "@/lib/auth";
import { invalidateGridRowsCache } from "./get-product-rows";
const SaveDraftsSchema = z.object({
codeFournisseur: z.string(),
@@ -69,6 +70,8 @@ export async function saveDraftChanges(
type: "snapshot",
});
invalidateGridRowsCache(codeFournisseur);
return { success: true, saved: changes.length };
} catch (err) {
const msg = err instanceof Error ? err.message : "Unknown error";