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

feat(manuscript-manager): add visibleStatus to collections

parent e8f887be
No related branches found
No related tags found
2 merge requests!110Sprint 21 Features,!66Hin 1020
......@@ -44,7 +44,7 @@ const collections = {
technicalChecks: {
token: chance.guid(),
},
status: 'submitted',
status: 'reviewCompleted',
customId: chance.natural({ min: 999999, max: 9999999 }),
},
collection1: {
......
......@@ -38,6 +38,7 @@ describe('Get collections route handler', () => {
expect(data).toHaveLength(1)
expect(data[0].type).toEqual('collection')
expect(data[0]).toHaveProperty('currentVersion')
expect(data[0]).toHaveProperty('visibleStatus')
expect(data[0].currentVersion.type).toEqual('fragment')
expect(data[0].currentVersion.recommendations).toHaveLength(3)
})
......
......@@ -224,8 +224,15 @@ const getCollections = async ({ user, models }) => {
user,
})
}
const status = get(collection, 'status', 'draft')
collection.visibleStatus = get(statuses, `${status}.${up.role}.label`)
return collection
const stripedColl = stripeCollectionByRole({
coll: collection,
role: up.role,
})
return stripedColl.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