<!DOCTYPE html>
<%@ page contentType="text/html; charset=UTF-8" language="java" %>
<%@page import="com.csc.library.entry.HelpEntry,com.csc.library.system.*,com.csc.library.utilities.*"%>
<%@ page import="com.csc.library.entry.*,com.csc.library.database.*,com.csc.library.session.*"  %>
<%@ include file="../CHECKPROFILE.jsp" %>
<% request.setCharacterEncoding("UTF-8"); %>
<jsp:useBean id="REV003" class="com.csc.library.system.Task" scope="page"/>
<jsp:setProperty name="REV003" property="appname" value="empview" />
<%
		REV003.setChannel(request ,response);
		HelpEntry screen=(HelpEntry) REV003.process("HelpEntry","REV003HELP");
		if(screen==null)return;		
		screen.getInquiry().setFilter("requestid in(select requestid from mrequest where request_by='"+screen.getUProfile().get("employeeid")+"')");
		screen.process();
%>
<html xmlns="http://www.w3.org/1999/xhtml" ng-app="myHR">
	<head>

		<title>Applicant List</title>

		<meta http-equiv="Content-Type" content="text/html; charset=TIS620" />

		<script type='text/javascript' src='/hr/dwr/interface/SearchDWR.js'></script>
		<script type='text/javascript' src='/hr/dwr/engine.js'></script>
		<script type='text/javascript' src='/hr/dwr/util.js'></script>
		<script type="text/javascript" src="/hr/dwr/interface/SystemCode.js"></script>
		<script type="text/javascript" src="/hr/dwr/interface/CscCalendar.js"></script>

	</head>
	<body>
		<div class="bg-com"></div>
		<jsp:include page="EMV_HEADMENU.jsp" flush="true" />

		<script >
			setLang("<%=screen.getUProfile().get("lang")%>");
			var swap = new swaplang();
            var titlename = swap.swap2String("SW011267");
			setPageTitle(titlename);

			function goView(id){
				var  pam="REV001.jsp?__help=__applicantid$"+id+";&__cmd=search;&isView=true";
				window.open(pam,"AppInfo","left=10,top=10,width=1300,height=620,toolbar=no,status=yes,scrollbars=yes,resizable=yes");
			}

		</script>
		
		<section>
			<div class="container csc-content">
				<form name="cscform" class="form-horizontal" method="get" action="REV003.jsp">
					<%=screen.InitialVariable()%>
					<input type="hidden"name="__screen"  value="REV003"> 
					<input type="hidden" name="__help"  size="50" value="">
					<input name="__fixCon" type="hidden" value="">
					<input type="hidden" name="__cmd"  value="">
					<input type="hidden" name="__companyid" value="<%=screen.getUProfile().get("companyid")%>"> 
					<input type="hidden" name="__referPage" value="">
					<input type="hidden" name="__notNull" value="">
					<input type="hidden" name="__calendar">        
					<input type="hidden" name="__requestid" value="">                              
					<input type="hidden" name="__language"	value ="<%=screen.getUProfile().get("lang")%>">
					<script>getInputFormatDate();</script> 
					
					<div class="table-responsive">	
						<table class="table table-head table-hover table-bordered table-left">
							<thead>
								<tr>
									<th colspan="6" swlang code='SW002164'>In house Applicant</th> 
								</tr>
								<tr>
									<th swlang code='SW002159'>Applicant ID</th>
									<th swlang code='SW000274'>Employee ID</th>
									<th swlang code='SW002104'>Request ID</th>
									<th swlang code='SW002160'>Name Lastname</th>
									<th swlang code='SW001916'>Current Position</th>
									<th swlang code='SW002161'>Applied Position</th>
								</tr>
							</thead>
							<tbody>
								<%
									while(screen.nextRec()){
										if(!(screen.getString("mapplicant","employeeid").equals(""))&&!(screen.getString("mapplicant","employeeid").equalsIgnoreCase("apply"))&&screen.getString("mapplicant","employeeid")!=null){
								%>
								<tr>
									<td><a href="javascript:goView('<%=screen.getString("applicantid")%>');"><%=screen.getString("applicantid")%></a></td>
									<td><%=screen.getString("mapplicant","employeeid")%></td>
									<td><%=screen.getString("requestid")%></td>
									<td><%=screen.getString("memployee","fullname")%></td>
									<td><%=screen.getInquiry().getChild("memployee").getChild("mjobcode").getString("tdesc")%></td>
									<td><%=screen.getString("v1mjobcode","tdesc")%></td>
								</tr>
								<%
										}    
									}
								%> 
							</tbody>
						</table>
					</div>
					
					<div class="table-responsive">	
						<table class="table table-head table-hover table-bordered table-left">
							<thead>
								<tr>
									<th colspan="6" swlang code='SW002165'>Outside Applicant</th>
								</tr>
								<tr>
									<th swlang code='SW002159'>Applicant ID</th>
									<th swlang code='SW002104'>Request ID</th>
									<th swlang code='SW002160'>Name Lastname</th>
									<th swlang code='SW002161'>Applied Position</th>
									<th swlang code='SW002162'>Expected Salary</th>
									<th swlang code='SW002163'>Expected Start Date</th>	
								</tr>
							</thead>
							<tbody>
								<%
									screen.process();
									while(screen.nextRec()){
										if(screen.getString("mapplicant","employeeid").equalsIgnoreCase("apply")){
								%>
								<tr>
									<td><a href="javascript:goView('<%=screen.getString("applicantid")%>');"><%=screen.getString("applicantid")%></a></td>
									<td><%=screen.getString("requestid")%></td>
									<td><%=screen.getString("mapplicant","fullname")%></td>
									<td><%=screen.getString("v1mjobcode","tdesc")%></td>
									<td><%=screen.getString("mapplicant","exp_salary")%></td>
									<td><%=screen.getString("mapplicant","exp_startdate")%></td>
								</tr>
								<%
										}   
									}
								%> 
							</tbody>
						</table>
					</div>
					<%=screen.endJSP()%>
				</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>