<?php if(!empty($meals)) foreach ($meals as $key => $meal):?>

        <div class="row py-1">
            <div class="col">
                <h4>Meals Allowance </h4>
                <?php echo date('d-F-Y',strtotime($meal->date)); ?>  
            </div>
        </div>



        <div class="row">
            <div class="col-12 col-md-10">

                <div class="row">
                    <div class="col-12 col-md-6">
                        <div class="row">
                            <div class="col-md-4">
                                <b>Status (HOD)</b>
                            </div>
                            <div class="col">
                                <?php if ($meal->is_hod_approved == 0): ?>
                                    <span class="badge badge-secondary">Draft</span>
                                <?php endif ?>

                                <?php if ($meal->is_hod_approved == 1): ?>
                                    <span class="badge badge-success">Approved</span>
                                <?php endif ?>
                                
                                <?php if($meal->is_hod_approved == 2): ?>
                                    <span class="badge badge-danger">Rejected</span>
                                <?php endif ?>

                            </div>
                        </div>
                    </div>
                    <div class="col-12 col-md-6">
                        <div class="row">
                            <div class="col-md-4">
                                <b>Status (Admin)</b>
                            </div>
                            <div class="col">
                                <?php if ($meal->is_approve == 0): ?>
                                    <span class="badge badge-secondary">Draft</span>
                                <?php endif ?>

                                <?php if ($meal->is_approve == 1): ?>
                                    <span class="badge badge-success">Approved</span>                        
                                <?php endif ?>

                                <?php if ($meal->is_approve == 2): ?>
                                    <span class="badge badge-danger">Rejected</span>
                                <?php endif ?>
                            </div>
                        </div>
                    </div>
                </div>

                


                <div class="row">
                    <div class="col-lg-2">
                        <b>Remarks</b>
                    </div>
                    <div class="col" style="min-height:100px;">

                        <?php if($meal->is_hod_approved == 2): ?>
                            <?php if(!empty($meal->hod_remarks)): ?>
                                <b>[HOD] : </b> <?php echo $meal->hod_remarks; ?>
                            <?php endif; ?>
                        <?php endif; ?>

                        <?php if($meal->is_approve == 2): ?>
                            <?php if(!empty($meal->admin_remarks)): ?>
                                <b>[ADMIN] : </b> <?php echo $meal->admin_remarks; ?>
                            <?php endif; ?>
                        <?php endif; ?>


                    </div>
                </div>

            </div>
            <div class="col-12 col-md-2">

                <div class="row border-bottom">
                    <div class="col">
                        <b>Claim (RM)</b>
                        <h1><?php echo number_format($meal->amount_claim,2); ?></h1>
                    </div>
                </div>
                <div class="row">
                    <div class="col">
                        <b>Approved</b>
                        <h1><?php echo number_format($meal->amount_approved,2); ?></h1>
                    </div>
                </div>
            </div>
        </div>
        <hr>
<?php endforeach;?>