whoami7 - Manager
:
/
home
/
kckglobal
/
www
/
portal
/
storage
/
framework
/
views
/
Upload File:
files >> //home/kckglobal/www/portal/storage/framework/views/aafdec75b1bde6ef00b1a12791334e59.php
<?php $deleteExpenseCategoryPermission = user()->permission('manage_expense_category'); ?> <div class="modal-header"> <h5 class="modal-title" id="modelHeading"><?php echo app('translator')->get('modules.expenses.expenseCategory'); ?></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']); ?> <?php $__env->slot('thead', null, []); ?> <th>#</th> <th><?php echo app('translator')->get('modules.projectCategory.categoryName'); ?></th> <th><?php echo app('translator')->get('modules.expenseCategory.allowRoles'); ?></th> <th class="text-right"><?php echo app('translator')->get('app.action'); ?></th> <?php $__env->endSlot(); ?> <?php $__empty_1 = true; $__currentLoopData = $categories; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $key=>$item): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?> <tr id="row-<?php echo e($item->id); ?>"> <td><?php echo e($key + 1); ?></td> <td data-row-id="<?php echo e($item->id); ?>" contenteditable="true"><?php echo e(mb_ucwords($item->category_name)); ?></td> <td> <div class='form-group mb-0'> <select name="cat_role[]" data-row-id="<?php echo e($item->id); ?>" id="cat_role-<?php echo e($item->id); ?>" multiple class="form-control select-picker cat_roles" data-size="8" > <?php $__currentLoopData = $roles; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $role): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> <?php $selected = ''; ?> <?php $__currentLoopData = $item->roles; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $roledata): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> <?php if($roledata->role_id == $role->id): ?> <?php $selected = 'selected'; ?> <?php endif; ?> <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?> <option <?php echo e($selected); ?> value="<?php echo e($role->id); ?>"><?php echo e(mb_ucwords($role->name)); ?></option> <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?> </select> </div> </td> <td class="text-right"> <?php if($deleteExpenseCategoryPermission == 'all' || ($deleteExpenseCategoryPermission == 'added' && $item->added_by == user()->id)): ?> <?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-row-id' => ''.e($item->id).'','class' => 'delete-row']); ?> <?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"> <?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' => __('placeholders.category')] + (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 class="col-sm-12"> <?php if (isset($component)) { $__componentOriginal67cd5dc9866c6185ad92d933c387fa86 = $component; } ?> <?php $component = App\View\Components\Forms\Select::resolve(['fieldId' => 'role','fieldLabel' => __('modules.expenseCategory.assignToRole'),'multiple' => 'true','fieldName' => 'role[]'] + (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 $__currentLoopData = $roles; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $role): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> <option value="<?php echo e($role->id); ?>"><?php echo e(mb_ucwords($role->name)); ?></option> <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?> <?php echo $__env->renderComponent(); ?> <?php endif; ?> <?php if (isset($__componentOriginal67cd5dc9866c6185ad92d933c387fa86)): ?> <?php $component = $__componentOriginal67cd5dc9866c6185ad92d933c387fa86; ?> <?php unset($__componentOriginal67cd5dc9866c6185ad92d933c387fa86); ?> <?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> $(".select-picker").selectpicker(); $('.delete-row').click(function() { var id = $(this).data('row-id'); var url = "<?php echo e(route('expenseCategory.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") { $('#row-' + id).fadeOut(); $('#expense_category_id').html(response.data); $('#expense_category_id').selectpicker('refresh'); } } }); } }); }); $('#save-category').click(function() { var url = "<?php echo e(route('expenseCategory.store')); ?>"; $.easyAjax({ url: url, container: '#createProjectCategory', type: "POST", data: $('#createProjectCategory').serialize(), disableButton: true, blockUI: true, buttonSelector: "#save-category", success: function(response) { if (response.status == 'success') { if (response.status == 'success') { $('#expense_category_id').html(response.data); $('#expense_category_id').selectpicker('refresh'); $(MODAL_LG).modal('hide'); } } } }) }); $('#save-category').click(function() { let userId = $('#user_id').val(); const url = "<?php echo e(route('expenses.get_employee_projects')); ?>"; let data = $('#save-expense-data-form').serialize(); if (userId != '') { setTimeout(function() { $.easyAjax({ url: url, type: "GET", data: {'userId' : userId}, success: function(response) { $('#expense_category_id').html('<option value="">--</option>'+response.category); $('#expense_category_id').selectpicker('refresh') } }); }, 2000); } }); $('[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('expenseCategory.update', ':id')); ?>"; url = url.replace(':id', id); var token = "<?php echo e(csrf_token()); ?>"; $.easyAjax({ url: url, container: '#row-' + id, type: "POST", data: { 'category_name': value, '_token': token, '_method': 'PUT' }, blockUI: true, success: function(response) { if (response.status == 'success') { $('#expense_category_id').html(response.data); $('#expense_category_id').selectpicker('refresh'); } } }) } }); $('.cat_roles').change(function() { let id = $(this).data('row-id'); if (typeof id === 'undefined') { return false; } let value = $(this).val(); var url = "<?php echo e(route('expenseCategory.update', ':id')); ?>"; url = url.replace(':id', id); var token = "<?php echo e(csrf_token()); ?>"; $.easyAjax({ url: url, container: '#row-' + id, type: "POST", data: { 'roles': value, '_token': token, 'role_update': 1, '_method': 'PUT' }, blockUI: true, success: function(response) { $('#expense_category_id').html(response.data); $('#expense_category_id').selectpicker('refresh') } }) }); $('.cat_roles').change(function() { let categoryId = $('#expense_category_id').val(); const url = "<?php echo e(route('expenses.get_category_employees')); ?>"; let data = $('#save-expense-data-form').serialize(); if (categoryId != '') { setTimeout(function() { $.easyAjax({ url: url, type: "GET", data: {'categoryId' : categoryId}, success: function(response) { $('#user_id').html('<option value="">--</option>'+response.employees); $('#user_id').selectpicker('refresh') $('#expense_category_id').html('<option value="">--</option>'+response.category); $('#expense_category_id').selectpicker('refresh') } }); }, 2000); } }); </script> <?php /**PATH /home/kckglobal/public_html/portal/resources/views/expenses/category/create.blade.php ENDPATH**/ ?>
Copyright ©2021 || Defacer Indonesia