Refactor: remove setup wizard and related middleware, update settings management
This commit is contained in:
@@ -168,9 +168,8 @@ class Territorio extends Model
|
||||
$soglia = Setting::getValue('giorni_per_smarrito', 120);
|
||||
|
||||
return $query->attivi()
|
||||
->whereHas('assegnazioni', function ($q) use ($soglia) {
|
||||
$q->whereNull('returned_at')
|
||||
->where('assigned_at', '<=', now()->subDays($soglia));
|
||||
->whereHas('assegnazioneCorrente', function ($q) use ($soglia) {
|
||||
$q->where('assigned_at', '<=', now()->subDays($soglia));
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user