Skip to content

Commit 6f7da9a

Browse files
Fixed Mobile responsive UI Issue
1 parent 74bad23 commit 6f7da9a

File tree

2 files changed

+52
-45
lines changed
  • mfes/scp-teacher-repo

2 files changed

+52
-45
lines changed

mfes/scp-teacher-repo/public/locales/en/common.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -753,7 +753,7 @@
753753
"NO_ASSESSMENT_TYPE_FOUND":"No Assessment Type Found",
754754
"IMAGE_UPLOADED": "Image Uploaded",
755755
"VIEW": "View",
756-
"REUPLOAD": "Re-upload"
756+
"REUPLOAD": "Reupload"
757757
},
758758
"BOARD_ENROLMENT": {
759759
"BOARD_ENROLLMENT": "Board Enrollment",

mfes/scp-teacher-repo/src/pages/manual-assessments/[assessmentId]/[userId]/index.tsx

Lines changed: 51 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -1187,22 +1187,37 @@ const AssessmentDetails = () => {
11871187
handleReUpload();
11881188
}}
11891189
>
1190-
<Box>
1190+
<Box
1191+
sx={{
1192+
display: 'flex',
1193+
alignItems: 'center',
1194+
gap: { xs: 0.5, md: 1 },
1195+
flexWrap: 'nowrap',
1196+
minWidth: 0,
1197+
overflow: 'hidden',
1198+
}}
1199+
>
11911200
<Typography
11921201
sx={{
11931202
color: '#635E57',
1194-
fontSize: { xs: '14px', md: '16px' },
1203+
fontSize: { xs: '12px', md: '16px' },
11951204
fontWeight: 400,
11961205
letterSpacing: '0.1px',
1206+
whiteSpace: 'nowrap',
11971207
}}
11981208
>
11991209
{assessmentData?.fileUrls &&
1200-
assessmentData.fileUrls.length > 0 ? (
1210+
assessmentData.fileUrls.length > 0
1211+
? `${assessmentData.fileUrls.length} ${
1212+
assessmentData.fileUrls.length === 1
1213+
? 'image'
1214+
: 'images'
1215+
} uploaded`
1216+
: 'No images uploaded'}
1217+
</Typography>
1218+
{assessmentData?.fileUrls &&
1219+
assessmentData.fileUrls.length > 0 && (
12011220
<>
1202-
{`${assessmentData.fileUrls.length} ${assessmentData.fileUrls.length === 1
1203-
? 'image'
1204-
: 'images'
1205-
} uploaded`}
12061221
<Button
12071222
variant="contained"
12081223
size="small"
@@ -1211,18 +1226,16 @@ const AssessmentDetails = () => {
12111226
handleUploadInfoClick();
12121227
}}
12131228
sx={{
1214-
ml: 1,
1229+
ml: 0,
12151230
textTransform: 'none',
12161231
borderRadius: '8px',
12171232
fontWeight: 600,
1218-
fontSize: '14px',
1219-
height: '32px',
1220-
padding: '2px 8px',
1221-
display: 'inline-flex',
1233+
fontSize: { xs: '12px', md: '14px' },
1234+
height: { xs: '28px', md: '32px' },
1235+
px: { xs: 1, md: 1.5 },
12221236
backgroundColor: '#FFC107',
12231237
color: '#1F1B13',
12241238
'&:hover': { backgroundColor: '#FFB300' },
1225-
mb: 1,
12261239
}}
12271240
>
12281241
{t('ASSESSMENTS.VIEW')}
@@ -1233,37 +1246,31 @@ const AssessmentDetails = () => {
12331246
'AI Pending',
12341247
'Approved',
12351248
].includes(assessmentData?.status || '') && (
1236-
<>
1237-
<Button
1238-
variant="contained"
1239-
size="small"
1240-
onClick={(e) => {
1241-
// e.stopPropagation();
1242-
// handleReUpload();
1243-
}}
1244-
sx={{
1245-
ml: 1,
1246-
textTransform: 'none',
1247-
borderRadius: '8px',
1248-
fontWeight: 600,
1249-
fontSize: '14px',
1250-
height: '32px',
1251-
padding: '2px 8px',
1252-
backgroundColor: '#FFC107',
1253-
color: '#1F1B13',
1254-
'&:hover': { backgroundColor: '#FFB300' },
1255-
mb: 1,
1256-
}}
1257-
>
1258-
{t('ASSESSMENTS.REUPLOAD')}
1259-
</Button>
1260-
</>
1261-
)}
1249+
<Button
1250+
variant="contained"
1251+
size="small"
1252+
onClick={(e) => {
1253+
// e.stopPropagation();
1254+
// handleReUpload();
1255+
}}
1256+
sx={{
1257+
ml: 0,
1258+
textTransform: 'none',
1259+
borderRadius: '8px',
1260+
fontWeight: 600,
1261+
fontSize: { xs: '12px', md: '14px' },
1262+
height: { xs: '28px', md: '32px' },
1263+
px: { xs: 1, md: 1.5 },
1264+
backgroundColor: '#FFC107',
1265+
color: '#1F1B13',
1266+
'&:hover': { backgroundColor: '#FFB300' },
1267+
}}
1268+
>
1269+
{t('ASSESSMENTS.REUPLOAD')}
1270+
</Button>
1271+
)}
12621272
</>
1263-
) : (
1264-
'No images uploaded'
12651273
)}
1266-
</Typography>
12671274
</Box>
12681275
<IconButton
12691276
onClick={(e) => {
@@ -1274,9 +1281,9 @@ const AssessmentDetails = () => {
12741281
color: '#1F1B13',
12751282
p: 0,
12761283
'& .MuiSvgIcon-root': {
1277-
fontSize: { xs: 24, md: 28 },
1284+
fontSize: { xs: 22, md: 28 },
12781285
},
1279-
mb: 1,
1286+
mb: 0,
12801287
}}
12811288
>
12821289
<FileUploadIcon />

0 commit comments

Comments
 (0)