Ajout du contexte processor
All checks were successful
Organisation/sirh/pipeline/head This commit looks good
All checks were successful
Organisation/sirh/pipeline/head This commit looks good
This commit is contained in:
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.
@@ -20,6 +20,9 @@ from fonction_utilitaire import fonctions_utilitaire
|
||||
@login_required
|
||||
def index(request):
|
||||
"""Vue d'index"""
|
||||
if not request.user.groups.filter(name="ressource_humaine").exists():
|
||||
return redirect('gestion_employe:mon-profil')
|
||||
|
||||
employes = Employe.objects.all().order_by('-user__date_joined')
|
||||
nombre_employes = Employe.objects.count()
|
||||
nombre_cps = Contrat.objects.filter(type_contrat='contrat_prestation').count()
|
||||
@@ -94,7 +97,7 @@ def affecter_employe_projet(request):
|
||||
elif total_affectation + temps_nouveau > 100:
|
||||
messages.warning(
|
||||
request,
|
||||
f"Les pourcentages d'affectation de l'employé {employe.first_name} {employe.last_name} dépasse 100% sur les différents projets ({total_affectation + temps_nouveau}%)."
|
||||
f"Les pourcentages d'affectation de l'employé {employe.user.first_name} {employe.user.last_name} dépasse 100% sur les différents projets ({total_affectation + temps_nouveau}%)."
|
||||
)
|
||||
return redirect('gestion_employe:index')
|
||||
|
||||
|
||||
Reference in New Issue
Block a user