 <?php $__env->startSection('content'); ?>
<?php if(session()->has('not_permitted')): ?>
  <div class="alert alert-danger alert-dismissible text-center"><button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">&times;</span></button><?php echo e(session()->get('not_permitted')); ?></div>
<?php endif; ?>
<section class="forms">
    <div class="container-fluid">
        <div class="row">
            <div class="col-md-12">
                <div class="card">
                    <div class="card-header d-flex align-items-center">
                        <h4><?php echo e(trans('file.Add Tailor')); ?></h4>
                    </div>
                    <div class="card-body">
                        <p class="italic"><small><?php echo e(trans('file.The field labels marked with * are required input fields')); ?>.</small></p>
                        <?php echo Form::open(['route' => 'tailor.store', 'method' => 'post', 'files' => false]); ?>

                        <div class="row">
                            <div class="col-md-4">
                                <div class="form-group">
                                    <label><?php echo e(trans('file.name')); ?> *</strong> </label>
                                    <input type="text" id="name" name="name" required class="form-control">
                                    <?php if($errors->has('name')): ?>
                                   <span>
                                       <strong><?php echo e($errors->first('name')); ?></strong>
                                    </span>
                                    <?php endif; ?>
                                </div>
                            </div>
                            <div class="col-md-4">
                                    <div class="form-group">
                                        <label><?php echo e(trans('file.category')); ?> *</strong> </label>
                                        <div class="input-group">
                                            <select name="category_id" required class="form-control selectpicker  order_input" id="category">
                                                <?php $__currentLoopData = $lims_category_list; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $category): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                                <option value="<?php echo e($category->id); ?>"><?php echo e($category->name); ?></option>
                                                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                            </select>
                                        </div>
                                    </div>
                            </div>
                            <input type="hidden" name="tailor_fee" value="0">
                            <div class="col-md-4">
                                <div class="form-group">
                                    <label><?php echo e(trans('file.Phone Number')); ?> *</label>
                                    <input type="text" name="phone" required class="form-control">
                                    <?php if($errors->has('phone')): ?>
                                   <span>
                                       <strong><?php echo e($errors->first('phone')); ?></strong>
                                    </span>
                                    <?php endif; ?>
                                </div>
                            </div>
                            <div class="col-md-4">
                                <div class="form-group">
                                    <label><?php echo e(trans('file.Address')); ?> *</label>
                                    <input type="text" name="address" required class="form-control">
                                </div>
                            </div>

                        </div>
                        <div class="row">
                            <div class="col-md-12">
                                <h5 class="mt-2 mb-3"><?php echo e(trans('file.Curtain Tailor Fees')); ?></h5>
                            </div>
                            <?php $__currentLoopData = ['fabric_meter_fee' => 'Fabric Meter Fee', 'netting_meter_fee' => 'Netting Meter Fee', 'mattress_fee' => 'Mattress Fee', 'pillow_fee' => 'Pillow Fee', 'bolster_fee' => 'Bolster Fee']; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $field => $label): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                <div class="col-md-4">
                                    <div class="form-group">
                                        <label><?php echo e(trans('file.' . $label)); ?> *</label>
                                        <input type="number" name="<?php echo e($field); ?>" value="<?php echo e(old($field, 0)); ?>" min="0" step="0.01" required class="form-control">
                                        <?php if($errors->has($field)): ?>
                                            <span><strong><?php echo e($errors->first($field)); ?></strong></span>
                                        <?php endif; ?>
                                    </div>
                                </div>
                            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                            <div class="col-md-4">
                                <div class="form-group">
                                    <label><?php echo e(trans('file.Under-cover Fee Method')); ?> *</label>
                                    <select name="under_cover_fee_method" id="under_cover_fee_method" class="form-control" required>
                                        <option value="corresponding" <?php if(old('under_cover_fee_method', 'corresponding') === 'corresponding'): ?> selected <?php endif; ?>><?php echo e(trans('file.Include Under-cover in Item Fee')); ?></option>
                                        <option value="separate" <?php if(old('under_cover_fee_method') === 'separate'): ?> selected <?php endif; ?>><?php echo e(trans('file.Use Separate Under-cover Fees')); ?></option>
                                    </select>
                                </div>
                            </div>
                            <?php $__currentLoopData = ['mattress_under_cover_fee' => 'Mattress Under-cover Fee', 'pillow_under_cover_fee' => 'Pillow Under-cover Fee', 'bolster_under_cover_fee' => 'Bolster Under-cover Fee']; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $field => $label): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                <div class="col-md-4 separate-under-cover-fee">
                                    <div class="form-group">
                                        <label><?php echo e(trans('file.' . $label)); ?> *</label>
                                        <input type="number" name="<?php echo e($field); ?>" value="<?php echo e(old($field, 0)); ?>" min="0" step="0.01" class="form-control under-cover-fee-input">
                                    </div>
                                </div>
                            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                        </div>
                        <div class="row">
                            <div class="col-md-12">
                                <h5 class="mt-2 mb-1"><?php echo e(trans('file.Tailor Login Account')); ?></h5>
                                <p class="text-muted"><?php echo e(trans('file.Every tailor needs a login account to receive and manage assigned orders')); ?></p>
                            </div>
                            <div class="col-md-6">
                                <div class="form-group">
                                    <label><?php echo e(trans('file.Email')); ?> <span >*</span></label>
                                    <input type="email" name="email" value="<?php echo e(old('email')); ?>" placeholder="example@example.com" required class="form-control">
                                    <?php if($errors->has('email')): ?>
                                   <span>
                                       <strong><?php echo e($errors->first('email')); ?></strong>
                                    </span>
                                    <?php endif; ?>
                                </div>
                            </div>
                            <div class="col-md-6">
                                <div class="form-group">
                                    <label><?php echo e(trans('file.Password')); ?> *</label>
                                    <input type="password" name="password" required class="form-control">
                                    <?php if($errors->has('password')): ?>
                                        <span><strong><?php echo e($errors->first('password')); ?></strong></span>
                                    <?php endif; ?>
                                </div>
                            </div>
                        </div>
                        <div class="form-group">
                            <input type="submit" value="<?php echo e(trans('file.submit')); ?>" class="btn btn-primary">
                        </div>
                        <?php echo Form::close(); ?>

                    </div>
                </div>
            </div>
        </div>
    </div>
</section>


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

<?php $__env->startPush('scripts'); ?>
<script type="text/javascript">
    $("ul#tailoring").siblings('a').attr('aria-expanded','true');
    $("ul#tailoring").addClass("show");
    $("ul#tailoring #tailor-create-menu").addClass("active");

    function toggleUnderCoverFees() {
        var separate = $('#under_cover_fee_method').val() === 'separate';
        $('.separate-under-cover-fee').toggle(separate);
        $('.under-cover-fee-input').prop('required', separate);
    }
    $('#under_cover_fee_method').on('change', toggleUnderCoverFees);
    toggleUnderCoverFees();
</script>
<?php $__env->stopPush(); ?>

<?php echo $__env->make('backend.layout.main', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH C:\Users\MHNazary\Pictures\sellbox\resources\views\backend\tailoringproduct\tailor\create.blade.php ENDPATH**/ ?>