<?php $__env->startSection('main-container'); ?>
<main id="main" class="main">
<?php echo $__env->make('cdn', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>

<div class="row page-titles mx-0">

    <div class="col-sm-6 p-md-0">

        <div class="breadcrumb-range-picker">

             <h3>Shop Setting</h3>

        </div>

    </div>

</div>



<div class="content-wrapper mt-4">

    <?php echo $__env->make('flash_msg', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>

    <div class="row">

        <div class="col-12">

            <div class="card">
                
                <div class="card-header">
                    User Info
                </div>

                <div class="card-body">

                    <form action="<?php echo e(route('seller.user.update.setting',$user->id)); ?>" method="POST" class="form-sample" enctype="multipart/form-data">
                            <?php echo e(csrf_field()); ?>


                        <!-- Modal body -->
                        <div class="row">

                            <div class="form-group col-lg-6">
                              <label>Name<span class="text-danger">*</span></label>
                              <input type="text" class="form-control" name="name" value="<?php echo e($user->name); ?>" placeholder="Name" required>
                              <span class="text-danger"> <?php $__errorArgs = ['name'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?><?php echo e($message); ?><?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?> </span>
                            </div>

                             <div class="form-group col-lg-6">
                                <label>Mobile<span class="text-danger">*</span></label>
                                <input type="text" class="form-control" name="mobile" value="<?php echo e($user->mobile); ?>" placeholder="Enter Mobile No" required>
                                <span class="text-danger"> <?php $__errorArgs = ['mobile'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?><?php echo e($message); ?><?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?> </span>
                            </div>

                            <div class="form-group col-lg-6">
                                <label>Email<span class="text-danger">*</span></label>
                                <input type="email" class="form-control" name="email" value="<?php echo e($user->email); ?>" placeholder="Enter Email Id" required>
                                <span class="text-danger"> <?php $__errorArgs = ['email'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?><?php echo e($message); ?><?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?> </span>
                            </div>

                            <div class="form-group col-lg-6">
                                <label>Group </label>
                                 <select class=" form-control dropdown-toggle" name="group" type="button" data-toggle="dropdown">
                                    <option value="">Select Group</option>
                                    <?php $__currentLoopData = $groups; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $group): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                    <option value="<?php echo e($group->id); ?>" <?php echo e($group->id==$user->group?'selected':''); ?>><?php echo e($group->name); ?></option>
                                      <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                  </select>
                                <span class="text-danger"><?php $__errorArgs = ['group'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?><?php echo e($message); ?><?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?></span>
                            </div>

                            <div class="form-group col-lg-6">
                                <label>DOB</label>
                                <input type="date" class="form-control" name="dob" value="<?php echo e($user->DOB); ?>" placeholder="Enter date of birth">
                                <span class="text-danger"> <?php $__errorArgs = ['dob'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?><?php echo e($message); ?><?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?> </span>
                            </div>

                            <div class="form-group col-lg-6">
                                <label for="state">State</label>
                                <select class="form-control" id="state-dropdown" name="state">
                                    <option value="">Select State</option>
                                    <?php $__currentLoopData = $states; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $state): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                    <option value="<?php echo e($state->id); ?>" <?php echo e($state->id==$user->state?'selected':''); ?>><?php echo e($state->name); ?></option>
                                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                </select>
                            </div>

                            <div class="form-group col-lg-6">
                                <label for="city">City</label>
                                <select class="form-control" id="city-dropdown" name="city">
                                    <option value="">Select City</option>
                                    <?php $__currentLoopData = $cities; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $city): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                    <option value="<?php echo e($city->id); ?>" <?php echo e($city->id==$user->city?'selected':''); ?>><?php echo e($city->name); ?></option>
                                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                </select>
                            </div>


                            <div class="form-group col-lg-6">
                                <label>Pincode</label>
                                <input type="number" class="form-control" name="pincode" value="<?php echo e($user->pincode); ?>" placeholder="Enter Pincode">
                                <span class="text-danger"> <?php $__errorArgs = ['pincode'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?><?php echo e($message); ?><?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?> </span>
                            </div>

                            <div class="form-group col-lg-6">
                                <label>Profile</label>
                                <input type="file" class="form-control" name="profile" placeholder="Enter profile">
                                <span class="text-danger"> <?php $__errorArgs = ['profile'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?><?php echo e($message); ?><?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?> </span>
                            </div>

                            <div class="form-group col-lg-6">
                                <?php if($user->profile): ?>
                                <img class="mt-2" alt="avatar1" src="<?php echo e(url('public/Image/'.$user->profile)); ?>"style="height:100px;">
                                <?php endif; ?>
                            </div>

                            <div class="form-group col-lg-12">

                                <label>Bank Details </label>

                                <textarea class="form-control ckeditor" name="bank_details" placeholder="Enter Bank Details"><?php echo e($user->bank_details); ?></textarea>

                                <span class="text-danger"> <?php $__errorArgs = ['bank_details'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?><?php echo e($message); ?><?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?> </span>

                            </div>


                            <div class="text-center">
                                <button type="submit"  class="btns primary-btn" style="margin-right:7px;">Submit</button>
                            </div>

                        </div>

                    </form>

                </div>

            </div>

        </div>

        <div class="col-12">

            <div class="card">
                
                <div class="card-header">
                    Shop Info
                </div>

                <div class="card-body">

                    <form action="<?php echo e(route('seller.company.update.setting',$company->id)); ?>" method="POST" class="form-sample" enctype="multipart/form-data">
                            <?php echo e(csrf_field()); ?>


                        <!-- Modal body -->
                        <div class="row">

                            <div class="form-group col-lg-6">
                              <label>Name<span class="text-danger">*</span></label>
                              <input type="text" class="form-control" name="name" value="<?php echo e($company->name); ?>" placeholder="Name" required>
                              <span class="text-danger"> <?php $__errorArgs = ['name'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?><?php echo e($message); ?><?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?> </span>
                            </div>

                            <div class="form-group col-lg-6">
                                <label>GST</label>
                                <input type="text" class="form-control" name="GST" value="<?php echo e($company->GST); ?>" placeholder="Enter GST">
                                <span class="text-danger"> <?php $__errorArgs = ['GST'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?><?php echo e($message); ?><?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?> </span>
                            </div>

                            <div class="form-group col-lg-6">
                                <label for="state">State</label>
                                <select class="form-control" id="state-dropdown" name="state">
                                    <option value="">Select State</option>
                                    <?php $__currentLoopData = $states; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $state): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                    <option value="<?php echo e($state->id); ?>" <?php echo e($state->id==$company->state?'selected':''); ?>><?php echo e($state->name); ?></option>
                                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                </select>
                            </div>

                            <div class="form-group col-lg-6">
                                <label for="city">City</label>
                                <select class="form-control" id="city-dropdown" name="city">
                                    <option value="">Select City</option>
                                    <?php $__currentLoopData = $cities; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $city): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                    <option value="<?php echo e($city->id); ?>" <?php echo e($city->id==$company->city?'selected':''); ?>><?php echo e($city->name); ?></option>
                                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                </select>
                            </div>

                            <div class="form-group col-lg-6">

                                <label>Address </label>

                                <textarea class="form-control" name="address" placeholder="Enter Bank Details"><?php echo e($company->address); ?></textarea>

                                <span class="text-danger"> <?php $__errorArgs = ['address'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?><?php echo e($message); ?><?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?> </span>

                            </div>

                            <div class="form-group col-lg-6">
                                <label>Logo</label>
                                <input type="file" class="form-control" name="logo" placeholder="Enter logo">
                                <span class="text-danger"> <?php $__errorArgs = ['logo'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?><?php echo e($message); ?><?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?> </span>
                                <?php if($company->logo): ?>
                                <img class="mt-2" alt="avatar1" src="<?php echo e(url('public/Image/'.$company->logo)); ?>"style="height:100px;">
                                <?php endif; ?>
                            </div>


                            <div class="text-center">
                                <button type="submit"  class="btns primary-btn" style="margin-right:7px;">Submit</button>
                            </div>

                        </div>

                    </form>

                </div>

            </div>

        </div>

    </div>

</div>
</main><!-- End #main -->
<script src="//cdn.ckeditor.com/4.14.1/standard/ckeditor.js"></script>
<script src="https://code.jquery.com/jquery-3.5.1.min.js"></script>

<script type="text/javascript">
    $("document").ready(function(){
     setTimeout(function()
     {
         $("div.alert").remove();

     }, 3000);

    });

</script>

<script>
    $(document).ready(function() {
        $('#state-dropdown').on('change', function() {
            var state_id = this.value;
            $("#city-dropdown").html('');
            $.ajax({
                url:"<?php echo e(url('get-cities-by-state')); ?>",
                type: "POST",
                data: {
                    state_id: state_id,
                    _token: '<?php echo e(csrf_token()); ?>'
                },
                dataType : 'json',
                success: function(result) {
                    $.each(result.cities, function(key, value) {
                        $("#city-dropdown").append('<option value="'+value.id+'">'+value.name+'</option>');
                    });
                }
            });
        });
    });
</script>
 <?php $__env->stopSection(); ?>

 <script>
    $(document).ready(function() {
        $('#state-dropdown').on('change', function() {
            var state_id = this.value;
            $("#city-dropdown").html('');
            $.ajax({
                url:"<?php echo e(url('get-cities-by-state')); ?>",
                type: "POST",
                data: {
                    state_id: state_id,
                    _token: '<?php echo e(csrf_token()); ?>'
                },
                dataType : 'json',
                success: function(result) {
                    $.each(result.cities, function(key, value) {
                        $("#city-dropdown").append('<option value="'+value.id+'">'+value.name+'</option>');
                    });
                }
            });
        });
    });
</script>




<?php echo $__env->make('backend.company.layouts.main', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /home/vinecork/public_html/webdev/Company/resources/views/seller/shop_info.blade.php ENDPATH**/ ?>