Commit bef13bce authored by Benedikt Heinrichs's avatar Benedikt Heinrichs
Browse files

Small Code Refactoring

parent bc375dde
......@@ -17,8 +17,8 @@
<router-view
:applicationProfile="selectedApplicationProfile"
:definition="definition"
@selectApplicationProfile="selectApplicationProfile"
@addVocabularyTerm="addVocabularyTerm"
@selectApplicationProfile="selectApplicationProfile"
/>
<StoreModal
:applicationProfile="selectedApplicationProfile"
......@@ -32,6 +32,7 @@
import DatasetExt from "rdf-ext/lib/Dataset";
import ApplicationProfile from "@/types/applicationProfile";
import ApplicationProfileImpl from "@/classes/ApplicationProfileImpl";
import VocabularyTerm from "@/types/vocabularyTerm";
import factory from "rdf-ext";
......@@ -43,7 +44,6 @@ import {
addVocabularyTermToDataset,
parseApplicationProfile,
} from "@/util/linkedData";
import VocabularyTerm from "./types/vocabularyTerm";
export default Vue.extend({
name: "App",
......@@ -66,14 +66,6 @@ export default Vue.extend({
},
},
methods: {
selectApplicationProfile(selectedApplicationProfile: ApplicationProfile) {
this.selectedApplicationProfile = selectedApplicationProfile;
},
async setDefinition() {
this.definition = await parseApplicationProfile(
this.selectedApplicationProfile
);
},
addVocabularyTerm(vocabularyTerm: VocabularyTerm) {
const changeHappened = addVocabularyTermToDataset(
vocabularyTerm,
......@@ -85,6 +77,14 @@ export default Vue.extend({
this.definition = this.definition.clone();
}
},
selectApplicationProfile(selectedApplicationProfile: ApplicationProfile) {
this.selectedApplicationProfile = selectedApplicationProfile;
},
async setDefinition() {
this.definition = await parseApplicationProfile(
this.selectedApplicationProfile
);
},
},
});
</script>
......
......@@ -28,12 +28,12 @@ export default Vue.extend({
ListVocs,
},
methods: {
handleVocabularyTerms(vocabularyTerms: Array<VocabularyTerm>) {
this.vocabularyTerms = vocabularyTerms;
},
addVocabularyTerm(vocabularyTerm: VocabularyTerm) {
this.$emit("addVocabularyTerm", vocabularyTerm);
},
handleVocabularyTerms(vocabularyTerms: Array<VocabularyTerm>) {
this.vocabularyTerms = vocabularyTerms;
},
},
});
</script>
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment