diff --git a/src/components/Activities/AttendLogs.jsx b/src/components/Activities/AttendLogs.jsx index f302cf11..2000f7eb 100644 --- a/src/components/Activities/AttendLogs.jsx +++ b/src/components/Activities/AttendLogs.jsx @@ -5,7 +5,8 @@ import { convertShortTime } from '../../utils/dateUtils'; const AttendLogs = ({ Id }) => { - const {logs,loading} = useEmployeeAttendacesLog(Id) + const {logs, loading} = useEmployeeAttendacesLog( Id ) + return (
{loading &&

Loading..

} @@ -26,20 +27,19 @@ const AttendLogs = ({ Id }) => { - {logs?.length > 0 ? ( - logs?.map((log, index) => ( - - {convertShortTime(log.activityTime)} - {log.activityTime.slice(0,10)} - {log?.comment} - - )) - ) : ( - - No Data Available - - )} - + {logs + .slice() + .sort((a, b) => new Date(b.activityTime) - new Date(a.activityTime)) + .map((log, index) => ( + + {convertShortTime(log.activityTime)} + {log.activityTime.slice(0, 10)} + + {log?.comment} + + + ))} + ) diff --git a/src/components/Dashboard/Dashboard.tsx b/src/components/Dashboard/Dashboard.tsx index 31795a1b..201fcce8 100644 --- a/src/components/Dashboard/Dashboard.tsx +++ b/src/components/Dashboard/Dashboard.tsx @@ -1,5 +1,7 @@ +import { useProfile } from "../../hooks/useProfile"; const Dashboard = () => { + const {profile,loading} = useProfile() return ( <> @@ -11,7 +13,7 @@ const Dashboard = () => {
-
Congratulations Ramchandra! 🎉
+
Congratulations {profile?.employeeInfo?.firstName }! 🎉

You have done 72% more sales today. Check your new badge in your profile. diff --git a/src/pages/Activities/AttendancePage.jsx b/src/pages/Activities/AttendancePage.jsx index 132e7139..1dcade10 100644 --- a/src/pages/Activities/AttendancePage.jsx +++ b/src/pages/Activities/AttendancePage.jsx @@ -188,7 +188,7 @@ const AttendancePage = () => {(!projectLoading && !attendances) && Not Found} { (projects && projects.length > 0 ) && ( <> -