fix(nav): resolve F-08 — fix broken stationmanagement link; F-09 — use @lang for Daily Rainfall labels
This commit is contained in:
89
src/resources/views/layout/dailyrainfall.blade.php
Normal file
89
src/resources/views/layout/dailyrainfall.blade.php
Normal file
@@ -0,0 +1,89 @@
|
||||
@extends('layout.app')
|
||||
@section('content1')
|
||||
|
||||
<section id="container">
|
||||
<div class="container mt-3" id="table-container">
|
||||
<nav style="--bs-breadcrumb-divider: '>';" aria-label="breadcrumb">
|
||||
<ol class="breadcrumb">
|
||||
<li class="breadcrumb-item"><a href="{{route('dashboard')}}">@lang('messages.home')</a></li>
|
||||
<li class="breadcrumb-item " aria-current="page">@lang('messages.rainfall')</li>
|
||||
<li class="breadcrumb-item active" aria-current="page">@lang('messages.dailyrainfall')</li>
|
||||
</ol>
|
||||
</nav>
|
||||
<form method="GET" action="{{ route('dailyrainfall') }}" class="row g-3 mb-3">
|
||||
|
||||
<div class="col-md-3">
|
||||
<label class="form-label fw-bold">@lang('messages.station')</label>
|
||||
<select name="station" class="form-select">
|
||||
<option value="">@lang('messages.selectstation')</option>
|
||||
@foreach($stations as $st)
|
||||
<option value="{{ $st->stationid }}"
|
||||
{{ request('station') == $st->stationid ? 'selected' : '' }}>
|
||||
{{ $st->name }}
|
||||
</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="col-md-3">
|
||||
<label class="form-label fw-bold">@lang('messages.date')</label>
|
||||
<input type="text"
|
||||
name="date"
|
||||
class="form-control"
|
||||
id="startDateOnly"
|
||||
value="{{ $displayDate }}">
|
||||
</div>
|
||||
|
||||
<div class="col-md-2 d-flex align-items-end">
|
||||
<button type="submit" class="btn btn-primary">@lang('messages.search')</button>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
||||
@if($dailyData->isNotEmpty())
|
||||
<div class="table-responsive">
|
||||
<table class="table table-bordered" id="tblwl">
|
||||
|
||||
<thead class="table-light">
|
||||
<tr>
|
||||
<th>No</th>
|
||||
<th scope="col">@lang('messages.time')</th>
|
||||
<th scope="col">Hourly (mm)</th>
|
||||
<th scope="col">Daily (mm)</th>
|
||||
<th scope="col">Current RF (mm)</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach ($dailyData as $row)
|
||||
<tr>
|
||||
<td>{{ $loop->iteration }}</td>
|
||||
<td>{{ $row->time }}</td>
|
||||
<td>{{ $row->hourly ?? '-' }}</td>
|
||||
<td>{{ $row->daily ?? '-' }}</td>
|
||||
<td>{{ $row->currentrf ?? '-' }}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
@else
|
||||
<div class="alert alert-light text-center mt-4" role="alert">
|
||||
🚫 @lang('messages.nodataavailable')
|
||||
</div>
|
||||
@endif
|
||||
|
||||
</div>
|
||||
</section>
|
||||
<script>
|
||||
document.addEventListener('DOMContentLoaded', function() {
|
||||
const dateEl = document.getElementById('startDateOnly');
|
||||
if (dateEl && typeof flatpickr !== 'undefined') {
|
||||
flatpickr(dateEl, {
|
||||
enableTime: false,
|
||||
dateFormat: "Y-m-d",
|
||||
disableMobile: true
|
||||
});
|
||||
}
|
||||
});
|
||||
</script>
|
||||
@endsection
|
||||
@@ -1,3 +1,4 @@
|
||||
@php $isAndroid = preg_match('/Android/i', request()->userAgent()); @endphp
|
||||
<!-- Desktop Navbar -->
|
||||
<nav class="navbar navbar-expand-lg navbar-light bg-white shadow-sm d-none d-lg-flex sticky-top">
|
||||
<div class="container">
|
||||
@@ -29,6 +30,7 @@
|
||||
|
||||
<li><a class="dropdown-item" href="{{route('rainfall')}}">@lang('messages.totalrf')</a></li>
|
||||
|
||||
<li><a class="dropdown-item" href="{{ route('dailyrainfall') }}">@lang('messages.dailyrainfall')</a></li>
|
||||
<li><a class="dropdown-item" href="{{ route('historicalrf')}}">@lang('messages.historicalrf')</a></li>
|
||||
|
||||
</ul>
|
||||
@@ -45,9 +47,12 @@
|
||||
</li>
|
||||
@else
|
||||
<li class="nav-item"><a class="nav-link" href="{{ route('rainfall') }}">@lang('messages.rainfall')</a></li>
|
||||
<li class="nav-item"><a class="nav-link" href="{{ route('dailyrainfall') }}">@lang('messages.dailyrainfall')</a></li>
|
||||
<li class="nav-item"><a class="nav-link" href="{{ route('waterlevel') }}">@lang('messages.wl')</a></li>
|
||||
@endif
|
||||
@if(!$isAndroid)
|
||||
<li class="nav-item"><a class="nav-link" href="{{ route('threshold') }}">@lang('messages.ewt')</a></li>
|
||||
@endif
|
||||
<li class="nav-item"><a class="nav-link" href="{{ route('cctv') }}">CCTV</a></li>
|
||||
@if (Auth::check() && Auth::user()->access_level==1)
|
||||
<li class="nav-item dropdown">
|
||||
@@ -174,14 +179,16 @@
|
||||
<li class="nav-item"><a class="nav-link" href="{{ route('siren') }}">Siren</a></li>
|
||||
<li class="nav-item"><a class="nav-link" href="{{ route('rainfall') }}">@lang('messages.rainfall')</a></li>
|
||||
<li class="nav-item"><a class="nav-link" href="{{ route('waterlevel') }}">@lang('messages.wl')</a></li>
|
||||
@if(!$isAndroid)
|
||||
<li class="nav-item"><a class="nav-link" href="{{ route('threshold') }}">@lang('messages.ewt')</a></li>
|
||||
@endif
|
||||
<!-- <li class="nav-item"><a class="nav-link" href="{{ route('cctv') }}">CCTV</a></li> -->
|
||||
|
||||
@if (Auth::check() && Auth::user()->access_level==1)
|
||||
<li class="nav-item">
|
||||
<span class="nav-header">Admin</span>
|
||||
<ul class="nav flex-column ms-3">
|
||||
<li class="nav-item"><a class="nav-link" href="{{'stationmanagement'}}">@lang('messages.stationmgmt')</a></li>
|
||||
<li class="nav-item"><a class="nav-link" href="{{ route('stationmanagement') }}">@lang('messages.stationmgmt')</a></li>
|
||||
<li class="nav-item"><a class="nav-link" href="{{ route('usermgmt')}}">@lang('messages.usermgmt')</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
Reference in New Issue
Block a user