Commit Graph
65 Commits
Author SHA1 Message Date
michaelschal e70e860097 Add weather information display and configuration options
Integrate weather data fetching, display in a widget, and provide a settings page for configuration.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: d43bd811-9372-45a7-8ac9-4a954c0538e1
Replit-Commit-Checkpoint-Type: full_checkpoint
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/1957c339-2757-4d1f-8e92-e9f71a1ce58e/d43bd811-9372-45a7-8ac9-4a954c0538e1/BIZe1t3
2025-08-15 06:34:37 +00:00
michaelschal 48bfc884ed Improve product search functionality and data caching
Add server-side search and filtering for DLC products, and implement client-side debouncing for search terms. Optimize data fetching with extended stale times for stores, suppliers, and DLC stats to improve performance.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 78d55416-09d3-4c00-b411-444299b0da00
Replit-Commit-Checkpoint-Type: full_checkpoint
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/1957c339-2757-4d1f-8e92-e9f71a1ce58e/78d55416-09d3-4c00-b411-444299b0da00/WSwf4nZ
2025-08-14 17:34:11 +00:00
michaelschal fb4a4733f1 Update product data to correctly display expiry dates
Map the expiryDate field to dlcDate in the product data retrieval to resolve undefined date issues.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 31f9bd88-0285-4787-81b3-31ceeea5a08b
Replit-Commit-Checkpoint-Type: full_checkpoint
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/1957c339-2757-4d1f-8e92-e9f71a1ce58e/31f9bd88-0285-4787-81b3-31ceeea5a08b/Qz6UlZZ
2025-08-14 12:03:47 +00:00
michaelschal 2b42c97e20 Correct SAV ticket history actions for better data integrity
Fixes an issue where the SAV ticket history recorded 'ticket_created' instead of the standardized 'created' action, resolving a database constraint violation.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 31f9bd88-0285-4787-81b3-31ceeea5a08b
Replit-Commit-Checkpoint-Type: full_checkpoint
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/1957c339-2757-4d1f-8e92-e9f71a1ce58e/31f9bd88-0285-4787-81b3-31ceeea5a08b/1izfX0o
2025-08-14 10:25:06 +00:00
michaelschal d678b3fe7a Add new service for managing customer support tickets
Introduce the Service Après-Vente (SAV) module with API endpoints for ticket creation, retrieval, and filtering, integrated with the sidebar navigation and utilizing React Query for frontend state management.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 31f9bd88-0285-4787-81b3-31ceeea5a08b
Replit-Commit-Checkpoint-Type: full_checkpoint
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/1957c339-2757-4d1f-8e92-e9f71a1ce58e/31f9bd88-0285-4787-81b3-31ceeea5a08b/Dkpn0ry
2025-08-14 08:54:02 +00:00
michaelschal da4a46156e Include delivery details when fetching order information
Update the database storage to fetch associated delivery details for each order, enhancing order and delivery synchronization and providing a more comprehensive view of order status and related logistics.

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/Fs7Hj3b
2025-08-14 06:03:00 +00:00
michaelschal 4df74a66f2 Fix order status and delivery linking errors in production
Implement comprehensive PostgreSQL fixes to ensure correct order status updates and accurate display of order-delivery relationships, aligning production behavior with development 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/r577GWu
2025-08-13 21:59:47 +00:00
michaelschal 9a65f694b9 Fix order status incorrectly showing as delivered in production
Correctly set delivery and order statuses to 'planned' in production to resolve an issue where orders were incorrectly marked as 'delivered' upon delivery creation.

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/r577GWu
2025-08-13 21:53:41 +00:00
michaelschal 91be24e93a Correctly plan orders when creating deliveries and linking them
Adjust delivery creation logic in server/routes.ts and server/storage.ts to set the initial delivery status to 'planned' instead of 'delivered'. This change also ensures that linked orders are updated to a 'planned' status, preventing incorrect 'delivered' status assignments and resolving the issue where orders were being marked as delivered prematurely.

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/I42UgiS
2025-08-13 21:49:47 +00:00
michaelschal 00a95954d0 Restore visibility of linked order and delivery information in calendar views
Update storage logic to include associated deliveries within order details and link orders to delivery 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/tzcQQt9
2025-08-13 21:40:57 +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 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 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 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 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 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 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 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 695cd8ad7c Restored to 'd418fda3c966ae0ab78451c384bd2504f82bcd1f'
Replit-Restored-To: d418fda3c9
2025-08-13 10:00:17 +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 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 8de35b9709 Remove excess console logs from user management features
Remove console.log statements used for debugging in user creation, retrieval, and update operations across frontend and backend.

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/zOtcEz8
2025-08-13 08:14:09 +00:00
michaelschal 78f4c36515 Fix issue where customer orders and DLCs are incorrectly assigned to the wrong store
Add extensive logging to the storage layer and backend routes to diagnose and resolve an issue where customer orders and DLC products are being assigned to store #1 instead of the intended store #2, even when created by users associated with store #2. This includes detailed console logs within the `createCustomerOrder` and `createDlcProduct` functions in both the routes and storage layers, focusing on the `groupId` before and after database operations.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: b163d4c0-de5e-4f4e-a9c0-aed4c7049718
Replit-Commit-Checkpoint-Type: full_checkpoint
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/1957c339-2757-4d1f-8e92-e9f71a1ce58e/b163d4c0-de5e-4f4e-a9c0-aed4c7049718/32z3sin
2025-08-12 15:19:40 +00:00
michaelschal 4ca3c17bad Improve DLC product data handling and cache management
Update DLC product fetching to include group filtering, implement precise cache invalidation for DLC-related queries using `exact: false`, and add detailed logging for API requests and responses to aid in debugging.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: b163d4c0-de5e-4f4e-a9c0-aed4c7049718
Replit-Commit-Checkpoint-Type: full_checkpoint
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/1957c339-2757-4d1f-8e92-e9f71a1ce58e/b163d4c0-de5e-4f4e-a9c0-aed4c7049718/rEII9fE
2025-08-12 14:24:19 +00:00
michaelschal c79ac79a91 Enable automatic delivery validation for designated suppliers
Add automatic delivery validation logic to the reconciliation process, enabling auto-validation for deliveries from suppliers configured for automatic reconciliation when the delivery status is 'delivered' and a BL number is present. Includes a new method to retrieve supplier details and updates to documentation.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: b163d4c0-de5e-4f4e-a9c0-aed4c7049718
Replit-Commit-Checkpoint-Type: full_checkpoint
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/1957c339-2757-4d1f-8e92-e9f71a1ce58e/b163d4c0-de5e-4f4e-a9c0-aed4c7049718/FyjZ5oh
2025-08-12 10:16:28 +00:00
michaelschal 408e39c033 Filter publicities based on user group for accurate display
Modify DatabaseStorage to filter publicities by groupIds, ensuring users only see relevant promotions.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: b163d4c0-de5e-4f4e-a9c0-aed4c7049718
Replit-Commit-Checkpoint-Type: full_checkpoint
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/1957c339-2757-4d1f-8e92-e9f71a1ce58e/b163d4c0-de5e-4f4e-a9c0-aed4c7049718/ByygiiM
2025-08-11 21:57:39 +00:00
michaelschal e627ff650d Show relevant advertisements on the calendar based on store participation
Update client-side filtering logic to correctly display advertisements based on selected store or user group affiliations, and adjust backend query to fetch participation data.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: b163d4c0-de5e-4f4e-a9c0-aed4c7049718
Replit-Commit-Checkpoint-Type: full_checkpoint
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/1957c339-2757-4d1f-8e92-e9f71a1ce58e/b163d4c0-de5e-4f4e-a9c0-aed4c7049718/ByygiiM
2025-08-11 21:56:18 +00:00
michaelschal 0be08e3fd5 Ensure delivery and package counts display correctly
Update stats panel and storage logic to correctly cast counts to numbers, resolving display issues for palettes and packages.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: b163d4c0-de5e-4f4e-a9c0-aed4c7049718
Replit-Commit-Checkpoint-Type: full_checkpoint
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/1957c339-2757-4d1f-8e92-e9f71a1ce58e/b163d4c0-de5e-4f4e-a9c0-aed4c7049718/HUXctpj
2025-08-11 21:31:49 +00:00
michaelschal 64cab30834 Update statistics to count only delivered palettes and packages
Modify SQL queries in DatabaseStorage to filter order and delivery counts, ensuring that only palettes and packages associated with delivered orders and deliveries are included in the statistics. This addresses an issue where counts were displaying incorrectly for delivered items.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: b163d4c0-de5e-4f4e-a9c0-aed4c7049718
Replit-Commit-Checkpoint-Type: full_checkpoint
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/1957c339-2757-4d1f-8e92-e9f71a1ce58e/b163d4c0-de5e-4f4e-a9c0-aed4c7049718/76gymRV
2025-08-11 21:26:32 +00:00
michaelschal d14a4a31f6 Synchronize order and delivery statuses and dates in the calendar view
Fixes an issue where orders linked to delivered deliveries were not displaying the correct delivery date or status in the calendar. This includes updating the OrderDetailModal to show the correct dates, automatically updating order statuses when deliveries are marked as delivered, and providing a SQL script to correct existing data inconsistencies.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: a8a78c07-e900-425c-a577-5b4c5894379d
Replit-Commit-Checkpoint-Type: full_checkpoint
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/1957c339-2757-4d1f-8e92-e9f71a1ce58e/a8a78c07-e900-425c-a577-5b4c5894379d/0tRkXvo
2025-08-11 20:24:42 +00:00
michaelschal 6a2e5aad05 Prevent duplicate user entries by handling empty emails
Fixes an issue where creating or editing users with empty email fields would violate a unique constraint in the database. The solution involves updating user routes to treat empty email strings as NULL, adjusting validation schemas, and providing a script to clean existing data.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: a8a78c07-e900-425c-a577-5b4c5894379d
Replit-Commit-Checkpoint-Type: full_checkpoint
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/1957c339-2757-4d1f-8e92-e9f71a1ce58e/a8a78c07-e900-425c-a577-5b4c5894379d/zoO1uWT
2025-08-11 20:13:03 +00:00
michaelschal b886f317ca Improve user creation process with better error logging and testing
Add detailed logging and a test script to diagnose and fix user creation failures in production.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: a8a78c07-e900-425c-a577-5b4c5894379d
Replit-Commit-Checkpoint-Type: full_checkpoint
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/1957c339-2757-4d1f-8e92-e9f71a1ce58e/a8a78c07-e900-425c-a577-5b4c5894379d/AwxJU6M
2025-08-11 20:04:57 +00:00
michaelschal 07b848b127 Improve user group assignment debugging and logging in production
Add SQL debugging script and enhanced console logs to diagnose user group assignment issues in production, addressing user reports of unassigned groups.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: a8a78c07-e900-425c-a577-5b4c5894379d
Replit-Commit-Checkpoint-Type: full_checkpoint
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/1957c339-2757-4d1f-8e92-e9f71a1ce58e/a8a78c07-e900-425c-a577-5b4c5894379d/fwSlq3W
2025-08-11 19:53:26 +00:00
michaelschal f705fb4b1c Resolve issue with assigning users to groups in production environments
Adjust `server/storage.ts` to use raw SQL for inserting into `user_groups` when the `created_at` column is missing in production, and add a test script `test-user-groups.js` to verify this functionality.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: a8a78c07-e900-425c-a577-5b4c5894379d
Replit-Commit-Checkpoint-Type: full_checkpoint
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/1957c339-2757-4d1f-8e92-e9f71a1ce58e/a8a78c07-e900-425c-a577-5b4c5894379d/pp1SgYO
2025-08-11 19:49:32 +00:00
michaelschal 28b60b6bca Address issue where users cannot be assigned to groups in production
Add error handling to the user group assignment to gracefully handle missing `created_at` column in production environments, and document the fix.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: a8a78c07-e900-425c-a577-5b4c5894379d
Replit-Commit-Checkpoint-Type: full_checkpoint
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/1957c339-2757-4d1f-8e92-e9f71a1ce58e/a8a78c07-e900-425c-a577-5b4c5894379d/yj7Yt4E
2025-08-11 19:46:22 +00:00