304 lines
		
	
	
		
			12 KiB
		
	
	
	
		
			HTML
		
	
	
	
	
	
		
		
			
		
	
	
			304 lines
		
	
	
		
			12 KiB
		
	
	
	
		
			HTML
		
	
	
	
	
	
| 
								 | 
							
								<!DOCTYPE html>
							 | 
						||
| 
								 | 
							
								<html lang="fr">
							 | 
						||
| 
								 | 
							
								<head>
							 | 
						||
| 
								 | 
							
								    <meta charset="UTF-8">
							 | 
						||
| 
								 | 
							
								    <meta name="viewport" content="width=device-width, initial-scale=1.0">
							 | 
						||
| 
								 | 
							
								    <title>Paiements en Attente</title>
							 | 
						||
| 
								 | 
							
								    <link rel="stylesheet" href="https://www.w3schools.com/w3css/4/w3.css">
							 | 
						||
| 
								 | 
							
								    <link rel="stylesheet" href="../../css/FINANCE/style.css">
							 | 
						||
| 
								 | 
							
								    <style>
							 | 
						||
| 
								 | 
							
								        
							 | 
						||
| 
								 | 
							
								        .dashboard-container {
							 | 
						||
| 
								 | 
							
								            margin-top: 20px;
							 | 
						||
| 
								 | 
							
								        }
							 | 
						||
| 
								 | 
							
								        .card {
							 | 
						||
| 
								 | 
							
								            background-color: white;
							 | 
						||
| 
								 | 
							
								            padding: 20px;
							 | 
						||
| 
								 | 
							
								            border-radius: 8px;
							 | 
						||
| 
								 | 
							
								            box-shadow: 0 2px 4px rgba(0,0,0,0.1);
							 | 
						||
| 
								 | 
							
								            margin-bottom: 20px;
							 | 
						||
| 
								 | 
							
								        }
							 | 
						||
| 
								 | 
							
								        table {
							 | 
						||
| 
								 | 
							
								            width: 100%;
							 | 
						||
| 
								 | 
							
								            border-collapse: collapse;
							 | 
						||
| 
								 | 
							
								            margin-bottom: 20px;
							 | 
						||
| 
								 | 
							
								        }
							 | 
						||
| 
								 | 
							
								        th, td {
							 | 
						||
| 
								 | 
							
								            border: 1px solid #ddd;
							 | 
						||
| 
								 | 
							
								            padding: 10px;
							 | 
						||
| 
								 | 
							
								            text-align: left;
							 | 
						||
| 
								 | 
							
								        }
							 | 
						||
| 
								 | 
							
								        th {
							 | 
						||
| 
								 | 
							
								            background-color: #f2f2f2;
							 | 
						||
| 
								 | 
							
								        }
							 | 
						||
| 
								 | 
							
								        .button {
							 | 
						||
| 
								 | 
							
								            padding: 10px 15px;
							 | 
						||
| 
								 | 
							
								            border: none;
							 | 
						||
| 
								 | 
							
								            border-radius: 4px;
							 | 
						||
| 
								 | 
							
								            color: white;
							 | 
						||
| 
								 | 
							
								            font-weight: bold;
							 | 
						||
| 
								 | 
							
								            cursor: pointer;
							 | 
						||
| 
								 | 
							
								            margin-right: 5px;
							 | 
						||
| 
								 | 
							
								        }
							 | 
						||
