Name
Location
Signup Date
Billing Cycle
Hours
Assign AM
Action
@foreach ($loadedRecords as $key => $client)

{{ $client['payment_location'] ?? '' }}

{{ \Carbon\Carbon::parse($client['created_at'])->format('m-d-Y H:i:s') ?? '' }}

@php $start = new DateTime($client['created_at']); $end = new DateTime(); $interval = DateInterval::createFromDateString('1 month'); $period = new DatePeriod($start, $interval, $end); $myArray = []; foreach ($period as $key => $date) { if(isset($myArray[$key-1])){ $myArray[$key-1]['text'] = $myArray[$key-1]['text'].' to '.$date->format('m-d-Y'); $myArray[$key-1]['value'] = $date->format('Y-m-d').' to '.$myArray[$key-1]['value']; } $myArray[$key]['text'] = $date->format('m-d-Y'); $myArray[$key]['value'] = $date->format('Y-m-d'); } if(count($myArray) > 0){ $lastCycleDate = end($myArray); $newDate = new DateTime($lastCycleDate['value']); $newDate->modify('+ 1 month'); $myArray[count($myArray) - 1]['text'] = $lastCycleDate['text'].' to '.$newDate->format('m-d-Y'); $myArray[count($myArray) - 1]['value'] = $newDate->format('Y-m-d').' to '.$lastCycleDate['value']; $billingCycle = array_reverse($myArray); }else{ $billingCycle = []; } @endphp
{{-- @foreach ($billingCycle as $cycle) @endforeach

@if(isset($cycles1[$client['id']]) && $cycles1[$client['id']] == 'all') {{ $client['project_drafts_sum_expected_time'] ?? '0' }} @else {{ $client['project_drafts_sum_expected_time'] ?? '0' }} @endif

{{--

@if(isset($cycles1[$client['id']]) && $cycles1[$client['id']] == 'all') {{ $client['project_drafts_sum_expected_time'] ?? '0' }} @else {{ $client['project_drafts_sum_expected_time'] ?? '0' }} @endif

--}}
@endforeach @if ($clients->hasMorePages())
@endif {{-- @include('inc.livewire-loader') --}}
@include('inc.livewire-loader', ['target' => "changeStatus, loadMore, changeView, assignAM, searchTerm"])