

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

<?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 Staff</h3>
            </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 Staff</h4>
                </div>
            </div>

            <div class="card-body">

                
                <form action="<?php echo e(route('staff.store')); ?>" method="POST">

                    <?php echo csrf_field(); ?>

                    
                    <h5 class="mb-3">Personal Information</h5>

                    <div class="row">

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

                            <label for="staffName">
                                Full Name <span class="text-danger">*</span>
                            </label>

                            <input
                                type="text"
                                name="user_name"
                                id="staffName"
                                class="form-control"
                                placeholder="e.g. Saba Ashraf"
                                value="<?php echo e(old('user_name')); ?>"
                                required
                            >

                            <?php $__errorArgs = ['user_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 class="col-md-6 form-group">

                            <label for="staffEmail">
                                Email Address <span class="text-danger">*</span>
                            </label>

                            <input
                                type="email"
                                name="user_email"
                                id="staffEmail"
                                class="form-control"
                                placeholder="e.g. saba@gmail.com"
                                value="<?php echo e(old('user_email')); ?>"
                                required
                            >

                            <?php $__errorArgs = ['user_email'];
$__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>


                    <hr class="my-4">


                    
                    <h5 class="mb-3">Account Information</h5>

                    <div class="row">

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

                            <label for="staffPassword">
                                Password <span class="text-danger">*</span>
                            </label>

                            <input
                                type="password"
                                name="password"
                                id="staffPassword"
                                class="form-control"
                                placeholder="Enter password"
                                required
                            >

                            <?php $__errorArgs = ['password'];
$__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 class="col-md-6 form-group">

                            <label for="staffConfirmPassword">
                                Confirm Password <span class="text-danger">*</span>
                            </label>

                            <input
                                type="password"
                                name="password_confirmation"
                                id="staffConfirmPassword"
                                class="form-control"
                                placeholder="Re-enter password"
                                required
                            >

                        </div>

                    </div>


                    <hr class="my-4">


                    
                    <h5 class="mb-3">Role</h5>

                    <div class="form-group">

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

                            <div class="custom-control custom-radio custom-control-inline">

                                <input
                                    type="radio"
                                    id="role<?php echo e($role->role_id); ?>"
                                    name="role_id"
                                    value="<?php echo e($role->role_id); ?>"
                                    class="custom-control-input"
                                    <?php echo e(old('role_id') == $role->role_id ? 'checked' : ''); ?>

                                    required
                                >

                                <label
                                    class="custom-control-label"
                                    for="role<?php echo e($role->role_id); ?>"
                                >
                                    <?php echo e($role->role_name); ?>

                                </label>

                            </div>

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

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

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

                    </div>


                    <hr class="my-4">


                    
                    <h5 class="mb-3">Status</h5>

                    <div class="form-group">

                        <div class="custom-control custom-radio custom-control-inline">

                            <input
                                type="radio"
                                id="statusActive"
                                name="is_active"
                                value="1"
                                class="custom-control-input"
                                <?php echo e(old('is_active', '1') == '1' ? 'checked' : ''); ?>

                            >

                            <label
                                class="custom-control-label"
                                for="statusActive"
                            >
                                Active
                            </label>

                        </div>


                        <div class="custom-control custom-radio custom-control-inline">

                            <input
                                type="radio"
                                id="statusInactive"
                                name="is_active"
                                value="0"
                                class="custom-control-input"
                                <?php echo e(old('is_active') === '0' ? 'checked' : ''); ?>

                            >

                            <label
                                class="custom-control-label"
                                for="statusInactive"
                            >
                                Inactive
                            </label>

                        </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>
                            Save Staff
                        </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('staff.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/staff/add.blade.php ENDPATH**/ ?>