mirror of
https://github.com/Karaka-Management/oms-Notification.git
synced 2026-02-14 07:38:40 +00:00
more code fixes
This commit is contained in:
parent
5b43c81993
commit
ef689d001d
|
|
@ -54,7 +54,7 @@ final class BackendController extends Controller implements DashboardElementInte
|
||||||
$view->data['notifications'] = NotificationMapper::getAll()
|
$view->data['notifications'] = NotificationMapper::getAll()
|
||||||
->where('createdFor', $request->header->account)
|
->where('createdFor', $request->header->account)
|
||||||
->where('seenAt', null)
|
->where('seenAt', null)
|
||||||
->where('createdAt', new \DateTime('now'), '<') // Don't show pre-created notifications
|
->where('createdAt', new \DateTime('now'), '<') // Don't show future notifications
|
||||||
->sort('createdAt', OrderType::ASC)
|
->sort('createdAt', OrderType::ASC)
|
||||||
->execute();
|
->execute();
|
||||||
|
|
||||||
|
|
@ -73,7 +73,7 @@ final class BackendController extends Controller implements DashboardElementInte
|
||||||
$view->data['notifications'] = NotificationMapper::getAll()
|
$view->data['notifications'] = NotificationMapper::getAll()
|
||||||
->where('createdFor', $request->header->account)
|
->where('createdFor', $request->header->account)
|
||||||
->where('seenAt', null)
|
->where('seenAt', null)
|
||||||
->where('createdAt', new \DateTime('now'), '<') // Don't show pre-created notifications
|
->where('createdAt', new \DateTime('now'), '<') // Don't show future notifications
|
||||||
->sort('createdAt', OrderType::ASC)
|
->sort('createdAt', OrderType::ASC)
|
||||||
->limit(5)
|
->limit(5)
|
||||||
->execute();
|
->execute();
|
||||||
|
|
@ -95,7 +95,7 @@ final class BackendController extends Controller implements DashboardElementInte
|
||||||
return NotificationMapper::count()
|
return NotificationMapper::count()
|
||||||
->where('createdFor', $account)
|
->where('createdFor', $account)
|
||||||
->where('seenAt', null)
|
->where('seenAt', null)
|
||||||
->where('createdAt', new \DateTime('now'), '<') // Don't show pre-created notifications
|
->where('createdAt', new \DateTime('now'), '<') // Don't show future notifications
|
||||||
->execute();
|
->executeCount();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user