From aeace28c74b01f48422b008c074e3e32d296ae54 Mon Sep 17 00:00:00 2001 From: f-osorio Date: Tue, 3 Dec 2024 08:08:20 -0500 Subject: [PATCH] Add CYAK subdivisions --- src/components/panels/edit/modals/SubjectEditor.vue | 2 ++ src/lib/utils_network.js | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/components/panels/edit/modals/SubjectEditor.vue b/src/components/panels/edit/modals/SubjectEditor.vue index 6b9937f6..1a9cf690 100644 --- a/src/components/panels/edit/modals/SubjectEditor.vue +++ b/src/components/panels/edit/modals/SubjectEditor.vue @@ -2599,6 +2599,8 @@ updated: function() { // preselect the search type, if a children's subject if (this.searchType.includes("Childrens")){ this.searchMode = "CHILD" + } else { + this.searchMode = "LCSHNAF" } // this was opened from an existing subject let profileData = this.profileData diff --git a/src/lib/utils_network.js b/src/lib/utils_network.js index d88845c3..a7a12fbf 100644 --- a/src/lib/utils_network.js +++ b/src/lib/utils_network.js @@ -1879,7 +1879,7 @@ const utilsNetwork = { } //CYAK subdivisions - if (resultsPayloadSubjectsSimpleSubdivision.length>0 && searchType.includes(":Topic:Childrens:")){ + if (resultsChildrenSubDiv.length>0 && searchType.includes(":Topic:Childrens:")){ for (let r of resultsChildrenSubDiv){ // lower case, remove end space, make double whitespace into one and remove any punctuation if (heading.label.toLowerCase().trim().replace(/\s+/g,' ').replace(/[\p{P}$+<=>^`|~]/gu, '') == r.label.toLowerCase().trim().replace(/[\p{P}$+<=>^`|~]/gu, '')){ @@ -1891,6 +1891,7 @@ const utilsNetwork = { } } if (foundHeading){ continue } + } if (!foundHeading){