Skip to content
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
wants to merge 15 commits into
base: master
Choose a base branch
from

Conversation

EthanFreestone
Copy link

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 itself
https://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.

  • [X ] I've added appropriate record to the CHANGELOG.md
  • Does this PR meet or exceed the expected quality standards?
    • Code coverage on new code is 80% or greater
      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
    • [ X] Duplications on new code is 3% or less
    • [ X] There are no major code smells or security issues
  • Does this introduce breaking changes?
    • [ X] If any API-related changes - okapi interfaces and permissions are reviewed/changed correspondingly
    • [X ] There are no breaking changes in this PR.

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
Copy link

github-actions bot commented Mar 28, 2024

Jest Unit Test Statistics

186 tests   - 40   185 ✔️  - 40   1m 33s ⏱️ - 1m 3s
  63 suites  -   7       0 💤  -   1 
    1 files   ±  0       1 +  1 

For more details on these failures, see this check.

Results for commit 18c5a94. ± Comparison against base commit 43b80c8.

♻️ This comment has been updated with latest results.

Copy link

github-actions bot commented Mar 28, 2024

BigTest Unit Test Statistics

0 tests  ±0   0 ✔️ ±0   0s ⏱️ ±0s
0 suites ±0   0 💤 ±0 
0 files   ±0   0 ±0 

Results for commit 18c5a94. ± Comparison against base commit 43b80c8.

♻️ This comment has been updated with latest results.

Copy link
Contributor

@NikitaSedyx NikitaSedyx left a 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
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants