Halaman utama setelah login. Menampilkan statistik penjualan, chart bulanan, dan quick start stepper untuk onboarding merchant baru.
File kunci
| File | Baris | Peran |
|---|---|---|
app/Http/Controllers/DashboardController.php | 545 | Render dashboard + statistik + requirement setup |
resources/js/Pages/Dashboard/IndexV2.vue | 2.454 | Halaman yang dirender |
resources/js/Pages/Dashboard/QuickStart.vue | 761 | Stepper onboarding |
Controller method utama
| Method | Fungsi |
|---|---|
index() | Render Dashboard/IndexV2 dengan user, trial info, store, statistik, chart, requirementSetup |
statistic() | API — hitung order/paid/unpaid/rasio per role (Owner, Admin, CS) |
product_statistic() | Agregasi MongoDB — highest demand / highest sales / most profitable |
diagram_orders() | 12-bulan order count, scope per role |
diagram_earnings() | 12-bulan earnings (paid only) |
requirementSetup() | Status stepper: store, gudang, pengiriman, bank |
Route
| Method | Path | Fungsi |
|---|---|---|
| GET | /dashboard | Halaman utama |
| GET | /api/dashboard/statistic | Statistik API |
| POST | /api/dashboard/product_statistic | Statistik produk |
| GET | /api/dashboard/reqired_settup | Requirement setup (typo di route) |
Frontend
| File | Baris | Catatan |
|---|---|---|
IndexV2.vue | 2.454 | Yang dirender controller |
Index.vue | 1.200 | Orphan — versi lama, pakai resources-creative/ |
QuickStart.vue | 761 | Stepper onboarding |
revenuev2.vue | 530 | Dipakai IndexV2 |
sales-location.vue | 79 | Map amcharts |
Integrasi
- amcharts untuk sales-location map
- Firebase Cloud Messaging untuk push notification
- Frontend pakai
axiospolos (bukanaxiosInstance.js) untuk panggil API
Temuan
Index.vue(lama) orphan — controller hanya renderIndexV2- Route typo
reqired_settup(api.php:383) product_statistic()bug copy-paste — pipeline variabel sama untuk highest demand & highest sales