mirror of
https://framagit.org/les/gancio.git
synced 2025-01-31 16:42:22 +01:00
fix: incosistent navigation among published and not published events, fix #428
> take into account the unconfirmed events for navigation purposes, if you are logged in as an editor or admin?
This commit is contained in:
parent
9b7b1f289f
commit
3b750c89ab
1 changed files with 4 additions and 4 deletions
|
@ -157,8 +157,8 @@ const eventController = {
|
|||
attributes: ['id', 'slug'],
|
||||
where: {
|
||||
id: { [Op.not]: event.id },
|
||||
is_visible: true,
|
||||
...(!res.locals.settings.collection_in_home && ({ ap_id: null }) ),
|
||||
...( !isAdminOrEditor && ({ is_visible: true })),
|
||||
...( !res.locals.settings.collection_in_home && ({ ap_id: null }) ),
|
||||
recurrent: null,
|
||||
[Op.or]: [
|
||||
{ start_datetime: { [Op.gt]: event.start_datetime } },
|
||||
|
@ -174,9 +174,9 @@ const eventController = {
|
|||
const prev = await Event.findOne({
|
||||
attributes: ['id', 'slug'],
|
||||
where: {
|
||||
is_visible: true,
|
||||
id: { [Op.not]: event.id },
|
||||
...( !isAdminOrEditor && ({ is_visible: true })),
|
||||
...(!res.locals.settings.collection_in_home && ({ ap_id: null }) ),
|
||||
id: { [Op.not]: event.id },
|
||||
recurrent: null,
|
||||
[Op.or]: [
|
||||
{ start_datetime: { [Op.lt]: event.start_datetime } },
|
||||
|
|
Loading…
Reference in a new issue