diff --git a/apps/web/lib/features/task/activity/user-task-activity.tsx b/apps/web/lib/features/task/activity/user-task-activity.tsx index 97cf47f23..f572b9a01 100644 --- a/apps/web/lib/features/task/activity/user-task-activity.tsx +++ b/apps/web/lib/features/task/activity/user-task-activity.tsx @@ -1,44 +1,101 @@ +import React from 'react'; import { clsxm } from '@app/utils'; import { Tab } from '@headlessui/react'; import { ActivityFilters } from '@app/constants'; +import { ITaskTimesheet } from '@app/interfaces'; +import { ChevronDownIcon, ChevronUpIcon } from 'lib/components/svgs'; +import { Tooltip } from 'lib/components'; +import ScreenshotItem from 'lib/features/activity/components/screenshot-item'; -export const UserTaskActivity = () => { - // get slots related to Task Id - // get apps visited related to Task Id - // get visited Sites related to Task Id +export const UserTaskActivity = ({ timesheet }: { timesheet: ITaskTimesheet }) => { + const [hidden, setHidden] = React.useState(true); + // TODO: fetch Apps et Sites Visited return (
-
-

{'Cedric medium'}

- {'05:30'} +
+
+

{timesheet.employee?.fullName}

+ {timesheet.duration} +
+ +
+ +
+
+ - - - {Object.values(ActivityFilters) - .filter((filter) => filter !== 'Tasks') - .map((filter: string) => ( - - clsxm( - 'w-full rounded-lg py-2.5 text-sm font-medium leading-5', - ' focus:outline-none focus:ring-2', - selected - ? 'bg-white dark:bg-dark text-blue-700 shadow' - : ' hover:bg-white/[0.50]' - ) - } - > - {filter} - - ))} - - - {'Screenshoot Team Tab'} - {'Apps Tab'} - {'VisitedSites Tab'} - -
); }; diff --git a/apps/web/lib/features/task/task-activity.tsx b/apps/web/lib/features/task/task-activity.tsx index a325be303..31be7b103 100644 --- a/apps/web/lib/features/task/task-activity.tsx +++ b/apps/web/lib/features/task/task-activity.tsx @@ -7,12 +7,15 @@ import { ITeamTask } from '@app/interfaces'; import { useTaskTimeSheets } from '@app/hooks/features/useTaskActivity'; import { groupByTime } from '@app/helpers/array-data'; +import { clsxm } from '@app/utils'; +import { ChevronDownIcon, ChevronUpIcon } from 'lib/components/svgs'; + export function TaskActivity({ task }: { task: ITeamTask }) { - // get users tasks const { getTaskTimesheets, taskTimesheets } = useTaskTimeSheets(task?.id); + const [hidden, setHidden] = React.useState(true); + // order activity arr by Time const groupedData = groupByTime(taskTimesheets); - console.log(groupedData); React.useEffect(() => { getTaskTimesheets(); @@ -22,33 +25,34 @@ export function TaskActivity({ task }: { task: ITeamTask }) { className="w-full p-4 md:px-4 dark:bg-[#25272D] flex flex-col gap-6 border border-[#00000014] dark:border-[#26272C]" shadow="bigger" > - {/* TO DELETE: start */} -
-

{'05.01.2024'}

- - -
- {/* TO DELETE: end */} - {groupedData.map((timesheet, i) => ( -
-

{timesheet.date}

- {timesheet.items.map((item) => ( - - ))} +
+
+

{'Timesheet'}

- ))} - {/* TO DELETE: start */} -
-

{'03.01.2024'}

- - - +
+ +
+
+ - {/* TO DELETE: end */} ); } diff --git a/apps/web/lib/settings/JitsuRoot.tsx b/apps/web/lib/settings/JitsuRoot.tsx index de7f8e5c5..006c8b026 100644 --- a/apps/web/lib/settings/JitsuRoot.tsx +++ b/apps/web/lib/settings/JitsuRoot.tsx @@ -27,7 +27,6 @@ export function JitsuRoot({ pageProps, children }: MyAppProps) { const isJitsuEnvs: boolean = jitsuConf.host !== '' && jitsuConf.writeKey !== ''; console.log(`Jitsu Enabled: ${isJitsuEnvs}`); console.log(`Jitsu Configuration: ${JSON.stringify(jitsuConf)}`); - console.log(`Jitsu: ${pageProps}`); return (