Skip to content

Commit 0117043

Browse files
authored
Merge pull request #1948 from Rushikesh-Sonawane99/release-1.11.0
Issue #PS-5580 fix: Fixed Course vs content publishing checklist pop up veiw UI inconsistency issue
2 parents de9736f + 6f7da9a commit 0117043

File tree

5 files changed

+96
-75
lines changed

5 files changed

+96
-75
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/components/assessment/QuestionMarksManualUpdate.tsx

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -818,10 +818,12 @@ const QuestionMarksManualUpdate: React.FC<QuestionMarksManualUpdateProps> = ({
818818
style={
819819
hasImage
820820
? {
821-
width: '100%',
821+
width: 'fit-content',
822+
display: 'inline-block',
822823
border: '1px solid #eee',
823824
borderRadius: 8,
824825
padding: 8,
826+
paddingRight: 0,
825827
background: '#fff',
826828
marginTop: '0px',
827829
position: 'relative',
@@ -830,6 +832,19 @@ const QuestionMarksManualUpdate: React.FC<QuestionMarksManualUpdateProps> = ({
830832
}
831833
>
832834
<div
835+
onClick={(e) => {
836+
if (!hasImage) return;
837+
const t = e.target as HTMLElement | null;
838+
if (t && t.tagName === 'IMG') {
839+
const srcs = extractImageSrcs(q.questionTitle);
840+
const src = srcs[0] ?? null;
841+
set_zoomImageSrc(src);
842+
const el: any = fullScreenContainerRef.current;
843+
if (src && el && el.requestFullscreen) {
844+
el.requestFullscreen().catch(() => {});
845+
}
846+
}
847+
}}
833848
dangerouslySetInnerHTML={{ __html: questionHtml }}
834849
/>
835850
{hasImage && (
@@ -846,15 +861,16 @@ const QuestionMarksManualUpdate: React.FC<QuestionMarksManualUpdateProps> = ({
846861
}}
847862
sx={{
848863
position: 'absolute',
849-
top: 6,
850-
right: 6,
864+
top: '20%',
865+
right: 0,
866+
transform: 'translateY(-50%)',
851867
bgcolor: 'rgba(255,255,255,0.9)',
852868
boxShadow: 1,
853869
'&:hover': { bgcolor: 'rgba(255,255,255,1)' },
854870
}}
855871
size="small"
856872
>
857-
<ZoomInIcon fontSize="small" />
873+
<ZoomInIcon fontSize="medium" />
858874
</IconButton>
859875
)}
860876
</div>

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 />

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -767,7 +767,7 @@ const AssessmentDetails: React.FC = () => {
767767
}}
768768
/>
769769
<Box sx={{ display: 'flex', gap: 2 }}>
770-
<Button
770+
{/* <Button
771771
variant="contained"
772772
color="primary"
773773
endIcon={<DownloadIcon />}
@@ -788,7 +788,7 @@ const AssessmentDetails: React.FC = () => {
788788
}}
789789
>
790790
{t('AI.SAMPLE_QUESTION_AND_ANSWER_PAPER')}
791-
</Button>
791+
</Button> */}
792792
{/* Download PDF Card */}
793793
{assessmentData?.hasLongShortAnswers && (
794794
<Button

mfes/workspace/src/components/ConfirmActionPopup.tsx

Lines changed: 22 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ const ConfirmActionPopup: React.FC<ConfirmActionPopupProps> = ({
8686
top: '50%',
8787
left: '50%',
8888
transform: 'translate(-50%, -50%)',
89-
width: 550,
89+
width: 720,
9090
bgcolor: 'background.paper',
9191
boxShadow: 24,
9292
borderRadius:'16px'
@@ -96,23 +96,24 @@ const ConfirmActionPopup: React.FC<ConfirmActionPopupProps> = ({
9696
<Box sx={style}>
9797
<Box
9898
sx={{
99-
color: 'black',
99+
color: 'white',
100+
bgcolor: '#024f9d',
100101
display: 'flex',
101102
alignItems: 'center',
102103
justifyContent: 'space-between',
103-
padding:"16px 16px 10px"
104+
padding:"1px 16px 1px"
104105
}}
105106
>
106107
<Typography variant="h6" sx={{
107108
margin: 0,
108109
fontFamily: 'inherit',
109110
lineHeight: '24px',
110-
fontWeight: 500,
111+
fontWeight: 800,
111112
fontSize: '16px',
112113
}}>
113114
{actionType === Publish.PUBLISH ? 'Confirm Publish Action' : 'Confirm Reject Action'}
114115
</Typography>
115-
<IconButton onClick={handleClose} sx={{ color: 'black' }}>
116+
<IconButton onClick={handleClose} sx={{ color: 'white' }}>
116117
<CloseIcon />
117118
</IconButton>
118119
</Box>
@@ -125,9 +126,9 @@ const ConfirmActionPopup: React.FC<ConfirmActionPopupProps> = ({
125126
overflowY: 'auto',
126127
overflowX: 'hidden',
127128
}}>
128-
<Typography gutterBottom >
129-
{actionType === 'publish'
130-
? `Please confirm that ALL the following items are verified (by ticking the checkboxes) before you can ${actionType}.`
129+
<Typography gutterBottom sx={{ fontSize: '14px', fontWeight: 800, lineHeight: 1.2 }}>
130+
{actionType === Publish.PUBLISH
131+
? `Please confirm that ALL the following items are verified (by ticking the check-boxes) before you can ${actionType}.`
131132
: 'Please select the reason(s) for rejection by ticking the checkboxes below and provide a comment to proceed with rejecting the action:'}
132133
</Typography>
133134

@@ -136,25 +137,24 @@ const ConfirmActionPopup: React.FC<ConfirmActionPopupProps> = ({
136137
<Typography
137138
sx={{
138139
fontSize: '14px',
139-
fontWeight: 500,
140+
fontWeight: 800,
140141
mb: 1,
141142
marginLeft: '10px',
142143
}}
143-
variant="h6"
144144
>
145-
Usability
145+
Content Details
146146
</Typography>
147-
{usabilityOptions.map((option) => (
147+
{contentDetailsOptions.map((option) => (
148148
<FormControlLabel
149149
key={option}
150-
sx={{ alignItems: 'flex-start', m: 0.5 }}
150+
sx={{ alignItems: 'flex-start', m: 0.5, '& .MuiFormControlLabel-label': { fontSize: '12px', lineHeight: 1.2, marginTop: '5px' } }}
151151
control={
152152
<Checkbox
153153
checked={checkedItems.includes(option)}
154154
onChange={() => handleCheckboxChange(option)}
155155
sx={{
156-
color: 'black',
157-
'&.Mui-checked': { color: 'black' },
156+
color: '#024f9d',
157+
'&.Mui-checked': { color: '#024f9d' },
158158
py: 0.5,
159159
}}
160160
/>
@@ -167,25 +167,24 @@ const ConfirmActionPopup: React.FC<ConfirmActionPopupProps> = ({
167167
<Typography
168168
sx={{
169169
fontSize: '14px',
170-
fontWeight: '500',
170+
fontWeight: 800,
171171
mb: 1,
172172
marginLeft: '10px',
173173
}}
174-
variant="h6"
175174
>
176-
Content Details
175+
Usability
177176
</Typography>
178-
{contentDetailsOptions.map((option) => (
177+
{usabilityOptions.map((option) => (
179178
<FormControlLabel
180179
key={option}
181-
sx={{ alignItems: 'flex-start', m: 0.5 }}
180+
sx={{ alignItems: 'flex-start', m: 0.5, '& .MuiFormControlLabel-label': { fontSize: '12px', lineHeight: 1.2, marginTop: '5px' }}}
182181
control={
183182
<Checkbox
184183
checked={checkedItems.includes(option)}
185184
onChange={() => handleCheckboxChange(option)}
186185
sx={{
187-
color: 'black',
188-
'&.Mui-checked': { color: 'black' },
186+
color: '#024f9d',
187+
'&.Mui-checked': { color: '#024f9d' },
189188
py: 0.5,
190189
}}
191190
/>
@@ -220,8 +219,7 @@ const ConfirmActionPopup: React.FC<ConfirmActionPopupProps> = ({
220219
<Button
221220
onClick={handleConfirm}
222221
variant="contained"
223-
color="primary"
224-
sx={{ minWidth: 120, textTransform: 'capitalize', borderRadius: '50px', ml: 2 }}
222+
sx={{ minWidth: 120, textTransform: 'capitalize', borderRadius: '50px', ml: 2,color: 'white', backgroundColor: '#024f9d','&:hover': {backgroundColor: '#013b75'} }}
225223
disabled={(comment === '' && actionType === Publish.REJECT ) || (actionType === Publish.PUBLISH && !allChecked)}
226224
>
227225
{actionType === Publish.PUBLISH ? 'Publish' : 'Reject'}

0 commit comments

Comments
 (0)