-
-
Notifications
You must be signed in to change notification settings - Fork 538
Fix the issue where only one error is displayed, even when multiple errors are present. #4911
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 the issue where only one error is displayed, even when multiple errors are present. #4911
Conversation
cc3e80c
to
e7d563d
Compare
…rrors are present.
e7d563d
to
6f80c97
Compare
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.
Hey @nozomrin -- Thanks for this!
The multiple errors part works well, but you've missed this part of the issue: "The number in brackets after the item (which is the inventory level for that item/storage location) has disappeared -- it should still be there."
Please address.
Sorry, I missed that earlier. The issue has been fixed; please check it. |
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.
LGTM functionally. over to @dorner for technical comments
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.
Overall looks good - some minor suggestions.
app/events/inventory_error.rb
Outdated
super(message) | ||
self.item_id = item_id | ||
self.storage_location_id = storage_location_id | ||
def initialize(message) |
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.
You can probably just remove this definition entirely since it does nothing but call super
.
@@ -0,0 +1,14 @@ | |||
import { Controller} from "@hotwired/stimulus" |
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.
In general Stimulus controllers should be generic. In this case, the controller is just triggering a change event on load. Can we rename this to reflect that?
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.
Having said that - what does this have to do with the goal of the PR?
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.
In general Stimulus controllers should be generic. In this case, the controller is just triggering a change event on load. Can we rename this to reflect that?
sure.
Having said that - what does this have to do with the goal of the PR?
It is mentioned in the issue.
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.
Can you point me to where? I don't see anything related to the frontend.
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.
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.
I'm good with this!
@nozomirin: Your PR |
Resolves #4613
Description
InventoryActionError
InventoryError
aggregateInventoryActionError
sType of change
How Has This Been Tested?
bundle exec rspec spec/events/inventory_aggregate_spec.rb
Screenshots