Skip to content
Snippets Groups Projects
Commit fac3af2d authored by Moustafa Banqusli's avatar Moustafa Banqusli
Browse files

#157 delete unreqired code and using toast editor

parent a88f647e
No related branches found
No related tags found
2 merge requests!174Merge develop into master,!149Resolve "Artenkatalog: Markdown Editor überprüfen"
import TextEditorViewer from "../components/shared/editor/TextEditorViewer.vue";
import {Component, Prop, Vue, Watch} from "vue-property-decorator";
import store from "@/store";
import VueMarkdown from "vue-markdown";
import MarkdownViewer from "@/components/MarkdownViewer.vue";
import {Component, Prop, Vue} from "vue-property-decorator";
@Component({
components: {TextEditorViewer, VueMarkdown, MarkdownViewer},
components: {
TextEditorViewer,
},
})
export default class SpeciesCatalogContent extends Vue {
@Prop({
default: () => {
return {};
},
}) private OpenedLevel!: [];
@Prop({
default: () => {
return {};
},
}) private SelectedItem!: [];
// todo: check if we still need this
private getSpeciesItems() {
const speciesFamilyList = store.getters.getSpeciesTreeList;
let items: Array<{}> = [];
this.OpenedLevel.forEach((PTNameID) => {
speciesFamilyList.forEach((first: any) => {
if (PTNameID === first.ptname_id) {
items = [];
this.setSpeciesChildren(items, first);
}
first.children.forEach((second: any) => {
if (PTNameID === second.ptname_id) {
items = [];
this.setSpeciesChildren(items, second);
}
second.children.forEach((third: any) => {
if (PTNameID === third.ptname_id) {
items = [];
this.setSpeciesChildren(items, third);
}
});
});
});
});
return items;
}
private setSpeciesChildren(items: Array<{}> = [], level: any) {
level.children.forEach((item: any) => {
items.push(item);
});
}
private getSelectedParentChildren() {
if (this.SelectedItem.length === 0) {
// if nothing selected, do not show children
......@@ -61,7 +22,7 @@ export default class SpeciesCatalogContent extends Vue {
const items: Array<{}> = [];
this.SelectedItem.forEach((item: any) => {
if (item.children.length === 0) {
items.push(item)
items.push(item);
} else {
item.children.forEach((first: any) => {
items.push(first);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment