jay / index.html
jikoniji's picture
Prompt "Design a sleek, modern WiFi client billing dashboard with a calm tech vibe. Use a clean indigo/dark blue color scheme with soft neon accents. The system should include: Client Management Smooth card-based client profiles (name, MAC address, plan, status) "Add Client" floating action button with subtle glow Billing Automation Visual timeline for billing cycles (weekly/monthly) Toggle switches for auto-invoicing and payment reminders Usage & Payments Dashboard Live bandwidth usage graphs (minimalist sparklines) Payment status badges (Paid/Pending/Overdue) with color-coded pulses Invoice Generation One-click "Generate Invoice" button with smooth slide-out animation Printable minimalist invoice template (client details, usage, amount due) Alerts & Notifications Toast notifications for payment confirmations Gentle pulsating warning icon for overdue accounts Tech Stack Suggestions: Frontend: React + Tailwind CSS with Framer Motion animations Charts: Lightweight Chart.js or D3 for data viz Backend: Firebase (for auth/database) or Node.js + Stripe/PayPal API Vibe Elements: Glassmorphism panels with soft blur Hover micro-interactions on buttons/cards Ambient gradient background (#0f172a → #1e293b) Cyber font (e.g., Orbitron for headers, Inter for body)" - Initial Deployment
a981925 verified
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>NeoConnect | WiFi Billing Dashboard</title>
<script src="https://cdn.tailwindcss.com"></script>
<script src="https://unpkg.com/chart.js@3.9.1/dist/chart.umd.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/chartjs-plugin-datalabels@2.0.0"></script>
<link href="https://fonts.googleapis.com/css2?family=Orbitron:wght@500;700&family=Inter:wght@300;400;500&display=swap" rel="stylesheet">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
<style>
:root {
--primary: #6366f1;
--primary-dark: #4338ca;
--accent: #7dd3fc;
--bg-dark: #0f172a;
--bg-light: #1e293b;
}
body {
font-family: 'Inter', sans-serif;
background: linear-gradient(135deg, var(--bg-dark), var(--bg-light));
color: #e2e8f0;
min-height: 100vh;
}
h1, h2, h3, .font-tech {
font-family: 'Orbitron', sans-serif;
letter-spacing: 0.05em;
}
.glass-card {
background: rgba(15, 23, 42, 0.7);
backdrop-filter: blur(10px);
border: 1px solid rgba(99, 102, 241, 0.2);
box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}
.glow-effect {
box-shadow: 0 0 10px rgba(125, 211, 252, 0.5);
}
.pulse {
animation: pulse 2s infinite;
}
@keyframes pulse {
0% { box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.7); }
70% { box-shadow: 0 0 0 10px rgba(74, 222, 128, 0); }
100% { box-shadow: 0 0 0 0 rgba(74, 222, 128, 0); }
}
.slide-in-right {
animation: slideInRight 0.3s ease-out forwards;
}
@keyframes slideInRight {
from { transform: translateX(100%); opacity: 0; }
to { transform: translateX(0); opacity: 1; }
}
.sparkline {
height: 30px;
width: 100px;
}
</style>
</head>
<body class="min-h-screen">
<div class="container mx-auto px-4 py-8">
<!-- Header Section -->
<header class="flex justify-between items-center mb-8">
<div>
<h1 class="text-3xl font-tech text-indigo-400">NeoConnect<span class="text-accent">.</span></h1>
<p class="text-slate-400 text-sm">WiFi Client Billing System</p>
</div>
<div class="flex items-center space-x-4">
<button class="bg-indigo-600 hover:bg-indigo-700 px-4 py-2 rounded-lg flex items-center text-sm">
<i class="fas fa-cog mr-2"></i> Settings
</button>
<div class="relative">
<div class="h-10 w-10 rounded-full bg-indigo-500 flex items-center justify-center">
<i class="fas fa-user"></i>
</div>
<span class="absolute top-0 right-0 h-3 w-3 rounded-full bg-green-500 pulse"></span>
</div>
</div>
</header>
<!-- Stats Overview -->
<div class="grid grid-cols-1 md:grid-cols-4 gap-6 mb-8">
<div class="glass-card p-6 rounded-xl">
<h3 class="text-slate-400 text-sm mb-1">Active Clients</h3>
<div class="flex justify-between items-end">
<p class="text-3xl font-semibold">42</p>
<span class="text-green-400 text-sm flex items-center">
<i class="fas fa-arrow-up mr-1"></i> 5%
</span>
</div>
</div>
<div class="glass-card p-6 rounded-xl">
<h3 class="text-slate-400 text-sm mb-1">Monthly Revenue</h3>
<div class="flex justify-between items-end">
<p class="text-3xl font-semibold">$1,890</p>
<span class="text-green-400 text-sm flex items-center">
<i class="fas fa-arrow-up mr-1"></i> 12%
</span>
</div>
</div>
<div class="glass-card p-6 rounded-xl">
<h3 class="text-slate-400 text-sm mb-1">Payments Due</h3>
<div class="flex justify-between items-end">
<p class="text-3xl font-semibold">3</p>
<span class="text-amber-400 text-sm flex items-center">
<i class="fas fa-exclamation-circle mr-1"></i> Needs attention
</span>
</div>
</div>
<div class="glass-card p-6 rounded-xl">
<h3 class="text-slate-400 text-sm mb-1">Avg. Bandwidth</h3>
<div class="flex justify-between items-end">
<p class="text-3xl font-semibold">45 Mbps</p>
<span class="text-accent text-sm flex items-center">
<i class="fas fa-chart-line mr-1"></i> Stable
</span>
</div>
</div>
</div>
<!-- Main Content Area -->
<div class="grid grid-cols-1 lg:grid-cols-3 gap-8">
<!-- Client Management Section -->
<div class="lg:col-span-2 space-y-6">
<div class="flex justify-between items-center">
<h2 class="text-xl font-tech text-indigo-300">Client Management</h2>
<button id="addClientBtn" class="bg-indigo-600 hover:bg-indigo-500 glow-effect px-4 py-2 rounded-full flex items-center text-sm">
<i class="fas fa-plus mr-2"></i> Add Client
</button>
</div>
<!-- Search and Filters -->
<div class="glass-card p-4 rounded-lg">
<div class="flex flex-col md:flex-row md:items-center md:justify-between gap-4">
<div class="relative flex-grow">
<i class="fas fa-search absolute left-3 top-3 text-slate-500"></i>
<input type="text" placeholder="Search clients..." class="bg-slate-800 pl-10 pr-4 py-2 w-full rounded-lg focus:ring-2 focus:ring-indigo-500 focus:outline-none">
</div>
<div class="flex space-x-2">
<button class="bg-slate-700 hover:bg-slate-600 px-3 py-1 rounded-lg text-sm">All</button>
<button class="bg-slate-700 hover:bg-slate-600 px-3 py-1 rounded-lg text-sm">Active</button>
<button class="bg-slate-700 hover:bg-slate-600 px-3 py-1 rounded-lg text-sm">Pending</button>
</div>
</div>
</div>
<!-- Client Cards -->
<div class="grid grid-cols-1 md:grid-cols-2 gap-4">
<!-- Client Card 1 -->
<div class="glass-card p-4 rounded-xl hover:border-indigo-400 transition-all duration-200 relative group">
<div class="absolute top-2 right-2">
<span class="inline-flex items-center px-2 py-1 rounded-full text-xs font-medium bg-amber-100/10 text-amber-500">
Pro Plan
</span>
</div>
<div class="flex items-start space-x-4">
<div class="h-12 w-12 rounded-full bg-indigo-500/20 flex items-center justify-center">
<i class="fas fa-user text-indigo-400"></i>
</div>
<div class="flex-1">
<h3 class="font-medium group-hover:text-indigo-300 transition-colors">Alex Johnson</h3>
<p class="text-slate-400 text-sm mt-1">MAC: 12:34:56:78:90:AB</p>
<div class="flex items-center justify-between mt-2">
<div>
<canvas class="sparkline" id="client1Usage"></canvas>
</div>
<span class="inline-flex items-center px-2 py-1 rounded-full text-xs font-medium bg-green-100/10 text-green-500">
<span class="h-2 w-2 rounded-full bg-green-500 mr-1"></span> Paid
</span>
</div>
</div>
</div>
<div class="mt-3 pt-3 border-t border-slate-700/50 flex justify-between">
<button class="text-xs text-slate-400 hover:text-indigo-300 flex items-center">
<i class="fas fa-clock mr-1"></i> Auto-billing
</button>
<label class="relative inline-flex items-center cursor-pointer">
<input type="checkbox" value="" class="sr-only peer" checked>
<div class="w-9 h-5 bg-gray-700 peer-focus:outline-none rounded-full peer peer-checked:after:translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-[2px] after:left-[2px] after:bg-white after:border-gray-300 after:border after:rounded-full after:h-4 after:w-4 after:transition-all peer-checked:bg-indigo-600"></div>
</label>
</div>
</div>
<!-- Client Card 2 -->
<div class="glass-card p-4 rounded-xl hover:border-indigo-400 transition-all duration-200 relative group">
<div class="absolute top-2 right-2">
<span class="inline-flex items-center px-2 py-1 rounded-full text-xs font-medium bg-purple-100/10 text-purple-500">
Business
</span>
</div>
<div class="flex items-start space-x-4">
<div class="h-12 w-12 rounded-full bg-indigo-500/20 flex items-center justify-center">
<i class="fas fa-building text-indigo-400"></i>
</div>
<div class="flex-1">
<h3 class="font-medium group-hover:text-indigo-300 transition-colors">Tech Solutions LLC</h3>
<p class="text-slate-400 text-sm mt-1">MAC: 76:54:32:10:FE:DC</p>
<div class="flex items-center justify-between mt-2">
<div>
<canvas class="sparkline" id="client2Usage"></canvas>
</div>
<span class="inline-flex items-center px-2 py-1 rounded-full text-xs font-medium bg-amber-100/10 text-amber-500">
<span class="h-2 w-2 rounded-full bg-amber-500 mr-1 pulse"></span> Overdue
</span>
</div>
</div>
</div>
<div class="mt-3 pt-3 border-t border-slate-700/50 flex justify-between">
<button class="text-xs text-slate-400 hover:text-indigo-300 flex items-center">
<i class="fas fa-clock mr-1"></i> Auto-billing
</button>
<label class="relative inline-flex items-center cursor-pointer">
<input type="checkbox" value="" class="sr-only peer" checked>
<div class="w-9 h-5 bg-gray-700 peer-focus:outline-none rounded-full peer peer-checked:after:translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-[2px] after:left-[2px] after:bg-white after:border-gray-300 after:border after:rounded-full after:h-4 after:w-4 after:transition-all peer-checked:bg-indigo-600"></div>
</label>
</div>
</div>
<!-- Client Card 3 -->
<div class="glass-card p-4 rounded-xl hover:border-indigo-400 transition-all duration-200 relative group">
<div class="absolute top-2 right-2">
<span class="inline-flex items-center px-2 py-1 rounded-full text-xs font-medium bg-blue-100/10 text-blue-500">
Basic
</span>
</div>
<div class="flex items-start space-x-4">
<div class="h-12 w-12 rounded-full bg-indigo-500/20 flex items-center justify-center">
<i class="fas fa-user text-indigo-400"></i>
</div>
<div class="flex-1">
<h3 class="font-medium group-hover:text-indigo-300 transition-colors">Sarah Williams</h3>
<p class="text-slate-400 text-sm mt-1">MAC: AB:CD:EF:12:34:56</p>
<div class="flex items-center justify-between mt-2">
<div>
<canvas class="sparkline" id="client3Usage"></canvas>
</div>
<span class="inline-flex items-center px-2 py-1 rounded-full text-xs font-medium bg-sky-100/10 text-sky-500">
<span class="h-2 w-2 rounded-full bg-sky-500 mr-1"></span> Pending
</span>
</div>
</div>
</div>
<div class="mt-3 pt-3 border-t border-slate-700/50 flex justify-between">
<button class="text-xs text-slate-400 hover:text-indigo-300 flex items-center">
<i class="fas fa-clock mr-1"></i> Auto-billing
</button>
<label class="relative inline-flex items-center cursor-pointer">
<input type="checkbox" value="" class="sr-only peer">
<div class="w-9 h-5 bg-gray-700 peer-focus:outline-none rounded-full peer peer-checked:after:translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-[2px] after:left-[2px] after:bg-white after:border-gray-300 after:border after:rounded-full after:h-4 after:w-4 after:transition-all peer-checked:bg-indigo-600"></div>
</label>
</div>
</div>
<!-- Client Card 4 -->
<div class="glass-card p-4 rounded-xl hover:border-indigo-400 transition-all duration-200 relative group">
<div class="absolute top-2 right-2">
<span class="inline-flex items-center px-2 py-1 rounded-full text-xs font-medium bg-emerald-100/10 text-emerald-500">
Premium
</span>
</div>
<div class="flex items-start space-x-4">
<div class="h-12 w-12 rounded-full bg-indigo-500/20 flex items-center justify-center">
<i class="fas fa-home text-indigo-400"></i>
</div>
<div class="flex-1">
<h3 class="font-medium group-hover:text-indigo-300 transition-colors">Rivera Family</h3>
<p class="text-slate-400 text-sm mt-1">MAC: 89:AB:CD:EF:01:23</p>
<div class="flex items-center justify-between mt-2">
<div>
<canvas class="sparkline" id="client4Usage"></canvas>
</div>
<span class="inline-flex items-center px-2 py-1 rounded-full text-xs font-medium bg-green-100/10 text-green-500">
<span class="h-2 w-2 rounded-full bg-green-500 mr-1"></span> Paid
</span>
</div>
</div>
</div>
<div class="mt-3 pt-3 border-t border-slate-700/50 flex justify-between">
<button class="text-xs text-slate-400 hover:text-indigo-300 flex items-center">
<i class="fas fa-clock mr-1"></i> Auto-billing
</button>
<label class="relative inline-flex items-center cursor-pointer">
<input type="checkbox" value="" class="sr-only peer" checked>
<div class="w-9 h-5 bg-gray-700 peer-focus:outline-none rounded-full peer peer-checked:after:translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-[2px] after:left-[2px] after:bg-white after:border-gray-300 after:border after:rounded-full after:h-4 after:w-4 after:transition-all peer-checked:bg-indigo-600"></div>
</label>
</div>
</div>
</div>
</div>
<!-- Billing & Activity Section -->
<div class="space-y-6">
<h2 class="text-xl font-tech text-indigo-300">Billing Automation</h2>
<div class="glass-card p-6 rounded-xl">
<div class="flex justify-between items-center mb-4">
<h3 class="font-medium">Billing Cycle</h3>
<div class="flex items-center space-x-2">
<button class="bg-indigo-700 text-indigo-200 px-3 py-1 rounded-lg text-xs">Weekly</button>
<button class="bg-slate-700 hover:bg-slate-600 px-3 py-1 rounded-lg text-xs">Monthly</button>
</div>
</div>
<div class="h-40 mb-4">
<canvas id="billingTimeline"></canvas>
</div>
<div class="space-y-3">
<div class="flex items-center justify-between">
<div class="flex items-center space-x-3">
<i class="fas fa-envelope text-amber-400"></i>
<span class="text-sm">Payment Reminders</span>
</div>
<label class="relative inline-flex items-center cursor-pointer">
<input type="checkbox" value="" class="sr-only peer" checked>
<div class="w-9 h-5 bg-gray-700 peer-focus:outline-none rounded-full peer peer-checked:after:translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-[2px] after:left-[2px] after:bg-white after:border-gray-300 after:border after:rounded-full after:h-4 after:w-4 after:transition-all peer-checked:bg-indigo-600"></div>
</label>
</div>
<div class="flex items-center justify-between">
<div class="flex items-center space-x-3">
<i class="fas fa-file-invoice-dollar text-accent"></i>
<span class="text-sm">Auto-Invoicing</span>
</div>
<label class="relative inline-flex items-center cursor-pointer">
<input type="checkbox" value="" class="sr-only peer" checked>
<div class="w-9 h-5 bg-gray-700 peer-focus:outline-none rounded-full peer peer-checked:after:translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-[2px] after:left-[2px] after:bg-white after:border-gray-300 after:border after:rounded-full after:h-4 after:w-4 after:transition-all peer-checked:bg-indigo-600"></div>
</label>
</div>
<div class="flex items-center justify-between">
<div class="flex items-center space-x-3">
<i class="fas fa-credit-card text-green-400"></i>
<span class="text-sm">Auto-Pay</span>
</div>
<label class="relative inline-flex items-center cursor-pointer">
<input type="checkbox" value="" class="sr-only peer">
<div class="w-9 h-5 bg-gray-700 peer-focus:outline-none rounded-full peer peer-checked:after:translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-[2px] after:left-[2px] after:bg-white after:border-gray-300 after:border after:rounded-full after:h-4 after:w-4 after:transition-all peer-checked:bg-indigo-600"></div>
</label>
</div>
</div>
</div>
<div class="glass-card p-6 rounded-xl">
<div class="flex justify-between items-center mb-4">
<h3 class="font-medium">Generate Invoice</h3>
<button class="text-xs text-slate-400 hover:text-indigo-300">
View All
</button>
</div>
<div class="flex flex-col space-y-4">
<div class="flex justify-between items-center py-2 px-3 rounded-lg bg-slate-800">
<div>
<h4 class="text-sm font-medium">Sarah Williams</h4>
<p class="text-xs text-slate-400">Jul 1 - Jul 31</p>
</div>
<button id="generateInvoiceBtn" class="bg-indigo-600 hover:bg-indigo-500 text-xs px-3 py-1 rounded-lg flex items-center">
<i class="fas fa-file-export mr-1"></i> Generate
</button>
</div>
<div class="flex justify-between items-center py-2 px-3 rounded-lg bg-slate-800">
<div>
<h4 class="text-sm font-medium">Tech Solutions LLC</h4>
<p class="text-xs text-slate-400">Jul 1 - Jul 31</p>
</div>
<button class="bg-indigo-600 hover:bg-indigo-500 text-xs px-3 py-1 rounded-lg flex items-center">
<i class="fas fa-file-export mr-1"></i> Generate
</button>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- Invoice Modal (Hidden by default) -->
<div id="invoiceModal" class="fixed inset-0 bg-black bg-opacity-70 flex items-center justify-center p-4 z-50 hidden">
<div class="bg-slate-900 rounded-xl max-w-2xl w-full p-6 slide-in-right glass-card">
<div class="flex justify-between items-center mb-6">
<h2 class="text-xl font-tech text-indigo-300">Invoice</h2>
<button id="closeInvoiceBtn" class="text-slate-400 hover:text-white">
<i class="fas fa-times"></i>
</button>
</div>
<div class="mb-6">
<div class="flex justify-between mb-8">
<div>
<h3 class="font-medium text-lg">NeoConnect</h3>
<p class="text-slate-400 text-sm">1234 Tech Ave, Suite 400</p>
<p class="text-slate-400 text-sm">San Francisco, CA 94107</p>
</div>
<div class="text-right">
<h3 class="font-medium text-lg">Invoice #NC-2023-042</h3>
<p class="text-slate-400 text-sm">Date: July 15, 2023</p>
<p class="text-slate-400 text-sm">Due: July 30, 2023</p>
</div>
</div>
<div class="mb-8">
<h4 class="text-sm font-medium text-slate-400 mb-2">BILL TO:</h4>
<p class="font-medium">Sarah Williams</p>
<p class="text-slate-400 text-sm">MAC: AB:CD:EF:12:34:56</p>
<p class="text-slate-400 text-sm">sarah@example.com</p>
</div>
<div class="glass-card p-4 rounded-lg mb-6">
<table class="w-full">
<thead>
<tr class="text-left text-sm border-b border-slate-700">
<th class="pb-2">Description</th>
<th class="text-right pb-2">Amount</th>
</tr>
</thead>
<tbody>
<tr class="text-sm">
<td class="py-3">Basic WiFi Plan (Jul 1-31)</td>
<td class="text-right py-3">$29.99</td>
</tr>
<tr class="text-sm">
<td class="py-3">Overage (15GB)</td>
<td class="text-right py-3">$5.00</td>
</tr>
<tr class="text-sm">
<td class="py-3">Tax (8.5%)</td>
<td class="text-right py-3">$2.98</td>
</tr>
<tr class="text-sm font-medium border-t border-slate-700">
<td class="pt-3">Total Due</td>
<td class="text-right pt-3">$37.97</td>
</tr>
</tbody>
</table>
</div>
<div class="flex justify-between items-center text-sm">
<div>
<p class="text-slate-400">Payment accepted via:</p>
<div class="flex space-x-2 mt-2">
<i class="fab fa-cc-visa text-2xl text-blue-500"></i>
<i class="fab fa-cc-mastercard text-2xl text-amber-600"></i>
<i class="fab fa-cc-paypal text-2xl text-blue-400"></i>
</div>
</div>
<div class="text-right">
<button class="bg-indigo-600 hover:bg-indigo-500 px-4 py-2 rounded-lg mr-2">
<i class="fas fa-paper-plane mr-1"></i> Email
</button>
<button class="bg-slate-700 hover:bg-slate-600 px-4 py-2 rounded-lg">
<i class="fas fa-print mr-1"></i> Print
</button>
</div>
</div>
</div>
</div>
</div>
<!-- Add Client Modal (Hidden by default) -->
<div id="addClientModal" class="fixed inset-0 bg-black bg-opacity-70 flex items-center justify-center p-4 z-50 hidden">
<div class="bg-slate-900 rounded-xl max-w-md w-full p-6 slide-in-right glass-card">
<div class="flex justify-between items-center mb-6">
<h2 class="text-xl font-tech text-indigo-300">Add New Client</h2>
<button id="closeAddClientBtn" class="text-slate-400 hover:text-white">
<i class="fas fa-times"></i>
</button>
</div>
<div class="space-y-4">
<div>
<label class="block text-sm text-slate-400 mb-1">Full Name</label>
<input type="text" class="w-full bg-slate-800 border border-slate-700 rounded-lg px-4 py-2 focus:ring-2 focus:ring-indigo-500 focus:outline-none">
</div>
<div>
<label class="block text-sm text-slate-400 mb-1">Email</label>
<input type="email" class="w-full bg-slate-800 border border-slate-700 rounded-lg px-4 py-2 focus:ring-2 focus:ring-indigo-500 focus:outline-none">
</div>
<div>
<label class="block text-sm text-slate-400 mb-1">MAC Address</label>
<input type="text" class="w-full bg-slate-800 border border-slate-700 rounded-lg px-4 py-2 focus:ring-2 focus:ring-indigo-500 focus:outline-none" placeholder="XX:XX:XX:XX:XX:XX">
</div>
<div>
<label class="block text-sm text-slate-400 mb-1">Plan</label>
<select class="w-full bg-slate-800 border border-slate-700 rounded-lg px-4 py-2 focus:ring-2 focus:ring-indigo-500 focus:outline-none">
<option>Basic ($29.99/mo)</option>
<option>Pro ($49.99/mo)</option>
<option>Premium ($79.99/mo)</option>
<option>Business ($129.99/mo)</option>
</select>
</div>
<div class="pt-4">
<button class="w-full bg-indigo-600 hover:bg-indigo-500 px-4 py-2 rounded-lg">
<i class="fas fa-save mr-1"></i> Save Client
</button>
</div>
</div>
</div>
</div>
<!-- Toast Notification (Hidden by default) -->
<div id="toastNotification" class="fixed bottom-4 right-4 bg-green-600 text-white px-6 py-3 rounded-lg shadow-lg flex items-center space-x-3 z-50 hidden">
<i class="fas fa-check-circle"></i>
<span>Invoice generated successfully!</span>
<button id="closeToastBtn" class="text-white">
<i class="fas fa-times"></i>
</button>
</div>
<script>
// Initialize sparkline charts for client usage
function initializeSparklines() {
// Client 1 Usage
new Chart(
document.getElementById('client1Usage'),
{
type: 'line',
data: {
labels: Array(7).fill(''),
datasets: [{
data: [10, 25, 35, 20, 30, 40, 45],
borderColor: '#7dd3fc',
borderWidth: 2,
tension: 0.4,
fill: false,
pointRadius: 0
}]
},
options: {
plugins: {
legend: { display: false },
tooltip: { enabled: false }
},
scales: {
x: { display: false },
y: { display: false }
}
}
}
);
// Client 2 Usage
new Chart(
document.getElementById('client2Usage'),
{
type: 'line',
data: {
labels: Array(7).fill(''),
datasets: [{
data: [70, 75, 80, 85, 90, 85, 82],
borderColor: '#f59e0b',
borderWidth: 2,
tension: 0.4,
fill: false,
pointRadius: 0
}]
},
options: {
plugins: {
legend: { display: false },
tooltip: { enabled: false }
},
scales: {
x: { display: false },
y: { display: false }
}
}
}
);
// Client 3 Usage
new Chart(
document.getElementById('client3Usage'),
{
type: 'line',
data: {
labels: Array(7).fill(''),
datasets: [{
data: [20, 15, 10, 30, 25, 35, 20],
borderColor: '#0ea5e9',
borderWidth: 2,
tension: 0.4,
fill: false,
pointRadius: 0
}]
},
options: {
plugins: {
legend: { display: false },
tooltip: { enabled: false }
},
scales: {
x: { display: false },
y: { display: false }
}
}
}
);
// Client 4 Usage
new Chart(
document.getElementById('client4Usage'),
{
type: 'line',
data: {
labels: Array(7).fill(''),
datasets: [{
data: [60, 65, 70, 65, 60, 65, 68],
borderColor: '#10b981',
borderWidth: 2,
tension: 0.4,
fill: false,
pointRadius: 0
}]
},
options: {
plugins: {
legend: { display: false },
tooltip: { enabled: false }
},
scales: {
x: { display: false },
y: { display: false }
}
}
}
);
}
// Initialize billing timeline chart
function initializeBillingTimeline() {
new Chart(
document.getElementById('billingTimeline'),
{
type: 'bar',
data: {
labels: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul'],
datasets: [{
data: [1200, 1450, 1600, 1500, 1750, 1850, 1890],
backgroundColor: '#6366f1',
borderRadius: 8,
borderWidth: 0
}]
},
options: {
plugins: {
legend: { display: false },
tooltip: {
callbacks: {
label: function(context) {
return '$' + context.raw;
}
}
}
},
scales: {
y: {
beginAtZero: true,
grid: {
color: 'rgba(71,85,105,0.3)',
drawBorder: false
},
ticks: {
callback: function(value) {
return '$' + value;
}
}
},
x: {
grid: {
display: false,
drawBorder: false
}
}
}
}
}
);
}
// Modal and Toast functions
function showInvoiceModal() {
document.getElementById('invoiceModal').classList.remove('hidden');
document.getElementById('invoiceModal').classList.add('flex');
document.body.classList.add('overflow-hidden');
}
function hideInvoiceModal() {
document.getElementById('invoiceModal').classList.add('hidden');
document.getElementById('invoiceModal').classList.remove('flex');
document.body.classList.remove('overflow-hidden');
}
function showAddClientModal() {
document.getElementById('addClientModal').classList.remove('hidden');
document.getElementById('addClientModal').classList.add('flex');
document.body.classList.add('overflow-hidden');
}
function hideAddClientModal() {
document.getElementById('addClientModal').classList.add('hidden');
document.getElementById('addClientModal').classList.remove('flex');
document.body.classList.remove('overflow-hidden');
}
function showToast() {
const toast = document.getElementById('toastNotification');
toast.classList.remove('hidden');
setTimeout(() => {
toast.classList.add('hidden');
}, 5000);
}
function hideToast() {
document.getElementById('toastNotification').classList.add('hidden');
}
// Event Listeners
document.addEventListener('DOMContentLoaded', function() {
initializeSparklines();
initializeBillingTimeline();
// Invoice modal
document.getElementById('generateInvoiceBtn').addEventListener('click', showInvoiceModal);
document.getElementById('closeInvoiceBtn').addEventListener('click', hideInvoiceModal);
// Add Client modal
document.getElementById('addClientBtn').addEventListener('click', showAddClientModal);
document.getElementById('closeAddClientBtn').addEventListener('click', hideAddClientModal);
// Toast notification (for demo purposes)
document.getElementById('generateInvoiceBtn').addEventListener('click', function() {
setTimeout(showToast, 1500);
});
document.getElementById('closeToastBtn').addEventListener('click', hideToast);
// Close modals when clicking outside
window.addEventListener('click', function(event) {
if (event.target === document.getElementById('invoiceModal')) {
hideInvoiceModal();
}
if (event.target === document.getElementById('addClientModal')) {
hideAddClientModal();
}
});
});
</script>
<p style="border-radius: 8px; text-align: center; font-size: 12px; color: #fff; margin-top: 16px;position: fixed; left: 8px; bottom: 8px; z-index: 10; background: rgba(0, 0, 0, 0.8); padding: 4px 8px;">Made with <img src="https://enzostvs-deepsite.hf.space/logo.svg" alt="DeepSite Logo" style="width: 16px; height: 16px; vertical-align: middle;display:inline-block;margin-right:3px;filter:brightness(0) invert(1);"><a href="https://enzostvs-deepsite.hf.space" style="color: #fff;text-decoration: underline;" target="_blank" >DeepSite</a> - 🧬 <a href="https://enzostvs-deepsite.hf.space?remix=jikoniji/jay" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
</html>