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

feat: add admission form count in dashboard

parent 53430e35
...@@ -5,7 +5,8 @@ body { ...@@ -5,7 +5,8 @@ body {
font-size: 13px; font-size: 13px;
} }
.btn, .form-control { .btn,
.form-control {
font-size: 13px; font-size: 13px;
} }
...@@ -86,4 +87,15 @@ body { ...@@ -86,4 +87,15 @@ body {
.navbar-filter input { .navbar-filter input {
width: 100%; width: 100%;
margin-bottom: 10px; 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 @@ ...@@ -59,6 +59,10 @@
</div> </div>
</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="details-container" style="height: 350px;">
<div class="table-responsive"> <div class="table-responsive">
<table class="table table-bordered"> <table class="table table-bordered">
......
...@@ -7,8 +7,33 @@ $(document).ready(function () { ...@@ -7,8 +7,33 @@ $(document).ready(function () {
} }
// initially display all admission data // initially display all admission data
displayFormCount();
getAdmissionData(null, null, null, null, null); 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() { function displayFilteredStudents() {
var filteredData = studentData; 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