diff --git a/public/assets/css/core-extend.css b/public/assets/css/core-extend.css index 5b328e9b..e8854007 100644 --- a/public/assets/css/core-extend.css +++ b/public/assets/css/core-extend.css @@ -94,3 +94,36 @@ .h-screen{ height: 100vh; } .h-min { height: min-content; } .h-max { height: max-content; } + + +/* ------------------------Text------------------------- */ +@media (min-width: 576px) { + .fs-sm-1 { font-size: calc(1.3rem + 1.6vw) !important; } + .fs-sm-2 { font-size: calc(1.2rem + 1.2vw) !important; } + .fs-sm-3 { font-size: calc(1.1rem + 0.8vw) !important; } + .fs-sm-4 { font-size: calc(1rem + 0.5vw) !important; } + .fs-sm-5 { font-size: 1.05rem !important; } + .fs-sm-6 { font-size: 0.9rem !important; } + + .fs-sm-tiny { font-size: 72% !important; } + .fs-sm-big { font-size: 115% !important; } + .fs-sm-large { font-size: 155% !important; } + .fs-sm-xlarge { font-size: 175% !important; } + .fs-sm-xxlarge { font-size: calc(1.6rem + 3.5vw) !important; } +} + +/* 💻 Medium devices (≥768px) */ +@media (min-width: 768px) { + .fs-md-1 { font-size: calc(1.4125rem + 1.95vw) !important; } + .fs-md-2 { font-size: calc(1.3625rem + 1.35vw) !important; } + .fs-md-3 { font-size: calc(1.3rem + 0.6vw) !important; } + .fs-md-4 { font-size: calc(1.275rem + 0.3vw) !important; } + .fs-md-5 { font-size: 1.125rem !important; } + .fs-md-6 { font-size: 0.9375rem !important; } + + .fs-md-tiny { font-size: 70% !important; } + .fs-md-big { font-size: 112% !important; } + .fs-md-large { font-size: 150% !important; } + .fs-md-xlarge { font-size: 170% !important; } + .fs-md-xxlarge { font-size: calc(1.725rem + 5.7vw) !important; } +} \ No newline at end of file diff --git a/src/components/Dashboard/AttendanceOverview.jsx b/src/components/Dashboard/AttendanceOverview.jsx index 06b5220b..522aa193 100644 --- a/src/components/Dashboard/AttendanceOverview.jsx +++ b/src/components/Dashboard/AttendanceOverview.jsx @@ -7,17 +7,17 @@ import ChartSkeleton from "../Charts/Skelton"; import { useSelectedProject } from "../../slices/apiDataManager"; import { formatDate_DayMonth } from "../../utils/dateUtils"; - - const AttendanceOverview = () => { const [dayRange, setDayRange] = useState(7); const [view, setView] = useState("chart"); const selectedProject = useSelectedProject(); - const { data: attendanceOverviewData, isLoading, isError, error } = useAttendanceOverviewData( - selectedProject, - dayRange - ); + const { + data: attendanceOverviewData, + isLoading, + isError, + error, + } = useAttendanceOverviewData(selectedProject, dayRange); // Use empty array while loading const attendanceData = attendanceOverviewData || []; @@ -55,73 +55,129 @@ const AttendanceOverview = () => { })); const chartOptions = { - chart: { type: "bar", stacked: true, height: 400, toolbar: { show: false } }, + chart: { + type: "bar", + stacked: true, + height: 400, + toolbar: { show: false }, + }, plotOptions: { bar: { borderRadius: 2, columnWidth: "60%" } }, xaxis: { categories: tableData.map((row) => row.date) }, - yaxis: { show: true, axisBorder: { show: true, color: "#78909C" }, axisTicks: { show: true, color: "#78909C", width: 6 } }, + yaxis: { + show: true, + axisBorder: { show: true, color: "#78909C" }, + axisTicks: { show: true, color: "#78909C", width: 6 }, + }, legend: { position: "bottom" }, fill: { opacity: 1 }, colors: roles.map((_, i) => flatColors[i % flatColors.length]), }; return ( -
Attendance Overview
++ Role-wise present count +
Role-wise present count
-| Role | +Role | {dates.map((date, idx) => ( -{date} | ++ {date} + | ))}
|---|---|---|---|
| {role} | +{role} | {tableData.map((row, idx) => { const value = row[role]; - return0 ? { backgroundColor: "#d5d5d5" } : {}}>{value} | ; + return ( +0 ? { backgroundColor: "#e9ecef" } : {} + } + > + {value} + | + ); })}