2026-06-09 16:28:25 +02:00
|
|
|
|
# Frontend – Gestione Rimborsi Spese Aziendali (Prova S5)
|
2026-06-09 12:25:37 +02:00
|
|
|
|
|
2026-06-09 16:28:25 +02:00
|
|
|
|
Applicazione web CSR (React + Vite + TypeScript) per la gestione dei rimborsi spese.
|
2026-06-09 12:25:37 +02:00
|
|
|
|
|
2026-06-09 16:28:25 +02:00
|
|
|
|
## URL produzione
|
2026-06-09 12:25:37 +02:00
|
|
|
|
|
2026-06-09 16:28:25 +02:00
|
|
|
|
| Risorsa | URL |
|
|
|
|
|
|
|---------|-----|
|
|
|
|
|
|
| Applicazione | https://provapraticafrontend.andreavillari.it |
|
|
|
|
|
|
| API backend | https://provapraticabackend.andreavillari.it |
|
|
|
|
|
|
| Documentazione API (Swagger) | https://provapraticabackend.andreavillari.it/api/docs |
|
2026-06-09 12:25:37 +02:00
|
|
|
|
|
2026-06-09 16:28:25 +02:00
|
|
|
|
## Credenziali di test
|
2026-06-09 12:25:37 +02:00
|
|
|
|
|
2026-06-09 16:28:25 +02:00
|
|
|
|
Password comune: `Password123!`
|
2026-06-09 12:25:37 +02:00
|
|
|
|
|
2026-06-09 16:28:25 +02:00
|
|
|
|
| Ruolo | Email |
|
|
|
|
|
|
|-------|-------|
|
|
|
|
|
|
| Responsabile amministrativo | `admin@azienda.it` |
|
|
|
|
|
|
| Dipendente | `mario.rossi@azienda.it` |
|
|
|
|
|
|
| Dipendente | `marco.bianchi@azienda.it` |
|
|
|
|
|
|
| Dipendente | `anna.verdi@azienda.it` |
|
2026-06-09 12:25:37 +02:00
|
|
|
|
|
2026-06-09 16:28:25 +02:00
|
|
|
|
Dalla pagina **Registrati** è possibile creare nuovi account scegliendo il ruolo.
|
2026-06-09 12:25:37 +02:00
|
|
|
|
|
2026-06-09 16:28:25 +02:00
|
|
|
|
## Funzionalità
|
2026-06-09 12:25:37 +02:00
|
|
|
|
|
2026-06-09 16:28:25 +02:00
|
|
|
|
- Login / registrazione / logout
|
|
|
|
|
|
- Dashboard differenziata per ruolo
|
|
|
|
|
|
- Dipendente: creazione, elenco, filtri, modifica ed eliminazione richieste in attesa
|
|
|
|
|
|
- Responsabile: gestione di tutte le richieste, approvazione, rifiuto, liquidazione
|
|
|
|
|
|
- Statistiche aggregate per mese e categoria
|
2026-06-09 12:25:37 +02:00
|
|
|
|
|
2026-06-09 16:28:25 +02:00
|
|
|
|
## Avvio locale
|
|
|
|
|
|
|
|
|
|
|
|
Configurare il file `.env` (`VITE_API_URL` vuoto in sviluppo per usare il proxy Vite verso il backend locale).
|
|
|
|
|
|
|
|
|
|
|
|
```bash
|
|
|
|
|
|
npm install
|
|
|
|
|
|
npm run dev
|
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|
|
Con `VITE_API_URL` vuoto, Vite inoltra le chiamate `/api` al backend su `http://localhost:3003`.
|
|
|
|
|
|
|
|
|
|
|
|
Build di produzione:
|
|
|
|
|
|
|
|
|
|
|
|
```bash
|
|
|
|
|
|
VITE_API_URL=https://provapraticabackend.andreavillari.it npm run build
|
2026-06-09 12:25:37 +02:00
|
|
|
|
```
|
|
|
|
|
|
|
2026-06-09 16:28:25 +02:00
|
|
|
|
Con Docker:
|
|
|
|
|
|
|
|
|
|
|
|
```bash
|
|
|
|
|
|
docker compose up -d --build
|
2026-06-09 12:25:37 +02:00
|
|
|
|
```
|
2026-06-09 16:28:25 +02:00
|
|
|
|
|
|
|
|
|
|
L'app è servita da nginx sulla porta `3002`.
|
|
|
|
|
|
|
|
|
|
|
|
## Deploy
|
|
|
|
|
|
|
|
|
|
|
|
Push su `main` → Forgejo Actions → SSH sul VPS → `docker compose up -d --build` in `/root/provapraticafrontend`.
|