@extends('layouts.customer') @section('title', 'Welcome') @push('css') @endpush @section('content')
{{--
--}}

Home

{{--
--}} {{--
Apply New Season Card
--}}
@include('profile.menu')
My Account {{-- Edit --}}
{{ $user->cardHolder->account_no ?? '--' }}
@if ($user->user_type == 2) Corporate @else Individual @endif
RM {{ Number::format($user->seasonCards->sum('rate.rate')) }}
{{ $user->cardHolder->status->label() }}
@if($user->seasonCards->isNotEmpty()) @forelse ($user->seasonCards->filter(fn ($seasonCard) => $seasonCard->status->active()) as $index => $card) @empty @endforelse
Active Cards
# Card No. Season Type Rate Card Status
{{ $index + 1 }} {{ $card->card_no ?? '-' }} {{ $card->type->name ?? '-' }} RM {{ number_format($card->effectiveRateAmount(), 2) }} {{ $card->statuses->name ?? '-' }}
No card found
Show All @else
No card found
@endif @if($user->seasonCards->isNotEmpty())
@csrf @method('POST') @foreach (collect($periods)->reverse() as $period) @php $paymentItem = $paymentItems->where('year', $period->format('Y'))->where('month', $period->format('m'))->first(); @endphp @endforeach
Season Rental
Monthly Card(s) Rate
{{-- Get values by array from request name months[]--}} payment->status == \App\Models\Traits\Enum\PaymentStatus::PAID) name="months[]" value="{{ $period->format('Y-m') }}" id="months-{{ $period->format('Y-m') }}">
{{ $user->seasonCards->pluck('card_no')->implode(', ') }} RM {{ $user->seasonCards->sum('rates.rate') }}
@error('amount')
{{ $message }}
@enderror
@endif
@endsection @push('js') @endpush