Skip to content

Commit

Permalink
Merge pull request #239 from lcnetdev/fix_hub_URI_issue
Browse files Browse the repository at this point in the history
fix the rdf:resource issue in staging
  • Loading branch information
thisismattmiller authored Feb 24, 2025
2 parents b46c614 + f850c56 commit 17e00bc
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 6 deletions.
10 changes: 7 additions & 3 deletions src/components/panels/edit/modals/HubStubCreateModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,8 @@
this.profileStore.setValueComplex(this.activeHubStubComponent.guid, null, this.activeHubStubComponent.propertyPath, results.postLocation, this.hubTitle, null, {}, null)
this.newHubUrl=results.postLocation
this.postStatus='posted'
}else{
Expand Down Expand Up @@ -291,8 +293,7 @@
:sticks="['br']"
:stickSize="22"
>
<div id="non-latin-bulk-content" ref="nonLatinBulkContent" @mousedown="onSelectElement($event)" @touchstart="onSelectElement($event)">

<div id="non-latin-bulk-content" ref="nonLatinBulkContent" @mousedown="onSelectElement($event)" @touchstart="onSelectElement($event)">
<div class="menu-buttons">
<button class="close-button" @pointerup="close">X</button>
</div>
Expand Down Expand Up @@ -343,7 +344,10 @@
</div>
<div style="display: flex; padding: 1.5em;" v-if="postStatus=='posted'">
<div >The Hub was created! If you would like to edit it further please click the link, it will open in new tab:</div>
<div><a :href="`../load?url=${newHubUrl}.rdf&profile=lc:RT:bf2:HubBasic:Hub`" target="_blank">{{ newHubUrl }}</a></div>
<div>
<div v-if="configStore.returnUrls.env == 'staging'">NOT IN PRODUCTION, THE URI BELOW WILL NEED TO BE ADJUSTED TO WORK WITH STAGING PORT</div>
<a :href="`../load?url=${newHubUrl}.rdf&profile=lc:RT:bf2:HubBasic:Hub`" target="_blank">{{ newHubUrl }}</a>
</div>
</div>
<div v-if="postStatus=='posted'" style="text-align: center;">
<button @click="close" style="line-height: 1.75em;font-weight: bold;font-size: 1.05em;">Close</button>
Expand Down
12 changes: 9 additions & 3 deletions src/stores/profile.js
Original file line number Diff line number Diff line change
Expand Up @@ -2282,8 +2282,14 @@ export const useProfileStore = defineStore('profile', {

if (!type && URI && !lastProperty.includes("intendedAudience")){
// I regretfully inform you we will need to look this up
let context = await utilsNetwork.returnContext(URI)
type = context.typeFull
if (URI.indexOf('id.loc.gov/resources/hubs/') > -1){
type = 'http://id.loc.gov/ontologies/bibframe/Hub'
} else{
let context = await utilsNetwork.returnContext(URI)
type = context.typeFull
}



}
// literals don't have a type or a URI & intendedAudience has extra considerations
Expand Down Expand Up @@ -4889,7 +4895,7 @@ export const useProfileStore = defineStore('profile', {
pubResuts.postLocation = hubUri
}

// pubResuts = {'postLocation': 'https://id.loc.gov/resources/hubs/a07eefde-6522-9b99-e760-5c92f7d396eb'}
// pubResuts = {'postLocation': 'https://id.loc.gov/resources/hubs/a07eefde-6522-9b99-xxxx-5c92f7d396eb'}


return pubResuts
Expand Down

0 comments on commit 17e00bc

Please sign in to comment.