@extends('layouts.app') @section('title', $cycle->cycle_name) @section('page-title', app()->getLocale() === 'bn' ? 'চক্রের বিবরণ' : 'Cycle Details') @section('content')
← {{ __('Back') }}
{{-- Cycle Info --}}

{{ $cycle->cycle_name }}

{{ $cycle->start_date?->format('d/m/Y') }} — {{ $cycle->end_date?->format('d/m/Y') }}

@if($cycle->status !== 'completed')
@csrf
@csrf
@endif

{{ app()->getLocale() === 'bn' ? 'পরিবার প্রতি' : 'Per Family' }}

৳{{ number_format($cycle->amount_per_family) }}

{{ app()->getLocale() === 'bn' ? 'মোট বিতরণ' : 'Total Disbursements' }}

{{ $disbursements->total() }}

{{ __('Status') }}

{{ ucfirst($cycle->status ?? 'draft') }}

{{ app()->getLocale() === 'bn' ? 'ধরণ' : 'Type' }}

{{ ucfirst($cycle->cycle_type ?? '—') }}

{{-- Disbursements Table --}}
@forelse($disbursements as $d) @empty @endforelse
{{ __('Family Code') }} {{ __('Head of Family') }} {{ app()->getLocale() === 'bn' ? 'পরিমাণ' : 'Amount' }} {{ app()->getLocale() === 'bn' ? 'পদ্ধতি' : 'Method' }} {{ __('Status') }} {{ __('Actions') }}
{{ $d->family?->family_id_code }} {{ $d->family?->head_name_bn }} ৳{{ number_format($d->amount) }} {{ ucfirst($d->method ?? '—') }} @php $c = match($d->status) { 'completed' => 'green', 'processing' => 'blue', 'failed' => 'red', default => 'yellow' }; @endphp {{ ucfirst($d->status) }} @if($d->status === 'pending')
@csrf
@else {{ $d->transaction_reference ?? '—' }} @endif
{{ __('No results found') }}
@if($disbursements->hasPages())
{{ $disbursements->links() }}
@endif
@endsection