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


<!-- BEGIN PAGE CSS -->
<?php $__env->startSection('page-css'); ?>
    <style>
        .toggle-code-snippet { margin-bottom: 0px; }
        body.dark .toggle-code-snippet { margin-bottom: 0px; }
    </style>
    <link href="/cork/src/plugins/src/flatpickr/flatpickr.css" rel="stylesheet" type="text/css">
    <link href="/cork/src/plugins/src/noUiSlider/nouislider.min.css" rel="stylesheet" type="text/css">

    <link href="/cork/src/assets/css/light/scrollspyNav.css" rel="stylesheet" type="text/css" />
    <link href="/cork/src/assets/css/dark/scrollspyNav.css" rel="stylesheet" type="text/css" />

<?php $__env->stopSection(); ?>
<!-- END PAGE CSS -->

<!-- BREADCRUMB -->
<?php $__env->startSection('breadcrumb'); ?>
<div class="page-meta">
    <nav class="breadcrumb-style-one" aria-label="breadcrumb">
        <ol class="breadcrumb">
            <li class="breadcrumb-item"><a href="<?php echo e(route('dashboard')); ?>">Home</a></li>
            <li class="breadcrumb-item"><a href="<?php echo e(route('equipment.index')); ?>">Equipment</a></li>
            <li class="breadcrumb-item active" aria-current="page"><?php echo e($title); ?></li>
        </ol>
    </nav>
</div>
<!-- /BREADCRUMB -->
<?php $__env->stopSection(); ?>

