@extends('layouts.app')

@section('content')
    <!--begin::App Content Header-->
    <div class="app-content-header"> <!--begin::Container-->
        <div class="container-fluid">
            <!--begin::Row-->
            <div class="row">
                <div class="col-sm-6">
                    <h3 class="mb-0">Task Details</h3>
                </div>
                <div class="col-sm-6">
                    <ol class="breadcrumb float-sm-end">
                        <li class="breadcrumb-item"><a href="{{ route('admin.dashboard') }}">Home</a></li>
                        <li class="breadcrumb-item"><a href="{{ route('tasks.index') }}">Index Tasks</a></li>
                        <li class="breadcrumb-item active" aria-current="page">
                            Task Details
                        </li>
                    </ol>
                </div>
            </div>
            <!--end::Row-->
        </div> <!--end::Container-->
    </div>
    <!--end::App Content Header-->

    <div class="row">
        <div class="col-md-12">
            <div class="card">
                <div class="card-header">
                    {{ $task->title }}
                </div>
                <div class="card-body">
                    <p><strong>Description:</strong> {{ $task->description }}</p>
                    <p><strong>Farm:</strong> {{ $task->farm->registration_no ?? 'N/A' }}</p>
                    <p><strong>Section:</strong> {{ $task->section->name ?? 'N/A' }}</p>
                    <p><strong>Assigned To:</strong> {{ $task->assignee->fullname ?? 'N/A' }}</p>
                    <p><strong>Created By:</strong> {{ $task->creator->fullname ?? 'N/A' }}</p>
                </div>
            </div>
        </div>
    </div>
@endsection
