<!doctype html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">

    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC" crossorigin="anonymous">

    <title>Laporan Ketinggian Air</title>
    <style>
        * {
            font-family: 'Times New Roman', Times, serif;
        }
    </style>
  </head>
  <body>
      <tr>
          <td>Nama Device : {{ $nama_device->nama_device }}</td>
      </tr>
      <tr>
          <td>Waktu Awal : {{ date("d, F Y",strtotime($awal)) }}</td>
      </tr>
      <tr>
          <td>Waktu Akhir : {{ date("d, F Y",strtotime($akhir)) }}</td>
      </tr>
    <table class="table table-bordered table-hover table-striped">  
        <thead>
            <tr>
                <th>#</th>
                <th>Nama Perangkat</th>
                <th>Lokasi</th>
                <th>Ketinggian Air</th>
                <th>Tanggal</th>
                <th>Jam</th>
            </tr>
        </thead>
        <tbody>
            @foreach ($result as $row)
                <tr>
                    <td>{{ $loop->iteration }}</td>
                    <td>{{ $row->device->nama_device }}</td>
                    <td>{{ $row->device->location }}</td>
                    <td>
                        <span>{{ $row->depth }} CM</span>
                    </td>
                    <td>{{ date('d, F Y', strtotime($row->date_report)) }}</td>
                    <td>{{ date('H:i', strtotime($row->time_report)) }}</td>
                </tr>
            @endforeach
        </tbody>
    </table>

    <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/js/bootstrap.bundle.min.js" integrity="sha384-MrcW6ZMFYlzcLA8Nl+NtUVF0sA7MsXsP1UyJoMp4YLEuNSfAP+JcXn/tWtIaxVXM" crossorigin="anonymous"></script>
  </body>
</html>