<?php $__env->startSection("content"); ?>
<?php $__env->startSection("title","Update Designations"); ?>

<div class="row">
    <div class="col-xl-12 col-lg-12">
        <div class="alert alert-success my-3" style="display:none;" id="success"></div>
        
        <div class="card">
            <div class="card-header d-flex justify-content-between align-items-center">
                <h4 class="card-title mb-0">Update Designations</h4>
                <a href="javascript:history.back()" class="btn btn-sm btn-light">
                    <i class="ri-arrow-left-line"></i> Back
                </a>
            </div>
            
            <div class="card-body">
                <form accept-charset="utf-8" name="update-form" id="update-form" >
                    <?php echo csrf_field(); ?>
                    <div class="row">

<div class="mt-2 col-xs-12 col-sm-12 col-md-4 col-lg-4">        
<label class='form-label'><?php echo e($dbs_designations['department_id_req']); ?><?php echo e($dbs_designations['department_id_title']); ?>: </label>
 <select name="department_id" id="update-department_id"  class="chosen-select form-control form-select">
    <option value=""><?php echo e($dbs_designations['department_id_req']); ?>Select <?php echo e($dbs_designations['department_id_title']); ?> </option>
    <?php $__currentLoopData = $department_id; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $id => $name): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
        <?php
    $selected = ($id == $row->department_id) ? 'selected="selected"' : '';
?>
        <option value="<?php echo e($id); ?>"  <?php echo e($selected); ?>><?php echo e($name); ?></option>
    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
</select>
<script>
    $(function() {
        $('#update-department_id').chosen({
              width: '100%',
              search_contains: true
            });
        });
</script>
<span class='text-danger' id='update-department_idError'></span>
</div>


<div class="col-lg-4">
    <div class="mb-3">
        <label class='form-label'><?php echo e($dbs_designations['name_req']); ?><?php echo e($dbs_designations['name_title']); ?>:</label>
        <input type = '<?php echo e($dbs_designations['name_html5_type']); ?>' name = "name" id = "update-name" autocomplete = 'off' maxlength ='<?php echo e($dbs_designations['name_max']); ?>'  value='<?php echo e($row->name); ?>' <?php if($dbs_designations['name_html5_req']!=''): ?> <?php echo e($dbs_designations['name_html5_req']); ?> = <?php echo e($dbs_designations['name_html5_req']); ?> <?php endif; ?> class= 'form-control'  >
        <span class='text-danger' id='update-nameError'></span>
    </div>
</div>

<div class="col-lg-4">
    <div class="mb-3">
        <label class='form-label'><?php echo e($dbs_designations['status_req']); ?><?php echo e($dbs_designations['status_title']); ?>:</label><br/>
        <div class="mt-2">
            <?php
            $options = $dbs_designations['status_array'];
            ?>

            <?php $__currentLoopData = $options; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $key => $value): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                <?php
                $checked = ($key == $row->status) ? 'checked="checked"' : '';
                ?>

                <label class="btn btn-outline-primary">
                    <input type="radio" name="status" value="<?php echo e($key); ?>" id="update-status" <?php echo e($checked); ?>/> <?php echo e($value); ?>

                </label>
            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
        </div>
    </div>
</div>

    
                    </div>
                    

                    <div class="p-3 mb-3 rounded">
                        <div class="row justify-content-end g-2">
                            <div class="col-lg-3">
                                <div id="edit-mode">
                                    <button type='submit' name='update-submit' id='update-submit' class='btn btn-outline-secondary w-100' data-args1='<?php echo e(route("designations.update", $row->id)); ?>' data-args2='admin/designations' onclick='addUpdate(event,"update")'>
                                        <i class="ri-save-line"></i> Save 
                                    </button>
                                </div>
                            </div>
                            <div class="col-lg-2">
                                <a href="<?php echo e(route('designations.index')); ?>" class="btn btn-primary w-100">
                                    <i class="ri-close-circle-line"></i> Cancel
                                </a>
                            </div>
                        </div>
                    </div>
                </form>
            </div>
        </div>
    </div>
</div>

<?php $__env->stopSection(); ?>


<?php echo $__env->make("layouts.metor.admin", \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /Applications/MAMP/htdocs/payroll/resources/views/designations/edit.blade.php ENDPATH**/ ?>