<!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/userSubMenuLayout}">
	<th:block layout:fragment="layout_css">
		<link rel="stylesheet" href="/css/web/customer_sub_consulting.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 muUserId = "[[${param.muUserId}]]";

/* 검색 관련 변수 */
let userSearchKeywordParam = "[[${param.userSearchKeywordParam}]]";
let userSort               = "[[${param.userSort}]]";
let userDir                = "[[${param.userDir}]]";
let userStart              = "[[${param.userStart}]]"==""?0:"[[${param.userStart}]]";
let userLimit              = "[[${param.userLimit}]]"==""?500:"[[${param.userLimit}]]";

let search_nationality = "[[${param.nationality}]]"??"";
let search_userType = "[[${param.userType}]]"??"";
let search_membershipYn = "[[${param.membershipYn}]]"??"";

/* 검색 관련 변수 */
let userMedicalChartSearchKeywordParam = "[[${param.userMedicalChartSearchKeywordParam}]]";
let userMedicalChartSort               = "[[${param.userMedicalChartSort}]]";
let userMedicalChartDir                = "[[${param.userMedicalChartDir}]]";
let userMedicalChartStart              = "[[${param.userMedicalChartStart}]]"==""?0:"[[${param.userMedicalChartStart}]]";
let userMedicalChartLimit              = "[[${param.userMedicalChartLimit}]]"==""?100:"[[${param.userMedicalChartLimit}]]";

let userMedicalChartSearchStartDate    = "[[${param.userMedicalChartSearchStartDate}]]";
let userMedicalChartSearchEndDate      = "[[${param.userMedicalChartSearchEndDate}]]";
let userMedicalChartSearchDateType     = "[[${param.userMedicalChartSearchDateType}]]"==""?"A":"[[${param.userMedicalChartSearchDateType}]]";

let userMedicalChartTreatmentId          = "[[${param.userMedicalChartTreatmentId}]]";
let userMedicalChartTreatmentProcedureId = "[[${param.userMedicalChartTreatmentProcedureId}]]";
let userMedicalChartReserveMemberId      = "[[${param.userMedicalChartReserveMemberId}]]";

</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_box first dropdown">
				<button class="label" type="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">진료 전체</button>
				<input type="hidden" id="userMedicalChartTreatmentId" />
				
				<ul class="select_option_list dropdown-menu"></ul>
			</div>
			
			<div class="select_box dropdown">
				<button class="label" type="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">시술 전체</button>
				<input type="hidden" id="userMedicalChartTreatmentProcedureId" />
				
				<ul class="select_option_list dropdown-menu"></ul>
			</div>
			
			<div class="select_box dropdown">
				<button class="label" type="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">닥터/상담 전체</button>
				<input type="hidden" id="userMedicalChartReserveMemberId" />
				
				<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="userMedicalChartSearchKeyword" placeholder="작성자, 차트번호">

					<div class="search_list"></div><!-- 검색내역 나오는곳 -->
				</div>
				<button id="btnSearchUserReserveHistory" class="search_btn" data-toggle="modal" data-target=".work_closed_modal" style="transition: all 0.2s ease-in-out 0s;">조회</button>
			</div>
		</div>
		
		<div class="right_btn_box">
			<button id="btnUserReserveHistoryPrint" class="print_btn">차트 인쇄</button>
			<button id="btnDownloadUserReserveHistoryExcel" class="download_btn">
				<img src="/image/web/download.svg" alt="내려받기"/>
				<p>내려받기</p>
			</button>
		</div>
	</div>
	
	<div id="userMedicalChartGrid" class="table_box ag-theme-balham"></div>

	<!-- 페이지게이션 -->
	<div class="page_box">
		<nav ria-label="Page navigation" class="navigation">
			<ul class="pagination" id="userMedicalChartPagination"></ul>
		</nav>
	</div>
</div>
<form id="userMedicalChartSelectListForm" 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/user/userMedicalChartSelectList.js"></script>
<script src="/js/web/user/popup/userMedicalChartSelectPop.js"></script>
</th:block>
</html>
