Skip to content

Commit e985f8d

Browse files
authored
Merge pull request #762 from lcnetdev/create-hub-from-lookup
Create hub from lookup
2 parents e3fcdd8 + 38ae072 commit e985f8d

5 files changed

Lines changed: 46 additions & 4 deletions

File tree

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,13 @@
11
# Changelog
22

33
All notable changes to this project will be documented in this file.
4+
## [1.6.3] - 2025-06-26
5+
### Added
6+
- Buttons for `Create NAR/Hub` when looking for a hub
7+
8+
### Fixed
9+
- Sometimes after posting a record and then opening a unposted record, the `Post` button would be "green," this shouldn't happen anymore
10+
411
## [1.6.2] - 2025-04-28
512
### Update
613
- Copycat has a MARC comparison view. The comparison is shown after selecting a profile to load with and provides a chance for the cataloger to backout. Comparison can also be envoked from a "Compare" button if an existing record is found.

src/components/panels/edit/modals/ComplexLookupModal.vue

Lines changed: 35 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -117,11 +117,11 @@
117117
// array of the pssobile groups from the stlyes
118118
119119
...mapState(useConfigStore, ['lookupConfig']),
120-
...mapState(useProfileStore, ['returnComponentByPropertyLabel', 'duplicateComponentGetId', 'isEmptyComponent']),
120+
...mapState(useProfileStore, ['returnComponentByPropertyLabel', 'duplicateComponentGetId', 'isEmptyComponent', 'returnLccInfo']),
121121
122122
...mapState(usePreferenceStore, ['diacriticUseValues', 'diacriticUse','diacriticPacks', 'lastComplexLookupString']),
123123
124-
...mapWritableState(useProfileStore, ['lastComplexLookupString','showNacoStubCreateModal', 'activeNARStubComponent', 'activeProfile', 'setValueLiteral']),
124+
...mapWritableState(useProfileStore, ['lastComplexLookupString','showNacoStubCreateModal', 'activeNARStubComponent', 'activeProfile', 'setValueLiteral', 'activeHubStubData', 'activeHubStubComponent', 'showHubStubCreateModal']),
125125
126126
127127
@@ -884,15 +884,46 @@
884884
}
885885
},
886886
887-
displayProvisonalNAR(){
887+
displayHubButton(){
888+
if (this.modeSelect.includes('Hubs')){
889+
return true
890+
}
888891
892+
return false
893+
},
889894
895+
displayProvisonalNAR(){
890896
if (this.structure && this.structure.valueConstraint && this.structure.valueConstraint.useValuesFrom && this.structure.valueConstraint.useValuesFrom.length>0 && this.structure.valueConstraint.useValuesFrom.join(' ').indexOf('id.loc.gov/authorities/names')>-1){
891897
return true
892898
}
899+
if (this.modeSelect.includes('Hubs')){
900+
return true
901+
}
902+
893903
return false
894904
},
895905
906+
907+
loadHubStubModal(){
908+
// console.log(this.guid)
909+
let info = this.returnLccInfo(this.guid)
910+
console.log("info",info)
911+
this.activeHubStubData = info
912+
this.activeHubStubComponent = {
913+
type: this.type,
914+
guid: this.guid,
915+
fieldGuid: this.fieldGuid,
916+
structure: this.structure,
917+
type: this.type,
918+
propertyPath:this.propertyPath
919+
}
920+
921+
this.$emit('hideComplexModal')
922+
923+
this.showHubStubCreateModal = true
924+
925+
},
926+
896927
loadNacoStubModal(){
897928
// Set the current value for NAR creation
898929
this.lastComplexLookupString = this.searchValueLocal
@@ -1190,6 +1221,7 @@
11901221

11911222
<!-- REMOVE v-if BEFORE PROD USAGE -->
11921223
<button @click="loadNacoStubModal" style="float: right;" v-if="displayProvisonalNAR() == true">Create NAR</button>
1224+
<button @click="loadHubStubModal" style="float: right;" v-if="displayHubButton() == true">Create Hub</button>
11931225

11941226
<hr style="margin-top: 5px;">
11951227
<div>

src/components/panels/edit/modals/NacoStubCreateModal.vue

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1952,6 +1952,8 @@
19521952
<option class="preset-option" value="1102#and 4102#">"1102 " &amp; "4102 "</option>
19531953
<option class="preset-option" value="1112#">"1112 "</option>
19541954
<option class="preset-option" value="1112#and 4112#">"1112 " &amp; "4112 "</option>
1955+
<option class="preset-option" value="130##">"130##"</option>
1956+
<option class="preset-option" value="430#and 430##">"130##" &amp; "430##"</option>
19551957
<option class="preset-option" value="151##">"151##"</option>
19561958
<option class="preset-option" value="151##and 451##">"151## &amp; 451##"</option>
19571959

src/lib/utils_network.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3387,6 +3387,7 @@ const utilsNetwork = {
33873387

33883388
let uuid = translator.toUUID(translator.new())
33893389

3390+
33903391
const rawResponse = await fetch(url, {
33913392
method: 'POST',
33923393
headers: {

src/stores/config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ export const useConfigStore = defineStore('config', {
88

99
versionMajor: 1,
1010
versionMinor: 6,
11-
versionPatch: 2,
11+
versionPatch: 3,
1212

1313

1414

0 commit comments

Comments
 (0)