Modul {activeMenu.charAt(0).toUpperCase() + activeMenu.slice(1)}
Halaman ini akan memuat fitur lanjutan yang terhubung ke Backend Node.js dan Database MySQL.
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 = () => (
Total Omset Bulan Ini
+12% dari bulan lalu
Tagihan Belum Lunas
45 Invoice menunggu pembayaran
Pelanggan Aktif
Total 1285 Terdaftar
Tiket Kendala
Perlu penanganan segera
Device: Samsung A50 (0812-XXXX-XXXX)
Dapatkan fitur Mobile App untuk pelanggan Anda cek tagihan sendiri.
Kelola data PPPoE & Hotspot
| Nama Pelanggan | Paket Langganan | Tagihan | Status | Aksi |
|---|---|---|---|---|
|
{cust.name}
{cust.username} | {cust.phone}
|
{cust.profile}
PPPoE
|
{formatRupiah(cust.price)} | {cust.status} |
Monitor pembayaran pelanggan
| No. Invoice | Tanggal | Pelanggan | Nominal | Status | Metode Bayar | Cetak |
|---|---|---|---|---|---|---|
| {inv.id} | {inv.date} | {inv.user} | {formatRupiah(inv.amount)} | {inv.status} | {inv.method} |
Halaman ini akan memuat fitur lanjutan yang terhubung ke Backend Node.js dan Database MySQL.