Skip to content

Commit

Permalink
Add CYAK subdivisions
Browse files Browse the repository at this point in the history
  • Loading branch information
f-osorio committed Dec 3, 2024
1 parent 628d2be commit aeace28
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions src/components/panels/edit/modals/SubjectEditor.vue
Original file line number Diff line number Diff line change
@@ -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
3 changes: 2 additions & 1 deletion src/lib/utils_network.js
Original file line number Diff line number Diff line change
@@ -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){

0 comments on commit aeace28

Please sign in to comment.