@extends('layouts/layout_comand_center') @section('title', 'Dashboard') @section('vendor-style') @endsection @section('page-style') @endsection @section('content')
@if ($count_device)

Hasil Perkiraan Ketinggian Hulu Sungai

@foreach ($device as $room) @php $one = Illuminate\Support\Facades\DB::table('device_results') ->where('uuid_device', $room->no) ->OrderBy('uuid', 'desc') ->first(); if ($one) { if ($one->status_siaga == 'Siaga 1') { $warna = '#DC3545'; } if ($one->status_siaga == 'Siaga 2') { $warna = 'orange'; } if ($one->status_siaga == 'Siaga 3') { $warna = '#FFC107'; } if ($one->status_siaga == 'Siaga 4') { $warna = '#007BFF'; } if ($one->status_siaga == 'Normal') { if ($one->depth_average == '0') { $warna = 'black'; } else { $warna = '#28A745'; } } } else { $warna = 'black'; } @endphp
{{ !empty($room->nama_device) ? $room->nama_device : '' }}

@if (!empty($one->status_siaga)) {{ $one->status_siaga }} @else @endif

@if (!empty($one->datetime_calculate)) Data Terbaru {{ date('d-m-Y H:i', strtotime($one->datetime_calculate)) }} WIB @else @endif
@endforeach
@endif
@foreach ($device as $rooms) @endforeach @endsection