Skip to content
Snippets Groups Projects
Commit a6d8d863 authored by Andrei Cioromila's avatar Andrei Cioromila
Browse files

fix(authsome): Update collections status for /collections route

parent 637a6cdd
No related branches found
No related tags found
2 merge requests!110Sprint 21 Features,!78Fix/hin 1022
......@@ -239,7 +239,19 @@ const getCollections = async ({ user, models }) => {
role: up.role,
})
return stripedColl.coll
const role = get(up, 'role', 'author')
let visibleStatus = get(statuses, `${status}.${role}.label`)
if (role === 'reviewer' && status !== 'reviewersInvited') {
visibleStatus = await updateReviewerVisibleStatusByInvitation({
collection,
FragmentModel: models.Fragment,
user,
})
}
return { ...stripedColl.coll, visibleStatus }
}),
)).filter(Boolean)
}
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment