@extends('layouts.app') @section('title', 'Dashboard Supervisor') @section('content') @if($isMarketing) {{-- ===== MARKETING SPV DASHBOARD ===== --}}
Total Consumer Contact Selesai
{{ $totalProducts }}
Lihat Riwayat
Contact Plan Saya
{{ $myTests }}
Kelola Contact Plan
Draft Contact Plan
{{ $draftTests }}
Buat Baru
{{-- PROGRESS TABLE + FUNNEL --}}
Progress Consumer Contact Plan
@forelse($progressData as $p) @php $pct = $p['pct']; $done = $pct >= 100; @endphp @empty @endforelse
Nama SPG/APSArea PromotionTargetAktualAchievement
{{ $p['name'] }} {{ $p['product'] }} {{ $p['target'] ?: '-' }} {{ $p['achieved'] }}
{{ $pct }}%
Belum ada data SPG
Consumer Funnel
{{-- DEMOGRAPHY --}}
Consumer Demography
Jenis Kelamin
Generasi
Profesi
Pengeluaran RT/Bulan
{{-- AWARENESS + BRAND --}}
Awareness Channel
Brand Aktivasi
@foreach($brandAktivasiData->sortDesc()->take(8) as $brand => $count)
{{ $brand ?: '-' }}
{{ $count }}
@endforeach
Brand Kompetitor
@foreach($kompetitorData->sortDesc()->take(6) as $brand => $count) @if($brand)
{{ $brand }} {{ $count }}
@endif @endforeach
{{-- CONSUMER INSIGHT ANALYSIS --}}
Conversion Barrier
Alasan Pakai Kompetitor
@push('scripts') @endpush @else @php $isMarketing = auth()->user()->unit_type === 'marketing'; @endphp
{{ $isMarketing ? 'Total Consumer Contact Selesai' : 'Total Produk' }}
{{ $totalProducts }}
@if(!$isMarketing) Kelola Produk @else Lihat Riwayat Contact @endif
{{ $isMarketing ? 'Contact Plan Saya' : 'Test Saya' }}
{{ $myTests }}
{{ $isMarketing ? 'Kelola Contact Plan' : 'Kelola Test' }}
{{ $isMarketing ? 'Draft Contact Plan' : 'Draft Test' }}
{{ $draftTests }}
Buat Baru
{{ $isMarketing ? 'Consumer Contact Plan Aktif' : 'Panel Test Aktif' }}
{{ $isMarketing ? 'Buat Consumer Contact Plan' : 'Buat Panel Test' }}
@forelse($activeTests as $test) @empty @endforelse
{{ $isMarketing ? 'Nama Brand Aktivasi' : 'Judul' }}{{ $isMarketing ? 'Nama APS/SPG/TL' : 'Produk' }}TanggalPesertaAksi
{{ $test->title }} {{ $test->product->name }} {{ $test->test_date->format('d M Y') }} {{ $test->testSessions->where('status','completed')->count() }} orang Detail
{{ $isMarketing ? 'Belum ada consumer contact plan aktif' : 'Belum ada panel test aktif' }}
@endif @endsection