-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
UIREC-269, UIREC-279, UIREC-284: Number generator functionality #506
Open
EthanFreestone
wants to merge
15
commits into
master
Choose a base branch
from
feat/numberGenerator
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains 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
Added initial settings setup, currently using exactly same code (and translations--Needs fixing) as inventory number generator branch
Some linting cleanup, making translations receiving-specific instead of inventory (Still using same values though, so may need tweaking for receiving specially)
Update to use servint 3
Adds an iconButton to the "recieve" table, which can be used to generate numbers simultaneously for item barcode/accession number/call number UIREC-279
Added same functionality to "Add piece" modal as in receive table UIREC-279
NikitaSedyx
requested changes
Apr 10, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do not use mod-configuration, it's deprecated
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.
Purpose
This PR serves to act as an example implementation of the number generator components from ui-service-interaction.
The behaviour expressed in the listed JIRA tickets is quite complex, so this implementation brings in some of the more modular components from the
@folio/service-interaction
library and builds the functionality itselfhttps://folio-org.atlassian.net/browse/UIREC-269
https://folio-org.atlassian.net/browse/UIREC-279
https://folio-org.atlassian.net/browse/UIREC-284
This covers the setting of number generator configuration options in the receiving settings, as well as then making use of them in the "receive" table, as well as the "add piece" modal.
When number generator is enabled for at least one of the given fields, a button appears, leading to a modal which allows the selection of sequences for each of the 3 fields "Accession number", "Call number" and "Item barcode".
Approach
The settings configurator makes use of mod-config to store simple strings from which the code can then make decisions about what number generator options to display.
Once in the table, each row will display an "actions" column with a button tha opens the modal mentioned above. If a field is set to allow number generation, there will then be a number generator selector for that field, which when selected and "generate" is pushed will fill out the correct field with the generated number.
In addition there is the option "use accession number for call number" which will instead render a combined selector, and on generate will fill both fields out with the same generated number.
Pre-Merge Checklist
Before merging this PR, please go through the following list and take appropriate actions.
This one is difficult to do, since the tests are failing on master for me. I have left these for the time being, pending discussions around handover of this code