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: onshape oauth

Brad Barbin47733f2c8e34
diff --git a/apps/academy/app/routes/_auth+/login.tsx b/apps/academy/app/routes/_auth+/login.tsx
index 3c187b8910..8caae51946 100644
--- a/apps/academy/app/routes/_auth+/login.tsx
+++ b/apps/academy/app/routes/_auth+/login.tsx
@@ -202,7 +202,11 @@ export default function LoginRoute() {
</Button>
)}
- {(hasGoogleAuth || hasOutlookAuth) && <Separator />}
+ {(hasGoogleAuth || hasOutlookAuth) && (
+ <div className="py-3 w-full">
+ <Separator />
+ </div>
+ )}
<Input name="email" label="" placeholder="Email Address" />
diff --git a/apps/erp/app/components/Form/AddressAutocomplete.tsx b/apps/erp/app/components/Form/AddressAutocomplete.tsx
index 9625cff9ee..d5e85936e0 100644
--- a/apps/erp/app/components/Form/AddressAutocomplete.tsx
+++ b/apps/erp/app/components/Form/AddressAutocomplete.tsx
@@ -148,7 +148,7 @@ const AddressAutocomplete = ({
<FormControl isInvalid={!!error}>
<FormLabel htmlFor={address1Field}>Address Line 1</FormLabel>
<div className="relative w-full" ref={containerRef}>
- <Command shouldFilter={false}>
+ <Command shouldFilter={false} className="bg-transparent">
<CommandInputTextField
id={address1Field}
name={address1Field}
diff --git a/apps/erp/app/routes/_public+/login.tsx b/apps/erp/app/routes/_public+/login.tsx
index 400bb9fa68..fe524b0a23 100644
--- a/apps/erp/app/routes/_public+/login.tsx
+++ b/apps/erp/app/routes/_public+/login.tsx
@@ -306,7 +306,11 @@ export default function LoginRoute() {
</Button>
)}
- {(hasGoogleAuth || hasOutlookAuth) && <Separator />}
+ {(hasGoogleAuth || hasOutlookAuth) && (
+ <div className="py-3 w-full">
+ <Separator />
+ </div>
+ )}
<Input name="email" label="" placeholder="Email Address" />
diff --git a/apps/erp/app/routes/api+/integrations.onshape.oauth.ts b/apps/erp/app/routes/api+/integrations.onshape.oauth.ts
index 11d31625cd..7bf87ab105 100644
--- a/apps/erp/app/routes/api+/integrations.onshape.oauth.ts
+++ b/apps/erp/app/routes/api+/integrations.onshape.oauth.ts
@@ -1,4 +1,5 @@
import {
+ getCarbonServiceRole,
ONSHAPE_CLIENT_ID,
ONSHAPE_CLIENT_SECRET,
ONSHAPE_OAUTH_REDIRECT_URL,
@@ -17,7 +18,7 @@ export const config = {
};
export async function loader({ request }: LoaderFunctionArgs) {
- const { client, userId, companyId } = await requirePermissions(request, {
+ const { userId, companyId } = await requirePermissions(request, {
update: "settings"
});
@@ -80,7 +81,8 @@ export async function loader({ request }: LoaderFunctionArgs) {
);
}
- const createdIntegration = await upsertCompanyIntegration(client, {
+ const serviceRole = getCarbonServiceRole();
+ const createdIntegration = await upsertCompanyIntegration(serviceRole, {
id: Onshape.id,
active: true,
metadata: {
@@ -107,6 +109,7 @@ export async function loader({ request }: LoaderFunctionArgs) {
return redirect(redirectUrl);
} else {
+ console.error({ createdIntegration });
return data(
{ error: "Failed to save Onshape integration" },
{ status: 500 }
diff --git a/apps/erp/vite.config.ts b/apps/erp/vite.config.ts
index a76b40e56e..c443c807e6 100644
--- a/apps/erp/vite.config.ts
+++ b/apps/erp/vite.config.ts
@@ -32,7 +32,7 @@ export default defineConfig(({ isSsrBuild, mode }) => ({
},
server: {
port: 3000,
- allowedHosts: [".ngrok-free.app", ".w.modal.host", ".w.modal.dev"],
+ allowedHosts: [".ngrok-free.app", ".ngrok-free.dev"],
},
plugins: [reactRouter(), tsconfigPaths()] as PluginOption[],
resolve: {
diff --git a/apps/mes/app/components/JobOperation/components/Chat.tsx b/apps/mes/app/components/JobOperation/components/Chat.tsx
index 457a132923..c2f213c25d 100644
--- a/apps/mes/app/components/JobOperation/components/Chat.tsx
+++ b/apps/mes/app/components/JobOperation/components/Chat.tsx
@@ -13,7 +13,7 @@ import {
import { nanoid } from "nanoid";
import { useEffect, useRef, useState } from "react";
import { flushSync } from "react-dom";
-import { LuSend } from "react-icons/lu";
+import { LuArrowUp } from "react-icons/lu";
import { useUser } from "~/hooks";
import type { OperationWithDetails } from "~/services/types";
import { usePeople } from "~/stores";
@@ -214,7 +214,7 @@ export function OperationChat({
className="h-10"
aria-label="Send"
type="submit"
- leftIcon={<LuSend />}
+ leftIcon={<LuArrowUp />}
>
Send
</Button>
diff --git a/apps/mes/app/routes/_public+/login.tsx b/apps/mes/app/routes/_public+/login.tsx
index b0998ee659..c3f7655344 100644
--- a/apps/mes/app/routes/_public+/login.tsx
+++ b/apps/mes/app/routes/_public+/login.tsx
@@ -213,7 +213,11 @@ export default function LoginRoute() {
</Button>
)}
- {(hasGoogleAuth || hasOutlookAuth) && <Separator />}
+ {(hasGoogleAuth || hasOutlookAuth) && (
+ <div className="py-3 w-full">
+ <Separator />
+ </div>
+ )}
<Input name="email" label="" placeholder="Email Address" />
diff --git a/apps/starter/app/routes/_public+/login.tsx b/apps/starter/app/routes/_public+/login.tsx
index 218065eca1..1bcfef06a8 100644
--- a/apps/starter/app/routes/_public+/login.tsx
+++ b/apps/starter/app/routes/_public+/login.tsx
@@ -202,7 +202,11 @@ export default function LoginRoute() {
</Button>
)}
- {(hasGoogleAuth || hasOutlookAuth) && <Separator />}
+ {(hasGoogleAuth || hasOutlookAuth) && (
+ <div className="py-3 w-full">
+ <Separator />
+ </div>
+ )}
<Input name="email" label="" placeholder="Email Address" />
diff --git a/packages/database/src/types.ts b/packages/database/src/types.ts
index d16c78f09a..c415da4a61 100644
--- a/packages/database/src/types.ts
+++ b/packages/database/src/types.ts
@@ -51891,14 +51891,14 @@ export type Database = {
Relationships: [
{
foreignKeyName: "address_countryCode_fkey"
- columns: ["customerCountryCode"]
+ columns: ["invoiceCountryCode"]
isOneToOne: false
referencedRelation: "country"
referencedColumns: ["alpha2"]
},
{
foreignKeyName: "address_countryCode_fkey"
- columns: ["invoiceCountryCode"]
+ columns: ["customerCountryCode"]
isOneToOne: false
referencedRelation: "country"
referencedColumns: ["alpha2"]
diff --git a/packages/database/supabase/functions/lib/types.ts b/packages/database/supabase/functions/lib/types.ts
index d16c78f09a..c415da4a61 100644
--- a/packages/database/supabase/functions/lib/types.ts
+++ b/packages/database/supabase/functions/lib/types.ts
@@ -51891,14 +51891,14 @@ export type Database = {
Relationships: [
{
foreignKeyName: "address_countryCode_fkey"
- columns: ["customerCountryCode"]
+ columns: ["invoiceCountryCode"]
isOneToOne: false
referencedRelation: "country"
referencedColumns: ["alpha2"]
},
{
foreignKeyName: "address_countryCode_fkey"
- columns: ["invoiceCountryCode"]
+ columns: ["customerCountryCode"]
isOneToOne: false
referencedRelation: "country"
referencedColumns: ["alpha2"]
diff --git a/packages/database/supabase/migrations/20260214120000_update-onshape-jsonschema.sql b/packages/database/supabase/migrations/20260214120000_update-onshape-jsonschema.sql
new file mode 100644
index 0000000000..8d734dfe7b
--- /dev/null
+++ b/packages/database/supabase/migrations/20260214120000_update-onshape-jsonschema.sql
@@ -0,0 +1,29 @@
+UPDATE "integration"
+SET "jsonschema" = '{
+ "type": "object",
+ "properties": {
+ "baseUrl": {
+ "type": "string"
+ },
+ "credentials": {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string"
+ },
+ "accessToken": {
+ "type": "string"
+ },
+ "refreshToken": {
+ "type": "string"
+ },
+ "expiresAt": {
+ "type": "string"
+ }
+ },
+ "required": ["type", "accessToken", "refreshToken", "expiresAt"]
+ }
+ },
+ "required": ["baseUrl", "credentials"]
+}'::json
+WHERE "id" = 'onshape';
diff --git a/packages/ee/src/onshape/config.tsx b/packages/ee/src/onshape/config.tsx
index 467afb3895..73416481b2 100644
--- a/packages/ee/src/onshape/config.tsx
+++ b/packages/ee/src/onshape/config.tsx
@@ -10,7 +10,7 @@ export const Onshape = defineIntegration({
category: "CAD",
logo: Logo,
description:
- "Onshape is a CAD software that allows you to create 2D and 3D designs. This integration will sync data from Onshape to Carbon.",
+ "Onshape is a browser-based CAD/PLM software for modern engineering teams. This integration will sync data from Onshape to Carbon.",
shortDescription: "Sync data from Onshape to Carbon.",
images: [],
settings: [],
diff --git a/packages/tailwind/tailwind.config.js b/packages/tailwind/tailwind.config.js
index 00b2ffce3f..8ad8ab361d 100644
--- a/packages/tailwind/tailwind.config.js
+++ b/packages/tailwind/tailwind.config.js
@@ -105,6 +105,9 @@ export default {
mono: ["Geist Mono Variable", ...fontFamily.mono],
headline: ["Geist Variable", ...fontFamily.sans],
},
+ letterSpacing: {
+ normal: "-0.02em",
+ },
keyframes: {
"accordion-down": {
from: { height: "0" },