close #2154 Fixed: Notification widget items check issue #n16d9b

This commit is contained in:
Cüneyt Şentürk 2021-06-28 12:17:07 +03:00
parent 0640fca05f
commit 5697eb0248
4 changed files with 8 additions and 8 deletions

View File

@ -68,10 +68,10 @@ class Exports extends Component
$notifications = $query->get();
}
if ($notifications->items()) {
if ($notifications) {
$items = [];
foreach ($notifications->items() as $key => $notification) {
foreach ($notifications as $key => $notification) {
$data = (object) $notification->getAttribute('data');
$data->notification_id = $notification->getAttribute('id');

View File

@ -68,10 +68,10 @@ class Imports extends Component
$notifications = $query->get();
}
if ($notifications->items()) {
if ($notifications) {
$items = [];
foreach ($notifications->items() as $key => $notification) {
foreach ($notifications as $key => $notification) {
$data = (object) $notification->getAttribute('data');
$data->notification_id = $notification->getAttribute('id');

View File

@ -63,10 +63,10 @@ class Recurring extends Component
$notifications = $query->get();
}
if ($notifications->items()) {
if ($notifications) {
$items = [];
foreach ($notifications->items() as $key => $notification) {
foreach ($notifications as $key => $notification) {
$data = (object) $notification->getAttribute('data');
$item = Document::{$this->type}()->where('id', $data[$this->type . '_id'])->first();

View File

@ -63,10 +63,10 @@ class Reminder extends Component
$notifications = $query->get();
}
if ($notifications->items()) {
if ($notifications) {
$items = [];
foreach ($notifications->items() as $key => $notification) {
foreach ($notifications as $key => $notification) {
$data = (object) $notification->getAttribute('data');
$item = Document::{$this->type}()->where('id', $data[$this->type . '_id'])->first();