Skip to content

Commit

Permalink
Issue #PS-657 fix: Updated week calendar color
Browse files Browse the repository at this point in the history
  • Loading branch information
itsvick committed Jun 2, 2024
1 parent fcbba36 commit 61efcd7
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 4 deletions.
3 changes: 2 additions & 1 deletion app.config.ts
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
export const lowLearnerAttendanceLimit: number = 33;
export const lowLearnerAttendanceLimit: number = 33;
export const dashboardDaysLimit: number = 30;
3 changes: 2 additions & 1 deletion src/components/WeekCalender.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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<any> = ({ showDetailsHandle, data }) => {
const [currentMonth, setCurrentMonth] = useState(new Date());
Expand Down Expand Up @@ -109,7 +110,7 @@ const Calendar: React.FC<any> = ({ 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;
Expand Down
2 changes: 1 addition & 1 deletion src/pages/dashboard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -462,7 +462,7 @@ const Dashboard: React.FC<DashboardProps> = () => {
textAlign={'left'}
fontSize={'22px'}
m={'1.5rem 1rem 0.8rem'}
color={'#1F1B13'}
color={theme?.palette?.warning['300']}
>
{t('DASHBOARD.DASHBOARD')}
</Typography>
Expand Down
3 changes: 2 additions & 1 deletion src/styles/globals.css
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 61efcd7

Please sign in to comment.