Skip to content

Commit

Permalink
fix(grade-status): corregimos logica para evaluar pendiente
Browse files Browse the repository at this point in the history
  • Loading branch information
SeGonzalezR committed May 3, 2024
1 parent 6a48d9f commit 58cb720
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/grades/gradeStatus.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,14 @@ export const gradeStatus = (
grade?: number,
isApproved = true,
): StatusReturn => {
let isPending = !grade && isApproved
if (isPending && grade === 0) {
isPending = false
}
/**
* Si la nota viene nula la marcamos como pendiente.
*/
if (!grade && isApproved && scale.min !== 0) {
if (isPending) {
return {
id: 0,
name: 'Pendiente',
Expand Down

0 comments on commit 58cb720

Please sign in to comment.