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;
|
token: any;
|
||||||
state: any = {
|
state: any = {
|
||||||
academicYear: '',
|
academicYear: '',
|
||||||
parent:false
|
show:false
|
||||||
};
|
};
|
||||||
|
|
||||||
constructor(props: any) {
|
constructor(props: any) {
|
||||||
|
@ -46,8 +46,8 @@ class StudentListPsychometric extends React.Component<any, any>{
|
||||||
if (userInfo) {
|
if (userInfo) {
|
||||||
const userDetails: any = JSON.parse(userInfo)
|
const userDetails: any = JSON.parse(userInfo)
|
||||||
this.isLoggedinAs = userDetails.usertype
|
this.isLoggedinAs = userDetails.usertype
|
||||||
if (userDetails.usertype === UserRoles.parent) {
|
if (userDetails.usertype === UserRoles.schoolAdmin || userDetails.usertype === UserRoles.teacher) {
|
||||||
this.setState({parent:true})
|
this.setState({show:true})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -139,7 +139,7 @@ class StudentListPsychometric extends React.Component<any, any>{
|
||||||
|
|
||||||
return (<View style={[AppStyles.containerWoPadding, {}]}>
|
return (<View style={[AppStyles.containerWoPadding, {}]}>
|
||||||
<Text style={BaseStyles.topHeader}>{label}</Text>
|
<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>
|
<Text style={styles.btnText}> Filter by Class </Text>
|
||||||
</TouchableOpacity> }
|
</TouchableOpacity> }
|
||||||
{!this.props.loading && this.props.studentList && <FlatList
|
{!this.props.loading && this.props.studentList && <FlatList
|
||||||
|
|
Loading…
Reference in New Issue