<!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/statistics_payment.css">
    <style>
        #dailyPaymentStatistics {
            max-height: 300px;
        }
    </style>
</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 statisticsSearchDate        = "[[${param.statisticsSearchDate}]]";
        // 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="calendar_box">
                    <div class="date_box">
                        <img src="/image/web/calendar.svg" alt="calendar">
                        <input type="text" class="date_picker" id="statisticsSearchDate">
                    </div>
                </div>
            </div>
        </div>

        <div class="main">
            <ul class="statistics_list">
                <li class="first">
                    <label>결제 완료</label>
                    <p id="totalPaymentStatus0">0원</p>
                </li>
                <li>
                    <label>결제 취소</label>
                    <p id="totalPaymentStatus1">0원</p>
                </li>
                <li>
                    <label>할인</label>
                    <p id="totalPaymentStatus2">0원</p>
                </li>
                <li>
                    <label>환불</label>
                    <p id="totalPaymentStatus3">0원</p>
                </li>
                <li>
                    <label>미수</label>
                    <p id="totalPaymentStatus4">0원</p>
                </li>
            </ul>
            <article>
                <div class="title_box">
                    <p class="title">결제 트렌드</p>
                </div>

                <div class="box">
                    <!--그래프박스-->
                    <canvas id="dailyPaymentStatistics" width="1500" height="300"></canvas>
                </div>

                <div class="last">
                    <p class="title">결제 수단</p>

                    <ul>
                        <li class="first">
                            <label>카드</label>
                            <p id="paymentCategoryName0">0 (0%)</p>
                        </li>
                        <li>
                            <label>현금</label>
                            <p id="paymentCategoryName1">0 (0%)</p>
                        </li>
                        <li>
                            <label>계좌이체</label>
                            <p id="paymentCategoryName2">0 (0%)</p>
                        </li>
                        <li>
                            <label>간편결제</label>
                            <p id="paymentCategoryName3">0 (0%)</p>
                        </li>
                        <li>
                            <label>멤버십</label>
                            <p id="paymentCategoryName4">0 (0%)</p>
                        </li>
                        <li>
                            <label>선결제(플랫폼)</label>
                            <p id="paymentCategoryName5">0 (0%)</p>
                        </li>
                    </ul>
                </div>
            </article>
            <article class="pst">
                <div class="title_box">
                    <p class="title">상세 내역</p>

                    <div class="right_btn_box">
                        <button class="download_btn" id="downLoadBtn">
                            <img src="/image/web/download.svg" alt="내려받기">
                            <p>내려받기</p>
                        </button>
                    </div>
                </div>

                <div class="box">
                    <!--그래프박스-->
                    <div id="paymentGrid" class="table_box ag-theme-balham" style="height:450px;"></div>
                </div>

                <!-- 페이지게이션 -->
                <!--<div class="page_box">
                    <nav ria-label="Page navigation" class="navigation">
                        <ul class="pagination" id="paymentStatisticsPagination"></ul>
                    </nav>
                </div>-->
            </article>
        </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/chart-4.4.3.js"></script>
    <script src="/js/web/statistics/statisticsPayment.js"></script>
</th:block>
</html>