

<?php $__env->startSection('Title'); ?>
    Dashboard |Restaurant
<?php $__env->stopSection(); ?>


<?php $__env->startSection('content'); ?>
<div class="content-header" style="display: flex;">

    <div class="container-fluid" style="display: flex;">
        <div class="toggl">
            <a class="nav-link togg" data-widget=""   id="cll" onclick="CloseNav();">
                <i class="fas fa-bars"></i>
                <span class="sr-only">Toggle navigation</span>
            </a>
            <a class="nav-link togg" data-widget="" id="open" onclick="openNav();">
                <i class="fas fa-bars"></i>
                <span class="sr-only">Toggle navigation</span>
            </a>
        </div>
        <div style="padding: auto 0px;">
         <h1 class="m-0 text-dark" style="font-weight: 700;">Edit Dish</h1>
         </div>
         </div>
</div>
<div class="container-fluid">
                    <!-- Small boxes (Stat box) -->
<div class="row">
	<div class="col-12">
		<!-- jquery validation -->
		<div class="card " style="margin-top: 10px;">
			<!-- <div class="card-header" style="background:#8141a1;">
				<h3 class="card-title" style="color: white;">Edit Dish</h3>
			</div> -->
			<!-- /.card-header -->
			<!-- form start -->
			<form role="form" id="createForm" method="POST" action="<?php echo e(route('update.dish-res')); ?>" enctype="multipart/form-data">
                <?php echo csrf_field(); ?>
                <input type="hidden" name="id" value="<?php echo e($dishes->id); ?>">
                <div class="card-body">
										 <div class="form-group row">
    <label for=restaurant_id class="col-sm-3 col-form-label">Restaurant
        <span class="text-danger">*</span>
            </label>
    <div class="col-sm-9 input-wrapper">
    <select name=restaurant_id class=" form-control select2" style="width: 100%;"  >
    <?php $__currentLoopData = $restaurants; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $restaurant): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> 
            <option value="<?php echo e($restaurant->id); ?>" <?php echo e($dishes->restaurant_id == $restaurant->id ? 'selected' : ''); ?>>
            <?php echo e($restaurant->name); ?></option>
        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
            </select>
</div>
</div>
					 <div class="form-group row">
    <label for=name class="col-sm-3 col-form-label">Dish Name
        <span class="text-danger">*</span>
            </label>
    <div class="col-sm-9 input-wrapper">
        <input type=text class="form-control" name=name id=name
            value="<?php echo e($dishes->name); ?>"  />
    </div>
</div>
					 <div class="form-group row">
    <label for=description class="col-sm-3 col-form-label">Dish Description
        <span class="text-danger">*</span>
            </label>
    <div class="col-sm-9 input-wrapper">
        <input type=text class="form-control" name=description id=description
            value="<?php echo e($dishes->description); ?>"  />
    </div>
