From 6d93f591e7ff03332ab53f2927c32be6863615b4 Mon Sep 17 00:00:00 2001 From: fo Date: Tue, 3 Feb 2026 14:08:40 +0000 Subject: [PATCH 01/20] Add `Finish CIP` option to Tools - Change encoding level to full - Delete project publication date - Ask for year to populate - Call number - Provision acticity dates - Copyright date --- src/components/panels/nav/Nav.vue | 107 ++++++++++++++++++++++++++++++ src/stores/profile.js | 2 + 2 files changed, 109 insertions(+) diff --git a/src/components/panels/nav/Nav.vue b/src/components/panels/nav/Nav.vue index 9d6f715ab..88c88c060 100644 --- a/src/components/panels/nav/Nav.vue +++ b/src/components/panels/nav/Nav.vue @@ -353,6 +353,11 @@ export default { text: 'Add All Defaults', click: () => { this.addAllDefaults() }, icon: "clear_all" + }, + { + text: 'Finish CIP', + click: () => { this.finishCip() }, + icon: "check" } ] } @@ -1385,6 +1390,108 @@ export default { } }, + finishCip: function(){ + console.info("doing CIP stuff") + + // remove provision date + let projDateComponent = this.profileStore.returnComponentByPropertyLabel('Projected publication date (YYMM)') + let projDateValue + let projYear + let projMnth + if (projDateComponent.userValue["http://id.loc.gov/ontologies/bflc/projectedProvisionDate"]){ + projDateValue = projDateComponent.userValue["http://id.loc.gov/ontologies/bflc/projectedProvisionDate"][0]["http://id.loc.gov/ontologies/bflc/projectedProvisionDate"] + projYear = '20' + projDateValue.slice(0,2) + projMnth = projDateValue.slice(2) + } else { + console.warn("No projected date.") + } + this.profileStore.deleteComponent(projDateComponent['@guid']) + + let year = prompt("What year should be used to populate Call Number, CopyRight, Provistion Activity dates?", projYear) + // let extent = prompt("What's the extent of the resource?", "pages cm") + + // projYear to copyright date? Or prompt for date and use that to fill in? + // provisision activity dates match projYear? + // prompt for extent? + + // year goes into + + // copyright + let copyrightComponent = this.profileStore.returnComponentByPropertyLabel('Copyright date') + this.profileStore.setValueLiteral( + copyrightComponent['@guid'], null, + [{"level":0,"propertyURI":"http://id.loc.gov/ontologies/bibframe/copyrightDate"}], + year, null, null + ) + + // pubyear? + + // call number + let callNumComponent = this.profileStore.returnComponentByPropertyLabel('Classification numbers') + let callNumValue = callNumComponent.userValue + console.info("callNumValue: ", callNumValue) + if (callNumValue["http://id.loc.gov/ontologies/bibframe/classification"]){ + let itemPortion = callNumValue["http://id.loc.gov/ontologies/bibframe/classification"][0]["http://id.loc.gov/ontologies/bibframe/itemPortion"][0] + let itemValue = itemPortion["http://id.loc.gov/ontologies/bibframe/itemPortion"] + // does it look like a year? + let possibleYear = itemValue.slice(-5) // YYYY + if (/ \d{4}/.test(possibleYear)){ + let itemNumber = itemValue.slice(0,-5) + if (!possibleYear.includes(year)){ + this.profileStore.setValueLiteral( + callNumComponent['@guid'], itemPortion['@guid'], + [{"level":0,"propertyURI":"http://id.loc.gov/ontologies/bibframe/classification"},{"level":1,"propertyURI":"http://id.loc.gov/ontologies/bibframe/itemPortion"}], + itemNumber + " " + year, null, null + ) + } + } + } + + + + // provision activity + let provActComponent = this.profileStore.returnComponentByPropertyLabel('Provision activity') + let proveUserValue = provActComponent.userValue + // 008 date + let zerozero8 = proveUserValue["http://id.loc.gov/ontologies/bibframe/provisionActivity"][0]["http://id.loc.gov/ontologies/bibframe/date"][0] + this.profileStore.setValueLiteral( + provActComponent['@guid'], zerozero8['@guid'], + [{"level":0,"propertyURI":"http://id.loc.gov/ontologies/bibframe/provisionActivity"},{"level":1,"propertyURI":"http://id.loc.gov/ontologies/bibframe/date"}], + year, null, null + ) + + // 264 $c date + let two64 = proveUserValue["http://id.loc.gov/ontologies/bibframe/provisionActivity"][0]["http://id.loc.gov/ontologies/bflc/simpleDate"][0] + this.profileStore.setValueLiteral( + provActComponent['@guid'], two64['@guid'], + [{"level":0,"propertyURI":"http://id.loc.gov/ontologies/bibframe/provisionActivity"},{"level":1,"propertyURI":"http://id.loc.gov/ontologies/bflc/simpleDate"}], + year, null, null + ) + + + // change encoding level to `full` + let adminComponent = false + for (let rt in this.activeProfile.rt) { + if (rt.includes(":Instance")){ + for (let pt in this.activeProfile.rt[rt].pt) { + let component = this.activeProfile.rt[rt].pt[pt] + if (component.propertyLabel == 'Admin Metadata' && component.adminMetadataType == 'primary') { + adminComponent = component + break + } + } + } + } + this.profileStore.setValueSimple( + adminComponent['@guid'], + null, + [{"level":0,"propertyURI":"http://id.loc.gov/ontologies/bibframe/adminMetadata"},{"level":1,"propertyURI":"http://id.loc.gov/ontologies/bflc/encodingLevel"}], + 'http://id.loc.gov/vocabulary/menclvl/f', + 'full' + ) + + }, + addAllDefaults: function () { for (let rt in this.activeProfile.rt) { for (let pt in this.activeProfile.rt[rt].pt) { diff --git a/src/stores/profile.js b/src/stores/profile.js index 740ef96ca..8180110bd 100644 --- a/src/stores/profile.js +++ b/src/stores/profile.js @@ -1917,6 +1917,8 @@ export const useProfileStore = defineStore('profile', { * @return {void} */ setValueLiteral: function(componentGuid, fieldGuid, propertyPath, value, lang, repeatedLiteral){ + console.info("setValueLiteral") + console.info("pp: ", JSON.stringify(propertyPath)) //Save // componentGuid: aiPuH4YsetZ9xmcv7rqisJ // fieldGuid: pdtUXGpNDJ9mz33JM3uxje From 0ad1b516a4216faeec7cf131a88f0c59e4f4c7a4 Mon Sep 17 00:00:00 2001 From: fo Date: Tue, 3 Feb 2026 14:20:07 +0000 Subject: [PATCH 02/20] Fix copyright duplication on manual edit There was no no guid for the field when using the CIP function --- src/components/panels/nav/Nav.vue | 4 +++- src/stores/profile.js | 5 +++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/components/panels/nav/Nav.vue b/src/components/panels/nav/Nav.vue index 88c88c060..db5afb4d6 100644 --- a/src/components/panels/nav/Nav.vue +++ b/src/components/panels/nav/Nav.vue @@ -61,6 +61,7 @@ import PanelSizeModal from '../edit/modals/PanelSizeModal.vue' import StatusIndicator from './nav_components/StatusIndicator.vue' import RecordHistory from './nav_components/RecordHistory.vue' import SystemStatus from './nav_components/SystemStatus.vue' +import short from 'short-uuid' import TimeAgo from 'javascript-time-ago' @@ -1418,8 +1419,9 @@ export default { // copyright let copyrightComponent = this.profileStore.returnComponentByPropertyLabel('Copyright date') + console.info("copyrightComponent: ", copyrightComponent) this.profileStore.setValueLiteral( - copyrightComponent['@guid'], null, + copyrightComponent['@guid'], short.generate(), [{"level":0,"propertyURI":"http://id.loc.gov/ontologies/bibframe/copyrightDate"}], year, null, null ) diff --git a/src/stores/profile.js b/src/stores/profile.js index 8180110bd..68d96eb80 100644 --- a/src/stores/profile.js +++ b/src/stores/profile.js @@ -1918,7 +1918,12 @@ export const useProfileStore = defineStore('profile', { */ setValueLiteral: function(componentGuid, fieldGuid, propertyPath, value, lang, repeatedLiteral){ console.info("setValueLiteral") + console.info("componentGuid: ", componentGuid) + console.info("fieldGuid: ", fieldGuid) console.info("pp: ", JSON.stringify(propertyPath)) + console.info("value: ", value) + console.info("lang: ", lang) + console.info("repeatedLiteral: ", repeatedLiteral) //Save // componentGuid: aiPuH4YsetZ9xmcv7rqisJ // fieldGuid: pdtUXGpNDJ9mz33JM3uxje From fbce78c837347c44204b1148e3b1361031b20397 Mon Sep 17 00:00:00 2001 From: fo Date: Tue, 3 Feb 2026 14:46:47 +0000 Subject: [PATCH 03/20] Add year to call number when there is none --- src/components/panels/nav/Nav.vue | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/components/panels/nav/Nav.vue b/src/components/panels/nav/Nav.vue index db5afb4d6..6e1f2764d 100644 --- a/src/components/panels/nav/Nav.vue +++ b/src/components/panels/nav/Nav.vue @@ -1417,7 +1417,7 @@ export default { // year goes into - // copyright + // copyright, is this necessary if the provistion activity's 264 is set? let copyrightComponent = this.profileStore.returnComponentByPropertyLabel('Copyright date') console.info("copyrightComponent: ", copyrightComponent) this.profileStore.setValueLiteral( @@ -1436,7 +1436,7 @@ export default { let itemPortion = callNumValue["http://id.loc.gov/ontologies/bibframe/classification"][0]["http://id.loc.gov/ontologies/bibframe/itemPortion"][0] let itemValue = itemPortion["http://id.loc.gov/ontologies/bibframe/itemPortion"] // does it look like a year? - let possibleYear = itemValue.slice(-5) // YYYY + let possibleYear = itemValue.slice(-5) // ""YYYY" if (/ \d{4}/.test(possibleYear)){ let itemNumber = itemValue.slice(0,-5) if (!possibleYear.includes(year)){ @@ -1446,6 +1446,12 @@ export default { itemNumber + " " + year, null, null ) } + } else { + this.profileStore.setValueLiteral( + callNumComponent['@guid'], itemPortion['@guid'], + [{"level":0,"propertyURI":"http://id.loc.gov/ontologies/bibframe/classification"},{"level":1,"propertyURI":"http://id.loc.gov/ontologies/bibframe/itemPortion"}], + itemValue + " " + year, null, null + ) } } From ad94d144320beef3d00d3104d0fccb44a7881763 Mon Sep 17 00:00:00 2001 From: fo Date: Tue, 3 Feb 2026 15:01:18 +0000 Subject: [PATCH 04/20] Fix multiple uses of CIP function creating multiple cc dates --- src/components/panels/nav/Nav.vue | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/components/panels/nav/Nav.vue b/src/components/panels/nav/Nav.vue index 6e1f2764d..5aed655b0 100644 --- a/src/components/panels/nav/Nav.vue +++ b/src/components/panels/nav/Nav.vue @@ -1419,9 +1419,12 @@ export default { // copyright, is this necessary if the provistion activity's 264 is set? let copyrightComponent = this.profileStore.returnComponentByPropertyLabel('Copyright date') - console.info("copyrightComponent: ", copyrightComponent) + let ccGuid = short.generate() + if (copyrightComponent.userValue["http://id.loc.gov/ontologies/bibframe/copyrightDate"] && copyrightComponent.userValue["http://id.loc.gov/ontologies/bibframe/copyrightDate"][0]){ + ccGuid = copyrightComponent.userValue["http://id.loc.gov/ontologies/bibframe/copyrightDate"][0]['@guid'] + } this.profileStore.setValueLiteral( - copyrightComponent['@guid'], short.generate(), + copyrightComponent['@guid'], ccGuid, [{"level":0,"propertyURI":"http://id.loc.gov/ontologies/bibframe/copyrightDate"}], year, null, null ) @@ -1436,7 +1439,7 @@ export default { let itemPortion = callNumValue["http://id.loc.gov/ontologies/bibframe/classification"][0]["http://id.loc.gov/ontologies/bibframe/itemPortion"][0] let itemValue = itemPortion["http://id.loc.gov/ontologies/bibframe/itemPortion"] // does it look like a year? - let possibleYear = itemValue.slice(-5) // ""YYYY" + let possibleYear = itemValue.slice(-5) // "YYYY" if (/ \d{4}/.test(possibleYear)){ let itemNumber = itemValue.slice(0,-5) if (!possibleYear.includes(year)){ From 82b3aa0347d1b2c3529d5685199f69f314227dec Mon Sep 17 00:00:00 2001 From: fo Date: Tue, 3 Feb 2026 21:22:41 +0000 Subject: [PATCH 05/20] Fix `cancel` still tryingt to make changes --- src/components/panels/nav/Nav.vue | 23 ++++++----------------- src/stores/profile.js | 7 ------- 2 files changed, 6 insertions(+), 24 deletions(-) diff --git a/src/components/panels/nav/Nav.vue b/src/components/panels/nav/Nav.vue index 5aed655b0..4e69724e4 100644 --- a/src/components/panels/nav/Nav.vue +++ b/src/components/panels/nav/Nav.vue @@ -1394,7 +1394,7 @@ export default { finishCip: function(){ console.info("doing CIP stuff") - // remove provision date + // remove projected publication date let projDateComponent = this.profileStore.returnComponentByPropertyLabel('Projected publication date (YYMM)') let projDateValue let projYear @@ -1406,18 +1406,13 @@ export default { } else { console.warn("No projected date.") } - this.profileStore.deleteComponent(projDateComponent['@guid']) - let year = prompt("What year should be used to populate Call Number, CopyRight, Provistion Activity dates?", projYear) + let year = prompt("What year should be used to populate Call Number, Copyright, & Provision Activity dates?", projYear) + if (!year){ return } + this.profileStore.deleteComponent(projDateComponent['@guid']) // let extent = prompt("What's the extent of the resource?", "pages cm") - // projYear to copyright date? Or prompt for date and use that to fill in? - // provisision activity dates match projYear? - // prompt for extent? - - // year goes into - - // copyright, is this necessary if the provistion activity's 264 is set? + // copyright, is this necessary if the provision activity's 264 $c is set? let copyrightComponent = this.profileStore.returnComponentByPropertyLabel('Copyright date') let ccGuid = short.generate() if (copyrightComponent.userValue["http://id.loc.gov/ontologies/bibframe/copyrightDate"] && copyrightComponent.userValue["http://id.loc.gov/ontologies/bibframe/copyrightDate"][0]){ @@ -1429,13 +1424,10 @@ export default { year, null, null ) - // pubyear? - // call number let callNumComponent = this.profileStore.returnComponentByPropertyLabel('Classification numbers') let callNumValue = callNumComponent.userValue - console.info("callNumValue: ", callNumValue) - if (callNumValue["http://id.loc.gov/ontologies/bibframe/classification"]){ + if (callNumValue["http://id.loc.gov/ontologies/bibframe/classification"] && callNumValue["http://id.loc.gov/ontologies/bibframe/classification"][0]["http://id.loc.gov/ontologies/bibframe/itemPortion"]){ let itemPortion = callNumValue["http://id.loc.gov/ontologies/bibframe/classification"][0]["http://id.loc.gov/ontologies/bibframe/itemPortion"][0] let itemValue = itemPortion["http://id.loc.gov/ontologies/bibframe/itemPortion"] // does it look like a year? @@ -1458,8 +1450,6 @@ export default { } } - - // provision activity let provActComponent = this.profileStore.returnComponentByPropertyLabel('Provision activity') let proveUserValue = provActComponent.userValue @@ -1479,7 +1469,6 @@ export default { year, null, null ) - // change encoding level to `full` let adminComponent = false for (let rt in this.activeProfile.rt) { diff --git a/src/stores/profile.js b/src/stores/profile.js index 68d96eb80..740ef96ca 100644 --- a/src/stores/profile.js +++ b/src/stores/profile.js @@ -1917,13 +1917,6 @@ export const useProfileStore = defineStore('profile', { * @return {void} */ setValueLiteral: function(componentGuid, fieldGuid, propertyPath, value, lang, repeatedLiteral){ - console.info("setValueLiteral") - console.info("componentGuid: ", componentGuid) - console.info("fieldGuid: ", fieldGuid) - console.info("pp: ", JSON.stringify(propertyPath)) - console.info("value: ", value) - console.info("lang: ", lang) - console.info("repeatedLiteral: ", repeatedLiteral) //Save // componentGuid: aiPuH4YsetZ9xmcv7rqisJ // fieldGuid: pdtUXGpNDJ9mz33JM3uxje From 482ab16a883e395bb3209a65bc2ec28e181165c4 Mon Sep 17 00:00:00 2001 From: fo Date: Wed, 4 Feb 2026 20:07:50 +0000 Subject: [PATCH 06/20] Move "Finish CIP" into its own modal --- src/App.vue | 10 +- .../panels/edit/modals/CipModal.vue | 250 ++++++++++++++++++ src/components/panels/nav/Nav.vue | 105 +------- src/stores/profile.js | 1 + 4 files changed, 261 insertions(+), 105 deletions(-) create mode 100644 src/components/panels/edit/modals/CipModal.vue diff --git a/src/App.vue b/src/App.vue index ab108e395..7bf083d88 100644 --- a/src/App.vue +++ b/src/App.vue @@ -20,6 +20,7 @@ import NacoStubCreateModal from "@/components/panels/edit/modals/NacoStubCreateM import ShelfListingModal from "@/components/panels/edit/modals/ShelfListing.vue"; import AutoDeweyModal from "./components/panels/edit/modals/AutoDeweyModal.vue"; import UpdateAvailableModal from "@/components/general/UpdateAvailableModal.vue"; +import CipModal from "@/components/panels/edit/modals/CipModal.vue" @@ -48,7 +49,8 @@ export default { NonLatinAgentModal, FieldColorsModal, HubStubCreateModal, - NacoStubCreateModal + NacoStubCreateModal, + CipModal }, data() { @@ -63,7 +65,7 @@ export default { ...mapStores(useConfigStore, useProfileStore, usePreferenceStore), // // gives read access to this.count and this.double ...mapState(useProfileStore, ['profilesLoaded', 'showValidateModal','profilesLoaded', 'showPostModal', 'showItemInstanceSelection', 'isTestEnv']), - ...mapWritableState(useProfileStore, ['showShelfListingModal','showHubStubCreateModal', 'showAutoDeweyModal', 'showNacoStubCreateModal']), + ...mapWritableState(useProfileStore, ['showShelfListingModal','showHubStubCreateModal', 'showAutoDeweyModal', 'showNacoStubCreateModal', 'showCipModal']), ...mapState(usePreferenceStore, ['showPrefModal','catCode']), ...mapWritableState(usePreferenceStore, ['showLoginModal','showScriptshifterConfigModal','showDiacriticConfigModal','showTextMacroModal','showFieldColorsModal']), @@ -156,6 +158,10 @@ export default { + + diff --git a/src/components/panels/edit/modals/CipModal.vue b/src/components/panels/edit/modals/CipModal.vue new file mode 100644 index 000000000..fb6aa9b53 --- /dev/null +++ b/src/components/panels/edit/modals/CipModal.vue @@ -0,0 +1,250 @@ + + + + + + diff --git a/src/components/panels/nav/Nav.vue b/src/components/panels/nav/Nav.vue index 4e69724e4..ad8e98c0f 100644 --- a/src/components/panels/nav/Nav.vue +++ b/src/components/panels/nav/Nav.vue @@ -95,7 +95,6 @@ export default { default: [], type: Array } - }, computed: { @@ -105,7 +104,7 @@ export default { ...mapState(usePreferenceStore, ['styleDefault', 'showPrefModal', 'panelDisplay', 'customLayouts', 'createLayoutMode', 'panelSizePresets']), ...mapState(useConfigStore, ['layouts']), ...mapWritableState(usePreferenceStore, ['showLoginModal', 'showScriptshifterConfigModal', 'showDiacriticConfigModal', 'showTextMacroModal', 'layoutActiveFilter', 'layoutActive', 'showFieldColorsModal', 'customLayouts', 'createLayoutMode', 'showPanelSizeModal']), - ...mapWritableState(useProfileStore, ['showPostModal', 'showShelfListingModal', 'activeShelfListData', 'showValidateModal', 'showRecoveryModal', 'showAutoDeweyModal', 'showItemInstanceSelection', 'showAdHocModal', 'emptyComponents', 'activeProfilePosted', 'activeProfilePostedTimestamp', 'copyCatMode']), + ...mapWritableState(useProfileStore, ['showPostModal', 'showShelfListingModal', 'activeShelfListData', 'showValidateModal', 'showRecoveryModal', 'showAutoDeweyModal', 'showItemInstanceSelection', 'showAdHocModal', 'emptyComponents', 'activeProfilePosted', 'activeProfilePostedTimestamp', 'copyCatMode', 'showCipModal']), ...mapWritableState(useConfigStore, ['showNonLatinBulkModal', 'showNonLatinAgentModal']), @@ -357,7 +356,7 @@ export default { }, { text: 'Finish CIP', - click: () => { this.finishCip() }, + click: () => { this.showCipModal = true }, icon: "check" } ] @@ -1391,106 +1390,6 @@ export default { } }, - finishCip: function(){ - console.info("doing CIP stuff") - - // remove projected publication date - let projDateComponent = this.profileStore.returnComponentByPropertyLabel('Projected publication date (YYMM)') - let projDateValue - let projYear - let projMnth - if (projDateComponent.userValue["http://id.loc.gov/ontologies/bflc/projectedProvisionDate"]){ - projDateValue = projDateComponent.userValue["http://id.loc.gov/ontologies/bflc/projectedProvisionDate"][0]["http://id.loc.gov/ontologies/bflc/projectedProvisionDate"] - projYear = '20' + projDateValue.slice(0,2) - projMnth = projDateValue.slice(2) - } else { - console.warn("No projected date.") - } - - let year = prompt("What year should be used to populate Call Number, Copyright, & Provision Activity dates?", projYear) - if (!year){ return } - this.profileStore.deleteComponent(projDateComponent['@guid']) - // let extent = prompt("What's the extent of the resource?", "pages cm") - - // copyright, is this necessary if the provision activity's 264 $c is set? - let copyrightComponent = this.profileStore.returnComponentByPropertyLabel('Copyright date') - let ccGuid = short.generate() - if (copyrightComponent.userValue["http://id.loc.gov/ontologies/bibframe/copyrightDate"] && copyrightComponent.userValue["http://id.loc.gov/ontologies/bibframe/copyrightDate"][0]){ - ccGuid = copyrightComponent.userValue["http://id.loc.gov/ontologies/bibframe/copyrightDate"][0]['@guid'] - } - this.profileStore.setValueLiteral( - copyrightComponent['@guid'], ccGuid, - [{"level":0,"propertyURI":"http://id.loc.gov/ontologies/bibframe/copyrightDate"}], - year, null, null - ) - - // call number - let callNumComponent = this.profileStore.returnComponentByPropertyLabel('Classification numbers') - let callNumValue = callNumComponent.userValue - if (callNumValue["http://id.loc.gov/ontologies/bibframe/classification"] && callNumValue["http://id.loc.gov/ontologies/bibframe/classification"][0]["http://id.loc.gov/ontologies/bibframe/itemPortion"]){ - let itemPortion = callNumValue["http://id.loc.gov/ontologies/bibframe/classification"][0]["http://id.loc.gov/ontologies/bibframe/itemPortion"][0] - let itemValue = itemPortion["http://id.loc.gov/ontologies/bibframe/itemPortion"] - // does it look like a year? - let possibleYear = itemValue.slice(-5) // "YYYY" - if (/ \d{4}/.test(possibleYear)){ - let itemNumber = itemValue.slice(0,-5) - if (!possibleYear.includes(year)){ - this.profileStore.setValueLiteral( - callNumComponent['@guid'], itemPortion['@guid'], - [{"level":0,"propertyURI":"http://id.loc.gov/ontologies/bibframe/classification"},{"level":1,"propertyURI":"http://id.loc.gov/ontologies/bibframe/itemPortion"}], - itemNumber + " " + year, null, null - ) - } - } else { - this.profileStore.setValueLiteral( - callNumComponent['@guid'], itemPortion['@guid'], - [{"level":0,"propertyURI":"http://id.loc.gov/ontologies/bibframe/classification"},{"level":1,"propertyURI":"http://id.loc.gov/ontologies/bibframe/itemPortion"}], - itemValue + " " + year, null, null - ) - } - } - - // provision activity - let provActComponent = this.profileStore.returnComponentByPropertyLabel('Provision activity') - let proveUserValue = provActComponent.userValue - // 008 date - let zerozero8 = proveUserValue["http://id.loc.gov/ontologies/bibframe/provisionActivity"][0]["http://id.loc.gov/ontologies/bibframe/date"][0] - this.profileStore.setValueLiteral( - provActComponent['@guid'], zerozero8['@guid'], - [{"level":0,"propertyURI":"http://id.loc.gov/ontologies/bibframe/provisionActivity"},{"level":1,"propertyURI":"http://id.loc.gov/ontologies/bibframe/date"}], - year, null, null - ) - - // 264 $c date - let two64 = proveUserValue["http://id.loc.gov/ontologies/bibframe/provisionActivity"][0]["http://id.loc.gov/ontologies/bflc/simpleDate"][0] - this.profileStore.setValueLiteral( - provActComponent['@guid'], two64['@guid'], - [{"level":0,"propertyURI":"http://id.loc.gov/ontologies/bibframe/provisionActivity"},{"level":1,"propertyURI":"http://id.loc.gov/ontologies/bflc/simpleDate"}], - year, null, null - ) - - // change encoding level to `full` - let adminComponent = false - for (let rt in this.activeProfile.rt) { - if (rt.includes(":Instance")){ - for (let pt in this.activeProfile.rt[rt].pt) { - let component = this.activeProfile.rt[rt].pt[pt] - if (component.propertyLabel == 'Admin Metadata' && component.adminMetadataType == 'primary') { - adminComponent = component - break - } - } - } - } - this.profileStore.setValueSimple( - adminComponent['@guid'], - null, - [{"level":0,"propertyURI":"http://id.loc.gov/ontologies/bibframe/adminMetadata"},{"level":1,"propertyURI":"http://id.loc.gov/ontologies/bflc/encodingLevel"}], - 'http://id.loc.gov/vocabulary/menclvl/f', - 'full' - ) - - }, addAllDefaults: function () { for (let rt in this.activeProfile.rt) { diff --git a/src/stores/profile.js b/src/stores/profile.js index 740ef96ca..0d0c6c450 100644 --- a/src/stores/profile.js +++ b/src/stores/profile.js @@ -103,6 +103,7 @@ export const useProfileStore = defineStore('profile', { savedNARModalData:{}, savedHubModalData:{}, + showCipModal: false, showShelfListingModal: false, activeShelfListData:{ class:null, From f7da89c369f6b2d90e613b6fed2066feda314b52 Mon Sep 17 00:00:00 2001 From: fo Date: Wed, 4 Feb 2026 20:14:15 +0000 Subject: [PATCH 07/20] clean up --- src/components/panels/edit/modals/CipModal.vue | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/components/panels/edit/modals/CipModal.vue b/src/components/panels/edit/modals/CipModal.vue index fb6aa9b53..2977b8bc0 100644 --- a/src/components/panels/edit/modals/CipModal.vue +++ b/src/components/panels/edit/modals/CipModal.vue @@ -68,7 +68,6 @@ export default { }, finishCip: function () { - console.info("doing CIP stuff") this.showCipModal = false // remove projected publication date @@ -175,7 +174,6 @@ export default { let provActComponent = this.profileStore.returnComponentByPropertyLabel('Provision activity') let proveUserValue = provActComponent.userValue let zerozero8 = proveUserValue["http://id.loc.gov/ontologies/bibframe/provisionActivity"][0]["http://id.loc.gov/ontologies/bibframe/date"][0] - console.info("zerozero8: ", zerozero8) this.zerozero8Date = zerozero8["http://id.loc.gov/ontologies/bibframe/date"] } From 9d85cb651c8d79d3c75620bb88b90dccb4774ac3 Mon Sep 17 00:00:00 2001 From: fo Date: Wed, 4 Feb 2026 21:08:43 +0000 Subject: [PATCH 08/20] Handle `yes` update dates, but no pub year given --- src/components/panels/edit/modals/CipModal.vue | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/src/components/panels/edit/modals/CipModal.vue b/src/components/panels/edit/modals/CipModal.vue index 2977b8bc0..e6301a86b 100644 --- a/src/components/panels/edit/modals/CipModal.vue +++ b/src/components/panels/edit/modals/CipModal.vue @@ -34,7 +34,7 @@ export default { updateDates: true, profile: {}, - zerozero8Date: 'YYYY', + zerozero8Date: '', copyrightDate: '', callNumberDate: '', two64Date: '', @@ -96,6 +96,11 @@ export default { ) if (!this.updateDates){ return} + console.info(">>>", this.zerozero8Date, "--", this.zerozero8Date == '') + if (this.zerozero8Date == ''){ + alert("No 'Publication Year' provided. No dates were changed.") + return + } // -------------------------------- Date stuff below here -------------------------------- let copyrightComponent = this.profileStore.returnComponentByPropertyLabel('Copyright date') @@ -173,8 +178,10 @@ export default { // Get the 008 date: let provActComponent = this.profileStore.returnComponentByPropertyLabel('Provision activity') let proveUserValue = provActComponent.userValue - let zerozero8 = proveUserValue["http://id.loc.gov/ontologies/bibframe/provisionActivity"][0]["http://id.loc.gov/ontologies/bibframe/date"][0] - this.zerozero8Date = zerozero8["http://id.loc.gov/ontologies/bibframe/date"] + if (proveUserValue["http://id.loc.gov/ontologies/bibframe/provisionActivity"][0]["http://id.loc.gov/ontologies/bibframe/date"]){ + let zerozero8 = proveUserValue["http://id.loc.gov/ontologies/bibframe/provisionActivity"][0]["http://id.loc.gov/ontologies/bibframe/date"][0] + this.zerozero8Date = zerozero8["http://id.loc.gov/ontologies/bibframe/date"] + } } } @@ -209,7 +216,7 @@ export default {
  • Change the encoding level to "full"
  • From 5608c191245f4f767ecbc59dc852612e2fd93c43 Mon Sep 17 00:00:00 2001 From: fo Date: Wed, 4 Feb 2026 21:13:59 +0000 Subject: [PATCH 09/20] Add confirmation when updates but no date --- src/components/panels/edit/modals/CipModal.vue | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/components/panels/edit/modals/CipModal.vue b/src/components/panels/edit/modals/CipModal.vue index e6301a86b..3df1f3ae0 100644 --- a/src/components/panels/edit/modals/CipModal.vue +++ b/src/components/panels/edit/modals/CipModal.vue @@ -96,10 +96,14 @@ export default { ) if (!this.updateDates){ return} - console.info(">>>", this.zerozero8Date, "--", this.zerozero8Date == '') if (this.zerozero8Date == ''){ - alert("No 'Publication Year' provided. No dates were changed.") - return + let confirmation = confirm("No 'Publication Year' provided. Continue without changes dates? [Ok], or go back and provide a year. [Cancel]") + if (confirmation){ + return + } else { + this.showCipModal = true + return + } } // -------------------------------- Date stuff below here -------------------------------- From 983d3a8b87557aacea5e977638159fd604a194c1 Mon Sep 17 00:00:00 2001 From: fo Date: Fri, 6 Feb 2026 15:28:46 +0000 Subject: [PATCH 10/20] Limit to staging/dev --- src/components/panels/edit/modals/CipModal.vue | 2 +- src/components/panels/nav/Nav.vue | 17 +++++++++++++---- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/src/components/panels/edit/modals/CipModal.vue b/src/components/panels/edit/modals/CipModal.vue index 3df1f3ae0..dc75d2500 100644 --- a/src/components/panels/edit/modals/CipModal.vue +++ b/src/components/panels/edit/modals/CipModal.vue @@ -220,7 +220,7 @@ export default {
  • Change the encoding level to "full"
  • diff --git a/src/components/panels/nav/Nav.vue b/src/components/panels/nav/Nav.vue index ad8e98c0f..39c247dee 100644 --- a/src/components/panels/nav/Nav.vue +++ b/src/components/panels/nav/Nav.vue @@ -353,15 +353,24 @@ export default { text: 'Add All Defaults', click: () => { this.addAllDefaults() }, icon: "clear_all" - }, + } + ] + } + ) + } + + if (!this.disable.includes('Tools') && this.isStaging()) { + for (let sub in menu) { + if (menu[sub].text == 'Tools') { + menu[sub].menu.push( { text: 'Finish CIP', click: () => { this.showCipModal = true }, - icon: "check" + icon: "incomplete_circle" } - ] + ) } - ) + } } if (this.$route.path.startsWith('/edit/') && this.preferenceStore.returnValue('--c-general-ad-hoc')) { From 4da88dc9147954c7fcb590ebc84090b0fbaebba4 Mon Sep 17 00:00:00 2001 From: fo Date: Fri, 6 Feb 2026 16:57:40 +0000 Subject: [PATCH 11/20] Adjust adding brackets to 264 $c --- src/components/panels/edit/modals/CipModal.vue | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/components/panels/edit/modals/CipModal.vue b/src/components/panels/edit/modals/CipModal.vue index dc75d2500..c3c3a62a4 100644 --- a/src/components/panels/edit/modals/CipModal.vue +++ b/src/components/panels/edit/modals/CipModal.vue @@ -161,6 +161,11 @@ export default { } // 264 $c let two64 = proveUserValue["http://id.loc.gov/ontologies/bibframe/provisionActivity"][0]["http://id.loc.gov/ontologies/bflc/simpleDate"][0] + let two64Value = two64["http://id.loc.gov/ontologies/bflc/simpleDate"] + // if it's in [brackets], keep it in brackets. Or if it matches the copy right date add them? + if (two64Value.startsWith('[') || this.copyrightDate == this.zerozero8Date){ + this.zerozero8Date = '[' + this.zerozero8Date + ']' + } if (this.zerozero8Date){ this.profileStore.setValueLiteral( provActComponent['@guid'], two64['@guid'], From 457d97aa584c41e1f7f4aae3d6cfc69b2f846809 Mon Sep 17 00:00:00 2001 From: fo Date: Wed, 11 Feb 2026 13:23:36 +0000 Subject: [PATCH 12/20] Only show when on edit screen --- src/components/panels/edit/fields/Literal.vue | 18 +++++++++--------- src/components/panels/nav/Nav.vue | 2 +- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/components/panels/edit/fields/Literal.vue b/src/components/panels/edit/fields/Literal.vue index 4ba39fcf5..8c8bcfb3f 100644 --- a/src/components/panels/edit/fields/Literal.vue +++ b/src/components/panels/edit/fields/Literal.vue @@ -976,7 +976,7 @@ export default { let useTextToTrans = fieldValue[0].value // check if any text is highlighted in the textarea - let textarea = document.querySelector(`textarea[data-guid="${fieldValue[0]['@guid']}"]`) + let textarea = document.querySelector(`textarea[data-guid="${fieldValue[0]['@guid']}"]`) let highlightTemplate = null if (textarea && textarea.selectionStart !== textarea.selectionEnd) { let highlightedText = textarea.value.substring(textarea.selectionStart, textarea.selectionEnd) @@ -992,10 +992,10 @@ export default { hasLatin=true }else if (lv['@language'] && !lv['@language'].toLowerCase().includes('latn')){ hasNonLatin=true - } + } } if (hasLatin && hasNonLatin){ - + // get the script information from the other field that is not this one let otherFieldValue = this.literalValues.filter((v)=>{ return (v['@guid'] != options.fieldGuid) }) @@ -1004,7 +1004,7 @@ export default { // get the transliterated value from the highlited text // let transValue = await utilsNetwork.scriptShifterRequestTrans(options.lang,highlightedText,null,options.dir) - + // console // loop through all of this.scriptShifterLangCodes and see if we can find the code == the other field @@ -1014,11 +1014,11 @@ export default { // console.log("codeObj", codeObj) // console.log("otherFieldValue[0]['@language']", otherFieldValue[0]['@language']) if (fieldValue[0]['@language'] && codeObj.code.toLowerCase() == fieldValue[0]['@language'].toLowerCase()){ - otherScriptCodes.push(key) + otherScriptCodes.push(key) } } - + // remove the current req from the otherScriptCodes otherScriptCodes = otherScriptCodes.filter((code)=>{ return code != options.lang }) @@ -1030,7 +1030,7 @@ export default { // see if we can find transValue text in the other field value if (otherFieldValue[0].value.indexOf(transValue.output) > -1){ - + // okay we found it then do the transliteration for this value highleted text and get the results let thisTransValue = await utilsNetwork.scriptShifterRequestTrans(options.lang,highlightedText,null,options.dir) if (thisTransValue.warnings && thisTransValue.warnings.length > 0){ @@ -1040,7 +1040,7 @@ export default { // and replce the transValue.output text in the other field with thisTransValue.output using this.profileStore.setValueLiteral let newOtherValue = otherFieldValue[0].value.replace(transValue.output, thisTransValue.output) this.profileStore.setValueLiteral(this.guid,otherFieldValue[0]['@guid'],this.propertyPath,newOtherValue,otherFieldValue[0]['@language'] ) - + didReplaceTransliteration = true break @@ -1055,7 +1055,7 @@ export default { }else{ alert("Error: Could not find the other field value for this literal, cannot do transliteration overwrite.") } - // and they are currently in the + // and they are currently in the } } diff --git a/src/components/panels/nav/Nav.vue b/src/components/panels/nav/Nav.vue index 61f2179f7..33fd34d2d 100644 --- a/src/components/panels/nav/Nav.vue +++ b/src/components/panels/nav/Nav.vue @@ -359,7 +359,7 @@ export default { ) } - if (!this.disable.includes('Tools') && this.isStaging()) { + if (!this.disable.includes('Tools') && this.isStaging() && this.$route.path.startsWith('/edit/')) { for (let sub in menu) { if (menu[sub].text == 'Tools') { menu[sub].menu.push( From b6b7a0030799da2ddbbfd824a357529dbd4c29ab Mon Sep 17 00:00:00 2001 From: fo Date: Wed, 18 Feb 2026 21:38:57 +0000 Subject: [PATCH 13/20] Expand CIP functions --- .../panels/edit/modals/CipModal.vue | 43 +++++++++++++++++-- 1 file changed, 40 insertions(+), 3 deletions(-) diff --git a/src/components/panels/edit/modals/CipModal.vue b/src/components/panels/edit/modals/CipModal.vue index c3c3a62a4..648d78e3b 100644 --- a/src/components/panels/edit/modals/CipModal.vue +++ b/src/components/panels/edit/modals/CipModal.vue @@ -38,7 +38,8 @@ export default { copyrightDate: '', callNumberDate: '', two64Date: '', - + copyrightAsPub: false, + ebookCip: false, } }, @@ -56,6 +57,22 @@ export default { } else { this.initalHeight = 190 } + }, + + copyrightAsPub(newValue, oldValue){ + if (this.copyrightAsPub){ + this.initalHeight = this.initalHeight + 40 + } else { + this.initalHeight = this.initalHeight - 40 + } + }, + + ebookCip(){ + if (this.ebookCip){ + this.initalHeight = this.initalHeight + 16 + } else { + this.initalHeight = this.initalHeight - 16 + } } }, @@ -74,6 +91,9 @@ export default { let projDateComponent = this.profileStore.returnComponentByPropertyLabel('Projected publication date (YYMM)') this.profileStore.deleteComponent(projDateComponent['@guid']) + // instance note + let instanceNoteComponent = this.profileStore.returnComponentByPropertyLabel('Notes about the Instance ') + // change encoding level to `full` let adminComponent = false for (let rt in this.profile.rt) { @@ -96,7 +116,10 @@ export default { ) if (!this.updateDates){ return} - if (this.zerozero8Date == ''){ + if (this.copyrightAsPub){ + this.zerozero8Date = this.copyrightDate + } + if (this.zerozero8Date == '' && !this.copyrightAsPub){ let confirmation = confirm("No 'Publication Year' provided. Continue without changes dates? [Ok], or go back and provide a year. [Cancel]") if (confirmation){ return @@ -163,7 +186,7 @@ export default { let two64 = proveUserValue["http://id.loc.gov/ontologies/bibframe/provisionActivity"][0]["http://id.loc.gov/ontologies/bflc/simpleDate"][0] let two64Value = two64["http://id.loc.gov/ontologies/bflc/simpleDate"] // if it's in [brackets], keep it in brackets. Or if it matches the copy right date add them? - if (two64Value.startsWith('[') || this.copyrightDate == this.zerozero8Date){ + if (two64Value.startsWith('[') || this.copyrightDate == this.zerozero8Date || this.copyrightAsPub){ this.zerozero8Date = '[' + this.zerozero8Date + ']' } if (this.zerozero8Date){ @@ -218,6 +241,9 @@ export default {
    +   + +

    This will:

      @@ -226,6 +252,12 @@ export default {
    @@ -236,6 +268,11 @@ export default {
    +   + + + + From 430e916d87d802c77f2e09189ca212b6e9196518 Mon Sep 17 00:00:00 2001 From: fo Date: Thu, 19 Feb 2026 13:43:12 +0000 Subject: [PATCH 14/20] Update Instance Note Remove "resource not viewed" from the note. --- .../panels/edit/modals/CipModal.vue | 27 +++++++++++++++++-- src/stores/profile.js | 4 +++ 2 files changed, 29 insertions(+), 2 deletions(-) diff --git a/src/components/panels/edit/modals/CipModal.vue b/src/components/panels/edit/modals/CipModal.vue index 648d78e3b..f0aef9dda 100644 --- a/src/components/panels/edit/modals/CipModal.vue +++ b/src/components/panels/edit/modals/CipModal.vue @@ -91,8 +91,30 @@ export default { let projDateComponent = this.profileStore.returnComponentByPropertyLabel('Projected publication date (YYMM)') this.profileStore.deleteComponent(projDateComponent['@guid']) - // instance note - let instanceNoteComponent = this.profileStore.returnComponentByPropertyLabel('Notes about the Instance ') + // instance note, and check update when appropriate + for (let rt in this.profile.rt){ + for (let pt in this.profile.rt[rt].pt){ + if (this.profile.rt[rt].pt[pt]['propertyLabel'].toLowerCase() === 'Notes about the Instance'.toLowerCase()){ + let instanceNoteComponent = this.profile.rt[rt].pt[pt] + console.info("instanceNoteComponent: ", instanceNoteComponent) + let instNoteCompUserValue = instanceNoteComponent.userValue + console.info("instNoteCompUserValue: ", instNoteCompUserValue) + if (instNoteCompUserValue["http://id.loc.gov/ontologies/bibframe/note"][0]){ + let data = instNoteCompUserValue["http://id.loc.gov/ontologies/bibframe/note"][0] + let label = data["http://www.w3.org/2000/01/rdf-schema#label"][0]["http://www.w3.org/2000/01/rdf-schema#label"] + if (label == 'Description based on print version record and CIP data provided by publisher; resource not viewed.'){ + label = 'Description based on print version record and CIP data provided by publisher.' + + this.profileStore.setValueLiteral( + instanceNoteComponent['@guid'], data["http://www.w3.org/2000/01/rdf-schema#label"][0]['@guid'], + [{"level":0,"propertyURI":"http://id.loc.gov/ontologies/bibframe/note"},{"level":1,"propertyURI":"http://www.w3.org/2000/01/rdf-schema#label"}], + label, null, null + ) + } + } + } + } + } // change encoding level to `full` let adminComponent = false @@ -252,6 +274,7 @@ export default { + From 7e247713ff10d150cd7c130b26fec57263f9c3bb Mon Sep 17 00:00:00 2001 From: fo Date: Fri, 15 May 2026 15:37:29 +0000 Subject: [PATCH 18/20] Adjust name, add hotkey --- :: | 12 ++++++++++++ src/components/panels/edit/modals/CipModal.vue | 5 +++-- src/components/panels/nav/Nav.vue | 5 +++-- 3 files changed, 18 insertions(+), 4 deletions(-) create mode 100644 :: diff --git a/:: b/:: new file mode 100644 index 000000000..e19f4086b --- /dev/null +++ b/:: @@ -0,0 +1,12 @@ +Add pref to use arrow keys to nav btwn compts + +Was the default, now a preference that is opt in. Only applies to +literal fields. Lookups still use arrow keys to move between components. +# Please enter the commit message for your changes. Lines starting +# with '#' will be ignored, and an empty message aborts the commit. +# +# On branch pref-nav-with-arrows +# Changes to be committed: +# modified: src/components/panels/edit/fields/Literal.vue +# modified: src/stores/preference.js +# diff --git a/src/components/panels/edit/modals/CipModal.vue b/src/components/panels/edit/modals/CipModal.vue index 49500a991..f7fded6e5 100644 --- a/src/components/panels/edit/modals/CipModal.vue +++ b/src/components/panels/edit/modals/CipModal.vue @@ -26,7 +26,7 @@ export default { height: 0, top: 100, left: 0, - initalHeight: 290, + initalHeight: 305, changedHeight: 650, initalLeft: 50, initalWidth: 600, @@ -259,7 +259,8 @@ export default { -

    Finish CIP Record

    +

    Finalize Record

    +

    A collection of common actions taken to finish a record.


    diff --git a/src/components/panels/nav/Nav.vue b/src/components/panels/nav/Nav.vue index 1bb986101..bfd39f9ba 100644 --- a/src/components/panels/nav/Nav.vue +++ b/src/components/panels/nav/Nav.vue @@ -476,9 +476,10 @@ export default { if (menu[sub].text == 'Tools') { menu[sub].menu.push( { - text: 'Finish CIP', + text: 'Finalize Record', click: () => { this.showCipModal = true }, - icon: "incomplete_circle" + icon: "incomplete_circle", + hotkey: "ctrl+alt+f", } ) } From 1b9380fbaf203920f829d41986ecfbca187ca05a Mon Sep 17 00:00:00 2001 From: fo Date: Mon, 18 May 2026 13:52:50 +0000 Subject: [PATCH 19/20] Remove "ebook?", turn into a form "ebook" didn't do anything. Form allows enter to execute . --- .../panels/edit/modals/CipModal.vue | 72 ++++++++++--------- 1 file changed, 37 insertions(+), 35 deletions(-) diff --git a/src/components/panels/edit/modals/CipModal.vue b/src/components/panels/edit/modals/CipModal.vue index f7fded6e5..247ae0f08 100644 --- a/src/components/panels/edit/modals/CipModal.vue +++ b/src/components/panels/edit/modals/CipModal.vue @@ -261,45 +261,47 @@ export default {

    Finalize Record

    A collection of common actions taken to finish a record.

    -
    - - -   - - -

    -

    This will:

    -
      -
    • Remove the "Projected Publication Date"
    • -
    • Change the encoding level to "full"
    • - - -
    - -

    -
    - - (default value taken from 008) +

    - - -   - - + + + +

    +

    This will:

    +
      +
    • Remove the "Projected Publication Date"
    • +
    • Change the encoding level to "full"
    • + + +
    +

    +
    + + (default value taken from 008) +
    + + +   + + -
    - +
    + + + From b29b314c9ac48679871548bf4eaefbe1fff5b961 Mon Sep 17 00:00:00 2001 From: fo Date: Mon, 18 May 2026 15:46:58 +0000 Subject: [PATCH 20/20] Improve function when there's an empty date --- src/components/panels/edit/modals/CipModal.vue | 18 +++++++++++++----- src/stores/profile.js | 6 ++++-- 2 files changed, 17 insertions(+), 7 deletions(-) diff --git a/src/components/panels/edit/modals/CipModal.vue b/src/components/panels/edit/modals/CipModal.vue index 247ae0f08..fbe094139 100644 --- a/src/components/panels/edit/modals/CipModal.vue +++ b/src/components/panels/edit/modals/CipModal.vue @@ -96,9 +96,7 @@ export default { for (let pt in this.profile.rt[rt].pt){ if (this.profile.rt[rt].pt[pt]['propertyLabel'].toLowerCase() === 'Notes about the Instance'.toLowerCase()){ let instanceNoteComponent = this.profile.rt[rt].pt[pt] - console.info("instanceNoteComponent: ", instanceNoteComponent) let instNoteCompUserValue = instanceNoteComponent.userValue - console.info("instNoteCompUserValue: ", instNoteCompUserValue) if (instNoteCompUserValue["http://id.loc.gov/ontologies/bibframe/note"][0]){ let data = instNoteCompUserValue["http://id.loc.gov/ontologies/bibframe/note"][0] let label = data["http://www.w3.org/2000/01/rdf-schema#label"][0]["http://www.w3.org/2000/01/rdf-schema#label"] @@ -196,7 +194,17 @@ export default { let provActComponent = this.profileStore.returnComponentByPropertyLabel('Provision activity') let proveUserValue = provActComponent.userValue // 008 date/EDTF - let zerozero8 = proveUserValue["http://id.loc.gov/ontologies/bibframe/provisionActivity"][0]["http://id.loc.gov/ontologies/bibframe/date"][0] + let zerozero8 = false + if ( proveUserValue["http://id.loc.gov/ontologies/bibframe/provisionActivity"][0]["http://id.loc.gov/ontologies/bibframe/date"]){ + zerozero8 = proveUserValue["http://id.loc.gov/ontologies/bibframe/provisionActivity"][0]["http://id.loc.gov/ontologies/bibframe/date"][0] + } + + if (!zerozero8['@guid']){ + zerozero8 = { + '@guid': short.generate(), + + } + } if (this.zerozero8Date){ this.profileStore.setValueLiteral( provActComponent['@guid'], zerozero8['@guid'], @@ -278,7 +286,7 @@ export default {
  • Insert the "Copyright Year" into the "Copyright date," if provided
  • Update the "Note about the Instance," if appropriate