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
feat: make mes work on mobile devices
Brad Barbin77daafa0cedf
diff --git a/apps/mes-prototype/.env.example b/apps/mes-prototype/.env.exampledeleted file mode 100644index 246c84fac6..0000000000--- a/apps/mes-prototype/.env.example+++ /dev/null@@ -1,2 +0,0 @@-VITE_SUPABASE_ANON_KEY="******************"-VITE_SUPABASE_URL="http://localhost:54321"\ No newline at end of filediff --git a/apps/mes-prototype/.eslintrc.cjs b/apps/mes-prototype/.eslintrc.cjsdeleted file mode 100644index 65a809a23c..0000000000--- a/apps/mes-prototype/.eslintrc.cjs+++ /dev/null@@ -1,6 +0,0 @@-module.exports = {- root: true,- env: { browser: true, es2020: true },- extends: ["carbon"],- ignorePatterns: ["dist", ".eslintrc.cjs"],-};diff --git a/apps/mes-prototype/.gitignore b/apps/mes-prototype/.gitignoredeleted file mode 100644index a547bf36d8..0000000000--- a/apps/mes-prototype/.gitignore+++ /dev/null@@ -1,24 +0,0 @@-# Logs-logs-*.log-npm-debug.log*-yarn-debug.log*-yarn-error.log*-pnpm-debug.log*-lerna-debug.log*--node_modules-dist-dist-ssr-*.local--# Editor directories and files-.vscode/*-!.vscode/extensions.json-.idea-.DS_Store-*.suo-*.ntvs*-*.njsproj-*.sln-*.sw?diff --git a/apps/mes-prototype/index.html b/apps/mes-prototype/index.htmldeleted file mode 100644index bc06b94630..0000000000--- a/apps/mes-prototype/index.html+++ /dev/null@@ -1,21 +0,0 @@-<!DOCTYPE html>-<html lang="en">- <head>- <meta charset="UTF-8" />- <meta name="viewport" content="width=device-width, initial-scale=1.0" />- <title>CarbonOS - MES</title>- <style>- p.is-editor-empty:first-child:before {- color: var(--muted-foreground);- content: attr(data-placeholder);- float: left;- height: 0;- pointer-events: none;- }- </style>- </head>- <body class="bg-background dark">- <div id="root"></div>- <script type="module" src="/src/main.tsx"></script>- </body>-</html>diff --git a/apps/mes-prototype/package.json b/apps/mes-prototype/package.jsondeleted file mode 100644index 68cb405744..0000000000--- a/apps/mes-prototype/package.json+++ /dev/null@@ -1,41 +0,0 @@-{- "name": "mes-prototype",- "private": true,- "version": "0.0.0",- "type": "module",- "scripts": {- "dev": "vite",- "build": "tsc && vite build",- "lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0",- "preview": "vite preview"- },- "dependencies": {- "@carbon/database": "*",- "@carbon/react": "*",- "@carbon/react-hook-form": "*",- "@carbon/tsconfig": "*",- "@hookform/resolvers": "^3.4.2",- "@supabase/supabase-js": "^2.40.0",- "class-variance-authority": "0.7.0",- "localforage": "^1.10.0",- "non.geist": "~1.0.3",- "react": "^18.3.1",- "react-dom": "^18.3.1",- "react-icons": "^5.3.0",- "react-router-dom": "^6.23.1",- "react-hook-form": "7.51.2",- "zod": "3.23.8"- },- "devDependencies": {- "@types/react": "^18.2.66",- "@types/react-dom": "^18.2.22",- "@vitejs/plugin-react": "^4.2.1",- "autoprefixer": "^10.4.14",- "eslint": "^8.57.0",- "eslint-config-carbon": "*",- "postcss": "^8.4.33",- "tailwindcss": "^3.3.2",- "typescript": "^5.2.2",- "vite": "^5.3.3"- }-}diff --git a/apps/mes-prototype/postcss.config.js b/apps/mes-prototype/postcss.config.jsdeleted file mode 100644index 2aa7205d4b..0000000000--- a/apps/mes-prototype/postcss.config.js+++ /dev/null@@ -1,6 +0,0 @@-export default {- plugins: {- tailwindcss: {},- autoprefixer: {},- },-};diff --git a/apps/mes-prototype/public/carbon-logo-dark.png b/apps/mes-prototype/public/carbon-logo-dark.pngdeleted file mode 100644index 75399c8d11..0000000000Binary files a/apps/mes-prototype/public/carbon-logo-dark.png and /dev/null differdiff --git a/apps/mes-prototype/public/carbon-logo-light.png b/apps/mes-prototype/public/carbon-logo-light.pngdeleted file mode 100644index c0f93e6fe2..0000000000Binary files a/apps/mes-prototype/public/carbon-logo-light.png and /dev/null differdiff --git a/apps/mes-prototype/public/favicon.ico b/apps/mes-prototype/public/favicon.icodeleted file mode 100644index ce92de6710..0000000000Binary files a/apps/mes-prototype/public/favicon.ico and /dev/null differdiff --git a/apps/mes-prototype/public/grid.svg b/apps/mes-prototype/public/grid.svgdeleted file mode 100644index d9dc0423ed..0000000000--- a/apps/mes-prototype/public/grid.svg+++ /dev/null@@ -1,5 +0,0 @@--<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100">- <path id="Path_3" data-name="Path 3" d="M96,95h4v1H96v4H95V96H86v4H85V96H76v4H75V96H66v4H65V96H56v4H55V96H46v4H45V96H36v4H35V96H26v4H25V96H16v4H15V96H0V95H15V86H0V85H15V76H0V75H15V66H0V65H15V56H0V55H15V46H0V45H15V36H0V35H15V26H0V25H15V16H0V15H15V0h1V15h9V0h1V15h9V0h1V15h9V0h1V15h9V0h1V15h9V0h1V15h9V0h1V15h9V0h1V15h9V0h1V15h4v1H96v9h4v1H96v9h4v1H96v9h4v1H96v9h4v1H96v9h4v1H96v9h4v1H96v9h4v1H96Zm-1,0V86H86v9ZM85,95V86H76v9ZM75,95V86H66v9ZM65,95V86H56v9ZM55,95V86H46v9ZM45,95V86H36v9ZM35,95V86H26v9ZM25,95V86H16v9ZM16,85h9V76H16Zm10,0h9V76H26Zm10,0h9V76H36Zm10,0h9V76H46Zm10,0h9V76H56Zm10,0h9V76H66Zm10,0h9V76H76Zm10,0h9V76H86Zm9-10V66H86v9ZM85,75V66H76v9ZM75,75V66H66v9ZM65,75V66H56v9ZM55,75V66H46v9ZM45,75V66H36v9ZM35,75V66H26v9ZM25,75V66H16v9ZM16,65h9V56H16Zm10,0h9V56H26Zm10,0h9V56H36Zm10,0h9V56H46Zm10,0h9V56H56Zm10,0h9V56H66Zm10,0h9V56H76Zm10,0h9V56H86Zm9-10V46H86v9ZM85,55V46H76v9ZM75,55V46H66v9ZM65,55V46H56v9ZM55,55V46H46v9ZM45,55V46H36v9ZM35,55V46H26v9ZM25,55V46H16v9ZM16,45h9V36H16Zm10,0h9V36H26Zm10,0h9V36H36Zm10,0h9V36H46Zm10,0h9V36H56Zm10,0h9V36H66Zm10,0h9V36H76Zm10,0h9V36H86Zm9-10V26H86v9ZM85,35V26H76v9ZM75,35V26H66v9ZM65,35V26H56v9ZM55,35V26H46v9ZM45,35V26H36v9ZM35,35V26H26v9ZM25,35V26H16v9ZM16,25h9V16H16Zm10,0h9V16H26Zm10,0h9V16H36Zm10,0h9V16H46Zm10,0h9V16H56Zm10,0h9V16H66Zm10,0h9V16H76Zm10,0h9V16H86Z" fill="rgba(255,255,255,0.1)" fill-rule="evenodd" opacity="0.5"/>- <path id="Path_4" data-name="Path 4" d="M6,5V0H5V5H0V6H5v94H6V6h94V5Z" fill="rgba(255,255,255,0.1)" fill-rule="evenodd"/>-</svg>diff --git a/apps/mes-prototype/src/assets/icons/AlmostDoneIcon.tsx b/apps/mes-prototype/src/assets/icons/AlmostDoneIcon.tsxdeleted file mode 100644index 921e44a27f..0000000000--- a/apps/mes-prototype/src/assets/icons/AlmostDoneIcon.tsx+++ /dev/null@@ -1,34 +0,0 @@-export function AlmostDoneIcon({ className }: { className?: string }) {- return (- <svg- width="14"- height="14"- viewBox="0 0 14 14"- fill="none"- color="currentColor"- className={className}- >- <circle- cx="7"- cy="7"- r="6"- fill="none"- stroke="#26a544"- strokeWidth="2"- strokeDasharray="3.14 0"- strokeDashoffset="-0.7"- ></circle>- <circle- cx="7"- cy="7"- r="2"- fill="none"- stroke="#26a544"- strokeWidth="4"- strokeDasharray="9.377654070965532 100"- strokeDashoffset="0"- transform="rotate(-90 7 7)"- ></circle>- </svg>- );-}diff --git a/apps/mes-prototype/src/assets/icons/AttemptIcon.tsx b/apps/mes-prototype/src/assets/icons/AttemptIcon.tsxdeleted file mode 100644index 9fd9d7f6eb..0000000000--- a/apps/mes-prototype/src/assets/icons/AttemptIcon.tsx+++ /dev/null@@ -1,29 +0,0 @@-export function AttemptIcon({ className }: { className?: string }) {- return (- <svg- className={className}- width="16"- height="16"- viewBox="0 0 16 16"- fill="none"- xmlns="http://www.w3.org/2000/svg"- >- <g clipPath="url(#clip0_9964_113464)">- <path- fillRule="evenodd"- clipRule="evenodd"- d="M16 0H0V16H16V0ZM7.09906 4.4L4.53906 11.5H6.11906L6.63906 10H9.35906L9.87906 11.5H11.4591L8.89906 4.4H7.09906ZM7.99906 6L8.92906 8.73H7.06906L7.99906 6Z"- fill="currentColor"- />- </g>- <defs>- <clipPath id="clip0_9964_113464">- <path- d="M0 2C0 0.895431 0.895431 0 2 0H14C15.1046 0 16 0.895431 16 2V14C16 15.1046 15.1046 16 14 16H2C0.895431 16 0 15.1046 0 14V2Z"- fill="white"- />- </clipPath>- </defs>- </svg>- );-}diff --git a/apps/mes-prototype/src/assets/icons/HighPriorityIcon.tsx b/apps/mes-prototype/src/assets/icons/HighPriorityIcon.tsxdeleted file mode 100644index e138e67e38..0000000000--- a/apps/mes-prototype/src/assets/icons/HighPriorityIcon.tsx+++ /dev/null@@ -1,18 +0,0 @@-export function HighPriorityIcon({ className }: { className?: string }) {- return (- <svg- aria-label="High Priority"- className={className}- width="16"- height="16"- viewBox="0 0 16 16"- fill="currentColor"- role="img"- focusable="false"- >- <rect x="1.5" y="8" width="3" height="6" rx="1"></rect>- <rect x="6.5" y="5" width="3" height="9" rx="1"></rect>- <rect x="11.5" y="2" width="3" height="12" rx="1"></rect>- </svg>- );-}diff --git a/apps/mes-prototype/src/assets/icons/InProgressStatusIcon.tsx b/apps/mes-prototype/src/assets/icons/InProgressStatusIcon.tsxdeleted file mode 100644index 17b4632108..0000000000--- a/apps/mes-prototype/src/assets/icons/InProgressStatusIcon.tsx+++ /dev/null@@ -1,35 +0,0 @@-export function InProgressStatusIcon({ className }: { className?: string }) {- return (- <svg- width="14"- height="14"- viewBox="0 0 14 14"- fill="none"- color="currentColor"- className={className}- >- <circle- cx="7"- cy="7"- r="6"- fill="none"- stroke="#f2be00"- strokeWidth="2"- strokeDasharray="3.14 0"- strokeDashoffset="-0.7"- ></circle>- <circle- className="progress"- cx="7"- cy="7"- r="2"- fill="none"- stroke="#f2be00"- strokeWidth="4"- strokeDasharray="6.2517693806436885 100"- strokeDashoffset="0"- transform="rotate(-90 7 7)"- ></circle>- </svg>- );-}diff --git a/apps/mes-prototype/src/assets/icons/LowPriorityIcon.tsx b/apps/mes-prototype/src/assets/icons/LowPriorityIcon.tsxdeleted file mode 100644index b05e94e861..0000000000--- a/apps/mes-prototype/src/assets/icons/LowPriorityIcon.tsx+++ /dev/null@@ -1,25 +0,0 @@-export function LowPriorityIcon({ className }: { className?: string }) {- return (- <svg- aria-label="Low Priority"- className={className}- width="16"- height="16"- viewBox="0 0 16 16"- fill="currentColor"- role="img"- focusable="false"- >- <rect x="1.5" y="8" width="3" height="6" rx="1"></rect>- <rect x="6.5" y="5" width="3" height="9" rx="1" fillOpacity="0.4"></rect>- <rect- x="11.5"- y="2"- width="3"- height="12"- rx="1"- fillOpacity="0.4"- ></rect>- </svg>- );-}diff --git a/apps/mes-prototype/src/assets/icons/MediumPriorityIcon.tsx b/apps/mes-prototype/src/assets/icons/MediumPriorityIcon.tsxdeleted file mode 100644index 296884ae02..0000000000--- a/apps/mes-prototype/src/assets/icons/MediumPriorityIcon.tsx+++ /dev/null@@ -1,25 +0,0 @@-export function MediumPriorityIcon({ className }: { className?: string }) {- return (- <svg- aria-label="Medium Priority"- className={className}- width="16"- height="16"- viewBox="0 0 16 16"- fill="currentColor"- role="img"- focusable="false"- >- <rect x="1.5" y="8" width="3" height="6" rx="1"></rect>- <rect x="6.5" y="5" width="3" height="9" rx="1"></rect>- <rect- x="11.5"- y="2"- width="3"- height="12"- rx="1"- fillOpacity="0.4"- ></rect>- </svg>- );-}diff --git a/apps/mes-prototype/src/assets/icons/ShowParentIcon.tsx b/apps/mes-prototype/src/assets/icons/ShowParentIcon.tsxdeleted file mode 100644index 656f311124..0000000000--- a/apps/mes-prototype/src/assets/icons/ShowParentIcon.tsx+++ /dev/null@@ -1,35 +0,0 @@-export function ShowParentIcon({ className }: { className?: string }) {- return (- <svg- className={className}- viewBox="0 0 16 16"- fill="none"- xmlns="http://www.w3.org/2000/svg"- >- <path- fill="currentColor"- fillRule="evenodd"- clipRule="evenodd"- d="M3.125 16H3.625H4.125V15H3.125H2C1.89733 15 1.8 14.9848 1.70919 14.9573L1.19765 14.8024L1.04267 14.2908C1.01515 14.2 1 14.1027 1 14V12.875V11.875H0V12.375V12.875V14C0 14.202 0.0299409 14.397 0.0856265 14.5808C0.135047 14.7439 0.204744 14.8982 0.291786 15.0407C0.363386 15.158 0.446722 15.2673 0.540161 15.3671C0.570065 15.399 0.601004 15.4299 0.632924 15.4598C0.732663 15.5533 0.841982 15.6366 0.95925 15.7082C1.10181 15.7953 1.25612 15.865 1.41923 15.9144C1.60303 15.9701 1.79802 16 2 16H3.125ZM10.125 15V16H9.625H9.125H6.875H6.375H5.875V15H6.875H9.125H10.125ZM15 5.875H16V6.375V6.875V9.125V9.625V10.125H15V9.125V6.875V5.875ZM5.875 1V0H6.375H6.875H9.125H9.625H10.125V1H9.125H6.875H5.875ZM1 10.125H0V9.625V9.125V6.875V6.375V5.875H1V6.875V9.125V10.125ZM0 3.625V4.125H1V3.125V2C1 1.89733 1.01515 1.8 1.04267 1.70919L1.19765 1.19765L1.70919 1.04267C1.8 1.01515 1.89733 1 2 1H3.125H4.125V0H3.625H3.125H2C1.79802 0 1.60303 0.0299409 1.41923 0.0856264C1.25612 0.135047 1.10181 0.204744 0.95925 0.291786C0.841983 0.363386 0.732663 0.446722 0.632924 0.540161C0.601004 0.570065 0.570065 0.601004 0.540161 0.632924C0.446722 0.732663 0.363386 0.841982 0.291786 0.95925C0.204744 1.10181 0.135047 1.25612 0.0856265 1.41923C0.0299409 1.60303 0 1.79802 0 2V3.125V3.625ZM12.375 0H11.875V1H12.875H14C14.1027 1 14.2 1.01515 14.2908 1.04267L14.8024 1.19765L14.9573 1.70919C14.9848 1.8 15 1.89733 15 2V3.125V4.125H16V3.625V3.125V2C16 1.79802 15.9701 1.60303 15.9144 1.41923C15.865 1.25612 15.7953 1.10181 15.7082 0.95925C15.6366 0.841982 15.5533 0.732663 15.4598 0.632924C15.4299 0.601004 15.399 0.570065 15.3671 0.540161C15.2673 0.446722 15.158 0.363386 15.0407 0.291786C14.8982 0.204744 14.7439 0.135047 14.5808 0.0856265C14.397 0.0299409 14.202 0 14 0H12.875H12.375ZM16 12.375V11.875H15V12.875V14C15 14.1027 14.9848 14.2 14.9573 14.2908L14.8024 14.8024L14.2908 14.9573C14.2 14.9848 14.1027 15 14 15H12.875H11.875V16H12.375H12.875H14C14.202 16 14.397 15.9701 14.5808 15.9144C14.7439 15.865 14.8982 15.7953 15.0407 15.7082C15.158 15.6366 15.2673 15.5533 15.3671 15.4598C15.399 15.4299 15.4299 15.399 15.4598 15.3671C15.5533 15.2673 15.6366 15.158 15.7082 15.0407C15.7953 14.8982 15.865 14.7439 15.9144 14.5808C15.9701 14.397 16 14.202 16 14V12.875V12.375ZM8.75 6.26758L10.4523 7.96991C10.7452 8.26281 11.2201 8.26281 11.513 7.96991C11.8059 7.67702 11.8059 7.20215 11.513 6.90925L8.59099 3.98725C8.43431 3.83057 8.22556 3.7577 8.02045 3.76865C7.81604 3.75834 7.60821 3.83124 7.45209 3.98736L4.53009 6.90937C4.23719 7.20226 4.23719 7.67713 4.53009 7.97003C4.82298 8.26292 5.29785 8.26292 5.59075 7.97003L7.25 6.31077L7.25 11.25C7.25 11.6642 7.58579 12 8 12C8.41421 12 8.75 11.6642 8.75 11.25L8.75 6.26758Z"- />- </svg>- );-}--export function ShowParentIconSelected({ className }: { className?: string }) {- return (- <svg- className={className}- viewBox="0 0 16 16"- fill="none"- xmlns="http://www.w3.org/2000/svg"- >- <path- fill="currentColor"- fillRule="evenodd"- clipRule="evenodd"- d="M2 0C0.895431 0 0 0.895431 0 2V14C0 15.1046 0.895431 16 2 16H14C15.1046 16 16 15.1046 16 14V2C16 0.895431 15.1046 0 14 0H2ZM8.75 6.26758L10.4523 7.96991C10.7452 8.26281 11.2201 8.26281 11.513 7.96991C11.8059 7.67702 11.8059 7.20215 11.513 6.90925L8.59099 3.98725C8.43344 3.8297 8.22324 3.7569 8.01703 3.76884C7.8138 3.75958 7.60752 3.83254 7.45234 3.98773L4.53033 6.90973C4.23744 7.20263 4.23744 7.6775 4.53033 7.97039C4.82322 8.26329 5.2981 8.26329 5.59099 7.97039L7.25 6.31138L7.25 11.25C7.25 11.6642 7.58579 12 8 12C8.41421 12 8.75 11.6642 8.75 11.25L8.75 6.26758Z"- />- </svg>- );-}diff --git a/apps/mes-prototype/src/assets/icons/TaskIcon.tsx b/apps/mes-prototype/src/assets/icons/TaskIcon.tsxdeleted file mode 100644index 48d9c4181d..0000000000--- a/apps/mes-prototype/src/assets/icons/TaskIcon.tsx+++ /dev/null@@ -1,29 +0,0 @@-export function TaskIcon({ className }: { className?: string }) {- return (- <svg- className={className}- width="16"- height="16"- viewBox="0 0 16 16"- fill="none"- xmlns="http://www.w3.org/2000/svg"- >- <g clipPath="url(#clip0_9221_99732)">- <path- fillRule="evenodd"- clipRule="evenodd"- d="M16 0H0V16H16V0ZM10.8901 5.73995V4.44995H5.11011V5.73995H7.23011V11.55H8.77011V5.73995H10.8901Z"- fill="currentColor"- />- </g>- <defs>- <clipPath id="clip0_9221_99732">- <path- d="M0 2C0 0.895431 0.895431 0 2 0H14C15.1046 0 16 0.895431 16 2V14C16 15.1046 15.1046 16 14 16H2C0.895431 16 0 15.1046 0 14V2Z"- fill="white"- />- </clipPath>- </defs>- </svg>- );-}diff --git a/apps/mes-prototype/src/assets/icons/TodoStatusIcon.tsx b/apps/mes-prototype/src/assets/icons/TodoStatusIcon.tsxdeleted file mode 100644index 58458ad63c..0000000000--- a/apps/mes-prototype/src/assets/icons/TodoStatusIcon.tsx+++ /dev/null@@ -1,35 +0,0 @@-export function TodoStatusIcon({ className }: { className?: string }) {- return (- <svg- width="14"- height="14"- viewBox="0 0 14 14"- fill="none"- color="currentColor"- className="className"- >- <circle- cx="7"- cy="7"- r="6"- fill="none"- stroke="#e2e2e2"- strokeWidth="2"- strokeDasharray="3.14 0"- strokeDashoffset="-0.7"- ></circle>- <circle- className="progress"- cx="7"- cy="7"- r="2"- fill="none"- stroke="#e2e2e2"- strokeWidth="4"- strokeDasharray="0 100"- strokeDashoffset="0"- transform="rotate(-90 7 7)"- ></circle>- </svg>- );-}diff --git a/apps/mes-prototype/src/components/Authentication.tsx b/apps/mes-prototype/src/components/Authentication.tsxdeleted file mode 100644index fcfdf95966..0000000000--- a/apps/mes-prototype/src/components/Authentication.tsx+++ /dev/null@@ -1,85 +0,0 @@-import { Spinner, useMount } from "@carbon/react";-import type { Session } from "@supabase/supabase-js";-import { useCallback, useState } from "react";-import { Outlet, useLocation, useNavigate } from "react-router-dom";-import { path } from "~/config";-import { supabase } from "~/lib/supabase";-import { Login } from "~/routes/login";-import { getUser } from "~/services";-import type { User } from "~/types";--export function Authentication() {- const [initializing, setInitializing] = useState(true);- const [session, setSession] = useState<Session | null>(null);-- useMount(() => {- supabase.auth.getSession().then(({ data: { session } }) => {- setSession(session);- setInitializing(false);- });-- supabase.auth.onAuthStateChange((_event, session) => {- setSession(session);- });- });-- return (- <>- <div className="background" />- <div className="relative z-10">- <div className="flex flex-col min-w-screen h-screen min-h-0">- {initializing ? (- <Loading />- ) : !session ? (- <Login />- ) : (- <Protected session={session} />- )}- </div>- </div>- </>- );-}--function Loading() {- return (- <div className="flex items-center justify-center h-full">- <Spinner className="h-8 w-8" />- </div>- );-}--function Protected({ session }: { session: Session }) {- if (!session) throw new Error("Session is not defined");-- const location = useLocation();- const navigate = useNavigate();- const [user, setUser] = useState<User>(null);-- const getUserData = async () => {- const { data, error } = await getUser(supabase, session.user.id);- if (error || !data) {- throw new Error("User not found");- }-- setUser(data);- };-- useMount(() => {- if (location.pathname === path.to.root) {- navigate(path.to.jobs);- }- getUserData();- });-- const signOut = useCallback(async () => {- await supabase.auth.signOut();- navigate(path.to.root);- }, [navigate]);-- return (- <main className="flex flex-col h-full w-full">- <Outlet context={{ user, signOut }} />- </main>- );-}diff --git a/apps/mes-prototype/src/components/Error.tsx b/apps/mes-prototype/src/components/Error.tsxdeleted file mode 100644index d61dafaf79..0000000000--- a/apps/mes-prototype/src/components/Error.tsx+++ /dev/null@@ -1,51 +0,0 @@-import { Button, Heading } from "@carbon/react";-import { isRouteErrorResponse, useRouteError } from "react-router-dom";--export default function ErrorPage() {- const error = useRouteError();- console.error(error);-- if (isRouteErrorResponse(error)) {- if (error.status === 401) {- // ...- } else if (error.status === 404) {- // ...- }-- return (- <div className="dark">- <div className="flex flex-col w-full h-screen bg-zinc-900 items-center justify-center space-y-4 ">- <img- src="/carbon-logo-light.png"- alt="Carbon Logo"- className="block max-w-[60px]"- />- <Heading size="h1">{error.status}</Heading>- <p className="text-muted-foreground max-w-2xl">{error.statusText}</p>- <Button onClick={() => (window.location.href = "/")}>- Back Home- </Button>- </div>- </div>- );- } else if (error instanceof Error) {- return (- <div className="dark">- <div className="flex flex-col w-full h-screen bg-zinc-900 items-center justify-center space-y-4 ">- <img- src="/carbon-logo-light.png"- alt="Carbon Logo"- className="block max-w-[60px]"- />- <Heading size="h1">Something went wrong</Heading>- <p className="text-muted-foreground max-w-2xl">{error.message}</p>- <Button onClick={() => (window.location.href = "/")}>- Back Home- </Button>- </div>- </div>- );- } else {- return <></>;- }-}diff --git a/apps/mes-prototype/src/components/Jobs/JobCard.tsx b/apps/mes-prototype/src/components/Jobs/JobCard.tsxdeleted file mode 100644index ed5800a345..0000000000--- a/apps/mes-prototype/src/components/Jobs/JobCard.tsx+++ /dev/null@@ -1,229 +0,0 @@-import {- Card,- CardContent,- CardHeader,- HStack,- Progress,- Tooltip,- TooltipContent,- TooltipTrigger,- cn,-} from "@carbon/react";-import {- convertDateStringToIsoString,- formatDurationMilliseconds,- formatRelativeTime,-} from "@carbon/utils";--import { BsExclamationSquareFill } from "react-icons/bs";-import {- LuCheckCircle,- LuClipboardCheck,- LuTimer,- LuXCircle,-} from "react-icons/lu";-import { useNavigate } from "react-router-dom";--import { AlmostDoneIcon } from "~/assets/icons/AlmostDoneIcon";-import { HighPriorityIcon } from "~/assets/icons/HighPriorityIcon";-import { InProgressStatusIcon } from "~/assets/icons/InProgressStatusIcon";-import { LowPriorityIcon } from "~/assets/icons/LowPriorityIcon";-import { MediumPriorityIcon } from "~/assets/icons/MediumPriorityIcon";-import { TodoStatusIcon } from "~/assets/icons/TodoStatusIcon";-// import CustomerAvatar from "~/components/CustomerAvatar";-// import EmployeeAvatarGroup from "~/components/EmployeeAvatarGroup";--import type { Job, JobSettings } from "~/types";--type JobCardProps = {- job: Job;- isSelected?: boolean;-} & JobSettings;--export function JobCard({- job,- isSelected = false,- showCustomer,- showDescription,- showDueDate,- showDuration,- showEmployee,- showProgress,- showStatus,-}: JobCardProps) {- const navigate = useNavigate();- const isOverdue =- job.deadlineType !== "No Deadline" && job.dueDate- ? new Date(job.dueDate) < new Date()- : false;-- return (- <Card- onClick={() => navigate(job.id)}- className={cn("cursor-pointer", isSelected && "from-muted to-muted")}- >- <CardHeader className={cn("max-w-full p-3 border-b relative")}>- <div className="flex w-full max-w-full justify-between">- <div className="flex flex-col space-y-0">- {job.part && (- <span className="text-xs text-muted-foreground truncate">- {job.part}- </span>- )}- <span className="mr-auto font-semibold truncate">- {job.readableId}- </span>- </div>- </div>-- {showProgress &&- ["PAUSED", "DONE", "IN_PROGRESS"].includes(job.status!) && (- <Progress- indicatorClassName={- job.status === "PAUSED" ? "bg-yellow-500" : ""- }- numerator={- job.progress ? formatDurationMilliseconds(job.progress) : ""- }- denominator={- job.duration ? formatDurationMilliseconds(job.duration) : ""- }- value={- job.progress && job.duration- ? (job.progress / job.duration) * 100- : 0- }- />- )}- </CardHeader>- <CardContent className="p-3 space-y-2 text-left whitespace-pre-wrap text-sm">- {showDescription && job.description && (- <HStack className="justify-start space-x-2">- <LuClipboardCheck className="text-muted-foreground" />- <span className="text-sm">{job.description}</span>- </HStack>- )}- {showStatus && job.status && (- <HStack className="justify-start space-x-2">- {getStatusIcon(job.status)}- <span className="text-sm">{getStatusText(job.status)}</span>- </HStack>- )}- {showDuration && job.duration && (- <HStack className="justify-start space-x-2">- <LuTimer className="text-muted-foreground" />- <span className="text-sm">- {formatDurationMilliseconds(job.duration)}- </span>- </HStack>- )}- {showDueDate && job.deadlineType && (- <HStack className="justify-start space-x-2">- {getDeadlineIcon(job.deadlineType, isOverdue)}- <Tooltip>- <TooltipTrigger>- <span- className={cn("text-sm", isOverdue ? "text-red-500" : "")}- >- {["ASAP", "No Deadline"].includes(job.deadlineType)- ? getDeadlineText(job.deadlineType)- : job.dueDate- ? `Due ${formatRelativeTime(- convertDateStringToIsoString(job.dueDate)- )}`- : "–"}- </span>- </TooltipTrigger>- <TooltipContent side="right">- {getDeadlineText(job.deadlineType)}- </TooltipContent>- </Tooltip>- </HStack>- )}-- {/* {showCustomer && job.customerId && (- <HStack className="justify-start space-x-2">- <LuFactory className="text-muted-foreground" />- <CustomerAvatar customerId={job.customerId} />- </HStack>- )}-- {showEmployee && job.employeeIds && (- <HStack className="justify-start space-x-2">- <LuUsers className="text-muted-foreground" />- <EmployeeAvatarGroup employeeIds={job.employeeIds} />- </HStack>- )} */}- </CardContent>- </Card>- );-}--export function getStatusIcon(status: Job["status"]) {- switch (status) {- case "READY":- case "TODO":- return <TodoStatusIcon className="text-foreground" />;- case "WAITING":- case "CANCELED":- return <LuXCircle className="text-muted-foreground" />;- case "DONE":- return <LuCheckCircle className="text-blue-600" />;- case "IN_PROGRESS":- return <AlmostDoneIcon />;- case "PAUSED":- return <InProgressStatusIcon />;- default:- return null;- }-}--export function getStatusText(status: Job["status"], overdue: boolean = false) {- switch (status) {- case "READY":- return "Ready";- case "TODO":- return "Todo";- case "WAITING":- return "Waiting";- case "CANCELED":- return "Canceled";- case "DONE":- return "Done";- case "IN_PROGRESS":- return "In progress";- case "PAUSED":- return "Paused";- }-}--export function getDeadlineIcon(- deadlineType: Job["deadlineType"],- overdue: boolean-) {- switch (deadlineType) {- case "ASAP":- return <BsExclamationSquareFill className="text-red-500" />;- case "Hard Deadline":- return <HighPriorityIcon className={cn(overdue ? "text-red-500" : "")} />;- case "Soft Deadline":- return (- <MediumPriorityIcon className={cn(overdue ? "text-red-500" : "")} />- );- case "No Deadline":- return <LowPriorityIcon />;- }-}--export function getDeadlineText(deadlineType: Job["deadlineType"]) {- switch (deadlineType) {- case "ASAP":- return "ASAP";- case "Hard Deadline":- return "Hard deadline";- case "Soft Deadline":- return "Soft deadline";- case "No Deadline":- return "No deadline";- }-}diff --git a/apps/mes-prototype/src/components/Jobs/JobsList.tsx b/apps/mes-prototype/src/components/Jobs/JobsList.tsxdeleted file mode 100644index b667aa751b..0000000000--- a/apps/mes-prototype/src/components/Jobs/JobsList.tsx+++ /dev/null@@ -1,27 +0,0 @@-import { ScrollArea } from "@carbon/react";-import { useParams } from "react-router-dom";-import type { Job, JobSettings } from "~/types";-import { JobCard } from "./JobCard";--type JobsListProps = JobSettings & {- jobs: Job[];-};--export function JobsList({ jobs, ...settings }: JobsListProps) {- const { operationId } = useParams();-- return (- <ScrollArea className="h-[calc(100vh-120px)]">- <div className="flex flex-col gap-2 p-4 pt-0">- {jobs.map((job) => (- <JobCard- key={job.id}- job={job}- isSelected={operationId == job.id}- {...settings}- />- ))}- </div>- </ScrollArea>- );-}diff --git a/apps/mes-prototype/src/components/Jobs/WorkCellSelect.tsx b/apps/mes-prototype/src/components/Jobs/WorkCellSelect.tsxdeleted file mode 100644index 4c2a223a82..0000000000--- a/apps/mes-prototype/src/components/Jobs/WorkCellSelect.tsx+++ /dev/null@@ -1,47 +0,0 @@-import {- Select,- SelectContent,- SelectItem,- SelectTrigger,- SelectValue,-} from "@carbon/react";-import { useNavigate, useParams } from "react-router-dom";-import { path } from "~/config";-import type { WorkCell } from "~/lib/data";--interface WorkCellSelectProps {- value: string;- onChange: (value: string) => void;- workCells: WorkCell[];-}--export function WorkCellSelect({- value,- workCells,- onChange,-}: WorkCellSelectProps) {- const navigate = useNavigate();- const { operationId } = useParams();- return (- <Select- value={value}- onValueChange={(value) => {- onChange(value);- if (operationId) navigate(path.to.jobs);- }}- >- <SelectTrigger aria-label="Select work cell">- <SelectValue placeholder="Select a work cell">- {workCells.find((cell) => cell.id === value)?.title}- </SelectValue>- </SelectTrigger>- <SelectContent>- {workCells.map((cell) => (- <SelectItem key={cell.id} value={cell.id}>- {cell.title}- </SelectItem>- ))}- </SelectContent>- </Select>- );-}diff --git a/apps/mes-prototype/src/components/Nav.tsx b/apps/mes-prototype/src/components/Nav.tsxdeleted file mode 100644index d459327581..0000000000--- a/apps/mes-prototype/src/components/Nav.tsx+++ /dev/null@@ -1,65 +0,0 @@-import type { IconType } from "react-icons";--import {- Button,- IconButton,- Tooltip,- TooltipContent,- TooltipTrigger,-} from "@carbon/react";-import { Link } from "react-router-dom";--interface NavProps {- isCollapsed: boolean;- links: {- title: string;- label?: string;- icon: IconType;- variant: "active" | "ghost";- }[];-}--export function Nav({ links, isCollapsed }: NavProps) {- return (- <div- data-collapsed={isCollapsed}- className="group flex flex-col gap-4 py-2 data-[collapsed=true]:py-2 justify-between h-full"- >- <nav className="grid gap-1 px-2 group-[[data-collapsed=true]]:justify-center group-[[data-collapsed=true]]:px-2">- {links.map((link, index) =>- isCollapsed ? (- <Tooltip key={index} delayDuration={0}>- <TooltipTrigger asChild>- <IconButton- aria-label={link.title}- icon={<link.icon className="h-4 w-4" />}- variant={link.variant}- />- </TooltipTrigger>- <TooltipContent side="right" className="flex items-center gap-4">- {link.title}- {link.label && (- <span className="ml-auto text-muted-foreground">- {link.label}- </span>- )}- </TooltipContent>- </Tooltip>- ) : (- <Button- key={index}- leftIcon={<link.icon />}- variant={link.variant}- asChild- >- <Link to="#">- {link.title}- {link.label && <span className="ml-auto">{link.label}</span>}- </Link>- </Button>- )- )}- </nav>- </div>- );-}diff --git a/apps/mes-prototype/src/config.ts b/apps/mes-prototype/src/config.tsdeleted file mode 100644index 546e086a23..0000000000--- a/apps/mes-prototype/src/config.ts+++ /dev/null@@ -1,6 +0,0 @@-export const path = {- to: {- root: "/",- jobs: "/jobs",- },-};diff --git a/apps/mes-prototype/src/hooks/useRouteData.ts b/apps/mes-prototype/src/hooks/useRouteData.tsdeleted file mode 100644index fd241d9027..0000000000--- a/apps/mes-prototype/src/hooks/useRouteData.ts+++ /dev/null@@ -1,11 +0,0 @@-import { useMemo } from "react";-import { useMatches } from "react-router-dom";--export function useRouteData<T>(path: string): T | undefined {- const matchingRoutes = useMatches();- const route = useMemo(- () => matchingRoutes.find((route) => route.pathname === path),- [matchingRoutes, path]- );- return (route?.data as T) || undefined;-}diff --git a/apps/mes-prototype/src/index.css b/apps/mes-prototype/src/index.cssdeleted file mode 100644index ae738ca06e..0000000000--- a/apps/mes-prototype/src/index.css+++ /dev/null@@ -1,134 +0,0 @@-@import url("non.geist");-@import url("non.geist/mono");--@tailwind base;-@tailwind components;-@tailwind utilities;--@layer base {- :root {- --background: 0 0% 100%;- --foreground: 240 10% 3.9%;- --card: 0 0% 100%;- --card-foreground: 240 10% 3.9%;- --popover: 0 0% 100%;- --popover-foreground: 240 10% 3.9%;- --primary: 240 5.9% 10%;- --primary-foreground: 0 0% 98%;- --secondary: 240 4.8% 95.9%;- --secondary-foreground: 240 5.9% 10%;- --muted: 240 4.8% 95.9%;- --muted-foreground: 240 3.8% 46.1%;- --accent: 240 4.8% 89.9%;- --accent-foreground: 240 5.9% 10%;- --destructive: 0 72.22% 50.59%;- --destructive-foreground: 0 0% 98%;- --border: 240 5.9% 90%;- --input: 240 5.9% 90%;- --ring: 240 5% 64.9%;- --radius: 0.5rem;- }-- .dark {- --background: 240 10% 3.9%;- --foreground: 0 0% 98%;- --card: 240 10% 3.9%;- --card-foreground: 0 0% 98%;- --popover: 240 10% 3.9%;- --popover-foreground: 0 0% 98%;- --primary: 0 0% 98%;- --primary-foreground: 240 5.9% 10%;- --secondary: 240 3.7% 15.9%;- --secondary-foreground: 0 0% 98%;- --muted: 240 3.7% 15.9%;- --muted-foreground: 240 5% 64.9%;- --accent: 240 3.7% 15.9%;- --accent-foreground: 0 0% 98%;- --destructive: 0 62.8% 30.6%;- --destructive-foreground: 0 85.7% 97.3%;- --border: 240 3.7% 15.9%;- --input: 240 3.7% 15.9%;- --ring: 240 4.9% 83.9%;- }-}--@layer base {- * {- @apply border-border;- }- body {- @apply bg-background text-foreground;- font-feature-settings: "rlig" 1, "calt" 1;- font-synthesis-weight: none;- text-rendering: optimizeLegibility;- }-}--/* Credit: https://cmdk.paco.me/ */--.background {- width: 100vw;- min-height: 100vh;- position: fixed;- display: flex;- justify-content: center;- padding: 120px 24px 160px 24px;- pointer-events: none;-}--.background:before {- background: radial-gradient(circle, rgba(2, 0, 36, 0) 0, #fafafa 100%);- position: absolute;- content: "";- z-index: 2;- width: 100%;- height: 100%;- top: 0;-}--.dark .background:before {- background: radial-gradient(circle, rgba(2, 0, 36, 0) 0, #161616 100%);-}--.background:after {- content: "";- background-image: url("/grid.svg");- z-index: 1;- position: absolute;- width: 100%;- height: 100%;- top: 0;- opacity: 0.4;- filter: invert(1);-}--.gradient {- height: fit-content;- z-index: 3;- width: 100%;- max-width: 640px;- background-image: radial-gradient(- at 27% 37%,- hsla(215, 98%, 61%, 1) 0px,- transparent 0%- ),- radial-gradient(at 97% 21%, hsla(125, 60%, 72%, 1) 0px, transparent 55%),- radial-gradient(at 52% 99%, hsla(354, 40%, 61%, 1) 0px, transparent 55%),- radial-gradient(at 10% 29%, hsla(256, 50%, 67%, 1) 0px, transparent 55%),- radial-gradient(at 97% 96%, hsla(38, 40%, 74%, 1) 0px, transparent 55%),- radial-gradient(at 33% 50%, hsla(222, 60%, 73%, 1) 0px, transparent 55%),- radial-gradient(at 79% 53%, hsla(343, 20%, 79%, 1) 0px, transparent 55%);- position: absolute;- content: "";- width: 100%;- height: 100%;- filter: blur(100px) saturate(150%);- top: 80px;- opacity: 0.15;-}--@media screen and (max-width: 640px) {- .content {- display: none;- }-}diff --git a/apps/mes-prototype/src/lib/auth.ts b/apps/mes-prototype/src/lib/auth.tsdeleted file mode 100644index e585c0bf9e..0000000000--- a/apps/mes-prototype/src/lib/auth.ts+++ /dev/null@@ -1,7 +0,0 @@-import { redirect } from "react-router-dom";-import { supabase } from "./supabase";--export async function requireAuthentication() {- const { data, error } = await supabase.auth.getSession();- if (error || !data.session) throw redirect("/");-}diff --git a/apps/mes-prototype/src/lib/data.tsx b/apps/mes-prototype/src/lib/data.tsxdeleted file mode 100644index 2386bd03be..0000000000--- a/apps/mes-prototype/src/lib/data.tsx+++ /dev/null@@ -1,400 +0,0 @@-import type { Job } from "~/types";--export const jobs = [- {- id: "item0",- workCenterId: "4",- workCenterTypeId: "grinder",- readableId: "1503",- part: "F011432",- description: "Grind",- customerId: "ca2f11f8-1464-4753-9690-00107f141f3a",- dueDate: "2024-05-28",- duration: 30 * 60 * 1000,- deadlineType: "Hard Deadline",- progress: 5 * 60 * 1000,- status: "IN_PROGRESS",- },- {- id: "item1",- workCenterId: "3",- workCenterTypeId: "saw",- readableId: "1032",- part: "F011432",- description: "Cut",- dueDate: "2024-05-30",- duration: 2 * 60 * 60 * 1000,- deadlineType: "Soft Deadline",- status: "PAUSED",- progress: 1.3 * 60 * 60 * 1000,- },- {- id: "item2",- workCenterId: "3",- workCenterTypeId: "saw",- readableId: "1023",- part: "F011432",- description: "Cut",- dueDate: "2024-05-20",- duration: 2 * 60 * 60 * 1000,- deadlineType: "ASAP",- customerId: "ca2f11f8-1464-4753-9690-00107f141f3a",- status: "READY",- },- {- id: "item3",- workCenterId: "3",- workCenterTypeId: "saw",- readableId: "1022",- part: "F011432",- description: "Cut",- duration: 10 * 60 * 1000,- deadlineType: "No Deadline",- status: "READY",- },- {- id: "item6",- workCenterId: "assembly1",- workCenterTypeId: "assembly",- readableId: "1013",- part: "F011432",- description: "Assemble",- deadlineType: "No Deadline",- duration: 2 * 60 * 60 * 1000,- employeeIds: ["52cdefed-f4b7-45b1-9ec8-701473671fb7"],- status: "IN_PROGRESS",- progress: 35 * 60 * 1000,- },- {- id: "item4",- workCenterId: "assembly1",- workCenterTypeId: "assembly",- readableId: "1492",- part: "F011432",- description: "Assemble",- duration: 4 * 60 * 60 * 1000,- deadlineType: "No Deadline",- status: "WAITING",- },- {- id: "item5",- workCenterId: "assembly2",- workCenterTypeId: "assembly",- readableId: "1109",- part: "F011432",- description: "Assemble",- dueDate: "2024-05-20",- duration: 4 * 60 * 60 * 1000,- deadlineType: "Soft Deadline",- status: "WAITING",- },-- {- id: "item7",- workCenterId: "assembly2",- workCenterTypeId: "assembly",- readableId: "1014",- part: "F011432",- description: "Assemble",- dueDate: "2024-06-20",- duration: 20 * 60 * 1000,- deadlineType: "Hard Deadline",- customerId: "bcbe0bca-6516-4a6c-bb8a-b3942f1a9a33",- status: "TODO",- },- {- id: "item8",- workCenterId: "assembly2",- workCenterTypeId: "assembly",- readableId: "1032",- part: "F011432",- description: "Assemble",- dueDate: "2024-05-24",- duration: 2 * 60 * 60 * 1000,- deadlineType: "Soft Deadline",- customerId: "ca2f11f8-1464-4753-9690-00107f141f3a",- status: "TODO",- },- {- id: "item9",- workCenterId: "assembly2",- workCenterTypeId: "assembly",- readableId: "1010",- part: "F011432",- description: "Assemble",- dueDate: "2024-05-20",- duration: 32 * 1000,- deadlineType: "ASAP",- status: "TODO",- },- {- id: "item10",- workCenterId: "assembly1",- workCenterTypeId: "assembly",- readableId: "1403",- part: "F011432",- description: "Assemble",- dueDate: "2024-05-20",- duration: 6 * 60 * 60 * 1000,- deadlineType: "No Deadline",- customerId: "bcbe0bca-6516-4a6c-bb8a-b3942f1a9a33",- status: "TODO",- },-] satisfies Job[];--export const workCells = [- {- id: "assembly1",- type: "assembly",- title: "Assembly Station 1",- },- {- id: "assembly2",- type: "assembly",- title: "Assembly Station 2",- },- {- id: "3",- type: "saw",- title: "Band Saw",- },- {- id: "4",- type: "grinder",- title: "Bench Grinder",- },- {- id: "5",- title: "CNC Mill 1",- type: "cnc",- },-];--export type WorkCell = (typeof workCells)[number];--export const scrapReasons = [- {- id: "1",- name: "Wrong material picked",- },- {- id: "2",- name: "Incorrect drawings",- },- {- id: "3",- name: "Human Error",- },- {- id: "4",- name: "Issue with equipment",- },- {- id: "5",- name: "Wrong tooling",- },- {- id: "6",- name: "Wrong program",- },- {- id: "7",- name: "Machine malfunction",- },- {- id: "7",- name: "Other",- },-];--export type ScrapReason = (typeof scrapReasons)[number];--export const notes = [- {- id: "1",- content: "Hey How are you today?",- createdAt: "2022-01-01",- createdBy: "2e7dbae5-712d-4809-a29e-25cff4b90a36",- createdByName: "Brad Barbin",- },- {- id: "2",- content:- "Lorem ipsum dolor sit amet, consectetur adipisicing elit. Vel ipsa commodi illum saepe numquam maxime asperiores voluptate sit, minima perspiciatis.",- createdAt: "2022-01-02",- createdBy: "tom",- createdByName: "Tom Smith",- },- {- id: "3",- content: "I'm ok what about you?",- createdAt: "2022-01-03",- createdBy: "2e7dbae5-712d-4809-a29e-25cff4b90a36",- createdByName: "Brad Barbin",- },- {- id: "4",- content: "Lorem ipsum dolor sit, amet consectetur adipisicing. ?",- createdAt: "2022-01-04",- createdBy: "tom",- createdByName: "Tom Smith",- },- {- id: "5",- content: "Lorem ipsum dolor sit amet !",- createdAt: "2022-01-05",- createdBy: "2e7dbae5-712d-4809-a29e-25cff4b90a36",- createdByName: "Brad Barbin",- },- {- id: "6",- content: "Lorem ipsum dolor sit, amet consectetur adipisicing. ?",- createdAt: "2022-01-06",- createdBy: "tom",- createdByName: "Tom Smith",- },- {- id: "7",- content:- "Lorem ipsum dolor sit amet consectetur adipisicing elit. Perspiciatis, in.",- createdAt: "2022-01-07",- createdBy: "2e7dbae5-712d-4809-a29e-25cff4b90a36",- createdByName: "Brad Barbin",- },-];--export const workInstructions = {- type: "doc",- content: [- {- type: "heading",- attrs: {- level: 2,- },- content: [- {- type: "text",- text: "Work Instruction",- },- ],- },- {- type: "heading",- attrs: {- level: 3,- },- content: [- {- type: "text",- text: "Setup ",- },- ],- },- {- type: "paragraph",- content: [- {- type: "text",- text: "I'm baby letterpress franzen palo santo offal. XOXO lumbersexual farm-to-table mustache neutra selfies chillwave aesthetic green juice blue bottle letterpress fanny pack try-hard gorpcore. Selvage marfa butcher kale chips craft beer fashion axe lumbersexual mlkshk truffaut etsy same salvia activated charcoal kogi woke. Hoodie green juice put a bird on it, echo park swag disrupt ugh air plant vaporware vice hammock.",- },- ],- },- {- type: "taskList",- content: [- {- type: "taskItem",- attrs: {- checked: false,- },- content: [- {- type: "paragraph",- content: [- {- type: "text",-- text: "Slow-carb fam same vexillologist bitters.",- },- ],- },- ],- },- {- type: "taskItem",- attrs: {- checked: false,- },- content: [- {- type: "paragraph",- content: [- {- type: "text",-- text: "Roof party franzen slow-carb heirloom viral small batch. ",- },- ],- },- ],- },- {- type: "taskItem",- attrs: {- checked: false,- },- content: [- {- type: "paragraph",- content: [- {- type: "text",-- text: "Bitters next level listicle, +1 same godard 90's big mood heirloom shabby chic hella.",- },- ],- },- ],- },- ],- },- {- type: "heading",- attrs: {- level: 3,- },- content: [- {- type: "text",- text: "Run",- },- ],- },- {- type: "taskList",- content: [- {- type: "taskItem",- attrs: {- checked: false,- },- content: [- {- type: "paragraph",- content: [- {- type: "text",-- text: "DIY enamel pin viral ramps banjo DSA chartreuse.",- },- ],- },- ],- },- ],- },- {- type: "paragraph",- },- ],-};diff --git a/apps/mes-prototype/src/lib/supabase.ts b/apps/mes-prototype/src/lib/supabase.tsdeleted file mode 100644index fd2a6ebf7f..0000000000--- a/apps/mes-prototype/src/lib/supabase.ts+++ /dev/null@@ -1,7 +0,0 @@-import type { Database } from "@carbon/database";-import { createClient } from "@supabase/supabase-js";--const supabaseUrl = import.meta.env.VITE_SUPABASE_URL;-const supabaseAnonKey = import.meta.env.VITE_SUPABASE_ANON_KEY;--export const supabase = createClient<Database>(supabaseUrl, supabaseAnonKey);diff --git a/apps/mes-prototype/src/main.tsx b/apps/mes-prototype/src/main.tsxdeleted file mode 100644index d80f889bc4..0000000000--- a/apps/mes-prototype/src/main.tsx+++ /dev/null@@ -1,34 +0,0 @@-import ReactDOM from "react-dom/client";-import { createBrowserRouter, RouterProvider } from "react-router-dom";-import { Authentication } from "~/components/Authentication";-import Error from "~/components/Error";-import { path } from "~/config";-import "~/index.css";-import { Job, loader as jobLoader } from "~/routes/job";-import { Jobs, loader as jobsLoader } from "~/routes/jobs";--const router = createBrowserRouter([- {- path: path.to.root,- element: <Authentication />,- errorElement: <Error />,- children: [- {- path: path.to.jobs,- loader: jobsLoader,- element: <Jobs navCollapsedSize={4} />,- children: [- {- path: ":operationId",- loader: jobLoader,- element: <Job />,- },- ],- },- ],- },-]);--ReactDOM.createRoot(document.getElementById("root")!).render(- <RouterProvider router={router} />-);diff --git a/apps/mes-prototype/src/routes/job.tsx b/apps/mes-prototype/src/routes/job.tsxdeleted file mode 100644index 3a36aa6470..0000000000--- a/apps/mes-prototype/src/routes/job.tsx+++ /dev/null@@ -1,786 +0,0 @@-import type { JSONContent } from "@carbon/react";-import {- Avatar,- Button,- Editor,- HStack,- Heading,- IconButton,- Modal,- ModalBody,- ModalContent,- ModalDescription,- ModalFooter,- ModalHeader,- ModalTitle,- NumberDecrementStepper,- NumberField,- NumberIncrementStepper,- NumberInput,- NumberInputGroup,- NumberInputStepper,- Progress,- ResizableHandle,- ResizablePanel,- ScrollArea,- Separator,- Table,- Tabs,- TabsContent,- TabsList,- TabsTrigger,- Tbody,- Td,- Th,- Thead,- ToggleGroup,- ToggleGroupItem,- Tooltip,- TooltipContent,- TooltipProvider,- TooltipTrigger,- Tr,- cn,- useMount,-} from "@carbon/react";-import {- convertDateStringToIsoString,- formatDurationMilliseconds,- formatRelativeTime,-} from "@carbon/utils";-import type { ComponentProps, ReactNode } from "react";-import { useRef, useState } from "react";-import {- FaCheck,- FaOilCan,- FaPaperPlane,- FaPause,- FaPlay,- FaRedoAlt,- FaTasks,- FaTrash,-} from "react-icons/fa";-import {- LuChevronDown,- LuChevronLeft,- LuChevronUp,- LuClipboardCheck,- LuExpand,- LuHammer,- LuHardHat,- LuTimer,-} from "react-icons/lu";-import {- useLoaderData,- useNavigate,- useOutletContext,- useParams,-} from "react-router-dom";-import {- getDeadlineIcon,- getDeadlineText,- getStatusIcon,- getStatusText,-} from "~/components/Jobs/JobCard";-import { path } from "~/config";-import { useRouteData } from "~/hooks/useRouteData";-import { notes, workInstructions } from "~/lib/data";-import type { Job as JobType, OutletContext } from "~/types";-import { defaultJobLayout } from "./jobs";--export async function loader() {- return {- notes,- workInstructions,- };-}--export function Job() {- const navigate = useNavigate();- const { operationId } = useParams();-- const { notes, workInstructions } = useLoaderData() as Awaited<- ReturnType<typeof loader>- >;-- const routeData = useRouteData<{ jobs: JobType[] }>(path.to.jobs);- const job = routeData?.jobs.find((job) => job.id === operationId);-- const [fullScreen, setFullScreen] = useState(false);- const [activeTab, setActiveTab] = useState("details");-- const isOverdue =- job?.deadlineType !== "No Deadline" && job?.dueDate- ? new Date(job?.dueDate) < new Date()- : false;-- const onWorkInstructionChange = (value: JSONContent) => {- console.log(value);- };-- if (!job) {- return null;- }-- return (- <>- <OptionallyFullscreen- isFullScreen={fullScreen}- onClose={() => setFullScreen(false)}- >- <Tabs- value={activeTab}- onValueChange={setActiveTab}- className="w-full h-full bg-card"- >- <div className="flex items-center justify-between px-4 py-2 h-[52px] bg-background">- <div className="flex items-start flex-grow gap-1">- {!fullScreen && (- <IconButton- aria-label="Back"- icon={<LuChevronLeft />}- variant="secondary"- onClick={() => navigate(path.to.jobs)}- />- )}- <Heading size="h2">{job.readableId}</Heading>- </div>- <div className="flex flex-shrink-0 items-center justify-end gap-2">- <TabsList className="ml-auto">- <TabsTrigger value="details">Details</TabsTrigger>- <TabsTrigger disabled value="model">- Model- </TabsTrigger>- <TabsTrigger disabled={!workInstructions} value="instructions">- Instructions- </TabsTrigger>- <TabsTrigger value="notes">Notes</TabsTrigger>- </TabsList>- {!fullScreen && (- <IconButton- aria-label="Expand"- icon={<LuExpand />}- variant="secondary"- onClick={() => setFullScreen(true)}- />- )}- </div>- </div>-- {!fullScreen && (- <>- <Separator />- <div className="flex items-center justify-start px-4 py-2 h-[52px] bg-background gap-4">- {job.description && (- <HStack className="justify-start space-x-2">- <LuClipboardCheck className="text-muted-foreground" />- <span className="text-sm truncate">{job.description}</span>- </HStack>- )}- {job.status && (- <HStack className="justify-start space-x-2">- {getStatusIcon(job.status)}- <span className="text-sm truncate">- {getStatusText(job.status)}- </span>- </HStack>- )}- {job.duration && (- <HStack className="justify-start space-x-2">- <LuTimer className="text-muted-foreground" />- <span className="text-sm truncate">- {formatDurationMilliseconds(job.duration)}- </span>- </HStack>- )}- </div>- <Separator />- </>- )}-- <TabsContent value="details">- <ScrollArea className="h-[calc(100vh-104px)] pb-36">- <div className="flex items-start justify-between p-4">- <div className="flex flex-col flex-grow">- <Heading size="h2">{job.part}</Heading>- <p className="text-muted-foreground line-clamp-1">- 3/8" x 2" x 1/4" Bracket- </p>- </div>- <div className="flex flex-col flex-shrink items-end">- <Heading size="h2">15</Heading>- <p className="text-muted-foreground line-clamp-1">Pieces</p>- </div>- </div>- <Separator />- <div className="flex items-start p-4">- <div className="grid gap-4 md:grid-cols-1 lg:grid-cols-3 w-full">- <div className="rounded-xl border bg-card text-card-foreground shadow">- <div className="p-6 flex flex-row items-center justify-between space-y-0 pb-2">- <h3 className="tracking-tight text-sm font-medium">- Scrapped- </h3>- <FaTrash className="h-3 w-3 text-muted-foreground" />- </div>- <div className="p-6 pt-0">- <Heading size="h2">0</Heading>- </div>- </div>- <div className="rounded-xl border bg-card text-card-foreground shadow">- <div className="p-6 flex flex-row items-center justify-between space-y-0 pb-2">- <h3 className="tracking-tight text-sm font-medium">- Completed- </h3>- <FaCheck className="h-3 w-3 text-muted-foreground" />- </div>- <div className="p-6 pt-0">- <Heading size="h2">0</Heading>- </div>- </div>-- <div className="rounded-xl border bg-card text-card-foreground shadow">- <div className="p-6 flex flex-row items-center justify-between space-y-0 pb-2">- <h3 className="tracking-tight text-sm font-medium">- Reworked- </h3>- <FaRedoAlt className="h-3 w-3 text-muted-foreground" />- </div>- <div className="p-6 pt-0">- <Heading size="h2">0</Heading>- </div>- </div>- </div>- </div>- <Separator />- <div className="flex items-start p-4">- <div className="flex flex-col w-full space-y-2">- <HStack>- <LuTimer className="h-4 w-4 mr-1" />- <Progress- numerator={formatDurationMilliseconds(6.5 * 60 * 1000)}- denominator={formatDurationMilliseconds(5 * 60 * 1000)}- value={120}- />- </HStack>- <HStack>- <LuHardHat className="h-4 w-4 mr-1" />- <Progress- numerator={- job.progress- ? formatDurationMilliseconds(job.progress)- : ""- }- denominator={- job.duration- ? formatDurationMilliseconds(job.duration)- : ""- }- value={- job.progress && job.duration- ? (job.progress / job.duration) * 100- : 0- }- />- </HStack>- <HStack>- <LuHammer className="h-4 w-4 mr-1" />- <Progress- numerator={- job.progress- ? formatDurationMilliseconds(job.progress)- : ""- }- denominator={- job.duration- ? formatDurationMilliseconds(job.duration)- : ""- }- value={- job.progress && job.duration- ? (job.progress / job.duration) * 100- : 0- }- />- </HStack>- <HStack>- <FaTasks className="h-4 w-4 mr-1" />- <Progress- indicatorClassName={- job.status === "PAUSED" ? "bg-yellow-500" : ""- }- numerator={"0/15"}- denominator={"0%"}- value={0}- />- </HStack>- </div>- </div>- <Separator />- {job.customerId && (- <>- <div className="flex items-start justify-between p-4">- <div className="flex flex-col flex-grow">- <Heading size="h3">Tesla</Heading>- <p className="text-muted-foreground line-clamp-1">- SO129034- </p>- </div>- <div className="flex flex-col flex-shrink items-end">- {job.deadlineType && (- <HStack className="justify-start space-x-2">- {getDeadlineIcon(job.deadlineType, isOverdue)}- <Tooltip>- <TooltipTrigger>- <span- className={cn(- "text-sm truncate",- isOverdue ? "text-red-500" : ""- )}- >- {["ASAP", "No Deadline"].includes(- job.deadlineType- )- ? getDeadlineText(job.deadlineType)- : job.dueDate- ? `Due ${formatRelativeTime(- convertDateStringToIsoString(job.dueDate)- )}`- : "–"}- </span>- </TooltipTrigger>- <TooltipContent side="bottom">- {getDeadlineText(job.deadlineType)}- </TooltipContent>- </Tooltip>- </HStack>- )}- </div>- </div>- <Separator />- </>- )}- <div className="flex flex-col items-start justify-between">- <div className="p-4">- <Heading size="h3">Materials</Heading>- </div>- <Table>- <Thead>- <Tr>- <Th>Part</Th>- <Th>Quantity</Th>-- <Th></Th>- </Tr>- </Thead>- <Tbody>- <Tr>- <Td- colSpan={24}- className="py-8 text-muted-foreground text-center"- >- No materials- </Td>- </Tr>- </Tbody>- </Table>- </div>- <Separator />- <div className="flex flex-col items-start justify-between">- <div className="p-4">- <Heading size="h3">Files</Heading>- </div>- <Table>- <Thead>- <Tr>- <Th>Name</Th>- <Th>Size</Th>-- <Th></Th>- </Tr>- </Thead>- <Tbody>- <Tr>- <Td- colSpan={24}- className="py-8 text-muted-foreground text-center"- >- No files- </Td>- </Tr>- </Tbody>- </Table>- </div>- </ScrollArea>- </TabsContent>- <TabsContent value="model"></TabsContent>- <TabsContent value="instructions" className="flex flex-grow bg-card">- <ScrollArea className="h-[calc(100vh-104px)] pb-36">- <Editor- initialValue={workInstructions as JSONContent}- onChange={onWorkInstructionChange}- />- </ScrollArea>- </TabsContent>- <TabsContent value="notes">- <Notes job={job} notes={notes} />- </TabsContent>-- {activeTab !== "notes" && (- <Controls>- <div className="flex flex-col items-center gap-4">- <div className="flex items-center gap-4 justify-center">- <IconButtonWithTooltip- disabled- icon={- <FaOilCan className="text-accent-foreground group-hover:text-accent-foreground/80" />- }- tooltip="Non-Conformance Report"- />-- <IconButtonWithTooltip- icon={- <FaTrash className="text-accent-foreground group-hover:text-accent-foreground/80" />- }- tooltip="Scrap"- />- <PlayButton- onStart={(type) => {- alert(type);- }}- />- <IconButtonWithTooltip- icon={- <FaRedoAlt className="text-accent-foreground group-hover:text-accent-foreground/80" />- }- tooltip="Rework"- />- <IconButtonWithTooltip- icon={- <FaCheck className="text-accent-foreground group-hover:text-accent-foreground/80" />- }- tooltip="Complete"- />- </div>- <WorkTypeToggle />- </div>- </Controls>- )}- </Tabs>- </OptionallyFullscreen>- </>- );-}--function OptionallyFullscreen({- children,- isFullScreen,- onClose,-}: {- children: ReactNode;- isFullScreen: boolean;- onClose: () => void;-}) {- return (- <>- <ResizableHandle withHandle />- <ResizablePanel defaultSize={defaultJobLayout[2]} className="relative">- {children}- </ResizablePanel>- {isFullScreen && (- <Modal- open={isFullScreen}- onOpenChange={(open) => {- if (!open) onClose();- }}- >- <ModalContent className="min-w-full h-screen py-2">- {children}- </ModalContent>- </Modal>- )}- </>- );-}--type Note = {- id: string;- content: string;- createdAt: string;- createdBy: string;- createdByName: string;- createdByAvatar?: string;-};--function Notes({ notes }: { job: JobType; notes: Note[] }) {- const listRef = useRef<HTMLDivElement>(null);- const scrollToLastMessage = () => {- listRef.current?.scrollTo({- top: listRef.current.scrollHeight,- behavior: "smooth",- });- };- useMount(() => {- scrollToLastMessage();- });- const { user } = useOutletContext<OutletContext>();-- return (- <div className="flex flex-col flex-auto h-[calc(100vh-108px)] p-6">- <div className="flex flex-col flex-auto flex-shrink-0 rounded-2xl bg-muted h-full p-4">- <div- ref={listRef}- className="flex flex-col h-full overflow-x-auto mb-4"- >- <div className="flex flex-col h-full">- <div className="grid grid-cols-12 gap-y-2">- {notes.map((note) => (- <Message- key={note.id}- note={note}- isFromViewer={note.createdBy === user?.id}- />- ))}- </div>- </div>- </div>- <div className="flex flex-row items-center h-16 rounded-xl bg-background w-full px-2 space-x-2">- {/* <div>- <button className="flex items-center justify-center text-gray-400 hover:text-gray-600">- <svg- className="w-5 h-5"- fill="none"- stroke="currentColor"- viewBox="0 0 24 24"- xmlns="http://www.w3.org/2000/svg"- >- <path- stroke-linecap="round"- stroke-linejoin="round"- stroke-width="2"- d="M15.172 7l-6.586 6.586a2 2 0 102.828 2.828l6.414-6.586a4 4 0 00-5.656-5.656l-6.415 6.585a6 6 0 108.486 8.486L20.5 13"- ></path>- </svg>- </button>- </div> */}- <div className="flex-grow relative">- <input- type="text"- className="flex w-full border rounded-xl focus:outline-none focus:border-ring pl-4 h-11 bg-foreground/10 text-foreground"- />- {/* <button className="absolute flex items-center justify-center h-full w-12 right-0 top-0 text-gray-400 hover:text-gray-600">- <svg- className="w-6 h-6"- fill="none"- stroke="currentColor"- viewBox="0 0 24 24"- xmlns="http://www.w3.org/2000/svg"- >- <path- stroke-linecap="round"- stroke-linejoin="round"- stroke-width="2"- d="M14.828 14.828a4 4 0 01-5.656 0M9 10h.01M15 10h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"- ></path>- </svg>- </button> */}- </div>-- <Button className="rounded-xl" size="lg" rightIcon={<FaPaperPlane />}>- Send- </Button>- </div>- </div>- </div>- );-}--type MessageProps = {- note: Note;- isFromViewer: boolean;-};--function Message({ note, isFromViewer }: MessageProps) {- const { content, createdByAvatar, createdByName } = note;- return (- <div- className={cn(- "p-3 rounded-lg",- isFromViewer ? "col-start-6 col-end-13" : "col-start-1 col-end-8"- )}- >- <div- className={cn(- "flex items-center justify-start",- isFromViewer && "flex-row-reverse"- )}- >- <Avatar- className="flex flex-shrink-0"- size="md"- name={createdByName}- src={createdByAvatar}- />- <div- className={cn(- "relative text-sm py-2 px-4 shadow rounded-xl",- isFromViewer ? "mr-3 bg-indigo-100" : "ml-3 bg-background"- )}- >- <div>{content}</div>- </div>- </div>- </div>- );-}--function Controls({- children,- className,-}: {- children: ReactNode;- className?: string;-}) {- return (- <TooltipProvider>- <div- className={cn(- "absolute p-4 bottom-0 left-1/2 transform -translate-x-1/2",- className- )}- >- {children}- </div>- </TooltipProvider>- );-}--function ButtonWithTooltip({- tooltip,- children,- ...props-}: ComponentProps<"button"> & { tooltip: string }) {- return (- <Tooltip>- <TooltipTrigger asChild>- <button {...props}>{children}</button>- </TooltipTrigger>- <TooltipContent>{tooltip}</TooltipContent>- </Tooltip>- );-}--function IconButtonWithTooltip({- icon,- tooltip,- ...props-}: ComponentProps<"button"> & { icon: ReactNode; tooltip: string }) {- return (- <ButtonWithTooltip- {...props}- tooltip={tooltip}- className="w-12 h-12 flex flex-row items-center gap-2 justify-center bg-accent rounded-full shadow-lg hover:cursor-pointer hover:shadow-xl hover:accent hover:scale-105 transition-all disabled:cursor-not-allowed disabled:opacity-50"- >- {icon}- </ButtonWithTooltip>- );-}--function WorkTypeToggle() {- return (- <ToggleGroup defaultValue="labor" type="single">- <ToggleGroupItem- className="w-[110px]"- value="setup"- aria-label="Toggle setup"- >- <LuTimer className="h-4 w-4 mr-2" />- Setup- </ToggleGroupItem>- <ToggleGroupItem- className="w-[110px]"- value="labor"- aria-label="Toggle labor"- >- <LuHardHat className="h-4 w-4 mr-2" />- Labor- </ToggleGroupItem>- <ToggleGroupItem- className="w-[110px]"- value="machine"- aria-label="Toggle machine"- >- <LuHammer className="h-4 w-4 mr-2" />- Machine- </ToggleGroupItem>- </ToggleGroup>- );-}--function PauseButton({ className, ...props }: ComponentProps<"button">) {- return (- <ButtonWithTooltip- {...props}- tooltip="Pause"- className="group w-16 h-16 flex flex-row items-center gap-2 justify-center bg-red-500 rounded-full shadow-lg hover:cursor-pointer hover:drop-shadow-xl hover:bg-red-600 hover:scale-105 transition-all"- >- <FaPause className="text-accent group-hover:scale-125" />- </ButtonWithTooltip>- );-}--function PlayButton({- className,- onStart,- ...props-}: ComponentProps<"button"> & { onStart: (type: "setup" | "run") => void }) {- return (- <button- {...props}- className="group w-16 h-16 flex flex-row items-center gap-2 justify-center bg-emerald-500 rounded-full shadow-lg hover:cursor-pointer hover:drop-shadow-xl hover:bg-emerald-600 hover:scale-105 transition-all"- >- <FaPlay className="text-accent group-hover:scale-125" />- </button>- );-}--function ScrapModal({ job }: { job: JobType }) {- <Modal open={false}>- <ModalContent>- <ModalHeader>- <ModalTitle>{`Scrap ${job.part}`}</ModalTitle>- <ModalDescription>Select a scrap quantity and reason</ModalDescription>- </ModalHeader>- <ModalBody>- <div className="grid grid-cols-2 gap-4">- <NumberField- defaultValue={1}- // value={1}- // onChange={onPurchaseUnitChange}- minValue={1}- maxValue={job.quantity}- >- <NumberInputGroup className="relative">- <NumberInput />- <NumberInputStepper>- <NumberIncrementStepper>- <LuChevronUp size="1em" strokeWidth="3" />- </NumberIncrementStepper>- <NumberDecrementStepper>- <LuChevronDown size="1em" strokeWidth="3" />- </NumberDecrementStepper>- </NumberInputStepper>- </NumberInputGroup>- </NumberField>- </div>- </ModalBody>- <ModalFooter>- <Button variant="secondary" onClick={() => {}}>- Cancel- </Button>- <Button variant="destructive" onClick={() => {}}>- Scrap- </Button>- </ModalFooter>- </ModalContent>- </Modal>;-}diff --git a/apps/mes-prototype/src/routes/jobs.tsx b/apps/mes-prototype/src/routes/jobs.tsxdeleted file mode 100644index de0bb2bc2a..0000000000--- a/apps/mes-prototype/src/routes/jobs.tsx+++ /dev/null@@ -1,250 +0,0 @@-import {- Avatar,- Button,- Heading,- IconButton,- Input,- ResizableHandle,- ResizablePanel,- ResizablePanelGroup,- Separator,- Tabs,- TabsContent,- TabsList,- TabsTrigger,- TooltipProvider,- cn,- useDebounce,- useLocalStorage,-} from "@carbon/react";--import { useMemo, useState } from "react";-import { AiOutlineFieldTime } from "react-icons/ai";-import { LuCalendarClock, LuLogOut, LuSearch } from "react-icons/lu";-import { Outlet, useLoaderData, useOutletContext } from "react-router-dom";-import { JobsList } from "~/components/Jobs/JobsList";-import { WorkCellSelect } from "~/components/Jobs/WorkCellSelect";-import { Nav } from "~/components/Nav";-import { requireAuthentication } from "~/lib/auth";-import { jobs, workCells } from "~/lib/data";-import type { Job, JobSettings, OutletContext } from "~/types";--const jobSettings: JobSettings = {- showCustomer: false,- showDescription: true,- showDueDate: true,- showDuration: true,- showEmployee: false,- showProgress: false,- showStatus: true,-};--export async function loader() {- await requireAuthentication();-- return {- jobs: jobs satisfies Job[],- jobSettings,- workCells,- };-}--interface JobsProps {- defaultLayout?: number[] | undefined;- defaultCollapsed?: boolean;- navCollapsedSize: number;-}--export const defaultJobLayout = [265, 440, 655];--export function Jobs({- defaultLayout = defaultJobLayout,- defaultCollapsed = false,- navCollapsedSize = 50,-}: JobsProps) {- const { user, signOut } = useOutletContext<OutletContext>();- const { jobs, jobSettings, workCells } = useLoaderData() as Awaited<- ReturnType<typeof loader>- >;-- const [isCollapsed, setIsCollapsed] = useState(defaultCollapsed);-- const [selectedWorkCell, setSelectedWorkCell] = useLocalStorage<string>(- `${user?.id}:workCell`,- workCells?.[0]?.id ?? ""- );-- const [input, setInput] = useState("");- const [search, setSearch] = useState("");- const debounceSearch = useDebounce((input: string) => {- setSearch(input);- }, 500);- const onSearchChange = (e: React.ChangeEvent<HTMLInputElement>) => {- setInput(e.target.value);- debounceSearch(e.target.value);- };-- const workCellJobs = useMemo(- () =>- jobs.filter((job) => {- if (!search) return job.workCenterId === selectedWorkCell;-- return (- job.workCenterId === selectedWorkCell &&- job.readableId.includes(search.toLowerCase())- );- }),- [jobs, search, selectedWorkCell]- );-- return (- <TooltipProvider delayDuration={0}>- <ResizablePanelGroup- direction="horizontal"- className="h-full items-stretch"- >- <ResizablePanel- defaultSize={defaultLayout[0]}- collapsedSize={navCollapsedSize}- collapsible={true}- minSize={15}- maxSize={25}- onCollapse={() => {- setIsCollapsed(true);- }}- onExpand={() => {- setIsCollapsed(false);- }}- className={cn(- isCollapsed &&- "min-w-[50px] transition-all duration-300 ease-in-out"- )}- >- <div- className={cn(- "flex h-[52px] items-center justify-start bg-background",- isCollapsed ? "h-[52px]" : "px-2"- )}- >- <div- className={cn(- "flex items-center space-x-2 w-full",- isCollapsed ? "justify-center" : "justify-start"- )}- >- <Avatar- size="sm"- src={user?.avatarUrl ?? undefined}- name={user?.fullName ?? ""}- />- {!isCollapsed && (- <span className="text-sm truncate">{user?.fullName}</span>- )}- </div>- </div>- <div className="flex flex-col h-[calc(100%-52px)] justify-between overflow-y-auto bg-background">- <div className="flex flex-col">- <Separator />- <Nav- isCollapsed={isCollapsed}- links={[- {- title: "Jobs",- label: "128",- icon: LuCalendarClock,- variant: "active",- },- {- title: "Active",- label: "1",- icon: AiOutlineFieldTime,- variant: "ghost",- },- ]}- />- {/* <Separator />- <Nav- isCollapsed={isCollapsed}- links={[- {- title: "Messages",- label: "972",- icon: LuMessageSquare,- variant: "ghost",- },- ]}- /> */}- </div>- <div- className={cn(- "flex flex-col p-2 w-full",- isCollapsed && "items-center justify-center "- )}- >- {isCollapsed ? (- <IconButton- aria-label="Sign out"- icon={<LuLogOut />}- onClick={signOut}- />- ) : (- <Button size="lg" onClick={signOut}>- Sign out- </Button>- )}- </div>- </div>- </ResizablePanel>- <ResizableHandle withHandle />- <ResizablePanel defaultSize={defaultLayout[1]} minSize={30}>- <Tabs defaultValue="current">- <div className="flex items-center px-4 py-2 h-[52px] bg-background">- <Heading size="h2">Jobs</Heading>- <TabsList className="ml-auto">- <TabsTrigger value="current">Current</TabsTrigger>- <TabsTrigger value="all">All</TabsTrigger>- </TabsList>- </div>- <Separator />- <div className="p-4">- <div className="relative">- <div className="flex justify-between space-x-4">- <div className="flex flex-grow">- <LuSearch className="absolute left-2 top-2.5 h-4 w-4 text-muted-foreground" />- <Input- value={input}- onChange={onSearchChange}- placeholder="Search"- className="pl-8"- />- </div>- <div className="flex flex-shrink">- <WorkCellSelect- workCells={workCells}- value={selectedWorkCell}- onChange={setSelectedWorkCell}- />- </div>- </div>- </div>- </div>- <TabsContent value="current" className="m-0">- <JobsList- jobs={workCellJobs.filter((job) =>- ["IN_PROGRESS", "PAUSED", "READY", "TODO"].includes(- job.status- )- )}- {...jobSettings}- />- </TabsContent>- <TabsContent value="all" className="m-0">- <JobsList jobs={workCellJobs} {...jobSettings} />- </TabsContent>- </Tabs>- </ResizablePanel>- <Outlet context={{ user }} />- </ResizablePanelGroup>- </TooltipProvider>- );-}diff --git a/apps/mes-prototype/src/routes/login.tsx b/apps/mes-prototype/src/routes/login.tsxdeleted file mode 100644index 33b131ce57..0000000000--- a/apps/mes-prototype/src/routes/login.tsx+++ /dev/null@@ -1,334 +0,0 @@-import {- Alert,- AlertDescription,- Button,- Heading,- Input,- cn,-} from "@carbon/react";-import {- Form,- FormControl,- FormField,- FormItem,- FormLabel,- FormMessage,- useForm,- zodResolver,-} from "@carbon/react-hook-form";-import {} from "@hookform/resolvers/zod";-import type { HTMLAttributes } from "react";-import { useState } from "react";-import { BsHexagonFill } from "react-icons/bs";-import { Link } from "react-router-dom";-import { z } from "zod";-import { supabase } from "~/lib/supabase";--export function Login() {- const data = getRandomQuote();-- return (- <>- <div className="container relative h-full flex-col items-center justify-center grid lg:max-w-none lg:grid-cols-2 lg:px-0">- <div className="relative hidden h-full flex-col bg-muted p-10 text-white lg:flex dark:border-r">- <div className="absolute inset-0 bg-zinc-900" />- <div className="relative z-20 flex items-center text-lg font-medium">- <BsHexagonFill className="w-6 h-6 mr-2" />- CarbonOS- </div>- {data && (- <div className="relative z-20 mt-auto">- <blockquote className="space-y-2">- <p className="text-lg">“{data?.quote}”</p>- <footer className="text-sm">{data?.source}</footer>- </blockquote>- </div>- )}- </div>- <div className="lg:p-8">- <div className="mx-auto flex w-full flex-col justify-center space-y-6 sm:w-[350px]">- <div className="flex flex-col space-y-2 text-center">- <Heading>Sign In</Heading>- </div>- <LoginForm />- <p className="px-8 text-center text-sm text-muted-foreground">- By clicking continue, you agree to our{" "}- <Link- to="/terms"- className="underline underline-offset-4 hover:text-primary"- >- Terms of Service- </Link>{" "}- and{" "}- <Link- to="/privacy"- className="underline underline-offset-4 hover:text-primary"- >- Privacy Policy- </Link>- .- </p>- </div>- </div>- </div>- </>- );-}--interface LoginFormProps extends HTMLAttributes<HTMLDivElement> {}--const loginFormSchema = z.object({- email: z.string().email(),- password: z- .string()- .min(6, { message: "Password must be at least 6 characters" }),-});--type LoginFormValues = z.infer<typeof loginFormSchema>;--function LoginForm({ className, ...props }: LoginFormProps) {- const [isLoading, setIsLoading] = useState<boolean>(false);- const [error, setError] = useState<string | null>(null);-- const form = useForm<LoginFormValues>({- resolver: zodResolver(loginFormSchema),- defaultValues: {- email: "",- password: "",- },- });-- async function onSubmit(values: LoginFormValues) {- setError(null);- setIsLoading(true);-- const { error } = await supabase.auth.signInWithPassword({- email: values.email,- password: values.password,- });-- if (error) {- setIsLoading(false);- setError(error.message);- }- }-- return (- <div className={cn("grid gap-6", className)} {...props}>- <Form {...form}>- <form onSubmit={form.handleSubmit(onSubmit)}>- <div className="grid gap-2">- {error && (- <Alert variant="destructive">- <AlertDescription>{error}</AlertDescription>- </Alert>- )}- <div className="grid gap-1">- <FormField- control={form.control}- name="email"- render={({ field }) => (- <FormItem>- <FormLabel>Email</FormLabel>- <FormControl>- <Input placeholder="[email protected]" {...field} />- </FormControl>- <FormMessage />- </FormItem>- )}- />- <FormField- control={form.control}- name="password"- render={({ field }) => (- <FormItem>- <FormLabel>Password</FormLabel>- <FormControl>- <Input type="password" {...field} />- </FormControl>- <FormMessage />- </FormItem>- )}- />- </div>-- <Button- type="submit"- size="lg"- isDisabled={isLoading}- isLoading={isLoading}- >- Sign In- </Button>- </div>- </form>- </Form>- </div>- );-}--function getRandomQuote() {- const randomQuote = quotes[Math.floor(Math.random() * quotes.length)];- return randomQuote;-}--const quotes = [- {- quote: "Nothing can be changed until it is faced.",- source: "James Baldwin",- },- {- quote:- "The Sun will rise and set regardless. What we choose to do with the light while it's here is up to us. Journey wisely.",- source: "Alex Elle",- },- {- quote: "I am unfolding slowly because blooming takes time.",- source: "Alex Elle",- },- {- quote: "Someone once told me love isn’t perfect—or predictable.",- source: "Lauren Morrill",- },- {- quote:- "Sometimes you climb out of bed in the morning and you think, I'm not going to make it, but you laugh inside — remembering all the times you've felt that way",- source: "Charles Bukowski",- },- {- quote: "If you can't beat the fear, just do it scared.",- source: "Glennon Doyle",- },- {- quote: "There is a crack in everything. That's how the light gets in.",- source: "Rumi",- },- {- quote: "We must bring our own light into the darkness.",- source: "Charles Bukowski",- },- {- quote: "You are not too old. And it is not too late.",- source: "Rainer Maria Rilke",- },- {- quote: "There is nothing holding you back in life more than yourself.",- source: "Brianna Wiest",- },- {- quote:- "Another person's success is not the absence of your own. Another person's progress is not the absence of your own. Another person's happiness is not the absense of your own.",- source: "Brianna Wiest",- },- {- quote:- "The things we lose are not losses. They are entry ways. They are the world saying, sometimes sharply, there is something else out there.",- source: "Brianna Wiest",- },- {- quote: "You are allowed to outgrow people.",- source: "Mantra Magazine",- },- {- quote:- "Stop feeling bad for outgrowing people who had the chance to grow with you.",- source: "Hunter Pauley",- },- {- quote: "Don't let someone live rent-free in your head.",- source: "Ann Landers",- },- {- quote:- "Not everything that is faced can be changed, but nothing can be changed until it is faced.",- source: "James Baldwin",- },- {- quote: "No force on earth can stop an idea whose time has come.",- source: "Victor Hugo",- },- {- quote: "Learning never exhausts the mind.",- source: "Leonardo da Vinci",- },- {- quote: "The journey of a thousand miles begins with one step.",- source: "Lao Tzu",- },- {- quote: "If opportunity doesn't knock, build a door.",- source: "Milton Berle",- },- {- quote: "Everything has beauty, but not everyone sees it.",- source: "Confucius",- },- {- quote:- "The best and most beautiful things in the world cannot be seen or even touched - they must be felt with the heart.",- source: "Helen Keller",- },- {- quote: "Simplicity is the ultimate sophistication.",- source: "Leonardo da Vinci",- },- {- quote: "The best revenge is massive success.",- source: "Frank Sinatra",- },- {- quote:- "The distance between insanity and genius is measured only by success.",- source: "Bruce Feirstein",- },- {- quote: "Success is the sum of small efforts, repeated day-in and day-out.",- source: "Robert Collier",- },- {- quote: "The mind is everything. What you think you become.",- source: "Gautama Buddha",- },- {- quote: "Peace comes from within. Do not seek it without.",- source: "Gautama Buddha",- },- {- quote:- "What you think, you become. What you feel, you attract. What you imagine, you create.",- source: "The Buddha",- },- {- quote: "Share your knowledge. It is a way to achieve immortality.",- source: "The Dalai Lama",- },- {- quote: "Man is made by his belief. As he believes, so he is.",- source: "Bhagavad Gita",- },- {- quote:- "Life’s most persistent and urgent question is, ‘What are you doing for others?’",- source: "Martin Luther King, Jr.",- },- {- quote: "Once you choose hope, anythings possible.",- source: "Christopher Reeve",- },- {- quote: "Learn from yesterday, live for today, hope for tomorrow.",- source: "Albert Einstein",- },- {- quote: "Stay hungry, stay foolish.",- source: "Steve Jobs",- },- {- quote: "The only way to do great work is to love what you do.",- source: "Steve Jobs",- },- {- quote: "You are never too old to set another goal or to dream a new dream.",- source: "C.S. Lewis",- },-];diff --git a/apps/mes-prototype/src/services.tsx b/apps/mes-prototype/src/services.tsxdeleted file mode 100644index a44c4dd93a..0000000000--- a/apps/mes-prototype/src/services.tsx+++ /dev/null@@ -1,14 +0,0 @@-import type { Database } from "@carbon/database";-import type { SupabaseClient } from "@supabase/supabase-js";--export async function getUser(- client: SupabaseClient<Database>,- userId: string-) {- return client- .from("user")- .select("*")- .eq("id", userId)- .eq("active", true)- .maybeSingle();-}diff --git a/apps/mes-prototype/src/types.ts b/apps/mes-prototype/src/types.tsdeleted file mode 100644index 1d4943e610..0000000000--- a/apps/mes-prototype/src/types.ts+++ /dev/null@@ -1,50 +0,0 @@-import { z } from "zod";-import type { getUser } from "./services";--export type User = Awaited<ReturnType<typeof getUser>>["data"];-export type OutletContext = {- user: User;- signOut: () => Promise<void>;-};--export type JobSettings = {- showCustomer: boolean;- showDescription: boolean;- showDueDate: boolean;- showDuration: boolean;- showEmployee: boolean;- showProgress: boolean;- showStatus: boolean;-};--const jobValidator = z.object({- id: z.string(),- workCenterId: z.string(),- workCenterTypeId: z.string(),- readableId: z.string(),- part: z.string().optional(),- customerId: z.string().optional(),- employeeIds: z.array(z.string()).optional(),- description: z.string().optional(),- dueDate: z.string().optional(), // 2024-05-28- duration: z.number().optional(), // miliseconds- deadlineType: z- .enum(["ASAP", "Hard Deadline", "Soft Deadline", "No Deadline"])- .optional(),- progress: z.number().optional(), // miliseconds- order: z.number().optional(),- quantity: z.number().optional(),- status: z- .enum([- "CANCELED",- "DONE",- "IN_PROGRESS",- "PAUSED",- "READY",- "TODO",- "WAITING",- ])- .optional(),-});--export type Job = z.infer<typeof jobValidator>;diff --git a/apps/mes-prototype/src/vite-env.d.ts b/apps/mes-prototype/src/vite-env.d.tsdeleted file mode 100644index 11f02fe2a0..0000000000--- a/apps/mes-prototype/src/vite-env.d.ts+++ /dev/null@@ -1 +0,0 @@-/// <reference types="vite/client" />diff --git a/apps/mes-prototype/tailwind.config.ts b/apps/mes-prototype/tailwind.config.tsdeleted file mode 100644index 0ea1cf06ca..0000000000--- a/apps/mes-prototype/tailwind.config.ts+++ /dev/null@@ -1 +0,0 @@-module.exports = require("@carbon/tailwind/tailwind.config");diff --git a/apps/mes-prototype/tsconfig.json b/apps/mes-prototype/tsconfig.jsondeleted file mode 100644index 72c0c3a59d..0000000000--- a/apps/mes-prototype/tsconfig.json+++ /dev/null@@ -1,13 +0,0 @@-{- "exclude": ["node_modules"],- "extends": "@carbon/tsconfig/vite.json",- "compilerOptions": {- "rootDir": ".",- "outDir": "dist",- "baseUrl": ".",- "paths": {- "~/*": ["src/*"]- }- },- "include": ["src", "vite.config.ts"]-}diff --git a/apps/mes-prototype/vite.config.ts b/apps/mes-prototype/vite.config.tsdeleted file mode 100644index 413675e469..0000000000--- a/apps/mes-prototype/vite.config.ts+++ /dev/null@@ -1,19 +0,0 @@-import react from "@vitejs/plugin-react";-import { resolve } from "path";-import { defineConfig } from "vite";--// https://vitejs.dev/config/-export default defineConfig({- plugins: [react()],- server: {- port: 4000,- },- build: {- sourcemap: true,- },- resolve: {- alias: {- "~": resolve(__dirname, "src"),- },- },-});diff --git a/apps/mes/app/components/JobOperation.tsx b/apps/mes/app/components/JobOperation.tsxindex fcc2b95d31..41318cfd3f 100644--- a/apps/mes/app/components/JobOperation.tsx+++ b/apps/mes/app/components/JobOperation.tsx@@ -372,7 +372,7 @@ export const JobOperation = ({<Th>Part</Th><Th>Qty Per</Th><Th>Estimated Qty</Th>- <Th></Th>+ <Th className="lg:block hidden"></Th></Tr></Thead><Tbody>@@ -395,12 +395,15 @@ export const JobOperation = ({<span className="font-semibold">{material.itemReadableId}</span>- <span>{material.description}</span>+ <span className="md:flex hidden">+ {material.description}+ </span></Td><Td>{material.quantity}</Td><Td>{material.estimatedQuantity}</Td>- <Td>++ <Td className="lg:block hidden"><Badge variant="secondary"><MethodIcontype={material.methodType}diff --git a/apps/mes/app/components/OperationsList.tsx b/apps/mes/app/components/OperationsList.tsxindex 5456b0aac2..0d4f0c32ed 100644--- a/apps/mes/app/components/OperationsList.tsx+++ b/apps/mes/app/components/OperationsList.tsx@@ -81,6 +81,7 @@ function OperationCard({showProgress,showStatus,}: OperationCardProps) {+ console.log({ operation });const isOverdue =operation.jobDeadlineType !== "No Deadline" && operation.jobDueDate? new Date(operation.jobDueDate) < new Date()diff --git a/apps/mes/app/hooks/index.ts b/apps/mes/app/hooks/index.tsindex a3062fc453..386a7cb8c9 100644--- a/apps/mes/app/hooks/index.ts+++ b/apps/mes/app/hooks/index.ts@@ -1,6 +1,7 @@+import useMediaQuery from "./useMediaQuery";import { useMode } from "./useMode";import { useOptimisticLocation } from "./useOptimisticLocation";import { useRouteData } from "./useRouteData";import { useUser } from "./useUser";-export { useMode, useOptimisticLocation, useRouteData, useUser };+export { useMediaQuery, useMode, useOptimisticLocation, useRouteData, useUser };diff --git a/apps/mes/app/hooks/useMediaQuery.ts b/apps/mes/app/hooks/useMediaQuery.tsnew file mode 100644index 0000000000..a134c9c141--- /dev/null+++ b/apps/mes/app/hooks/useMediaQuery.ts@@ -0,0 +1,35 @@+import { useEffect, useState } from "react";++type ScreenSize = "sm" | "md" | "lg" | "xl" | "2xl";++function useMediaQuery() {+ const [screenSize, setScreenSize] = useState<ScreenSize>("sm");++ useEffect(() => {+ const checkScreenSize = () => {+ if (window.matchMedia("(min-width: 1536px)").matches) {+ setScreenSize("2xl");+ } else if (window.matchMedia("(min-width: 1280px)").matches) {+ setScreenSize("xl");+ } else if (window.matchMedia("(min-width: 1024px)").matches) {+ setScreenSize("lg");+ } else if (window.matchMedia("(min-width: 768px)").matches) {+ setScreenSize("md");+ } else {+ setScreenSize("sm");+ }+ };++ checkScreenSize();+ window.addEventListener("resize", checkScreenSize);++ return () => window.removeEventListener("resize", checkScreenSize);+ }, []);++ return {+ isMobile: ["sm", "md", "lg"].includes(screenSize),+ screenSize,+ };+}++export default useMediaQuery;diff --git a/apps/mes/app/routes/x+/_layout.tsx b/apps/mes/app/routes/x+/_layout.tsxindex 01bea2daf5..b3c3c2cd21 100644--- a/apps/mes/app/routes/x+/_layout.tsx+++ b/apps/mes/app/routes/x+/_layout.tsx@@ -1,3 +1,8 @@+import { CarbonProvider, getCarbon, getCompanies, getUser } from "@carbon/auth";+import {+ destroyAuthSession,+ requireAuthSession,+} from "@carbon/auth/session.server";import {AutodeskProvider,ClientOnly,@@ -13,15 +18,11 @@ import { Outlet, useLoaderData, useNavigation } from "@remix-run/react";import type { LoaderFunctionArgs } from "@vercel/remix";import { json, redirect } from "@vercel/remix";import NProgress from "nprogress";-import { useEffect, useState } from "react";--import { CarbonProvider, getCarbon, getCompanies, getUser } from "@carbon/auth";-import {- destroyAuthSession,- requireAuthSession,-} from "@carbon/auth/session.server";+import { useEffect, useRef, useState } from "react";import { LuActivity, LuClock, LuInbox } from "react-icons/lu";+import type { ImperativePanelHandle } from "react-resizable-panels";import { AvatarMenu, Nav } from "~/components";+import { useMediaQuery } from "~/hooks";import {getActiveJobCount,getLocationsByCompany,@@ -109,6 +110,14 @@ export default function AuthenticatedRoute() {const [isCollapsed, setIsCollapsed] = useState(false);const transition = useNavigation();+ const panelRef = useRef<ImperativePanelHandle>(null);+ const { isMobile } = useMediaQuery();++ useEffect(() => {+ if (isMobile) {+ panelRef.current?.collapse();+ }+ }, [isMobile]);/* NProgress */useEffect(() => {@@ -133,7 +142,8 @@ export default function AuthenticatedRoute() {className="h-full items-stretch"><ResizablePanel- defaultSize={defaultLayout[0]}+ ref={panelRef}+ defaultSize={isMobile ? 4 : defaultLayout[0]}collapsedSize={4}collapsible={true}minSize={15}diff --git a/apps/mes/app/routes/x+/jobs.$workCenterId.tsx b/apps/mes/app/routes/x+/jobs.$workCenterId.tsxindex 5222fe0921..c6c7b42aef 100644--- a/apps/mes/app/routes/x+/jobs.$workCenterId.tsx+++ b/apps/mes/app/routes/x+/jobs.$workCenterId.tsx@@ -16,9 +16,8 @@ import {import { LuSearch } from "react-icons/lu";import { defaultLayout } from "~/utils/layout";-import { error, notFound } from "@carbon/auth";+import { notFound } from "@carbon/auth";import { requirePermissions } from "@carbon/auth/auth.server";-import { flash } from "@carbon/auth/session.server";import {Outlet,useLoaderData,@@ -26,8 +25,10 @@ import {useParams,} from "@remix-run/react";import { json, redirect, type LoaderFunctionArgs } from "@vercel/remix";-import { useMemo, useState } from "react";+import { useEffect, useMemo, useRef, useState } from "react";+import type { ImperativePanelHandle } from "react-resizable-panels";import { OperationsList } from "~/components";+import { useMediaQuery } from "~/hooks";import {getJobOperationsByWorkCenter,getWorkCenter,@@ -56,13 +57,11 @@ export async function loader({ request, params }: LoaderFunctionArgs) {const workCenter = await getWorkCenter(client, workCenterId);if (workCenter.error) {- throw redirect(- path.to.jobs,- await flash(- request,- error(workCenter.error, "Failed to fetch work center")- )- );+ throw redirect(path.to.recent, {+ headers: {+ "Set-Cookie": setLocationAndWorkCenter("", ""),+ },+ });}const [operations, workCenters] = await Promise.all([@@ -99,8 +98,21 @@ export default function JobsRoute() {const { operations, workCenters } = useLoaderData<typeof loader>();const [searchTerm, setSearchTerm] = useState("");- const { workCenterId } = useParams();+ const { workCenterId, operationId } = useParams();+if (!workCenterId) throw new Error("workCenterId not found");++ const panelRef = useRef<ImperativePanelHandle>(null);+ const { isMobile } = useMediaQuery();++ useEffect(() => {+ if (isMobile && !!operationId) {+ panelRef.current?.collapse();+ } else {+ panelRef.current?.expand();+ }+ }, [isMobile, operationId]);+const navigate = useNavigate();const filteredOperations = useMemo(() => {@@ -116,7 +128,13 @@ export default function JobsRoute() {return (<>- <ResizablePanel defaultSize={defaultLayout[1]} minSize={30}>+ <ResizablePanel+ ref={panelRef}+ collapsible={true}+ collapsedSize={0}+ defaultSize={defaultLayout[1]}+ minSize={isMobile ? 0 : 30}+ ><Tabs defaultValue="current"><div className="flex items-center px-4 py-2 h-[52px] bg-background"><Heading size="h2">Jobs</Heading>diff --git a/packages/database/supabase/migrations/20240930222742_mes-events.sql b/packages/database/supabase/migrations/20240930222742_mes-events.sqlnew file mode 100644index 0000000000..e3cf0d18fe--- /dev/null+++ b/packages/database/supabase/migrations/20240930222742_mes-events.sql@@ -0,0 +1 @@+ALTER PUBLICATION supabase_realtime ADD TABLE "productionEvent";