diff --git a/pages/_type/_id/edit.vue b/pages/_type/_id/edit.vue index 220d803d2..ea4c422fd 100644 --- a/pages/_type/_id/edit.vue +++ b/pages/_type/_id/edit.vue @@ -13,25 +13,11 @@ Cancel - - - Submit for review - Save changes @@ -47,11 +33,8 @@ Your project cannot have an empty URL suffix. - - Your project must have a body to submit for review. - - - Your project must have at least one version to submit for review. + + Your project must have an extended description. Your project must have a license. @@ -551,7 +534,6 @@ import Multiselect from 'vue-multiselect' import CrossIcon from '~/assets/images/utils/x.svg?inline' -import CheckIcon from '~/assets/images/utils/check.svg?inline' import PlusIcon from '~/assets/images/utils/plus.svg?inline' import SaveIcon from '~/assets/images/utils/save.svg?inline' import TrashIcon from '~/assets/images/utils/trash.svg?inline' @@ -571,7 +553,6 @@ export default { Chips, Multiselect, CrossIcon, - CheckIcon, PlusIcon, SaveIcon, TrashIcon, @@ -679,7 +660,6 @@ export default { selectableCategories: [], selectableAdditionalCategories: [], - isProcessing: false, previewImage: null, compiledBody: '', @@ -692,7 +672,6 @@ export default { bodyViewMode: 'source', showKnownErrors: false, - savingAsDraft: false, manualSlug: false, } }, @@ -775,37 +754,23 @@ export default { .map((it) => it.name) }, checkFields() { - const reviewConditions = - this.newProject.body !== '' && this.newProject.versions.length > 0 if ( this.newProject.title !== '' && this.newProject.description !== '' && this.newProject.slug !== '' && + this.newProject.body !== '' && this.license.short !== '' ) { - if (this.savingAsDraft) { - return true - } else if (reviewConditions) { - return true - } + return true } this.showKnownErrors = true return false }, - async saveProjectReview() { - this.savingAsDraft = false - if (this.checkFields()) { - this.isProcessing = true - await this.saveProject() - } - }, - async saveProjectNotForReview() { - this.savingAsDraft = true - if (this.checkFields()) { - await this.saveProject() - } - }, async saveProject() { + if (!this.checkFields()) { + return + } + this.$nuxt.$loading.start() try { @@ -841,10 +806,6 @@ export default { }), } - if (this.isProcessing) { - data.status = 'processing' - } - await this.$axios.patch( `project/${this.newProject.id}`, data,