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

Fix scanning new barcode item issue (#4592) #4731

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

coalest
Copy link
Contributor

@coalest coalest commented Oct 23, 2024

Resolves #4592

Description

Made a change so that the new barcode item modal triggers a return keypress once saved. Which then looks up the newly created barcode, fills in details, adds new item, and changes focus.

An alternative approach would have been to fix/add that logic to the new barcode modal. The advantage being that we avoid one additional request (to /barcode_items/find.json?barcode_item[value]=XXXX), because we already know the item name/quantity. But the disadvantage being that we have that javascript logic in two places (create.js modal and barcode_items.js utility), so that's why I chose the first approach.

Type of change

  • Bug fix (non-breaking change which fixes an issue)

How Has This Been Tested?

  • Tested locally on firefox and chrome. Clicking "Save" after adding a new barcode item adds a new line item and switches focus to it.
  • Added a few assertions to the corresponding donations system spec.

@cielf cielf requested a review from dorner October 23, 2024 17:01
Copy link
Collaborator

@cielf cielf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM from a functional pov. over to @dorner for technical comments

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.

when scanning a new barcode item, the item name doesn't correctly show up
2 participants