Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
LaMartin-Webomagic
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Deep Dey
LaMartin-Webomagic
Commits
601c4d2b
Commit
601c4d2b
authored
Jul 03, 2025
by
Deep Dey
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: add filter for dashboard with count
parent
bbdfe897
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
66 additions
and
10 deletions
+66
-10
lamartinDashboard/dashboard.html
lamartinDashboard/dashboard.html
+32
-1
lamartinDashboard/js/dashboard.js
lamartinDashboard/js/dashboard.js
+34
-9
No files found.
lamartinDashboard/dashboard.html
View file @
601c4d2b
...
...
@@ -16,10 +16,17 @@
<div
class=
"container"
>
<div
class=
"row"
>
<div
class=
"col-lg-3"
style=
"margin-top: 95px;"
>
<div
class=
"col-lg-3"
>
<div
class=
"navbar-filter"
>
<!-- <h5>Filters</h5>
<hr /> -->
<div
class=
"filter-box"
>
<label
for=
"sessionFilter"
class=
"filter-label"
>
Session
</label>
<select
id=
"sessionFilter"
class=
"form-control"
>
<option
value=
"2025-2026"
>
2025-2026
</option>
<option
value=
"2026-2027"
selected
>
2026-2027
</option>
</select>
</div>
<div
class=
"filter-box"
>
<label
for=
"schoolFilter"
class=
"filter-label"
>
School
</label>
<select
id=
"schoolFilter"
class=
"form-control"
>
...
...
@@ -48,6 +55,30 @@
<option
value=
"Class 11"
>
Class 11
</option>
</select>
</div>
<div
class=
"filter-box"
>
<label
for=
"categoryFilter"
class=
"filter-label"
>
Category
</label>
<select
id=
"categoryFilter"
class=
"form-control"
>
<option
value=
""
>
Specify Category
</option>
<option
value=
"General"
>
General
</option>
<option
value=
"Brother / Sister"
>
Brother /
Sister(Not Cousins) studying at La Martiniere, Kolkata
</option>
<option
value=
"Staff Child"
>
Staff Child
</option>
<option
value=
"Ex-Student"
>
Ex-Student
</option>
</select>
</div>
<div
class=
"filter-box"
>
<label
for=
"religionFilter"
class=
"filter-label"
>
Religion
</label>
<select
id=
"religionFilter"
class=
"form-control"
>
<option
value=
""
>
Specify Religion
</option>
<option
value=
"Christian"
>
Christian
</option>
<option
value=
"Hindu"
>
Hindu
</option>
<option
value=
"Muslim"
>
Muslim
</option>
<option
value=
"Sikh"
>
Sikh
</option>
<option
value=
"Buddhist"
>
Buddhist
</option>
<option
value=
"Jain"
>
Jain
</option>
<option
value=
"Other"
>
Other
</option>
</select>
</div>
<div
class=
"filter-box"
>
<label
for=
"dateFilter"
class=
"filter-label"
>
Interaction Date
</label>
<input
type=
"date"
id=
"dateFilter"
class=
"form-control"
/>
...
...
lamartinDashboard/js/dashboard.js
View file @
601c4d2b
...
...
@@ -6,17 +6,22 @@ $(document).ready(function () {
window
.
location
.
href
=
'
index.html
'
;
}
let
sessionYear
=
$
(
'
#sessionFilter
'
).
val
();
// initially display all admission data
displayFormCount
();
getAdmissionData
(
null
,
null
,
null
,
null
,
null
);
displayFormCount
(
sessionYear
);
getAdmissionData
(
null
,
null
,
null
,
null
,
null
,
null
,
null
,
sessionYear
);
function
displayFormCount
()
{
function
displayFormCount
(
sessionYear
)
{
$
.
ajax
({
url
:
BASE_URL_LAMARTIN
+
'
/admission-form/count
'
,
type
:
'
GET
'
,
headers
:
{
'
accept
'
:
'
application/json
'
,
apikey
:
loginData
.
apiKey
contentType
:
'
application/json
'
,
dataType
:
'
json
'
,
headers
:
{
apikey
:
loginData
.
apiKey
,
},
data
:
{
sessionYear
:
sessionYear
},
success
:
function
(
response
)
{
$
(
'
#totalRecordsLMG
'
).
html
(
response
.
data
.
lmgcount
);
...
...
@@ -70,7 +75,10 @@ $(document).ready(function () {
className
,
interactionDate
,
interactionTime
,
correspondenceEmail
correspondenceEmail
,
category
,
religion
,
sessionYear
)
{
let
queryData
=
{};
...
...
@@ -93,6 +101,15 @@ $(document).ready(function () {
);
queryData
.
interactionTime
=
formatAMPM
(
selectedDateTime
);
}
if
(
category
)
{
queryData
.
category
=
category
;
}
if
(
religion
)
{
queryData
.
religion
=
religion
;
}
if
(
sessionYear
)
{
queryData
.
sessionYear
=
sessionYear
;
}
$
.
ajax
({
url
:
BASE_URL_LAMARTIN
+
'
/admission-form/get-all
'
,
...
...
@@ -144,7 +161,11 @@ $(document).ready(function () {
var
dateFilter
=
$
(
'
#dateFilter
'
).
val
();
var
timeFilter
=
$
(
'
#timeFilter
'
).
val
();
var
emailFilter
=
$
(
'
#emailFilter
'
).
val
();
getAdmissionData
(
schoolFilter
,
classFilter
,
dateFilter
,
timeFilter
,
emailFilter
);
var
categoryFilter
=
$
(
'
#categoryFilter
'
).
val
();
var
religionFilter
=
$
(
'
#religionFilter
'
).
val
();
var
sessionYearFilter
=
$
(
'
#sessionFilter
'
).
val
();
getAdmissionData
(
schoolFilter
,
classFilter
,
dateFilter
,
timeFilter
,
emailFilter
,
categoryFilter
,
religionFilter
,
sessionYearFilter
);
displayFormCount
(
sessionYearFilter
);
});
// Reset filters button click event
...
...
@@ -154,7 +175,11 @@ $(document).ready(function () {
$
(
'
#dateFilter
'
).
val
(
''
);
$
(
'
#timeFilter
'
).
val
(
''
);
$
(
'
#emailFilter
'
).
val
(
''
);
getAdmissionData
(
null
,
null
,
null
,
null
,
null
);
$
(
'
#categoryFilter
'
).
val
(
''
);
$
(
'
#religionFilter
'
).
val
(
''
);
var
sessionYearFilter
=
$
(
'
#sessionFilter
'
).
val
();
getAdmissionData
(
null
,
null
,
null
,
null
,
null
,
null
,
null
,
sessionYearFilter
);
displayFormCount
(
sessionYearFilter
);
});
// Select all checkbox click event
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment