<!DOCTYPE HTML>
<%@page contentType="text/html; charset=UTF-8"%>
<%@page import="com.csc.library.database.*,com.csc.library.session.*,com.csc.library.system.*,com.csc.library.utilities.*"%>
<%
	UProfile up = null;
	if (session != null){
		up = (UProfile)session.getAttribute("userprofile");
	}
%>
<html ng-app='APP_BU'>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
		<link href="../CSS/TISCO.css" rel="stylesheet" type="text/css">
		<script type='text/javascript' src="../JS/VIEWCALENDAR.js"></script>
		<script type='text/javascript' src="../JS/SCREEN.js"></script>
		<script type='text/javascript' src="../JS/angular-1.3.15/angular.js"></script>
		<script type="text/javascript" src="../JS/ANGULAR/SCREEN_ANGULAR.js"></script>
		<script src="../public/lib/angular-resource/angular-resource.min.js"></script>
		<script src="../JS/jquery-2.1.3.min.js"></script>
		<script type='text/javascript' src='../JS/ICONSMENU.js'></script>
		<script type='text/javascript' src='JS/APP_BU/Module.Controller.js'></script>
		<script type='text/javascript' src='JS/APP_BU/services.js'></script>
		<script type='text/javascript' src='JS/APP_BU/ApsBuData.Controller.js'></script>
		<script language="javascript">getTitleName();</script>
		<script type='text/javascript'>
			setLang("<%=up.get("lang")%>");
			function goHelp(helpName, inputName){
				var helpReturn;
				var fixCon = 'employeeid in (select distinct apsassessor from tapstran_bu)';
				var scope = angular.element($(""))
				helpReturn = "__employeeid:employeeid,MEMPLOYEE@FULLNAME";
				linkHelp_Return(helpName,helpReturn, fixCon);
			}

			function GoSave(){
				var scope = angular.element($("form[name='cscform']")).scope();
				scope.$apply(function(){
					scope.save();
				});
			}

			function postReturn(){
				var scope = angular.element($("form[name='cscform']")).scope();
				scope.$apply(function(){
					scope.getApsData($("input[name='__employeeid']").val());
				});
			}
		</script>
		<style>
			.larges{
				width: 85%;
			}
		</style>
	</head>
	<body ng-controller='ApsBuData'>
		<div id="toolTipLayer" style="position:absolute; visibility: hidden"></div>
		<script language="javascript">initToolTips();</script>

		<div class="centered">
   		<form name="cscform" method="post">
				<input type='hidden' name='__cmd' value>
				<input type='hidden' name='__screen' value='APS360'>
				<input type='hidden' name='__fixCon' value=''>
				<script language="JavaScript" src="../JS/HOTKEY.js"></script>
				<script language="javascript">
					var swap = new swaplang();
					document.write(Icons("APS360,กำหนดรอบการประเมินแบบ 360 องศา"));
				</script>
				<br>
				<table class=" larges" style="width:100%;">
					<tr>
						<td class="header" colspan="2" ></td>
					</tr>
					<tr>
						<td>
							<table border="0" cellpadding="0" cellspacing="0" class="inner larges" style="width:95%">
								<tr>
									<td colspan="2" class="blankspace"></td>
								</tr>
								<tr>
									<td class='columnlabel'>EmployeeID</td>
									<td class='columnobject'>
										<input type='text' name='__employeeid'/>
										<a href='javascript:goHelp("memployeehelp", "__employeeid")' style="text-decoration:none;">
											<img src="../IMAGES/BUTTON/MAIN/SEARCH20.gif" alt="SEARCH" name="__empid_images" height="20" border="0" width="20" align="absmiddle">
										</a>
										<input type='text' name='MEMPLOYEE@FULLNAME' disabled>
									</td>
								</tr>
								<tr>
									<td colspan="2">
										<table class='inframe' ng-if="apsbudata.length > 0">
											<thead>
												<tr>
													<td class="row3">หัวข้อเรื่อง</td>
													<td class="row3" ng-repeat="bu in apsbudata track by $index ">{{ bu.budesc }}</td>
												</tr>
											</thead>
											<tbody>
												<tr ng-repeat="as in assdata">
													<td>{{ as.desc }}</td>
													<td ng-repeat='bu in apsbudata'>
														<select ng-model='bu.scorelist[$parent.$index].score' ng-disabled='bu.apsstate == 0' style='width: 45px;'>
															<option value="5.00">5</option>
															<option value="4.00">4</option>
															<option value="3.00">3</option>
															<option value="2.00">2</option>
															<option value="1.00">1</option>
															<!--<option value="0.00">-</option>-->
															<%-- <option ng-repeat='sel in selectnumber' value="{{sel.score}}"> {{ sel.score }}</option> --%>
														</select>
														<%-- <input type='text' ng-model='bu.scorelist[$parent.$index].score' ng-disabled='bu.apsstate == 0' style="width:50px;"> --%>
														<input ng-model='bu.scorelist[$parent.$index].comment' ng-disabled='(bu.scorelist[$parent.$index].score!=1 && bu.scorelist[$parent.$index].score!=5)'   type='text'>
													</td>
												</tr>
												<tr>
													<td>รวม</td>
													<td ng-repeat='bu in apsbudata'>
														<input type='text' value='{{ calScore($index) }}' ng-disabled='1 == 1'style='width:50px;'>
													</td>
												</tr>
											</tbody>
										</table>
									</td>
								</tr>
							</table>
						</td>
					</tr>
				</table>
			</form>
		</div>
	</body>
</html>