<!DOCTYPE html>
<html lang="ko" xmlns:th="http://www.thymeleaf.org"
      xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
      layout:decorate="~{layout/layout}">
<th:block layout:fragment="script">
  <script type="text/javascript" th:src="@{/js/igActivities/fpiMgt/affair/statistics.js}"></script>
</th:block>
<th:block layout:fragment="css">
 	<link rel="stylesheet" th:href="@{/css/affair/affair.css}">
</th:block>
<div layout:fragment="content">
  <main class="pt-3">
    <h4>견문통계</h4>
    <input type="hidden" name="_csrf_header" th:value="${_csrf.headerName}"/>
    <input type="hidden" th:name="${_csrf.parameterName}" th:value="${_csrf.token}"/>
    <div class="row mx-0">
      <div class="col-12 card text-center">
        <div class="card-body">
        <div class="col-auto">
        </div>
          <div class="tab-content border border-top-0 p-2">
            <form id="searchFm" class="statisticsMenu">
            <input type="hidden" name="_csrf_header" th:value="${_csrf.headerName}"/>
    		<input type="hidden" th:name="${_csrf.parameterName}" th:value="${_csrf.token}"/>
              <div class="row pe-3 py-1">
                <div class="col-auto">
                  <div class="input-group w-auto input-daterange" id="dateSelectorDiv">
                    <input type="text" class="form-control form-control-sm" id="startDate" name="startDate" placeholder="시작일" autocomplete="off" readonly th:value="${searchParams.startDate}">
                    <input type="text" class="form-control form-control-sm" id="endDate" name="endDate" placeholder="종료일" autocomplete="off" readonly th:value="${searchParams.endDate}">
                  </div>
                </div>
                <div class="col-auto">
                <input type="text" class="form-control form-control-sm" name="userNm" placeholder="보고자명" autocomplete="off">
                </div>
              </div>
              <div class="row pe-3 py-1">           
                    <div class="col-auto affair-scroll">
                      <h4>소속<input id="organAll" type="checkbox" checked></h4>                                              
                      <ul class="select_list" th:each="commonCode:${session.commonCode.get('OG')}">
                      <th:block th:if="${#lists.contains(mgtOrganList, commonCode.itemCd)}">		
						<li>
							<input th:id="|organ${commonCode.itemCd}|" name="organList" type="checkbox" th:value="${commonCode.itemCd}" checked>
							<label th:for="|organ${commonCode.itemCd}|" th:text="${commonCode.itemValue}"></label>
						</li>
					   </th:block>
					   </ul>
				     </th:block>
                    </div>
                  <div class="col-auto affair-scroll">
                  <h4>평가<input id="ratingAll" type="checkbox" checked></h4> 
                      <ul class="select_list" th:each="commonCode:${session.commonCode.get('AAR')}">			
							<li>
								<input th:id="|rating${commonCode.itemCd}|" name="rating" type="checkbox" th:value="${commonCode.itemCd}" checked>
								<label th:for="|rating${commonCode.itemCd}|" th:text="${commonCode.itemValue}"></label>
							</li>
						</ul>
                    </div>
                    <div class="col-auto affair-scroll">
                    <h4>분야1<input id="category1All" type="checkbox" checked></h4> 
                      <ul class="select_list" th:each="commonCode:${session.commonCode.get('DC01')}">			
							<li>
								<input th:id="|category1${commonCode.itemCd}|" name="category1" type="checkbox" th:value="${commonCode.itemCd}" checked>
								<label th:for="|category1${commonCode.itemCd}|" th:text="${commonCode.itemValue}"></label>
							</li>
						</ul>
                    </div>
                    <div class="col-auto affair-scroll">
                    <h4>분야2<input id="category2All" type="checkbox" checked></h4> 
                     <ul class="select_list" th:each="commonCode:${session.commonCode.get('DC02')}">			
						<li>
							<input th:id="|category2${commonCode.itemCd}|" name="category2" type="checkbox" th:value="${commonCode.itemCd}" checked>
							<label th:for="|category2${commonCode.itemCd}|" th:text="${commonCode.itemValue}"></label>
						</li>
					</ul>
                    </div>
                    <div class="col-auto affair-scroll">
                    <h4>분야3<input id="category3All" type="checkbox" checked></h4> 
                      <ul class="select_list" th:each="commonCode:${session.commonCode.get('DC03')}">			
							<li>
								<input th:id="|category3${commonCode.itemCd}|" name="category3" type="checkbox" th:value="${commonCode.itemCd}" checked>
								<label th:for=|category3${commonCode.itemCd}| th:text="${commonCode.itemValue}"></label>
							</li>
						</ul>
                    </div>
                    <div class="col-auto affair-scroll">
                    <h4>분야4<input id="category4All" type="checkbox" checked></h4> 
                      <ul class="select_list" th:each="commonCode:${session.commonCode.get('DC04')}">			
							<li>
								<input th:id="|category4${commonCode.itemCd}|" name="category4" type="checkbox" th:value="${commonCode.itemCd}" checked>
								<label th:for="|category4${commonCode.itemCd}|" th:text="${commonCode.itemValue}"></label>
							</li>
						</ul>
                    </div>
                    <div class="col-auto">
                    <input id="category11" name="sangbo" type="checkbox" value="OGC003">경찰서상보<br>
                    <input id="category11" name="sangbo" type="checkbox" value="OGC002">지방청상보
                    </div>
                <div class="col-1 d-grid gap-2">
                  <button type="button" id="fieldSearch" class="btn btn-lg btn-primary col-auto">분야별 검색</button>
                  <button type="button" id="ratingSearch" class="btn btn-lg btn-primary col-auto">평가별 검색</button>
                </div>
              </div>
            </form>
            <div class="row justify-content-start">
              <div class="col-12">
                <div class="card" id="statisticsBody" style="display:none;">
                                                                       
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>
    </div>
  </main>
</div>
</html>