Browse Source

Enable to create a project

pull/341/head
Hironsan 5 years ago
parent
commit
5cc89b4fb8
1 changed files with 23 additions and 1 deletions
  1. 24
      frontend/components/organisms/projects/ProjectCreationForm.vue

24
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()

Loading…
Cancel
Save