<!DOCTYPE html> 
<html xmlns="http://www.w3.org/1999/xhtml"
	  xmlns:th="http://www.thymeleaf.org"
	  xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
	  layout:decorate="~{/web/layout/homeLayout}">
	<th:block layout:fragment="layout_css">
		<link rel="stylesheet" href="/css/web/hospital.css?v1.1">
		<!-- <link rel="stylesheet" href="/css/web/modal.css?v1.1"> -->
		<link rel="stylesheet" href="/css/web/modal_hospital.css?v1.1">
		<link rel="stylesheet" href="/css/web/modal_hospital_vacation_sub.css?v1.1">
		<!-- <link rel="stylesheet" href="/css/web/grid.css?v1.1"> -->
	</th:block>

<th:block layout:fragment="layout_top_script">
<script src="/js/web/common_option.js"></script>
<script src="/js/web/jquery.twbsPagination.js" type="text/javascript"></script>
<script>
let menuClass     = "[[${param.menuClass}]]"==""?"":"[[${param.menuClass}]]";

let selectUseYn   = "[[${selectUseYn}]]"==""?"N":"[[${selectUseYn}]]";
let insertUseYn   = "[[${insertUseYn}]]"==""?"N":"[[${insertUseYn}]]";
let updateUseYn   = "[[${updateUseYn}]]"==""?"N":"[[${updateUseYn}]]";
let deleteUseYn   = "[[${deleteUseYn}]]"==""?"N":"[[${deleteUseYn}]]";
let downloadUseYn = "[[${downloadUseYn}]]"==""?"N":"[[${downloadUseYn}]]";

/* 검색 관련 변수 */
// 근태관리
let attendanceSearchKeywordParam = "[[${param.attendanceSearchKeywordParam}]]";
let attendanceSort               = "[[${param.attendanceSort}]]";
let attendanceDir                = "[[${param.attendanceDir}]]";
let attendanceStart              = "[[${param.attendanceStart}]]"==""?0:"[[${param.attendanceStart}]]";
let attendanceLimit              = "[[${param.attendanceLimit}]]"==""?100:"[[${param.attendanceLimit}]]";

// let attendanceSearchStartDate    = "[[${param.attendanceSearchStartDate}]]";
// let attendanceSearchEndDate      = "[[${param.attendanceSearchEndDate}]]";
let attendanceSearchDate      	 = "[[${param.attendanceSearchDate}]]";
let attendanceSearchDateType     = "[[${param.attendanceSearchDateType}]]"==""?"A":"[[${param.attendanceSearchDateType}]]";
let attendanceSearchGroupId      = "[[${param.attendanceSearchGroupId}]]";

// 휴무관리
let holidayManagementSearchKeywordParam = "[[${param.holidayManagementSearchKeywordParam}]]";
let holidayManagementSort               = "[[${param.holidayManagementSort}]]";
let holidayManagementDir                = "[[${param.holidayManagementDir}]]";
let holidayManagementStart              = "[[${param.holidayManagementStart}]]"==""?0:"[[${param.holidayManagementStart}]]";
let holidayManagementLimit              = "[[${param.holidayManagementLimit}]]"==""?100:"[[${param.holidayManagementLimit}]]";

let holidayManagementSearchDate         = "[[${param.holidayManagementSearchDate}]]";
let holidayManagementSearchGroupId      = "[[${param.holidayManagementSearchGroupId}]]";
let holidayManagementSearchDutyId       = "[[${param.holidayManagementSearchDutyId}]]";

// 연차관리
let vacationManagementSearchKeywordParam = "[[${param.vacationManagementSearchKeywordParam}]]";
let vacationManagementSort               = "[[${param.vacationManagementSort}]]";
let vacationManagementDir                = "[[${param.vacationManagementDir}]]";
let vacationManagementStart              = "[[${param.vacationManagementStart}]]"==""?0:"[[${param.vacationManagementStart}]]";
let vacationManagementLimit              = "[[${param.vacationManagementLimit}]]"==""?100:"[[${param.vacationManagementLimit}]]";

let vacationManagementSearchYear         = "[[${param.vacationManagementSearchYear}]]";
let vacationManagementSearchGroupId      = "[[${param.vacationManagementSearchGroupId}]]";
</script>
</th:block>
<th:block layout:fragment="layout_content">
<!-- 센터쪽 -->
<div class="center_box">
	<div class="tab_panel" role="tabpanel">
		<!-- Nav tabs -->
		<div class="nav_box">
			<ul class="nav nav-tabs" role="tablist">
				<li role="presentation" class="active">
					<a href="#attendance" aria-controls="attendance" role="tab" data-toggle="tab">
						<p>근태 관리</p>
					</a>
				</li>
				
				<li role="presentation">
					<a href="#holiday" aria-controls="holiday" role="tab" data-toggle="tab">
						<p>휴무 관리</p>
					</a>
				</li>
				
				<li role="presentation">
					<a href="#vacation" aria-controls="vacation" role="tab" data-toggle="tab">
						<p>연차 관리</p>
					</a>
				</li>
			</ul>
		</div>

		<!-- Tab panes -->
		<div class="tab-content">
			<div role="tabpanel" class="tab-pane attendance active" id="attendance">
				<div class="filter_box">
					<div class="form_box">
						<!-- 캘린더input -->
						<div class="calendar_box">
							<div class="date_box">
								<img src="/image/web/calendar.svg" alt="calendar">
								<input type="text" class="date_picker" id="attendanceSearchDate">
							</div>
						</div>
						
						<div class="select_box dropdown">
							<button type="button" class="label dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">조직 전체</button>
							<input type="hidden" id="attendanceSearchGroupId"></input>
		
							<ul class="select_option_list dropdown-menu"></ul>
						</div>

						<!-- 검색input -->
						<div class="search_list">
							<div class="search_box">
								<img src="/image/web/search_G.svg" alt="search">
								<input type="text" id="attendanceSearchKeyword" required placeholder="이름">
			
								<div class="search_list"></div><!-- 검색내역 나오는곳 -->
							</div>
							<button id="btnSearchAttendance" class="search_btn" style="transition: all 0.2s ease-in-out 0s;">조회</button>
						</div>

						<div class="right_btn_box">
							<button id="btnInsertAttendance" class="work_btn" style="transition: all 0.2s ease-in-out 0s;">출퇴/휴무 등록</button>
							<button id="btnInsertAttendanceVacationManagement" class="yeoncha_btn" style="transition: all 0.2s ease-in-out 0s;">연차 사용</button>
							<button id="btnDownloadAttendanceExcel" class="download_btn">
								<img src="/image/web/download.svg" alt="내려받기"/>
								<p>내려받기</p>
							</button>
						</div>
					</div>
				</div>

				<!-- 조회내역 -->
				<div class="list_box">
					<div class="list_top_box">
						<ul class="calendar_list">
							<li class="name">직원</li>
						</ul>
					</div>
		
					<div class="list_bottom_box">
						<table class="table" id="attendTable"></table>
					</div>
				</div>
			</div>

			<div role="tabpanel" class="tab-pane holiday" id="holiday">
				<div class="filter_box">
					<div class="form_box">
						
						<!-- 캘린더input -->
						<div class="calendar_box">
							<div class="date_box">
								<img src="/image/web/calendar.svg" alt="calendar"/>
								<input type="text" class="date_picker" id="holidayManagementSearchDate">
							</div>
						</div>
						
						<div class="select_box dropdown">
							<button type="button" class="label dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">조직 전체</button>
							<input type="hidden" id="holidayManagementSearchGroupId"></input>
		
							<ul class="select_option_list dropdown-menu"></ul>
						</div>
						
						<div class="select_box dropdown">
							<button type="button" class="label dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">직무 전체</button>
							<input type="hidden" id="holidayManagementSearchDutyId"></input>
		
							<ul class="select_option_list dropdown-menu"></ul>
						</div>
						
						<!-- 검색input -->
						<div class="search_list">
							<div class="search_box">
								<img src="/image/web/search_G.svg" alt="search"/>
								<input type="text" id="holidayManagementSearchKeyword" required placeholder="이름">
			
								<div class="search_list"></div><!-- 검색내역 나오는곳 -->
							</div>
							<button id="btnSearchHolidayManagement" class="search_btn" style="transition: all 0.2s ease-in-out 0s;">조회</button>
						</div>

					
						<div class="right_btn_box">
							<button id="btnInsertHolidayManagement" class="annual_btn" style="transition: all 0.2s ease-in-out 0s;">휴무 등록</button>
							<button id="btnDownloadHolidayManagementExcel" class="download_btn">
								<img src="/image/web/download.svg" alt="내려받기"/>
								<p>내려받기</p>
							</button>
						</div>
					</div>
				</div>

				<div id="holidayManagementGrid" class="table_box ag-theme-balham"></div>

				<!-- 페이지게이션 -->
				<div class="page_box">
					<nav ria-label="Page navigation" class="navigation">
						<ul class="pagination" id="holidayManagementPagination"></ul>
					</nav>
				</div>
			</div>

			<div role="tabpanel" class="tab-pane vacation" id="vacation">
				<div class="filter_box">
					<div class="form_box">
						<!-- 캘린더input -->
						<div class="calendar_box">
							<div class="date_box last">
								<img src="/image/web/calendar.svg" alt="calendar"/>
								<input type="text" class="date_picker" id="vacationManagementSearchYear">
							</div>
						</div>
						
						<div class="select_box dropdown">
							<button type="button" class="label dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">조직 전체</button>
							<input type="hidden" id="vacationManagementSearchGroupId"></input>
		
							<ul class="select_option_list dropdown-menu"></ul>
						</div>

						<!-- 검색input -->
						<div class="search_list">
							<div class="search_box">
								<img src="/image/web/search_G.svg" alt="search"/>
								<input type="text" id="vacationManagementSearchKeyword" required placeholder="이름">
			
								<div class="search_list"></div><!-- 검색내역 나오는곳 -->
							</div>
							<button id="btnSearchVacationManagement" class="search_btn" style="transition: all 0.2s ease-in-out 0s;">조회</button>
						</div>

					
						<div class="right_btn_box">
							<button id="btnInsertVacationManagement" class="hyuga_btn" style="transition: all 0.2s ease-in-out 0s;">연차 발행</button>
							<button id="btnDownloadVacationManagementExcel" class="download_btn">
								<img src="/image/web/download.svg" alt="내려받기"/>
								<p>내려받기</p>
							</button>
						</div>
					</div>
				</div>

				<div id="vacationManagementGrid" class="table_box ag-theme-balham"></div>

				<!-- 페이지게이션 -->
				<div class="page_box">
					<nav ria-label="Page navigation" class="navigation">
						<ul class="pagination" id="vacationManagementPagination"></ul>
					</nav>
				</div>
			</div>
		</div>
	</div>
</div>
<form id="attendanceSelectListForm" method="POST" target="_blank"></form>
</th:block>
<th:block layout:fragment="layout_popup">
</th:block>
<th:block layout:fragment="layout_script">
<script src="/js/web/ag-grid-community-29.3.5.min.js"></script>
<script src="/js/web/attendance/attendanceSelectList.js"></script>

<script src="/js/web/attendance/popup/attendanceInsertPop.js"></script>
<script src="/js/web/attendance/popup/attendanceUpdatePop.js"></script>
<script src="/js/web/attendance/popup/attendanceVacationManagerInsertPop.js"></script>
<script src="/js/web/attendance/popup/attendanceVacationManagerUpdatePop.js"></script>
<script src="/js/web/attendance/popup/attendanceVacationManagementCancelEtcPop.js"></script>

<script src="/js/web/holidaymanagement/popup/holidayManagementInsertPop.js"></script>
<script src="/js/web/holidaymanagement/popup/holidayManagementUpdatePop.js"></script>
<script src="/js/web/holidaymanagement/popup/holidayManagementCancelPop.js"></script>
<script src="/js/web/holidaymanagement/popup/holidayManagementCancelEtcPop.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/xlsx/0.16.9/xlsx.full.min.js"></script>
<script src="/js/web/vacationmanagement/popup/vacationManagementInsertPop.js"></script>
<script src="/js/web/vacationmanagement/popup/vacationManagementUpdatePop.js"></script>
</th:block>
</html>
