<!DOCTYPE html>
<%@ page contentType="text/html; charset=UTF-8" language="java" %>
<%@ page import="com.csc.library.database.*,com.csc.library.session.*,com.csc.library.utilities.*"  %>
<%@ include file="../CHECKPROFILE.jsp" %>
<% request.setCharacterEncoding("UTF-8"); %>
<%
	UProfile up = null;
	if (session != null){
		up = (UProfile)session.getAttribute("userprofile");
	}
%>
<html ng-app='APP_PERFORMANCE'>
	<head>
		<title>Employee View</title>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
		<style>
			.csc-content .center{
				padding-top: 5px !important;
				padding-bottom: 5px !important;
			}
		</style>
	</head>
	<body>
		<div class='bg-com'></div>
		<jsp:include page="EMV_HEADMENU.jsp" flush="true" />

		<link rel="stylesheet" href="<%=request.getContextPath()%>/EMPVIEW/css/APP_UP/style_apsup.css" />

		<script src="../public/lib/angular-resource/angular-resource.min.js"></script>
		<script type='text/javascript' src='JS/APP_PERFORMANCE/Module.Controller.js'></script>
		<script type='text/javascript' src='JS/APP_PERFORMANCE/services.js'></script>
		<script type='text/javascript' src='JS/APP_PERFORMANCE/ListAllAssessor.Controller.js'></script>
		<script type='text/javascript'>
			setLang('<%=up.get("lang")%>')
		</script>

		<section>
			<div class="container csc-content">
				<form name="cscform" class="form-horizontal" method="post" ng-controller='listemp'>
					<input type='hidden' name='apsid_aps' />
					<input type='hidden' name='assessy' />

					<div class='loading-page'>
						<div class='spiner'></div>
					</div>					

					<div class="table-responsive">
						<table class="table table-head table-hover table-bordered table-title-left" >
							<tr>
								<th swlang code='SW000193'>seq</th>
								<th swlang code='SW001984'>Fullname</th>
								<th swlang code='SW000019'>Status</th>
								<th swlang code='SW002381'>Date of valuation</th>
							</tr>
							<tbody ng-if='listup1.length > 0'> <!--  บริหาร 1  -->
								<tr>
									<th class="table-title" colspan="4">รายชื่อผู้ใต้บังคับบัญชาระดับบริหาร 1</th>
								</tr>								
								<tr ng-repeat='up1 in listup1'>
									<td class='center'>{{ $index+1 }}</td>
									<td><a ng-click="goPage($index,'AP_UP1')">{{ up1.fullname }}</a></td>
									<td class='center'>{{ up1.status }}</td>
									<td class='center'>{{ up1.apsdate }}</td>
								</tr>
							</tbody>

							<tbody  ng-if='listup2.length > 0'> <!--  บริหาร 2  -->
								<tr>
									<th class="table-title" colspan="4">รายชื่อผู้ใต้บังคับบัญชาระดับผู้บริหาร 2</th>
								</tr>
								<tr ng-repeat='up2 in listup2'>
									<td class='center'>{{ $index+1 }}</td>
									<td><a ng-click="goPage($index,'AP_UP2')">{{ up2.fullname }}</a></td>
									<td class='center'>{{ up2.status }}</td>
									<td class='center'>{{ up2.apsdate }}</td>
								</tr>
							</tbody>

							<tbody ng-if='listlow1.length > 0'>	<!--  ผู้บังคับบัญชา  -->
								<tr>
									<th class="table-title" colspan="4">รายชื่อผู้ใต้บังคับบัญชาระดับผู้บังคับบัญชา</th>
								</tr>
								<tr ng-repeat='low1 in listlow1'>
									<td class='center'>{{ $index+1 }}</td>
									<td><a ng-click="goPage($index,'AP_LOW1')">{{ low1.fullname }}</a></td>
									<td class='center'>{{ low1.status }}</td>
									<td class='center'>{{ low1.apsdate }}</td>
								</tr>
							</tbody>

							<tbody ng-if='listlow2.length > 0'>	<!--  ปฏิบัติการ  -->
								<tr>
									<th class="table-title" colspan="4">รายชื่อผู้ใต้บังคับบัญชาระดับผู้ปฏิบัติการ</th>
								</tr>
								<tr ng-repeat='low2 in listlow2'>
									<td class='center'>{{ $index+1 }}</td>
									<td><a ng-click="goPage($index,'AP_LOW2')">{{ low2.fullname }}</a></td>
									<td class='center'>{{ low2.status }}</td>
									<td class='center'>{{ low2.apsdate }}</td>
								</tr>
							</tbody>
						</table>
					</div>
				</form>
			</div>
			<a href="#top" id="top-button">
				<i class="fa fa-angle-up"></i>
				<div class="top-word">Back to top</div>
			</a>
		</section>
		<jsp:include page="FOOTER.jsp" flush="true" />
	</body>
</html>