<!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.css">
    <style>
        #dailyPaymentStatistics {
            max-height: 300px;
        }
        #monthPaymentStatistics {
            max-height: 400px;
        }
    </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 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">
            <article class="first">
                <p class="title">매출</p>
                <div class="box_wrap">
                    <div class="article_left_box">
                        <ul>
                            <li id="payment">
                                <label>매출 금액</label>
                                <p class="first" id="totalPaymentAmount">-</p>
                                <p id="paymentUpDown">
                                    <span>-</span>
                                    <span>(-%)</span>
                                </p>
                            </li>
                            <li id="treatment">
                                <label>진료</label>
                                <p class="first" id="totalTreatmentCount">-</p>
                                <p id="treatmentUpDown">
                                    <span>-</span>
                                    <span>-%</span>
                                </p>
                                <p class="list" id="treatmentCategoryList">
                                </p>
                            </li>
                            <li id="visitor">
                                <label>방문고객</label>
                                <p class="first" id="totalVisitorCount">-</p>
                                <p id="visitorUpDown">
                                    <span>-</span>
                                    <span>(-%)</span>
                                </p>
                                <p class="list" id="visitorGenderList">
                                    여성 <span>-%</span>
                                    남성 <span>-%</span>
                                </p>
                            </li>
                        </ul>
                    </div>
                    <div class="article_right_box">
                        <div class="box diff">
                            <!--그래프박스-->
                            <canvas id="monthPaymentStatistics" width="900" height="400"></canvas>
                        </div>
                    </div>
                </div>
            </article>

            <article>
                <p class="title">일별 매출 금액</p>

                <div class="box">
                    <!--그래프박스-->
                    <canvas id="dailyPaymentStatistics" width="1500" height="300"></canvas>
                </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/chart-4.4.3.js"></script>
    <script src="/js/web/statistics/statistics.js"></script>
</th:block>
</html>
