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.

feat: update the customer and supplier location dropdown formatting

Rob Carringtoned19e847326f
diff --git a/apps/carbon/app/components/Form/CustomerLocation.tsx b/apps/carbon/app/components/Form/CustomerLocation.tsx
index eb2bba8bf5..1617aae7ae 100644
--- a/apps/carbon/app/components/Form/CustomerLocation.tsx
+++ b/apps/carbon/app/components/Form/CustomerLocation.tsx
@@ -40,7 +40,7 @@ const CustomerLocation = (props: CustomerLocationSelectProps) => {
() =>
customerLocationsFetcher.data?.data?.map((c) => ({
value: c.id,
- label: `${c.address?.addressLine1} ${c.address?.city}, ${c.address?.state}`,
+ label: `${c.address?.addressLine1} ${c.address?.city}, ${c.address?.state} (${c.name})`,
})) ?? [],
[customerLocationsFetcher.data]
@@ -77,7 +77,7 @@ const CustomerLocation = (props: CustomerLocationSelectProps) => {
newLocationModal.onClose();
triggerRef.current?.click();
}}
- initialValues={{}}
+ initialValues={{ name: "" }} // Ask Brad how to avoid this janky solution
/>
)}
</>
diff --git a/apps/carbon/app/components/Form/SupplierLocation.tsx b/apps/carbon/app/components/Form/SupplierLocation.tsx
index 4c9f7eafd9..4a6338388c 100644
--- a/apps/carbon/app/components/Form/SupplierLocation.tsx
+++ b/apps/carbon/app/components/Form/SupplierLocation.tsx
@@ -39,7 +39,7 @@ const SupplierLocation = (props: SupplierLocationSelectProps) => {
() =>
supplierLocationsFetcher.data?.data?.map((c) => ({
value: c.id,
- label: `${c.address?.addressLine1} ${c.address?.city}, ${c.address?.state}`,
+ label: `${c.address?.addressLine1} ${c.address?.city}, ${c.address?.state} (${c.name})`,
})) ?? [],
[supplierLocationsFetcher.data]
@@ -76,7 +76,7 @@ const SupplierLocation = (props: SupplierLocationSelectProps) => {
newLocationModal.onClose();
triggerRef.current?.click();
}}
- initialValues={{}}
+ initialValues={{ name: "" }} // Ask Brad how to avoid this janky solution
/>
)}
</>