<section class="content-header">
    <h1>
        <?php echo app('translator')->getFromJson('front.edit'); ?> 
        <small>
            <?php echo e($row->id); ?>

        </small>
        <button type="button" class="close" data-dismiss="modal" aria-hidden="true"><i class="fa fa-times"></i></button>
    </h1>
</section>
<form action="<?php echo e(route('reservations.update',$row)); ?>" method="post">
    <?php echo e(csrf_field()); ?>

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

    <section class="content">
        <div class="box box-primary">
            <div class="box-body">
                <div class="row">
                    <div class="col-md-6">
                        <div class="form-group">
                            <label>الموظف</label>
                            <select name="employee_id" class="form-control select2" required="required">
                                <option value="">--- الموظف ---</option>
                                <?php $__currentLoopData = $employees; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $id=>$name): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                    <option <?php echo e($row->employee_id==$id?'selected':''); ?> value="<?php echo e($id); ?>"><?php echo e($name); ?>

                                    </option>
                                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                            </select>
                        </div>
                    </div>
                    <div class="col-md-6">
                        <div class="form-group">
                            <label>الخدمة</label>
                            <select name="product_id" class="form-control select2" required="required">
                                <option value="">--- الخدمة ---</option>
                                <?php $__currentLoopData = $services; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $service): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                    <option <?php echo e($row->product_id==$service->id?'selected':''); ?> value="<?php echo e($service->id); ?>"><?php echo e($service->name); ?>

                                    </option>
                                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                            </select>
                        </div>
                    </div>
                    <div class="col-md-6">
                        <div class="form-group">
                            <label>التاريخ والوقت</label>
                            <input name="serive_datetime" value="<?php echo e($row->serive_datetime); ?>" type="datetime-local" class="form-control" />
                        </div>
                    </div>
                    <div class="col-md-6">
                        <div class="form-group">
                            <label>سعر الخدمة</label>
                            <input name="price" value="<?php echo e($row->price); ?>" step="any" type="number" class="form-control" />
                        </div>
                    </div>
                    <div class="col-md-12">
                        <div class="form-group">
                            <label>الحالة</label>
                            <?php 
                                $statusList = ['معلق','جارى العمل','مكتمله','مؤجله'];
                            ?>
                            <select name="status" class="form-control">
                                <option value="">--- إختر الحالة ---</option>
                                <?php $__currentLoopData = $statusList; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $st): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                    <option <?php echo e($row->status==$st?'selected':''); ?> value="<?php echo e($st); ?>"><?php echo e($st); ?></option>
                                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                            </select>
                        </div>
                    </div>
                    <div class="col-md-12">
                        <div class="form-group">
                            <label>ملحوظة</label>
                            <input name="comment" value="<?php echo e($row->comment); ?>" type="text" class="form-control" />
                        </div>
                    </div>
                </div>
            </div>
            <div class="box-footer">
                <button type="submit" class="btn btn-primary"><?php echo app('translator')->getFromJson('front.save'); ?></button>
            </div>
        </div>
    </section>                                    
</form>

<script>
    // $(".select2").select2({
    //     allowClear: true,
    //     width:'100%'
    // });
</script>