This commit is contained in:
2026-06-02 10:23:09 +03:00
parent e08d555b23
commit 0c87eaef46
136 changed files with 16069 additions and 94 deletions

41
lib/types.ts Normal file
View File

@@ -0,0 +1,41 @@
export type OrderStatus = "pending" | "purchased" | "delivered" | "closed";
export interface OrderItemData {
id: string;
orderId: string;
customerId: string | null;
customerName: string | null;
itemName: string;
initPrice: number;
myPrice: number;
taxRatio: number;
quantity: number;
netPrice: number;
myNetPrice: number;
finalPrice: number;
}
export interface OrderWithDetails {
id: string;
title: string;
status: OrderStatus;
notes: string | null;
createdAt: Date;
updatedAt: Date;
customers: { customer: { id: string; name: string } }[];
items: OrderItemData[];
}
export interface DashboardStats {
pending: number;
purchased: number;
delivered: number;
closed: number;
totalOrders: number;
}
export interface FormState {
errors?: Record<string, string[]>;
message?: string;
success?: boolean;
}