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

refactor(osp): use new company role check #1390

Merged
merged 2 commits into from
Dec 9, 2024

Conversation

manojava-gk
Copy link
Contributor

@manojava-gk manojava-gk commented Dec 4, 2024

Description

remove customised logic to check company role info in onboarding service provider (osp) page and header component. use company role check in config file to allow user to navigate to osp page.

Chnagelog

**OSP**
 - removed customised logic to check company role info in osp page and header component. use company role check in config file to allow user to navigate to osp page.[#1390](https://github.com/eclipse-tractusx/portal-frontend/pull/1390)

Why

remove custom check for company roles

Issue

#1108

Checklist

Please delete options that are not relevant.

  • I have followed the contributing guidelines
  • I have performed a self-review of my own code
  • I have successfully tested my changes locally

@manojava-gk manojava-gk marked this pull request as ready for review December 4, 2024 08:32
@manojava-gk manojava-gk added this to the Release 25.03 milestone Dec 4, 2024
@evegufy
Copy link
Contributor

evegufy commented Dec 4, 2024

PR related to #1328

Copy link
Contributor

@lavanya-bmw lavanya-bmw left a comment

Choose a reason for hiding this comment

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

Please check or delete options that are not relevant from PR checklist

useEffect(() => {
if (
companyDetails?.companyRole.includes(
CompanyRoleEnum.ONBOARDING_SERVICE_PROVIDER
Copy link
Contributor

Choose a reason for hiding this comment

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

Please also remove ONBOARDING_SERVICE_PROVIDER from CompanyRoleEnum from userApiSlice.ts

Copy link
Contributor Author

Choose a reason for hiding this comment

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

why? This is being used in ConnectorTypeSelection.tsx

Copy link
Contributor

Choose a reason for hiding this comment

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

Please use COMPANY_ROLES enum from constants.ts file and remove CompanyRoleEnum(from userApiSlice.ts) and its usage as it is a duplicate enum

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

Copy link

sonarqubecloud bot commented Dec 9, 2024

Copy link
Contributor

@lavanya-bmw lavanya-bmw left a comment

Choose a reason for hiding this comment

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

lgtm

@evegufy evegufy changed the title fix(osp): use new company service in osp refactor(osp): use new company role check Dec 9, 2024
@evegufy evegufy merged commit e7936ad into eclipse-tractusx:main Dec 9, 2024
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: USER READY
Development

Successfully merging this pull request may close these issues.

4 participants