Merge branch 'main' into feature/suppression_demande_conge
All checks were successful
Organisation/sirh/pipeline/pr-main This commit looks good
All checks were successful
Organisation/sirh/pipeline/pr-main This commit looks good
This commit is contained in:
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
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,7 +9,6 @@ const tableau_liste_employe = new Tabulator("#tableau_liste_employe", {
|
|||||||
{"title": "Projet", "field": "projet"},
|
{"title": "Projet", "field": "projet"},
|
||||||
{"title": "Téléphone", "field": "telephone"},
|
{"title": "Téléphone", "field": "telephone"},
|
||||||
],
|
],
|
||||||
// ajaxURL: url_liste_employe,
|
|
||||||
pagination: true,
|
pagination: true,
|
||||||
paginationSize: 10,
|
paginationSize: 10,
|
||||||
responsiveLayout : "hide"
|
responsiveLayout : "hide"
|
||||||
@@ -19,7 +18,6 @@ fetch(url_liste_employe)
|
|||||||
.then(response => response.json())
|
.then(response => response.json())
|
||||||
.then(data => {
|
.then(data => {
|
||||||
if (data.success){
|
if (data.success){
|
||||||
console.log(data.data)
|
|
||||||
tableau_liste_employe.setData(data.data);
|
tableau_liste_employe.setData(data.data);
|
||||||
}else{
|
}else{
|
||||||
alert(data.message);
|
alert(data.message);
|
||||||
@@ -29,7 +27,6 @@ fetch(url_liste_employe)
|
|||||||
|
|
||||||
tableau_liste_employe.on("rowClick", function (row, rowData) {
|
tableau_liste_employe.on("rowClick", function (row, rowData) {
|
||||||
const data = rowData.getData();
|
const data = rowData.getData();
|
||||||
console.log('Employé cliqué:', data);
|
|
||||||
|
|
||||||
document.getElementById('detail-id').value = data.id;
|
document.getElementById('detail-id').value = data.id;
|
||||||
document.getElementById('detail-matricule').value = data.matricule;
|
document.getElementById('detail-matricule').value = data.matricule;
|
||||||
@@ -215,16 +212,9 @@ $("enregistrerDetail").addEventListener("click", function() {
|
|||||||
const matricule = document.getElementById('detail-matricule').value;
|
const matricule = document.getElementById('detail-matricule').value;
|
||||||
const departement = document.getElementById('detail-departement').value;
|
const departement = document.getElementById('detail-departement').value;
|
||||||
|
|
||||||
console.log('=== ENREGISTREMENT DÉTAILS ===');
|
const url_enregistrer_detail = document.getElementById("modalDetailEmployeBody").dataset.url;
|
||||||
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;
|
console.log("Le lien de l'enregistrement :", document.getElementById("modalDetailEmployeBody").dataset)
|
||||||
|
|
||||||
const payload = {
|
const payload = {
|
||||||
"id": id_,
|
"id": id_,
|
||||||
@@ -234,9 +224,6 @@ $("enregistrerDetail").addEventListener("click", function() {
|
|||||||
"departement": departement
|
"departement": departement
|
||||||
};
|
};
|
||||||
|
|
||||||
console.log('Payload JSON:', payload);
|
|
||||||
console.log('Payload stringifié:', JSON.stringify(payload));
|
|
||||||
|
|
||||||
fetch(url_enregistrer_detail, {
|
fetch(url_enregistrer_detail, {
|
||||||
method: "POST",
|
method: "POST",
|
||||||
headers: {
|
headers: {
|
||||||
@@ -283,15 +270,12 @@ const listeContratExpirant = new Tabulator("#listeContratExpirant", {
|
|||||||
ajaxURL: $("boutonContratExpirants").dataset.urlexpirants,
|
ajaxURL: $("boutonContratExpirants").dataset.urlexpirants,
|
||||||
})
|
})
|
||||||
|
|
||||||
let tabContrats = null;
|
/* let tabContrats = null;
|
||||||
|
|
||||||
document.getElementById("modalContratsEmploye")
|
document.getElementById("modalContratsEmploye").addEventListener("show.bs.modal", function () {
|
||||||
.addEventListener("show.bs.modal", function () {
|
|
||||||
|
|
||||||
const employeId = document.getElementById("detail-id").value;
|
const employeId = document.getElementById("detail-id").value;
|
||||||
|
|
||||||
console.log("Employe ID :", employeId);
|
|
||||||
|
|
||||||
if (!employeId) {
|
if (!employeId) {
|
||||||
alert("Aucun employé sélectionné");
|
alert("Aucun employé sélectionné");
|
||||||
return;
|
return;
|
||||||
@@ -350,4 +334,4 @@ document.getElementById("modalContratsEmploye")
|
|||||||
.catch(error => {
|
.catch(error => {
|
||||||
console.error("Erreur :", error);
|
console.error("Erreur :", error);
|
||||||
});
|
});
|
||||||
});
|
}); */
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
</h5>
|
</h5>
|
||||||
<button type="button" class="btn-close" data-bs-dismiss="modal"></button>
|
<button type="button" class="btn-close" data-bs-dismiss="modal"></button>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-body" id="modalDetailEmployeBody">
|
<div class="modal-body" id="modalDetailEmployeBody" data-url="{% url 'gestion_employe:enregistrer-detail-employe' %}">
|
||||||
<div class="row g-3">
|
<div class="row g-3">
|
||||||
<input type="hidden" id="detail-id">
|
<input type="hidden" id="detail-id">
|
||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
|
|||||||
Binary file not shown.
@@ -353,9 +353,6 @@ def enregistrer_detail_employe(request):
|
|||||||
|
|
||||||
# Traiter le département
|
# Traiter le département
|
||||||
dept_value = data.get('departement')
|
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():
|
if dept_value and str(dept_value).strip():
|
||||||
try:
|
try:
|
||||||
|
|||||||
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,7 +22,6 @@ class ProjetForm(forms.ModelForm):
|
|||||||
'date_fin',
|
'date_fin',
|
||||||
'numero_convention',
|
'numero_convention',
|
||||||
'domaine_recherche',
|
'domaine_recherche',
|
||||||
'type_projet',
|
|
||||||
'budget',
|
'budget',
|
||||||
'budget_RH',
|
'budget_RH',
|
||||||
'description'
|
'description'
|
||||||
@@ -37,7 +36,6 @@ class ProjetForm(forms.ModelForm):
|
|||||||
'nom_projet': forms.TextInput(attrs={'class': "form-control"}),
|
'nom_projet': forms.TextInput(attrs={'class': "form-control"}),
|
||||||
'numero_convention': forms.TextInput(attrs={'class': "form-control"}),
|
'numero_convention': forms.TextInput(attrs={'class': "form-control"}),
|
||||||
'domaine_recherche': forms.SelectMultiple(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': forms.NumberInput(attrs={'class': "form-control"}),
|
||||||
'budget_RH': forms.NumberInput(attrs={'class': "form-control"}),
|
'budget_RH': forms.NumberInput(attrs={'class': "form-control"}),
|
||||||
'description': forms.Textarea(attrs={'class': "form-control"}),
|
'description': forms.Textarea(attrs={'class': "form-control"}),
|
||||||
|
|||||||
@@ -1,5 +1,3 @@
|
|||||||
from datetime import datetime
|
|
||||||
|
|
||||||
from django.db import models
|
from django.db import models
|
||||||
from django.utils import timezone
|
from django.utils import timezone
|
||||||
|
|
||||||
@@ -33,9 +31,11 @@ class DomaineDeRecherche(models.Model):
|
|||||||
|
|
||||||
DOMAINE_RECHERCHE = (
|
DOMAINE_RECHERCHE = (
|
||||||
('sciences_sociales', 'Sciences sociales'),
|
('sciences_sociales', 'Sciences sociales'),
|
||||||
('naturelles', 'Naturelles'),
|
|
||||||
('humaines', 'Humaines'),
|
('humaines', 'Humaines'),
|
||||||
('veterinaires', 'Vétérinaires')
|
('epidemiologie', 'Epidémiologie'),
|
||||||
|
('sciences_biomedicales', 'Sciences biomédicales'),
|
||||||
|
('service_pedagogique', 'Service Pédagogique'),
|
||||||
|
('recherche_clinique', 'Recherche clinique')
|
||||||
)
|
)
|
||||||
|
|
||||||
nom = models.CharField(
|
nom = models.CharField(
|
||||||
@@ -54,13 +54,6 @@ class DomaineDeRecherche(models.Model):
|
|||||||
|
|
||||||
class Projet(models.Model):
|
class Projet(models.Model):
|
||||||
"""Modèle représentant un projet de recherche avec ses caractéristiques et son bailleur associé."""
|
"""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(
|
id_projet = models.CharField(
|
||||||
max_length=100,
|
max_length=100,
|
||||||
@@ -86,12 +79,6 @@ class Projet(models.Model):
|
|||||||
description = models.TextField(
|
description = models.TextField(
|
||||||
verbose_name="Description"
|
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)
|
domaine_recherche = models.ManyToManyField(DomaineDeRecherche)
|
||||||
budget=models.DecimalField(
|
budget=models.DecimalField(
|
||||||
max_digits=12,
|
max_digits=12,
|
||||||
@@ -114,13 +101,13 @@ class Projet(models.Model):
|
|||||||
|
|
||||||
@property
|
@property
|
||||||
def statut(self):
|
def statut(self):
|
||||||
if self.date_fin < datetime.date.today():
|
if self.date_fin < timezone.now().date():
|
||||||
return "Terminé"
|
return "Terminé"
|
||||||
return "En cours"
|
return "En cours"
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def avancement(self):
|
def avancement(self):
|
||||||
aujourd_hui = datetime.date.today()
|
aujourd_hui = timezone.now().date()
|
||||||
if (self.date_debut and self.date_fin) and (self.date_debut < self.date_fin):
|
if (self.date_debut and self.date_fin) and (self.date_debut < self.date_fin):
|
||||||
duree_projet = (self.date_fin - self.date_debut).days
|
duree_projet = (self.date_fin - self.date_debut).days
|
||||||
temps_ecoule = (aujourd_hui - self.date_debut).days
|
temps_ecoule = (aujourd_hui - self.date_debut).days
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
const $ = (element) => document.getElementById(element)
|
const $ = (element) => document.getElementById(element)
|
||||||
const url_liste_projet = $("tableau-liste-projet").dataset.url;
|
const url_liste_projet = $("tableau-liste-projet").dataset.url;
|
||||||
|
|
||||||
const tableau_liste_projet = new Tabulator("#tableau-liste-projet", {
|
const tableau_liste_projet = new Tabulator("#tableau-liste-projet", {
|
||||||
fitColumns: true,
|
fitColumns: true,
|
||||||
responsiveLayout : true,
|
responsiveLayout : true,
|
||||||
@@ -39,7 +40,6 @@ tableau_liste_projet.on("rowClick", function (row, rowData) {
|
|||||||
$("detail_date_debut").value = data.date_debut;
|
$("detail_date_debut").value = data.date_debut;
|
||||||
$("detail_date_fin").value = data.date_fin;
|
$("detail_date_fin").value = data.date_fin;
|
||||||
$("detail_numero_convention").value = data.numero_convention;
|
$("detail_numero_convention").value = data.numero_convention;
|
||||||
$("detail_type_projet").value = data.type_projet;
|
|
||||||
Array.from($("detail_domaine_recherche").options).forEach(option => {
|
Array.from($("detail_domaine_recherche").options).forEach(option => {
|
||||||
if (data.domaine_recherche.includes(option.value)) {
|
if (data.domaine_recherche.includes(option.value)) {
|
||||||
option.selected = true;
|
option.selected = true;
|
||||||
|
|||||||
@@ -31,23 +31,15 @@
|
|||||||
<label>Date de fin :</label>
|
<label>Date de fin :</label>
|
||||||
<input type="date" class="form-control" id="detail_date_fin" name='date_fin'>
|
<input type="date" class="form-control" id="detail_date_fin" name='date_fin'>
|
||||||
</div>
|
</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">
|
<div class="form-group mb-2">
|
||||||
<label> Domaine de recherche </label>
|
<label> Domaine de recherche </label>
|
||||||
<select class="form-select" multiple id="detail_domaine_recherche" name="domaine_recherche">
|
<select class="form-select" multiple id="detail_domaine_recherche" name="domaine_recherche">
|
||||||
<option value="sciences_sociales">Sciences sociales</option>
|
<option value="sciences_sociales">Sciences sociales</option>
|
||||||
<option value="naturelles">Naturelles</option>
|
|
||||||
<option value="humaines">Humaines</option>
|
<option value="humaines">Humaines</option>
|
||||||
<option value="veterinaires">Vétérinaires</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>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group mb-2">
|
<div class="form-group mb-2">
|
||||||
|
|||||||
@@ -44,7 +44,6 @@ def liste_projet(request):
|
|||||||
"date_fin": p.date_fin,
|
"date_fin": p.date_fin,
|
||||||
"numero_convention": p.numero_convention,
|
"numero_convention": p.numero_convention,
|
||||||
"description": p.description,
|
"description": p.description,
|
||||||
"type_projet": p.type_projet,
|
|
||||||
"budget": p.budget,
|
"budget": p.budget,
|
||||||
"budget_RH": p.budget_RH,
|
"budget_RH": p.budget_RH,
|
||||||
"created_at": p.created_at,
|
"created_at": p.created_at,
|
||||||
|
|||||||
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.
6
staticfiles/bootstrap.min.css
vendored
6
staticfiles/bootstrap.min.css
vendored
File diff suppressed because one or more lines are too long
@@ -1,3 +0,0 @@
|
|||||||
from django.contrib import admin
|
|
||||||
|
|
||||||
# Register your models here.
|
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
from django.apps import AppConfig
|
|
||||||
|
|
||||||
|
|
||||||
class GestionCongeConfig(AppConfig):
|
|
||||||
default_auto_field = 'django.db.models.BigAutoField'
|
|
||||||
name = 'gestion_conge'
|
|
||||||
@@ -3,23 +3,6 @@ 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
|
||||||
|
|
||||||
const tableau_liste_demande_conge = new Tabulator("#liste-demande-conges", {
|
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: [
|
columns: [
|
||||||
{"title": "Nom et Prénom", "field": "prenom_nom"},
|
{"title": "Nom et Prénom", "field": "prenom_nom"},
|
||||||
{"title": "Date de début", "field": "date_debut", formatter:"datetime", formatterParams:{
|
{"title": "Date de début", "field": "date_debut", formatter:"datetime", formatterParams:{
|
||||||
@@ -31,23 +14,7 @@ const tableau_liste_demande_conge = new Tabulator("#liste-demande-conges", {
|
|||||||
outputFormat:"dd/MM/yy",
|
outputFormat:"dd/MM/yy",
|
||||||
}},
|
}},
|
||||||
{"title": "Type de congé", "field": "type"},
|
{"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", 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 :{
|
{"title": "Validation par supérieur hiérarchique", "field": "validation_hierarchique", formatter:"tickCross", formatterParams :{
|
||||||
allowEmpty : true ,
|
allowEmpty : true ,
|
||||||
}},
|
}},
|
||||||
@@ -56,23 +23,7 @@ const tableau_liste_demande_conge = new Tabulator("#liste-demande-conges", {
|
|||||||
}},
|
}},
|
||||||
],
|
],
|
||||||
pagination: true,
|
pagination: true,
|
||||||
<<<<<<< HEAD
|
|
||||||
<<<<<<< HEAD
|
|
||||||
<<<<<<< HEAD
|
|
||||||
<<<<<<< HEAD
|
|
||||||
paginationSize: 5,
|
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");
|
const bouton_demande_conges = $("bouton-demande-conge");
|
||||||
|
|||||||
@@ -9,30 +9,15 @@ const tableau_liste_employe = new Tabulator("#tableau_liste_employe", {
|
|||||||
{"title": "Projet", "field": "projet"},
|
{"title": "Projet", "field": "projet"},
|
||||||
{"title": "Téléphone", "field": "telephone"},
|
{"title": "Téléphone", "field": "telephone"},
|
||||||
],
|
],
|
||||||
// ajaxURL: url_liste_employe,
|
|
||||||
pagination: true,
|
pagination: true,
|
||||||
paginationSize: 10,
|
paginationSize: 10,
|
||||||
<<<<<<< HEAD
|
|
||||||
<<<<<<< HEAD
|
|
||||||
<<<<<<< HEAD
|
|
||||||
<<<<<<< HEAD
|
|
||||||
responsiveLayout : "hide"
|
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)
|
fetch(url_liste_employe)
|
||||||
.then(response => response.json())
|
.then(response => response.json())
|
||||||
.then(data => {
|
.then(data => {
|
||||||
if (data.success){
|
if (data.success){
|
||||||
console.log(data.data)
|
|
||||||
tableau_liste_employe.setData(data.data);
|
tableau_liste_employe.setData(data.data);
|
||||||
}else{
|
}else{
|
||||||
alert(data.message);
|
alert(data.message);
|
||||||
@@ -42,6 +27,7 @@ fetch(url_liste_employe)
|
|||||||
|
|
||||||
tableau_liste_employe.on("rowClick", function (row, rowData) {
|
tableau_liste_employe.on("rowClick", function (row, rowData) {
|
||||||
const data = rowData.getData();
|
const data = rowData.getData();
|
||||||
|
|
||||||
document.getElementById('detail-id').value = data.id;
|
document.getElementById('detail-id').value = data.id;
|
||||||
document.getElementById('detail-matricule').value = data.matricule;
|
document.getElementById('detail-matricule').value = data.matricule;
|
||||||
document.getElementById('detail-employe').value = data.employe;
|
document.getElementById('detail-employe').value = data.employe;
|
||||||
@@ -224,23 +210,31 @@ $("enregistrerDetail").addEventListener("click", function() {
|
|||||||
const fonction = document.getElementById('detail-fonction').value;
|
const fonction = document.getElementById('detail-fonction').value;
|
||||||
const dateEmbauche = document.getElementById('detail-dateEmbauche').value;
|
const dateEmbauche = document.getElementById('detail-dateEmbauche').value;
|
||||||
const matricule = document.getElementById('detail-matricule').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, {
|
fetch(url_enregistrer_detail, {
|
||||||
method: "POST",
|
method: "POST",
|
||||||
headers: {
|
headers: {
|
||||||
"Content-Type": "application/json",
|
"Content-Type": "application/json",
|
||||||
"X-CSRFToken": document.querySelector('[name=csrfmiddlewaretoken]').value
|
"X-CSRFToken": document.querySelector('[name=csrfmiddlewaretoken]').value
|
||||||
},
|
},
|
||||||
body: JSON.stringify({
|
body: JSON.stringify(payload)
|
||||||
"id": id_,
|
|
||||||
"fonction": fonction,
|
|
||||||
"date_embauche": dateEmbauche,
|
|
||||||
"matricule": matricule
|
|
||||||
})
|
|
||||||
})
|
})
|
||||||
.then(response => response.json())
|
.then(response => response.json())
|
||||||
.then(data => {
|
.then(data => {
|
||||||
|
console.log('Réponse du serveur:', data);
|
||||||
alert(data.message);
|
alert(data.message);
|
||||||
location.reload();
|
location.reload();
|
||||||
})
|
})
|
||||||
@@ -275,3 +269,69 @@ const listeContratExpirant = new Tabulator("#listeContratExpirant", {
|
|||||||
],
|
],
|
||||||
ajaxURL: $("boutonContratExpirants").dataset.urlexpirants,
|
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,22 +13,20 @@ const tableau_certificat = new Tabulator("#tableau-certificat", {
|
|||||||
inputFormat:"yyyy-MM-dd",
|
inputFormat:"yyyy-MM-dd",
|
||||||
outputFormat:"dd/MM/yy",
|
outputFormat:"dd/MM/yy",
|
||||||
}},
|
}},
|
||||||
|
{"title": "Fichier", "field": "certificat", formatter:"link", formatterParams:{
|
||||||
|
label:"Voir le fichier",
|
||||||
|
target:"_blank",
|
||||||
|
}},
|
||||||
],
|
],
|
||||||
ajaxURL: url_certificat,
|
ajaxURL: url_certificat,
|
||||||
})
|
})
|
||||||
<<<<<<< HEAD
|
|
||||||
<<<<<<< HEAD
|
|
||||||
<<<<<<< HEAD
|
|
||||||
<<<<<<< HEAD
|
|
||||||
const enregistrerProfil = $("enregistrerProfil");
|
const enregistrerProfil = $("enregistrerProfil");
|
||||||
|
|
||||||
enregistrerProfil.addEventListener("click", (e) => {
|
enregistrerProfil.addEventListener("click", (e) => {
|
||||||
|
|
||||||
const url = $("information-personnelles").dataset.url;
|
const url = $("information-personnelles").dataset.url;
|
||||||
const csrftoken = document.querySelector("[name='csrfmiddlewaretoken']").value;
|
const csrftoken = document.querySelector("[name='csrfmiddlewaretoken']").value;
|
||||||
|
|
||||||
const formData = new FormData();
|
const formData = new FormData();
|
||||||
|
|
||||||
formData.append("nom", $("nom").value);
|
formData.append("nom", $("nom").value);
|
||||||
formData.append("prenom", $("prenom").value);
|
formData.append("prenom", $("prenom").value);
|
||||||
formData.append("email", $("email").value);
|
formData.append("email", $("email").value);
|
||||||
@@ -36,6 +34,10 @@ enregistrerProfil.addEventListener("click", (e) => {
|
|||||||
formData.append("adresse", $("adresse").value);
|
formData.append("adresse", $("adresse").value);
|
||||||
formData.append("sexe", $("sexe").value);
|
formData.append("sexe", $("sexe").value);
|
||||||
formData.append("date_naissance", $("date_naissance").value);
|
formData.append("date_naissance", $("date_naissance").value);
|
||||||
|
const photoInput = $("photo");
|
||||||
|
if (photoInput.files.length > 0) {
|
||||||
|
formData.append("photo", photoInput.files[0]);
|
||||||
|
}
|
||||||
|
|
||||||
fetch(url, {
|
fetch(url, {
|
||||||
method: "POST",
|
method: "POST",
|
||||||
@@ -48,52 +50,3 @@ enregistrerProfil.addEventListener("click", (e) => {
|
|||||||
.then(data => alert(data.message))
|
.then(data => alert(data.message))
|
||||||
.catch(error => console.error("Erreur:", error));
|
.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,18 +1,5 @@
|
|||||||
const btnEnregistrerBailleur = document.getElementById('btnEnregistrerBailleur');
|
const btnEnregistrerBailleur = document.getElementById('btnEnregistrerBailleur');
|
||||||
<<<<<<< HEAD
|
|
||||||
<<<<<<< HEAD
|
|
||||||
<<<<<<< HEAD
|
|
||||||
<<<<<<< HEAD
|
|
||||||
let table;
|
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() {
|
btnEnregistrerBailleur.addEventListener('click', function() {
|
||||||
const form = document.getElementById('formBailleur');
|
const form = document.getElementById('formBailleur');
|
||||||
@@ -34,15 +21,8 @@ btnEnregistrerBailleur.addEventListener('click', function() {
|
|||||||
alert('Ce bailleur existe déjà dans la base de données.');
|
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", {
|
table = new Tabulator("#table-bailleurs", {
|
||||||
ajaxURL: "/gestion-projet/bailleurs/",
|
ajaxURL: "/gestion-projet/bailleurs/",
|
||||||
@@ -65,18 +45,3 @@ document.addEventListener("DOMContentLoaded", function () {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
});
|
|
||||||
|
|
||||||
<<<<<<< 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,5 +1,6 @@
|
|||||||
const $ = (element) => document.getElementById(element)
|
const $ = (element) => document.getElementById(element)
|
||||||
const url_liste_projet = $("tableau-liste-projet").dataset.url;
|
const url_liste_projet = $("tableau-liste-projet").dataset.url;
|
||||||
|
|
||||||
const tableau_liste_projet = new Tabulator("#tableau-liste-projet", {
|
const tableau_liste_projet = new Tabulator("#tableau-liste-projet", {
|
||||||
fitColumns: true,
|
fitColumns: true,
|
||||||
responsiveLayout : true,
|
responsiveLayout : true,
|
||||||
@@ -39,7 +40,6 @@ tableau_liste_projet.on("rowClick", function (row, rowData) {
|
|||||||
$("detail_date_debut").value = data.date_debut;
|
$("detail_date_debut").value = data.date_debut;
|
||||||
$("detail_date_fin").value = data.date_fin;
|
$("detail_date_fin").value = data.date_fin;
|
||||||
$("detail_numero_convention").value = data.numero_convention;
|
$("detail_numero_convention").value = data.numero_convention;
|
||||||
$("detail_type_projet").value = data.type_projet;
|
|
||||||
Array.from($("detail_domaine_recherche").options).forEach(option => {
|
Array.from($("detail_domaine_recherche").options).forEach(option => {
|
||||||
if (data.domaine_recherche.includes(option.value)) {
|
if (data.domaine_recherche.includes(option.value)) {
|
||||||
option.selected = true;
|
option.selected = true;
|
||||||
|
|||||||
@@ -12,24 +12,14 @@ const calendrier = Schedule(document.getElementById('planning-reservation'), {
|
|||||||
const modal = new bootstrap.Modal($("modalDetailReservation"));
|
const modal = new bootstrap.Modal($("modalDetailReservation"));
|
||||||
modal.show();
|
modal.show();
|
||||||
fetch (`/gestion-salle/revervation/details/${event.guid}`)
|
fetch (`/gestion-salle/revervation/details/${event.guid}`)
|
||||||
.then(response => response.json())
|
.then(response => {
|
||||||
|
if (!response.ok) {
|
||||||
|
throw new Error(`Erreur HTTP ${response.status}`);
|
||||||
|
}
|
||||||
|
return response.json();
|
||||||
|
})
|
||||||
.then(data => {
|
.then(data => {
|
||||||
currentReservationId = data.id_reservation;
|
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_detail").value = data.id_reservation;
|
||||||
$("id_reservation_refus").value = data.id_reservation;
|
$("id_reservation_refus").value = data.id_reservation;
|
||||||
$("id_reservation_zoom").value = data.id_reservation;
|
$("id_reservation_zoom").value = data.id_reservation;
|
||||||
@@ -44,38 +34,18 @@ const calendrier = Schedule(document.getElementById('planning-reservation'), {
|
|||||||
$("besoin_ordinateur").checked=data.besoin_ordinateur;
|
$("besoin_ordinateur").checked=data.besoin_ordinateur;
|
||||||
$("lien_zoom").value=data.lien_zoom;
|
$("lien_zoom").value=data.lien_zoom;
|
||||||
|
|
||||||
<<<<<<< HEAD
|
const zoomContainer = $("lien_zoom_container");
|
||||||
<<<<<<< HEAD
|
if (!data.besoin_zoom) {
|
||||||
<<<<<<< HEAD
|
zoomContainer.classList.add("d-none");
|
||||||
<<<<<<< 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 {
|
} else {
|
||||||
$("motif_refus").value=data.motif_refus;
|
zoomContainer.classList.remove("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)
|
|
||||||
=======
|
|
||||||
if (data.besoin_zoom === false){
|
if (data.besoin_zoom === false){
|
||||||
$("lien_zoom_container").className = "d-none";
|
$("lien_zoom_container").className = "d-none";
|
||||||
}
|
}
|
||||||
|
|
||||||
>>>>>>> 3b587d2a1a4376551b4b694a38e0e24a1c4cf4c5
|
|
||||||
})
|
})
|
||||||
|
.catch(error => console.error("Impossible de charger les détails de la réservation :", error));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -117,29 +87,13 @@ document.addEventListener("DOMContentLoaded", function () {
|
|||||||
})
|
})
|
||||||
|
|
||||||
$("bouton-annuler").addEventListener("click", (e) => {
|
$("bouton-annuler").addEventListener("click", (e) => {
|
||||||
|
e.preventDefault();
|
||||||
|
|
||||||
const csrf = document.querySelector("[name=csrfmiddlewaretoken]").value;
|
const csrf = document.querySelector("[name=csrfmiddlewaretoken]").value;
|
||||||
const url_annuler = $("formulaire-details").dataset.urlannuler;
|
const url_annuler = $("formulaire-details").dataset.urlannuler;
|
||||||
|
|
||||||
<<<<<<< HEAD
|
|
||||||
<<<<<<< HEAD
|
|
||||||
<<<<<<< HEAD
|
|
||||||
<<<<<<< HEAD
|
|
||||||
=======
|
|
||||||
>>>>>>> 3b587d2a1a4376551b4b694a38e0e24a1c4cf4c5
|
|
||||||
console.log("URL d'annulation :");
|
|
||||||
console.log($("formulaire-details"))
|
|
||||||
|
|
||||||
e.preventDefault();
|
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(
|
fetch(
|
||||||
url_annuler,
|
url_annuler,
|
||||||
{
|
{
|
||||||
@@ -186,28 +140,15 @@ if($("ajoutZoom")){
|
|||||||
|
|
||||||
if($("refuserReservation")){
|
if($("refuserReservation")){
|
||||||
$("refuserReservation").addEventListener("click", (e) => {
|
$("refuserReservation").addEventListener("click", (e) => {
|
||||||
|
e.preventDefault();
|
||||||
|
|
||||||
const csrf = document.querySelector("[name=csrfmiddlewaretoken]").value;
|
const csrf = document.querySelector("[name=csrfmiddlewaretoken]").value;
|
||||||
const url = e.currentTarget.dataset.lienrefus;
|
const url = e.currentTarget.dataset.lienrefus;
|
||||||
const idRes = $("id_reservation_detail").value;
|
const idRes = $("id_reservation_detail").value;
|
||||||
|
|
||||||
<<<<<<< HEAD
|
|
||||||
<<<<<<< HEAD
|
|
||||||
<<<<<<< HEAD
|
|
||||||
<<<<<<< HEAD
|
|
||||||
console.log(idRes);
|
console.log(idRes);
|
||||||
e.preventDefault();
|
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, {
|
fetch(url, {
|
||||||
method: "POST",
|
method: "POST",
|
||||||
headers: {
|
headers: {
|
||||||
@@ -227,7 +168,7 @@ const tableau_reservation_attente = new Tabulator("#tableau-reservation-attente"
|
|||||||
columns: [
|
columns: [
|
||||||
{title: "Employé", field: "employe"},
|
{title: "Employé", field: "employe"},
|
||||||
{title: "Salle", field: "salle"},
|
{title: "Salle", field: "salle"},
|
||||||
{title: "Date de l'evenement", field: "date_debut"},
|
{title: "Date de l'evenement", field: "date_evenement"},
|
||||||
{title: "Heure de début", field: "heure_debut"},
|
{title: "Heure de début", field: "heure_debut"},
|
||||||
{title: "Heure de fin", field: "heure_fin"},
|
{title: "Heure de fin", field: "heure_fin"},
|
||||||
{title: "Motif de reservation", field: "motif_reservation"},
|
{title: "Motif de reservation", field: "motif_reservation"},
|
||||||
@@ -239,52 +180,14 @@ const tableau_reservation_attente = new Tabulator("#tableau-reservation-attente"
|
|||||||
tableau_reservation_attente.on("rowClick", (row, rowData) => {
|
tableau_reservation_attente.on("rowClick", (row, rowData) => {
|
||||||
const data = rowData.getData();
|
const data = rowData.getData();
|
||||||
|
|
||||||
<<<<<<< HEAD
|
|
||||||
<<<<<<< HEAD
|
|
||||||
<<<<<<< HEAD
|
|
||||||
<<<<<<< HEAD
|
|
||||||
=======
|
|
||||||
console.log(data);
|
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){
|
if(data.besoin_zoom === false){
|
||||||
$("lien_zoom_container").className = 'd-none';
|
$("lien_zoom_container").className = 'd-none';
|
||||||
}
|
}
|
||||||
|
|
||||||
<<<<<<< HEAD
|
const id_user = $("current-user-id").dataset.userId;
|
||||||
<<<<<<< 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_detail").value = data.id;
|
||||||
$("id_reservation_refus").value = data.id;
|
$("id_reservation_refus").value = data.id;
|
||||||
$("id_reservation_zoom").value = data.id;
|
$("id_reservation_zoom").value = data.id;
|
||||||
@@ -292,53 +195,25 @@ tableau_reservation_attente.on("rowClick", (row, rowData) => {
|
|||||||
$("employe").value=data.employe;
|
$("employe").value=data.employe;
|
||||||
$("salle").value=data.salle;
|
$("salle").value=data.salle;
|
||||||
$("statut-reservation").innerHTML=data.statut;
|
$("statut-reservation").innerHTML=data.statut;
|
||||||
<<<<<<< HEAD
|
$("date_evenement").value = data.date_evenement;
|
||||||
<<<<<<< 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_debut").value=data.heure_debut;
|
||||||
$("heure_fin").value=data.heure_fin;
|
$("heure_fin").value=data.heure_fin;
|
||||||
$("motif_reservation").value=data.motif_reservation;
|
$("motif_reservation").value=data.motif_reservation;
|
||||||
$("besoin_zoom").checked=data.besoin_zoom;
|
$("besoin_zoom").checked=data.besoin_zoom;
|
||||||
$("besoin_ordinateur").checked=data.besoin_ordi;
|
$("besoin_ordinateur").checked=data.besoin_ordi;
|
||||||
$("lien_zoom").value=data.lien_zoom;
|
$("lien_zoom").value=data.lien_zoom;
|
||||||
<<<<<<< HEAD
|
|
||||||
<<<<<<< HEAD
|
const refuserReservation = document.querySelector("#refuserReservation");
|
||||||
<<<<<<< HEAD
|
const bouton_valider = document.querySelector("#bouton-valider");
|
||||||
<<<<<<< HEAD
|
|
||||||
=======
|
if((refuserReservation | bouton_valider) && data.statut === "En attente"){
|
||||||
>>>>>>> 3b587d2a1a4376551b4b694a38e0e24a1c4cf4c5
|
refuserReservation.style.display = "inline-block";
|
||||||
|
bouton_valider.style.display = "inline-block";
|
||||||
|
}
|
||||||
|
|
||||||
if (id_user != data.employe_id){
|
if (id_user != data.employe_id){
|
||||||
$("bouton-annuler").className = "d-none";
|
$("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"));
|
const modal = new bootstrap.Modal($("modalDetailReservation"));
|
||||||
bootstrap.Modal.getOrCreateInstance($("modalReservationAttente")).hide();
|
bootstrap.Modal.getOrCreateInstance($("modalReservationAttente")).hide();
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -1,278 +0,0 @@
|
|||||||
/* === 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