Skip to content

Commit

Permalink
Merge pull request #153 from Rushikesh-Sonawane99/release-1.0.0
Browse files Browse the repository at this point in the history
Issue #PS-1648 chore: Removed re-assign block and center option from profile and modified test report UI on learner profie
  • Loading branch information
itsvick authored Aug 16, 2024
2 parents f342e7c + fc8078a commit 15b8452
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 8 deletions.
6 changes: 3 additions & 3 deletions src/components/AssessmentReport.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import KeyboardArrowRightIcon from '@mui/icons-material/KeyboardArrowRight';
import { useRouter } from 'next/router';
import RemoveIcon from '@mui/icons-material/Remove';
import RadioButtonUncheckedIcon from '@mui/icons-material/RadioButtonUnchecked';
import { updateAssessment } from '@/services/UpdateAssesmentService';
import { learnerAssessmentReport } from '@/services/UpdateAssesmentService';

interface AssessmentReportProp{
isTitleRequired?: boolean
Expand All @@ -21,7 +21,7 @@ const AssessmentReport: React.FC<AssessmentReportProp> = ({ isTitleRequired }) =
const [assessmentList, setAssessmentList] = React.useState([]);

useEffect(() => {
const res: any = updateAssessment();
const res: any = learnerAssessmentReport();
setAssessmentList(res);
}, []);

Expand Down Expand Up @@ -56,7 +56,7 @@ const AssessmentReport: React.FC<AssessmentReportProp> = ({ isTitleRequired }) =
borderRadius: '8px',
gap: '5px',
}}
onClick={() => handleAssessmentDetails(assessment.userId)}
// onClick={() => handleAssessmentDetails(assessment.userId)}
>
<Box
sx={{
Expand Down
4 changes: 2 additions & 2 deletions src/components/LearnersListItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -644,7 +644,7 @@ const LearnersListItem: React.FC<LearnerListProps> = ({
type == Role.STUDENT ||
(option.name !== 'mark-drop-out' &&
option.name !== 'unmark-drop-out')
)
) .filter((option) => !isFromProfile || option.name !== 'reassign-centers')
: [
{
label: t('COMMON.REASSIGN_CENTERS'),
Expand Down Expand Up @@ -680,7 +680,7 @@ const LearnersListItem: React.FC<LearnerListProps> = ({
type == Role.STUDENT ||
(option.name !== 'mark-drop-out' &&
option.name !== 'unmark-drop-out')
)
) .filter((option) => !isFromProfile || option.name !== 'reassign-centers')
}
renderCustomContent={renderCustomContent}
/>
Expand Down
2 changes: 1 addition & 1 deletion src/components/ManageUser.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -737,7 +737,7 @@ const ManageUser: React.FC<ManageUsersProps> = ({
),
name: 'delete-User',
},
]}
].filter(option => !isFromFLProfile || (option.name !== 'reassign-block' && option.name !== 'reassign-block-request'))}
>
<Box
sx={{
Expand Down
3 changes: 1 addition & 2 deletions src/pages/learner/[userId].tsx
Original file line number Diff line number Diff line change
Expand Up @@ -982,8 +982,7 @@ const LearnerProfile: React.FC<LearnerProfileProp> = ({
}}
>
<CardContent>

<AssessmentReport isTitleRequired={true}/>
<AssessmentReport isTitleRequired={true} />
</CardContent>
</Card>
</Box>
Expand Down
17 changes: 17 additions & 0 deletions src/services/UpdateAssesmentService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,23 @@ export const updateAssessment = (): Assessment[] => {
];
};

export const learnerAssessmentReport = (): Assessment[] => {
return [
{
userId: 1,
studentName: 'Pre-test',
progress: 'Overall score :',
score: 89
},
{
userId: 2,
studentName: 'Post-test',
progress: 'Not Started',
score: 0
}
];
};

export const getAssessmentSubjects = (): AssessmentSubject[] => {
return [
{
Expand Down

0 comments on commit 15b8452

Please sign in to comment.