Commit Graph
296 Commits
Author SHA1 Message Date
michaelschal 478ad4eb5b Enable clearing of invoice fields and fix delivery date display
Update data transformation and validation logic in server routes to allow null values for invoice reference, amount, and due date. This addresses issues where users could not clear these fields and ensures the due date is correctly displayed.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 1e4433b5-47ab-464c-b663-fea2e53367dd
Replit-Commit-Checkpoint-Type: full_checkpoint
Replit-Commit-Event-Id: 693eaffa-e5f9-48b1-8bb4-034d4f47e3f4
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/1957c339-2757-4d1f-8e92-e9f71a1ce58e/1e4433b5-47ab-464c-b663-fea2e53367dd/gTQvEeF
2025-11-04 05:55:59 +00:00
michaelschal 11a59f53e6 Update data storage to include invoice details and reconciliation status
Modify DatabaseStorage and MemStorage classes to incorporate new fields: supplierName, invoiceReference, invoiceAmount, dueDate, and isReconciled, enhancing data persistence and retrieval for invoice management.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 1e4433b5-47ab-464c-b663-fea2e53367dd
Replit-Commit-Checkpoint-Type: full_checkpoint
Replit-Commit-Event-Id: 521a9239-53be-4766-99e6-a59de73ba301
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/1957c339-2757-4d1f-8e92-e9f71a1ce58e/1e4433b5-47ab-464c-b663-fea2e53367dd/gTQvEeF
2025-11-04 05:43:40 +00:00
michaelschal c669c4eba9 Update invoice reconciliation to fix display issues
Introduce detailed logging and data type conversions in invoice verification service and client-side reconciliation page to address discrepancies in displayed invoice amounts and due dates.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 1e4433b5-47ab-464c-b663-fea2e53367dd
Replit-Commit-Checkpoint-Type: full_checkpoint
Replit-Commit-Event-Id: 41ed310d-8033-46c7-bb26-e56560b56490
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/1957c339-2757-4d1f-8e92-e9f71a1ce58e/1e4433b5-47ab-464c-b663-fea2e53367dd/gTQvEeF
2025-11-04 05:30:12 +00:00
michaelschal 257932686f Improve date handling for delivery due dates
Correctly normalize and convert delivery due dates to Date objects for database storage, resolving a TypeError.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 1e4433b5-47ab-464c-b663-fea2e53367dd
Replit-Commit-Checkpoint-Type: full_checkpoint
Replit-Commit-Event-Id: 4d4c67ad-e680-477f-bb7e-e952e806558e
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/1957c339-2757-4d1f-8e92-e9f71a1ce58e/1e4433b5-47ab-464c-b663-fea2e53367dd/Tx7N1IN
2025-11-03 17:31:02 +00:00
michaelschal 228977ae2b Update delivery information based on matched invoice or bill of lading
Adjusted the auto-fill logic in `BLReconciliation.tsx` to populate `invoiceReference`, `invoiceAmount`, and `dueDate` if they exist in the `result`. Also modified `server/routes.ts` to correctly parse `dueDate` as a Date object.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 1e4433b5-47ab-464c-b663-fea2e53367dd
Replit-Commit-Checkpoint-Type: full_checkpoint
Replit-Commit-Event-Id: 25b35a21-13c0-4deb-8f7d-88d73b7e8d28
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/1957c339-2757-4d1f-8e92-e9f71a1ce58e/1e4433b5-47ab-464c-b663-fea2e53367dd/Tx7N1IN
2025-11-03 17:19:33 +00:00
michaelschal 972286e22e Improve date handling for improved data accuracy
Add a date normalization function to server/routes.ts to handle various date formats from NocoDB and standardize them to YYYY-MM-DD, also refactor delivery retrieval logic to separate dated and undated deliveries.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 1e4433b5-47ab-464c-b663-fea2e53367dd
Replit-Commit-Checkpoint-Type: intermediate_checkpoint
Replit-Commit-Event-Id: 4d0fa35d-6e0d-44c6-b7e9-f78186630c41
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/1957c339-2757-4d1f-8e92-e9f71a1ce58e/1e4433b5-47ab-464c-b663-fea2e53367dd/G9gVBac
2025-11-03 16:38:48 +00:00
michaelschal 09c873eb06 Add due date tracking to invoice verification and delivery data
Updates InvoiceVerificationService to include dueDate, modifies routes.ts to fetch deliveries with due dates from storage instead of NocoDB, and adds dueDate to the deliveries schema in shared/schema.ts.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 1e4433b5-47ab-464c-b663-fea2e53367dd
Replit-Commit-Checkpoint-Type: intermediate_checkpoint
Replit-Commit-Event-Id: 45962ece-1470-4431-936b-016ef39720d8
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/1957c339-2757-4d1f-8e92-e9f71a1ce58e/1e4433b5-47ab-464c-b663-fea2e53367dd/G9gVBac
2025-11-03 16:28:41 +00:00
michaelschal 6f298c4df7 Add payment schedule view with filtering and supplier payment methods
Adds a new payment schedule page to display due dates and amounts, incorporating supplier payment methods and date filtering.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 1e4433b5-47ab-464c-b663-fea2e53367dd
Replit-Commit-Checkpoint-Type: intermediate_checkpoint
Replit-Commit-Event-Id: e9c65355-546d-41f7-885b-728c905f4497
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/1957c339-2757-4d1f-8e92-e9f71a1ce58e/1e4433b5-47ab-464c-b663-fea2e53367dd/9uIte90
2025-11-03 16:02:12 +00:00
michaelschal 43ca5d617a Add button to control automatic backup settings
Add a toggle button to the UI and corresponding backend logic to enable/disable automatic database backups.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 1e4433b5-47ab-464c-b663-fea2e53367dd
Replit-Commit-Checkpoint-Type: intermediate_checkpoint
Replit-Commit-Event-Id: 7c778f43-d69d-489c-a2a9-3e95d35cce43
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/1957c339-2757-4d1f-8e92-e9f71a1ce58e/1e4433b5-47ab-464c-b663-fea2e53367dd/7RN8LqE
2025-10-31 09:24:16 +00:00
michaelschal 21f0895125 Add a toggle to enable or disable automatic backups
Update backup service to check a new 'automaticBackupsEnabled' flag in the utilities table before proceeding with automatic backups.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 1e4433b5-47ab-464c-b663-fea2e53367dd
Replit-Commit-Checkpoint-Type: intermediate_checkpoint
Replit-Commit-Event-Id: 99758027-44c2-4806-a687-68dcde5b39c8
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/1957c339-2757-4d1f-8e92-e9f71a1ce58e/1e4433b5-47ab-464c-b663-fea2e53367dd/7RN8LqE
2025-10-31 09:19:18 +00:00
michaelschal 0cf817e03f Created a checkpoint
Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 1e4433b5-47ab-464c-b663-fea2e53367dd
Replit-Commit-Checkpoint-Type: intermediate_checkpoint
Replit-Commit-Event-Id: 0a1b1aa1-ca7d-4f74-8ecb-8057b6feb3f6
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/1957c339-2757-4d1f-8e92-e9f71a1ce58e/1e4433b5-47ab-464c-b663-fea2e53367dd/7RN8LqE
2025-10-31 09:03:53 +00:00
michaelschal 706066089f Improve how expired DLC products are handled and displayed
Refactor the database query in `server/storage.ts` to correctly calculate and display statistics for DLC products, ensuring expired items are not incorrectly re-activated and that statistics accurately reflect their expired status.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 1e4433b5-47ab-464c-b663-fea2e53367dd
Replit-Commit-Checkpoint-Type: intermediate_checkpoint
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/1957c339-2757-4d1f-8e92-e9f71a1ce58e/1e4433b5-47ab-464c-b663-fea2e53367dd/bfW6MZh
2025-10-29 17:49:21 +00:00
michaelschal ce0b44c1fc Correctly track product expiration status across the system
Removes the `processedUntilExpiry` filter from DlcProducts and DlcStats queries in DatabaseStorage and MemStorage to ensure accurate expiration counts, aligning the logic between fetching products and their statistics.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 1e4433b5-47ab-464c-b663-fea2e53367dd
Replit-Commit-Checkpoint-Type: intermediate_checkpoint
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/1957c339-2757-4d1f-8e92-e9f71a1ce58e/1e4433b5-47ab-464c-b663-fea2e53367dd/Z004ykL
2025-10-13 11:50:12 +00:00
michaelschal 36a9902886 Refine product count calculations to exclude invalid items
Update MemStorage to filter out products with 'valides' status in active, expiringSoon, and expired counts.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 1e4433b5-47ab-464c-b663-fea2e53367dd
Replit-Commit-Checkpoint-Type: intermediate_checkpoint
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/1957c339-2757-4d1f-8e92-e9f71a1ce58e/1e4433b5-47ab-464c-b663-fea2e53367dd/WkQ9cok
2025-10-13 08:41:08 +00:00
michaelschal a7ce571c69 Update product expiration calculations to exclude invalid items
Refactor SQL queries in `DatabaseStorage` to filter out products with 'valides' status when calculating active, expiringSoon, and expired counts.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 1e4433b5-47ab-464c-b663-fea2e53367dd
Replit-Commit-Checkpoint-Type: intermediate_checkpoint
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/1957c339-2757-4d1f-8e92-e9f71a1ce58e/1e4433b5-47ab-464c-b663-fea2e53367dd/WkQ9cok
2025-10-13 08:40:27 +00:00
michaelschal 8a4fd1341f Add an endpoint to retrieve advertisements based on user roles and filters
Create a new GET endpoint `/api/publicities` to fetch advertisements, supporting filtering by year and storeId, with access control based on user roles (admin vs. non-admin).

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 1e4433b5-47ab-464c-b663-fea2e53367dd
Replit-Commit-Checkpoint-Type: intermediate_checkpoint
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/1957c339-2757-4d1f-8e92-e9f71a1ce58e/1e4433b5-47ab-464c-b663-fea2e53367dd/WkQ9cok
2025-10-10 16:19:17 +00:00
michaelschal 0d03e70b10 Update publicity endpoints to use campaign naming convention
Rename '/api/publicities' and '/api/publicities/:id' routes to '/api/campaigns' and '/api/campaigns/:id' respectively to avoid adblocker interference.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 1e4433b5-47ab-464c-b663-fea2e53367dd
Replit-Commit-Checkpoint-Type: full_checkpoint
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/1957c339-2757-4d1f-8e92-e9f71a1ce58e/1e4433b5-47ab-464c-b663-fea2e53367dd/gtlJIVB
2025-10-01 14:46:13 +00:00
michaelschal b73f9f25d1 Add functionality to mark delivery controls as validated
Introduces a new API endpoint and UI elements to allow users to mark delivery controls as validated, including associated badges and mutation logic.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 1e4433b5-47ab-464c-b663-fea2e53367dd
Replit-Commit-Checkpoint-Type: intermediate_checkpoint
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/1957c339-2757-4d1f-8e92-e9f71a1ce58e/1e4433b5-47ab-464c-b663-fea2e53367dd/Q8UjAXl
2025-09-30 09:19:41 +00:00
michaelschal 51e04fa9a1 Add supplier control validation fields to storage
Adds `controlValidated`, `controlValidatedBy`, and `controlValidatedAt` fields to the `DatabaseStorage` class in `server/storage.ts` to track supplier control validation status.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 1e4433b5-47ab-464c-b663-fea2e53367dd
Replit-Commit-Checkpoint-Type: full_checkpoint
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/1957c339-2757-4d1f-8e92-e9f71a1ce58e/1e4433b5-47ab-464c-b663-fea2e53367dd/e7P7sOc
2025-09-30 09:00:09 +00:00
michaelschal a2ab38a412 Add quality control process for supplier deliveries
Introduce a new 'requires_control' flag for suppliers, enabling a quality control workflow for deliveries. This includes UI updates, database schema changes, and API endpoints to manage and track control validation.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 1e4433b5-47ab-464c-b663-fea2e53367dd
Replit-Commit-Checkpoint-Type: full_checkpoint
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/1957c339-2757-4d1f-8e92-e9f71a1ce58e/1e4433b5-47ab-464c-b663-fea2e53367dd/e7P7sOc
2025-09-30 08:22:02 +00:00
michaelschal c2b6f7afaa Improve DLC product processing and statistics with backward compatibility
Modify `markDlcProductAsProcessed`, `unmarkDlcProductAsProcessed`, and `getDlcStats` in `server/storage.ts` to include fallback mechanisms for compatibility with older database schemas, ensuring continued functionality.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 1e4433b5-47ab-464c-b663-fea2e53367dd
Replit-Commit-Checkpoint-Type: intermediate_checkpoint
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/1957c339-2757-4d1f-8e92-e9f71a1ce58e/1e4433b5-47ab-464c-b663-fea2e53367dd/h3gJlye
2025-09-26 19:57:56 +00:00
michaelschal f1f2cf5fc4 Add functionality to mark and unmark products as processed
This commit introduces new mutations and UI logic to the DLC page for marking products as processed or unmarking them. It also includes updates to icons and database schema for announcements and avoirs.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 1e4433b5-47ab-464c-b663-fea2e53367dd
Replit-Commit-Checkpoint-Type: intermediate_checkpoint
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/1957c339-2757-4d1f-8e92-e9f71a1ce58e/1e4433b5-47ab-464c-b663-fea2e53367dd/px42AkO
2025-09-25 06:42:41 +00:00
michaelschal 6f00d9fe3e Fix issue with reconciled task count in statistics module
Adjusted SQL query in DatabaseStorage.ts to correctly count reconciled tasks by removing the `OR reconciled = 1` condition, ensuring accurate data in the statistics module.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 1e4433b5-47ab-464c-b663-fea2e53367dd
Replit-Commit-Checkpoint-Type: intermediate_checkpoint
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/1957c339-2757-4d1f-8e92-e9f71a1ce58e/1e4433b5-47ab-464c-b663-fea2e53367dd/jnL5Pt5
2025-09-23 14:30:05 +00:00
michaelschal 7bd864d1f6 Fix date filtering for statistics to correctly display data
Adjust date filtering logic in storage modules to correctly handle and compare date values, resolving issues with displaying data in the statistics module.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 1e4433b5-47ab-464c-b663-fea2e53367dd
Replit-Commit-Checkpoint-Type: intermediate_checkpoint
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/1957c339-2757-4d1f-8e92-e9f71a1ce58e/1e4433b5-47ab-464c-b663-fea2e53367dd/jnL5Pt5
2025-09-23 14:28:00 +00:00
michaelschal b24520fda0 Update statistics to show reconciliation rate instead of on-time delivery
Replace 'onTimeRate' with 'reconciliationRate' in storage interfaces and implementations. Update database and in-memory calculations to reflect reconciled status instead of on-time delivery.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 1e4433b5-47ab-464c-b663-fea2e53367dd
Replit-Commit-Checkpoint-Type: intermediate_checkpoint
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/1957c339-2757-4d1f-8e92-e9f71a1ce58e/1e4433b5-47ab-464c-b663-fea2e53367dd/awJgdDR
2025-09-23 14:14:26 +00:00
michaelschal c3150947a3 Improve store performance data retrieval and error handling
Refactor database query in `server/storage.ts` to use raw SQL for date and supplier filtering, improving performance and adding try-catch blocks for error handling.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 1e4433b5-47ab-464c-b663-fea2e53367dd
Replit-Commit-Checkpoint-Type: full_checkpoint
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/1957c339-2757-4d1f-8e92-e9f71a1ce58e/1e4433b5-47ab-464c-b663-fea2e53367dd/P1V76jG
2025-09-22 15:45:09 +00:00
michaelschal c50ef4cea1 Improve data filtering and reduce database query complexity
Refactor database storage to use direct value substitution for WHERE clauses, improving performance and simplifying query construction by removing parameterized queries in server/storage.ts. Also, update user group filtering logic in server/routes.ts to correctly handle optional user groups.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 1e4433b5-47ab-464c-b663-fea2e53367dd
Replit-Commit-Checkpoint-Type: full_checkpoint
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/1957c339-2757-4d1f-8e92-e9f71a1ce58e/1e4433b5-47ab-464c-b663-fea2e53367dd/P1V76jG
2025-09-22 15:39:30 +00:00
michaelschal e23f826f0a Add analytics dashboard for tracking key performance metrics
Adds new analytics routes and functionality to display summary data, time series, and supplier/store breakdowns, with role-based access control.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 1e4433b5-47ab-464c-b663-fea2e53367dd
Replit-Commit-Checkpoint-Type: intermediate_checkpoint
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/1957c339-2757-4d1f-8e92-e9f71a1ce58e/1e4433b5-47ab-464c-b663-fea2e53367dd/nSTv9k9
2025-09-22 15:02:00 +00:00
michaelschal c3e84db27d Update reconciliation comments display to show comment counts
Adds reconciliation comments count to delivery data and updates UI to reflect this count, changing button color when comments exist.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 1e4433b5-47ab-464c-b663-fea2e53367dd
Replit-Commit-Checkpoint-Type: intermediate_checkpoint
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/1957c339-2757-4d1f-8e92-e9f71a1ce58e/1e4433b5-47ab-464c-b663-fea2e53367dd/rQ1f1Q3
2025-09-19 18:03:12 +00:00
michaelschal 2e59eec409 Add ability to retrieve specific comments for reconciliation process
Update routes to use a new method for fetching a single reconciliation comment by ID, replacing the previous approach of fetching all comments and filtering client-side. This change is reflected in both `routes.ts` and `storage.ts`, where a new `getReconciliationCommentById` method is introduced in the `IStorage` interface and implemented in `DatabaseStorage` and `MemStorage`.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 1e4433b5-47ab-464c-b663-fea2e53367dd
Replit-Commit-Checkpoint-Type: full_checkpoint
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/1957c339-2757-4d1f-8e92-e9f71a1ce58e/1e4433b5-47ab-464c-b663-fea2e53367dd/waxFZ5i
2025-09-19 17:21:42 +00:00
michaelschal 8f51b30776 Add alternative POST method for deleting advertisements to bypass restrictions
Implement a POST endpoint on the API and a fallback POST request in the frontend for deleting advertisements, addressing issues where the DELETE method might be blocked in production environments.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 1e4433b5-47ab-464c-b663-fea2e53367dd
Replit-Commit-Checkpoint-Type: full_checkpoint
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/1957c339-2757-4d1f-8e92-e9f71a1ce58e/1e4433b5-47ab-464c-b663-fea2e53367dd/qwRLDDO
2025-09-15 09:46:11 +00:00
michaelschal 9ad2afaf90 Fix issue preventing administrators from deleting advertisements
Improve the publicity deletion endpoint by adding comprehensive logging for debugging, ensuring correct role-based access control, and refining the database deletion logic to include participations for data integrity.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 1e4433b5-47ab-464c-b663-fea2e53367dd
Replit-Commit-Checkpoint-Type: full_checkpoint
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/1957c339-2757-4d1f-8e92-e9f71a1ce58e/1e4433b5-47ab-464c-b663-fea2e53367dd/BADbf74
2025-09-15 09:19:25 +00:00
michaelschal c675429634 Update storage logic to use database when available
Modify server/storage.ts to prioritize DatabaseStorage when DATABASE_URL is set, falling back to MemStorage otherwise. Includes updated logging to reflect this logic. Also adds attached reports detailing PostgreSQL production database schema and contents.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 1e4433b5-47ab-464c-b663-fea2e53367dd
Replit-Commit-Checkpoint-Type: full_checkpoint
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/1957c339-2757-4d1f-8e92-e9f71a1ce58e/1e4433b5-47ab-464c-b663-fea2e53367dd/AVGwNHS
2025-09-15 08:12:18 +00:00
michaelschal 967fe14a33 Add alert for clients not contacted when their order status is available
Update `getPendingClientCalls` to filter customer orders where the client has not been notified and the order status is one of 'Disponible', 'disponible', 'Arrivé', 'arrivé', 'Prêt', or 'prêt' in both database and in-memory storage.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 95e8aab4-f39f-4b48-aa57-a759ec15ba3d
Replit-Commit-Checkpoint-Type: full_checkpoint
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/1957c339-2757-4d1f-8e92-e9f71a1ce58e/95e8aab4-f39f-4b48-aa57-a759ec15ba3d/TckvSqR
2025-09-11 11:18:37 +00:00
michaelschal 6c8f8a47ad Add a feature to notify users about pending client calls
Introduce functionality for tracking and displaying pending client calls. This includes new API endpoints for fetching and marking clients as called, along with frontend components to alert users and manage these calls.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 95e8aab4-f39f-4b48-aa57-a759ec15ba3d
Replit-Commit-Checkpoint-Type: intermediate_checkpoint
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/1957c339-2757-4d1f-8e92-e9f71a1ce58e/95e8aab4-f39f-4b48-aa57-a759ec15ba3d/U4JJoTO
2025-09-11 10:46:27 +00:00
michaelschal fdebcbba26 Remove outdated endpoint for updating delivery notes
Removes the obsolete PUT /api/deliveries/:id/notes endpoint, as reconciliation comments are now handled via /api/deliveries/:id/reconciliation-comments.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 95e8aab4-f39f-4b48-aa57-a759ec15ba3d
Replit-Commit-Checkpoint-Type: full_checkpoint
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/1957c339-2757-4d1f-8e92-e9f71a1ce58e/95e8aab4-f39f-4b48-aa57-a759ec15ba3d/2QB13hj
2025-09-10 09:41:26 +00:00
michaelschal deb01d1a81 Simplify comment system by removing type and message functionality
Remove comment type, associated icons, labels, and related UI elements. Update API calls and database schema to reflect these changes, simplifying the comment submission and management process.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 95e8aab4-f39f-4b48-aa57-a759ec15ba3d
Replit-Commit-Checkpoint-Type: full_checkpoint
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/1957c339-2757-4d1f-8e92-e9f71a1ce58e/95e8aab4-f39f-4b48-aa57-a759ec15ba3d/2QB13hj
2025-09-10 09:31:05 +00:00
michaelschal 7687b99f45 Add ability to manage reconciliation comments for deliveries
Introduce new API endpoints for fetching, creating, and updating reconciliation comments associated with deliveries, including user authentication and authorization checks.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 95e8aab4-f39f-4b48-aa57-a759ec15ba3d
Replit-Commit-Checkpoint-Type: intermediate_checkpoint
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/1957c339-2757-4d1f-8e92-e9f71a1ce58e/95e8aab4-f39f-4b48-aa57-a759ec15ba3d/BOWXK9F
2025-09-10 07:47:03 +00:00
michaelschal 8401d22d71 Add functionality to comment on delivery reconciliations
Implement CRUD operations for reconciliation comments, including fetching comments with related data like author, group, and delivery details, and creating new comments.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 95e8aab4-f39f-4b48-aa57-a759ec15ba3d
Replit-Commit-Checkpoint-Type: intermediate_checkpoint
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/1957c339-2757-4d1f-8e92-e9f71a1ce58e/95e8aab4-f39f-4b48-aa57-a759ec15ba3d/BOWXK9F
2025-09-10 07:44:28 +00:00
michaelschal 890430c4c0 Make delivery comments read-only after reconciliation
Disables editing and displays a read-only status for delivery comments once reconciliation is validated, preventing modifications to comments on reconciled deliveries.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 9fcf4b21-eb0c-4e53-a567-e2ce4a6ad869
Replit-Commit-Checkpoint-Type: full_checkpoint
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/1957c339-2757-4d1f-8e92-e9f71a1ce58e/9fcf4b21-eb0c-4e53-a567-e2ce4a6ad869/yiEpJFx
2025-09-09 13:31:42 +00:00
michaelschal 69c668853b Update delivery notes with improved permission and group access controls
Add a new PUT endpoint '/api/deliveries/:id/notes' to allow authenticated users with 'edit' permissions to update delivery notes, including validation for notes length and group access checks.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 9fcf4b21-eb0c-4e53-a567-e2ce4a6ad869
Replit-Commit-Checkpoint-Type: intermediate_checkpoint
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/1957c339-2757-4d1f-8e92-e9f71a1ce58e/9fcf4b21-eb0c-4e53-a567-e2ce4a6ad869/yiEpJFx
2025-09-09 13:26:04 +00:00
michaelschal 011be98ed0 Fix issue with empty amount fields not saving correctly
Ensure that undefined optional fields in the Avoir update payload are converted to null for proper PostgreSQL compatibility.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 9fcf4b21-eb0c-4e53-a567-e2ce4a6ad869
Replit-Commit-Checkpoint-Type: full_checkpoint
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/1957c339-2757-4d1f-8e92-e9f71a1ce58e/9fcf4b21-eb0c-4e53-a567-e2ce4a6ad869/Ii96ETr
2025-09-08 20:32:07 +00:00
michaelschal 115090f317 Update how users validate and invalidate task documents
Introduce a new API endpoint for NocoDB verification and integrate cache reconciliation logic for invoices.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 9fcf4b21-eb0c-4e53-a567-e2ce4a6ad869
Replit-Commit-Checkpoint-Type: intermediate_checkpoint
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/1957c339-2757-4d1f-8e92-e9f71a1ce58e/9fcf4b21-eb0c-4e53-a567-e2ce4a6ad869/chkBbcP
2025-09-08 18:43:02 +00:00
michaelschal 73a7bcba16 Add invoice verification feature to improve financial reconciliation
Implement a new API endpoint and frontend logic to verify invoice references for 'avoirs', including error handling and status updates. Adjust permission checks in routes.ts to use 'deliveries' module logic.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 9fcf4b21-eb0c-4e53-a567-e2ce4a6ad869
Replit-Commit-Checkpoint-Type: intermediate_checkpoint
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/1957c339-2757-4d1f-8e92-e9f71a1ce58e/9fcf4b21-eb0c-4e53-a567-e2ce4a6ad869/GlyTlJp
2025-09-08 18:17:17 +00:00
michaelschal 30988c8be3 Add endpoint to verify credit note invoices using NocoDB integration
Add a POST route '/api/avoirs/:id/verify-invoice' to the backend for verifying credit note invoices. This endpoint integrates with NocoDB, checks user permissions and group associations, and uses the invoiceVerificationService to validate invoices based on a provided reference.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 9fcf4b21-eb0c-4e53-a567-e2ce4a6ad869
Replit-Commit-Checkpoint-Type: intermediate_checkpoint
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/1957c339-2757-4d1f-8e92-e9f71a1ce58e/9fcf4b21-eb0c-4e53-a567-e2ce4a6ad869/GlyTlJp
2025-09-08 18:15:54 +00:00
michaelschal 986c8e6ce0 Send credit note details via webhook when status changes to received
Implement webhook functionality to send credit note information to configured groups when the status is updated to 'Reçu'. The webhook payload includes credit note details, sender information, and group details. Default group ID is set to 1 for administrators if not specified. Also, adds a visual indicator for sent webhooks on the frontend.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 9fcf4b21-eb0c-4e53-a567-e2ce4a6ad869
Replit-Commit-Checkpoint-Type: full_checkpoint
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/1957c339-2757-4d1f-8e92-e9f71a1ce58e/9fcf4b21-eb0c-4e53-a567-e2ce4a6ad869/liv4dfe
2025-09-08 17:43:27 +00:00
michaelschal 80b9d387c7 Fix issue where commercial processed status incorrectly retained on update
Implement Zod validation on PUT /avoirs/:id endpoint to ensure correct data handling for commercialProcessed field, defaulting it to false and logging validation errors.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 9fcf4b21-eb0c-4e53-a567-e2ce4a6ad869
Replit-Commit-Checkpoint-Type: full_checkpoint
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/1957c339-2757-4d1f-8e92-e9f71a1ce58e/9fcf4b21-eb0c-4e53-a567-e2ce4a6ad869/2DtJTqh
2025-09-08 16:42:52 +00:00
michaelschal b3eb0644e0 Fix issues with creating new entries and improve data validation
Update server route error handling and Zod schemas for optional fields to resolve creation errors.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 9fcf4b21-eb0c-4e53-a567-e2ce4a6ad869
Replit-Commit-Checkpoint-Type: full_checkpoint
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/1957c339-2757-4d1f-8e92-e9f71a1ce58e/9fcf4b21-eb0c-4e53-a567-e2ce4a6ad869/p0qYuko
2025-09-08 15:20:14 +00:00
michaelschal 070daf71ac Improve logging for creating new "avoir" entries and address user access issues
Adds detailed debug logging for 'POST AVOIR' requests to aid in troubleshooting user creation and access control problems in production. Includes new console logs to capture received data, validated data, and user information for better debugging. Also includes extensive production logs from various API endpoints, potentially related to user not found errors.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 9fcf4b21-eb0c-4e53-a567-e2ce4a6ad869
Replit-Commit-Checkpoint-Type: full_checkpoint
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/1957c339-2757-4d1f-8e92-e9f71a1ce58e/9fcf4b21-eb0c-4e53-a567-e2ce4a6ad869/p0qYuko
2025-09-08 15:16:46 +00:00
michaelschal 8ae757e3a2 Ensure all invoice-related API endpoints require user authentication
Replace module permission checks with a general authentication requirement for all /api/avoirs routes.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 9fcf4b21-eb0c-4e53-a567-e2ce4a6ad869
Replit-Commit-Checkpoint-Type: full_checkpoint
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/1957c339-2757-4d1f-8e92-e9f71a1ce58e/9fcf4b21-eb0c-4e53-a567-e2ce4a6ad869/0C3uBiZ
2025-09-08 14:08:26 +00:00