<!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/grid.css?v1.1">
		<link rel="stylesheet" href="/css/web/hospital_group.css?v1.1">
		<link rel="stylesheet" href="/css/web/modal_hospital_group.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 groupStart              = "[[${param.groupStart}]]"==""?0:"[[${param.groupStart}]]";
let groupLimit              = "[[${param.groupLimit}]]"==""?15:"[[${param.groupLimit}]]";
let dutyStart              = "[[${param.groupStart}]]"==""?0:"[[${param.groupStart}]]";
let dutyLimit              = "[[${param.groupLimit}]]"==""?15:"[[${param.groupLimit}]]";
</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="#group" aria-controls="group" role="tab" data-toggle="tab">
						<p>조직 설정</p>
					</a>
				</li>

				<li role="presentation">
					<a href="#job" aria-controls="job" role="tab" data-toggle="tab">
						<p>직무 설정</p>
					</a>
				</li>

				<li role="presentation">
					<a href="#authority" aria-controls="authority" role="tab" data-toggle="tab">
						<p>권한 설정</p>
					</a>
				</li>
			</ul>
		</div>


		<!-- Tab panes -->
		<div class="tab-content">
			<div role="tabpanel" class="tab-pane group active" id="group">
				<ul class="group_item_list" id="groupItemList">
					<li>
						<p class="title">조직</p>

						<div class="right_btn_box">
							<button id="btnInserGroup" class="group_item_btn" style="transition: all 0.2s ease-in-out 0s;">
								<img src="/image/web/group_btn_icon.svg" alt="조직 추가"/>조직 추가
							</button>
							<button id="btnDeleteGroup" class="delete_btn" style="transition: all 0.2s ease-in-out 0s;">
								<img src="/image/web/delete_btn_icon.svg" alt="삭제">삭제
							</button>
						</div>
					</li>
					<li id="groupGrid" class="table_box ag-theme-balham groupGrid"></li>
				</ul>
				<div class="page_box">
					<nav aria-label="Page navigation" class="navigation">
						<ul class="pagination" id="groupPagination"></ul>
					</nav>
				</div>
			</div>

			<div role="tabpanel" class="tab-pane job" id="job">
				<ul class="group_item_list" id="dutyItemList">
					<li>
						<p class="title">직무</p>

						<div class="right_btn_box">
							<button id="btnInsertDuty" class="group_item_btn" style="transition: all 0.2s ease-in-out 0s;">
								<img src="/image/web/group_btn_icon.svg" alt="직무 추가"/>직무 추가
							</button>
							<button id="btnDeleteDuty" class="delete_btn" style="transition: all 0.2s ease-in-out 0s;">
								<img src="/image/web/delete_btn_icon.svg" alt="삭제">삭제
							</button>
						</div>
					</li>
					<li id="dutyGrid" class="table_box ag-theme-balham dutyGrid"></li>
				</ul>
				<div class="page_box">
					<nav aria-label="Page navigation" class="navigation">
						<ul class="pagination" id="dutyPagination"></ul>
					</nav>
				</div>
			</div>

			<div role="tabpanel" class="tab-pane authority" id="authority">
				<ul class="authority_list" id="authorityList">
					<li>
						<p class="title">권한 그룹</p>

						<div class="right_btn_box">
							<button id="btnAddAuthRow" class="authority_item_btn">
								<img src="/image/web/group_btn_icon.svg" alt="권한그룹 추가"/>권한그룹 추가
							</button>
						</div>
					</li>
				</ul>

				<div class="authority_table_box">
					<div class="filter_box">
						<div class="form_box">
							<p class="title">권한 (실장)</p>

							<div class="right_btn_box">
								<input type="hidden" id="muAuthId"/>
								<button id="btnUpdateAuthMenuRelation" class="save_btn">저장</button>
							</div>
						</div>
					</div>


					<div class="table_check_box"></div>
				</div>
			</div>
		</div>
	</div>
</div>
<form id="groupSelectListForm" 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/group/groupSelectList.js"></script>

<script src="/js/web/group/popup/groupInsertPop.js"></script>
<script src="/js/web/group/popup/groupUpdatePop.js"></script>

<script src="/js/web/duty/popup/dutyInsertPop.js"></script>
<script src="/js/web/duty/popup/dutyUpdatePop.js"></script>

<script src="/js/web/auth/popup/authInsertPop.js"></script>
<script src="/js/web/auth/popup/authUpdatePop.js"></script>
</th:block>
</html>