</div>
					 <div class="form-group row">
    <label class="col-sm-3 col-form-label">Dish Image
        <span class="text-danger">*</span>
            </label>
    <div class="col-sm-9 input-group">
        <div class="custom-file">
            <input type="file" class="custom-file-input" id=image accept=image/* name=image onchange="showImage(this)"/>
            <label class="custom-file-label" for=image>Choose file</label>
        </div>
        <div class="input-group-append">
            <span class="input-group-text">Upload</span>
        </div>
        <h6 class="d-block w-100 mt-2 mb-0">File Size should be less than 2mb</h6>
        <img src="<?php echo e(asset('/upload/'.$dishes->image)); ?>" class="img-preview" id="show" height="150px" width="150px"/>
            </div>
</div>
					 <div class="form-group row">
    <label for=dish_category_id class="col-sm-3 col-form-label">Dish Category
            </label>
    <div class="col-sm-9 input-group">
    <select name=dish_category_id class=" form-control select2" style="width: 100%;">
        <?php $__currentLoopData = $dish_categories; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $dish_category): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> 
            <option value="<?php echo e($dish_category->id); ?>" <?php echo e($dishes->dish_category_id == $dish_category->id ? 'selected' : ''); ?>>
            <?php echo e($dish_category->name); ?></option>
        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
            </select>
</div>
</div> 
					 <div class="form-group row">
    <label for=addon_id class="col-sm-3 col-form-label">Extras
        <span class="text-danger">*</span>
            </label>
    <div class="col-sm-9 input-group">
    <select name=addon_id class="form-control select2" style="width: 100%;" >
        <?php $__currentLoopData = $addonscategories; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $addonscategory): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> 
            <option value="<?php echo e($addonscategory->id); ?>" <?php echo e($dishes->addons_category_id == $addonscategory->id ? 'selected' : ''); ?>>
            <?php echo e($addonscategory->name); ?></option>
        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
            </select>
</div>
</div>
					 <div class="form-group row">
    <label for=price class="col-sm-3 col-form-label">Price
        <span class="text-danger">*</span>
            </label>
    <div class="col-sm-9 input-wrapper">
        <input type=number class="form-control" name=price id=price
           value="<?php echo e($dishes->price); ?>"   step="1"   />
    </div>
</div>
					 <div class="form-group row">
    <label for=discount_price class="col-sm-3 col-form-label">Dicounted Price
            </label>
    <div class="col-sm-9 input-wrapper">
        <input type=number class="form-control" name=discount_price id=discount_price
           value="<?php echo e($dishes->price); ?>"   step="1"   />
    </div>
</div>
<div class="form-group row">
    <label for=calories class="col-sm-3 col-form-label">Calories
      
            </label>
    <div class="col-sm-9 input-wrapper">
        <input type=number class="form-control" name=calories id=calories
            value="<?php echo e($dishes->calories); ?>"   step="1" min="0"  />
    </div>
</div>
					 <div class="form-group row">
    <label for=protien class="col-sm-3 col-form-label">Protien 
            </label>
    <div class="col-sm-9 input-wrapper">
        <input type=number class="form-control" name=protien id=protien
            value="<?php echo e($dishes->protien); ?>"   step="1" min="0"  />
    </div>
</div>
<div class="form-group row">
    <label for=sodium class="col-sm-3 col-form-label">Sodium
      
            </label>
    <div class="col-sm-9 input-wrapper">
        <input type=number class="form-control" name=sodium id=sodium
            value="<?php echo e($dishes->sodium); ?>"   step="1" min="0"  />
    </div>
</div>
					 <div class="form-group row">
    <label for=cholesterol class="col-sm-3 col-form-label">Cholesterol 
            </label>
    <div class="col-sm-9 input-wrapper">
        <input type=number class="form-control" name=cholesterol id=cholesterol
            value="<?php echo e($dishes->cholesterol); ?>"   step="1" min="0"  />
    </div>
</div>
					 <div class="form-group row">
    <label for=is_veg class="col-sm-3 col-form-label">Vegetarian
            </label>
    <div class="col-sm-9 input-group  p-1">
    <label class="switch" >
        <input type="checkbox" name="is_veg" <?php echo e($dishes->is_veg == 'on' ? 'checked' : ''); ?> >
        <span class="slider round"></span>
    </label>
    </div>
</div>
					 <div class="form-group row">
    <label for=active class="col-sm-3 col-form-label">Active
            </label>
    <div class="col-sm-9 input-group  p-1">
        <label class="switch" >
            <input type="checkbox" name="active" <?php echo e($dishes->active == 'on' ? 'checked' : ''); ?> >
            <span class="slider round"></span>
        </label>
    </div>
</div>
				</div>
				<!-- /.card-body -->
				<div class="card-footer">
                <button type="submit" class="btn" style="background: #8141a1;color: white;">Submit</button>
				</div>
			</form>
		</div>
		<!-- /.card -->
	</div>
</div>
<!-- ./col -->
</div>
<!-- /.row -->
                </div>
<?php $__env->stopSection(); ?>

<?php $__env->startSection('scripts'); ?>

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

<?php echo $__env->make('layouts.master-res', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH E:\Laravel\03-03-2021\Restaurant4\Restaurant\resources\views/restaurant-owner/edit_dish.blade.php ENDPATH**/ ?>