в профиль вывел информацию о всех ролях

This commit is contained in:
developer 2026-04-28 10:08:18 +08:00
parent 88ff6c860f
commit e5ef7cfebb

View File

@ -82,12 +82,33 @@ class="form-control rounded-4 bg-white @error('details.address') is-invalid @end
<div class="me-2">Мои права: </div> <div class="me-2">Мои права: </div>
<div class="hstack gap-2"> <div class="hstack gap-2">
@foreach (auth()->user()->roles as $role) @foreach (auth()->user()->roles as $role)
<div class="badge bg-secondary"> @if($role->id != Modules\User\Models\Role::AGENT && $role->id != Modules\User\Models\Role::COMPANY_ADMIN)
{{ __($role->name) }} <div class="badge bg-secondary">
</div> {{ __($role->name) }}
</div>
@endif
@endforeach @endforeach
@if($adminCompany = AdminCompanyOfUser())
@if($adminCompany->type !== Modules\Main\Models\Company\CompanyType::SelfEmployer->value)
<div class="badge bg-secondary">
Администратор в {{ $adminCompany->name }}
</div>
@endif
@endif
@if($agentCompany = AgentCompanyOfUser())
@if($agentCompany->type == Modules\Main\Models\Company\CompanyType::SelfEmployer->value)
<div class="badge bg-secondary">
Самозанятый
</div>
@else
<div class="badge bg-secondary">
Агент в {{ $agentCompany->name }}
</div>
@endif
@endif
</div> </div>
</div> </div>
<button class="btn rounded-4 text-light fw-bold fs-5 w-100 py-3" style="background-color: #20184d;"> <button class="btn rounded-4 text-light fw-bold fs-5 w-100 py-3" style="background-color: #20184d;">
Сохранить изменения Сохранить изменения
</button> </button>