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
michaelschal
0febc7d0ef
Update production debugging guide for Avoirs module
...
Add a new markdown file to provide detailed debugging steps and solutions for production issues related to the Avoirs module, including database table creation, permission checks, and API testing.
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:02:31 +00:00
michaelschal
f3565df01f
Add functionality to manage and track customer credit notes
...
Introduces the "Avoirs" feature, including database schema, API endpoints for CRUD operations, and frontend components for viewing and managing credit notes.
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 13:48:14 +00:00
michaelschal
2760eed5ec
Restrict access to orders based on user roles and assigned groups
...
Modify API routes to enforce role-based access control, allowing only admins to view all orders. Directeurs and managers will now only see orders associated with their assigned group/store, enhancing data segregation and security.
Replit-Commit-Author: Agent
Replit-Commit-Session-Id: eaa414c3-3c85-40dc-9be6-17361381ab4a
Replit-Commit-Checkpoint-Type: intermediate_checkpoint
2025-09-08 08:23:33 +00:00
michaelschal
15e9d13e6a
Improve ticket statistics calculation and data retrieval
...
Refactors the database storage logic to separately query for ticket counts by status, priority, and total. This change enhances data retrieval efficiency and accuracy for displaying ticket statistics.
Replit-Commit-Author: Agent
Replit-Commit-Session-Id: dc17873f-d870-4f45-9108-207794b849f7
Replit-Commit-Checkpoint-Type: intermediate_checkpoint
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/1957c339-2757-4d1f-8e92-e9f71a1ce58e/dc17873f-d870-4f45-9108-207794b849f7/FxJjNBe
2025-09-07 07:37:32 +00:00
michaelschal
6ba8919487
Update dashboard to display yearly delivery statistics
...
Introduce a new API endpoint '/api/stats/yearly' for fetching annual statistics and update the StatsPanel component to use this endpoint, changing the card title to "Statistiques de l'année" and the average delivery time label to "Délai commande → livraison".
Replit-Commit-Author: Agent
Replit-Commit-Session-Id: cfbfe47c-0c9a-4ebf-8a41-2937407eccff
Replit-Commit-Checkpoint-Type: full_checkpoint
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/1957c339-2757-4d1f-8e92-e9f71a1ce58e/cfbfe47c-0c9a-4ebf-8a41-2937407eccff/9qfOTfC
2025-09-03 14:55:39 +00:00
michaelschal
d938db04ff
Improve delivery time calculation to only include orders with linked deliveries
...
Update the average delivery time calculation to consider only deliveries with an associated order, measuring the time between the order's planned date and the delivery date.
Replit-Commit-Author: Agent
Replit-Commit-Session-Id: cfbfe47c-0c9a-4ebf-8a41-2937407eccff
Replit-Commit-Checkpoint-Type: full_checkpoint
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/1957c339-2757-4d1f-8e92-e9f71a1ce58e/cfbfe47c-0c9a-4ebf-8a41-2937407eccff/ECRh2Iu
2025-09-03 14:46:31 +00:00
michaelschal
2c36650edd
Add SQL execution tool for administrators to manage database tables
...
Introduce a new admin-only utility tab allowing direct SQL query execution, file uploads (.sql), and logging of operations. Includes server-side endpoint and client-side UI for executing raw SQL commands against the database.
Replit-Commit-Author: Agent
Replit-Commit-Session-Id: cfbfe47c-0c9a-4ebf-8a41-2937407eccff
Replit-Commit-Checkpoint-Type: full_checkpoint
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/1957c339-2757-4d1f-8e92-e9f71a1ce58e/cfbfe47c-0c9a-4ebf-8a41-2937407eccff/ECRh2Iu
2025-09-03 14:11:12 +00:00
michaelschal
5b338b224e
Ensure webhook BAP configuration table is created on startup
...
Adds a new TypeScript file to programmatically create the `webhook_bap_config` table in the database if it doesn't exist, and inserts a default configuration upon application startup in production environments.
Replit-Commit-Author: Agent
Replit-Commit-Session-Id: cfbfe47c-0c9a-4ebf-8a41-2937407eccff
Replit-Commit-Checkpoint-Type: full_checkpoint
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/1957c339-2757-4d1f-8e92-e9f71a1ce58e/cfbfe47c-0c9a-4ebf-8a41-2937407eccff/qkkp1hi
2025-09-03 14:05:06 +00:00
michaelschal
3304d1c912
Add automatic creation of webhook configuration table during database migration
...
Modify the auto-migrate script to check for and create the `webhook_bap_config` table if it does not exist, including a default entry and description. Remove explicit migration calls from `server/index.ts` as they are now handled by the Docker entrypoint script.
Replit-Commit-Author: Agent
Replit-Commit-Session-Id: cfbfe47c-0c9a-4ebf-8a41-2937407eccff
Replit-Commit-Checkpoint-Type: full_checkpoint
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/1957c339-2757-4d1f-8e92-e9f71a1ce58e/cfbfe47c-0c9a-4ebf-8a41-2937407eccff/qkkp1hi
2025-09-03 13:58:55 +00:00
michaelschal
c55ec19939
Update BAP webhook configuration URL and improve error handling
...
Correct the webhook URL for BAP configuration in multiple files (client, server, migrations). Adjust server startup logic to prevent crashes due to database migration failures in production, and add more verbose logging for environment and database connection status. Reorder integrations in `.replit` file.
Replit-Commit-Author: Agent
Replit-Commit-Session-Id: cfbfe47c-0c9a-4ebf-8a41-2937407eccff
Replit-Commit-Checkpoint-Type: full_checkpoint
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/1957c339-2757-4d1f-8e92-e9f71a1ce58e/cfbfe47c-0c9a-4ebf-8a41-2937407eccff/qkkp1hi
2025-09-03 13:53:38 +00:00
michaelschal
bce62c78a9
Make webhook creation automatic during updates
...
Embed webhook BAP configuration directly into migrations to automate its creation and prevent manual intervention.
Replit-Commit-Author: Agent
Replit-Commit-Session-Id: cfbfe47c-0c9a-4ebf-8a41-2937407eccff
Replit-Commit-Checkpoint-Type: full_checkpoint
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/1957c339-2757-4d1f-8e92-e9f71a1ce58e/cfbfe47c-0c9a-4ebf-8a41-2937407eccff/DPQVTPV
2025-09-03 13:48:17 +00:00
michaelschal
bfd1944045
Add default configuration when webhook table is not found
...
Fixes an issue where the webhook BAP configuration fails if the `webhook_bap_config` table does not exist in production by returning default values and logging a warning. Includes a SQL script to create the table and a migration entry. Also reorders integrations in `.replit` file.
Replit-Commit-Author: Agent
Replit-Commit-Session-Id: cfbfe47c-0c9a-4ebf-8a41-2937407eccff
Replit-Commit-Checkpoint-Type: full_checkpoint
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/1957c339-2757-4d1f-8e92-e9f71a1ce58e/cfbfe47c-0c9a-4ebf-8a41-2937407eccff/DPQVTPV
2025-09-03 13:44:29 +00:00
michaelschal
98089c6d41
Add database table and migration for BAP webhook configuration
...
Adds the `webhook_bap_config` table and a default configuration entry, along with a `migrations` table to track schema changes. Also includes a fix to prevent the application from exiting in production if database migrations fail during startup.
Replit-Commit-Author: Agent
Replit-Commit-Session-Id: cfbfe47c-0c9a-4ebf-8a41-2937407eccff
Replit-Commit-Checkpoint-Type: full_checkpoint
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/1957c339-2757-4d1f-8e92-e9f71a1ce58e/cfbfe47c-0c9a-4ebf-8a41-2937407eccff/DPQVTPV
2025-09-03 13:38:31 +00:00
michaelschal
6d071aae07
Update how the system sends data to external services
...
Modify the client-side logic to fetch a configurable webhook URL and send data using FormData to the specified endpoint, while also updating server-side schemas and storage to include webhook configuration.
Replit-Commit-Author: Agent
Replit-Commit-Session-Id: cfbfe47c-0c9a-4ebf-8a41-2937407eccff
Replit-Commit-Checkpoint-Type: full_checkpoint
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/1957c339-2757-4d1f-8e92-e9f71a1ce58e/cfbfe47c-0c9a-4ebf-8a41-2937407eccff/DPQVTPV
2025-09-03 13:29:38 +00:00
michaelschal
bae218813b
Automate database migration execution on production startup
...
Add logic to run database migrations automatically when the application starts in production. Includes a new migration script to create the webhook_bap_config table and a utility script for creating new migration files.
Replit-Commit-Author: Agent
Replit-Commit-Session-Id: cfbfe47c-0c9a-4ebf-8a41-2937407eccff
Replit-Commit-Checkpoint-Type: full_checkpoint
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/1957c339-2757-4d1f-8e92-e9f71a1ce58e/cfbfe47c-0c9a-4ebf-8a41-2937407eccff/baXszB8
2025-09-03 13:20:56 +00:00
michaelschal
f938fdb95d
Add configuration interface for enterprise task webhook
...
Implement a new UI component and backend routes for configuring and testing enterprise task webhooks, including database schema and migration scripts.
Replit-Commit-Author: Agent
Replit-Commit-Session-Id: cfbfe47c-0c9a-4ebf-8a41-2937407eccff
Replit-Commit-Checkpoint-Type: full_checkpoint
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/1957c339-2757-4d1f-8e92-e9f71a1ce58e/cfbfe47c-0c9a-4ebf-8a41-2937407eccff/vzUkIk6
2025-09-03 13:15:50 +00:00
michaelschal
6ce9ec90a4
Update webhook request to use POST method with JSON payload
...
Modify the webhook integration to send data via POST request with a JSON payload, resolving a "400 Request Header Or Cookie Too Large" error caused by excessive custom headers.
Replit-Commit-Author: Agent
Replit-Commit-Session-Id: cfbfe47c-0c9a-4ebf-8a41-2937407eccff
Replit-Commit-Checkpoint-Type: full_checkpoint
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/1957c339-2757-4d1f-8e92-e9f71a1ce58e/cfbfe47c-0c9a-4ebf-8a41-2937407eccff/7RlGXpp
2025-09-03 13:01:12 +00:00
michaelschal
7a37fcacbd
Update webhook to use GET request and add file details
...
Correct the HTTP method for the webhook request to GET and include additional file-related headers in server/routes.ts. Also, reorders integrations in .replit for clarity.
Replit-Commit-Author: Agent
Replit-Commit-Session-Id: cfbfe47c-0c9a-4ebf-8a41-2937407eccff
Replit-Commit-Checkpoint-Type: full_checkpoint
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/1957c339-2757-4d1f-8e92-e9f71a1ce58e/cfbfe47c-0c9a-4ebf-8a41-2937407eccff/7RlGXpp
2025-09-03 12:52:42 +00:00