Skip to content

Commit

Permalink
Merge pull request #67 from lcnetdev/remark-fix
Browse files Browse the repository at this point in the history
Remark fix
  • Loading branch information
thisismattmiller authored Oct 2, 2024
2 parents 272d3f4 + c60c208 commit 53b402f
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 2 deletions.
26 changes: 25 additions & 1 deletion src/components/panels/edit/fields/helpers/ActionButton.vue
Original file line number Diff line number Diff line change
Expand Up @@ -309,6 +309,7 @@
},
returnRemark: function(){
// check the lowest level first
if (this.profileStore.rtLookup[this.structure.parentId] && this.profileStore.rtLookup[this.structure.parentId].propertyTemplates){
for (let pt of this.profileStore.rtLookup[this.structure.parentId].propertyTemplates){
Expand All @@ -317,8 +318,31 @@
}
}
}
// maybe it is in the parent structure
// try the next level up
let parentStructure = this.profileStore.returnStructureByComponentGuid(this.guid)
if (parentStructure.valueConstraint && parentStructure.valueConstraint.valueTemplateRefs && parentStructure.valueConstraint.valueTemplateRefs.length>0){
for (let vRt of parentStructure.valueConstraint.valueTemplateRefs){
if (this.profileStore.rtLookup[vRt]){
if (this.structure.propertyURI == 'http://www.w3.org/2002/07/owl#sameAs'){
// if its a #sameAs we kind of lose the connection, so select the first one and check
if (this.profileStore.rtLookup[vRt].propertyTemplates && this.profileStore.rtLookup[vRt].propertyTemplates[0]){
if (this.profileStore.rtLookup[vRt].propertyTemplates[0].remark && this.profileStore.rtLookup[vRt].propertyTemplates[0].remark != ''){
return this.profileStore.rtLookup[vRt].propertyTemplates[0].remark
}
}
}else{
for (let pt of this.profileStore.rtLookup[vRt].propertyTemplates){
if (pt.propertyURI == this.structure.propertyURI && pt.remark && pt.remark != ''){
return pt.remark
}
}
}
}
}
}
// maybe it is in the parent structure
if (this.profileStore.rtLookup[parentStructure.parentId] && this.profileStore.rtLookup[parentStructure.parentId].propertyTemplates){
for (let pt of this.profileStore.rtLookup[parentStructure.parentId].propertyTemplates){
if (pt.propertyURI == parentStructure.propertyURI && pt.remark){
Expand Down
2 changes: 1 addition & 1 deletion src/stores/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export const useConfigStore = defineStore('config', {

versionMajor: 0,
versionMinor: 14,
versionPatch: 24,
versionPatch: 25,

regionUrls: {

Expand Down

0 comments on commit 53b402f

Please sign in to comment.