<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>슬롯 관리</title>
<%@ include file="/WEB-INF/jsp/adm/include/topLinkTag.jsp"%>
</head>
<body>
	<%-- 공통 S --%>
	<h1>ICOMSYS ADMIN</h1>
	<div class="skip_navigation">
		<ul>
			<li>
				<a href="#Content" class="go_content">본문 바로가기</a>
			</li>
			<li>
				<a href="#Gnb">메뉴 바로가기</a>
			</li>
		</ul>
	</div>
	<header id="header">
		<%@ include file="/WEB-INF/jsp/adm/include/header.jsp"%>
	</header>
	<c:import url="/adm/menu/getLnbMenu.do" />
	<%-- 공통 E --%>
	<script type="text/javascript" src="<c:url value='/aajs/slot.js' />"></script>

	<%-- 컨텐츠 S --%>
	<section id="Content" class="conversation">
		<div class="cont_top">
			<div class="location">
				<ul>
					<li class="home">
						<a href="#">HOME</a>
					</li>
					<li>
						<a href="#">대화관리</a>
					</li>
					<li>
						<a href="#">슬롯 관리</a>
					</li>
				</ul>
			</div>
		</div>
		<div class="sub_cont">
			<div class="cont_box">
				<div class="box_title">

					<div class="fl">
						<h2 class="mt12">슬롯 관리</h2>
					</div>
					<div class="fr">
						<dl class="customer fl">
							<dt class="fl">
								<c:if test="${'SYS_ADMIN'==LoginVO.authCode}">
		                                고객사 :
		                            </c:if>
							</dt>
							<dd class="fl">
								<div class="sel_box">
									<c:choose>
										<c:when test="${'SYS_ADMIN'==LoginVO.authCode}">
											<select class="top" name="custCode" id="custCode" onchange="initIntentList()">
												<c:forEach var="siteInfo" items="${siteLists}" varStatus="status">
													<option value="<c:out value="${siteInfo.custCode}"/>"><c:out value="${siteInfo.custName}" /></option>
												</c:forEach>
											</select>
										</c:when>
										<c:otherwise>
											<input name="custCode" id="custCode" type="hidden" value="${LoginVO.siteCode}" />
										</c:otherwise>
									</c:choose>
								</div>
							</dd>
						</dl>
						<div class="btn_wrap fl">
							<a href="#" class="btn" data-role="search">조회</a>
						</div>
					</div>
				</div>
				<div class="tbl">
					<form id="searchInfo">
						<table class="search table-fixed">
							<colgroup>
								<col width="130px">
								<col width="auto">
								<col width="130px">
								<col width="auto">
							</colgroup>
							<tbody>
								<tr>
									<th class="tl">서비스 명</th>
									<td class="tl">
										<div class="sel_box" id="selOprMng">
											<select class="wide" id="oprMngName" name="oprMngCode" onchange="initIntentList();">
												<option value="">서비스 선택</option>
											</select>
										</div>
									</td>
									<th class="tl">인텐트 명</th>
									<td class="tl">
										<div class="sel_box" id="selOprMng1">
											<select class="wide" id="oprMngName1" name="intentName">
											</select>
										</div>
									</td>
								</tr>
							</tbody>
						</table>
					</form>
				</div>
			</div>
			<div class="cont_box">
				<div class="box_title">
					<div class="fl">
						<h2 class="mt12">슬롯 리스트</h2>
					</div>
					<div class="btn_wrap fr">
						<a href="#" rel="slot_enroll_modal" class="btn line modalLoad" onclick="fncaddSlotbtn()">슬롯 등록</a>
					</div>
				</div>
				<div class="tbl">
					<div id="resultTable_wrapper" class="dataTables_wrapper form-inline dt-bootstrap no-footer">
						<table id="resultTable" class="click dataTable no-footer" aria-describedby="resultTable_info" role="grid">
							<colgroup>
								<col width="70%">
								<col width="10%">
								<col width="10%">
								<col width="10%">
							</colgroup>
							<thead>
								<tr role="row">
									<th class="center" rowspan="1" colspan="1">슬롯 그룹명</th>
									<th class="center" rowspan="1" colspan="1">슬롯 개수</th>
									<th class="center" rowspan="1" colspan="1">인텐트명</th>
									<th class="center" rowspan="1" colspan="1">삭제</th>
								</tr>
							</thead>
							<tbody>
							</tbody>
						</table>

						<div class="clear"></div>
					</div>
				</div>
			</div>
		</div>
	</section>

	<!--  modal :: 슬롯 생성 팝업-->
	<div class="modal" id="slot_enroll_modal" tabindex="-1" style="">
		<div class="modal-dialog modal-lg">
			<div class="modal_header">
				<h3>슬롯 등록</h3>
			</div>
			<div class="modal_body">
				<input type="hidden" name="seq" value="">
				<input type="hidden" name="originalName" value="">
				<div class="modal_cont">
					<dl>
						<dt>
							<h4>
								<em class="important">슬롯 그룹명</em>
							</h4>
						</dt>
						<dd>
							<div class="ipt_box">
								<input type="text" placeholder="슬롯 그룹명을 입력하세요" name="groupName" id="" class="insert_step1">
							</div>
							<div class="text-danger err-text" style="display: none;">중복된 슬롯 그룹명 명입니다.</div>
						</dd>
					</dl>
					<dl class="">
						<dt>
							<h4>
								<em class="important">인텐트명</em>
							</h4>
						</dt>
						<dd>
							<!-- 2022.06.28 변경
								<div class="sel_box" id="">
									<select class="wide" id="" name="intentName">
										<option value="">인텐트를 선택하세요.</option>
									</select>
								</div>
							-->
							<div class="d-flex no-gutters justify-content-between">
	                            <div class="sel_box" id="">
	                                <select class="wide insert_step1" id="selIntentName" name="intentName">
										<option value="">인텐트를 선택하세요.</option>
									</select>
	                            </div>
	                            <button type="button" class="btn btn-lg insert_step1"  data-role="enroll">저장</button>
	                        </div>
						</dd>
					</dl>

					<dl class="insert_step2" style="display:none">
						<dt>
							<h4>
								<em class="important">파라미터 추가</em>
							</h4>
						</dt>
					</dl>

					<div class="insert_step2" style="display:none">
						<div class="tbl">
							<table class="table-fixed">
								<colgroup>
									<col>
									<col>
									<col>
									<col style="width: 10%">
								</colgroup>
								<thead>
									<tr>
										<th class="center">
											<em class="important">파라미터ID</em>
										</th>
										<th class="center">
											<em class="important">엔티티 타입</em>
										</th>
										<th class="center">
											<em class="important">엔티티명</em>
										</th>
										<th class="center">추가</th>

									</tr>
								</thead>
								<tbody>
									<tr>
										<td class="center">
											<div class="ipt_box">
												<input type="text" placeholder="파라미터ID를 입력하세요" name="addParamId" id="">
											</div>
										</td>
										<td class="center">
											<div class="sel_box" id="">
												<select class="wide" id="" name="entityType" onchange='initEntityName(this)'>
													<option value="">전제</option>
													<option value="A">시스템엔티티</option>
													<option value="B">동의어</option>
													<option value="C">사전</option>
												</select>
											</div>
										</td>
										<td class="center">
											<div class="sel_box" id="">
												<select class="wide" id="" name="entityName">
													<option value="">엔티티 타입을 먼저 선택하세요.</option>
												</select>
											</div>
										</td>
										<td class="center">
											<button type="button" class="btn btn-lg disabled" data-role="addParameter" disabled>+ 추가</button>
										</td>
									</tr>
								</tbody>
							</table>
						</div>

						<div class="title-sm mt-5">파라미터 목록</div>
						<!-- 내용 있을때 -->
						<div class="content-scroll" style="height: 350px; min-height: auto;">
						<div class="tbl">
							<table class="table-fixed paramList" border="1" cellspacing="0" id=tableID>
								<colgroup>
									<col>
									<col>
									<col>
									<col style="width: 10%">
								</colgroup>
								<thead>
									<tr>
										<th class="center">
											<em class="">파라미터ID</em>
										</th>
										<th class="center">
											<em class="">엔티티 타입</em>
										</th>
										<th class="center">
											<em class="">엔티티명</em>
										</th>
										<th class="center">추가</th>
									</tr>
								</thead>
								<tbody>
								<tr class="noData"><td colspan="4">
		<div style="text-align:center;">등록된 파라미터가 없습니다.</div>
		</td></tr>
								</tbody>
							</table>
						</div>

					</div>
					</div>
				</div>
			</div>
			<div class="modal_footer">
				<div class="btn_wrap fr">
					<a href="#" onclick="initmytable(this)" class="btn grey close">취소</a>
					<!-- <a href="#" data-role="enroll" class="btn">저장</a> -->
				</div>
			</div>
			<div class="modal_controller">
				<a href="#" onclick="initmytable(this)" class="close">close</a>
			</div>
		</div>
	</div>
	<!--  modal :: 슬롯 생성 팝업 end -->

	<!--  modal :: 슬롯 수정 팝업-->
	<div class="modal" id="slot_update_modal" tabindex="-1" style="">
		<div class="modal-dialog modal-lg">
			<div class="modal_header">
				<h3>슬롯 수정</h3>
			</div>
			<div class="modal_body">
				<input type="hidden" name="seq" value="">
				<input type="hidden" name="originalName" value="">
				<div class="modal_cont">
					<dl>
						<dt>
							<h4>
								<em class="important">슬롯 그룹명</em>
							</h4>
						</dt>
						<dd>
							<div class="ipt_box">
								<input type="hidden" name="groupNameOrigin">
								<input type="text" placeholder="슬롯 그룹명을 입력하세요" name="groupName">
							</div>
							<div class="text-danger err-text" style="display: none;">중복된 슬롯 그룹명 명입니다.</div>
						</dd>
					</dl>
					<dl class="">
						<dt>
							<h4>
								<em class="important">인텐트명</em>
							</h4>
						</dt>
						<dd>
							<!-- 2022.06.28 변경
								<div class="sel_box" id="">
									<select class="wide" id="" name="intentName">
										<option value="">인텐트를 선택하세요.</option>
									</select>
								</div>
							-->
							<div class="d-flex no-gutters justify-content-between">
	                            <div class="sel_box" id="">
	                                <select class="wide" id="" name="intentName">
										<option value="">인텐트를 선택하세요.</option>
									</select>
	                            </div>
	                            <button type="button" class="btn btn-lg insert_step1"  data-role="update">저장</button>
	                        </div>
						</dd>
					</dl>
					<dl>
						<dt>
							<h4>
								<em class="important">파라미터 추가</em>
							</h4>
						</dt>
					</dl>
					<div class="tbl">
						<table class="table-fixed" class="addParameter">
							<colgroup>
								<col>
								<col>
								<col>
								<col style="width: 10%">
							</colgroup>
							<thead>
								<tr>
									<th class="center">
										<em class="important">파라미터ID</em>
									</th>
									<th class="center">
										<em class="important">엔티티 타입</em>
									</th>
									<th class="center">
										<em class="important">엔티티명</em>
									</th>
									<th class="center">추가</th>
								</tr>
							</thead>
							<tbody>
								<tr>
									<td class="center">
										<div class="ipt_box">
											<input type="text" placeholder="파라미터ID를 입력하세요" name="addParamId" id="">
										</div>
									</td>
									<td class="center">
										<div class="sel_box" id="">
											<select class="wide" id="" name="entityType" onchange='initEntityName(this)'>
												<option value="">선택</option>
												<option value="A">시스템엔티티</option>
												<option value="B">일반</option>
											</select>
										</div>
									</td>
									<td class="center">
										<div class="sel_box" id="">
											<select class="wide" id="" name="entityName">
												<option value="">엔티티 타입을 먼저 선택하세요.</option>
											</select>
										</div>
									</td>
									<td class="center">
										<button type="button" class="btn btn-lg disabled" data-role="addParameter" disabled>+ 추가</button>
									</td>
								</tr>
							</tbody>
						</table>
					</div>

					<div class="title-sm mt-5">파라미터 목록</div>
					<!-- 내용 있을때 -->
					<div class="content-scroll" style="height: 350px; min-height: auto;">
						<div class="tbl">
							<table class="table-fixed paramList" border="1" cellspacing="0">
								<colgroup>
									<col>
									<col>
									<col>
									<col style="width: 10%">
								</colgroup>
								<thead>
									<tr>
										<th class="center">
											<em class="">파라미터ID+</em>
										</th>
										<th class="center">
											<em class="">엔티티 타입</em>
										</th>
										<th class="center">
											<em class="">엔티티명</em>
										</th>
										<th class="center">추가</th>
									</tr>
								</thead>
								<tbody>
								</tbody>
							</table>
						</div>

					</div>
				</div>
			</div>
			<div class="modal_footer">
				<div class="btn_wrap fr">
					<a href="#" onclick="initmytable(this)" class="btn grey close">취소</a>
					<!-- <a href="#" data-role="update" class="btn">저장</a> -->
				</div>
			</div>
			<div class="modal_controller">
				<a href="#" class="close">close</a>
			</div>
		</div>
	</div>
	<!--  modal :: 슬롯 수정 팝업 end -->

	<ul class="vakata-context"></ul>
	<div id="jstree-marker" style="display: none;">&nbsp;</div>
	<%-- 컨텐츠 E --%>

</body>
</html>
