<style type="text/css">
@keyframes wiggle {
    0% { transform: rotate(0deg); }
   80% { transform: rotate(0deg); }
   85% { transform: rotate(5deg); }
   95% { transform: rotate(-5deg); }
  100% { transform: rotate(0deg); }
}

h5.wiggle {
  display: inline-block;
  animation: wiggle 1.5s infinite;
}

h5.wiggle:hover {
  animation: none;
}
</style>

<div class="container-fluid" style="">
	<div class="jumbotron" style="background-color: white;">
		<div class="row">
			<div class="col-md-4 text-center align-self-center">
				<img class="image-responsive" src="<?php echo base_url($company['file_location'].$company['file_name']); ?>" style="max-height: 15rem; max-width: 15rem;">
			</div>
			<div class="col-md-8">
				<!-- <h1 class="display-4" id="cardName"><?php echo $company['name']; ?></h1> -->
				<img class="image-responsive" src="<?php echo base_url($company['file_location'].'salihin-logo.png'); ?>" style="max-height: 15rem; max-width: 15rem;">
				<p class="lead" id="cardProfile"><?php echo $company['profile']; ?></p>
				<hr class="my-4">
				<p id="cardPhone"><?php echo $company['phone']; ?></p>
				<p><a id="cardWebsite" target="_blank" href="<?php echo 'http://'.$company['website']; ?>"><?php echo $company['website']; ?></a></p>
			</div>
		</div>
	</div>

	<section style="padding-top: 2rem; padding-bottom: 2rem;">
		<div class="card">
			<div class="card-body">
				<div class="row">
					<div class="col-6">
						<h4 class="card-title float-left">Personal Data Update <?php echo $title; ?> List</h4>
					</div>
					<div class="col-6">
						<form class="form" action="<?php echo base_url('/hr/staffProfile/updateProfileIncompleteList'); ?>" method="POST">
							<input type="text" class="form-control" name="status_id" id="status_id" value="<?php echo ($title == 'Incomplete')?1:0; ?>" hidden>
							<button type="submit" class="btn btn-dark btn-round btn-sm btn-block float-right" title="View <?php echo ($title == 'Incomplete')?'Complete':'Incomplete'; ?> List" style="width: 23%; height: 42px;"><i class="fas fa-list"></i> <?php echo ($title == 'Incomplete')?'Complete':'Incomplete'; ?> List</button>
						</form>
					</div>
				</div>
				<hr>
				<b>Indicator</b>
				<div class="form-row">
					<table></table>
					<div class="col-12 col-sm-3">
						<small><b>MS</b> | Marital Status </small><br>
						<small><b>Adr</b> | Adress </small><br>
					</div>
					<div class="col-12 col-sm-3">
						<small><b>FI</b> | Family Info </small><br>
						<small><b>NK</b> | Next of Kin </small><br>
					</div>
					<div class="col-12 col-sm-3">
						<small><b>SDE</b> | Statutory Detail (Employee Rate %) </small><br>
						<small><b>SDP</b> | Statutory Detail (PCB Deduction Rate %) </small><br>
						<!-- <small><b>SDY</b> | Statutory Detail (Year) </small><br> -->
					</div>
					<div class="col-12 col-sm-3">
						<small><b>PCBC</b> | PCB Consideration </small><br>
						<small><b>CE</b> | Case of Emergency </small><br>
					</div>
				</div>
				<hr>
				<div class="table-responsive">
					<table id="table_update_profile_incomplete" class="table table-hover table-bordered">
						<thead>
                            <tr>
                            	<th>#</th>
                            	<th>Staff Name</th>
                            	<th>MS</th>
                                <th>Adr</th>
								<th>FI</th>
								<th>NK</th>
								<th>SDE</th>
								<th>SDP</th>
								<th>SDY</th>
								<th>PCBC</th>
								<th>CE</th>
                            </tr>
                        </thead>
						
						<tbody>
							<?php 
								$i = 1;
								if($staff_detail) foreach($staff_detail as $row) { ?>
									<tr>
										<td class="text-center"><?php echo $i++; ?></td>
										<td>
											<a href="<?php echo base_url('hr/StaffProfile/staffDetail/'.$row['user_id']); ?>" target="_blank"><?php echo $row['name']; ?></a>
										</td>
										<td class="text-center"><?php echo ($row['marital_status'] > 0)?'<i class="fa fa-check" style="color: green;"></i>':'<i class="fa fa-times" style="color: red;"></i>'; ?></td>
										<td class="text-center"><?php echo ($row['address'] > 0)?'<i class="fa fa-check" style="color: green;"></i>':'<i class="fa fa-times" style="color: red;"></i>'; ?></td>
										<td class="text-center"><?php echo ($row['family_info'] > 0)?'<i class="fa fa-check" style="color: green;"></i>':'<i class="fa fa-times" style="color: red;"></i>'; ?></td>
										<td class="text-center"><?php echo ($row['next_kin'] > 0)?'<i class="fa fa-check" style="color: green;"></i>':'<i class="fa fa-times" style="color: red;"></i>'; ?></td>
										<td class="text-center"><?php echo ($row['user_rate'] > 0)?'<i class="fa fa-check" style="color: green;"></i>':'<i class="fa fa-times" style="color: red;"></i>'; ?></td>
										<td class="text-center">
											<?php 
											$salary_after_epf = $row['gross_pay'] - (($row['user_rate'] / 100) * $row['gross_pay']);
											if(number_format($salary_after_epf,2) >= number_format(2833.33,2))
											{
												echo ($row['user_pcb_rate'] > 0)?'<i class="fa fa-check" style="color: green;"></i>':'<i class="fa fa-times" style="color: red;"></i>'; 
											}else{
												echo 'N/A';
											}
											?>
										</td>

										<td class="text-center"><?php echo ($row['user_statutory_year'] > 0)?'<i class="fa fa-check" style="color: green;"></i>':'<i class="fa fa-times" style="color: red;"></i>'; ?></td>

										<td class="text-center">
											<?php 
											if($row['child_info'] > 0)
											{
												echo (($row['pcb_consideration'] > 0)?'<i class="fa fa-check" style="color: green;"></i>':'<i class="fa fa-times" style="color: red;"></i>'); 
											}else{
												echo 'N/A';
											}
											?>
										</td>
										<td class="text-center"><?php echo ($row['case_emergency'] > 0)?'<i class="fa fa-check" style="color: green;"></i>':'<i class="fa fa-times" style="color: red;"></i>'; ?></td>
									</tr>
								<?php } ?>
						</tbody>
					</table>
				</div>
			</div>
		</div>
	</section>
</div>