sales
This commit is contained in:
22
client/src/modules/inventory/InventoryAttachmentsPanel.tsx
Normal file
22
client/src/modules/inventory/InventoryAttachmentsPanel.tsx
Normal file
@@ -0,0 +1,22 @@
|
||||
import { FileAttachmentsPanel } from "../../components/FileAttachmentsPanel";
|
||||
import { inventoryFileOwnerType } from "./config";
|
||||
|
||||
export function InventoryAttachmentsPanel({
|
||||
itemId,
|
||||
onAttachmentCountChange,
|
||||
}: {
|
||||
itemId: string;
|
||||
onAttachmentCountChange?: (count: number) => void;
|
||||
}) {
|
||||
return (
|
||||
<FileAttachmentsPanel
|
||||
ownerType={inventoryFileOwnerType}
|
||||
ownerId={itemId}
|
||||
eyebrow="Attachments"
|
||||
title="Drawings and support docs"
|
||||
description="Store drawings, cut sheets, work instructions, and other manufacturing support files on the item record."
|
||||
emptyMessage="No drawings or support documents have been added to this item yet."
|
||||
onAttachmentCountChange={onAttachmentCountChange}
|
||||
/>
|
||||
);
|
||||
}
|
||||
@@ -6,6 +6,7 @@ import { Link, useParams } from "react-router-dom";
|
||||
import { useAuth } from "../../auth/AuthProvider";
|
||||
import { api, ApiError } from "../../lib/api";
|
||||
import { emptyInventoryTransactionInput, inventoryTransactionOptions } from "./config";
|
||||
import { InventoryAttachmentsPanel } from "./InventoryAttachmentsPanel";
|
||||
import { InventoryStatusBadge } from "./InventoryStatusBadge";
|
||||
import { InventoryTransactionTypeBadge } from "./InventoryTransactionTypeBadge";
|
||||
import { InventoryTypeBadge } from "./InventoryTypeBadge";
|
||||
@@ -355,6 +356,7 @@ export function InventoryDetailPage() {
|
||||
)}
|
||||
</article>
|
||||
</section>
|
||||
<InventoryAttachmentsPanel itemId={item.id} />
|
||||
</section>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -92,6 +92,8 @@ export const inventoryStatusPalette: Record<InventoryItemStatus, string> = {
|
||||
OBSOLETE: "border border-rose-400/30 bg-rose-500/12 text-rose-700 dark:text-rose-300",
|
||||
};
|
||||
|
||||
export const inventoryFileOwnerType = "inventory-item";
|
||||
|
||||
export const inventoryTypePalette: Record<InventoryItemType, string> = {
|
||||
PURCHASED: "border border-slate-400/30 bg-slate-500/12 text-slate-700 dark:text-slate-300",
|
||||
MANUFACTURED: "border border-amber-400/30 bg-amber-500/12 text-amber-700 dark:text-amber-300",
|
||||
|
||||
Reference in New Issue
Block a user