<?php $__env->startPush('head-script'); ?>
    <link rel="stylesheet" href="<?php echo e(asset('assets/node_modules/html5-editor/bootstrap-wysihtml5.css')); ?>">
    <link rel="stylesheet" href="<?php echo e(asset('assets/node_modules/bootstrap-material-datetimepicker/css/bootstrap-material-datetimepicker.css')); ?>">
    <link rel="stylesheet" href="<?php echo e(asset('assets/node_modules/multiselect/css/multi-select.css')); ?>">
    <link rel="stylesheet" href="<?php echo e(asset('assets/plugins/iCheck/all.css')); ?>">

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


<?php $__env->startSection('content'); ?>
    <?php
        $requiredColumns = [
        'gender' => __('modules.front.gender'),
        'dob' => __('modules.front.dob'),
        'country' => __('modules.front.country'),
        'address' => __('app.address'),
        ];
        $sectionVisibility = [
            'profile_image' => __('modules.jobs.profileImage'),
            'resume' => __('modules.jobs.resume'),
            'cover_letter' => __('modules.jobs.coverLetter'),
            'terms_and_conditions' => __('modules.jobs.termsAndConditions')
        ];
    ?>
    <div class="row">
        <div class="col-12">
            <div class="card">
                <div class="card-body">
                    <h4 class="card-title mb-4"><?php echo app('translator')->get('app.edit'); ?></h4>

                    <form class="ajax-form" method="POST" id="createForm">
                        <?php echo csrf_field(); ?>
                        <?php echo method_field('PUT'); ?>

                        <div class="row">
                            <div class="col-md-12">
                                <div class="form-group">
                                    <label for="address"><?php echo app('translator')->get('app.company'); ?></label>
                                    <select name="company" class="form-control">
                                        <option value="">--</option>
                                        <?php $__currentLoopData = $companies; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $comp): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                        <option <?php if($comp->id == $job->company_id): ?> selected <?php endif; ?>
                                            value="<?php echo e($comp->id); ?>"><?php echo e(ucwords($comp->company_name)); ?></option>
                                        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                    </select>
                                </div>
                            </div>

                            <div class="col-md-12">
                                <div class="form-group">
                                    <label for="address"><?php echo app('translator')->get('modules.jobs.jobTitle'); ?></label>
                                    <input type="text" class="form-control" name="title" value="<?php echo e($job->title); ?>">
                                    
                                </div>
                            </div>

                            <div class="col-md-12">
                                <div class="form-group">
                                    <label for="address"><?php echo app('translator')->get('modules.jobs.jobDescription'); ?></label>
                                    <textarea class="form-control" id="job_description" name="job_description" rows="15"
                                        placeholder="Enter text ..."><?php echo $job->job_description; ?></textarea>
                                </div>
                            </div>

                            <div class="col-md-12">
                                <div class="form-group">
                                    <label for="address"><?php echo app('translator')->get('modules.jobs.jobRequirement'); ?></label>
                                    <textarea class="form-control" id="job_requirement" name="job_requirement" rows="15"
                                        placeholder="Enter text ..."><?php echo $job->job_requirement; ?></textarea>
                                </div>
                            </div>

                            <div class="col-md-6">

                                <div class="form-group">
                                    <label for="address"><?php echo app('translator')->get('menu.locations'); ?></label>
                                    <select name="location_id[]" id="location_id" multiple="multiple"
                                            class="form-control select2 custom-select">
                                        <?php $__currentLoopData = $locations; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $location): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                            <option
                                                    <?php if(in_array($location->id , $jobLocationData)): ?> selected <?php endif; ?>
                                                    value="<?php echo e($location->id); ?>"><?php echo e(ucfirst($location->location). ' ('.$location->country->country_code.')'); ?></option>
                                        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                    </select>
                                </div>

                            </div>

                            <div class="col-md-6">
                                <div class="form-group">
                                    <label for="address"><?php echo app('translator')->get('menu.jobCategories'); ?></label>
                                    <select name="category_id" id="category_id" class="form-control">
                                        <?php $__currentLoopData = $categories; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $category): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                        <option <?php if($category->id == $job->category_id): ?> selected <?php endif; ?>
                                            value="<?php echo e($category->id); ?>"><?php echo e(ucfirst($category->name)); ?></option>
                                        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                    </select>
                                </div>
                            </div>

                            <div class="col-md-6">
                                <div class="form-group">
                                    <label><?php echo app('translator')->get('menu.skills'); ?></label>
                                    <select class="select2 m-b-10 select2-multiple" id="job_skills"
                                        style="width: 100%; " multiple="multiple"
                                        data-placeholder="<?php echo app('translator')->get('app.add'); ?> <?php echo app('translator')->get('menu.skills'); ?>" name="skill_id[]">
                                        <?php $__currentLoopData = $skills; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $skill): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                        <option <?php $__currentLoopData = $job->skills; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $jskill): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                            <?php if($skill->id == $jskill->skill_id): ?>
                                            selected
                                            <?php endif; ?>
                                            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                            value="<?php echo e($skill->id); ?>"><?php echo e(ucwords($skill->name)); ?></option>
                                        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                    </select>
                                </div>
                            </div>

                            <div class="col-md-6">
                                <div class="form-group">
                                    <label for="address"><?php echo app('translator')->get('modules.jobs.totalPositions'); ?></label>
                                    <input type="number" class="form-control" name="total_positions"
                                        id="total_positions" value="<?php echo e($job->total_positions); ?>">
                                </div>
                            </div>

                            <div class="col-md-6">
                                <div class="form-group">
                                    <label for="address"><?php echo app('translator')->get('app.startDate'); ?></label>
                                    <input type="text" class="form-control" id="date-start"
                                        value="<?php echo e($job->start_date->format('Y-m-d')); ?>" name="start_date">
                                </div>
                            </div>

                            <div class="col-md-6">
                                <div class="form-group">
                                    <label for="address"><?php echo app('translator')->get('app.endDate'); ?></label>
                                    <input type="text" class="form-control" id="date-end" name="end_date"
                                        value="<?php echo e($job->end_date->format('Y-m-d')); ?>">
                                </div>
                            </div>

                            <div class="col-md-6">
                                <div class="form-group">
                                    <label for="address"><?php echo app('translator')->get('app.status'); ?></label>
                                    <select name="status" id="status" class="form-control">
                                        <option <?php if($job->status == 'active'): ?> selected <?php endif; ?>
                                            value="active"><?php echo app('translator')->get('app.active'); ?></option>
                                        <option <?php if($job->status == 'inactive'): ?> selected <?php endif; ?>
                                            value="inactive"><?php echo app('translator')->get('app.inactive'); ?></option>
                                        
                                    </select>
                                </div>
                            </div>
                            <div class="col-md-6">
                                <div class="form-group">
                                    <label for="address"><?php echo app('translator')->get('modules.jobs.jobType'); ?></label>
                                    <a href="javascript:;" title="<?php echo app('translator')->get('app.add'); ?> <?php echo app('translator')->get('modules.jobs.jobType'); ?>" id="addJobType"
                                        class="btn btn-sm btn-info btn-outline"><i class="fa fa-plus"></i></a>
                                        <label class="mr-4 ml-2 ">
                                            <div class="icheckbox_flat-green" aria-checked="false"
                                                aria-disabled="false" style="position: relative;">
                                                <input <?php if($job->show_job_type): ?> checked <?php endif; ?> type="checkbox" value="yes" name="show_job_type"
                                                    class="flat-red"
                                                    style="position: absolute; opacity: 0;">
                                                <ins class="iCheck-helper"
                                                    style="position: absolute; top: 0%; left: 0%; display: block; width: 100%; height: 100%; margin: 0px; padding: 0px; background: rgb(255, 255, 255); border: 0px; opacity: 0;"></ins>
                                            </div>
                                            <?php echo app('translator')->get('modules.jobs.showJobType'); ?> </label>

                                    <select name="job_type_id" id="name" class="form-control">
                                        
                                        <?php $__currentLoopData = $jobTypes; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $jobType): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                            <option <?php if($jobType->id == $job->job_type_id): ?> selected <?php endif; ?> value="<?php echo e($jobType->id); ?>"><?php echo e($jobType->job_type); ?></option>
                                        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                    </select>
                                </div>
                            </div>

                            <div class="col-md-6">
                                <div class="form-group">
                                    <label for="address"><?php echo app('translator')->get('modules.jobs.workExperience'); ?></label>
                                    <a href="javascript:;" title="<?php echo app('translator')->get('app.add'); ?> <?php echo app('translator')->get('modules.jobs.workExperience'); ?>"
                                        id="addWorkExperience" class="btn btn-sm btn-info btn-outline"><i
                                            class="fa fa-plus"></i></a>
                                            <label class="mr-4 ml-2 ">
                                                <div class="icheckbox_flat-green" aria-checked="false"
                                                    aria-disabled="false" style="position: relative;">
                                                    <input <?php if($job->show_work_experience): ?> checked <?php endif; ?> type="checkbox" value="yes" name="show_work_experience"
                                                        class="flat-red"
                                                        style="position: absolute; opacity: 0;">
                                                    <ins class="iCheck-helper"
                                                        style="position: absolute; top: 0%; left: 0%; display: block; width: 100%; height: 100%; margin: 0px; padding: 0px; background: rgb(255, 255, 255); border: 0px; opacity: 0;"></ins>
                                                </div>
                                                <?php echo app('translator')->get('modules.jobs.showWorkExperience'); ?> </label>

                                    <select name="work_experience_id" id="name" class="form-control">
                                        <?php $__currentLoopData = $workExperiences; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $workExperience): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                            <option <?php if($workExperience->id == $job->work_experience_id): ?> selected <?php endif; ?> value="<?php echo e($workExperience->id); ?>">
                                                <?php echo e($workExperience->work_experience); ?></option>
                                        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                    </select> 
                                </div>
                            </div>

                            <div class="col-md-6">
                                <div class="form-group">
                                    <label for="address" class="required"><?php echo app('translator')->get('modules.jobs.showPayBy'); ?></label>
                                    <label class="mr-4 ml-2 ">
                                        <div class="icheckbox_flat-green" aria-checked="false"
                                            aria-disabled="false" style="position: relative;">
                                            <input <?php if($job->show_salary): ?> checked <?php endif; ?> type="checkbox" value="yes" name="show_salary"
                                                class="flat-red"
                                                style="position: absolute; opacity: 0;">
                                            <ins class="iCheck-helper"
                                                style="position: absolute; top: 0%; left: 0%; display: block; width: 100%; height: 100%; margin: 0px; padding: 0px; background: rgb(255, 255, 255); border: 0px; opacity: 0;"></ins>
                                        </div>
                                        <?php echo app('translator')->get('modules.jobs.showSalary'); ?> </label>
                                    <select class="form-control select-picker" name="pay_type" id="paytype"
                                        data-live-search="true">
                                        <option <?php if($job->pay_type == 'Range'): ?> selected <?php endif; ?>  value="Range"><?php echo app('translator')->get('modules.jobs.range'); ?></option>
                                        <option <?php if($job->pay_type == 'Starting'): ?> selected <?php endif; ?> value="Starting"><?php echo app('translator')->get('modules.jobs.startingSalary'); ?></option>
                                        <option <?php if($job->pay_type == 'Maximum'): ?> selected <?php endif; ?> value="Maximum"><?php echo app('translator')->get('modules.jobs.maximumSalary'); ?></option>
                                        <option <?php if($job->pay_type == 'Exact Amount'): ?> selected <?php endif; ?> value="Exact Amount"><?php echo app('translator')->get('modules.jobs.exactSalary'); ?></option>
                                    </select>

                                </div>
                            </div>
                            <div class="col-md-12" id="amount_field">
                                <div class="row">
                                    <div class="col-md-6" id="start_amt">
                                        <div class="form-group">
                                            <label for="address" class="required"><?php echo app('translator')->get('modules.jobs.startingSalary'); ?></label>
                                            <input class="form-control" type="number" id="startingSalary"
                                                name="starting_salary" value="<?php echo e($job->starting_salary); ?>">
                                        </div>
                                    </div>
                                    <div class="col-md-6" id="end_amt">
                                        <div class="form-group">
                                            <label for="address" class="required"><?php echo app('translator')->get('modules.jobs.maximumSalary'); ?></label>
                                            <input class="form-control" type="number" id="maximunSalary"
                                                name="maximum_salary" value="<?php echo e($job->maximum_salary); ?>">
                                        </div>
                                    </div>
                                </div>
                            </div>
                            <div class="col-md-6 pay_according" id="payaccording">
                                <div class="form-group">
                                    <label for="payaccording" class="required"><?php echo app('translator')->get('modules.jobs.rate'); ?></label>
                                    <select class="form-control select-picker" name="pay_according"
                                    id="pay_according" data-live-search="true">
                                    <option <?php if($job->pay_according == 'Hour'): ?> selected <?php endif; ?>   value="Hour"><?php echo app('translator')->get('modules.jobs.hour'); ?></option>
                                    <option <?php if($job->pay_according == 'Day'): ?> selected <?php endif; ?>  value="Day"><?php echo app('translator')->get('modules.jobs.day'); ?></option>
                                    <option <?php if($job->pay_according == 'Week'): ?> selected <?php endif; ?>  value="Week"><?php echo app('translator')->get('modules.jobs.week'); ?></option>
                                    <option <?php if($job->pay_according == 'Month'): ?> selected <?php endif; ?>  value="Month"><?php echo app('translator')->get('modules.jobs.month'); ?></option>
                                    <option <?php if($job->pay_according == 'Year'): ?> selected <?php endif; ?> value="Year"><?php echo app('translator')->get('modules.jobs.year'); ?></option>
                                </select>
                                </div>
                            </div>

                            <div class="col-md-12">
                                <div class="form-group">
                                    <label for="meta-title"><?php echo app('translator')->get('modules.jobs.metaTitle'); ?></label>
                                    <input type="text" id="meta-title" class="form-control" name="meta_title" value="<?php echo e($job->meta_details['title'] ?? ""); ?>">
                                </div>
                            </div>
                            
                            <div class="col-md-12">
                                <div class="form-group">
                                    <label for="meta-description"><?php echo app('translator')->get('modules.jobs.metaDescription'); ?></label>
                                    <textarea id="meta-description" class="form-control" name="meta_description" rows="3"><?php echo e($job->meta_details['description'] ?? ""); ?></textarea>
                                </div>
                            </div>

                            <hr>

                            <div class="col-md-12">
                                <?php if(count($questions) > 0): ?>
                                <h4 class="m-b-0 m-l-10 box-title"><?php echo app('translator')->get('modules.front.questions'); ?></h4>
                                <?php endif; ?>
                                <?php $__empty_1 = true; $__currentLoopData = $questions; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $question): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?>
                                    <div class="form-group col-md-6">
                                        <label class="">
                                            <div class="icheckbox_flat-green" aria-checked="false" aria-disabled="false"
                                                style="position: relative;">
                                                <input <?php if(in_array($question->id, $jobQuestion)): ?> checked <?php endif; ?>
                                                type="checkbox" value="<?php echo e($question->id); ?>" name="question[]" class="flat-red"
                                                style="position: absolute; opacity: 0;">
                                                <ins class="iCheck-helper"
                                                    style="position: absolute; top: 0%; left: 0%; display: block; width: 100%; height: 100%; margin: 0px; padding: 0px; background: rgb(255, 255, 255); border: 0px; opacity: 0;"></ins>
                                            </div>
                                            <?php echo e(ucfirst($question->question)); ?> <?php if($question->required ==
                                            'yes'): ?>(<?php echo app('translator')->get('app.required'); ?>)<?php endif; ?>
                                        </label>
                                    </div>
                                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?>
                                <?php endif; ?>
                            </div>

                            <div class="col-md-12">
                                <div id="columns">
                                    <label><?php echo app('translator')->get('app.askApplicantsFor'); ?></label>
                                    <div class="form-group form-group-inline">
                                        <?php if($job->required_columns): ?>
                                            <?php $__currentLoopData = $job->required_columns; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $key => $value): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                            <label class="mr-4">
                                                <div class="icheckbox_flat-green" aria-checked="false" aria-disabled="false"
                                                    style="position: relative;">
                                                    <input <?php if($value): ?> checked <?php endif; ?> type="checkbox" value="<?php echo e($key); ?>"
                                                        name="<?php echo e($key); ?>" class="flat-red"
                                                        style="position: absolute; opacity: 0;">
                                                    <ins class="iCheck-helper"
                                                        style="position: absolute; top: 0%; left: 0%; display: block; width: 100%; height: 100%; margin: 0px; padding: 0px; background: rgb(255, 255, 255); border: 0px; opacity: 0;"></ins>
                                                </div>
                                                <?php echo e(ucfirst(__($requiredColumns[$key]))); ?>

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

                            <div class="col-md-12">
                                <div id="columns">
                                    <label><?php echo app('translator')->get('modules.jobs.sectionVisibility'); ?></label>
                                    <div class="form-group form-group-inline">
                                        <?php if($job->required_columns): ?>
                                        <?php $__currentLoopData = $job->section_visibility; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $key => $value): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                        <label class="mr-4">
                                            <div class="icheckbox_flat-green" aria-checked="false" aria-disabled="false"
                                                style="position: relative;">
                                                <input <?php if($value == 'yes'): ?> checked <?php endif; ?> type="checkbox" value="yes"
                                                    name="<?php echo e($key); ?>" class="flat-red"
                                                    style="position: absolute; opacity: 0;">
                                                <ins class="iCheck-helper"
                                                    style="position: absolute; top: 0%; left: 0%; display: block; width: 100%; height: 100%; margin: 0px; padding: 0px; background: rgb(255, 255, 255); border: 0px; opacity: 0;"></ins>
                                            </div>
                                            <?php echo e(ucfirst(__($sectionVisibility[$key]))); ?>

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


                        <button type="button" id="save-form" class="btn btn-success">
                            <i class="fa fa-check"></i> 
                            <?php echo app('translator')->get('app.save'); ?>
                        </button>

                    </form>
                </div>
            </div>
        </div>
    </div>

    
    <div class="modal fade bs-modal-md in" id="addDepartmentModal" role="dialog" aria-labelledby="myModalLabel"
        aria-hidden="true">
        <div class="modal-dialog modal-lg" id="modal-data-application">
            <div class="modal-content">
                <div class="modal-header">
                    <h4 class="modal-title"><i class="icon-plus"></i> <?php echo app('translator')->get('app.department'); ?></h4>
                    <button type="button" class="close" data-dismiss="modal" aria-hidden="true"><i
                            class="fa fa-times"></i></button>
                </div>
                <div class="modal-body">
                    Loading...
                </div>
                <div class="modal-footer">
                    <button type="button" class="btn default" data-dismiss="modal">Close</button>
                    <button type="button" class="btn blue">Save changes</button>
                </div>
            </div>
            <!-- /.modal-content -->
        </div>
        <!-- /.modal-dialog -->
    </div>
    
