read content notification on click
This commit is contained in:
parent
1fae3dd414
commit
495e1c024e
7 changed files with 25 additions and 16 deletions
|
|
@ -9,7 +9,6 @@ return [
|
|||
|
||||
$page = page($data->briefUri);
|
||||
$project = $page->parent();
|
||||
$dialogUri = $data->dialogUri ? $data->dialogUri : null;
|
||||
|
||||
try {
|
||||
$newPage = $page->update([
|
||||
|
|
@ -22,8 +21,6 @@ return [
|
|||
$notification = [
|
||||
'location' => [
|
||||
'page' => $page,
|
||||
'project' => $project,
|
||||
'dialogUri' => (string) $dialogUri,
|
||||
],
|
||||
'date' => $dateTime->format('Y-m-d\TH:i:sP'),
|
||||
'text' => "Nouveau brief",
|
||||
|
|
@ -32,7 +29,7 @@ return [
|
|||
'type' => 'content'
|
||||
];
|
||||
|
||||
kirby()->user()->sendNotification($project, $notification);
|
||||
$project->createNotification($notification);
|
||||
|
||||
return [
|
||||
"success" => "'" . $project->title()->value() . "' brief validated."
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue