evershop icon indicating copy to clipboard operation
evershop copied to clipboard

[BUG] - Both enabled and disabled buttons are shown irrespective of product status.

Open saurabhshukla689 opened this issue 1 year ago • 6 comments

Describe the bug In the admin app , in products grid page, when user tries to enable or disable an item, both enable and disable items are shown regardless of the state of the item( whether enabled or disabled).

To Reproduce Steps to reproduce the behavior:

  1. Go to 'Catalog-> Products'
  2. Click on the checbox corresponding to one of the items
  3. Both disable and enable buttons are shown

Expected behavior If the product is enabled , then only disabled option should be visible . If the product is disabled , then only enabled option should be visible. If more than one items are selected , both enable and disable items should be shown, and clicking either of them enables or disables all the products. Screenshots If applicable, add screenshots to help explain your problem.

Background (please complete the following information):

  • NodeJS Version - v18.19.1
  • Postgres Version - (PostgreSQL) 16.4
  • EverShop Version - latest
  • OS: Ubuntu
  • Browser Chrome

saurabhshukla689 avatar Oct 06 '24 10:10 saurabhshukla689

@treoden . If you dont mind , can you please assign this to me? Thanks.

saurabhshukla689 avatar Oct 06 '24 10:10 saurabhshukla689

Hi @treoden . Could you please go through this issue and let me know your thoughts?

saurabhshukla689 avatar Oct 08 '24 02:10 saurabhshukla689

What if you select two products where one product is enabled and the other one is disabled?

GabrielGavrilov avatar Oct 10 '24 02:10 GabrielGavrilov

Hi @GabrielGavrilov . In the current implementation, if one product is enabled and another product is disabled, then also both options are seen.

And if enabled button is clicked all disabled products are enabled and enabled products remain as they are. And vice versa.

The idea is to keep above functionality same and just change it when user selects only 1 product.

saurabhshukla689 avatar Oct 10 '24 03:10 saurabhshukla689

Hi @treoden . Gentle reminder to let us know your thoughts on this. Even if you think otherwise.

saurabhshukla689 avatar Oct 11 '24 13:10 saurabhshukla689

Hi @saurabhshukla689 ,

Please give me some time, I will take a look this soon.

Thanks

treoden avatar Oct 17 '24 02:10 treoden