{{-- resources/views/pro/points/index.blade.php --}} @extends('layouts.base') @php $point = $p ?? null; @endphp @section('title', __('Waypoints')) @section('content')

{{ __('Waypoints') }}

{{-- Flash messages --}} @if(session('ok'))
{{ session('ok') }}
@endif @if($errors->any())
@endif {{-- Simple table list --}} @if($points->isEmpty())
{{ __('No waypoint found for your company.') }}
@else
@forelse(($points ?? []) as $point) @empty @endforelse
{{ __('Name') }} {{ __('Owner') }} {{ __('Address') }} {{ __('City') }} {{ __('QR') }} {{ __('Serial') }}
{{ $point->name }} {{ $point->user_id ? $point->user->name . ' (' . $point->user->email . ')' : '—' }} {{ $point->address1 }}
{{ $point->address2 }}
{{ $point->postcode }} - {{ $point->city }}
{{ $point->country_isocode }}
@php $qrUrl = $point->qrcode ? Storage::disk('public')->url($point->qrcode) : null; // petit cache-busting pour voir la régénération sans F5 forcé if ($qrUrl) $qrUrl .= (str_contains($qrUrl,'?') ? '&' : '?') . 'v=' . time(); @endphp @if($point->qrcode && $qrUrl) QR Code
@csrf @method('PUT')
@else
@csrf @method('PUT')
@endif
{{ $point->serial ?? '—' }}
{{ __('No waypoints found') }}
{{-- Pagination si fournie --}} @if(method_exists($points, 'links'))
{{ $points->links() }}
@endif
@endif
@endsection