8 Commits
Author SHA1 Message Date
michaelschal e75fa65945 Add a system for managing customer credit notes and their associated permissions
Define new 'avoir' module for permissions and create a new 'avoirs' table in the database schema with detailed fields for credit note management, including supplier, group, invoice details, status, and processing flags.

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/0C3uBiZ
2025-09-08 13:36:45 +00:00
michaelschal 989b2c8c40 Grant task creation permissions to managers
Update shared/permissions.ts to add 'create' permission to manager role for tasks module. Also, add a permission check in server/routes.ts before creating a task.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: f2b9c241-9fdd-4abd-9041-720afc8b27d6
Replit-Commit-Checkpoint-Type: full_checkpoint
2025-09-02 07:34:30 +00:00
michaelschal b3386eb6b9 Allow directors and managers to validate deliveries in the system
Update permissions in `shared/permissions.ts` and UI logic in `OrderDetailModal.tsx` and `Deliveries.tsx` to grant 'validate' permission to 'directeur' and 'manager' roles for deliveries.

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/1jHchFx
2025-08-12 12:24:01 +00:00
michaelschal e9551aeb63 Enhance reconciliation module with edit, validate, and delete functionalities
Implement edit, validate, and delete permissions for reconciliation, update validation logic, and address UI color inconsistencies for director and admin roles.

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/7EbZYsH
2025-08-12 10:33:09 +00:00
michaelschal b986763b6c Restrict employees from creating tasks and adjust other permissions
Update role permissions to prevent employees from creating tasks, while ensuring they can view tasks and suppliers. Adjustments also made to director and manager permissions for product validation.

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:59:38 +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 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