sprint-bug-fixing (#7)

Co-authored-by: Karthik Sammy <10769@intelizign.com>
Reviewed-on: WizdomWaves/TedQuMobileApp#7
This commit is contained in:
karthik 2024-11-22 11:33:18 +00:00
parent 1f40003d01
commit 97caa2a276
9 changed files with 230 additions and 223 deletions

View File

@ -107,7 +107,7 @@ class AttendanceView extends React.Component<any, any>{
class_info: classDataInfo, action: common.attendance, students: studentList, isHome: false, routeTo: "AttendanceView", label: "Attendances" class_info: classDataInfo, action: common.attendance, students: studentList, isHome: false, routeTo: "AttendanceView", label: "Attendances"
}) })
} else { } else {
Toast.show("No students in this class", Toast.SHORT) Toast.show("No Students Present In this Class", Toast.SHORT)
} }
} }

View File

@ -382,17 +382,17 @@ class DiaryView extends React.PureComponent<any, any>{
<View style={[{ backgroundColor: BaseColors.headerStyleBackgroundColor, alignSelf: 'center', justifyContent: 'center' }, styles.listViewImage, BaseStyles.marRight10]}> <View style={[{ backgroundColor: BaseColors.headerStyleBackgroundColor, alignSelf: 'center', justifyContent: 'center' }, styles.listViewImage, BaseStyles.marRight10]}>
<Text style={{ fontSize: 14, color: BaseColors.white, textAlign: 'center' }}>{student?.student_name && student?.student_name.charAt(0).toUpperCase() || 'NA'}</Text> <Text style={{ fontSize: 14, color: BaseColors.white, textAlign: 'center' }}>{student?.student_name && student?.student_name.charAt(0).toUpperCase() || 'NA'}</Text>
</View> </View>
<View style={[BaseStyles.marRight10, BaseStyles.padding10, { flexDirection: 'column', width: '85%', backgroundColor: "#f5f7f7", borderRadius: 20 }]}> <View style={[BaseStyles.marRight10, BaseStyles.padding10, { flexDirection: 'column', width: '85%', backgroundColor: "#f5f7f7", borderRadius: 20 }]}>
<Text style={[AppStyles.nameLabel, BaseStyles.marLeft10, BaseStyles.marBottom5, { fontSize: 15, fontFamily: "Quicksand_700Bold", color: "#000", alignItems: 'flex-end' }]}> <View style={[AppStyles.diaryHeaderContainer]}>
{student.student_name.charAt(0).toUpperCase() + student.student_name.slice(1)} <Text style={[AppStyles.nameLabel, BaseStyles.marLeft10, { fontSize: 15, fontFamily: "Quicksand_700Bold", color: "#000",width: '60%' }]}>
<Text style={{ fontSize: 11, color: "#bab8b8" }}> {student?.reply_date && moment(student?.reply_date).fromNow()}</Text></Text> {student?.student_name?.charAt(0).toUpperCase() + student?.student_name.slice(1) || 'NA'}
<View style={[BaseStyles.marLeft10, {display:'flex', flexDirection:'row'}]}> <Text style={{ fontSize: 11, color: "#bab8b8" }}> {(student?.reply_date) ? moment(student?.reply_date).fromNow() : ''}</Text>
<Text style={[ AppStyles.diaryTypeLabel, AppStyles.diaryHomeWork, { alignItems: 'flex-end' }]}> </Text>
<Text style={[AppStyles.diaryTypeLabel, AppStyles.diaryHomeWork, { justifyContent: 'center' }]}>
{student.is_completed ? "Completed" : "Incompleted"} {student.is_completed ? "Completed" : "Incompleted"}
</Text> </Text>
<Text style={[AppStyles.stdLabel, { fontSize: 11, color: "#bab8b8" }]}> {student?.reply && student?.reply}</Text>
</View> </View>
<Text style={[AppStyles.stdLabel, BaseStyles.marLeft10, { fontSize: 12}]}>{student?.reply}</Text>
</View> </View>
</View> </View>
))} ))}

View File

