feat(inventory): add spare parts management
This commit is contained in:
parent
abc6e308dd
commit
fb5c2cc26a
43 changed files with 2950 additions and 2 deletions
|
|
@ -17,6 +17,7 @@ export interface DashboardSummary {
|
|||
users: MetricCard[];
|
||||
roles: MetricCard[];
|
||||
repairs: MetricCard[];
|
||||
inventory: MetricCard[];
|
||||
system_status: SystemStatusItem[];
|
||||
activities: EmptyWidget;
|
||||
tasks: EmptyWidget;
|
||||
|
|
|
|||
121
frontend/athena/types/inventory.ts
Normal file
121
frontend/athena/types/inventory.ts
Normal file
|
|
@ -0,0 +1,121 @@
|
|||
export type InventoryMovementType =
|
||||
| "initial"
|
||||
| "purchase"
|
||||
| "adjustment"
|
||||
| "reservation"
|
||||
| "release"
|
||||
| "consumption"
|
||||
| "return"
|
||||
| "correction";
|
||||
|
||||
export interface InventoryCategory {
|
||||
id: number;
|
||||
name: string;
|
||||
slug: string;
|
||||
description: string | null;
|
||||
created_at: string;
|
||||
updated_at: string;
|
||||
}
|
||||
|
||||
export interface InventoryLocation {
|
||||
id: number;
|
||||
name: string;
|
||||
description: string | null;
|
||||
created_at: string;
|
||||
updated_at: string;
|
||||
}
|
||||
|
||||
export interface InventorySupplier {
|
||||
id: number;
|
||||
name: string;
|
||||
contact_name: string | null;
|
||||
email: string | null;
|
||||
phone: string | null;
|
||||
website: string | null;
|
||||
customer_number: string | null;
|
||||
notes: string | null;
|
||||
created_at: string;
|
||||
updated_at: string;
|
||||
}
|
||||
|
||||
export interface InventoryItem {
|
||||
id: number;
|
||||
sku: string;
|
||||
name: string;
|
||||
description: string | null;
|
||||
category_id: number | null;
|
||||
manufacturer: string | null;
|
||||
manufacturer_part_number: string | null;
|
||||
supplier_id: number | null;
|
||||
supplier_part_number: string | null;
|
||||
compatible_devices: string | null;
|
||||
location_id: number | null;
|
||||
quantity_on_hand: number;
|
||||
quantity_reserved: number;
|
||||
quantity_available: number;
|
||||
reorder_level: number;
|
||||
unit: string;
|
||||
purchase_price_cents: number | null;
|
||||
selling_price_cents: number | null;
|
||||
currency: string;
|
||||
tax_rate_percent: string;
|
||||
notes: string | null;
|
||||
is_active: boolean;
|
||||
created_at: string;
|
||||
updated_at: string;
|
||||
category: InventoryCategory | null;
|
||||
supplier: InventorySupplier | null;
|
||||
location: InventoryLocation | null;
|
||||
}
|
||||
|
||||
export interface InventoryItemListResponse {
|
||||
items: InventoryItem[];
|
||||
total: number;
|
||||
limit: number;
|
||||
offset: number;
|
||||
}
|
||||
|
||||
export interface InventoryStockMovement {
|
||||
id: number;
|
||||
item_id: number;
|
||||
movement_type: InventoryMovementType;
|
||||
quantity: number;
|
||||
reason: string;
|
||||
reference_type: string | null;
|
||||
reference_id: number | null;
|
||||
note: string | null;
|
||||
actor_user_id: number | null;
|
||||
actor_username: string;
|
||||
created_at: string;
|
||||
}
|
||||
|
||||
export type InventoryItemPayload = {
|
||||
sku: string | null;
|
||||
name: string;
|
||||
description: string | null;
|
||||
category_id: number | null;
|
||||
manufacturer: string | null;
|
||||
manufacturer_part_number: string | null;
|
||||
supplier_id: number | null;
|
||||
supplier_part_number: string | null;
|
||||
compatible_devices: string | null;
|
||||
location_id: number | null;
|
||||
quantity_on_hand: number;
|
||||
quantity_reserved: number;
|
||||
reorder_level: number;
|
||||
unit: string;
|
||||
purchase_price_cents: number | null;
|
||||
selling_price_cents: number | null;
|
||||
currency: string;
|
||||
tax_rate_percent: string;
|
||||
notes: string | null;
|
||||
is_active: boolean;
|
||||
};
|
||||
|
||||
export type InventoryStockPayload = {
|
||||
quantity: number;
|
||||
reason: string;
|
||||
note: string | null;
|
||||
reference_type: string | null;
|
||||
reference_id: number | null;
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue