From 220366e8b6aea0ef072e97142a02e935a6fbdea2 Mon Sep 17 00:00:00 2001 From: Francisco Junior Date: Fri, 11 Oct 2024 16:13:47 -0300 Subject: [PATCH 1/4] Add enrollment status label to grades view --- CHANGELOG.md | 3 +++ .../usecases/GetStudentGradesByDisciplineUsecase.php | 3 +++ app/models/Classroom.php | 2 +- js/grades/functions.js | 8 ++++++++ 4 files changed, 15 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b859df615..18aee28af 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,6 @@ +## [Versão 3.89.195] +- Label de status de matricula adicionado a tela de notas + ## [Versão 3.89.194] - Corrigido Cartão do SUS, Etapa e Grau de Escolaridade na ficha de matrícula - Inserido Cartão do SUS, RG do Aluno e CPF do Aluno em documentos entregues no cadastro do aluno diff --git a/app/domain/grades/usecases/GetStudentGradesByDisciplineUsecase.php b/app/domain/grades/usecases/GetStudentGradesByDisciplineUsecase.php index 58cd7db2b..279a3ca6e 100644 --- a/app/domain/grades/usecases/GetStudentGradesByDisciplineUsecase.php +++ b/app/domain/grades/usecases/GetStudentGradesByDisciplineUsecase.php @@ -482,11 +482,13 @@ class StudentGradesResult private $situation; private $unities; private $partialRecoveries; + private $enrollmentStatus; public function __construct($studentName, $enrollmentId) { $this->studentName = $studentName; $this->enrollmentId = $enrollmentId; + $this->enrollmentStatus = StudentEnrollment::model()->findByPk($enrollmentId)->getCurrentStatus(); } public function getStudentName() @@ -534,6 +536,7 @@ public function toArray(): array return [ 'studentName' => $this->studentName, 'enrollmentId' => $this->enrollmentId, + 'enrollmentStatus' => $this->enrollmentStatus, 'finalMedia' => $this->finalMedia, 'semAvarage' => $this->semAvarage, 'situation' => $this->situation, diff --git a/app/models/Classroom.php b/app/models/Classroom.php index b516022bb..a9ba94f1c 100755 --- a/app/models/Classroom.php +++ b/app/models/Classroom.php @@ -189,7 +189,7 @@ public function relations() 'classroom_fk', 'join' => 'JOIN student_identification ON student_identification.id=student_fk', 'order' => 'daily_order ASC, student_identification.name', - 'condition' => 'status IN (1, 6, 7, 8, 9, 10) or status IS NULL' + 'condition' => 'status IN (1, 2, 6, 7, 8, 9, 10) or status IS NULL' ), 'activeEnrollmentsCount' => array( self::STAT, diff --git a/js/grades/functions.js b/js/grades/functions.js index b5c0d22d2..5f21a8e45 100644 --- a/js/grades/functions.js +++ b/js/grades/functions.js @@ -189,6 +189,7 @@ function GradeTableBuilder(data) { class="enrollment-id" value="${student.enrollmentId}" /> + ${buildEnrollmentStatusLabel(student.enrollmentStatus)} ${student.studentName} ${buildUnities( @@ -231,6 +232,13 @@ function GradeTableBuilder(data) { ` : '' } + + function buildEnrollmentStatusLabel(status){ + return ``; + } + function buildUnities(unities, isUnityConcept, conceptOptions) { const unitesGrade = unities .map((unity) => { From 7f2e323236468c1abaa4d38bd95f06648955311a Mon Sep 17 00:00:00 2001 From: AnotherOne07 <93009549+AnotherOne07@users.noreply.github.com> Date: Fri, 18 Oct 2024 12:54:02 -0300 Subject: [PATCH 2/4] remove label for no status enrollments --- js/grades/functions.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/grades/functions.js b/js/grades/functions.js index 5f21a8e45..eff892431 100644 --- a/js/grades/functions.js +++ b/js/grades/functions.js @@ -234,7 +234,7 @@ function GradeTableBuilder(data) { } function buildEnrollmentStatusLabel(status){ - return `