<!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.*,com.csc.library.utility.*"  %>
<%@ include file="../CHECKPROFILE.jsp" %>
<% request.setCharacterEncoding("UTF-8"); %>
<%
	CheckNull chk = new CheckNull();

	UProfile up = null;
	if (session != null){
		up = (UProfile)session.getAttribute("userprofile");
	}

	if (up == null){
		return ;
	}
	String sequence = StaticConfig.getConfigCompany(up, "SEQUENCE_UPPER");
	int year = Integer.parseInt(StaticConfig.getConfigCompany(up, "YEAR_UPPER"));
	String p_apsid = chk.chkNullString(request.getParameter("apsid_aps"),"APS_OBJ");
	String p_apsassessy = chk.chkNullString(request.getParameter("assessy"),up.get("employeeid"));
	String p_type = chk.chkNullString(request.getParameter("type"),"self");

%>
<html ng-app='APS_JET_OBJ'>
	<head>
		<title>Employee View</title>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
		<link rel="stylesheet" href="<%=request.getContextPath()%>/EMPVIEW/css/APP_UP/style_apsup.css" />
	</head>
	<body ng-controller='ApsObjForm'>
		<div class='bg-com'></div>
		<div class="emv-headmenu" style="display:none"><jsp:include page="EMV_HEADMENU.jsp" flush="true" /></div>

		<script type="text/javascript" src="../JS/SCREEN.js"></script>
		<script type="text/javascript" src="../JS/jquery-2.1.3.min.js"></script>
		<script type='text/javascript' src="../public/lib/angular-resource/angular-resource.min.js"></script>
		<script type='text/javascript' src='JS/APS_JET_OBJ/Module.Controller.js'></script>
		<script type='text/javascript' src='JS/APS_JET_OBJ/services.js'></script>
		<script type='text/javascript' src='JS/APS_JET_OBJ/ApsObj.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" >
					<div>
						<input type='hidden' name='apsid' value='<%=p_apsid%>'/>
						<input type='hidden' name='assessy' value='<%=p_apsassessy%>'/>
						<input type='hidden' name='type' value='<%=p_type%>'/>
						<input type='hidden' name='me' value='<%=up.get("username")%>' />
						<div class='loading-page'>
							<div class='spiner'></div>
						</div>
						<div class="form-horizontal" id='target_warpper'>
							<table class="table table-head table-bordered table-title-left" >
								<tr>
									<th colspan='4' class='center detail-table'>Individual Objectives <%=year%></th>
								</tr>
								<tr>
									<th width='50%' colspan='2' class='center detail-table' swlang code='SW001041'>Assessor</th>
									<th width='50%' colspan='2' class='center detail-table' swlang code='SW001042'>Assessy</th>
								</tr>
								<tr>
									<th class='headlabel td-bold' swlang code='SW001984'>Fullname</th>
									<td>{{ assessordata.fullname }}</td>
									<th class='headlabel td-bold' swlang code='SW001984'>Fullname</th>
									<td>{{ assessydata.fullname }}</td>
								</tr>
								<tr>
									<th class='headlabel td-bold' swlang code='SW000274'>Employee ID</th>
									<td>{{ assessordata.assessy }}</td>
									<th class='headlabel td-bold' swlang code='SW000274'>Employee ID</th>
									<td>{{ assessydata.assessy }}</td>
								</tr>
								<tr>
									<th class='headlabel td-bold' swlang code='SW000057'>Position</th>
									<td>{{ assessordata.position }}</td>
									<th class='headlabel td-bold' swlang code='SW000057'>Position</th>
									<td>{{ assessydata.position }}</td>
								</tr>
								<tr>
									<th class='headlabel td-bold' swlang code='SW012799'>Start Date</th>
									<td>{{ assessordata.startdate }}</td>
									<th class='headlabel td-bold' swlang code='SW012799'>Start Date</th>
									<td>{{ assessydata.startdate }}</td>
								</tr>
							</table>
							<br>
							<table class="table table-head table-bordered table-title-left" >
								<tr>
									<th colspan='5' class='table-title'>Individual Objectives List</th>
								</tr>
								<tr>
									<th colspan='3' class='center detail-table' swlang code='SW001041'>Assessor</th>
									<th colspan='2' class='center detail-table' swlang code='SW001042'>Assessy</th>
								</tr>
								<tbody ng-repeat='tastran in tastran' ng-if='showrow>=($index+1)'>
									<tr>
										<td rowspan='2' width='4%' class='center'>{{($index+1)}}</td>
										<td class='' width='5%'>Topic</td>
										<td colspan='4' width='91%'><input class='form-control' type='text'  ng-model='tastran.answerdesc' ng-disabled='isApsassessy || apsstate!=0'></td>
									</tr>
									<tr>
										<td colspan='2' width='48%'>Question :<div><textarea class='' rows="5" style="width:100%" ng-model='tastran.apscomment1' ng-trim='true' ng-disabled='isApsassessy || apsstate!=0'></textarea></div></td>
										<td colspan='2' width='48%'>Answer   :<div><textarea class='' rows="5" style="width:100%" ng-model='tastran.apscomment2' ng-trim='true' ng-disabled='isApsapprove1 || apsstate!=1'></textarea></div></td>
									</tr>
								</tbody>
								<tr ng-if='isApsapprove1'>
									<td colspan='5' class='center'>
										<button type="button" ng-disabled='(isApsassessy || apsstate!=0) || showrow==20' class='btn btn-info' ng-click='AddData()' >&nbsp;&nbsp;Add&nbsp;&nbsp;</button>
										<button type="button" ng-disabled='(isApsassessy || apsstate!=0) || showrow==1' class='btn btn-info' ng-click='DeleteData()' >Delete</button>
									</td>
								</tr>
							</table>
						</div>
						<div class="center">
							<button type="button" ng-disabled='(isApsapprove1 && apsstate!=0) || (isApsassessy && apsstate!=1)' class="btn btn-info" ng-click='saveDraft()' >Save Draft</button>
							<button type="button" ng-disabled='(isApsapprove1 && apsstate!=0) || (isApsassessy && apsstate!=1)' class="btn btn-info" ng-click='save()' >Submit</button>
							<button type="button" ng-if='isApsapprove1' class="btn btn-info" ng-click='closePage()' >Close</button>
						</div>
						<div class='spece-bot'></div>
					</div>
				</form>
				<a href="#top" id="top-button"><i class="fa fa-angle-up"></i><div class="top-word">Back to top</div></a>
			</div>
		</section>
		<div><jsp:include page="FOOTER.jsp" flush="true" /></div>
	</body>
</html>