Refactor PVC models and update tests

- Updated the PVC models in the database and adjusted the tests accordingly to reflect the new model counts and codes.
- Removed deprecated models from the JSON data for PVC systems.
- Added new GLB models for "scorrevole_sf_3_ante" and "scorrevole_sf_4_ante".
- Enhanced the development scripts to streamline the build process for both frontends.
- Updated documentation to reflect changes in the development environment and deployment process.
- Improved the styling of texture radio options for better visibility.
- Fixed URL handling in the configurator to ensure proper routing and API calls.
This commit is contained in:
2026-10-20 18:40:59 +02:00
parent b6a32edfe6
commit 0dfda3a338
33 changed files with 339 additions and 366 deletions
+4 -5
View File
@@ -25,12 +25,11 @@ window.GLTFLoader = GLTFLoader; // Used by APP Scripts.
// --- Integrazione backend preventivi ---
const CART_TOKEN_KEY = 'kreios_cart_token';
// URL dell'app cliente (checkout): richiesto all'API invece di essere indovinato, perché la
// porta Vite dell'app cliente può cambiare (es. se 5199 è già occupata). Fallback locale se
// il backend non è raggiungibile.
// URL dell'app cliente (checkout): richiesto all'API (APP_FRONTEND_CLIENTE_URL). Fallback: la pagina
// /preventivo servita dallo stesso backend del configuratore.
let appClienteUrl =
(typeof window.APP_CLIENTE_URL === 'string' && window.APP_CLIENTE_URL) ||
'http://localhost:5199';
`${window.location.origin}/preventivo`;
const configReady = (async () => {
try {
@@ -66,7 +65,7 @@ window.mostraLinkPreventivo = (token, count) => {
// diverse in dev/prod): lo passiamo qui come parametro, così il link "torna al configuratore"
// nella pagina di conferma può essere generato dinamicamente invece di essere hardcoded.
const ritorno = encodeURIComponent(window.location.href);
let href = `${appClienteUrl}/?token=${encodeURIComponent(token)}&ritorno=${ritorno}`;
let href = `${appClienteUrl.replace(/\/+$/, '')}/?token=${encodeURIComponent(token)}&ritorno=${ritorno}`;
// Se il cliente è loggato nel configuratore, passiamo il suo token anche al checkout
// così può precompilare l'anagrafica già salvata (vedi AuthGate.getToken()).
const clienteToken = AuthGate.getToken();