Ajout masquage de projets pour utilisateurs Pochet
All checks were successful
Deploy Preprod / Build and Deploy to Preprod (push) Successful in 28s
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:
parent
7ca72c6d82
commit
30b7697c64
8 changed files with 263 additions and 5 deletions
|
|
@ -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'] = [];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue