import React, { useState } from 'react'; import { LayoutDashboard, Users, Wallet, Router, MessageSquare, Settings, Bell, Search, Menu, MoreVertical, Plus, ArrowUpRight, ArrowDownLeft, Smartphone, MapPin, FileText, ShieldAlert, LogOut } from 'lucide-react'; // --- MOCK DATA --- const SUMMARY_STATS = { activeUsers: 1240, isolirUsers: 45, monthlyRevenue: 45200000, unpaidInvoice: 3400000, todayTickets: 5 }; const INVOICES = [ { id: 'INV/10/001', user: 'Budi Santoso', date: '2024-10-01', amount: 150000, status: 'PAID', method: 'Transfer BCA' }, { id: 'INV/10/002', user: 'Warnet Abadi', date: '2024-10-02', amount: 750000, status: 'UNPAID', method: '-' }, { id: 'INV/10/003', user: 'Rumah Makan Padang', date: '2024-10-02', amount: 300000, status: 'PAID', method: 'Cash Reseller' }, { id: 'INV/10/004', user: 'Kos Putri', date: '2024-10-05', amount: 200000, status: 'UNPAID', method: '-' }, ]; const CUSTOMERS = [ { id: 1, name: 'Budi Santoso', username: 'budi@net', profile: 'Home 10Mbps', price: 150000, status: 'Active', address: 'Jl. Merpati No 1', phone: '08123456789' }, { id: 2, name: 'Siti Aminah', username: 'siti@net', profile: 'Home 20Mbps', price: 250000, status: 'Isolir', address: 'Jl. Elang No 4', phone: '08129876543' }, { id: 3, name: 'Warnet Abadi', username: 'warnet01', profile: 'Dedicated 50M', price: 750000, status: 'Active', address: 'Ruko Blok A', phone: '08133344455' }, ]; export default function App() { const [activeMenu, setActiveMenu] = useState('dashboard'); const [sidebarOpen, setSidebarOpen] = useState(true); // Format Rupiah const formatRupiah = (number) => { return new Intl.NumberFormat('id-ID', { style: 'currency', currency: 'IDR' }).format(number); }; // --- COMPONENT: SIDEBAR ITEM --- const SidebarItem = ({ id, icon: Icon, label, notif }) => ( ); // --- VIEW: DASHBOARD --- const DashboardView = () => (
{/* Top Stats */}

Total Omset Bulan Ini

{formatRupiah(SUMMARY_STATS.monthlyRevenue)}

+12% dari bulan lalu

Tagihan Belum Lunas

{formatRupiah(SUMMARY_STATS.unpaidInvoice)}

45 Invoice menunggu pembayaran

Pelanggan Aktif

{SUMMARY_STATS.activeUsers}

Total 1285 Terdaftar

Tiket Kendala

{SUMMARY_STATS.todayTickets}

Perlu penanganan segera

{/* Main Chart Area (Mockup) */}

Traffic Realtime (L2TP Tunnel)

{[30, 45, 32, 50, 70, 40, 50, 65, 80, 55, 45, 60, 70, 85, 90, 60, 50, 40, 30, 60].map((h, i) => (
))}
00:00 12:00 23:59
{/* Quick Actions / WA Status */}

WhatsApp Gateway

Terhubung

Device: Samsung A50 (0812-XXXX-XXXX)

Upgrade Pro?

Dapatkan fitur Mobile App untuk pelanggan Anda cek tagihan sendiri.

); // --- VIEW: PELANGGAN --- const CustomerView = () => (

Data Pelanggan

Kelola data PPPoE & Hotspot

{/* Filters */}
{CUSTOMERS.map((cust) => ( ))}
Nama Pelanggan Paket Langganan Tagihan Status Aksi
{cust.name}
{cust.username} | {cust.phone}
{cust.profile}
PPPoE
{formatRupiah(cust.price)} {cust.status}
{/* Pagination */}
Menampilkan 1-10 dari 1285 data
); // --- VIEW: INVOICE --- const InvoiceView = () => (

Tagihan & Keuangan

Monitor pembayaran pelanggan

{INVOICES.map((inv) => ( ))}
No. Invoice Tanggal Pelanggan Nominal Status Metode Bayar Cetak
{inv.id} {inv.date} {inv.user} {formatRupiah(inv.amount)} {inv.status} {inv.method}
); return (
{/* Sidebar Navigation */} {/* Main Content Area */}
{/* Top Header */}
VPN Connected Server: 10.10.10.1
AD
{/* Dynamic Content */}
{activeMenu === 'dashboard' && } {activeMenu === 'customers' && } {activeMenu === 'finance' && } {/* Placeholder for other menus */} {['routers', 'tickets', 'settings', 'map', 'whatsapp'].includes(activeMenu) && (

Modul {activeMenu.charAt(0).toUpperCase() + activeMenu.slice(1)}

Halaman ini akan memuat fitur lanjutan yang terhubung ke Backend Node.js dan Database MySQL.

)}
); }