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
Add loader to company switch route to handle GET requests (#857)
Sid8e3608acc53b
diff --git a/apps/erp/app/routes/x+/settings+/company.switch.$companyId.tsx b/apps/erp/app/routes/x+/settings+/company.switch.$companyId.tsxindex 8d32776f45..cec8ade48c 100644--- a/apps/erp/app/routes/x+/settings+/company.switch.$companyId.tsx+++ b/apps/erp/app/routes/x+/settings+/company.switch.$companyId.tsx@@ -11,6 +11,10 @@ import { redirect } from "react-router";import { getCompanies } from "~/modules/settings";import { path, requestReferrer } from "~/utils/path";+export async function loader() {+ throw redirect(path.to.authenticatedRoot);+}+export async function action({ request, params }: ActionFunctionArgs) {const { client, userId } = await requirePermissions(request, {});