openfoodnetwork icon indicating copy to clipboard operation
openfoodnetwork copied to clipboard

[BUU] Change producer, category and tax category

Open mariocarabotta opened this issue 1 year ago • 2 comments

Context

This issue allows to edit some product fields that use the dropdown element, as finalised in this PR.

Description

- As an: enterprise user - On page: /admin/products - I want to be able to: update producer, category and tax category for my products and variants - So that: I can show the most up to date information to my customers

Acceptance Criteria & Tests

Scenario 1: Single producer Given that I am in /admin/products And my profile only has one producer When my catalogue has loaded Then I don't see the producer column

Scenario 2: Multiple producers Given that I am in /admin/products And my profile has multiple producers When I select the producer field for a product Then I see the available producers in my profile

Scenario 3: Selecting a different producer Given that I am seeing the list of available producers When I select a different producer Then the banner stating that a product has been modified is shown

Note: saving and failure scenarios should follow existing behaviour as implemented in #11059

Scenario 4: Categories Given that I am in /admin/products When I select the category field for a product Then I see the available categories

Scenario 5: Selecting a different category Given that I am seeing the list of available categories When I select a different category Then the banner stating that a product has been modified is shown

Note: saving and failure scenarios should follow existing behaviour as implemented in #11059

Scenario 6: Tax categories Given that I am in /admin/products When I select the tax category field for a variant Then I see the available tax categories

Scenario 7: Selecting a different tax category Given that I am seeing the list of available tax categories When I select a different tax category Then the banner stating that a product has been modified is shown

Note: saving and failure scenarios should follow existing behaviour as implemented in #11059

##Re dropdown search Searching should behave as already implemented. We still have not decided the rules for when to display search in a dropdown or not. Conversation in slack here.

##Errors Given all of the dropdowns require you to select something, I believe there are no possible errors, either inline or server-side. Please let me know if that's not the case.

Design specs

A prototype is available here (select producer) > https://www.figma.com/proto/v1zbrWDZSRd3Nqoe0SJ2Sm/Engineering-Delivery---Back-Office?page-id=1236%3A2&type=design&node-id=1236-459&viewport=545%2C452%2C0.32&t=k27CcFWPGKAnn8ri-1&scaling=min-zoom&mode=design

Figma screens are available here > https://www.figma.com/file/v1zbrWDZSRd3Nqoe0SJ2Sm/Engineering-Delivery---Back-Office?type=design&node-id=1236%3A2&mode=design&t=U9HAUFEmrMTzGGAs-1

New components and styles None

mariocarabotta avatar Jun 19 '23 00:06 mariocarabotta

decided to apply logic to the picker to enable search if more than 10 items are listed.

mariocarabotta avatar Feb 20 '24 01:02 mariocarabotta

Estimate

  1. Select dropdown shows search where more than 10 items
  2. Add dropdown for each.

<1day

dacook avatar Feb 20 '24 01:02 dacook

Hey @mariocarabotta, @dacook -

  • I have a query regarding the designs.
  • In the old screen, only variants have the category and tax category dropdowns to change.
  • However, as per the new screen requirements or design, the product has the dropdowns mentioned above.
  • Please confirm the path forward here. Thanks.

Old: image

New: image

chahmedejaz avatar Apr 18 '24 21:04 chahmedejaz

Good pickup Ahmed. This is because we have another piece of work happening in parallel: https://github.com/openfoodfoundation/openfoodnetwork/issues/9069 This involved moving those two attributes from the product, to the variant. So what you're seeing in the old screen is correct: Category and Tax Category are now on the variant only.

Note that the producer is currently on the product only. That's sufficient for this issue. (The next step of that project will copy the producer to variant, but we can add the dropdown later.)

dacook avatar Apr 19 '24 07:04 dacook

Thanks, David. I'll go ahead and implement those on variant now :)

chahmedejaz avatar Apr 19 '24 07:04 chahmedejaz

Update: The PR is ready for review now. Thanks

chahmedejaz avatar Apr 28 '24 11:04 chahmedejaz