Ajout masquage de projets pour utilisateurs Pochet
All checks were successful
Deploy Preprod / Build and Deploy to Preprod (push) Successful in 28s

Backend :
- Blueprint pochet : champ hiddenProjects
- Route API toggle-hidden-project.php
- Controller site.php : retourne hiddenProjects + uuid dans projects

Frontend :
- Store user : hiddenProjects, visibleProjects, toggleHiddenProject()
- Store projects : filtrage automatique des projets masqués
- Store api : fonction toggleHiddenProject()
- Account.vue : section projets avec cartes horizontales + boutons toggle
  - Affichage pour Pochet (avec toggle) et Client (sans toggle)
  - Section client masquée pour Pochet

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
isUnknown 2026-01-30 11:27:27 +01:00
parent 7ca72c6d82
commit 30b7697c64
8 changed files with 263 additions and 5 deletions

View file

@ -33,9 +33,18 @@ return function ($page, $kirby, $site) {
"title" => (string) $project->title(),
"uri" => (string) $project->uri(),
"step" => (string) $project->getStepLabel(),
"uuid" => (string) $project->uuid(),
];
})->data;
}
if ($kirby->user()->hiddenProjects()->exists() && $kirby->user()->hiddenProjects()->isNotEmpty()) {
$userData['hiddenProjects'] = $kirby->user()->hiddenProjects()->toPages()->map(function ($project) {
return (string) $project->uuid();
})->data;
} else {
$userData['hiddenProjects'] = [];
}
}