@extends('layouts.app') @section('urlContent') {!! view('components.breadcrumbs', [ 'b_items' => [ 'Personellerim' => '/operation/mypersonels', ], ]) !!} @endsection @section('content')
@php $category = request()->category; if ($category == 'active' || $category == null) { $currentCategory = 'Aktif Personeller'; } elseif ($category == 'passive') { $currentCategory = 'Pasif Personeller'; } elseif ($category == 'waiting_exit') { $currentCategory = 'Çıkış Bekleyen Personeller'; } elseif ($category == 'exited') { $currentCategory = 'Çıkış Yapmış Personeller'; } @endphp
    @foreach ($data as $item)
  1. @php if ($item->user->is_active == 1) { $color = 'bg-green-500'; } else { $color = 'bg-red-500'; } @endphp

    {{ $item->user?->fullName }}

    @php $birthdate = new DateTime($item->user->personelUser->birth_date); $today = new DateTime('today'); $age = $birthdate->diff($today)->y; @endphp {{ '( ' . $age . ' )' }}
    @if ( $item->user && $item->user->personelUser && in_array('Engelli', json_decode($item->user->personelUser->working_status) ?? []) && $item->user->personelUser->disability_rate)

    % {{ $item->user->personelUser->disability_rate }} Engelli

    @endif

    {{ $item->user->roles[0]->title }}

    {{ $item->phone }}

    {{ $item->district }}

    @php $avgRate = $item->personelReview->avg('rate'); @endphp @if (!$avgRate == null) {{ $avgRate }} @else Yorum Yok @endif

    @php $companies = $item->user->favoritedOffices; @endphp
    @if (count($companies) > 0)
    {{ count($companies) }} Firmaya Atanmış
    @else Atama Yok @endif
    @if ($item->working_type != 'wage')

    @php $termText = 'Belirtilmedi'; $term = $item->payment_term; if ($term == 'daily') { $termText = 'Günlük'; } elseif ($term == 'weekly') { $termText = 'Haftalık'; } elseif ($term == 'twoWeekly') { $termText = '15 Günlük'; } elseif ($term == 'monthly') { $termText = 'Aylık'; } @endphp @if ($termText == 'Belirtilmedi') {{ $termText }} @else {{ $termText }} Ödeme @endif

    @endif @if ($item->working_type)

    @if ($item->working_type == 'wage') Maaşlı @elseif ($item->working_type == 'daily') Part Time @elseif ($item->working_type == 'hourly') Saatlikçi @endif

    @endif @if ($item->user->hrPersonelUser->sgk_entry) @php $path = Str::substr($item->user->hrPersonelUser->sgk_entry, -3); @endphp
    @endif
  2. @endforeach @if (count($data) <= 0) Hiç Veri Bulunamadı @endif
{{ $data->links('pagination::tailwind') }}
@include('components.showImage') @include('components.operation.addPersonelsToBlacklist') @include('components.operation.addPersonelToOfficesPopup') @include('components.favoriteUsers') @include('components.operation.newAdditionalFewRequest') @include('components.operation.exitRequestPopup') @include('components.pdfViewer') @if (session('error')) @include('components.error-modal') @endif @if ($errors->any()) @include('components.error-modal-second') @endif @if (session('success')) @include('components.success-modal') @endif @endsection @section('javascript') @endsection