-
-
Notifications
You must be signed in to change notification settings - Fork 209
[FIX] shopfloor_reception: don't reset expiration date after lot scan #1071
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
Conversation
|
Hi @simahawk, @JuMiSanAr, |
lmignon
left a comment
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't assign a contextualized name to a generic component. t
That doesn't make sense
| v-model="date" | ||
| v-bind="attrs" | ||
| v-on="on" | ||
| name="expiration_date" |
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.
We shouldn't do this here and I would argue on why we have a specific label here if this is a generic widget.
If we really need this, we should use properties. However, I don't think you need this.
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.
Also, such changes to another module should have its own commit.
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 was misled by the wording. At first glance, it seems like this widget is dedicated to the expiration date.
I changed the name to "date_picker" to be more generic. Getting the value from input using the selector is way easier than adding hooks to the events
| }, | ||
| on_scan: (barcode) => { | ||
| // Scan a lot | ||
| const input = document.querySelector('input[name="expiration_date"]'); |
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 should hook to the event provided by the widget instead and collect this info somewhere else (see on_date_picker_selected). As an alternative you can declare a $ref on the widget where it's used (see searchbar for example) .
e740bbf to
21f1157
Compare
21f1157 to
e8d1ac0
Compare
if the user selects an expiration date and then scans a lot, the expiration date is unintentionally reset, causing data loss this fix preserves the manually entered expiration date when scanning a lot
e8d1ac0 to
c097661
Compare
|
This PR is no more required. The code has been improved at service level into #1072. |
if the user selects an expiration date and then scans a lot, the expiration date is unintentionally reset, causing data loss
this fix preserves the manually entered expiration date when scanning a lot