notifications working

This commit is contained in:
isUnknown 2024-11-22 07:53:43 +01:00
parent 699c0bfa1d
commit 8ae00d7657
8 changed files with 28 additions and 202 deletions

View file

@ -112,7 +112,17 @@ class ProjectPage extends Page {
return $stepsLabel[$this->currentStep()->value()];
}
public function printManagers() {
return A::implode($this->managers()->toUsers()->pluck('name'), ', ');
// public function printManagers() {
// return A::implode($this->managers()->toUsers()->pluck('name'), ', ');
// }
public function managers() {
return kirby()->users()->filter(function($user) {
if ($user->projects()->isEmpty()) {
return false;
}
return $user->role() === 'admin' || $user->projects()->toPages()->has($this);
});
}
}