From 0bdef7e537e34c390437646da08567ac26aa82ec Mon Sep 17 00:00:00 2001 From: Sebastian Mihalache <sebi.mihalache@gmail.com> Date: Mon, 3 Dec 2018 10:47:54 +0200 Subject: [PATCH] refactor(collection-helper): remove unused functions --- .../src/services/Collection.js | 34 ------------------- 1 file changed, 34 deletions(-) diff --git a/packages/component-helper-service/src/services/Collection.js b/packages/component-helper-service/src/services/Collection.js index cd57c0988..80739bc11 100644 --- a/packages/component-helper-service/src/services/Collection.js +++ b/packages/component-helper-service/src/services/Collection.js @@ -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 -- GitLab