davidegato1's picture
Je souhaite développer une application de gestion et d’exécution de **commandes de transfert d’agents**. L’objectif est de permettre à des utilisateurs de créer une commande de transfert (ou de dépôt / paiement de facture, etc.), puis de la diffuser en **temps réel** vers des clients (les *devices*) qui l’exécuteront automatiquement. Lors de la création d’une commande, l’application publie un événement via **SignalR** (ou via une API REST si nécessaire) ; les devices (smartphones Android/iOS) connectés reçoivent cet événement, traitent la commande et renvoient une confirmation d’exécution (par SignalR ou par appel d’API).
af4847e verified
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Dashboard - TransferFlow Pro</title>
<link rel="icon" type="image/x-icon" href="/static/favicon.ico">
<script src="https://cdn.tailwindcss.com"></script>
<script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
<script src="https://unpkg.com/feather-icons"></script>
<script src="https://cdn.jsdelivr.net/npm/feather-icons/dist/feather.min.js"></script>
<script>
tailwind.config = {
theme: {
extend: {
colors: {
primary: '#3B82F6',
secondary: '#10B981',
accent: '#8B5CF6',
dark: '#1F2937',
light: '#F9FAFB'
}
}
}
}
</script>
<style>
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');
body {
font-family: 'Inter', sans-serif;
}
.sidebar {
transition: all 0.3s ease;
}
.card-hover {
transition: all 0.3s ease;
}
.card-hover: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);
}
.stat-card {
transition: all 0.3s ease;
}
.stat-card:hover {
transform: scale(1.05);
}
@media (max-width: 768px) {
.sidebar {
transform: translateX(-100%);
}
.sidebar.open {
transform: translateX(0);
}
}
</style>
</head>
<body class="bg-gray-100">
<div class="flex h-screen">
<!-- Sidebar -->
<div class="sidebar bg-white w-64 space-y-6 py-7 px-2 absolute inset-y-0 left-0 transform -translate-x-full md:relative md:translate-x-0 transition duration-200 ease-in-out z-30">
<div class="flex items-center space-x-2 px-4">
<i data-feather="send" class="text-primary h-8 w-8"></i>
<span class="text-2xl font-extrabold text-dark">TransferFlow</span>
</div>
<nav>
<a href="dashboard.html" class="block py-2.5 px-4 rounded transition duration-200 bg-primary text-white">
<i data-feather="home" class="inline-block w-5 h-5 mr-2"></i>
Dashboard
</a>
<a href="commands.html" class="block py-2.5 px-4 rounded transition duration-200 hover:bg-gray-100 text-gray-600">
<i data-feather="list" class="inline-block w-5 h-5 mr-2"></i>
Commands
</a>
<a href="devices.html" class="block py-2.5 px-4 rounded transition duration-200 hover:bg-gray-100 text-gray-600">
<i data-feather="smartphone" class="inline-block w-5 h-5 mr-2"></i>
Devices
</a>
<a href="analytics.html" class="block py-2.5 px-4 rounded transition duration-200 hover:bg-gray-100 text-gray-600">
<i data-feather="bar-chart-2" class="inline-block w-5 h-5 mr-2"></i>
Analytics
</a>
<a href="users.html" class="block py-2.5 px-4 rounded transition duration-200 hover:bg-gray-100 text-gray-600">
<i data-feather="users" class="inline-block w-5 h-5 mr-2"></i>
Users
</a>
<a href="settings.html" class="block py-2.5 px-4 rounded transition duration-200 hover:bg-gray-100 text-gray-600">
<i data-feather="settings" class="inline-block w-5 h-5 mr-2"></i>
Settings
</a>
</nav>
</div>
<!-- Main content -->
<div class="flex-1 flex flex-col overflow-hidden">
<!-- Header -->
<header class="flex items-center justify-between px-6 py-4 bg-white border-b">
<div class="flex items-center">
<button class="text-gray-500 focus:outline-none lg:hidden" id="menu-toggle">
<i data-feather="menu" class="h-6 w-6"></i>
</button>
<!-- Date Filter -->
<div class="ml-4 flex items-center space-x-4">
<span class="text-sm text-gray-600">Filter by:</span>
<div class="flex space-x-2">
<select class="border rounded-md px-3 py-1 text-sm focus:outline-none focus:ring-2 focus:ring-primary">
<option>Today</option>
<option>Last 7 days</option>
<option>Last 30 days</option>
<option selected>Custom Range</option>
</select>
<input type="date" class="border rounded-md px-3 py-1 text-sm focus:outline-none focus:ring-2 focus:ring-primary">
<input type="date" class="border rounded-md px-3 py-1 text-sm focus:outline-none focus:ring-2 focus:ring-primary">
</div>
</div>
</div>
<div class="flex items-center space-x-4">
<div class="relative">
<button class="text-gray-500 focus:outline-none">
<i data-feather="bell" class="h-6 w-6"></i>
<span class="absolute top-0 right-0 h-2 w-2 rounded-full bg-red-500"></span>
</button>
</div>
<div class="relative">
<button class="flex items-center text-sm focus:outline-none">
<div class="h-8 w-8 rounded-full bg-primary flex items-center justify-center text-white font-semibold">S</div>
<span class="ml-2 text-gray-700">stidjani@proconsulting-info.com</span>
<i data-feather="chevron-down" class="ml-1 h-4 w-4 text-gray-500"></i>
</button>
</div>
</div>
</header>
<!-- Main content area -->
<main class="flex-1 overflow-x-hidden overflow-y-auto bg-gray-100 p-6">
<div class="mb-6">
<h1 class="text-2xl font-semibold text-gray-800">Dashboard</h1>
<p class="text-gray-600">Welcome back! Here's what's happening with your commands today.</p>
</div>
<!-- Stats Cards -->
<div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-6 mb-8">
<div class="bg-white rounded-lg shadow stat-card p-6">
<div class="flex items-center">
<div class="p-3 rounded-full bg-blue-100 text-blue-500">
<i data-feather="send" class="h-6 w-6"></i>
</div>
<div class="ml-4">
<h2 class="text-sm font-medium text-gray-500">Total Commands</h2>
<p class="text-2xl font-semibold text-gray-700">1,234</p>
</div>
</div>
<div class="mt-4">
<div class="flex items-center text-sm text-green-500">
<i data-feather="trending-up" class="h-4 w-4 mr-1"></i>
<span>12% increase</span>
</div>
</div>
</div>
<div class="bg-white rounded-lg shadow stat-card p-6">
<div class="flex items-center">
<div class="p-3 rounded-full bg-green-100 text-green-500">
<i data-feather="check-circle" class="h-6 w-6"></i>
</div>
<div class="ml-4">
<h2 class="text-sm font-medium text-gray-500">Completed</h2>
<p class="text-2xl font-semibold text-gray-700">987</p>
</div>
</div>
<div class="mt-4">
<div class="flex items-center text-sm text-green-500">
<i data-feather="trending-up" class="h-4 w-4 mr-1"></i>
<span>8% increase</span>
</div>
</div>
</div>
<div class="bg-white rounded-lg shadow stat-card p-6">
<div class="flex items-center">
<div class="p-3 rounded-full bg-yellow-100 text-yellow-500">
<i data-feather="clock" class="h-6 w-6"></i>
</div>
<div class="ml-4">
<h2 class="text-sm font-medium text-gray-500">In Progress</h2>
<p class="text-2xl font-semibold text-gray-700">123</p>
</div>
</div>
<div class="mt-4">
<div class="flex items-center text-sm text-red-500">
<i data-feather="trending-down" class="h-4 w-4 mr-1"></i>
<span>3% decrease</span>
</div>
</div>
</div>
<div class="bg-white rounded-lg shadow stat-card p-6">
<div class="flex items-center">
<div class="p-3 rounded-full bg-purple-100 text-purple-500">
<i data-feather="smartphone" class="h-6 w-6"></i>
</div>
<div class="ml-4">
<h2 class="text-sm font-medium text-gray-500">Active Devices</h2>
<p class="text-2xl font-semibold text-gray-700">42</p>
</div>
</div>
<div class="mt-4">
<div class="flex items-center text-sm text-green-500">
<i data-feather="trending-up" class="h-4 w-4 mr-1"></i>
<span>15% increase</span>
</div>
</div>
</div>
</div>
<!-- Charts and Recent Activity -->
<div class="grid grid-cols-1 lg:grid-cols-2 gap-6">
<!-- Command Status Chart -->
<div class="bg-white rounded-lg shadow p-6">
<h2 class="text-lg font-semibold text-gray-800 mb-4">Command Status Distribution</h2>
<div class="h-64">
<canvas id="statusChart"></canvas>
</div>
</div>
<!-- Recent Activity -->
<div class="bg-white rounded-lg shadow p-6">
<h2 class="text-lg font-semibold text-gray-800 mb-4">Recent Activity</h2>
<div class="space-y-4">
<div class="flex items-start">
<div class="flex-shrink-0">
<div class="h-8 w-8 rounded-full bg-green-100 flex items-center justify-center">
<i data-feather="check-circle" class="h-4 w-4 text-green-600"></i>
</div>
</div>
<div class="ml-3">
<p class="text-sm font-medium text-gray-900">Transfer command completed</p>
<p class="text-sm text-gray-500">Transfer of $150 to John Doe was successfully processed</p>
<p class="text-xs text-gray-400">2 minutes ago</p>
</div>
</div>
<div class="flex items-start">
<div class="flex-shrink-0">
<div class="h-8 w-8 rounded-full bg-yellow-100 flex items-center justify-center">
<i data-feather="clock" class="h-4 w-4 text-yellow-600"></i>
</div>
</div>
<div class="ml-3">
<p class="text-sm font-medium text-gray-900">Bill payment in progress</p>
<p class="text-sm text-gray-500">Electricity bill payment for account 123456 is being processed</p>
<p class="text-xs text-gray-400">5 minutes ago</p>
</div>
</div>
<div class="flex items-start">
<div class="flex-shrink-0">
<div class="h-8 w-8 rounded-full bg-blue-100 flex items-center justify-center">
<i data-feather="send" class="h-4 w-4 text-blue-600"></i>
</div>
</div>
<div class="ml-3">
<p class="text-sm font-medium text-gray-900">New transfer command</p>
<p class="text-sm text-gray-500">New transfer of $200 to Jane Smith has been created</p>
<p class="text-xs text-gray-400">10 minutes ago</p>
</div>
</div>
<div class="flex items-start">
<div class="flex-shrink-0">
<div class="h-8 w-8 rounded-full bg-red-100 flex items-center justify-center">
<i data-feather="x-circle" class="h-4 w-4 text-red-600"></i>
</div>
</div>
<div class="ml-3">
<p class="text-sm font-medium text-gray-900">Command failed</p>
<p class="text-sm text-gray-500">Deposit command failed due to insufficient funds</p>
<p class="text-xs text-gray-400">15 minutes ago</p>
</div>
</div>
</div>
</div>
</div>
<!-- Command Types Breakdown -->
<div class="mt-6 bg-white rounded-lg shadow p-6">
<h2 class="text-lg font-semibold text-gray-800 mb-4">Command Types Breakdown</h2>
<div class="h-64">
<canvas id="typeChart"></canvas>
</div>
</div>
</main>
</div>
</div>
<script>
// Initialize Feather icons
feather.replace();
// Mobile menu toggle
document.getElementById('menu-toggle').addEventListener('click', function() {
document.querySelector('.sidebar').classList.toggle('open');
});
// Initialize charts
document.addEventListener('DOMContentLoaded', function() {
// Command Status Chart
const statusCtx = document.getElementById('statusChart').getContext('2d');
const statusChart = new Chart(statusCtx, {
type: 'doughnut',
data: {
labels: ['Completed', 'In Progress', 'Pending', 'Failed'],
datasets: [{
data: [65, 15, 15, 5],
backgroundColor: [
'#10B981',
'#F59E0B',
'#3B82F6',
'#EF4444'
],
borderWidth: 0
}]
},
options: {
responsive: true,
maintainAspectRatio: false,
plugins: {
legend: {
position: 'bottom'
}
}
}
});
// Command Types Chart
const typeCtx = document.getElementById('typeChart').getContext('2d');
const typeChart = new Chart(typeCtx, {
type: 'bar',
data: {
labels: ['Transfer', 'Deposit', 'Bill Payment', 'Other'],
datasets: [{
label: 'Count',
data: [65, 59, 80, 30],
backgroundColor: '#3B82F6',
borderColor: '#3B82F6',
borderWidth: 1
}]
},
options: {
responsive: true,
maintainAspectRatio: false,
scales: {
y: {
beginAtZero: true
}
}
}
});
});
</script>
</body>
</html>