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

Issued by filter #5515

Merged
merged 4 commits into from
Sep 7, 2023
Merged

Conversation

SchrodingersGat
Copy link
Member

Allow build order table data to be filtered by which user issued the order

@netlify
Copy link

netlify bot commented Sep 7, 2023

Deploy Preview for inventree ready!

Name Link
🔨 Latest commit 9578879
🔍 Latest deploy log https://app.netlify.com/sites/inventree/deploys/64fa4e1aadc9c10008cf5198
😎 Deploy Preview https://deploy-preview-5515--inventree.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 100
Accessibility: 86
Best Practices: 100
SEO: 70
PWA: -
View the detailed breakdown and full score reports

To edit notification comments on pull requests, go to your Netlify site configuration.

@SchrodingersGat SchrodingersGat added api Relates to the API build Build orders labels Sep 7, 2023
@SchrodingersGat SchrodingersGat added this to the 0.13.0 milestone Sep 7, 2023
@@ -2,11 +2,14 @@


# InvenTree API version
INVENTREE_API_VERSION = 131
INVENTREE_API_VERSION = 133
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this a typo?

Copy link
Member Author

Choose a reason for hiding this comment

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

Nice catch, thanks

Comment on lines +31 to +35
for (let user of response) {
users[user.pk] = {
key: user.pk,
value: user.username
};
Copy link
Contributor

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.

Copy link
Member Author

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 :)

@SchrodingersGat SchrodingersGat merged commit 1e55fc8 into inventree:master Sep 7, 2023
21 checks passed
@SchrodingersGat SchrodingersGat deleted the issued-by-filter branch September 7, 2023 23:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api Relates to the API build Build orders
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants