@extends('layout') @section('content')
@if (session('success'))
{{ session('success') }}
@endif @if (session('error'))
{{ session('error') }}
@endif @if ($errors->any()) @foreach ($errors->all() as $error)
{{ $error }}
@endforeach @endif
{{ Form::open(['url' => url('/camp-list'), 'method' => 'GET', 'id' => 'campListForm', 'class' => 'search-form']) }}
@if (auth()->user()->role_id == 4) @else @endif
Reset
{{ Form::close() }}
@if (auth()->user()->role_id == 2 || auth()->user()->role_id == 1 || (auth()->user()->role_id == 4 && auth()->user()->organization->status_id == 1)) @endif
@if (count($data['campList']) > 0) @foreach ($data['campList'] as $key => $value) @endforeach @else @endif
Action Camp No. Camp Date Camp Venue Org. Name Org. Code Blood Bank Volunteer Donor UOC Status Reason
{{ Form::open(['url' => url('/camp-details'), 'method' => 'POST', 'id' => 'viewfrm_' . $value->camp_id]) }} {{ $value->camp_code }} {{ Form::close() }} {{ date('d/m/Y', strtotime($value->camp_date)) }} {{ $value->camp_venue }} {{ $value->organization->org_name }} {{ $value->organization->org_code }} {{ $value->bloodcollecteddata->count() }} {{ $value->volunteerdata->count() }} {{ $value->donors->count() }} {{ $value->organization->org_uoc }}
{{ $value->campStatus->camp_status_name }}
@php $reason = ''; if ($value->status_id == 3) { $reason = $value->denied_reason; } elseif ($value->status_id == 4) { $reason = ($value->cancelled_by == 1 ? 'Cancelled by Organization' : ($value->cancelled_by == 2 ? 'Cancelled by ABVD' : ($value->cancelled_by == 3 ? 'Cancelled by Blood Bank' : ($value->cancelled_by == 4 ? 'Cancelled by Other (' . $value->cancel_by_other . ')' : '')))) . ($value->cancel_reason ? ' (' . $value->cancel_reason . ')' : ''); } elseif ($value->status_id == 5) { $reason = $value->reschedule_reason; } elseif ($value->status_id == 7) { $reason = $value->request_cancel_postponed_reason; } elseif ($value->status_id == 8) { $reason = $value->request_cancel_postponed_reason; } @endphp {{ $reason }}
No Record Found

{{ $data['campList']->appends(Request::except('page'))->links() }}

{{ $data['campList']->firstItem() }} to {{ $data['campList']->lastItem() }} Out of {{ $data['campList']->total() }}

@endsection