 <?php $__env->startSection('content'); ?>
<div class="row mb-3">
    <div class="col-10">
        <div class="card mb-3">
            <div class="card-header">
                <div class="row flex-between-end">
                    <div class="col-auto align-self-center">
                        <h5 class="mb-0" data-anchor="data-anchor">Update user</h5>
                    </div>
                </div>
            </div>
            <div class="card-body bg-light">
                <form class="form-material" method="POST" action="<?php echo e(url ('/user')); ?>/<?php echo e($user->id); ?>">
                    <?php echo csrf_field(); ?>
                    <?php echo method_field('PUT'); ?>
                    <?php if(count($errors->all())): ?>
                    <?php $__currentLoopData = $errors->all(); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $error): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                    <div class="alert alert-danger alert-dismissable"> <a href="#" class="close" data-dismiss="alert" aria-label="close">&times;</a> <strong>Alert!</strong> <?php echo e($error); ?> </div> <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?> <?php endif; ?>
                    <div class="row">
                        <div class="col-sm-6">
                            <input type="text" required class="form-control" id="name" name="name" value="<?php echo e($user->name); ?>" placeholder="Name">
                        </div>
                        <div class="col-sm-6">
                            <input type="text" required class="form-control" id="surname" name="surname" value="<?php echo e($user->surname); ?>" placeholder="Surname">
                            <br>
                        </div>
                    </div>
                    <div class="row">
                        <div class="col-sm-4">  
                        <select name="role" class="form-control"> 
                                <option value="<?php echo e($user->role); ?>"><?php echo e($user->rrole->name); ?></option> 
                                <?php $__currentLoopData = $roles; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $role): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                <option value="<?php echo e($role->id); ?>"><?php echo e($role->name); ?></option> 
                                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                        </select>                           
                        </div>
                        <div class="col-sm-4">
                            <input type="number" required class="form-control" id="national_id" name="national_id" value="<?php echo e($user->national_id); ?>" placeholder="National ID">
                        </div>
                        <div class="col-sm-4">
                            <input type="date" required class="form-control" id="dob" name="dob" value="<?php echo e($user->dob); ?>"><br>
                        </div>
                    </div>
                    <div class="row">
                        <div class="col-sm-6">
                        <select name="gender" class="form-control"> 
                                <option><?php echo e($user->gender); ?></option> 
                                <option>Female</option>
                                <option>Male</option>
                        </select>
                        </div>
                        <div class="col-sm-6">
                            <input type="email" required class="form-control" id="email" name="email" value="<?php echo e($user->email); ?>" placeholder="Email">
                            <br>
                        </div>
                    </div>
                    <div class="row">
                        <div class="col-sm-6">
                        <input type="text" required class="form-control" id="cell" name="cell" value="<?php echo e($user->cell); ?>" placeholder="Cell Number">
                            
                        </div>
                        <div class="col-sm-6">
                            <input type="text" required class="form-control" id="position" name="position" value="<?php echo e($user->position); ?>" placeholder="Position">
                            <br>
                        </div>
                    </div>
                    
                    <div class="text-center">
                        <br><button type="submit" class="btn btn-primary btn-sm"><i class="far fa-edit"></i>Update</button>
                        &nbsp; <a href="<?php echo e(url ('userlog/'.$user->id)); ?>" class="btn btn-primary btn-sm"> View activity log </a>
                    </div>
                </form>
            </div>
        </div>
    </div>
</div>
<?php $__env->stopSection(); ?>
<?php echo $__env->make('layouts.admin', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH C:\WORK-STATION\MBBS\Insurance-Version Controls\03-01-2026\resources\views/users/userView.blade.php ENDPATH**/ ?>