mirror of
https://github.com/Unleash/unleash.git
synced 2025-11-24 20:06:55 +01:00
feat: delete some comments
This commit is contained in:
parent
d250fc058f
commit
8f023696d9
@ -69,7 +69,6 @@ export const determineColor = (
|
|||||||
changeRequestStateIndex: number,
|
changeRequestStateIndex: number,
|
||||||
displayStage: ChangeRequestState,
|
displayStage: ChangeRequestState,
|
||||||
displayStageIndex: number,
|
displayStageIndex: number,
|
||||||
failureReason?: string,
|
|
||||||
) => {
|
) => {
|
||||||
if (changeRequestState === 'Cancelled') return 'grey';
|
if (changeRequestState === 'Cancelled') return 'grey';
|
||||||
|
|
||||||
@ -117,34 +116,15 @@ export const ChangeRequestTimeline: FC<ISuggestChangeTimelineProps> = ({
|
|||||||
<StyledBox>
|
<StyledBox>
|
||||||
<StyledTimeline>
|
<StyledTimeline>
|
||||||
{data.map((title, index) => {
|
{data.map((title, index) => {
|
||||||
console.log('title and state ++', title, state);
|
|
||||||
if (schedule && title === 'Scheduled') {
|
if (schedule && title === 'Scheduled') {
|
||||||
console.log('Title for scheduled is', title, state);
|
return createTimelineScheduleItem(schedule);
|
||||||
|
|
||||||
return createTimelineScheduleItem(
|
|
||||||
schedule,
|
|
||||||
// color,
|
|
||||||
// title,
|
|
||||||
// index < data.length - 1,
|
|
||||||
// timelineDotProps,
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// const subtitle =
|
|
||||||
// scheduledAt &&
|
|
||||||
// state === 'Scheduled' &&
|
|
||||||
// state === title
|
|
||||||
// ? formatDateYMDHMS(
|
|
||||||
// new Date(scheduledAt),
|
|
||||||
// locationSettings?.locale,
|
|
||||||
// )
|
|
||||||
// : undefined;
|
|
||||||
const color = determineColor(
|
const color = determineColor(
|
||||||
state,
|
state,
|
||||||
activeIndex,
|
activeIndex,
|
||||||
title,
|
title,
|
||||||
index,
|
index,
|
||||||
// failureReason,
|
|
||||||
);
|
);
|
||||||
let timelineDotProps = {};
|
let timelineDotProps = {};
|
||||||
|
|
||||||
@ -169,15 +149,7 @@ export const ChangeRequestTimeline: FC<ISuggestChangeTimelineProps> = ({
|
|||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
const createTimelineScheduleItem = (
|
const createTimelineScheduleItem = (schedule: ChangeRequestSchedule) => {
|
||||||
schedule: ChangeRequestSchedule,
|
|
||||||
// color: 'primary' | 'success' | 'grey' | 'error' | 'warning',
|
|
||||||
// title: string,
|
|
||||||
// subtitle: string | undefined,
|
|
||||||
// failureReason: string | undefined,
|
|
||||||
// shouldConnectToNextItem: boolean,
|
|
||||||
// timelineDotProps: { [key: string]: string | undefined } = {},
|
|
||||||
) => {
|
|
||||||
const { locationSettings } = useLocationSettings();
|
const { locationSettings } = useLocationSettings();
|
||||||
|
|
||||||
const time = formatDateYMDHMS(
|
const time = formatDateYMDHMS(
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user