fix: Correct user role permissions and restrict dashboard/settings access

- Fix setupUIForRole selector to use correct data-tab attributes
- Hide Dashboard and Settings tabs for regular users (non-admin)
- Remove delete buttons from sales table for regular users
- Set initial tab to 'Ventas' for regular users instead of Dashboard
- Add comprehensive logging for role setup debugging
- Update cache buster to v=101.0 for proper browser refresh

Security improvements:
- Regular users: Access to Ventas, Clientes, Productos only
- Admin users: Full access to all sections including Dashboard/Settings
- Proper enforcement of user role restrictions in UI

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Marco Gallegos
2025-09-04 19:49:55 -06:00
parent bb99be5098
commit 8df8e30092
2 changed files with 31 additions and 13 deletions

View File

@@ -629,6 +629,6 @@
<div id="printArea" class="no-print"></div>
<script src="https://cdn.jsdelivr.net/npm/qrcode@1/build/qrcode.min.js"></script>
<script type="module" src="app.js?v=99.9"></script>
<script type="module" src="app.js?v=101.0"></script>
</body>
</html>