Commit Graph
27 Commits
Author SHA1 Message Date
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 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 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 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 dd1ae4974f Improve user interface consistency across reconciliation pages
Refactor CSS and component structure in `BLReconciliation.tsx` to match the design patterns established in other pages, ensuring a uniform user experience.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 76582ba3-44cb-4730-92fa-66f28725967b
Replit-Commit-Checkpoint-Type: full_checkpoint
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/1957c339-2757-4d1f-8e92-e9f71a1ce58e/76582ba3-44cb-4730-92fa-66f28725967b/EyaLdPB
2025-08-13 06:45:10 +00:00
michaelschal 479577c4ff Refine user role permissions and data handling logic.
Update backend routes and frontend logic to correctly apply user role-based access controls and ensure accurate data processing for various features, including order and DLC management, while also addressing specific production errors and improving code robustness.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: cc8ba926-557c-4bf1-a2ea-ceabbcf38824
Replit-Commit-Checkpoint-Type: full_checkpoint
2025-08-12 19:16:48 +00:00
michaelschal 8c35e8e32f Fix customer order creation to use the correct store group
Remove overridden group ID logic in CustomerOrderForm.tsx to correctly use defaultValues, resolving an issue where employees assigned to store #2 were creating orders for store #1.

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/yNU6s0F
2025-08-12 15:42:00 +00:00
michaelschal 8939b40bcc Fix customer order creation for employees assigned to different stores
Correctly assigns the customer order's store based on the employee's assigned store, preventing orders from being misdirected.

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/z5Nx2ao
2025-08-12 15:04:05 +00:00
michaelschal 00e3c98550 Fix product assignment for users in different stores to ensure correct placement
Implement backend logic to ensure correct product group assignment, resolving an issue where products were incorrectly placed in the wrong store due to missing group ID data from the frontend, and add detailed logging for better 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/PoPN0Ru
2025-08-12 15:00:29 +00:00
michaelschal 03d18b91e0 Fix incorrect product assignment for store-assigned users
Corrected the logic in `DlcPage.tsx` to properly assign the `groupId` for DLC products, ensuring users are associated with their correct store group.

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/W2tfZav
2025-08-12 14:52:21 +00:00
michaelschal 632eb8dd82 Enable employees to create customer orders and DLC products
Fixes production issues preventing employees from creating customer orders and DLC products by ensuring correct permissions, cache invalidation, and backend route configurations.

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:40:17 +00:00
michaelschal c0e1b26599 Replace UI components to fix critical production errors
Refactor `BLReconciliation.tsx` and multiple Shadcn/ui components by replacing them with custom, robust alternatives to resolve React #310 errors in production.

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/rmaxwaw
2025-08-12 11:05:49 +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 072ad60ec1 Grant employees access to system features and tasks
Adjust permissions for employee role to access tasks and supplier data, and allow directors to validate DLC products.

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/69xEJ3P
2025-08-12 08:56:22 +00:00
michaelschal 5ea3481dc0 Restrict employee access to orders and deliveries while fixing supplier visibility
Fixes bugs that prevented employees from viewing supplier lists and restricted their access to order and delivery creation functionalities.

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/9RgkyCi
2025-08-12 08:50:23 +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 f42a999b61 Fix password updates for administrators in production environments
Correctly import the production authentication module with the `.js` extension to resolve the ERR_MODULE_NOT_FOUND error.

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/5WAXLXf
2025-08-11 19:38:38 +00:00
michaelschal df479800e3 Implement a new hardcoded permissions system for enhanced user access control
This commit replaces the previous dynamic, database-driven permissions system with a hardcoded, role-based access control (RBAC) structure. New files in `client/src/lib/permissions.ts` and `server/permissions.ts` define permissions per module and role, simplifying management and improving performance. Database tables related to roles, permissions, and user roles have been removed, and associated storage interface methods and routes have been deprecated or updated to reflect the new architecture. The `replit.md` file has also been updated to document these significant changes.

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/7SnSmh4
2025-08-11 19:11:11 +00:00
michaelschal 1e72358c6c Fix user editing and email field consistency across the platform
Update handleEditUser to prioritize firstName/lastName over the name field for user editing, and make the email field consistently optional in both create and edit forms.

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/vetH0Gp
2025-08-11 18:35:13 +00:00
michaelschal e7fb2c66f1 Make user creation and deletion more robust and prevent data loss
Update user schema to make username and password mandatory, adjust email validation, and handle foreign key constraints during user deletion, including updating the database_backups table.

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/vetH0Gp
2025-08-11 18:12:20 +00:00
michaelschal 7618fb1643 Make user name fields optional in all interfaces
Updated user management forms to make first and last name fields optional, aligning with production server requirements and fixing inconsistencies between user creation and editing.

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/vetH0Gp
2025-08-11 18:04:21 +00:00
michaelschal c24e19da52 Prioritize default admin for user deletion transfers
Update the user deletion process to prioritize transferring ownership to the `admin_local` user, falling back to any available admin if `admin_local` is not found.

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/vetH0Gp
2025-08-11 17:51:53 +00:00
michaelschal 2cb363c0b4 Fix user deletion to preserve data integrity
Updates the `deleteUser` method to handle foreign key constraints by transferring user-created records to an admin user before deletion, ensuring data integrity and preventing errors.

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/vetH0Gp
2025-08-11 17:50:38 +00:00
michaelschal 7e6dccfadf Update dependencies and production setup for enhanced security and stability
Add bcrypt and encoding libraries, update iconv-lite, and refactor production authentication and database initialization to use native Node.js crypto and improve security.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: d396e5bd-e32d-4a20-9e7d-71e7102ddc6c
Replit-Commit-Checkpoint-Type: full_checkpoint
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/1957c339-2757-4d1f-8e92-e9f71a1ce58e/d396e5bd-e32d-4a20-9e7d-71e7102ddc6c/kxiUCTd
2025-08-11 14:50:55 +00:00
LogiFlow 2485f71dd7 latest 2025-08-11 14:43:48 +00:00