--- task: Enhance HomeOperator.vue (Corporation dashboard) — fix dark-mode bg-white violations, add multi-store performance stats, and improve corporate presentation for demo screenshots cycles: 5 context: true private: false started: 2026-05-16T00:00:00Z finished: 2026-05-16T00:03:00Z --- ## files - `resources/js/Pages/Fragments/Home/HomeOperator.vue` — primary target; has `bg-white` hardcoded in 4 places, missing dark-mode support, missing multi-store corporate stats - `resources/js/Pages/Fragments/Home/HomeSuperOperator.vue` — secondary reference; check what stats/layout it uses - `routes/web.php` [lines 76-135] — `/home-data` endpoint; needs OPERATOR-scoped stats: store count under management, today's revenue across all managed stores, active POS sessions - `app/Http/Controllers/Support/VueRouteMap.php` — confirm OPERATOR has access to all pages used in the dashboard ## steps 1. **`routes/web.php` @ `/home-data` closure** — Add OPERATOR-specific stats after the existing `$myStoresCount` block: ```php $isOperator = $acctType === \App\Enums\UserTypes::OPERATOR; $operatorStoreIds = []; if ($isOperator && $user) { $operatorStoreIds = \App\Models\Market\Store::where('owner_id', $user->id) ->orWhereHas('managers', fn($q) => $q->where('user_id', $user->id)) ->pluck('id')->toArray(); } $activePosSessionsNo = $isOperator ? \App\Models\Market\PosSession::whereIn('store_id', $operatorStoreIds)->where('status','PENDING')->count() : \App\Models\Market\PosSession::where('status','PENDING')->count(); $managedStoresNo = $isOperator ? count($operatorStoreIds) : $storeCount; $todayRevenueOperator = $isOperator ? \App\Models\GlobalTransaction::whereDate('created_at', today()) ->whereIn('store_id', $operatorStoreIds) ->where('flow', \App\Enums\Market\TransactionFlow::INCOME->value) ->sum('amount') : $projectedIncomeToday; ``` Add to `$props['props']['stats']`: - `'active_pos_sessions_no' => $activePosSessionsNo` - `'managed_stores_no' => $managedStoresNo` - `'today_revenue_php' => number_format((float) $todayRevenueOperator, 2)` 2. **`HomeOperator.vue` — Fix all `bg-white` violations** (lines ~146, 172, 191, 192): - Replace `bg-white` class with `style="background: var(--bg-card);"` or remove the class entirely (global bootstrap override handles it) - Line ~146: `class="card border-0 shadow-sm rounded-4 bg-white p-3"` → remove `bg-white` - Line ~172: `class="card border-0 shadow-sm rounded-20 bg-white overflow-hidden p-0"` → remove `bg-white` - Line ~191: `class="activity-section card border-0 shadow-sm rounded-4 bg-white overflow-hidden"` → remove `bg-white` - Line ~192: `class="card-header bg-white border-0 ..."` → remove `bg-white` - Any `color: #333` or `color: #856404` hardcoded inline → replace with `color: var(--text-primary)` and `color: var(--text-warning)` respectively 3. **`HomeOperator.vue` — Update stats ref** to include the new corporate KPIs: ```js const stats = ref([ { title: "Stores", number: 0, unit: "Managed", align: "left", numberId: "managed_stores_no" }, { title: "Revenue", number: '0.00', unit: "PHP Today", align: "left", numberId: "today_revenue_php" }, { title: "POS Live", number: 0, unit: "Active", align: "right", numberId: "active_pos_sessions_no" }, ]); ``` (Replaces the current generic `total_transactions_no`, `total_transactions_php`, `projected_income_today`) 4. **`HomeOperator.vue` — Add corporate identity header section** before the BalanceBox in the template: ```html