read read notification in front end working
This commit is contained in:
parent
fe56312f20
commit
583daa1759
6 changed files with 35 additions and 57 deletions
|
|
@ -43,7 +43,6 @@ class BaseComment {
|
|||
$this->date = $date;
|
||||
$this->id = $id;
|
||||
$this->type = $type;
|
||||
$this->isRead = false;
|
||||
$this->position = $position;
|
||||
}
|
||||
|
||||
|
|
@ -79,20 +78,6 @@ class BaseComment {
|
|||
return $this->type;
|
||||
}
|
||||
|
||||
public function isRead() {
|
||||
return $this->isRead;
|
||||
}
|
||||
|
||||
public function read() {
|
||||
$this->isRead = true;
|
||||
return $this->isRead;
|
||||
}
|
||||
|
||||
public function unread() {
|
||||
$this->isRead = false;
|
||||
return $this->isRead;
|
||||
}
|
||||
|
||||
public function pageIndex() {
|
||||
$this->position['pageIndex'];
|
||||
}
|
||||
|
|
@ -108,7 +93,6 @@ class BaseComment {
|
|||
'date' => $this->date,
|
||||
'id' => $this->id,
|
||||
'type' => $this->type,
|
||||
'isRead' => $this->isRead
|
||||
];
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -15,7 +15,6 @@ return function($project, $notificationId) {
|
|||
}
|
||||
}
|
||||
|
||||
// Réindexation et ré-encodage en YAML avant la mise à jour
|
||||
$user->update([
|
||||
'notifications' => Yaml::encode(array_values($notifications))
|
||||
]);
|
||||
|
|
|
|||
|
|
@ -14,6 +14,7 @@
|
|||
*/
|
||||
|
||||
return function ($projectUri, $notificationData) {
|
||||
$notificationData['isRead'] = false;
|
||||
$recipients = page($projectUri)->managers()->toUsers()->not($this);
|
||||
|
||||
if (!$recipients) return;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue