Add support for linked SingleItem in holdings#1091
Merged
Conversation
It has not been used in a long time. Works are now handled like any other node.
Move the id-fnurgel pill seen in the top right corner of cards to its own component. Use it in item-local as well. Co-authored-by: Lars Rosenström <lars.rosenstrom@kb.se>
olovy
commented
Aug 20, 2024
|
|
||
| <entity-action | ||
| v-if="inspector.status.editing && !isLocked" | ||
| v-if="inspector.status.editing && !isLocked && !isInlinedRecord && !isExtracting" |
Contributor
Author
There was a problem hiding this comment.
!isExtracting is a workaround for a bug in the old "extract" code.
If you start extracting an entity and then delete it you get an error when saving.
It is still possible to trigger:
- Add a new Item in hasComponent
- Click "Extract Single item" / "Extrahera Exemplar"
- Click Undo (removing the added item)
- Save
- Error!
2f48f5d to
6fbccd8
Compare
Contributor
|
LGTM! Must say I have little knowledge of this part of the code, but all looks reasonable. Nice cleaning job too. Have tried creating/extracting, editing, viewing (both inline and on its own) and unlinking/deleting The only thing I noticed is an alert saying I have unsaved changes when I try to navigate away in edit mode, even if I save and try again. Using the green button does it. Maybe it’s always been like this. |
jesperengstrom
approved these changes
Aug 20, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Checklist:
yarn test:unityarn lintDescription
Add support for
SingleItems (sv: exemplar) in holdings.Initially to be used for pinpointing
itemUsedin digital reproductions.An Item in


hasComponentcan be converted to aSingleItem.It looks similiar to when extracting linked works.
The single items are always stored in their own records and linked from the the holding record.

Note the id in the top right corner.
But they can be edited in place as if the were part of the same record.

There are separate options for removing the linked entity or just the link.


Reused the ❌ for removing links. Maybe needs to be more obvious.
There can of course be many linked items and mixed with local items.

The feature is currently only available for sigel S.
Depends on libris/definitions#494
Depends on libris/librisxl#1467
Tickets involved
LXL-4504
Summary of changes
Add
settings.extractableMappedTypesthat specifies which types can be extracted and which type they should be converted to. That is,Itemcan be extracted to its own document and should then be converted to'SingleItem. This is a bit clumsy but does the job for now.When loading a record/document, other documents that should be inlined are moved from quoted to the main inspector data.
compositional(onlyhasComponent...).compositional+integralWhen saving, inlined documents are extracted and updated before the main document in separate requests.
Inlined records that should be deleted are deleted after the main doc is saved (this might fail...).
81208b0 breaks out the id-pill used in the top right corner of entity-summary to its own component. Taken from Feature/lxl 4504 cataloguing items #1073
bcf023b contains the main changes.
The other commits just remove obsolete and dead code that I encountered.
Not in scope
There is no way to move (link) a SingleItem to another holding record.
TODO