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
fix: confirm before unlinking job from sales order (#800)
Siddharth Gaikwad9c5dd8e56577
diff --git a/apps/erp/app/modules/production/ui/Jobs/JobProperties.tsx b/apps/erp/app/modules/production/ui/Jobs/JobProperties.tsxindex 1bf70db2c3..27031198ca 100644--- a/apps/erp/app/modules/production/ui/Jobs/JobProperties.tsx+++ b/apps/erp/app/modules/production/ui/Jobs/JobProperties.tsx@@ -10,10 +10,18 @@ import {Badge,Button,HStack,+ Modal,+ ModalBody,+ ModalContent,+ ModalFooter,+ ModalHeader,+ ModalOverlay,+ ModalTitle,Tooltip,TooltipContent,TooltipTrigger,toast,+ useDisclosure,VStack} from "@carbon/react";import { Trans, useLingui } from "@lingui/react/macro";@@ -60,6 +68,8 @@ const JobProperties = () => {trackedEntities: Promise<PostgrestResponse<TrackedEntity>>;}>(path.to.job(jobId));+ const unlinkDisclosure = useDisclosure();+const fetcher = useFetcher<typeof action>();useEffect(() => {if (fetcher.data?.error) {@@ -297,9 +307,7 @@ const JobProperties = () => {variant="ghost"size="sm"leftIcon={<LuUnlink2 className="w-3 h-3" />}- onClick={() => {- onUpdate("salesOrderLineId", null);- }}+ onClick={unlinkDisclosure.onOpen}>Unlink</Button>@@ -569,6 +577,48 @@ const JobProperties = () => {tags={routeData?.job.tags ?? []}onUpdate={onUpdateCustomFields}/>++ {unlinkDisclosure.isOpen && (+ <Modal+ open={unlinkDisclosure.isOpen}+ onOpenChange={(open) => {+ if (!open) unlinkDisclosure.onClose();+ }}+ >+ <ModalOverlay />+ <ModalContent>+ <ModalHeader>+ <ModalTitle>+ <Trans>Unlink job from sales order?</Trans>+ </ModalTitle>+ </ModalHeader>+ <ModalBody>+ <p className="text-sm text-muted-foreground">+ <Trans>+ This will remove {routeData?.job?.jobId}'s link to{" "}+ {routeData?.job?.salesOrderReadableId}. The job will no longer+ appear under the sales order and shipments won't find it.+ </Trans>+ </p>+ </ModalBody>+ <ModalFooter>+ <Button variant="secondary" onClick={unlinkDisclosure.onClose}>+ <Trans>Cancel</Trans>+ </Button>+ <Button+ variant="destructive"+ leftIcon={<LuUnlink2 className="w-3 h-3" />}+ onClick={() => {+ onUpdate("salesOrderLineId", null);+ unlinkDisclosure.onClose();+ }}+ >+ <Trans>Unlink</Trans>+ </Button>+ </ModalFooter>+ </ModalContent>+ </Modal>+ )}</VStack>);};diff --git a/packages/locale/locales/de/erp.po b/packages/locale/locales/de/erp.poindex 46911c2c4e..109432f69f 100644--- a/packages/locale/locales/de/erp.po+++ b/packages/locale/locales/de/erp.po@@ -7526,6 +7526,11 @@ msgstr "Dies wird die vorhandene Angebotsmethode überschreiben"msgid "This will recalculate the unit cost from the active make method's bill of materials and processes using the batch size. The current cost will be overwritten. Do you want to continue?"msgstr "Dies wird die Stückkosten aus der aktiven Herstellungsmethode, deren Stückliste und Prozesse unter Verwendung der Chargengröße neu berechnen. Die aktuellen Kosten werden überschrieben. Möchten Sie fortfahren?"+#. placeholder {0}: routeData?.job?.jobId+#. placeholder {1}: routeData?.job?.salesOrderReadableId+msgid "This will remove {0}'s link to {1}. The job will no longer appear under the sales order and shipments won't find it."+msgstr ""+msgid "This will replace all method materials of other revisions with this revision."msgstr "Dies ersetzt alle Methodenmaterialien anderer Revisionen durch diese Revision."@@ -7817,6 +7822,9 @@ msgstr "Unbegrenzte funktionale Unterstützung"msgid "Unlink"msgstr "Verknüpfung aufheben"+msgid "Unlink job from sales order?"+msgstr ""+msgid "Unsupported source document type: {sourceDocument}"msgstr "Nicht unterstützter Quelldokumenttyp: {sourceDocument}"diff --git a/packages/locale/locales/en/erp.po b/packages/locale/locales/en/erp.poindex 374f8099c6..f982bedc4c 100644--- a/packages/locale/locales/en/erp.po+++ b/packages/locale/locales/en/erp.po@@ -7526,6 +7526,11 @@ msgstr "This will overwrite the existing quote method"msgid "This will recalculate the unit cost from the active make method's bill of materials and processes using the batch size. The current cost will be overwritten. Do you want to continue?"msgstr "This will recalculate the unit cost from the active make method's bill of materials and processes using the batch size. The current cost will be overwritten. Do you want to continue?"+#. placeholder {0}: routeData?.job?.jobId+#. placeholder {1}: routeData?.job?.salesOrderReadableId+msgid "This will remove {0}'s link to {1}. The job will no longer appear under the sales order and shipments won't find it."+msgstr "This will remove {0}'s link to {1}. The job will no longer appear under the sales order and shipments won't find it."+msgid "This will replace all method materials of other revisions with this revision."msgstr "This will replace all method materials of other revisions with this revision."@@ -7817,6 +7822,9 @@ msgstr "Unlimited Functional Support"msgid "Unlink"msgstr "Unlink"+msgid "Unlink job from sales order?"+msgstr "Unlink job from sales order?"+msgid "Unsupported source document type: {sourceDocument}"msgstr "Unsupported source document type: {sourceDocument}"diff --git a/packages/locale/locales/es/erp.po b/packages/locale/locales/es/erp.poindex fe66a158e2..673e20a113 100644--- a/packages/locale/locales/es/erp.po+++ b/packages/locale/locales/es/erp.po@@ -7526,6 +7526,11 @@ msgstr "Esto sobrescribirá el método de cotizamsgid "This will recalculate the unit cost from the active make method's bill of materials and processes using the batch size. The current cost will be overwritten. Do you want to continue?"msgstr "Esto recalculará el costo unitario del método de fabricación activo basándose en la lista de materiales y procesos utilizando el tamaño de lote. El costo actual será sobrescrito. ¿Deseas continuar?"+#. placeholder {0}: routeData?.job?.jobId+#. placeholder {1}: routeData?.job?.salesOrderReadableId+msgid "This will remove {0}'s link to {1}. The job will no longer appear under the sales order and shipments won't find it."+msgstr ""+msgid "This will replace all method materials of other revisions with this revision."msgstr "Esto reemplazará todos los materiales de método de otras revisiones con esta revisión."@@ -7817,6 +7822,9 @@ msgstr "Soporte Funcional Ilimitado"msgid "Unlink"msgstr "Desenlazar"+msgid "Unlink job from sales order?"+msgstr ""+msgid "Unsupported source document type: {sourceDocument}"msgstr "Tipo de documento de origen no compatible: {sourceDocument}"diff --git a/packages/locale/locales/fr/erp.po b/packages/locale/locales/fr/erp.poindex 2a6a194b18..a675133e56 100644--- a/packages/locale/locales/fr/erp.po+++ b/packages/locale/locales/fr/erp.po@@ -7526,6 +7526,11 @@ msgstr "Cela remplacera la méthode de devis existante"msgid "This will recalculate the unit cost from the active make method's bill of materials and processes using the batch size. The current cost will be overwritten. Do you want to continue?"msgstr "Cela recalculera le coût unitaire àpartir de la nomenclature et des processus de la méthode de fabrication active en utilisant la taille du lot. Le coût actuel sera remplacé. Voulez-vous continuer ?"+#. placeholder {0}: routeData?.job?.jobId+#. placeholder {1}: routeData?.job?.salesOrderReadableId+msgid "This will remove {0}'s link to {1}. The job will no longer appear under the sales order and shipments won't find it."+msgstr ""+msgid "This will replace all method materials of other revisions with this revision."msgstr "Cela remplacera tous les matériaux de méthode des autres révisions par cette révision."@@ -7817,6 +7822,9 @@ msgstr "Support fonctionnel illimité"msgid "Unlink"msgstr "Dissocier"+msgid "Unlink job from sales order?"+msgstr ""+msgid "Unsupported source document type: {sourceDocument}"msgstr "Type de document source non pris en charge : {sourceDocument}"diff --git a/packages/locale/locales/hi/erp.po b/packages/locale/locales/hi/erp.poindex 9f899af500..548955622c 100644--- a/packages/locale/locales/hi/erp.po+++ b/packages/locale/locales/hi/erp.po@@ -7526,6 +7526,11 @@ msgstr "यह à¤Ãmsgid "This will recalculate the unit cost from the active make method's bill of materials and processes using the batch size. The current cost will be overwritten. Do you want to continue?"msgstr "यह सकà¥ÂÂरिय निरà¥ÂÂमाण विधि के सामà¤â€â€ÃƒÂ Â¥ÂÂरी विवरण à¤â€Âर पà¥ÂÂरकà¥ÂÂरियाओं से बैच आकार का उपयोà¤ करके इकाईलाà¤â€â€ÃƒÂ ¤¤ की पà¥ÂÂनः à¤â€â€ÃƒÂ ¤£à¤¨à¤¾ करेà¤â€â€ÃƒÂ ¤¾à¥¤ वरà¥ÂÂतमान लाà¤â€â€ÃƒÂ ¤¤ को अधिलेखित किया जाà¤ÂÂà¤â€â€ÃƒÂ ¤¾à¥¤ कà¥ÂÂया आप जारी रखना चाहते हैं?"+#. placeholder {0}: routeData?.job?.jobId+#. placeholder {1}: routeData?.job?.salesOrderReadableId+msgid "This will remove {0}'s link to {1}. The job will no longer appear under the sales order and shipments won't find it."+msgstr ""+msgid "This will replace all method materials of other revisions with this revision."msgstr "यह अनà¥ÂÂय संशोधनों की सà¤ÂÂी विधि सामà¤â€â€ÃƒÂ Â¥ÂÂरी को इस संशोधन से बदल देà¤â€â€ÃƒÂ ¤¾à¥¤"@@ -7817,6 +7822,9 @@ msgstr "असàÂmsgid "Unlink"msgstr "अनलिंक करें"+msgid "Unlink job from sales order?"+msgstr ""+msgid "Unsupported source document type: {sourceDocument}"msgstr "असमरà¥ÂÂथित सà¥ÂÂरोत दसà¥ÂÂतावेज़ पà¥ÂÂरकार: {sourceDocument}"diff --git a/packages/locale/locales/it/erp.po b/packages/locale/locales/it/erp.poindex 4027900791..595b45d801 100644--- a/packages/locale/locales/it/erp.po+++ b/packages/locale/locales/it/erp.po@@ -7526,6 +7526,11 @@ msgstr "Questo sovrascriveràil metodo di preventivo esistente"msgid "This will recalculate the unit cost from the active make method's bill of materials and processes using the batch size. The current cost will be overwritten. Do you want to continue?"msgstr "Questo ricalcoleràil costo unitario dal distinta base e dai processi del metodo di produzione attivo utilizzando la dimensione del lotto. Il costo attuale verràsovrascritto. Vuoi continuare?"+#. placeholder {0}: routeData?.job?.jobId+#. placeholder {1}: routeData?.job?.salesOrderReadableId+msgid "This will remove {0}'s link to {1}. The job will no longer appear under the sales order and shipments won't find it."+msgstr ""+msgid "This will replace all method materials of other revisions with this revision."msgstr "Questo sostituiràtutti i materiali del metodo di altre revisioni con questa revisione."@@ -7817,6 +7822,9 @@ msgstr "Supporto Funzionale Illimitato"msgid "Unlink"msgstr "Scollega"+msgid "Unlink job from sales order?"+msgstr ""+msgid "Unsupported source document type: {sourceDocument}"msgstr "Tipo di documento di origine non supportato: {sourceDocument}"diff --git a/packages/locale/locales/ja/erp.po b/packages/locale/locales/ja/erp.poindex ead63a1291..331c2578b0 100644--- a/packages/locale/locales/ja/erp.po+++ b/packages/locale/locales/ja/erp.po@@ -7526,6 +7526,11 @@ msgstr "ã“れÃmsgid "This will recalculate the unit cost from the active make method's bill of materials and processes using the batch size. The current cost will be overwritten. Do you want to continue?"msgstr "ã“れã«よりã€ÂÂアクティブãª製造方法ã®部å“ÂÂ表ã¨ãƒâ€â€ÃƒÂ£Ã†â€™Ã‚Âセスã‹らãƒÂÂッãƒÂÂサイズを使çâ€Â¨ãÂÂâ€â€ÃƒÂ£Ã‚¦å˜価ãÂÂŒå†ÂÂ計ç®â€â€ÃƒÂ£Ã‚•れã¾ã™。ç¾在ã®コストã¯上書ãÂÂÂÂã•れã¾ã™。続行ãÂÂâ€â€ÃƒÂ£Ã‚¾ã™ã‹?"+#. placeholder {0}: routeData?.job?.jobId+#. placeholder {1}: routeData?.job?.salesOrderReadableId+msgid "This will remove {0}'s link to {1}. The job will no longer appear under the sales order and shipments won't find it."+msgstr ""+msgid "This will replace all method materials of other revisions with this revision."msgstr "ã“れã«よりã€ÂÂä»–ã®リビジョンã®ã™ã¹ã¦ã®メソッドマテリアルãÂÂ΋“ã®リビジョンã«置ãÂÂÂÂæÂ›ã‚ÂÂりã¾ã™。"@@ -7817,6 +7822,9 @@ msgstr "無制éÃmsgid "Unlink"msgstr "リンク解除"+msgid "Unlink job from sales order?"+msgstr ""+msgid "Unsupported source document type: {sourceDocument}"msgstr "サãƒÂÂートã•れã¦ã„ãªã„ソースドã‚ÂÂュメントタイãƒâ€â€: {sourceDocument}"diff --git a/packages/locale/locales/pl/erp.po b/packages/locale/locales/pl/erp.poindex cc183a997d..b8da1bd0c0 100644--- a/packages/locale/locales/pl/erp.po+++ b/packages/locale/locales/pl/erp.po@@ -7526,6 +7526,11 @@ msgstr "To spowoduje zastÄ…pienie istniejÄâmsgid "This will recalculate the unit cost from the active make method's bill of materials and processes using the batch size. The current cost will be overwritten. Do you want to continue?"msgstr "To spowoduje przeliczenie kosztu jednostkowego na podstawie aktywnej metody produkcji, listy materiałów i procesów przy użyciu wielkoÅ›ci partii. Bieżący koszt zostanie zastÄ…piony. Czy chcesz kontynuować?"+#. placeholder {0}: routeData?.job?.jobId+#. placeholder {1}: routeData?.job?.salesOrderReadableId+msgid "This will remove {0}'s link to {1}. The job will no longer appear under the sales order and shipments won't find it."+msgstr ""+msgid "This will replace all method materials of other revisions with this revision."msgstr "To zastÄ…pi wszystkie materiaÅ‚y metody innych wersji tÄ… wersjÄ…."@@ -7817,6 +7822,9 @@ msgstr "Nieograniczone wsparcie funkcjonalne"msgid "Unlink"msgstr "Odłącz"+msgid "Unlink job from sales order?"+msgstr ""+msgid "Unsupported source document type: {sourceDocument}"msgstr "NieobsÅ‚ugiwany typ dokumentu źródÅ‚owego: {sourceDocument}"diff --git a/packages/locale/locales/pt/erp.po b/packages/locale/locales/pt/erp.poindex f4adf6a1f6..2ff94b83a4 100644--- a/packages/locale/locales/pt/erp.po+++ b/packages/locale/locales/pt/erp.po@@ -7526,6 +7526,11 @@ msgstr "Isto irá sobrescrever o método de cotamsgid "This will recalculate the unit cost from the active make method's bill of materials and processes using the batch size. The current cost will be overwritten. Do you want to continue?"msgstr "Isto irá recalcular o custo unitário a partir da lista de materiais e processos do método de fabricação ativo usando o tamanho do lote. O custo atual será sobrescrito. Deseja continuar?"+#. placeholder {0}: routeData?.job?.jobId+#. placeholder {1}: routeData?.job?.salesOrderReadableId+msgid "This will remove {0}'s link to {1}. The job will no longer appear under the sales order and shipments won't find it."+msgstr ""+msgid "This will replace all method materials of other revisions with this revision."msgstr "Isto substituirá todos os materiais de método de outras revisões por esta revisão."@@ -7817,6 +7822,9 @@ msgstr "Suporte Funcional Ilimitado"msgid "Unlink"msgstr "Desvinculação"+msgid "Unlink job from sales order?"+msgstr ""+msgid "Unsupported source document type: {sourceDocument}"msgstr "Tipo de documento de origem não suportado: {sourceDocument}"diff --git a/packages/locale/locales/ru/erp.po b/packages/locale/locales/ru/erp.poindex f70d150487..5af99a39d8 100644--- a/packages/locale/locales/ru/erp.po+++ b/packages/locale/locales/ru/erp.po@@ -7526,6 +7526,11 @@ msgstr "ÃÂÂÂтþ ÃÂÃmsgid "This will recalculate the unit cost from the active make method's bill of materials and processes using the batch size. The current cost will be overwritten. Do you want to continue?"msgstr "ÃÂÂÂтþ ÿõрõÑÂÂчøтðõт ÑÂÂõñõÑÂÂтþøüþÑÂÂть õôøýøцы ÿрþôуúцøø ýð þÑÂÂýþòõ ðúтøòýþóþ üõтþôð ÿрþø÷òþôÑÂÂтòð, ÑÂÂÿõцøфøúðцøø üðтõрøðûþò ø ÿрþцõÑÂÂÑÂÂþò ѠøÑÂÂÿþûь÷þòðýøõü рð÷üõрð ÿðртøø. âõúущðѠÑÂÂõñõÑÂÂтþøüþÑÂÂть ñуôõт ÿõрõ÷ðÿøÑÂÂðýð. ÃÂ’Ñ‹ хþтøтõ ÿрþôþûöøть?"+#. placeholder {0}: routeData?.job?.jobId+#. placeholder {1}: routeData?.job?.salesOrderReadableId+msgid "This will remove {0}'s link to {1}. The job will no longer appear under the sales order and shipments won't find it."+msgstr ""+msgid "This will replace all method materials of other revisions with this revision."msgstr "ÃÂÂÂтþ ÷ðüõýøт òÑÂÂõ üðтõрøðûы üõтþôþò ôруóøх рõôðúцøù ýð ÑÂÂту рõôðúцøю."@@ -7817,6 +7822,9 @@ msgstr "ÃÂÂÂõþóÃmsgid "Unlink"msgstr "Þтüõýøть ÑÂÂòÑÂÂ÷ь"+msgid "Unlink job from sales order?"+msgstr ""+msgid "Unsupported source document type: {sourceDocument}"msgstr "ÃÂÂÂõÿþôôõрöøòðõüыù тøÿ øÑÂÂхþôýþóþ ôþúуüõýтð: {sourceDocument}"diff --git a/packages/locale/locales/zh/erp.po b/packages/locale/locales/zh/erp.poindex 2455f0056d..5139ba9900 100644--- a/packages/locale/locales/zh/erp.po+++ b/packages/locale/locales/zh/erp.po@@ -7526,6 +7526,11 @@ msgstr "这将èmsgid "This will recalculate the unit cost from the active make method's bill of materials and processes using the batch size. The current cost will be overwritten. Do you want to continue?"msgstr "这将根æÂ®活跃制造方法的物料清å•和工艺æµÂÂ程使çâ€Â¨æ‰¹é‡ÂÂ大å°ÂÂé‡ÂÂ新计ç®â€â€ÃƒÂ¥Ã‚•ä½ÂÂæˆÂÂ本。当å‰ÂÂæˆÂÂ本将被覆盖。您è¦ÂÂç»§ç»ÂÂÃ¥ÂÂâ€â€ÃƒÂ¯Ã‚¼Å¸"+#. placeholder {0}: routeData?.job?.jobId+#. placeholder {1}: routeData?.job?.salesOrderReadableId+msgid "This will remove {0}'s link to {1}. The job will no longer appear under the sales order and shipments won't find it."+msgstr ""+msgid "This will replace all method materials of other revisions with this revision."msgstr "这将çâ€Â¨æÂ¤修订版本替æÂ¢其他修订版本的所有方法æÂÂÂÂ料。"@@ -7817,6 +7822,9 @@ msgstr "æâ€â€Ã‚ Ã©â„¢ÂÂÃmsgid "Unlink"msgstr "å–消链接"+msgid "Unlink job from sales order?"+msgstr ""+msgid "Unsupported source document type: {sourceDocument}"msgstr "ä¸ÂÂæâ€Â¯æŒÂÂçš„æºÂÂ文档类型:{sourceDocument}"