Skip to content

Commit

Permalink
Merge pull request #1130 from libris/feature/unlock-itemOf-heldBy
Browse files Browse the repository at this point in the history
Unlock itemOf and heldBy when editing bulkchanges
  • Loading branch information
lrosenstrom authored Oct 24, 2024
2 parents 9490644 + 59bbcf1 commit 5be1c20
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
10 changes: 9 additions & 1 deletion cataloging/src/components/inspector/field.vue
Original file line number Diff line number Diff line change
Expand Up @@ -317,6 +317,11 @@ export default {
return isArray(this.fieldValue);
},
locked() {
if (this.inBulkChangeView && !this.isLocked) {
if (this.settings.unlockableProperties.includes(this.fieldKey)) {
return false;
}
}
if (this.settings.lockedProperties.indexOf(this.fieldKey) !== -1) {
return true;
}
Expand Down Expand Up @@ -446,7 +451,10 @@ export default {
} else {
return false;
}
}
},
inBulkChangeView() {
return this.$route.path.includes('bulkchanges');
},
},
methods: {
translatePhrase,
Expand Down
4 changes: 4 additions & 0 deletions cataloging/src/settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,10 @@ export default {
'generationProcess',
'recordStatus',
],
unlockableProperties: [
'itemOf',
'heldBy',
],
defaultExpandedProperties: [
'hasComponent',
'@reverse/reproductionOf',
Expand Down

0 comments on commit 5be1c20

Please sign in to comment.