density
This commit is contained in:
@@ -34,7 +34,7 @@ export function InventoryDetailPage() {
|
||||
}, [itemId, token]);
|
||||
|
||||
if (!item) {
|
||||
return <div className="rounded-[28px] border border-line/70 bg-surface/90 p-8 text-sm text-muted shadow-panel">{status}</div>;
|
||||
return <div className="rounded-[28px] border border-line/70 bg-surface/90 p-6 text-sm text-muted shadow-panel">{status}</div>;
|
||||
}
|
||||
|
||||
return (
|
||||
@@ -43,7 +43,7 @@ export function InventoryDetailPage() {
|
||||
<div className="flex flex-col gap-4 lg:flex-row lg:items-start lg:justify-between">
|
||||
<div>
|
||||
<p className="text-xs font-semibold uppercase tracking-[0.24em] text-muted">Inventory Detail</p>
|
||||
<h3 className="mt-3 text-3xl font-bold text-text">{item.sku}</h3>
|
||||
<h3 className="mt-3 text-2xl font-bold text-text">{item.sku}</h3>
|
||||
<p className="mt-2 text-base text-text">{item.name}</p>
|
||||
<div className="mt-4 flex flex-wrap gap-3">
|
||||
<InventoryTypeBadge type={item.type} />
|
||||
@@ -56,7 +56,7 @@ export function InventoryDetailPage() {
|
||||
Back to items
|
||||
</Link>
|
||||
{canManage ? (
|
||||
<Link to={`/inventory/items/${item.id}/edit`} className="inline-flex items-center justify-center rounded-2xl bg-brand px-5 py-3 text-sm font-semibold text-white">
|
||||
<Link to={`/inventory/items/${item.id}/edit`} className="inline-flex items-center justify-center rounded-2xl bg-brand px-3 py-2 text-sm font-semibold text-white">
|
||||
Edit item
|
||||
</Link>
|
||||
) : null}
|
||||
@@ -99,7 +99,7 @@ export function InventoryDetailPage() {
|
||||
<p className="text-xs font-semibold uppercase tracking-[0.24em] text-muted">Bill Of Materials</p>
|
||||
<h4 className="mt-3 text-xl font-bold text-text">Component structure</h4>
|
||||
{item.bomLines.length === 0 ? (
|
||||
<div className="mt-6 rounded-3xl border border-dashed border-line/70 bg-page/60 px-6 py-12 text-center text-sm text-muted">
|
||||
<div className="mt-6 rounded-3xl border border-dashed border-line/70 bg-page/60 px-4 py-8 text-center text-sm text-muted">
|
||||
No BOM lines are defined for this item yet.
|
||||
</div>
|
||||
) : (
|
||||
@@ -107,24 +107,24 @@ export function InventoryDetailPage() {
|
||||
<table className="min-w-full divide-y divide-line/70 text-sm">
|
||||
<thead className="bg-page/80 text-left text-muted">
|
||||
<tr>
|
||||
<th className="px-4 py-3">Position</th>
|
||||
<th className="px-4 py-3">Component</th>
|
||||
<th className="px-4 py-3">Quantity</th>
|
||||
<th className="px-4 py-3">UOM</th>
|
||||
<th className="px-4 py-3">Notes</th>
|
||||
<th className="px-2 py-2">Position</th>
|
||||
<th className="px-2 py-2">Component</th>
|
||||
<th className="px-2 py-2">Quantity</th>
|
||||
<th className="px-2 py-2">UOM</th>
|
||||
<th className="px-2 py-2">Notes</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody className="divide-y divide-line/70 bg-surface">
|
||||
{item.bomLines.map((line) => (
|
||||
<tr key={line.id}>
|
||||
<td className="px-4 py-3 text-muted">{line.position}</td>
|
||||
<td className="px-4 py-3">
|
||||
<td className="px-2 py-2 text-muted">{line.position}</td>
|
||||
<td className="px-2 py-2">
|
||||
<div className="font-semibold text-text">{line.componentSku}</div>
|
||||
<div className="mt-1 text-xs text-muted">{line.componentName}</div>
|
||||
</td>
|
||||
<td className="px-4 py-3 text-muted">{line.quantity}</td>
|
||||
<td className="px-4 py-3 text-muted">{line.unitOfMeasure}</td>
|
||||
<td className="px-4 py-3 text-muted">{line.notes || "—"}</td>
|
||||
<td className="px-2 py-2 text-muted">{line.quantity}</td>
|
||||
<td className="px-2 py-2 text-muted">{line.unitOfMeasure}</td>
|
||||
<td className="px-2 py-2 text-muted">{line.notes || "—"}</td>
|
||||
</tr>
|
||||
))}
|
||||
</tbody>
|
||||
|
||||
@@ -45,13 +45,13 @@ export function InventoryListPage() {
|
||||
<div className="flex flex-col gap-4 lg:flex-row lg:items-start lg:justify-between">
|
||||
<div>
|
||||
<p className="text-xs font-semibold uppercase tracking-[0.24em] text-muted">Inventory</p>
|
||||
<h3 className="mt-3 text-2xl font-bold text-text">Item Master</h3>
|
||||
<h3 className="mt-3 text-xl font-bold text-text">Item Master</h3>
|
||||
<p className="mt-2 max-w-2xl text-sm text-muted">
|
||||
Core item and BOM definitions for purchased parts, manufactured items, assemblies, and service SKUs.
|
||||
</p>
|
||||
</div>
|
||||
{canManage ? (
|
||||
<Link to="/inventory/items/new" className="inline-flex items-center justify-center rounded-2xl bg-brand px-5 py-3 text-sm font-semibold text-white">
|
||||
<Link to="/inventory/items/new" className="inline-flex items-center justify-center rounded-2xl bg-brand px-3 py-2 text-sm font-semibold text-white">
|
||||
New item
|
||||
</Link>
|
||||
) : null}
|
||||
@@ -95,9 +95,9 @@ export function InventoryListPage() {
|
||||
</select>
|
||||
</label>
|
||||
</div>
|
||||
<div className="mt-6 rounded-2xl border border-line/70 bg-page/60 px-4 py-3 text-sm text-muted">{status}</div>
|
||||
<div className="mt-6 rounded-2xl border border-line/70 bg-page/60 px-2 py-2 text-sm text-muted">{status}</div>
|
||||
{items.length === 0 ? (
|
||||
<div className="mt-6 rounded-3xl border border-dashed border-line/70 bg-page/60 px-6 py-12 text-center text-sm text-muted">
|
||||
<div className="mt-6 rounded-3xl border border-dashed border-line/70 bg-page/60 px-4 py-8 text-center text-sm text-muted">
|
||||
No inventory items have been added yet.
|
||||
</div>
|
||||
) : (
|
||||
@@ -105,37 +105,37 @@ export function InventoryListPage() {
|
||||
<table className="min-w-full divide-y divide-line/70 text-sm">
|
||||
<thead className="bg-page/80 text-left text-muted">
|
||||
<tr>
|
||||
<th className="px-4 py-3">Item</th>
|
||||
<th className="px-4 py-3">Type</th>
|
||||
<th className="px-4 py-3">Status</th>
|
||||
<th className="px-4 py-3">UOM</th>
|
||||
<th className="px-4 py-3">Flags</th>
|
||||
<th className="px-4 py-3">BOM</th>
|
||||
<th className="px-4 py-3">Updated</th>
|
||||
<th className="px-2 py-2">Item</th>
|
||||
<th className="px-2 py-2">Type</th>
|
||||
<th className="px-2 py-2">Status</th>
|
||||
<th className="px-2 py-2">UOM</th>
|
||||
<th className="px-2 py-2">Flags</th>
|
||||
<th className="px-2 py-2">BOM</th>
|
||||
<th className="px-2 py-2">Updated</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody className="divide-y divide-line/70 bg-surface">
|
||||
{items.map((item) => (
|
||||
<tr key={item.id} className="transition hover:bg-page/70">
|
||||
<td className="px-4 py-3">
|
||||
<td className="px-2 py-2">
|
||||
<Link to={`/inventory/items/${item.id}`} className="font-semibold text-text hover:text-brand">
|
||||
{item.sku}
|
||||
</Link>
|
||||
<div className="mt-1 text-xs text-muted">{item.name}</div>
|
||||
</td>
|
||||
<td className="px-4 py-3">
|
||||
<td className="px-2 py-2">
|
||||
<InventoryTypeBadge type={item.type} />
|
||||
</td>
|
||||
<td className="px-4 py-3">
|
||||
<td className="px-2 py-2">
|
||||
<InventoryStatusBadge status={item.status} />
|
||||
</td>
|
||||
<td className="px-4 py-3 text-muted">{item.unitOfMeasure}</td>
|
||||
<td className="px-4 py-3 text-xs text-muted">
|
||||
<td className="px-2 py-2 text-muted">{item.unitOfMeasure}</td>
|
||||
<td className="px-2 py-2 text-xs text-muted">
|
||||
<div>{item.isSellable ? "Sellable" : "Not sellable"}</div>
|
||||
<div>{item.isPurchasable ? "Purchasable" : "Not purchasable"}</div>
|
||||
</td>
|
||||
<td className="px-4 py-3 text-muted">{item.bomLineCount} lines</td>
|
||||
<td className="px-4 py-3 text-muted">{new Date(item.updatedAt).toLocaleDateString()}</td>
|
||||
<td className="px-2 py-2 text-muted">{item.bomLineCount} lines</td>
|
||||
<td className="px-2 py-2 text-muted">{new Date(item.updatedAt).toLocaleDateString()}</td>
|
||||
</tr>
|
||||
))}
|
||||
</tbody>
|
||||
|
||||
@@ -35,18 +35,18 @@ export function WarehousesPage() {
|
||||
<div className="flex flex-col gap-4 lg:flex-row lg:items-start lg:justify-between">
|
||||
<div>
|
||||
<p className="text-xs font-semibold uppercase tracking-[0.24em] text-muted">Inventory</p>
|
||||
<h3 className="mt-3 text-2xl font-bold text-text">Warehouses</h3>
|
||||
<h3 className="mt-3 text-xl font-bold text-text">Warehouses</h3>
|
||||
<p className="mt-2 max-w-2xl text-sm text-muted">Physical warehouse records and their internal stock locations.</p>
|
||||
</div>
|
||||
{canManage ? (
|
||||
<Link to="/inventory/warehouses/new" className="inline-flex items-center justify-center rounded-2xl bg-brand px-5 py-3 text-sm font-semibold text-white">
|
||||
<Link to="/inventory/warehouses/new" className="inline-flex items-center justify-center rounded-2xl bg-brand px-3 py-2 text-sm font-semibold text-white">
|
||||
New warehouse
|
||||
</Link>
|
||||
) : null}
|
||||
</div>
|
||||
<div className="mt-6 rounded-2xl border border-line/70 bg-page/60 px-4 py-3 text-sm text-muted">{status}</div>
|
||||
<div className="mt-6 rounded-2xl border border-line/70 bg-page/60 px-2 py-2 text-sm text-muted">{status}</div>
|
||||
{warehouses.length === 0 ? (
|
||||
<div className="mt-6 rounded-3xl border border-dashed border-line/70 bg-page/60 px-6 py-12 text-center text-sm text-muted">
|
||||
<div className="mt-6 rounded-3xl border border-dashed border-line/70 bg-page/60 px-4 py-8 text-center text-sm text-muted">
|
||||
No warehouses have been added yet.
|
||||
</div>
|
||||
) : (
|
||||
@@ -54,23 +54,23 @@ export function WarehousesPage() {
|
||||
<table className="min-w-full divide-y divide-line/70 text-sm">
|
||||
<thead className="bg-page/80 text-left text-muted">
|
||||
<tr>
|
||||
<th className="px-4 py-3">Code</th>
|
||||
<th className="px-4 py-3">Name</th>
|
||||
<th className="px-4 py-3">Locations</th>
|
||||
<th className="px-4 py-3">Updated</th>
|
||||
<th className="px-2 py-2">Code</th>
|
||||
<th className="px-2 py-2">Name</th>
|
||||
<th className="px-2 py-2">Locations</th>
|
||||
<th className="px-2 py-2">Updated</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody className="divide-y divide-line/70 bg-surface">
|
||||
{warehouses.map((warehouse) => (
|
||||
<tr key={warehouse.id} className="transition hover:bg-page/70">
|
||||
<td className="px-4 py-3 font-semibold text-text">
|
||||
<td className="px-2 py-2 font-semibold text-text">
|
||||
<Link to={`/inventory/warehouses/${warehouse.id}`} className="hover:text-brand">
|
||||
{warehouse.code}
|
||||
</Link>
|
||||
</td>
|
||||
<td className="px-4 py-3 text-muted">{warehouse.name}</td>
|
||||
<td className="px-4 py-3 text-muted">{warehouse.locationCount}</td>
|
||||
<td className="px-4 py-3 text-muted">{new Date(warehouse.updatedAt).toLocaleDateString()}</td>
|
||||
<td className="px-2 py-2 text-muted">{warehouse.name}</td>
|
||||
<td className="px-2 py-2 text-muted">{warehouse.locationCount}</td>
|
||||
<td className="px-2 py-2 text-muted">{new Date(warehouse.updatedAt).toLocaleDateString()}</td>
|
||||
</tr>
|
||||
))}
|
||||
</tbody>
|
||||
|
||||
Reference in New Issue
Block a user