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.

feat: drag files to line items in quote

Brad Barbinb63c4ea1eb9c
diff --git a/apps/erp/app/modules/items/items.service.ts b/apps/erp/app/modules/items/items.service.ts
index 89b70e95ee..a5d5e9eb0a 100644
--- a/apps/erp/app/modules/items/items.service.ts
+++ b/apps/erp/app/modules/items/items.service.ts
@@ -121,7 +121,7 @@ export async function createRevision(
defaultMethodType: item.defaultMethodType,
itemTrackingType: item.itemTrackingType,
unitOfMeasureCode: item.unitOfMeasureCode,
- active: item.active,
+ active: true,
modelUploadId: item.modelUploadId,
companyId: item.companyId,
createdBy: createdBy,
@@ -1923,7 +1923,7 @@ export async function upsertConsumable(
defaultMethodType: consumable.defaultMethodType,
itemTrackingType: consumable.itemTrackingType,
unitOfMeasureCode: consumable.unitOfMeasureCode,
- active: consumable.active,
+ active: true,
companyId: consumable.companyId,
createdBy: consumable.createdBy,
})
@@ -1968,7 +1968,7 @@ export async function upsertConsumable(
defaultMethodType: consumable.defaultMethodType,
itemTrackingType: consumable.itemTrackingType,
unitOfMeasureCode: consumable.unitOfMeasureCode,
- active: consumable.active,
+ active: true,
};
const consumableUpdate = {
@@ -2021,7 +2021,7 @@ export async function upsertPart(
defaultMethodType: part.defaultMethodType,
itemTrackingType: part.itemTrackingType,
unitOfMeasureCode: part.unitOfMeasureCode,
- active: part.active,
+ active: true,
modelUploadId: part.modelUploadId,
companyId: part.companyId,
createdBy: part.createdBy,
@@ -2076,7 +2076,7 @@ export async function upsertPart(
defaultMethodType: part.defaultMethodType,
itemTrackingType: part.itemTrackingType,
unitOfMeasureCode: part.unitOfMeasureCode,
- active: part.active,
+ active: true,
};
const partUpdate = {
@@ -2549,7 +2549,7 @@ export async function upsertMaterial(
defaultMethodType: material.defaultMethodType,
itemTrackingType: material.itemTrackingType,
unitOfMeasureCode: material.unitOfMeasureCode,
- active: material.active,
+ active: true,
revision: size,
companyId: material.companyId,
createdBy: material.createdBy,
@@ -2584,7 +2584,7 @@ export async function upsertMaterial(
defaultMethodType: material.defaultMethodType,
itemTrackingType: material.itemTrackingType,
unitOfMeasureCode: material.unitOfMeasureCode,
- active: material.active,
+ active: true,
companyId: material.companyId,
createdBy: material.createdBy,
})
@@ -2636,7 +2636,7 @@ export async function upsertMaterial(
itemTrackingType: material.itemTrackingType,
unitOfMeasureCode: material.unitOfMeasureCode,
unitCost: material.unitCost,
- active: material.active,
+ active: true,
};
const materialUpdate = {
@@ -2924,7 +2924,7 @@ export async function upsertService(
defaultMethodType: service.serviceType === "External" ? "Buy" : "Make",
itemTrackingType: service.itemTrackingType,
unitOfMeasureCode: "EA",
- active: service.active,
+ active: true,
companyId: service.companyId,
createdBy: service.createdBy,
})
@@ -2974,7 +2974,7 @@ export async function upsertService(
service.serviceType === "External" ? "Buy" : ("Make" as "Buy"),
itemTrackingType: service.itemTrackingType,
unitOfMeasureCode: null,
- active: service.active,
+ active: true,
};
const serviceUpdate = {
@@ -3057,7 +3057,7 @@ export async function upsertTool(
defaultMethodType: tool.defaultMethodType,
itemTrackingType: tool.itemTrackingType,
unitOfMeasureCode: tool.unitOfMeasureCode,
- active: tool.active,
+ active: true,
modelUploadId: tool.modelUploadId,
companyId: tool.companyId,
createdBy: tool.createdBy,
@@ -3103,7 +3103,7 @@ export async function upsertTool(
defaultMethodType: tool.defaultMethodType,
itemTrackingType: tool.itemTrackingType,
unitOfMeasureCode: tool.unitOfMeasureCode,
- active: tool.active,
+ active: true,
};
const toolUpdate = {
diff --git a/apps/erp/app/modules/sales/ui/Opportunity/OpportunityDocuments.tsx b/apps/erp/app/modules/sales/ui/Opportunity/OpportunityDocuments.tsx
index d42db2bd61..85c76a44ec 100644
--- a/apps/erp/app/modules/sales/ui/Opportunity/OpportunityDocuments.tsx
+++ b/apps/erp/app/modules/sales/ui/Opportunity/OpportunityDocuments.tsx
@@ -197,9 +197,11 @@ const DraggableCell = ({
const { attributes, listeners, setNodeRef, transform } = useDraggable({
id: attachment.id,
data: {
- ...attachment,
- size: attachment.metadata?.size,
+ id: attachment.id,
+ name: attachment.name,
+ size: attachment.metadata?.size || 0,
path: getPath(attachment),
+ type: "opportunityDocument",
},
});
diff --git a/apps/erp/app/modules/sales/ui/Quotes/QuoteExplorer.tsx b/apps/erp/app/modules/sales/ui/Quotes/QuoteExplorer.tsx
index c1a47497fa..da60f2c17c 100644
--- a/apps/erp/app/modules/sales/ui/Quotes/QuoteExplorer.tsx
+++ b/apps/erp/app/modules/sales/ui/Quotes/QuoteExplorer.tsx
@@ -14,6 +14,7 @@ import {
HStack,
IconButton,
Kbd,
+ Spinner,
Tooltip,
TooltipContent,
TooltipTrigger,
@@ -23,7 +24,8 @@ import {
VStack,
} from "@carbon/react";
import { prettifyKeyboardShortcut } from "@carbon/utils";
-import { Link, useNavigate, useParams } from "@remix-run/react";
+import { useDroppable } from "@dnd-kit/core";
+import { Link, useFetchers, useNavigate, useParams } from "@remix-run/react";
import { useMemo, useRef, useState } from "react";
import {
LuBraces,
@@ -117,23 +119,60 @@ export default function QuoteExplorer({ methods }: QuoteExplorerProps) {
},
});
+ const { setNodeRef: setExplorerRef, isOver: isOverExplorer } = useDroppable({
+ id: "quote-explorer",
+ });
+
+ const optimisticDrags = useOptimisticDocumentDrag();
+
+ const linesByItemId = new Map<string, QuotationLine | OptimisticQuoteLine>(
+ quoteData?.lines?.map((line) => [line.itemId!, line]) ?? []
+ );
+
+ // Merge pending items with existing items
+ for (let pendingItem of optimisticDrags) {
+ let existingItem = linesByItemId.get(pendingItem.itemId!);
+ let merged = existingItem
+ ? { ...existingItem, ...pendingItem }
+ : { ...pendingItem, quoteId };
+ linesByItemId.set(pendingItem.itemId!, merged);
+ }
+
+ const linesToRender = Array.from(linesByItemId.values()).sort((a, b) =>
+ (a.itemReadableId ?? "").localeCompare(b.itemReadableId ?? "")
+ );
+
return (
- <>
+ <div
+ ref={setExplorerRef}
+ data-quote-explorer
+ className={cn(
+ "transition-colors duration-200",
+ isOverExplorer && "bg-primary/10 border-2 border-dashed border-primary"
+ )}
+ >
<VStack className="w-full h-[calc(100dvh-99px)] justify-between">
<VStack
className="flex-1 overflow-y-auto scrollbar-thin scrollbar-track-transparent scrollbar-thumb-accent"
spacing={0}
>
- {quoteData?.lines && quoteData?.lines?.length > 0 ? (
- quoteData?.lines.map((line) => (
- <QuoteLineItem
- key={line.id}
- isDisabled={isDisabled}
- line={line}
- onDelete={onDeleteLine}
- methods={methods}
- />
- ))
+ {linesToRender.length > 0 ? (
+ linesToRender.map((line) =>
+ !isQuoteLine(line) ? (
+ <OptimisticQuoteLineItem
+ key={line.itemId}
+ line={line as OptimisticQuoteLine}
+ />
+ ) : (
+ <DroppableQuoteLineItem
+ key={line.id}
+ isDisabled={isDisabled}
+ line={line as QuotationLine}
+ onDelete={onDeleteLine}
+ methods={methods}
+ />
+ )
+ )
) : (
<Empty>
{permissions.can("update", "sales") && (
@@ -182,7 +221,115 @@ export default function QuoteExplorer({ methods }: QuoteExplorerProps) {
{deleteLineDisclosure.isOpen && (
<DeleteQuoteLine line={deleteLine!} onCancel={onDeleteCancel} />
)}
- </>
+ </div>
+ );
+}
+
+function isQuoteLine(
+ line: QuotationLine | OptimisticQuoteLine
+): line is QuotationLine {
+ return "id" in line && "status" in line && "methodType" in line;
+}
+
+type OptimisticQuoteLine = {
+ itemId?: string;
+ itemReadableId?: string;
+ customerPartId?: string;
+ customerPartRevision?: string;
+};
+
+function OptimisticQuoteLineItem({ line }: { line: OptimisticQuoteLine }) {
+ return (
+ <VStack spacing={0} className="border-b">
+ <HStack className="w-full p-2 items-center justify-between hover:bg-accent/30 cursor-pointer">
+ <HStack spacing={2} className="flex-grow min-w-0 pr-10">
+ <div className="w-10 h-10 bg-gradient-to-bl from-muted to-muted/40 rounded-lg p-2 flex items-center justify-center">
+ <Spinner className="w-6 h-6 text-muted-foreground" />
+ </div>
+ <VStack spacing={0} className="min-w-0">
+ <span className="font-semibold line-clamp-1">
+ {line.itemReadableId || line.customerPartId}
+ </span>
+ <span className="font-medium text-muted-foreground text-xs line-clamp-1">
+ Creating part...
+ </span>
+ </VStack>
+ </HStack>
+ <div className="absolute right-2 opacity-50">
+ <HStack spacing={1}>
+ <div className="w-8 h-8 bg-muted/50 rounded animate-pulse" />
+ </HStack>
+ </div>
+ </HStack>
+ </VStack>
+ );
+}
+
+export function useOptimisticDocumentDrag() {
+ type PendingItem = ReturnType<typeof useFetchers>[number] & {
+ formData: FormData;
+ };
+ const { quoteId } = useParams();
+ return useFetchers()
+ .filter((fetcher): fetcher is PendingItem => {
+ return fetcher.formAction === path.to.quoteDrag(quoteId!);
+ })
+ .reduce<OptimisticQuoteLine[]>((acc, fetcher) => {
+ const payload = fetcher?.formData?.get("payload");
+ if (payload) {
+ try {
+ const parsedPayload = JSON.parse(payload as string);
+ const fileName = parsedPayload.name?.replace(/\.[^/.]+$/, "") || "";
+ return [
+ ...acc,
+ {
+ itemReadableId: fileName,
+ customerPartId: fileName,
+ customerPartRevision: "",
+ itemId: `pending-${parsedPayload.id}`,
+ },
+ ];
+ } catch {
+ // nothing
+ }
+ }
+ return acc;
+ }, []);
+}
+
+type DroppableQuoteLineItemProps = {
+ line: QuotationLine;
+ isDisabled: boolean;
+ onDelete: (line: QuotationLine) => void;
+ methods: Tree<QuoteMethod>[];
+};
+
+function DroppableQuoteLineItem({
+ line,
+ isDisabled,
+ onDelete,
+ methods,
+}: DroppableQuoteLineItemProps) {
+ const { setNodeRef, isOver } = useDroppable({
+ id: `quote-line-${line.id}`,
+ data: { lineId: line.id },
+ });
+
+ return (
+ <div
+ ref={setNodeRef}
+ className={cn(
+ "transition-colors duration-200 w-full",
+ isOver && "bg-primary/20 border-2 border-dashed border-primary"
+ )}
+ >
+ <QuoteLineItem
+ line={line}
+ isDisabled={isDisabled}
+ onDelete={onDelete}
+ methods={methods}
+ />
+ </div>
);
}
diff --git a/apps/erp/app/routes/x+/quote+/$quoteId.drag.tsx b/apps/erp/app/routes/x+/quote+/$quoteId.drag.tsx
new file mode 100644
index 0000000000..aba52915a3
--- /dev/null
+++ b/apps/erp/app/routes/x+/quote+/$quoteId.drag.tsx
@@ -0,0 +1,292 @@
+import { openai } from "@ai-sdk/openai";
+import { assertIsPost, error, getCarbonServiceRole } from "@carbon/auth";
+import { requirePermissions } from "@carbon/auth/auth.server";
+import { flash } from "@carbon/auth/session.server";
+import type { modelThumbnailTask } from "@carbon/jobs/trigger/model-thumbnail";
+import { supportedModelTypes } from "@carbon/utils";
+import { tasks } from "@trigger.dev/sdk/v3";
+import type { ActionFunctionArgs } from "@vercel/remix";
+import { json, redirect } from "@vercel/remix";
+import { generateObject } from "ai";
+import { nanoid } from "nanoid";
+import { z } from "zod";
+import { upsertPart } from "~/modules/items";
+import {
+ getQuote,
+ upsertQuoteLine,
+ upsertQuoteLineMethod,
+} from "~/modules/sales";
+import { path } from "~/utils/path";
+
+const quoteDragValidator = z.object({
+ id: z.string(),
+ name: z.string(),
+ size: z.number(),
+ path: z.string(),
+ lineId: z.string().optional(),
+});
+
+export async function action({ request, params }: ActionFunctionArgs) {
+ assertIsPost(request);
+ const { client, companyId, userId } = await requirePermissions(request, {
+ create: "sales",
+ });
+
+ const { quoteId } = params;
+ if (!quoteId) throw new Error("Could not find quoteId");
+
+ const formData = await request.formData();
+ const payload = formData.get("payload");
+ if (!payload || typeof payload !== "string") {
+ throw new Error("Invalid payload");
+ }
+
+ const validation = quoteDragValidator.safeParse(JSON.parse(payload));
+ if (!validation.success) {
+ return json({ error: validation.error.flatten() }, { status: 400 });
+ }
+
+ const { name: fileName, path: documentPath, size, lineId } = validation.data;
+
+ const serviceRole = getCarbonServiceRole();
+
+ const quote = await getQuote(serviceRole, quoteId);
+ if (quote.error || !quote.data) {
+ throw redirect(
+ path.to.quote(quoteId),
+ await flash(request, error(quote.error, "Failed to get quote details"))
+ );
+ }
+
+ let targetLineId = lineId;
+ let partId: string | undefined;
+ const partName = fileName.replace(/\.[^/.]+$/, "");
+
+ if (!targetLineId) {
+ // Only create a new part and quote line if lineId is not provided
+ // Extract filename without extension for the part name
+
+ let readableId = partName;
+ let revision = "0";
+ try {
+ const { object: parsedFilename } = await generateObject({
+ // @ts-ignore
+ model: openai("gpt-4o-mini"),
+ schema: z.object({
+ partId: z
+ .string()
+ .describe("The part identifier extracted from the filename"),
+ revision: z
+ .string()
+ .nullable()
+ .describe("The revision number if present, null if not found"),
+ }),
+ prompt: `Extract the part ID and revision from this filename: "${partName}". The part ID should be the main identifier, and revision should be any version/revision indicator if present.`,
+ });
+
+ readableId = parsedFilename.partId;
+ revision = parsedFilename.revision || "0";
+ } catch (error) {
+ console.error(error);
+ }
+
+ let suffix = 1;
+
+ // Check for uniqueness and append a suffix if necessary
+ while (true) {
+ const existingItem = await serviceRole
+ .from("item")
+ .select("id")
+ .eq("readableId", readableId)
+ .eq("revision", revision)
+ .eq("companyId", companyId)
+ .single();
+
+ if (existingItem.error || !existingItem.data) {
+ // readableId is unique, we can use it
+ break;
+ }
+
+ // If not unique, append or increment suffix
+ revision = `${revision} (${suffix})`;
+ suffix++;
+ }
+
+ const partData = {
+ id: readableId,
+ name: readableId,
+ defaultMethodType: "Make" as const,
+ itemTrackingType: "Inventory" as const,
+ replenishmentSystem: "Make" as const,
+ revision,
+ unitOfMeasureCode: "EA",
+ companyId,
+ createdBy: userId,
+ };
+
+ const part = await upsertPart(serviceRole, partData);
+ if (part.error || !part.data?.id) {
+ throw redirect(
+ path.to.quote(quoteId),
+ await flash(request, error(part.error, "Failed to create part"))
+ );
+ }
+
+ partId = part.data?.id;
+
+ const quoteLineData = {
+ quoteId,
+ itemId: partId ?? "",
+ status: "Not Started" as const,
+ estimatorId: userId,
+ description: partName,
+ methodType: "Make" as const,
+ customerPartId: partName,
+ customerPartRevision: "",
+ unitOfMeasureCode: "EA",
+ taxPercent: 0,
+ quantity: [1],
+ companyId,
+ createdBy: userId,
+ };
+
+ const createQuotationLine = await upsertQuoteLine(
+ serviceRole,
+ quoteLineData
+ );
+ if (createQuotationLine.error || !createQuotationLine.data) {
+ throw redirect(
+ path.to.quote(quoteId),
+ await flash(
+ request,
+ error(createQuotationLine.error, "Failed to create quote line.")
+ )
+ );
+ }
+
+ targetLineId = createQuotationLine.data.id;
+
+ // Create quote line method for Make items
+ const upsertMethod = await upsertQuoteLineMethod(serviceRole, {
+ quoteId,
+ quoteLineId: targetLineId,
+ itemId: partId ?? "",
+ configuration: undefined,
+ companyId,
+ userId,
+ });
+
+ if (upsertMethod.error) {
+ throw redirect(
+ path.to.quoteLine(quoteId, targetLineId),
+ await flash(
+ request,
+ error(upsertMethod.error, "Failed to create quote line method.")
+ )
+ );
+ }
+ } else {
+ const existingLine = await serviceRole
+ .from("quoteLine")
+ .select("itemId")
+ .eq("id", targetLineId)
+ .eq("companyId", companyId)
+ .single();
+
+ if (existingLine.error || !existingLine.data) {
+ throw redirect(
+ path.to.quote(quoteId),
+ await flash(
+ request,
+ error(existingLine.error, "Failed to find quote line")
+ )
+ );
+ }
+
+ partId = existingLine.data.itemId;
+ }
+
+ const extension = fileName.split(".").pop();
+ const is3DModel = extension && supportedModelTypes.includes(extension);
+ let newPath = "";
+
+ if (is3DModel) {
+ const modelId = nanoid();
+ const fileExtension = fileName.split(".").pop();
+ newPath = `${companyId}/models/${modelId}.${fileExtension}`;
+
+ // Create model record
+ const modelRecord = await client.from("modelUpload").insert({
+ id: modelId,
+ modelPath: newPath,
+ name: fileName,
+ size: size ?? 0,
+ companyId,
+ createdBy: userId,
+ });
+
+ if (modelRecord.error) {
+ console.error(
+ `Failed to create model record for ${fileName}:`,
+ modelRecord.error
+ );
+ return false;
+ }
+
+ // Link model to quote line and item (if partId exists)
+ const updates = [
+ client
+ .from("quoteLine")
+ .update({ modelUploadId: modelId })
+ .eq("id", targetLineId),
+ ];
+
+ if (partId && modelId) {
+ updates.push(
+ // @ts-ignore
+ client.from("item").update({ modelUploadId: modelId }).eq("id", partId)
+ );
+ }
+
+ const [lineUpdate] = await Promise.all(updates);
+
+ if (lineUpdate.error) {
+ console.error(
+ `Failed to link model to sales order line:`,
+ lineUpdate.error
+ );
+ }
+
+ // Move the file to the new path
+ const move = await client.storage
+ .from("private")
+ .move(documentPath, newPath);
+
+ if (move.error) {
+ throw redirect(
+ path.to.quote(quoteId),
+ await flash(request, error(move.error, "Failed to move file"))
+ );
+ }
+
+ await tasks.trigger<typeof modelThumbnailTask>("model-thumbnail", {
+ companyId,
+ modelId,
+ });
+ } else {
+ newPath = `${companyId}/opportunity-line/${targetLineId}/${fileName}`;
+ // Move the file to the new path
+ const move = await client.storage
+ .from("private")
+ .move(documentPath, newPath);
+
+ if (move.error) {
+ throw redirect(
+ path.to.quote(quoteId),
+ await flash(request, error(move.error, "Failed to move file"))
+ );
+ }
+ }
+
+ return json({ success: true, quoteLineId: targetLineId });
+}
diff --git a/apps/erp/app/routes/x+/quote+/$quoteId.tsx b/apps/erp/app/routes/x+/quote+/$quoteId.tsx
index f3741865ad..0a2473eb6e 100644
--- a/apps/erp/app/routes/x+/quote+/$quoteId.tsx
+++ b/apps/erp/app/routes/x+/quote+/$quoteId.tsx
@@ -2,8 +2,11 @@ import { error } from "@carbon/auth";
import { requirePermissions } from "@carbon/auth/auth.server";
import { flash } from "@carbon/auth/session.server";
import { VStack } from "@carbon/react";
-import { Outlet, useLoaderData, useParams } from "@remix-run/react";
+import type { DragEndEvent } from "@dnd-kit/core";
+import { DndContext } from "@dnd-kit/core";
+import { Outlet, useLoaderData, useParams, useSubmit } from "@remix-run/react";
import type { PostgrestResponse } from "@supabase/supabase-js";
+import type { FileObject } from "@supabase/storage-js";
import type { LoaderFunctionArgs } from "@vercel/remix";
import { defer, redirect } from "@vercel/remix";
import { PanelProvider, ResizablePanels } from "~/components/Layout/Panels";
@@ -26,6 +29,7 @@ import {
QuoteHeader,
QuoteProperties,
} from "~/modules/sales/ui/Quotes";
+import { useOptimisticDocumentDrag } from "~/modules/sales/ui/Quotes/QuoteExplorer";
import type { Handle } from "~/utils/handle";
import { path } from "~/utils/path";
@@ -143,27 +147,71 @@ export default function QuoteRoute() {
const { quoteId } = params;
if (!quoteId) throw new Error("Could not find quoteId");
const { methods } = useLoaderData<typeof loader>();
+ const submit = useSubmit();
+ const pendingItems = useOptimisticDocumentDrag();
+
+ const handleDrop = (
+ document: FileObject & { path: string },
+ targetId: string
+ ) => {
+ if (
+ pendingItems.find((item: any) => item.itemId === `pending-${document.id}`)
+ )
+ return;
+
+ const formData = new FormData();
+ const payload = {
+ id: document.id,
+ name: document.name,
+ size: document.metadata?.size || 0,
+ path: document.path,
+ lineId: targetId.startsWith("quote-line-")
+ ? targetId.replace("quote-line-", "")
+ : undefined,
+ };
+
+ formData.append("payload", JSON.stringify(payload));
+
+ submit(formData, {
+ method: "post",
+ action: path.to.quoteDrag(quoteId),
+ navigate: false,
+ fetcherKey: `quote-drag:${document.name}`,
+ });
+ };
+
+ const handleDragEnd = (event: DragEndEvent) => {
+ const { over, active } = event;
+ if (over && active.data.current?.type === "opportunityDocument") {
+ handleDrop(
+ active.data.current as unknown as FileObject & { path: string },
+ over.id as string
+ );
+ }
+ };
return (
- <PanelProvider key={quoteId}>
- <div className="flex flex-col h-[calc(100dvh-49px)] overflow-hidden w-full ">
- <QuoteHeader />
- <div className="flex h-[calc(100dvh-99px)] overflow-hidden w-full">
- <div className="flex flex-grow overflow-hidden">
- <ResizablePanels
- explorer={<QuoteExplorer methods={methods} />}
- content={
- <div className="h-[calc(100dvh-99px)] overflow-y-auto scrollbar-thin scrollbar-track-transparent scrollbar-thumb-accent w-full">
- <VStack spacing={2} className="p-2">
- <Outlet />
- </VStack>
- </div>
- }
- properties={<QuoteProperties />}
- />
+ <DndContext onDragEnd={handleDragEnd}>
+ <PanelProvider key={quoteId}>
+ <div className="flex flex-col h-[calc(100dvh-49px)] overflow-hidden w-full ">
+ <QuoteHeader />
+ <div className="flex h-[calc(100dvh-99px)] overflow-hidden w-full">
+ <div className="flex flex-grow overflow-hidden">
+ <ResizablePanels
+ explorer={<QuoteExplorer methods={methods} />}
+ content={
+ <div className="h-[calc(100dvh-99px)] overflow-y-auto scrollbar-thin scrollbar-track-transparent scrollbar-thumb-accent w-full">
+ <VStack spacing={2} className="p-2">
+ <Outlet />
+ </VStack>
+ </div>
+ }
+ properties={<QuoteProperties />}
+ />
+ </div>
</div>
</div>
- </div>
- </PanelProvider>
+ </PanelProvider>
+ </DndContext>
);
}
diff --git a/apps/erp/app/utils/path.ts b/apps/erp/app/utils/path.ts
index 8320763ff3..8c607dd78a 100644
--- a/apps/erp/app/utils/path.ts
+++ b/apps/erp/app/utils/path.ts
@@ -1092,6 +1092,7 @@ export const path = {
`${x}/quote/${quoteId}/lines/${lineId}/assembly/${assemblyId}`
),
quoteDetails: (id: string) => generatePath(`${x}/quote/${id}/details`),
+ quoteDrag: (id: string) => generatePath(`${x}/quote/${id}/drag`),
quoteDuplicate: (id: string) => generatePath(`${x}/quote/${id}/duplicate`),
quoteExchangeRate: (id: string) =>
generatePath(`${x}/quote/${id}/exchange-rate`),
diff --git a/apps/mes/app/components/OperationsList.tsx b/apps/mes/app/components/OperationsList.tsx
index 36ed540d7b..f3f8ea8449 100644
--- a/apps/mes/app/components/OperationsList.tsx
+++ b/apps/mes/app/components/OperationsList.tsx
@@ -69,8 +69,8 @@ const cardVariants = cva(
Ready: "",
Done: "",
Paused: "",
- Canceled: "border-red-500/30",
- Waiting: "",
+ Canceled: "opacity-50 border-red-500",
+ Waiting: "opacity-50",
Todo: "border-border",
},
},