<!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_work.css?v1.1">
		<link rel="stylesheet" href="/css/web/modal_hospital_work.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 workSearchKeywordParam = "[[${param.workSearchKeywordParam}]]";
let workSort               = "[[${param.workSort}]]";
let workDir                = "[[${param.workDir}]]";
let workStart              = "[[${param.workStart}]]"==""?0:"[[${param.workStart}]]";
let workLimit              = "[[${param.workLimit}]]"==""?100:"[[${param.workLimit}]]";

let workSearchGroupId      = "[[${param.workSearchGroupId}]]";
let workSearchDutyId       = "[[${param.workSearchDutyId}]]";


// 연차설정
let vacationSearchKeywordParam = "[[${param.vacationSearchKeywordParam}]]";
let vacationSort               = "[[${param.vacationSort}]]";
let vacationDir                = "[[${param.vacationDir}]]";
let vacationStart              = "[[${param.vacationStart}]]"==""?0:"[[${param.vacationStart}]]";
let vacationLimit              = "[[${param.vacationLimit}]]"==""?100:"[[${param.vacationLimit}]]";
</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="#work" aria-controls="work" 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 work active" id="work">
				<div class="filter_box">
					<div class="form_box">
						<div class="select_list first">
							<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="workSearchGroupId"></input>
			
								<ul class="select_option_list dropdown-menu"></ul>
							</div>
						</div>
						
						<div class="select_list">
							<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="workSearchDutyId"></input>
			
								<ul class="select_option_list dropdown-menu"></ul>
							</div>
						</div>


						<!-- 검색input -->
						<div class="search_list">
							<div class="search_box">
								<img src="/image/web/search_G.svg" alt="search"/>
								<input type="text" id="workSearchKeyword" required placeholder="근무일정명,메모">
			
								<div class="search_list"></div><!-- 검색내역 나오는곳 -->
							</div>
							<button id="btnSearchWork" class="search_btn" style="transition: all 0.2s ease-in-out 0s;">조회</button>
						</div>

					
						<div class="right_btn_box">
							<button id="btnInsertWork" class="work_schedule_btn" style="transition: all 0.2s ease-in-out 0s;">근무일정 등록</button>
							<button id="btnDeleteWork" class="delete_btn" style="transition: all 0.2s ease-in-out 0s;">
								<img src="/image/web/delete_btn_icon.svg" alt="삭제">삭제
							</button>
						</div>
					</div>
				</div>


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

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

			<div role="tabpanel" class="tab-pane vacation" id="vacation">
				<div class="filter_box">
					<div class="form_box">
						<div class="right_btn_box">
							<button id="btnInsertVacation" class="work_schedule_btn" style="transition: all 0.2s ease-in-out 0s;">연차유형 생성</button>
							
							<button id="btnDeleteVacation" class="delete_btn" style="transition: all 0.2s ease-in-out 0s;">
								<img src="/image/web/delete_btn_icon.svg" alt="삭제">삭제
							</button>
						</div>
					</div>
				</div>

				<div id="vacationGrid" class="table_box ag-theme-balham"></div>
				
			</div>
		</div>
	</div>
</div>
<form id="workSelectListForm" onsubmit="return false;"></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/work/workSelectList.js"></script>

<script src="/js/web/work/popup/workInsertPop.js"></script>
<script src="/js/web/work/popup/workUpdatePop.js"></script>
<script src="/js/web/vacation/popup/vacationInsertPop.js"></script>
</th:block>
</html>
