@extends('layouts.base') @section('content')

Rekod

{{ $jumlahTanaman }}

Jumlah Tanaman

@if (auth()->user()->role === 'Tuan_Kebun')

{{ $kebunKosong }}

Kebun Kosong

@endif

{{ $baru }}

Baru

{{ $tanam }}

Tanam

Tanaman

@if (auth()->user()->role === 'Tuan_Kebun') +Tambah Tanaman

@endif
@if (auth()->user()->role === 'Tuan_Kebun' || auth()->user()->job_type === 'Penanam') @endif @if (auth()->user()->role === 'Tuan_Kebun' || auth()->user()->job_type === 'Pengait') @endif @foreach ($filteredPlantations as $plantation) @if (auth()->user()->role === 'Tuan_Kebun' || auth()->user()->job_type === 'Penanam') @endif @if (auth()->user()->role === 'Tuan_Kebun' || auth()->user()->job_type === 'Pengait') @endif @endforeach
Bil. Kebun Kategori Nama Jumlah TanamTarikh MenanamTarik MenuaiStatus Tindakan
{{ $loop->index + 1 }} {{ $plantation->farm->name }} @if ($plantation->farm->category->name == 'Kelapa') Kelapa @else {{ $plantation->farm->category->name }} @endif {{ $plantation->plantDetail->plant_type }} {{ $plantation->quantity_plant }} Batang {{ \Carbon\Carbon::parse($plantation->plant_date)->format('d F Y') }} {{ \Carbon\Carbon::parse($plantation->harvest_date)->format('d F Y') }} @if ($plantation->status == 'Baru') Baru @elseif($plantation->status == 'Proses Tanam' || $plantation->status == 'Proses Tuai') Dalam Kerja @elseif($plantation->status == 'Tanam') @if (Carbon\Carbon::now()->isSameDay($plantation->harvest_date)) Menuai @else Tanam @endif @elseif($plantation->status == 'Tuai Hasil') Tuai Hasil @elseif($plantation->status == 'Kira Hasil') Kira Hasil @elseif($plantation->status == 'Selesai') Selesai @endif {{-- Tuan Kebun --}} @if (auth()->user()->role === 'Tuan_Kebun' && $plantation->status === 'Baru') @endif {{-- Penanam --}} @if (auth()->user()->job_type === 'Penanam' && $plantation->status === 'Baru' && now()->greaterThanOrEqualTo($plantation->plant_date)) @elseif(auth()->user()->job_type === 'Penanam' && $plantation->status === 'Proses Tanam' ) @endif {{-- Pengait --}} @if (auth()->user()->job_type === 'Pengait' && $plantation->status === 'Tanam' && now()->greaterThanOrEqualTo($plantation->harvest_date)) @elseif(auth()->user()->job_type === 'Pengait' && $plantation->status === 'Proses Tuai' ) @endif
@endsection