From 61efcd7f4be9c8db35e9bbc04f19cec8ac5c602d Mon Sep 17 00:00:00 2001 From: vivek kasture Date: Sun, 2 Jun 2024 23:17:52 +0530 Subject: [PATCH] Issue #PS-657 fix: Updated week calendar color --- app.config.ts | 3 ++- src/components/WeekCalender.tsx | 3 ++- src/pages/dashboard.tsx | 2 +- src/styles/globals.css | 3 ++- 4 files changed, 7 insertions(+), 4 deletions(-) diff --git a/app.config.ts b/app.config.ts index 43317faf..390f4019 100644 --- a/app.config.ts +++ b/app.config.ts @@ -1 +1,2 @@ -export const lowLearnerAttendanceLimit: number = 33; \ No newline at end of file +export const lowLearnerAttendanceLimit: number = 33; +export const dashboardDaysLimit: number = 30; \ No newline at end of file diff --git a/src/components/WeekCalender.tsx b/src/components/WeekCalender.tsx index 1716637c..dfe9c12b 100644 --- a/src/components/WeekCalender.tsx +++ b/src/components/WeekCalender.tsx @@ -15,6 +15,7 @@ import ArrowDropDownCircleOutlinedIcon from '@mui/icons-material/ArrowDropDownCi import { Box } from '@mui/material'; import useDeterminePathColor from '../hooks/useDeterminePathColor'; import { useEffect, useRef, useState } from 'react'; +import { dashboardDaysLimit } from '../../app.config'; const Calendar: React.FC = ({ showDetailsHandle, data }) => { const [currentMonth, setCurrentMonth] = useState(new Date()); @@ -109,7 +110,7 @@ const Calendar: React.FC = ({ showDetailsHandle, data }) => { let showCircularProgress = false; while (day <= endDate) { - for (let i = 0; i < 30; i++) { + for (let i = 0; i < dashboardDaysLimit; i++) { formattedDate = format(day, dateFormat); const cloneDay = day; let percentage = 0; diff --git a/src/pages/dashboard.tsx b/src/pages/dashboard.tsx index c13fa0b5..2fdfdee3 100644 --- a/src/pages/dashboard.tsx +++ b/src/pages/dashboard.tsx @@ -462,7 +462,7 @@ const Dashboard: React.FC = () => { textAlign={'left'} fontSize={'22px'} m={'1.5rem 1rem 0.8rem'} - color={'#1F1B13'} + color={theme?.palette?.warning['300']} > {t('DASHBOARD.DASHBOARD')} diff --git a/src/styles/globals.css b/src/styles/globals.css index 938a22af..b6873b53 100644 --- a/src/styles/globals.css +++ b/src/styles/globals.css @@ -279,7 +279,8 @@ main { display: block; font-size: 14px; line-height: 1; - font-weight: 700; + font-weight: 400; + color: var(--mui-palette-warning-300); } .calendar .body .disabled {