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.

style: tighten up forms

Brad Barbin6e6f5a1705d3
diff --git a/apps/carbon/app/modules/accounting/ui/ChartOfAccounts/ChartOfAccountForm.tsx b/apps/carbon/app/modules/accounting/ui/ChartOfAccounts/ChartOfAccountForm.tsx
index 362a873f76..c009bd0a5c 100644
--- a/apps/carbon/app/modules/accounting/ui/ChartOfAccounts/ChartOfAccountForm.tsx
+++ b/apps/carbon/app/modules/accounting/ui/ChartOfAccounts/ChartOfAccountForm.tsx
@@ -101,7 +101,7 @@ const ChartOfAccountForm = ({ initialValues }: ChartOfAccountFormProps) => {
<DrawerBody>
<Hidden name="id" />
- <div className="grid grid-cols-1 lg:grid-cols-3 gap-x-8 gap-y-4 w-full">
+ <div className="grid grid-cols-1 lg:grid-cols-3 gap-x-8 gap-y-2 w-full">
<Input name="number" label="Account Number" />
<Input name="name" label="Name" />
<Select
diff --git a/apps/carbon/app/modules/inventory/ui/Receipts/ReceiptForm/ReceiptForm.tsx b/apps/carbon/app/modules/inventory/ui/Receipts/ReceiptForm/ReceiptForm.tsx
index ca41ec45c1..153e7b1c81 100644
--- a/apps/carbon/app/modules/inventory/ui/Receipts/ReceiptForm/ReceiptForm.tsx
+++ b/apps/carbon/app/modules/inventory/ui/Receipts/ReceiptForm/ReceiptForm.tsx
@@ -121,7 +121,7 @@ const ReceiptForm = ({
/>
<Hidden name="supplierId" value={supplierId ?? ""} />
<VStack spacing={4} className="min-h-full">
- <div className="grid grid-cols-1 md:grid-cols-2 gap-x-8 gap-y-4 w-full">
+ <div className="grid grid-cols-1 md:grid-cols-2 gap-x-8 gap-y-2 w-full">
<Input name="receiptId" label="Receipt ID" isReadOnly />
<ComboboxControlled
name="locationId"
diff --git a/apps/carbon/app/modules/parts/ui/Part/PartCostingForm.tsx b/apps/carbon/app/modules/parts/ui/Part/PartCostingForm.tsx
index 2fe5733943..f6aee8cadc 100644
--- a/apps/carbon/app/modules/parts/ui/Part/PartCostingForm.tsx
+++ b/apps/carbon/app/modules/parts/ui/Part/PartCostingForm.tsx
@@ -46,7 +46,7 @@ const PartCostingForm = ({ initialValues }: PartCostingFormProps) => {
</CardHeader>
<CardContent>
<Hidden name="partId" />
- <div className="grid grid-cols-1 lg:grid-cols-3 gap-x-8 gap-y-4 w-full">
+ <div className="grid grid-cols-1 lg:grid-cols-3 gap-x-8 gap-y-2 w-full">
<Select
name="costingMethod"
label="Part Costing Method"
diff --git a/apps/carbon/app/modules/parts/ui/Part/PartForm.tsx b/apps/carbon/app/modules/parts/ui/Part/PartForm.tsx
index 4542fd2a56..6c0b44e8a3 100644
--- a/apps/carbon/app/modules/parts/ui/Part/PartForm.tsx
+++ b/apps/carbon/app/modules/parts/ui/Part/PartForm.tsx
@@ -130,7 +130,7 @@ const PartForm = ({ initialValues, type = "card", onClose }: PartFormProps) => {
<Hidden name="type" value={type} />
<div
className={cn(
- "grid w-full gap-x-8 gap-y-4",
+ "grid w-full gap-x-8 gap-y-2",
isEditing ? "grid-cols-1 md:grid-cols-3" : "grid-cols-1"
)}
>
diff --git a/apps/carbon/app/modules/parts/ui/Part/PartInventoryForm.tsx b/apps/carbon/app/modules/parts/ui/Part/PartInventoryForm.tsx
index f5e521c9b2..c1c668efad 100644
--- a/apps/carbon/app/modules/parts/ui/Part/PartInventoryForm.tsx
+++ b/apps/carbon/app/modules/parts/ui/Part/PartInventoryForm.tsx
@@ -79,7 +79,7 @@ const PartInventoryForm = ({
<CardContent>
<Hidden name="partId" />
<Hidden name="locationId" />
- <div className="grid grid-cols-1 lg:grid-cols-3 gap-x-8 gap-y-4 w-full">
+ <div className="grid grid-cols-1 lg:grid-cols-3 gap-x-8 gap-y-2 w-full">
<CreatableCombobox
name="defaultShelfId"
label="Default Shelf"
diff --git a/apps/carbon/app/modules/parts/ui/Part/PartManufacturingForm.tsx b/apps/carbon/app/modules/parts/ui/Part/PartManufacturingForm.tsx
index ee75aa71d4..16bf3d5f38 100644
--- a/apps/carbon/app/modules/parts/ui/Part/PartManufacturingForm.tsx
+++ b/apps/carbon/app/modules/parts/ui/Part/PartManufacturingForm.tsx
@@ -48,7 +48,7 @@ const PartManufacturingForm = ({
</CardHeader>
<CardContent>
<Hidden name="partId" />
- <div className="grid grid-cols-1 lg:grid-cols-3 gap-x-8 gap-y-4 w-full">
+ <div className="grid grid-cols-1 lg:grid-cols-3 gap-x-8 gap-y-2 w-full">
<Select
name="manufacturingPolicy"
label="Manufacturing Policy"
diff --git a/apps/carbon/app/modules/parts/ui/Part/PartPlanningForm.tsx b/apps/carbon/app/modules/parts/ui/Part/PartPlanningForm.tsx
index 960a3b8212..9493982ece 100644
--- a/apps/carbon/app/modules/parts/ui/Part/PartPlanningForm.tsx
+++ b/apps/carbon/app/modules/parts/ui/Part/PartPlanningForm.tsx
@@ -67,7 +67,7 @@ const PartPlanningForm = ({
<CardContent>
<Hidden name="partId" />
<Hidden name="locationId" />
- <div className="grid grid-cols-1 lg:grid-cols-3 gap-x-8 gap-y-4 w-full">
+ <div className="grid grid-cols-1 lg:grid-cols-3 gap-x-8 gap-y-2 w-full">
<SelectForm
name="reorderingPolicy"
label="Reordering Policy"
diff --git a/apps/carbon/app/modules/parts/ui/Part/PartPurchasingForm.tsx b/apps/carbon/app/modules/parts/ui/Part/PartPurchasingForm.tsx
index 7e95209a0b..9fedb07902 100644
--- a/apps/carbon/app/modules/parts/ui/Part/PartPurchasingForm.tsx
+++ b/apps/carbon/app/modules/parts/ui/Part/PartPurchasingForm.tsx
@@ -38,7 +38,7 @@ const PartPurchasingForm = ({ initialValues }: PartPurchasingFormProps) => {
</CardHeader>
<CardContent>
<Hidden name="partId" />
- <div className="grid grid-cols-1 lg:grid-cols-3 gap-x-8 gap-y-4 w-full">
+ <div className="grid grid-cols-1 lg:grid-cols-3 gap-x-8 gap-y-2 w-full">
<VStack>
<Supplier name="preferredSupplierId" label="Preferred Supplier" />
<Number name="purchasingLeadTime" label="Lead Time (Days)" />
diff --git a/apps/carbon/app/modules/parts/ui/Part/PartSalePriceForm.tsx b/apps/carbon/app/modules/parts/ui/Part/PartSalePriceForm.tsx
index 1e250a0641..814f46b527 100644
--- a/apps/carbon/app/modules/parts/ui/Part/PartSalePriceForm.tsx
+++ b/apps/carbon/app/modules/parts/ui/Part/PartSalePriceForm.tsx
@@ -40,7 +40,7 @@ const PartSalePriceForm = ({ initialValues }: PartSalePriceFormProps) => {
</CardHeader>
<CardContent>
<Hidden name="partId" />
- <div className="grid grid-cols-1 lg:grid-cols-3 gap-x-8 gap-y-4 w-full">
+ <div className="grid grid-cols-1 lg:grid-cols-3 gap-x-8 gap-y-2 w-full">
<Number
name="unitSalePrice"
label="Unit Sale Price"
diff --git a/apps/carbon/app/modules/purchasing/ui/PurchaseOrder/PurchaseOrderDeliveryForm.tsx b/apps/carbon/app/modules/purchasing/ui/PurchaseOrder/PurchaseOrderDeliveryForm.tsx
index 63603dd106..df6d5bdcc4 100644
--- a/apps/carbon/app/modules/purchasing/ui/PurchaseOrder/PurchaseOrderDeliveryForm.tsx
+++ b/apps/carbon/app/modules/purchasing/ui/PurchaseOrder/PurchaseOrderDeliveryForm.tsx
@@ -67,7 +67,7 @@ const PurchaseOrderDeliveryForm = ({
</CardHeader>
<CardContent>
<Hidden name="id" />
- <div className="grid grid-cols-1 lg:grid-cols-3 gap-x-8 gap-y-4 w-full">
+ <div className="grid grid-cols-1 lg:grid-cols-3 gap-x-8 gap-y-2 w-full">
<Location
name="locationId"
label="Delivery Location"
diff --git a/apps/carbon/app/modules/purchasing/ui/PurchaseOrder/PurchaseOrderPaymentForm.tsx b/apps/carbon/app/modules/purchasing/ui/PurchaseOrder/PurchaseOrderPaymentForm.tsx
index c27a83a846..939dcc5f8f 100644
--- a/apps/carbon/app/modules/purchasing/ui/PurchaseOrder/PurchaseOrderPaymentForm.tsx
+++ b/apps/carbon/app/modules/purchasing/ui/PurchaseOrder/PurchaseOrderPaymentForm.tsx
@@ -55,7 +55,7 @@ const PurchaseOrderPaymentForm = ({
</CardHeader>
<CardContent>
<Hidden name="id" />
- <div className="grid grid-cols-1 lg:grid-cols-3 gap-x-8 gap-y-4 w-full">
+ <div className="grid grid-cols-1 lg:grid-cols-3 gap-x-8 gap-y-2 w-full">
<Supplier
name="invoiceSupplierId"
label="Invoice Supplier"
diff --git a/apps/carbon/app/modules/purchasing/ui/Supplier/SupplierPaymentForm.tsx b/apps/carbon/app/modules/purchasing/ui/Supplier/SupplierPaymentForm.tsx
index 61f9345c14..261e978e4f 100644
--- a/apps/carbon/app/modules/purchasing/ui/Supplier/SupplierPaymentForm.tsx
+++ b/apps/carbon/app/modules/purchasing/ui/Supplier/SupplierPaymentForm.tsx
@@ -58,7 +58,7 @@ const SupplierPaymentForm = ({ initialValues }: SupplierPaymentFormProps) => {
</CardHeader>
<CardContent>
<Hidden name="supplierId" />
- <div className="grid grid-cols-1 lg:grid-cols-3 gap-x-8 gap-y-4 w-full">
+ <div className="grid grid-cols-1 lg:grid-cols-3 gap-x-8 gap-y-2 w-full">
<Supplier
name="invoiceSupplierId"
label="Invoice Supplier"
diff --git a/apps/carbon/app/modules/purchasing/ui/Supplier/SupplierShippingForm.tsx b/apps/carbon/app/modules/purchasing/ui/Supplier/SupplierShippingForm.tsx
index 52277b4912..33deff4985 100644
--- a/apps/carbon/app/modules/purchasing/ui/Supplier/SupplierShippingForm.tsx
+++ b/apps/carbon/app/modules/purchasing/ui/Supplier/SupplierShippingForm.tsx
@@ -64,7 +64,7 @@ const SupplierShippingForm = ({ initialValues }: SupplierShippingFormProps) => {
</CardHeader>
<CardContent>
<Hidden name="supplierId" />
- <div className="grid grid-cols-1 lg:grid-cols-3 gap-x-8 gap-y-4 w-full">
+ <div className="grid grid-cols-1 lg:grid-cols-3 gap-x-8 gap-y-2 w-full">
<Supplier
name="shippingSupplierId"
label="Shipping Supplier"
diff --git a/apps/carbon/app/modules/sales/ui/Customer/CustomerForm.tsx b/apps/carbon/app/modules/sales/ui/Customer/CustomerForm.tsx
index 078dda1c52..8195f7f126 100644
--- a/apps/carbon/app/modules/sales/ui/Customer/CustomerForm.tsx
+++ b/apps/carbon/app/modules/sales/ui/Customer/CustomerForm.tsx
@@ -73,7 +73,7 @@ const CustomerForm = ({
<Hidden name="type" value={type} />
<div
className={cn(
- "grid w-full gap-x-8 gap-y-4",
+ "grid w-full gap-x-8 gap-y-2",
isEditing ? "grid-cols-1 lg:grid-cols-3" : "grid-cols-1"
)}
>
diff --git a/apps/carbon/app/modules/sales/ui/Customer/CustomerPaymentForm.tsx b/apps/carbon/app/modules/sales/ui/Customer/CustomerPaymentForm.tsx
index ed1b79bd64..250848ccfb 100644
--- a/apps/carbon/app/modules/sales/ui/Customer/CustomerPaymentForm.tsx
+++ b/apps/carbon/app/modules/sales/ui/Customer/CustomerPaymentForm.tsx
@@ -58,7 +58,7 @@ const CustomerPaymentForm = ({ initialValues }: CustomerPaymentFormProps) => {
</CardHeader>
<CardContent>
<Hidden name="customerId" />
- <div className="grid grid-cols-1 lg:grid-cols-3 gap-x-8 gap-y-4 w-full">
+ <div className="grid grid-cols-1 lg:grid-cols-3 gap-x-8 gap-y-2 w-full">
<Customer
name="invoiceCustomerId"
label="Invoice Customer"
diff --git a/apps/carbon/app/modules/sales/ui/Customer/CustomerShippingForm.tsx b/apps/carbon/app/modules/sales/ui/Customer/CustomerShippingForm.tsx
index 135ae5ee69..905a3f6210 100644
--- a/apps/carbon/app/modules/sales/ui/Customer/CustomerShippingForm.tsx
+++ b/apps/carbon/app/modules/sales/ui/Customer/CustomerShippingForm.tsx
@@ -64,7 +64,7 @@ const CustomerShippingForm = ({ initialValues }: CustomerShippingFormProps) => {
</CardHeader>
<CardContent>
<Hidden name="customerId" />
- <div className="grid grid-cols-1 lg:grid-cols-3 gap-x-8 gap-y-4 w-full">
+ <div className="grid grid-cols-1 lg:grid-cols-3 gap-x-8 gap-y-2 w-full">
<VStack>
<Customer
name="shippingCustomerId"
diff --git a/apps/carbon/app/modules/sales/ui/Quotation/QuotationAssemblyForm.tsx b/apps/carbon/app/modules/sales/ui/Quotation/QuotationAssemblyForm.tsx
index 9f1b3719c9..f4f655599a 100644
--- a/apps/carbon/app/modules/sales/ui/Quotation/QuotationAssemblyForm.tsx
+++ b/apps/carbon/app/modules/sales/ui/Quotation/QuotationAssemblyForm.tsx
@@ -147,7 +147,7 @@ const QuotationAssemblyForm = ({
/>
<Hidden name="unitOfMeasureCode" value={partData?.uom} />
<VStack>
- <div className="grid w-full gap-x-8 gap-y-4 grid-cols-1 lg:grid-cols-3">
+ <div className="grid w-full gap-x-8 gap-y-2 grid-cols-1 lg:grid-cols-3">
<Part
name="partId"
label="Manufactured Part"
diff --git a/apps/carbon/app/modules/sales/ui/Quotation/QuotationForm.tsx b/apps/carbon/app/modules/sales/ui/Quotation/QuotationForm.tsx
index 63fa0fc528..df89070c28 100644
--- a/apps/carbon/app/modules/sales/ui/Quotation/QuotationForm.tsx
+++ b/apps/carbon/app/modules/sales/ui/Quotation/QuotationForm.tsx
@@ -63,7 +63,7 @@ const QuotationForm = ({ initialValues }: QuotationFormProps) => {
<VStack>
<div
className={cn(
- "grid w-full gap-x-8 gap-y-4",
+ "grid w-full gap-x-8 gap-y-2",
isEditing ? "grid-cols-1 lg:grid-cols-3" : "grid-cols-1"
)}
>
diff --git a/apps/carbon/app/modules/sales/ui/Quotation/QuotationLineForm.tsx b/apps/carbon/app/modules/sales/ui/Quotation/QuotationLineForm.tsx
index bd6a8d60db..dba53d5027 100644
--- a/apps/carbon/app/modules/sales/ui/Quotation/QuotationLineForm.tsx
+++ b/apps/carbon/app/modules/sales/ui/Quotation/QuotationLineForm.tsx
@@ -155,7 +155,7 @@ const QuotationLineForm = ({ initialValues }: QuotationLineFormProps) => {
<Hidden name="quoteId" />
<Hidden name="unitOfMeasureCode" value={partData?.uom} />
<VStack>
- <div className="grid w-full gap-x-8 gap-y-4 grid-cols-1 lg:grid-cols-3">
+ <div className="grid w-full gap-x-8 gap-y-2 grid-cols-1 lg:grid-cols-3">
<Part
name="partId"
label="Part"
diff --git a/apps/carbon/app/modules/sales/ui/Quotation/QuotationOperationForm.tsx b/apps/carbon/app/modules/sales/ui/Quotation/QuotationOperationForm.tsx
index e860069b13..f0376ee6b5 100644
--- a/apps/carbon/app/modules/sales/ui/Quotation/QuotationOperationForm.tsx
+++ b/apps/carbon/app/modules/sales/ui/Quotation/QuotationOperationForm.tsx
@@ -169,7 +169,7 @@ const QuotationOperationForm = ({
<Hidden name="quoteAssemblyId" value={quoteAssemblyId ?? undefined} />
<VStack>
- <div className="grid w-full gap-x-8 gap-y-4 grid-cols-1 lg:grid-cols-3">
+ <div className="grid w-full gap-x-8 gap-y-2 grid-cols-1 lg:grid-cols-3">
<WorkCellType
name="workCellTypeId"
label="Work Cell"
diff --git a/apps/carbon/app/routes/x+/part+/$partId.index.tsx b/apps/carbon/app/routes/x+/part+/$partId.index.tsx
index 5246560e34..92faa316f2 100644
--- a/apps/carbon/app/routes/x+/part+/$partId.index.tsx
+++ b/apps/carbon/app/routes/x+/part+/$partId.index.tsx
@@ -22,8 +22,6 @@ export async function action({ request, params }: ActionFunctionArgs) {
if (!partId) throw new Error("Could not find partId");
const formData = await request.formData();
-
- // validate with partsValidator
const validation = await validator(partValidator).validate(formData);
if (validation.error) {