<?php $__env->startSection('content'); ?>
    <?php Fun::lang()?>
    <div class="top-header">
        <ol class="breadcrumb">
            <li><a href="<?php echo e(route('app_dashboard')); ?>"><?php echo e(myBranch()->name??'App'); ?></a></li>
        </ol>
    </div>
    <div class="page">
        <div class=container-fluid>
            <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.branch')); ?></h3>
                            </div>
                            <div class="pull-right">
                                <a onclick="getHtmlForm('<?php echo e(route('branch.create')); ?>','<?php echo e(__('administrator.create')); ?> <?php echo e(__('administrator.branch')); ?>','30%')" class=" button_info"><span class="fa fa-plus"></span> <?php echo e(__('administrator.create')); ?></a>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <div class="wrapper-table">
                <table id="datatable" class="table table-striped table-hover ">
                    <thead>
                        <tr>
                            <th>#</th>
                            <th><?php echo e(__('administrator.logo')); ?></th>
                            <th><?php echo e(__('administrator.name')); ?></th>
                            <th><?php echo e(__('administrator.contact')); ?></th>
                            <th><?php echo e(__('administrator.address')); ?></th>
                            <th><?php echo e(__('administrator.main')); ?></th>
                            <th><?php echo e(__('administrator.action')); ?></th>
                        </tr>
                    </thead>
                    <tbody>

                    </tbody>
                </table>
            </div>
        </div>
    </div>
<?php $__env->stopSection(); ?>
<?php $__env->startSection('script'); ?>
    <script type="text/javascript">
        let $table = $('#datatable');
        $(document).ready(function () {
            getTable();
            $table.on('click','.btn-edit',function () {
                let href = $(this).data('href');
                getHtmlForm(href,'<?php echo e(__('administrator.edit').' '.__('administrator.branch')); ?>','30%')
            })
        });
        function getTable() {
            $table.DataTable().destroy();
            $table.DataTable({
                ordering: false,
                serverSide: true,
                lengthMenu: [
                    [20, 30, 50, 100, 200, 500, 1000],
                    [20, 30, 50, 100, 200, 500, 1000]
                ],
                ajax: "<?php echo e(route('branch.index')); ?>",
                columns:
                    [
                        {
                            data: 'DT_RowIndex',
                            searchable:false,
                            'orderable':false
                        },
                        {
                            data: 'logo',
                            searchable:false
                        },
                        {
                            data: 'name',
                            'name': 'nso007_branch.name'
                        },
                        {
                            data: 'phone',
                            'name': 'nso007_branch.phone'
                        },
                        {
                            data: 'address',
                            'name': 'nso007_branch.address'
                        },
                        {
                            data: 'main',
                            searchable:false
                        },
                        {
                            data: 'action',
                            searchable:false
                        },

                    ],
                "initComplete": function (settings, json) {
                }

            });

        }
    </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/branch/index.blade.php ENDPATH**/ ?>