<?php $__env->startSection('content'); ?>
<form method="post" action="<?php if($action == 'create'): ?><?php echo e(route('equipment.store')); ?> <?php else: ?> <?php echo e(route('equipment.update', $equipment->id)); ?> <?php endif; ?>">
    <?php echo csrf_field(); ?>
    <?php if($action == 'edit'): ?> <?php echo method_field('PUT'); ?> <?php endif; ?>
    <div class="form-group">
        <?php if(@isset($action) && ($action === 'checkin' || $action === 'checkout')): ?>
            <input type="hidden" name="name" id="name" value="<?php echo e($equipment->name); ?>" />
        <?php else: ?>
            <label for="name">Name*</label>
            <div class="form-row">
                <div class="col-md-6 mb-4">
                    <input type="text" class="form-control <?php $__errorArgs = ['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); ?>" name="name" id="name" aria-describedby="basic-addon3" maxlength="100" <?php if(isset($equipment->name)): ?> value="<?php echo e($equipment->name); ?>" <?php else: ?> value="<?php echo e(old('name')); ?>" <?php endif; ?>>
                    <?php $__errorArgs = ['name'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                    <div class="invalid-feedback" style="display: block !important;">
                        <?php echo e($errors->first('name')); ?>

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

        <label for="department_id">Department*</label>
        <div class="form-row">
            <div class="col-md-2 mb-4">
                <select name="department_id" id="department_id" class="form-select <?php $__errorArgs = ['department_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); ?>">
                    <?php $__currentLoopData = $departments; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $department): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                        <option value="<?php echo e($department->id); ?>" <?php if(@isset($equipment->department_id) && $department->id === $equipment->department_id): ?> selected <?php endif; ?>><?php echo e($department->name); ?></option>
                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                </select>
                <?php $__errorArgs = ['department_id'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                <div class="invalid-feedback" style="display: block !important;">
                    <?php echo e($errors->first('department_id')); ?>

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

        <label for="description">Description</label>
        <div class="form-row">
            <div class="col-md-12 mb-4">
                <textarea class="form-control <?php $__errorArgs = ['description'];
$__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); ?>" name="description" id="description" aria-describedby="basic-addon3"><?php if(isset($equipment->description)): ?><?php echo e($equipment->description); ?><?php else: ?><?php echo e(old('description')); ?><?php endif; ?></textarea>
                <?php $__errorArgs = ['description'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                <div class="invalid-feedback" style="display: block !important;">
                    <?php echo e($errors->first('description')); ?>

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

        <label for="model">Model</label>
        <div class="form-row">
            <div class="col-md-6 mb-4">
                <input type="text" class="form-control <?php $__errorArgs = ['model'];
$__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); ?>" name="model" id="model" aria-describedby="basic-addon3" maxlength="20" <?php if(isset($equipment->model)): ?> value="<?php echo e($equipment->model); ?>" <?php else: ?> value="<?php echo e(old('model')); ?>" <?php endif; ?>>
                <?php $__errorArgs = ['model'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                <div class="invalid-feedback" style="display: block !important;">
                    <?php echo e($errors->first('model')); ?>

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

        <label for="serial_num">Serial Number</label>
        <div class="form-row">
            <div class="col-md-6 mb-4">
                <input type="text" class="form-control <?php $__errorArgs = ['serial_num'];
$__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); ?>" name="serial_num" id="serial_num" aria-describedby="basic-addon3" maxlength="20" <?php if(isset($equipment->serial_num)): ?> value="<?php echo e($equipment->serial_num); ?>" <?php else: ?> value="<?php echo e(old('serial_num')); ?>" <?php endif; ?>>
                <?php $__errorArgs = ['serial_num'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                <div class="invalid-feedback" style="display: block !important;">
                    <?php echo e($errors->first('serial_num')); ?>

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

        <label for="purchase_date">Purchase Date*</label>
        <div class="form-row">
            <div class="col-md-2 mb-4">
                <input type="text" class="form-control flatpickr flatpickr-input active <?php $__errorArgs = ['purchase_date'];
$__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); ?>" name="purchase_date" id="purchase_date" aria-describedby="basic-addon3" maxlength="10" <?php if(isset($equipment->purchase_date)): ?> value="<?php echo e($equipment->purchase_date); ?>" <?php else: ?> value="<?php echo e(old('purchase_date')); ?>" <?php endif; ?>>
                <?php $__errorArgs = ['purchase_date'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                <div class="invalid-feedback" style="display: block !important;">
                    <?php echo e($errors->first('purchase_date')); ?>

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

        <label for="purchase_price">Purchase Price*</label>
        <div class="form-row">
            <div class="col-md-2 mb-4">
                <input type="text" class="form-control <?php $__errorArgs = ['purchase_price'];
$__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); ?>" name="purchase_price" id="purchase_price" aria-describedby="basic-addon3" maxlength="11" <?php if(isset($equipment->purchase_price)): ?> value="<?php echo e($equipment->purchase_price); ?>" <?php else: ?> value="<?php echo e(old('purchase_price')); ?>" <?php endif; ?>>
                <?php $__errorArgs = ['purchase_price'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                <div class="invalid-feedback" style="display: block !important;">
                    <?php echo e($errors->first('purchase_price')); ?>

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

        <label for="condition">Condition*</label>
        <div class="form-row">
            <div class="col-md-2 mb-4">
                <select name="condition" id="condition" class="form-select <?php $__errorArgs = ['condition'];
$__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); ?>">
                    <option value="E" <?php if(@isset($equipment->condition) && 'E' === $equipment->condition): ?> selected <?php endif; ?>>Excellent</option>
                    <option value="G" <?php if(@isset($equipment->condition) && 'G' === $equipment->condition): ?> selected <?php endif; ?>>Good</option>
                    <option value="F" <?php if(@isset($equipment->condition) && 'F' === $equipment->condition): ?> selected <?php endif; ?>>Fair</option>
                    <option value="P" <?php if(@isset($equipment->condition) && 'P' === $equipment->condition): ?> selected <?php endif; ?>>Poor</option>
                    <option value="S" <?php if(@isset($equipment->condition) && 'S' === $equipment->condition): ?> selected <?php endif; ?>>Scrap</option>
                </select>
                <?php $__errorArgs = ['condition'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                <div class="invalid-feedback" style="display: block !important;">
                    <?php echo e($errors->first('condition')); ?>

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

        <label for="notes">Notes</label>
        <div class="form-row">
            <div class="col-md-12 mb-4">
                <textarea class="form-control <?php $__errorArgs = ['notes'];
$__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); ?>" name="notes" id="notes" aria-describedby="basic-addon3"><?php if(isset($equipment->notes)): ?><?php echo e($equipment->notes); ?><?php else: ?> <?php echo e(old('notes')); ?><?php endif; ?></textarea>
                <?php $__errorArgs = ['notes'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                <div class="invalid-feedback" style="display: block !important;">
                    <?php echo e($errors->first('notes')); ?>

                </div>
                <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
            </div>
        </div>
        <div class="form-row">
            <div class="input-group mb-4">
                <input type="submit" name="txt" class="mt-4 btn btn-primary">
            </div>
        </div>
    </div>
</form>
<?php $__env->stopSection(); ?>
<!--  BEGIN PAGE SCRIPTS FILE  -->
<?php $__env->startSection('page-js'); ?>
<script src="/cork/src/assets/js/scrollspyNav.js"></script>
<script src="/cork/src/plugins/src/flatpickr/flatpickr.js"></script>
<script>
    var f1 = flatpickr(document.getElementById('purchase_date'));
</script>
<?php $__env->stopSection(); ?>
<!--  END PAGE SCRIPTS FILE  -->

<?php echo $__env->make('layouts.cork', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /home/psjybwmy/public_html/registration/resources/views/admin/equipment/form.blade.php ENDPATH**/ ?>