Merge branch 'main' of https://jenkins.cerfig.org/CERFIG/sirh
This commit is contained in:
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -1,13 +1,13 @@
|
|||||||
from django.contrib.auth import logout
|
from django.contrib.auth import logout
|
||||||
from django.shortcuts import redirect
|
from django.shortcuts import redirect
|
||||||
from django.urls import reverse_lazy
|
from django.urls import reverse_lazy
|
||||||
|
|
||||||
|
|
||||||
def connexion(request):
|
def connexion(request):
|
||||||
"""Redirige vers le serveur SSO pour l'authentification."""
|
"""Redirige vers le serveur SSO pour l'authentification."""
|
||||||
return redirect(reverse_lazy("simple-sso-login"))
|
return redirect(reverse_lazy("simple-sso-login"))
|
||||||
|
|
||||||
def deconnexion(request):
|
def deconnexion(request):
|
||||||
"""Gérez la déconnexion des utilisateurs."""
|
"""Gérez la déconnexion des utilisateurs."""
|
||||||
logout(request)
|
logout(request)
|
||||||
return redirect("http://authentification.cerfig.org/login")
|
return redirect("http://authentification.cerfig.org/login")
|
||||||
|
|||||||
Binary file not shown.
@@ -7,7 +7,6 @@ QUOTA_CONGE_ANNUEL = 30
|
|||||||
NOMBRE_PAGINATION = 8
|
NOMBRE_PAGINATION = 8
|
||||||
DEBUT_RAPPEL = 60
|
DEBUT_RAPPEL = 60
|
||||||
DUREE_FIN_CONTRAT = 90
|
DUREE_FIN_CONTRAT = 90
|
||||||
EMAIL_ASSISTANTE_DE_DIRECTION = list(Employe.objects.filter(fonction="assistant_direction").values_list('user__email', flat=True))
|
|
||||||
|
|
||||||
try:
|
try:
|
||||||
EMAIL_ASSISTANTE_DE_DIRECTION = list(Employe.objects.filter(fonction="assistant_direction").values_list('user__email', flat=True))
|
EMAIL_ASSISTANTE_DE_DIRECTION = list(Employe.objects.filter(fonction="assistant_direction").values_list('user__email', flat=True))
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
# Generated by Django 5.2.13 on 2026-09-01 10:51
|
# Generated by Django 5.2.13 on 2026-09-03 14:33
|
||||||
|
|
||||||
import django.db.models.deletion
|
import django.db.models.deletion
|
||||||
from django.db import migrations, models
|
from django.db import migrations, models
|
||||||
|
|||||||
@@ -7,6 +7,7 @@
|
|||||||
<div class="alert alert-{% if message.tags == 'error' %}danger{% else %}success{% endif %}">{{message}}</div>
|
<div class="alert alert-{% if message.tags == 'error' %}danger{% else %}success{% endif %}">{{message}}</div>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
<div class="row d-flex justify-content-center mb-4">
|
<div class="row d-flex justify-content-center mb-4">
|
||||||
<div class="col text-white bg-danger d-flex flex-column justify-content-center align-items-center border rounded p-4">
|
<div class="col text-white bg-danger d-flex flex-column justify-content-center align-items-center border rounded p-4">
|
||||||
<div class="card-header fw-bold">
|
<div class="card-header fw-bold">
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -8,6 +8,8 @@ class EmployeForm(forms.ModelForm):
|
|||||||
class Meta:
|
class Meta:
|
||||||
model = Employe
|
model = Employe
|
||||||
fields = (
|
fields = (
|
||||||
|
'departement',
|
||||||
|
'fonction',
|
||||||
'adresse',
|
'adresse',
|
||||||
'telephone',
|
'telephone',
|
||||||
'CV',
|
'CV',
|
||||||
@@ -15,7 +17,18 @@ class EmployeForm(forms.ModelForm):
|
|||||||
'rib',
|
'rib',
|
||||||
'photo',
|
'photo',
|
||||||
'casier_judiciaire'
|
'casier_judiciaire'
|
||||||
)
|
)
|
||||||
|
widgets = {
|
||||||
|
'departement': forms.Select(attrs={'class': 'form-select'}),
|
||||||
|
'fonction': forms.Select(attrs={'class': 'form-select'}),
|
||||||
|
'adresse': forms.TextInput(attrs={'class': 'form-control'}),
|
||||||
|
'telephone': forms.TextInput(attrs={'class': 'form-control'}),
|
||||||
|
'CV': forms.FileInput(attrs={'class': 'form-control'}),
|
||||||
|
'diplome': forms.FileInput(attrs={'class': 'form-control'}),
|
||||||
|
'rib': forms.FileInput(attrs={'class': 'form-control'}),
|
||||||
|
'photo': forms.FileInput(attrs={'class': 'form-control'}),
|
||||||
|
'casier_judiciaire': forms.FileInput(attrs={'class': 'form-control'}),
|
||||||
|
}
|
||||||
|
|
||||||
class AffectationForm(forms.ModelForm):
|
class AffectationForm(forms.ModelForm):
|
||||||
class Meta:
|
class Meta:
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
# Generated by Django 5.2.13 on 2026-09-01 10:51
|
# Generated by Django 5.2.13 on 2026-09-03 14:33
|
||||||
|
|
||||||
import django.db.models.deletion
|
import django.db.models.deletion
|
||||||
from django.conf import settings
|
from django.conf import settings
|
||||||
|
|||||||
@@ -29,6 +29,8 @@ 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;
|
||||||
document.getElementById('detail-employe').value = data.employe;
|
document.getElementById('detail-employe').value = data.employe;
|
||||||
@@ -211,23 +213,41 @@ $("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;
|
||||||
|
|
||||||
|
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 url_enregistrer_detail = $("modalDetailEmployeBody").dataset.url;
|
||||||
|
|
||||||
|
const payload = {
|
||||||
|
"id": id_,
|
||||||
|
"fonction": fonction,
|
||||||
|
"date_embauche": dateEmbauche,
|
||||||
|
"matricule": matricule,
|
||||||
|
"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: {
|
||||||
"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();
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -18,37 +18,31 @@ const tableau_certificat = new Tabulator("#tableau-certificat", {
|
|||||||
})
|
})
|
||||||
const enregistrerProfil = $("enregistrerProfil");
|
const enregistrerProfil = $("enregistrerProfil");
|
||||||
|
|
||||||
// enregistrerProfil.addEventListener("click", (e) => {
|
enregistrerProfil.addEventListener("click", (e) => {
|
||||||
|
const url = $("information-personnelles").dataset.url;
|
||||||
|
const csrftoken = document.querySelector("[name='csrfmiddlewaretoken']").value;
|
||||||
|
|
||||||
// const url = $("information-personnelles").dataset.url;
|
const formData = new FormData();
|
||||||
// const csrftoken = document.querySelector("[name='csrfmiddlewaretoken']").value;
|
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);
|
||||||
|
const photoInput = $("photo");
|
||||||
|
if (photoInput.files.length > 0) {
|
||||||
|
formData.append("photo", photoInput.files[0]);
|
||||||
|
}
|
||||||
|
|
||||||
// const formData = new FormData();
|
fetch(url, {
|
||||||
// formData.append("nom", $("nom").value);
|
method: "POST",
|
||||||
// formData.append("prenom", $("prenom").value);
|
headers: {
|
||||||
// formData.append("email", $("email").value);
|
"X-CSRFToken": csrftoken
|
||||||
// formData.append("telephone", $("telephone").value);
|
},
|
||||||
// formData.append("adresse", $("adresse").value);
|
body: formData
|
||||||
// formData.append("sexe", $("sexe").value);
|
})
|
||||||
// formData.append("date_naissance", $("date_naissance").value);
|
.then(response => response.json())
|
||||||
// const photoInput = $("photo");
|
.then(data => alert(data.message))
|
||||||
// if (photoInput.files.length > 0) {
|
.catch(error => console.error("Erreur:", error));
|
||||||
// formData.append("photo", photoInput.files[0]);
|
});
|
||||||
// }
|
|
||||||
|
|
||||||
|
|
||||||
// console.log("---------------------------------------------")
|
|
||||||
// console.log("Données du formulaire:", url);
|
|
||||||
// console.log("Données du formulaire:", formData);
|
|
||||||
|
|
||||||
// fetch(url, {
|
|
||||||
// method: "POST",
|
|
||||||
// headers: {
|
|
||||||
// "X-CSRFToken": csrftoken
|
|
||||||
// },
|
|
||||||
// body: formData
|
|
||||||
// })
|
|
||||||
// .then(response => response.json())
|
|
||||||
// .then(data => alert(data.message))
|
|
||||||
// .catch(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" data-url="{% url 'gestion_employe:enregistrer-detail-employe' %}">
|
<div class="modal-body" id="modalDetailEmployeBody" data-url="{% url 'gestion_employe:enregistrer-detail-employe' %}" data-url-departements="{% url 'gestion_employe:liste-departements' %}">
|
||||||
<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">
|
||||||
@@ -23,7 +23,12 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="form-group mb-2">
|
<div class="form-group mb-2">
|
||||||
<label>Département :</label>
|
<label>Département :</label>
|
||||||
<input type="text" class="form-control" id="detail-departement">
|
<select class="form-select" id="detail-departement">
|
||||||
|
<option value="">-- Sélectionner --</option>
|
||||||
|
{% for dept in departements %}
|
||||||
|
<option value="{{ dept.id }}">{{ dept.nom }}</option>
|
||||||
|
{% endfor %}
|
||||||
|
</select>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group mb-2">
|
<div class="form-group mb-2">
|
||||||
<label>Sexe :</label>
|
<label>Sexe :</label>
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ from django.utils import timezone
|
|||||||
from fonction_utilitaire import fonctions_utilitaire
|
from fonction_utilitaire import fonctions_utilitaire
|
||||||
|
|
||||||
from .forms import AffectationForm, ContratForm, FormationForm
|
from .forms import AffectationForm, ContratForm, FormationForm
|
||||||
from .models import Affectation, Contrat, Employe, Formation
|
from .models import Affectation, Contrat, Departement, Employe, Formation
|
||||||
|
|
||||||
|
|
||||||
@login_required
|
@login_required
|
||||||
@@ -42,7 +42,8 @@ def index(request):
|
|||||||
'nombre_stage': nombre_stage,
|
'nombre_stage': nombre_stage,
|
||||||
'nombre_expirants': nombre_expirants,
|
'nombre_expirants': nombre_expirants,
|
||||||
'affectation_form': AffectationForm(),
|
'affectation_form': AffectationForm(),
|
||||||
'contrat_form': ContratForm()
|
'contrat_form': ContratForm(),
|
||||||
|
'departements': Departement.objects.all()
|
||||||
})
|
})
|
||||||
|
|
||||||
@login_required
|
@login_required
|
||||||
@@ -285,7 +286,7 @@ def creation_contrat(request):
|
|||||||
|
|
||||||
contrat_actif = Contrat.objects.filter(
|
contrat_actif = Contrat.objects.filter(
|
||||||
employe=employe,
|
employe=employe,
|
||||||
date_fin__gte=datetime.date.today()
|
date_fin__gte=timezone.now().date()
|
||||||
).exists()
|
).exists()
|
||||||
|
|
||||||
if request.method == "POST":
|
if request.method == "POST":
|
||||||
@@ -360,10 +361,30 @@ def enregistrer_detail_employe(request):
|
|||||||
except Employe.DoesNotExist:
|
except Employe.DoesNotExist:
|
||||||
return JsonResponse({"error": "Employé non trouvé."}, status=404)
|
return JsonResponse({"error": "Employé non trouvé."}, status=404)
|
||||||
|
|
||||||
employe.fonction = data['fonction']
|
employe.fonction = data.get('fonction')
|
||||||
employe.date_embauche = data['date_embauche']
|
employe.date_embauche = data.get('date_embauche')
|
||||||
employe.matricule = data['matricule']
|
employe.matricule = data.get('matricule')
|
||||||
|
|
||||||
|
# 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:
|
||||||
|
dept_id = int(dept_value)
|
||||||
|
departement = Departement.objects.get(id=dept_id)
|
||||||
|
employe.departement = departement
|
||||||
|
except Departement.DoesNotExist:
|
||||||
|
employe.departement = None
|
||||||
|
except (ValueError, TypeError) as e:
|
||||||
|
employe.departement = None
|
||||||
|
else:
|
||||||
|
employe.departement = None
|
||||||
|
|
||||||
employe.save()
|
employe.save()
|
||||||
|
|
||||||
return JsonResponse({"message": "Détails de l'employé mis à jour avec succès."})
|
return JsonResponse({"message": "Détails de l'employé mis à jour avec succès."})
|
||||||
else:
|
else:
|
||||||
return JsonResponse({"message": "Méthode non autorisée."}, status=405)
|
return JsonResponse({"message": "Méthode non autorisée."}, status=405)
|
||||||
@@ -426,7 +447,7 @@ def liste_employe(request):
|
|||||||
"affectations": affectations,
|
"affectations": affectations,
|
||||||
"projet": projets,
|
"projet": projets,
|
||||||
"contrats": contrats,
|
"contrats": contrats,
|
||||||
"departement": employe.departement.nom if employe.departement else "",
|
"departement": employe.departement.id if employe.departement else "",
|
||||||
"fonction": employe.fonction,
|
"fonction": employe.fonction,
|
||||||
"date_embauche": employe.date_embauche,
|
"date_embauche": employe.date_embauche,
|
||||||
"adresse": employe.adresse,
|
"adresse": employe.adresse,
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
@@ -1,4 +1,4 @@
|
|||||||
# Generated by Django 5.2.13 on 2026-09-01 10:51
|
# Generated by Django 5.2.13 on 2026-09-03 14:33
|
||||||
|
|
||||||
import django.db.models.deletion
|
import django.db.models.deletion
|
||||||
from django.db import migrations, models
|
from django.db import migrations, models
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
const btnEnregistrerBailleur = document.getElementById('btnEnregistrerBailleur');
|
const btnEnregistrerBailleur = document.getElementById('btnEnregistrerBailleur');
|
||||||
|
let table;
|
||||||
|
|
||||||
let table;
|
let table;
|
||||||
|
|
||||||
@@ -45,4 +46,4 @@ table = new Tabulator("#table-bailleurs", {
|
|||||||
supprimerBailleur(data.id);
|
supprimerBailleur(data.id);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -1,20 +1,51 @@
|
|||||||
<div class="modal fade" id="modalBailleur" tabindex="-1" aria-labelledby="modalBailleurLabel" aria-hidden="true">
|
<div class="modal fade" id="modalBailleur" tabindex="-1" aria-labelledby="modalBailleurLabel" aria-hidden="true">
|
||||||
<div class="modal-dialog modal-dialog-centered">
|
<div class="modal-dialog ">
|
||||||
<div class="modal-content">
|
<div class="modal-content">
|
||||||
<div class="modal-header">
|
<div class="modal-header">
|
||||||
<h5 class="modal-title" id="modalBailleurLabel">Ajouter un Bailleur</h5>
|
<h5 class="modal-title" id="modalBailleurLabel">Gestion des Bailleurs</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 p-4">
|
<ul class="nav nav-tabs px-3 pt-2" id="bailleurTab" role="tablist">
|
||||||
<form id="formBailleur" method="POST" action="{% url 'gestion_projet:creation-bailleur' %}">
|
<li class="nav-item" role="presentation">
|
||||||
{% csrf_token %}
|
<button class="nav-link active" id="ajouter-tab" data-bs-toggle="tab"
|
||||||
{{ form_ajout_bailleur.as_p }}
|
data-bs-target="#ajouter" type="button" role="tab">
|
||||||
</form>
|
Ajouter
|
||||||
</div>
|
</button>
|
||||||
<div class="modal-footer">
|
</li>
|
||||||
<button type="submit" id="btnEnregistrerBailleur" class="btn btn-success"><i class="bi bi-save me-1"></i> Enregistrer</button>
|
<li class="nav-item" role="presentation">
|
||||||
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Annuler</button>
|
<button class="nav-link" id="liste-tab" data-bs-toggle="tab"
|
||||||
|
data-bs-target="#liste" type="button" role="tab">
|
||||||
|
Liste
|
||||||
|
</button>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
<div class="modal-body">
|
||||||
|
<div class="tab-content pt-3">
|
||||||
|
<div class="tab-pane fade show active" id="ajouter" role="tabpanel">
|
||||||
|
<form id="formBailleur" method="POST" action="{% url 'gestion_projet:creation-bailleur' %}">
|
||||||
|
{% csrf_token %}
|
||||||
|
{{ form_ajout_bailleur.as_p }}
|
||||||
|
<button type="submit" class="btn btn-success mt-3" id="btnEnregistrerBailleur">
|
||||||
|
<i class="bi bi-save me-1"></i> Enregistrer
|
||||||
|
</button>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
<div class="tab-pane fade" id="liste" role="tabpanel">
|
||||||
|
|
||||||
|
<div class="d-flex justify-content-between align-items-center mb-3">
|
||||||
|
<h6 class="mb-0">Liste des bailleurs</h6>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col">
|
||||||
|
<div id="table-bailleurs"
|
||||||
|
data-url="{% url 'gestion_projet:liste-bailleurs' %}">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
@@ -19,6 +19,12 @@ urlpatterns = [
|
|||||||
views.creation_projet,
|
views.creation_projet,
|
||||||
name='creation-projet'
|
name='creation-projet'
|
||||||
),
|
),
|
||||||
|
path(
|
||||||
|
'bailleurs/',
|
||||||
|
views.liste_bailleur,
|
||||||
|
name='liste-bailleurs'
|
||||||
|
),
|
||||||
|
|
||||||
path(
|
path(
|
||||||
'projet/modifier/<int:projet_id>/',
|
'projet/modifier/<int:projet_id>/',
|
||||||
views.modification_projet,
|
views.modification_projet,
|
||||||
@@ -114,4 +120,6 @@ urlpatterns = [
|
|||||||
views.mises_a_jour_projet,
|
views.mises_a_jour_projet,
|
||||||
name='mises-a-jour-projet'
|
name='mises-a-jour-projet'
|
||||||
)
|
)
|
||||||
]
|
|
||||||
|
]
|
||||||
|
|
||||||
|
|||||||
@@ -146,6 +146,22 @@ def creation_bailleur(request):
|
|||||||
return JsonResponse({'success': True})
|
return JsonResponse({'success': True})
|
||||||
return JsonResponse({'success': False})
|
return JsonResponse({'success': False})
|
||||||
|
|
||||||
|
@login_required
|
||||||
|
def liste_bailleur(request):
|
||||||
|
""" Vue pour retourner la liste de tous les bailleurs """
|
||||||
|
bailleurs = Bailleur.objects.all().order_by('-id')
|
||||||
|
data = []
|
||||||
|
for b in bailleurs:
|
||||||
|
data.append({
|
||||||
|
"id": b.id,
|
||||||
|
"nom_organisme": b.nom_organisme,
|
||||||
|
"contact": b.contact,
|
||||||
|
"email": b.email,
|
||||||
|
"pays": b.pays,
|
||||||
|
})
|
||||||
|
return JsonResponse(data, safe=False)
|
||||||
|
|
||||||
|
|
||||||
@login_required
|
@login_required
|
||||||
def ajouter_financement_projet(request):
|
def ajouter_financement_projet(request):
|
||||||
"""Ajoute un financement à un projet en vérifiant que le total ne dépasse pas 100%"""
|
"""Ajoute un financement à un projet en vérifiant que le total ne dépasse pas 100%"""
|
||||||
@@ -321,6 +337,7 @@ def activites_projet(request):
|
|||||||
}
|
}
|
||||||
return render(request, 'gestion_projet/suivi_activite.html', context)
|
return render(request, 'gestion_projet/suivi_activite.html', context)
|
||||||
|
|
||||||
|
|
||||||
@login_required
|
@login_required
|
||||||
def ajouter_activite_projet(request):
|
def ajouter_activite_projet(request):
|
||||||
"""Vue pour ajouter une activité à un projet spécifique via un formulaire"""
|
"""Vue pour ajouter une activité à un projet spécifique via un formulaire"""
|
||||||
|
|||||||
Binary file not shown.
@@ -1,4 +1,4 @@
|
|||||||
# Generated by Django 5.2.13 on 2026-09-01 10:51
|
# Generated by Django 5.2.13 on 2026-09-03 14:33
|
||||||
|
|
||||||
import django.db.models.deletion
|
import django.db.models.deletion
|
||||||
from django.db import migrations, models
|
from django.db import migrations, models
|
||||||
|
|||||||
@@ -12,7 +12,12 @@ 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;
|
||||||
$("id_reservation_detail").value = data.id_reservation;
|
$("id_reservation_detail").value = data.id_reservation;
|
||||||
@@ -21,7 +26,7 @@ const calendrier = Schedule(document.getElementById('planning-reservation'), {
|
|||||||
$("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;
|
||||||
$("date_evenement").value=data.date_evenement;
|
$("date_debut").value=data.date_debut;
|
||||||
$("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;
|
||||||
@@ -40,6 +45,7 @@ const calendrier = Schedule(document.getElementById('planning-reservation'), {
|
|||||||
}
|
}
|
||||||
|
|
||||||
})
|
})
|
||||||
|
.catch(error => console.error("Impossible de charger les détails de la réservation :", error));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -55,5 +55,5 @@
|
|||||||
{% block 'js' %}
|
{% block 'js' %}
|
||||||
<script src="https://cdn.jsdelivr.net/npm/lemonadejs/dist/lemonade.min.js"></script>
|
<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="https://cdn.jsdelivr.net/npm/@calendarjs/ce/dist/index.min.js"></script>
|
||||||
<script src="{% static 'gestion_salle/js/index.js' %}"></script>
|
<script src="{% static 'gestion_salle/js/index.js' %}?v=3"></script>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
@@ -108,6 +108,7 @@ def liste_reservation(request:HttpRequest):
|
|||||||
"""Vue d'affichage des creneaux disponibles"""
|
"""Vue d'affichage des creneaux disponibles"""
|
||||||
reservations = Reservation.objects.filter(statut = "validee")
|
reservations = Reservation.objects.filter(statut = "validee")
|
||||||
liste_reservation = []
|
liste_reservation = []
|
||||||
|
|
||||||
for reservation in reservations:
|
for reservation in reservations:
|
||||||
print(reservation.statut)
|
print(reservation.statut)
|
||||||
color = None
|
color = None
|
||||||
@@ -118,6 +119,8 @@ def liste_reservation(request:HttpRequest):
|
|||||||
else:
|
else:
|
||||||
color = "#dc3545"
|
color = "#dc3545"
|
||||||
|
|
||||||
|
print(dict(Reservation.TYPE_CHOICES).get(reservation.salle))
|
||||||
|
|
||||||
liste_reservation.append({
|
liste_reservation.append({
|
||||||
"guid": reservation.pk,
|
"guid": reservation.pk,
|
||||||
"title": dict(Reservation.TYPE_CHOICES).get(reservation.salle),
|
"title": dict(Reservation.TYPE_CHOICES).get(reservation.salle),
|
||||||
|
|||||||
157
requirements.txt
157
requirements.txt
@@ -1,4 +1,3 @@
|
|||||||
<<<<<<< HEAD
|
|
||||||
asgiref==3.11.1
|
asgiref==3.11.1
|
||||||
certifi==2026.4.22
|
certifi==2026.4.22
|
||||||
charset-normalizer==3.4.7
|
charset-normalizer==3.4.7
|
||||||
@@ -21,159 +20,3 @@ tzdata==2026.2
|
|||||||
urllib3==2.6.3
|
urllib3==2.6.3
|
||||||
webservices==0.7
|
webservices==0.7
|
||||||
webservices.naudit==0.7.2
|
webservices.naudit==0.7.2
|
||||||
python-decouple
|
|
||||||
gunicorn
|
|
||||||
=======
|
|
||||||
anyio==4.13.0
|
|
||||||
argon2-cffi==25.1.0
|
|
||||||
argon2-cffi-bindings==25.1.0
|
|
||||||
arrow==1.4.0
|
|
||||||
asgiref==3.11.0
|
|
||||||
asttokens==3.0.1
|
|
||||||
async-lru==2.3.0
|
|
||||||
attrs==26.1.0
|
|
||||||
Automat==20.2.0
|
|
||||||
babel==2.18.0
|
|
||||||
bcrypt==3.2.0
|
|
||||||
beautifulsoup4==4.14.3
|
|
||||||
bleach==6.3.0
|
|
||||||
blinker==1.4
|
|
||||||
certifi==2026.2.25
|
|
||||||
cffi==2.0.0
|
|
||||||
chardet==4.0.0
|
|
||||||
charset-normalizer==3.4.7
|
|
||||||
click==8.0.3
|
|
||||||
cloud-init==25.3
|
|
||||||
colorama==0.4.4
|
|
||||||
comm==0.2.3
|
|
||||||
command-not-found==0.3
|
|
||||||
configobj==5.0.6
|
|
||||||
constantly==15.1.0
|
|
||||||
cryptography==3.4.8
|
|
||||||
dbus-python==1.2.18
|
|
||||||
debugpy==1.8.20
|
|
||||||
decorator==5.2.1
|
|
||||||
defusedxml==0.7.1
|
|
||||||
distlib==0.4.0
|
|
||||||
distro==1.7.0
|
|
||||||
distro-info==1.1+ubuntu0.2
|
|
||||||
Django==5.2.10
|
|
||||||
et_xmlfile==2.0.0
|
|
||||||
exceptiongroup==1.3.1
|
|
||||||
executing==2.2.1
|
|
||||||
fastjsonschema==2.21.2
|
|
||||||
filelock==3.20.3
|
|
||||||
fqdn==1.5.1
|
|
||||||
h11==0.16.0
|
|
||||||
httpcore==1.0.9
|
|
||||||
httplib2==0.20.2
|
|
||||||
httpx==0.28.1
|
|
||||||
hyperlink==21.0.0
|
|
||||||
idna==3.3
|
|
||||||
importlib-metadata==4.6.4
|
|
||||||
incremental==21.3.0
|
|
||||||
ipykernel==7.2.0
|
|
||||||
ipython==8.39.0
|
|
||||||
isoduration==20.11.0
|
|
||||||
jedi==0.19.2
|
|
||||||
jeepney==0.7.1
|
|
||||||
Jinja2==3.0.3
|
|
||||||
json5==0.14.0
|
|
||||||
jsonpatch==1.32
|
|
||||||
jsonpointer==2.0
|
|
||||||
jsonschema==4.26.0
|
|
||||||
jsonschema-specifications==2025.9.1
|
|
||||||
jupyter-events==0.12.0
|
|
||||||
jupyter-lsp==2.3.1
|
|
||||||
jupyter_client==8.8.0
|
|
||||||
jupyter_core==5.9.1
|
|
||||||
jupyter_server==2.17.0
|
|
||||||
jupyter_server_terminals==0.5.4
|
|
||||||
jupyterlab==4.5.6
|
|
||||||
jupyterlab_pygments==0.3.0
|
|
||||||
jupyterlab_server==2.28.0
|
|
||||||
keyring==23.5.0
|
|
||||||
lark==1.3.1
|
|
||||||
launchpadlib==1.10.16
|
|
||||||
lazr.restfulclient==0.14.4
|
|
||||||
lazr.uri==1.0.6
|
|
||||||
MarkupSafe==2.0.1
|
|
||||||
matplotlib-inline==0.2.1
|
|
||||||
mistune==3.2.0
|
|
||||||
more-itertools==8.10.0
|
|
||||||
nbclient==0.10.4
|
|
||||||
nbconvert==7.17.0
|
|
||||||
nbformat==5.10.4
|
|
||||||
nest-asyncio==1.6.0
|
|
||||||
netifaces==0.11.0
|
|
||||||
notebook_shim==0.2.4
|
|
||||||
numpy==2.2.6
|
|
||||||
oauthlib==3.2.0
|
|
||||||
openpyxl==3.1.5
|
|
||||||
overrides==7.7.0
|
|
||||||
packaging==26.0
|
|
||||||
pandas==2.3.3
|
|
||||||
pandocfilters==1.5.1
|
|
||||||
parso==0.8.6
|
|
||||||
pexpect==4.9.0
|
|
||||||
platformdirs==4.5.1
|
|
||||||
prometheus_client==0.24.1
|
|
||||||
prompt_toolkit==3.0.52
|
|
||||||
psutil==7.2.2
|
|
||||||
ptyprocess==0.7.0
|
|
||||||
pure_eval==0.2.3
|
|
||||||
pyasn1==0.4.8
|
|
||||||
pyasn1-modules==0.2.1
|
|
||||||
pycparser==3.0
|
|
||||||
pycurl==7.44.1
|
|
||||||
Pygments==2.20.0
|
|
||||||
PyGObject==3.42.1
|
|
||||||
PyHamcrest==2.0.2
|
|
||||||
PyJWT==2.3.0
|
|
||||||
pyOpenSSL==21.0.0
|
|
||||||
pyparsing==2.4.7
|
|
||||||
pyrsistent==0.18.1
|
|
||||||
pyserial==3.5
|
|
||||||
python-apt==2.4.0+ubuntu4.1
|
|
||||||
python-dateutil==2.9.0.post0
|
|
||||||
python-json-logger==4.1.0
|
|
||||||
pytz==2022.1
|
|
||||||
PyYAML==5.4.1
|
|
||||||
pyzmq==27.1.0
|
|
||||||
referencing==0.37.0
|
|
||||||
requests==2.33.1
|
|
||||||
rfc3339-validator==0.1.4
|
|
||||||
rfc3986-validator==0.1.1
|
|
||||||
rfc3987-syntax==1.1.0
|
|
||||||
rpds-py==0.30.0
|
|
||||||
SecretStorage==3.3.1
|
|
||||||
Send2Trash==2.1.0
|
|
||||||
service-identity==18.1.0
|
|
||||||
six==1.16.0
|
|
||||||
soupsieve==2.8.3
|
|
||||||
sqlparse==0.5.5
|
|
||||||
ssh-import-id==5.11
|
|
||||||
stack-data==0.6.3
|
|
||||||
systemd-python==234
|
|
||||||
terminado==0.18.1
|
|
||||||
tinycss2==1.4.0
|
|
||||||
tomli==2.4.1
|
|
||||||
tornado==6.5.5
|
|
||||||
traitlets==5.14.3
|
|
||||||
Twisted==22.1.0
|
|
||||||
typing_extensions==4.15.0
|
|
||||||
tzdata==2025.3
|
|
||||||
ubuntu-pro-client==8001
|
|
||||||
ufw==0.36.1
|
|
||||||
unattended-upgrades==0.1
|
|
||||||
uri-template==1.3.0
|
|
||||||
urllib3==1.26.5
|
|
||||||
virtualenv==20.13.0+ds
|
|
||||||
wadllib==1.3.6
|
|
||||||
wcwidth==0.6.0
|
|
||||||
webcolors==25.10.0
|
|
||||||
webencodings==0.5.1
|
|
||||||
websocket-client==1.9.0
|
|
||||||
zipp==1.0.0
|
|
||||||
zope.interface==5.4.0
|
|
||||||
>>>>>>> c28b14f (clean: remove pycache from tracking)
|
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ 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
|
<<<<<<< HEAD
|
||||||
<<<<<<< HEAD
|
<<<<<<< HEAD
|
||||||
@@ -16,6 +17,9 @@ const tableau_liste_demande_conge = new Tabulator("#liste-demande-conges", {
|
|||||||
=======
|
=======
|
||||||
layout : "fitColumns",
|
layout : "fitColumns",
|
||||||
>>>>>>> 6026af5 (Bug : Affichages des conges)
|
>>>>>>> 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:{
|
||||||
@@ -27,6 +31,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
|
<<<<<<< HEAD
|
||||||
<<<<<<< HEAD
|
<<<<<<< HEAD
|
||||||
@@ -40,6 +45,9 @@ const tableau_liste_demande_conge = new Tabulator("#liste-demande-conges", {
|
|||||||
=======
|
=======
|
||||||
{"title": "Date de la demande", "field": "date_demande"},
|
{"title": "Date de la demande", "field": "date_demande"},
|
||||||
>>>>>>> 6026af5 (Bug : Affichages des conges)
|
>>>>>>> 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 ,
|
||||||
}},
|
}},
|
||||||
@@ -48,6 +56,7 @@ const tableau_liste_demande_conge = new Tabulator("#liste-demande-conges", {
|
|||||||
}},
|
}},
|
||||||
],
|
],
|
||||||
pagination: true,
|
pagination: true,
|
||||||
|
<<<<<<< HEAD
|
||||||
<<<<<<< HEAD
|
<<<<<<< HEAD
|
||||||
<<<<<<< HEAD
|
<<<<<<< HEAD
|
||||||
<<<<<<< HEAD
|
<<<<<<< HEAD
|
||||||
@@ -61,6 +70,9 @@ const tableau_liste_demande_conge = new Tabulator("#liste-demande-conges", {
|
|||||||
=======
|
=======
|
||||||
paginationSize: 5
|
paginationSize: 5
|
||||||
>>>>>>> 6026af5 (Bug : Affichages des conges)
|
>>>>>>> 6026af5 (Bug : Affichages des conges)
|
||||||
|
=======
|
||||||
|
paginationSize: 5,
|
||||||
|
>>>>>>> 3b587d2a1a4376551b4b694a38e0e24a1c4cf4c5
|
||||||
})
|
})
|
||||||
|
|
||||||
const bouton_demande_conges = $("bouton-demande-conge");
|
const bouton_demande_conges = $("bouton-demande-conge");
|
||||||
|
|||||||
@@ -12,6 +12,7 @@ const tableau_liste_employe = new Tabulator("#tableau_liste_employe", {
|
|||||||
// ajaxURL: url_liste_employe,
|
// ajaxURL: url_liste_employe,
|
||||||
pagination: true,
|
pagination: true,
|
||||||
paginationSize: 10,
|
paginationSize: 10,
|
||||||
|
<<<<<<< HEAD
|
||||||
<<<<<<< HEAD
|
<<<<<<< HEAD
|
||||||
<<<<<<< HEAD
|
<<<<<<< HEAD
|
||||||
<<<<<<< HEAD
|
<<<<<<< HEAD
|
||||||
@@ -22,6 +23,9 @@ const tableau_liste_employe = new Tabulator("#tableau_liste_employe", {
|
|||||||
>>>>>>> f6b90e7 (Verification du statut avant la creation d'un contrat)
|
>>>>>>> f6b90e7 (Verification du statut avant la creation d'un contrat)
|
||||||
=======
|
=======
|
||||||
>>>>>>> 6026af5 (Bug : Affichages des conges)
|
>>>>>>> 6026af5 (Bug : Affichages des conges)
|
||||||
|
=======
|
||||||
|
responsiveLayout : "hide"
|
||||||
|
>>>>>>> 3b587d2a1a4376551b4b694a38e0e24a1c4cf4c5
|
||||||
})
|
})
|
||||||
|
|
||||||
fetch(url_liste_employe)
|
fetch(url_liste_employe)
|
||||||
|
|||||||
@@ -16,6 +16,7 @@ const tableau_certificat = new Tabulator("#tableau-certificat", {
|
|||||||
],
|
],
|
||||||
ajaxURL: url_certificat,
|
ajaxURL: url_certificat,
|
||||||
})
|
})
|
||||||
|
<<<<<<< HEAD
|
||||||
<<<<<<< HEAD
|
<<<<<<< HEAD
|
||||||
<<<<<<< HEAD
|
<<<<<<< HEAD
|
||||||
<<<<<<< HEAD
|
<<<<<<< HEAD
|
||||||
@@ -53,28 +54,35 @@ enregistrerProfil.addEventListener("click", (e) => {
|
|||||||
=======
|
=======
|
||||||
>>>>>>> 6026af5 (Bug : Affichages des conges)
|
>>>>>>> 6026af5 (Bug : Affichages des conges)
|
||||||
|
|
||||||
|
=======
|
||||||
|
>>>>>>> 3b587d2a1a4376551b4b694a38e0e24a1c4cf4c5
|
||||||
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();
|
||||||
|
|
||||||
|
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, {
|
fetch(url, {
|
||||||
method: 'POST',
|
method: "POST",
|
||||||
headers: {
|
headers: {
|
||||||
'Content-Type': 'application/json',
|
"X-CSRFToken": csrftoken
|
||||||
'X-CSRFToken': csrftoken
|
|
||||||
},
|
},
|
||||||
body: JSON.stringify({
|
body: formData
|
||||||
"nom": $("nom").value,
|
|
||||||
"prenom": $("prenom").value,
|
|
||||||
"email": $("email").value,
|
|
||||||
"telephone": $("telephone").value,
|
|
||||||
"adresse": $("adresse").value,
|
|
||||||
"sexe": $("sexe").value,
|
|
||||||
"date_naissance": $("date_naissance").value,
|
|
||||||
})
|
|
||||||
})
|
})
|
||||||
.then(response => response.json())
|
.then(response => response.json())
|
||||||
.then(data => alert(data.message))
|
.then(data => alert(data.message))
|
||||||
|
<<<<<<< HEAD
|
||||||
<<<<<<< HEAD
|
<<<<<<< HEAD
|
||||||
<<<<<<< HEAD
|
<<<<<<< HEAD
|
||||||
})
|
})
|
||||||
@@ -85,3 +93,7 @@ enregistrerProfil.addEventListener("click", (e) => {
|
|||||||
=======
|
=======
|
||||||
})
|
})
|
||||||
>>>>>>> 6026af5 (Bug : Affichages des conges)
|
>>>>>>> 6026af5 (Bug : Affichages des conges)
|
||||||
|
=======
|
||||||
|
.catch(error => console.error("Erreur:", error));
|
||||||
|
});
|
||||||
|
>>>>>>> 3b587d2a1a4376551b4b694a38e0e24a1c4cf4c5
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
const btnEnregistrerBailleur = document.getElementById('btnEnregistrerBailleur');
|
const btnEnregistrerBailleur = document.getElementById('btnEnregistrerBailleur');
|
||||||
|
<<<<<<< HEAD
|
||||||
<<<<<<< HEAD
|
<<<<<<< HEAD
|
||||||
<<<<<<< HEAD
|
<<<<<<< HEAD
|
||||||
<<<<<<< HEAD
|
<<<<<<< HEAD
|
||||||
@@ -9,6 +10,9 @@ let table;
|
|||||||
>>>>>>> f6b90e7 (Verification du statut avant la creation d'un contrat)
|
>>>>>>> f6b90e7 (Verification du statut avant la creation d'un contrat)
|
||||||
=======
|
=======
|
||||||
>>>>>>> 6026af5 (Bug : Affichages des conges)
|
>>>>>>> 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');
|
||||||
@@ -30,9 +34,12 @@ 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
|
<<<<<<< HEAD
|
||||||
<<<<<<< HEAD
|
<<<<<<< HEAD
|
||||||
|
=======
|
||||||
|
>>>>>>> 3b587d2a1a4376551b4b694a38e0e24a1c4cf4c5
|
||||||
});
|
});
|
||||||
|
|
||||||
document.addEventListener("DOMContentLoaded", function () {
|
document.addEventListener("DOMContentLoaded", function () {
|
||||||
@@ -61,6 +68,7 @@ document.addEventListener("DOMContentLoaded", function () {
|
|||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
<<<<<<< HEAD
|
||||||
=======
|
=======
|
||||||
});
|
});
|
||||||
>>>>>>> 0047b1f (Ajout de la prise en charge des photos de profil)
|
>>>>>>> 0047b1f (Ajout de la prise en charge des photos de profil)
|
||||||
@@ -70,3 +78,5 @@ document.addEventListener("DOMContentLoaded", function () {
|
|||||||
=======
|
=======
|
||||||
});
|
});
|
||||||
>>>>>>> 6026af5 (Bug : Affichages des conges)
|
>>>>>>> 6026af5 (Bug : Affichages des conges)
|
||||||
|
=======
|
||||||
|
>>>>>>> 3b587d2a1a4376551b4b694a38e0e24a1c4cf4c5
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ const calendrier = Schedule(document.getElementById('planning-reservation'), {
|
|||||||
.then(response => response.json())
|
.then(response => response.json())
|
||||||
.then(data => {
|
.then(data => {
|
||||||
currentReservationId = data.id_reservation;
|
currentReservationId = data.id_reservation;
|
||||||
|
<<<<<<< HEAD
|
||||||
<<<<<<< HEAD
|
<<<<<<< HEAD
|
||||||
<<<<<<< HEAD
|
<<<<<<< HEAD
|
||||||
<<<<<<< HEAD
|
<<<<<<< HEAD
|
||||||
@@ -27,6 +28,8 @@ const calendrier = Schedule(document.getElementById('planning-reservation'), {
|
|||||||
=======
|
=======
|
||||||
console.log(data);
|
console.log(data);
|
||||||
>>>>>>> 6026af5 (Bug : Affichages des conges)
|
>>>>>>> 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;
|
||||||
@@ -41,6 +44,7 @@ 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
|
||||||
<<<<<<< HEAD
|
<<<<<<< HEAD
|
||||||
<<<<<<< HEAD
|
<<<<<<< HEAD
|
||||||
<<<<<<< HEAD
|
<<<<<<< HEAD
|
||||||
@@ -65,6 +69,12 @@ const calendrier = Schedule(document.getElementById('planning-reservation'), {
|
|||||||
>>>>>>> f6b90e7 (Verification du statut avant la creation d'un contrat)
|
>>>>>>> f6b90e7 (Verification du statut avant la creation d'un contrat)
|
||||||
=======
|
=======
|
||||||
>>>>>>> 6026af5 (Bug : Affichages des conges)
|
>>>>>>> 6026af5 (Bug : Affichages des conges)
|
||||||
|
=======
|
||||||
|
if (data.besoin_zoom === false){
|
||||||
|
$("lien_zoom_container").className = "d-none";
|
||||||
|
}
|
||||||
|
|
||||||
|
>>>>>>> 3b587d2a1a4376551b4b694a38e0e24a1c4cf4c5
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -110,20 +120,26 @@ $("bouton-annuler").addEventListener("click", (e) => {
|
|||||||
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
|
<<<<<<< HEAD
|
||||||
<<<<<<< HEAD
|
<<<<<<< HEAD
|
||||||
|
=======
|
||||||
|
>>>>>>> 3b587d2a1a4376551b4b694a38e0e24a1c4cf4c5
|
||||||
console.log("URL d'annulation :");
|
console.log("URL d'annulation :");
|
||||||
console.log($("formulaire-details"))
|
console.log($("formulaire-details"))
|
||||||
|
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
|
|
||||||
|
<<<<<<< HEAD
|
||||||
=======
|
=======
|
||||||
>>>>>>> 0047b1f (Ajout de la prise en charge des photos de profil)
|
>>>>>>> 0047b1f (Ajout de la prise en charge des photos de profil)
|
||||||
=======
|
=======
|
||||||
>>>>>>> f6b90e7 (Verification du statut avant la creation d'un contrat)
|
>>>>>>> f6b90e7 (Verification du statut avant la creation d'un contrat)
|
||||||
=======
|
=======
|
||||||
>>>>>>> 6026af5 (Bug : Affichages des conges)
|
>>>>>>> 6026af5 (Bug : Affichages des conges)
|
||||||
|
=======
|
||||||
|
>>>>>>> 3b587d2a1a4376551b4b694a38e0e24a1c4cf4c5
|
||||||
fetch(
|
fetch(
|
||||||
url_annuler,
|
url_annuler,
|
||||||
{
|
{
|
||||||
@@ -174,6 +190,7 @@ if($("refuserReservation")){
|
|||||||
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
|
<<<<<<< HEAD
|
||||||
<<<<<<< HEAD
|
<<<<<<< HEAD
|
||||||
@@ -186,6 +203,11 @@ if($("refuserReservation")){
|
|||||||
>>>>>>> f6b90e7 (Verification du statut avant la creation d'un contrat)
|
>>>>>>> f6b90e7 (Verification du statut avant la creation d'un contrat)
|
||||||
=======
|
=======
|
||||||
>>>>>>> 6026af5 (Bug : Affichages des conges)
|
>>>>>>> 6026af5 (Bug : Affichages des conges)
|
||||||
|
=======
|
||||||
|
console.log(idRes);
|
||||||
|
e.preventDefault();
|
||||||
|
|
||||||
|
>>>>>>> 3b587d2a1a4376551b4b694a38e0e24a1c4cf4c5
|
||||||
fetch(url, {
|
fetch(url, {
|
||||||
method: "POST",
|
method: "POST",
|
||||||
headers: {
|
headers: {
|
||||||
@@ -217,6 +239,7 @@ 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
|
<<<<<<< HEAD
|
||||||
<<<<<<< HEAD
|
<<<<<<< HEAD
|
||||||
@@ -232,10 +255,13 @@ tableau_reservation_attente.on("rowClick", (row, rowData) => {
|
|||||||
console.log(data);
|
console.log(data);
|
||||||
|
|
||||||
>>>>>>> 6026af5 (Bug : Affichages des conges)
|
>>>>>>> 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
|
||||||
<<<<<<< HEAD
|
<<<<<<< HEAD
|
||||||
<<<<<<< HEAD
|
<<<<<<< HEAD
|
||||||
<<<<<<< HEAD
|
<<<<<<< HEAD
|
||||||
@@ -256,6 +282,9 @@ tableau_reservation_attente.on("rowClick", (row, rowData) => {
|
|||||||
>>>>>>> f6b90e7 (Verification du statut avant la creation d'un contrat)
|
>>>>>>> f6b90e7 (Verification du statut avant la creation d'un contrat)
|
||||||
=======
|
=======
|
||||||
>>>>>>> 6026af5 (Bug : Affichages des conges)
|
>>>>>>> 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;
|
||||||
@@ -263,6 +292,7 @@ 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
|
||||||
<<<<<<< HEAD
|
<<<<<<< HEAD
|
||||||
<<<<<<< HEAD
|
<<<<<<< HEAD
|
||||||
<<<<<<< HEAD
|
<<<<<<< HEAD
|
||||||
@@ -277,19 +307,27 @@ tableau_reservation_attente.on("rowClick", (row, rowData) => {
|
|||||||
=======
|
=======
|
||||||
$("date_evenement").value=data.date_debut;
|
$("date_evenement").value=data.date_debut;
|
||||||
>>>>>>> 6026af5 (Bug : Affichages des conges)
|
>>>>>>> 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
|
<<<<<<< HEAD
|
||||||
<<<<<<< HEAD
|
<<<<<<< HEAD
|
||||||
<<<<<<< HEAD
|
<<<<<<< HEAD
|
||||||
|
=======
|
||||||
|
>>>>>>> 3b587d2a1a4376551b4b694a38e0e24a1c4cf4c5
|
||||||
|
|
||||||
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;
|
$("motif_refus").value=data.motif_refus;
|
||||||
>>>>>>> 0047b1f (Ajout de la prise en charge des photos de profil)
|
>>>>>>> 0047b1f (Ajout de la prise en charge des photos de profil)
|
||||||
@@ -299,6 +337,8 @@ tableau_reservation_attente.on("rowClick", (row, rowData) => {
|
|||||||
=======
|
=======
|
||||||
$("motif_refus").value=data.motif_refus;
|
$("motif_refus").value=data.motif_refus;
|
||||||
>>>>>>> 6026af5 (Bug : Affichages des conges)
|
>>>>>>> 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();
|
||||||
|
|||||||
Reference in New Issue
Block a user