Commit Graph
241 Commits
Author SHA1 Message Date
michaelschal 0a565ea490 Add management capability for system backups to the platform
Implement and expose new API endpoints for managing backups including listing, downloading, and deleting, enhancing the existing backup system.

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/2HHgup2
2025-08-13 21:10:58 +00:00
michaelschal d68043c336 Grant admins access to manage backup pages and features
Update permissions to allow 'admin' role access to the 'backups' module, enabling management operations, and modify the BackupManager component to reflect this new permission check.

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/2HHgup2
2025-08-13 21:06:52 +00:00
michaelschal b079d35e3a Improve production stability by fixing backup directory permissions
Adjust Dockerfile to create and grant permissions for backup directories, install PostgreSQL client for backups, and update BackupService to use the correct production backup path to resolve EACCES errors.

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/K3Lzcje
2025-08-13 21:03:48 +00:00
michaelschal 1c126fb77a Resolve production issues by implementing a PostgreSQL backup module and fixing ESM compatibility
Replace `node-cron` with native `setTimeout` in `backupService.ts` to address dynamic require errors in ESM, and introduce a PostgreSQL backup module with administrative interface and automated scheduling.

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/fhCGgjv
2025-08-13 21:01:25 +00:00
michaelschal fbeb36c04a Add system for managing and scheduling data backups
Introduce a new backup management feature with automated scheduling, manual backups, and a dedicated interface for viewing backup status and details. This includes integrating `node-cron` for scheduling, updating the database schema to store backup information, and creating new routes and components for the backup manager.

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/9xfbVBU
2025-08-13 20:55:27 +00:00
michaelschal bfc90053f0 Add database backup and restore functionality for administrators
Introduce endpoints and UI for managing PostgreSQL database backups, including automatic nightly backups, manual backups, and the ability to download and delete backup files.

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/B7k6m01
2025-08-13 20:42:59 +00:00
michaelschal 3b46f945a4 Stabilize calendar display by refining data caching and invalidation
Fix an issue where closing an order or delivery card caused all calendar entries to disappear by implementing selective cache invalidation and adjusting cache timings.

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/B7k6m01
2025-08-13 20:34:02 +00:00
michaelschal e32f83de1f Reduce excessive console logging to improve application performance
Fix: Remove numerous console logs that were causing latency and performance issues in production environments.
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/B7k6m01
2025-08-13 20:27:55 +00:00
michaelschal da2af1e29d Reduce production latency by conditionally logging API requests and responses
Conditionally disable verbose logging in production to resolve latency issues caused by excessive console output in API requests and responses.

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/B7k6m01
2025-08-13 16:08:41 +00:00
michaelschal 947896c212 Improve invoice verification saving and update user permission handling
Add `saveInvoiceVerificationCache` to storage interfaces, implement it in `DatabaseStorage` and `MemStorage`, adjust user type in `AuthRequest` to `any`, and initialize group/supplier counters in `MemStorage`.

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/ce6DSX9
2025-08-13 15:06:14 +00:00
michaelschal 73a090f54f Fix error when saving invoice verification data to cache
Correct the `storage.saveInvoiceVerificationCache` method call within the InvoiceVerificationService to resolve a TypeError and ensure proper caching of invoice verification results.

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/ce6DSX9
2025-08-13 15:02:10 +00:00
michaelschal 4a8bdc5cf0 Fix delivery validation issue by correctly formatting date for PostgreSQL
Corrected the `deliveredDate` to use a `Date` object directly instead of `toISOString()` when validating deliveries, resolving a `TypeError` in Drizzle ORM and restoring production functionality.

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/ce6DSX9
2025-08-13 14:53:55 +00:00
michaelschal c9cb1ad23e Restore delivery validation by fixing complex database joins
Fix delivery validation errors in production by simplifying SQL joins in the getDelivery function and handling user data loading separately.

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/ce6DSX9
2025-08-13 14:46:08 +00:00
michaelschal a55f75a438 Fix issue preventing delivery validation and update admin password reset
Resolve production authentication error preventing users from validating deliveries, and enhance the admin password reset mechanism for improved security.

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/jMd9JtM
2025-08-13 14:40:25 +00:00
michaelschal 5ef170b38c Show who created each order and delivery in the system
Add a `creator` object to the order and delivery retrieval queries, joining the `users` table on the `createdBy` column to include creator details.

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/jMd9JtM
2025-08-13 14:33:30 +00:00
michaelschal 7fcd550147 Improve reconciliation display and fix statistics calculations
Update reconciliation logic to use cache invalidation and refetch for immediate UI updates, and correct statistical calculations by using `deliveredDate` for monthly delivery metrics.

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/csL8uKw
2025-08-13 14:24:00 +00:00
michaelschal cc37f4cceb Enable automatic invoice verification upon page load
Re-enable automatic invoice verification when the reconciliation page loads, with a delay and cache mechanism to prevent server overload.

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/h2xHW56
2025-08-13 13:49:08 +00:00
michaelschal 5ecf79edf3 Update monthly statistics to include only delivered items
Refine calculation in DatabaseStorage to filter deliveries by 'delivered' status and non-null deliveredDate for monthly statistics.

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/8m96Erd
2025-08-13 13:47:51 +00:00
michaelschal 7fb037bf53 Improve invoice verification by adding caching and manual refresh functionality
Implement an invoice verification cache to avoid redundant checks, introduce a manual refresh button to trigger verification on demand, and modify the API to accept a forceRefresh parameter.

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/Sh7jLhH
2025-08-13 13:46:11 +00:00
michaelschal 414c32f110 Adjust invoice reference display to move it to the left side
Adjusted the layout in the BLReconciliation page to move the invoice reference display to the left column.

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/0V9QMsa
2025-08-13 13:40:55 +00:00
michaelschal 95f1fff7ae Remove old session cookie data from configuration
Remove previously stored session cookie information from the cookies.txt file.

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/0egIF7T
2025-08-13 13:33:53 +00:00
michaelschal 87c111741b Update invoice verification to use specific NocoDB table IDs
Refactor invoice verification service to correctly utilize `nocodbTableId` for NocoDB API calls, defaulting to 'mrr733dfb8wtt9b' if not provided. Updates column names for invoice and delivery slip searches to 'RefFacture' and 'Numero_BL' respectively. Also, corrects NocoDB configuration URLs and project IDs for production environments.

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/t34W525
2025-08-13 13:30:44 +00:00
michaelschal d7241e857e Fixes server build issues and resolves duplicate variable declarations
Resolves build failures in production by fixing duplicate variable declarations in `server/index.production.ts` and ensuring successful esbuild compilation, eliminating TypeScript errors.

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/cH9Kvea
2025-08-13 13:11:14 +00:00
michaelschal 1745e73b52 Resolve production errors and improve system stability and reliability
Fix critical production errors, including Bad Gateway issues and TypeScript compilation failures, by implementing comprehensive route registration, correcting service configurations, and ensuring production build success.

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/cH9Kvea
2025-08-13 13:00:39 +00:00
michaelschal d128c721e8 Enable invoice verification using NocoDB for production environments
Implement actual NocoDB integration for invoice verification, including error handling and configuration loading, and adjust test data to reflect production-like structures.

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/cH9Kvea
2025-08-13 12:54:17 +00:00
michaelschal 49a1325d7f Ensure system connects to the production database for accurate data
Force the use of DatabaseStorage in all environments to access real PostgreSQL data, overriding previous development configurations.

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/fY3G4XT
2025-08-13 12:41:11 +00:00
michaelschal 5f5ea30c78 Add ability to view and manage DLC products with role-based access
Implement API endpoints for fetching DLC products, their statistics, and individual details, with filtering and permission checks based on user roles and group IDs. Update storage methods to support group-based filtering for customer orders, DLC products, and tasks.

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/KsafRhL
2025-08-13 12:39:57 +00:00
michaelschal 9fd0a9d26c Add customer order retrieval and task relation fetching
Implement `getCustomerOrders` and `getCustomerOrder` in `DatabaseStorage` to fetch customer orders with associated supplier and group data. Also, add `TaskWithRelations` type and update imports for `NocodbConfig` and `InvoiceVerificationCache`.

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/Xw5SMyq
2025-08-13 12:35:22 +00:00
michaelschal a9c2b4ffb9 Update date filtering and delivery calculations for improved performance
Refactor date handling in DatabaseStorage to use direct date comparisons instead of new Date() objects, adjust pending order filtering, and correct calculations for average delivery delay.

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/oW0kTqb
2025-08-13 12:18:01 +00:00
michaelschal 5259e2b2cd Fix dashboard statistics and refine production data calculations
Update server logic to accurately calculate monthly statistics from the database, improve handling of end dates for month calculations, and add development mode mock data for statistics.

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/yRuCvpw
2025-08-13 12:14:54 +00:00
michaelschal e4ad3539c7 Improve invoice verification and error handling for deliveries
Fix JSON parsing errors, create a missing invoice verification service with development simulation, and align PostgreSQL schemas with production types.

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/DT38biO
2025-08-13 12:11:18 +00:00
michaelschal 5ac9c97e23 Fix production issues to stabilize invoice verification system
Address critical production errors, including an API fetch method error and PostgreSQL schema misalignment, to ensure stable operation of the invoice verification system.

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/kBGENAD
2025-08-13 12:05:29 +00:00
michaelschal fbe4900132 Update order and delivery details to show quantity and units
Adjust data structures and queries in server storage to reflect new quantity and unit fields, replacing palettes and packages, and renaming expectedDate to plannedDate.

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/X8f62sk
2025-08-13 11:58:06 +00:00
michaelschal fc67bd00c9 Restore and fix NocoDB invoice verification system functionality
Reinstated the NocoDB invoice verification service, reconnecting it to PostgreSQL and resolving 163 compilation errors in storage.ts. Updated user group retrieval to exclude non-existent Nocodb columns, ensuring compatibility between development and production environments.

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/TOxnwYK
2025-08-13 11:48:26 +00:00
michaelschal 4cf7a5c602 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
2025-08-13 11:37:57 +00:00
michaelschal 88d2c4a4c8 Add NocoDB invoice verification system and enhance existing configurations
Integrate NocoDB invoice verification with new schema and storage operations, streamline existing NocoDB configuration endpoints, and introduce cache management for invoice verification.

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/ehBF9El
2025-08-13 11:29:42 +00:00
michaelschal 382fb4c112 Enhance delivery reconciliation to include webhook URLs for verification
Update BLReconciliation component to check for webhookUrl in delivery groups and add console logs for debugging production environment issues related to delivery data.

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/ehBF9El
2025-08-13 11:19:19 +00:00
michaelschal 7ebd84e0e1 Integrate NocoDB configuration directly into store settings for invoice verification
Refactor invoice verification to use group-specific NocoDB configuration, removing the global `nocodbConfig` table and cache, and updating UI to reflect these changes.

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/ehBF9El
2025-08-13 11:14:47 +00:00
michaelschal 19ed96e48c Improve NocoDB invoice verification and error handling
Enhance NocoDB invoice verification logic in the client and server to handle missing configurations and provide better debugging information. Update schema definitions to reflect changes in NocoDB configuration handling.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 7c468936-2a88-4686-ac0a-84921a45222d
Replit-Commit-Checkpoint-Type: full_checkpoint
2025-08-13 11:02:33 +00:00
michaelschal 955f3d3b3d Add schemas for NocoDB configuration and invoice verification
Add Zod schemas for inserting NocoDB configuration and invoice verification cache data.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 7c468936-2a88-4686-ac0a-84921a45222d
Replit-Commit-Checkpoint-Type: full_checkpoint
2025-08-13 11:00:27 +00:00
michaelschal 967f34ae7f Add NocoDB invoice verification to reconcile deliveries automatically
Integrate NocoDB for automated invoice verification against delivery records, supporting both invoice reference and Bill of Lading number matching, with caching and improved UI feedback.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 7c468936-2a88-4686-ac0a-84921a45222d
Replit-Commit-Checkpoint-Type: full_checkpoint
2025-08-13 10:18:51 +00:00
michaelschal 695cd8ad7c Restored to 'd418fda3c966ae0ab78451c384bd2504f82bcd1f'
Replit-Restored-To: d418fda3c9
2025-08-13 10:00:17 +00:00
michaelschal 3721ea9a14 Saved your changes before rolling back
Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 7c468936-2a88-4686-ac0a-84921a45222d
Replit-Commit-Checkpoint-Type: full_checkpoint
2025-08-13 10:00:13 +00:00
michaelschal 6eb55e14d8 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
2025-08-13 09:54:25 +00:00
michaelschal 76a6d4c8ae Add invoice verification functionality to track invoice checks
Implement database operations for managing invoice verification records and their cache, including creation and retrieval.

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/3uCfEKb
2025-08-13 09:50:16 +00:00
michaelschal 5a16936591 Improve NocoDB configuration handling for production deployments
Update client and server logic to gracefully handle missing NocoDB configurations, providing more informative error messages and ensuring optional NocoDB fields are handled correctly.

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/3uCfEKb
2025-08-13 09:21:08 +00:00
michaelschal e6b09fc9d3 Refactor NocoDB verification service for improved configuration handling
Update `NocodbVerificationService` to load `NocodbConfig` and `GroupConfig` separately, enhancing error handling and providing default column names.

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/3uCfEKb
2025-08-13 09:18:09 +00:00
michaelschal bc85434858 Add invoice verification system using NocoDB for automated data checks
Integrates NocoDB to verify invoice references and supplier matches, and allows searching by BL number to auto-populate delivery details, enhancing reconciliation accuracy and efficiency.

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/3uCfEKb
2025-08-13 09:11:48 +00:00
michaelschal d418fda3c9 Improve delivery reconciliation by ensuring group data is fetched correctly
Refactor DatabaseStorage to explicitly select group columns and add webhook URLs to test groups in MemStorage. Also includes debug logging in BLReconciliation.

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/oAFKRkH
2025-08-13 08:32:46 +00:00
michaelschal f75a7ea25c Add functionality to upload and send invoices via webhook integration
Implement a modal for uploading PDF invoices, selecting invoice types, and sending them to configured webhook URLs for deliveries lacking validation or invoice numbers.

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/MvDLhQ6
2025-08-13 08:25:56 +00:00