@extends('snit.layouts.app') @section('content') @if (isset($allRelatedClients) and count($allRelatedClients) >= 1)
Filter Results for "{{ $requestedDept->name }} {{ $requestedDept->dept_level }}"
Showing My Clients for "{{ $requestedDept->name }} {{ $requestedDept->dept_level }}"

Total Purchases : {{ count($allRelatedClients) }}

@isset($searchfor) {{-- {{ dd(request()->all()) }} --}}
Search Results for "{{ $searchfor }}" Clear Search Results
@endisset
⇐ back to departments
{{-- --}}
@if (request('purchaseType') or request('bookSlug')) View all @endif
@foreach ($table_headers as $heading) @if (in_array($heading, $hideFromPrint)) @else @endif @endforeach @foreach ($allRelatedClients as $client) {{-- phone --}} {{-- purchase date --}} {{-- book purchased --}} {{-- purchase type --}} {{-- amount --}} {{-- received status for student signature --}} @endforeach
{!! $heading !!} {!! $heading !!}
{{ $client->client_model->org->slug }} {{-- --}} {{ $client->client_model->getFullName() }}
{{ $client->client_model->mat_num }} {{ $client->client_model->phone }} {{ $client->created_at_key }} {{ $client->itemPurchased->name }} {{ $client->itemPurchased->options->type }} {{ $client->itemPurchased->options->original_price }} {{ $client->itemPurchased->options->type == 'ebook' ? 'PDF ✅' : '' }}
@elseif(isset($allRelatedClients) and count($allRelatedClients) < 1 && request('purchaseType'))

You have no {{ request('purchaseType') }} Clients in {{ $requestedDept->name }} that purchased "{{ getBookNameFromSlug(request('bookSlug')) }}"

@elseif(isset($allRelatedClients) and count($allRelatedClients) < 1 && !request('purchaseType'))
You have no Clients in {{ $requestedDept->name }} that purchased "{{ getBookNameFromSlug(request('bookSlug')) }}"

@endif @endsection