

<?php $__env->startSection('title', 'Add Customer'); ?>

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

<div class="row">

    
    <div class="col-sm-12">
        <div class="card card-transparent card-block card-stretch card-height border-none mb-4">

            <div class="card-body p-0">

                <h3 class="mb-2">Add Customer</h3>

                <nav aria-label="breadcrumb">
                    <ol class="breadcrumb mb-0">

                        <li class="breadcrumb-item">
                            <a href="<?php echo e(route('customer.list')); ?>">
                                Customers
                            </a>
                        </li>

                        <li class="breadcrumb-item active">
                            Add Customer
                        </li>

                    </ol>
                </nav>

            </div>

        </div>
    </div>


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

        <div class="card card-block card-stretch card-height">

            <div class="card-header d-flex justify-content-between">

                <div class="header-title">
                    <h4 class="card-title">
                        Add New Customer
                    </h4>
                </div>

            </div>


            <div class="card-body">

                <form
                    action="<?php echo e(route('customer.store')); ?>"
                    method="POST"
                    data-toggle="validator"
                >

                    <?php echo csrf_field(); ?>


                    <div class="row">

                        
                        <div class="col-md-6">

                            <div class="form-group">

                                <label>
                                    Customer Name
                                    <span class="text-danger">*</span>
                                </label>

                                <input
                                    type="text"
                                    name="customer_name"
                                    class="form-control <?php $__errorArgs = ['customer_name'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?> is-invalid <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>"
                                    placeholder="Enter Customer Name"
                                    value="<?php echo e(old('customer_name')); ?>"
                                    required
                                >

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

                                    </small>
                                <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>

                            </div>

                        </div>


                        
                        <div class="col-md-6">

                            <div class="form-group">

                                <label>
                                    Phone Number
                                    <span class="text-danger">*</span>
                                </label>

                                <input
                                    type="text"
                                    name="customer_phonenum"
                                    class="form-control <?php $__errorArgs = ['customer_phonenum'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?> is-invalid <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>"
                                    placeholder="Enter Phone Number"
                                    value="<?php echo e(old('customer_phonenum')); ?>"
                                    required
                                >

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

                                    </small>
                                <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>

                            </div>

                        </div>


                        
                        <div class="col-md-6">

                            <div class="form-group">

                                <label>
                                    Shop Name
                                    <span class="text-danger">*</span>
                                </label>

                                <input
                                    type="text"
                                    name="shop_name"
                                    class="form-control <?php $__errorArgs = ['shop_name'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?> is-invalid <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>"
                                    placeholder="Enter Shop Name"
                                    value="<?php echo e(old('shop_name')); ?>"
                                    required
                                >

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

                                    </small>
                                <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>

                            </div>

                        </div>


                        
                        <div class="col-md-6">

                            <div class="form-group">

                                <label>
                                    Area Name 
                                    <span class="text-danger">*</span>
                                </label>

                                <select
                                    name="area_id"
                                    class="form-control custom-select <?php $__errorArgs = ['area_id'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?> is-invalid <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>"
                                    required
                                >

                                    <option value="">
                                        Select Area
                                    </option>

                                    <?php $__currentLoopData = $areas; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $area): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>

                                        <option
                                            value="<?php echo e($area->area_id); ?>"
                                             <?php echo e(old('area_id') == $area->area_id ? 'selected' : ''); ?>

                                        >
                                            <?php echo e($area->area_name); ?>

                                        </option>

                                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>

                                </select>

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

                                    </small>
                                <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>

                            </div>

                        </div>

                    </div>


                    
                    <div class="d-flex flex-wrap mt-4">

                        <button
                            type="submit"
                            class="btn btn-primary mr-2"
                        >
                            <i class="ri-save-line mr-1"></i>
                            Add Customer
                        </button>


                        <button
                            type="reset"
                            class="btn btn-outline-secondary mr-2"
                        >
                            <i class="ri-refresh-line mr-1"></i>
                            Reset
                        </button>


                        <a
                            href="<?php echo e(route('customer.list')); ?>"
                            class="btn btn-outline-danger"
                        >
                            <i class="ri-close-line mr-1"></i>
                            Cancel
                        </a>

                    </div>

                </form>

            </div>

        </div>

    </div>

</div>

<?php $__env->stopSection(); ?>
<?php echo $__env->make('layouts.app', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?><?php /**PATH C:\xampp\htdocs\zt-stationery\resources\views/customer/add.blade.php ENDPATH**/ ?>