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 {
 | 
			
		||||
    milestone: IReleasePlanMilestone;
 | 
			
		||||
    status: MilestoneStatus;
 | 
			
		||||
@ -82,8 +76,6 @@ export const MilestoneAutomation = ({
 | 
			
		||||
        return null;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    const hasPendingCreate =
 | 
			
		||||
        pendingProgressionChange?.action === 'createMilestoneProgression';
 | 
			
		||||
    const hasPendingChange =
 | 
			
		||||
        pendingProgressionChange?.action === 'changeMilestoneProgression';
 | 
			
		||||
    const hasPendingDelete =
 | 
			
		||||
@ -117,7 +109,6 @@ export const MilestoneAutomation = ({
 | 
			
		||||
                    badge={badge}
 | 
			
		||||
                />
 | 
			
		||||
            ) : (
 | 
			
		||||
                <StyledAddAutomationContainer>
 | 
			
		||||
                <StyledAddAutomationButton
 | 
			
		||||
                    onClick={onOpenProgressionForm}
 | 
			
		||||
                    color='primary'
 | 
			
		||||
@ -125,10 +116,6 @@ export const MilestoneAutomation = ({
 | 
			
		||||
                >
 | 
			
		||||
                    Add automation
 | 
			
		||||
                </StyledAddAutomationButton>
 | 
			
		||||
                    {hasPendingCreate && (
 | 
			
		||||
                        <Badge color='warning'>Modified in draft</Badge>
 | 
			
		||||
                    )}
 | 
			
		||||
                </StyledAddAutomationContainer>
 | 
			
		||||
            )}
 | 
			
		||||
        </MilestoneAutomationSection>
 | 
			
		||||
    );
 | 
			
		||||
 | 
			
		||||
@ -97,7 +97,8 @@ export const ReleasePlanMilestoneItem = ({
 | 
			
		||||
                    sourceMilestone: milestone.id,
 | 
			
		||||
                },
 | 
			
		||||
            });
 | 
			
		||||
            return { shouldReset: true };
 | 
			
		||||
            handleCloseProgressionForm();
 | 
			
		||||
            return {};
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        try {
 | 
			
		||||
 | 
			
		||||
@ -15,10 +15,10 @@ export const getPendingProgressionData = (
 | 
			
		||||
): PendingProgressionChangeResult => {
 | 
			
		||||
    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;
 | 
			
		||||
    if (
 | 
			
		||||
        pendingProgressionChange?.action === 'createMilestoneProgression' &&
 | 
			
		||||
        pendingProgressionChange?.action === 'changeMilestoneProgression' &&
 | 
			
		||||
        'transitionCondition' in pendingProgressionChange.payload &&
 | 
			
		||||
        pendingProgressionChange.payload.transitionCondition
 | 
			
		||||
    ) {
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user