
<?php $__env->startSection('title'); ?>
Sister Concern 
<?php $__env->stopSection(); ?>
<?php $__env->startSection('category'); ?>
 menu-item-active
<?php $__env->stopSection(); ?>
<?php $__env->startSection('css'); ?>
<link rel="stylesheet" href="http://cdn.bootcss.com/toastr.js/latest/css/toastr.min.css">
<link rel="stylesheet" href="https://cdn.datatables.net/1.10.24/css/jquery.dataTables.min.css">
<?php $__env->stopSection(); ?>
<?php $__env->startSection('content'); ?>
<div class="content d-flex flex-column flex-column-fluid" id="kt_content">
    <!--begin::Subheader-->
    <div class="subheader py-2 py-lg-4 subheader-solid" id="kt_subheader">
        <div class="container-fluid d-flex align-items-center justify-content-between flex-wrap flex-sm-nowrap">
            <!--begin::Info-->
            <div class="d-flex align-items-center flex-wrap mr-2">
                <!--begin::Page Title-->
                <h5 class="text-dark font-weight-bold mt-2 mb-2 mr-5">Dashboard</h5>
                <!--end::Page Title-->
                <!--begin::Actions-->
                <div class="subheader-separator subheader-separator-ver mt-2 mb-2 mr-4 bg-gray-200"></div>
                <h6 class="text-dark font-weight-bold mt-2 mb-2 mr-5">Sister Concern</h6>
                <!--end::Actions-->
            </div>
            <!--end::Info-->
        </div>
    </div>
    <!--end::Subheader-->
    <!--begin::Entry-->
    <div class="d-flex flex-column-fluid">
        <!--begin::Container-->
        <div class="container">
            <!--begin::Dashboard-->
            <!--begin::Row-->
            <div class="row">
                <div class="col-lg-12">
                    <div class="card card-custom">
					 	<div class="card-header">
						    <div class="card-title">
						   		<h3 class="card-label">All Sister Concern List</h3>
						    </div>

						    <div class="card-toolbar">
							   	<ul class="nav nav-bold nav-pills ml-auto">
								    <li class="nav-item">
								    	 <!-- Add Logo-->
					                    <button type="button" class="btn btn-primary" data-toggle="modal" data-target="#exampleModalLong">
					                        <i class="flaticon2-plus-1 icon-lg"></i> Add New Sister Concern
					                    </button>

					                    <!-- Modal-->
					                    <div class="modal fade" id="exampleModalLong" data-backdrop="static" tabindex="-1" role="dialog" aria-labelledby="staticBackdrop" aria-hidden="true">
					                        <div class="modal-dialog" role="document">
					                            <div class="modal-content">
					                                <div class="modal-header">
					                                    <h5 class="modal-title" id="exampleModalLabel">Create New Sister Concern</h5>
					                                    <button type="button" class="close" data-dismiss="modal" aria-label="Close">
					                                        <i aria-hidden="true" class="ki ki-close"></i>
					                                    </button>
					                                </div>
					                                <div class="modal-body">
					                                   	<form action="<?php echo e(url('admin/post/category')); ?>" method="POST" enctype="multipart/form-data">
					                                   		<?php echo csrf_field(); ?>
					                            <div class="form-group">
												   <label>Sister Concern Name:</label>
												   <input type="text" class="form-control form-control-solid" name="category_name" />
												   <span class="form-text text-muted">Please enter your Sister Concern Name</span>
												   <?php $__errorArgs = ['category_name'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
												   <div class="alert alert-danger">
												   		<strong><?php echo e($mesage); ?></strong>
												   </div>
												   <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
											  	</div>
											  	<div class="form-group">
												   <label>Business Type:</label>
												   <input type="text" class="form-control form-control-solid" name="business_type" />
												   <span class="form-text text-muted">Ex: Products/Services</span>
												   <?php $__errorArgs = ['business_type'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
												   <div class="alert alert-danger">
												   		<strong><?php echo e($mesage); ?></strong>
												   </div>
												   <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
											  	</div>
					                            <div class="form-group">
														<label>Sister Concern Photo Browser</label>
														<div></div>
														<div class="custom-file">
															<input type="file" class="custom-file-input" id="customFile" name="image" id="profile-img" onchange="preview_image(event)"/>
															<label class="custom-file-label" for="customFile">Choose file</label>
															<img src="" id="output_image" width="100px" style="padding-top: 5px;" />
														</div>
												</div>
												<?php $__errorArgs = ['image'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
												   <div class="alert alert-danger">
												   		<strong><?php echo e($mesage); ?></strong>
												   </div>
												   <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
												   
												   
												
					                            <div class="form-group mt-4">
														<label>Sister Concern Logo Browser</label>
														<div></div>
														<div class="custom-file">
															<input type="file" class="custom-file-input" id="customFile" name="cat_logo" id="profile-img" onchange="preview_image(event)"/>
															<label class="custom-file-label" for="customFile">Choose file</label>
															<img src="" id="output_image" width="100px" style="padding-top: 5px;" />
														</div>
												</div>
												<?php $__errorArgs = ['cat_logo'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
											    <div class="alert alert-danger">
											   		<strong><?php echo e($message); ?></strong>
											    </div>
											    <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
												   
												<div class="form-group" style="text-align:end;">
													<button type="button" class="btn btn-light-primary font-weight-bold" data-dismiss="modal">Close</button>
		                                    		<button type="submit" class="btn btn-primary font-weight-bold">Submit</button>
												</div>
														</form>
					                                </div>
					                            		
					                            </div>
					                        </div>
					                    </div>
								    </li>
							   </ul>
							</div>
						</div>
						<div class="card-body">
						  	<!--begin: Search Form-->
										<!--begin: Datatable-->
										<table id="usertable" class="table table-bordered table-striped">
											<thead>
												<tr>
													<th>SL NO.</th>
													<th>Name</th>
													<th>Photo</th>
													<th>Status</th>
													<th>Action</th>
												</tr>
											</thead>
											<tbody>
												<?php
													$i = 1;
												?>
												<?php $__currentLoopData = $all_category; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $category): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
												<tr>
													<td><?php echo e($i++); ?></td>
													<td><?php echo e($category->category_name); ?></td>
													<td><img src="<?php echo e(asset('uploads/category')); ?>/<?php echo e($category->image); ?>" alt="" width="80px;"></td>
													<td>
														<?php if($category->status == 1): ?>
														<a href="#statusModal<?php echo e($category->id); ?>" data-toggle="modal" class="btn btn-danger"  ><i class="fas fa-toggle-off icon-md"></i>Deactive
					                                    </a>
														<?php else: ?>
														<a href="#statusModal<?php echo e($category->id); ?>" data-toggle="modal" class="btn btn-success"  ><i class="fas fa-toggle-on icon-md"></i></i> Active
					                                    </a>
														<?php endif; ?>
													</td>
													<td>
					                                    <div class="dropdown">
														    <button class="btn btn-dark dropdown-toggle" type="button" id="dropdownMenuButton" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
														        Action
														    </button>
														    <div class="dropdown-menu" aria-labelledby="dropdownMenuButton">
														        <a class="dropdown-item text-warning" href="#editModal<?php echo e($category->id); ?>" data-toggle="modal"><i class="flaticon2-edit icon-lg"></i>&nbsp;&nbsp;Edit
							                                    </a>
							                                    <a class="dropdown-item text-danger" href="#deleteModal<?php echo e($category->id); ?>" data-toggle="modal"><i class="flaticon2-rubbish-bin-delete-button icon-lg"></i> &nbsp;&nbsp;Delete
						                                    	</a>
														    </div>
														</div>
													</td>
											</tr>
<!-- Status Update -->
<div class="modal fade" id="statusModal<?php echo e($category->id); ?>" tabindex="-1" role="dialog" aria-labelledby="exampleModalLongTitle" aria-hidden="true">
    <div class="modal-dialog" role="document">
        <div class="modal-content">
            <div class="modal-header state modal-primary">

            </div>
            <div class="modal-body m-auto">
                <h5 class="modal-title" id="exampleModalLongTitle">Are You Sure for Change Status?</h5>
            </div>
            <div class="modal-footer">
            	<?php if($category->status==1): ?>
                <a href="<?php echo e(url('admin/category/status')); ?>/<?php echo e($category->id); ?>" class="btn btn-danger">Active</a>
                <?php else: ?>
                <a href="<?php echo e(url('admin/category/status')); ?>/<?php echo e($category->id); ?>" class="btn btn-danger">Deactive</a>
                <?php endif; ?>
                <button type="button" class="btn btn-secondary" data-dismiss="modal">Cancel</button>
            </div>
        </div>
    </div>
</div>
<!-- Delete -->
<div class="modal fade" id="deleteModal<?php echo e($category->id); ?>" tabindex="-1" role="dialog" aria-labelledby="exampleModalLongTitle" aria-hidden="true">
    <div class="modal-dialog" role="document">
        <div class="modal-content">
            <div class="modal-header state modal-primary">

            </div>
            <div class="modal-body m-auto">
                <h5 class="modal-title" id="exampleModalLongTitle">Are you sure you want to delete ?</h5>
            </div>
            <div class="modal-footer">
                <a href="<?php echo e(url('admin/category/delete')); ?>/<?php echo e($category->id); ?>" class="btn btn-danger">Delete</a>
                <button type="button" class="btn btn-secondary" data-dismiss="modal">Cancel</button>
            </div>
        </div>
    </div>
</div>

<!-- Edit -->
<div class="modal fade " id="editModal<?php echo e($category->id); ?>" tabindex="-1" role="dialog" aria-labelledby="exampleModalLongTitle" aria-hidden="true">
    <div class="modal-dialog modal-dialog-scrollable" role="document">
        <div class="modal-content">
            <div class="modal-header state modal-primary">
                <h5 class="modal-title" id="exampleModalLongTitle">Are you sure you want to Edit ?</h5>
                <button type="button" class="btn btn-warning" data-dismiss="modal"><i class="fas fa-times"></i></button>
            </div>
            <div class="modal-body">
                <form action="<?php echo e(url('admin/update/category')); ?>" method="POST" enctype="multipart/form-data">
		            <?php echo csrf_field(); ?>
		            <div class="form-group">
					   <label>Sister Concern Name:</label>
					   <input type="text" class="form-control form-control-solid" name="category_name" value="<?php echo e($category->category_name); ?>" />
					   <input type="hidden" class="form-control form-control-solid" name="id" value="<?php echo e($category->id); ?>" />
					   <span class="form-text text-muted">Please enter your Category Name</span>
					   <?php $__errorArgs = ['category_name'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
					   <div class="alert alert-danger">
					   		<strong><?php echo e($mesage); ?></strong>
					   </div>
					   <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
				  	</div>
		            <div class="form-group">
					   <label>Business Type:</label>
					   <input type="text" class="form-control form-control-solid" name="business_type" value="<?php echo e($category->business_type); ?>" />
					   <input type="hidden" class="form-control form-control-solid" name="id" value="<?php echo e($category->id); ?>" />
					   <span class="form-text text-muted">Ex: Products/Services</span>
					   <?php $__errorArgs = ['business_type'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
					   <div class="alert alert-danger">
					   		<strong><?php echo e($mesage); ?></strong>
					   </div>
					   <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
				  	</div>
		            <div class="form-group">
							<label>Sister Concern Photo Browser</label>
							<div></div>
							<div class="custom-file">
								<input type="file" class="custom-file-input" id="customFile" name="image" id="profile-img" onchange="preview_image(event)"/>
								<label class="custom-file-label" for="customFile">Choose file</label>
								<img src="<?php echo e(asset('uploads/category')); ?>/<?php echo e($category->image); ?>" id="output_image" height="40px" style="padding-top: 5px;" />
							</div>
					</div>
					<?php $__errorArgs = ['image'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
					   <div class="alert alert-danger">
					   		<strong><?php echo e($mesage); ?></strong>
					   </div>
					   <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
					   
					<div class="form-group mt-3">
							<label>Sister Concern Logo Browser</label>
							<div></div>
							<div class="custom-file">
								<input type="file" class="custom-file-input" id="customFile" name="cat_logo" id="profile-img" onchange="preview_image(event)"/>
								<label class="custom-file-label" for="customFile">Choose file</label>
								<img src="<?php echo e(asset('uploads/category_logo')); ?>/<?php echo e($category->cat_logo); ?>" id="output_image" height="40px" style="padding-top: 5px;" />
							</div>
					</div>
					<?php $__errorArgs = ['cat_logo'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
					   <div class="alert alert-danger">
					   		<strong><?php echo e($message); ?></strong>
					   </div>
					   <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
					   
					<div class="form-group" style="text-align:end;">
						<button type="button" class="btn btn-light-primary font-weight-bold" data-dismiss="modal">Close</button>
		        		<button type="submit" class="btn btn-primary font-weight-bold">Submit</button>
					</div>
							</form>
            </div>
        </div>
    </div>
</div>
												<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
											</tbody>
										</table>
										<!--end: Datatable-->
						</div>
					</div>
                </div>
            </div>
            <!--end::Row-->
            <!--end::Dashboard-->
        </div>
        <!--end::Container-->
    </div>
    <!--end::Entry-->
</div>

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

<script type="text/javascript" charset="utf8" src="https://cdn.datatables.net/1.10.25/js/jquery.dataTables.js"></script>

<script src="http://cdn.bootcss.com/toastr.js/latest/js/toastr.min.js"></script>
<script src="<?php echo e(asset('dashboard_assets/js/pages/crud/file-upload/dropzonejs.js')); ?>"></script>

<?php echo Toastr::message(); ?>

<?php if(Session::has('message')): ?>
toastr.options =
{
"closeButton" : true,
"progressBar" : true
}
  toastr.success("<?php echo e(session('message')); ?>");
<?php endif; ?>
<?php if(Session::has('message')): ?>
toastr.options =
{
"closeButton" : true,
"progressBar" : true
}
  toastr.error("<?php echo e(session('message')); ?>");
<?php endif; ?>
<script>
    $(function () {
            $("#usertable").DataTable({
                "responsive": true,
                "autoWidth": false,
            });
    });
</script>
<script type='text/javascript'>
function preview_image(event) 
{
 var reader = new FileReader();
 reader.onload = function()
 {
  var output = document.getElementById('output_image');
  output.src = reader.result;
 }
 reader.readAsDataURL(event.target.files[0]);
}
</script>
<script type="text/javascript">
        function readURL(input) {
            if (input.files && input.files[0]) {
                var reader = new FileReader();
                
                reader.onload = function (e) {
                    $('#profile-img-tag').attr('src', e.target.result);
                }
                reader.readAsDataURL(input.files[0]);
            }
        }
        $("#profile-img").change(function(){
            readURL(this);
        });
</script>
<?php $__env->stopSection(); ?>

<?php echo $__env->make('layouts.dashboard', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /home/demouttara/public_html/alvi/resources/views/admin/category/create.blade.php ENDPATH**/ ?>