Skip to content

Commit

Permalink
Merge pull request #643 from credebl/develop
Browse files Browse the repository at this point in the history
Merge Develop to QA
  • Loading branch information
bhavanakarwade authored Mar 28, 2024
2 parents e3fa443 + 3e5e510 commit dfb5d06
Show file tree
Hide file tree
Showing 6 changed files with 32 additions and 12 deletions.
22 changes: 15 additions & 7 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
"astro": "^2.9.0",
"axios": "^1.4.0",
"cookie": "^0.5.0",
"crypto-js": "^4.1.1",
"crypto-js": "^4.2.0",
"dom-to-image": "^2.6.0",
"downloadjs": "^1.4.7",
"flowbite": "^1.8.1",
Expand Down
6 changes: 5 additions & 1 deletion src/components/Authentication/SignInUserPasskey.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,12 @@ const SignInUserPasskey = (signInUserProps: signInUserProps) => {
(element: { orgRole: { name: string } }) =>
permissionArray.push(element?.orgRole?.name),
);
const { id, profileImg, firstName, email, enableEcosystem, multiEcosystemSupport } = data?.data || {}
const userProfile = {
id, profileImg, firstName, email, enableEcosystem, multiEcosystemSupport
}
await setToLocalStorage(storageKeys.PERMISSIONS, permissionArray);
await setToLocalStorage(storageKeys.USER_PROFILE, data?.data);
await setToLocalStorage(storageKeys.USER_PROFILE, userProfile);
await setToLocalStorage(storageKeys.USER_EMAIL, data?.data?.email);
return {
role: role?.orgRole || ""
Expand Down
6 changes: 5 additions & 1 deletion src/components/Authentication/SignInUserPassword.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,11 @@ const SignInUserPassword = (signInUserProps: SignInUser3Props) => {
(element: { orgRole: { name: string } }) =>
permissionArray.push(element?.orgRole?.name),
);
await setToLocalStorage(storageKeys.USER_PROFILE, data?.data);
const { id, profileImg, firstName, email, enableEcosystem, multiEcosystemSupport } = data?.data || {}
const userProfile = {
id, profileImg, firstName, email, enableEcosystem, multiEcosystemSupport
}
await setToLocalStorage(storageKeys.USER_PROFILE, userProfile);
await setToLocalStorage(storageKeys.USER_EMAIL, data?.data?.email);
return {
role: role?.orgRole ?? '',
Expand Down
6 changes: 5 additions & 1 deletion src/components/Profile/UserProfile.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,11 @@ const UserProfile = ({ noBreadcrumb }: { noBreadcrumb?: boolean }) => {

if (data?.statusCode === apiStatusCodes.API_STATUS_SUCCESS) {
setPrePopulatedUserProfile(data?.data);
await setToLocalStorage(storageKeys.USER_PROFILE, data?.data)
const { id, profileImg, firstName, email, enableEcosystem, multiEcosystemSupport } = data?.data || {}
const userProfile = {
id, profileImg, firstName, email, enableEcosystem, multiEcosystemSupport
}
await setToLocalStorage(storageKeys.USER_PROFILE, userProfile)
await setToLocalStorage(storageKeys.USER_EMAIL, data?.data?.email)
}
} catch (error) {
Expand Down
2 changes: 1 addition & 1 deletion src/config/ecosystem.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ const checkEcosystem = async (): Promise<ICheckEcosystem> => {
return {
isEnabledEcosystem,
isMultiEcosystem,
isEcosystemMember: !isLead,
isEcosystemMember: !isLead && isEnabledEcosystem,
isEcosystemLead: isLead,
};
};
Expand Down

0 comments on commit dfb5d06

Please sign in to comment.