invoice-manager/static/dashboard.html

116 lines
6.0 KiB
HTML

<!DOCTYPE html>
<html lang="fr">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Gestion des Factures</title>
<link href="https://cdn.jsdelivr.net/npm/tailwindcss@2.2.19/dist/tailwind.min.css" rel="stylesheet">
<link rel="stylesheet" href="/static/styles.css">
</head>
<body class="bg-gray-100 min-h-screen">
<div class="container mx-auto px-4 py-8">
<div class="flex justify-between items-center mb-8">
<h1 class="text-3xl font-bold">Gestion des Factures</h1>
<div class="flex space-x-4">
<a href="/accounting" class="bg-purple-500 text-white px-4 py-2 rounded-md hover:bg-purple-600">
Comptabilité
</a>
<a href="generator" class="bg-blue-500 text-white px-4 py-2 rounded-md hover:bg-blue-600">
Nouvelle Facture
</a>
</div>
</div>
<!-- Statistiques -->
<div class="grid grid-cols-1 md:grid-cols-5 gap-4 mb-8">
<div class="bg-white rounded-lg shadow p-4">
<h3 class="text-gray-500 text-sm">Total Factures</h3>
<p class="text-2xl font-bold" id="totalInvoices">0</p>
</div>
<div class="bg-white rounded-lg shadow p-4">
<h3 class="text-gray-500 text-sm">Montant Total</h3>
<p class="text-2xl font-bold" id="totalAmount">0 €</p>
</div>
<div class="bg-white rounded-lg shadow p-4">
<h3 class="text-gray-500 text-sm">Factures Payées</h3>
<p class="text-2xl font-bold text-green-500" id="totalPaid">0 €</p>
</div>
<div class="bg-white rounded-lg shadow p-4">
<h3 class="text-gray-500 text-sm">Factures en Retard</h3>
<p class="text-2xl font-bold text-red-500" id="totalOverdue">0 €</p>
</div>
<div class="bg-white rounded-lg shadow p-4">
<h3 class="text-gray-500 text-sm">Factures Annulées</h3>
<p class="text-2xl font-bold text-gray-500" id="totalCancelled">0 €</p>
</div>
</div>
<!-- Filtres -->
<div class="bg-white rounded-lg shadow p-4 mb-8">
<div class="grid grid-cols-1 md:grid-cols-4 gap-4">
<div>
<label class="block text-sm font-medium text-gray-700">Statut</label>
<select id="statusFilter" class="mt-1 block w-full rounded-md border-gray-300 shadow-sm focus:border-blue-500 focus:ring-blue-500">
<option value="">Tous</option>
<option value="issued">Émise</option>
<option value="paid">Payée</option>
<option value="overdue">En retard</option>
<option value="cancelled">Annulée</option>
</select>
</div>
<div>
<label class="block text-sm font-medium text-gray-700">Date de début</label>
<input type="date" id="dateFrom" class="mt-1 block w-full rounded-md border-gray-300 shadow-sm focus:border-blue-500 focus:ring-blue-500">
</div>
<div>
<label class="block text-sm font-medium text-gray-700">Date de fin</label>
<input type="date" id="dateTo" class="mt-1 block w-full rounded-md border-gray-300 shadow-sm focus:border-blue-500 focus:ring-blue-500">
</div>
<div class="flex items-end">
<button id="applyFilters" class="bg-blue-500 text-white px-4 py-2 rounded-md hover:bg-blue-600 w-full">
Appliquer les filtres
</button>
</div>
</div>
</div>
<!-- Liste des factures -->
<div class="bg-white rounded-lg shadow overflow-hidden">
<table class="min-w-full divide-y divide-gray-200">
<thead class="bg-gray-50">
<tr>
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">N° Facture</th>
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Client</th>
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Date</th>
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Montant</th>
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Statut</th>
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Actions</th>
</tr>
</thead>
<tbody class="bg-white divide-y divide-gray-200" id="invoicesList">
<!-- Les factures seront ajoutées ici dynamiquement -->
</tbody>
</table>
</div>
</div>
<!-- Modal pour les détails de la facture -->
<div id="invoiceModal" class="fixed inset-0 bg-gray-600 bg-opacity-50 hidden">
<div class="relative top-20 mx-auto p-5 border w-96 shadow-lg rounded-md bg-white">
<div class="mt-3 text-center">
<h3 class="text-lg leading-6 font-medium text-gray-900" id="modalTitle"></h3>
<div class="mt-2 px-7 py-3">
<p class="text-sm text-gray-500" id="modalContent"></p>
</div>
<div class="items-center px-4 py-3">
<button id="closeModal" class="px-4 py-2 bg-gray-500 text-white text-base font-medium rounded-md w-full shadow-sm hover:bg-gray-600 focus:outline-none focus:ring-2 focus:ring-gray-300">
Fermer
</button>
</div>
</div>
</div>
</div>
<script src="/static/dashboard.js"></script>
</body>
</html>