


<?php $__env->startPush('plugin-styles'); ?>
<?php $__env->stopPush(); ?>

<?php $__env->startSection('content'); ?>
<div class="row">
    <div class="col s12">
        <?php echo $__env->make('componentes._breadcrumbs', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
    </div>
    
    <div class="col-lg-12 grid-margin stretch-card">
        <div class="card">
        
            <div class="card-body">
                <?php if(session('status')): ?>
                    <div class="row clearfix">
                        <div class="col-sm-12">
                            <div class="alert alert-success">
                                <?php echo e(session('status')); ?>

                            </div>
                        </div>
                    </div>
                <?php endif; ?>

                <?php if($errors->any()): ?>
                <div class="alert alert-danger">
                    <ul>
                        <?php $__currentLoopData = $errors->all(); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $error): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                        <li><?php echo e($error); ?></li>
                        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                    </ul>
                </div><br />
                <?php endif; ?>                
                
                <h4 class="card-title">Editar Usuário</h4>
                <p class="card-description"> </p>

                <div class="auto-form-wrapper">
                    <form action="<?php echo e(route('usuarios.update', $usuario->id)); ?>" method="post">
                        <?php echo e(csrf_field()); ?>

                        <?php echo e(method_field('PUT')); ?>

                        <div class="row clearfix">  
                            <div class="col-sm-6">
                                <div class="form-group">
                                    <div class="input-group">
                                        <input type="text" name="name" id="name" class="form-control" placeholder="Nome" value="<?php echo e($usuario->name); ?>">
                                        
                                    </div>
                                </div>
                            </div>  
                            <div class="col-sm-6">  
                                <div class="form-group">
                                    <div class="input-group">
                                        <input type="text" name="email" id="email" class="form-control" placeholder="Email" value="<?php echo e($usuario->email); ?>">
                                        <div class="input-group-append">
                                            <span class="input-group-text">
                                            <i class="mdi mdi-check-circle-outline"></i>
                                            </span>
                                        </div>
                                    </div>
                                </div>
                            </div>      
                        </div>
                        <div class="row clearfix">  
                            <div class="col-sm-6">
                                <div class="form-group">
                                    <div class="input-group">
                                        <select name="rule_id" id="rule_id" class="form-control" required>
                                            <?php if(!isset($usuario->rules[0]->id)): ?>
                                            <option value="">Selecione um Perfil</option>
                                                <?php if($rules): ?>
                                                    <?php $__currentLoopData = $rules; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $rule): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                                        <option value="<?php echo e($rule->id); ?>" ><?php echo e($rule->name); ?></option>
                                                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                                <?php endif; ?>    
                                            <?php else: ?>
                                                <?php if($rules): ?>
                                                    <?php $__currentLoopData = $rules; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $rule): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                                        <option value="<?php echo e($rule->id); ?>" <?php echo e($rule->id == @$usuario->rules[0]->id ? 'selected' : ''); ?>><?php echo e($rule->name); ?></option>
                                                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                                <?php endif; ?>
                                            <?php endif; ?>
                                        </select>
                                    </div>
                                </div>
                            </div>  
                            
                        </div>
                        
                        <div class="row clearfix">  
                            <div class="col-sm-2">
                                <button class="btn btn-primary submit-btn btn-block">Atualizar</button>
                            </div>
                        </div>
                    
                    </form>
                </div>
            </div>
            <div class="card-body">
                
                <h4 class="card-title">Atualizar Senha</h4>
                <p class="card-description"> </p>

                <div class="auto-form-wrapper">
                    
                    <form action="<?php echo e(route('usuario.password.update', $usuario->id)); ?>" method="POST">
                        <?php echo method_field('PUT'); ?>
                        <?php echo csrf_field(); ?>
                        <div class="row clearfix">  
                            <div class="col-sm-6">
                                <div class="form-group">
                                    <div class="input-group">
                                        <input type="password" class="form-control" placeholder="Password" name="password" value="">
                                        <div class="input-group-append">
                                            <span class="input-group-text">
                                            <i class="mdi mdi-check-circle-outline"></i>
                                            </span>
                                        </div>
                                    </div>
                                </div>
                            </div>  
                            <div class="col-sm-6">  
                                <div class="form-group">
                                    <div class="input-group">
                                        <input type="password" class="form-control" placeholder="Confirme o Password" name="password_confirmation" value="">
                                        <div class="input-group-append">
                                            <span class="input-group-text">
                                            <i class="mdi mdi-check-circle-outline"></i>
                                            </span>
                                        </div>
                                    </div>
                                </div>
                            </div>      
                        </div>
                        <div class="row clearfix">  
                            <div class="col-sm-2">
                                <button class="btn btn-primary submit-btn btn-block">Atualizar</button>
                            </div>
                        </div>
                    </form>    
                </div>
            </div>
        </div>
    </div>
</div>
<?php $__env->stopSection(); ?>

<?php $__env->startPush('plugin-scripts'); ?>
<?php $__env->stopPush(); ?>

<?php $__env->startPush('custom-scripts'); ?>
<?php $__env->stopPush(); ?>
<?php echo $__env->make('layout.master', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /var/www/site.apoiocotacoes.com.br/apoio/resources/views/admin/usuarios/editar.blade.php ENDPATH**/ ?>