@extends('layouts.app') @section('urlContent') {!! view('components.breadcrumbs', [ 'b_items' => [ 'Taleplerim' => '/company/requests', ], ]) !!} @endsection @section('content')
{{--
--}}

{{ \Carbon\Carbon::now()->isoFormat('D MMMM Y') }} Tarihindeki Talepler

{{-- --}}
    @foreach ($requests as $item)
  1. {{ $item->user->user_departman->name }} #{{ $item->ticket_id }}

    @if (count($item->demands) > 0)
    @php $allDemandsQuantity = 0; foreach ($item->demands as $demand) { $quantity = $demand->quantity; $allDemandsQuantity += $quantity; } @endphp {{ $allDemandsQuantity }} Adet Çalışan
    @else Henüz Atama Yapılmamış @endif

    {{ $item['date'] }}

    @if ($item->department) {{-- TALEBI SUBENIN DEPARTMANI OLUSTURDUYSA SUBENIN ADINI GETIR --}} @if ($item->department->customer_user->branch)

    {{ $item->department?->customer_user->branch->branch_name }}

    @endif {{-- DEPARTMAN ADI --}}

    {{ $item->department->name }}

    {{-- DEPARTMAN YETKILISI ADI --}}

    {{ $item->user->full_name }}

    @endif
    @php $demand_status = ''; foreach ($item->demands as $demand) { if ($demand->demand_status == 3) { $demand_status = 3; } elseif ($demand->demand_status == 2) { $demand_status = 2; } elseif ($demand->demand_status == 1) { $demand_status = 1; } elseif ($demand->demand_status == 1 && $item->status == 1) { $demand_status = 4; // talep tamamlanmış } else { $demand_status = 0; } } @endphp @php if ($demand_status == 3) { $status = 'Onay bekliyor'; $color = 'bg-yellow-500'; } elseif ($demand_status == 2) { $status = 'Talep reddedildi'; $color = 'bg-red-500'; } elseif ($demand_status == 1) { $status = 'Talep kabul edildi'; $color = 'bg-green-500'; } elseif ($demand_status == 4) { $status = 'Talep tamamlandı'; $color = 'bg-green-500'; } else { $status = 'Onay bekliyor'; $color = 'bg-yellow-500'; } @endphp @if ($demand_status != 0 && $demand_status != 3)
    {{ $status }}
    @endif @if (in_array('0', $item->demands->pluck('demand_status')->toArray()) || in_array('3', $item->demands->pluck('demand_status')->toArray())) @if ($demand_status == 0 || $demand_status == 3) @endif @if ($demand_status == 0 || $demand_status == 3)
    @csrf
    @endif @else @if ($demand_status != 0 && $demand_status == 3)
    @csrf
    @endif @endif
  2. @endforeach @if (count($requests) <= 0) Hiç Veri Bulunamadı @endif
{{--
@csrf --}} {{--
--}}
{{ $current_month->month_name }}
{{--
@csrf --}} {{--
--}}
P
S
Ç
P
C
C
P
@foreach ($allData as $data) @php $ticketDates = $allRequests ->pluck('date') ->map(function ($date) { return Carbon\Carbon::parse($date)->format('Y-m-d'); }) ->toArray(); @endphp @if ($data->day == $current_day && $data->month == $current_month->month && $current_month->month == now()->format('m')) {{-- bugun ise --}} @else @endif @endforeach
{{ count($requests) }}
@if (session('error')) @include('components.error-modal') @endif @if (session('success')) @include('components.success-modal') @endif @endsection @section('javascript') @endsection