mirror of
https://github.com/Unleash/unleash.git
synced 2025-10-27 11:02:16 +01:00
fix: lint
This commit is contained in:
parent
2ee3a62808
commit
de4d7db2ef
@ -17,7 +17,7 @@ import {
|
||||
} from './Change.styles.tsx';
|
||||
import type { UpdateMilestoneProgressionSchema } from 'openapi';
|
||||
import { MilestoneListRenderer } from './MilestoneListRenderer.tsx';
|
||||
import { applyProgressionChanges } from './applyProgressionChanges';
|
||||
import { applyProgressionChanges } from './applyProgressionChanges.js';
|
||||
import { EventDiff } from 'component/events/EventDiff/EventDiff';
|
||||
|
||||
const StyledTabs = styled(Tabs)(({ theme }) => ({
|
||||
@ -139,15 +139,6 @@ export const ConsolidatedProgressionChanges: FC<{
|
||||
basePlan,
|
||||
);
|
||||
|
||||
const basePlanWithDeletedAutomations: IReleasePlan = {
|
||||
...basePlan,
|
||||
milestones: basePlan.milestones.map((milestone) =>
|
||||
milestonesWithDeletedAutomation.has(milestone.id)
|
||||
? milestone
|
||||
: milestone,
|
||||
),
|
||||
};
|
||||
|
||||
return (
|
||||
<StyledTabs>
|
||||
<ChangeItemWrapper>
|
||||
@ -173,11 +164,7 @@ export const ConsolidatedProgressionChanges: FC<{
|
||||
</ChangeItemWrapper>
|
||||
<TabPanel>
|
||||
<MilestoneListRenderer
|
||||
plan={
|
||||
milestonesWithDeletedAutomation.size > 0
|
||||
? basePlanWithDeletedAutomations
|
||||
: modifiedPlan
|
||||
}
|
||||
plan={modifiedPlan}
|
||||
changeRequestState={changeRequestState}
|
||||
milestonesWithAutomation={milestonesWithAutomation}
|
||||
milestonesWithDeletedAutomation={
|
||||
|
||||
@ -35,6 +35,7 @@ export const MilestoneListRenderer = ({
|
||||
onUpdateAutomation,
|
||||
onDeleteAutomation,
|
||||
}: MilestoneListRendererProps) => {
|
||||
// TODO: Split into read and write model at the type level to avoid having optional handlers
|
||||
const readonly =
|
||||
changeRequestState === 'Applied' || changeRequestState === 'Cancelled';
|
||||
const status: MilestoneStatus = 'not-started';
|
||||
|
||||
@ -338,6 +338,7 @@ export const ReleasePlanChange: FC<{
|
||||
// Only render if this is the first progression change
|
||||
const isFirstProgression =
|
||||
progressionChanges.length > 0 && progressionChanges[0] === change;
|
||||
|
||||
if (!isFirstProgression) {
|
||||
return null; // Skip rendering, will be handled by the first one
|
||||
}
|
||||
|
||||
@ -10,9 +10,9 @@ import { useMilestoneProgressionsApi } from 'hooks/api/actions/useMilestoneProgr
|
||||
import { useChangeRequestsEnabled } from 'hooks/useChangeRequestsEnabled';
|
||||
import useToast from 'hooks/useToast';
|
||||
import { formatUnknownError } from 'utils/formatUnknownError';
|
||||
import { calculateMilestoneStatus } from './milestoneStatusUtils';
|
||||
import { usePendingProgressionChanges } from './usePendingProgressionChanges';
|
||||
import { MilestoneAutomation } from './MilestoneAutomation';
|
||||
import { calculateMilestoneStatus } from './milestoneStatusUtils.js';
|
||||
import { usePendingProgressionChanges } from './usePendingProgressionChanges.js';
|
||||
import { MilestoneAutomation } from './MilestoneAutomation.tsx';
|
||||
|
||||
const StyledConnection = styled('div', {
|
||||
shouldForwardProp: (prop) => prop !== 'isCompleted',
|
||||
@ -171,7 +171,8 @@ export const ReleasePlanMilestoneItem = ({
|
||||
const { pendingProgressionChange, effectiveTransitionCondition } =
|
||||
usePendingProgressionChanges(milestone, getPendingProgressionChange);
|
||||
|
||||
const shouldShowAutomation = isNotLastMilestone && milestoneProgressionsEnabled;
|
||||
const shouldShowAutomation =
|
||||
isNotLastMilestone && milestoneProgressionsEnabled;
|
||||
|
||||
const automationSection = shouldShowAutomation ? (
|
||||
<MilestoneAutomation
|
||||
|
||||
@ -2,7 +2,7 @@ import type { IReleasePlanMilestone } from 'interfaces/releasePlans';
|
||||
import type {
|
||||
IReleasePlanMilestoneItemProps,
|
||||
PendingProgressionChange,
|
||||
} from './ReleasePlanMilestoneItem';
|
||||
} from './ReleasePlanMilestoneItem.jsx';
|
||||
|
||||
interface PendingProgressionChangeResult {
|
||||
pendingProgressionChange: PendingProgressionChange | null;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user