-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Beta Tester / VC campaign better treatment (#7250)
* campaign block only for VC campaing; platform role instead of agent credentials * Show platform roles in the user menu * Update the globa role display logic as requested * Beta label on user avatar in platform navigation bar * pr fix missing dependencies in useMemo --------- Co-authored-by: Carlos Cano <carlos@alkem.io>
- Loading branch information
1 parent
80a0809
commit 8ee2f1c
Showing
11 changed files
with
136 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
import { TypographyProps, useTheme } from '@mui/material'; | ||
import { gutters } from '../grid/utils'; | ||
import { Caption } from '../typography'; | ||
|
||
interface BadgeLabelProps extends TypographyProps { | ||
count?: string; | ||
size?: 'small' | 'medium'; | ||
} | ||
|
||
// copy of BadgeCounter but supporting auto width text | ||
const BadgeSizes: Record<NonNullable<BadgeLabelProps['size']>, TypographyProps> = { | ||
small: { | ||
fontSize: '0.7rem', | ||
lineHeight: gutters(0.8), | ||
width: 'auto', | ||
height: gutters(0.8), | ||
}, | ||
medium: { | ||
width: 'auto', | ||
height: gutters(1), | ||
}, | ||
}; | ||
|
||
const BadgeLabel = ({ count, size = 'medium', ...props }: BadgeLabelProps) => { | ||
const theme = useTheme(); | ||
|
||
return ( | ||
<Caption | ||
bgcolor={theme.palette.text.primary} | ||
color={theme.palette.background.paper} | ||
fontWeight="bold" | ||
display="inline-block" | ||
borderRadius={`${theme.shape.borderRadius / 2}px`} | ||
paddingX={gutters(0.2)} | ||
textAlign="center" | ||
{...BadgeSizes[size]} | ||
{...props} | ||
> | ||
{count} | ||
</Caption> | ||
); | ||
}; | ||
|
||
export default BadgeLabel; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,7 @@ | ||
query PlatformLevelAuthorization { | ||
platform { | ||
id | ||
myRoles | ||
authorization { | ||
...MyPrivileges | ||
} | ||
|
11 changes: 4 additions & 7 deletions
11
src/main/topLevelPages/myDashboard/Campaigns/CampaignBlock.graphql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters