Files
2026-08-15 10:38:10 +03:30

160 lines
5.8 KiB
TypeScript

import { DashboardService } from './dashboard.service';
export declare class DashboardController {
private readonly dashboardService;
constructor(dashboardService: DashboardService);
getDashboard(): Promise<{
stats: {
newOrders: number;
pendingReview: number;
pendingCheck: number;
finalApproval: number;
todaySales: number;
todaySalesGrowth: number;
monthSales: number;
};
recentOrders: {
id: string;
orderNumber: string;
userId: string;
companyId: string;
companyName: string;
settlementType: import("@prisma/client").$Enums.SettlementType | null;
settlementMethod: import("@prisma/client").$Enums.SettlementType | null;
checkMode: import("@prisma/client").$Enums.CheckRegistrationMode | undefined;
status: import("@prisma/client").$Enums.OrderStatus;
adminStatus: string;
allowedTransitions: import("@prisma/client").$Enums.OrderStatus[];
totalMeterage: number;
meterage: number;
totalAmount: number | null;
shippingCost: number | null;
totalDiscount: number | null;
finalAmount: number | null;
pricesVisible: boolean;
notes: string | undefined;
checkRassDays: number | undefined;
checkRassDate: string | undefined;
cashInvoiceExpiresAt: string | undefined;
createdAt: string;
updatedAt: string;
customerName: string;
customerPhone: string;
customerNationalId: string | undefined;
customerType: import("@prisma/client").$Enums.CustomerType;
items: {
id: string;
productId: string | undefined;
catalogCode: string;
productName: string;
productCode: string | undefined;
color: string;
requestedMeterage: number;
confirmedMeterage: number | null;
unitPrice: number | null;
supplyPrice: number | null;
unitDiscount: number | null;
discount: number | null;
lineTotal: number | null;
totalAmount: number | null;
notes: string | undefined;
companyId: string;
companyName: string;
}[];
checks: {
id: string;
orderId: string;
row: number;
amount: number;
dueDate: string;
sayadId: string | undefined;
checkNumber: string | undefined;
ownerNationalId: string | undefined;
ownerFirstName: string | undefined;
ownerLastName: string | undefined;
bankName: string;
branchName: string | undefined;
frontImage: string | undefined;
backImage: string | undefined;
notes: string | undefined;
mode: import("@prisma/client").$Enums.CheckRegistrationMode;
status: import("@prisma/client").$Enums.CheckStatus;
createdAt: string;
updatedAt: string;
}[];
cashReceipt: {
id: string;
amount: number;
paidAmount: number | null;
transferDate: string | null;
transferTime: string | undefined;
trackingNumber: string | undefined;
trackingCode: string | undefined;
destinationAccountId: string | undefined;
receiptImage: string | undefined;
notes: string | undefined;
expiresAt: string | undefined;
status: import("@prisma/client").$Enums.CashPaymentStatus;
submittedAt: string | undefined;
createdAt: string;
} | undefined;
shipment: {
id: string;
orderId: string;
carrier: string;
trackingNumber: string;
meterage: number;
status: import("@prisma/client").$Enums.ShipmentStatus;
shippedAt: string | null;
deliveredAt: string | null;
} | undefined;
statusHistory: {
id: string;
fromStatus: import("@prisma/client").$Enums.OrderStatus | null;
toStatus: import("@prisma/client").$Enums.OrderStatus;
changedBy: string;
note: string | undefined;
reason: string | undefined;
changedAt: string;
}[];
}[];
salesChartData: number[];
chartAxisLabels: string[];
checkDeadlines: {
id: string;
label: string;
tone: "warning" | "danger" | "neutral";
count: number;
amount: number;
}[];
notifications: {
id: string;
title: string;
body: string;
tone: import("@prisma/client").$Enums.NotificationTone | null;
link: string | null;
isRead: boolean;
sentAt: string;
}[];
messages: {
id: string;
senderName: string;
subject: string;
preview: string;
isRead: boolean;
sentAt: string;
}[];
}>;
getReports(): Promise<{
reportSalesByCompany: {
companyName: string;
orderCount: number;
totalAmount: number;
meterage: number;
}[];
reportOrdersByStatus: {
status: string;
count: number;
}[];
}>;
}