Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mostra dias letivos no registro de frequência #148

Open
wants to merge 2 commits into
base: 1.6
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions app/assets/javascripts/beta_function.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
$(document).ready( function() {
let beta_title = 'Este recurso ainda está em processo de desenvolvimento e pode apresentar problemas'
let img_src = $('#image-beta').attr('src');
$(".fa-file-text-o").closest('h2').after(`<img src="${img_src}" class="beta-badge" style="margin-bottom: 9px; margin-left: 5px" title="${beta_title}">`);
})
38 changes: 38 additions & 0 deletions app/assets/javascripts/views/conceptual_exams_in_batchs/new.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
$(function() {
'use strict';
const flashMessages = new FlashMessages();

$('#conceptual_exam_classroom_id').on('change', function () {
flashMessages.pop('');
$('#conceptual_exam_step_id').select2('val', '');

populateSteps();
});

function populateSteps() {
let classroom_id = $('#conceptual_exam_classroom_id').select2('val');

if (!_.isEmpty(classroom_id)) {
$.ajax({
url: Routes.get_steps_conceptual_exams_in_batchs_pt_br_path({
classroom_id: classroom_id,
format: 'json'
}),
success: handleFetchStepsSuccess,
error: handleFetchStepsError
});
}
}

function handleFetchStepsSuccess(data) {
let steps = _.map(data.conceptual_exams_in_batchs, function(step) {
return { id: step.table.id, name: step.table.name, text: step.table.text };
});

$('#conceptual_exam_step_id').select2({ data: steps })
}

function handleFetchStepsError() {
flashMessages.error('Ocorreu um erro ao buscar as etapas da turma.');
}
});
3 changes: 2 additions & 1 deletion app/controllers/attendance_record_report_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@ def report
@attendance_record_report_form.second_teacher_signature,
@attendance_record_report_form.students_frequencies_percentage,
current_user,
resource_params[:classroom_id]
resource_params[:classroom_id],
@attendance_record_report_form.school_days
)
send_pdf(t('routes.attendance_record'), attendance_record_report.render)
else
Expand Down
Loading
Loading