|
|
@ -71,6 +71,15 @@ |
|
|
#summaryTable thead tr.dt-hidden-header { |
|
|
#summaryTable thead tr.dt-hidden-header { |
|
|
display: none !important; |
|
|
display: none !important; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
#wardTable { |
|
|
|
|
|
width: 100% !important; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
#wardTable th, |
|
|
|
|
|
#wardTable td { |
|
|
|
|
|
white-space: nowrap; |
|
|
|
|
|
} |
|
|
</style> |
|
|
</style> |
|
|
</head> |
|
|
</head> |
|
|
|
|
|
|
|
|
@ -201,7 +210,7 @@ |
|
|
<tr> |
|
|
<tr> |
|
|
<!-- <th rowspan="2">S.No</th> --> |
|
|
<!-- <th rowspan="2">S.No</th> --> |
|
|
<th rowspan="2">Zone</th> |
|
|
<th rowspan="2">Zone</th> |
|
|
<th colspan="3">License</th> |
|
|
|
|
|
|
|
|
<th colspan="4">License</th> |
|
|
<th colspan="3">Pet Vaccination</th> |
|
|
<th colspan="3">Pet Vaccination</th> |
|
|
<th colspan="3">Community Vaccination</th> |
|
|
<th colspan="3">Community Vaccination</th> |
|
|
</tr> |
|
|
</tr> |
|
|
@ -209,6 +218,7 @@ |
|
|
<th>Total</th> |
|
|
<th>Total</th> |
|
|
<th>Completed</th> |
|
|
<th>Completed</th> |
|
|
<th>Pending</th> |
|
|
<th>Pending</th> |
|
|
|
|
|
<th>Rejected</th> |
|
|
<th>Total</th> |
|
|
<th>Total</th> |
|
|
<th>Completed</th> |
|
|
<th>Completed</th> |
|
|
<th>Pending</th> |
|
|
<th>Pending</th> |
|
|
@ -228,6 +238,7 @@ |
|
|
<td class="lic-total">0</td> |
|
|
<td class="lic-total">0</td> |
|
|
<td class="lic-completed">0</td> |
|
|
<td class="lic-completed">0</td> |
|
|
<td class="lic-pending">0</td> |
|
|
<td class="lic-pending">0</td> |
|
|
|
|
|
<td class="lic-rejected">0</td> |
|
|
<td class="pet-total">0</td> |
|
|
<td class="pet-total">0</td> |
|
|
<td class="pet-completed">0</td> |
|
|
<td class="pet-completed">0</td> |
|
|
<td class="pet-pending">0</td> |
|
|
<td class="pet-pending">0</td> |
|
|
@ -265,6 +276,7 @@ |
|
|
<th>Total</th> |
|
|
<th>Total</th> |
|
|
<th>Approved</th> |
|
|
<th>Approved</th> |
|
|
<th>Pending</th> |
|
|
<th>Pending</th> |
|
|
|
|
|
<th id="rejectedHeader">Rejected</th> |
|
|
</tr> |
|
|
</tr> |
|
|
</thead> |
|
|
</thead> |
|
|
<tbody id="wardTableBody"></tbody> |
|
|
<tbody id="wardTableBody"></tbody> |
|
|
@ -597,7 +609,7 @@ |
|
|
$('#pageLoader').hide(); |
|
|
$('#pageLoader').hide(); |
|
|
|
|
|
|
|
|
let i = 1; |
|
|
let i = 1; |
|
|
let licT = 0, licC = 0, licP = 0; |
|
|
|
|
|
|
|
|
let licT = 0, licC = 0, licP = 0, licR = 0; |
|
|
let petT = 0, petC = 0, petP = 0; |
|
|
let petT = 0, petC = 0, petP = 0; |
|
|
let comT = 0, comC = 0, comP = 0; |
|
|
let comT = 0, comC = 0, comP = 0; |
|
|
|
|
|
|
|
|
@ -627,6 +639,7 @@ |
|
|
</td> |
|
|
</td> |
|
|
<td>${lic.approved_Licenses}</td> |
|
|
<td>${lic.approved_Licenses}</td> |
|
|
<td>${lic.pending_Licenses}</td> |
|
|
<td>${lic.pending_Licenses}</td> |
|
|
|
|
|
<td>${lic.rejected_Licenses}</td> |
|
|
|
|
|
|
|
|
<!-- PET VACCINATION --> |
|
|
<!-- PET VACCINATION --> |
|
|
<td> |
|
|
<td> |
|
|
@ -656,6 +669,7 @@ |
|
|
licT += lic.total_licensesApplied; |
|
|
licT += lic.total_licensesApplied; |
|
|
licC += lic.approved_Licenses; |
|
|
licC += lic.approved_Licenses; |
|
|
licP += lic.pending_Licenses; |
|
|
licP += lic.pending_Licenses; |
|
|
|
|
|
licR += lic.rejected_Licenses; |
|
|
|
|
|
|
|
|
petT += vacc.total; |
|
|
petT += vacc.total; |
|
|
petC += vacc.completed; |
|
|
petC += vacc.completed; |
|
|
@ -673,6 +687,7 @@ |
|
|
$(".lic-total").text(licT); |
|
|
$(".lic-total").text(licT); |
|
|
$(".lic-completed").text(licC); |
|
|
$(".lic-completed").text(licC); |
|
|
$(".lic-pending").text(licP); |
|
|
$(".lic-pending").text(licP); |
|
|
|
|
|
$(".lic-rejected").text(licR); |
|
|
|
|
|
|
|
|
$(".pet-total").text(petT); |
|
|
$(".pet-total").text(petT); |
|
|
$(".pet-completed").text(petC); |
|
|
$(".pet-completed").text(petC); |
|
|
@ -764,6 +779,7 @@ |
|
|
async function openWardModal(type, zoneNo) { |
|
|
async function openWardModal(type, zoneNo) { |
|
|
|
|
|
|
|
|
$("#wardTableBody").empty(); |
|
|
$("#wardTableBody").empty(); |
|
|
|
|
|
$("#rejectedHeader").hide(); |
|
|
|
|
|
|
|
|
// Destroy previous DataTable |
|
|
// Destroy previous DataTable |
|
|
if ($.fn.DataTable.isDataTable('#wardTable')) { |
|
|
if ($.fn.DataTable.isDataTable('#wardTable')) { |
|
|
@ -782,8 +798,10 @@ |
|
|
let title = ''; |
|
|
let title = ''; |
|
|
let wardList = []; |
|
|
let wardList = []; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* ================= LICENSE ================= */ |
|
|
/* ================= LICENSE ================= */ |
|
|
if (type === 'LICENSE') { |
|
|
if (type === 'LICENSE') { |
|
|
|
|
|
$("#rejectedHeader").show(); |
|
|
|
|
|
|
|
|
title = `Zone ${zoneNo} – License`; |
|
|
title = `Zone ${zoneNo} – License`; |
|
|
$("#modalZone").text(title); |
|
|
$("#modalZone").text(title); |
|
|
@ -800,7 +818,8 @@ |
|
|
wardName: obj.wardName, |
|
|
wardName: obj.wardName, |
|
|
total: obj.total_licensesApplied, |
|
|
total: obj.total_licensesApplied, |
|
|
completed: obj.approved_Licenses, |
|
|
completed: obj.approved_Licenses, |
|
|
pending: obj.pending_Licenses |
|
|
|
|
|
|
|
|
pending: obj.pending_Licenses, |
|
|
|
|
|
rejected: obj.rejected_Licenses || 0 |
|
|
}); |
|
|
}); |
|
|
} |
|
|
} |
|
|
}); |
|
|
}); |
|
|
@ -867,6 +886,11 @@ |
|
|
/* ================= RENDER MODAL TABLE ================= */ |
|
|
/* ================= RENDER MODAL TABLE ================= */ |
|
|
let i = 1; |
|
|
let i = 1; |
|
|
wardList.forEach(w => { |
|
|
wardList.forEach(w => { |
|
|
|
|
|
let rejectedColumn = ''; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$("#wardTableBody").append(` |
|
|
$("#wardTableBody").append(` |
|
|
<tr> |
|
|
<tr> |
|
|
<!--<td>${i++}</td>--> |
|
|
<!--<td>${i++}</td>--> |
|
|
@ -874,15 +898,35 @@ |
|
|
<td>${w.total}</td> |
|
|
<td>${w.total}</td> |
|
|
<td>${w.completed}</td> |
|
|
<td>${w.completed}</td> |
|
|
<td>${w.pending}</td> |
|
|
<td>${w.pending}</td> |
|
|
|
|
|
<td class="rejected-col">${w.rejected || 0}</td> |
|
|
|
|
|
|
|
|
</tr> |
|
|
</tr> |
|
|
`); |
|
|
`); |
|
|
}); |
|
|
}); |
|
|
|
|
|
// Show rejected column only for License |
|
|
|
|
|
if (type === 'LICENSE') { |
|
|
|
|
|
$("#rejectedHeader").show(); |
|
|
|
|
|
$(".rejected-col").show(); |
|
|
|
|
|
} else { |
|
|
|
|
|
$("#rejectedHeader").hide(); |
|
|
|
|
|
$(".rejected-col").hide(); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
/* ================= EXPORT ================= */ |
|
|
/* ================= EXPORT ================= */ |
|
|
initWardExport( |
|
|
initWardExport( |
|
|
title.replace(/\s+/g, '_') + |
|
|
title.replace(/\s+/g, '_') + |
|
|
(fromDate && toDate ? `_${fromDate}_to_${toDate}` : '') |
|
|
(fromDate && toDate ? `_${fromDate}_to_${toDate}` : '') |
|
|
); |
|
|
); |
|
|
|
|
|
if ($.fn.DataTable.isDataTable('#wardTable')) { |
|
|
|
|
|
|
|
|
|
|
|
const table = $('#wardTable').DataTable(); |
|
|
|
|
|
|
|
|
|
|
|
if (type === 'LICENSE') { |
|
|
|
|
|
table.column(4).visible(true); |
|
|
|
|
|
} else { |
|
|
|
|
|
table.column(4).visible(false); |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
new bootstrap.Modal(document.getElementById("wardModal")).show(); |
|
|
new bootstrap.Modal(document.getElementById("wardModal")).show(); |
|
|
} |
|
|
} |
|
|
|