Linux ip-172-26-7-228 5.4.0-1103-aws #111~18.04.1-Ubuntu SMP Tue May 23 20:04:10 UTC 2023 x86_64
Your IP : 3.135.202.168
function callAbsentAndMalpracticeReport() {
$("#page_main_div").load("../html_modules/absentMalpractise.html?v=1001", {
function() {
document.getElementById("display_module_name").innerHTML =
"Absent & Malpractice Report";
document.getElementById("module_name_for_save").value =
"Absent & Malpractice Report";
getDefaultHeadFooterLinks("Absent and Malpractice Report");
getDeggrp();
},
});
}
function getDeggrp() {
$.ajax({
type: "POST",
url: $host_url + "loaddeggrp",
success: function (res) {
let response = JSON.parse(res);
if (response.error_code == -1) {
alert(response.data);
return;
} else {
var option = `<option value=''>---Select---</option>`;
for (i = 0; i < response.data.length; i++) {
option += `<option value='${response.data[i]["code"]}'>${response.data[i]["value"]}</option>`;
}
document.getElementById("deggrp").innerHTML = option;
}
},
});
}
function getExamdateExamName(degree, type) {
if (degree === undefined) {
var degree = $("#deggrp").val();
var type = "deggrp";
}
geExamData(degree, type);
}
function geExamData(degree, type) {
$.ajax({
type: "POST",
url: $host_url + "getDegreeResExamName",
data: "°ree=" + degree + "&type=" + type,
success: getDegreeResExamNameSuccess,
});
}
function getDegreeResExamNameSuccess($responce) {
$responce = eval("(" + $responce + ")");
document.getElementById("yearmode").options.length = 0;
var degexamdate = $responce.data["degexamdate"];
$op = new Option("--Select--", "");
document.getElementById("yearmode").options.add($op);
for ($i = 0; $i < degexamdate.length; $i++) {
$op = new Option(
degexamdate[$i]["VALUE"],
degexamdate[$i]["internal_code"]
);
$op.id = degexamdate[$i]["internal_code"];
document.getElementById("yearmode").options.add($op);
}
}
function getExamdateExamName(degree, type) {
if (degree === undefined) {
var degree = $("#deggrp").val();
var type = "deggrp";
}
geExamData(degree, type);
}
function generateAbsentMalPracticeReport() {
var degreegrp = document.getElementById("deggrp").value;
var yearmode = document.getElementById("yearmode").value;
var fromdate = document.getElementById("fromdaterange").value;
// console.log(fromdate, "from");
var todate = document.getElementById("todaterange").value;
if (degreegrp == "") {
alert("Plese Select degree group");
$("#deggrp").focus();
return;
}
if (yearmode == "") {
alert("Please Select Report Type");
$("#yearmode").focus();
return;
}
if (fromdate == "") {
alert("Please Select date range(From)");
$("#fromdaterange").focus();
return;
}
if (todate == "") {
alert("Please Select date range(To)");
$("#todaterange").focus();
return;
}
window.open(
$host_url +
"absentAndMalReport°grp=" +
degreegrp +
"&yearmode=" +
yearmode +
"&fromdaterange=" +
fromdate +
"&todaterange=" +
todate
);
}
|