@extends('layouts.app')
@section('content')
@if (env('APP_TYPE') == 'dev')
@foreach ($roles as $item)
-
@endforeach
@foreach ($users as $item)
-
@php
$imageUrl = null;
if ($item->profile_img) {
$imageUrl = $item->profile_img;
} elseif ($item->personelUser) {
$imageUrl = $item->personelUser->profile_img;
} elseif ($item->user_departman && $item->user_departman->customer_role == 'Company') {
$imageUrl = $item->user_departman->customer_user->headOffice->office_logo;
} elseif ($item->user_departman && $item->user_departman->customer_role == 'Branch') {
$imageUrl = $item->user_departman->customer_user->branch->headOffice->office_logo;
} elseif ($item->headOffice) {
$imageUrl = $item->headOffice->office_logo;
} elseif ($item->branch) {
$imageUrl = $item->branch->headOffice->office_logo;
} else {
$imageUrl = 'resim yok';
}
@endphp
{{ $item->full_name }}
{{ isset($item->roles[0]) ? $item->roles[0]->name : 'no Role' }}
@endforeach
{{ $users->links('pagination::tailwind') }}
@endif
@endsection
@section('javascript')
@endsection