
<?php $__env->startSection('title','Kunjungan'); ?>
<?php $__env->startSection('content'); ?>
        
        <div class="breadcrumbs">
            <div class="breadcrumbs-inner">
                <div class="row m-0">
                    <div class="col-sm-4">
                        <div class="page-header float-left">
                            <div class="page-title">
                                <h1>Kunjungan</h1>
                            </div>
                        </div>
                    </div>
                    <div class="col-sm-8">
                        <div class="page-header float-right">
                            <div class="page-title">
                                <ol class="breadcrumb text-right">
                                    <li><a href="#">Master</a></li>
                                    <li><a href="#">Kunjungan</a></li>
                                    <li class="active">Ubah Kunjungan</li>
                                </ol>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <!-- Content -->
        <div class="content">
            <div class="animated fadeIn">
                <div class="row">

                    <div class="col-md-12">
                        <div class="card">
                            <div class="card-header">
                                <strong class="card-title">Ubah Kunjungan</strong>
                            </div>
                            <div class="card-body card-block">
                                <form action="<?php echo e(route('kunjungan.update', ['kunjungan' => $komplain['id']])); ?>" method="post" enctype="multipart/form-data" class="form-horizontal">
                                    <?php echo csrf_field(); ?>
                                    <?php echo method_field('PUT'); ?>
                                    <div class="row form-group">
                                        <div class="col col-md-2"><label for="text-input" class=" form-control-label">Customer</label></div>
                                        <div class="col-12 col-md-7">
                                            <select class="form-control" name="id_customer" id="id_customer" onchange="pilihPerusahaan(this.value)">
                                               
                                                
                                            </select>
                                        </div>
                                    </div>


                                    <div class="row form-group">
                                        <div class="col col-md-2"><label for="text-input" class=" form-control-label">Lokasi</label></div>
                                        <div class="col-12 col-md-7">
                                            <select name="id_lokasi" id="id_lokasi" class="form-control" required>
                                                <?php $__currentLoopData = $lokasi; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $lok): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                                    <option <?php echo e($komplain->id_lokasi == $lok['id']?'selected':''); ?> value="<?php echo e($lok['id']); ?>"><?php echo e($lok['alamat']); ?></option>
                                                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                            </select>
                                        </div>
                                    </div>

                                    

                                   <hr style="border: 1px solid black">
                                    Jadwalkan Teknisi
                                    <hr>
                                    <div class="row form-group">
                                        <div class="col col-md-2"><label for="text-input" class=" form-control-label">Tanggal Mulai</label></div>
                                        <div class="col-12 col-md-3">
                                            <input type="date" id="text-input" name="tgl_mulai" value="<?php echo e($komplain->tgl_mulai); ?>" class="form-control">
                                        </div>
                                        <div class="col col-md-2"><label for="text-input" class=" form-control-label">Tanggal Selesai</label></div>
                                        <div class="col-12 col-md-3">
                                            <input type="date" id="text-input" name="tgl_selesai" value="<?php echo e($komplain->tgl_selesai); ?>" class="form-control">
                                        </div>
                                    </div>

                                     <div class="row form-group">
                                        <div class="col col-md-2"><label for="multiple-select" class=" form-control-label">Teknisi</label></div>
                                        <div class="col col-md-9">
                                            <select data-placeholder="Pilih Teknisi..." multiple class="form-control standardSelect" name="teknisi[]" required>
                                                <option value="" label="default"></option>
                                                <?php $__currentLoopData = $teknisi; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $item): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                                    <?php
                                                        $selected = null;
                                                    ?>
                                                    <?php $__currentLoopData = $jadwal_teknisi; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $jad): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                                        
                                                        <?php if($item->id == $jad['id_user']): ?>
                                                            <?php
                                                                $selected = 'selected';
                                                            ?>
                                                        <?php endif; ?>
                                                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                                    <option <?php echo e($selected); ?> value="<?php echo e($item->id); ?>"><?php echo e($item->nama_lengkap); ?></option>
                                                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                                
                                                
                                            </select>
                                        </div>
                                    </div>

                                    <div class="row form-group">
                                        <div class="col col-md-2"><label for="text-input" class=" form-control-label">Catatan</label></div>
                                        <div class="col-12 col-md-10">
                                            <input type="text" id="text-input" name="catatan" value="<?php echo e($komplain->catatan); ?>" class="form-control">
                                        </div>
                                    </div>

                                    
                                    

                                    <button type="submit" class="btn btn-primary">
                                        Simpan
                                    </button>
                                    <a href="<?php echo e(route('kunjungan.index')); ?>" class="btn btn-default">
                                        Batal
                                    </button>
                                </form>
                            </div>
                           
                        </div>
                    </div>


                </div>
            </div><!-- .animated -->
        </div><!-- .content -->
        <!-- /.content -->
<?php $__env->startSection('js'); ?>
<script>
    jQuery(document).ready(function() {
        jQuery(".standardSelect").chosen({
            disable_search_threshold: 10,
            no_results_text: "Oops, nothing found!",
            width: "100%"
        });
    });

</script>
<?php $__env->stopSection(); ?>
<?php $__env->stopSection(); ?>
<?php echo $__env->make('layouts.master', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /home3/baktijay/public_html/ptgib.co.id/admin/resources/views/data_transaksi/kunjungan/view.blade.php ENDPATH**/ ?>