nostrmarket icon indicating copy to clipboard operation
nostrmarket copied to clipboard

Changes to deactivate/reactivate products

Open rleed opened this issue 2 years ago • 10 comments

Draft changes to to support deactivation/reactivation of products per comment on issue #66. First time I've tinkered with this code, and I'm not sure how to add the toggle button to the UI, but maybe these suggested changes help somebody get a head start with this feature?

rleed avatar Oct 10 '23 20:10 rleed

Looks good so far. Thank you for opening the PR! Do you plan to add the UI toggle as well?

motorina0 avatar Oct 11 '23 10:10 motorina0

Do you plan to add the UI toggle as well?

Would like to try, but I'm not up to speed on the code base yet...could you point me to the right file? My idea would be to add a third button to go with the trashcan/delete and pencil/edit buttons, which would toggle the active state.

image

rleed avatar Oct 11 '23 11:10 rleed

motorina0 avatar Oct 11 '23 11:10 motorina0

  • Is the PR ready for review? I see its not in Draft anymore.
  • Please also take care to not fulfill orders that have disabled products.

motorina0 avatar Oct 16 '23 09:10 motorina0

  • Is the PR ready for review? I see its not in Draft anymore.

I thought it was, but I've noticed disabled products re-appear occasionally (even though they stay disabled on the merchant side). So maybe I need to track that down first.

  • Please also take care to not fulfill orders that have disabled products.

Good idea, although I guess that should not be a normal occurrence.

rleed avatar Oct 17 '23 00:10 rleed

Question... with this change, I get an error (below) on false values but not on true values:

image

Any idea why?

image

It's probably something dumb, but I'm having trouble tracking it down as I'm not seeing where the validation is being done in the code anywhere.

rleed avatar Nov 02 '23 22:11 rleed

Any idea why?

  • the error message suggests that the tags field should be present (even if it is an empty list)

motorina0 avatar Nov 03 '23 13:11 motorina0

@rleed is this PR ready? will you continue on it or do you want me to take over (fine with me)?

motorina0 avatar Nov 22 '23 12:11 motorina0

@rleed is this PR ready? will you continue on it or do you want me to take over (fine with me)?

If you would be so kind as to take it over, that would be great. (I'm still missing a lot of understanding of the nostr library and vue.)

rleed avatar Nov 22 '23 22:11 rleed

@rleed is this PR ready?

It works as committed, but editing a product results in the active switch getting set. I was trying to fix that when I ran into the nostr error above.

rleed avatar Nov 22 '23 22:11 rleed

I see this was closed without merge or comment. Was this feature implemented elsewhere?

rleed avatar Nov 04 '24 08:11 rleed