{{--
Broker profile — docs/wireframes-v12/view-broker.html, content region for
content region, minus everything CR-12 §0.4 removes.
v12's order, top to bottom: a summary card (avatar tile, name, company,
status badge, Edit button, then a `.grid-4` of four facts), a `.grid-2` of
two detail cards, a Referral Performance card with its own pager, and an
Activity Log timeline.
## Deliberate differences from the wireframe
* **The Commission Structure card is gone** and a **Documents** card takes
its slot in the `.grid-2` (decision D9). The client does not handle
broker finance ("commissions and other things not required"), and the
three upload slots had no home on this screen otherwise — the download
links the form deliberately does not carry live here.
* **The Internal Rating row is gone** from Broker Details (§0.4). Nothing
stores a rating and a five-star row nobody can set is furniture.
* **The referral table loses three columns and gains one.** v12 draws
Value (INR), Commission (INR) and Commission Status; the first two have
no source and the third has no meaning without them, so the table is
Booking ID / Customer / Project - Unit / Date / **Status** — the
booking's own status, which keeps the table's shape and says something
true.
* **The referral table lists real bookings, paginated 10 to a page** with
its own `referrals_page` parameter and a fragment that lands a page
click back on this card. v12's pager is static mock-up.
* **The Activity Log is real spatie rows**, newest first, capped at the
latest twenty. v12's seven entries are mock-ups and half of them are
about commission payments.
Every blank is an em-dash, which is this application's blank.
--}}
@extends('layouts.app')
@section('title', __('brokers.show_title', ['name' => $broker->company_name ?? $broker->name]))
@section('breadcrumbs')
{{ $broker->company_name ?? '—' }}
{{ __('brokers.show.no_referrals') }}
| {{ __('brokers.show.referral_columns.code') }} | {{ __('brokers.show.referral_columns.customer') }} | {{ __('brokers.show.referral_columns.unit') }} | {{ __('brokers.show.referral_columns.date') }} | {{ __('brokers.show.referral_columns.status') }} |
|---|---|---|---|---|
| {{ $booking->code }} | {{ $booking->mainCustomer?->name ?? '—' }} | {{ $projectUnit === '' ? '—' : $projectUnit }} | {{ $booking->booking_date->format($dateFormat) }} | @include('bookings.partials.status-badge', ['status' => $booking->status]) |
{{ __('brokers.show.no_activity') }}
@else {{-- The sentence is composed here rather than in the controller because it is *wording*, and the controller hands over four facts per row: the formatted time, the log's event name, the description spatie wrote, and the causer's name when there was one. The five events are the three HasAudit writes from the model event that fired plus the two BrokerFileService writes by hand (its docblock says why it has to). Any value outside the five degrades to the raw word rather than to a blank line — and to the raw *description* when even that is empty, because a timeline entry with no sentence is a dot with nothing beside it. Both are escaped like everything else here. --}}