Compare commits
1 Commits
feature/li
...
9fb079c9a7
| Author | SHA1 | Date | |
|---|---|---|---|
| 9fb079c9a7 |
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.
@@ -9,29 +9,17 @@ const tableau_liste_employe = new Tabulator("#tableau_liste_employe", {
|
||||
{"title": "Projet", "field": "projet"},
|
||||
{"title": "Téléphone", "field": "telephone"},
|
||||
],
|
||||
// ajaxURL: url_liste_employe,
|
||||
pagination: true,
|
||||
paginationSize: 10,
|
||||
responsiveLayout : "hide"
|
||||
})
|
||||
|
||||
const tableauToutesAffectations = new Tabulator("#tableauToutesAffectations", {
|
||||
layout: "fitColumns",
|
||||
pagination: "local",
|
||||
paginationSize: 10,
|
||||
placeholder: "Aucune affectation enregistrée pour cet employé.",
|
||||
columns: [
|
||||
{title: "Projet", field: "projet"},
|
||||
{title: "Rôle", field: "role"},
|
||||
{title: "Pourcentage", field: "pourcentage_temps_affectation", formatter: cell => `${cell.getValue()} %`},
|
||||
{title: "Date de début", field: "date_affectation"},
|
||||
{title: "Date de fin", field: "date_fin_daffectation", formatter: cell => cell.getValue() || "Non définie"},
|
||||
],
|
||||
})
|
||||
|
||||
fetch(url_liste_employe)
|
||||
.then(response => response.json())
|
||||
.then(data => {
|
||||
if (data.success){
|
||||
console.log(data.data)
|
||||
tableau_liste_employe.setData(data.data);
|
||||
}else{
|
||||
alert(data.message);
|
||||
@@ -41,6 +29,7 @@ fetch(url_liste_employe)
|
||||
|
||||
tableau_liste_employe.on("rowClick", function (row, rowData) {
|
||||
const data = rowData.getData();
|
||||
console.log('Employé cliqué:', data);
|
||||
|
||||
document.getElementById('detail-id').value = data.id;
|
||||
document.getElementById('detail-matricule').value = data.matricule;
|
||||
@@ -163,9 +152,6 @@ tableau_liste_employe.on("rowClick", function (row, rowData) {
|
||||
document.getElementById("affectation-nom-employe").textContent = data.employe || "Employé inconnu";
|
||||
document.getElementById("affecter_employe_id").value = data.id;
|
||||
|
||||
$("liste-affectations-nom-employe").textContent = data.employe || "Employé inconnu";
|
||||
tableauToutesAffectations.setData(data.toutes_affectations);
|
||||
|
||||
document.getElementById("affectations-list").innerHTML = "";
|
||||
for (const affectation of data.affectations) {
|
||||
document.getElementById("affectations-list").innerHTML += `
|
||||
@@ -222,23 +208,6 @@ tableau_liste_employe.on("rowClick", function (row, rowData) {
|
||||
modal.show();
|
||||
})
|
||||
|
||||
$("btnAfficherToutesAffectations").addEventListener("click", function() {
|
||||
const modalDetail = $("modalDetailEmploye");
|
||||
const modalAffectations = $("modalListeAffectations");
|
||||
|
||||
modalDetail.addEventListener("hidden.bs.modal", function ouvrirListe() {
|
||||
modalDetail.removeEventListener("hidden.bs.modal", ouvrirListe);
|
||||
bootstrap.Modal.getOrCreateInstance(modalAffectations).show();
|
||||
}, {once: true});
|
||||
|
||||
modalAffectations.addEventListener("hidden.bs.modal", function revenirAuDetail() {
|
||||
modalAffectations.removeEventListener("hidden.bs.modal", revenirAuDetail);
|
||||
bootstrap.Modal.getOrCreateInstance(modalDetail).show();
|
||||
}, {once: true});
|
||||
|
||||
bootstrap.Modal.getOrCreateInstance(modalDetail).hide();
|
||||
})
|
||||
|
||||
$("enregistrerDetail").addEventListener("click", function() {
|
||||
const id_ = document.getElementById('detail-id').value;
|
||||
const fonction = document.getElementById('detail-fonction').value;
|
||||
@@ -246,10 +215,17 @@ $("enregistrerDetail").addEventListener("click", function() {
|
||||
const matricule = document.getElementById('detail-matricule').value;
|
||||
const departement = document.getElementById('detail-departement').value;
|
||||
|
||||
const url_enregistrer_detail = document.getElementById("modalDetailEmployeBody").dataset.url;
|
||||
|
||||
console.log("Le lien de l'enregistrement :", document.getElementById("modalDetailEmployeBody").dataset)
|
||||
console.log('=== ENREGISTREMENT DÉTAILS ===');
|
||||
console.log('ID:', id_);
|
||||
console.log('Fonction:', fonction);
|
||||
console.log('Date embauche:', dateEmbauche);
|
||||
console.log('Matricule:', matricule);
|
||||
console.log('Département (valeur brute):', departement);
|
||||
console.log('Département (type):', typeof departement);
|
||||
console.log('Département est vide:', !departement);
|
||||
|
||||
const url_enregistrer_detail = $("modalDetailEmployeBody").dataset.url;
|
||||
|
||||
const payload = {
|
||||
"id": id_,
|
||||
"fonction": fonction,
|
||||
@@ -258,6 +234,9 @@ $("enregistrerDetail").addEventListener("click", function() {
|
||||
"departement": departement
|
||||
};
|
||||
|
||||
console.log('Payload JSON:', payload);
|
||||
console.log('Payload stringifié:', JSON.stringify(payload));
|
||||
|
||||
fetch(url_enregistrer_detail, {
|
||||
method: "POST",
|
||||
headers: {
|
||||
@@ -304,12 +283,15 @@ const listeContratExpirant = new Tabulator("#listeContratExpirant", {
|
||||
ajaxURL: $("boutonContratExpirants").dataset.urlexpirants,
|
||||
})
|
||||
|
||||
/* let tabContrats = null;
|
||||
let tabContrats = null;
|
||||
|
||||
document.getElementById("modalContratsEmploye").addEventListener("show.bs.modal", function () {
|
||||
document.getElementById("modalContratsEmploye")
|
||||
.addEventListener("show.bs.modal", function () {
|
||||
|
||||
const employeId = document.getElementById("detail-id").value;
|
||||
|
||||
console.log("Employe ID :", employeId);
|
||||
|
||||
if (!employeId) {
|
||||
alert("Aucun employé sélectionné");
|
||||
return;
|
||||
@@ -368,4 +350,4 @@ document.getElementById("modalContratsEmploye").addEventListener("show.bs.modal"
|
||||
.catch(error => {
|
||||
console.error("Erreur :", error);
|
||||
});
|
||||
}); */
|
||||
});
|
||||
|
||||
@@ -61,8 +61,7 @@
|
||||
{% include "gestion_employe/parts/modalAffectationProjet.html" %}
|
||||
{% include "gestion_employe/parts/modalDocument.html" %}
|
||||
{% include "gestion_employe/parts/modalListeContratExpirants.html" %}
|
||||
{% include "gestion_employe/parts/modalListeAffectations.html" %}
|
||||
{% endblock %}
|
||||
{% block 'js' %}
|
||||
<script type="text/javascript" src="{% static 'gestion_employe/js/index.js' %}"></script>
|
||||
{% endblock %}
|
||||
{% endblock %}
|
||||
@@ -25,4 +25,4 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -54,4 +54,4 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -8,7 +8,7 @@
|
||||
</h5>
|
||||
<button type="button" class="btn-close" data-bs-dismiss="modal"></button>
|
||||
</div>
|
||||
<div class="modal-body" id="modalDetailEmployeBody" data-url="{% url 'gestion_employe:enregistrer-detail-employe' %}">
|
||||
<div class="modal-body" id="modalDetailEmployeBody">
|
||||
<div class="row g-3">
|
||||
<input type="hidden" id="detail-id">
|
||||
<div class="col-md-6">
|
||||
@@ -112,16 +112,11 @@
|
||||
<div class="row d-flex g-3">
|
||||
<div class="d-flex justify-content-between">
|
||||
<h5><i class="bi bi-pin-angle me-2"></i> Affectations</h5>
|
||||
<div class="d-flex gap-2">
|
||||
<button type="button" class="btn btn-outline-primary" id="btnAfficherToutesAffectations">
|
||||
<i class="bi bi-list-ul"></i> Voir toutes les affectations
|
||||
{% if user|has_group:"ressource_humaine" %}
|
||||
<button type="button" class="btn btn-success" data-bs-toggle="modal" data-bs-target="#modalAffectation" onclick="setEmployeId()">
|
||||
<i class="bi bi-file-earmark-text"></i>Affecter
|
||||
</button>
|
||||
{% if user|has_group:"ressource_humaine" %}
|
||||
<button type="button" class="btn btn-success" data-bs-toggle="modal" data-bs-target="#modalAffectation" onclick="setEmployeId()">
|
||||
<i class="bi bi-file-earmark-text"></i> Affecter
|
||||
</button>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="row">
|
||||
<div id="affectations-list"></div>
|
||||
@@ -140,4 +135,4 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -1,20 +0,0 @@
|
||||
<div class="modal fade" id="modalListeAffectations" tabindex="-1" aria-labelledby="modalListeAffectationsLabel" aria-hidden="true">
|
||||
<div class="modal-dialog modal-xl modal-dialog-scrollable">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title" id="modalListeAffectationsLabel">
|
||||
Toutes les affectations de <span id="liste-affectations-nom-employe"></span>
|
||||
</h5>
|
||||
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Fermer"></button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div id="tableauToutesAffectations"></div>
|
||||
</div>
|
||||
<div class="modal-footer bg-light">
|
||||
<button type="button" class="btn btn-outline-secondary" data-bs-dismiss="modal">
|
||||
<i class="bi bi-x-circle"></i> Fermer
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
Binary file not shown.
@@ -91,4 +91,4 @@ urlpatterns = [
|
||||
views.liste_contrat_expirants,
|
||||
name='liste-contrat-expirants'
|
||||
)
|
||||
]
|
||||
]
|
||||
@@ -353,6 +353,9 @@ def enregistrer_detail_employe(request):
|
||||
|
||||
# Traiter le département
|
||||
dept_value = data.get('departement')
|
||||
print(f"[DEBUG] Département brut: {dept_value!r}")
|
||||
print(f"[DEBUG] Type département: {type(dept_value).__name__}")
|
||||
print(f"[DEBUG] Est vide: {not dept_value}")
|
||||
|
||||
if dept_value and str(dept_value).strip():
|
||||
try:
|
||||
@@ -418,16 +421,6 @@ def liste_employe(request):
|
||||
date_fin_daffectation__gte=timezone.now().date()
|
||||
)
|
||||
]
|
||||
toutes_affectations = [
|
||||
{
|
||||
"projet": affectation.projet.nom_projet,
|
||||
"role": dict(Affectation.ROLE_CHOICES).get(affectation.role, affectation.role),
|
||||
"pourcentage_temps_affectation": affectation.pourcentage_temps_affectation,
|
||||
"date_affectation": affectation.date_affectation,
|
||||
"date_fin_daffectation": affectation.date_fin_daffectation,
|
||||
}
|
||||
for affectation in Affectation.objects.filter(employe=employe).select_related("projet")
|
||||
]
|
||||
|
||||
data.append(
|
||||
{
|
||||
@@ -437,7 +430,6 @@ def liste_employe(request):
|
||||
"email": employe.user.email,
|
||||
"formations": formations,
|
||||
"affectations": affectations,
|
||||
"toutes_affectations": toutes_affectations,
|
||||
"projet": projets,
|
||||
"contrats": contrats,
|
||||
"departement": employe.departement.id if employe.departement else "",
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -22,6 +22,7 @@ class ProjetForm(forms.ModelForm):
|
||||
'date_fin',
|
||||
'numero_convention',
|
||||
'domaine_recherche',
|
||||
'type_projet',
|
||||
'budget',
|
||||
'budget_RH',
|
||||
'description'
|
||||
@@ -36,6 +37,7 @@ class ProjetForm(forms.ModelForm):
|
||||
'nom_projet': forms.TextInput(attrs={'class': "form-control"}),
|
||||
'numero_convention': forms.TextInput(attrs={'class': "form-control"}),
|
||||
'domaine_recherche': forms.SelectMultiple(attrs={'class': "form-control"}),
|
||||
'type_projet': forms.Select(attrs={'class': "form-select"}),
|
||||
'budget': forms.NumberInput(attrs={'class': "form-control"}),
|
||||
'budget_RH': forms.NumberInput(attrs={'class': "form-control"}),
|
||||
'description': forms.Textarea(attrs={'class': "form-control"}),
|
||||
@@ -173,4 +175,4 @@ class LivrablesLivresForm(forms.ModelForm):
|
||||
'fichier': forms.ClearableFileInput(attrs={
|
||||
'class':'form-control',
|
||||
}),
|
||||
}
|
||||
}
|
||||
@@ -1,3 +1,5 @@
|
||||
from datetime import datetime
|
||||
|
||||
from django.db import models
|
||||
from django.utils import timezone
|
||||
|
||||
@@ -31,11 +33,9 @@ class DomaineDeRecherche(models.Model):
|
||||
|
||||
DOMAINE_RECHERCHE = (
|
||||
('sciences_sociales', 'Sciences sociales'),
|
||||
('naturelles', 'Naturelles'),
|
||||
('humaines', 'Humaines'),
|
||||
('epidemiologie', 'Epidémiologie'),
|
||||
('sciences_biomedicales', 'Sciences biomédicales'),
|
||||
('service_pedagogique', 'Service Pédagogique'),
|
||||
('recherche_clinique', 'Recherche clinique')
|
||||
('veterinaires', 'Vétérinaires')
|
||||
)
|
||||
|
||||
nom = models.CharField(
|
||||
@@ -54,6 +54,13 @@ class DomaineDeRecherche(models.Model):
|
||||
|
||||
class Projet(models.Model):
|
||||
"""Modèle représentant un projet de recherche avec ses caractéristiques et son bailleur associé."""
|
||||
TYPE_PROJET = (
|
||||
('laboratoire', 'Laboratoire'),
|
||||
('épidémiologie', 'Épidémiologie'),
|
||||
('sciences sociales', 'Sciences sociales'),
|
||||
('cliniques', 'Cliniques'),
|
||||
('autre', 'Autre'),
|
||||
)
|
||||
|
||||
id_projet = models.CharField(
|
||||
max_length=100,
|
||||
@@ -79,6 +86,12 @@ class Projet(models.Model):
|
||||
description = models.TextField(
|
||||
verbose_name="Description"
|
||||
)
|
||||
type_projet = models.CharField(
|
||||
max_length=100,
|
||||
choices=TYPE_PROJET,
|
||||
default='épidémiologie',
|
||||
verbose_name="Type de projet"
|
||||
)
|
||||
domaine_recherche = models.ManyToManyField(DomaineDeRecherche)
|
||||
budget=models.DecimalField(
|
||||
max_digits=12,
|
||||
@@ -101,13 +114,13 @@ class Projet(models.Model):
|
||||
|
||||
@property
|
||||
def statut(self):
|
||||
if self.date_fin < timezone.now().date():
|
||||
if self.date_fin < datetime.date.today():
|
||||
return "Terminé"
|
||||
return "En cours"
|
||||
|
||||
@property
|
||||
def avancement(self):
|
||||
aujourd_hui = timezone.now().date()
|
||||
aujourd_hui = datetime.date.today()
|
||||
if (self.date_debut and self.date_fin) and (self.date_debut < self.date_fin):
|
||||
duree_projet = (self.date_fin - self.date_debut).days
|
||||
temps_ecoule = (aujourd_hui - self.date_debut).days
|
||||
@@ -296,4 +309,4 @@ class LivrablesLivres(models.Model):
|
||||
null = True
|
||||
)
|
||||
def __str__(self):
|
||||
return self.nom
|
||||
return self.nom
|
||||
@@ -1,6 +1,5 @@
|
||||
const $ = (element) => document.getElementById(element)
|
||||
const url_liste_projet = $("tableau-liste-projet").dataset.url;
|
||||
|
||||
const tableau_liste_projet = new Tabulator("#tableau-liste-projet", {
|
||||
fitColumns: true,
|
||||
responsiveLayout : true,
|
||||
@@ -40,6 +39,7 @@ tableau_liste_projet.on("rowClick", function (row, rowData) {
|
||||
$("detail_date_debut").value = data.date_debut;
|
||||
$("detail_date_fin").value = data.date_fin;
|
||||
$("detail_numero_convention").value = data.numero_convention;
|
||||
$("detail_type_projet").value = data.type_projet;
|
||||
Array.from($("detail_domaine_recherche").options).forEach(option => {
|
||||
if (data.domaine_recherche.includes(option.value)) {
|
||||
option.selected = true;
|
||||
@@ -61,4 +61,4 @@ tableau_liste_projet.on("rowClick", function (row, rowData) {
|
||||
// $('detail-projet-form').addEventListener('submit', (e) => {
|
||||
// e.preventDefault();
|
||||
// new FormData($("detail-projet-form"));
|
||||
// })
|
||||
// })
|
||||
@@ -18,4 +18,4 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -31,15 +31,23 @@
|
||||
<label>Date de fin :</label>
|
||||
<input type="date" class="form-control" id="detail_date_fin" name='date_fin'>
|
||||
</div>
|
||||
<div class="form-group mb-2">
|
||||
<label> Type de projet </label>
|
||||
<select class="form-select" id="detail_type_projet" name='type_projet'>
|
||||
<option value="laboratoire">Laboratoire</option>
|
||||
<option value="épidémiologie">Épidémiologie</option>
|
||||
<option value="sciences sociales">Sciences sociales</option>
|
||||
<option value="cliniques">Cliniques</option>
|
||||
<option value="autre">Autre</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-group mb-2">
|
||||
<label> Domaine de recherche </label>
|
||||
<select class="form-select" multiple id="detail_domaine_recherche" name="domaine_recherche">
|
||||
<option value="sciences_sociales">Sciences sociales</option>
|
||||
<option value="naturelles">Naturelles</option>
|
||||
<option value="humaines">Humaines</option>
|
||||
<option value="epidemiologie">Epidémiologie</option>
|
||||
<option value="sciences_biomedicales">Sciences biomédicales</option>
|
||||
<option value="service_pedagogique">Service Pédagogique</option>
|
||||
<option value="recherche_clinique">Recherche clinique</option>
|
||||
<option value="veterinaires">Vétérinaires</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-group mb-2">
|
||||
@@ -104,4 +112,4 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -44,6 +44,7 @@ def liste_projet(request):
|
||||
"date_fin": p.date_fin,
|
||||
"numero_convention": p.numero_convention,
|
||||
"description": p.description,
|
||||
"type_projet": p.type_projet,
|
||||
"budget": p.budget,
|
||||
"budget_RH": p.budget_RH,
|
||||
"created_at": p.created_at,
|
||||
@@ -501,4 +502,4 @@ def annuler_activite_projet(request):
|
||||
activite.motif_annulation = request.POST.get("motif_annulation", "").strip()
|
||||
activite.save()
|
||||
messages.success(request, f"L'activité '{activite.titre}' a été annulée avec succès.")
|
||||
return redirect('gestion_projet:activites-projet')
|
||||
return redirect('gestion_projet:activites-projet')
|
||||
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,7 +2,71 @@ const $ = (element) => document.getElementById(element);
|
||||
const { Schedule } = calendarjs;
|
||||
|
||||
let dateAUtiliser = new Date().toISOString().split('T')[0];
|
||||
let currentReservationId = null;
|
||||
|
||||
function afficherDetailsReservation(data) {
|
||||
const reservationId = data.id_reservation || data.id;
|
||||
$("id_reservation_detail").value = reservationId;
|
||||
$("id_reservation_refus").value = reservationId;
|
||||
$("id_reservation_zoom").value = reservationId;
|
||||
$("employe").value = data.employe;
|
||||
$("salle").value = data.salle;
|
||||
$("statut-reservation").textContent = data.statut;
|
||||
$("date_evenement").value = data.date_evenement || data.date_debut;
|
||||
$("heure_debut").value = data.heure_debut;
|
||||
$("heure_fin").value = data.heure_fin;
|
||||
$("motif_reservation").value = data.motif_reservation;
|
||||
$("besoin_zoom").checked = data.besoin_zoom;
|
||||
$("besoin_ordinateur").checked = data.besoin_ordinateur ?? data.besoin_ordi;
|
||||
$("lien_zoom").value = data.lien_zoom || "";
|
||||
$("lien_zoom_container").classList.toggle("d-none", !data.besoin_zoom);
|
||||
|
||||
const currentUserId = $("current-user-id").dataset.userId;
|
||||
const isOwner = data.est_proprietaire === true
|
||||
|| String(data.employe_id) === currentUserId;
|
||||
const isPending = data.est_en_attente === true
|
||||
|| data.statut === "En attente"
|
||||
|| data.statut === "en_attente";
|
||||
|
||||
$("bouton-supprimer-reservation").classList.toggle(
|
||||
"d-none",
|
||||
!(isOwner && isPending)
|
||||
);
|
||||
|
||||
for (const id of ["refuserReservation", "refuserReservationInfo", "bouton-valider", "bouton-valider-info"]) {
|
||||
const button = $(id);
|
||||
if (button) {
|
||||
button.style.display = isPending && !isOwner ? "inline-block" : "none";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function supprimerReservation(reservationId) {
|
||||
if (!window.confirm("Voulez-vous vraiment supprimer cette demande de réservation en attente ?")) {
|
||||
return;
|
||||
}
|
||||
|
||||
const form = $("formulaire-details");
|
||||
const csrf = form.querySelector("[name=csrfmiddlewaretoken]").value;
|
||||
const url = $("bouton-supprimer-reservation").dataset.url.replace(
|
||||
"/0/",
|
||||
`/${reservationId}/`
|
||||
);
|
||||
|
||||
fetch(url, {
|
||||
method: "POST",
|
||||
headers: {"X-CSRFToken": csrf},
|
||||
})
|
||||
.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 calendrier = Schedule(document.getElementById('planning-reservation'), {
|
||||
type: 'weekdays',
|
||||
@@ -19,31 +83,7 @@ const calendrier = Schedule(document.getElementById('planning-reservation'), {
|
||||
return response.json();
|
||||
})
|
||||
.then(data => {
|
||||
currentReservationId = data.id_reservation;
|
||||
$("id_reservation_detail").value = data.id_reservation;
|
||||
$("id_reservation_refus").value = data.id_reservation;
|
||||
$("id_reservation_zoom").value = data.id_reservation;
|
||||
$("employe").value=data.employe;
|
||||
$("salle").value=data.salle;
|
||||
$("statut-reservation").innerHTML=data.statut;
|
||||
$("date_evenement").value=data.date_evenement;
|
||||
$("heure_debut").value=data.heure_debut;
|
||||
$("heure_fin").value=data.heure_fin;
|
||||
$("motif_reservation").value=data.motif_reservation;
|
||||
$("besoin_zoom").checked=data.besoin_zoom;
|
||||
$("besoin_ordinateur").checked=data.besoin_ordinateur;
|
||||
$("lien_zoom").value=data.lien_zoom;
|
||||
|
||||
const zoomContainer = $("lien_zoom_container");
|
||||
if (!data.besoin_zoom) {
|
||||
zoomContainer.classList.add("d-none");
|
||||
} else {
|
||||
zoomContainer.classList.remove("d-none");
|
||||
}
|
||||
if (data.besoin_zoom === false){
|
||||
$("lien_zoom_container").className = "d-none";
|
||||
}
|
||||
|
||||
afficherDetailsReservation(data);
|
||||
})
|
||||
.catch(error => console.error("Impossible de charger les détails de la réservation :", error));
|
||||
}
|
||||
@@ -58,6 +98,10 @@ $('semaineDate').addEventListener('change', () => {
|
||||
calendrier.render();
|
||||
})
|
||||
|
||||
$("bouton-supprimer-reservation").addEventListener("click", () => {
|
||||
supprimerReservation($("id_reservation_detail").value);
|
||||
});
|
||||
|
||||
evenement_defini = null
|
||||
|
||||
$("liste-salle").addEventListener("change", (e) => {
|
||||
@@ -76,39 +120,22 @@ $("liste-salle").addEventListener("change", (e) => {
|
||||
function chargement_evenement(){
|
||||
const url = $("planning-reservation").dataset.url;
|
||||
fetch (url)
|
||||
.then(response => response.json())
|
||||
.then(response => {
|
||||
if (!response.ok) {
|
||||
throw new Error(`Erreur HTTP ${response.status}`);
|
||||
}
|
||||
return response.json();
|
||||
})
|
||||
.then(data => {
|
||||
calendrier.setData(data);
|
||||
})
|
||||
.catch(error => console.error("Impossible de charger les réservations :", error));
|
||||
}
|
||||
|
||||
document.addEventListener("DOMContentLoaded", function () {
|
||||
chargement_evenement()
|
||||
})
|
||||
|
||||
$("bouton-annuler").addEventListener("click", (e) => {
|
||||
e.preventDefault();
|
||||
|
||||
const csrf = document.querySelector("[name=csrfmiddlewaretoken]").value;
|
||||
const url_annuler = $("formulaire-details").dataset.urlannuler;
|
||||
|
||||
e.preventDefault();
|
||||
|
||||
fetch(
|
||||
url_annuler,
|
||||
{
|
||||
method: "POST",
|
||||
headers: {
|
||||
"X-Requested-With": "XMTHttpRequest",
|
||||
"X-CSRFToken": csrf
|
||||
},
|
||||
body: new FormData($("formulaire-details"))
|
||||
}
|
||||
)
|
||||
.then(response => response.json())
|
||||
.then(data => console.log(data))
|
||||
})
|
||||
|
||||
if($("bouton-valider")){
|
||||
$("bouton-valider").addEventListener("click", (e) => {
|
||||
const csrf = document.querySelector("[name=csrfmiddlewaretoken]").value;
|
||||
@@ -180,40 +207,7 @@ const tableau_reservation_attente = new Tabulator("#tableau-reservation-attente"
|
||||
tableau_reservation_attente.on("rowClick", (row, rowData) => {
|
||||
const data = rowData.getData();
|
||||
|
||||
console.log(data);
|
||||
|
||||
if(data.besoin_zoom === false){
|
||||
$("lien_zoom_container").className = 'd-none';
|
||||
}
|
||||
|
||||
const id_user = $("current-user-id").dataset.userId;
|
||||
|
||||
$("id_reservation_detail").value = data.id;
|
||||
$("id_reservation_refus").value = data.id;
|
||||
$("id_reservation_zoom").value = data.id;
|
||||
|
||||
$("employe").value=data.employe;
|
||||
$("salle").value=data.salle;
|
||||
$("statut-reservation").innerHTML=data.statut;
|
||||
$("date_evenement").value = data.date_evenement;
|
||||
$("heure_debut").value=data.heure_debut;
|
||||
$("heure_fin").value=data.heure_fin;
|
||||
$("motif_reservation").value=data.motif_reservation;
|
||||
$("besoin_zoom").checked=data.besoin_zoom;
|
||||
$("besoin_ordinateur").checked=data.besoin_ordi;
|
||||
$("lien_zoom").value=data.lien_zoom;
|
||||
|
||||
const refuserReservation = document.querySelector("#refuserReservation");
|
||||
const bouton_valider = document.querySelector("#bouton-valider");
|
||||
|
||||
if((refuserReservation | bouton_valider) && data.statut === "En attente"){
|
||||
refuserReservation.style.display = "inline-block";
|
||||
bouton_valider.style.display = "inline-block";
|
||||
}
|
||||
|
||||
if (id_user != data.employe_id){
|
||||
$("bouton-annuler").className = "d-none";
|
||||
}
|
||||
afficherDetailsReservation(data);
|
||||
|
||||
const modal = new bootstrap.Modal($("modalDetailReservation"));
|
||||
bootstrap.Modal.getOrCreateInstance($("modalReservationAttente")).hide();
|
||||
|
||||
@@ -55,5 +55,5 @@
|
||||
{% block 'js' %}
|
||||
<script src="https://cdn.jsdelivr.net/npm/lemonadejs/dist/lemonade.min.js"></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/@calendarjs/ce/dist/index.min.js"></script>
|
||||
<script src="{% static 'gestion_salle/js/index.js' %}?v=3"></script>
|
||||
<script src="{% static 'gestion_salle/js/index.js' %}?v=5"></script>
|
||||
{% endblock %}
|
||||
@@ -10,7 +10,7 @@
|
||||
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<form method="POST" data-urlannuler="{% url 'gestion_salle:annuler-reservation' %}" data-urlvalider="{% url 'gestion_salle:valider-reservation' %}" id="formulaire-details">
|
||||
<form method="POST" data-urlvalider="{% url 'gestion_salle:valider-reservation' %}" id="formulaire-details">
|
||||
{% csrf_token %}
|
||||
<input type='' class="form-control" id="id_reservation_detail" name='id_reservation' hidden>
|
||||
<div class="form-group mb-2">
|
||||
@@ -63,7 +63,18 @@
|
||||
<button class="btn btn-success me-1" id="bouton-valider-info">Valider</button>
|
||||
{% endif %}
|
||||
<span id="current-user-id" data-user-id="{{ user.id }}"></span>
|
||||
<button class="btn btn-danger" id="bouton-annuler">Annuler</button>
|
||||
<button
|
||||
type="button"
|
||||
class="btn btn-outline-danger d-none"
|
||||
id="bouton-supprimer-reservation"
|
||||
data-url="{% url 'gestion_salle:supprimer-reservation' 0 %}"
|
||||
>
|
||||
Supprimer ma demande
|
||||
</button>
|
||||
|
||||
<button type="button" class="btn btn-secondary" id="bouton-annuler" data-bs-dismiss="modal">
|
||||
Fermer
|
||||
</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
@@ -45,5 +45,10 @@ urlpatterns = [
|
||||
'liste-reservation-attente',
|
||||
views.liste_reservation_attente,
|
||||
name="liste-reservation-attente"
|
||||
),
|
||||
path(
|
||||
'reservation/<int:reservation_id>/supprimer',
|
||||
views.supprimer_reservation,
|
||||
name="supprimer-reservation",
|
||||
)
|
||||
]
|
||||
@@ -125,19 +125,25 @@ Veuillez vous connecter à la plateforme pour traiter cette demande.""",
|
||||
|
||||
return render(request, "gestion_salle/index.html", context)
|
||||
|
||||
@login_required
|
||||
def liste_reservation(request:HttpRequest):
|
||||
"""Vue d'affichage des creneaux disponibles"""
|
||||
reservations = Reservation.objects.filter(statut = "validee")
|
||||
try:
|
||||
employe = Employe.objects.get(user=request.user)
|
||||
reservations = Reservation.objects.filter(
|
||||
Q(statut="validee")
|
||||
| Q(statut="en_attente", employe=employe)
|
||||
)
|
||||
except Employe.DoesNotExist:
|
||||
reservations = Reservation.objects.filter(statut="validee")
|
||||
|
||||
liste_reservation = []
|
||||
|
||||
for reservation in reservations:
|
||||
color = None
|
||||
if reservation.statut == "en_attente":
|
||||
color = "#ffc107"
|
||||
elif reservation.statut == "validee":
|
||||
color = "#198754"
|
||||
else:
|
||||
color = "#dc3545"
|
||||
color = "#198754"
|
||||
|
||||
liste_reservation.append({
|
||||
"guid": reservation.pk,
|
||||
@@ -146,6 +152,7 @@ def liste_reservation(request:HttpRequest):
|
||||
"start": reservation.heure_debut,
|
||||
"end": reservation.heure_fin,
|
||||
"color": color,
|
||||
"statut": dict(Reservation.STATUT).get(reservation.statut),
|
||||
})
|
||||
return JsonResponse(liste_reservation, safe=False)
|
||||
|
||||
@@ -183,6 +190,7 @@ def liste_reservation_attente(request):
|
||||
liste_reservation = [
|
||||
{
|
||||
**model_to_dict(reservation),
|
||||
"id": reservation.pk,
|
||||
"employe": f"{reservation.employe.user.first_name} {reservation.employe.user.last_name}",
|
||||
"employe_id": reservation.employe.user.id,
|
||||
"salle": dict(Reservation.TYPE_CHOICES).get(reservation.salle),
|
||||
@@ -193,6 +201,49 @@ def liste_reservation_attente(request):
|
||||
|
||||
return JsonResponse(liste_reservation, safe=False)
|
||||
|
||||
|
||||
@login_required
|
||||
def supprimer_reservation(request: HttpRequest, reservation_id: int):
|
||||
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:
|
||||
reservation = Reservation.objects.get(
|
||||
pk=reservation_id,
|
||||
employe=employe,
|
||||
)
|
||||
except Reservation.DoesNotExist:
|
||||
return JsonResponse(
|
||||
{"success": False, "message": "Réservation introuvable ou accès non autorisé."},
|
||||
status=404,
|
||||
)
|
||||
|
||||
if reservation.statut != "en_attente":
|
||||
return JsonResponse(
|
||||
{
|
||||
"success": False,
|
||||
"message": "Seules les réservations en attente peuvent être supprimées.",
|
||||
},
|
||||
status=400,
|
||||
)
|
||||
|
||||
reservation.delete()
|
||||
return JsonResponse(
|
||||
{"success": True, "message": "Votre réservation en attente a été supprimée."}
|
||||
)
|
||||
|
||||
|
||||
def detail_reservation(request:HttpRequest, reservation_id:int):
|
||||
reservation = Reservation.objects.get(id=reservation_id)
|
||||
employe = reservation.employe.user
|
||||
@@ -209,6 +260,8 @@ def detail_reservation(request:HttpRequest, reservation_id:int):
|
||||
'besoin_zoom': reservation.besoin_zoom,
|
||||
'besoin_ordinateur': reservation.besoin_ordi,
|
||||
'lien_zoom': reservation.lien_zoom or '',
|
||||
'est_proprietaire': request.user.is_authenticated and reservation.employe.user_id == request.user.id,
|
||||
'est_en_attente': reservation.statut == "en_attente",
|
||||
}
|
||||
|
||||
return JsonResponse(reservation_json, safe=True)
|
||||
|
||||
6
staticfiles/bootstrap.min.css
vendored
Normal file
6
staticfiles/bootstrap.min.css
vendored
Normal file
File diff suppressed because one or more lines are too long
3
staticfiles/gestion_conge/admin.py
Normal file
3
staticfiles/gestion_conge/admin.py
Normal file
@@ -0,0 +1,3 @@
|
||||
from django.contrib import admin
|
||||
|
||||
# Register your models here.
|
||||
6
staticfiles/gestion_conge/apps.py
Normal file
6
staticfiles/gestion_conge/apps.py
Normal file
@@ -0,0 +1,6 @@
|
||||
from django.apps import AppConfig
|
||||
|
||||
|
||||
class GestionCongeConfig(AppConfig):
|
||||
default_auto_field = 'django.db.models.BigAutoField'
|
||||
name = 'gestion_conge'
|
||||
@@ -3,6 +3,23 @@ const $ = (element) => document.getElementById(element);
|
||||
const url_liste_conge_attente = $("liste-demande-conges").dataset.url
|
||||
|
||||
const tableau_liste_demande_conge = new Tabulator("#liste-demande-conges", {
|
||||
<<<<<<< HEAD
|
||||
<<<<<<< HEAD
|
||||
<<<<<<< HEAD
|
||||
<<<<<<< HEAD
|
||||
// layout : "fitColumns",
|
||||
=======
|
||||
layout : "fitColumns",
|
||||
>>>>>>> 0047b1f (Ajout de la prise en charge des photos de profil)
|
||||
=======
|
||||
layout : "fitColumns",
|
||||
>>>>>>> f6b90e7 (Verification du statut avant la creation d'un contrat)
|
||||
=======
|
||||
layout : "fitColumns",
|
||||
>>>>>>> 6026af5 (Bug : Affichages des conges)
|
||||
=======
|
||||
// layout : "fitColumns",
|
||||
>>>>>>> 3b587d2a1a4376551b4b694a38e0e24a1c4cf4c5
|
||||
columns: [
|
||||
{"title": "Nom et Prénom", "field": "prenom_nom"},
|
||||
{"title": "Date de début", "field": "date_debut", formatter:"datetime", formatterParams:{
|
||||
@@ -14,7 +31,23 @@ const tableau_liste_demande_conge = new Tabulator("#liste-demande-conges", {
|
||||
outputFormat:"dd/MM/yy",
|
||||
}},
|
||||
{"title": "Type de congé", "field": "type"},
|
||||
<<<<<<< HEAD
|
||||
<<<<<<< HEAD
|
||||
<<<<<<< HEAD
|
||||
<<<<<<< HEAD
|
||||
{"title": "Date de la demande", "field": "date_demande", responsive: 1},
|
||||
=======
|
||||
{"title": "Date de la demande", "field": "date_demande"},
|
||||
>>>>>>> 0047b1f (Ajout de la prise en charge des photos de profil)
|
||||
=======
|
||||
{"title": "Date de la demande", "field": "date_demande"},
|
||||
>>>>>>> f6b90e7 (Verification du statut avant la creation d'un contrat)
|
||||
=======
|
||||
{"title": "Date de la demande", "field": "date_demande"},
|
||||
>>>>>>> 6026af5 (Bug : Affichages des conges)
|
||||
=======
|
||||
{"title": "Date de la demande", "field": "date_demande", responsive: 1},
|
||||
>>>>>>> 3b587d2a1a4376551b4b694a38e0e24a1c4cf4c5
|
||||
{"title": "Validation par supérieur hiérarchique", "field": "validation_hierarchique", formatter:"tickCross", formatterParams :{
|
||||
allowEmpty : true ,
|
||||
}},
|
||||
@@ -23,7 +56,23 @@ const tableau_liste_demande_conge = new Tabulator("#liste-demande-conges", {
|
||||
}},
|
||||
],
|
||||
pagination: true,
|
||||
<<<<<<< HEAD
|
||||
<<<<<<< HEAD
|
||||
<<<<<<< HEAD
|
||||
<<<<<<< HEAD
|
||||
paginationSize: 5,
|
||||
=======
|
||||
paginationSize: 5
|
||||
>>>>>>> 0047b1f (Ajout de la prise en charge des photos de profil)
|
||||
=======
|
||||
paginationSize: 5
|
||||
>>>>>>> f6b90e7 (Verification du statut avant la creation d'un contrat)
|
||||
=======
|
||||
paginationSize: 5
|
||||
>>>>>>> 6026af5 (Bug : Affichages des conges)
|
||||
=======
|
||||
paginationSize: 5,
|
||||
>>>>>>> 3b587d2a1a4376551b4b694a38e0e24a1c4cf4c5
|
||||
})
|
||||
|
||||
const bouton_demande_conges = $("bouton-demande-conge");
|
||||
|
||||
@@ -9,15 +9,30 @@ const tableau_liste_employe = new Tabulator("#tableau_liste_employe", {
|
||||
{"title": "Projet", "field": "projet"},
|
||||
{"title": "Téléphone", "field": "telephone"},
|
||||
],
|
||||
// ajaxURL: url_liste_employe,
|
||||
pagination: true,
|
||||
paginationSize: 10,
|
||||
<<<<<<< HEAD
|
||||
<<<<<<< HEAD
|
||||
<<<<<<< HEAD
|
||||
<<<<<<< HEAD
|
||||
responsiveLayout : "hide"
|
||||
=======
|
||||
>>>>>>> 0047b1f (Ajout de la prise en charge des photos de profil)
|
||||
=======
|
||||
>>>>>>> f6b90e7 (Verification du statut avant la creation d'un contrat)
|
||||
=======
|
||||
>>>>>>> 6026af5 (Bug : Affichages des conges)
|
||||
=======
|
||||
responsiveLayout : "hide"
|
||||
>>>>>>> 3b587d2a1a4376551b4b694a38e0e24a1c4cf4c5
|
||||
})
|
||||
|
||||
fetch(url_liste_employe)
|
||||
.then(response => response.json())
|
||||
.then(data => {
|
||||
if (data.success){
|
||||
console.log(data.data)
|
||||
tableau_liste_employe.setData(data.data);
|
||||
}else{
|
||||
alert(data.message);
|
||||
@@ -27,7 +42,6 @@ fetch(url_liste_employe)
|
||||
|
||||
tableau_liste_employe.on("rowClick", function (row, rowData) {
|
||||
const data = rowData.getData();
|
||||
|
||||
document.getElementById('detail-id').value = data.id;
|
||||
document.getElementById('detail-matricule').value = data.matricule;
|
||||
document.getElementById('detail-employe').value = data.employe;
|
||||
@@ -210,31 +224,23 @@ $("enregistrerDetail").addEventListener("click", function() {
|
||||
const fonction = document.getElementById('detail-fonction').value;
|
||||
const dateEmbauche = document.getElementById('detail-dateEmbauche').value;
|
||||
const matricule = document.getElementById('detail-matricule').value;
|
||||
const departement = document.getElementById('detail-departement').value;
|
||||
|
||||
const url_enregistrer_detail = document.getElementById("modalDetailEmployeBody").dataset.url;
|
||||
|
||||
console.log("Le lien de l'enregistrement :", document.getElementById("modalDetailEmployeBody").dataset)
|
||||
|
||||
const payload = {
|
||||
"id": id_,
|
||||
"fonction": fonction,
|
||||
"date_embauche": dateEmbauche,
|
||||
"matricule": matricule,
|
||||
"departement": departement
|
||||
};
|
||||
|
||||
const url_enregistrer_detail = $("modalDetailEmployeBody").dataset.url;
|
||||
fetch(url_enregistrer_detail, {
|
||||
method: "POST",
|
||||
headers: {
|
||||
"Content-Type": "application/json",
|
||||
"X-CSRFToken": document.querySelector('[name=csrfmiddlewaretoken]').value
|
||||
},
|
||||
body: JSON.stringify(payload)
|
||||
body: JSON.stringify({
|
||||
"id": id_,
|
||||
"fonction": fonction,
|
||||
"date_embauche": dateEmbauche,
|
||||
"matricule": matricule
|
||||
})
|
||||
})
|
||||
.then(response => response.json())
|
||||
.then(data => {
|
||||
console.log('Réponse du serveur:', data);
|
||||
alert(data.message);
|
||||
location.reload();
|
||||
})
|
||||
@@ -268,70 +274,4 @@ const listeContratExpirant = new Tabulator("#listeContratExpirant", {
|
||||
},
|
||||
],
|
||||
ajaxURL: $("boutonContratExpirants").dataset.urlexpirants,
|
||||
})
|
||||
|
||||
/* let tabContrats = null;
|
||||
|
||||
document.getElementById("modalContratsEmploye").addEventListener("show.bs.modal", function () {
|
||||
|
||||
const employeId = document.getElementById("detail-id").value;
|
||||
|
||||
if (!employeId) {
|
||||
alert("Aucun employé sélectionné");
|
||||
return;
|
||||
}
|
||||
|
||||
fetch(`/employé/employe/${employeId}/contrats/`)
|
||||
.then(response => {
|
||||
if (!response.ok) {
|
||||
throw new Error("Erreur HTTP " + response.status);
|
||||
}
|
||||
return response.json();
|
||||
})
|
||||
.then(data => {
|
||||
|
||||
document.getElementById("nom-employe-contrat").innerText =
|
||||
data.employe;
|
||||
|
||||
if (tabContrats) {
|
||||
tabContrats.destroy();
|
||||
}
|
||||
|
||||
tabContrats = new Tabulator(
|
||||
"#table-contrats-tabulator",
|
||||
{
|
||||
data: data.contrats,
|
||||
layout: "fitColumns",
|
||||
placeholder: "Aucun contrat",
|
||||
|
||||
columns: [
|
||||
{ title: "Numéro", field: "numero_contrat" },
|
||||
{ title: "Type", field: "type_contrat" },
|
||||
{ title: "Date début", field: "date_debut" },
|
||||
{ title: "Date fin", field: "date_fin" },
|
||||
{ title: "Salaire", field: "salaire_mensuel" },
|
||||
{ title: "Statut", field: "statut" },
|
||||
|
||||
{
|
||||
title: "Contrat",
|
||||
field: "fichier",
|
||||
formatter: function(cell) {
|
||||
const url = cell.getValue();
|
||||
|
||||
if (!url) {
|
||||
return "<span class='text-danger'>Aucun fichier</span>";
|
||||
}
|
||||
|
||||
return `<a href="${url}" target="_blank" class="btn btn-sm btn-primary">
|
||||
<i class="bi bi-file-earmark-pdf"></i> Ouvrir
|
||||
</a>`;
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
);
|
||||
})
|
||||
.catch(error => {
|
||||
console.error("Erreur :", error);
|
||||
});
|
||||
}); */
|
||||
})
|
||||
@@ -13,20 +13,22 @@ const tableau_certificat = new Tabulator("#tableau-certificat", {
|
||||
inputFormat:"yyyy-MM-dd",
|
||||
outputFormat:"dd/MM/yy",
|
||||
}},
|
||||
{"title": "Fichier", "field": "certificat", formatter:"link", formatterParams:{
|
||||
label:"Voir le fichier",
|
||||
target:"_blank",
|
||||
}},
|
||||
],
|
||||
ajaxURL: url_certificat,
|
||||
})
|
||||
<<<<<<< HEAD
|
||||
<<<<<<< HEAD
|
||||
<<<<<<< HEAD
|
||||
<<<<<<< HEAD
|
||||
const enregistrerProfil = $("enregistrerProfil");
|
||||
|
||||
enregistrerProfil.addEventListener("click", (e) => {
|
||||
|
||||
const url = $("information-personnelles").dataset.url;
|
||||
const csrftoken = document.querySelector("[name='csrfmiddlewaretoken']").value;
|
||||
|
||||
const formData = new FormData();
|
||||
|
||||
formData.append("nom", $("nom").value);
|
||||
formData.append("prenom", $("prenom").value);
|
||||
formData.append("email", $("email").value);
|
||||
@@ -34,10 +36,6 @@ enregistrerProfil.addEventListener("click", (e) => {
|
||||
formData.append("adresse", $("adresse").value);
|
||||
formData.append("sexe", $("sexe").value);
|
||||
formData.append("date_naissance", $("date_naissance").value);
|
||||
const photoInput = $("photo");
|
||||
if (photoInput.files.length > 0) {
|
||||
formData.append("photo", photoInput.files[0]);
|
||||
}
|
||||
|
||||
fetch(url, {
|
||||
method: "POST",
|
||||
@@ -49,4 +47,53 @@ enregistrerProfil.addEventListener("click", (e) => {
|
||||
.then(response => response.json())
|
||||
.then(data => alert(data.message))
|
||||
.catch(error => console.error("Erreur:", error));
|
||||
});
|
||||
});
|
||||
=======
|
||||
=======
|
||||
>>>>>>> f6b90e7 (Verification du statut avant la creation d'un contrat)
|
||||
=======
|
||||
>>>>>>> 6026af5 (Bug : Affichages des conges)
|
||||
|
||||
=======
|
||||
>>>>>>> 3b587d2a1a4376551b4b694a38e0e24a1c4cf4c5
|
||||
const enregistrerProfil = $("enregistrerProfil");
|
||||
|
||||
enregistrerProfil.addEventListener("click", (e) => {
|
||||
|
||||
const url = $("information-personnelles").dataset.url;
|
||||
const csrftoken = document.querySelector("[name='csrfmiddlewaretoken']").value;
|
||||
|
||||
const formData = new FormData();
|
||||
|
||||
formData.append("nom", $("nom").value);
|
||||
formData.append("prenom", $("prenom").value);
|
||||
formData.append("email", $("email").value);
|
||||
formData.append("telephone", $("telephone").value);
|
||||
formData.append("adresse", $("adresse").value);
|
||||
formData.append("sexe", $("sexe").value);
|
||||
formData.append("date_naissance", $("date_naissance").value);
|
||||
|
||||
fetch(url, {
|
||||
method: "POST",
|
||||
headers: {
|
||||
"X-CSRFToken": csrftoken
|
||||
},
|
||||
body: formData
|
||||
})
|
||||
.then(response => response.json())
|
||||
.then(data => alert(data.message))
|
||||
<<<<<<< HEAD
|
||||
<<<<<<< HEAD
|
||||
<<<<<<< HEAD
|
||||
})
|
||||
>>>>>>> 0047b1f (Ajout de la prise en charge des photos de profil)
|
||||
=======
|
||||
})
|
||||
>>>>>>> f6b90e7 (Verification du statut avant la creation d'un contrat)
|
||||
=======
|
||||
})
|
||||
>>>>>>> 6026af5 (Bug : Affichages des conges)
|
||||
=======
|
||||
.catch(error => console.error("Erreur:", error));
|
||||
});
|
||||
>>>>>>> 3b587d2a1a4376551b4b694a38e0e24a1c4cf4c5
|
||||
|
||||
@@ -1,5 +1,18 @@
|
||||
const btnEnregistrerBailleur = document.getElementById('btnEnregistrerBailleur');
|
||||
<<<<<<< HEAD
|
||||
<<<<<<< HEAD
|
||||
<<<<<<< HEAD
|
||||
<<<<<<< HEAD
|
||||
let table;
|
||||
=======
|
||||
>>>>>>> 0047b1f (Ajout de la prise en charge des photos de profil)
|
||||
=======
|
||||
>>>>>>> f6b90e7 (Verification du statut avant la creation d'un contrat)
|
||||
=======
|
||||
>>>>>>> 6026af5 (Bug : Affichages des conges)
|
||||
=======
|
||||
let table;
|
||||
>>>>>>> 3b587d2a1a4376551b4b694a38e0e24a1c4cf4c5
|
||||
|
||||
btnEnregistrerBailleur.addEventListener('click', function() {
|
||||
const form = document.getElementById('formBailleur');
|
||||
@@ -21,27 +34,49 @@ btnEnregistrerBailleur.addEventListener('click', function() {
|
||||
alert('Ce bailleur existe déjà dans la base de données.');
|
||||
}
|
||||
});
|
||||
<<<<<<< HEAD
|
||||
<<<<<<< HEAD
|
||||
<<<<<<< HEAD
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
>>>>>>> 3b587d2a1a4376551b4b694a38e0e24a1c4cf4c5
|
||||
});
|
||||
|
||||
document.addEventListener("DOMContentLoaded", function () {
|
||||
|
||||
table = new Tabulator("#table-bailleurs", {
|
||||
ajaxURL: "/gestion-projet/bailleurs/",
|
||||
layout: "fitColumns",
|
||||
pagination: "local",
|
||||
paginationSize: 5,
|
||||
table = new Tabulator("#table-bailleurs", {
|
||||
ajaxURL: "/gestion-projet/bailleurs/",
|
||||
layout: "fitColumns",
|
||||
pagination: "local",
|
||||
paginationSize: 5,
|
||||
|
||||
columns: [
|
||||
{title: "#", formatter: "rownum", width: 60},
|
||||
{title: "Organisme", field: "nom_organisme"},
|
||||
{title: "Contact", field: "contact"},
|
||||
{title: "Email", field: "email"},
|
||||
{title: "Pays", field: "pays"},
|
||||
],
|
||||
rowDblClick: function(e, row) {
|
||||
const data = row.getData();
|
||||
columns: [
|
||||
{title: "#", formatter: "rownum", width: 60},
|
||||
{title: "Organisme", field: "nom_organisme"},
|
||||
{title: "Contact", field: "contact"},
|
||||
{title: "Email", field: "email"},
|
||||
{title: "Pays", field: "pays"},
|
||||
],
|
||||
rowDblClick: function(e, row) {
|
||||
const data = row.getData();
|
||||
|
||||
if (confirm(`Voulez-vous vraiment supprimer ${data.nom_organisme} ?`)) {
|
||||
supprimerBailleur(data.id);
|
||||
if (confirm(`Voulez-vous vraiment supprimer ${data.nom_organisme} ?`)) {
|
||||
supprimerBailleur(data.id);
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
});
|
||||
>>>>>>> 0047b1f (Ajout de la prise en charge des photos de profil)
|
||||
=======
|
||||
});
|
||||
>>>>>>> f6b90e7 (Verification du statut avant la creation d'un contrat)
|
||||
=======
|
||||
});
|
||||
>>>>>>> 6026af5 (Bug : Affichages des conges)
|
||||
=======
|
||||
>>>>>>> 3b587d2a1a4376551b4b694a38e0e24a1c4cf4c5
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
const $ = (element) => document.getElementById(element)
|
||||
const url_liste_projet = $("tableau-liste-projet").dataset.url;
|
||||
|
||||
const tableau_liste_projet = new Tabulator("#tableau-liste-projet", {
|
||||
fitColumns: true,
|
||||
responsiveLayout : true,
|
||||
@@ -40,6 +39,7 @@ tableau_liste_projet.on("rowClick", function (row, rowData) {
|
||||
$("detail_date_debut").value = data.date_debut;
|
||||
$("detail_date_fin").value = data.date_fin;
|
||||
$("detail_numero_convention").value = data.numero_convention;
|
||||
$("detail_type_projet").value = data.type_projet;
|
||||
Array.from($("detail_domaine_recherche").options).forEach(option => {
|
||||
if (data.domaine_recherche.includes(option.value)) {
|
||||
option.selected = true;
|
||||
@@ -61,4 +61,4 @@ tableau_liste_projet.on("rowClick", function (row, rowData) {
|
||||
// $('detail-projet-form').addEventListener('submit', (e) => {
|
||||
// e.preventDefault();
|
||||
// new FormData($("detail-projet-form"));
|
||||
// })
|
||||
// })
|
||||
@@ -12,14 +12,24 @@ const calendrier = Schedule(document.getElementById('planning-reservation'), {
|
||||
const modal = new bootstrap.Modal($("modalDetailReservation"));
|
||||
modal.show();
|
||||
fetch (`/gestion-salle/revervation/details/${event.guid}`)
|
||||
.then(response => {
|
||||
if (!response.ok) {
|
||||
throw new Error(`Erreur HTTP ${response.status}`);
|
||||
}
|
||||
return response.json();
|
||||
})
|
||||
.then(response => response.json())
|
||||
.then(data => {
|
||||
currentReservationId = data.id_reservation;
|
||||
<<<<<<< HEAD
|
||||
<<<<<<< HEAD
|
||||
<<<<<<< HEAD
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
console.log(data);
|
||||
>>>>>>> 0047b1f (Ajout de la prise en charge des photos de profil)
|
||||
=======
|
||||
console.log(data);
|
||||
>>>>>>> f6b90e7 (Verification du statut avant la creation d'un contrat)
|
||||
=======
|
||||
console.log(data);
|
||||
>>>>>>> 6026af5 (Bug : Affichages des conges)
|
||||
=======
|
||||
>>>>>>> 3b587d2a1a4376551b4b694a38e0e24a1c4cf4c5
|
||||
$("id_reservation_detail").value = data.id_reservation;
|
||||
$("id_reservation_refus").value = data.id_reservation;
|
||||
$("id_reservation_zoom").value = data.id_reservation;
|
||||
@@ -32,20 +42,40 @@ const calendrier = Schedule(document.getElementById('planning-reservation'), {
|
||||
$("motif_reservation").value=data.motif_reservation;
|
||||
$("besoin_zoom").checked=data.besoin_zoom;
|
||||
$("besoin_ordinateur").checked=data.besoin_ordinateur;
|
||||
$("lien_zoom").value=data.lien_zoom;
|
||||
|
||||
const zoomContainer = $("lien_zoom_container");
|
||||
if (!data.besoin_zoom) {
|
||||
zoomContainer.classList.add("d-none");
|
||||
} else {
|
||||
zoomContainer.classList.remove("d-none");
|
||||
}
|
||||
$("lien_zoom").value=data.lien_zoom;
|
||||
|
||||
<<<<<<< HEAD
|
||||
<<<<<<< HEAD
|
||||
<<<<<<< HEAD
|
||||
<<<<<<< HEAD
|
||||
if (data.besoin_zoom === false){
|
||||
$("lien_zoom_container").className = "d-none";
|
||||
}
|
||||
|
||||
=======
|
||||
=======
|
||||
>>>>>>> f6b90e7 (Verification du statut avant la creation d'un contrat)
|
||||
=======
|
||||
>>>>>>> 6026af5 (Bug : Affichages des conges)
|
||||
if(data.statut !== "annulee"){
|
||||
$("motif_refus_container").className = "d-none";
|
||||
}else{
|
||||
$("motif_refus").value=data.motif_refus;
|
||||
}
|
||||
<<<<<<< HEAD
|
||||
<<<<<<< HEAD
|
||||
>>>>>>> 0047b1f (Ajout de la prise en charge des photos de profil)
|
||||
=======
|
||||
>>>>>>> f6b90e7 (Verification du statut avant la creation d'un contrat)
|
||||
=======
|
||||
>>>>>>> 6026af5 (Bug : Affichages des conges)
|
||||
=======
|
||||
if (data.besoin_zoom === false){
|
||||
$("lien_zoom_container").className = "d-none";
|
||||
}
|
||||
|
||||
>>>>>>> 3b587d2a1a4376551b4b694a38e0e24a1c4cf4c5
|
||||
})
|
||||
.catch(error => console.error("Impossible de charger les détails de la réservation :", error));
|
||||
}
|
||||
});
|
||||
|
||||
@@ -87,13 +117,29 @@ document.addEventListener("DOMContentLoaded", function () {
|
||||
})
|
||||
|
||||
$("bouton-annuler").addEventListener("click", (e) => {
|
||||
e.preventDefault();
|
||||
|
||||
const csrf = document.querySelector("[name=csrfmiddlewaretoken]").value;
|
||||
const url_annuler = $("formulaire-details").dataset.urlannuler;
|
||||
|
||||
<<<<<<< HEAD
|
||||
<<<<<<< HEAD
|
||||
<<<<<<< HEAD
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
>>>>>>> 3b587d2a1a4376551b4b694a38e0e24a1c4cf4c5
|
||||
console.log("URL d'annulation :");
|
||||
console.log($("formulaire-details"))
|
||||
|
||||
e.preventDefault();
|
||||
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
>>>>>>> 0047b1f (Ajout de la prise en charge des photos de profil)
|
||||
=======
|
||||
>>>>>>> f6b90e7 (Verification du statut avant la creation d'un contrat)
|
||||
=======
|
||||
>>>>>>> 6026af5 (Bug : Affichages des conges)
|
||||
=======
|
||||
>>>>>>> 3b587d2a1a4376551b4b694a38e0e24a1c4cf4c5
|
||||
fetch(
|
||||
url_annuler,
|
||||
{
|
||||
@@ -140,15 +186,28 @@ if($("ajoutZoom")){
|
||||
|
||||
if($("refuserReservation")){
|
||||
$("refuserReservation").addEventListener("click", (e) => {
|
||||
e.preventDefault();
|
||||
|
||||
const csrf = document.querySelector("[name=csrfmiddlewaretoken]").value;
|
||||
const url = e.currentTarget.dataset.lienrefus;
|
||||
const idRes = $("id_reservation_detail").value;
|
||||
|
||||
<<<<<<< HEAD
|
||||
<<<<<<< HEAD
|
||||
<<<<<<< HEAD
|
||||
<<<<<<< HEAD
|
||||
console.log(idRes);
|
||||
e.preventDefault();
|
||||
|
||||
=======
|
||||
>>>>>>> 0047b1f (Ajout de la prise en charge des photos de profil)
|
||||
=======
|
||||
>>>>>>> f6b90e7 (Verification du statut avant la creation d'un contrat)
|
||||
=======
|
||||
>>>>>>> 6026af5 (Bug : Affichages des conges)
|
||||
=======
|
||||
console.log(idRes);
|
||||
e.preventDefault();
|
||||
|
||||
>>>>>>> 3b587d2a1a4376551b4b694a38e0e24a1c4cf4c5
|
||||
fetch(url, {
|
||||
method: "POST",
|
||||
headers: {
|
||||
@@ -168,7 +227,7 @@ const tableau_reservation_attente = new Tabulator("#tableau-reservation-attente"
|
||||
columns: [
|
||||
{title: "Employé", field: "employe"},
|
||||
{title: "Salle", field: "salle"},
|
||||
{title: "Date de l'evenement", field: "date_evenement"},
|
||||
{title: "Date de l'evenement", field: "date_debut"},
|
||||
{title: "Heure de début", field: "heure_debut"},
|
||||
{title: "Heure de fin", field: "heure_fin"},
|
||||
{title: "Motif de reservation", field: "motif_reservation"},
|
||||
@@ -180,14 +239,52 @@ const tableau_reservation_attente = new Tabulator("#tableau-reservation-attente"
|
||||
tableau_reservation_attente.on("rowClick", (row, rowData) => {
|
||||
const data = rowData.getData();
|
||||
|
||||
<<<<<<< HEAD
|
||||
<<<<<<< HEAD
|
||||
<<<<<<< HEAD
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
console.log(data);
|
||||
|
||||
>>>>>>> 0047b1f (Ajout de la prise en charge des photos de profil)
|
||||
=======
|
||||
console.log(data);
|
||||
|
||||
>>>>>>> f6b90e7 (Verification du statut avant la creation d'un contrat)
|
||||
=======
|
||||
console.log(data);
|
||||
|
||||
>>>>>>> 6026af5 (Bug : Affichages des conges)
|
||||
=======
|
||||
>>>>>>> 3b587d2a1a4376551b4b694a38e0e24a1c4cf4c5
|
||||
if(data.besoin_zoom === false){
|
||||
$("lien_zoom_container").className = 'd-none';
|
||||
}
|
||||
|
||||
const id_user = $("current-user-id").dataset.userId;
|
||||
<<<<<<< HEAD
|
||||
<<<<<<< HEAD
|
||||
<<<<<<< HEAD
|
||||
<<<<<<< HEAD
|
||||
const id_user = $("current-user-id").dataset.userid;
|
||||
=======
|
||||
=======
|
||||
>>>>>>> f6b90e7 (Verification du statut avant la creation d'un contrat)
|
||||
=======
|
||||
>>>>>>> 6026af5 (Bug : Affichages des conges)
|
||||
if(data.statut !== "refusee"){
|
||||
$("motif_refus_container").className = 'd-none';
|
||||
}
|
||||
|
||||
<<<<<<< HEAD
|
||||
<<<<<<< HEAD
|
||||
>>>>>>> 0047b1f (Ajout de la prise en charge des photos de profil)
|
||||
=======
|
||||
>>>>>>> f6b90e7 (Verification du statut avant la creation d'un contrat)
|
||||
=======
|
||||
>>>>>>> 6026af5 (Bug : Affichages des conges)
|
||||
=======
|
||||
const id_user = $("current-user-id").dataset.userid;
|
||||
>>>>>>> 3b587d2a1a4376551b4b694a38e0e24a1c4cf4c5
|
||||
$("id_reservation_detail").value = data.id;
|
||||
$("id_reservation_refus").value = data.id;
|
||||
$("id_reservation_zoom").value = data.id;
|
||||
@@ -195,25 +292,53 @@ tableau_reservation_attente.on("rowClick", (row, rowData) => {
|
||||
$("employe").value=data.employe;
|
||||
$("salle").value=data.salle;
|
||||
$("statut-reservation").innerHTML=data.statut;
|
||||
$("date_evenement").value = data.date_evenement;
|
||||
<<<<<<< HEAD
|
||||
<<<<<<< HEAD
|
||||
<<<<<<< HEAD
|
||||
<<<<<<< HEAD
|
||||
$("date_debut").value = data.date_debut;
|
||||
$("date_fin").value = data.date_fin;
|
||||
=======
|
||||
$("date_evenement").value=data.date_debut;
|
||||
>>>>>>> 0047b1f (Ajout de la prise en charge des photos de profil)
|
||||
=======
|
||||
$("date_evenement").value=data.date_debut;
|
||||
>>>>>>> f6b90e7 (Verification du statut avant la creation d'un contrat)
|
||||
=======
|
||||
$("date_evenement").value=data.date_debut;
|
||||
>>>>>>> 6026af5 (Bug : Affichages des conges)
|
||||
=======
|
||||
$("date_debut").value = data.date_debut;
|
||||
$("date_fin").value = data.date_fin;
|
||||
>>>>>>> 3b587d2a1a4376551b4b694a38e0e24a1c4cf4c5
|
||||
$("heure_debut").value=data.heure_debut;
|
||||
$("heure_fin").value=data.heure_fin;
|
||||
$("motif_reservation").value=data.motif_reservation;
|
||||
$("besoin_zoom").checked=data.besoin_zoom;
|
||||
$("besoin_ordinateur").checked=data.besoin_ordi;
|
||||
$("lien_zoom").value=data.lien_zoom;
|
||||
|
||||
const refuserReservation = document.querySelector("#refuserReservation");
|
||||
const bouton_valider = document.querySelector("#bouton-valider");
|
||||
|
||||
if((refuserReservation | bouton_valider) && data.statut === "En attente"){
|
||||
refuserReservation.style.display = "inline-block";
|
||||
bouton_valider.style.display = "inline-block";
|
||||
}
|
||||
<<<<<<< HEAD
|
||||
<<<<<<< HEAD
|
||||
<<<<<<< HEAD
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
>>>>>>> 3b587d2a1a4376551b4b694a38e0e24a1c4cf4c5
|
||||
|
||||
if (id_user != data.employe_id){
|
||||
$("bouton-annuler").className = "d-none";
|
||||
}
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
$("motif_refus").value=data.motif_refus;
|
||||
>>>>>>> 0047b1f (Ajout de la prise en charge des photos de profil)
|
||||
=======
|
||||
$("motif_refus").value=data.motif_refus;
|
||||
>>>>>>> f6b90e7 (Verification du statut avant la creation d'un contrat)
|
||||
=======
|
||||
$("motif_refus").value=data.motif_refus;
|
||||
>>>>>>> 6026af5 (Bug : Affichages des conges)
|
||||
=======
|
||||
>>>>>>> 3b587d2a1a4376551b4b694a38e0e24a1c4cf4c5
|
||||
|
||||
const modal = new bootstrap.Modal($("modalDetailReservation"));
|
||||
bootstrap.Modal.getOrCreateInstance($("modalReservationAttente")).hide();
|
||||
|
||||
2078
staticfiles/icons.css
Normal file
2078
staticfiles/icons.css
Normal file
File diff suppressed because it is too large
Load Diff
278
staticfiles/styles.css
Normal file
278
staticfiles/styles.css
Normal file
@@ -0,0 +1,278 @@
|
||||
/* === Print === */
|
||||
@media print {
|
||||
nav, .btn, .sidebar, .form-select, .form-control {
|
||||
display: none !important;
|
||||
}
|
||||
body {
|
||||
font-size: 12pt;
|
||||
color: black;
|
||||
}
|
||||
table {
|
||||
border-collapse: collapse;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@media (max-width: 768px) {
|
||||
main {
|
||||
margin-left: 0;
|
||||
}
|
||||
}
|
||||
|
||||
/* === Body & Container === */
|
||||
body {
|
||||
background-color: #e4dccc;
|
||||
background-attachment: fixed;
|
||||
}
|
||||
|
||||
.dashboard-container {
|
||||
background-color: #ffffff;
|
||||
box-shadow: 0 0 10px rgba(0,0,0,0.05);
|
||||
border-radius: 8px;
|
||||
padding: 20px;
|
||||
margin: 30px auto;
|
||||
max-width: 1200px;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
.sidebar {
|
||||
position: fixed;
|
||||
width: 220px;
|
||||
}
|
||||
main {
|
||||
margin-left: 220px;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/* === Sidebar === */
|
||||
.sidebar {
|
||||
background: linear-gradient(180deg, #b35400, #993d00); /* dégradé orange foncé */
|
||||
color: white;
|
||||
min-height: 100vh; /* prend toute la hauteur */
|
||||
top: 0;
|
||||
z-index: 1000;
|
||||
overflow-y: auto;
|
||||
padding: 1rem;
|
||||
}
|
||||
|
||||
.sidebar .nav-link {
|
||||
color: white;
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
.sidebar .nav-link:hover {
|
||||
background-color: rgba(255, 255, 255, 0.1);
|
||||
border-radius: 5px;
|
||||
color: white;
|
||||
}
|
||||
|
||||
.sidebar .dropdown-menu {
|
||||
display: none;
|
||||
position: relative;
|
||||
left: 10px;
|
||||
top: -5px;
|
||||
border: none;
|
||||
padding-left: 1rem;
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
.sidebar .dropdown:hover .dropdown-menu {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.sidebar a {
|
||||
color: white;
|
||||
}
|
||||
|
||||
.sidebar a:hover {
|
||||
color: white;
|
||||
}
|
||||
|
||||
/* === Navbar / Logo / Profil === */
|
||||
.logo {
|
||||
max-width: 80px;
|
||||
}
|
||||
|
||||
.img-profil {
|
||||
width: 80px !important;
|
||||
height: 80px !important;
|
||||
object-fit: cover;
|
||||
border-radius: 50%;
|
||||
}
|
||||
|
||||
/* === Cards === */
|
||||
.card {
|
||||
border: 1px solid #dee2e6;
|
||||
box-shadow: 0 2px 4px rgba(0,0,0,0.05);
|
||||
border-radius: 8px;
|
||||
transition: transform 0.3s ease;
|
||||
}
|
||||
|
||||
.card:hover {
|
||||
transform: scale(1.02);
|
||||
}
|
||||
|
||||
.card-header {
|
||||
background-color: #f8f9fa;
|
||||
font-weight: bold !important;
|
||||
color: black !important;
|
||||
font-size: 1rem;
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
.card-body h5 {
|
||||
color: black !important;
|
||||
font-weight: bold;
|
||||
font-size: 2.2rem;
|
||||
}
|
||||
|
||||
/* === Stat cards === */
|
||||
.stat-card {
|
||||
background: #fff;
|
||||
padding: 20px;
|
||||
border-radius: 8px;
|
||||
box-shadow: 0 2px 5px rgba(113, 11, 11, 0.1);
|
||||
}
|
||||
|
||||
/* === Employé / Projet details === */
|
||||
.employe-detail {
|
||||
background-color: #f9f9f9;
|
||||
border-radius: 8px;
|
||||
box-shadow: 0 2px 6px rgba(0,0,0,0.1);
|
||||
}
|
||||
|
||||
.employe-detail .card-title {
|
||||
font-size: 1.8rem;
|
||||
margin-bottom: 0.5rem;
|
||||
}
|
||||
|
||||
.employe-detail p {
|
||||
margin-bottom: 0.4rem;
|
||||
font-size: 1rem;
|
||||
}
|
||||
|
||||
.employe-detail a.btn {
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.employe-card, .projet-card {
|
||||
background-color: #fff;
|
||||
border-radius: 10px;
|
||||
box-shadow: 0 4px 12px rgba(0,0,0,0.1);
|
||||
padding: 2.5rem;
|
||||
max-width: 1400px;
|
||||
margin: 0 auto;
|
||||
font-size: 1.1rem;
|
||||
}
|
||||
|
||||
/* === Forms === */
|
||||
.form-wrapper {
|
||||
max-width: 1000px;
|
||||
margin: auto;
|
||||
background-color: rgba(255, 255, 255, 0.95);
|
||||
}
|
||||
|
||||
form label {
|
||||
font-weight: 600;
|
||||
margin-top: 1rem;
|
||||
display: block;
|
||||
}
|
||||
|
||||
form input, form select, form textarea {
|
||||
width: 100%;
|
||||
padding: 0.5rem;
|
||||
margin-top: 0.3rem;
|
||||
border-radius: 5px;
|
||||
border: 1px solid #ccc;
|
||||
}
|
||||
|
||||
/* === Formation badges === */
|
||||
.formation-badge {
|
||||
position: relative;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.formation-actions {
|
||||
position: absolute;
|
||||
top: -5px;
|
||||
right: -5px;
|
||||
display: none;
|
||||
}
|
||||
|
||||
.formation-badge:hover .formation-actions {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.formation-actions button {
|
||||
background: none;
|
||||
border: none;
|
||||
color: #fff;
|
||||
margin-left: 5px;
|
||||
font-size: 0.9rem;
|
||||
}
|
||||
|
||||
/* === Context menu === */
|
||||
#contextMenu {
|
||||
width: 150px;
|
||||
}
|
||||
|
||||
/* === Transitions / Animations === */
|
||||
.fade-out {
|
||||
opacity: 0;
|
||||
transition: opacity 0.5s ease;
|
||||
}
|
||||
|
||||
#main-content {
|
||||
transition: opacity 0.3s ease;
|
||||
}
|
||||
|
||||
|
||||
.login-box {
|
||||
background: linear-gradient(to right, #f5f7fa, #c3cfe2);
|
||||
border-radius: 10px;
|
||||
box-shadow: 0 0 10px rgba(0,0,0,0.3);
|
||||
width: 100%;
|
||||
max-width: 400px;
|
||||
}
|
||||
|
||||
/* === Responsive === */
|
||||
@media (max-width: 576px) {
|
||||
.modal-dialog {
|
||||
max-width: 100%;
|
||||
margin: 0;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.modal-content {
|
||||
height: 100%;
|
||||
border-radius: 0;
|
||||
}
|
||||
|
||||
.modal-body {
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
.modal-footer button {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.img-profil {
|
||||
width: 50px;
|
||||
height: 50px;
|
||||
}
|
||||
|
||||
.sidebar {
|
||||
width: 100%;
|
||||
padding: 0.5rem 1rem;
|
||||
}
|
||||
|
||||
.sidebar .nav-link {
|
||||
font-size: 0.9rem;
|
||||
padding: 0.5rem 1rem;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user