| 
								 | 
							
								        .block { background-color: #f44336; } /* Red */
							 | 
						||
| 
								 | 
							
								        .cancel { background-color: #ff9800; } /* Orange */
							 | 
						||
| 
								 | 
							
								        .unblock { background-color: #4caf50; } /* Green */
							 | 
						||
| 
								 | 
							
								        .send { background-color: #2196F3; } /* Blue */
							 | 
						||
| 
								 | 
							
								        .popup {
							 | 
						||
| 
								 | 
							
								            display: none;
							 | 
						||
| 
								 | 
							
								            position: fixed;
							 | 
						||
| 
								 | 
							
								            left: 0;
							 | 
						||
| 
								 | 
							
								            top: 0;
							 | 
						||
| 
								 | 
							
								            width: 100%;
							 | 
						||
| 
								 | 
							
								            height: 100%;
							 | 
						||
| 
								 | 
							
								            background-color: rgba(0,0,0,0.7);
							 | 
						||
| 
								 | 
							
								            justify-content: center;
							 | 
						||
| 
								 | 
							
								            align-items: center;
							 | 
						||
| 
								 | 
							
								        }
							 | 
						||
| 
								 | 
							
								        .popup-content {
							 | 
						||
| 
								 | 
							
								            background-color: white;
							 | 
						||
| 
								 | 
							
								            padding: 20px;
							 | 
						||
| 
								 | 
							
								            border-radius: 8px;
							 | 
						||
| 
								 | 
							
								            width: 300px;
							 | 
						||
| 
								 | 
							
								            text-align: center;
							 | 
						||
| 
								 | 
							
								        }
							 | 
						||
| 
								 | 
							
								        .close {
							 | 
						||
| 
								 | 
							
								            background-color: #f44336;
							 | 
						||
| 
								 | 
							
								            border: none;
							 | 
						||
| 
								 | 
							
								            color: white;
							 | 
						||
| 
								 | 
							
								            padding: 5px 10px;
							 | 
						||
| 
								 | 
							
								            border-radius: 4px;
							 | 
						||
| 
								 | 
							
								            cursor: pointer;
							 | 
						||
| 
								 | 
							
								        }
							 | 
						||
| 
								 | 
							
								        .confirm {
							 | 
						||
| 
								 | 
							
								            background-color: #4caf50;
							 | 
						||
| 
								 | 
							
								            border: none;
							 | 
						||
| 
								 | 
							
								            color: white;
							 | 
						||
| 
								 | 
							
								            padding: 5px 10px;
							 | 
						||
| 
								 | 
							
								            border-radius: 4px;
							 | 
						||
| 
								 | 
							
								            cursor: pointer;
							 | 
						||
| 
								 | 
							
								            margin-left: 10px;
							 | 
						||
| 
								 | 
							
								        }
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								        /* Classes pour les différents statuts */
							 | 
						||
| 
								 | 
							
								        .status-en-attente {
							 | 
						||
| 
								 | 
							
								            background-color: #ffeb3b; /* Jaune pour "En attente" */
							 | 
						||
| 
								 | 
							
								            color: black;
							 | 
						||
| 
								 | 
							
								        }
							 | 
						||
| 
								 | 
							
								        .status-bloque {
							 | 
						||
| 
								 | 
							
								            background-color: #f44336; /* Rouge pour "Bloqué" */
							 | 
						||
| 
								 | 
							
								            color: white;
							 | 
						||
| 
								 | 
							
								        }
							 | 
						||
| 
								 | 
							
								        .status-annule {
							 | 
						||
| 
								 | 
							
								            background-color: #ff9800; /* Orange pour "Annulé" */
							 | 
						||
| 
								 | 
							
								            color: white;
							 | 
						||
| 
								 | 
							
								        }
							 | 
						||
| 
								 | 
							
								        .status-debloque {
							 | 
						||
| 
								 | 
							
								            background-color: #4caf50; /* Vert pour "Débloqué" */
							 | 
						||
| 
								 | 
							
								            color: white;
							 | 
						||
| 
								 | 
							
								        }
							 | 
						||
| 
								 | 
							
								        .status-envoye {
							 | 
						||
| 
								 | 
							
								            background-color: #2196F3; /* Bleu pour "Envoyé" */
							 | 
						||
| 
								 | 
							
								            color: white;
							 | 
						||
| 
								 | 
							
								        }
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								    </style>
							 | 
						||
| 
								 | 
							
								</head>
							 | 
						||
| 
								 | 
							
								<body>
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								    <div class="header">
							 | 
						||
| 
								 | 
							
								        <!-- Logo pour retourner à l'accueil -->
							 | 
						||
| 
								 | 
							
								        <div class="logo-container">
							 | 
						||
| 
								 | 
							
								            <img src="../../media/img/logoWhite.png" alt="Logo Accueil">
							 | 
						||
| 
								 | 
							
								        </div>
							 | 
						||
| 
								 | 
							
								        
							 | 
						||
| 
								 | 
							
								        <!-- Catégories dans le header -->
							 | 
						||
| 
								 | 
							
								        <div class="categories">
							 | 
						||
| 
								 | 
							
								            <a href="./finance.html">Accueil</a>
							 | 
						||
| 
								 | 
							
								            <a href="./paiements_en_attente.html">Paiements en attente</a>
							 | 
						||
| 
								 | 
							
								            <a href="./rapports_financiers.html">Rapports Financiers</a>
							 | 
						||
| 
								 | 
							
								            <a href="./historique_paiements.html">Historique des transactions</a>
							 | 
						||
| 
								 | 
							
								            <a href="./mes_informations.html">Mes informations et documents</a>
							 | 
						||
| 
								 | 
							
								        </div>
							 | 
						||
| 
								 | 
							
								    
							 | 
						||
| 
								 | 
							
								        <!-- Section utilisateur avec déconnexion -->
							 | 
						||
| 
								 | 
							
								        <div class="user-section">
							 | 
						||
| 
								 | 
							
								            <div class="user-name">
							 | 
						||
| 
								 | 
							
								                Jean DUPONT
							 | 
						||
| 
								 | 
							
								            </div>
							 | 
						||
| 
								 | 
							
								            <div class="logout-container">
							 | 
						||
| 
								 | 
							
								                <a href="../../index.html" title="Se déconnecter">
							 | 
						||
| 
								 | 
							
								                    <img src="../../media/img/LogOutWhite.png" alt="Logo Déconnexion">
							 | 
						||
| 
								 | 
							
								                </a>
							 | 
						||
| 
								 | 
							
								            </div>
							 | 
						||
| 
								 | 
							
								        </div>
							 | 
						||
| 
								 | 
							
								    </div>
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								    <div class="dashboard-container">
							 | 
						||
| 
								 | 
							
								        <div class="card">
							 | 
						||
| 
								 | 
							
								            <h2>Liste des paiements en attente de traitement</h2>
							 | 
						||
| 
								 | 
							
								            <table>
							 | 
						||
| 
								 | 
							
								                <thead>
							 | 
						||
| 
								 | 
							
								                    <tr>
							 | 
						||
| 
								 | 
							
								                        <th>ID Paiement</th>
							 | 
						||
| 
								 | 
							
								                        <th>Nom du Bénéficiaire</th>
							 | 
						||
| 
								 | 
							
								                        <th>Montant (€)</th>
							 | 
						||
| 
								 | 
							
								                        <th>Status</th>
							 | 
						||
| 
								 | 
							
								                        <th>Actions</th>
							 | 
						||
| 
								 | 
							
								                    </tr>
							 | 
						||
| 
								 | 
							
								                </thead>
							 | 
						||
| 
								 | 
							
								                <tbody id="paymentTableBody">
							 | 
						||
| 
								 | 
							
								                    <tr>
							 | 
						||
| 
								 | 
							
								                        <td>002</td>
							 | 
						||
| 
								 | 
							
								                        <td>Maxime Menault (vacataire)</td>
							 | 
						||
| 
								 | 
							
								                        <td>1200,00</td>
							 | 
						||
| 
								 | 
							
								                        <td id="status-2">En attente</td>
							 | 
						||
| 
								 | 
							
								                        <td>
							 | 
						||
| 
								 | 
							
								                            <button class="button block" onclick="openPopup('bloquer', 2)">Bloquer</button>
							 | 
						||
| 
								 | 
							
								                            <button class="button cancel" onclick="openPopup('annuler', 2)">Annuler</button>
							 | 
						||
| 
								 | 
							
								                            <button class="button unblock" onclick="openPopup('débloquer', 2)">Débloquer</button>
							 | 
						||
| 
								 | 
							
								                            <button class="button send" onclick="openPopup('envoyer', 2)">Payer</button>
							 | 
						||
| 
								 | 
							
								                        </td>
							 | 
						||
| 
								 | 
							
								                    </tr>
							 | 
						||
| 
								 | 
							
								                    <tr>
							 | 
						||
| 
								 | 
							
								                        <td>003</td>
							 | 
						||
| 
								 | 
							
								                        <td>Denis Monnerat (permanent)</td>
							 | 
						||
| 
								 | 
							
								                        <td>1800,00</td>
							 | 
						||
| 
								 | 
							
								                        <td id="status-3">En attente</td>
							 | 
						||
| 
								 | 
							
								                        <td>
							 | 
						||
| 
								 | 
							
								                            <button class="button block" onclick="openPopup('bloquer', 3)">Bloquer</button>
							 | 
						||
| 
								 | 
							
								                            <button class="button cancel" onclick="openPopup('annuler', 3)">Annuler</button>
							 | 
						||
| 
								 | 
							
								                            <button class="button unblock" onclick="openPopup('débloquer', 3)">Débloquer</button>
							 | 
						||
| 
								 | 
							
								                            <button class="button send" onclick="openPopup('envoyer', 3)">Payer</button>
							 | 
						||
| 
								 | 
							
								                        </td>
							 | 
						||
| 
								 | 
							
								                    </tr>
							 | 
						||
| 
								 | 
							
								                    <tr>
							 | 
						||
| 
								 | 
							
								                        <td>004</td>
							 | 
						||
| 
								 | 
							
								                        <td>Sophie Bernard (vacataire)</td>
							 | 
						||
| 
								 | 
							
								                        <td>1350,00</td>
							 | 
						||
| 
								 | 
							
								                        <td id="status-4">En attente</td>
							 | 
						||
| 
								 | 
							
								                        <td>
							 | 
						||
| 
								 | 
							
								                            <button class="button block" onclick="openPopup('bloquer', 4)">Bloquer</button>
							 | 
						||
| 
								 | 
							
								                            <button class="button cancel" onclick="openPopup('annuler', 4)">Annuler</button>
							 | 
						||
| 
								 | 
							
								                            <button class="button unblock" onclick="openPopup('débloquer', 4)">Débloquer</button>
							 | 
						||
| 
								 | 
							
								                            <button class="button send" onclick="openPopup('envoyer', 4)">Payer</button>
							 | 
						||
| 
								 | 
							
								                        </td>
							 | 
						||
| 
								 | 
							
								                    </tr>
							 | 
						||
| 
								 | 
							
								                    <tr>
							 | 
						||
| 
								 | 
							
								                        <td>005</td>
							 | 
						||
| 
								 | 
							
								                        <td>Lucas Leroy (permanent)</td>
							 | 
						||
| 
								 | 
							
								                        <td>2000,00</td>
							 | 
						||
| 
								 | 
							
								                        <td id="status-5">En attente</td>
							 | 
						||
| 
								 | 
							
								                        <td>
							 | 
						||
| 
								 | 
							
								                            <button class="button block" onclick="openPopup('bloquer', 5)">Bloquer</button>
							 | 
						||
| 
								 | 
							
								                            <button class="button cancel" onclick="openPopup('annuler', 5)">Annuler</button>
							 | 
						||
| 
								 | 
							
								                            <button class="button unblock" onclick="openPopup('débloquer', 5)">Débloquer</button>
							 | 
						||
| 
								 | 
							
								                            <button class="button send" onclick="openPopup('envoyer', 5)">Payer</button>
							 | 
						||
| 
								 | 
							
								                        </td>
							 | 
						||
| 
								 | 
							
								                    </tr>
							 | 
						||
| 
								 | 
							
								                    <tr>
							 | 
						||
| 
								 | 
							
								                        <td>006</td>
							 | 
						||
| 
								 | 
							
								                        <td>Julie Robert (permanent)</td>
							 | 
						||
| 
								 | 
							
								                        <td>1600,00</td>
							 | 
						||
| 
								 | 
							
								                        <td id="status-6">En attente</td>
							 | 
						||
| 
								 | 
							
								                        <td>
							 | 
						||
| 
								 | 
							
								                            <button class="button block" onclick="openPopup('bloquer', 6)">Bloquer</button>
							 | 
						||
| 
								 | 
							
								                            <button class="button cancel" onclick="openPopup('annuler', 6)">Annuler</button>
							 | 
						||
| 
								 | 
							
								                            <button class="button unblock" onclick="openPopup('débloquer', 6)">Débloquer</button>
							 | 
						||
| 
								 | 
							
								                            <button class="button send" onclick="openPopup('envoyer', 6)">Payer</button>
							 | 
						||
| 
								 | 
							
								                        </td>
							 | 
						||
| 
								 | 
							
								                    </tr>
							 | 
						||
| 
								 | 
							
								                    <tr>
							 | 
						||
| 
								 | 
							
								                        <td>007</td>
							 | 
						||
| 
								 | 
							
								                        <td>Emilie Caron (permanent)</td>
							 | 
						||
| 
								 | 
							
								                        <td>1750,00</td>
							 | 
						||
| 
								 | 
							
								                        <td id="status-7">En attente</td>
							 | 
						||
| 
								 | 
							
								                        <td>
							 | 
						||
| 
								 | 
							
								                            <button class="button block" onclick="openPopup('bloquer', 7)">Bloquer</button>
							 | 
						||
| 
								 | 
							
								                            <button class="button cancel" onclick="openPopup('annuler', 7)">Annuler</button>
							 | 
						||
| 
								 | 
							
								                            <button class="button unblock" onclick="openPopup('débloquer', 7)">Débloquer</button>
							 | 
						||
| 
								 | 
							
								                            <button class="button send" onclick="openPopup('envoyer', 7)">Payer</button>
							 | 
						||
| 
								 | 
							
								                        </td>
							 | 
						||
| 
								 | 
							
								                    </tr>
							 | 
						||
| 
								 | 
							
								                    
							 | 
						||
| 
								 | 
							
								                    <!-- Ajouter plus de lignes ici -->
							 | 
						||
| 
								 | 
							
								                </tbody>
							 | 
						||
| 
								 | 
							
								            </table>
							 | 
						||
| 
								 | 
							
								        </div>
							 | 
						||
| 
								 | 
							
								    </div>
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								    <div class="footer">
							 | 
						||
| 
								 | 
							
								        <p>© 2024 IUT de Fontainebleau. Tous droits réservés | 
							 | 
						||
| 
								 | 
							
								            <a href="../mentions_legales.html">Mentions légales</a>
							 | 
						||
| 
								 | 
							
								        </p>
							 | 
						||
| 
								 | 
							
								    </div>
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								    <!-- Pop-up pour les actions -->
							 | 
						||
| 
								 | 
							
								    <div id="popup" class="popup">
							 | 
						||
| 
								 | 
							
								        <div class="popup-content">
							 | 
						||
| 
								 | 
							
								            <h3 id="popupTitle">Action</h3>
							 | 
						||
| 
								 | 
							
								            <p id="popupMessage"></p>
							 | 
						||
| 
								 | 
							
								            <button class="close" onclick="closePopup()">Fermer</button>
							 | 
						||
| 
								 | 
							
								            <button class="confirm" onclick="confirmAction()">Confirmer</button>
							 | 
						||
| 
								 | 
							
								        </div>
							 | 
						||
| 
								 | 
							
								    </div>
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								    <script>
							 | 
						||
| 
								 | 
							
								        let currentAction = '';
							 | 
						||
| 
								 | 
							
								        let currentPaymentId = '';
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								        function openPopup(action, paymentId) {
							 | 
						||
| 
								 | 
							
								            const popup = document.getElementById('popup');
							 | 
						||
| 
								 | 
							
								            const title = document.getElementById('popupTitle');
							 | 
						||
| 
								 | 
							
								            const message = document.getElementById('popupMessage');
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								            currentAction = action;
							 | 
						||
| 
								 | 
							
								            currentPaymentId = paymentId;
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								            title.textContent = action.charAt(0).toUpperCase() + action.slice(1) + ' Paiement';
							 | 
						||
| 
								 | 
							
								            message.textContent = `Êtes-vous sûr de vouloir ${action} le paiement ID ${paymentId} ?`;
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								            popup.style.display = 'flex';
							 | 
						||
| 
								 | 
							
								        }
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								        function closePopup() {
							 | 
						||
| 
								 | 
							
								            const popup = document.getElementById('popup');
							 | 
						||
| 
								 | 
							
								            popup.style.display = 'none';
							 | 
						||
| 
								 | 
							
								        }
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								        function confirmAction() {
							 | 
						||
| 
								 | 
							
								    const statusElement = document.getElementById(`status-${currentPaymentId}`);
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								    // Réinitialise toutes les classes de statut avant d'ajouter la nouvelle
							 | 
						||
| 
								 | 
							
								    statusElement.classList.remove('status-en-attente', 'status-bloque', 'status-annule', 'status-debloque', 'status-envoye');
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								    switch(currentAction) {
							 | 
						||
| 
								 | 
							
								        case 'bloquer':
							 | 
						||
| 
								 | 
							
								            statusElement.textContent = 'Bloqué';
							 | 
						||
| 
								 | 
							
								            statusElement.classList.add('status-bloque');
							 | 
						||
| 
								 | 
							
								            break;
							 | 
						||
| 
								 | 
							
								        case 'annuler':
							 | 
						||
| 
								 | 
							
								            statusElement.textContent = 'Annulé';
							 | 
						||
| 
								 | 
							
								            statusElement.classList.add('status-annule');
							 | 
						||
| 
								 | 
							
								            break;
							 | 
						||
| 
								 | 
							
								        case 'débloquer':
							 | 
						||
| 
								 | 
							
								            statusElement.textContent = 'Débloqué';
							 | 
						||
| 
								 | 
							
								            statusElement.classList.add('status-debloque');
							 | 
						||
| 
								 | 
							
								            break;
							 | 
						||
| 
								 | 
							
								        case 'envoyer':
							 | 
						||
| 
								 | 
							
								            statusElement.textContent = 'Salaire payer';
							 | 
						||
| 
								 | 
							
								            statusElement.classList.add('status-envoye');
							 | 
						||
| 
								 | 
							
								            break;
							 | 
						||
| 
								 | 
							
								        default:
							 | 
						||
| 
								 | 
							
								            statusElement.textContent = 'En attente';
							 | 
						||
| 
								 | 
							
								            statusElement.classList.add('status-en-attente');
							 | 
						||
| 
								 | 
							
								    }
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								    closePopup();
							 | 
						||
| 
								 | 
							
								}
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								    </script>
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								</body>
							 | 
						||
| 
								 | 
							
								</html>
							 |