Skip to content

Commit

Permalink
Add routing to scheme page #16
Browse files Browse the repository at this point in the history
nit
  • Loading branch information
johnatawnclementawn committed Nov 20, 2024
1 parent 9c3cdb0 commit 7efde48
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
11 changes: 10 additions & 1 deletion arches_lingo/src/arches_lingo/components/schemes/SchemeBox.vue
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
<script setup lang="ts">
import { routeNames } from "@/arches_lingo/routes.ts";
// TODO: Shift into types.ts
interface Scheme {
resourceinstanceid: string;
descriptors: {
Expand All @@ -10,11 +13,17 @@ interface Scheme {
}
const { scheme } = defineProps<{ scheme: Scheme }>();
const schemeURL = {
name: routeNames.scheme,
params: { id: scheme.resourceinstanceid },
};
</script>

<template>
<div>
<p>{{ scheme.descriptors.en.name }}</p>
<RouterLink :to="schemeURL">
<p>{{ scheme.descriptors.en.name }}</p>
</RouterLink>
<p>{{ scheme.descriptors.en.description }}</p>
</div>
</template>
1 change: 1 addition & 0 deletions arches_lingo/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
path("login", LingoRootView.as_view(), name="login"),
path("advanced-search", LingoRootView.as_view(), name="advanced-search"),
path("schemes", LingoRootView.as_view(), name="schemes"),
path("scheme/<uuid:id>", LingoRootView.as_view(), name="scheme"),
path("concept/<uuid:id>", LingoRootView.as_view(), name="concept"),
path("api/concept-tree", ConceptTreeView.as_view(), name="api-concepts"),
path("api/search", ValueSearchView.as_view(), name="api-search"),
Expand Down

0 comments on commit 7efde48

Please sign in to comment.