mirror of
https://github.com/Unleash/unleash.git
synced 2025-10-27 11:02:16 +01:00
feat: show draft automation inline in release plans (#10856)
This commit is contained in:
parent
dc745cfac8
commit
0e26f463e9
@ -36,12 +36,6 @@ const StyledAddAutomationButton = styled(Button)(({ theme }) => ({
|
|||||||
},
|
},
|
||||||
}));
|
}));
|
||||||
|
|
||||||
const StyledAddAutomationContainer = styled('div')(({ theme }) => ({
|
|
||||||
display: 'flex',
|
|
||||||
alignItems: 'center',
|
|
||||||
gap: theme.spacing(1),
|
|
||||||
}));
|
|
||||||
|
|
||||||
interface MilestoneAutomationProps {
|
interface MilestoneAutomationProps {
|
||||||
milestone: IReleasePlanMilestone;
|
milestone: IReleasePlanMilestone;
|
||||||
status: MilestoneStatus;
|
status: MilestoneStatus;
|
||||||
@ -82,8 +76,6 @@ export const MilestoneAutomation = ({
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
const hasPendingCreate =
|
|
||||||
pendingProgressionChange?.action === 'createMilestoneProgression';
|
|
||||||
const hasPendingChange =
|
const hasPendingChange =
|
||||||
pendingProgressionChange?.action === 'changeMilestoneProgression';
|
pendingProgressionChange?.action === 'changeMilestoneProgression';
|
||||||
const hasPendingDelete =
|
const hasPendingDelete =
|
||||||
@ -117,7 +109,6 @@ export const MilestoneAutomation = ({
|
|||||||
badge={badge}
|
badge={badge}
|
||||||
/>
|
/>
|
||||||
) : (
|
) : (
|
||||||
<StyledAddAutomationContainer>
|
|
||||||
<StyledAddAutomationButton
|
<StyledAddAutomationButton
|
||||||
onClick={onOpenProgressionForm}
|
onClick={onOpenProgressionForm}
|
||||||
color='primary'
|
color='primary'
|
||||||
@ -125,10 +116,6 @@ export const MilestoneAutomation = ({
|
|||||||
>
|
>
|
||||||
Add automation
|
Add automation
|
||||||
</StyledAddAutomationButton>
|
</StyledAddAutomationButton>
|
||||||
{hasPendingCreate && (
|
|
||||||
<Badge color='warning'>Modified in draft</Badge>
|
|
||||||
)}
|
|
||||||
</StyledAddAutomationContainer>
|
|
||||||
)}
|
)}
|
||||||
</MilestoneAutomationSection>
|
</MilestoneAutomationSection>
|
||||||
);
|
);
|
||||||
|
|||||||
@ -97,7 +97,8 @@ export const ReleasePlanMilestoneItem = ({
|
|||||||
sourceMilestone: milestone.id,
|
sourceMilestone: milestone.id,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
return { shouldReset: true };
|
handleCloseProgressionForm();
|
||||||
|
return {};
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
|||||||
@ -15,10 +15,10 @@ export const getPendingProgressionData = (
|
|||||||
): PendingProgressionChangeResult => {
|
): PendingProgressionChangeResult => {
|
||||||
const pendingProgressionChange = getPendingProgressionChange(milestone.id);
|
const pendingProgressionChange = getPendingProgressionChange(milestone.id);
|
||||||
|
|
||||||
// Determine effective transition condition (use pending create if exists)
|
// Determine effective transition condition (use pending change if exists)
|
||||||
let effectiveTransitionCondition = milestone.transitionCondition;
|
let effectiveTransitionCondition = milestone.transitionCondition;
|
||||||
if (
|
if (
|
||||||
pendingProgressionChange?.action === 'createMilestoneProgression' &&
|
pendingProgressionChange?.action === 'changeMilestoneProgression' &&
|
||||||
'transitionCondition' in pendingProgressionChange.payload &&
|
'transitionCondition' in pendingProgressionChange.payload &&
|
||||||
pendingProgressionChange.payload.transitionCondition
|
pendingProgressionChange.payload.transitionCondition
|
||||||
) {
|
) {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user