Improve store management and fix admin permissions within the application

Fixes store selection, sales creation, API routes and delete permissions using administrator role.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 4b008663-bd72-492b-b0b6-fa252367e730
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/0715008c-7244-40f4-befc-26c014852236/4b008663-bd72-492b-b0b6-fa252367e730/gfGF2TH
This commit is contained in:
michaelschal committed 2025-07-19 17:20:19 +00:00
1 parent fd2ef4f7a1
commit 2fe3385129
1 file changed
+10
+10
View File
@@ -342,6 +342,16 @@ Preferred communication style: Simple, everyday language.
- ✅ **Health Diagnostics**: Added production-ready health checks and monitoring
- ✅ **Multi-stage Build**: Optimized Dockerfile for production performance and security
### Critical Production Fixes - Store Management & Permissions (January 19, 2025)
- ✅ **Store Selection Bug Fixed**: Frontend used 'admin' instead of 'administrator' role check
- ✅ **Sales Creation Fixed**: Ventes now created on selected store instead of default Frouard
- ✅ **API Routes Corrected**: All routes use 'administrator' role consistently
- ✅ **Delete Permissions Fixed**: Sales deletion route corrected from 'admin' to 'administrator'
- ✅ **Admin Store Access Fixed**: Admin users have store_id = NULL for full access
- ✅ **Production Database Corrected**: Applied SQL fixes for user ID 3 (gael) permissions
- ✅ **Complete Store Management**: Admin can select any store, create sales on selected store
- ✅ **Permission Consistency**: All CRUD operations work with standardized 'administrator' role
### Previous Docker Issues (January 13, 2025)
- ✅ Resolved cache corruption errors during Docker deployment
- ✅ Fixed missing prod-start.js references in Dockerfile and entrypoint scripts