mirror of
https://github.com/R0m1k3/LogiFlow.git
synced 2026-10-20 05:28:22 +02:00
Automatically verify invoices upon page load for improved efficiency
Introduces automatic invoice verification on page load using useEffect hook, refactors invoice verification service to fetch active NocoDB configuration, and updates routes to accept invoice reference and group ID. Replit-Commit-Author: Agent Replit-Commit-Session-Id: 7c468936-2a88-4686-ac0a-84921a45222d Replit-Commit-Checkpoint-Type: full_checkpoint Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/1957c339-2757-4d1f-8e92-e9f71a1ce58e/7c468936-2a88-4686-ac0a-84921a45222d/CltQiuj
This commit is contained in:
1 parent
88d2c4a4c8
commit
4cf7a5c602
5 files changed
+126
-119
No files matched your search
@@ -2541,6 +2541,44 @@ class MemStorage implements IStorage {
|
||||
return { userId, roleId, assignedBy, assignedAt: new Date() };
|
||||
}
|
||||
async removeRoleFromUser(): Promise<void> {}
|
||||
|
||||
// NocoDB Configuration methods
|
||||
async getActiveNocodbConfig(): Promise<NocodbConfig | undefined> {
|
||||
// En développement, créer une config de test
|
||||
const testConfig: NocodbConfig = {
|
||||
id: 1,
|
||||
name: 'Configuration Test NocoDB',
|
||||
baseUrl: 'https://nocodb-test.example.com',
|
||||
projectId: 'test-project-id',
|
||||
apiToken: 'test-api-token-123',
|
||||
description: 'Configuration de test pour vérification des factures',
|
||||
isActive: true,
|
||||
createdBy: 'admin',
|
||||
createdAt: new Date(),
|
||||
updatedAt: new Date(),
|
||||
};
|
||||
|
||||
console.log('🔧 Retour config NocoDB test:', testConfig);
|
||||
return testConfig;
|
||||
}
|
||||
|
||||
async getInvoiceVerificationCache(cacheKey: string): Promise<InvoiceVerificationCache | undefined> {
|
||||
return undefined; // Pas de cache en développement
|
||||
}
|
||||
|
||||
async createInvoiceVerificationCache(cache: InsertInvoiceVerificationCache): Promise<InvoiceVerificationCache> {
|
||||
const newCache: InvoiceVerificationCache = {
|
||||
...cache,
|
||||
id: 1,
|
||||
createdAt: new Date(),
|
||||
updatedAt: new Date(),
|
||||
};
|
||||
return newCache;
|
||||
}
|
||||
|
||||
async clearExpiredCache(): Promise<void> {
|
||||
// No-op en développement
|
||||
}
|
||||
}
|
||||
|
||||
// Use MemStorage in development, DatabaseStorage in production
|
||||
|
||||
Reference in new issue
Block a user