@extends('temple.layouts.app') @section('title', 'Vazhipad Offerings') @section('content')
{{-- Success / Error Flash Notifications --}} @if(session('success'))
{{ session('success') }}
@endif @if(session('error'))
{{ session('error') }}
@endif {{-- Page Header --}}

Vazhipad Offerings

Manage temple pooja offerings, rates, and service availability

@php $totalCount = $vazhipads->count(); $activeCount = $vazhipads->filter(fn($item) => in_array($item->status, ['active', 1, '1', true], true))->count(); $inactiveCount = $totalCount - $activeCount; $avgPrice = $totalCount > 0 ? $vazhipads->avg('price') : 0; @endphp {{-- Stats Summary Row --}}
{{ $totalCount }} Total Offerings
{{ $activeCount }} Active Offerings
{{ $inactiveCount }} Inactive
₹{{ number_format($avgPrice, 2) }} Average Rate
{{-- Search & Filter Toolbar --}}
{{-- Box-Type Cards Grid --}}
@forelse($vazhipads as $vazhipad) @php $isActive = in_array($vazhipad->status, ['active', 1, '1', true], true); $statusSlug = $isActive ? 'active' : 'inactive'; @endphp
{{-- Ornate Card Top Accent --}}
{{-- Card Header --}}
#VP-{{ sprintf('%03d', $vazhipad->id) }}

{{ $vazhipad->name }}

{{ $isActive ? 'Active' : 'Inactive' }}
{{-- Card Body --}}
{{-- Description --}} @if(!empty($vazhipad->description))
{{ $vazhipad->description }}
@else
No special description specified for this offering.
@endif {{-- Price Display Box --}}
Offering Dakshina ₹{{ number_format($vazhipad->price, 2) }}
{{-- Metadata Row --}}
{{ $vazhipad->created_at ? $vazhipad->created_at->format('d M Y') : 'Regular Offering' }} Daily Pooja
{{-- Card Footer / Action Buttons --}}
@empty

No Vazhipad Offerings Found

You have not registered any pooja or vazhipad offerings yet. Get started by creating your first offering.

Create First Vazhipad
@endforelse
{{-- Filter No Results Notice (hidden by default) --}}
{{-- Standalone Modal for Delete Confirmation --}}

Delete Vazhipad

Are you sure you want to permanently delete this offering? This action cannot be undone and will remove it from the offering catalogue.
@push('scripts') @endpush @endsection