Compare commits
4 Commits
messege_et
...
3cc8e292b3
| Author | SHA1 | Date | |
|---|---|---|---|
| 3cc8e292b3 | |||
| 34d1464391 | |||
| 6c12131fab | |||
| 19e4675f32 |
11
.gitignore
vendored
11
.gitignore
vendored
@@ -1,10 +1,3 @@
|
|||||||
# db.sqlite3
|
|
||||||
# venv/*
|
|
||||||
# media/*
|
|
||||||
|
|
||||||
__pycache__/
|
|
||||||
*.pyc
|
|
||||||
|
|
||||||
db.sqlite3
|
db.sqlite3
|
||||||
venv/
|
venv/*
|
||||||
.env
|
media/*
|
||||||
13
Jenkinsfile
vendored
Normal file
13
Jenkinsfile
vendored
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
pipeline
|
||||||
|
{
|
||||||
|
agent { dockerfile true }
|
||||||
|
stages
|
||||||
|
{
|
||||||
|
stage ( 'Build' )
|
||||||
|
{
|
||||||
|
steps
|
||||||
|
{
|
||||||
|
echo 'Test réussi'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
BIN
SIRH/__pycache__/__init__.cpython-310.pyc
Normal file
BIN
SIRH/__pycache__/__init__.cpython-310.pyc
Normal file
Binary file not shown.
BIN
SIRH/__pycache__/__init__.cpython-312.pyc
Normal file
BIN
SIRH/__pycache__/__init__.cpython-312.pyc
Normal file
Binary file not shown.
BIN
SIRH/__pycache__/__init__.cpython-313.pyc
Normal file
BIN
SIRH/__pycache__/__init__.cpython-313.pyc
Normal file
Binary file not shown.
BIN
SIRH/__pycache__/__init__.cpython-314.pyc
Normal file
BIN
SIRH/__pycache__/__init__.cpython-314.pyc
Normal file
Binary file not shown.
BIN
SIRH/__pycache__/settings.cpython-310.pyc
Normal file
BIN
SIRH/__pycache__/settings.cpython-310.pyc
Normal file
Binary file not shown.
BIN
SIRH/__pycache__/settings.cpython-312.pyc
Normal file
BIN
SIRH/__pycache__/settings.cpython-312.pyc
Normal file
Binary file not shown.
BIN
SIRH/__pycache__/settings.cpython-313.pyc
Normal file
BIN
SIRH/__pycache__/settings.cpython-313.pyc
Normal file
Binary file not shown.
BIN
SIRH/__pycache__/settings.cpython-314.pyc
Normal file
BIN
SIRH/__pycache__/settings.cpython-314.pyc
Normal file
Binary file not shown.
BIN
SIRH/__pycache__/urls.cpython-310.pyc
Normal file
BIN
SIRH/__pycache__/urls.cpython-310.pyc
Normal file
Binary file not shown.
BIN
SIRH/__pycache__/urls.cpython-312.pyc
Normal file
BIN
SIRH/__pycache__/urls.cpython-312.pyc
Normal file
Binary file not shown.
BIN
SIRH/__pycache__/urls.cpython-313.pyc
Normal file
BIN
SIRH/__pycache__/urls.cpython-313.pyc
Normal file
Binary file not shown.
BIN
SIRH/__pycache__/urls.cpython-314.pyc
Normal file
BIN
SIRH/__pycache__/urls.cpython-314.pyc
Normal file
Binary file not shown.
BIN
SIRH/__pycache__/views.cpython-310.pyc
Normal file
BIN
SIRH/__pycache__/views.cpython-310.pyc
Normal file
Binary file not shown.
BIN
SIRH/__pycache__/views.cpython-312.pyc
Normal file
BIN
SIRH/__pycache__/views.cpython-312.pyc
Normal file
Binary file not shown.
BIN
SIRH/__pycache__/views.cpython-313.pyc
Normal file
BIN
SIRH/__pycache__/views.cpython-313.pyc
Normal file
Binary file not shown.
BIN
SIRH/__pycache__/views.cpython-314.pyc
Normal file
BIN
SIRH/__pycache__/views.cpython-314.pyc
Normal file
Binary file not shown.
BIN
SIRH/__pycache__/wsgi.cpython-310.pyc
Normal file
BIN
SIRH/__pycache__/wsgi.cpython-310.pyc
Normal file
Binary file not shown.
BIN
SIRH/__pycache__/wsgi.cpython-312.pyc
Normal file
BIN
SIRH/__pycache__/wsgi.cpython-312.pyc
Normal file
Binary file not shown.
BIN
SIRH/__pycache__/wsgi.cpython-313.pyc
Normal file
BIN
SIRH/__pycache__/wsgi.cpython-313.pyc
Normal file
Binary file not shown.
BIN
SIRH/__pycache__/wsgi.cpython-314.pyc
Normal file
BIN
SIRH/__pycache__/wsgi.cpython-314.pyc
Normal file
Binary file not shown.
@@ -2,21 +2,6 @@
|
|||||||
{% load tags_personnaliser %}
|
{% load tags_personnaliser %}
|
||||||
|
|
||||||
<div class="col-3 bg-danger d-flex flex-column vh-100 pt-5 sticky-top">
|
<div class="col-3 bg-danger d-flex flex-column vh-100 pt-5 sticky-top">
|
||||||
<div class="text-center mb-4">
|
|
||||||
{% if user.employe.photo %}
|
|
||||||
<img src="{{ user.employe.photo.url }}"
|
|
||||||
class="rounded-circle"
|
|
||||||
width="80"
|
|
||||||
height="80"
|
|
||||||
style="object-fit:cover;">
|
|
||||||
{% else %}
|
|
||||||
<i class="bi bi-person-circle text-white" style="font-size:60px;"></i>
|
|
||||||
{% endif %}
|
|
||||||
<div class="text-white mt-2">
|
|
||||||
{{ user.username }}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<a href="{% url 'gestion_employe:mon-profil' %}" class="text-white fw-bold text-decoration-none mb-4" style="font-size:1.4em">
|
<a href="{% url 'gestion_employe:mon-profil' %}" class="text-white fw-bold text-decoration-none mb-4" style="font-size:1.4em">
|
||||||
<i class="bi bi-person-circle"></i> Mon profil
|
<i class="bi bi-person-circle"></i> Mon profil
|
||||||
</a>
|
</a>
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
gestion_conge/__pycache__/__init__.cpython-310.pyc
Normal file
BIN
gestion_conge/__pycache__/__init__.cpython-310.pyc
Normal file
Binary file not shown.
BIN
gestion_conge/__pycache__/__init__.cpython-312.pyc
Normal file
BIN
gestion_conge/__pycache__/__init__.cpython-312.pyc
Normal file
Binary file not shown.
BIN
gestion_conge/__pycache__/__init__.cpython-313.pyc
Normal file
BIN
gestion_conge/__pycache__/__init__.cpython-313.pyc
Normal file
Binary file not shown.
BIN
gestion_conge/__pycache__/__init__.cpython-314.pyc
Normal file
BIN
gestion_conge/__pycache__/__init__.cpython-314.pyc
Normal file
Binary file not shown.
BIN
gestion_conge/__pycache__/admin.cpython-310.pyc
Normal file
BIN
gestion_conge/__pycache__/admin.cpython-310.pyc
Normal file
Binary file not shown.
BIN
gestion_conge/__pycache__/admin.cpython-312.pyc
Normal file
BIN
gestion_conge/__pycache__/admin.cpython-312.pyc
Normal file
Binary file not shown.
BIN
gestion_conge/__pycache__/admin.cpython-313.pyc
Normal file
BIN
gestion_conge/__pycache__/admin.cpython-313.pyc
Normal file
Binary file not shown.
BIN
gestion_conge/__pycache__/admin.cpython-314.pyc
Normal file
BIN
gestion_conge/__pycache__/admin.cpython-314.pyc
Normal file
Binary file not shown.
BIN
gestion_conge/__pycache__/apps.cpython-310.pyc
Normal file
BIN
gestion_conge/__pycache__/apps.cpython-310.pyc
Normal file
Binary file not shown.
BIN
gestion_conge/__pycache__/apps.cpython-312.pyc
Normal file
BIN
gestion_conge/__pycache__/apps.cpython-312.pyc
Normal file
Binary file not shown.
BIN
gestion_conge/__pycache__/apps.cpython-313.pyc
Normal file
BIN
gestion_conge/__pycache__/apps.cpython-313.pyc
Normal file
Binary file not shown.
BIN
gestion_conge/__pycache__/apps.cpython-314.pyc
Normal file
BIN
gestion_conge/__pycache__/apps.cpython-314.pyc
Normal file
Binary file not shown.
BIN
gestion_conge/__pycache__/forms.cpython-310.pyc
Normal file
BIN
gestion_conge/__pycache__/forms.cpython-310.pyc
Normal file
Binary file not shown.
BIN
gestion_conge/__pycache__/forms.cpython-312.pyc
Normal file
BIN
gestion_conge/__pycache__/forms.cpython-312.pyc
Normal file
Binary file not shown.
BIN
gestion_conge/__pycache__/forms.cpython-313.pyc
Normal file
BIN
gestion_conge/__pycache__/forms.cpython-313.pyc
Normal file
Binary file not shown.
BIN
gestion_conge/__pycache__/forms.cpython-314.pyc
Normal file
BIN
gestion_conge/__pycache__/forms.cpython-314.pyc
Normal file
Binary file not shown.
BIN
gestion_conge/__pycache__/models.cpython-310.pyc
Normal file
BIN
gestion_conge/__pycache__/models.cpython-310.pyc
Normal file
Binary file not shown.
BIN
gestion_conge/__pycache__/models.cpython-312.pyc
Normal file
BIN
gestion_conge/__pycache__/models.cpython-312.pyc
Normal file
Binary file not shown.
BIN
gestion_conge/__pycache__/models.cpython-313.pyc
Normal file
BIN
gestion_conge/__pycache__/models.cpython-313.pyc
Normal file
Binary file not shown.
BIN
gestion_conge/__pycache__/models.cpython-314.pyc
Normal file
BIN
gestion_conge/__pycache__/models.cpython-314.pyc
Normal file
Binary file not shown.
BIN
gestion_conge/__pycache__/urls.cpython-310.pyc
Normal file
BIN
gestion_conge/__pycache__/urls.cpython-310.pyc
Normal file
Binary file not shown.
BIN
gestion_conge/__pycache__/urls.cpython-312.pyc
Normal file
BIN
gestion_conge/__pycache__/urls.cpython-312.pyc
Normal file
Binary file not shown.
BIN
gestion_conge/__pycache__/urls.cpython-313.pyc
Normal file
BIN
gestion_conge/__pycache__/urls.cpython-313.pyc
Normal file
Binary file not shown.
BIN
gestion_conge/__pycache__/urls.cpython-314.pyc
Normal file
BIN
gestion_conge/__pycache__/urls.cpython-314.pyc
Normal file
Binary file not shown.
BIN
gestion_conge/__pycache__/views.cpython-310.pyc
Normal file
BIN
gestion_conge/__pycache__/views.cpython-310.pyc
Normal file
Binary file not shown.
BIN
gestion_conge/__pycache__/views.cpython-312.pyc
Normal file
BIN
gestion_conge/__pycache__/views.cpython-312.pyc
Normal file
Binary file not shown.
BIN
gestion_conge/__pycache__/views.cpython-313.pyc
Normal file
BIN
gestion_conge/__pycache__/views.cpython-313.pyc
Normal file
Binary file not shown.
BIN
gestion_conge/__pycache__/views.cpython-314.pyc
Normal file
BIN
gestion_conge/__pycache__/views.cpython-314.pyc
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
gestion_conge/migrations/__pycache__/__init__.cpython-310.pyc
Normal file
BIN
gestion_conge/migrations/__pycache__/__init__.cpython-310.pyc
Normal file
Binary file not shown.
BIN
gestion_conge/migrations/__pycache__/__init__.cpython-312.pyc
Normal file
BIN
gestion_conge/migrations/__pycache__/__init__.cpython-312.pyc
Normal file
Binary file not shown.
BIN
gestion_conge/migrations/__pycache__/__init__.cpython-313.pyc
Normal file
BIN
gestion_conge/migrations/__pycache__/__init__.cpython-313.pyc
Normal file
Binary file not shown.
BIN
gestion_conge/migrations/__pycache__/__init__.cpython-314.pyc
Normal file
BIN
gestion_conge/migrations/__pycache__/__init__.cpython-314.pyc
Normal file
Binary file not shown.
@@ -129,69 +129,66 @@ def demander_conge(request):
|
|||||||
|
|
||||||
@login_required
|
@login_required
|
||||||
def liste_demande_conges(request):
|
def liste_demande_conges(request):
|
||||||
|
"""Vue de liste des demandes de congés en attente de validation selon le statut de l'utilisateur actuel"""
|
||||||
try:
|
try:
|
||||||
employe = Employe.objects.get(user=request.user)
|
employe = Employe.objects.get(user__username = request.user)
|
||||||
except Employe.DoesNotExist:
|
except Employe.DoesNotExist:
|
||||||
return JsonResponse({
|
return JsonResponse({
|
||||||
"success": False,
|
"success": False,
|
||||||
"message": "Profil employé introuvable"
|
"message": "Votre profil Utilisateur n'est lié à aucun profil Employé. Veuillez contacter l'administrateur."
|
||||||
})
|
})
|
||||||
|
|
||||||
affectation = Affectation.objects.filter(
|
try:
|
||||||
employe=employe,
|
affectation = Affectation.objects.get(
|
||||||
date_fin_daffectation__gte=timezone.now().date()
|
employe=employe,
|
||||||
).first()
|
date_fin_daffectation__gte=timezone.now().date()
|
||||||
|
)
|
||||||
is_direction = employe.user.groups.filter(name='direction').exists()
|
except Affectation.DoesNotExist:
|
||||||
|
affectation = None
|
||||||
|
|
||||||
if employe.chef:
|
if employe.chef:
|
||||||
|
print("chef")
|
||||||
conges = Conge.objects.filter(
|
conges_en_attente = Conge.objects.filter(
|
||||||
Q(employe__departement=employe.departement) |
|
employe__departement = employe.departement,
|
||||||
Q(employe=employe)
|
validation_hierarchique = None
|
||||||
).order_by('-date_demande')
|
).order_by('-date_demande')
|
||||||
|
|
||||||
elif affectation and affectation.role == "chef_projet":
|
elif affectation and affectation.role == "chef_projet":
|
||||||
|
|
||||||
employes_du_projet = Affectation.objects.filter(
|
employes_du_projet = Affectation.objects.filter(
|
||||||
projet=affectation.projet,
|
projet = affectation.projet,
|
||||||
date_fin_daffectation__gte=timezone.now().date()
|
date_fin_daffectation__gte = timezone.now().date()
|
||||||
).values_list('employe', flat=True)
|
).values('employe')
|
||||||
|
|
||||||
conges = Conge.objects.filter(
|
conges_en_attente = Conge.objects.filter(
|
||||||
Q(employe__in=employes_du_projet) |
|
employe__in = employes_du_projet,
|
||||||
Q(employe=employe)
|
validation_hierarchique = None
|
||||||
).order_by('-date_demande')
|
).order_by('-date_demande')
|
||||||
|
|
||||||
|
elif 'direction' in employe.user.groups.values_list('name', flat=True):
|
||||||
elif is_direction:
|
conges_en_attente = Conge.objects.filter(
|
||||||
|
validation_hierarchique = True,
|
||||||
conges = Conge.objects.filter(
|
validation_direction = None
|
||||||
Q(validation_hierarchique=True) |
|
).order_by('-date_demande')
|
||||||
Q(employe__user__groups__name='direction')
|
|
||||||
).distinct().order_by('-date_demande')
|
|
||||||
|
|
||||||
else:
|
else:
|
||||||
|
conges_en_attente = Conge.objects.filter(
|
||||||
conges = Conge.objects.filter(
|
employe__user__username = request.user
|
||||||
employe=employe
|
|
||||||
).order_by('-date_demande')
|
).order_by('-date_demande')
|
||||||
|
|
||||||
return JsonResponse({
|
return JsonResponse({
|
||||||
"success": True,
|
"success": True,
|
||||||
"data": [
|
"data":[
|
||||||
{
|
{
|
||||||
**model_to_dict(conge),
|
**model_to_dict(conge),
|
||||||
"prenom_nom": f"{conge.employe.user.first_name} {conge.employe.user.last_name}",
|
"prenom_nom": f"{conge.employe.user.first_name} {conge.employe.user.last_name}",
|
||||||
"date_demande": conge.date_demande,
|
"date_demande": conge.date_demande,
|
||||||
"nombre_jours": conge.nombre_jours,
|
"nombre_jours": conge.nombre_jours,
|
||||||
"type": dict(conge.TYPE_CHOICES).get(conge.type),
|
"type": dict(conge.TYPE_CHOICES).get(conge.type),
|
||||||
"solde_conge": fonctions_utilitaire.solde_conge(conge.employe)["quota_annuel"]
|
"solde_conge": fonctions_utilitaire.solde_conge(conge.employe)["quota_annuel"]
|
||||||
}
|
}
|
||||||
for conge in conges
|
for conge in conges_en_attente]},
|
||||||
]
|
safe=False
|
||||||
})
|
)
|
||||||
|
|
||||||
@login_required
|
@login_required
|
||||||
def validation_de_conge(request):
|
def validation_de_conge(request):
|
||||||
|
|||||||
BIN
gestion_employe/__pycache__/__init__.cpython-310.pyc
Normal file
BIN
gestion_employe/__pycache__/__init__.cpython-310.pyc
Normal file
Binary file not shown.
BIN
gestion_employe/__pycache__/__init__.cpython-312.pyc
Normal file
BIN
gestion_employe/__pycache__/__init__.cpython-312.pyc
Normal file
Binary file not shown.
BIN
gestion_employe/__pycache__/__init__.cpython-313.pyc
Normal file
BIN
gestion_employe/__pycache__/__init__.cpython-313.pyc
Normal file
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user