Skip to content

Add Add/Consume all buttons#127

Open
PhilippCh wants to merge 4 commits intoForceu:masterfrom
celestialstatic:feature/consume-add-all
Open

Add Add/Consume all buttons#127
PhilippCh wants to merge 4 commits intoForceu:masterfrom
celestialstatic:feature/consume-add-all

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 PhilippCh force-pushed the feature/consume-add-all branch from 29b58b1 to c8630b8 Compare April 7, 2021 08:48
@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.

2 participants