@extends('layouts.app') @section('title', 'Master Data') @section('content') @php $user = auth()->user(); @endphp @if(session('success'))
{{ session('success') }}
@endif @if(session('error'))
{{ session('error') }}
@endif {{-- TABS --}}
{{-- ===== AREA OFFICE ===== --}}
Area Office
@forelse($areaOffices as $i => $item) @empty @endforelse
# Nama Area Office Jumlah Area Promotion Jumlah SP Status Aksi
{{ $i + 1 }} {{ $item->name }} {{ $item->promotions->count() }} Promotion {{ $sps->where('area_office_id', $item->id)->count() }} SP {{ $item->is_active ? 'Aktif' : 'Nonaktif' }}
@csrf @method('DELETE')
Belum ada data
{{-- ===== AREA PROMOTION ===== --}}
Area Promotion
@forelse($areaPromotions as $i => $item) @empty @endforelse
#Area OfficeNama Area PromotionStatusAksi
{{ $i + 1 }} {{ $item->areaOffice->name ?? '-' }} {{ $item->name }} {{ $item->is_active ? 'Aktif' : 'Nonaktif' }}
@csrf @method('DELETE')
Belum ada data
{{-- ===== SP ===== --}}
SP (Sentra Promosi)
@forelse($sps as $i => $sp) @empty @endforelse
#Area OfficeNama SPStatusAksi
{{ $i + 1 }} {{ $sp->areaOffice->name ?? '-' }} {{ $sp->name }} {{ $sp->is_active ? 'Aktif' : 'Nonaktif' }}
@csrf @method('DELETE')
Belum ada data
{{-- ===== BRAND AKTIVASI ===== --}}
@include('master-data._simple-table', [ 'title' => 'Brand Aktivasi', 'icon' => 'tag', 'type' => 'brand-aktivasi', 'items' => $brandAktivasis, 'hasCode' => false, 'hasOrder' => false, ])
{{-- ===== FUNNEL ===== --}}
@include('master-data._simple-table', [ 'title' => 'Funnel', 'icon' => 'funnel', 'type' => 'funnel', 'items' => $funnels, 'hasCode' => false, 'hasOrder' => true, ])
{{-- ===== PROFESI ===== --}}
@include('master-data._simple-table', [ 'title' => 'Profesi', 'icon' => 'briefcase', 'type' => 'profesi', 'items' => $profesis, 'hasCode' => false, 'hasOrder' => false, ])
{{-- ===== BRAND KOMPETITOR ===== --}}
@include('master-data._simple-table', [ 'title' => 'Brand Kompetitor', 'icon' => 'trophy', 'type' => 'brand-kompetitor', 'items' => $brandKompetitors, 'hasCode' => false, 'hasOrder' => false, ])
{{-- ===== DIVISI — hanya super_admin ===== --}} @if($showDivisi)
@include('master-data._simple-table', [ 'title' => 'Divisi', 'icon' => 'diagram-3', 'type' => 'divisi', 'items' => $divisis, 'hasCode' => true, 'hasOrder' => false, ])
@endif
{{-- ===== MODALS ===== --}} {{-- Modal Add Area Office --}} {{-- Modal Edit Area Office --}} {{-- Modal Add Area Promotion --}} {{-- Modal Edit Area Promotion --}} {{-- Modal Add SP --}} {{-- Modal Edit SP --}} {{-- Modal Simple Add/Edit (brand, funnel, profesi, kompetitor, divisi) --}} @endsection @push('scripts') @endpush