whoami7 - Manager
:
/
home
/
kckglobal
/
public_html
/
portal
/
storage
/
framework
/
views
/
Upload File:
files >> /home/kckglobal/public_html/portal/storage/framework/views/873ab3a75bdc15c5e364f6ccebc68dbc.php
<script src="https://code.jquery.com/jquery-3.6.0.min.js"></script> <script src="https://code.jquery.com/jquery-migrate-3.0.0.min.js"></script> <script src="https://code.jscharting.com/latest/jscharting.js"></script> <?php $__env->startPush('datatable-styles'); ?> <?php echo $__env->make('sections.datatable_css', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?> <style> #chartdiv { width: 100%; background-color: #fff; position: relative; } #brandingLogo { display: none !important; } tspan { font-size: 14px; } .no-select() { -moz-user-select: none; -ms-user-select: none; -webkit-user-select: none; user-select: none; } .no-wrap() { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } #dragRoot ul { display: block; margin: 0; padding: 0 0 0 20px; } #dragRoot { .no-select(); cursor: default; background-color: #fff; width: 100%; height: 100%; } #dragRoot li { display: block; margin: 2px; padding: 2px 2px 2px 0; [class*="node"] { display: inline-block; &.hover { background-color: navy; color: white; } } } #dragRoot li li { border-left: 1px solid silver; } #dragRoot li li:before { color: silver; font-weight: 300; content: "— "; } .node-facility { color: navy; font-weight: bold; } .node-cpe { color: #000; cursor: pointer; } #drophere li{ color: rgb(5, 5, 34); font-weight:bold; } #dragRoot ul li > span { color:rgb(6, 6, 44); padding: 6px; letter-spacing: 2px; } #drophere li > span { cursor: default; } .chartHeading-org{ position: relative; padding: 20px; } .setOpacity{ opacity: 0; } .unsetOpacity{ opacity: 1; } #resize,#full_view { cursor: pointer; } #dragRoot{ overflow-y: auto; overflow-x: hidden; } </style> <?php if(!user()->dark_theme): ?> <style> .chartHeading-org{ background: #fff; } </style> <?php endif; ?> <?php $__env->stopPush(); ?> <?php $addDepartmentPermission = user()->permission('add_department'); $editDepartmentPermission = user()->permission('edit_department'); ?> <?php $__env->startSection('filter-section'); ?> <?php if (isset($component)) { $__componentOriginald1a72e1108842d163a80559e15f530b4 = $component; } ?> <?php if (isset($attributes)) { $__attributesOriginald1a72e1108842d163a80559e15f530b4 = $attributes; } ?> <?php $component = App\View\Components\Filters\FilterBox::resolve([] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? (array) $attributes->getIterator() : [])); ?> <?php $component->withName('filters.filter-box'); ?> <?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\Filters\FilterBox::class))->getConstructor()): ?> <?php $attributes = $attributes->except(collect($constructor->getParameters())->map->getName()->all()); ?> <?php endif; ?> <?php $component->withAttributes([]); ?> <!-- SEARCH BY TASK START --> <div class="task-search d-flex py-1 pr-lg-3 px-0 border-right-grey align-items-center"> <form class="w-100 mr-1 mr-lg-0 mr-md-1 ml-md-1 ml-0 ml-lg-0"> <div class="input-group bg-grey rounded"> <div class="input-group-prepend"> <span class="input-group-text border-0 bg-additional-grey"> <i class="fa fa-search f-13 text-dark-grey"></i> </span> </div> <input type="text" class="form-control f-14 p-1 border-additional-grey" id="search-text-field" placeholder="<?php echo app('translator')->get('modules.department.searchValidation'); ?>"> </div> </form> </div> <!-- SEARCH BY TASK END --> <!-- RESET START --> <div class="select-box d-flex py-1 px-lg-2 px-md-2 px-0"> <?php if (isset($component)) { $__componentOriginal5e57c6582b8a883148a28bb7ee46d2ad = $component; } ?> <?php if (isset($attributes)) { $__attributesOriginal5e57c6582b8a883148a28bb7ee46d2ad = $attributes; } ?> <?php $component = App\View\Components\Forms\ButtonSecondary::resolve(['icon' => 'times-circle'] + (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(['class' => 'btn-xs d-none','id' => 'reset-filters']); ?> <?php echo app('translator')->get('app.clearFilters'); ?> <?php echo $__env->renderComponent(); ?> <?php endif; ?> <?php if (isset($__attributesOriginal5e57c6582b8a883148a28bb7ee46d2ad)): ?> <?php $attributes = $__attributesOriginal5e57c6582b8a883148a28bb7ee46d2ad; ?> <?php unset($__attributesOriginal5e57c6582b8a883148a28bb7ee46d2ad); ?> <?php endif; ?> <?php if (isset($__componentOriginal5e57c6582b8a883148a28bb7ee46d2ad)): ?> <?php $component = $__componentOriginal5e57c6582b8a883148a28bb7ee46d2ad; ?> <?php unset($__componentOriginal5e57c6582b8a883148a28bb7ee46d2ad); ?> <?php endif; ?> </div> <!-- RESET END --> <?php echo $__env->renderComponent(); ?> <?php endif; ?> <?php if (isset($__attributesOriginald1a72e1108842d163a80559e15f530b4)): ?> <?php $attributes = $__attributesOriginald1a72e1108842d163a80559e15f530b4; ?> <?php unset($__attributesOriginald1a72e1108842d163a80559e15f530b4); ?> <?php endif; ?> <?php if (isset($__componentOriginald1a72e1108842d163a80559e15f530b4)): ?> <?php $component = $__componentOriginald1a72e1108842d163a80559e15f530b4; ?> <?php unset($__componentOriginald1a72e1108842d163a80559e15f530b4); ?> <?php endif; ?> <?php $__env->stopSection(); ?> <?php $__env->startSection('content'); ?> <!-- CONTENT WRAPPER START --> <div class="content-wrapper"> <!-- Add Task Export Buttons Start --> <div class="d-grid d-lg-flex d-md-flex action-bar"> <div id="table-actions" class="flex-grow-1 align-items-center"> <?php if($addDepartmentPermission == 'all' || $addDepartmentPermission == 'added'): ?> <?php if (isset($component)) { $__componentOriginaldbb84df4c3a5cbdd95fb35d18ba6410f = $component; } ?> <?php if (isset($attributes)) { $__attributesOriginaldbb84df4c3a5cbdd95fb35d18ba6410f = $attributes; } ?> <?php $component = App\View\Components\Forms\LinkPrimary::resolve(['link' => route('departments.create'),'icon' => 'plus'] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? (array) $attributes->getIterator() : [])); ?> <?php $component->withName('forms.link-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\LinkPrimary::class))->getConstructor()): ?> <?php $attributes = $attributes->except(collect($constructor->getParameters())->map->getName()->all()); ?> <?php endif; ?> <?php $component->withAttributes(['class' => 'mr-3 openRightModal float-left','data-redirect-url' => ''.e(route('department.hierarchy')).'']); ?> <?php echo app('translator')->get('modules.department.addTitle'); ?> <?php echo $__env->renderComponent(); ?> <?php endif; ?> <?php if (isset($__attributesOriginaldbb84df4c3a5cbdd95fb35d18ba6410f)): ?> <?php $attributes = $__attributesOriginaldbb84df4c3a5cbdd95fb35d18ba6410f; ?> <?php unset($__attributesOriginaldbb84df4c3a5cbdd95fb35d18ba6410f); ?> <?php endif; ?> <?php if (isset($__componentOriginaldbb84df4c3a5cbdd95fb35d18ba6410f)): ?> <?php $component = $__componentOriginaldbb84df4c3a5cbdd95fb35d18ba6410f; ?> <?php unset($__componentOriginaldbb84df4c3a5cbdd95fb35d18ba6410f); ?> <?php endif; ?> <?php endif; ?> </div> <div class="btn-group mt-2 mt-lg-0 mt-md-0 ml-0 ml-lg-3 ml-md-3" role="group"> <a href="<?php echo e(route('departments.index')); ?>" class="btn btn-secondary f-14" data-toggle="tooltip" data-original-title="<?php echo app('translator')->get('modules.leaves.tableView'); ?>"><i class="side-icon bi bi-list-ul"></i></a> <a href="<?php echo e(route('department.hierarchy')); ?>" class="btn btn-secondary f-14 btn-active" data-toggle="tooltip" data-original-title="<?php echo app('translator')->get('modules.department.hierarchy'); ?>"><i class="bi bi-diagram-3"></i></a> </div> </div> <div class="row"> <div class="col-12 chart-section"> <div class="row"> <div class="col-md-6" id="chartTree"> <?php echo $__env->make('departments-hierarchy.chart_tree', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?> </div> <div class="col-md-6" id="chartOrganization"> <?php echo $__env->make('departments-hierarchy.chart_organization', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?> </div> </div> </div> </div> </div> <!-- CONTENT WRAPPER END --> <?php $__env->stopSection(); ?> <?php $__env->startPush('scripts'); ?> <script> var bsTooltip = $.fn.tooltip; </script> <script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.11.4/jquery-ui.min.js" type="text/javascript"></script> <script> // Initialize tooltips bsTooltip.call( $( "[data-toggle='tooltip']" ) ); var editDepartment = <?php echo json_encode($editDepartmentPermission); ?>; // Zoom in effect Zoom out effect scrHeight = $(window).height(); scrHeight = scrHeight - 280; $('#chartOrganization').css('height', scrHeight); $('#chartTree').css('height', scrHeight); $(document).on('click', '#full_view', function () { $('#chartOrganization').removeClass('col-md-6'); $('#chartOrganization').addClass('col-md-12'); $('#chartTree').hide(); $('#full_view').hide(); $('#resize').show(); $screenHeight = $(window).height(); $screenHeight = $screenHeight - 280; $('#chartDiv').css('height', $screenHeight); }); $(document).on('click', '#resize', function () { $('#chartOrganization').removeClass('col-md-12'); $('#chartOrganization').addClass('col-md-6'); $('#chartTree').show(); $('#resize').hide(); $('#full_view').show(); $('#chartDiv').css('height', '100%'); }); // Collapse tree by node $(document).on('click', '#dragRoot', function(e) { $('#node-ul-'+e.target.id).toggle(); }); // On drag reduce the opacity of the node and on drop restore the opacity $(document).on('mouseup', 'body', function(e) { $('.node-cpe').addClass('unsetOpacity'); setTimeout(() => { $('.node-cpe').removeClass('setOpacity'); }, 100); }); // initialize draggable var DragAndDrop = (function(DragAndDrop) { function shouldAcceptDrop(item) { $('.node-cpe').removeClass('unsetOpacity'); item[0].classList.add('setOpacity'); var $target = $(this).closest("li"); var $item = item.closest("li"); if ($.contains($item[0], $target[0])) { // can't drop on one of your children! return false; } return true; } function itemOver(event, ui) {} function itemOut(event, ui) {} function itemDropped(event, ui) { var parent_id = event.target.id; if (parent_id == 'NewNode') { var checkExits = setInterval(() => { if ($('#node-ul-NewNode').length) { $('#node-ul-NewNode').children('li').each(function() { $newParent = $(this).val(); }); $.ajax({ url: "<?php echo e(route('department.changeParent')); ?>", type: "POST", data: { "_token": "<?php echo e(csrf_token()); ?>", "newParent": $newParent, }, success: function(data) { if(data.status == 'success') { getToPreState = data.html; $('#chartTree').html(data.html); $('#chartOrganization').html(data.organizational); $(function() { DragAndDrop.enable("#dragRoot"); }); } } }); clearInterval(checkExits) } }, 500); } var $target = $(this).closest("li"); var $item = ui.draggable.closest("li"); var $srcUL = $item.parent("ul"); var $dstUL = $target.children("ul").first(); // destination may not have a UL yet if ($dstUL.length == 0) { $dstUL = $("<ul id='node-ul-"+parent_id+"'></ul>"); $target.append($dstUL); } $item.slideUp(50, function() { $dstUL.append($item); if ($srcUL.children("li").length == 0) { $srcUL.remove(); } $item.slideDown(50, function() { $item.css('display', ''); }); }); var checkElementExits = setInterval(() => { var values = []; if(parent_id == 'NewNode') { clearInterval(checkElementExits); } if ($('#node-ul-'+parent_id).length && parent_id != 'NewNode') { $('#node-ul-'+parent_id).children('li').each(function() { values.push($(this).val()); }); // save the values in department table $.ajax({ url: "<?php echo e(route('department.changeParent')); ?>", type: "POST", blockUI: true, container: "#chartOrganization", data: { "_token": "<?php echo e(csrf_token()); ?>", "values": values, "parent_id": parent_id }, success: function(data) { if(data.status == 'success') { getToPreState = data.html; $('#chartTree').html(data.html); $('#chartOrganization').html(data.organizational); $(function() { DragAndDrop.enable("#dragRoot"); }); } } }); clearInterval(checkElementExits); } }, 500); } DragAndDrop.enable = function(selector) { $(selector).find(".node-cpe").draggable({ helper: "clone" }); $(selector).find(".node-cpe, .node-facility").droppable({ activeClass: "active", hoverClass: "hover", accept: shouldAcceptDrop, over: itemOver, out: itemOut, drop: itemDropped, greedy: true, tolerance: "pointer" }); }; return DragAndDrop; })(DragAndDrop || {}); if (editDepartment == 'none') { $('.node-cpe').css('cursor', 'default'); } else{ $(function() { DragAndDrop.enable("#dragRoot"); }); } $('#search-text-field').on('change keyup', function() { if ($('#search-text-field').val() != "") { $('#reset-filters').removeClass('d-none'); searchText(); }else{ resetFilter(); } }) $('#reset-filters').click(function() { resetFilter(); }); function resetFilter() { $('#filter-form')[0].reset(); $('#reset-filters').addClass('d-none'); searchText(); } function searchText() { var searchText = $('#search-text-field').val(); const url = "<?php echo e(route('departments.search')); ?>"; $.easyAjax({ url: url, container: '#search-departments', type: "GET", data: { searchText: searchText, }, success: function(data) { if(data.status == 'success') { $('#chartTree').html(data.html); $('#chartOrganization').html(data.organizational); $(function() { DragAndDrop.enable("#dragRoot"); }); } } }); } </script> <?php $__env->stopPush(); ?> <?php echo $__env->make('layouts.app', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /home/kckglobal/public_html/portal/resources/views/departments-hierarchy/index.blade.php ENDPATH**/ ?>
Copyright ©2021 || Defacer Indonesia