-
-
Notifications
You must be signed in to change notification settings - Fork 760
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
Issued by filter #5515
Issued by filter #5515
Conversation
✅ Deploy Preview for inventree ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
InvenTree/InvenTree/api_version.py
Outdated
@@ -2,11 +2,14 @@ | |||
|
|||
|
|||
# InvenTree API version | |||
INVENTREE_API_VERSION = 131 | |||
INVENTREE_API_VERSION = 133 |
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.
Is this a typo?
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.
Nice catch, thanks
for (let user of response) { | ||
users[user.pk] = { | ||
key: user.pk, | ||
value: user.username | ||
}; |
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.
Just if you want to learn something more modern, you could do it with reduce like:
response.reduce((users, user) => ({...users, [user.pk]: { key: user.pk, value: user.username }}), {})
Or using the map function and Object.fromEntries in combination.
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.
Thanks @wolflu05 for the tip. This will all soon be replaced with React - and I am certainly focusing on writing more up-to-date code over there :)
Allow build order table data to be filtered by which user issued the order