Commit 5108c51e authored by Deep Dey's avatar Deep Dey

feat: add admission form count in dashboard

parent 53430e35
......@@ -5,7 +5,8 @@ body {
font-size: 13px;
}
.btn, .form-control {
.btn,
.form-control {
font-size: 13px;
}
......@@ -87,3 +88,14 @@ body {
width: 100%;
margin-bottom: 10px;
}
.record-data {
display: flex;
justify-content: space-between;
/* align-items: center; */
font-weight: bold;
font-size: 15px;
padding-bottom: 10px;
/* padding-left: 10px; */
/* padding-right: 10px; */
}
\ No newline at end of file
......@@ -59,6 +59,10 @@
</div>
</div>
<div class="record-data">
<div>Total Records for LMB: <span id="totalRecordsLMB">0</span></div>
<div>Total Records for LMG: <span id="totalRecordsLMG">0</span></div>
</div>
<div class="details-container" style="height: 350px;">
<div class="table-responsive">
<table class="table table-bordered">
......
......@@ -7,8 +7,33 @@ $(document).ready(function () {
}
// initially display all admission data
displayFormCount();
getAdmissionData(null, null, null, null, null);
function displayFormCount() {
$.ajax({
url: BASE_URL_LAMARTIN + '/admission-form/count',
type: 'GET',
headers: {
'accept': 'application/json',
apikey: loginData.apiKey
},
success: function(response) {
$('#totalRecordsLMG').html(response.data.lmgcount);
$('#totalRecordsLMB').html(response.data.lmbcount);
},
error: function(error) {
console.error('Error:', error);
// Handle error messages
if (error.responseJSON && error.responseJSON.message) {
alert('Request failed: ' + error.responseJSON.message);
} else {
alert('An unexpected error occurred. Please try again.');
}
}
});
}
function displayFilteredStudents() {
var filteredData = studentData;
......
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