Skip to content

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.

fix(mes): remove non-existent timezone column from productionEvent writes

Sidwebworks36e47aed75e6
diff --git a/apps/erp/app/routes/api+/mcp+/lib/tool-metadata.json b/apps/erp/app/routes/api+/mcp+/lib/tool-metadata.json
index 5b03886c8e..ca727721a0 100644
--- a/apps/erp/app/routes/api+/mcp+/lib/tool-metadata.json
+++ b/apps/erp/app/routes/api+/mcp+/lib/tool-metadata.json
@@ -1,5 +1,5 @@
{
- "generated": "2026-08-06T04:11:06.770Z",
+ "generated": "2026-08-06T18:37:59.212Z",
"totalTools": 1414,
"modules": 15,
"tools": [
diff --git a/apps/mes/app/components/AssemblyView.tsx b/apps/mes/app/components/AssemblyView.tsx
index 7e01c3d828..b3ca87d0cd 100644
--- a/apps/mes/app/components/AssemblyView.tsx
+++ b/apps/mes/app/components/AssemblyView.tsx
@@ -50,7 +50,6 @@ import type {
} from "@carbon/viewer";
import { AssemblyPlayer } from "@carbon/viewer";
import { ModelPreview } from "@carbon/viewer/model-preview";
-import { getLocalTimeZone } from "@internationalized/date";
import { useEffect, useMemo, useRef, useState } from "react";
import {
LuBox,
@@ -1128,7 +1127,6 @@ export function AssemblyView({
) {
const fd = new FormData();
fd.set("jobOperationId", operation.id);
- fd.set("timezone", getLocalTimeZone());
fd.set("type", "Labor");
fd.set("action", "Start");
// Recording the first step means hands-on build has begun: end any open
@@ -1163,7 +1161,6 @@ export function AssemblyView({
) {
const fd = new FormData();
fd.set("jobOperationId", operation.id);
- fd.set("timezone", getLocalTimeZone());
fd.set("type", "Labor");
fd.set("action", "End");
fd.set("id", openLaborEvent.id);
@@ -2552,7 +2549,6 @@ function AutoTimer({
if (running || busy) return;
const fd = new FormData();
fd.set("jobOperationId", operationId);
- fd.set("timezone", getLocalTimeZone());
fd.set("type", workType);
fd.set("action", "Start");
fd.set("exclusive", "true");
@@ -2626,7 +2622,6 @@ function TimerControl({
className="h-full shrink-0"
>
<input type="hidden" name="jobOperationId" value={operation.id} />
- <input type="hidden" name="timezone" value={getLocalTimeZone()} />
<input type="hidden" name="type" value={workType} />
{/* Single-phase clocking: starting this type ends any other open type. */}
<input type="hidden" name="exclusive" value="true" />
diff --git a/apps/mes/app/components/EndShift.tsx b/apps/mes/app/components/EndShift.tsx
index 10b35e44e2..4c224867d4 100644
--- a/apps/mes/app/components/EndShift.tsx
+++ b/apps/mes/app/components/EndShift.tsx
@@ -15,7 +15,6 @@ import {
toast,
useDisclosure
} from "@carbon/react";
-import { getLocalTimeZone } from "@internationalized/date";
import { Trans, useLingui } from "@lingui/react/macro";
import { useEffect, useState } from "react";
import { flushSync } from "react-dom";
@@ -140,11 +139,6 @@ export function EndShift() {
>
<Trans>Cancel</Trans>
</Button>
- <input
- type="hidden"
- name="timezone"
- value={getLocalTimeZone()}
- />
<Button
type="submit"
isDisabled={fetcher.state !== "idle"}
diff --git a/apps/mes/app/components/Inspection/InspectionView.tsx b/apps/mes/app/components/Inspection/InspectionView.tsx
index dd4ce9c4d0..bca0f9257e 100644
--- a/apps/mes/app/components/Inspection/InspectionView.tsx
+++ b/apps/mes/app/components/Inspection/InspectionView.tsx
@@ -20,7 +20,6 @@ import {
useMode,
VStack
} from "@carbon/react";
-import { getLocalTimeZone } from "@internationalized/date";
import { Trans, useLingui } from "@lingui/react/macro";
import {
lazy,
@@ -1245,7 +1244,6 @@ function AutoTimer({
if (running || busy) return;
const fd = new FormData();
fd.set("jobOperationId", operationId);
- fd.set("timezone", getLocalTimeZone());
fd.set("type", workType);
fd.set("action", "Start");
fd.set("exclusive", "true");
@@ -1316,7 +1314,6 @@ function TimerControl({
className="h-full shrink-0"
>
<input type="hidden" name="jobOperationId" value={operationId} />
- <input type="hidden" name="timezone" value={getLocalTimeZone()} />
<input type="hidden" name="type" value={workType} />
<input type="hidden" name="exclusive" value="true" />
<input type="hidden" name="action" value={openEvent ? "End" : "Start"} />
diff --git a/apps/mes/app/components/JobOperation/components/Controls.tsx b/apps/mes/app/components/JobOperation/components/Controls.tsx
index b14a5aeda8..44002b7a7a 100644
--- a/apps/mes/app/components/JobOperation/components/Controls.tsx
+++ b/apps/mes/app/components/JobOperation/components/Controls.tsx
@@ -8,7 +8,6 @@ import {
TooltipProvider,
TooltipTrigger
} from "@carbon/react";
-import { getLocalTimeZone } from "@internationalized/date";
import { Trans, useLingui } from "@lingui/react/macro";
import { AnimatePresence, motion } from "framer-motion";
import type { ComponentProps, ReactNode } from "react";
@@ -292,7 +291,6 @@ export function StartStopButton({
defaultValues={{
id,
jobOperationId: operation.id,
- timezone: getLocalTimeZone(),
action: isActive ? "End" : "Start",
type: eventType,
workCenterId: operation.workCenterId ?? undefined
@@ -304,7 +302,6 @@ export function StartStopButton({
<Hidden name="trackedEntityId" value={trackedEntityId} />
)}
<Hidden name="jobOperationId" value={operation.id} />
- <Hidden name="timezone" />
<Hidden name="action" value={isActive ? "End" : "Start"} />
<Hidden name="type" value={eventType} />
diff --git a/apps/mes/app/services/models.ts b/apps/mes/app/services/models.ts
index 6993b7b64a..c430950c97 100644
--- a/apps/mes/app/services/models.ts
+++ b/apps/mes/app/services/models.ts
@@ -143,7 +143,6 @@ export const productionEventValidator = z.object({
jobOperationId: z
.string()
.min(1, { message: "Job Operation ID is required" }),
- timezone: zfd.text(z.string()),
action: z.enum(productionEventAction, {
errorMap: (issue, ctx) => ({
message: "Action is required"
diff --git a/apps/mes/app/services/operations.service.ts b/apps/mes/app/services/operations.service.ts
index 01edee9236..4a1ae6046f 100644
--- a/apps/mes/app/services/operations.service.ts
+++ b/apps/mes/app/services/operations.service.ts
@@ -1634,7 +1634,7 @@ export async function startProductionEvent(
client: SupabaseClient<Database>,
data: Omit<
z.infer<typeof productionEventValidator>,
- "id" | "action" | "timezone" | "hasActiveEvents" | "unitIndex"
+ "id" | "action" | "hasActiveEvents" | "unitIndex"
> & {
startTime: string;
employeeId: string;