diff --git a/src/main/resources/sql/mapper/base/code-mapper.xml b/src/main/resources/sql/mapper/base/code-mapper.xml
index be27d2b..3934e28 100644
--- a/src/main/resources/sql/mapper/base/code-mapper.xml
+++ b/src/main/resources/sql/mapper/base/code-mapper.xml
@@ -44,8 +44,8 @@
SELECT *
FROM TB_CODE_CTGR
- WHERE USE_YN = 'Y'
- AND CTGR_ID IN (#{categoryID})
+ AND USE_YN = 'Y'
+ AND CTGR_ID IN (#{categoryID})
@@ -94,9 +94,9 @@ UPDATE TB_CODE_CTGR SET
SELECT *
FROM TB_CODE_GRP
- WHERE USE_YN = 'Y'
-AND CTGR_ID IN (#{categoryID})
-AND GRP_ID IN (#{groupID})
+ AND USE_YN = 'Y'
+ AND CTGR_ID IN (#{categoryID})
+ AND GRP_ID IN (#{groupID})
@@ -151,9 +151,9 @@ UPDATE TB_CODE_GRP SET
SELECT *
FROM TB_CMN_CODE
- WHERE USE_YN = 'Y'
- AND GRP_ID IN (#{groupID})
- AND CODE IN (#{code})
+ AND USE_YN = 'Y'
+ AND GRP_ID IN (#{groupID})
+ AND CODE IN (#{code})
diff --git a/src/main/webapp/WEB-INF/jsp/base/code/code-main.jsp b/src/main/webapp/WEB-INF/jsp/base/code/code-main.jsp
index 8284c77..6ac3389 100644
--- a/src/main/webapp/WEB-INF/jsp/base/code/code-main.jsp
+++ b/src/main/webapp/WEB-INF/jsp/base/code/code-main.jsp
@@ -35,7 +35,7 @@
-
+
{GRP_ID}
{GRP_NM}
@@ -73,7 +73,7 @@
-
+
{CODE}
{CODE_VAL}
@@ -131,7 +131,10 @@ function renderGroupList() {
let trs = empty ?
[document.getElementById("groupNotFound").innerHTML] : <%-- from template#groupNotFound --%>
- groupList.inStrings(document.getElementById("groupRow").innerHTML); <%-- from template#groupRow --%>
+ groupList.inStrings(
+ document.getElementById("groupRow").innerHTML,
+ (tmpl, item) => tmpl.replace(/{notUsed}/gi, item.getValue("USE_YN") == "N" ? "class=\"not-used\"" : "")
+ ); <%-- from template#groupRow --%>
$("#groupList").html(trs.join());
$("th input[type='checkbox']").prop("checked", false);
}
@@ -174,7 +177,10 @@ function renderCodeList() {
let trs = empty ?
[document.getElementById("codeNotFound").innerHTML] : <%-- from template#groupNotFound --%>
- codeList.inStrings(document.getElementById("codeRow").innerHTML); <%-- from template#groupRow --%>
+ codeList.inStrings(
+ document.getElementById("codeRow").innerHTML,
+ (tmpl, item) => tmpl.replace(/{notUsed}/gi, item.getValue("USE_YN") == "N" ? "class=\"not-used\"" : "")
+ ); <%-- from template#groupRow --%>
$("#codeList").html(trs.join());
$("#codeToggler").prop("checked", false);
}