Skip to content

Commit

Permalink
save annotation schema when creating new project
Browse files Browse the repository at this point in the history
  • Loading branch information
khansadaoudi committed Sep 23, 2024
1 parent db576cc commit c30828e
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/components/project/CreaProjectCard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ export default defineComponent({
},
computed: {
...mapState(useUserStore, ['username', 'loggedWithGithub']),
...mapState(useProjectStore, ['languagesList']),
...mapState(useProjectStore, ['languagesList', 'annotationFeaturesSUD', 'annotationFeaturesUD']),
canSyncWithGithub() {
return this.loggedWithGithub && this.isShowSyncBtn && !this.isShowGithubSyncPanel;
},
Expand All @@ -234,19 +234,14 @@ export default defineComponent({
},
},
methods: {
...mapActions(useProjectStore, ['resetAnnotationFeaturesSUD', 'resetAnnotationFeaturesUD']),
...mapActions(useProjectStore, ['updateProjectConlluSchema']),
getSelectedLanguage(value: any) {
if (value) {
this.project.language = value;
}
},
onSubmit() {
this.submitting = true;
if (this.project.config === 'ud') {
this.resetAnnotationFeaturesUD();
} else {
this.resetAnnotationFeaturesSUD();
}
const data = {
...this.project,
};
Expand All @@ -255,6 +250,11 @@ export default defineComponent({
.then(() => {
this.parentGetProjects();
this.submitting = false;
if (this.project.config === 'ud') {
this.updateProjectConlluSchema(this.project.projectName, this.annotationFeaturesUD);
} else {
this.updateProjectConlluSchema(this.project.projectName, this.annotationFeaturesSUD);
}
if (this.loggedWithGithub && !this.project.blindAnnotationMode) {
this.progress = 0.4;
this.isShowSyncBtn = true;
Expand Down

0 comments on commit c30828e

Please sign in to comment.