diff --git a/apps/app/components/icons/index.ts b/apps/app/components/icons/index.ts index 9478f5fca..f55cf763b 100644 --- a/apps/app/components/icons/index.ts +++ b/apps/app/components/icons/index.ts @@ -43,6 +43,7 @@ export * from "./user-icon"; export * from "./grid-view-icons"; export * from "./assignment-clipboard-icon"; export * from "./tick-mark-icon"; +export * from "./target-icon" export * from "./contrast-icon"; export * from "./people-group-icon"; export * from "./cmd-icon"; diff --git a/apps/app/components/icons/target-icon.tsx b/apps/app/components/icons/target-icon.tsx new file mode 100644 index 000000000..c9fbde869 --- /dev/null +++ b/apps/app/components/icons/target-icon.tsx @@ -0,0 +1,20 @@ +import React from "react"; + +import type { Props } from "./types"; + +export const TargetIcon: React.FC = ({ + width = "24", + height = "24", + className, + color = "black", +}) => ( + + + + + + + + + +); \ No newline at end of file diff --git a/apps/app/components/modules/select/select-status.tsx b/apps/app/components/modules/select/select-status.tsx index f0723eb27..7db4aba22 100644 --- a/apps/app/components/modules/select/select-status.tsx +++ b/apps/app/components/modules/select/select-status.tsx @@ -26,7 +26,7 @@ export const ModuleStatusSelect: React.FC = ({ control, error }) => ( value={value} label={
diff --git a/apps/app/components/modules/single-module-card.tsx b/apps/app/components/modules/single-module-card.tsx index 82e59cd41..44da6b8c0 100644 --- a/apps/app/components/modules/single-module-card.tsx +++ b/apps/app/components/modules/single-module-card.tsx @@ -2,7 +2,6 @@ import React, { useState } from "react"; import Link from "next/link"; import { useRouter } from "next/router"; -import Image from "next/image"; import { mutate } from "swr"; @@ -15,16 +14,14 @@ import { DeleteModuleModal } from "components/modules"; // ui import { AssigneesList, Avatar, CustomMenu, Tooltip } from "components/ui"; // icons -import User from "public/user.png"; import { - CalendarDaysIcon, DocumentDuplicateIcon, PencilIcon, StarIcon, TrashIcon, - UserCircleIcon, - UserGroupIcon, } from "@heroicons/react/24/outline"; +import { CalendarMonthIcon, TargetIcon } from "components/icons"; + // helpers import { copyTextToClipboard, truncateText } from "helpers/string.helper"; import { renderShortDateWithYearFormat } from "helpers/date-time.helper"; @@ -121,6 +118,7 @@ export const SingleModuleCard: React.FC = ({ module, handleEditModule }) const endDate = new Date(module.target_date ?? ""); const startDate = new Date(module.start_date ?? ""); + const lastUpdated = new Date(module.updated_at ?? ""); return ( <> @@ -129,14 +127,14 @@ export const SingleModuleCard: React.FC = ({ module, handleEditModule }) setIsOpen={setModuleDeleteModal} data={module} /> -
+
- -

+ +

{truncateText(module.name, 75)}

@@ -144,7 +142,7 @@ export const SingleModuleCard: React.FC = ({ module, handleEditModule })
-
+
{module?.status?.replace("-", " ")}
{module.is_favorite ? ( @@ -181,62 +179,19 @@ export const SingleModuleCard: React.FC = ({ module, handleEditModule })
- + Start: {renderShortDateWithYearFormat(startDate)}
- + End: {renderShortDateWithYearFormat(endDate)}
-
- - Lead: -
- {module.lead_detail ? ( -
- - {module.lead_detail.first_name} -
- ) : ( -
- N/A - N/A -
- )} -
-
-
- - Members: -
- {module.members && module.members.length > 0 ? ( - - ) : ( -
- N/A - N/A -
- )} -
-

-
+
Progress
@@ -249,6 +204,17 @@ export const SingleModuleCard: React.FC = ({ module, handleEditModule })
{isNaN(completionPercentage) ? 0 : completionPercentage.toFixed(0)}%
+
+

+ Last updated: + + {renderShortDateWithYearFormat(lastUpdated)} + +

+
+ +
+