<?php $__env->startSection('content'); ?>
    <h1>Member List</h1>
    <div id="members">
        <?php if($canInsert): ?>
            <button type="button" data-toggle="tooltip" data-placement="right" class="btn btn-default command-add list-add-btn" title="<?php echo e(Lang::get('backend.new_member')); ?>">
                <span class="icon glyphicon glyphicon-plus"></span>
            </button>
        <?php endif; ?>
        <div class="list-filters-container">
            <label for="" class="list-filters-label">Filters:</label>
            <div class="list-filters">
                <div class="list-filter">
                    <?php
                        $types = [
                            '' => 'Filter by Type',
                            'noType' => 'No Type',
                            'regular' => 'Regular',
                            'associate' => 'Associate',
                        ]
                    ?>
                    <?php echo Form::select('type_filter', $types, null, array(
                        'id' => 'type_id_input',
                        'class' => 'form-control' )); ?>

                </div>
                <div class="list-filter">
                    <?php
                        $status = [
                            '' => 'Filter by Status',
                            'active' => 'Active',
                            'inactive' => 'Inactive',
                        ]
                    ?>
                    <?php echo Form::select('status_filter', $status, null, array(
                        'id' => 'status_id_input',
                        'class' => 'form-control' )); ?>

                </div>
                <div class="list-filter">
                    <?php
                        $commEmpty = [
                            0 => 'Filter by Committees',
                        ];
                        $committeesArray = array_merge($commEmpty, $committees);
                    ?>
                    <?php echo Form::select('committees_filter', $committeesArray, null, array(
                        'id' => 'committees_id_input',
                        'class' => 'form-control' )); ?>

                </div>
                <div class="list-filter">
                    <?php
                        $wgEmpty = [
                            0 => 'Filter by WG / TF',
                        ];
                        $wg = array_merge($wgEmpty, $workGroups);
                    ?>
                    <?php echo Form::select('wg_filter', $wg, null, array(
                        'id' => 'wg_id_input',
                        'class' => 'form-control' )); ?>

                </div>
                <div class="list-filter form-group">
                    <div class="form-check">
                        <?php
                            $optionsArr = ['id' => 'legal-committee', 'class' => 'form-check-input', 'data-role' => 'legal-committee'];
                        ?>
                        <?php echo e(Form::checkbox('legal_committee', '1', null, $optionsArr)); ?>

                        <label class="form-check-label" for="legal-committee">
                            Legal Committee
                        </label>
                    </div>
                    <div class="form-check">
                        <?php
                            $optionsArr = ['id' => 'legal-opinions', 'class' => 'form-check-input', 'data-role' => 'legal-opinions'];
                        ?>
                        <?php echo e(Form::checkbox('legal_opinions', '1', null, $optionsArr)); ?>

                        <label class="form-check-label" for="legal-opinions">
                            Legal Opinions
                        </label>
                    </div>
                </div>
                <button type="button" data-toggle="tooltip" class="btn btn-default command-export list-export-btn" title="Export to Excel">
                    <span class="icon glyphicon glyphicon-export"></span>
                </button>
            </div>
        </div>

        <table id="grid" class="table table-condensed table-hover table-striped">
            <thead>
                <tr>
                    <th data-column-id="id" data-type="numeric" data-identifier="true">ID</th>
                    <th data-column-id="name" data-order="asc">Company Name</th>
                    <th data-column-id="country" data-sortable="false">Country</th>
                    <th data-column-id="created_at" data-order="asc">Date created</th>
                    <th data-column-id="notes" data-sortable="false">Notes</th>
                    <th data-column-id="committees" data-sortable="false">Com / TF / WG</th>
                    <th data-column-id="users" data-formatter="users" data-type="numeric" data-sortable="false">Users</th>
                    <th data-column-id="state" data-sortable="false">State</th>
                    <th data-column-id="types" data-sortable="false">Types</th>
                    <th data-column-id="commands" data-formatter="commands" data-sortable="false"><?php echo e(trans('backend.actions')); ?></th>
                </tr>
            </thead>
        </table>
    </div>
    <script>
        $(function() {
            var manageMembersView = new Eae.View.BackendMemberList({
                el : $('#members'),
                userId : <?php echo e($loggedUser->id); ?>,
                canInsert: 'true'
            });
        });
    </script>
<?php $__env->stopSection(); ?>

<?php echo $__env->make('admin.layouts.main', [
    'scripts' => [
        path_asset('path.backoffice.js_path') . '/view/member/member-list.js'
    ]
], \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /var/www/html/resources/views/admin/pages/members/members.blade.php ENDPATH**/ ?>