@extends('admin.layout.master') @section('css') @endsection @section('content')

{{__('admin.show')}} - {{__('admin.provider_update_requests.show')}}

@if($update->image && $update->getRawOriginal('image') && $update->getRawOriginal('image') != 'default.png')
@endif @if($update->name)
@endif @if($update->email)
@endif @if(!is_null($update->orders_with_deposit))
@endif @if($update->city)
@endif @if($update->category)
@endif @if($update->subCategory)
@endif {{-- Hall/Property Information --}} @if($update->day_price || $update->hall_capacity || $update->area_in_metres || $update->rooms_number)

{{ __('admin.property_information') }}

@endif @if($update->day_price)
@endif @if($update->hall_capacity)
@endif @if($update->area_in_metres)
@endif @if($update->rooms_number)
@endif {{-- Description --}} @if($update->description)

{{ __('admin.description') }}

@endif {{-- Conditions (for hall) --}} @if($update->conditions)

{{ __('admin.conditions') }}

@endif {{-- Rooms Description (for chalet/rest/hotel) --}} @if($update->rooms_description)

{{ __('admin.rooms_description') }}

@endif {{-- Identity Data --}} @php $hasIdentityNumber = $update->identity_number && !empty(trim($update->identity_number)); $hasIdentityImage = $update->identity_image && $update->getRawOriginal('identity_image') && $update->getRawOriginal('identity_image') != 'default.png'; $hasCommercialRegisterImage = $update->commercial_register_image && $update->getRawOriginal('commercial_register_image') && $update->getRawOriginal('commercial_register_image') != 'default.png'; $hasIdentityData = $hasIdentityNumber || $hasIdentityImage || $hasCommercialRegisterImage; @endphp @if($hasIdentityData)

{{ __('admin.identity_data') }}

@endif @if($hasIdentityNumber)
@endif @if($hasIdentityImage)
@endif @if($hasCommercialRegisterImage)
@endif {{-- Bank Data --}} @if($update->bank_name || $update->bank_account_name || $update->bank_account_num || $update->iban_num)

{{ __('admin.bank_data') }}

@endif @if($update->bank_name)
@endif @if($update->bank_account_name)
@endif @if($update->bank_account_num)
@endif @if($update->iban_num)
@endif {{-- Gallery Images --}} @php $filteredNewImages = $newImages ? $newImages->filter(function($image) { return $image->getRawOriginal('image') && $image->getRawOriginal('image') != 'default.png'; }) : collect(); $filteredDeletedImages = $deletedImages ? $deletedImages->filter(function($image) { return $image->getRawOriginal('image') && $image->getRawOriginal('image') != 'default.png'; }) : collect(); @endphp @if($filteredNewImages->count() > 0 || $filteredDeletedImages->count() > 0)

{{ __('admin.images') }}

@if($filteredNewImages->count() > 0)
{{ __('admin.new_images') }}
@foreach($filteredNewImages as $image) @endforeach
@endif @if($filteredDeletedImages->count() > 0)
{{ __('admin.deleted_images') }}
@foreach($filteredDeletedImages as $image)
{{ __('admin.will_be_deleted') }}
@endforeach
@endif @endif {{-- Location --}} @if($update->map_desc || ($update->lat && $update->lng))
@if($update->map_desc) @endif @if($update->lat && $update->lng)
@endif
@endif
{{-- Additions Tab --}}
@php // Separate edited additions (have provider_addition_id) from new additions (provider_addition_id is null) $additionUpdates = isset($UpdatedAdditions) ? $UpdatedAdditions->filter(function($addition) { return $addition->provider_addition_id !== null; })->values() : collect(); $newAdditions = isset($UpdatedAdditions) ? $UpdatedAdditions->filter(function($addition) { return $addition->provider_addition_id === null; })->values() : collect(); // Get deleted additions (is_deleted = 1) for this provider $deletedAdditionsInUpdate = isset($deletedAdditions) ? $deletedAdditions->filter(function($addition) { return isset($addition->is_deleted) && $addition->is_deleted == 1; })->values() : collect(); $hasNewAdditions = $newAdditions->count() > 0; $hasAdditionUpdates = $additionUpdates->count() > 0; $hasDeletedAdditions = $deletedAdditionsInUpdate->count() > 0; @endphp @if($hasAdditionUpdates)

{{ __('admin.edited_additions') }}

@foreach($additionUpdates as $additionUpdate)
{{ $additionUpdate->name?? '' }}

{{ __('admin.type') }}: {{ $additionUpdate->type == 'free' ? __('admin.free') : __('admin.paid') }}

{{ __('admin.price') }}: {{ $additionUpdate->price ?? 0 }}

@if($additionUpdate->image && $additionUpdate->getRawOriginal('image') && $additionUpdate->getRawOriginal('image') != 'default.png') @endif
@endforeach @endif @if($hasDeletedAdditions)

{{ __('admin.deleted_additions') }}

@foreach($deletedAdditionsInUpdate as $addition)
{{ __('admin.will_be_deleted') }}
{{ $addition->name ?? '' }}

{{ __('admin.type') }}: {{ $addition->type == 'free' ? __('admin.free') : __('admin.paid') }}

{{ __('admin.price') }}: {{ $addition->price ?? 0 }}

@if($addition->image && $addition->getRawOriginal('image') && $addition->getRawOriginal('image') != 'default.png') @endif
@endforeach @endif @if(!$hasNewAdditions && !$hasAdditionUpdates && !$hasDeletedAdditions)

{{ __('admin.no_addition_updates') }}

@endif
@endsection @section('js') {{-- @php $settings = \App\Models\Setting::pluck('value', 'key')->toArray(); @endphp --}} @if(isset($settings['google_places']) && $settings['google_places']) @endif @endsection