@ -161,7 +161,7 @@ class Home extends React.Component<any, any>{
class_info: classDataInfo, action: this.state.action, students: studentList.data, isHome: true, routeTo: "Home", label: "Attendance" class_info: classDataInfo, action: this.state.action, students: studentList.data, isHome: true, routeTo: "Home", label: "Attendance"
}) })
} else { } else {
Toast.show("No students in this class", Toast.SHORT) Toast.show("No Students Present In this Class", Toast.SHORT)
} }
} }
/** Resets the action once the AR tag was proceeded */ /** Resets the action once the AR tag was proceeded */
@ -181,7 +181,7 @@ class Home extends React.Component<any, any>{
class_info: classDataInfo, action: this.state.action, students: studentList.data, isHome: true, routeTo: "Home", label: "Instant Feedback" class_info: classDataInfo, action: this.state.action, students: studentList.data, isHome: true, routeTo: "Home", label: "Instant Feedback"
}) })
} else { } else {
Toast.show("No students in this class", Toast.SHORT) Toast.show("No Students Present In this Class", Toast.SHORT)
} }
} }
@ -196,7 +196,7 @@ class Home extends React.Component<any, any>{
this.setState({ class_info: data, action: 'instantFeedback' }) this.setState({ class_info: data, action: 'instantFeedback' })
this.props.getStudentsList({ token: this.token, class_id: data.class_id, academic_year: this.state.academicYear.toString() }) this.props.getStudentsList({ token: this.token, class_id: data.class_id, academic_year: this.state.academicYear.toString() })
} else if (!data?.is_teacher_present) { } else if (!data?.is_teacher_present) {
Toast.show("Unable to taken you are absent now", Toast.SHORT) Toast.show("Unable to take instant feedback as you are absent", Toast.SHORT)
} else { } else {
Toast.show("Attendance not taken for students", Toast.SHORT) Toast.show("Attendance not taken for students", Toast.SHORT)
} }
@ -211,7 +211,7 @@ class Home extends React.Component<any, any>{
this.setState({ class_info: data, action: 'attendance' }) this.setState({ class_info: data, action: 'attendance' })
this.props.getStudentsList({ token: this.token, class_id: data.class_id, academic_year: this.state.academicYear.toString() }) this.props.getStudentsList({ token: this.token, class_id: data.class_id, academic_year: this.state.academicYear.toString() })
} else if (!data?.is_teacher_present) { } else if (!data?.is_teacher_present) {
Toast.show("Unable to taken you are absent now", Toast.SHORT) Toast.show("Unable to take attendance as you are absent", Toast.SHORT)
} }
else { else {
Toast.show("Attendance Already Taken", Toast.SHORT) Toast.show("Attendance Already Taken", Toast.SHORT)
@ -269,7 +269,7 @@ class Home extends React.Component<any, any>{
<Text style={[BaseStyles.textCenter, BaseStyles.font32, BaseStyles.colorWhite]}>{item?.student_name && item?.student_name.charAt(0)}</Text> <Text style={[BaseStyles.textCenter, BaseStyles.font32, BaseStyles.colorWhite]}>{item?.student_name && item?.student_name.charAt(0)}</Text>
</View> </View>
} }
<View style={[BaseStyles.flexColum, BaseStyles.padding10]}> <View style={[BaseStyles.flexColum, BaseStyles.padding10, { width: '80%' }]}>
<Text style={[BaseStyles.marBottom5, BaseStyles.font18, AppStyles.nameLabel]}>{item?.student_name}</Text> <Text style={[BaseStyles.marBottom5, BaseStyles.font18, AppStyles.nameLabel]}>{item?.student_name}</Text>
<Text style={[BaseStyles.marBottom5, AppStyles.stdLabel]}>Card ID {item?.card_id}</Text> <Text style={[BaseStyles.marBottom5, AppStyles.stdLabel]}>Card ID {item?.card_id}</Text>
<Text style={[BaseStyles.marBottom5, AppStyles.stdLabel]}>Attendance {item?.attendance}%</Text> <Text style={[BaseStyles.marBottom5, AppStyles.stdLabel]}>Attendance {item?.attendance}%</Text>

View File

@ -113,7 +113,7 @@ class InstantFeedbackCreate extends React.Component<any, any>{
class_info: classDataInfo, action: common.instantFeedback, students: studentList, isHome: false, routeTo: "InstantFeedbackView", label: "Instant Feedback" class_info: classDataInfo, action: common.instantFeedback, students: studentList, isHome: false, routeTo: "InstantFeedbackView", label: "Instant Feedback"
}) })
} else { } else {
Toast.show("No students in this class", Toast.SHORT) Toast.show("No Students Present In this Class", Toast.SHORT)
} }
} }
} }

