2024-10-16 18:19:14 +02:00
|
|
|
<!DOCTYPE html>
|
|
|
|
<html lang="fr">
|
|
|
|
|
|
|
|
<head>
|
|
|
|
<meta charset="UTF-8">
|
|
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
|
|
<link rel="stylesheet" href="../../css/RH/style.css">
|
|
|
|
<link rel="stylesheet" href="../../css/RH/rh.css">
|
2024-10-18 13:43:07 +02:00
|
|
|
<link rel="stylesheet" href="https://www.w3schools.com/w3css/4/w3.css"> <!-- Include W3.CSS -->
|
2024-10-16 18:19:14 +02:00
|
|
|
<title>Gestion du Personnel</title>
|
2024-10-18 13:43:07 +02:00
|
|
|
</head>
|
2024-10-17 15:45:20 +02:00
|
|
|
|
2024-10-18 13:43:07 +02:00
|
|
|
<div class="header w3-bar w3-card-4 w3-dark-blue">
|
|
|
|
<!-- Logo pour retourner à l'accueil -->
|
|
|
|
<div class="logo-container w3-bar-item">
|
|
|
|
<img src="../../media/img/logoWhite.png" alt="Logo Accueil" class="w3-image" style="width:200px; height:50px;">
|
|
|
|
</div>
|
2024-10-17 15:45:20 +02:00
|
|
|
|
2024-10-18 13:43:07 +02:00
|
|
|
<!-- Bouton burger pour petit écran -->
|
|
|
|
<a href="javascript:void(0)" class="w3-bar-item w3-button w3-hide-large w3-right w3-padding-16" onclick="toggleMenu()">☰</a>
|
2024-10-16 18:19:14 +02:00
|
|
|
|
2024-10-18 13:43:07 +02:00
|
|
|
<!-- Catégories dans le header -->
|
|
|
|
<div id="menu" class="categories w3-hide-small w3-bar-item">
|
|
|
|
<a href="./rh.html" class="w3-bar-item w3-button">Accueil</a>
|
|
|
|
<a href="./gestion_personnel.html" class="w3-bar-item w3-button">Gestion du personnel</a>
|
|
|
|
<a href="./gestion-heures.html" class="w3-bar-item w3-button">Heures</a>
|
|
|
|
<a href="./candidature.html" class="w3-bar-item w3-button">Candidatures</a>
|
|
|
|
<a href="./mes-informations.html" class="w3-bar-item w3-button">Mes informations et documents</a>
|
|
|
|
</div>
|
2024-10-16 18:19:14 +02:00
|
|
|
|
2024-10-18 13:43:07 +02:00
|
|
|
<!-- Section utilisateur avec déconnexion -->
|
|
|
|
<div class="user-section w3-bar-item w3-right">
|
|
|
|
<div class="user-name w3-padding-16">
|
|
|
|
Alice BERGER
|
2024-10-16 18:19:14 +02:00
|
|
|
</div>
|
2024-10-18 13:43:07 +02:00
|
|
|
<div class="logout-container w3-bar-item">
|
|
|
|
<a href="../../index.html" title="Se déconnecter">
|
|
|
|
<img src="../../media/img/LogOutWhite.png" alt="Logo Déconnexion" style="width:25px; height:25px;">
|
|
|
|
</a>
|
2024-10-16 18:19:14 +02:00
|
|
|
</div>
|
|
|
|
</div>
|
2024-10-18 13:43:07 +02:00
|
|
|
</div>
|
2024-10-16 18:19:14 +02:00
|
|
|
|
2024-10-18 13:43:07 +02:00
|
|
|
<main class="w3-container">
|
2024-10-16 18:19:14 +02:00
|
|
|
<section>
|
|
|
|
<h2>Gestion du personnel</h2>
|
|
|
|
<!-- Barre de recherche -->
|
2024-10-18 13:43:07 +02:00
|
|
|
<div class="w3-margin-bottom">
|
|
|
|
<input type="text" id="search-input" placeholder="Rechercher par nom" oninput="filterTable()" class="w3-input w3-border">
|
2024-10-16 18:19:14 +02:00
|
|
|
</div>
|
|
|
|
|
|
|
|
<!-- Conteneur de tri -->
|
2024-10-18 13:43:07 +02:00
|
|
|
<div class="w3-margin-bottom">
|
|
|
|
<button class="w3-button w3-green" onclick="sortTable(0)">Trier par Nom</button>
|
|
|
|
<button class="w3-button w3-green" onclick="sortTable(1)">Trier par Prénom</button>
|
|
|
|
<button class="w3-button w3-green" onclick="sortTable(2)">Trier par Statut</button>
|
|
|
|
<button class="w3-button w3-green" onclick="sortTable(3)">Trier par Dernière Intervention</button>
|
2024-10-16 18:19:14 +02:00
|
|
|
</div>
|
|
|
|
|
2024-10-18 13:43:07 +02:00
|
|
|
<table class="w3-table w3-bordered w3-white">
|
2024-10-16 18:19:14 +02:00
|
|
|
<thead>
|
2024-10-18 13:43:07 +02:00
|
|
|
<tr class="w3-green">
|
2024-10-16 18:19:14 +02:00
|
|
|
<th>Nom</th>
|
|
|
|
<th>Prénom</th>
|
|
|
|
<th>Statut</th>
|
2024-10-17 15:45:20 +02:00
|
|
|
<th>Statut du paiement</th>
|
2024-10-16 18:19:14 +02:00
|
|
|
<th>Dernière Intervention</th>
|
|
|
|
<th>Actions</th>
|
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
<tbody id="personnel-table">
|
|
|
|
<tr>
|
|
|
|
<td>Dupont</td>
|
|
|
|
<td>Jean</td>
|
|
|
|
<td>Professeur Vacataire</td>
|
2024-10-17 15:45:20 +02:00
|
|
|
<td>En attente</td>
|
2024-10-16 18:19:14 +02:00
|
|
|
<td>01/10/2024</td>
|
|
|
|
<td>
|
2024-10-18 13:43:07 +02:00
|
|
|
<button class="w3-button w3-green" onclick="openModal2('Dupont', 'Jean', 'Professeur Vacataire', '01/10/2024')">Modifier</button>
|
|
|
|
<button class="w3-button w3-red" onclick="supprimerPersonnel('Dupont', 'Jean')">Supprimer</button>
|
|
|
|
<button class="w3-button w3-orange" onclick="voirDetails('Dupont', 'Jean', 'Professeur Vacataire', '01/10/2024')">Voir Détails</button>
|
2024-10-16 18:19:14 +02:00
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td>Martin</td>
|
|
|
|
<td>Sophie</td>
|
|
|
|
<td>Professeur Vacataire</td>
|
2024-10-17 15:45:20 +02:00
|
|
|
<td>En attente</td>
|
2024-10-16 18:19:14 +02:00
|
|
|
<td>15/09/2024</td>
|
|
|
|
<td>
|
2024-10-18 13:43:07 +02:00
|
|
|
<button class="w3-button w3-green" onclick="openModal2('Martin', 'Sophie', 'Professeur Vacataire', '15/09/2024')">Modifier</button>
|
|
|
|
<button class="w3-button w3-red" onclick="supprimerPersonnel('Martin', 'Sophie')">Supprimer</button>
|
|
|
|
<button class="w3-button w3-orange" onclick="voirDetails('Martin', 'Sophie', 'Professeur Vacataire', '15/09/2024')">Voir Détails</button>
|
2024-10-16 18:19:14 +02:00
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
</tbody>
|
|
|
|
</table>
|
2024-10-18 13:43:07 +02:00
|
|
|
<button class="w3-button w3-green" style="margin-bottom: 10px;" onclick="ajouterPersonnel()">Ajouter un Personnel</button>
|
2024-10-16 18:19:14 +02:00
|
|
|
</section>
|
|
|
|
</main>
|
|
|
|
|
|
|
|
<!-- Modal pour modifier le personnel -->
|
2024-10-18 13:43:07 +02:00
|
|
|
<div id="myModal" class="modal w3-modal">
|
|
|
|
<div class="w3-modal-content w3-card-4">
|
|
|
|
<span class="w3-button w3-display-topright" onclick="closeModal()">×</span>
|
|
|
|
<h2 class="w3-green">Modifier le Personnel</h2>
|
|
|
|
<form id="edit-form" class="w3-container">
|
2024-10-16 18:19:14 +02:00
|
|
|
<label for="nom">Nom:</label>
|
2024-10-18 13:43:07 +02:00
|
|
|
<input type="text" id="nom" required class="w3-input w3-border"><br>
|
2024-10-16 18:19:14 +02:00
|
|
|
<label for="prenom">Prénom:</label>
|
2024-10-18 13:43:07 +02:00
|
|
|
<input type="text" id="prenom" required class="w3-input w3-border"><br>
|
2024-10-16 18:19:14 +02:00
|
|
|
<label for="statut">Statut:</label>
|
2024-10-18 13:43:07 +02:00
|
|
|
<input type="text" id="statut" required class="w3-input w3-border"><br>
|
2024-10-16 18:19:14 +02:00
|
|
|
<label for="intervention">Dernière Intervention:</label>
|
2024-10-18 13:43:07 +02:00
|
|
|
<input type="date" id="intervention" required class="w3-input w3-border"><br>
|
|
|
|
<button type="submit" class="w3-button w3-green">Enregistrer</button>
|
2024-10-16 18:19:14 +02:00
|
|
|
</form>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<!-- Modal pour voir les détails du personnel -->
|
2024-10-18 13:43:07 +02:00
|
|
|
<div id="detailModal" class="modal w3-modal">
|
|
|
|
<div class="w3-modal-content w3-card-4">
|
|
|
|
<span class="w3-button w3-display-topright" onclick="closeDetailModal()">×</span>
|
|
|
|
<h2 class="w3-green">Détails de Personnel</h2>
|
2024-10-16 18:19:14 +02:00
|
|
|
<p id="detail-info"></p>
|
2024-10-17 15:45:20 +02:00
|
|
|
<p id="coordonnees"></p>
|
2024-10-16 18:19:14 +02:00
|
|
|
<h3>Heures à Payer</h3>
|
|
|
|
<p id="heures-a-payer"></p>
|
|
|
|
<h3>Demandes de Corrections d'Heures</h3>
|
|
|
|
<ul id="corrections-list"></ul>
|
|
|
|
<h3>Documents</h3>
|
|
|
|
<ul id="documents-list"></ul>
|
|
|
|
<h3>Statut</h3>
|
|
|
|
<p id="statut-detail"></p>
|
2024-10-18 13:43:07 +02:00
|
|
|
<button class="w3-button w3-green" onclick="lancerProcedurePaiement()">Lancer la Procédure de Paiement</button>
|
2024-10-16 18:19:14 +02:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
2024-10-18 13:43:07 +02:00
|
|
|
<div class="w3-container w3-center w3-padding-16 w3-text-white" style="background-color: #0f431f;">
|
|
|
|
<p>© 2024 IUT de Fontainebleau. Tous droits réservés |
|
|
|
|
<a href="../mentions_legales.html" class="w3-text-white">Mentions légales</a>
|
|
|
|
</p>
|
|
|
|
</div>
|
2024-10-16 18:19:14 +02:00
|
|
|
|
|
|
|
<script>
|
|
|
|
let sortOrder = [true, true, true, true]; // Array to keep track of sort order for each column
|
|
|
|
|
|
|
|
function sortTable(columnIndex) {
|
|
|
|
const table = document.getElementById("personnel-table");
|
|
|
|
const rows = Array.from(table.rows);
|
|
|
|
const direction = sortOrder[columnIndex] ? 1 : -1; // Determine sorting direction
|
|
|
|
sortOrder[columnIndex] = !sortOrder[columnIndex]; // Toggle sort order for the next click
|
|
|
|
|
|
|
|
rows.sort((a, b) => {
|
|
|
|
const aText = a.cells[columnIndex].textContent.trim();
|
|
|
|
const bText = b.cells[columnIndex].textContent.trim();
|
|
|
|
|
2024-10-18 13:43:07 +02:00
|
|
|
if (columnIndex === 3) { // Date column (Dernière Intervention)
|
2024-10-16 18:19:14 +02:00
|
|
|
return direction * (new Date(aText) - new Date(bText));
|
|
|
|
}
|
2024-10-18 13:43:07 +02:00
|
|
|
return direction * aText.localeCompare(bText);
|
2024-10-16 18:19:14 +02:00
|
|
|
});
|
|
|
|
|
2024-10-18 13:43:07 +02:00
|
|
|
rows.forEach(row => table.appendChild(row)); // Re-append sorted rows
|
2024-10-16 18:19:14 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
function filterTable() {
|
2024-10-18 13:43:07 +02:00
|
|
|
const input = document.getElementById("search-input");
|
|
|
|
const filter = input.value.toLowerCase();
|
2024-10-16 18:19:14 +02:00
|
|
|
const table = document.getElementById("personnel-table");
|
2024-10-18 13:43:07 +02:00
|
|
|
const rows = table.getElementsByTagName("tr");
|
2024-10-17 15:45:20 +02:00
|
|
|
|
2024-10-18 13:43:07 +02:00
|
|
|
for (let i = 0; i < rows.length; i++) {
|
|
|
|
const cells = rows[i].getElementsByTagName("td");
|
|
|
|
let rowVisible = false;
|
2024-10-16 18:19:14 +02:00
|
|
|
|
2024-10-18 13:43:07 +02:00
|
|
|
for (let j = 0; j < cells.length; j++) {
|
|
|
|
if (cells[j].textContent.toLowerCase().includes(filter)) {
|
|
|
|
rowVisible = true;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
rows[i].style.display = rowVisible ? "" : "none"; // Show or hide row
|
2024-10-16 18:19:14 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2024-10-18 13:43:07 +02:00
|
|
|
function openModal2(nom, prenom, statut, intervention) {
|
|
|
|
// Populate the modal with the data
|
2024-10-17 15:45:20 +02:00
|
|
|
document.getElementById("nom").value = nom;
|
|
|
|
document.getElementById("prenom").value = prenom;
|
|
|
|
document.getElementById("statut").value = statut;
|
|
|
|
document.getElementById("intervention").value = intervention;
|
2024-10-18 13:43:07 +02:00
|
|
|
document.getElementById("myModal").style.display = "block"; // Show modal
|
2024-10-17 15:45:20 +02:00
|
|
|
}
|
|
|
|
|
2024-10-18 13:43:07 +02:00
|
|
|
function closeModal() {
|
|
|
|
document.getElementById("myModal").style.display = "none"; // Hide modal
|
2024-10-16 18:19:14 +02:00
|
|
|
}
|
|
|
|
|
2024-10-18 13:43:07 +02:00
|
|
|
function closeDetailModal() {
|
|
|
|
document.getElementById("detailModal").style.display = "none"; // Hide detail modal
|
2024-10-17 15:45:20 +02:00
|
|
|
}
|
|
|
|
|
2024-10-18 13:43:07 +02:00
|
|
|
function ajouterPersonnel() {
|
|
|
|
// Logic to add personnel
|
|
|
|
alert("Ajouter personnel n'est pas encore implémentée.");
|
2024-10-16 18:19:14 +02:00
|
|
|
}
|
|
|
|
|
2024-10-18 13:43:07 +02:00
|
|
|
function supprimerPersonnel(nom, prenom) {
|
|
|
|
// Logic to delete personnel
|
|
|
|
alert(`Suppression de ${prenom} ${nom} n'est pas encore implémentée.`);
|
2024-10-17 22:41:07 +02:00
|
|
|
}
|
|
|
|
|
2024-10-18 13:43:07 +02:00
|
|
|
function voirDetails(nom, prenom, statut, intervention) {
|
|
|
|
// Populate the detail modal with personnel details
|
|
|
|
const detailInfo = `Nom: ${nom}, Prénom: ${prenom}, Statut: ${statut}, Dernière Intervention: ${intervention}`;
|
|
|
|
document.getElementById("detail-info").textContent = detailInfo;
|
|
|
|
document.getElementById("heures-a-payer").textContent = "Heures à payer : 10h"; // Example data
|
|
|
|
document.getElementById("statut-detail").textContent = "Statut: En attente"; // Example data
|
|
|
|
document.getElementById("detailModal").style.display = "block"; // Show detail modal
|
2024-10-16 18:19:14 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
function lancerProcedurePaiement() {
|
2024-10-18 13:43:07 +02:00
|
|
|
alert("Procédure de paiement lancée."); // Example action
|
2024-10-16 18:19:14 +02:00
|
|
|
}
|
|
|
|
|
2024-10-18 13:43:07 +02:00
|
|
|
function toggleMenu() {
|
|
|
|
var menu = document.getElementById('menu');
|
|
|
|
var nom = document.getElementById('user-section');
|
|
|
|
if (menu.classList.contains('w3-hide-small')) {
|
|
|
|
menu.classList.remove('w3-hide-small');
|
|
|
|
menu.classList.remove('user-section');
|
|
|
|
} else {
|
|
|
|
menu.classList.add('w3-hide-small');
|
|
|
|
}
|
2024-10-16 18:19:14 +02:00
|
|
|
}
|
|
|
|
</script>
|
|
|
|
</body>
|
|
|
|
|
|
|
|
</html>
|