@extends('layouts.admin') @section('title', 'Update Request Details - EV Charging Network') @section('breadcrumb_title', 'Update Requests') @section('breadcrumb_sub_title', 'Details') @section('page_title', 'Update Request Details') @section('breadcrumb_link', route('charging-point-update-requests.index')) @section('content')
Update Request Details

View details of the charging point update request.

@if ($updateRequest) @if ($updateRequest->status == 0) Back @else Back @endif @endif
@if ($updateRequest)
{{ $updateRequest->chargingPoint->name ?? 'Unnamed Charging Point' }}

Address: {{ $updateRequest->chargingPoint->description ?? 'No description available' }}

Client: {{ $updateRequest->chargingPoint->client ? $updateRequest->chargingPoint->client->first_name . ' ' . $updateRequest->chargingPoint->client->last_name : 'N/A' }}

Requested By

Client: {{ $updateRequest->client ? $updateRequest->client->first_name . ' ' . $updateRequest->client->last_name : 'N/A' }}

@if ($updateRequest->status == 0)
Comparison View
Field Original Requested
Network {{ $updateRequest->chargingPoint->network->name ?? 'N/A' }} {{ $updateRequest->network->name ?? 'N/A' }}
Power Output {{ $updateRequest->chargingPoint->powerOutput->name ?? 'N/A' }} {{ $updateRequest->powerOutput->name ?? 'N/A' }}
Charger Status @if ($updateRequest->chargingPoint->charger_status !== null) @php $statusEnum = \App\Enums\ChargingPointEnum::tryFrom( $updateRequest->chargingPoint->charger_status, ); $statusLabel = $statusEnum ? $statusEnum->label() : 'Unknown'; @endphp {{ $statusLabel }} @else N/A @endif @if ($updateRequest->charger_status !== null) @php $statusEnum = \App\Enums\ChargingPointEnum::tryFrom( $updateRequest->charger_status, ); $statusLabel = $statusEnum ? $statusEnum->label() : 'Unknown'; @endphp {{ $statusLabel }} @else N/A @endif
Payment @if ($updateRequest->chargingPoint->free_to_use) Free @else LKR {{ $updateRequest->chargingPoint->payment_price }} @endif @if ($updateRequest->free_to_use) Free @else LKR {{ $updateRequest->payment_price }} @endif
Access Instructions {{ $updateRequest->chargingPoint->access_instructions ?: 'N/A' }} {{ $updateRequest->access_instructions ?: 'N/A' }}
Additional Notes {{ $updateRequest->chargingPoint->additional_notes ?: 'N/A' }} {{ $updateRequest->additional_notes ?: 'N/A' }}
Status @if ($updateRequest->chargingPoint->status == 0) Under Review @elseif($updateRequest->chargingPoint->status == 1) Verified @elseif($updateRequest->chargingPoint->status == 2) Merged @elseif($updateRequest->chargingPoint->status == 3) Rejected @else N/A @endif @if ($updateRequest->status == 0) Under Review @elseif($updateRequest->status == 1) Verified @elseif($updateRequest->status == 2) Merged @elseif($updateRequest->status == 3) Rejected @else N/A @endif
Created At {{ $updateRequest->chargingPoint->created_at->format('M d, Y H:i') }} {{ $updateRequest->created_at->format('M d, Y H:i') }}
Operating Hours Comparison
Original Operating Hours
@if ($updateRequest->chargingPoint->timeLines && $updateRequest->chargingPoint->timeLines->count() > 0)
@foreach ($updateRequest->chargingPoint->timeLines as $timeLine) @endforeach
Day From To
{{ $timeLine->name }} {{ $timeLine->from }} {{ $timeLine->to }}
@else

No operating hours set

@endif
Requested Operating Hours
@if ($updateRequest->timeLines && $updateRequest->timeLines->count() > 0)
@foreach ($updateRequest->timeLines as $timeLine) @endforeach
Day From To
{{ $timeLine->name }} {{ $timeLine->from }} {{ $timeLine->to }}
@else