<?php $__env->stopSection(); ?>

<?php $__env->startPush('footer-script'); ?>
    <script src="<?php echo e(asset('assets/node_modules/select2/dist/js/select2.full.min.js')); ?>"
            type="text/javascript"></script>
    <script src="<?php echo e(asset('assets/node_modules/bootstrap-select/bootstrap-select.min.js')); ?>" type="text/javascript"></script>
    <script src="<?php echo e(asset('assets/node_modules/html5-editor/wysihtml5-0.3.0.js')); ?>" type="text/javascript"></script>
    <script src="<?php echo e(asset('assets/node_modules/html5-editor/bootstrap-wysihtml5.js')); ?>" type="text/javascript"></script>
    <script src="<?php echo e(asset('assets/node_modules/moment/moment.js')); ?>" type="text/javascript"></script>
    <script src="<?php echo e(asset('assets/node_modules/bootstrap-material-datetimepicker/js/bootstrap-material-datetimepicker.js')); ?>" type="text/javascript"></script>
    <script src="<?php echo e(asset('assets/node_modules/multiselect/js/jquery.multi-select.js')); ?>"></script>
    <script src="<?php echo e(asset('assets/plugins/iCheck/icheck.min.js')); ?>"></script>

    <script>
        //Flat red color scheme for iCheck
        $('input[type="checkbox"].flat-red').iCheck({
            checkboxClass: 'icheckbox_flat-blue',
        })

        // For select 2
        $(".select2").select2();

       
        
        $('#date-start').bootstrapMaterialDatePicker({ weekStart : 0, time: false }).on('change', function(e, date)
        {
            
            $('#date-end').bootstrapMaterialDatePicker('setMinDate', date);
            $('#date-end').val(moment(date).format('YYYY-MM-DD'));
        });
        $('#date-end').bootstrapMaterialDatePicker({ weekStart : 0, time: false }).on('change', function()
        {
            var pickDate = $( "#date-start" ).val();
            $('#date-end').bootstrapMaterialDatePicker('setMinDate', pickDate);
        });
        var jobDescription = $('#job_description').wysihtml5({
            "font-styles": true, //Font styling, e.g. h1, h2, etc. Default true
            "emphasis": true, //Italics, bold, etc. Default true
            "lists": true, //(Un)ordered lists, e.g. Bullets, Numbers. Default true
            "html": true, //Button which allows you to edit the generated HTML. Default false
            "link": true, //Button to insert a link. Default true
            "image": true, //Button to insert an image. Default true,
            "color": true, //Button to change color of font
            stylesheets: ["<?php echo e(asset('assets/node_modules/html5-editor/wysiwyg-color.css')); ?>"], // (path_to_project/lib/css/wysiwyg-color.css)

        });

        $('#job_requirement').wysihtml5({
            "font-styles": true, //Font styling, e.g. h1, h2, etc. Default true
            "emphasis": true, //Italics, bold, etc. Default true
            "lists": true, //(Un)ordered lists, e.g. Bullets, Numbers. Default true
            "html": true, //Button which allows you to edit the generated HTML. Default false
            "link": true, //Button to insert a link. Default true
            "image": true, //Button to insert an image. Default true,
            "color": true, //Button to change color of font
            stylesheets: ["<?php echo e(asset('assets/node_modules/html5-editor/wysiwyg-color.css')); ?>"], // (path_to_project/lib/css/wysiwyg-color.css)

        });


        $('#category_id').change(function () {

            var id = $(this).val();

            var url = "<?php echo e(route('admin.job-categories.getSkills', ':id')); ?>";
            url = url.replace(':id', id);

            $.easyAjax({
                url: url,
                success: function (response) {
                    $('#job_skills').html(response.data);
                    $(".select2").select2();
                }
            })
        });

        if($('#paytype').val() != 'Range')
        {
            $('#end_amt').hide();

            switch($('#paytype').val())
            {
                case 'Starting' : $('#start_amt label').html("<?php echo e(__('modules.jobs.startingSalary')); ?>");
                    break;
                case 'Maximum' : $('#start_amt label').html("<?php echo e(__('modules.jobs.maximumSalary')); ?>");
                    break;
                case 'Exact Amount' : $('#start_amt label').html("<?php echo e(__('modules.jobs.exactSalary')); ?>");
                    break;
            }
        }
        else
        {
            $('#start_amt').removeClass('col-md-12');
            $('#start_amt').addClass('col-md-6');
            
        }

        $('#paytype').change(function() {
            if ($('#paytype').val() != 'Range') {
                $('#amount_field, #payaccording').show();
                $('#end_amt').hide();

                switch ($('#paytype').val()) {
                    case 'Starting':
                        
                        $('#start_amt label').html("<?php echo e(__('modules.jobs.startingSalary')); ?>");
                        break;
                    case 'Maximum':
                        $('#start_amt label').html("<?php echo e(__('modules.jobs.maximumSalary')); ?>");
                        break;
                    case 'Exact Amount':
                        $('#start_amt label').html("<?php echo e(__('modules.jobs.exactSalary')); ?>");
                        break;
                }
            } else {
                $('#start_amt label').html("<?php echo e(__('modules.jobs.startingSalary')); ?>");
                $('#amount_field, #end_amt, #payaccording').show();
                $('#start_amt').removeClass('col-md-12');
                $('#start_amt').addClass('col-md-6');
            }

        });

        $('#save-form').click(function () {

            $.easyAjax({
                url: '<?php echo e(route('admin.jobs.update', $job->id)); ?>',
                container: '#createForm',
                type: "POST",
                redirect: true,
                data: $('#createForm').serialize()
            })
        });
    $(document).ready(function() {

    $('#addJobType').click(function() {
        var url = "<?php echo e(route('admin.job-type.create')); ?>";
        $('.modal-title').html("<i class='icon-plus'></i> <?php echo app('translator')->get('modules.jobs.jobType'); ?>");
        $.ajaxModal('#addDepartmentModal', url);
    });

    $('#addWorkExperience').click(function() {
        var url = "<?php echo e(route('admin.work-experience.create')); ?>";
        $('.modal-title').html("<i class='icon-plus'></i> <?php echo app('translator')->get('modules.jobs.workExperience'); ?>");
        $.ajaxModal('#addDepartmentModal', url);
    });

 });
    </script>
<?php $__env->stopPush(); ?>
<?php echo $__env->make('layouts.app', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /home/hoseadevimcon/hr.hosea.dev-imcon.com/resources/views/admin/jobs/edit.blade.php ENDPATH**/ ?>