@extends('layouts.app') @section('urlContent') {!! view('components.breadcrumbs', [ 'b_items' => [ 'Firmalar' => '/root/offices', ], ]) !!} @endsection @section('content') @if (session('error')) @include('components.error-modal') @endif @if (session('success')) @include('components.success-modal') @endif
    @foreach ($offices as $item)
  1. {{ $item->office_name }}

    {{ $item->city }}

    {{ $item->district }}

    {{ $item->authorized_person }}

    {{ $item->authorized_person_title }}

    @php $waiting_approval_branches = []; foreach ($item->branchs as $branch) { if ($branch->approval_status == '2') { $waiting_approval_branches[] = $branch; } } $contractStartDate = \Carbon\Carbon::parse($item->contractDateStart); $contractEndDate = \Carbon\Carbon::parse($item->contractDateEnd); $difference = $contractStartDate->diff($contractEndDate); $year = $difference->y; $month = $difference->m; $day = $difference->d; @endphp

    @if ($contractEndDate->isFuture()) Sözleşme bitişine @if ($year > 0) {{ $year }} yıl @endif @if ($month > 0) {{ $month }} ay @endif @if ($day > 0) {{ $day }} @endif gün kalmıştır. @else Sözleşme tarihi bitmiş. @endif

    @if (count($waiting_approval_branches) > 0)
    {{--
    --}}

    {{ 'Onay Bekleyen Şube Sayısı : ' . count($waiting_approval_branches) }}

    @endif
    @php if ($item->status == '1') { $status = 'Aktif'; $color = 'bg-green-500'; } else { $status = 'Pasif'; $color = 'bg-red-500'; } @endphp
    {{ $status }}
    @if ($item->user)
    @csrf
    @endif @if ($item->iframe) @include('components.iframe')
    @csrf
    @endif Şubeler Düzenle
    @csrf @method('DELETE')
  2. @endforeach @if (count($offices) <= 0) Hiç Veri Bulunamadı @endif
{{ count($offices) }}
@include('components.showImage') @endsection @section('javascript') @endsection