{{--
The User Management module's status pill —
docs/wireframes-v12/user-management.html:
Active
Used two ways, and the model is what both hand over — the profile page
includes it directly, the listing reaches it through editColumn():
@include('users.partials.status', ['model' => $user])
->editColumn('status', 'users.partials.status')
## Why this is not
That component is the shared one and its markup is exactly this, but it
reads both its tone and its label from App\View\Components\StatusBadge's own
closed list of canonical statuses — a vocabulary of project, unit and
inquiry lifecycles that a staff account's standing is not part of. A user
pill rendered through it would come out "unknown". brokers/partials/status
records the same decision for the same reason.
So the module draws its own, on the same class names: `badge-{tone}` is the
wireframe's colour (UserStatus::badgeClass(), read off the listing's own two
badges) and `status-{value}` is the identity hook — nothing styles it; it
exists so a pill can be addressed by *what it is* rather than by the colour
it came out as.
Reached through UsersDataTable's rawColumns(['status']), **so this output is
injected into the page unescaped**. Nothing user-supplied can reach it, and
the enum CAST is what makes that true rather than any check here: `status` is
cast to UserStatus, so Eloquent resolves the column through
`BackedEnum::from()` when the row is hydrated and a value outside the two
cases raises a ValueError in the model — long before this partial runs.
There is therefore no unknown-status branch to write, and one written here
would be dead code claiming a fallback the runtime never reaches.
The column is NOT NULL with a default, and every query that reaches this file
selects it, so `$model->status` is always a UserStatus.
yajra hands the row's model in as $model.
--}}
@php
/** @var \App\Models\User $model */
$userStatus = $model->status;
@endphp
{{ $userStatus->label() }}