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.
TypeScript ai-agentsbill-of-materialserpinventory-managementleanmanufacturingmanufacturing-execution-systemmcp-servermesmrpopen-source-erppostgresqlproduction-planningqmsquality-management-systemreact-routerself-hostedsupabasetraceabilitytypescript
new popover design for empty message
aashuce5aa7d0d8af
diff --git a/apps/erp/app/components/Form/emptyStates.tsx b/apps/erp/app/components/Form/emptyStates.tsxindex 9354f2f4bc..405f364300 100644--- a/apps/erp/app/components/Form/emptyStates.tsx+++ b/apps/erp/app/components/Form/emptyStates.tsx@@ -1,6 +1,7 @@-import { FieldEmptyState } from "@carbon/form";+import { FieldEmptyState, fieldEmptyStateLinkClassName } from "@carbon/form";import { useLingui } from "@lingui/react/macro";import type { ReactNode } from "react";+import { Link } from "react-router";import { usePermissions } from "~/hooks";import { path } from "~/utils/path";@@ -304,22 +305,28 @@ export const useEmptyState = ();}+ const ctaLabel = t`Add your first ${copy.noun}`;+ const cta = opts?.onCreate ? (+ <button+ type="button"+ onClick={opts.onCreate}+ className={fieldEmptyStateLinkClassName}+ >+ {ctaLabel}+ </button>+ ) : (+ <Link to={copy.route} className={fieldEmptyStateLinkClassName}>+ {ctaLabel}+ </Link>+ );+return (<FieldEmptyStatetitle={t`No ${copy.pluralNoun} yet`}- description={t`Add your first ${copy.noun} so you can assign it here.`}- action={- opts?.onCreate- ? {- kind: "button",- onClick: opts.onCreate,- label: t`Add ${copy.noun}`- }- : {- kind: "link",- to: copy.route,- label: t`Add ${copy.noun}`- }+ description={+ <>+ {cta} {t`so you can assign it here.`}+ </>}/>);diff --git a/apps/erp/app/modules/items/ui/Item/ItemPurchasingForm.tsx b/apps/erp/app/modules/items/ui/Item/ItemPurchasingForm.tsxindex 15ca8f276e..7ff4947b1c 100644--- a/apps/erp/app/modules/items/ui/Item/ItemPurchasingForm.tsx+++ b/apps/erp/app/modules/items/ui/Item/ItemPurchasingForm.tsx@@ -1,4 +1,9 @@-import { FieldEmptyState, Select, ValidatedForm } from "@carbon/form";+import {+ FieldEmptyState,+ fieldEmptyStateLinkClassName,+ Select,+ ValidatedForm+} from "@carbon/form";import {Card,CardContent,@@ -8,7 +13,7 @@ import {} from "@carbon/react";import { Trans, useLingui } from "@lingui/react/macro";import { useState } from "react";-import { useParams } from "react-router";+import { Link, useParams } from "react-router";import type { z } from "zod";import {ConversionFactor,@@ -84,15 +89,12 @@ const ItemPurchasingForm = ({title={<Trans>No suppliers yet</Trans>}description={<Trans>- Add a supplier part for this item to set a preferred- supplier.+ <Link to="new" className={fieldEmptyStateLinkClassName}>+ Add a supplier part+ </Link>{" "}+ for this item to set a preferred supplier.</Trans>}- action={{- kind: "link",- to: "new",- label: <Trans>Add a supplier part</Trans>- }}/>}/>diff --git a/packages/form/src/components/Combobox.tsx b/packages/form/src/components/Combobox.tsxindex 2947d2b825..4e4ece40f6 100644--- a/packages/form/src/components/Combobox.tsx+++ b/packages/form/src/components/Combobox.tsx@@ -84,24 +84,21 @@ const Combobox = ({id={name}value={value}/>- {emptyMessage && (props.options?.length ?? 0) === 0 && !isLoading ? (- emptyMessage- ) : (- <ComboboxBase- {...props}- value={value}- onChange={(newValue) => {- flushSync(() => {- setValue(newValue?.replace(/"/g, '\\"') ?? "");- });- onChange(newValue?.replace(/"/g, '\\"') ?? "");- }}- isClearable={resolvedIsOptional && !isReadOnly}- isReadOnly={isReadOnly}- isLoading={isLoading}- className="w-full"- />- )}+ <ComboboxBase+ {...props}+ value={value}+ onChange={(newValue) => {+ flushSync(() => {+ setValue(newValue?.replace(/"/g, '\\"') ?? "");+ });+ onChange(newValue?.replace(/"/g, '\\"') ?? "");+ }}+ isClearable={resolvedIsOptional && !isReadOnly}+ isReadOnly={isReadOnly}+ isLoading={isLoading}+ emptyMessage={isLoading ? undefined : emptyMessage}+ className="w-full"+ />{error ? (<FormErrorMessage>{error}</FormErrorMessage>) : (diff --git a/packages/form/src/components/CreatableCombobox.tsx b/packages/form/src/components/CreatableCombobox.tsxindex 9df451efc6..af73f0c78f 100644--- a/packages/form/src/components/CreatableCombobox.tsx+++ b/packages/form/src/components/CreatableCombobox.tsx@@ -113,25 +113,22 @@ const CreatableCombobox = forwardRef<HTMLButtonElement, CreatableComboboxProps>(name={name}id={name}/>- {emptyMessage && (props.options?.length ?? 0) === 0 ? (- emptyMessage- ) : (- <CreatableComboboxBase- ref={ref}- {...props}- value={value?.replace(/"/g, '\\"')}- isClearable={isClearable ?? (resolvedIsOptional && !isReadOnly)}- isReadOnly={isReadOnly}- label={label}- className="w-full"- onChange={(newValue) => {- flushSync(() => {- setValue(newValue?.replace(/"/g, '\\"') ?? "");- });- onChange(newValue?.replace(/"/g, '\\"') ?? "");- }}- />- )}+ <CreatableComboboxBase+ ref={ref}+ {...props}+ value={value?.replace(/"/g, '\\"')}+ isClearable={isClearable ?? (resolvedIsOptional && !isReadOnly)}+ isReadOnly={isReadOnly}+ label={label}+ emptyMessage={emptyMessage}+ className="w-full"+ onChange={(newValue) => {+ flushSync(() => {+ setValue(newValue?.replace(/"/g, '\\"') ?? "");+ });+ onChange(newValue?.replace(/"/g, '\\"') ?? "");+ }}+ />{error ? (<FormErrorMessage>{error}</FormErrorMessage>) : (diff --git a/packages/form/src/components/CreatableMultiSelect.tsx b/packages/form/src/components/CreatableMultiSelect.tsxindex 95aa5acbf2..8478b827dc 100644--- a/packages/form/src/components/CreatableMultiSelect.tsx+++ b/packages/form/src/components/CreatableMultiSelect.tsx@@ -95,23 +95,20 @@ const CreatableMultiSelect = forwardRef<value={selection}/>))}- {emptyMessage && options.length === 0 ? (- emptyMessage- ) : (- <CreatableMultiSelectBase- ref={ref}- {...props}- options={sortedOptions}- value={value ?? []}- onChange={(newValue) => {- setValue(newValue ?? []);- onChange(newValue ?? []);- }}- isReadOnly={isReadOnly}- label={label}- className="w-full"- />- )}+ <CreatableMultiSelectBase+ ref={ref}+ {...props}+ options={sortedOptions}+ value={value ?? []}+ onChange={(newValue) => {+ setValue(newValue ?? []);+ onChange(newValue ?? []);+ }}+ isReadOnly={isReadOnly}+ label={label}+ emptyMessage={emptyMessage}+ className="w-full"+ />{error ? (<FormErrorMessage>{error}</FormErrorMessage>diff --git a/packages/form/src/components/FieldEmptyState.tsx b/packages/form/src/components/FieldEmptyState.tsxindex 6f4a2b8ff5..28554c0c3f 100644--- a/packages/form/src/components/FieldEmptyState.tsx+++ b/packages/form/src/components/FieldEmptyState.tsx@@ -1,26 +1,19 @@-import { Button, cn } from "@carbon/react";+import { cn } from "@carbon/react";import type { ReactNode } from "react";-import { Link } from "react-router";--type FieldEmptyStateAction =- | { kind: "link"; to: string; label: ReactNode }- | { kind: "button"; onClick: () => void; label: ReactNode };export type FieldEmptyStateProps = {title: ReactNode;description: ReactNode;- action?: FieldEmptyStateAction;icon?: ReactNode;className?: string;};-const linkClassName =+export const fieldEmptyStateLinkClassName ="text-primary font-medium underline decoration-dashed underline-offset-4 hover:decoration-solid";const FieldEmptyState = ({title,description,- action,icon,className}: FieldEmptyStateProps) => {@@ -36,21 +29,6 @@ const FieldEmptyState = ({<p className="text-xs text-muted-foreground max-w-[240px] leading-relaxed">{description}</p>- {action?.kind === "link" && (- <Link to={action.to} className={cn(linkClassName, "mt-2 text-xs")}>- {action.label}- </Link>- )}- {action?.kind === "button" && (- <Button- variant="primary"- size="sm"- className="mt-2"- onClick={action.onClick}- >- {action.label}- </Button>- )}</div>);};diff --git a/packages/form/src/components/MultiSelect.tsx b/packages/form/src/components/MultiSelect.tsxindex f3373bff4d..7cc48b35b8 100644--- a/packages/form/src/components/MultiSelect.tsx+++ b/packages/form/src/components/MultiSelect.tsx@@ -104,21 +104,18 @@ const MultiSelect = ({/>))}- {emptyMessage && (props.options?.length ?? 0) === 0 ? (- emptyMessage- ) : (- <MultiSelectBase- {...props}- value={(value ?? []).filter(Boolean)}- inline={props.inline ? MultiSelectPreview : undefined}- onChange={(newValue) => {- setValue(newValue ?? []);- onChange(newValue ?? []);- }}- isReadOnly={isReadOnly}- className="w-full"- />- )}+ <MultiSelectBase+ {...props}+ value={(value ?? []).filter(Boolean)}+ inline={props.inline ? MultiSelectPreview : undefined}+ onChange={(newValue) => {+ setValue(newValue ?? []);+ onChange(newValue ?? []);+ }}+ isReadOnly={isReadOnly}+ emptyMessage={emptyMessage}+ className="w-full"+ />{error ? (<FormErrorMessage>{error}</FormErrorMessage>diff --git a/packages/form/src/components/Select.tsx b/packages/form/src/components/Select.tsxindex 86cd06dd03..2dae6bb50a 100644--- a/packages/form/src/components/Select.tsx+++ b/packages/form/src/components/Select.tsx@@ -98,24 +98,21 @@ const Select = ({id={name}value={value ?? undefined}/>- {emptyMessage && options.length === 0 && !isLoading ? (- emptyMessage- ) : (- <SelectBase- {...props}- options={options}- value={value}- onChange={(newValue) => {- setValue(newValue ?? "");- onChange(newValue ?? "");- }}- isClearable={resolvedIsOptional && !isReadOnly}- isDisabled={isDisabled}- isReadOnly={isReadOnly}- isLoading={isLoading}- className="w-full"- />- )}+ <SelectBase+ {...props}+ options={options}+ value={value}+ onChange={(newValue) => {+ setValue(newValue ?? "");+ onChange(newValue ?? "");+ }}+ isClearable={resolvedIsOptional && !isReadOnly}+ isDisabled={isDisabled}+ isReadOnly={isReadOnly}+ isLoading={isLoading}+ emptyMessage={isLoading ? undefined : emptyMessage}+ className="w-full"+ />{error ? (<FormErrorMessage>{error}</FormErrorMessage>diff --git a/packages/form/src/components/index.ts b/packages/form/src/components/index.tsindex 25ae94ebe1..9dad70addb 100644--- a/packages/form/src/components/index.ts+++ b/packages/form/src/components/index.ts@@ -13,7 +13,9 @@ import CreatableMultiSelect from "./CreatableMultiSelect";import DatePicker from "./DatePicker";import DateTimePicker from "./DateTimePicker";import type { FieldEmptyStateProps } from "./FieldEmptyState";-import FieldEmptyState from "./FieldEmptyState";+import FieldEmptyState, {+ fieldEmptyStateLinkClassName+} from "./FieldEmptyState";import Hidden from "./Hidden";import Input from "./Input";import InputControlled from "./InputControlled";@@ -47,6 +49,7 @@ export {DateTimePicker,DefaultDisabledSubmit,FieldEmptyState,+ fieldEmptyStateLinkClassName,Hidden,Input,InputControlled,diff --git a/packages/locale/locales/de/erp.po b/packages/locale/locales/de/erp.poindex 8fb00729a8..baa202762f 100644--- a/packages/locale/locales/de/erp.po+++ b/packages/locale/locales/de/erp.po@@ -70,6 +70,9 @@ msgstr "/Monat/Benutzer"msgid "+{0} more"msgstr "+{0} weitere"+msgid "<0>Add a supplier part</0> for this item to set a preferred supplier."+msgstr ""+msgid "0-4 weeks"msgstr ""@@ -283,10 +286,6 @@ msgstr "Tatsächlicher Start"msgid "Add"msgstr "Hinzufügen"-#. placeholder {0}: copy.noun-msgid "Add {0}"-msgstr ""-msgid "Add & Issue"msgstr "Hinzufügen & Ausgeben"@@ -299,12 +298,6 @@ msgstr "Einen Kommentar hinzufügen..."msgid "Add a printer in the printing settings to print labels directly."msgstr "Fügen Sie einen Drucker in den Druckeinstellungen hinzu, um Etiketten direkt zu drucken."-msgid "Add a supplier part"-msgstr ""--msgid "Add a supplier part for this item to set a preferred supplier."-msgstr ""-msgid "Add Actions"msgstr "Aktionen hinzufügen"@@ -423,7 +416,7 @@ msgid "Add to stock for future use"msgstr "Zum zukünftigen Gebrauch in den Bestand aufnehmen"#. placeholder {0}: copy.noun-msgid "Add your first {0} so you can assign it here."+msgid "Add your first {0}"msgstr ""msgid "Add-On"@@ -7688,6 +7681,9 @@ msgstr "Geplante Wartung an Betriebsfeiertagen überspringen"msgid "Skipped"msgstr "Übersprungen"+msgid "so you can assign it here."+msgstr ""+msgid "Something went wrong"msgstr ""diff --git a/packages/locale/locales/en/erp.po b/packages/locale/locales/en/erp.poindex cca67f4ac0..e1a73e5079 100644--- a/packages/locale/locales/en/erp.po+++ b/packages/locale/locales/en/erp.po@@ -70,6 +70,9 @@ msgstr "/month/user"msgid "+{0} more"msgstr "+{0} more"+msgid "<0>Add a supplier part</0> for this item to set a preferred supplier."+msgstr "<0>Add a supplier part</0> for this item to set a preferred supplier."+msgid "0-4 weeks"msgstr "0-4 weeks"@@ -283,10 +286,6 @@ msgstr "Actual Start"msgid "Add"msgstr "Add"-#. placeholder {0}: copy.noun-msgid "Add {0}"-msgstr "Add {0}"-msgid "Add & Issue"msgstr "Add & Issue"@@ -299,12 +298,6 @@ msgstr "Add a comment..."msgid "Add a printer in the printing settings to print labels directly."msgstr "Add a printer in the printing settings to print labels directly."-msgid "Add a supplier part"-msgstr "Add a supplier part"--msgid "Add a supplier part for this item to set a preferred supplier."-msgstr "Add a supplier part for this item to set a preferred supplier."-msgid "Add Actions"msgstr "Add Actions"@@ -423,8 +416,8 @@ msgid "Add to stock for future use"msgstr "Add to stock for future use"#. placeholder {0}: copy.noun-msgid "Add your first {0} so you can assign it here."-msgstr "Add your first {0} so you can assign it here."+msgid "Add your first {0}"+msgstr "Add your first {0}"msgid "Add-On"msgstr "Add-On"@@ -7688,6 +7681,9 @@ msgstr "Skip scheduled maintenance on company holidays"msgid "Skipped"msgstr "Skipped"+msgid "so you can assign it here."+msgstr "so you can assign it here."+msgid "Something went wrong"msgstr "Something went wrong"diff --git a/packages/locale/locales/es/erp.po b/packages/locale/locales/es/erp.poindex 7e122d364b..524fa4a71e 100644--- a/packages/locale/locales/es/erp.po+++ b/packages/locale/locales/es/erp.po@@ -70,6 +70,9 @@ msgstr "/mes/usuario"msgid "+{0} more"msgstr "+{0} más"+msgid "<0>Add a supplier part</0> for this item to set a preferred supplier."+msgstr ""+msgid "0-4 weeks"msgstr ""@@ -283,10 +286,6 @@ msgstr "Inicio Real"msgid "Add"msgstr "Agregar"-#. placeholder {0}: copy.noun-msgid "Add {0}"-msgstr ""-msgid "Add & Issue"msgstr "Agregar y Emitir"@@ -299,12 +298,6 @@ msgstr "Añade un comentario..."msgid "Add a printer in the printing settings to print labels directly."msgstr "Añade una impresora en la configuración de impresión para imprimir etiquetas directamente."-msgid "Add a supplier part"-msgstr ""--msgid "Add a supplier part for this item to set a preferred supplier."-msgstr ""-msgid "Add Actions"msgstr "Agregar Acciones"@@ -423,7 +416,7 @@ msgid "Add to stock for future use"msgstr "Agregar al inventario para uso futuro"#. placeholder {0}: copy.noun-msgid "Add your first {0} so you can assign it here."+msgid "Add your first {0}"msgstr ""msgid "Add-On"@@ -7688,6 +7681,9 @@ msgstr "Omitir mantenimiento programado en días festivos de la empresa"msgid "Skipped"msgstr "Omitido"+msgid "so you can assign it here."+msgstr ""+msgid "Something went wrong"msgstr ""diff --git a/packages/locale/locales/fr/erp.po b/packages/locale/locales/fr/erp.poindex 60a72c29eb..c3a8a6aa6d 100644--- a/packages/locale/locales/fr/erp.po+++ b/packages/locale/locales/fr/erp.po@@ -70,6 +70,9 @@ msgstr "/mois/utilisateur"msgid "+{0} more"msgstr "+{0} de plus"+msgid "<0>Add a supplier part</0> for this item to set a preferred supplier."+msgstr ""+msgid "0-4 weeks"msgstr ""@@ -283,10 +286,6 @@ msgstr "Début réel"msgid "Add"msgstr "Ajouter"-#. placeholder {0}: copy.noun-msgid "Add {0}"-msgstr ""-msgid "Add & Issue"msgstr "Ajouter et émettre"@@ -299,12 +298,6 @@ msgstr "Ajouter un commentaire..."msgid "Add a printer in the printing settings to print labels directly."msgstr "Ajoutez une imprimante dans les paramètres d'impression pour imprimer les étiquettes directement."-msgid "Add a supplier part"-msgstr ""--msgid "Add a supplier part for this item to set a preferred supplier."-msgstr ""-msgid "Add Actions"msgstr "Ajouter des actions"@@ -423,7 +416,7 @@ msgid "Add to stock for future use"msgstr "Ajouter au stock pour utilisation future"#. placeholder {0}: copy.noun-msgid "Add your first {0} so you can assign it here."+msgid "Add your first {0}"msgstr ""msgid "Add-On"@@ -7688,6 +7681,9 @@ msgstr "Ignorer la maintenance programmée lors des jours fériés de l'entreprimsgid "Skipped"msgstr "Ignoré"+msgid "so you can assign it here."+msgstr ""+msgid "Something went wrong"msgstr ""diff --git a/packages/locale/locales/hi/erp.po b/packages/locale/locales/hi/erp.poindex 63d4c4c429..fbf9e4e39d 100644--- a/packages/locale/locales/hi/erp.po+++ b/packages/locale/locales/hi/erp.po@@ -70,6 +70,9 @@ msgstr "/माह/उपयोगकर्ता"msgid "+{0} more"msgstr "+{0} और"+msgid "<0>Add a supplier part</0> for this item to set a preferred supplier."+msgstr ""+msgid "0-4 weeks"msgstr ""@@ -283,10 +286,6 @@ msgstr "वास्तविक शुरुआत"msgid "Add"msgstr "जोड़ें"-#. placeholder {0}: copy.noun-msgid "Add {0}"-msgstr ""-msgid "Add & Issue"msgstr "जोड़ें और जारी करें"@@ -299,12 +298,6 @@ msgstr "एक टिप्पणी जोड़ें..."msgid "Add a printer in the printing settings to print labels directly."msgstr "प्रिंटिंग सेटिंग्स में एक प्रिंटर जोड़ें ताकि लेबल सीधे प्रिंट कर सकें।"-msgid "Add a supplier part"-msgstr ""--msgid "Add a supplier part for this item to set a preferred supplier."-msgstr ""-msgid "Add Actions"msgstr "कार्य जोड़ें"@@ -423,7 +416,7 @@ msgid "Add to stock for future use"msgstr "भविष्य के उपयोग के लिए स्टॉक में जोड़ें"#. placeholder {0}: copy.noun-msgid "Add your first {0} so you can assign it here."+msgid "Add your first {0}"msgstr ""msgid "Add-On"@@ -7688,6 +7681,9 @@ msgstr "कंपनी की छुट्टियों पर निर्msgid "Skipped"msgstr "छोड़ा गया"+msgid "so you can assign it here."+msgstr ""+msgid "Something went wrong"msgstr ""diff --git a/packages/locale/locales/it/erp.po b/packages/locale/locales/it/erp.poindex 5d0a47fd71..67383efea8 100644--- a/packages/locale/locales/it/erp.po+++ b/packages/locale/locales/it/erp.po@@ -70,6 +70,9 @@ msgstr "/mese/utente"msgid "+{0} more"msgstr "+{0} altri"+msgid "<0>Add a supplier part</0> for this item to set a preferred supplier."+msgstr ""+msgid "0-4 weeks"msgstr ""@@ -283,10 +286,6 @@ msgstr "Inizio Effettivo"msgid "Add"msgstr "Aggiungi"-#. placeholder {0}: copy.noun-msgid "Add {0}"-msgstr ""-msgid "Add & Issue"msgstr "Aggiungi e Emetti"@@ -299,12 +298,6 @@ msgstr "Aggiungi un commento..."msgid "Add a printer in the printing settings to print labels directly."msgstr "Aggiungi una stampante nelle impostazioni di stampa per stampare le etichette direttamente."-msgid "Add a supplier part"-msgstr ""--msgid "Add a supplier part for this item to set a preferred supplier."-msgstr ""-msgid "Add Actions"msgstr "Aggiungi Azioni"@@ -423,7 +416,7 @@ msgid "Add to stock for future use"msgstr "Aggiungi alle scorte per uso futuro"#. placeholder {0}: copy.noun-msgid "Add your first {0} so you can assign it here."+msgid "Add your first {0}"msgstr ""msgid "Add-On"@@ -7688,6 +7681,9 @@ msgstr "Salta la manutenzione programmata durante le festività aziendali"msgid "Skipped"msgstr "Saltato"+msgid "so you can assign it here."+msgstr ""+msgid "Something went wrong"msgstr ""diff --git a/packages/locale/locales/ja/erp.po b/packages/locale/locales/ja/erp.poindex 0e843f7c11..84a0d84019 100644--- a/packages/locale/locales/ja/erp.po+++ b/packages/locale/locales/ja/erp.po@@ -70,6 +70,9 @@ msgstr "/月/ユーザー"msgid "+{0} more"msgstr "+{0} 件以上"+msgid "<0>Add a supplier part</0> for this item to set a preferred supplier."+msgstr ""+msgid "0-4 weeks"msgstr ""@@ -283,10 +286,6 @@ msgstr "実際の開始"msgid "Add"msgstr "追加"-#. placeholder {0}: copy.noun-msgid "Add {0}"-msgstr ""-msgid "Add & Issue"msgstr "追加して発行"@@ -299,12 +298,6 @@ msgstr "コメントを追加..."msgid "Add a printer in the printing settings to print labels directly."msgstr "プリンター設定にプリンターを追加して、ラベルを直接印刷します。"-msgid "Add a supplier part"-msgstr ""--msgid "Add a supplier part for this item to set a preferred supplier."-msgstr ""-msgid "Add Actions"msgstr "アクションを追加"@@ -423,7 +416,7 @@ msgid "Add to stock for future use"msgstr "将来の使用のためにストックに追加"#. placeholder {0}: copy.noun-msgid "Add your first {0} so you can assign it here."+msgid "Add your first {0}"msgstr ""msgid "Add-On"@@ -7688,6 +7681,9 @@ msgstr "会社の祝日に予定されたメンテナンスをスキップするmsgid "Skipped"msgstr "スキップ"+msgid "so you can assign it here."+msgstr ""+msgid "Something went wrong"msgstr ""diff --git a/packages/locale/locales/pl/erp.po b/packages/locale/locales/pl/erp.poindex 61804f71e3..0e5e914734 100644--- a/packages/locale/locales/pl/erp.po+++ b/packages/locale/locales/pl/erp.po@@ -70,6 +70,9 @@ msgstr "/miesiąc/użytkownik"msgid "+{0} more"msgstr "+{0} więcej"+msgid "<0>Add a supplier part</0> for this item to set a preferred supplier."+msgstr ""+msgid "0-4 weeks"msgstr ""@@ -283,10 +286,6 @@ msgstr "Rzeczywisty początek"msgid "Add"msgstr "Dodaj"-#. placeholder {0}: copy.noun-msgid "Add {0}"-msgstr ""-msgid "Add & Issue"msgstr "Dodaj i wydaj"@@ -299,12 +298,6 @@ msgstr "Dodaj komentarz..."msgid "Add a printer in the printing settings to print labels directly."msgstr "Dodaj drukarkę w ustawieniach drukowania, aby drukować etykiety bezpośrednio."-msgid "Add a supplier part"-msgstr ""--msgid "Add a supplier part for this item to set a preferred supplier."-msgstr ""-msgid "Add Actions"msgstr "Dodaj Działania"@@ -423,7 +416,7 @@ msgid "Add to stock for future use"msgstr "Dodaj do zapasów do przyszłego użytku"#. placeholder {0}: copy.noun-msgid "Add your first {0} so you can assign it here."+msgid "Add your first {0}"msgstr ""msgid "Add-On"@@ -7688,6 +7681,9 @@ msgstr "Pomiń zaplanowaną konserwację w dni świąt firmowych"msgid "Skipped"msgstr "Pominięte"+msgid "so you can assign it here."+msgstr ""+msgid "Something went wrong"msgstr ""diff --git a/packages/locale/locales/pt/erp.po b/packages/locale/locales/pt/erp.poindex dfb917b1c8..9287878348 100644--- a/packages/locale/locales/pt/erp.po+++ b/packages/locale/locales/pt/erp.po@@ -70,6 +70,9 @@ msgstr "/mês/utilizador"msgid "+{0} more"msgstr "+{0} mais"+msgid "<0>Add a supplier part</0> for this item to set a preferred supplier."+msgstr ""+msgid "0-4 weeks"msgstr ""@@ -283,10 +286,6 @@ msgstr "Início Real"msgid "Add"msgstr "Adicionar"-#. placeholder {0}: copy.noun-msgid "Add {0}"-msgstr ""-msgid "Add & Issue"msgstr "Adicionar e Emitir"@@ -299,12 +298,6 @@ msgstr "Adicione um comentário..."msgid "Add a printer in the printing settings to print labels directly."msgstr "Adicione uma impressora nas configurações de impressão para imprimir etiquetas diretamente."-msgid "Add a supplier part"-msgstr ""--msgid "Add a supplier part for this item to set a preferred supplier."-msgstr ""-msgid "Add Actions"msgstr "Adicionar Ações"@@ -423,7 +416,7 @@ msgid "Add to stock for future use"msgstr "Adicionar ao estoque para uso futuro"#. placeholder {0}: copy.noun-msgid "Add your first {0} so you can assign it here."+msgid "Add your first {0}"msgstr ""msgid "Add-On"@@ -7688,6 +7681,9 @@ msgstr "Ignorar manutenção programada em feriados da empresa"msgid "Skipped"msgstr "Ignorado"+msgid "so you can assign it here."+msgstr ""+msgid "Something went wrong"msgstr ""diff --git a/packages/locale/locales/ru/erp.po b/packages/locale/locales/ru/erp.poindex 2fa9349552..edcce11776 100644--- a/packages/locale/locales/ru/erp.po+++ b/packages/locale/locales/ru/erp.po@@ -70,6 +70,9 @@ msgstr "/месяц/пользователь"msgid "+{0} more"msgstr "+{0} ещё"+msgid "<0>Add a supplier part</0> for this item to set a preferred supplier."+msgstr ""+msgid "0-4 weeks"msgstr ""@@ -283,10 +286,6 @@ msgstr "Фактическое начало"msgid "Add"msgstr "Добавить"-#. placeholder {0}: copy.noun-msgid "Add {0}"-msgstr ""-msgid "Add & Issue"msgstr "Добавить и выдать"@@ -299,12 +298,6 @@ msgstr "Добавить комментарий..."msgid "Add a printer in the printing settings to print labels directly."msgstr "Добавьте принтер в параметры печати, чтобы печатать этикетки напрямую."-msgid "Add a supplier part"-msgstr ""--msgid "Add a supplier part for this item to set a preferred supplier."-msgstr ""-msgid "Add Actions"msgstr "Добавить действия"@@ -423,7 +416,7 @@ msgid "Add to stock for future use"msgstr "Добавить в запас для будущего использования"#. placeholder {0}: copy.noun-msgid "Add your first {0} so you can assign it here."+msgid "Add your first {0}"msgstr ""msgid "Add-On"@@ -7688,6 +7681,9 @@ msgstr "Пропускать запланированное техническоmsgid "Skipped"msgstr "Пропущено"+msgid "so you can assign it here."+msgstr ""+msgid "Something went wrong"msgstr ""diff --git a/packages/locale/locales/tr/erp.po b/packages/locale/locales/tr/erp.poindex ee0801e636..a42f0881e4 100644--- a/packages/locale/locales/tr/erp.po+++ b/packages/locale/locales/tr/erp.po@@ -70,6 +70,9 @@ msgstr "/ay/kullanıcı"msgid "+{0} more"msgstr "+{0} daha fazla"+msgid "<0>Add a supplier part</0> for this item to set a preferred supplier."+msgstr ""+msgid "0-4 weeks"msgstr "0-4 hafta"@@ -283,10 +286,6 @@ msgstr "Gerçek Başlangıç"msgid "Add"msgstr "Ekle"-#. placeholder {0}: copy.noun-msgid "Add {0}"-msgstr ""-msgid "Add & Issue"msgstr "Ekle ve Çıkış Yap"@@ -299,12 +298,6 @@ msgstr "Bir yorum ekle..."msgid "Add a printer in the printing settings to print labels directly."msgstr "Etiketleri doğrudan yazdırmak için yazdırma ayarlarında bir yazıcı ekleyin."-msgid "Add a supplier part"-msgstr ""--msgid "Add a supplier part for this item to set a preferred supplier."-msgstr ""-msgid "Add Actions"msgstr "Eylemler Ekle"@@ -423,7 +416,7 @@ msgid "Add to stock for future use"msgstr "Gelecekteki kullanım için stoğa ekle"#. placeholder {0}: copy.noun-msgid "Add your first {0} so you can assign it here."+msgid "Add your first {0}"msgstr ""msgid "Add-On"@@ -7688,6 +7681,9 @@ msgstr "Şirket tatillerinde planlanmış bakımı atla"msgid "Skipped"msgstr "Atlanmış"+msgid "so you can assign it here."+msgstr ""+msgid "Something went wrong"msgstr "Bir şeyler yanlış gitti"diff --git a/packages/locale/locales/zh/erp.po b/packages/locale/locales/zh/erp.poindex a63fe0f19a..fc85145fc1 100644--- a/packages/locale/locales/zh/erp.po+++ b/packages/locale/locales/zh/erp.po@@ -70,6 +70,9 @@ msgstr "/月/用户"msgid "+{0} more"msgstr "+{0} 更多"+msgid "<0>Add a supplier part</0> for this item to set a preferred supplier."+msgstr ""+msgid "0-4 weeks"msgstr ""@@ -283,10 +286,6 @@ msgstr "实际开始"msgid "Add"msgstr "添加"-#. placeholder {0}: copy.noun-msgid "Add {0}"-msgstr ""-msgid "Add & Issue"msgstr "添加并发放"@@ -299,12 +298,6 @@ msgstr "添加评论..."msgid "Add a printer in the printing settings to print labels directly."msgstr "在打印设置中添加打印机以直接打印标签。"-msgid "Add a supplier part"-msgstr ""--msgid "Add a supplier part for this item to set a preferred supplier."-msgstr ""-msgid "Add Actions"msgstr "添加操作"@@ -423,7 +416,7 @@ msgid "Add to stock for future use"msgstr "添加到库存以供将来使用"#. placeholder {0}: copy.noun-msgid "Add your first {0} so you can assign it here."+msgid "Add your first {0}"msgstr ""msgid "Add-On"@@ -7688,6 +7681,9 @@ msgstr "跳过公司假期的计划维护"msgid "Skipped"msgstr "已跳过"+msgid "so you can assign it here."+msgstr ""+msgid "Something went wrong"msgstr ""diff --git a/packages/react/src/Combobox.tsx b/packages/react/src/Combobox.tsxindex 5fe93b4656..fee342267f 100644--- a/packages/react/src/Combobox.tsx+++ b/packages/react/src/Combobox.tsx@@ -1,6 +1,6 @@import { useLingui } from "@lingui/react/macro";import { useVirtualizer } from "@tanstack/react-virtual";-import type { ComponentPropsWithoutRef } from "react";+import type { ComponentPropsWithoutRef, ReactNode } from "react";import { forwardRef, useMemo, useRef, useState } from "react";import { LuCheck, LuPlus, LuSettings2, LuX } from "react-icons/lu";import {@@ -36,6 +36,7 @@ export type ComboboxProps = Omit<isLoading?: boolean;isReadOnly?: boolean;placeholder?: string;+ emptyMessage?: ReactNode;onChange?: (selected: string) => void;inline?: (value: string,@@ -55,6 +56,7 @@ const Combobox = forwardRef<HTMLButtonElement, ComboboxProps>(isLoading,isReadOnly,placeholder,+ emptyMessage,onChange,inline,itemHeight = 40,@@ -163,13 +165,17 @@ const Combobox = forwardRef<HTMLButtonElement, ComboboxProps>(: "var(--radix-popover-trigger-width)"}}>- <VirtualizedCommand- options={options}- value={value}- onChange={onChange}- itemHeight={itemHeight}- setOpen={setOpen}- />+ {emptyMessage && options.length === 0 ? (+ emptyMessage+ ) : (+ <VirtualizedCommand+ options={options}+ value={value}+ onChange={onChange}+ itemHeight={itemHeight}+ setOpen={setOpen}+ />+ )}</PopoverContent></Popover>{isClearable && !isReadOnly && value && (diff --git a/packages/react/src/CreateableCombobox.tsx b/packages/react/src/CreateableCombobox.tsxindex 6a2f36a400..485d8d673c 100644--- a/packages/react/src/CreateableCombobox.tsx+++ b/packages/react/src/CreateableCombobox.tsx@@ -1,6 +1,6 @@import { useLingui } from "@lingui/react/macro";import { useVirtualizer } from "@tanstack/react-virtual";-import type { ComponentPropsWithoutRef } from "react";+import type { ComponentPropsWithoutRef, ReactNode } from "react";import { forwardRef, useMemo, useRef, useState } from "react";import { LuCheck, LuPlus, LuSettings2, LuX } from "react-icons/lu";import {@@ -34,6 +34,7 @@ export type CreatableComboboxProps = Omit<isReadOnly?: boolean;label?: string;placeholder?: string;+ emptyMessage?: ReactNode;inline?: (value: string,options: { value: string; label: string | JSX.Element; helper?: string }[]@@ -54,6 +55,7 @@ const CreatableCombobox = forwardRef<HTMLButtonElement, CreatableComboboxProps>(isClearable,isReadOnly,placeholder,+ emptyMessage,onChange,label,itemHeight = 40,@@ -171,18 +173,22 @@ const CreatableCombobox = forwardRef<HTMLButtonElement, CreatableComboboxProps>(: "var(--radix-popover-trigger-width)"}}>- <VirtualizedCommand- label={label}- options={options}- selected={selected}- value={value}- itemHeight={itemHeight}- search={search}- onChange={onChange}- onCreateOption={onCreateOption}- setOpen={setOpen}- setSearch={setSearch}- />+ {emptyMessage && options.length === 0 ? (+ emptyMessage+ ) : (+ <VirtualizedCommand+ label={label}+ options={options}+ selected={selected}+ value={value}+ itemHeight={itemHeight}+ search={search}+ onChange={onChange}+ onCreateOption={onCreateOption}+ setOpen={setOpen}+ setSearch={setSearch}+ />+ )}</PopoverContent></Popover>{isClearable && !isReadOnly && value && (diff --git a/packages/react/src/CreateableMultiSelect.tsx b/packages/react/src/CreateableMultiSelect.tsxindex 8851b05573..baead492f0 100644--- a/packages/react/src/CreateableMultiSelect.tsx+++ b/packages/react/src/CreateableMultiSelect.tsx@@ -1,7 +1,7 @@import { useLingui } from "@lingui/react/macro";import { useVirtualizer } from "@tanstack/react-virtual";import { CommandEmpty } from "cmdk";-import type { ComponentPropsWithoutRef } from "react";+import type { ComponentPropsWithoutRef, ReactNode } from "react";import { forwardRef, useId, useMemo, useRef, useState } from "react";import { FaRegSquare, FaSquareCheck } from "react-icons/fa6";import { LuCirclePlus, LuSettings2 } from "react-icons/lu";@@ -38,6 +38,7 @@ export type CreatableMultiSelectProps = Omit<label?: string;createLabel?: string;placeholder?: string;+ emptyMessage?: ReactNode;maxPreview?: number;itemHeight?: number;showCreateOptionOnEmpty?: boolean;@@ -63,6 +64,7 @@ const CreatableMultiSelect = forwardRef<selected,isReadOnly,placeholder,+ emptyMessage,label,createLabel,className,@@ -194,19 +196,23 @@ const CreatableMultiSelect = forwardRef<: "var(--radix-popover-trigger-width)"}}>- <VirtualizedCommand- options={options}- selected={value}- onChange={onChange}- onCreateOption={onCreateOption}- itemHeight={itemHeight}- setOpen={setOpen}- label={label}- createLabel={createLabel}- search={search}- setSearch={setSearch}- showCreateOptionOnEmpty={showCreateOptionOnEmpty}- />+ {emptyMessage && options.length === 0 ? (+ emptyMessage+ ) : (+ <VirtualizedCommand+ options={options}+ selected={value}+ onChange={onChange}+ onCreateOption={onCreateOption}+ itemHeight={itemHeight}+ setOpen={setOpen}+ label={label}+ createLabel={createLabel}+ search={search}+ setSearch={setSearch}+ showCreateOptionOnEmpty={showCreateOptionOnEmpty}+ />+ )}</PopoverContent></Popover></HStack>diff --git a/packages/react/src/MultiSelect.tsx b/packages/react/src/MultiSelect.tsxindex 7778f0aa1e..f4c1ef7a64 100644--- a/packages/react/src/MultiSelect.tsx+++ b/packages/react/src/MultiSelect.tsx@@ -1,6 +1,6 @@import { useLingui } from "@lingui/react/macro";import { useVirtualizer } from "@tanstack/react-virtual";-import type { ComponentPropsWithoutRef } from "react";+import type { ComponentPropsWithoutRef, ReactNode } from "react";import { forwardRef, useId, useMemo, useRef, useState } from "react";import { FaRegSquare, FaSquareCheck } from "react-icons/fa6";import { LuCirclePlus, LuSettings2, LuX } from "react-icons/lu";@@ -35,6 +35,7 @@ export type MultiSelectProps = Omit<isReadOnly?: boolean;isClearable?: boolean;placeholder?: string;+ emptyMessage?: ReactNode;onChange: (selected: string[]) => void;itemHeight?: number;maxPreview?: number;@@ -55,6 +56,7 @@ const MultiSelect = forwardRef<HTMLButtonElement, MultiSelectProps>(isReadOnly,isClearable,placeholder,+ emptyMessage,onChange,className,itemHeight = 40,@@ -190,15 +192,19 @@ const MultiSelect = forwardRef<HTMLButtonElement, MultiSelectProps>(onTouchMove={(e) => e.stopPropagation()}className="min-w-[var(--radix-popover-trigger-width)] p-1">- <VirtualizedCommand- options={options}- value={value}- onChange={onChange}- itemHeight={itemHeight}- setOpen={setOpen}- search={search}- setSearch={setSearch}- />+ {emptyMessage && options.length === 0 ? (+ emptyMessage+ ) : (+ <VirtualizedCommand+ options={options}+ value={value}+ onChange={onChange}+ itemHeight={itemHeight}+ setOpen={setOpen}+ search={search}+ setSearch={setSearch}+ />+ )}</PopoverContent></Popover>{isClearable && !isReadOnly && value.length > 0 && (