diff --git a/src/screens/Pscyometric/StudentListPsychometric.tsx b/src/screens/Pscyometric/StudentListPsychometric.tsx index fab553e..518ee78 100644 --- a/src/screens/Pscyometric/StudentListPsychometric.tsx +++ b/src/screens/Pscyometric/StudentListPsychometric.tsx @@ -26,7 +26,7 @@ class StudentListPsychometric extends React.Component{ token: any; state: any = { academicYear: '', - parent:false + show:false }; constructor(props: any) { @@ -46,8 +46,8 @@ class StudentListPsychometric extends React.Component{ if (userInfo) { const userDetails: any = JSON.parse(userInfo) this.isLoggedinAs = userDetails.usertype - if (userDetails.usertype === UserRoles.parent) { - this.setState({parent:true}) + if (userDetails.usertype === UserRoles.schoolAdmin || userDetails.usertype === UserRoles.teacher) { + this.setState({show:true}) } } @@ -139,7 +139,7 @@ class StudentListPsychometric extends React.Component{ return ( {label} - {!this.props?.route?.params?.hasOwnProperty('data') && !this.state.parent && + {!this.props?.route?.params?.hasOwnProperty('data') && this.state.show && Filter by Class } {!this.props.loading && this.props.studentList &&