Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds Product Manager #20

Merged
merged 27 commits into from
Jan 18, 2024
Merged

Adds Product Manager #20

merged 27 commits into from
Jan 18, 2024

Conversation

A-Guldborg
Copy link
Contributor

@A-Guldborg A-Guldborg commented Nov 12, 2023

Closes #7
Enables adding and updating products through the Shifty app.

Note, a couple things to be discussed:

  • With the new endpoint in Adds GET products/all for privileged users analog-core#237 we can now see non-visible products and the property as well. We should figure out some styling / way to clearly indicate which products are not visible (i.e. likely disabled permanently). Right now, it is a gray-ish row on non-visible products, as well as a switch that indicates it is not visible when in edit mode.
  • Having a dropdown of checkboxes for the user groups on a product contains an error: We are not able to override the custom text function in the dropdown in the edit form - likely because the editform itself is auto-generated. Now the solution instead is a checkbox for each usergroup but not in a dropdown. It is possible that we can add this to a dropdown list (but not a "select" object) and thus custom-implement the dropdown we want. But that is not very blazor-ish.

Please give inputs to the above discussion points and/or anything else :)

NB: Blocked until AnalogIO/analog-core#237 is merged as we require the endpoint created in that PR.

image
image

@A-Guldborg
Copy link
Contributor Author

A-Guldborg commented Nov 28, 2023

Almost done.

Few things:

  1. I can't for the love of God format the text on the multi-select dropdown. Right now, when editing a produc,t, it shows only one value, e.g. "Customer", despite have both Customer and Board as user groups.
  2. It seems the PR Allows setting product user groups analog-core#223 does not work as expected. It does not expose the product user groups in the API on a get request, but I believe that might just be one single line to be added in coffeecard\CoffeeCard.WebApi\Controllers\v2\ProductsController.cs in method MapProductToDto:
AllowedUserGroups = product.ProductUserGroup.Select(e => e.UserGroup)

(But I will need to test that before creating such a PR). Once at least the second issue mentioned here is fixed, this PR is ready for review)

@A-Guldborg A-Guldborg marked this pull request as ready for review November 30, 2023 19:58
@A-Guldborg
Copy link
Contributor Author

A-Guldborg commented Dec 1, 2023

The last two commits depends on new endpoint from AnalogIO/analog-core#237
(endpoint /api/v2/products/all)

Update: PR is merged.

marfavi added a commit to AnalogIO/analog-core that referenced this pull request Dec 12, 2023
The API adds the endpoint GET /api/v2/products/all, which returns all
products, regardless of usergroup or visibility.

This endpoint will be used for the product management frontend in
AnalogIO/shifty-webapp#20, discussed in
#217 (and slack).

This endpoint is only accessible for users with Board privileges and
will allow board members to manage the visibilty of products or products
that they otherwise don't have access to themselves in the app.

---------

Co-authored-by: Omid Marfavi <[email protected]>
@A-Guldborg A-Guldborg mentioned this pull request Dec 19, 2023
@marfavi marfavi changed the title Feature/product manager Adds Product Manager Dec 28, 2023
Copy link
Member

@marfavi marfavi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I request all changes in #22 to be merged before continuing, which fixes the horizontal scrolling in the table.

And I renamed your PR :)

Copy link
Member

@marfavi marfavi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK

@A-Guldborg A-Guldborg merged commit e4ab67e into main Jan 18, 2024
2 checks passed
@A-Guldborg A-Guldborg deleted the feature/product-manager branch January 18, 2024 18:12
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.

UI for creating, changing, and deactivating a product
4 participants