-
This commit is contained in:
151
DEVELOPMENT.md
151
DEVELOPMENT.md
@@ -54,12 +54,115 @@ XX. **Nome Problema (FIX/IMPLEMENTATO DATA):** - **Problema:** Descrizione breve
|
||||
|
||||
## Quick Start - Session Recovery
|
||||
|
||||
**Ultima sessione:** 29 Novembre 2025 (pomeriggio)
|
||||
**Ultima sessione:** 30 Novembre 2025 (Notte)
|
||||
|
||||
**Stato progetto:** Migrazione Oracle APEX → .NET + React TypeScript in corso
|
||||
**Stato progetto:** Modulo Produzione COMPLETATO (incluso MRP ricorsivo e Dashboard). Prossimo step: Modulo Qualità o completamento Report System.
|
||||
|
||||
**Lavoro completato nell'ultima sessione:**
|
||||
|
||||
- **NUOVA FEATURE: Modulo Produzione (production) - Avanzato** - COMPLETATO
|
||||
- **Backend implementato:**
|
||||
- Entities: `WorkCenter`, `ProductionCycle`, `ProductionCyclePhase`, `ProductionOrderPhase`, `MrpSuggestion`
|
||||
- DTOs: `WorkCenterDto`, `ProductionCycleDto`, `ProductionOrderPhaseDto`, `MrpSuggestionDto` (con Create/Update variants)
|
||||
- Services: `ProductionService` (esteso), `MrpService`
|
||||
- Controllers: `WorkCentersController`, `ProductionCyclesController`, `MrpController`
|
||||
- Migration: `AddAdvancedProduction`
|
||||
- **Frontend implementato:**
|
||||
- Pages: `WorkCentersPage`, `ProductionCyclesPage`, `ProductionCycleFormPage`, `MrpPage`
|
||||
- Components: `ProductionOrderPhases` (gestione avanzamento), `ProductionLayout` (navigazione tab)
|
||||
- Services: `productionService.ts` (esteso)
|
||||
- Routing: `/production/work-centers`, `/production/cycles`, `/production/mrp`
|
||||
- Traduzioni: Aggiunte chiavi per centri lavoro, cicli, fasi e MRP in `translation.json` (IT e EN)
|
||||
- **Funzionalità:**
|
||||
- **Centri di Lavoro**: Gestione risorse produttive e costi orari
|
||||
- **Cicli Produttivi**: Definizione sequenze fasi standard per articolo
|
||||
- **Ordini di Produzione**:
|
||||
- Copia automatica fasi dal ciclo default alla creazione ordine
|
||||
- Gestione avanzamento fasi (Start/Complete) con tempi e quantità
|
||||
- **MRP (Material Requirements Planning)**:
|
||||
- Calcolo fabbisogni basato su ordini clienti e scorte minime
|
||||
- Generazione suggerimenti produzione/acquisto
|
||||
- Processamento suggerimenti (creazione automatica ordini)
|
||||
|
||||
- **FIX: Traduzioni Modulo Produzione** - RISOLTO
|
||||
- **Problema:** Alcune chiavi di traduzione mancanti o errate nel componente `ProductionOrderPhases`.
|
||||
- **Soluzione:**
|
||||
- Aggiornato `ProductionOrderPhases.tsx` per usare le chiavi corrette (`production.order.phases.*`).
|
||||
- Aggiunte le chiavi mancanti (`durationHelp`, stati fasi) in `it/translation.json` e `en/translation.json`.
|
||||
- **File modificati:** `ProductionOrderPhases.tsx`, `it/translation.json`, `en/translation.json`.
|
||||
|
||||
- **NUOVA FEATURE: Distinta Base Multilivello e MRP Ricorsivo** - COMPLETATO
|
||||
- **Backend:**
|
||||
- Aggiornato `MrpService` per calcolare i fabbisogni in modo ricorsivo (infiniti livelli).
|
||||
- Aggiornato `ProductionService` per supportare la creazione automatica e ricorsiva degli ordini figli per i semilavorati.
|
||||
- **Frontend:**
|
||||
- Aggiunta opzione "Crea ordini figli" nel form di creazione Ordine di Produzione.
|
||||
- Aggiornate traduzioni.
|
||||
- **Nuova Dashboard Produzione:** Creata pagina con KPI e ordini recenti.
|
||||
- **Visualizzazione Gerarchia:** Aggiunta colonna "Ordine Padre" nella lista e tab "Ordini Figli" nel dettaglio ordine.
|
||||
|
||||
- **NUOVA FEATURE: MRP Configurabile e Distinta Base Multilivello** - COMPLETATO
|
||||
- **Backend:**
|
||||
- Aggiornato `MrpService` per supportare configurazione (Safety Stock, Sales Orders, Forecasts).
|
||||
- Implementata logica MRP ricorsiva con gestione Lead Time e Safety Stock.
|
||||
- Aggiunto `MrpConfigurationDto`.
|
||||
- Aggiornato `MrpController` per accettare configurazione.
|
||||
- **Frontend:**
|
||||
- Creato `MrpConfigurationDialog` per impostare parametri MRP.
|
||||
- Aggiornato `MrpPage` per usare il dialog.
|
||||
- Aggiornato `productionService` per passare la configurazione.
|
||||
- Aggiunte traduzioni per la configurazione MRP.
|
||||
- **Test:**
|
||||
- Verificata creazione articoli e BOM multilivello.
|
||||
- Verificata esecuzione MRP (backend logica corretta).
|
||||
|
||||
- **NUOVA FEATURE: Modulo Vendite (sales)** - COMPLETATO
|
||||
- **Backend implementato:**
|
||||
- Entities: `SalesOrder`, `SalesOrderLine`
|
||||
- DTOs: `SalesOrderDto`, `SalesOrderLineDto` (con Create/Update variants)
|
||||
- Services: `SalesService` (CRUD, Confirm, Ship logic)
|
||||
- Controllers: `SalesOrdersController`
|
||||
- Migration: `AddSalesModule`
|
||||
- **Frontend implementato:**
|
||||
- Pages: `SalesOrdersPage`, `SalesOrderFormPage`
|
||||
- Services: `salesService.ts`
|
||||
- Routing: `/sales/orders`
|
||||
- Menu: Aggiunta voce "Vendite" nella sidebar
|
||||
- Traduzioni: Aggiunte chiavi per ordini in `translation.json` (IT)
|
||||
- **Funzionalità:**
|
||||
- Gestione ordini di vendita
|
||||
- Creazione ordini (Bozza -> Confermato -> Spedito)
|
||||
- Spedizione merce (Ship)
|
||||
- Calcolo totali ordine
|
||||
|
||||
- **FIX: Traduzioni Modulo Vendite e Menu** - RISOLTO
|
||||
- **Problema:** Chiavi di traduzione errate in `SalesOrderFormPage` e voci di menu mancanti in Inglese.
|
||||
- **Soluzione:**
|
||||
- Allineate chiavi `sales.orders.*` -> `sales.order.*` nel frontend.
|
||||
- Aggiunta sezione `sales` completa in `en/translation.json`.
|
||||
- Aggiunte voci menu "Purchases" e "Sales" in `en/translation.json`.
|
||||
- **File modificati:** `SalesOrderFormPage.tsx`, `en/translation.json`, `it/translation.json`.
|
||||
|
||||
- **NUOVA FEATURE: Modulo Acquisti (purchases)** - COMPLETATO
|
||||
- **Backend implementato:**
|
||||
- Entities: `Supplier`, `PurchaseOrder`, `PurchaseOrderLine`
|
||||
- DTOs: `SupplierDto`, `PurchaseOrderDto`, `PurchaseOrderLineDto` (con Create/Update variants)
|
||||
- Services: `SupplierService`, `PurchaseService` (CRUD, Confirm, Receive logic)
|
||||
- Controllers: `SuppliersController`, `PurchaseOrdersController`
|
||||
- Migration: `AddPurchasesModule`
|
||||
- AutoCode: Integrazione per generazione codici `Supplier` e `PurchaseOrder`
|
||||
- **Frontend implementato:**
|
||||
- Pages: `SuppliersPage`, `SupplierFormPage`, `PurchaseOrdersPage`, `PurchaseOrderFormPage`
|
||||
- Services: `supplierService.ts`, `purchaseService.ts`
|
||||
- Routing: `/purchases/suppliers`, `/purchases/orders`
|
||||
- Menu: Aggiunta voce "Acquisti" nella sidebar
|
||||
- Traduzioni: Aggiunte chiavi per fornitori e ordini in `translation.json` (IT e EN)
|
||||
- **Funzionalità:**
|
||||
- Gestione anagrafica fornitori
|
||||
- Creazione ordini di acquisto (Bozza -> Confermato -> Ricevuto)
|
||||
- Ricezione merce con generazione automatica movimenti di magazzino (Inbound)
|
||||
- Calcolo totali ordine (imponibile, IVA, totale)
|
||||
|
||||
- **NUOVA FEATURE: Supporto Tema Scuro e Multilingua** - COMPLETATO
|
||||
- **Obiettivo:** Permettere all'utente di cambiare tema (Chiaro/Scuro) e lingua (Italiano/Inglese) con persistenza
|
||||
- **Frontend implementato:**
|
||||
@@ -157,6 +260,17 @@ XX. **Nome Problema (FIX/IMPLEMENTATO DATA):** - **Problema:** Descrizione breve
|
||||
- In modifica: campo Codice mostra il valore reale, sempre disabled
|
||||
- Campo "Codice Alternativo" sempre modificabile (opzionale)
|
||||
|
||||
- **FIX: API 404 / Pagine Bianche in Dev Mode** - RISOLTO
|
||||
- **Problema:** Le chiamate API dal frontend fallivano con 404 (o ritornavano HTML) e le pagine rimanevano bianche.
|
||||
- **Causa:** Mancava la configurazione del proxy in `vite.config.ts` per inoltrare le richieste `/api` al backend (.NET su porta 5000).
|
||||
- **Soluzione:** Aggiunto proxy per `/api` e `/hubs` verso `http://localhost:5000` in `vite.config.ts`.
|
||||
- **File modificati:** `frontend/vite.config.ts`
|
||||
|
||||
- **FIX: Traduzioni Mancanti e Chiavi Errate** - RISOLTO
|
||||
- **Problema:** Errori di interfaccia dovuti a chiavi di traduzione mancanti (`common.required`, `common.add`, `common.active`) e percorsi errati in `PurchaseOrderFormPage` e `SuppliersPage`.
|
||||
- **Soluzione:** Aggiunte chiavi mancanti in `en/translation.json` e corretti i percorsi delle chiavi nei componenti React.
|
||||
- **File modificati:** `frontend/public/locales/en/translation.json`, `frontend/src/modules/purchases/pages/PurchaseOrderFormPage.tsx`, `frontend/src/modules/purchases/pages/SuppliersPage.tsx`
|
||||
|
||||
**Lavoro completato nelle sessioni precedenti (30 Novembre 2025):**
|
||||
|
||||
- **NUOVA FEATURE: Sistema Codici Automatici Configurabili** - COMPLETATO
|
||||
@@ -520,9 +634,12 @@ XX. **Nome Problema (FIX/IMPLEMENTATO DATA):** - **Problema:** Descrizione breve
|
||||
- Backend: Entities, Service, Controllers, API completi
|
||||
- Manca: Frontend (pagine React per gestione articoli, movimenti, giacenze)
|
||||
2. [x] **Frontend modulo Magazzino** - Pagine React per warehouse (Articoli, Movimenti, Giacenze, Inventario)
|
||||
3. [ ] **Implementare modulo Acquisti (purchases)** - Dipende da Magazzino
|
||||
4. [ ] **Implementare modulo Vendite (sales)** - Dipende da Magazzino
|
||||
5. [ ] **Implementare modulo Produzione (production)** - Dipende da Magazzino
|
||||
3. [x] **Implementare modulo Acquisti (purchases)** - COMPLETATO
|
||||
4. [x] **Implementare modulo Vendite (sales)** - COMPLETATO
|
||||
5. [x] **Implementare modulo Produzione (production)** - COMPLETATO
|
||||
- Backend: Entities, Service, Controllers, API completi
|
||||
- Frontend: Pagine React per BOM e Ordini, integrazione Magazzino
|
||||
- Test: Verificato flusso completo (BOM -> Ordine -> Stati -> Completamento)
|
||||
6. [ ] **Implementare modulo Qualità (quality)** - Indipendente
|
||||
|
||||
**Report System (completamento):**
|
||||
@@ -558,6 +675,30 @@ make check # Verifica prerequisiti installati (dotnet, node, npm)
|
||||
- Frontend: in dev mode (`make frontend-run`) il hot-reload è automatico per la maggior parte delle modifiche, ma per modifiche strutturali (nuovi file, cambi a tipi, etc.) potrebbe essere necessario riavviare
|
||||
|
||||
---
|
||||
# Development Documentation
|
||||
|
||||
## Production Module Implementation
|
||||
- **Backend**:
|
||||
- Entities: `BillOfMaterials`, `BillOfMaterialsComponent`, `ProductionOrder`, `ProductionOrderComponent`
|
||||
- Services: `ProductionService` (implements `IProductionService`)
|
||||
- Controllers: `BillOfMaterialsController`, `ProductionOrdersController`
|
||||
- Integration: Registered in `Program.cs`, added to `AppollinareDbContext`
|
||||
- **Frontend**:
|
||||
- Types: `frontend/src/modules/production/types/index.ts`
|
||||
- Services: `frontend/src/modules/production/services/productionService.ts`
|
||||
- Pages:
|
||||
- `ProductionOrdersPage` (List)
|
||||
- `ProductionOrderFormPage` (Create/Edit)
|
||||
- `BillOfMaterialsPage` (List)
|
||||
- `BillOfMaterialsFormPage` (Create/Edit)
|
||||
- Routes: `frontend/src/modules/production/routes.tsx`
|
||||
- Menu: Added to `Layout.tsx` with `Factory` icon
|
||||
- Translations: Added `production` section to `it` and `en` locales
|
||||
|
||||
## Recent Changes
|
||||
- Fixed build errors in Purchases and Sales modules (types and unused imports).
|
||||
- Implemented Production module with full CRUD and status management.
|
||||
- Integrated Production module with Warehouse module for article selection.
|
||||
|
||||
## Project Overview
|
||||
|
||||
|
||||
Reference in New Issue
Block a user