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
chore: remove explanatory comments
naveenkash501c5a94a0c3
diff --git a/apps/erp/app/routes/_public+/invite.$code.tsx b/apps/erp/app/routes/_public+/invite.$code.tsxindex dbb7aa6f4a..c55cf15094 100644--- a/apps/erp/app/routes/_public+/invite.$code.tsx+++ b/apps/erp/app/routes/_public+/invite.$code.tsx@@ -92,9 +92,6 @@ export async function action({ request, params }: ActionFunctionArgs) {]});} else {- // Carry the invited company through the magic link — after the callback- // establishes the session, /api/link switches the user into it. Otherwise- // a multi-company user lands in whatever company their cookie last held.const magicLink = await serviceRole.auth.admin.generateLink({type: "magiclink",email: accept.data.email,@@ -104,10 +101,6 @@ export async function action({ request, params }: ActionFunctionArgs) {)}`}});- // Also set the companyId cookie now, while the browser is on our origin:- // it survives the Supabase round trip even if GoTrue's redirect allow-list- // strips the query param above, and the callback's cookie-based company- // pick then lands the user in the invited company.throw redirect(magicLink.data?.properties?.action_link ?? path.to.root, {headers: [["Set-Cookie", setCompanyId(accept.data.companyId)]]});diff --git a/apps/erp/app/routes/api+/link.ts b/apps/erp/app/routes/api+/link.tsindex 417b9af8e2..5a6a90426f 100644--- a/apps/erp/app/routes/api+/link.ts+++ b/apps/erp/app/routes/api+/link.ts@@ -119,8 +119,6 @@ export async function loader({ request }: LoaderFunctionArgs) {const link = resolve(event, documentId, documentType ?? undefined);redirectTo = link ?? path.to.authenticatedRoot;} else if (companyId) {- // Company-only link (e.g. invite acceptance) — no document, just the- // company-switch below before landing on the root.redirectTo = path.to.authenticatedRoot;} else {throw redirect(path.to.authenticatedRoot);@@ -130,9 +128,6 @@ export async function loader({ request }: LoaderFunctionArgs) {// recipient may currently be viewing a different one. If the linked company// is one the user belongs to, switch them into it before redirecting — the// same flow the company switcher uses — so the document actually resolves.- // The cookie is checked too, not just the session: a multi-company user- // fresh from the login callback has a session company but no companyId- // cookie, and without the cookie x+/_layout bounces them to the picker.if (companyId &&(companyId !== sessionCompanyId || companyId !== getCompanyId(request))diff --git a/packages/jobs/src/inngest/functions/notifications/content.ts b/packages/jobs/src/inngest/functions/notifications/content.tsindex 1944326615..166b2d8329 100644--- a/packages/jobs/src/inngest/functions/notifications/content.ts+++ b/packages/jobs/src/inngest/functions/notifications/content.ts@@ -1162,8 +1162,6 @@ async function buildEventContent(.eq("id", changeOrderData.assignee).maybeSingle();if (assignee.error) {- // Best-effort: the assignee row is decorative, so log and send the- // notification without it rather than failing the whole job.console.error("Failed to get change order assignee", assignee.error);}assigneeName = assignee.data?.fullName ?? null;diff --git a/packages/jobs/src/inngest/functions/notifications/notify.ts b/packages/jobs/src/inngest/functions/notifications/notify.tsindex 6136cbb8e0..1e770322dc 100644--- a/packages/jobs/src/inngest/functions/notifications/notify.ts+++ b/packages/jobs/src/inngest/functions/notifications/notify.ts@@ -287,10 +287,6 @@ export const notifyFunction = inngest.createFunction(if (payload.from) ids = ids.filter((id) => id !== payload.from);ids = [...new Set(ids)];- // Deactivation deletes the userToCompany row but leaves stale userId- // references behind (assignee columns, notification-group settings,- // workCenterEmployee), so keep only current company members — otherwise- // ex-employees keep receiving email/Slack notifications.if (ids.length > 0) {const members = await client.from("userToCompany")