View File

@ -155,13 +155,16 @@ class AssessmentEdit extends React.Component<any, any>{
} }
handleStarPress = (newRating:any, rowIndex:any, questionId:any) => { handleStarPress = (newRating:any, rowIndex:any, questionId:any) => {
const updatedRating = newRating + rowIndex * 5; let updatedRating = newRating + rowIndex * 5;
this.setState({ rating: updatedRating }); this.setState({ rating: updatedRating });
const updatedQuestions = this.state.question_details.map((question:any) => ({ const updatedQuestions = this.state.question_details.map((question:any) => ({
...question, ...question,
question: question.question.map((q:any) => { question: question.question.map((q:any) => {
if (q.question_id === questionId) { if (q.question_id === questionId) {
if(q?.currentRating == 0.5) {
updatedRating = 0;
}
return { ...q, currentRating: updatedRating }; return { ...q, currentRating: updatedRating };
} }
return q; return q;
@ -193,6 +196,8 @@ class AssessmentEdit extends React.Component<any, any>{
fullStarColor={'orange'} fullStarColor={'orange'}
starSize={35} // Adjust the size of each star starSize={35} // Adjust the size of each star
halfStarEnabled={true} halfStarEnabled={true}
enableSwiping
/> />
); );
} }

View File

@ -105,8 +105,8 @@ class QuestionBank extends React.Component<any, any>{
keyExtractor={(item, index) => index.toString()} keyExtractor={(item, index) => index.toString()}
/> />
} }
{!this.props.loading && this.props.records.length === 0 &&
<Text style={[BaseStyles.font500Medium, { flex: 1, justifyContent: 'center', alignSelf: 'center' }]}>{common.noDataFound}</Text>}
{this.props.loading && <View style={[BaseStyles.marVertical20, { flex: 1, justifyContent: 'center' }]}> {this.props.loading && <View style={[BaseStyles.marVertical20, { flex: 1, justifyContent: 'center' }]}>
<ActivityIndicator size="large" color="#7165e3" /> <ActivityIndicator size="large" color="#7165e3" />
</View>} </View>}

View File

@ -476,6 +476,8 @@ class QuestionSetImport extends React.Component<any, any>{
)} )}
onBlur={handleBlur(`questions.${index}.question`)} onBlur={handleBlur(`questions.${index}.question`)}
value={values.questions[index].question} value={values.questions[index].question}
height={40}
multiline={true}
/> />
</View> </View>
{errors.questions && {errors.questions &&

View File

@ -127,11 +127,11 @@ class TakeQuizzes extends React.Component<any, any>{
class_info: classDataInfo, action: common.quiz, students: studentList, isHome: false, routeTo: "TakeQuizzes", label: "Quiz" class_info: classDataInfo, action: common.quiz, students: studentList, isHome: false, routeTo: "TakeQuizzes", label: "Quiz"
}) })
} else { } else {
Toast.show("No students in this class", Toast.SHORT) Toast.show("No Students Present In this Class", Toast.SHORT)
} }
} }
}else if(!quizAdminparams?.is_teacher_present){ }else if(!quizAdminparams?.is_teacher_present){
Toast.show("Unable to taken you are absent now", Toast.SHORT) Toast.show("Unable to take Quizzes as you are absent", Toast.SHORT)
}else{ }else{
Toast.show("Attendance not taken for students", Toast.SHORT) Toast.show("Attendance not taken for students", Toast.SHORT)
} }

View File

@ -517,7 +517,7 @@ export const AppStyles = StyleSheet.create({
height: 34, height: 34,
color: "#4a537c", color: "#4a537c",
fontFamily: "Quicksand_500Medium", fontFamily: "Quicksand_500Medium",
padding: 5, padding: 2,
fontSize: 16 fontSize: 16
}, },
pickerText: { pickerText: {