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 : 18.117.72.24
Current Path : /var/www/oasis/js/ |
| Current File : /var/www/oasis/js/attTeachSum.js |
function callAttTeachSum() {
$("#page_main_div").load(
"../html_modules/attTeachSum.html?v=1122",
function () {
document.getElementById("display_module_name").innerHTML =
"Attendance Report Teach. Wise";
document.getElementById("module_name_for_save").value =
"Attendance Report Teach. Wise";
getDefaultHeadFooterLinks("Attendance Report Teach. Wise");
getAttTeachDegree();
}
);
}
function getAttTeachDegree() {
$.ajax({
type: "GET",
url: $host_url + "getAttTeachDegree",
success: function (res) {
let response = JSON.parse(res);
let degarry = response.data.degcode;
let semarry = response.data.semcode;
let secarry = response.data.sectioncode;
let degopt = `<option value='All'>All</option>`;
for (let index = 0; index < degarry.length; index++) {
degopt += `<option value='${degarry[index].id}'>${degarry[index].value}</option>`;
}
$("#degree").html(degopt);
let semopt = `<option value='All'>All</option>`;
for (let index = 0; index < semarry.length; index++) {
semopt += `<option value='${semarry[index].id}'>${semarry[index].value}</option>`;
}
$("#sem").html(semopt);
let secopt = `<option value='All'>All</option>`;
for (let index = 0; index < secarry.length; index++) {
secopt += `<option value='${secarry[index].id}'>${secarry[index].value}</option>`;
}
$("#section").html(secopt);
},
});
}
function viewAttTeachSum() {
let degree = $("#degree").val();
let sem = $("#sem").val();
let section = $("#section").val();
let fdate = $("#fdate").val();
if (degree == "") {
alert("select degree");
return;
}
if (sem == "") {
alert("select sem");
return;
}
$.ajax({
type: "GET",
url: $host_url + "viewAttTeachSum",
data: "degree=" + degree + "&sem=" + sem + "§ion=" + section+"&fdate="+fdate,
success: function (res) {
let response = JSON.parse(res);
let table = `<table class='table'>
<thead>
<tr class='ui-state-default ui-jqgrid-hdiv'>
<th class='column'>Sl. No.</th>
<th class='column'>Degree</th>
<th class='column'>Semester</th>
<th class='column'>Subject Name</th>
<th class='column'>Teacher Name</th>
<th class='column'>Class Name</th>
<th class='column'>Period</th>
<th class='column'>No. Class</th>
<th class='column'>Tot. Stud.</th>
<th class='column'>Tot. Present</th>
<th class='column'>Tot. Absent</th>
</tr>
</thead>
<tbody>`;
if (response.error_code === 0) {
for (let index = 0; index < response.data.length; index++) {
table += `<tr class='row'>`;
table += `<td class='column'>${index + 1}</td>`;
table += `<td class='column'>${response.data[index].fdegree}</td>`;
table += `<td class='column'>${response.data[index].fexamno}</td>`;
table += `<td class='column' style='text-align: initial;'>${response.data[index].fsubname}</td>`;
table += `<td class='column' style='text-align: initial;'>${response.data[index].fteachname}</td>`;
table += `<td class='column' style='text-align: initial;'>${response.data[index].fclassname}</td>`;
table += `<td class='column'>${response.data[index].fperiod}</td>`;
table += `<td class='column'>${response.data[index].fnoclass}</td>`;
table += `<td class='column'>${response.data[index].ftot}</td>`;
table += `<td class='column'>${response.data[index].fpresent}</td>`;
table += `<td class='column'>${response.data[index].fabsnet}</td>`;
table += `</tr>`;
}
} else {
table += `<tr class='row'>`;
table += `<td class='column' colspan='11'>No Data Found</td>`;
table += `</tr>`;
}
table += `</tbody></table>`;
$("#tabledata").html(table);
},
});
}
|