@extends('layouts.app') @section('title', $client->name) @section('page-title','Detail Klien') @section('breadcrumb') /Master Klien /{{ $client->code }} @endsection @section('content')
{{ $client->code }} {{ $client->status === 'active' ? 'Aktif' : 'Tidak Aktif' }}

{{ $client->name }}

{{ collect([$client->company_type, $client->city, $client->industry])->filter()->join(' · ') }}

@can('update_clients')Edit@endcan @can('delete_clients')@endcan
{{-- Stats --}}
@php $items = [ ['Total Tender', $stats['total_tenders'], 'text-gray-800'], ['Menang', $stats['won'], 'text-success-600'], ['Kalah', $stats['lost'], 'text-error-600'], ['Aktif', $stats['active'], 'text-blue-light-600'], ['Win Rate', $stats['win_rate'].'%', 'text-brand-600'], ['Total Nilai', $stats['total_value'] ? 'Rp '.number_format($stats['total_value']/1000000,0,',','.').'M' : '—', 'text-gray-600'], ]; @endphp @foreach($items as [$label, $value, $color])

{{ $value }}

{{ $label }}

@endforeach

Informasi Kontak

@foreach([ ['Telepon', $client->phone], ['Email', $client->email], ['Website', $client->website], ['Kota', $client->city], ] as [$lbl, $val]) @if($val)

{{ $lbl }}

@if($lbl === 'Website'){{ $val }} @else {{ $val }} @endif

@endif @endforeach @if($client->address)

Alamat

{{ $client->address }}

@endif @if($client->notes)

Catatan

{{ $client->notes }}

@endif

Riwayat Tender

Lihat Semua
@if($client->tenders->isEmpty())
Belum ada tender
@else
@foreach($client->tenders as $t) @endforeach
Kode Nama Tender Status Deadline
{{ $t->code }} {{ Str::limit($t->title,40) }} {{ $t->submission_deadline?->format('d M Y') ?? '—' }}
@endif

PIC Klien

@if($client->pic_name)
{{ strtoupper(substr($client->pic_name, 0, 2)) }}

{{ $client->pic_name }}

{{ $client->pic_position }}

@if($client->pic_phone)
{{ $client->pic_phone }}
@endif @if($client->pic_email)
{{ $client->pic_email }}
@endif
@else

Belum ada data PIC.

@endif
@endsection