Skip to content

Commit

Permalink
Merge pull request #494 from suvarnakale/release-1.0.0
Browse files Browse the repository at this point in the history
Issue #000 bug:  courseType edit and timepicker on mobile view issues…fixed
  • Loading branch information
itsvick authored Dec 3, 2024
2 parents ab90166 + e544353 commit 3f244f3
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions src/components/PlannedSession.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@ import SessionMode from './SessionMode';
import { showToastMessage } from './Toastify';
import WeekDays from './WeekDays';
import { getOptionsByCategory } from '@/utils/Helper';
// import { MobileTimePicker } from '@mui/x-date-pickers/MobileTimePicker';
import { telemetryFactory } from '@/utils/telemetry';
import { DesktopTimePicker } from '@mui/x-date-pickers/DesktopTimePicker';

dayjs.extend(utc);
dayjs.extend(timezone);
Expand Down Expand Up @@ -1237,10 +1237,13 @@ const PlannedSession: React.FC<PlannedModalProps> = ({
const sessionSubject = sessionBlocks?.[0]?.subject || '';

if (
sessionSubject &&
eventData?.metadata?.subject !== sessionSubject
(sessionSubject &&
eventData?.metadata?.subject !== sessionSubject) ||
(selectedCourseType &&
eventData?.metadata?.courseType !== selectedCourseType)
) {
metadata.subject = sessionSubject;
metadata.courseType = selectedCourseType;
apiBody['metadata'] = metadata;
const erMetaData = {
topic: null,
Expand Down Expand Up @@ -1638,7 +1641,7 @@ const PlannedSession: React.FC<PlannedModalProps> = ({
<Grid sx={{ paddingTop: '0px !important' }} item xs={6}>
<Box sx={{ mt: 3 }}>
<LocalizationProvider dateAdapter={AdapterDayjs}>
<TimePicker
<DesktopTimePicker
label={t('CENTER_SESSION.START_TIME')}
value={
editSession
Expand All @@ -1661,7 +1664,7 @@ const PlannedSession: React.FC<PlannedModalProps> = ({
<Grid sx={{ paddingTop: '0px !important' }} item xs={6}>
<Box sx={{ mt: 3 }}>
<LocalizationProvider dateAdapter={AdapterDayjs}>
<TimePicker
<DesktopTimePicker
label={t('CENTER_SESSION.END_TIME')}
value={
editSession
Expand Down Expand Up @@ -1733,7 +1736,7 @@ const PlannedSession: React.FC<PlannedModalProps> = ({
>
<Box sx={{ mt: 3 }}>
<LocalizationProvider dateAdapter={AdapterDayjs}>
<TimePicker
<DesktopTimePicker
label={t('CENTER_SESSION.START_TIME')}
value={
editSession
Expand All @@ -1760,7 +1763,7 @@ const PlannedSession: React.FC<PlannedModalProps> = ({
>
<Box sx={{ mt: 3 }}>
<LocalizationProvider dateAdapter={AdapterDayjs}>
<TimePicker
<DesktopTimePicker
label={t('CENTER_SESSION.END_TIME')}
value={
editSession ? endTimes[index] : block?.sessionEndTime
Expand Down

0 comments on commit 3f244f3

Please sign in to comment.