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

Edit Task

Perbarui detail task: {{ $task->title }}

@if ($errors->any()) @endif
@csrf @method('PUT') {{-- Hanya Admin yang bisa edit detail ini --}} @if(Auth::user()->role == 'admin')
{{-- [DIUBAH] Menggunakan $anggota, bukan $users --}}
@else {{-- Staff/Anggota hanya melihat detail (read-only) --}}

{{ $task->title }}

{{ $task->description ?? 'Tidak ada deskripsi.' }}

Proyek: {{ $task->proyek->nama_proyek }}
Jatuh Tempo: {{ $task->due_date ? $task->due_date->format('d M Y') : '-' }}

@endif {{-- Bagian ini bisa diedit oleh Admin dan Anggota --}}
{{-- Tombol Aksi --}}
Batal
@endsection