From 5cc89b4fb841ab87f8473e281bb642c4f9dcf1fb Mon Sep 17 00:00:00 2001 From: Hironsan Date: Tue, 29 Oct 2019 15:05:34 +0900 Subject: [PATCH] Enable to create a project --- .../projects/ProjectCreationForm.vue | 24 ++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/frontend/components/organisms/projects/ProjectCreationForm.vue b/frontend/components/organisms/projects/ProjectCreationForm.vue index 7aa34db3..bdd41527 100644 --- a/frontend/components/organisms/projects/ProjectCreationForm.vue +++ b/frontend/components/organisms/projects/ProjectCreationForm.vue @@ -82,6 +82,24 @@ export default { cancel() { this.$emit('close') }, + getServerType() { + if (this.projectType === 'Text Classification') { + return 'DocumentClassification' + } else if (this.projectType === 'Sequence Labeling') { + return 'SequenceLabeling' + } else if (this.projectType === 'Sequence to sequence') { + return 'Seq2seq' + } + }, + getResourceType() { + if (this.projectType === 'Text Classification') { + return 'TextClassificationProject' + } else if (this.projectType === 'Sequence Labeling') { + return 'SequenceLabelingProject' + } else if (this.projectType === 'Sequence to sequence') { + return 'Seq2seqProject' + } + }, validate() { return this.$refs.form.validate() }, @@ -93,7 +111,11 @@ export default { this.createProject({ name: this.name, description: this.description, - project_type: this.projectType + project_type: this.getServerType(), + guideline: 'Please write annotation guideline.', + resourcetype: this.getResourceType() + // randomize_document_order: this.randomizeDocumentOrder, + // collaborative_annotation: this.collaborativeAnnotation }) this.reset() this.cancel()