1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-10-27 11:02:16 +01:00

fix: show badges

This commit is contained in:
FredrikOseberg 2025-10-23 13:01:16 +02:00
parent c5ac1ef81f
commit 0d3e1bf77d
No known key found for this signature in database
GPG Key ID: 282FD8A6D8F9BCF0
3 changed files with 10 additions and 5 deletions

View File

@ -51,9 +51,14 @@ const MilestoneListRendererCore = ({
const hasPendingDelete = milestonesWithDeletedAutomation.has( const hasPendingDelete = milestonesWithDeletedAutomation.has(
milestone.id, milestone.id,
); );
const hasPendingModification = milestonesWithAutomation.has(
milestone.id,
);
const badge = hasPendingDelete ? ( const badge = hasPendingDelete ? (
<Badge color='error'>Deleted in draft</Badge> <Badge color='error'>Deleted in draft</Badge>
) : hasPendingModification ? (
<Badge color='warning'>Modified in draft</Badge>
) : undefined; ) : undefined;
const automationSection = const automationSection =

View File

@ -134,10 +134,10 @@ export const ReleasePlan = ({
); );
if (!featureInChangeRequest) continue; if (!featureInChangeRequest) continue;
// Look for update or delete progression changes // Look for change or delete progression changes
const progressionChange = featureInChangeRequest.changes.find( const progressionChange = featureInChangeRequest.changes.find(
(change: any) => (change: any) =>
(change.action === 'updateMilestoneProgression' && (change.action === 'changeMilestoneProgression' &&
(change.payload.sourceMilestoneId === (change.payload.sourceMilestoneId ===
sourceMilestoneId || sourceMilestoneId ||
change.payload.sourceMilestone === change.payload.sourceMilestone ===

View File

@ -84,14 +84,14 @@ export const MilestoneAutomation = ({
const hasPendingCreate = const hasPendingCreate =
pendingProgressionChange?.action === 'createMilestoneProgression'; pendingProgressionChange?.action === 'createMilestoneProgression';
const hasPendingUpdate = const hasPendingChange =
pendingProgressionChange?.action === 'updateMilestoneProgression'; pendingProgressionChange?.action === 'changeMilestoneProgression';
const hasPendingDelete = const hasPendingDelete =
pendingProgressionChange?.action === 'deleteMilestoneProgression'; pendingProgressionChange?.action === 'deleteMilestoneProgression';
const badge = hasPendingDelete ? ( const badge = hasPendingDelete ? (
<Badge color='error'>Deleted in draft</Badge> <Badge color='error'>Deleted in draft</Badge>
) : hasPendingUpdate ? ( ) : hasPendingChange ? (
<Badge color='warning'>Modified in draft</Badge> <Badge color='warning'>Modified in draft</Badge>
) : undefined; ) : undefined;