<link rel="stylesheet" type="text/css" href="<?php echo base_url(); ?>assets/themes/web/css/landing-page.css" />
<!--link rel="stylesheet" type="text/css" href="<?php //echo base_url(); ?>assets/vendors/simple-line-icons/css/simple-line-icons.css" /-->

<link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/simple-line-icons/2.5.5/css/simple-line-icons.min.css" />

<section class="container" style="padding-bottom: 2rem;">
	<div class="card bg-light-transparent">
		<div class="card-body">
			<!-- 1st row -->
			<div class="row justify-content-center">
				
				<div class="col-12 col-sm-3 mb-3">
					<?php
						$role = 'user';
						if(!empty($_SESSION['module_data'])){
							if($_SESSION['module_data']['role'] != 'user'){
								$role = '!user';
							}
						}
					?>
					<a href="<?php echo($role == 'user')? base_url('hr/payslip/mypayslip') : base_url('hr/payslip/payslip_upload_list') ?>" class="text-decoration-none">
						<div class="card text-white bg-dark">
							<div class="card-body">
								<h5 class="card-title"><i class="fas fa-money-bill-alt"></i> Payslip</h5>
								<p class="card-text"></p>
							</div>
						</div>
					</a>
				</div>

				<div class="col-12 col-sm-3 mb-3">
						<a href="<?php echo base_url('hr/leave')?>" class="text-decoration-none">
						
						<div class="card text-white bg-dark" class="text-decoration-none">
							<div class="card-body">
								<h5 class="card-title"><i class="fas fa-plane"></i> Leave</h5> 
								<p class="card-text"></p>
							</div>
						</div>
					</a>
				</div>

				<div class="col-12 col-sm-3 mb-3">
					<a href="<?php echo base_url('hr/movement/calendar')?>" class="text-decoration-none">
						<div class="card text-white bg-dark" class="text-decoration-none">
							<div class="card-body">
								<h5 class="card-title"><i class="fas fa-suitcase"></i> Movement</h5> 
								<p class="card-text"></p>
							</div>
						</div>
					</a>
				</div>

				<div class="col-12 col-sm-3 mb-3">
					<a href="<?php echo ($this->session->userdata('module_data')['role'] == 'admin')?base_url('hr/StaffProfile'):base_url('hr/myprofile/staffDetail/'.$this->session->userdata('user')['id']); ?>" class="text-decoration-none">
						<div class="card text-white bg-dark" class="text-decoration-none">
							<div class="card-body">
								<h5 class="card-title"><i class="fas fa-address-card"></i> Profiling</h5> 
								<p class="card-text"></p>
							</div>
						</div>
					</a>
				</div>
				
			</div>
			<!-- 2nd row -->
			<div class="row justify-content-center">
		
				<div class="col-12 col-sm-3 mb-3 mb-sm-1">
					<a href="<?php echo base_url('hr/PoliciesAndProcedures')?>" class="text-decoration-none">
						<div class="card text-white bg-dark">
							<div class="card-body">
								<h5 class="card-title"><i class="fa fa-pencil-alt"></i> Policies & Procedures</h5>
								<p class="card-text"></p>
							</div>
						</div>
					</a>
				</div>

				<div class="col-12 col-sm-3 mb-3 mb-sm-1">
					<a href="<?php echo base_url('hr/Overtime')?>" class="text-decoration-none">
						<div class="card text-white bg-dark">
							<div class="card-body">
								<h5 class="card-title">
									<i class="fas fa-clock"></i> Overtime Management
								</h5>
								<p class="card-text"></p>
							</div>
						</div>
					</a>
				</div>

				<div class="col-12 col-sm-3 mb-3 mb-sm-1">
					<a href="<?php echo base_url('hr/claim_v2/myClaimList')?>" class="text-decoration-none">
						<div class="card text-white bg-dark">
							<div class="card-body">
								<h5 class="card-title">
									<i class="fas fa-file-invoice-dollar"></i>
								Claim</h5><br>
								<p class="card-text"></p>
							</div>
						</div>
					</a>
				</div>

				<div class="col-12 col-sm-3 mb-1 mb-sm-1">
					<a href="<?php echo base_url('/training')?>" class="text-decoration-none">
						<div class="card text-white bg-dark">
							<div class="card-body">
								<h5 class="card-title">
									
									<i class="fab fa-slideshare"></i>
									Training</h5><br>
								<p class="card-text"></p>
							</div>
						</div>
					</a>
				</div>

			</div>
			<!-- 3rd row -->
			<div class="row justify-content-center">
				<?php if ($this->logged_module['role'] == 'admin'): ?>
					<div class="col-12 col-sm-3 mb-1 mb-sm-1">
						<a href="<?php echo base_url('hr/exam/exam_list_admin'); ?>" class="text-decoration-none">
							<div class="card text-white bg-dark">
								<div class="card-body">
									<h5 class="card-title">
										
										<i class="fas fa-copy"></i>
										Professional Exam / Courses </h5><br>
									<p class="card-text"></p>
								</div>
							</div>
						</a>
					</div>
				<?php endif; ?>
				<?php if ($this->logged_module['role'] == 'admin'): ?>
					<div class="col-12 col-sm-3 mb-1 mb-sm-1">
						<a href="<?php echo base_url('hr/holiday'); ?>" class="text-decoration-none">
							<div class="card text-white bg-dark">
								<div class="card-body">
									<h5 class="card-title">
										<i class="fas fa-copy"></i>
										Holiday </h5><br>
									<p class="card-text"></p>
								</div>
							</div>
						</a>
					</div>
				<?php endif; ?>
			</div>
		</div>
	</div>
