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

Issue 3515 Remove Duplicate Code in adjustments.js #3539

Merged

Conversation

grantmca
Copy link
Contributor

Resolves #3515

Description

Addressed comment on adjustments.js mentioning duplicate code on this page. This code was used to update the drop down options when

  1. The Storage Location of the adjustment was changed
  2. When additional Item inputs were added using the add another item button

This code is duplicated in distribution_and_transfers.js in the request_storage_location_and_populate_item function and the unnamed function on line 61 of the file.

Type of change

How Has This Been Tested?

Tested manually by ensuring that the user is able to successfully add new items on adjustments and the items update automatically and also that when a new storage location is picked all of the items update automatically.

Addressed comment on adjustments.js mentioning duplicate code on this
page. This code was used to update the drop down options when
1. The Storage Location of the adjustment was changed
2. When additional Item inputs were added using the `add another item`
   button

This code is duplicated in distribution_and_transfers.js in the
request_storage_location_and_populate_item function and the unnamed
guncotton on line 61 of the file.
@grantmca grantmca changed the title Issue 3515 Remove Duplicate Code in adjustments.js WIP: Issue 3515 Remove Duplicate Code in adjustments.js Apr 16, 2023
@grantmca grantmca changed the title WIP: Issue 3515 Remove Duplicate Code in adjustments.js Issue 3515 Remove Duplicate Code in adjustments.js Apr 18, 2023
@dorner
Copy link
Collaborator

dorner commented Apr 18, 2023

Nice - thanks for the contribution!

@dorner dorner merged commit bbf7b19 into rubyforgood:main Apr 18, 2023
@cielf
Copy link
Collaborator

cielf commented Apr 23, 2023

Hey @grantmca - Just letting you know this is in production now. Thanks!

@grantmca
Copy link
Contributor Author

Thank you!

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.

[Investigation] There is a note on adjustments.js suggesting we might be able to remove it. Find out, etc.
3 participants