1
0
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:
David Leek 2025-01-15 15:29:49 +01:00 committed by GitHub
parent c98d0e71a3
commit d20af9e5de
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 4 additions and 1 deletions

View File

@ -185,6 +185,7 @@ export const ReleasePlan = ({
open={removeOpen} open={removeOpen}
setOpen={setRemoveOpen} setOpen={setRemoveOpen}
onConfirm={onRemoveConfirm} onConfirm={onRemoveConfirm}
environmentActive={!environmentIsDisabled}
/> />
</StyledContainer> </StyledContainer>
); );

View File

@ -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.