
<?php $__env->startSection('content'); ?>
<?php Fun::lang()?>
    <div class="top-header">
        <ol class="breadcrumb">
            <li><a href="#"><?php echo e(__('administrator.Dashboard')); ?></a></li>
            <li><a href="#"><?php echo e(__('administrator.org_chart')); ?></a></li>
        </ol>
    </div>
    <meta name="csrf-token" content="<?php echo e(csrf_token()); ?>">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <link href="<?php echo e(asset('assets/js/org-chart/jquerysctipttop.css')); ?>" rel="stylesheet" type="text/css">
    <link href="<?php echo e(asset('assets/js/org-chart/jquery.orgchart.css')); ?>" media="all" rel="stylesheet" type="text/css"/>
    <style type="text/css">
        #orgChart {
            width: auto;
            height: auto;
        }
        
        #orgChartContainer {
            width: auto;
            height: 500px;
            overflow: auto;
            background: #eeeeee;
        }
    </style>
    <div class="page">
        <div class="top-content">
            <div class="row">
                <div class="col-sm-12 col-xs-12">
                    <div class="title-add">
                        <div class="pull-left">
                            <h3><?php echo e(__('administrator.company_structure')); ?></h3>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <div class="row">
            <div class="col-sm-12">
                <div id="orgChartContainer">
                    <div id="orgChart"></div>
                </div>
                <div id="consoleOutput">
                </div>
            </div>
        </div>
    </div>
<?php $__env->stopSection(); ?>
<?php $__env->startSection('js'); ?>
    <script type="text/javascript" src="<?php echo e(asset('assets/js/org-chart/jquery.orgchart.js')); ?>"></script>
    <script type="text/javascript">
        var testData = [
            {
                id: 1,
                name: 'Chair Man',
                parent: 0
            }, 
            {
                id: 2,
                name: 'CEO Office',
                parent: 1
            }, 
            {
                id: 3,
                name: 'Division 1',
                parent: 1
            }, 
            {
                id: 4,
                name: 'Division 2',
                parent: 1
            }, 
            {
                id: 6,
                name: 'Division 3',
                parent: 1
            }, 
            {
                id: 7,
                name: 'Division 4',
                parent: 1
            }, 
            {
                id: 8,
                name: 'Division 5',
                parent: 1
            }, 
            {
                id: 5,
                name: 'Sub Division',
                parent: 3
            },

        ];

        $(function() {
            org_chart = $('#orgChart').orgChart({
                data: testData,
                showControls: true,
                allowEdit: true,
                onAddNode: function(node) {
                    log('Created new node on node ' + node.data.id);
                    org_chart.newNode(node.data.id);
                },
                onDeleteNode: function(node) {
                    log('Deleted node ' + node.data.id);
                    org_chart.deleteNode(node.data.id);
                },
                onClickNode: function(node) {
                    log('Clicked node ' + node.data.id);
                }

            });
        });


        function log(text) {
            $('#consoleOutput').append('<p>' + text + '</p>')
        }
    </script>
    <script type="text/javascript">
        var _gaq = _gaq || [];
        _gaq.push(['_setAccount', 'UA-36251023-1']);
        _gaq.push(['_setDomainName', 'jqueryscript.net']);
        _gaq.push(['_trackPageview']);

        (function() {
            var ga = document.createElement('script');
            ga.type = 'text/javascript';
            ga.async = true;
            ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
            var s = document.getElementsByTagName('script')[0];
            s.parentNode.insertBefore(ga, s);
        })();
    </script>
<?php $__env->stopSection(); ?>


<?php echo $__env->make('layouts.app-hr', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /home/nsowos/public_html/shr-brand/resources/views/hr/company-structure/org_chart.blade.php ENDPATH**/ ?>