|
Server : LiteSpeed System : Linux barito.iixcp.rumahweb.net 5.14.0-611.49.1.el9_7.x86_64 #1 SMP PREEMPT_DYNAMIC Tue Apr 21 16:39:08 EDT 2026 x86_64 User : elvh3918 ( 1528) PHP Version : 8.2.31 Disable Function : mail Directory : /home/elvh3918/public_html/tenant/storage/framework/views/ |
<?php $__env->startSection('title', $breadcrumbs[count($breadcrumbs) - 1]['name']); ?>
<?php $__env->startSection('content'); ?>
<?php echo $__env->make('components/breadcrumb', ['breadcrumbs' => $breadcrumbs], array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?>
<!-- Main content -->
<section class="content">
<div class="container-fluid">
<div class="card card-solid">
<form class="form" action="<?php echo e(route('master.items.store')); ?>" method="POST" enctype="multipart/form-data">
<?php echo csrf_field(); ?>
<div class="card-body">
<div class="row">
<div class="col-md-6">
<div class="mb-3">
<div id="image-area"></div>
</div>
</div>
<div class="col-md-6">
<div class="mb-3">
<label class="form-label" for="type">Type</label>
<select class="form-control typeSelect2
<?php echo e(count($errors) == 0 ? '' : (count($errors->get('type')) == 0 ? '' : 'is-invalid')); ?>" name="type" id="type" required>
<?php $__currentLoopData = $type; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $data): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
<option value="<?php echo e($data->name); ?>" <?php echo e(old('type') == $data->name ? "selected" : ""); ?>><?php echo e($data->name); ?></option>
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
</select>
<?php if (isset($component)) { $__componentOriginalf94ed9c5393ef72725d159fe01139746 = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginalf94ed9c5393ef72725d159fe01139746 = $attributes; } ?>
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'components.input-error','data' => ['messages' => $errors->get('type'),'class' => 'mt-2']] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
<?php $component->withName('input-error'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag): ?>
<?php $attributes = $attributes->except(\Illuminate\View\AnonymousComponent::ignoredParameterNames()); ?>
<?php endif; ?>
<?php $component->withAttributes(['messages' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute($errors->get('type')),'class' => 'mt-2']); ?>
<?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginalf94ed9c5393ef72725d159fe01139746)): ?>
<?php $attributes = $__attributesOriginalf94ed9c5393ef72725d159fe01139746; ?>
<?php unset($__attributesOriginalf94ed9c5393ef72725d159fe01139746); ?>
<?php endif; ?>
<?php if (isset($__componentOriginalf94ed9c5393ef72725d159fe01139746)): ?>
<?php $component = $__componentOriginalf94ed9c5393ef72725d159fe01139746; ?>
<?php unset($__componentOriginalf94ed9c5393ef72725d159fe01139746); ?>
<?php endif; ?>
</div>
<div class="mb-3">
<label class="form-label" for="code">Code<span class="text-danger">*</span></label>
<input type="text" class="form-control <?php echo e(count($errors) == 0 ? '' : (count($errors->get('code')) == 0 ? '' : 'is-invalid')); ?>"
id="code" name="code" placeholder="code" value="<?php echo e(old('code')); ?>"
required />
<?php if (isset($component)) { $__componentOriginalf94ed9c5393ef72725d159fe01139746 = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginalf94ed9c5393ef72725d159fe01139746 = $attributes; } ?>
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'components.input-error','data' => ['messages' => $errors->get('code'),'class' => 'mt-2']] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
<?php $component->withName('input-error'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag): ?>
<?php $attributes = $attributes->except(\Illuminate\View\AnonymousComponent::ignoredParameterNames()); ?>
<?php endif; ?>
<?php $component->withAttributes(['messages' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute($errors->get('code')),'class' => 'mt-2']); ?>
<?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginalf94ed9c5393ef72725d159fe01139746)): ?>
<?php $attributes = $__attributesOriginalf94ed9c5393ef72725d159fe01139746; ?>
<?php unset($__attributesOriginalf94ed9c5393ef72725d159fe01139746); ?>
<?php endif; ?>
<?php if (isset($__componentOriginalf94ed9c5393ef72725d159fe01139746)): ?>
<?php $component = $__componentOriginalf94ed9c5393ef72725d159fe01139746; ?>
<?php unset($__componentOriginalf94ed9c5393ef72725d159fe01139746); ?>
<?php endif; ?>
</div>
<div class="mb-3">
<label class="form-label" for="name">Name<span class="text-danger">*</span></label>
<input type="text" class="form-control <?php echo e(count($errors) == 0 ? '' : (count($errors->get('name')) == 0 ? '' : 'is-invalid')); ?>"
id="name" name="name" placeholder="name" value="<?php echo e(old('name')); ?>"
required />
<?php if (isset($component)) { $__componentOriginalf94ed9c5393ef72725d159fe01139746 = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginalf94ed9c5393ef72725d159fe01139746 = $attributes; } ?>
<?php $component = Illuminate\View\AnonymousComponent::resolve(['view' => 'components.input-error','data' => ['messages' => $errors->get('name'),'class' => 'mt-2']] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
<?php $component->withName('input-error'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag): ?>
<?php $attributes = $attributes->except(\Illuminate\View\AnonymousComponent::ignoredParameterNames()); ?>
<?php endif; ?>
<?php $component->withAttributes(['messages' => \Illuminate\View\Compilers\BladeCompiler::sanitizeComponentAttribute($errors->get('name')),'class' => 'mt-2']); ?>
<?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginalf94ed9c5393ef72725d159fe01139746)): ?>
<?php $attributes = $__attributesOriginalf94ed9c5393ef72725d159fe01139746; ?>
<?php unset($__attributesOriginalf94ed9c5393ef72725d159fe01139746); ?>
<?php endif; ?>
<?php if (isset($__componentOriginalf94ed9c5393ef72725d159fe01139746)): ?>
<?php $component = $__componentOriginalf94ed9c5393ef72725d159fe01139746; ?>
<?php unset($__componentOriginalf94ed9c5393ef72725d159fe01139746); ?>
<?php endif; ?>
</div>
<div class="mb-3">
<label class="form-label" for="description">Description</label>
<textarea name="description" id="description" class="form-control" rows="3" placeholder="Description"><?php echo e(old('description')); ?></textarea>
</div>
<div class="mb-3">
<div class="form-check">
<input class="form-check-input" type="checkbox" id="is_active"
name="is_active" checked />
<label for="is_active" class="form-check-label ml-1">Active</label>
</div>
</div>
</div>
</div>
</div>
<div class="p-2 card-footer d-print-none">
<div class="d-flex justify-content-end">
<button class="btn btn-primary mr-2" type="submit" onclick='buttonSpin("btn_save", "spinner-border spinner-border-sm")'>
<i id="btn_save" class="fa fa-save"></i>
<span class="ml-2">Save</span>
</button>
</div>
</div>
</form>
</div>
</div>
<!--/. container-fluid -->
</section>
<!-- /.content -->
<?php $__env->stopSection(); ?>
<?php $__env->startSection('page-style'); ?>
<link rel="stylesheet" href="<?php echo e(asset('assets/plugins/toastr/toastr.min.css')); ?>">
<style>
.dz-preview {
width: 100%;
margin: 0 !important;
height: 100%;
padding: 5px;
position: absolute !important;
top: 0;
}
.dz-photo {
height: 100%;
width: 100%;
overflow: hidden;
border-radius: 12px;
background: #f3f3f3;
}
.dz-thumbnail {
width: 100%;
height: 100%;
object-fit: contain;
}
.dropzone-drag-area {
height: 300px;
position: relative;
padding: 0 !important;
border-radius: 10px;
border: 3px dashed #dbdeea;
}
</style>
<?php $__env->stopSection(); ?>
<?php $__env->startSection('page-script'); ?>
<script src="<?php echo e(asset('assets/plugins/toastr/toastr.min.js')); ?>"></script>
<script src="<?php echo e(asset('assets/plugins/file/file-exists.js')); ?>"></script>
<script src="<?php echo e(asset('assets/external/load-toastr.js')); ?>"></script>
<script src="<?php echo e(asset('assets/external/button-spin.js')); ?>"></script>
<script>
loadToastr(<?php echo json_encode(Session::get('message')); ?>);
removeImage();
//**** load Image *************************
function clickImage() {
document.getElementById('image').click();
}
$(document).on('change', '.selectImage', function() {
let reader = new FileReader();
reader.onload = (e) => {
$('#image_image').attr('src', e.target.result);
}
reader.readAsDataURL(this.files[0]);
});
function removeImage() {
// reset
document.getElementById("image-area").innerHTML = "";
var html="";
html +='<div class="dropzone-drag-area form-control" id="previews">';
html +='<div class="dz-preview">';
html +='<div class="dz-photo">';
html +=`<img id="image_image" src="<?php echo e(asset(config('app.img_not_found'))); ?>" class="dz-thumbnail">`;
html +='</div>';
html +='</div>';
html +='</div>';
html +='<div class="mt-2 d-flex justify-content-center">';
html +='<input id="image" name="image" type="file" class="form-control selectImage" style="display:none;" />';
html +='<input type="button" class="btn btn-primary mr-2" value="Browse" onclick="clickImage()" />';
html +='<button class="btn btn-danger" type="button" onclick="removeImage()">';
html +='<span>Remove</span>';
html +='</button>';
html +='</div>';
$("#image-area").append(html);
}
</script>
<?php $__env->stopSection(); ?>
<?php echo $__env->make('layouts/app', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?><?php /**PATH /home/elvh3918/public_html/tenant/resources/views/content/master/items/create.blade.php ENDPATH**/ ?>