<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ page import="jp.co.argo21.nautica.workflow.sample.model.OvertimeApp"%>
<%@ page import="jp.co.argo21.nautica.workflow.soap.message.User"%>
<%@ page
	import="jp.co.argo21.nautica.workflow.soap.message.Organization"%>
<%@ page import="jp.co.argo21.nautica.workflow.sample.util.StringUtil"%>
<%@ page import="java.text.DateFormat"%>
<%@ page import="java.util.Formatter"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<%
User user = (User)session.getAttribute("user");
Organization org = (Organization)session.getAttribute("org");
OvertimeApp overtime = (OvertimeApp)request.getAttribute("overtime");
String appID = overtime.getId();
String name = StringUtil.toFullName(user);
DateFormat df = DateFormat.getDateInstance(DateFormat.FULL);
Formatter formatter = new Formatter();
String workTime = formatter.format("%02d : %02d 〜 %02d : %02d", overtime.getStartHour(), overtime.getStartMin(), overtime.getEndHour(), overtime.getEndMin()).toString();
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" href="css/base.css" type="text/css">
<title>申請内容確認</title>
</head>
<body>
<div align="center">
<%@ include file="include/header.jsp"%>
<table width="819" border="0">
	<tr>
		<td width="200" height="17"><img src="left-bar.jpg" width="200"
			height="20"></td>
		<td width="405">
		<div align="center"><span class="style5">申請確認</span></div>
		</td>
		<td width="200"><img src="right-bar.jpg" width="200" height="20"></td>
	</tr>
</table>
</div>
<form method="post"
	action="Apply?screen=ConfirmApply">
<input type="hidden" name="appID" value="<%=appID %>" />
<div align="center">
<p><span class="style28"><%=overtime.getKind().getAppkindName() %></span>
</p>
<table width="800" border="1" cellpadding="5" bordercolor="#00CC33">
	<tr class="style24">
		<th height="20" colspan="2" bgcolor="#00FFCC" class="style24"
			scope="row">申請書番号</th>
		<td width="574" height="20" bgcolor="#EEFFEE">
		<div align="left"><%=appID %></div>
		</td>
	</tr>
	<tr class="style24">
		<th height="20" colspan="2" bgcolor="#00FFCC" scope="row">申請日付</th>
		<td height="20" bgcolor="#EEFFEE">
		<div align="left"><%= df.format(overtime.getDate())%></div>
		</td>
	</tr>
	<tr class="style24">
		<th height="20" colspan="2" bgcolor="#00FFCC" scope="row">
		<div align="center" class="style24">申請者</div>
		</th>
		<td height="20" align="left" bgcolor="#EEFFEE" class="style24">
		<div align="left" class="style38">
		<table width="417" border="0">
			<tr>
				<td width="150" class="style24"><%=org.getName() %></td>
				<td width="153" class="style24"><%= name%></td>
				<td width="100" class="style24">（<%=user.getId() %>）</td>
			</tr>
		</table>
		</div>
		</td>
	</tr>
	<tr class="style24">
		<th width="60" height="25" rowspan="3" bgcolor="#00FFCC" scope="row">
		<div align="center">対象日</div>
		</th>
		<th width="120" height="20" align="center" bgcolor="#00FFCC"
			scope="row">
		<div align="center" class="style24">勤務日</div>
		</th>
		<td height="20" bgcolor="#EEFFEE">
		<div align="left" class="style24"><span class="style39"><%= df.format(overtime.getWorkday()) %></span></div>
		</td>
	</tr>
	<tr>
		<th height="20" align="center" bgcolor="#00FFCC" scope="row"><span
			class="style24">予定時刻</span></th>
		<td height="20" bgcolor="#EEFFEE">
		<div align="left" class="style24"><span class="style39">
		<%= workTime %>
		</span></div>
		</td>
	</tr>
	<tr>
		<th height="20" align="center" bgcolor="#00FFCC" scope="row"><span
			class="style24">予定時間</span></th>
		<td height="20" bgcolor="#EEFFEE">
		<div align="left" class="style24"><span class="style39"><%= overtime.getOvertimeHours()%>
		時間</span></div>
		</td>
	</tr>
	<tr class="style24">
		<th height="40" colspan="2" bgcolor="#00FFCC" class="style24"
			scope="row">事由</th>
		<td height="40" align="left" valign="top" bgcolor="#EEFFEE"><%= overtime.getReason()%></td>
	</tr>
	<tr class="style24">
		<th height="20" colspan="2" bgcolor="#00FFCC" scope="row">代休取得予定</th>
		<td height="20" align="left" bgcolor="#EEFFEE">
		<div align="left" class="style38">
		<table width="495" border="0" cellpadding="2">
			<tr>
				<%
				if(overtime.isComp()){ %>
				<td width="150" height="18" class="style24">代休取得予定あり</td>
				<td width="331" height="18">
				<div align="left" class="style24"><%= df.format(overtime.getCompDay())%></div>
				</td>
				<%
				} else { %>
				<td width="150" height="18" class="style24">代休取得予定なし</td><td></td>
				<%
				} 
				%>
			</tr>
		</table>
		</div>
		</td>
	</tr>
	<tr class="style24">
		<th height="40" colspan="2" bgcolor="#00FFCC" scope="row">備考</th>
		<td height="40" align="left" valign="top" bgcolor="#EEFFEE"
			class="style24"><%= overtime.getRemark()%></td>
	</tr>
</table>
<p><span class="style45">入力した申請内容を確認して、よろしければ申請して下さい。<br>
内容に誤りがある場合は、訂正してください。申請入力画面に戻ります。<br>
申請そのものを取りやめる場合は、キャンセルでメニュー画面に戻ります。</span></p>
</div>
<table width="254" border="0" align="center">
	<tr>
		<td width="80" align="center"><input type="submit" name="pressedButton"
			value="訂正"></td>
		<td width="80">
		<div align="center"><input type="submit" name="pressedButton"
			value="キャンセル"></div>
		</td>
		<td width="80" align="center"><input type="submit" name="pressedButton"
			value="申請"></td>
	</tr>
</table>
</form>
<%@ include file="include/footer.jsp"%>
</body>
</html>
