@extends('org.layout.adminPanel') @section('title', 'Profile') @section('section', 'Profile') @section('css') {{-- css --}} @endsection @section('content') @php $rolename = [ App\Models\User::$SUPER_ADMIN => 'Admin', App\Models\User::$ORG_ADMIN => 'Organisation Admin', App\Models\User::$DIV_MANAGER => 'Division Manager', App\Models\User::$DEP_MANAGER => 'Department Manager', App\Models\User::$PROJECT_MANAGER => 'Project Manager', App\Models\User::$GOVE_TEAM => 'Governance Team', App\Models\User::$REVIEWER => 'Reviewer', App\Models\User::$GUEST => 'Guest', ]; if (!empty(Session::get('err'))) { $err = Session::get('err'); } @endphp {{-- content --}}
{{-- --}}
@csrf
@error('profile_img') @enderror
@if (!Helper::checkRole('GUEST')) @endif

{{ Auth::user()->full_name }}

{{ $rolename[Session::get('role')] }}

Email : {{ Auth::user()->email }}
Roles : @foreach ($userRole as $role) {{ $rolename[$role] }}
@endforeach
Password :

*******

@if (Auth::user()->password_changed_at != null)

Last changed {{ Carbon\Carbon::parse(Auth::user()->password_changed_at)->diffForHumans() }}

@elseif (Auth::user()->accounts->where('org_id', Session::get('org_id'))->value('password_changed_at') != null)

Last changed {{ Carbon\Carbon::parse(Auth::user()->accounts->where('org_id', Session::get('org_id'))->value('password_changed_at'))->diffForHumans() }}

@endif
@if (!Helper::checkRole('GUEST')) @endif
{{-- change password --}} @endsection @section('js') {{-- js --}} @if (isset($err['type']) && $err['type'] == 'password') @endif @if (isset($err['type']) && $err['type'] == 'edit') @endif @endsection