archive / index.html
Alascoci's picture
Peux tu m'aider à integrer ces fonctionnalitées : ## 🧠 1. Objectif de la fonctionnalité
6d89f9b verified
Raw History Blame Contribute Delete
27.6 kB
<!DOCTYPE html>
<html lang="fr">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>GED - Gestion Électronique de Documents</title>
<script src="https://cdn.tailwindcss.com"></script>
<link href="https://unpkg.com/aos@2.3.1/dist/aos.css" rel="stylesheet">
<script src="https://unpkg.com/aos@2.3.1/dist/aos.js"></script>
<script src="https://cdn.jsdelivr.net/npm/feather-icons/dist/feather.min.js"></script>
<script src="https://unpkg.com/feather-icons"></script>
<style>
.gradient-bg {
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}
.document-card:hover {
transform: translateY(-5px);
box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}
.sidebar {
transition: all 0.3s ease;
}
@media (max-width: 768px) {
.sidebar {
transform: translateX(-100%);
}
.sidebar.active {
transform: translateX(0);
}
}
</style>
</head>
<body class="bg-gray-50 font-sans">
<!-- Mobile Menu Button -->
<button id="menuToggle" class="md:hidden fixed top-4 left-4 z-50 bg-white p-2 rounded-lg shadow-lg">
<i data-feather="menu"></i>
</button>
<!-- Sidebar -->
<div id="sidebar" class="sidebar fixed h-full w-64 bg-white shadow-lg z-40">
<div class="p-4 border-b border-gray-200">
<h1 class="text-xl font-bold text-indigo-700">GED Pro</h1>
<p class="text-sm text-gray-500">Gestion Électronique de Documents</p>
</div>
<nav class="p-4">
<ul class="space-y-2">
<li>
<a href="#" class="flex items-center p-2 text-indigo-700 bg-indigo-50 rounded-lg">
<i data-feather="home" class="mr-3"></i>
Tableau de bord
</a>
</li>
<li>
<a href="#" class="flex items-center p-2 text-gray-600 hover:bg-gray-100 rounded-lg">
<i data-feather="folder" class="mr-3"></i>
Documents
</a>
</li>
<li>
<a href="#" class="flex items-center p-2 text-gray-600 hover:bg-gray-100 rounded-lg">
<i data-feather="inbox" class="mr-3"></i>
Archives
</a>
</li>
<li>
<a href="#" class="flex items-center p-2 text-gray-600 hover:bg-gray-100 rounded-lg">
<i data-feather="users" class="mr-3"></i>
Utilisateurs
</a>
</li>
<li>
<a href="#" class="flex items-center p-2 text-gray-600 hover:bg-gray-100 rounded-lg">
<i data-feather="settings" class="mr-3"></i>
Paramètres
</a>
</li>
</ul>
</nav>
<div class="absolute bottom-0 w-full p-4 border-t border-gray-200">
<div class="flex items-center">
<img src="http://static.photos/people/200x200/1" alt="Profile" class="w-10 h-10 rounded-full">
<div class="ml-3">
<p class="text-sm font-medium text-gray-700">Admin User</p>
<p class="text-xs text-gray-500">Administrateur</p>
</div>
</div>
</div>
</div>
<!-- Main Content -->
<div class="md:ml-64 min-h-screen">
<!-- Header -->
<header class="gradient-bg text-white p-4 shadow-md">
<div class="container mx-auto flex justify-between items-center">
<h1 class="text-2xl font-bold">Tableau de bord</h1>
<div class="flex items-center space-x-4">
<button class="p-2 rounded-full bg-white bg-opacity-20 hover:bg-opacity-30">
<i data-feather="bell"></i>
</button>
<button class="p-2 rounded-full bg-white bg-opacity-20 hover:bg-opacity-30">
<i data-feather="search"></i>
</button>
</div>
</div>
</header>
<!-- Content -->
<main class="container mx-auto p-4">
<!-- Quick Actions -->
<div class="grid grid-cols-1 md:grid-cols-4 gap-4 mb-6">
<div class="bg-white p-6 rounded-xl shadow-md" data-aos="fade-up">
<div class="flex items-center">
<div class="p-3 rounded-full bg-indigo-100 text-indigo-600 mr-4">
<i data-feather="upload"></i>
</div>
<div>
<h3 class="font-semibold text-gray-800">Nouveau document</h3>
<p class="text-sm text-gray-500">Scanner ou importer un document</p>
</div>
</div>
</div>
<div class="bg-white p-6 rounded-xl shadow-md" data-aos="fade-up" data-aos-delay="100">
<div class="flex items-center">
<div class="p-3 rounded-full bg-green-100 text-green-600 mr-4">
<i data-feather="camera"></i>
</div>
<div>
<h3 class="font-semibold text-gray-800">Acquisition numérique</h3>
<p class="text-sm text-gray-500">Capturer avec la caméra</p>
</div>
</div>
</div>
<div class="bg-white p-6 rounded-xl shadow-md" data-aos="fade-up" data-aos-delay="200">
<div class="flex items-center">
<div class="p-3 rounded-full bg-blue-100 text-blue-600 mr-4">
<i data-feather="printer"></i>
</div>
<div>
<h3 class="font-semibold text-gray-800">Scanner</h3>
<p class="text-sm text-gray-500">Utiliser l'imprimante multifonction</p>
</div>
</div>
</div>
<div class="bg-white p-6 rounded-xl shadow-md" data-aos="fade-up" data-aos-delay="300">
<div class="flex items-center">
<div class="p-3 rounded-full bg-purple-100 text-purple-600 mr-4">
<i data-feather="pen-tool"></i>
</div>
<div>
<h3 class="font-semibold text-gray-800">Signature</h3>
<p class="text-sm text-gray-500">Signer électroniquement</p>
</div>
</div>
</div>
</div>
<!-- Document Categories -->
<div class="mb-8" data-aos="fade-up">
<div class="flex justify-between items-center mb-4">
<h2 class="text-xl font-bold text-gray-800">Catégories de documents</h2>
<button class="text-indigo-600 hover:text-indigo-800 flex items-center">
<i data-feather="plus" class="mr-1"></i> Ajouter
</button>
</div>
<div class="grid grid-cols-2 md:grid-cols-4 lg:grid-cols-6 gap-4">
<div class="document-card bg-white p-4 rounded-lg shadow-md text-center transition duration-300">
<div class="p-3 bg-red-100 rounded-full inline-block mb-2">
<i data-feather="file-text" class="text-red-600"></i>
</div>
<h3 class="font-medium">Factures</h3>
<p class="text-xs text-gray-500">128 documents</p>
</div>
<div class="document-card bg-white p-4 rounded-lg shadow-md text-center transition duration-300">
<div class="p-3 bg-blue-100 rounded-full inline-block mb-2">
<i data-feather="file-text" class="text-blue-600"></i>
</div>
<h3 class="font-medium">Contrats</h3>
<p class="text-xs text-gray-500">56 documents</p>
</div>
<div class="document-card bg-white p-4 rounded-lg shadow-md text-center transition duration-300">
<div class="p-3 bg-green-100 rounded-full inline-block mb-2">
<i data-feather="file-text" class="text-green-600"></i>
</div>
<h3 class="font-medium">RH</h3>
<p class="text-xs text-gray-500">89 documents</p>
</div>
<div class="document-card bg-white p-4 rounded-lg shadow-md text-center transition duration-300">
<div class="p-3 bg-yellow-100 rounded-full inline-block mb-2">
<i data-feather="file-text" class="text-yellow-600"></i>
</div>
<h3 class="font-medium">Juridique</h3>
<p class="text-xs text-gray-500">42 documents</p>
</div>
<div class="document-card bg-white p-4 rounded-lg shadow-md text-center transition duration-300">
<div class="p-3 bg-purple-100 rounded-full inline-block mb-2">
<i data-feather="file-text" class="text-purple-600"></i>
</div>
<h3 class="font-medium">Finances</h3>
<p class="text-xs text-gray-500">76 documents</p>
</div>
<div class="document-card bg-white p-4 rounded-lg shadow-md text-center transition duration-300">
<div class="p-3 bg-indigo-100 rounded-full inline-block mb-2">
<i data-feather="file-text" class="text-indigo-600"></i>
</div>
<h3 class="font-medium">Autres</h3>
<p class="text-xs text-gray-500">34 documents</p>
</div>
</div>
</div>
<!-- AI Assistant Panel -->
<div v-if="showAssistant" class="bg-white rounded-xl shadow-md p-6 mb-8" data-aos="fade-up">
<div class="flex justify-between items-center mb-4">
<h3 class="text-lg font-bold flex items-center">
<i data-feather="message-square" class="mr-2 text-indigo-600"></i>
Assistant IA Documentaire
</h3>
<button @click="showAssistant = false" class="text-gray-500 hover:text-gray-700">
<i data-feather="x"></i>
</button>
</div>
<div class="mb-4">
<label class="block text-sm font-medium text-gray-700 mb-1">Document</label>
<select v-model="selectedDocument" class="w-full p-2 border border-gray-300 rounded-lg">
<option value="">Sélectionnez un document</option>
<option v-for="doc in documents" :value="doc.id">{{ doc.name }}</option>
</select>
</div>
<div class="mb-4">
<label class="block text-sm font-medium text-gray-700 mb-1">Question</label>
<input v-model="question"
@keyup.enter="askQuestion"
placeholder="Posez votre question sur le document..."
class="w-full p-2 border border-gray-300 rounded-lg">
</div>
<button @click="askQuestion"
:disabled="!selectedDocument || !question"
class="w-full bg-indigo-600 text-white py-2 px-4 rounded-lg hover:bg-indigo-700 disabled:opacity-50">
<i data-feather="send" class="mr-2"></i> Interroger
</button>
<div v-if="loading" class="mt-4 text-center text-gray-500">
<i data-feather="loader" class="animate-spin mx-auto"></i>
</div>
<div v-if="response" class="mt-4 p-4 bg-gray-50 rounded-lg">
<div class="flex items-start">
<div class="flex-shrink-0 bg-indigo-100 p-2 rounded-full">
<i data-feather="message-square" class="text-indigo-600"></i>
</div>
<div class="ml-3">
<h4 class="font-medium">Réponse IA:</h4>
<p class="text-gray-700 mt-1">{{ response }}</p>
</div>
</div>
</div>
</div>
<!-- Recent Documents -->
<div data-aos="fade-up">
<div class="flex justify-between items-center mb-4">
<h2 class="text-xl font-bold text-gray-800">Documents récents</h2>
<button class="text-indigo-600 hover:text-indigo-800 flex items-center">
<i data-feather="filter" class="mr-1"></i> Filtrer
</button>
</div>
<div class="bg-white rounded-xl shadow-md 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">Nom</th>
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Catégorie</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">Taille</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">
<tr>
<td class="px-6 py-4 whitespace-nowrap">
<div class="flex items-center">
<i data-feather="file-text" class="text-indigo-600 mr-3"></i>
<span class="font-medium">Facture_2023_001.pdf</span>
</div>
</td>
<td class="px-6 py-4 whitespace-nowrap">
<span class="px-2 inline-flex text-xs leading-5 font-semibold rounded-full bg-red-100 text-red-800">Factures</span>
</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">15/01/2023</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">2.4 MB</td>
<td class="px-6 py-4 whitespace-nowrap text-sm font-medium">
<button class="text-indigo-600 hover:text-indigo-900 mr-3"><i data-feather="eye"></i></button>
<button class="text-green-600 hover:text-green-900 mr-3"><i data-feather="download"></i></button>
<button class="text-gray-600 hover:text-gray-900"><i data-feather="more-vertical"></i></button>
</td>
</tr>
<tr>
<td class="px-6 py-4 whitespace-nowrap">
<div class="flex items-center">
<i data-feather="file-text" class="text-blue-600 mr-3"></i>
<span class="font-medium">Contrat_client_XYZ.pdf</span>
</div>
</td>
<td class="px-6 py-4 whitespace-nowrap">
<span class="px-2 inline-flex text-xs leading-5 font-semibold rounded-full bg-blue-100 text-blue-800">Contrats</span>
</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">10/01/2023</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">4.1 MB</td>
<td class="px-6 py-4 whitespace-nowrap text-sm font-medium">
<button class="text-indigo-600 hover:text-indigo-900 mr-3"><i data-feather="eye"></i></button>
<button class="text-green-600 hover:text-green-900 mr-3"><i data-feather="download"></i></button>
<button class="text-gray-600 hover:text-gray-900"><i data-feather="more-vertical"></i></button>
</td>
</tr>
<tr>
<td class="px-6 py-4 whitespace-nowrap">
<div class="flex items-center">
<i data-feather="file-text" class="text-green-600 mr-3"></i>
<span class="font-medium">CV_Nouveau_Candidat.pdf</span>
</div>
</td>
<td class="px-6 py-4 whitespace-nowrap">
<span class="px-2 inline-flex text-xs leading-5 font-semibold rounded-full bg-green-100 text-green-800">RH</span>
</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">05/01/2023</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">1.7 MB</td>
<td class="px-6 py-4 whitespace-nowrap text-sm font-medium">
<button class="text-indigo-600 hover:text-indigo-900 mr-3"><i data-feather="eye"></i></button>
<button class="text-green-600 hover:text-green-900 mr-3"><i data-feather="download"></i></button>
<button class="text-gray-600 hover:text-gray-900"><i data-feather="more-vertical"></i></button>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</main>
</div>
<!-- Scanner Modal -->
<div id="scannerModal" class="fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50 hidden">
<div class="bg-white rounded-xl p-6 w-full max-w-2xl" data-aos="zoom-in">
<div class="flex justify-between items-center mb-4">
<h3 class="text-lg font-bold">Scanner un document</h3>
<button id="closeScannerModal" class="text-gray-500 hover:text-gray-700">
<i data-feather="x"></i>
</button>
</div>
<div class="border-2 border-dashed border-gray-300 rounded-lg p-8 text-center mb-4">
<i data-feather="printer" class="mx-auto text-indigo-600 w-12 h-12 mb-3"></i>
<p class="text-gray-600 mb-4">Connectez votre imprimante multifonction et lancez la numérisation</p>
<button class="bg-indigo-600 text-white px-4 py-2 rounded-lg hover:bg-indigo-700 flex items-center mx-auto">
<i data-feather="play" class="mr-2"></i> Démarrer la numérisation
</button>
</div>
<div class="flex justify-end space-x-3">
<button class="px-4 py-2 border border-gray-300 rounded-lg hover:bg-gray-50">Annuler</button>
<button class="px-4 py-2 bg-indigo-600 text-white rounded-lg hover:bg-indigo-700">Enregistrer</button>
</div>
</div>
</div>
<!-- Signature Modal -->
<div id="signatureModal" class="fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50 hidden">
<div class="bg-white rounded-xl p-6 w-full max-w-2xl" data-aos="zoom-in">
<div class="flex justify-between items-center mb-4">
<h3 class="text-lg font-bold">Signer électroniquement</h3>
<button id="closeSignatureModal" class="text-gray-500 hover:text-gray-700">
<i data-feather="x"></i>
</button>
</div>
<div class="mb-4">
<div class="border-2 border-dashed border-gray-300 rounded-lg h-48 mb-4 flex items-center justify-center">
<p class="text-gray-500">Zone de signature</p>
</div>
<div class="flex justify-between text-sm text-gray-600">
<div>
<p>Signataire: <span class="font-medium">Admin User</span></p>
<p>Horodatage: <span class="font-medium">--/--/---- --:--</span></p>
</div>
<div>
<p>Hash SHA256: <span class="font-mono text-xs">calculé après signature</span></p>
</div>
</div>
</div>
<div class="flex justify-end space-x-3">
<button class="px-4 py-2 border border-gray-300 rounded-lg hover:bg-gray-50">Annuler</button>
<button class="px-4 py-2 bg-indigo-600 text-white rounded-lg hover:bg-indigo-700">Signer et enregistrer</button>
</div>
</div>
</div>
<!-- Camera Modal -->
<div id="cameraModal" class="fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50 hidden">
<div class="bg-white rounded-xl p-6 w-full max-w-2xl" data-aos="zoom-in">
<div class="flex justify-between items-center mb-4">
<h3 class="text-lg font-bold">Capturer un document</h3>
<button id="closeCameraModal" class="text-gray-500 hover:text-gray-700">
<i data-feather="x"></i>
</button>
</div>
<div class="border-2 border-dashed border-gray-300 rounded-lg p-8 text-center mb-4">
<div class="bg-gray-200 h-64 mx-auto mb-4 flex items-center justify-center">
<i data-feather="camera" class="text-gray-400 w-12 h-12"></i>
</div>
<p class="text-gray-600 mb-4">Positionnez votre document devant la caméra</p>
<button class="bg-indigo-600 text-white px-4 py-2 rounded-lg hover:bg-indigo-700 flex items-center mx-auto">
<i data-feather="camera" class="mr-2"></i> Capturer
</button>
</div>
<div class="flex justify-end space-x-3">
<button class="px-4 py-2 border border-gray-300 rounded-lg hover:bg-gray-50">Annuler</button>
<button class="px-4 py-2 bg-indigo-600 text-white rounded-lg hover:bg-indigo-700">Enregistrer</button>
</div>
</div>
</div>
<script src="https://cdn.jsdelivr.net/npm/vue@3.2.47/dist/vue.global.min.js"></script>
<script>
const { createApp, ref } = Vue;
createApp({
setup() {
const showAssistant = ref(false);
const selectedDocument = ref('');
const question = ref('');
const response = ref('');
const loading = ref(false);
const documents = ref([
{ id: 1, name: 'Facture_2023_001.pdf' },
{ id: 2, name: 'Contrat_client_XYZ.pdf' },
{ id: 3, name: 'CV_Nouveau_Candidat.pdf' }
]);
function askQuestion() {
if (!selectedDocument.value || !question.value) return;
loading.value = true;
response.value = '';
// Simulate API call
setTimeout(() => {
const doc = documents.value.find(d => d.id == selectedDocument.value);
response.value = `D'après le document "${doc.name}", la réponse à votre question "${question.value}" serait... (simulation)`;
loading.value = false;
}, 1500);
}
return {
showAssistant,
selectedDocument,
question,
response,
loading,
documents,
askQuestion
};
},
mounted() {
AOS.init();
feather.replace();
}
}).mount('body');
// Mobile menu toggle
const menuToggle = document.getElementById('menuToggle');
const sidebar = document.getElementById('sidebar');
menuToggle.addEventListener('click', () => {
sidebar.classList.toggle('active');
});
// Modal handling
const scannerModal = document.getElementById('scannerModal');
const cameraModal = document.getElementById('cameraModal');
const signatureModal = document.getElementById('signatureModal');
const closeScannerModal = document.getElementById('closeScannerModal');
const closeCameraModal = document.getElementById('closeCameraModal');
const closeSignatureModal = document.getElementById('closeSignatureModal');
// Example of opening modals (you would connect these to your actual buttons)
function openScannerModal() {
scannerModal.classList.remove('hidden');
}
function openCameraModal() {
cameraModal.classList.remove('hidden');
}
closeScannerModal.addEventListener('click', () => {
scannerModal.classList.add('hidden');
});
closeCameraModal.addEventListener('click', () => {
cameraModal.classList.add('hidden');
});
closeSignatureModal.addEventListener('click', () => {
signatureModal.classList.add('hidden');
});
// Example signature modal opener
function openSignatureModal() {
signatureModal.classList.remove('hidden');
}
// You would add event listeners to your action buttons to open the modals
// For example:
// document.querySelector('.scanner-button').addEventListener('click', openScannerModal);
</script>
</body>
</html>