<div class="page-wrapper">
    <div class="container-fluid pt-25">
        <div class="row">
            <div class="col-sm-12">
                <div class="panel panel-default card-view">
                    <div class="panel-heading">
                        <div class="pull-left">
                            <h6 class="panel-title txt-dark">User Point History (User Name - <?php echo $user['name']; ?>)</h6>
                        </div>
                        <div class="clearfix"></div>
                    </div>
                    <div class="panel-wrapper collapse in">
                        <div class="panel-body">
                            <div class="row">
                                <?php if(isset($history) && $history){ foreach ($history as $key => $value) { ?>
                                    <div class="col-lg-12 col-md-12">
                                        <div class="tokens ht <?php echo($value['type']==0)?'ht-success':'ht-danger'; ?>">
                                            <div class="row">
                                                <div class="col-lg-7 col-md-7 col-sm-7 col-7">
                                                    <p class="mb-0"><?php echo $value['reason']; ?></p>
                                                    <p class="mb-0"><?php echo date('d/m/Y',strtotime($value['date'])); ?>, <?php echo date('h:i A',strtotime($value['date'])); ?></p>
                                                </div>
                                                <div class="col-lg-5 col-md-5 col-sm-5 col-5 text-right">
                                                    <h6><?php echo($value['type']==0)?'+':'-'; ?> <img src="<?php echo base_url(); ?>assets/user/images/star-img.svg" width="15"> <?php echo $value['point']; ?></h6>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                <?php } }else{ ?>
                                    <div class="col-lg-12 col-md-12">
                                        <p>No History Available...</p>
                                    </div>
                                <?php } ?>
                            </div>
                        </div>
                    </div>
                </div>  
            </div>
        </div>
    </div>
<style>
    .ht{border:none;margin-bottom: 10px;}
    .ht-success{background: #e0ffe5 0% 0% no-repeat padding-box;}
    .ht-danger{background: #ffe1ea 0% 0% no-repeat padding-box;}
    .tokens {
        border-radius: 10px;
        opacity: 1;
        padding: 10px;
    }
    .tokens p{font-size:14px;}
    .tokens h6{font-size:20px; font-weight:bold;}
</style>