@extends('layouts.app')
@section('title', 'Master Data')
@section('content')
@php $user = auth()->user(); @endphp
@if(session('success'))
{{-- ===== AREA OFFICE ===== --}}
| # |
Nama Area Office |
Jumlah Area Promotion |
Jumlah SP |
Status |
Aksi |
@forelse($areaOffices as $i => $item)
| {{ $i + 1 }} |
{{ $item->name }} |
{{ $item->promotions->count() }} Promotion
|
{{ $sps->where('area_office_id', $item->id)->count() }} SP
|
{{ $item->is_active ? 'Aktif' : 'Nonaktif' }}
|
|
@empty
| Belum ada data |
@endforelse
{{-- ===== AREA PROMOTION ===== --}}
{{-- ===== SP ===== --}}
| # | Area Office | Nama SP | Status | Aksi |
@forelse($sps as $i => $sp)
| {{ $i + 1 }} |
{{ $sp->areaOffice->name ?? '-' }} |
{{ $sp->name }} |
{{ $sp->is_active ? 'Aktif' : 'Nonaktif' }}
|
|
@empty
| Belum ada data |
@endforelse
{{-- ===== 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 --}}