Skip to content

Commit

Permalink
fix: compare raw points w/ raw pass points (#40)
Browse files Browse the repository at this point in the history
  • Loading branch information
ijo42 authored May 25, 2023
1 parent 364c5f4 commit 534178f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions screens/signs/CardSign.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,9 @@ const getSubjectPointsStyle = (subject, totalPoint) => {
if (subject.info.length === 0) return styles.colorNoMark;

let textStyle;
subject.info.forEach(({ passScore, points, currentScore, isAbsent, isIntroductionWork }) => {
subject.info.forEach(({ passScore, points, isAbsent, isIntroductionWork }) => {
if (!isIntroductionWork) {
if (isAbsent || currentScore < passScore) textStyle = styles.colorMark2;
if (isAbsent || points < passScore) textStyle = styles.colorMark2;
else if (Number.isNaN(points) && !isAbsent) textStyle = styles.colorNoMark;
}
});
Expand Down
4 changes: 2 additions & 2 deletions screens/signs/Subject.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ const SubjectCheckPoint = ({ data }) => (
<Text
style={
(Number.isNaN(info.points) && info.isAbsent || info.points < info.passScore) &&
(info.maxScore !== 0.0)
(!info.isIntroductionWork)
? styles.markFail
: styles.markNeutral
}
Expand All @@ -38,4 +38,4 @@ const SubjectCheckPoint = ({ data }) => (
</View>
);

export default SubjectCheckPoint;
export default SubjectCheckPoint;

0 comments on commit 534178f

Please sign in to comment.