Commit Graph
3 Commits
Author SHA1 Message Date
michaelschal fd2ef4f7a1 Enable administrators to delete sales and manage store selections
Fixes sales deletion route and updates admin user role in the database.

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
2025-07-19 17:10:19 +00:00
michaelschal be78e1497c Ensure sales are recorded to the correct store based on user selection
Fixes sales creation logic to correctly send storeId and updates admin role check.

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/mXpFFH6
2025-07-19 16:48:28 +00:00
michaelschal c909650566 Give administrators access to all stores and fix store selector
Updates user role checks and store access logic in /api/stores route, adds a fix script.

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/496YcVj
2025-07-19 16:17:15 +00:00