doc compare

This commit is contained in:
2026-03-15 21:07:28 -05:00
parent f3e421e9e3
commit a43374fe77
24 changed files with 1142 additions and 55 deletions

View File

@@ -123,6 +123,32 @@ export interface SupportLogEntryDto {
createdAt: string;
}
export interface SupportLogFiltersDto {
level?: SupportLogEntryDto["level"];
source?: string;
query?: string;
start?: string;
end?: string;
limit?: number;
}
export interface SupportLogSummaryDto {
totalCount: number;
filteredCount: number;
sourceCount: number;
retentionDays: number;
oldestEntryAt: string | null;
newestEntryAt: string | null;
levelCounts: Record<SupportLogEntryDto["level"], number>;
}
export interface SupportLogListDto {
entries: SupportLogEntryDto[];
summary: SupportLogSummaryDto;
availableSources: string[];
filters: SupportLogFiltersDto;
}
export interface SupportSnapshotDto {
generatedAt: string;
diagnostics: AdminDiagnosticsDto;
@@ -130,7 +156,7 @@ export interface SupportSnapshotDto {
roleCount: number;
activeUserEmails: string[];
backupGuidance: BackupGuidanceDto;
recentSupportLogs: SupportLogEntryDto[];
supportLogs: SupportLogListDto;
}
export interface AdminDiagnosticsDto {

View File

@@ -65,6 +65,7 @@ export interface PurchaseOrderDetailDto extends PurchaseOrderSummaryDto {
createdAt: string;
lines: PurchaseLineDto[];
receipts: PurchaseReceiptDto[];
revisions: PurchaseOrderRevisionDto[];
}
export interface PurchaseOrderInput {
@@ -74,9 +75,82 @@ export interface PurchaseOrderInput {
taxPercent: number;
freightAmount: number;
notes: string;
revisionReason?: string;
lines: PurchaseLineInput[];
}
export interface PurchaseOrderRevisionSnapshotLineDto {
itemId: string;
itemSku: string;
itemName: string;
description: string;
quantity: number;
unitOfMeasure: InventoryUnitOfMeasure;
unitCost: number;
lineTotal: number;
receivedQuantity: number;
remainingQuantity: number;
salesOrderId: string | null;
salesOrderLineId: string | null;
salesOrderNumber: string | null;
position: number;
}
export interface PurchaseOrderRevisionSnapshotReceiptLineDto {
id: string;
purchaseOrderLineId: string;
itemId: string;
itemSku: string;
itemName: string;
quantity: number;
}
export interface PurchaseOrderRevisionSnapshotReceiptDto {
id: string;
receiptNumber: string;
purchaseOrderId: string;
receivedAt: string;
notes: string;
createdAt: string;
createdByName: string;
warehouseId: string;
warehouseCode: string;
warehouseName: string;
locationId: string;
locationCode: string;
locationName: string;
totalQuantity: number;
lineCount: number;
lines: PurchaseOrderRevisionSnapshotReceiptLineDto[];
}
export interface PurchaseOrderRevisionSnapshotDto {
documentNumber: string;
vendorId: string;
vendorName: string;
status: PurchaseOrderStatus;
issueDate: string;
taxPercent: number;
taxAmount: number;
freightAmount: number;
subtotal: number;
total: number;
notes: string;
paymentTerms: string | null;
currencyCode: string | null;
lines: PurchaseOrderRevisionSnapshotLineDto[];
receipts: PurchaseOrderRevisionSnapshotReceiptDto[];
}
export interface PurchaseOrderRevisionDto {
id: string;
revisionNumber: number;
reason: string;
createdAt: string;
createdByName: string | null;
snapshot: PurchaseOrderRevisionSnapshotDto;
}
export interface PurchaseReceiptLineDto {
id: string;
purchaseOrderLineId: string;

View File

@@ -64,6 +64,38 @@ export interface SalesDocumentDetailDto extends SalesDocumentSummaryDto {
revisions: SalesDocumentRevisionDto[];
}
export interface SalesDocumentRevisionSnapshotLineDto {
itemId: string;
itemSku: string;
itemName: string;
description: string;
quantity: number;
unitOfMeasure: InventoryUnitOfMeasure;
unitPrice: number;
lineTotal: number;
position: number;
}
export interface SalesDocumentRevisionSnapshotDto {
documentNumber: string;
customerId: string;
customerName: string;
status: SalesDocumentStatus;
approvedAt: string | null;
approvedByName: string | null;
issueDate: string;
expiresAt: string | null;
discountPercent: number;
discountAmount: number;
taxPercent: number;
taxAmount: number;
freightAmount: number;
subtotal: number;
total: number;
notes: string;
lines: SalesDocumentRevisionSnapshotLineDto[];
}
export interface SalesOrderPlanningNodeDto {
itemId: string;
itemSku: string;
@@ -193,4 +225,5 @@ export interface SalesDocumentRevisionDto {
reason: string;
createdAt: string;
createdByName: string | null;
snapshot: SalesDocumentRevisionSnapshotDto;
}