documents

This commit is contained in:
2026-03-15 00:47:16 -05:00
parent 21c2bbeaa8
commit 9d8f6767fb
9 changed files with 17 additions and 8 deletions

View File

@@ -1,5 +1,4 @@
import type { InventoryItemOptionDto } from "@mrp/shared/dist/inventory/types.js";
import type { PurchaseLineInput, PurchaseOrderInput, PurchaseVendorOptionDto } from "@mrp/shared";
import type { InventoryItemOptionDto, PurchaseLineInput, PurchaseOrderInput, PurchaseVendorOptionDto } from "@mrp/shared";
import { useEffect, useState } from "react";
import { Link, useNavigate, useParams } from "react-router-dom";
@@ -32,7 +31,7 @@ export function PurchaseFormPage({ mode }: { mode: "create" | "edit" }) {
}
api.getPurchaseVendors(token).then(setVendors).catch(() => setVendors([]));
api.getInventoryItemOptions(token).then(setItemOptions).catch(() => setItemOptions([]));
api.getInventoryItemOptions(token).then((options) => setItemOptions(options.filter((option: InventoryItemOptionDto) => option.isPurchasable))).catch(() => setItemOptions([]));
}, [token]);
useEffect(() => {