From 907526c49c8871797f4016ee15d607224040ecee Mon Sep 17 00:00:00 2001 From: f-osorio Date: Thu, 7 Nov 2024 08:50:27 -0500 Subject: [PATCH 1/2] Fix title not showing in subject builder Also, add the marc key --- .../panels/edit/modals/SubjectEditor.vue | 20 +++++++++++++++---- src/lib/utils_network.js | 7 +------ 2 files changed, 17 insertions(+), 10 deletions(-) diff --git a/src/components/panels/edit/modals/SubjectEditor.vue b/src/components/panels/edit/modals/SubjectEditor.vue index 21e14836..2934befc 100644 --- a/src/components/panels/edit/modals/SubjectEditor.vue +++ b/src/components/panels/edit/modals/SubjectEditor.vue @@ -134,7 +134,12 @@
Retrieving data...
+ +
+ +
    + +
+
@@ -1490,7 +1502,7 @@ methods: { this.contextRequestInProgress = true this.contextData = await utilsNetwork.returnContext(this.pickLookup[this.pickPostion].uri) - + // for backwards compability if (this.contextData.nodeMap.marcKey && this.contextData.nodeMap.marcKey[0]){ this.pickLookup[this.pickPostion].marcKey = this.contextData.nodeMap.marcKey[0] @@ -1499,11 +1511,11 @@ methods: { // we will modify our local context data here to make things easier if (Array.isArray(this.contextData.title)){ // first grab the non-latin auth labels - this.contextData.nonLatinTitle = JSON.parse(JSON.stringify(this.contextData.title.filter((v)=>{ return (v['@language']) }))) + this.contextData.nonLatinTitle = JSON.parse(JSON.stringify(this.contextData.title.filter((v)=>{ return (v['@language'] != "en" ? v['@language'] : "") }))) this.pickLookup[this.pickPostion].nonLatinTitle = this.contextData.nonLatinTitle // return the first label with no language tag - this.contextData.title = this.contextData.title.filter((v)=>{ return (!v['@language']) })[0] + this.contextData.title = this.contextData.title.filter((v)=>{ return (v['@language'] == "en" || !v['@language']) })[0] if (this.contextData.title && this.contextData.title['@value']){ this.contextData.title = this.contextData.title['@value'] } diff --git a/src/lib/utils_network.js b/src/lib/utils_network.js index 5d04abf2..2423de81 100644 --- a/src/lib/utils_network.js +++ b/src/lib/utils_network.js @@ -1039,7 +1039,6 @@ const utilsNetwork = { data.forEach((n)=>{ - var citation = ''; var variant = ''; // var seeAlso = ''; @@ -1151,7 +1150,7 @@ const utilsNetwork = { delete results.nodeMap[k] } }) - + return results; }, @@ -2663,16 +2662,12 @@ const utilsNetwork = { * @return {array} - results from API */ searchShelfList: async function(search, details, dir){ - console.info("search: ", search) if (!dir){ dir ='ascending' } let urlSearch = "lds/browse.xqy?bq=" + search +"&browse-order=" + dir + "&browse=class" + details + "&mime=json" - console.info("url: ", useConfigStore().returnUrls.shelfListing + urlSearch) - - // try{ //let req = await fetch(useConfigStore().returnUrls.shelfListing + `browse/class/${dir}/${search}.json` ) let req = await fetch(useConfigStore().returnUrls.shelfListing + urlSearch ) From 1492e230bd8a0a8d4b2a7c9d5f328fb69ae80942 Mon Sep 17 00:00:00 2001 From: f-osorio Date: Thu, 7 Nov 2024 08:55:23 -0500 Subject: [PATCH 2/2] Fix marc key display when it's an array --- src/components/panels/edit/modals/SubjectEditor.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/panels/edit/modals/SubjectEditor.vue b/src/components/panels/edit/modals/SubjectEditor.vue index 2934befc..802c7ce9 100644 --- a/src/components/panels/edit/modals/SubjectEditor.vue +++ b/src/components/panels/edit/modals/SubjectEditor.vue @@ -181,7 +181,7 @@
    - +