fix: typescript upgrade build errors

This commit is contained in:
sriram veeraghanta 2024-09-10 21:31:32 +05:30
parent 99ab274216
commit 71f3c5c12a
5 changed files with 794 additions and 904 deletions

View file

@ -49,7 +49,7 @@ export const AutoCloseAutomation: React.FC<Props> = observer((props) => {
const defaultState = projectStates?.find((s) => s.group === "cancelled")?.id || null;
const selectedOption = projectStates?.find((s) => s.id === currentProjectDetails?.default_state ?? defaultState);
const selectedOption = projectStates?.find((s) => s.id === (currentProjectDetails?.default_state ?? defaultState));
const currentDefaultState = projectStates?.find((s) => s.id === defaultState);
const initialValues: Partial<IProject> = {

View file

@ -83,7 +83,7 @@ export const CycleLayoutRoot: React.FC = observer(() => {
<TransferIssues
handleClick={() => setTransferIssuesModal(true)}
canTransferIssues={canTransferIssues}
disabled={!isEmpty(cycleDetails?.progress_snapshot) ?? false}
disabled={!isEmpty(cycleDetails?.progress_snapshot)}
/>
)}
<CycleAppliedFiltersRoot />

View file

@ -50,7 +50,7 @@ export const convertResponseToBarGraphData = (
? renderMonthAndYear(item.dimension)
: params.x_axis === "priority" || params.x_axis === "state__group"
? capitalizeFirstLetter(item.dimension ?? "None")
: item.dimension ?? "None",
: (item.dimension ?? "None"),
[yAxisKey]: item[yAxisKey] ?? 0,
});
}
@ -137,7 +137,7 @@ export const renderMonthAndYear = (date: string | number | null): string => {
const monthNumber = parseInt(`${date}`.split("-")[1], 10);
const year = `${date}`.split("-")[0];
return (MONTHS_LIST[monthNumber]?.shortTitle ?? "None") + ` ${year}` ?? "";
return (MONTHS_LIST[monthNumber]?.shortTitle || "None") + ` ${year ? year : ""}`;
};
export const MAX_CHART_LABEL_LENGTH = 15;

2
web/next-env.d.ts vendored
View file

@ -2,4 +2,4 @@
/// <reference types="next/image-types/global" />
// NOTE: This file should not be edited
// see https://nextjs.org/docs/basic-features/typescript for more information.
// see https://nextjs.org/docs/app/building-your-application/configuring/typescript for more information.

1688
yarn.lock

File diff suppressed because it is too large Load diff