openfoodnetwork icon indicating copy to clipboard operation
openfoodnetwork copied to clipboard

Hide producer column when there's only one producer in the admin account

Open mariocarabotta opened this issue 1 year ago • 0 comments

Context

When the user only has access to one producer, the producer column is irrelevant and can be hidden.

  • Depends on: https://github.com/openfoodfoundation/openfoodnetwork/issues/11055

Acceptance Criteria & Tests

Scenario 1: Default - multiple producers Given that I am in /admin/products And I have products in the list And I have multiple producers And I have not overwritten the default columns to be shown When the list loads successfully Then I see all the available columns in the table and in the dropdown

Scenario 2: Default - single producer Given that I am in /admin/products And I have products in the list And I have products from only one producer And I have not overwritten the default columns to be shown When the list loads successfully Then I don't see the producer column in the table and in the dropdown

Note: for the above two scenarios, follow the same logic applied here > https://github.com/openfoodfoundation/openfoodnetwork/issues/11274

mariocarabotta avatar Jul 12 '23 07:07 mariocarabotta