1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-02-23 00:22:19 +01:00

feat: copy strategy to current environment (#7730)

This commit is contained in:
Mateusz Kwasniewski 2024-08-02 09:46:57 +02:00 committed by GitHub
parent e0f7146402
commit 5cd657065f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -120,7 +120,7 @@ export const CopyStrategyIconMenu: VFC<ICopyStrategyIconMenuProps> = ({
} }
/> />
<Tooltip <Tooltip
title={`Copy to another environment${ title={`Copy to environment${
enabled ? '' : ' (Access denied)' enabled ? '' : ' (Access denied)'
}`} }`}
> >
@ -150,7 +150,7 @@ export const CopyStrategyIconMenu: VFC<ICopyStrategyIconMenuProps> = ({
'aria-labelledby': `copy-strategy-icon-menu-${strategy.id}`, 'aria-labelledby': `copy-strategy-icon-menu-${strategy.id}`,
}} }}
> >
{environments.map((environment) => { {[...environments, environmentId].map((environment) => {
const access = checkAccess( const access = checkAccess(
CREATE_FEATURE_STRATEGY, CREATE_FEATURE_STRATEGY,
environment, environment,
@ -179,7 +179,9 @@ export const CopyStrategyIconMenu: VFC<ICopyStrategyIconMenuProps> = ({
} }
/> />
<ListItemText> <ListItemText>
Copy to {environment} {environment === environmentId
? 'Duplicate in current'
: `Copy to ${environment}`}
</ListItemText> </ListItemText>
</MenuItem> </MenuItem>
</div> </div>