diff --git a/apps/app/components/ui/empty-state.tsx b/apps/app/components/ui/empty-state.tsx index c0fec4ee5..4e469d967 100644 --- a/apps/app/components/ui/empty-state.tsx +++ b/apps/app/components/ui/empty-state.tsx @@ -9,7 +9,7 @@ import { PlusIcon } from "@heroicons/react/24/outline"; import { capitalizeFirstLetter } from "helpers/string.helper"; type Props = { - type: "cycle" | "module" | "project" | "issue" | "view" | "page"; + type: "cycle" | "module" | "project" | "issue" | "view" | "page" | "estimate"; title: string; description: React.ReactNode | string; imgURL: string; @@ -30,7 +30,7 @@ export const EmptyState: React.FC = ({ type, title, description, imgURL, case "view": return "V"; case "page": - return "D" + return "D"; default: return null; } @@ -41,11 +41,11 @@ export const EmptyState: React.FC = ({ type, title, description, imgURL, {type} -

{title}

+

{title}

{shortcutKey(type) && ( Use shortcut{" "} - + {shortcutKey(type)} {" "} to create {type} from anywhere. diff --git a/apps/app/pages/[workspaceSlug]/projects/[projectId]/settings/estimates.tsx b/apps/app/pages/[workspaceSlug]/projects/[projectId]/settings/estimates.tsx index 4ea47423f..679392f41 100644 --- a/apps/app/pages/[workspaceSlug]/projects/[projectId]/settings/estimates.tsx +++ b/apps/app/pages/[workspaceSlug]/projects/[projectId]/settings/estimates.tsx @@ -16,10 +16,12 @@ import { CreateUpdateEstimateModal, SingleEstimate } from "components/estimates" //hooks import useToast from "hooks/use-toast"; // ui -import { Loader, SecondaryButton } from "components/ui"; +import { EmptyState, Loader, SecondaryButton } from "components/ui"; import { BreadcrumbItem, Breadcrumbs } from "components/breadcrumbs"; // icons import { PlusIcon } from "@heroicons/react/24/outline"; +// images +import emptyEstimate from "public/empty-state/empty-estimate.svg"; // types import { IEstimate, IProject } from "types"; import type { NextPage } from "next"; @@ -135,28 +137,39 @@ const EstimatesSettings: NextPage = () => { - {estimatesList && estimatesList.length > 0 && ( -
- <> - {estimatesList ? ( - estimatesList.map((estimate) => ( - editEstimate(estimate)} - handleEstimateDelete={(estimateId) => removeEstimate(estimateId)} - /> - )) - ) : ( - - - - - - - )} - -
+ {estimatesList ? ( + estimatesList.length > 0 ? ( +
+ {estimatesList.map((estimate) => ( + editEstimate(estimate)} + handleEstimateDelete={(estimateId) => removeEstimate(estimateId)} + /> + ))} +
+ ) : ( +
+ { + setEstimateToUpdate(undefined); + setEstimateFormOpen(true); + }} + /> +
+ ) + ) : ( + + + + + + )} diff --git a/apps/app/public/empty-state/empty-estimate.svg b/apps/app/public/empty-state/empty-estimate.svg new file mode 100644 index 000000000..eb2926ad9 --- /dev/null +++ b/apps/app/public/empty-state/empty-estimate.svg @@ -0,0 +1,49 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +