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

Add Add/Consume all buttons #127

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

PhilippCh
Copy link
Contributor

Hi there,

I've been wanting to add those for a while now. When there's at least one product in the list of known/unknown barcodes, the UI will display additional buttons to add or consume all products that have been assigned a Grocy id. This allows me to quickly assign products without having to click the regular Add/Consume buttons all the time and waiting for the page to reload.

I've added a check to only update products that have anything other than == None == selected in the product field.

Let me know what you think (or if there's anything I should do differently UI-wise). Also let me know if this feature already exists and I'm just too dumb to use it ;)

Cheers
Philipp

@PhilippCh
Copy link
Contributor Author

Just checking in, I know it's been a while. Can you give me any feedback on the provided change?

@Forceu
Copy link
Owner

Forceu commented Aug 12, 2021

Hi, sorry for the very late reply. Unfortunately I did not have a lot of time recently, but I will have a look at it in the next days!

Copy link
Owner

@Forceu Forceu left a comment

Choose a reason for hiding this comment

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

When clicking on "Consume All" I get the following error:

PHP message: PHP Fatal error:  Uncaught TypeError: Argument 1 passed to {closure}() must be of the type int, string given in /app/bbuddy/index.php:215
Stack trace:
#0 [internal function]: {closure}('Consume all', 'button_consume_...')
#1 /app/bbuddy/index.php(217): array_filter(Array, Object(Closure), 1)
#2 /app/bbuddy/index.php(99): processButtons()
#3 {main}

Also please adjust the buttons to make them look a little bit less out of place, maybe the best way to do that would be to put them into the overflow menu where the "Delete All" option is as well.

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.

None yet

2 participants