<!-- trainers -->
<?php if(!empty($trainers)) foreach($trainers as $key => $value): ?>

        
        <div class="row py-1">
            <div class="col">
                <h4>Trainer / Facilitator</h4>
                <?php echo date('d-F-Y',strtotime($value->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 ($value->is_hod_approve == 0): ?>
                                    <span class="badge badge-secondary">Draft</span>
                                <?php endif ?>

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

                                <?php if ($value->is_hod_approve == 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 ($value->is_admin_approve == 0): ?>
                                    <span class="badge badge-secondary">Draft</span>
                                <?php endif ?>

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

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

                <div class="row">
                    <div class="col-lg-2"><b>Title</b></div>
                    <div class="col">
                        <?php echo $value->title; ?>
                    </div>
                </div>
            
                <div class="row">
                    <div class="col-lg-2"><b>Start At : </b></div>
                    <div class="col"><?php echo date('h:i a',strtotime($value->start_at)); ?></div>
                    <div class="cl-lg-2"><b>End At : </b></div>
                    <div class="col"><?php echo date('h:i a',strtotime($value->end_at)); ?></div>
                </div>
            
                <div class="row">
                    <div class="col-lg-2"><b>Type</b></div>
                    <div class="col">
                        <?php if(!empty($value->type) && $value->type == 1): ?>
                            External Training
                        <?php else: ?>
                            Inhouse Training
                        <?php endif; ?>
                    </div>
                </div>
            
                <div class="row">
                    <div class="col-lg-2"><b>Remarks</b></div>
                    <div class="col" style="min-height:100px;">
                        <?php if($value->is_hod_approve == 2): ?>
                            <?php if(!empty($value->hod_remarks)): ?>
                                <b>[HOD] : </b> <?php echo $value->hod_remarks; ?>
                            <?php endif; ?>
                        <?php endif; ?>

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

                    </div>
                </div>
            
                <div class="row">
                    <div class="col-lg-2"><b>Attachments</b></div>
                    <div class="col">
                        <ol>
                            <?php foreach($value->attachments as $att_key => $att_val): ?>
                                <li>
                                    <a href="<?php echo base_url('hr/claim/openAttachment/'.$att_val->unique_id.'/TRAINER'); ?>" target="_blanl"><?php echo $att_val->attachment_name;?></a><br>
                                    <small><?php echo $att_val->description; ?></small>
                                </li>
                            <?php endforeach; ?>
                        </ol>
                    </div>
                </div>

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

                <div class="row py-1 border-bottom">
                    <div class="col">
                        <b>Claimed (RM)</b>
                        <h1><?php echo number_format($value->amount,2); ?></h1>
                    </div>
                </div>

                <div class="row py-1"">
                    <div class="col">
                        <b>Approved (RM)</b>
                        <h1><?php echo number_format($value->amount_approved,2); ?></h1>
                    </div>
                </div>

            </div>
        </div>
        <hr>
<?php endforeach; ?>