From 2a278d9faa338b7a783fc42f0aab3f9a9a4e1a65 Mon Sep 17 00:00:00 2001 From: Aaron Gundel Date: Sat, 9 Nov 2024 22:03:44 -0700 Subject: [PATCH] updates with components for individual sections --- arches_lingo/src/arches_lingo/api.ts | 15 ------- .../components/detail/SchemeSection.vue | 26 ----------- .../scheme/report/SchemeAuthority.vue | 11 +++++ .../scheme/report/SchemeLicense.vue | 11 +++++ .../components/scheme/report/SchemeNote.vue | 11 +++++ .../scheme/report/SchemeSection.vue | 45 +++++++++++++++++++ .../scheme/report/SchemeStandard.vue | 11 +++++ .../components/scheme/report/SchemeUri.vue | 11 +++++ .../src/arches_lingo/pages/SchemeReport.vue | 42 +++++++---------- arches_lingo/src/arches_lingo/types.ts | 7 --- 10 files changed, 117 insertions(+), 73 deletions(-) delete mode 100644 arches_lingo/src/arches_lingo/components/detail/SchemeSection.vue create mode 100644 arches_lingo/src/arches_lingo/components/scheme/report/SchemeAuthority.vue create mode 100644 arches_lingo/src/arches_lingo/components/scheme/report/SchemeLicense.vue create mode 100644 arches_lingo/src/arches_lingo/components/scheme/report/SchemeNote.vue create mode 100644 arches_lingo/src/arches_lingo/components/scheme/report/SchemeSection.vue create mode 100644 arches_lingo/src/arches_lingo/components/scheme/report/SchemeStandard.vue create mode 100644 arches_lingo/src/arches_lingo/components/scheme/report/SchemeUri.vue diff --git a/arches_lingo/src/arches_lingo/api.ts b/arches_lingo/src/arches_lingo/api.ts index d02b738a..ac148ef9 100644 --- a/arches_lingo/src/arches_lingo/api.ts +++ b/arches_lingo/src/arches_lingo/api.ts @@ -37,21 +37,6 @@ export const fetchUser = async () => { return parsed; }; -export const fetchSchemeResource = async (id: string | string[]) => { - const resourceRequest = await fetch( - `${arches.urls.api_resources(id)}?format=json&v=beta&hide_empty_nodes=false`, - ); - try { - const resource = await resourceRequest.json(); - if (resourceRequest.ok) { - return resource; - } - throw new Error(resource.message); - } catch (error) { - throw new Error((error as Error).message || resourceRequest.statusText); - } -}; - export const fetchSearchResults = async ( searchTerm: string, items: number, diff --git a/arches_lingo/src/arches_lingo/components/detail/SchemeSection.vue b/arches_lingo/src/arches_lingo/components/detail/SchemeSection.vue deleted file mode 100644 index dc09f074..00000000 --- a/arches_lingo/src/arches_lingo/components/detail/SchemeSection.vue +++ /dev/null @@ -1,26 +0,0 @@ - - - diff --git a/arches_lingo/src/arches_lingo/components/scheme/report/SchemeAuthority.vue b/arches_lingo/src/arches_lingo/components/scheme/report/SchemeAuthority.vue new file mode 100644 index 00000000..38f1233c --- /dev/null +++ b/arches_lingo/src/arches_lingo/components/scheme/report/SchemeAuthority.vue @@ -0,0 +1,11 @@ + + + diff --git a/arches_lingo/src/arches_lingo/components/scheme/report/SchemeLicense.vue b/arches_lingo/src/arches_lingo/components/scheme/report/SchemeLicense.vue new file mode 100644 index 00000000..e5960c60 --- /dev/null +++ b/arches_lingo/src/arches_lingo/components/scheme/report/SchemeLicense.vue @@ -0,0 +1,11 @@ + + + diff --git a/arches_lingo/src/arches_lingo/components/scheme/report/SchemeNote.vue b/arches_lingo/src/arches_lingo/components/scheme/report/SchemeNote.vue new file mode 100644 index 00000000..a8669eab --- /dev/null +++ b/arches_lingo/src/arches_lingo/components/scheme/report/SchemeNote.vue @@ -0,0 +1,11 @@ + + + diff --git a/arches_lingo/src/arches_lingo/components/scheme/report/SchemeSection.vue b/arches_lingo/src/arches_lingo/components/scheme/report/SchemeSection.vue new file mode 100644 index 00000000..972b5921 --- /dev/null +++ b/arches_lingo/src/arches_lingo/components/scheme/report/SchemeSection.vue @@ -0,0 +1,45 @@ + + + + + diff --git a/arches_lingo/src/arches_lingo/components/scheme/report/SchemeStandard.vue b/arches_lingo/src/arches_lingo/components/scheme/report/SchemeStandard.vue new file mode 100644 index 00000000..57f08257 --- /dev/null +++ b/arches_lingo/src/arches_lingo/components/scheme/report/SchemeStandard.vue @@ -0,0 +1,11 @@ + + + diff --git a/arches_lingo/src/arches_lingo/components/scheme/report/SchemeUri.vue b/arches_lingo/src/arches_lingo/components/scheme/report/SchemeUri.vue new file mode 100644 index 00000000..b31483f3 --- /dev/null +++ b/arches_lingo/src/arches_lingo/components/scheme/report/SchemeUri.vue @@ -0,0 +1,11 @@ + + + diff --git a/arches_lingo/src/arches_lingo/pages/SchemeReport.vue b/arches_lingo/src/arches_lingo/pages/SchemeReport.vue index 4e193f14..536a8ef8 100644 --- a/arches_lingo/src/arches_lingo/pages/SchemeReport.vue +++ b/arches_lingo/src/arches_lingo/pages/SchemeReport.vue @@ -1,31 +1,23 @@ diff --git a/arches_lingo/src/arches_lingo/types.ts b/arches_lingo/src/arches_lingo/types.ts index 76bb319a..d77066b8 100644 --- a/arches_lingo/src/arches_lingo/types.ts +++ b/arches_lingo/src/arches_lingo/types.ts @@ -30,13 +30,6 @@ export interface Scheme { top_concepts: Concept[]; } -export interface SchemeResource { - [key: string]: object; - resource: { - [key: string]: Array; - }; -} - export interface NodeAndParentInstruction { node: TreeNode; shouldHideSiblings: boolean;