psychometric issue fixed
This commit is contained in:
parent
0ec43ce473
commit
2fb6cba26f
|
@ -26,7 +26,7 @@ class StudentListPsychometric extends React.Component<any, any>{
|
|||
token: any;
|
||||
state: any = {
|
||||
academicYear: '',
|
||||
parent:false
|
||||
show:false
|
||||
};
|
||||
|
||||
constructor(props: any) {
|
||||
|
@ -46,8 +46,8 @@ class StudentListPsychometric extends React.Component<any, any>{
|
|||
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<any, any>{
|
|||
|
||||
return (<View style={[AppStyles.containerWoPadding, {}]}>
|
||||
<Text style={BaseStyles.topHeader}>{label}</Text>
|
||||
{!this.props?.route?.params?.hasOwnProperty('data') && !this.state.parent && <TouchableOpacity style={[styles.primaryBtn, ]} onPress={this.toClass} activeOpacity={0.8}>
|
||||
{!this.props?.route?.params?.hasOwnProperty('data') && this.state.show && <TouchableOpacity style={[styles.primaryBtn, ]} onPress={this.toClass} activeOpacity={0.8}>
|
||||
<Text style={styles.btnText}> Filter by Class </Text>
|
||||
</TouchableOpacity> }
|
||||
{!this.props.loading && this.props.studentList && <FlatList
|
||||
|
|
Loading…
Reference in New Issue