</section>

<section class="container" style="padding-bottom: 2rem;">
	<div class="card bg-light-transparent">
		<div class="card-body">
			<div class="card no-shadow" style="padding-top: 3rem; padding-bottom: 3rem;">
				<div class="card-body">
					<div class="row">
						<div class="col-md-4 text-center align-self-center">
							<img class="image-responsive" src="<?php echo base_url('assets/uploads/admin/company/logo/logo-red-salihin.png'); ?>" 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>
			</div>
		</div>
	</div>
</section>


<section class="container" style="padding-bottom: 2rem;">
	<div class="row">

		<!-- 
			<div class="col-md-6">
				<div class="card bg-light-transparent">
					<div class="card-header bg-light" <?php if(strtolower($this->logged_module['role'])!='admin') echo 'hidden'; ?> >
						<div class="float-left">
							<h5 class="card-title">HR Forms</h5>
						</div>
					</div>
					<div class="card-body">
						<div class="card no-shadow">
							<div class="card-body">
								<table id="table_forms" class="table table-bordered table-hover" width="100%">
									<thead>
										<th class="text-center">Code</th>
										<th>Title</th>
									</thead>
									<tbody>
									<?php if($forms): ?>
										<?php foreach($forms as $form): ?>
											<tr>
												<td class="text-center"><?php echo $form['code']; ?></td>
												<td><a target="_blank" href="<?php echo base_url($form['file_location'].$form['file_name']); ?>"><?php echo $form['title']; ?></a></td>
											</tr>
										<?php endforeach; ?>
									<?php endif; ?>
									</tbody>
								</table>
							</div>
						</div>
					</div>
				</div>
			</div> 
		-->

		<div class="col-md-12">
			<div class="card bg-light-transparent">
				<div class="card-header bg-light">
					<div class="float-left">
						<h5 class="card-title">Terms & Conditions</h5>
					</div>
				</div>
				<div class="card-body">
					<div class="card no-shadow">
						<div class="card-body">
							<table id="table_tnc" class="table table-bordered table-hover">
								<thead>
									<th>Title</th>
								</thead>
								<tbody>
								<?php if($tncs): ?>
									<?php foreach($tncs as $tnc): ?>
										<tr>
											<td><a target="_blank" href="<?php echo base_url($tnc['file_location'].$tnc['file_name']); ?>"><?php echo $tnc['title']; ?></a></td>
										</tr>
									<?php endforeach; ?>
								<?php endif; ?>
								</tbody>
							</table>
						</div>
					</div>
				</div>
			</div>
		</div>

	</div>
</section>
<script>
	$(document).ready(function () {
		$('#claimIcon').removeClass('d-none');
	});

	$('#collapseFilter').on('show.bs.collapse', function () {
        $('#btnShowFilters').addClass('active');
    })
    $('#collapseFilter').on('hide.bs.collapse', function () {
        $('#btnShowFilters').removeClass('active');
    })
</script>