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.

- updated visibility of buttons

Gaurav Bhatt4ace1edadc71
diff --git a/apps/erp/app/modules/purchasing/ui/SupplierQuote/SupplierQuoteHeader.tsx b/apps/erp/app/modules/purchasing/ui/SupplierQuote/SupplierQuoteHeader.tsx
index 12c7eb1082..6e67e8114c 100644
--- a/apps/erp/app/modules/purchasing/ui/SupplierQuote/SupplierQuoteHeader.tsx
+++ b/apps/erp/app/modules/purchasing/ui/SupplierQuote/SupplierQuoteHeader.tsx
@@ -91,13 +91,11 @@ const SupplierQuoteHeader = () => {
const hasLines = routeData?.lines && routeData.lines.length > 0;
const quoteStatus: string = routeData?.quote?.status ?? "";
- const editableStatuses = ["Draft", "Active", "Declined"];
+ const editableStatuses = ["Draft", "Declined"];
const isEditableStatus = editableStatuses.includes(quoteStatus);
const canShare = routeData?.quote.externalLinkId && isEditableStatus;
- const canPreview =
- routeData?.quote.externalLinkId &&
- ["Draft", "Declined"].includes(quoteStatus);
+ const canPreview = routeData?.quote.externalLinkId && isEditableStatus;
const canSend =
isEditableStatus && permissions.can("update", "purchasing") && hasLines;
diff --git a/apps/erp/app/routes/share+/supplier-quote.$id.tsx b/apps/erp/app/routes/share+/supplier-quote.$id.tsx
index f4eccd0ebf..f68bbc2874 100644
--- a/apps/erp/app/routes/share+/supplier-quote.$id.tsx
+++ b/apps/erp/app/routes/share+/supplier-quote.$id.tsx
@@ -345,9 +345,7 @@ const LinePricing = ({
? pricingOptions.map((opt) => opt.quantity)
: [1]; // Default to showing at least one row with quantity 1
- const isDisabled = ["Expired", "Cancelled", "Declined"].includes(
- quoteStatus || ""
- );
+ const isDisabled = !["Draft"].includes(quoteStatus || "");
const formatter = new Intl.NumberFormat(locale, {
style: "currency",
@@ -729,7 +727,10 @@ const Quote = ({
<Card className="w-full max-w-5xl mx-auto">
<div className="w-full text-center">
{quote?.status && (quote?.status as string) !== "Draft" && (
- <Status color={quote.status === "Active" ? "green" : "gray"}>
+ <Status
+ className="inline-flex"
+ color={quote.status === "Active" ? "green" : "gray"}
+ >
{quote.status}
</Status>
)}