@extends('backend.layouts.app')

@section('content')
<div class="container">
    <h1>Travel Expense Log Details</h1>
    
    <div class="card">
        <div class="card-header">
            Travel Expense Log #{{ $travelExpenseLog->id }}
        </div>
        <div class="card-body">
            <p><strong>Travel Expense ID:</strong> {{ $travelExpenseLog->travel_expense_id }}</p>
            <p><strong>Expense Category:</strong> {{ $travelExpenseLog->expenseCategory->name ?? 'N/A' }}</p>
            <p><strong>Amount:</strong> ${{ number_format($travelExpenseLog->amount, 2) }}</p>
            <p><strong>File:</strong> {{ $travelExpenseLog->file->filename ?? 'N/A' }}</p>
            <p><strong>Remark:</strong> {{ $travelExpenseLog->remark ?? 'N/A' }}</p>

            <a href="{{ route('travel.expense.logs.edit', $travelExpenseLog->id) }}" class="btn btn-warning">Edit</a>
            <form action="{{ route('travel.expense.logs.destroy', $travelExpenseLog->id) }}" method="POST" style="display:inline;">
                @csrf
                @method('DELETE')
                <button type="submit" class="btn btn-danger" onclick="return confirm('Are you sure?')">Delete</button>
            </form>
        </div>
    </div>
</div>
@endsection
