{{ __('Устройства') }}

@can('create', \App\Models\Device::class) {{ __('Добавить устройство') }} @endcan
@if (session('status'))
{{ session('status') }}
@endif @if (session('error'))
{{ session('error') }}
@endif @forelse ($devices as $device) @php $status = $statuses[$device->external_id] ?? 'unknown'; @endphp @empty @endforelse
{{ __('Название') }} {{ __('Зона') }} {{ __('Тип') }} {{ __('Статус') }} {{ __('External ID') }}
{{ $device->name }} {{ $device->zone->name }} {{ $device->deviceType->code }} $status === 'online', 'bg-gray-100 text-gray-600' => $status === 'offline', 'bg-yellow-100 text-yellow-800' => $status === 'unknown', ])>{{ $status }} {{ $device->external_id }} @can('update', $device) {{ __('Изменить') }} @endcan @can('delete', $device)
@csrf @method('DELETE')
@endcan
{{ __('Устройств пока нет.') }}