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

Add type to Portal #707

Open
Noggling opened this issue Aug 19, 2024 · 1 comment
Open

Add type to Portal #707

Noggling opened this issue Aug 19, 2024 · 1 comment

Comments

@Noggling
Copy link
Contributor

Noggling commented Aug 19, 2024

Expected outcome

A portal should have type field, this could be "ContextTypeDrivenPortal" or "AppDrivenPortal"

GET: api/portals/types
POST: api/portals
PUT: api/portals/{portalId}

if the portal type is "ContextTypeDrivenPortal" the body should include:

{
  // Portal data...
  type: "ContextTypeDrivenPortal",
  contextTypes: ["ProjectMaster"]
}

if the portal type is "ContextTypeDrivenPortal" and no contextTypes is provided the endpoint should produce a validation error.

if the portal type is "AppDrivenPortal" the body should include adn the contextType field can be empty:

{
  // Portal data...
  type: "AppDrivenPortal",
  contextTypes: []
}

Business Value / Developer Experience

Easier configuration and more understandable api

User Acceptance Tests (UAT)

All portal endpoints should receive and return type on the portal object.

Environments

All testing of issues are done in project-portal-test

For Backend use these

@kjetilhau
Copy link
Member

kjetilhau commented Sep 10, 2024

I am not sure if I see the need for creating additional data, logic and thus more complexity on the backend/database for this. This can be inferred by checking whether there have been added contextTypes to a Portal or not.

So:

  • ContextTypes == [] = Global
  • ContextTypes == ["ProjectMaster", "..."] = Contextual / ContextDriven

If the only requirement for this issue is so that the frontend doesn't have to calculate this, we can supply something in the API view model

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

No branches or pull requests

2 participants