Skip to content

Commit

Permalink
Merge pull request #117 from lcnetdev/subject-editor-geo-fixes
Browse files Browse the repository at this point in the history
Fix some errors in SubjectEditor when open GeoCoverage
  • Loading branch information
f-osorio authored Nov 6, 2024
2 parents 4070b8e + 65274fe commit 1948d9a
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 7 deletions.
5 changes: 2 additions & 3 deletions src/components/panels/edit/fields/LookupComplex.vue
Original file line number Diff line number Diff line change
Expand Up @@ -527,7 +527,7 @@ export default {
*/
setComplexValue: function(contextValue){
delete contextValue.typeFull
this.profileStore.setValueComplex(this.guid,null, this.propertyPath, contextValue.uri, contextValue.title, contextValue.typeFull, contextValue.nodeMap, contextValue.marcKey)
this.profileStore.setValueComplex(this.guid, null, this.propertyPath, contextValue.uri, contextValue.title, contextValue.typeFull, contextValue.nodeMap, contextValue.marcKey)
this.searchValue=''
this.displayModal=false
Expand Down Expand Up @@ -741,7 +741,7 @@ export default {
// store the label to pass as a prop
this.authorityLookup = label
this.searchValue = label
if (!this.configStore.useSubjectEditor.includes(this.structure.propertyURI)) {
this.displayModal = true
} else {
Expand All @@ -753,7 +753,6 @@ export default {
this.displaySubjectModal = true
}
},
}
};
Expand Down
4 changes: 2 additions & 2 deletions src/components/panels/edit/modals/SubjectEditor.vue
Original file line number Diff line number Diff line change
Expand Up @@ -815,7 +815,7 @@ methods: {
buildLookupComponents: function(incomingSubjects){
this.typeLookup = {}
if (typeof incomingSubjects == "undefined"){
if (!incomingSubjects || typeof incomingSubjects == "undefined"){
return
}
Expand Down Expand Up @@ -864,7 +864,7 @@ methods: {
} else {
// dealing with a complex subject
this.componetLookup[0] = {}
let type = incomingSubjects["@type"]
let type = incomingSubjects["@type"] ? incomingSubjects["@type"] : ""
if (type.includes("http://www.loc.gov/mads/rdf/v1#Topic")){
this.typeLookup[0] = 'madsrdf:Topic'
Expand Down
3 changes: 1 addition & 2 deletions src/stores/profile.js
Original file line number Diff line number Diff line change
Expand Up @@ -1938,7 +1938,6 @@ export const useProfileStore = defineStore('profile', {
}

if (pt !== false){

pt.hasData = true
pt.userModified = true
pt.dataLoaded = false
Expand Down Expand Up @@ -2085,7 +2084,7 @@ export const useProfileStore = defineStore('profile', {
this.dataChanged()

}else{
console.error('setValueSimple: Cannot locate the component by guid', componentGuid, this.activeProfile)
console.error('setValueComplex: Cannot locate the component by guid', componentGuid, this.activeProfile)
}


Expand Down

0 comments on commit 1948d9a

Please sign in to comment.