@php $trialTypes = ['on_farm' => 'On-farm', 'on_station' => 'On-station']; $formatDate = fn ($date) => $date ? \Illuminate\Support\Carbon::parse($date)->format('M j, Y') : '—'; $formatDates = fn ($dates) => $dates ? collect($dates)->map($formatDate)->implode(', ') : '—'; $formatSize = function ($bytes) { $units = ['B', 'KB', 'MB', 'GB']; $i = $bytes > 0 ? min((int) floor(log($bytes, 1024)), count($units) - 1) : 0; return round($bytes / (1024 ** $i), 2) . ' ' . $units[$i]; }; @endphp
No trials have been submitted yet.
@else| # | Title | Type | Crop | Season / Year | Submitted by | Submitted |
|---|---|---|---|---|---|---|
| {{ $loop->iteration }} | {{ $trial->title }} | {{ $trialTypes[$trial->trial_type] ?? '—' }} | {{ $trial->crop ?: '—' }} | {{ trim($trial->trial_season . ' ' . $trial->trial_year) ?: '—' }} | {{ $trial->user?->name ?? '—' }} | {{ $formatDate($trial->created_at) }} |
| Description | {{ $trial->description ?: '—' }} |
|---|---|
| Trial type | {{ $trialTypes[$trial->trial_type] ?? '—' }} |
| Season | {{ $trial->trial_season ?: '—' }} |
| Year | {{ $trial->trial_year ?: '—' }} |
| Crop | {{ $trial->crop ?: '—' }} |
| Varieties | {{ $trial->varieties ?: '—' }} |
| Location | {{ $trial->location ?: '—' }} |
| GPS coordinates | {{ $trial->gps_coordinates ?: '—' }} |
| Treatments (factor A) |
@if ($trial->treatments)
|
| Treatments (factor B) |
@if ($trial->treatments_factor_b)
|
| Replications | {{ $trial->replication_no ?: '—' }} |
| Establishment dates | {{ $formatDates($trial->establishment_dates) }} |
| Harvest dates | {{ $formatDates($trial->harvest_dates) }} |
| Conducted by | {{ $trial->conducted_by ?: '—' }} |
| Contact email | {{ $trial->contact_email ?: '—' }} |
| Data files |
@if ($trial->files)
|