

<?php $__env->startSection('title'); ?>
  <?php echo e(__('Inventory') . ' - ' . $title); ?> 
<?php $__env->stopSection(); ?>

<?php $__env->startSection('navbar-content'); ?>
  <div class="content-header">
    <div class="container-fluid">
      <div class="row mb-2">
        <div class="col-sm-6">
          <h1 class="m-0"><?php echo e(__('fabric')); ?></h1>
        </div><!-- /.col -->
        <div class="col-sm-6">
          <ol class="breadcrumb float-sm-right">
            <li class="breadcrumb-item">
              <a href="<?php echo e(route('home')); ?>"><?php echo e(__('Dashboard')); ?></a>
            </li>
            <?php if(helper::roleAccess('inventorySetup.fabric.index')): ?>
              <li class="breadcrumb-item">
                <a href="<?php echo e(route('inventorySetup.fabric.index')); ?>"><?php echo e(__('fabric List')); ?></a>
              </li>
            <?php endif; ?>
            <li class="breadcrumb-item active">
              <span><?php echo e(__('Add New fabric')); ?></span>
            </li>
          </ol>
        </div><!-- /.col -->
      </div><!-- /.row -->
    </div><!-- /.container-fluid -->
  </div>
<?php $__env->stopSection(); ?>

<?php $__env->startSection('admin-content'); ?>
  <section class="row">
    <div class="col-md-12">
      <div class="card card-default">
        <div class="card-header">
          <h3 class="card-title"><?php echo e(__('Add New fabric')); ?></h3>
          <div class="card-tools">
            <?php if(helper::roleAccess('inventorySetup.fabric.index')): ?>
              <a class="btn btn-default" href="<?php echo e(route('inventorySetup.fabric.index')); ?>">
                <i class="fa fa-list"></i>
                <span><?php echo e(__('fabric List')); ?></span>
              </a>
            <?php endif; ?>
            <span id="buttons"></span>
            <a class="btn btn-tool btn-default" data-card-widget="collapse">
              <i class="fas fa-minus"></i>
            </a>
            <a class="btn btn-tool btn-default" data-card-widget="remove">
              <i class="fas fa-times"></i>
            </a>
          </div>
        </div><!-- /.card-header -->
        <div class="card-body">
          <form class="needs-validation" method="POST" action="<?php echo e(route('inventorySetup.fabric.store')); ?>" novalidate>
            <?php echo csrf_field(); ?>
            <div class="form-row">
              <div class="col-md-6 mb-3">
                <label for="validationCustom01"><?php echo e(__('Name * :')); ?></label>
                <input type="text" name="name" class="form-control form-control-sm" id="validationCustom01" placeholder="Name" value="<?php echo e(old('name')); ?>">
                <?php $__errorArgs = ['name'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                  <span class=" error text-red text-bold"><?php echo e($message); ?></span>
                <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
              </div>
              <div class="col-md-6 mb-3">
                <label for="validationCustom01"><?php echo e(__('Status * :')); ?></label>
                <select class="form-control select2" name="status">
                  <option value="Pending"><?php echo e(__('--Select--')); ?></option>
                  <option value="Display"><?php echo e(__('Display')); ?></option>
                  <option value="Hidden"><?php echo e(__('Hidden')); ?></option>
                </select>
                <?php $__errorArgs = ['status'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                  <span class=" error text-red text-bold"><?php echo e($message); ?></span>
                <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
              </div>

                <div class="col-md-6 mb-3">
                                <label for="validationCustom01">Branch Name * :

                                  
                                </label>
                                <select class="form-control select2" name="branch_id">
                                    <option selected disabled value="">--Select--</option>
                                   <?php if(auth()->user()->role_id > 1): ?>
                                    <?php $__currentLoopData = $branchs; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $key => $value): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                        <option value="<?php echo e($value->id); ?>" <?php echo e(auth()->user()->branch_id == $value->id ? 'selected' :''); ?>><?php echo e($value->name); ?></option>
                                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                    <?php else: ?> 

                                  <?php $__currentLoopData = $branchs; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $key => $value): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                        <option value="<?php echo e($value->id); ?>"><?php echo e($value->name); ?></option>
                                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                    <?php endif; ?>
                                </select>
                                <?php $__errorArgs = ['branch_id'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                                    <span class=" error text-red text-bold"><?php echo e($message); ?></span>
                                <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
                            </div>
        
            </div>       
            <button class="btn btn-info" type="submit">
              <i class="fa fa-save"></i>
              <span>&nbsp;<?php echo e(__('Save')); ?></span>
            </button>
          </form>
        </div><!-- /.card-body -->
        <div class="card-footer"></div>
      </div>
    </div><!-- /.col-->
  </section>
<?php $__env->stopSection(); ?>
<?php echo $__env->make('backend.layouts.master', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH E:\jubayer\resources\views/backend/pages/inventories/fabric/create.blade.php ENDPATH**/ ?>