mirror of
https://github.com/Unleash/unleash.git
synced 2025-05-26 01:17:00 +02:00
chore: make remove release plan warning conditional on env. enabled (#9103)
This commit is contained in:
parent
c98d0e71a3
commit
d20af9e5de
@ -185,6 +185,7 @@ export const ReleasePlan = ({
|
|||||||
open={removeOpen}
|
open={removeOpen}
|
||||||
setOpen={setRemoveOpen}
|
setOpen={setRemoveOpen}
|
||||||
onConfirm={onRemoveConfirm}
|
onConfirm={onRemoveConfirm}
|
||||||
|
environmentActive={!environmentIsDisabled}
|
||||||
/>
|
/>
|
||||||
</StyledContainer>
|
</StyledContainer>
|
||||||
);
|
);
|
||||||
|
@ -8,6 +8,7 @@ interface IReleasePlanRemoveDialogProps {
|
|||||||
open: boolean;
|
open: boolean;
|
||||||
setOpen: React.Dispatch<React.SetStateAction<boolean>>;
|
setOpen: React.Dispatch<React.SetStateAction<boolean>>;
|
||||||
onConfirm: () => void;
|
onConfirm: () => void;
|
||||||
|
environmentActive: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
export const ReleasePlanRemoveDialog = ({
|
export const ReleasePlanRemoveDialog = ({
|
||||||
@ -15,6 +16,7 @@ export const ReleasePlanRemoveDialog = ({
|
|||||||
open,
|
open,
|
||||||
setOpen,
|
setOpen,
|
||||||
onConfirm,
|
onConfirm,
|
||||||
|
environmentActive,
|
||||||
}: IReleasePlanRemoveDialogProps) => (
|
}: IReleasePlanRemoveDialogProps) => (
|
||||||
<Dialogue
|
<Dialogue
|
||||||
title='Remove release plan?'
|
title='Remove release plan?'
|
||||||
@ -25,7 +27,7 @@ export const ReleasePlanRemoveDialog = ({
|
|||||||
onClose={() => setOpen(false)}
|
onClose={() => setOpen(false)}
|
||||||
>
|
>
|
||||||
<ConditionallyRender
|
<ConditionallyRender
|
||||||
condition={Boolean(plan.activeMilestoneId)}
|
condition={Boolean(plan.activeMilestoneId) && environmentActive}
|
||||||
show={
|
show={
|
||||||
<Alert severity='error' sx={{ mb: 2 }}>
|
<Alert severity='error' sx={{ mb: 2 }}>
|
||||||
This release plan currently has one active milestone.
|
This release plan currently has one active milestone.
|
||||||
|
Loading…
Reference in New Issue
Block a user