Open-source manufacturing ERP, MES and QMS. Quoting, MRP, inventory, shop floor, quality and lot/serial traceability on one Postgres schema, with a REST API and MCP server. Self-host or use Carbon Cloud.
TypeScript ai-agentsbill-of-materialserpinventory-managementleanmanufacturingmanufacturing-execution-systemmcp-servermesmrpopen-source-erppostgresqlproduction-planningqmsquality-management-systemreact-routerself-hostedsupabasetraceabilitytypescript
fix(purchasing): clear supplier-process cache on delete to prevent stale dropdown (#1200)
Siddharth Gaikwade3d045dffa06
diff --git a/apps/erp/app/routes/x+/supplier+/$supplierId.processes.delete.$id.tsx b/apps/erp/app/routes/x+/supplier+/$supplierId.processes.delete.$id.tsxindex 0a75be159a..71d7c7bb65 100644--- a/apps/erp/app/routes/x+/supplier+/$supplierId.processes.delete.$id.tsx+++ b/apps/erp/app/routes/x+/supplier+/$supplierId.processes.delete.$id.tsx@@ -39,7 +39,11 @@ export async function action({ request, params }: ActionFunctionArgs) {}export async function clientAction({ serverAction }: ClientActionFunctionArgs) {- window.clientCache?.invalidateQueries({+ // Remove (not just invalidate) the cached supplier processes. The consuming+ // clientLoader reads via getQueryData and only refetches on a cache miss, so+ // invalidateQueries alone leaves stale data (a deleted supplier) in the+ // dropdown until a hard refresh. removeQueries forces a server refetch.+ window.clientCache?.removeQueries({queryKey: ["supplierProcesses"]});return await serverAction();