D
Modul

Dashboard

Statistik penjualan, chart, quick start onboarding, dan requirement setup stepper.

Halaman utama setelah login. Menampilkan statistik penjualan, chart bulanan, dan quick start stepper untuk onboarding merchant baru.

File kunci

FileBarisPeran
app/Http/Controllers/DashboardController.php545Render dashboard + statistik + requirement setup
resources/js/Pages/Dashboard/IndexV2.vue2.454Halaman yang dirender
resources/js/Pages/Dashboard/QuickStart.vue761Stepper onboarding

Controller method utama

MethodFungsi
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

MethodPathFungsi
GET/dashboardHalaman utama
GET/api/dashboard/statisticStatistik API
POST/api/dashboard/product_statisticStatistik produk
GET/api/dashboard/reqired_settupRequirement setup (typo di route)

Frontend

FileBarisCatatan
IndexV2.vue2.454Yang dirender controller
Index.vue1.200Orphan — versi lama, pakai resources-creative/
QuickStart.vue761Stepper onboarding
revenuev2.vue530Dipakai IndexV2
sales-location.vue79Map amcharts

Integrasi

  • amcharts untuk sales-location map
  • Firebase Cloud Messaging untuk push notification
  • Frontend pakai axios polos (bukan axiosInstance.js) untuk panggil API

Temuan

  • Index.vue (lama) orphan — controller hanya render IndexV2
  • Route typo reqired_settup (api.php:383)
  • product_statistic() bug copy-paste — pipeline variabel sama untuk highest demand & highest sales