@extends('layouts.app') @section('title', 'Process request') @push('css') @endpush @section('content')

Request Management

@if ($issue->invoices->isNotEmpty())
Invoice
@forelse ($issue->invoices as $invoice) @empty @endforelse
Status Name Invoice No. Invoice Date Payment For Transaction Date Amount Actions
@if ($invoice->status->value == 1) Paid @else Unpaid @endif {{ $issue->user?->name ?? '-' }} {{ $invoice->invoice_no ?? '--' }} {{ $invoice->invoiced_at?->format('d/m/Y') ?? '--' }} {{ $invoice->payment_for ?? '--' }} {{ $invoice->received_time?->format('d/m/Y H:iA') ?? '--' }} {{ $invoice->amount ?? '--' }}
@method('DELETE') @csrf
No record found
@endif
@method('PUT') @csrf
Request
{{ $issue->action }}
{{ $issue->site->name ?? '-' }}
{{ $issue->seasonType->name ?? '-' }}
RM {{ $rate ?? '-' }}
@if ($issue->isUpgradeOrDowngrade())
@forelse($issue->cards as $card) @empty @endforelse
# Card Space Rate (RM) Additional Rate (RM)
{{ $loop->iteration }} {{ Arr::get($card, 'card', '-') }} {{ Arr::get($card, 'type', '-') }} {{ Arr::get($card, 'rate', 0) }} {{ $rate - Arr::get($card, 'rate', 0) }}
Space
Total Additional (RM) {{ ($rate * $seasonCards->count())- $issue->cards->sum('rate') }}
@endif @if ($issue->action == \App\Models\Traits\Enum\SeasonRequestType::SUSPEND)
{{ $issue->effective_start_date?->format('d M Y') }}
{{ $issue->effective_end_date?->format('d M Y') }}
@else
{{ $issue->effective_date?->format('d M Y') ?? '--' }}
@endif
{{ $issue->total_cards ?? '--' }}
{{ $issue->reason ?? '--' }}
{{ $issue->details ?? '--' }}
@if ($issue->action === \App\Models\Traits\Enum\SeasonRequestType::TERMINATE)
  • Bank Name: {{ $issue->banks?->get('bank') }}
  • Bank Account: {{ $issue->banks?->get('account') }}
@endif
@if ($issue->hasMedia($issue->action->media())) @else -- @endif
{{ $issue->user_type == 1 ? 'Individual' : 'Corporate' }}
{{ $issue->user?->cardHolder->user_category ?? '' == 1 ? 'Tenant' : 'Non-tenant' }}
{{ $issue->isReserved() ? 'Reserved' : 'Non-reserved' }}
@if ($issue->action === \App\Models\Traits\Enum\SeasonRequestType::REGISTER)
@if ($issue->properties?->has('cars'))
    @foreach($issue->properties->get('cars') as $car)
  • {{ $car ?? '--' }}
  • @endforeach
@else -- @endif
@endif {{-- @if ($issue->action == \App\Models\Traits\Enum\SeasonRequestType::REGISTER)--}} {{--
--}} {{-- --}} {{--
--}} {{-- --}} {{-- @error('cards')--}} {{-- {{ $message }}--}} {{-- @enderror--}} {{--
--}} {{--
--}} {{-- @endif--}}
@forelse($seasonCards as $seasonCard) {{ $seasonCard->card_no ?? '--' }} Status : {{ $seasonCard->status->label() }} Deposit (RM{{ $seasonCard?->deposit?->card_deposit }}): {{ $seasonCard?->deposit?->status->label() }}
@empty -- @endforelse
{{ $issue->company ?? '--'}}
{{-- The '-0001-11-30' sentinel this used to test for is gone: SafeDateCast reads an unusable stored date back as null, so the placeholder now hangs off a plain null check. --}} {{ $issue->effective_date?->format('d M Y') ?? '--' }}
{{ $issue->request_time->format('d/m/Y H:iA') }}
{{-- The decision stamp, shown for a decline as much as an approval: both are decisions someone is accountable for. Reads decided_at/decided_by rather than last_update, which moved on every unrelated write to the request. --}} @if ($issue->isDecided())
{{ $issue->decided_at?->format('d/m/Y H:iA') ?? '--' }}
{{-- Requests decided before the stamp existed have no recorded actor; "MCS" says so honestly instead of guessing a name. --}} {{ $issue->decider?->name ?? 'MCS' }}
@endif {{-- The closure stamp. Gated on the status being Close, not on the stamp being present, so a request closed by the lifecycle or a scheduled sweep still shows the rows — with the placeholders saying plainly that no admin close was recorded. --}} @if ($issue->isClose())
{{ $issue->closed_at?->format('d/m/Y H:iA') ?? '--' }}
{{-- Null means no admin closed it through this form: a System_Close or a pre-stamp request. "MCS" says so, as it does above. --}} {{ $issue->closer?->name ?? 'MCS' }}
@endif
Process
{{-- --}}
@method('PUT') @csrf @if ($issue->isApproved()) @if (in_array($issue->action, [\App\Models\Traits\Enum\SeasonRequestType::REGISTER, \App\Models\Traits\Enum\SeasonRequestType::REPLACEMENT]))
@error('cards') {{ $message }} @enderror Make sure customer invoice has been cleared and cards has been created/imported.

@endif @endif
@error('status') {{ $message }} @enderror
@error('approval') {{ $message }} @enderror
@if ($issue->action === \App\Models\Traits\Enum\SeasonRequestType::SUSPEND)
@error('effective_start_date') {{ $message }} @enderror
@error('effective_end_date') {{ $message }} @enderror
@else
@error('effective_date') {{ $message }} @enderror
@endif
@if (in_array($issue->action, [\App\Models\Traits\Enum\SeasonRequestType::REGISTER, \App\Models\Traits\Enum\SeasonRequestType::REPLACEMENT]))
is_deposit ?? true))>
is_card_sale ?? true))>
@endif
@endsection @push('js') @endpush