- Added ListinoRelationManager for managing price lists associated with models. - Introduced ImportaListiniAction for importing price lists from Excel files. - Created ListinoPrezzo model to represent price entries in the database. - Developed ListinoExcelParser for parsing Excel files containing price lists. - Implemented ListinoImporter to handle the import logic and associations. - Added migration for creating listino_prezzi table and converting measures to mm. - Updated frontend logic to handle new price list features and validations. - Enhanced tests for price list import and conversion functionalities.
30 lines
1.3 KiB
PHP
30 lines
1.3 KiB
PHP
<?php
|
|
|
|
use App\Http\Controllers\Api\AuthController;
|
|
use App\Http\Controllers\Api\CarrelloController;
|
|
use App\Http\Controllers\Api\CatalogoController;
|
|
use Illuminate\Support\Facades\Route;
|
|
|
|
// Espone al configuratore l'URL corrente dell'app cliente (checkout), così il
|
|
// frontend non deve indovinare la porta su cui gira Vite (può cambiare se 5174 è occupata).
|
|
Route::get('config', fn () => response()->json([
|
|
'frontend_cliente_url' => config('preventivi.frontend_cliente_url'),
|
|
]));
|
|
|
|
// Catalogo prodotti (sistemi e modelli con icone) per il configuratore.
|
|
Route::get('sistemi', [CatalogoController::class, 'sistemi']);
|
|
Route::get('sistemi/{codice}', [CatalogoController::class, 'sistemaPerCodice']);
|
|
Route::get('sistemi/{codice}/modelli/{modello}/listino', [CatalogoController::class, 'listino']);
|
|
|
|
Route::prefix('auth')->group(function () {
|
|
Route::post('login', [AuthController::class, 'login']);
|
|
Route::middleware('auth:sanctum')->get('me', [AuthController::class, 'me']);
|
|
});
|
|
|
|
Route::prefix('carrello')->group(function () {
|
|
Route::post('aggiungi', [CarrelloController::class, 'aggiungi']);
|
|
Route::get('{token}', [CarrelloController::class, 'mostra']);
|
|
Route::delete('{token}/item/{item}', [CarrelloController::class, 'rimuoviItem']);
|
|
Route::post('{token}/conferma', [CarrelloController::class, 'conferma']);
|
|
});
|