feat: add previous configuration handling for user selections in quotes

- Implemented session storage management for the last configuration choices made by the user.
- Added functionality to prompt users when changing models to retain their previous selections.
- Introduced methods to apply previous choices to the newly loaded model, including finishes, handles, glass types, and options.
- Enhanced user experience by ensuring selections are automatically applied where applicable.
This commit is contained in:
2026-10-19 19:49:44 +02:00
parent 863e6ca920
commit 06617a985a
197 changed files with 4892 additions and 400 deletions
+21
View File
@@ -24,6 +24,27 @@ class Sistema extends Model
return $this->hasMany(Modello::class);
}
public function finiture(): HasMany
{
return $this->hasMany(Finitura::class);
}
public function vetri(): HasMany
{
return $this->hasMany(Vetro::class);
}
public function regoleVetro(): HasMany
{
return $this->hasMany(RegolaVetro::class);
}
/** Opzioni del sistema (senza quelle personalizzate per modello). */
public function opzioni(): HasMany
{
return $this->hasMany(Opzione::class)->whereNull('modello_id');
}
public function scopeAttivi(Builder $query): Builder
{
return $query->where('attivo', true)->orderBy('ordine')->orderBy('id');