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
refactor: remove default attachments for purchase order from item master
Brad Barbinc51c551394f0
diff --git a/apps/erp/app/routes/x+/part+/$itemId.details.tsx b/apps/erp/app/routes/x+/part+/$itemId.details.tsxindex 606952bdd2..4958d93426 100644--- a/apps/erp/app/routes/x+/part+/$itemId.details.tsx+++ b/apps/erp/app/routes/x+/part+/$itemId.details.tsx@@ -14,7 +14,6 @@ import type {} from "react-router";import { Await, redirect, useLoaderData, useParams } from "react-router";import { CadModel, DeferredFiles } from "~/components";-import DefaultAttachmentsPanel from "~/components/DefaultAttachmentsPanel";import { usePermissions, useRouteData } from "~/hooks";import type { ItemFile, MakeMethod, PartSummary } from "~/modules/items";import {@@ -58,13 +57,13 @@ export async function loader({ request, params }: LoaderFunctionArgs) {const url = new URL(request.url);const requestedMethodId = url.searchParams.get("methodId");- const [makeMethods, defaultAttachmentsResult] = await Promise.all([- getMakeMethods(client, itemId, companyId),- client.storage- .from("private")- .list(`${companyId}/default-attachments/item/${itemId}`)+ const [makeMethods] = await Promise.all([+ getMakeMethods(client, itemId, companyId)+ // client.storage+ // .from("private")+ // .list(`${companyId}/default-attachments/item/${itemId}`)]);- const defaultAttachments = defaultAttachmentsResult.data ?? [];+ // const defaultAttachments = defaultAttachmentsResult.data ?? [];const makeMethod = requestedMethodId? (makeMethods.data?.find((m) => m.id === requestedMethodId) ??@@ -74,12 +73,12 @@ export async function loader({ request, params }: LoaderFunctionArgs) {makeMethods.data?.[0]);if (!makeMethod) {- return { methodData: null, tags: [], defaultAttachments };+ return { methodData: null, tags: [] };}const fullMethod = await getMakeMethodById(client, makeMethod.id, companyId);if (fullMethod.error || !fullMethod.data) {- return { methodData: null, tags: [], defaultAttachments };+ return { methodData: null, tags: [] };}const [methodMaterials, methodOperations, tags, partManufacturing] =@@ -129,8 +128,7 @@ export async function loader({ request, params }: LoaderFunctionArgs) {partManufacturing: partManufacturing.data,...configData},- tags: tags.data ?? [],- defaultAttachments+ tags: tags.data ?? []};}@@ -221,8 +219,7 @@ export default function PartDetailsRoute() {if (!itemId) throw new Error("Could not find itemId");const permissions = usePermissions();- const { methodData, tags, defaultAttachments } =- useLoaderData<typeof loader>();+ const { methodData, tags } = useLoaderData<typeof loader>();const partData = useRouteData<{partSummary: PartSummary;@@ -337,12 +334,12 @@ export default function PartDetailsRoute() {)}</DeferredFiles>- <DefaultAttachmentsPanel+ {/* <DefaultAttachmentsPanelfiles={defaultAttachments ?? []}storagePathPrefix={`default-attachments/item/${itemId}`}title={t`Default Attachments on Purchase Orders`}description={t`Files attached here ride along whenever this item appears on a purchase order email.`}- />+ /> */}<CadModelisReadOnly={!permissions.can("update", "parts")}diff --git a/packages/locale/locales/de/erp.po b/packages/locale/locales/de/erp.poindex 47a3c8f029..3d5152d1da 100644--- a/packages/locale/locales/de/erp.po+++ b/packages/locale/locales/de/erp.po@@ -2204,9 +2204,6 @@ msgstr "Standardgenehmiger"msgid "Default Attachments"msgstr "Standardanhänge"-msgid "Default Attachments on Purchase Orders"-msgstr "Standardanhänge bei Bestellungen"-msgid "Default CC Recipients"msgstr "Standard-CC-Empfänger"@@ -3650,9 +3647,6 @@ msgstr "Hier angehängte Dateien werden standardmäßig mit jeder Bestellanfragemsgid "Files attached here ride along on every purchase order email sent to this supplier (in addition to company-wide defaults)."msgstr "Hier angehängte Dateien werden mit jeder Bestellanfrage-E-Mail an diesen Lieferanten versendet (zusätzlich zu unternehmensweiten Standardeinstellungen)."-msgid "Files attached here ride along whenever this item appears on a purchase order email."-msgstr "Dateien, die hier angehängt sind, werden automatisch mitgesendet, wenn dieser Artikel in einer Bestellungs-E-Mail erscheint."-msgid "Filter"msgstr "Filter"diff --git a/packages/locale/locales/en/erp.po b/packages/locale/locales/en/erp.poindex 14b4648488..568c39588e 100644--- a/packages/locale/locales/en/erp.po+++ b/packages/locale/locales/en/erp.po@@ -2204,9 +2204,6 @@ msgstr "Default Approver"msgid "Default Attachments"msgstr "Default Attachments"-msgid "Default Attachments on Purchase Orders"-msgstr "Default Attachments on Purchase Orders"-msgid "Default CC Recipients"msgstr "Default CC Recipients"@@ -3650,9 +3647,6 @@ msgstr "Files attached here ride along on every purchase order email by default.msgid "Files attached here ride along on every purchase order email sent to this supplier (in addition to company-wide defaults)."msgstr "Files attached here ride along on every purchase order email sent to this supplier (in addition to company-wide defaults)."-msgid "Files attached here ride along whenever this item appears on a purchase order email."-msgstr "Files attached here ride along whenever this item appears on a purchase order email."-msgid "Filter"msgstr "Filter"diff --git a/packages/locale/locales/es/erp.po b/packages/locale/locales/es/erp.poindex 06d2bbb716..3edc4ca859 100644--- a/packages/locale/locales/es/erp.po+++ b/packages/locale/locales/es/erp.po@@ -2204,9 +2204,6 @@ msgstr "Aprobador Predeterminado"msgid "Default Attachments"msgstr "Adjuntos Predeterminados"-msgid "Default Attachments on Purchase Orders"-msgstr "Archivos Adjuntos Predeterminados en Órdenes de Compra"-msgid "Default CC Recipients"msgstr "Destinatarios CC predeterminados"@@ -3650,9 +3647,6 @@ msgstr "Los archivos adjuntos aquí se incluyen en cada correo electrónico de omsgid "Files attached here ride along on every purchase order email sent to this supplier (in addition to company-wide defaults)."msgstr "Los archivos adjuntos aquí se incluyen en cada correo electrónico de orden de compra enviado a este proveedor (además de los valores predeterminados de toda la empresa)."-msgid "Files attached here ride along whenever this item appears on a purchase order email."-msgstr "Los archivos adjuntos aquí se incluyen siempre que este artículo aparece en un correo electrónico de orden de compra."-msgid "Filter"msgstr "Filtro"diff --git a/packages/locale/locales/fr/erp.po b/packages/locale/locales/fr/erp.poindex a7a7caaf75..ba94275ead 100644--- a/packages/locale/locales/fr/erp.po+++ b/packages/locale/locales/fr/erp.po@@ -2204,9 +2204,6 @@ msgstr "Approbateur par défaut"msgid "Default Attachments"msgstr "Pièces jointes par défaut"-msgid "Default Attachments on Purchase Orders"-msgstr "Pièces jointes par défaut sur les commandes d'achat"-msgid "Default CC Recipients"msgstr "Destinataires CC par défaut"@@ -3650,9 +3647,6 @@ msgstr "Les fichiers joints ici sont automatiquement envoyés avec chaque emailmsgid "Files attached here ride along on every purchase order email sent to this supplier (in addition to company-wide defaults)."msgstr "Les fichiers joints ici sont inclus dans chaque email de bon de commande envoyé à ce fournisseur (en plus des paramètres par défaut à l'échelle de l'entreprise)."-msgid "Files attached here ride along whenever this item appears on a purchase order email."-msgstr "Les fichiers joints ici sont inclus chaque fois que cet article apparaît dans un e-mail de commande d'achat."-msgid "Filter"msgstr "Filtre"diff --git a/packages/locale/locales/hi/erp.po b/packages/locale/locales/hi/erp.poindex 2bbe8b8a78..c64954ca41 100644--- a/packages/locale/locales/hi/erp.po+++ b/packages/locale/locales/hi/erp.po@@ -2204,9 +2204,6 @@ msgstr "डिफ़ॉल्ट अनुमोदक"msgid "Default Attachments"msgstr "डिफ़ॉल्ट अटैचमेंट"-msgid "Default Attachments on Purchase Orders"-msgstr "क्रय आदेशों पर डिफ़ॉल्ट संलग्नताएं"-msgid "Default CC Recipients"msgstr "डिफ़ॉल्ट CC प्राप्तकर्ता"@@ -3650,9 +3647,6 @@ msgstr "यहां संलग्न की गई फाइलें डिmsgid "Files attached here ride along on every purchase order email sent to this supplier (in addition to company-wide defaults)."msgstr "यहां संलग्न की गई फाइलें इस आपूर्तिकर्ता को भेजे गए प्रत्येक क्रय आदेश ईमेल के साथ जाती हैं (कंपनी-व्यापी डिफ़ॉल्ट के अतिरिक्त)।"-msgid "Files attached here ride along whenever this item appears on a purchase order email."-msgstr "यहाँ संलग्न फ़ाइलें हर बार इस आइटम के साथ खरीद आदेश ईमेल में दिखाई देती हैं।"-msgid "Filter"msgstr "फ़िल्टर"diff --git a/packages/locale/locales/it/erp.po b/packages/locale/locales/it/erp.poindex 38780b83fd..8931a6c32f 100644--- a/packages/locale/locales/it/erp.po+++ b/packages/locale/locales/it/erp.po@@ -2204,9 +2204,6 @@ msgstr "Approvatore Predefinito"msgid "Default Attachments"msgstr "Allegati Predefiniti"-msgid "Default Attachments on Purchase Orders"-msgstr "Allegati predefiniti negli ordini di acquisto"-msgid "Default CC Recipients"msgstr "Destinatari CC predefiniti"@@ -3650,9 +3647,6 @@ msgstr "I file allegati qui vengono inviati automaticamente con ogni email di ormsgid "Files attached here ride along on every purchase order email sent to this supplier (in addition to company-wide defaults)."msgstr "I file allegati qui vengono inclusi in ogni email di ordine d'acquisto inviata a questo fornitore (in aggiunta ai valori predefiniti a livello aziendale)."-msgid "Files attached here ride along whenever this item appears on a purchase order email."-msgstr "I file allegati qui vengono inclusi ogni volta che questo articolo appare in un'email di ordine di acquisto."-msgid "Filter"msgstr "Filtro"diff --git a/packages/locale/locales/ja/erp.po b/packages/locale/locales/ja/erp.poindex fa0a10441b..7ba7355223 100644--- a/packages/locale/locales/ja/erp.po+++ b/packages/locale/locales/ja/erp.po@@ -2204,9 +2204,6 @@ msgstr "デフォルト承認者"msgid "Default Attachments"msgstr "デフォルト添付ファイル"-msgid "Default Attachments on Purchase Orders"-msgstr "購買注文のデフォルト添付ファイル"-msgid "Default CC Recipients"msgstr "デフォルトCC受信者"@@ -3650,9 +3647,6 @@ msgstr "ここに添付されたファイルは、デフォルトではすべてmsgid "Files attached here ride along on every purchase order email sent to this supplier (in addition to company-wide defaults)."msgstr "ここに添付されたファイルは、このサプライヤーに送信されるすべての発注メールに含まれます(会社全体のデフォルトに加えて)。"-msgid "Files attached here ride along whenever this item appears on a purchase order email."-msgstr "このファイルは、このアイテムが購買注文メールに表示されるたびに添付されます。"-msgid "Filter"msgstr "フィルター"diff --git a/packages/locale/locales/pl/erp.po b/packages/locale/locales/pl/erp.poindex 0d8c137cd8..4d6e4c7d71 100644--- a/packages/locale/locales/pl/erp.po+++ b/packages/locale/locales/pl/erp.po@@ -2204,9 +2204,6 @@ msgstr "Domyślny Zatwierdzający"msgid "Default Attachments"msgstr "Domyślne załączniki"-msgid "Default Attachments on Purchase Orders"-msgstr "Domyślne załączniki w zamówieniach zakupu"-msgid "Default CC Recipients"msgstr "Domyślni odbiorcy DW"@@ -3650,9 +3647,6 @@ msgstr "Pliki dołączone tutaj są automatycznie wysyłane z każdym e-mailem zmsgid "Files attached here ride along on every purchase order email sent to this supplier (in addition to company-wide defaults)."msgstr "Pliki dołączone tutaj są wysyłane wraz z każdym emailem zamówienia zakupu wysłanym do tego dostawcy (dodatkowo do ustawień domyślnych całej firmy)."-msgid "Files attached here ride along whenever this item appears on a purchase order email."-msgstr "Pliki dołączone tutaj są automatycznie dodawane za każdym razem, gdy ten element pojawia się w wiadomości e-mail zamówienia zakupu."-msgid "Filter"msgstr "Filtr"diff --git a/packages/locale/locales/pt/erp.po b/packages/locale/locales/pt/erp.poindex c63352a08f..10df917a46 100644--- a/packages/locale/locales/pt/erp.po+++ b/packages/locale/locales/pt/erp.po@@ -2204,9 +2204,6 @@ msgstr "Aprovador Padrão"msgid "Default Attachments"msgstr "Anexos Padrão"-msgid "Default Attachments on Purchase Orders"-msgstr "Anexos Padrão em Pedidos de Compra"-msgid "Default CC Recipients"msgstr "Destinatários CC Padrão"@@ -3650,9 +3647,6 @@ msgstr "Os arquivos anexados aqui são incluídos em todos os emails de pedido dmsgid "Files attached here ride along on every purchase order email sent to this supplier (in addition to company-wide defaults)."msgstr "Arquivos anexados aqui são incluídos em todos os emails de pedido de compra enviados para este fornecedor (além dos padrões em toda a empresa)."-msgid "Files attached here ride along whenever this item appears on a purchase order email."-msgstr "Arquivos anexados aqui são incluídos sempre que este item aparece em um email de pedido de compra."-msgid "Filter"msgstr "Filtro"diff --git a/packages/locale/locales/ru/erp.po b/packages/locale/locales/ru/erp.poindex c03ac97b36..2ad5f14f5f 100644--- a/packages/locale/locales/ru/erp.po+++ b/packages/locale/locales/ru/erp.po@@ -2204,9 +2204,6 @@ msgstr "Утверждающий по умолчанию"msgid "Default Attachments"msgstr "Вложения по умолчанию"-msgid "Default Attachments on Purchase Orders"-msgstr "Вложения по умолчанию в заказах на покупку"-msgid "Default CC Recipients"msgstr "Получатели CC по умолчанию"@@ -3650,9 +3647,6 @@ msgstr "Файлы, прикрепленные здесь, автоматичеmsgid "Files attached here ride along on every purchase order email sent to this supplier (in addition to company-wide defaults)."msgstr "Файлы, прикрепленные здесь, отправляются вместе с каждым письмом заказа на покупку, отправленным этому поставщику (в дополнение к общекорпоративным значениям по умолчанию)."-msgid "Files attached here ride along whenever this item appears on a purchase order email."-msgstr "Файлы, прикрепленные здесь, автоматически добавляются при отправке этого товара в письме заказа на покупку."-msgid "Filter"msgstr "Фильтр"diff --git a/packages/locale/locales/zh/erp.po b/packages/locale/locales/zh/erp.poindex 8cb992afd1..4c4f75da29 100644--- a/packages/locale/locales/zh/erp.po+++ b/packages/locale/locales/zh/erp.po@@ -2204,9 +2204,6 @@ msgstr "默认审批人"msgid "Default Attachments"msgstr "默认附件"-msgid "Default Attachments on Purchase Orders"-msgstr "采购订单上的默认附件"-msgid "Default CC Recipients"msgstr "默认抄送收件人"@@ -3650,9 +3647,6 @@ msgstr "此处附加的文件将默认随每封采购订单电子邮件一起发msgid "Files attached here ride along on every purchase order email sent to this supplier (in addition to company-wide defaults)."msgstr "此处附加的文件将随附在发送给此供应商的每份采购订单电子邮件中(除了公司范围的默认设置)。"-msgid "Files attached here ride along whenever this item appears on a purchase order email."-msgstr "此处附加的文件会在此项目出现在采购订单电子邮件中时随之附加。"-msgid "Filter"msgstr "筛选"