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

feat: Create a reusable component for role category and migrate opportunity to use it #228

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

chungthuang
Copy link
Contributor

Resolves #227

@chungthuang chungthuang requested review from a team September 24, 2024 04:02
src/api/opportunity/content-types/opportunity/schema.json Outdated Show resolved Hide resolved
]
}
}
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Hey @chungthuang I didn't understood very well why use it as a Enum inside a Component instead of use it just as a enum.

Could you explain ?

Follow bellow 2 different attributes with different behaviors, roleType and roleCategory.

image

Copy link
Contributor Author

@chungthuang chungthuang Sep 28, 2024

Choose a reason for hiding this comment

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

roleType might not be the best name, but it means the name of the role. It's defined in https://github.com/dev-launchers/strapiv4/pull/228/files#diff-8385a8efd2cb2543e792c4e88ce7a586cf150d72489cfe80e3ba2a3b03c4a6a9R59-R73.
For example, both Front-End Developer and Back-End Developer will fall under Developer roleCategory.

Copy link
Contributor

@tiagopazhs tiagopazhs Sep 30, 2024

Choose a reason for hiding this comment

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

Hmm maybe it is something like a subcategory ?

Let me know if it is correct.
We can create a model roleCategory that has the attribute category.
But to make it practical we can use it as a component ?

Copy link

Code Coverage

Package Line Rate Branch Rate Health
src 65% 50%
src.api.applicant.content-types.applicant 25% 0%
src.api.applicant.controllers 100% 100%
src.api.applicant.routes 100% 100%
src.api.applicant.services 100% 100%
src.api.category.controllers 100% 100%
src.api.category.routes 100% 100%
src.api.category.services 100% 100%
src.api.comment.content-types.comment 100% 100%
src.api.comment.controllers 100% 100%
src.api.comment.routes 100% 100%
src.api.comment.services 100% 100%
src.api.dl-tal-community.controllers 100% 100%
src.api.dl-tal-community.routes 100% 100%
src.api.dl-tal-community.services 100% 100%
src.api.event.content-types.event 88% 100%
src.api.event.controllers 100% 100%
src.api.event.routes 100% 100%
src.api.event.services 100% 100%
src.api.github-repo.controllers 20% 100%
src.api.github-repo.routes 100% 100%
src.api.github-repo.services 15% 0%
src.api.google-meet.content-types.google-meet 33% 100%
src.api.google-meet.controllers 100% 100%
src.api.google-meet.routes 100% 100%
src.api.google-meet.services 100% 100%
src.api.idea-card.content-types.idea-card 100% 100%
src.api.idea-card.controllers 100% 100%
src.api.idea-card.routes 100% 100%
src.api.idea-card.services 100% 100%
src.api.interest.controllers 100% 100%
src.api.interest.routes 100% 100%
src.api.interest.services 100% 100%
src.api.like.controllers 100% 100%
src.api.like.routes 100% 100%
src.api.like.services 100% 100%
src.api.newsletter.controllers 100% 100%
src.api.newsletter.routes 100% 100%
src.api.newsletter.services 100% 100%
src.api.notification.controllers 100% 100%
src.api.notification.policies 100% 88%
src.api.notification.routes 100% 100%
src.api.notification.services 100% 100%
src.api.opportunity.controllers 100% 100%
src.api.opportunity.routes 100% 100%
src.api.opportunity.services 100% 100%
src.api.profile.content-types.profile 12% 0%
src.api.profile.controllers 100% 100%
src.api.profile.routes 100% 100%
src.api.profile.services 100% 100%
src.api.project.controllers 100% 100%
src.api.project.routes 100% 100%
src.api.project.services 100% 100%
src.api.save-idea.controllers 100% 100%
src.api.save-idea.routes 100% 100%
src.api.save-idea.services 100% 100%
src.api.sendmail.controllers 100% 100%
src.api.sendmail.routes 100% 100%
src.api.sendmail.services 67% 100%
src.api.subscription.controllers 100% 100%
src.api.subscription.routes 100% 100%
src.api.subscription.services 100% 100%
src.api.team-membership.controllers 100% 100%
src.api.team-membership.routes 100% 100%
src.api.team-membership.services 100% 100%
src.api.user-recommendations.controllers 10% 0%
src.api.user-recommendations.routes 100% 100%
src.extensions.users-permissions 100% 100%
src.extensions.users-permissions.controllers 75% 100%
src.extensions.users-permissions.routes.content-api 100% 100%
src.extensions.users-permissions.server.bootstrap 100% 62%
src.extensions.users-permissions.server.middlewares 70% 59%
src.extensions.users-permissions.server.services 11% 0%
src.migrators 89% 50%
Summary 57% (294 / 517) 33% (42 / 129)

@chungthuang chungthuang requested review from a team and dbradham October 1, 2024 02:30
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.

[FEAT] Create a reusable component for role category
2 participants