Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
ELC_elections
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
gestion-des-assemblees
ELC_elections
Commits
34820625
Commit
34820625
authored
4 years ago
by
Alexis POYEN
Browse files
Options
Downloads
Patches
Plain Diff
Feat : add filter for areas
parent
0747d55b
No related branches found
Branches containing commit
No related tags found
1 merge request
!86
Resolve "Search Field"
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
web/components/management/candidate-lists.js
+22
-1
22 additions, 1 deletion
web/components/management/candidate-lists.js
web/components/management/round-desks.js
+0
-2
0 additions, 2 deletions
web/components/management/round-desks.js
with
22 additions
and
3 deletions
web/components/management/candidate-lists.js
+
22
−
1
View file @
34820625
...
@@ -54,6 +54,18 @@ class CandidateList {
...
@@ -54,6 +54,18 @@ class CandidateList {
<h5 class="title is-5">
<h5 class="title is-5">
Circonscriptions
Circonscriptions
</h5>
</h5>
<div class="field">
<p class="control has-icons-right">
<input
id="area-search"
class="input"
placeholder="Rechercher une circonscription"
/>
<span class="icon is-small is-right">
<i class="fas fa-search"></i>
</span>
</p>
</div>
<div id="areas-round"></div>
<div id="areas-round"></div>
</div>
</div>
<div class="column">
<div class="column">
...
@@ -433,6 +445,10 @@ class CandidateList {
...
@@ -433,6 +445,10 @@ class CandidateList {
}
}
await
candidateListHandler
.
saveCandidateList
();
await
candidateListHandler
.
saveCandidateList
();
});
});
document
.
getElementById
(
"
area-search
"
).
addEventListener
(
"
keyup
"
,
(
e
)
=>
{
this
.
displayAreas
();
});
}
}
async
displayAreas
()
{
async
displayAreas
()
{
...
@@ -458,9 +474,14 @@ class CandidateList {
...
@@ -458,9 +474,14 @@ class CandidateList {
async
updateAreas
()
{
async
updateAreas
()
{
let
candidateListHandler
=
this
;
let
candidateListHandler
=
this
;
let
areas
=
await
this
.
AreaModel
.
getAreas
();
let
areas
=
await
this
.
AreaModel
.
getAreas
();
re
turn
areas
.
filter
(
function
(
area
)
{
a
re
as
=
areas
.
filter
(
function
(
area
)
{
return
area
.
ElectionID
==
candidateListHandler
.
round
.
ElectionID
;
return
area
.
ElectionID
==
candidateListHandler
.
round
.
ElectionID
;
});
});
return
areas
.
filter
((
area
)
=>
area
.
Name
.
toLowerCase
().
includes
(
document
.
getElementById
(
"
area-search
"
).
value
.
toLowerCase
()
)
);
}
}
async
activateArea
(
areaToActivate
)
{
async
activateArea
(
areaToActivate
)
{
...
...
This diff is collapsed.
Click to expand it.
web/components/management/round-desks.js
+
0
−
2
View file @
34820625
...
@@ -80,7 +80,6 @@ class RoundDesk {
...
@@ -80,7 +80,6 @@ class RoundDesk {
});
});
document
.
getElementById
(
"
desk-search
"
).
addEventListener
(
"
keyup
"
,
(
e
)
=>
{
document
.
getElementById
(
"
desk-search
"
).
addEventListener
(
"
keyup
"
,
(
e
)
=>
{
console
.
log
(
document
.
getElementById
(
"
desk-search
"
).
value
.
toLowerCase
());
this
.
displayDesks
();
this
.
displayDesks
();
});
});
}
}
...
@@ -229,7 +228,6 @@ class RoundDesk {
...
@@ -229,7 +228,6 @@ class RoundDesk {
async
displayDesks
()
{
async
displayDesks
()
{
document
.
getElementById
(
"
desk-rounds-list
"
).
innerHTML
=
/* HTML */
``
;
document
.
getElementById
(
"
desk-rounds-list
"
).
innerHTML
=
/* HTML */
``
;
console
.
log
(
document
.
getElementById
(
"
desk-search
"
).
value
.
toLowerCase
());
let
deskRounds
=
await
this
.
updateDeskRounds
();
let
deskRounds
=
await
this
.
updateDeskRounds
();
const
markup
=
deskRounds
const
markup
=
deskRounds
.
map
((
deskRound
)
=>
this
.
deskRoundTemplate
(
deskRound
))
.
map
((
deskRound
)
=>
this
.
deskRoundTemplate
(
deskRound
))
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment