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.

expanded more

aashua51dfce4bd7b
diff --git a/apps/erp/app/components/Form/CustomerContact.tsx b/apps/erp/app/components/Form/CustomerContact.tsx
index ef9df1a500..c6befacbaa 100644
--- a/apps/erp/app/components/Form/CustomerContact.tsx
+++ b/apps/erp/app/components/Form/CustomerContact.tsx
@@ -10,6 +10,7 @@ import type {
} from "~/modules/sales";
import CustomerContactForm from "~/modules/sales/ui/Customer/CustomerContactForm";
import { path } from "~/utils/path";
+import { useEmptyState } from "./emptyStates";
type CustomerContactSelectProps = Omit<
ComboboxProps,
@@ -58,6 +59,11 @@ const CustomerContact = (props: CustomerContactSelectProps) => {
props.onChange?.(contact ?? null);
};
+ const emptyMessage = useEmptyState(
+ "customerContact",
+ props.customer ? { onCreate: () => newContactModal.onOpen() } : undefined
+ );
+
return (
<>
<CreatableCombobox
@@ -67,6 +73,7 @@ const CustomerContact = (props: CustomerContactSelectProps) => {
placeholder={props?.placeholder ?? t`Select Contact`}
inline={props.inline ? CustomerContactPreview : undefined}
label={props?.label ?? t`Customer Contact`}
+ emptyMessage={emptyMessage}
onChange={onChange}
onCreateOption={(option) => {
newContactModal.onOpen();
diff --git a/apps/erp/app/components/Form/CustomerLocation.tsx b/apps/erp/app/components/Form/CustomerLocation.tsx
index 12a7d19e29..488388553c 100644
--- a/apps/erp/app/components/Form/CustomerLocation.tsx
+++ b/apps/erp/app/components/Form/CustomerLocation.tsx
@@ -11,6 +11,7 @@ import type {
} from "~/modules/sales";
import CustomerLocationForm from "~/modules/sales/ui/Customer/CustomerLocationForm";
import { path } from "~/utils/path";
+import { useEmptyState } from "./emptyStates";
type CustomerLocationSelectProps = Omit<
ComboboxProps,
@@ -74,6 +75,11 @@ const CustomerLocation = (props: CustomerLocationSelectProps) => {
props.onChange?.(location as CustomerLocationType | null);
};
+ const emptyMessage = useEmptyState(
+ "customerLocation",
+ props.customer ? { onCreate: () => newLocationModal.onOpen() } : undefined
+ );
+
return (
<>
<CreatableCombobox
@@ -83,6 +89,7 @@ const CustomerLocation = (props: CustomerLocationSelectProps) => {
inline={props?.inline ? CustomerLocationPreview : undefined}
label={props?.label ?? t`Customer Location`}
placeholder={props?.placeholder ?? t`Select`}
+ emptyMessage={emptyMessage}
onChange={onChange}
onCreateOption={(option) => {
newLocationModal.onOpen();
diff --git a/apps/erp/app/components/Form/SupplierContact.tsx b/apps/erp/app/components/Form/SupplierContact.tsx
index f6dd50584e..d79f18c2ab 100644
--- a/apps/erp/app/components/Form/SupplierContact.tsx
+++ b/apps/erp/app/components/Form/SupplierContact.tsx
@@ -10,6 +10,7 @@ import type {
} from "~/modules/purchasing";
import { SupplierContactForm } from "~/modules/purchasing/ui/Supplier";
import { path } from "~/utils/path";
+import { useEmptyState } from "./emptyStates";
type SupplierContactSelectProps = Omit<
ComboboxProps,
@@ -80,6 +81,11 @@ const SupplierContact = (props: SupplierContactSelectProps) => {
props.onChange?.(contact ?? null);
};
+ const emptyMessage = useEmptyState(
+ "supplierContact",
+ props.supplier ? { onCreate: () => newContactModal.onOpen() } : undefined
+ );
+
return (
<>
<CreatableCombobox
@@ -89,6 +95,7 @@ const SupplierContact = (props: SupplierContactSelectProps) => {
placeholder={t`Select Contact`}
inline={props.inline ? SupplierContactPreview : undefined}
label={props?.label ?? t`Supplier Contact`}
+ emptyMessage={emptyMessage}
onChange={onChange}
onCreateOption={(option) => {
newContactModal.onOpen();
diff --git a/apps/erp/app/components/Form/SupplierLocation.tsx b/apps/erp/app/components/Form/SupplierLocation.tsx
index 4bf51ac86b..fbc61b8286 100644
--- a/apps/erp/app/components/Form/SupplierLocation.tsx
+++ b/apps/erp/app/components/Form/SupplierLocation.tsx
@@ -10,6 +10,7 @@ import type {
} from "~/modules/purchasing";
import { SupplierLocationForm } from "~/modules/purchasing/ui/Supplier";
import { path } from "~/utils/path";
+import { useEmptyState } from "./emptyStates";
type SupplierLocationSelectProps = Omit<
ComboboxProps,
@@ -71,6 +72,11 @@ const SupplierLocation = (props: SupplierLocationSelectProps) => {
props.onChange?.(location as SupplierLocationType | null);
};
+ const emptyMessage = useEmptyState(
+ "supplierLocation",
+ props.supplier ? { onCreate: () => newLocationModal.onOpen() } : undefined
+ );
+
return (
<>
<CreatableCombobox
@@ -79,6 +85,7 @@ const SupplierLocation = (props: SupplierLocationSelectProps) => {
{...props}
inline={props?.inline ? SupplierLocationPreview : undefined}
label={props?.label ?? "Supplier Location"}
+ emptyMessage={emptyMessage}
onChange={onChange}
onCreateOption={(option) => {
newLocationModal.onOpen();
diff --git a/apps/erp/app/components/Form/SupplierProcess.tsx b/apps/erp/app/components/Form/SupplierProcess.tsx
index e1550ecfae..0efb58df56 100644
--- a/apps/erp/app/components/Form/SupplierProcess.tsx
+++ b/apps/erp/app/components/Form/SupplierProcess.tsx
@@ -7,6 +7,7 @@ import type { getSupplierProcessesByProcess } from "~/modules/purchasing";
import { SupplierProcessForm } from "~/modules/purchasing/ui/Supplier";
import { useSuppliers } from "~/stores";
import { path } from "~/utils/path";
+import { useEmptyState } from "./emptyStates";
type SupplierProcessSelectProps = Omit<ComboboxProps, "options"> & {
processId?: string;
@@ -32,6 +33,11 @@ const SupplierProcess = ({
};
});
+ const emptyMessage = useEmptyState(
+ "supplierProcess",
+ processId ? { onCreate: () => newSupplierProcessModal.onOpen() } : undefined
+ );
+
return (
<>
<CreatableCombobox
@@ -40,6 +46,7 @@ const SupplierProcess = ({
{...props}
// @ts-ignore
label={props?.label ?? "Work Center"}
+ emptyMessage={emptyMessage}
onCreateOption={(option) => {
newSupplierProcessModal.onOpen();
}}
diff --git a/apps/erp/app/components/Form/emptyStates.tsx b/apps/erp/app/components/Form/emptyStates.tsx
index 405f364300..d9858669e1 100644
--- a/apps/erp/app/components/Form/emptyStates.tsx
+++ b/apps/erp/app/components/Form/emptyStates.tsx
@@ -42,7 +42,12 @@ export type EntityKey =
| "material"
| "tool"
| "service"
- | "consumable";
+ | "consumable"
+ | "customerContact"
+ | "customerLocation"
+ | "supplierContact"
+ | "supplierLocation"
+ | "supplierProcess";
const useEntityCopy = (entity: EntityKey): EntityCopy => {
const { t } = useLingui();
@@ -281,6 +286,51 @@ const useEntityCopy = (entity: EntityKey): EntityCopy => {
pluralNoun: t`consumables`,
moduleLabel: t`parts`
};
+ case "customerContact":
+ return {
+ module: "sales",
+ action: "create",
+ route: path.to.customers,
+ noun: t`contact`,
+ pluralNoun: t`contacts`,
+ moduleLabel: t`sales`
+ };
+ case "customerLocation":
+ return {
+ module: "sales",
+ action: "create",
+ route: path.to.customers,
+ noun: t`location`,
+ pluralNoun: t`locations`,
+ moduleLabel: t`sales`
+ };
+ case "supplierContact":
+ return {
+ module: "purchasing",
+ action: "create",
+ route: path.to.suppliers,
+ noun: t`contact`,
+ pluralNoun: t`contacts`,
+ moduleLabel: t`purchasing`
+ };
+ case "supplierLocation":
+ return {
+ module: "purchasing",
+ action: "create",
+ route: path.to.suppliers,
+ noun: t`location`,
+ pluralNoun: t`locations`,
+ moduleLabel: t`purchasing`
+ };
+ case "supplierProcess":
+ return {
+ module: "purchasing",
+ action: "create",
+ route: path.to.suppliers,
+ noun: t`supplier process`,
+ pluralNoun: t`supplier processes`,
+ moduleLabel: t`purchasing`
+ };
}
};
diff --git a/packages/locale/locales/de/erp.po b/packages/locale/locales/de/erp.po
index baa202762f..0c05630e90 100644
--- a/packages/locale/locales/de/erp.po
+++ b/packages/locale/locales/de/erp.po
@@ -1680,12 +1680,18 @@ msgstr "Verbrauchsmaterialien"
msgid "Consumed"
msgstr "Verbraucht"
+msgid "contact"
+msgstr ""
+
msgid "Contact"
msgstr "Kontakt"
msgid "Contact (optional)"
msgstr "Kontakt (optional)"
+msgid "contacts"
+msgstr ""
+
msgid "Contacts"
msgstr "Kontakte"
@@ -8000,6 +8006,12 @@ msgstr "Lieferantenteilnummer"
msgid "Supplier Parts"
msgstr "Lieferantenteile"
+msgid "supplier process"
+msgstr ""
+
+msgid "supplier processes"
+msgstr ""
+
msgid "Supplier Processes"
msgstr "Lieferantenprozesse"
diff --git a/packages/locale/locales/en/erp.po b/packages/locale/locales/en/erp.po
index e1a73e5079..eec2d96ef7 100644
--- a/packages/locale/locales/en/erp.po
+++ b/packages/locale/locales/en/erp.po
@@ -1680,12 +1680,18 @@ msgstr "Consumables"
msgid "Consumed"
msgstr "Consumed"
+msgid "contact"
+msgstr "contact"
+
msgid "Contact"
msgstr "Contact"
msgid "Contact (optional)"
msgstr "Contact (optional)"
+msgid "contacts"
+msgstr "contacts"
+
msgid "Contacts"
msgstr "Contacts"
@@ -8000,6 +8006,12 @@ msgstr "Supplier Part Number"
msgid "Supplier Parts"
msgstr "Supplier Parts"
+msgid "supplier process"
+msgstr "supplier process"
+
+msgid "supplier processes"
+msgstr "supplier processes"
+
msgid "Supplier Processes"
msgstr "Supplier Processes"
diff --git a/packages/locale/locales/es/erp.po b/packages/locale/locales/es/erp.po
index 524fa4a71e..ff7e522684 100644
--- a/packages/locale/locales/es/erp.po
+++ b/packages/locale/locales/es/erp.po
@@ -1680,12 +1680,18 @@ msgstr "Consumibles"
msgid "Consumed"
msgstr "Consumido"
+msgid "contact"
+msgstr ""
+
msgid "Contact"
msgstr "Contacto"
msgid "Contact (optional)"
msgstr "Contacto (opcional)"
+msgid "contacts"
+msgstr ""
+
msgid "Contacts"
msgstr "Contactos"
@@ -8000,6 +8006,12 @@ msgstr "Número de Parte del Proveedor"
msgid "Supplier Parts"
msgstr "Piezas del Proveedor"
+msgid "supplier process"
+msgstr ""
+
+msgid "supplier processes"
+msgstr ""
+
msgid "Supplier Processes"
msgstr "Procesos de Proveedor"
diff --git a/packages/locale/locales/fr/erp.po b/packages/locale/locales/fr/erp.po
index c3a8a6aa6d..bcfab45e15 100644
--- a/packages/locale/locales/fr/erp.po
+++ b/packages/locale/locales/fr/erp.po
@@ -1680,12 +1680,18 @@ msgstr "Consommables"
msgid "Consumed"
msgstr "Consommé"
+msgid "contact"
+msgstr ""
+
msgid "Contact"
msgstr "Contact"
msgid "Contact (optional)"
msgstr "Contact (facultatif)"
+msgid "contacts"
+msgstr ""
+
msgid "Contacts"
msgstr "Contacts"
@@ -8000,6 +8006,12 @@ msgstr "Numéro de pièce fournisseur"
msgid "Supplier Parts"
msgstr "Pièces du fournisseur"
+msgid "supplier process"
+msgstr ""
+
+msgid "supplier processes"
+msgstr ""
+
msgid "Supplier Processes"
msgstr "Processus Fournisseur"
diff --git a/packages/locale/locales/hi/erp.po b/packages/locale/locales/hi/erp.po
index fbf9e4e39d..fb4502f3ce 100644
--- a/packages/locale/locales/hi/erp.po
+++ b/packages/locale/locales/hi/erp.po
@@ -1680,12 +1680,18 @@ msgstr "उपभोग्य"
msgid "Consumed"
msgstr "उपभोग किया गया"
+msgid "contact"
+msgstr ""
+
msgid "Contact"
msgstr "संपर्क"
msgid "Contact (optional)"
msgstr "संपर्क (वैकल्पिक)"
+msgid "contacts"
+msgstr ""
+
msgid "Contacts"
msgstr "संपर्क"
@@ -8000,6 +8006,12 @@ msgstr "आपूर्तिकर्ता भाग संख्या"
msgid "Supplier Parts"
msgstr "आपूर्तिकर्ता पार्ट्स"
+msgid "supplier process"
+msgstr ""
+
+msgid "supplier processes"
+msgstr ""
+
msgid "Supplier Processes"
msgstr "आपूर्तिकर्ता प्रक्रियाएं"
diff --git a/packages/locale/locales/it/erp.po b/packages/locale/locales/it/erp.po
index 67383efea8..61167ca1cd 100644
--- a/packages/locale/locales/it/erp.po
+++ b/packages/locale/locales/it/erp.po
@@ -1680,12 +1680,18 @@ msgstr "Consumibili"
msgid "Consumed"
msgstr "Consumato"
+msgid "contact"
+msgstr ""
+
msgid "Contact"
msgstr "Contatto"
msgid "Contact (optional)"
msgstr "Contatto (facoltativo)"
+msgid "contacts"
+msgstr ""
+
msgid "Contacts"
msgstr "Contatti"
@@ -8000,6 +8006,12 @@ msgstr "Numero Parte Fornitore"
msgid "Supplier Parts"
msgstr "Parti Fornitore"
+msgid "supplier process"
+msgstr ""
+
+msgid "supplier processes"
+msgstr ""
+
msgid "Supplier Processes"
msgstr "Processi Fornitore"
diff --git a/packages/locale/locales/ja/erp.po b/packages/locale/locales/ja/erp.po
index 84a0d84019..433975419a 100644
--- a/packages/locale/locales/ja/erp.po
+++ b/packages/locale/locales/ja/erp.po
@@ -1680,12 +1680,18 @@ msgstr "消耗品"
msgid "Consumed"
msgstr "消費済み"
+msgid "contact"
+msgstr ""
+
msgid "Contact"
msgstr "連絡先"
msgid "Contact (optional)"
msgstr "連絡先(オプション)"
+msgid "contacts"
+msgstr ""
+
msgid "Contacts"
msgstr "連絡先"
@@ -8000,6 +8006,12 @@ msgstr "仕入先部品番号"
msgid "Supplier Parts"
msgstr "サプライヤー部品"
+msgid "supplier process"
+msgstr ""
+
+msgid "supplier processes"
+msgstr ""
+
msgid "Supplier Processes"
msgstr "サプライヤープロセス"
diff --git a/packages/locale/locales/pl/erp.po b/packages/locale/locales/pl/erp.po
index 0e5e914734..7cd086dfa1 100644
--- a/packages/locale/locales/pl/erp.po
+++ b/packages/locale/locales/pl/erp.po
@@ -1680,12 +1680,18 @@ msgstr "Materiały zużywalne"
msgid "Consumed"
msgstr "Zużyte"
+msgid "contact"
+msgstr ""
+
msgid "Contact"
msgstr "Kontakt"
msgid "Contact (optional)"
msgstr "Kontakt (opcjonalnie)"
+msgid "contacts"
+msgstr ""
+
msgid "Contacts"
msgstr "Kontakty"
@@ -8000,6 +8006,12 @@ msgstr "Numer części dostawcy"
msgid "Supplier Parts"
msgstr "Części dostawcy"
+msgid "supplier process"
+msgstr ""
+
+msgid "supplier processes"
+msgstr ""
+
msgid "Supplier Processes"
msgstr "Procesy dostawcy"
diff --git a/packages/locale/locales/pt/erp.po b/packages/locale/locales/pt/erp.po
index 9287878348..cb57ab9dd0 100644
--- a/packages/locale/locales/pt/erp.po
+++ b/packages/locale/locales/pt/erp.po
@@ -1680,12 +1680,18 @@ msgstr "Consumíveis"
msgid "Consumed"
msgstr "Consumido"
+msgid "contact"
+msgstr ""
+
msgid "Contact"
msgstr "Contacto"
msgid "Contact (optional)"
msgstr "Contacto (opcional)"
+msgid "contacts"
+msgstr ""
+
msgid "Contacts"
msgstr "Contactos"
@@ -8000,6 +8006,12 @@ msgstr "Número da Peça do Fornecedor"
msgid "Supplier Parts"
msgstr "Peças do Fornecedor"
+msgid "supplier process"
+msgstr ""
+
+msgid "supplier processes"
+msgstr ""
+
msgid "Supplier Processes"
msgstr "Processos do Fornecedor"
diff --git a/packages/locale/locales/ru/erp.po b/packages/locale/locales/ru/erp.po
index edcce11776..d0a0609747 100644
--- a/packages/locale/locales/ru/erp.po
+++ b/packages/locale/locales/ru/erp.po
@@ -1680,12 +1680,18 @@ msgstr "Расходные материалы"
msgid "Consumed"
msgstr "Потреблено"
+msgid "contact"
+msgstr ""
+
msgid "Contact"
msgstr "Контакт"
msgid "Contact (optional)"
msgstr "Контакт (опционально)"
+msgid "contacts"
+msgstr ""
+
msgid "Contacts"
msgstr "Контакты"
@@ -8000,6 +8006,12 @@ msgstr "Номер детали поставщика"
msgid "Supplier Parts"
msgstr "Детали поставщика"
+msgid "supplier process"
+msgstr ""
+
+msgid "supplier processes"
+msgstr ""
+
msgid "Supplier Processes"
msgstr "Процессы поставщика"
diff --git a/packages/locale/locales/tr/erp.po b/packages/locale/locales/tr/erp.po
index a42f0881e4..7d3dee5a34 100644
--- a/packages/locale/locales/tr/erp.po
+++ b/packages/locale/locales/tr/erp.po
@@ -1680,12 +1680,18 @@ msgstr "Sarflar"
msgid "Consumed"
msgstr "Tüketildi"
+msgid "contact"
+msgstr ""
+
msgid "Contact"
msgstr "İletişim"
msgid "Contact (optional)"
msgstr "İletişim (isteğe bağlı)"
+msgid "contacts"
+msgstr ""
+
msgid "Contacts"
msgstr "Kişiler"
@@ -8000,6 +8006,12 @@ msgstr "Tedarikçi Parça Numarası"
msgid "Supplier Parts"
msgstr "Tedarikçi Parçaları"
+msgid "supplier process"
+msgstr ""
+
+msgid "supplier processes"
+msgstr ""
+
msgid "Supplier Processes"
msgstr "Tedarikçi Süreçleri"
diff --git a/packages/locale/locales/zh/erp.po b/packages/locale/locales/zh/erp.po
index fc85145fc1..bdee496d30 100644
--- a/packages/locale/locales/zh/erp.po
+++ b/packages/locale/locales/zh/erp.po
@@ -1680,12 +1680,18 @@ msgstr "消耗品"
msgid "Consumed"
msgstr "已消耗"
+msgid "contact"
+msgstr ""
+
msgid "Contact"
msgstr "联系人"
msgid "Contact (optional)"
msgstr "联系人(可选)"
+msgid "contacts"
+msgstr ""
+
msgid "Contacts"
msgstr "联系人"
@@ -8000,6 +8006,12 @@ msgstr "供应商零件号"
msgid "Supplier Parts"
msgstr "供应商零件"
+msgid "supplier process"
+msgstr ""
+
+msgid "supplier processes"
+msgstr ""
+
msgid "Supplier Processes"
msgstr "供应商流程"