mirror of
https://github.com/R0m1k3/LogiFlow.git
synced 2026-10-18 20:57:40 +02:00
Improve invoice verification system with production caching
Refactor the invoice verification service to use existing cache tables for improved performance and introduce a new production service for NocoDB interactions. Replit-Commit-Author: Agent Replit-Commit-Session-Id: c52a701b-4841-4d00-b8cf-5a41c12abdf3 Replit-Commit-Checkpoint-Type: full_checkpoint Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/1957c339-2757-4d1f-8e92-e9f71a1ce58e/c52a701b-4841-4d00-b8cf-5a41c12abdf3/qlJl4IC
This commit is contained in:
1 parent
76a6d4c8ae
commit
6eb55e14d8
6 files changed
+434
-14
No files matched your search
@@ -2622,6 +2622,52 @@ class MemStorage implements IStorage {
|
||||
return { userId, roleId, assignedBy, assignedAt: new Date() };
|
||||
}
|
||||
async removeRoleFromUser(): Promise<void> {}
|
||||
|
||||
// Invoice Verification operations - Stubs pour développement
|
||||
async getInvoiceVerifications(deliveryId?: number): Promise<InvoiceVerification[]> {
|
||||
console.log('📋 MemStorage - getInvoiceVerifications called (development mode)');
|
||||
return [];
|
||||
}
|
||||
|
||||
async createInvoiceVerification(verification: InsertInvoiceVerification): Promise<InvoiceVerification> {
|
||||
console.log('📋 MemStorage - createInvoiceVerification called (development mode)');
|
||||
return {
|
||||
id: 1,
|
||||
deliveryId: verification.deliveryId,
|
||||
groupId: verification.groupId,
|
||||
invoiceReference: verification.invoiceReference,
|
||||
supplierName: verification.supplierName,
|
||||
exists: verification.exists,
|
||||
matchType: verification.matchType,
|
||||
verifiedAt: new Date(),
|
||||
isValid: true,
|
||||
lastCheckedAt: new Date()
|
||||
};
|
||||
}
|
||||
|
||||
async getInvoiceVerificationCache(cacheKey: string): Promise<InvoiceVerificationCache | undefined> {
|
||||
console.log('📋 MemStorage - getInvoiceVerificationCache called (development mode)');
|
||||
return undefined;
|
||||
}
|
||||
|
||||
async createInvoiceVerificationCache(cache: InsertInvoiceVerificationCache): Promise<InvoiceVerificationCache> {
|
||||
console.log('📋 MemStorage - createInvoiceVerificationCache called (development mode)');
|
||||
return {
|
||||
id: 1,
|
||||
cacheKey: cache.cacheKey,
|
||||
groupId: cache.groupId,
|
||||
invoiceReference: cache.invoiceReference,
|
||||
supplierName: cache.supplierName,
|
||||
exists: cache.exists,
|
||||
matchType: cache.matchType,
|
||||
errorMessage: cache.errorMessage,
|
||||
cacheHit: cache.cacheHit,
|
||||
apiCallTime: cache.apiCallTime,
|
||||
expiresAt: cache.expiresAt,
|
||||
createdAt: new Date(),
|
||||
updatedAt: new Date()
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
// Use MemStorage in development, DatabaseStorage in production
|
||||
|
||||
Reference in new issue
Block a user