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

refactor(collection-helper): remove unused functions

parent 224a6db2
No related branches found
No related tags found
3 merge requests!196S25 - EiC submit revision,!189S25,!177Hin 230 eic request revision
......@@ -48,25 +48,6 @@ class Collection {
return this.updateStatus({ newStatus })
}
async updateFinalStatusByRecommendation({ recommendation }) {
let newStatus
switch (recommendation) {
case 'reject':
newStatus = 'rejected'
break
case 'publish':
newStatus = 'accepted'
break
case 'return-to-handling-editor':
newStatus = 'reviewCompleted'
break
default:
break
}
await this.updateStatus({ newStatus })
}
async updateStatus({ newStatus }) {
this.collection.status = newStatus
await this.collection.save()
......@@ -104,21 +85,6 @@ class Collection {
await this.updateStatus({ newStatus: 'heAssigned' })
}
async updateStatusOnRecommendation({ isEditorInChief, recommendation }) {
if (isEditorInChief) {
if (recommendation === 'return-to-handling-editor') {
return this.updateStatus({ newStatus: 'reviewCompleted' })
}
return this.updateFinalStatusByRecommendation({
recommendation,
})
}
return this.updateStatusByRecommendation({
recommendation,
isHandlingEditor: true,
})
}
getHELastName() {
const [firstName, lastName] = this.collection.handlingEditor.name.split(' ')
return lastName || firstName
......
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