Commit 24f5c3bf authored by Sneha 's avatar Sneha

chore: enable className in download modals

parent 05a44273
......@@ -273,12 +273,13 @@ $(document).ready(function () {
$('#counsellorScoring').click(function () {
let schoolName = $('#schoolFilterReport').val();
let interactionDate = $('#dateFilterReport').val();
let className = $('#classFilterReport').val();
if (!schoolName || !interactionDate) {
if (!schoolName || !interactionDate || !className) {
$('#reportModal').modal('hide');
$('#messageModal .modal-title').text('Error');
$('#messageModal .modal-body').text(
'Please select school and date to download counsellor scoring sheet.'
'Please select school,class and date to download counsellor scoring sheet.'
);
$('#messageModal').modal('show');
return;
......@@ -289,7 +290,7 @@ $(document).ready(function () {
BASE_URL_LAMARTIN +
`/admission-form/download-counsellor-scoring-template?apikey=${
loginData.apiKey
}&schoolName=${schoolName}&interactionDate=${interactionDate}`,
}&schoolName=${schoolName}&className=${className}&interactionDate=${interactionDate}`,
'_blank'
)
.focus();
......@@ -298,12 +299,13 @@ $(document).ready(function () {
$('#interactionScoring').click(function () {
let schoolName = $('#schoolFilterReport').val();
let interactionDate = $('#dateFilterReport').val();
let className = $('#classFilterReport').val();
if (!schoolName || !interactionDate) {
if (!schoolName || !interactionDate || !className) {
$('#reportModal').modal('hide');
$('#messageModal .modal-title').text('Error');
$('#messageModal .modal-body').text(
'Please select school and date to download counsellor scoring sheet.'
'Please select school , class and date to download interaction scoring sheet.'
);
$('#messageModal').modal('show');
return;
......@@ -314,7 +316,7 @@ $(document).ready(function () {
BASE_URL_LAMARTIN +
`/admission-form/download-interaction-scoring-template?apikey=${
loginData.apiKey
}&schoolName=${schoolName}&interactionDate=${interactionDate}`,
}&schoolName=${schoolName}&className=${className}&interactionDate=${interactionDate}`,
'_blank'
)
.focus();
......@@ -323,12 +325,13 @@ $(document).ready(function () {
$('#download-interaction-sheet-btn').click(function () {
let schoolName = $('#schoolFilterReport').val();
let interactionDate = $('#dateFilterReport').val();
let className = $('#classFilterReport').val();
if (!schoolName || !interactionDate) {
if (!schoolName || !interactionDate || !className) {
$('#reportModal').modal('hide');
$('#messageModal .modal-title').text('Error');
$('#messageModal .modal-body').text(
'Please select school and date to download counsellor scoring sheet.'
'Please select school,class and date to download interaction scoring sheet.'
);
$('#messageModal').modal('show');
return;
......@@ -341,7 +344,10 @@ $(document).ready(function () {
loginData.apiKey
}&schoolName=${
schoolName
}&interactionDate=${
}&className=${
className
}
&interactionDate=${
interactionDate
}`,
'_blank'
......@@ -352,12 +358,13 @@ $(document).ready(function () {
$('#download-interaction-excel-btn').click(function () {
let schoolName = $('#schoolFilterReport').val();
let interactionDate = $('#dateFilterReport').val();
let className = $('#classFilterReport').val();
if (!schoolName || !interactionDate) {
if (!schoolName || !interactionDate || !className) {
$('#reportModal').modal('hide');
$('#messageModal .modal-title').text('Error');
$('#messageModal .modal-body').text(
'Please select school and date to download counsellor scoring sheet.'
'Please select school,class and date to download interaction scoring sheet.'
);
$('#messageModal').modal('show');
return;
......@@ -370,6 +377,8 @@ $(document).ready(function () {
loginData.apiKey
}&schoolName=${
schoolName
}&className=${
className
}&interactionDate=${
interactionDate
}`,
......@@ -382,12 +391,13 @@ $(document).ready(function () {
$('#download-admission-excel-btn').click(function () {
let schoolName = $('#admissionSchoolFilterReport').val();
let admissionDate = $('#admissionDateFilterReport').val();
let className = $('#classFilterReport').val();
if (!schoolName || !admissionDate) {
if (!schoolName || !admissionDate || !className) {
$('#reportModal').modal('hide');
$('#messageModal .modal-title').text('Error');
$('#messageModal .modal-body').text(
'Please select school and date to download counsellor scoring sheet.'
'Please select school,class and date to download counsellor scoring sheet.'
);
$('#messageModal').modal('show');
return;
......@@ -400,6 +410,8 @@ $(document).ready(function () {
loginData.apiKey
}&schoolName=${
schoolName
}&className=${
className
}&admissionDate=${
admissionDate
}`,
......@@ -416,12 +428,13 @@ $(document).ready(function () {
$('#downloadAdmissionFormList').click(function () {
let schoolName = $('#admissionSchoolFilterReport').val();
let admissionDate = $('#admissionDateFilterReport').val();
let className = $('#classFilterReport').val();
if (!schoolName || !admissionDate) {
if (!schoolName || !admissionDate || !className) {
$('#admissionReportModal').modal('hide');
$('#messageModal .modal-title').text('Error');
$('#messageModal .modal-body').text(
'Please select school and date to proceed.'
'Please select school,class and date to proceed.'
);
$('#messageModal').modal('show');
return;
......@@ -434,6 +447,8 @@ $(document).ready(function () {
loginData.apiKey
}&schoolName=${
schoolName
}&className=${
className
}&admissionDate=${
admissionDate
}`,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment