<%--
MosP - Mind Open Source Project    http://www.mosp.jp/
Copyright (C) MIND Co., Ltd.       http://www.e-mind.co.jp/

This program is free software: you can redistribute it and/or
modify it under the terms of the GNU Affero General Public License
as published by the Free Software Foundation, either version 3
of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU Affero General Public License for more details.

You should have received a copy of the GNU Affero General Public License
along with this program.  If not, see <http://www.gnu.org/licenses/>.
--%>
<%@ page
language     = "java"
pageEncoding = "UTF-8"
buffer       = "32kb"
autoFlush    = "false"
errorPage    = "/jsp/common/error.jsp"
%><%@ page
import="jp.mosp.framework.base.MospParams"
import="jp.mosp.framework.constant.MospConst"
import="jp.mosp.framework.utils.HtmlUtility"
import="jp.mosp.platform.constant.PlatformConst"
import="jp.mosp.time.input.vo.ApprovalHistoryVo"
import="jp.mosp.time.input.action.AttendanceListAction"
import="jp.mosp.time.input.action.AttendanceHistoryAction"
import="jp.mosp.time.constant.TimeMessageConst"
import="jp.mosp.time.input.action.ApprovalHistoryAction"
import="jp.mosp.time.constant.TimeConst"
%><%
MospParams params = (MospParams)request.getAttribute(MospConst.ATT_MOSP_PARAMS);
ApprovalHistoryVo vo = (ApprovalHistoryVo)params.getVo();
%>
<div class="ListHeader">
	<table class="EmployeeLabelTable">
		<tr>
			<jsp:include page="<%= TimeMessageConst.PATH_TIME_COMMON_INFO_JSP %>"flush="false" />
		</tr>
	
	</table>
</div>
<%
if (params.getCommand().equals(ApprovalHistoryAction.CMD_TIME_APPROVAL_HISTORY_SELECT_SHOW)){
%>
<div class="FixList" id="divAttendance">
	<table class="ListTable">
		<thead>
			<tr>
				<th class="ListSelectTh" id="thDate"><%= params.getName("Work") %><%= params.getName("Day") %></th>
				<th class="ListSelectTh" id="thWorkType"><%= params.getName("Form") %></th>
				<th class="ListSelectTh" id="th2"><%= params.getName("GoingWork") %></th>
				<th class="ListSelectTh" id="th2"><%= params.getName("RetireOffice") %></th>
				<th class="ListSelectTh" id="th2"><%= params.getName("WorkTime") %></th>
				<th class="ListSelectTh" id="th2"><%= params.getName("RestTime") %></th>
				<th class="ListSelectTh" id="th2"><%= params.getName("Tardiness") %></th>
				<th class="ListSelectTh" id="th2"><%= params.getName("LeaveEarly") %></th>
				<th class="ListSelectTh" id="th2"><%= params.getName("Remainder") %><%= params.getName("Hour") %></th>
				<th class="ListSelectTh" id="th2"><%= params.getName("LeftOut") %></th>
				<th class="ListSelectTh" id="th2"><%= params.getName("WorkingHoliday") %></th>
				<th class="ListSelectTh" id="th2"><%= params.getName("Midnight") %></th>
				<th class="ListSelectTh" id="thAttendanceState"><%= params.getName("State") %></th>
				<th class="ListSelectTh" id="thAttendanceRemark"><%= params.getName("Remarks") %></th>
				<th class="ListSelectTh" id="th1"><%= params.getName("AttendanceCorrection") %></th>
			</tr>
		</thead>
		<tbody>
			<tr>
				<td class="SelectTd" id="lblAttendanceDate"><%= vo.getLblAttendanceDate() %></td>
				<td class="SelectTd" id="lblAttendanceWorkType"><%= vo.getLblAttendanceWorkType() %></td>
				<td class="SelectTd" id="lblAttendanceStartDate"><%= vo.getLblAttendanceStartDate() %></td>
				<td class="SelectTd" id="lblAttendanceEndDate"><%= vo.getLblAttendanceEndDate() %></td>
				<td class="SelectTd" id="lblAttendanceWorkTime"><%= vo.getLblAttendanceWorkTime() %></td>
				<td class="SelectTd" id="lblAttendanceRestTime"><%= vo.getLblAttendanceRestTime() %></td>
				<td class="SelectTd" id="lblAttendanceLateTime"><%= vo.getLblAttendanceLateTime() %></td>
				<td class="SelectTd" id="lblAttendanceLeaveEarly"><%= vo.getLblAttendanceLeaveEarly() %></td>
				<td class="SelectTd" id="lblAttendanceOverTimeIn"><%= vo.getLblAttendanceOverTimeIn() %></td>
				<td class="SelectTd" id="lblAttendanceOverTimeOut"><%= vo.getLblAttendanceOverTimeOut() %></td>
				<td class="SelectTd" id="lblAttendanceWorkOnHoliday"><%= vo.getLblAttendanceWorkOnHoliday() %></td>
				<td class="SelectTd" id="lblAttendanceLateNight"><%= vo.getLblAttendanceLateNight() %></td>
				<td class="SelectTd" id="lblAttendanceState"><%= vo.getLblAttendanceState() %></td>
				<td class="SelectTd" id="lblAttendanceRemark"><%= vo.getLblAttendanceRemark() %></td>
				<td class="SelectTd" id="lblAttendanceCorrection">
<%
if (!vo.getLblAttendanceCorrection().isEmpty()) {
%>
					<a class="Link" id="linkCorrectionHistory" onclick="submitTransfer(event, null, null, new Array('<%= PlatformConst.PRM_TRANSFERRED_CODE %>', '<%= vo.getLblEmployeeCode() %>', '<%= PlatformConst.PRM_TRANSFERRED_ACTIVATE_DATE %>' , '<%= vo.getLblAttendanceDate() %>'), '<%= AttendanceHistoryAction.CMD_ATTENDANCE_INFO_SELECT_SHOW %>');"><%= vo.getLblAttendanceCorrection() %></a>
<%
}
%>
				</td>
			</tr>
		</tbody>
	</table>
</div>
<%
}
%>

<%
if (params.getCommand().equals(ApprovalHistoryAction.CMD_OVERTIME_APPROVAL_HISTORY_SELECT_SHOW)){
%>
<div class="FixList" id="divOverTime">
	<table class="ListTable" id="list">
		<thead>
			<tr>
				<th class="ListSelectTh" id="thOvertimeDate"><%= params.getName("OvertimeWork") %><%= params.getName("Day") %></th>
				<th class="ListSelectTh" id="thOvertimeType"><%= params.getName("Type") %></th>
				<th class="ListSelectTh" id="thOvertimeType"><%= params.getName("Schedule") %></th>
				<th class="ListSelectTh" id="thOvertimeResult" ><%= params.getName("Performance") %></th>
				<th class="ListSelectTh" id="thOvertimeReason"><%= params.getName("Reason") %></th>
				<th class="ListSelectTh" id="thOvertimeState"><%= params.getName("State") %></th>
				<th class="ListSelectTh" id="thOvertimeApprover"><%= params.getName("Approver") %></th>
			</tr>
		</thead>
		<tbody>
			<tr>
				<td class="ListSelectTd" id="lblOverTimeDate"><%= vo.getLblOverTimeDate() %></td>
				<td class="ListSelectTd" id="lblOverTimeType"><%= vo.getLblOverTimeType() %></td>
				<td class="ListSelectTd" id="lblOverTimeSchedule"><%= vo.getLblOverTimeSchedule() %></td>
				<td class="ListSelectTd" id="lblOverTimeResultBefore"><%= vo.getLblOverTimeResultTime() %></td>
				<td class="ListInputTd" id="lblOverTimeRequestReason"><%= vo.getLblOverTimeRequestReason() %></td>
				<td class="ListSelectTd" id="lblOverTimeState"><%= vo.getLblOverTimeState() %></td>
				<td class="ListSelectTd" id="lblOverTimeApprover"><%= vo.getLblOverTimeApprover() %></td>
			</tr>
		</tbody>
	</table>
</div>
<%
}
%>

<%
if (params.getCommand().equals(ApprovalHistoryAction.CMD_LEAVE_APPROVAL_HISTORY_SELECT_SHOW)){
%>

<div class="FixList" id="divHoliday">
	<table class="ListTable" id="list">
		<thead>
			<tr>
				<th class="ListSelectTh" id="thHolidayDate"><%= params.getName("Vacation") %><%= params.getName("Day") %></th>
				<th class="ListSelectTh" id="thHolidayType"><%= params.getName("Vacation") %><%= params.getName("Classification") %></th>
				<th class="ListSelectTh" id="thHolidayRange"><%= params.getName("Range") %></th>
				<th class="ListSelectTh" id="thHolidayTime"><%= params.getName("Time") %></th>
				<th class="ListSelectTh" id="thHolidayReason"><%= params.getName("Reason") %></th>
				<th class="ListSelectTh" id="thHolidayState"><%= params.getName("State") %></th>
				<th class="ListSelectTh" id="thHolidayApprover"><%= params.getName("Approver") %></th>
			</tr>
		</thead>
		<tbody>
			<tr>
				<td class="ListSelectTd" id="lblHolidayDate"><%= vo.getLblHolidayDate() %></td>
				<td class="ListSelectTd" id="lblHolidayType"><%= vo.getLblHolidayType1() %>&nbsp;<%= vo.getLblHolidayType2() %></td>
				<td class="ListSelectTd" id="lblHolidayLength"><%= vo.getLblHolidayLength() %></td>
				<td class="ListSelectTd" id="lblHolidayTime"><%= vo.getLblHolidayTime() %></td>
				<td class="ListInputTd" id="lblHolidayRequestReason"><%= vo.getLblHolidayRequestReason() %></td>
				<td class="ListSelectTd" id="lblHolidayState"><%= vo.getLblHolidayState() %></td>
				<td class="ListSelectTd" id="lblHolidayApprover"><%= vo.getLblHolidayApprover() %></td>
			</tr>
		</tbody>
	</table>
</div>
<%
}
%>


<%
if (params.getCommand().equals(ApprovalHistoryAction.CMD_APPROVAL_HISTORY_HOLIDAY_WORK_SELECT_SHOW)){
%>
<div class="FixList" id="divSubstitute">
	<table class="ListTable" id="list">
		<thead>
			<tr>
				<th class="ListSelectTh" id="thDate"><%= params.getName("GoingWork") %><%= params.getName("Day") %></th>
				<th class="ListSelectTh" id="thDate"><%= params.getName("Schedule") %><%= params.getName("Moment") %></th>
				<th class="ListSelectTh" id="thSubstituteReason"><%= params.getName("Reason") %></th>
				<th class="ListSelectTh" id="thSubstituteDate"><%= params.getName("Transfer") %><%= params.getName("Day") %><%= params.getName("No1") %></th>
				<th class="ListSelectTh" id="thSubstituteDate"><%= params.getName("Transfer") %><%= params.getName("Day") %><%= params.getName("No2") %></th>
				<th class="ListSelectTh" id="th4"><%= params.getName("State") %></th>
				<th class="ListSelectTh" id="thName"><%= params.getName("Approver") %></th>
			</tr>
		</thead>
		<tbody>
			<tr>
				<td class="ListSelectTd" id="lblWorkOnHolidayWorkDate"><%= vo.getLblWorkOnHolidayWorkDate() %></td>
				<td class="ListSelectTd" id="lblWorkOnHolidayTime"><%= vo.getLblWorkOnHolidayTime() %></td>
				<td class="ListInputTd" id="lblWorkOnHolidayReason"><%= vo.getLblWorkOnHolidayReason() %></td>
				<td class="ListSelectTd" id="lblWorkOnHolidayDate1"><%= vo.getLblWorkOnHolidayDate1() %></td>
				<td class="ListSelectTd" id="lblWorkOnHolidayDate2"><%= vo.getLblWorkOnHolidayDate2() %></td>
				<td class="ListSelectTd" id="lblWorkOnHolidayState"><%= vo.getLblWorkOnHolidayState() %></td>
				<td class="ListSelectTd" id="lblWorkOnHolidayApprover"><%= vo.getLblWorkOnHolidayApprover() %></td>
			</tr>
		</tbody>
	</table>
</div>
<%
}
%>

<%
if (params.getCommand().equals(ApprovalHistoryAction.CMD_APPROVAL_HISTORY_LIEU_SELECT_SHOW)){
%>
<div class="FixList" id="divCompensation">
	<table class="ListTable" id="list">
		<thead>
			<tr>
				<th class="ListSelectTh" id="thSubHolidayDate"><%= params.getName("CompensatoryHoliday") %><%= params.getName("Day") %></th>
				<th class="ListSelectTh" id="thSubHolidayDate"><%= params.getName("GoingWork") %><%= params.getName("Day") %></th>
				<th class="ListSelectTh" id="th4"><%= params.getName("State") %></th>
				<th class="ListSelectTh" id="thName"><%= params.getName("Approver") %></th>
			</tr>
		</thead>
		<tbody>
			<tr>
				<td class="ListSelectTd" id="lblSubHolidayDate"><%= vo.getLblSubHolidayDate() %></td>
				<td class="ListSelectTd" id="lblSubHolidayWorkDate"><%= vo.getLblSubHolidayWorkDate() %></td>
				<td class="ListSelectTd" id="lblSubHolidayState"><%= vo.getLblSubHolidayState() %></td>
				<td class="ListSelectTd" id="lblSubHolidayApprover"><%= vo.getLblSubHolidayApprover() %></td>
			</tr>
		</tbody>
	</table>
</div>
<%
}
%>

<%
if (params.getCommand().equals(ApprovalHistoryAction.CMD_DIFFERENCE_WORK_APPROVAL_HISTORY_SELECT_SHOW)){
%>
<div class="FixList" id="divDifference">
	<table class="ListTable" id="list">
		<thead>
			<tr>
				<th class="ListSelectTh" id="thDate"><%= params.getName("GoingWork") %><%= params.getName("Day") %></th>
				<th class="ListSelectTh" id="th3"><%= params.getName("Type") %></th>
				<th class="ListSelectTh" id="thTime"><%= params.getName("TimeDifference") %><%= params.getName("WorkTime") %></th>
				<th class="ListSelectTh" id="thDifferenceReason"><%= params.getName("Reason") %></th>
				<th class="ListSelectTh" id="thState"><%= params.getName("State") %></th>
				<th class="ListSelectTh" id="thName"><%= params.getName("Approver") %></th>
			</tr>
		</thead>
		<tbody>
			<tr>
				<td class="ListSelectTd" id="lblDifferenceDate"><%= vo.getLblDifferenceDate() %></td>
				<td class="ListSelectTd" id="lblDifferenceType"><%= vo.getLblDifferenceType() %></td>
				<td class="ListSelectTd" id="lblDifferenceTime"><%= vo.getLblDifferenceTime() %></td>
				<td class="ListSelectTd" id="lblDifferenceReason"><%= vo.getLblDifferenceReason() %></td>
				<td class="ListSelectTd" id="lblDifferenceState"><%= vo.getLblDifferenceState() %></td>
				<td class="ListSelectTd" id="lblDifferenceApprover"><%= vo.getLblDifferenceApprover() %></td>
			</tr>
		</tbody>
	</table>
</div>
<%
}
%>
<div class="FixList" id="divHistory">
	<table class="ListTable" id="list">
		<thead>
			<tr>
				<th class="ListSelectTh" id="thApprovalDate"><%= params.getName("Day") %><%= params.getName("Hour") %></th>
				<th class="ListSelectTh" id="thApprovalApprover"><%= params.getName("Operator") %></th>
				<th class="ListSelectTh" id="thApprovalResult"><%= params.getName("Process") %></th>
				<th class="ListSelectTh" id="thApprovalState"><%= params.getName("State") %></th>
				<th class="ListSelectTh" id="thApprovalComment"><%= params.getName("Comment") %></th>
			</tr>
		</thead>
		<tbody>
<%
for (int i = 0; i < vo.getLblApprovalState().length; i++) {
%>
			<tr>
				<td class="SelectTd"><%= vo.getLblApprovalDate()[i] %></td>
				<td class="SelectTd" id=""><%= vo.getLblApprovalApprover()[i] %></td>
				<td class="SelectTd" id=""><%= vo.getLblApprovalResult()[i] %></td>
				<td class="SelectTd" id=""><%= vo.getLblApprovalState()[i] %></td>
				<td class="InputTd"><%= vo.getLblApprovalComment()[i] %></td>
			</tr>
<%
}
%>
		</tbody>
	</table>
</div>
