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.

refactor: rename salesRfq notes column to externalNotes

Rob Carrington25917a4bc4d1
diff --git a/apps/carbon/app/routes/x+/sales-rfq+/$rfqId.details.tsx b/apps/carbon/app/routes/x+/sales-rfq+/$rfqId.details.tsx
index 3e3d72f7c0..4d14e20f00 100644
--- a/apps/carbon/app/routes/x+/sales-rfq+/$rfqId.details.tsx
+++ b/apps/carbon/app/routes/x+/sales-rfq+/$rfqId.details.tsx
@@ -144,10 +144,11 @@ const SalesRFQNotes = ({ salesRfq }: { salesRfq: SalesRFQ }) => {
};
const onUpdateExternalNotes = useThrottle(async (content: JSONContent) => {
+ console.log({ content });
await supabase
?.from("salesRfq")
.update({
- notes: content,
+ externalNotes: content,
updatedAt: today(getLocalTimeZone()).toString(),
updatedBy: userId,
})
diff --git a/packages/database/src/types.ts b/packages/database/src/types.ts
index aa45cfef80..0d73bbb4f8 100644
--- a/packages/database/src/types.ts
+++ b/packages/database/src/types.ts
@@ -15447,10 +15447,10 @@ export type Database = {
customFields: Json | null
employeeId: string | null
expirationDate: string | null
+ externalNotes: Json | null
id: string
internalNotes: string | null
locationId: string | null
- notes: Json | null
revisionId: number
rfqDate: string
rfqId: string
@@ -15470,10 +15470,10 @@ export type Database = {
customFields?: Json | null
employeeId?: string | null
expirationDate?: string | null
+ externalNotes?: Json | null
id?: string
internalNotes?: string | null
locationId?: string | null
- notes?: Json | null
revisionId?: number
rfqDate: string
rfqId: string
@@ -15493,10 +15493,10 @@ export type Database = {
customFields?: Json | null
employeeId?: string | null
expirationDate?: string | null
+ externalNotes?: Json | null
id?: string
internalNotes?: string | null
locationId?: string | null
- notes?: Json | null
revisionId?: number
rfqDate?: string
rfqId?: string
diff --git a/packages/database/supabase/functions/lib/types.ts b/packages/database/supabase/functions/lib/types.ts
index aa45cfef80..0d73bbb4f8 100644
--- a/packages/database/supabase/functions/lib/types.ts
+++ b/packages/database/supabase/functions/lib/types.ts
@@ -15447,10 +15447,10 @@ export type Database = {
customFields: Json | null
employeeId: string | null
expirationDate: string | null
+ externalNotes: Json | null
id: string
internalNotes: string | null
locationId: string | null
- notes: Json | null
revisionId: number
rfqDate: string
rfqId: string
@@ -15470,10 +15470,10 @@ export type Database = {
customFields?: Json | null
employeeId?: string | null
expirationDate?: string | null
+ externalNotes?: Json | null
id?: string
internalNotes?: string | null
locationId?: string | null
- notes?: Json | null
revisionId?: number
rfqDate: string
rfqId: string
@@ -15493,10 +15493,10 @@ export type Database = {
customFields?: Json | null
employeeId?: string | null
expirationDate?: string | null
+ externalNotes?: Json | null
id?: string
internalNotes?: string | null
locationId?: string | null
- notes?: Json | null
revisionId?: number
rfqDate?: string
rfqId?: string
diff --git a/packages/database/supabase/migrations/20240823012655_rfq-quote-internal-notes.sql b/packages/database/supabase/migrations/20240823012655_rfq-quote-internal-notes.sql
new file mode 100644
index 0000000000..e08820185d
--- /dev/null
+++ b/packages/database/supabase/migrations/20240823012655_rfq-quote-internal-notes.sql
@@ -0,0 +1,2 @@
+ALTER TABLE "salesRfq"
+RENAME COLUMN "notes" to "externalNotes";
\ No newline at end of file