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
- handling for submitted
Gaurav Bhatt3b2cfa47791a
diff --git a/apps/erp/app/modules/purchasing/purchasing.models.ts b/apps/erp/app/modules/purchasing/purchasing.models.tsindex 6d43b0eca3..c0bf86238d 100644--- a/apps/erp/app/modules/purchasing/purchasing.models.ts+++ b/apps/erp/app/modules/purchasing/purchasing.models.ts@@ -325,6 +325,7 @@ export const supplierStatusValidator = z.object({export const supplierQuoteStatusType = ["Active","Sent",+ "Submitted","Partial","Ordered","Expired",diff --git a/apps/erp/app/modules/purchasing/ui/SupplierQuote/SupplierQuoteHeader.tsx b/apps/erp/app/modules/purchasing/ui/SupplierQuote/SupplierQuoteHeader.tsxindex 4291f3ab98..5d96bb8d0d 100644--- a/apps/erp/app/modules/purchasing/ui/SupplierQuote/SupplierQuoteHeader.tsx+++ b/apps/erp/app/modules/purchasing/ui/SupplierQuote/SupplierQuoteHeader.tsx@@ -186,9 +186,33 @@ const SupplierQuoteHeader = () => {Finalize</Button>+ <statusFetcher.Form+ id="submit-form"+ method="post"+ action={path.to.supplierQuoteStatus(id)}+ >+ <input type="hidden" name="status" value="Submitted" />+ <Button+ isDisabled={+ routeData?.quote?.status !== "Sent" ||+ statusFetcher.state !== "idle" ||+ !permissions.can("update", "purchasing")+ }+ isLoading={+ statusFetcher.state !== "idle" &&+ statusFetcher.formData?.get("status") === "Submitted"+ }+ leftIcon={<LuCheckCheck />}+ type="submit"+ >+ Submit+ </Button>+ </statusFetcher.Form>+<ButtonisDisabled={- (routeData?.quote?.status !== "Sent" && routeData?.quote?.status !== "Submitted") ||+ (routeData?.quote?.status !== "Sent" &&+ routeData?.quote?.status !== "Submitted") ||!permissions.can("update", "purchasing")}leftIcon={<LuShoppingCart />}@@ -197,7 +221,9 @@ const SupplierQuoteHeader = () => {Order</Button>- {routeData?.quote?.status === "Active" ? (+ {routeData?.quote?.status === "Active" ||+ routeData?.quote?.status === "Sent" ||+ routeData?.quote?.status === "Submitted" ? (<statusFetcher.Formmethod="post"action={path.to.supplierQuoteStatus(id)}@@ -219,7 +245,7 @@ const SupplierQuoteHeader = () => {Cancel</Button></statusFetcher.Form>- ) : (+ ) : routeData?.quote?.status !== "Ordered" ? (<statusFetcher.Formmethod="post"action={path.to.supplierQuoteStatus(id)}@@ -230,7 +256,9 @@ const SupplierQuoteHeader = () => {statusFetcher.state !== "idle" ||!permissions.can("update", "purchasing") ||routeData?.quote?.status === "Ordered" ||- routeData?.quote?.status === "Partial"+ routeData?.quote?.status === "Partial" ||+ routeData?.quote?.status === "Sent" ||+ routeData?.quote?.status === "Submitted"}isLoading={statusFetcher.state !== "idle" &&@@ -243,7 +271,7 @@ const SupplierQuoteHeader = () => {Reopen</Button></statusFetcher.Form>- )}+ ) : null}<IconButtonaria-label="Toggle Properties"diff --git a/apps/erp/app/modules/purchasing/ui/SupplierQuote/SupplierQuoteStatus.tsx b/apps/erp/app/modules/purchasing/ui/SupplierQuote/SupplierQuoteStatus.tsxindex 99dd5ccd53..71f84c9124 100644--- a/apps/erp/app/modules/purchasing/ui/SupplierQuote/SupplierQuoteStatus.tsx+++ b/apps/erp/app/modules/purchasing/ui/SupplierQuote/SupplierQuoteStatus.tsx@@ -12,6 +12,7 @@ const SupplierQuoteStatus = ({ status }: SupplierQuoteStatusProps) => {case "Ordered":return <Status color="green">{status}</Status>;case "Sent":+ case "Submitted":return <Status color="yellow">{status}</Status>;case "Declined":return <Status color="gray">{status}</Status>;