No operating hours set

@endif
Plug Types Comparison
Original Plug Types
@if ($updateRequest->chargingPoint->plugTypes && $updateRequest->chargingPoint->plugTypes->count() > 0)
@foreach ($updateRequest->chargingPoint->plugTypes as $plugType) @endforeach
Plug Type Quantity
{{ $plugType->name }} {{ $plugType->pivot->quantity }}
@else

No plug types

@endif
Requested Plug Types
@if ($updateRequest->plugTypes && $updateRequest->plugTypes->count() > 0)
@foreach ($updateRequest->plugTypes as $plugType) @endforeach
Plug Type Quantity
{{ $plugType->name }} {{ $plugType->pivot->quantity }}
@else

No plug types

@endif
Amenities Comparison
Original Amenities
@if ($updateRequest->chargingPoint->amenities && $updateRequest->chargingPoint->amenities->count() > 0)
@foreach ($updateRequest->chargingPoint->amenities as $amenity) {{ $amenity->name }} @endforeach
@else

No amenities

@endif
Requested Amenities
@if ($updateRequest->amenities && $updateRequest->amenities->count() > 0)
@foreach ($updateRequest->amenities as $amenity) {{ $amenity->name }} @endforeach
@else

No amenities

@endif
@if ($updateRequest->location_image_url || ($updateRequest->images && $updateRequest->images->count() > 0))
Requested Images
@if ($updateRequest->location_image_url) location_image @endif @if ($updateRequest->images && $updateRequest->images->count() > 0) @endif
@endif
@else
Request Details
@if ($updateRequest->status == 1) Verified @elseif($updateRequest->status == 3) Rejected @endif
@if ($updateRequest->location_image_url) location_image @else

No Location Image

@endif
Specifications
Plug Types
{{ $updateRequest->plugTypes && $updateRequest->plugTypes->count() > 0? $updateRequest->plugTypes->map(function ($plugType) {return $plugType->name . ' x ' . $plugType->pivot->quantity;})->join(', '): 'N/A' }}
Network
{{ $updateRequest->network->name ?? 'N/A' }}
Power Output
{{ $updateRequest->powerOutput->name ?? 'N/A' }}
Operating Hours
@if ($updateRequest->timeLines && $updateRequest->timeLines->count() > 0) @php $is24_7 = $updateRequest->timeLines->count() === 1 && $updateRequest->timeLines->first()->name === '24/7' && $updateRequest->timeLines->first()->from === '00:00:00' && $updateRequest->timeLines->first()->to === '23:59:00'; @endphp @if ($is24_7)
Open 24/7
@else
@foreach ($updateRequest->timeLines as $timeLine) @endforeach
{{ $timeLine->name }} @if ($timeLine->from === '00:00:00' && $timeLine->to === '23:59:00') 24 Hours @elseif($timeLine->from === $timeLine->to) Closed @else {{ date('H:i', strtotime($timeLine->from)) }} - {{ date('H:i', strtotime($timeLine->to)) }} @endif
@endif @else
Open 24/7
@endif
Price
{{ $updateRequest->free_to_use ? 'Free' : 'LKR ' . $updateRequest->payment_price }}
Access
{{ $updateRequest->access_type ?? 'Public' }}
Access Instructions
@if ($updateRequest->access_instructions)
{{ $updateRequest->access_instructions ?? 'N/A' }}
@else No access instructions available @endif
Additional Notes
@if ($updateRequest->additional_notes)
{{ $updateRequest->additional_notes ?? 'N/A' }}
@else No additional notes available @endif
Amenities
@if ($updateRequest->amenities && $updateRequest->amenities->count() > 0) @foreach ($updateRequest->amenities as $amenity)
{{ $amenity->name }}
@endforeach @else
No amenities available
@endif
@endif @else

Update request not found.

@endif
@endsection @section('scripts') @endsection