notifications seems to work but new comments erase previous ones

This commit is contained in:
isUnknown 2024-10-28 15:55:14 +01:00
parent 44361e614d
commit 85537d3465
5 changed files with 16 additions and 130 deletions

View file

@ -5,15 +5,15 @@ return function ($page, $kirby) {
$data['template'] = (string) $page->template();
$userData = [
"role" => $kirby->user()->role(),
"uuid" => $kirby->user()->uuid(),
"role" => (string) $kirby->user()->role(),
"uuid" => (string) $kirby->user()->uuid(),
"notifications" => Yaml::decode($kirby->user()->notifications()->value()),
];
if ($kirby->user()->role() == 'client') {
$userData['client'] = [
"name" => $kirby->user()->client()->toPage()->title(),
"uuid" => $kirby->user()->client()->toPage()->uuid()
"name" => (string) $kirby->user()->client()->toPage()->title(),
"uuid" => (string) $kirby->user()->client()->toPage()->uuid()
];
}