diff --git a/arches_lingo/src/arches_lingo/api.ts b/arches_lingo/src/arches_lingo/api.ts index a75131da..36dfc57d 100644 --- a/arches_lingo/src/arches_lingo/api.ts +++ b/arches_lingo/src/arches_lingo/api.ts @@ -86,3 +86,10 @@ export const fetchConcepts = async () => { if (!response.ok) throw new Error(parsed.message || response.statusText); return parsed; }; + +export const fetchSchemes = async () => { + const response = await fetch(arches.urls.api_schemes); + const parsed = await response.json(); + if (!response.ok) throw new Error(parsed.message || response.statusText); + return parsed; +}; diff --git a/arches_lingo/src/arches_lingo/components/scheme/SchemeCard.vue b/arches_lingo/src/arches_lingo/components/scheme/SchemeCard.vue new file mode 100644 index 00000000..55a124f1 --- /dev/null +++ b/arches_lingo/src/arches_lingo/components/scheme/SchemeCard.vue @@ -0,0 +1,61 @@ + + + + + {{ schemeDescriptor.name }} + {{ schemeDescriptor.description }} + + + + diff --git a/arches_lingo/src/arches_lingo/pages/SchemeList.vue b/arches_lingo/src/arches_lingo/pages/SchemeList.vue index a0663d3e..ceb2262a 100644 --- a/arches_lingo/src/arches_lingo/pages/SchemeList.vue +++ b/arches_lingo/src/arches_lingo/pages/SchemeList.vue @@ -1 +1,64 @@ -Schemes list placeholder + + + + + + + + + + + + + diff --git a/arches_lingo/src/arches_lingo/types.ts b/arches_lingo/src/arches_lingo/types.ts index 8b22ac54..cebeea20 100644 --- a/arches_lingo/src/arches_lingo/types.ts +++ b/arches_lingo/src/arches_lingo/types.ts @@ -66,6 +66,21 @@ export interface SchemeNamespace { export type DataComponentMode = "edit" | "view"; +export interface SchemeResource { + resourceinstanceid: string; + descriptors: { + [key: string]: { + name: string; + description: string; + }; + }; +} + +export interface ResourceDescriptor { + name: string; + description: string; +} + export interface NodeAndParentInstruction { node: TreeNode; shouldHideSiblings: boolean; diff --git a/arches_lingo/templates/arches_urls.htm b/arches_lingo/templates/arches_urls.htm index 4c479a3b..b0b9adab 100644 --- a/arches_lingo/templates/arches_urls.htm +++ b/arches_lingo/templates/arches_urls.htm @@ -10,5 +10,6 @@ api_concepts="{% url 'api-concepts' %}" api_search="{% url 'api-search' %}" api_uri_namespace='(pluginid)=>{return "{% url "api-uri-components" "aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa" %}".replace("aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa", pluginid)}' + api_schemes="{% url 'schemes-list-create' %}" > {% endblock arches_urls %} diff --git a/arches_lingo/urls.py b/arches_lingo/urls.py index 487c1bb8..7120f6e3 100644 --- a/arches_lingo/urls.py +++ b/arches_lingo/urls.py @@ -23,6 +23,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/", LingoRootView.as_view(), name="scheme"), path("concept/", LingoRootView.as_view(), name="concept"), path("api/concept-tree", ConceptTreeView.as_view(), name="api-concepts"), path("api/search", ValueSearchView.as_view(), name="api-search"), diff --git a/arches_lingo/views/api/pythonic_models.py b/arches_lingo/views/api/pythonic_models.py index 3fbb657e..e1e88ad4 100644 --- a/arches_lingo/views/api/pythonic_models.py +++ b/arches_lingo/views/api/pythonic_models.py @@ -15,6 +15,7 @@ class SchemeListCreateView(ArchesModelAPIMixin, ListCreateAPIView): permission_classes = [RDMAdministrator] serializer_class = SchemeSerializer + pagination_class = None class SchemeDetailView(ArchesModelAPIMixin, RetrieveUpdateDestroyAPIView):
{{ schemeDescriptor.name }}
{{ schemeDescriptor.description }}