Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
SCODOC_R6A06
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
Package registry
Model registry
Operate
Environments
Terraform modules
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
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Adrien Degand
SCODOC_R6A06
Commits
15255115
Commit
15255115
authored
1 year ago
by
Adrien Degand
Browse files
Options
Downloads
Patches
Plain Diff
Add hidePictures checkbox in signal_assuiduites_group.j2 and edit view assiduites.js
parent
e415a525
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
app/static/js/assiduites.js
+28
-25
28 additions, 25 deletions
app/static/js/assiduites.js
app/templates/assiduites/pages/signal_assiduites_group.j2
+11
-2
11 additions, 2 deletions
app/templates/assiduites/pages/signal_assiduites_group.j2
with
39 additions
and
27 deletions
app/static/js/assiduites.js
+
28
−
25
View file @
15255115
...
...
@@ -134,6 +134,8 @@ function validateSelectors(btn) {
generateAllEtudRow
();
btn
.
remove
();
document
.
querySelector
(
"
.hide_pictures_holder
"
).
remove
();
// Auto actualisation
$
(
"
#tl_date
"
).
on
(
"
change
"
,
updateEtudList
);
$
(
"
#group_ids_sel
"
).
on
(
"
change
"
,
updateEtudList
);
...
...
@@ -714,7 +716,7 @@ function setupDate(onchange = null) {
if
(
!
document
.
querySelector
(
"
.selectors
"
).
disabled
)
{
try
{
document
.
querySelector
(
"
.infos .ui-datepicker-trigger
"
).
click
();
}
catch
{}
}
catch
{
}
}
});
...
...
@@ -1331,12 +1333,11 @@ function getAllAssiduitesFromEtud(
)
{
const
url_api
=
getUrl
()
+
`/api/assiduites/
${
etudid
}${
order
?
"
/query?order%°
"
.
replace
(
"
%
"
,
justifs
?
"
&with_justifs
"
:
""
)
.
replace
(
"
°
"
,
courant
?
"
&courant
"
:
""
)
:
""
`/api/assiduites/
${
etudid
}${
order
?
"
/query?order%°
"
.
replace
(
"
%
"
,
justifs
?
"
&with_justifs
"
:
""
)
.
replace
(
"
°
"
,
courant
?
"
&courant
"
:
""
)
:
""
}
`
;
async_get
(
url_api
,
...
...
@@ -1344,7 +1345,7 @@ function getAllAssiduitesFromEtud(
assiduites
[
etudid
]
=
data
;
action
(
data
);
},
(
_
)
=>
{}
(
_
)
=>
{
}
);
}
...
...
@@ -1486,7 +1487,12 @@ function generateEtudRow(
});
if
(
readOnly
)
assi
=
""
;
const
conflit
=
assiduite
.
type
==
"
conflit
"
&&
!
readOnly
?
"
conflit
"
:
""
;
const
pdp_url
=
`
${
getUrl
()}
/api/etudiant/etudid/
${
etud
.
id
}
/photo?size=small`
;
const
hidePicturesCheckbox
=
document
.
querySelector
(
"
#hide_pictures
"
);
let
profilePicture
=
""
;
if
(
!
hidePicturesCheckbox
.
checked
)
{
profilePicture
=
`<img class="pdp" src="
${
`
${
getUrl
()}
/api/etudiant/etudid/
${
etud
.
id
}
/photo?size=small`
}
">`
;
}
let
defdem
=
""
;
...
...
@@ -1494,16 +1500,15 @@ function generateEtudRow(
if
(
etud
.
id
in
etudsDefDem
)
{
defdem
=
etudsDefDem
[
etud
.
id
]
==
"
D
"
?
"
dem
"
:
"
def
"
;
}
}
catch
(
_
)
{}
}
catch
(
_
)
{
}
const
HTML
=
`<div class="etud_row
${
conflit
}
${
defdem
}
" id="etud_row_
${
etud
.
id
}
">
const
HTML
=
`<div class="etud_row
${
conflit
}
${
defdem
}
" id="etud_row_
${
etud
.
id
}
">
<div class="index">
${
index
}
</div>
<div class="name_field">
<img class="pdp" src="
${
pdp_url
}
">
${
profilePicture
}
<a class="name_set" href="bilan_etud?etudid=
${
etud
.
id
}
">
<h4 class="nom">
${
etud
.
nom
}
</h4>
...
...
@@ -1515,9 +1520,8 @@ function generateEtudRow(
<div id="prevDateAssi" class="
${
assiduite
.
prevAssiduites
?.
etat
?.
toLowerCase
()}
">
</div>
</div>
<fieldset class="btns_field single" etudid="
${
etud
.
id
}
" assiduite_id="
${
assiduite
.
id
}
" type="
${
assiduite
.
type
}
">
<fieldset class="btns_field single" etudid="
${
etud
.
id
}
" assiduite_id="
${
assiduite
.
id
}
" type="
${
assiduite
.
type
}
">
${
assi
}
...
...
@@ -1613,7 +1617,7 @@ function generateAllEtudRow() {
if
(
isSingleEtud
())
{
try
{
actualizeEtud
(
etudid
);
}
catch
(
ignored
)
{}
}
catch
(
ignored
)
{
}
return
;
}
...
...
@@ -1788,7 +1792,7 @@ function getJustificatifFromPeriod(date, etudid, update) {
success
:
(
data
)
=>
{
update
(
data
);
},
error
:
()
=>
{},
error
:
()
=>
{
},
});
}
...
...
@@ -1841,7 +1845,7 @@ function fastJustify(assiduite) {
generateAllEtudRow
();
try
{
loadAll
();
}
catch
{}
}
catch
{
}
};
const
content
=
document
.
createElement
(
"
fieldset
"
);
...
...
@@ -1863,7 +1867,7 @@ function fastJustify(assiduite) {
"
Nouveau justificatif (Rapide)
"
,
content
,
success
,
()
=>
{},
()
=>
{
},
"
var(--color-primary)
"
);
};
...
...
@@ -1894,7 +1898,7 @@ function justifyAssiduite(assiduite_id, justified) {
return
bool
;
}
function
createJustificatif
(
justif
,
success
=
()
=>
{})
{
function
createJustificatif
(
justif
,
success
=
()
=>
{
})
{
const
path
=
getUrl
()
+
`/api/justificatif/
${
etudid
}
/create`
;
sync_post
(
path
,
[
justif
],
success
,
(
data
,
status
)
=>
{
//error
...
...
@@ -1911,8 +1915,7 @@ function getAllJustificatifsFromEtud(
)
{
const
url_api
=
getUrl
()
+
`/api/justificatifs/
${
etudid
}${
order
?
"
/query?order°
"
.
replace
(
"
°
"
,
courant
?
"
&courant
"
:
""
)
:
""
`/api/justificatifs/
${
etudid
}${
order
?
"
/query?order°
"
.
replace
(
"
°
"
,
courant
?
"
&courant
"
:
""
)
:
""
}
`
;
async_get
(
...
...
@@ -1920,7 +1923,7 @@ function getAllJustificatifsFromEtud(
(
data
)
=>
{
action
(
data
);
},
()
=>
{}
()
=>
{
}
);
}
...
...
This diff is collapsed.
Click to expand it.
app/templates/assiduites/pages/signal_assiduites_group.j2
+
11
−
2
View file @
15255115
...
...
@@ -120,13 +120,22 @@
{% else %}
{% endif %}
{% if readonly == "true" %}
<div class="hide_pictures_holder">
<input type="checkbox" id="hide_pictures" name="hide_pictures" checked />
<label for="hide_pictures">Cacher les photos des étudiants</label>
</div>
<button id="validate_selectors" onclick="validateSelectors(this)">
Voir l'assiduité
Voir l'assiduité
</button>
{% else %}
<div class="hide_pictures_holder">
<input type="checkbox" id="hide_pictures" name="hide_pictures" checked />
<label for="hide_pictures">Cacher les photos des étudiants</label>
</div>
<button id="validate_selectors" onclick="validateSelectors(this)">
Faire la saisie
Faire la saisie
</button>
{% endif %}
...
...
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