fix: Fix folders regressions in controller

This commit is contained in:
Vincent BRIDIER 2025-10-27 16:07:44 +01:00
parent 3d1e08c664
commit b6338d4574
No known key found for this signature in database
GPG key ID: 8571BFA20420D512

View file

@ -43,7 +43,7 @@ class DossierController extends Controller
$publicFolders = Dossier::query()
->whereHas('sujet', fn (Builder $q) => $q->where('codeSujet', $request->input('sujet_id')))
->where('is_private', false)
->whereDoesntHave('dossierParent')
->whereNull('parent_id')
->select($select)->get();
@ -75,7 +75,7 @@ class DossierController extends Controller
// * Ajout du dépôt de fichier pour les admin.
/** @var \Illuminate\Database\Eloquent\Collection<\App\Models\Dossier> Dossiers depots */
$depotQuery = Dossier::query()
->whereDoesntHave('dossierParent')
->whereNull('parent_id')
->where('system', true)
->orderBy('libelle', 'ASC')
->get();
@ -150,7 +150,7 @@ class DossierController extends Controller
/** @var \Illuminate\Database\Eloquent\Collection<\App\Models\Dossier> */
$dossiers = Dossier::query()
->whereDoesntHave('dossierParent')
->whereNull('parent_id')
->where('system', false)
->orderBy('libelle', 'asc')
->get();
@ -174,7 +174,7 @@ class DossierController extends Controller
if ($request->sub) {
/** @var \Illuminate\Database\Eloquent\Collection<\App\Models\Dossier> */
$dossiers = Dossier::query()
->whereDoesntHave('dossierParent')
->whereNull('parent_id')
->where('system', false)
->orderBy('libelle', 'asc')->get();
return view('dossiers.create-sub', [