diff --git a/apps/web/app/[locale]/timesheet/[memberId]/components/CalendarView.tsx b/apps/web/app/[locale]/timesheet/[memberId]/components/CalendarView.tsx
index 724bb0e9c..ca6cd2900 100644
--- a/apps/web/app/[locale]/timesheet/[memberId]/components/CalendarView.tsx
+++ b/apps/web/app/[locale]/timesheet/[memberId]/components/CalendarView.tsx
@@ -1,7 +1,143 @@
+import { GroupedTimesheet, useTimesheet } from "@/app/hooks/features/useTimesheet";
+import { clsxm } from "@/app/utils";
+import { statusColor } from "@/lib/components";
+import { DisplayTimeForTimesheet, TaskNameInfoDisplay, TotalDurationByDate, TotalTimeDisplay } from "@/lib/features";
+import { AccordionContent, AccordionItem, AccordionTrigger } from "@components/ui/accordion";
+import { Accordion } from "@radix-ui/react-accordion";
+import { TranslationHooks, useTranslations } from "next-intl";
+import React from "react";
+import { EmployeeAvatar } from "./CompactTimesheetComponent";
+import { formatDate } from "@/app/helpers";
+import { ClockIcon } from "lucide-react";
-export function CalendarView() {
+export function CalendarView({ data }: { data?: GroupedTimesheet[] }) {
+ const t = useTranslations();
return (
-
+
+ {data ? (
+ data.length > 0 ? (
+
+ ) : (
+
+
{t('pages.timesheet.NO_ENTRIES_FOUND')}
+
+ )
+ ) : (
+
+
{t('pages.timesheet.LOADING')}
+
+ )}
+
+ );
+}
+
+const CalendarDataView = ({ data, t }: { data?: GroupedTimesheet[], t: TranslationHooks }) => {
+ const { getStatusTimesheet } = useTimesheet({});
+
+ return (
+
+
+ {data?.map((plan, index) => {
+ return
+
+
+ {formatDate(plan.date)}
+
+
+ Total{" : "}
+
+
+
+
+
+ {Object.entries(getStatusTimesheet(plan.tasks)).map(([status, rows]) => (
+ rows.length > 0 && status &&
+
+
+
+
+
+
+ {status === 'DENIED' ? 'REJECTED' : status}
+
+ ({rows.length})
+
+
+
+
+
+
+
+
+
+ {rows.map((task) => (
+
+
+
+
+ {task.employee.fullName}
+
+
+
+
+
+ {task.project && task.project.name}
+
+
+ ))}
+
+
+ ))}
+
+
+ }
+ )}
+
)
diff --git a/apps/web/app/[locale]/timesheet/[memberId]/components/CompactTimesheetComponent.tsx b/apps/web/app/[locale]/timesheet/[memberId]/components/CompactTimesheetComponent.tsx
new file mode 100644
index 000000000..03f80d818
--- /dev/null
+++ b/apps/web/app/[locale]/timesheet/[memberId]/components/CompactTimesheetComponent.tsx
@@ -0,0 +1,46 @@
+import React from "react";
+
+export const EmployeeAvatar = ({ imageUrl }: { imageUrl: string }) => {
+ const [isLoading, setIsLoading] = React.useState(true);
+
+ return (
+
+ {isLoading && (
+
+
+
+ )}
+
setIsLoading(false)}
+ onError={() => setIsLoading(false)}
+ />
+
+ );
+};
+
+
+const LoadingSpinner = ({ className }: { className?: string }) => (
+
+);
diff --git a/apps/web/app/[locale]/timesheet/[memberId]/components/index.tsx b/apps/web/app/[locale]/timesheet/[memberId]/components/index.tsx
index 06948073c..35543a172 100644
--- a/apps/web/app/[locale]/timesheet/[memberId]/components/index.tsx
+++ b/apps/web/app/[locale]/timesheet/[memberId]/components/index.tsx
@@ -5,8 +5,10 @@ export * from './TimesheetFilter';
export * from './FrequencySelect';
export * from './FilterWithStatus';
export * from './TimesheetFilterDate';
-export * from './TimeSheetFilterPopover'
+export * from './TimeSheetFilterPopover';
export * from './TimesheetAction';
export * from './RejectSelectedModal';
export * from './EditTaskModal';
-export * from './TimesheetLoader'
+export * from './CompactTimesheetComponent';
+export * from './TimesheetLoader';
+
diff --git a/apps/web/app/[locale]/timesheet/[memberId]/page.tsx b/apps/web/app/[locale]/timesheet/[memberId]/page.tsx
index 863759acc..a90e0378a 100644
--- a/apps/web/app/[locale]/timesheet/[memberId]/page.tsx
+++ b/apps/web/app/[locale]/timesheet/[memberId]/page.tsx
@@ -198,7 +198,7 @@ const TimeSheet = React.memo(function TimeSheetPage({ params }: { params: { memb
) : (
-
+
)}
diff --git a/apps/web/lib/components/types.ts b/apps/web/lib/components/types.ts
index 30c0412ef..a5a822801 100644
--- a/apps/web/lib/components/types.ts
+++ b/apps/web/lib/components/types.ts
@@ -1,6 +1,7 @@
export type IVariant = 'primary' | 'outline' | 'ghost' | 'light' | 'dark';
type StatusColorScheme = {
bg: string;
+ border: string,
text: string;
bgOpacity: string;
};
@@ -8,31 +9,37 @@ type StatusColorScheme = {
const STATUS_COLORS: Record