<?php $__env->startSection('title','Observer'); ?>
<?php $__env->startSection('content'); ?>
    <nav class="navbar bg-light shadow">
        <div class="container-fluid">
        <span class="navbar-brand mb-0 h1">Dashboard</span>
        <div>
            <div>
                <?php echo $__env->make('observer.button', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?>
            </div>
        </div>
    </nav>
    
    <div class="container p-4">
        <h3 class="mb-4 text-center">Rainfall Observation</h3>
        <form action="observersubmit" method="post">
            <?php echo csrf_field(); ?>
            <div class="mb-3">
                <label for="observation_date" class="form-label fw-semibold">Date of Observation:</label>
                <input type="date" class="form-control" name="observation_date" id="observation_date" value="<?php echo e(date('Y-m-d')); ?>" max="<?php echo e(date('Y-m-d')); ?>">   
            </div>

            <div class="container">
                <div class="row">
                    <div class="mb-3 col-6">
                        <label for="observer_id" class="form-label fw-semibold">Observer Id:</label>
                        <input type="number" class="form-control" name="observer_id" id="observer_id" value="<?php echo e(Auth::user()->observer_id); ?>" readonly>   
                    </div>
                    <div class="mb-3  col-6">
                        <label for="station_id" class="form-label fw-semibold">Station Id:</label>
                        <input type="number" class="form-control" name="station_id" id="station_id" value="<?php echo e(Auth::user()->station_id); ?>" readonly>   
                    </div>
                </div>
            </div>
          
            <div class="mb-3">
                <label for="rainfall" class="form-label fw-semibold">Rainfall (mm):</label>
                <input type="number" step="any" class="form-control <?php $__errorArgs = ['rainfall'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?> is-invalid <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>" name="rainfall" id="rainfall" placeholder="Rainfall" required>
                <?php $__errorArgs = ['rainfall'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                    <div class="invalid-feedback"><?php echo e($message); ?></div>
                <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
            </div>

            <div class="d-grid mb-3">
                <button type="submit" class="btn btn-primary" name="submit">Submit</button>
            </div>
        </form>

        <?php if(session('success')): ?>
            <div class="alert alert-success">
                <?php echo e(session('success')); ?>

            </div>
        <?php endif; ?>
    </div>
<?php $__env->stopSection(); ?>

<?php $__env->startSection('scripts'); ?>
<script>
    window.onload = function () {
        if (performance.navigation.type === 2) {
            document.querySelector("form").reset();
        }
    }
</script>
<?php $__env->stopSection(); ?>
<?php echo $__env->make('layouts.app', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?><?php /**PATH D:\xampp\htdocs\RMC_project\resources\views/observer/dashboard.blade.php ENDPATH**/ ?>