@extends('temple.layouts.app')
@section('title', 'Vazhipad Offerings')
@section('content')
{{-- Success / Error Flash Notifications --}}
@if(session('success'))
@endif
@if(session('error'))
@endif
{{-- Page Header --}}
@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 --}}
{{-- 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 --}}
{{-- 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) --}}
No Matching Offerings
No Vazhipad matches your current search criteria. Try a different query or reset filters.
{{-- Standalone Modal for Delete Confirmation --}}