<!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_employee.css?v1.1">
		<link rel="stylesheet" href="/css/web/modal_hospital_employee.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 memberSearchKeywordParam = "[[${param.memberSearchKeywordParam}]]";
let memberSort               = "[[${param.memberSort}]]";
let memberDir                = "[[${param.memberDir}]]";
let memberStart              = "[[${param.memberStart}]]"==""?0:"[[${param.memberStart}]]";
let memberLimit              = "[[${param.memberLimit}]]"==""?100:"[[${param.memberLimit}]]";

let memberSearchGroupId      = "[[${param.memberSearchGroupId}]]"==""?"":"[[${param.memberSearchGroupId}]]";
let memberSearchDutyId       = "[[${param.memberSearchDutyId}]]"==""?"":"[[${param.memberSearchDutyId}]]";
let memberSearchAuthId       = "[[${param.memberSearchAuthId}]]"==""?"":"[[${param.memberSearchAuthId}]]";

</script>
</th:block>
<th:block layout:fragment="layout_content">
<!-- 센터쪽 -->
<div class="center_box">
	<p class="page_title">직원 목록</p>
	
	<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="searchGroupId"></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="searchDutyId"></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="searchAuthId"></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="memberSearchKeyword" required placeholder="이름,이메일,전화번호">
					
					<div class="search_list"></div><!-- 검색내역 나오는곳 -->
				</div>
				<button id="btnSearchMember" class="search_btn" style="transition: all 0.2s ease-in-out 0s;">조회</button>
			</div>
			
			<div class="right_btn_box">
				<button id="btnInsertMember" class="employee_btn" style="transition: all 0.2s ease-in-out 0s;">직원 등록</button>
				<button id="btnDownloadMemberExcel" class="list_btn">
					<img src="/image/web/download.svg" alt="내려받기"/>
					<p>내려받기</p>
				</button>
			</div>
		</div>
	</div>
	
	<div id="memberGrid" class="table_box ag-theme-balham"></div>
	
	<!-- 페이지게이션 -->
	<div class="page_box">
		<nav ria-label="Page navigation" class="navigation">
			<ul class="pagination" id="memberPagination"></ul>
		</nav>
	</div>
</div>
<form id="memberSelectListForm" 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/member/memberSelectList.js"></script>

<script src="/js/web/member/popup/memberInsertPop.js"></script>
<script src="/js/web/member/popup/memberSelectPop.js"></script>
</th:block>
</html>
