
<div class="row">
    
    
    <div class="col-md-11"><h4 class="text-left mt-3">Play Group User Session List</h4></div>
    <div class="col-md-1"><a href="<?= base_url('record') ?>" class="btn btn-sm btn-warning mt-1">Back</a></div>

</div>
<hr>
<div class="table-responsive mt-2">
    <table id="group_table" class="table table-bordred table-striped" style="overflow-x: scroll;">
        <thead>

            <tr>
                <th>Group&nbsp;User</th>
                <th>Audience&nbsp;Type</th>
                <th>Admin&nbsp;Name</th>
                <th>Date&nbsp;Time</th>
                <th>Total&nbsp;Male</th>
                <th>Total&nbsp;Female</th>
                <th>Total&nbsp;Boy</th>
                <th>Total&nbsp;Girl</th>

                <th style="min-width: 100px">Detail</th>
            </tr>

        </thead>
        <tbody>
            <?php
            if (isset($list_group_user) and $list_group_user) {
                foreach ($list_group_user as $value) {
                    ?>
                    <tr id="<?= $value['sessionId'] ?>">
                        <td class="text-left"><?= $value['groupModeName'] ?></td>

                        <td class="text-left"><?= $value['audienceType'] ?></td>
                        <td class="text-left"><p id="type_group_<?= $value['sessionId'] ?>"><?= $value['userName'] ?></p></td><!-- comment -->
                        <td class="text-left"><?= date('d-m-Y h:i:s a', strtotime($value['groupModeDateAndTime'])) ?></td>

                        <td class="text-left"><?= $value['noOfMale'] ?></td>

                        <td class="text-left"><?= $value['noOfFemale'] ?></td>
                        <td class="text-left"><?= $value['noOfBoy'] ?></td>
                        <td class="text-left"><?= $value['noOfGirl'] ?></td>

                        <td class="text-left">
                            <div class="" id="<?= 'spinner_' . $value['sessionId'] ?>" style="display: none;margin-top: 2px;">
                                <span class="success"><i class="fa fa-spinner fa-spin"></i></span>
                            </div>
                            <button type="button"  class="btn btn-primary btn-sm group_get_session_detail" value="<?= $value['sessionId'] ?>">Detail</button>

                        </td>
                    </tr>
                    <?php
                }
            } else {
                ?>

                <tr >

                    <td class="text-center" colspan="9">No data</td>

                </tr>

            <?php }
            ?>
        </tbody>

    </table>
</div>
