<!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/fipTarget/vulnerable.js}"></script>
</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 text-center">
        <div class="card-body">
          <form method="get" th:action="@{/userMgt/userMgtPage}">
          <input type="hidden" name="userStatus" id="userStatus" >
            <div class="row justify-content-between pe-3 py-1">
              <div class="col-auto">
                <div class="row justify-content-end">
                </div>
              </div>
            </div>
          </form>
          <div class="row justify-content-start">
            <div class="col-12">
                <div class="card-body">
                  <div class="row">
                    <table class="table table-hover table-bordered">
                      <thead>
                      <tr class="table-secondary">
                      	<th rowspan="2">구분</th>
                        <th rowspan="2">경찰서</th>
                        <th colspan="3">취약등급</th>                                         
                      </tr>
                      <tr class="table-secondary">
                        <th>A급</th>
                        <th>B급</th>
                        <th>C급</th>
                      </tr>
                      </thead>
                      <tbody class="table-group-divider">
                      <tr class="" th:each="vuln:${vulnerableList}">
                      	<td class="table_id" th:text="${vuln.gubun}"></td>
                      	<td id="infoModal" style="color: blue;  cursor:pointer;" th:data-mgtOrgan="${vuln.item_cd}" th:text="${vuln.item_value}"></td>
                      	<td th:text="${vuln.a}"></td>
                      	<td th:text="${vuln.b}"></td>
                      	<td th:text="${vuln.c}"></td>
                      </tr>
                      </tbody>
                    </table>
                  </div>
                  <div class="col-auto">
                      <input type="button" class="btn btn-primary" value="등록" id="addVuln" th:unless="${accessAuth eq 'ACC001'}">
                  </div>
                  <div class="row justify-content-center">               
                  </div>
                </div>
            </div>
          </div>
        </div>
      </div>
    </div>
  </main>

  <div class="modal fade" id="vulnEditModal" data-bs-backdrop="static" data-bs-keyboard="false" tabindex="-1" aria-labelledby="userEditModalLabel" aria-hidden="true">
    <div class="modal-dialog modal-lg modal-dialog-scrollable">
      <div class="modal-content" id="vulnEditModalContent">
        <div class="modal-header">
        </div>
        <div class="modal-body">
          <div class="tab-content border border-top-0" id="configInfo">
          </div>
        </div>
      </div>
    </div>
  </div>

</div>
</html>