whoami7 - Manager
:
/
home
/
kckglobal
/
.trash
/
Upload File:
files >> /home/kckglobal/.trash/5991ea458c0a0e73f8b417076094b60a.php
<style> .suggest-colors a { border-radius: 4px; width: 30px; height: 30px; display: inline-block; margin-right: 10px; margin-bottom: 10px; text-decoration: none; } </style> <div class="modal-header"> <h5 class="modal-title" id="modelHeading"><?php echo app('translator')->get('app.menu.taskLabel'); ?></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('app.labelName'); ?></th> <th><?php echo app('translator')->get('app.description'); ?></th> <th><?php echo app('translator')->get('app.project'); ?></th> <th class="text-right"><?php echo app('translator')->get('app.action'); ?></th> <?php $__env->endSlot(); ?> <?php $__empty_1 = true; $__currentLoopData = $taskLabels; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $key=>$item): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?> <tr id="label-<?php echo e($item->id); ?>"> <td><?php echo e($key + 1); ?></td> <td data-row-id="<?php echo e($item->id); ?>" data-column="label_name" contenteditable="true"> <?php echo e(mb_ucwords($item->label_name)); ?> </td> <td data-row-id="<?php echo e($item->id); ?>" data-column="description" contenteditable="true"><?php echo e($item->description); ?> </td> <td data-row-id="<?php echo e($item->id); ?>" data-column="project"> <select class="form-control select-picker change-project" name="project" id="project_id" data-live-search="true" data-size="8" data-label-id="<?php echo e($item->id); ?>"> <option value="">--</option> <?php $__currentLoopData = $projects; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $project): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> <option <?php if($project->id == $item->project_id): ?> selected <?php endif; ?> value="<?php echo e($project->id); ?>"> <?php echo e(mb_ucwords($project->project_name)); ?> </option> <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?> </select> </td> <td class="text-right"> <?php if(user()->permission('task_labels') == 'all'): ?> <?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-label-id' => ''.e($item->id).'','class' => 'delete-label']); ?> <?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' => '5'] + (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' => 'createTaskLabelForm']); ?> <div class="row border-top-grey "> <div class="col-md-6"> <?php if (isset($component)) { $__componentOriginal4e45e801405ab67097982370a6a83cba = $component; } ?> <?php $component = App\View\Components\Forms\Text::resolve(['fieldId' => 'label_name','fieldLabel' => __('app.label') .' '. __('app.name'),'fieldName' => 'label_name','fieldRequired' => 'true','fieldPlaceholder' => __('placeholders.label')] + (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-md-6"> <?php if (isset($component)) { $__componentOriginal4e45e801405ab67097982370a6a83cba = $component; } ?> <?php $component = App\View\Components\Forms\Text::resolve(['fieldId' => 'label_color','fieldLabel' => __('modules.sticky.colors'),'fieldName' => 'color','fieldRequired' => 'true'] + (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-md-6"> <?php if (isset($component)) { $__componentOriginal67cd5dc9866c6185ad92d933c387fa86 = $component; } ?> <?php $component = App\View\Components\Forms\Select::resolve(['fieldId' => 'project_id','fieldLabel' => __('app.project'),'fieldName' => 'project_id','search' => '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([]); ?> <option value="">--</option> <?php $__currentLoopData = $projects; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $project): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?> <option <?php if($project->id == $projectId): ?> selected <?php endif; ?> value="<?php echo e($project->id); ?>"><?php echo e($project->project_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; ?> <input type="hidden" name="parent_project_id" value="<?php echo e($projectId); ?>"> </div> <div class="col-sm-12 col-md-12"> <?php if (isset($component)) { $__componentOriginal2f60389a9e230471cd863683376c182f = $component; } ?> <?php $component = App\View\Components\Forms\Textarea::resolve(['fieldLabel' => __('app.description'),'fieldName' => 'description','fieldId' => 'description'] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? (array) $attributes->getIterator() : [])); ?> <?php $component->withName('forms.textarea'); ?> <?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\Textarea::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($__componentOriginal2f60389a9e230471cd863683376c182f)): ?> <?php $component = $__componentOriginal2f60389a9e230471cd863683376c182f; ?> <?php unset($__componentOriginal2f60389a9e230471cd863683376c182f); ?> <?php endif; ?> </div> <div class="col-md-12"> <div class="suggest-colors"> <a style="background-color: #0033CC" data-color="#0033CC" href="javascript:;"> </a><a style="background-color: #428BCA" data-color="#428BCA" href="javascript:;"> </a><a style="background-color: #CC0033" data-color="#CC0033" href="javascript:;"> </a><a style="background-color: #44AD8E" data-color="#44AD8E" href="javascript:;"> </a><a style="background-color: #A8D695" data-color="#A8D695" href="javascript:;"> </a><a style="background-color: #5CB85C" data-color="#5CB85C" href="javascript:;"> </a><a style="background-color: #69D100" data-color="#69D100" href="javascript:;"> </a><a style="background-color: #004E00" data-color="#004E00" href="javascript:;"> </a><a style="background-color: #34495E" data-color="#34495E" href="javascript:;"> </a><a style="background-color: #7F8C8D" data-color="#7F8C8D" href="javascript:;"> </a><a style="background-color: #A295D6" data-color="#A295D6" href="javascript:;"> </a><a style="background-color: #5843AD" data-color="#5843AD" href="javascript:;"> </a><a style="background-color: #8E44AD" data-color="#8E44AD" href="javascript:;"> </a><a style="background-color: #FFECDB" data-color="#FFECDB" href="javascript:;"> </a><a style="background-color: #AD4363" data-color="#AD4363" href="javascript:;"> </a><a style="background-color: #D10069" data-color="#D10069" href="javascript:;"> </a><a style="background-color: #FF0000" data-color="#FF0000" href="javascript:;"> </a><a style="background-color: #D9534F" data-color="#D9534F" href="javascript:;"> </a><a style="background-color: #D1D100" data-color="#D1D100" href="javascript:;"> </a><a style="background-color: #F0AD4E" data-color="#F0AD4E" href="javascript:;"> </a><a style="background-color: #AD8D43" data-color="#AD8D43" href="javascript:;"> </a> </div> </div> <input type="hidden" name="task_id" id="task_id" value="<?php echo e($taskId); ?>"> </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.cancel'); ?> <?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-label']); ?><?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> $('.suggest-colors a').click(function() { var color = $(this).data('color'); $('#label_color').val(color); $('.asColorPicker-trigger span').css('background', color); }); $(".select-picker").selectpicker(); $('.delete-label').click(function() { var taskId = $('#task_id').val(); var id = $(this).data('label-id'); var url = "<?php echo e(route('task-label.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: { 'taskId': taskId, '_token': token, '_method': 'DELETE' }, success: function(response) { if (response.status == 'success') { $('#label-'+id).remove(); $('#task_labels').html(response.data); $('#task_labels').selectpicker('refresh'); } } }); } }); }); $('#save-label').click(function() { var url = "<?php echo e(route('task-label.store')); ?>"; $.easyAjax({ url: url, container: '#createTaskLabelForm', type: "POST", data: $('#createTaskLabelForm').serialize(), success: function(response) { if (response.status == 'success') { $('#task_labels').html(response.data); $('#task_labels').selectpicker('refresh'); $(MODAL_XL).modal('hide'); } } }) }); $('[contenteditable=true]').focus(function() { $(this).data("initialText", $(this).html()); let rowId = $(this).data('row-id'); }).blur(function() { if ($(this).data("initialText") !== $(this).html()) { let id = $(this).data('row-id'); let tableId = $(this).parent().attr('id'); var url = "<?php echo e(route('task-label.update', ':id')); ?>"; url = url.replace(':id', id); var token = "<?php echo e(csrf_token()); ?>"; $('#'+tableId).each(function() { let labelName = $(this).find("td:nth-child(2)").html(); let description = $(this).find("td:nth-child(3)").html(); $.easyAjax({ url: url, container: '#row-' + id, type: "POST", data: { 'label_name': labelName, 'description': description, '_token': token, '_method': 'PUT' }, blockUI: true, success: function(response) { if (response.status == 'success') { $('#task_labels').html(response.data); $('#task_labels').selectpicker('refresh'); } } }) }); } }); $.fn.projectLabel = function(projectId){ let id = projectId; if (id === '') { id = 0; } let url = "<?php echo e(route('projects.labels', ':id')); ?>"; url = url.replace(':id', id); $.easyAjax({ url: url, type: "GET", container: '#save-task-data-form', blockUI: true, redirect: true, success: function (data) { $('#task_labels').html(data.data); $('#task_labels').selectpicker('refresh'); } }) } $('#example').on('change keyup', '#project_id',function() { var id = $(this).data('label-id'); var url = "<?php echo e(route('task-label.update', ':id')); ?>"; url = url.replace(':id', id); var token = "<?php echo e(csrf_token()); ?>"; var projectId = $(this).val(); var taskId = $('#task_id').val(); var labelId = $('#label_id').val(); if (projectId === '') { projectId = 0; } if (id != "") { $.easyAjax({ url: url, container: '#row-' + id, type: "POST", data: { 'task_id': taskId, 'label_id': id, 'project_id': projectId, '_token': token, '_method': 'PUT' }, blockUI: true, success: function(response) { if (response.status == 'success') { $('#task_labels').html(response.data); $('#task_labels').selectpicker('refresh'); $.fn.projectLabel(projectId); } } }) } }); </script> <?php /**PATH /home/kckglobal/public_html/portal/resources/views/tasks/create_label.blade.php ENDPATH**/ ?>
Copyright ©2021 || Defacer Indonesia