ok
Direktori : /home2/selectio/www/fms-worksuite/storage/framework/views/ |
Current File : /home2/selectio/www/fms-worksuite/storage/framework/views/6d1969af4ca03f1d4b915854d590b0aa.php |
<div class="modal-header"> <h5 class="modal-title" id="modelHeading"><?php echo app('translator')->get('modules.client.clientSubCategory'); ?></h5> <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button> </div> <div class="modal-body"> <?php if (isset($component)) { $__componentOriginal7d9f6e0b9001f5841f72577781b2d17f = $component; } ?> <?php $component = App\View\Components\Table::resolve(['headType' => 'thead-light'] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? (array) $attributes->getIterator() : [])); ?> <?php $component->withName('table'); ?> <?php if ($component->shouldRender()): ?> <?php $__env->startComponent($component->resolveView(), $component->data()); ?> <?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag && $constructor = (new ReflectionClass(App\View\Components\Table::class))->getConstructor()): ?> <?php $attributes = $attributes->except(collect($constructor->getParameters())->map->getName()->all()); ?> <?php endif; ?> <?php $component->withAttributes(['class' => 'table-bordered client-subcat-table']); ?> <?php $__env->slot('thead', null, []); ?> <th>#</th> <th><?php echo app('translator')->get('modules.productCategory.subCategory'); ?></th> <th><?php echo app('translator')->get('modules.productCategory.category'); ?></th> <th class="text-right"><?php echo app('translator')->get('app.action'); ?></th> <?php $__env->endSlot(); ?> <?php $__empty_1 = true; $__currentLoopData = $subcategories; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $key=>$subcategory): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?> <tr id="cat-<?php echo e($subcategory->id); ?>"> <td><?php echo e($key + 1); ?></td> <td data-row-id="<?php echo e($subcategory->id); ?>" contenteditable="true"> <?php echo e(mb_ucwords($subcategory->category_name)); ?></td> <td><?php echo e(mb_ucwords($subcategory->clientCategory->category_name)); ?></td> <td class="text-right"> <?php if($deletePermission == 'all' || $deletePermission == 'added'): ?> <?php if (isset($component)) { $__componentOriginal5e57c6582b8a883148a28bb7ee46d2ad = $component; } ?> <?php $component = App\View\Components\Forms\ButtonSecondary::resolve(['icon' => 'trash'] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? (array) $attributes->getIterator() : [])); ?> <?php $component->withName('forms.button-secondary'); ?> <?php if ($component->shouldRender()): ?> <?php $__env->startComponent($component->resolveView(), $component->data()); ?> <?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag && $constructor = (new ReflectionClass(App\View\Components\Forms\ButtonSecondary::class))->getConstructor()): ?> <?php $attributes = $attributes->except(collect($constructor->getParameters())->map->getName()->all()); ?> <?php endif; ?> <?php $component->withAttributes(['data-cat-id' => ''.e($subcategory->id).'','class' => 'delete-category']); ?> <?php echo app('translator')->get('app.delete'); ?> <?php echo $__env->renderComponent(); ?> <?php endif; ?> <?php if (isset($__componentOriginal5e57c6582b8a883148a28bb7ee46d2ad)): ?> <?php $component = $__componentOriginal5e57c6582b8a883148a28bb7ee46d2ad; ?> <?php unset($__componentOriginal5e57c6582b8a883148a28bb7ee46d2ad); ?> <?php endif; ?> <?php endif; ?> </td> </tr> <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?> <?php if (isset($component)) { $__componentOriginal1cadea97ad834515c6e69c0ef44e7014 = $component; } ?> <?php $component = App\View\Components\Cards\NoRecordFoundList::resolve(['colspan' => '4'] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? (array) $attributes->getIterator() : [])); ?> <?php $component->withName('cards.no-record-found-list'); ?> <?php if ($component->shouldRender()): ?> <?php $__env->startComponent($component->resolveView(), $component->data()); ?> <?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag && $constructor = (new ReflectionClass(App\View\Components\Cards\NoRecordFoundList::class))->getConstructor()): ?> <?php $attributes = $attributes->except(collect($constructor->getParameters())->map->getName()->all()); ?> <?php endif; ?> <?php $component->withAttributes([]); ?> <?php echo $__env->renderComponent(); ?> <?php endif; ?> <?php if (isset($__componentOriginal1cadea97ad834515c6e69c0ef44e7014)): ?> <?php $component = $__componentOriginal1cadea97ad834515c6e69c0ef44e7014; ?> <?php unset($__componentOriginal1cadea97ad834515c6e69c0ef44e7014); ?> <?php endif; ?> <?php endif; ?> <?php echo $__env->renderComponent(); ?> <?php endif; ?> <?php if (isset($__componentOriginal7d9f6e0b9001f5841f72577781b2d17f)): ?> <?php $component = $__componentOriginal7d9f6e0b9001f5841f72577781b2d17f; ?> <?php unset($__componentOriginal7d9f6e0b9001f5841f72577781b2d17f); ?> <?php endif; ?> <?php if (isset($component)) { $__componentOriginal18ad2e0d264f9740dc73fff715357c28 = $component; } ?> <?php $component = App\View\Components\Form::resolve([] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? (array) $attributes->getIterator() : [])); ?> <?php $component->withName('form'); ?> <?php if ($component->shouldRender()): ?> <?php $__env->startComponent($component->resolveView(), $component->data()); ?> <?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag && $constructor = (new ReflectionClass(App\View\Components\Form::class))->getConstructor()): ?> <?php $attributes = $attributes->except(collect($constructor->getParameters())->map->getName()->all()); ?> <?php endif; ?> <?php $component->withAttributes(['id' => 'createProjectCategory']); ?> <div class="row border-top-grey "> <div class="col-sm-12 col-md-6"> <?php if (isset($component)) { $__componentOriginal67cd5dc9866c6185ad92d933c387fa86 = $component; } ?> <?php $component = App\View\Components\Forms\Select::resolve(['fieldId' => 'create_category_id','fieldLabel' => __('modules.client.clientCategory'),'fieldName' => 'category_id','search' => 'true','fieldRequired' => 'true'] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? (array) $attributes->getIterator() : [])); ?> <?php $component->withName('forms.select'); ?> <?php if ($component->shouldRender()): ?> <?php $__env->startComponent($component->resolveView(), $component->data()); ?> <?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag && $constructor = (new ReflectionClass(App\View\Components\Forms\Select::class))->getConstructor()): ?> <?php $attributes = $attributes->except(collect($constructor->getParameters())->map->getName()->all()); ?> <?php endif; ?> <?php $component->withAttributes([]); ?> <?php $__empty_1 = true; $__currentLoopData = $categories; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $category): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?> <option value="<?php echo e($category->id); ?>"><?php echo e(mb_ucwords($category->category_name)); ?></option> <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?> <option value=""><?php echo app('translator')->get('messages.noCategoryAdded'); ?></option> <?php endif; ?> <?php echo $__env->renderComponent(); ?> <?php endif; ?> <?php if (isset($__componentOriginal67cd5dc9866c6185ad92d933c387fa86)): ?> <?php $component = $__componentOriginal67cd5dc9866c6185ad92d933c387fa86; ?> <?php unset($__componentOriginal67cd5dc9866c6185ad92d933c387fa86); ?> <?php endif; ?> </div> <div class="col-sm-12 col-md-6"> <?php if (isset($component)) { $__componentOriginal4e45e801405ab67097982370a6a83cba = $component; } ?> <?php $component = App\View\Components\Forms\Text::resolve(['fieldId' => 'category_name','fieldLabel' => __('modules.projectCategory.categoryName'),'fieldName' => 'category_name','fieldRequired' => 'true','fieldPlaceholder' => 'e.g. Potential Client'] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? (array) $attributes->getIterator() : [])); ?> <?php $component->withName('forms.text'); ?> <?php if ($component->shouldRender()): ?> <?php $__env->startComponent($component->resolveView(), $component->data()); ?> <?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag && $constructor = (new ReflectionClass(App\View\Components\Forms\Text::class))->getConstructor()): ?> <?php $attributes = $attributes->except(collect($constructor->getParameters())->map->getName()->all()); ?> <?php endif; ?> <?php $component->withAttributes([]); ?> <?php echo $__env->renderComponent(); ?> <?php endif; ?> <?php if (isset($__componentOriginal4e45e801405ab67097982370a6a83cba)): ?> <?php $component = $__componentOriginal4e45e801405ab67097982370a6a83cba; ?> <?php unset($__componentOriginal4e45e801405ab67097982370a6a83cba); ?> <?php endif; ?> </div> </div> <?php echo $__env->renderComponent(); ?> <?php endif; ?> <?php if (isset($__componentOriginal18ad2e0d264f9740dc73fff715357c28)): ?> <?php $component = $__componentOriginal18ad2e0d264f9740dc73fff715357c28; ?> <?php unset($__componentOriginal18ad2e0d264f9740dc73fff715357c28); ?> <?php endif; ?> </div> <div class="modal-footer"> <?php if (isset($component)) { $__componentOriginalc35c79ed7e812580313ad04118477974 = $component; } ?> <?php $component = App\View\Components\Forms\ButtonCancel::resolve([] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? (array) $attributes->getIterator() : [])); ?> <?php $component->withName('forms.button-cancel'); ?> <?php if ($component->shouldRender()): ?> <?php $__env->startComponent($component->resolveView(), $component->data()); ?> <?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag && $constructor = (new ReflectionClass(App\View\Components\Forms\ButtonCancel::class))->getConstructor()): ?> <?php $attributes = $attributes->except(collect($constructor->getParameters())->map->getName()->all()); ?> <?php endif; ?> <?php $component->withAttributes(['data-dismiss' => 'modal','class' => 'border-0 mr-3']); ?><?php echo app('translator')->get('app.close'); ?> <?php echo $__env->renderComponent(); ?> <?php endif; ?> <?php if (isset($__componentOriginalc35c79ed7e812580313ad04118477974)): ?> <?php $component = $__componentOriginalc35c79ed7e812580313ad04118477974; ?> <?php unset($__componentOriginalc35c79ed7e812580313ad04118477974); ?> <?php endif; ?> <?php if (isset($component)) { $__componentOriginalcf8d12533ff890e0d6573daf32b7618d = $component; } ?> <?php $component = App\View\Components\Forms\ButtonPrimary::resolve(['icon' => 'check'] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? (array) $attributes->getIterator() : [])); ?> <?php $component->withName('forms.button-primary'); ?> <?php if ($component->shouldRender()): ?> <?php $__env->startComponent($component->resolveView(), $component->data()); ?> <?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag && $constructor = (new ReflectionClass(App\View\Components\Forms\ButtonPrimary::class))->getConstructor()): ?> <?php $attributes = $attributes->except(collect($constructor->getParameters())->map->getName()->all()); ?> <?php endif; ?> <?php $component->withAttributes(['id' => 'save-category']); ?><?php echo app('translator')->get('app.save'); ?> <?php echo $__env->renderComponent(); ?> <?php endif; ?> <?php if (isset($__componentOriginalcf8d12533ff890e0d6573daf32b7618d)): ?> <?php $component = $__componentOriginalcf8d12533ff890e0d6573daf32b7618d; ?> <?php unset($__componentOriginalcf8d12533ff890e0d6573daf32b7618d); ?> <?php endif; ?> </div> <script> init(MODAL_LG); $('.delete-category').click(function() { var id = $(this).data('cat-id'); var url = "<?php echo e(route('clientSubCategory.destroy', ':id')); ?>"; url = url.replace(':id', id); var token = "<?php echo e(csrf_token()); ?>"; Swal.fire({ title: "<?php echo app('translator')->get('messages.sweetAlertTitle'); ?>", text: "<?php echo app('translator')->get('messages.recoverRecord'); ?>", icon: 'warning', showCancelButton: true, focusConfirm: false, confirmButtonText: "<?php echo app('translator')->get('messages.confirmDelete'); ?>", cancelButtonText: "<?php echo app('translator')->get('app.cancel'); ?>", customClass: { confirmButton: 'btn btn-primary mr-3', cancelButton: 'btn btn-secondary' }, showClass: { popup: 'swal2-noanimation', backdrop: 'swal2-noanimation' }, buttonsStyling: false }).then((result) => { if (result.isConfirmed) { $.easyAjax({ type: 'POST', url: url, data: { '_token': token, '_method': 'DELETE' }, success: function(response) { if (response.status == "success") { $('#cat-' + id).fadeOut(); var options = []; var rData = []; rData = response.data; $.each(rData, function(index, value) { var selectData = ''; selectData = '<option value="' + value.id + '">' + value .category_name + '</option>'; options.push(selectData); }); $('#sub_category_id').html('<option value="">--</option>' + options); $('#sub_category_id').selectpicker('refresh'); } } }); } }); }); $('#save-category').click(function() { var url = "<?php echo e(route('clientSubCategory.store')); ?>"; $.easyAjax({ url: url, container: '#createProjectCategory', type: "POST", data: $('#createProjectCategory').serialize(), success: function(response) { if (response.status == 'success') { var options = []; var rData = []; rData = response.data; $.each(rData, function(index, value) { var selectData = ''; selectData = '<option value="' + value.id + '">' + value .category_name + '</option>'; options.push(selectData); }); $('#category_id').html('<option value="">--</option>' + options); $('#category_id').selectpicker('refresh'); $('#sub_category_id').html('<option value="">--</option>'); $('#sub_category_id').selectpicker('refresh'); $(MODAL_LG).modal('hide'); } } }) }); $('.client-subcat-table [contenteditable=true]').focus(function() { $(this).data("initialText", $(this).html()); let rowId = $(this).data('row-id'); }).blur(function() { // ...if content is different... if ($(this).data("initialText") !== $(this).html()) { let id = $(this).data('row-id'); let value = $(this).html(); var url = "<?php echo e(route('clientSubCategory.update', ':id')); ?>"; url = url.replace(':id', id); var token = "<?php echo e(csrf_token()); ?>"; $.easyAjax({ url: url, container: '#cat-' + id, type: "POST", data: { 'category_name': value, '_token': token, '_method': 'PUT' }, blockUI: true, success: function(response) { if (response.status == 'success') { var options = []; var rData = []; rData = response.data; $.each(rData, function(index, value) { var selectData = ''; selectData = '<option value="' + value.id + '">' + value .category_name + '</option>'; options.push(selectData); }); $('#sub_category_id').html('<option value="">--</option>' + options); $('#sub_category_id').selectpicker('refresh'); } } }) } }); </script> <?php /**PATH /home2/selectio/public_html/fms-worksuite/resources/views/clients/create-subcategory.blade.php ENDPATH**/ ?>