refactor: modularize frontend pages into feature-specific modules, update routing, and related documentation.

This commit is contained in:
2025-12-03 19:55:19 +01:00
parent 8a735e1443
commit 436720d4a7
5 changed files with 67 additions and 1 deletions

View File

@@ -0,0 +1,25 @@
# Refactoring Menu and Modules
## Objective
Restructure the navigation menu and organize existing functionalities into specific modules as requested:
- Dashboard -> Gestione Eventi
- Clienti -> Vendite
- Articoli -> Magazzino
- Risorse -> Personale (New Module)
## Plan
1. **Create "Personale" module**: Create directory structure `src/frontend/src/modules/personale`.
2. **Move Files**:
- `src/frontend/src/pages/Dashboard.tsx` -> `src/frontend/src/modules/events/pages/DashboardPage.tsx`
- `src/frontend/src/pages/ClientiPage.tsx` -> `src/frontend/src/modules/sales/pages/ClientiPage.tsx`
- `src/frontend/src/pages/ArticoliPage.tsx` -> `src/frontend/src/modules/warehouse/pages/ArticoliPage.tsx`
- `src/frontend/src/pages/RisorsePage.tsx` -> `src/frontend/src/modules/personale/pages/RisorsePage.tsx`
3. **Update Routes**:
- Update `src/frontend/src/App.tsx` to remove old routes and add `PersonaleRoutes`.
- Update `src/frontend/src/modules/events/routes.tsx` to include Dashboard.
- Update `src/frontend/src/modules/sales/routes.tsx` to include Clienti.
- Update `src/frontend/src/modules/warehouse/routes.tsx` to include Articoli.
- Create `src/frontend/src/modules/personale/routes.tsx`.
4. **Update Sidebar**:
- Update `src/frontend/src/components/Sidebar.tsx` to reflect the new menu structure.
5. **Verify**: Ensure all links work and the application runs correctly.