Skip to content
Snippets Groups Projects
Commit ba75e09c authored by Sebastian Mihalache's avatar Sebastian Mihalache :hammer_pick:
Browse files

fix(manuscript-manager): add visiblestatus for admin

parent ab24416b
No related branches found
No related tags found
2 merge requests!110Sprint 21 Features,!66Hin 1020
...@@ -90,6 +90,7 @@ describe('Get collections route handler', () => { ...@@ -90,6 +90,7 @@ describe('Get collections route handler', () => {
expect(data).toHaveLength(2) expect(data).toHaveLength(2)
expect(data[0].type).toEqual('collection') expect(data[0].type).toEqual('collection')
expect(data[0]).toHaveProperty('visibleStatus')
expect(data[0].currentVersion.recommendations).toHaveLength(3) expect(data[0].currentVersion.recommendations).toHaveLength(3)
}) })
}) })
...@@ -315,6 +315,9 @@ async function applyEditorInChiefPolicy(user, operation, object, context) { ...@@ -315,6 +315,9 @@ async function applyEditorInChiefPolicy(user, operation, object, context) {
coll.currentVersion = await context.models.Fragment.find( coll.currentVersion = await context.models.Fragment.find(
latestFragmentId, latestFragmentId,
) )
const status = get(coll, 'status', 'draft')
coll.visibleStatus = get(statuses, `${status}.editorInChief.label`)
return coll return coll
}), }),
) )
......
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