diff --git a/components/content/StructureDb.vue b/components/content/StructureDb.vue index 6fc5a9c846bd0f171f139c6712b8074eef3fe48e..34e6693631d10322d0e3c19b886fad4eddd952f0 100644 --- a/components/content/StructureDb.vue +++ b/components/content/StructureDb.vue @@ -5,7 +5,7 @@ import type { SortItem } from "@/components/ServerDbTable.vue" import { ServerDbTable } from "#components" const sortBy: Ref<SortItem[]> = ref([{ key: 'system', order: "asc" }]) const itemValue = ref("id"); -const facets: Ref<string[]> = ref(["system", "completed", "prediction_type", ]) +const facets: Ref<string[]> = ref(["system", "completed", "prediction_type",]) const headers: Ref<Object[]> = ref([ { title: 'Structure', key: 'structure', sortable: false, removable: false }, { title: "Type", key: "system", removable: false }, @@ -56,7 +56,14 @@ function pdbNameToCif(pdbPath: string) { function toSystemName(rawName: string) { - return rawName.split(/_|-0/)[0].toLocaleLowerCase() + // split on -0 if exists else on _ + if (rawName.includes("-0")) { + + return rawName.split("-0")[0].toLocaleLowerCase() + } else { + return rawName.split("_")[0].toLocaleLowerCase() + } + }