Skip to content

Commit

Permalink
Issue #PS-000 fix: Fixed lint issues
Browse files Browse the repository at this point in the history
  • Loading branch information
itsvick committed Sep 8, 2024
1 parent a506045 commit 6b54f07
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 28 deletions.
8 changes: 4 additions & 4 deletions src/components/PlannedSession.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import {
FormContextType,
Role,
Status,
sessionMode
sessionMode,
} from '@/utils/app.constant';
import AddIcon from '@mui/icons-material/Add';
import DeleteOutlineIcon from '@mui/icons-material/DeleteOutline';
Expand Down Expand Up @@ -105,7 +105,6 @@ const PlannedSession: React.FC<PlannedModalProps> = ({
const [selectedWeekDays, setSelectedWeekDays] = useState<string[]>();
const [editEventData, setEditEventData] = useState(eventData);


const queryClient = useQueryClient();

const [modalOpen, setModalOpen] = React.useState<boolean>(false);
Expand Down Expand Up @@ -261,7 +260,8 @@ const PlannedSession: React.FC<PlannedModalProps> = ({
try {
const response = await queryClient.fetchQuery({
queryKey: ['formRead', FormContext.USERS, FormContextType.TEACHER],
queryFn: () => getFormRead(FormContext.USERS, FormContextType.TEACHER),
queryFn: () =>
getFormRead(FormContext.USERS, FormContextType.TEACHER),
});

console.log('sortedFields', response);
Expand Down Expand Up @@ -936,7 +936,7 @@ const PlannedSession: React.FC<PlannedModalProps> = ({
<FormControlLabel
value={t('CENTER_SESSION.EDIT_THIS_SESSION')}
onClick={() =>
handleEditSelection?.(
handleEditSelection(
t('CENTER_SESSION.EDIT_THIS_SESSION'),
editSession
)
Expand Down
5 changes: 2 additions & 3 deletions src/pages/centers/[cohortId]/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -195,9 +195,8 @@ const CohortPage = () => {
(field: any) => field.label === 'BLOCKS'
);

cohortData.address =
`${toPascalCase(district?.value)}, ${toPascalCase(state?.value)}` ||
'';
const address = `${toPascalCase(district?.value)}, ${toPascalCase(state?.value)}`;
cohortData.address = address || '';

const typeOfCohort = cohortData.customField.find(
(item: CustomField) => item.label === 'TYPE_OF_COHORT'
Expand Down
24 changes: 7 additions & 17 deletions src/pages/dashboard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -1029,23 +1029,13 @@ const Dashboard: React.FC<DashboardProps> = () => {
/>
))}
valuePartOne={
Array.isArray(lowAttendanceLearnerList) &&
lowAttendanceLearnerList.length > 2
? `${lowAttendanceLearnerList[0]}, ${lowAttendanceLearnerList[1]}`
: lowAttendanceLearnerList.length === 2
? `${lowAttendanceLearnerList[0]}, ${lowAttendanceLearnerList[1]}`
: lowAttendanceLearnerList.length === 1
? `${lowAttendanceLearnerList[0]}`
: Array.isArray(
lowAttendanceLearnerList
) &&
lowAttendanceLearnerList.length === 0
? t(
'ATTENDANCE.NO_LEARNER_WITH_LOW_ATTENDANCE'
)
: t(
'ATTENDANCE.NO_LEARNER_WITH_LOW_ATTENDANCE'
)
lowAttendanceLearnerList.length > 0
? lowAttendanceLearnerList
.slice(0, 2)
.join(', ')
: t(
'ATTENDANCE.NO_LEARNER_WITH_LOW_ATTENDANCE'
)
}
valuePartTwo={
Array.isArray(lowAttendanceLearnerList) &&
Expand Down
8 changes: 4 additions & 4 deletions src/styles/globals.css
Original file line number Diff line number Diff line change
Expand Up @@ -397,7 +397,7 @@ main {
/* This is for react-calender month view and classes are from library */
.react-calendar {
width: 100% !important;
font-family: Poppins !important;
font-family: Poppins, sans-serif !important;
}

.react-calendar_month-viewdays_day {
Expand All @@ -422,12 +422,12 @@ main {

.react-calendar button abbr {
color: #1f1b13;
font-family: Poppins !important;
font-family: Poppins, sans-serif !important;
}

.react-calendar__month-view__weekdays__weekday abbr {
color: #1f1b13;
font-family: Poppins !important;
font-family: Poppins, sans-serif !important;
}

.present-marker {
Expand Down Expand Up @@ -1012,7 +1012,7 @@ legend.Mui-focused {
color: var(--mui-palette-warning-300) !important;
}

.__floater __floater__open {
.__floater .__floater__open {
z-index: 9999 !important;
}

Expand Down

0 comments on commit 6b54f07

Please sign in to comment.