<!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_alarm.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 userPushHistorySearchKeywordParam = "[[${param.userPushHistorySearchKeywordParam}]]";
let userPushHistorySort               = "[[${param.userPushHistorySort}]]";
let userPushHistoryDir                = "[[${param.userPushHistoryDir}]]";
let userPushHistoryStart              = "[[${param.userPushHistoryStart}]]"==""?0:"[[${param.userPushHistoryStart}]]";
let userPushHistoryLimit              = "[[${param.userPushHistoryLimit}]]"==""?100:"[[${param.userPushHistoryLimit}]]";

let userPushHistorySearchStartDate    = "[[${param.userPushHistorySearchStartDate}]]";
let userPushHistorySearchEndDate      = "[[${param.userPushHistorySearchEndDate}]]";
let userPushHistorySearchDateType     = "[[${param.userPushHistorySearchDateType}]]"==""?"A":"[[${param.userPushHistorySearchDateType}]]";

let userPushHistoryTreatmentId          = "[[${param.userPushHistoryTreatmentId}]]";
let userPushHistoryTreatmentProcedureId = "[[${param.userPushHistoryTreatmentProcedureId}]]";
let userPushHistoryReserveMemberId      = "[[${param.userPushHistoryReserveMemberId}]]";

</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">
			<!-- 캘린더input -->
            <div class="select_box first dropdown">
				<button class="label" type="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true">기간</button>
				<input type="hidden" id="userPushHistorySearchDateType"></input>

				<ul class="select_option_list dropdown-menu">
					<li class="option_list_item"><input type="hidden" name="comboId" value="A"/><span>오늘</span></li>
					<li class="option_list_item"><input type="hidden" name="comboId" value="D"/><span>최근30일</span></li>
					<li class="option_list_item"><input type="hidden" name="comboId" value="E"/><span>최근90일</span></li>
					<li class="option_list_item"><input type="hidden" name="comboId" value="C"/><span>이번주</span></li>
					<li class="option_list_item"><input type="hidden" name="comboId" value="F"/><span>이번달</span></li>
					<li class="option_list_item"><input type="hidden" name="comboId" value="G"/><span>올해</span></li>
					<li class="option_list_item"><input type="hidden" name="comboId" value="H"/><span>지난주</span></li>
					<li class="option_list_item"><input type="hidden" name="comboId" value="I"/><span>지난달</span></li>
				</ul>
			</div>

			<div class="calendar_box">
				<div class="date_box">
					<img src="/image/web/calendar.svg" alt="calendar">
					<input type="date" class="date_picker" id="userPushHistorySearchStartDate">
				</div>
				<span class="slash">-</span>
				<div class="date_box last">
					<img src="/image/web/calendar.svg" alt="calendar">
					<input type="date" class="date_picker" id="userPushHistorySearchEndDate">
				</div>
			</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="userPushHistorySearchType">
                <ul class="select_option_list dropdown-menu">
                    <li class="option_list_item first"><input type="hidden" name="comboId" value=""/><span>전체</span></li>
                    <li class="option_list_item"><input type="hidden" name="comboId" value="KAKAO"/><span>알림톡</span></li>
                    <li class="option_list_item"><input type="hidden" name="comboId" value="SMS"/><span>문자</span></li>
                    <li class="option_list_item"><input type="hidden" name="comboId" value="PUSH"/><span>푸시</span></li>
                </ul>
            </div>

			<!-- 이름input -->
			<div class="search_list">
				<div class="search_box">
					<img src="/image/web/search_G.svg" alt="search">
					<input type="text" id="userPushHistorySearchKeyword" 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="btnDownloadUserPushHistoryExcel" class="download_btn">
				<img src="/image/web/download.svg" alt="내려받기"/>
				<p>내려받기</p>
			</button>
		</div>
	</div>
	
	<div id="userPushHistoryGrid" class="table_box ag-theme-balham"></div>

	<!-- 페이지게이션 -->
	<div class="page_box">
		<nav ria-label="Page navigation" class="navigation">
			<ul class="pagination" id="userPushHistoryPagination"></ul>
		</nav>
	</div>
</div>
<form id="userPushHistorySelectListForm" 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/userPushHistorySelectList.js"></script>
</th:block>
</html>
