Compare commits
2 Commits
main
...
feature/su
| Author | SHA1 | Date | |
|---|---|---|---|
| d09154ef9a | |||
| 65497cd669 |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -1,9 +1,10 @@
|
|||||||
# SGL/sso.py
|
# SGL/sso.py
|
||||||
from django.contrib.auth import get_user_model
|
from django.contrib.auth import get_user_model
|
||||||
from django.contrib.auth.models import Group
|
from django.contrib.auth.models import Group
|
||||||
from gestion_employe.models import Departement, Employe
|
|
||||||
from simple_sso.sso_client.client import Client
|
from simple_sso.sso_client.client import Client
|
||||||
|
|
||||||
|
from gestion_employe.models import Departement, Employe
|
||||||
|
|
||||||
User = get_user_model()
|
User = get_user_model()
|
||||||
|
|
||||||
class SIRHClient(Client):
|
class SIRHClient(Client):
|
||||||
|
|||||||
@@ -17,7 +17,7 @@
|
|||||||
{% include 'parts/menu_application.html' %}
|
{% include 'parts/menu_application.html' %}
|
||||||
<div class="row flex-nowrap">
|
<div class="row flex-nowrap">
|
||||||
{% include 'parts/menu_principal.html' %}
|
{% include 'parts/menu_principal.html' %}
|
||||||
<div class="col p-1 p-sm-4">
|
<div class="col p-4">
|
||||||
{% block 'contenu' %} {% endblock %}
|
{% block 'contenu' %} {% endblock %}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1,12 +1,13 @@
|
|||||||
{% load static %}
|
{% load static %}
|
||||||
{% load tags_personnaliser %}
|
<nav class="navbar navbar-expand-lg bg-body-tertiary">
|
||||||
|
|
||||||
<nav class="navbar d-none d-lg-block navbar-expand-lg bg-body-tertiary">
|
|
||||||
<div class="container-fluid">
|
<div class="container-fluid">
|
||||||
<a class="navbar-brand" href="#">
|
<a class="navbar-brand" href="#">
|
||||||
<img src="{% static 'img/cerfig.jpg' %}" alt="Logo" width="85" height="30" class="d-inline-block align-text-top">
|
<img src="{% static 'img/cerfig.jpg' %}" alt="Logo" width="85" height="30" class="d-inline-block align-text-top">
|
||||||
</a>
|
</a>
|
||||||
<div class="collapse navbar-collapse">
|
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarNav" aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation">
|
||||||
|
<span class="navbar-toggler-icon"></span>
|
||||||
|
</button>
|
||||||
|
<div class="collapse navbar-collapse" id="navbarNav">
|
||||||
<ul class="nav nav-tabs justify-content-end w-100">
|
<ul class="nav nav-tabs justify-content-end w-100">
|
||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
<a class="nav-link active" aria-current="page" href="{{ SIRH_LIEN }}">SIRH</a>
|
<a class="nav-link active" aria-current="page" href="{{ SIRH_LIEN }}">SIRH</a>
|
||||||
@@ -21,79 +22,3 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</nav>
|
</nav>
|
||||||
|
|
||||||
<nav class="navbar d-lg-none navbar-expand-lg bg-body-tertiary">
|
|
||||||
<div class="container-fluid">
|
|
||||||
<a class="navbar-brand" href="#">
|
|
||||||
<img src="{% static 'img/cerfig.jpg' %}" alt="Logo" width="85" height="30" class="d-inline-block align-text-top">
|
|
||||||
</a>
|
|
||||||
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarNavDropdown" aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation">
|
|
||||||
<span class="navbar-toggler-icon"></span>
|
|
||||||
</button>
|
|
||||||
<div class="collapse navbar-collapse" id="navbarNavDropdown">
|
|
||||||
<ul class="navbar-nav">
|
|
||||||
<li class="nav-item">
|
|
||||||
<a class="nav-link" aria-current="page" href="{% url 'gestion_employe:mon-profil' %}">
|
|
||||||
<i class="bi bi-person-circle"></i>
|
|
||||||
Mon profil
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
{% if user|has_group:"ressource_humaine" or user|has_group:"direction" %}
|
|
||||||
<li class="nav-item">
|
|
||||||
<a class="nav-link" aria-current="page" href="{% url 'gestion_employe:index' %}">
|
|
||||||
<i class="bi bi-speedometer2"></i>
|
|
||||||
Tableau de bord
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
{% endif %}
|
|
||||||
{% if user|has_group:"ressource_humaine" or user|has_group:"direction" %}
|
|
||||||
<li class="nav-item">
|
|
||||||
<a class="nav-link" aria-current="page" href="{% url 'gestion_projet:index' %}">
|
|
||||||
<i class="bi bi-speedometer2"></i>
|
|
||||||
Gestion des projets
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
{% endif %}
|
|
||||||
<li class="nav-item">
|
|
||||||
<a class="nav-link" href="{% url 'gestion_conges:conge' %}">
|
|
||||||
<i class="bi bi-airplane"></i>
|
|
||||||
Gestion des congés
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
{% if user|is_chef_projet %}
|
|
||||||
<li class="nav-item">
|
|
||||||
<a class="nav-link" href="{% url 'gestion_projet:activites-projet' %}">
|
|
||||||
<i class="bi bi-list-task"></i>
|
|
||||||
Suivi des Activités
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
{% endif %}
|
|
||||||
<li class="nav-item">
|
|
||||||
<a class="nav-link" href="{% url 'gestion_salle:reservation-salle' %}">
|
|
||||||
<i class="bi bi-calendar-check"></i>
|
|
||||||
Réservation
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
<li class="nav-item">
|
|
||||||
<a class="nav-link" href="{% url 'deconnexion' %}">
|
|
||||||
<i class="bi bi-box-arrow-right"></i> Déconnexion
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</nav>
|
|
||||||
|
|
||||||
<div class="container-fluid d-flex d-sm-none justify-content-center">
|
|
||||||
<ul class="nav nav-tabs">
|
|
||||||
<li class="nav-item">
|
|
||||||
<a class="nav-link active" aria-current="page" href="{{ SIRH_LIEN }}">SIRH</a>
|
|
||||||
</li>
|
|
||||||
<li class="nav-item">
|
|
||||||
<a class="nav-link" href="{{ SGL_LIEN }}">SGL</a>
|
|
||||||
</li>
|
|
||||||
<li class="nav-item">
|
|
||||||
<a class="nav-link" href="#">Laboratoire</a>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
{% load static %}
|
{% load static %}
|
||||||
{% load tags_personnaliser %}
|
{% load tags_personnaliser %}
|
||||||
|
|
||||||
<div class="col-3 bg-danger d-none d-sm-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">
|
<div class="text-center mb-4">
|
||||||
{% if user.employe.photo %}
|
{% if user.employe.photo %}
|
||||||
<img src="{{ user.employe.photo.url }}"
|
<img src="{{ user.employe.photo.url }}"
|
||||||
@@ -41,6 +41,7 @@
|
|||||||
<a href="{% url 'gestion_salle:reservation-salle' %}" class="text-white fw-bold text-decoration-none mb-4" style="font-size: 1.2em;">
|
<a href="{% url 'gestion_salle:reservation-salle' %}" class="text-white fw-bold text-decoration-none mb-4" style="font-size: 1.2em;">
|
||||||
<i class="bi bi-calendar-check"></i> Réservation
|
<i class="bi bi-calendar-check"></i> Réservation
|
||||||
</a>
|
</a>
|
||||||
|
{% comment %} {% url 'deconnexion' %} {% endcomment %}
|
||||||
<a href="{% url 'deconnexion' %}" class="text-white fw-bold text-decoration-none mb-4" style="font-size: 1.2em;">
|
<a href="{% url 'deconnexion' %}" class="text-white fw-bold text-decoration-none mb-4" style="font-size: 1.2em;">
|
||||||
<i class="bi bi-box-arrow-right"></i> Déconnexion
|
<i class="bi bi-box-arrow-right"></i> Déconnexion
|
||||||
</a>
|
</a>
|
||||||
|
|||||||
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.
@@ -2,6 +2,34 @@ const $ = (element) => document.getElementById(element);
|
|||||||
|
|
||||||
const url_liste_conge_attente = $("liste-demande-conges").dataset.url
|
const url_liste_conge_attente = $("liste-demande-conges").dataset.url
|
||||||
|
|
||||||
|
function supprimerDemandeConge(congeId) {
|
||||||
|
if (!window.confirm("Voulez-vous vraiment supprimer cette demande de congé en attente ?")) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
const form = $("form-detail-conge");
|
||||||
|
const csrftoken = new FormData(form).get("csrfmiddlewaretoken");
|
||||||
|
const url = $("bouton-supprimer-demande-conge").dataset.url.replace(
|
||||||
|
"/0/",
|
||||||
|
`/${congeId}/`
|
||||||
|
);
|
||||||
|
|
||||||
|
fetch(url, {
|
||||||
|
method: "POST",
|
||||||
|
headers: {"X-CSRFToken": csrftoken},
|
||||||
|
})
|
||||||
|
.then(response => response.json().then(data => ({response, data})))
|
||||||
|
.then(({response, data}) => {
|
||||||
|
window.alert(data.message);
|
||||||
|
if (response.ok && data.success) {
|
||||||
|
window.location.reload();
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.catch(() => {
|
||||||
|
window.alert("La suppression a échoué. Veuillez réessayer.");
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
const tableau_liste_demande_conge = new Tabulator("#liste-demande-conges", {
|
const tableau_liste_demande_conge = new Tabulator("#liste-demande-conges", {
|
||||||
columns: [
|
columns: [
|
||||||
{"title": "Nom et Prénom", "field": "prenom_nom"},
|
{"title": "Nom et Prénom", "field": "prenom_nom"},
|
||||||
@@ -21,12 +49,31 @@ const tableau_liste_demande_conge = new Tabulator("#liste-demande-conges", {
|
|||||||
{"title": "Validation par supérieur hiérarchique", "field": "validation_direction", formatter:"tickCross", formatterParams :{
|
{"title": "Validation par supérieur hiérarchique", "field": "validation_direction", formatter:"tickCross", formatterParams :{
|
||||||
allowEmpty : true ,
|
allowEmpty : true ,
|
||||||
}},
|
}},
|
||||||
|
{
|
||||||
|
title: "Action",
|
||||||
|
hozAlign: "center",
|
||||||
|
formatter: (cell) => {
|
||||||
|
const data = cell.getRow().getData();
|
||||||
|
if (!data.est_proprietaire || !data.en_attente) {
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
return '<button type="button" class="btn btn-danger btn-sm">Supprimer</button>';
|
||||||
|
},
|
||||||
|
cellClick: (event, cell) => {
|
||||||
|
const data = cell.getRow().getData();
|
||||||
|
if (data.est_proprietaire && data.en_attente) {
|
||||||
|
event.stopPropagation();
|
||||||
|
supprimerDemandeConge(data.id);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
},
|
||||||
],
|
],
|
||||||
pagination: true,
|
pagination: true,
|
||||||
paginationSize: 5,
|
paginationSize: 5,
|
||||||
})
|
})
|
||||||
|
|
||||||
const bouton_demande_conges = $("bouton-demande-conge");
|
const bouton_demande_conges = $("bouton-demande-conge");
|
||||||
|
const bouton_supprimer_conge = $("bouton-supprimer-demande-conge");
|
||||||
|
|
||||||
bouton_demande_conges.addEventListener("click", (e) => {
|
bouton_demande_conges.addEventListener("click", (e) => {
|
||||||
var modalDemandeConge = new bootstrap.Modal(document.getElementById('modalDemandeConge'));
|
var modalDemandeConge = new bootstrap.Modal(document.getElementById('modalDemandeConge'));
|
||||||
@@ -44,6 +91,11 @@ tableau_liste_demande_conge.on("rowClick", function(row, rowData) {
|
|||||||
$("nombre_jours").value = data.nombre_jours;
|
$("nombre_jours").value = data.nombre_jours;
|
||||||
$("solde_restant").value = data.solde_conge;
|
$("solde_restant").value = data.solde_conge;
|
||||||
$("motif_refus").value = data.motif_refus;
|
$("motif_refus").value = data.motif_refus;
|
||||||
|
bouton_supprimer_conge.classList.toggle(
|
||||||
|
"d-none",
|
||||||
|
!(data.est_proprietaire && data.en_attente)
|
||||||
|
);
|
||||||
|
bouton_supprimer_conge.dataset.congeId = data.id;
|
||||||
|
|
||||||
if($("validation_hierarchique_valide") & $("validation_hierarchique_refuse")){
|
if($("validation_hierarchique_valide") & $("validation_hierarchique_refuse")){
|
||||||
$("validation_hierarchique_valide").checked = data.validation_hierarchique === true;
|
$("validation_hierarchique_valide").checked = data.validation_hierarchique === true;
|
||||||
@@ -59,6 +111,10 @@ tableau_liste_demande_conge.on("rowClick", function(row, rowData) {
|
|||||||
modal.show();
|
modal.show();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
bouton_supprimer_conge.addEventListener("click", () => {
|
||||||
|
supprimerDemandeConge(bouton_supprimer_conge.dataset.congeId);
|
||||||
|
});
|
||||||
|
|
||||||
fetch(url_liste_conge_attente)
|
fetch(url_liste_conge_attente)
|
||||||
.then(response => response.json())
|
.then(response => response.json())
|
||||||
.then(data => {
|
.then(data => {
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
<div class="row d-flex flex-column flex-lg-row justify-content-center mb-4">
|
<div class="row d-flex justify-content-center mb-4">
|
||||||
<div class="col text-white bg-danger d-flex flex-column justify-content-center align-items-center border rounded p-4">
|
<div class="col text-white bg-danger d-flex flex-column justify-content-center align-items-center border rounded p-4">
|
||||||
<div class="card-header fw-bold">
|
<div class="card-header fw-bold">
|
||||||
<i class="bi bi-x-circle me-2"></i> Congés refusés
|
<i class="bi bi-x-circle me-2"></i> Congés refusés
|
||||||
@@ -17,7 +17,7 @@
|
|||||||
<h5 class="fw-bold">{{ nombre_conges_refuse }}</h5>
|
<h5 class="fw-bold">{{ nombre_conges_refuse }}</h5>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col my-2 my-lg-0 text-white bg-warning d-flex flex-column justify-content-center align-items-center border rounded p-4 mx-0 mx-lg-2">
|
<div class="col text-white bg-warning d-flex flex-column justify-content-center align-items-center border rounded p-4 mx-2">
|
||||||
<div class="card-header fw-bold">
|
<div class="card-header fw-bold">
|
||||||
<i class="bi bi-hourglass-split me-2"></i> Congés en attente
|
<i class="bi bi-hourglass-split me-2"></i> Congés en attente
|
||||||
</div>
|
</div>
|
||||||
@@ -36,7 +36,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="row mb-3">
|
<div class="row mb-3">
|
||||||
<div class="col d-flex flex-column flex-lg-row justify-content-between align-items-center">
|
<div class="col d-flex justify-content-between align-items-center">
|
||||||
<h3><i class="bi bi-list-ul"></i> Liste des demandes de congé</h3>
|
<h3><i class="bi bi-list-ul"></i> Liste des demandes de congé</h3>
|
||||||
<button class='btn btn-primary' id="bouton-demande-conge">Demande de congé</button>
|
<button class='btn btn-primary' id="bouton-demande-conge">Demande de congé</button>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -83,6 +83,13 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Fermer</button>
|
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Fermer</button>
|
||||||
|
{% if conge.validation_hierarchique == None and conge.validation_direction == None%}
|
||||||
|
<button type="button" class="btn btn-danger " id="bouton-supprimer-demande-conge"
|
||||||
|
data-url="{% url 'gestion_conges:supprimer-demande-conge' 0 %}"
|
||||||
|
>
|
||||||
|
Supprimer ma demande
|
||||||
|
</button>
|
||||||
|
{% endif %}
|
||||||
{% if employe_est_il_chef or membre_de_la_direction or est_chef_projet %}
|
{% if employe_est_il_chef or membre_de_la_direction or est_chef_projet %}
|
||||||
<button type="button" class="btn btn-success" id="bouton-enregistrer-detail-conge">Enregistrer</button>
|
<button type="button" class="btn btn-success" id="bouton-enregistrer-detail-conge">Enregistrer</button>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|||||||
@@ -24,4 +24,9 @@ urlpatterns = [
|
|||||||
views.validation_de_conge,
|
views.validation_de_conge,
|
||||||
name='validation-des-conges'
|
name='validation-des-conges'
|
||||||
),
|
),
|
||||||
|
path(
|
||||||
|
'demande/<int:conge_id>/supprimer/',
|
||||||
|
views.supprimer_demande_conge,
|
||||||
|
name='supprimer-demande-conge',
|
||||||
|
),
|
||||||
]
|
]
|
||||||
@@ -235,3 +235,55 @@ def validation_de_conge(request):
|
|||||||
|
|
||||||
conge.save()
|
conge.save()
|
||||||
return JsonResponse({"message": "La décision a été enregistrée avec succès."})
|
return JsonResponse({"message": "La décision a été enregistrée avec succès."})
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
def _conge_est_en_attente(conge):
|
||||||
|
return (
|
||||||
|
conge.validation_hierarchique is not False
|
||||||
|
and conge.validation_direction is not False
|
||||||
|
and not (
|
||||||
|
conge.validation_hierarchique is True
|
||||||
|
and conge.validation_direction is True
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
@login_required
|
||||||
|
def supprimer_demande_conge(request, conge_id):
|
||||||
|
if request.method != "POST":
|
||||||
|
return JsonResponse(
|
||||||
|
{"success": False, "message": "Méthode non autorisée."},
|
||||||
|
status=405,
|
||||||
|
)
|
||||||
|
|
||||||
|
try:
|
||||||
|
employe = Employe.objects.get(user=request.user)
|
||||||
|
except Employe.DoesNotExist:
|
||||||
|
return JsonResponse(
|
||||||
|
{"success": False, "message": "Profil employé introuvable."},
|
||||||
|
status=403,
|
||||||
|
)
|
||||||
|
|
||||||
|
try:
|
||||||
|
conge = Conge.objects.get(pk=conge_id, employe=employe)
|
||||||
|
except Conge.DoesNotExist:
|
||||||
|
return JsonResponse(
|
||||||
|
{"success": False, "message": "Demande introuvable ou accès non autorisé."},
|
||||||
|
status=404,
|
||||||
|
)
|
||||||
|
|
||||||
|
if not _conge_est_en_attente(conge):
|
||||||
|
return JsonResponse(
|
||||||
|
{
|
||||||
|
"success": False,
|
||||||
|
"message": "Seules les demandes en attente peuvent être supprimées.",
|
||||||
|
},
|
||||||
|
status=400,
|
||||||
|
)
|
||||||
|
|
||||||
|
conge.delete()
|
||||||
|
return JsonResponse(
|
||||||
|
{"success": True, "message": "Votre demande de congé en attente a été supprimée."}
|
||||||
|
)
|
||||||
|
|
||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -10,8 +10,8 @@ const tableau_liste_employe = new Tabulator("#tableau_liste_employe", {
|
|||||||
{"title": "Téléphone", "field": "telephone"},
|
{"title": "Téléphone", "field": "telephone"},
|
||||||
],
|
],
|
||||||
pagination: true,
|
pagination: true,
|
||||||
paginationSize: 10
|
paginationSize: 10,
|
||||||
// responsiveLayout : "hide"
|
responsiveLayout : "hide"
|
||||||
})
|
})
|
||||||
|
|
||||||
fetch(url_liste_employe)
|
fetch(url_liste_employe)
|
||||||
|
|||||||
@@ -15,12 +15,12 @@
|
|||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
<div class="row d-flex flex-column flex-lg-row">
|
<div class="row">
|
||||||
<div class="col text-white bg-success d-flex flex-column justify-content-center align-items-center border rounded p-4">
|
<div class="col text-white bg-success d-flex flex-column justify-content-center align-items-center border rounded p-4">
|
||||||
<span class="fs-5">Nombre d'employés</span>
|
<span class="fs-5">Nombre d'employés</span>
|
||||||
<h3>{{ nombre_employes }}</h3>
|
<h3>{{ nombre_employes }}</h3>
|
||||||
</div>
|
</div>
|
||||||
<div class="col text-white bg-info d-flex flex-column justify-content-center align-items-center border rounded p-4 mx-0 mx-lg-3 my-1 my-lg-0">
|
<div class="col text-white bg-info d-flex flex-column justify-content-center align-items-center border rounded p-4 mx-3">
|
||||||
<span class="fs-5">Nombre de prestataires</span>
|
<span class="fs-5">Nombre de prestataires</span>
|
||||||
<h3>{{ nombre_cps }}</h3>
|
<h3>{{ nombre_cps }}</h3>
|
||||||
</div>
|
</div>
|
||||||
@@ -30,7 +30,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row mt-4">
|
<div class="row mt-4">
|
||||||
<div class="col d-flex flex-column flex-lg-row justify-content-between mb-3">
|
<div class="col d-flex justify-content-between mb-3">
|
||||||
<h3>
|
<h3>
|
||||||
<i class="bi bi-people"></i>
|
<i class="bi bi-people"></i>
|
||||||
La liste des employés
|
La liste des employés
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
{% load static %}
|
{% load static %}
|
||||||
{% block 'titre_page' %} Gestion des employés - Mon profil {% endblock %}
|
{% block 'titre_page' %} Gestion des employés - Mon profil {% endblock %}
|
||||||
{% block 'contenu' %}
|
{% block 'contenu' %}
|
||||||
<div class="d-flex flex-column flex-lg-row justify-content-between">
|
<div class="d-flex justify-content-between">
|
||||||
<h5 class="fw-bold">
|
<h5 class="fw-bold">
|
||||||
<i class="bi bi-pencil-square me-2"></i> Les informations de mon profil
|
<i class="bi bi-pencil-square me-2"></i> Les informations de mon profil
|
||||||
</h5>
|
</h5>
|
||||||
@@ -41,7 +41,7 @@
|
|||||||
<div class="accordion-body">
|
<div class="accordion-body">
|
||||||
<form class="row" action = "{% url 'gestion_employe:modifier-employe' %}" method = "POST" enctype = "multipart/form-data" id="information-personnelles" data-url="{% url 'gestion_employe:modifier-employe' %}">
|
<form class="row" action = "{% url 'gestion_employe:modifier-employe' %}" method = "POST" enctype = "multipart/form-data" id="information-personnelles" data-url="{% url 'gestion_employe:modifier-employe' %}">
|
||||||
{% csrf_token %}
|
{% csrf_token %}
|
||||||
<div class="col-12 col-sm-6">
|
<div class="col">
|
||||||
<div class="form-group mb-2">
|
<div class="form-group mb-2">
|
||||||
<label>Photo</label>
|
<label>Photo</label>
|
||||||
{% if employe.photo %}
|
{% if employe.photo %}
|
||||||
@@ -70,7 +70,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class="col-12 col-sm-6">
|
<div class="col">
|
||||||
<div class="form-group mb-2">
|
<div class="form-group mb-2">
|
||||||
<label>Date de naissance :</label>
|
<label>Date de naissance :</label>
|
||||||
<input type="date" class="form-control" id="date_naissance" name = 'date_naissance' value="{{ employe.date_naissance|date:'Y-m-d' }}">
|
<input type="date" class="form-control" id="date_naissance" name = 'date_naissance' value="{{ employe.date_naissance|date:'Y-m-d' }}">
|
||||||
@@ -172,9 +172,9 @@
|
|||||||
<form method="POST" action="{% url 'gestion_employe:enregistrement-document-rh' %}" enctype="multipart/form-data">
|
<form method="POST" action="{% url 'gestion_employe:enregistrement-document-rh' %}" enctype="multipart/form-data">
|
||||||
{% csrf_token %}
|
{% csrf_token %}
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-12 col-sm-6">
|
<div class="col">
|
||||||
<div class="form-group mb-2">
|
<div class="form-group mb-2">
|
||||||
<label>Photo</label>
|
<label>photo</label>
|
||||||
{% if employe.photo %}
|
{% if employe.photo %}
|
||||||
<span>Fichier actuel : <a href="{{ employe.photo.url }}">{{employe.photo}}</a></span>
|
<span>Fichier actuel : <a href="{{ employe.photo.url }}">{{employe.photo}}</a></span>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
@@ -195,7 +195,7 @@
|
|||||||
<input type="file" class="form-control" name="diplome">
|
<input type="file" class="form-control" name="diplome">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-12 col-sm-6">
|
<div class="col">
|
||||||
<div class="form-group mb-2">
|
<div class="form-group mb-2">
|
||||||
<label>Casier judiciaire</label>
|
<label>Casier judiciaire</label>
|
||||||
{% if employe.casier_judiciaire %}
|
{% if employe.casier_judiciaire %}
|
||||||
|
|||||||
Binary file not shown.
@@ -383,8 +383,8 @@ def liste_employe(request):
|
|||||||
projets = [
|
projets = [
|
||||||
", ".join([
|
", ".join([
|
||||||
a.projet.nom_projet for a in Affectation.objects.filter(
|
a.projet.nom_projet for a in Affectation.objects.filter(
|
||||||
employe=employe
|
employe=employe,
|
||||||
#, date_fin_daffectation__gte=timezone.now().date()
|
date_fin_daffectation__gte=timezone.now().date()
|
||||||
)
|
)
|
||||||
])
|
])
|
||||||
]
|
]
|
||||||
@@ -408,14 +408,14 @@ def liste_employe(request):
|
|||||||
"salaire_mensuel": contrat.salaire_mensuel,
|
"salaire_mensuel": contrat.salaire_mensuel,
|
||||||
"statut": contrat.statut,
|
"statut": contrat.statut,
|
||||||
"fichier_contrat": contrat.fichier_contrat.url if contrat.fichier_contrat else "",
|
"fichier_contrat": contrat.fichier_contrat.url if contrat.fichier_contrat else "",
|
||||||
} for contrat in Contrat.objects.filter(employe=employe)#, statut='actif')
|
} for contrat in Contrat.objects.filter(employe=employe, statut='actif')
|
||||||
]
|
]
|
||||||
|
|
||||||
affectations = [
|
affectations = [
|
||||||
{**model_to_dict(affectation), "projet": affectation.projet.nom_projet}
|
{**model_to_dict(affectation), "projet": affectation.projet.nom_projet}
|
||||||
for affectation in Affectation.objects.filter(
|
for affectation in Affectation.objects.filter(
|
||||||
employe=employe
|
employe=employe,
|
||||||
#, date_fin_daffectation__gte=timezone.now().date()
|
date_fin_daffectation__gte=timezone.now().date()
|
||||||
)
|
)
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -12,12 +12,12 @@
|
|||||||
</div>
|
</div>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<div class="row d-flex flex-column flex-lg-row">
|
<div class="row">
|
||||||
<div class="col text-white bg-success d-flex flex-column justify-content-center align-items-center border rounded p-4">
|
<div class="col text-white bg-success d-flex flex-column justify-content-center align-items-center border rounded p-4">
|
||||||
<span class="fs-5">Projets en cours</span>
|
<span class="fs-5">Projets en cours</span>
|
||||||
<h3>{{projet_en_cours}}</h3>
|
<h3>{{projet_en_cours}}</h3>
|
||||||
</div>
|
</div>
|
||||||
<div class="col text-white bg-success d-flex flex-column justify-content-center align-items-center border rounded p-4 my-1 my-lg-0 mx-0 mx-lg-2">
|
<div class="col text-white bg-success d-flex flex-column justify-content-center align-items-center border rounded p-4 mx-2">
|
||||||
<span class="fs-5">Budget Total (GNF)</span>
|
<span class="fs-5">Budget Total (GNF)</span>
|
||||||
<h3>{{budget_total}}</h3>
|
<h3>{{budget_total}}</h3>
|
||||||
</div>
|
</div>
|
||||||
@@ -27,11 +27,11 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row mt-4">
|
<div class="row mt-4">
|
||||||
<div class="col d-flex flex-lg-row flex-column justify-content-between align-items-center mb-3">
|
<div class="col d-flex justify-content-between align-items-center mb-3">
|
||||||
<h5 class="mb-4" >La liste des projets </h5>
|
<h5 class="mb-4" >La liste des projets </h5>
|
||||||
{% if user|has_group:"ressource_humaine" %}
|
{% if user|has_group:"ressource_humaine" %}
|
||||||
<div class="d-flex flex-lg-column flex-row justify-content-between align-items-center">
|
<div>
|
||||||
<button class="btn btn-primary me-2 me-lg-0" data-bs-toggle="modal" data-bs-target="#modalProjet">
|
<button class="btn btn-primary" data-bs-toggle="modal" data-bs-target="#modalProjet">
|
||||||
<i class="bi bi-plus-circle"></i> Ajouter un projet
|
<i class="bi bi-plus-circle"></i> Ajouter un projet
|
||||||
</button>
|
</button>
|
||||||
<button class="btn btn-info" data-bs-toggle="modal" data-bs-target="#modalBailleur">
|
<button class="btn btn-info" data-bs-toggle="modal" data-bs-target="#modalBailleur">
|
||||||
|
|||||||
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.
@@ -18,12 +18,12 @@
|
|||||||
<div class="col py-2 px-4">
|
<div class="col py-2 px-4">
|
||||||
<h1 class="text-center">Réservation de salle</h1>
|
<h1 class="text-center">Réservation de salle</h1>
|
||||||
<hr>
|
<hr>
|
||||||
<div class="row d-flex flex-column flex-lg-row justify-content-around">
|
<div class="row d-flex justify-content-around">
|
||||||
<div class="form-group col col-lg-5 me-2">
|
<div class="form-group col-5 me-2">
|
||||||
<label>Selectionner le jour concerné :</label>
|
<label>Selectionner le jour concerné :</label>
|
||||||
<input type="date" class="form-control" id="semaineDate" />
|
<input type="date" class="form-control" id="semaineDate" />
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group col col-lg-5 me-2">
|
<div class="form-group col-5 me-2">
|
||||||
<label>Selectionner une salle :</label>
|
<label>Selectionner une salle :</label>
|
||||||
<select class = "form-select" id="liste-salle">
|
<select class = "form-select" id="liste-salle">
|
||||||
<option value='Salle de formation'>Salle de formation</option>
|
<option value='Salle de formation'>Salle de formation</option>
|
||||||
@@ -33,9 +33,9 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row mt-2">
|
<div class="row mt-2">
|
||||||
<div class="col d-flex flex-column flex-lg-row justify-content-center">
|
<div class="col d-flex justify-content-center">
|
||||||
<button class="btn btn-lg btn-primary me-0 me-lg-2" data-bs-toggle="modal" data-bs-target="#modalReservation">Nouvelle réservation</button>
|
<button class="btn btn-lg btn-primary me-2" data-bs-toggle="modal" data-bs-target="#modalReservation">Nouvelle réservation</button>
|
||||||
<button type="button" class="btn mt-2 mt-lg-0 btn-warning" data-bs-toggle="modal" data-bs-target="#modalReservationAttente">
|
<button type="button" class="btn btn-warning" data-bs-toggle="modal" data-bs-target="#modalReservationAttente">
|
||||||
Validation en attente <span class="badge badge-light">{{ nb_reservation_attente }}</span>
|
Validation en attente <span class="badge badge-light">{{ nb_reservation_attente }}</span>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user