From 66ea82b9a393513531ddc04e044531d741ae11c9 Mon Sep 17 00:00:00 2001 From: basssy Date: Mon, 6 Jan 2025 13:00:04 +0900 Subject: [PATCH] =?UTF-8?q?=EB=AC=BC=EA=B1=B4=20=ED=99=94=EB=A9=B4=20?= =?UTF-8?q?=EB=B3=B5=EC=82=AC=20=EA=B8=B0=EB=8A=A5=20=EA=B4=80=EB=A0=A8=20?= =?UTF-8?q?=EC=BD=98=EC=86=94=EC=A0=9C=EA=B1=B0=20&=20=EB=B2=84=ED=8A=BC?= =?UTF-8?q?=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/management/Stuff.jsx | 5 +- src/components/management/StuffDetail.jsx | 67 +++++++++++++++++++++-- src/components/management/StuffHeader.jsx | 5 +- 3 files changed, 63 insertions(+), 14 deletions(-) diff --git a/src/components/management/Stuff.jsx b/src/components/management/Stuff.jsx index a6cbf702..70652b52 100644 --- a/src/components/management/Stuff.jsx +++ b/src/components/management/Stuff.jsx @@ -50,17 +50,15 @@ export default function Stuff() { // } // Navigator clipboard api needs a secure context (https) if (navigator.clipboard && window.isSecureContext) { - console.log('확인11', value) await navigator.clipboard .writeText(value) .then(() => { alert(getMessage('stuff.detail.header.successCopy')) }) - .catch((err) => { + .catch(() => { alert(getMessage('stuff.detail.header.failCopy')) }) } else { - console.log('확인22', value) // Use the 'out of viewport hidden text area' trick const textArea = document.createElement('textArea') textArea.value = value @@ -73,7 +71,6 @@ export default function Stuff() { textArea.select() try { - console.log('deprecated::document.execCommand(`copy`)', document.execCommand('copy')) document.execCommand('copy') alert(getMessage('stuff.detail.header.successCopy')) } catch (err) { diff --git a/src/components/management/StuffDetail.jsx b/src/components/management/StuffDetail.jsx index c16219bd..870a3101 100644 --- a/src/components/management/StuffDetail.jsx +++ b/src/components/management/StuffDetail.jsx @@ -1449,15 +1449,32 @@ export default function StuffDetail() { ) } - return ( <> {(editMode === 'NEW' && (
-
- * - {getMessage('stuff.detail.required')} +
+
+ * + {getMessage('stuff.detail.required')} +
+
+ {!isFormValid ? ( + + ) : ( + + )} + + + +
@@ -1952,8 +1969,46 @@ export default function StuffDetail() { <>
-
- * {getMessage('stuff.detail.required')} +
+
+ * {getMessage('stuff.detail.required')} +
+ {managementState?.tempFlg === '0' ? ( + <> +
+ + + + + +
+ + ) : ( + <> +
+ {!isFormValid ? ( + + ) : ( + + )} + + + +
+ + )}
diff --git a/src/components/management/StuffHeader.jsx b/src/components/management/StuffHeader.jsx index fd81be02..76fb6877 100644 --- a/src/components/management/StuffHeader.jsx +++ b/src/components/management/StuffHeader.jsx @@ -22,17 +22,15 @@ export default function StuffHeader() { const copyObjectNo = async (objectNo) => { if (navigator.clipboard && window.isSecureContext) { - console.log('확인11', objectNo) await navigator.clipboard .writeText(objectNo) .then(() => { alert(getMessage('stuff.detail.header.successCopy')) }) - .catch((err) => { + .catch(() => { alert(getMessage('stuff.detail.header.failCopy')) }) } else { - console.log('확인22', objectNo) // Use the 'out of viewport hidden text area' trick const textArea = document.createElement('textArea') textArea.value = objectNo @@ -45,7 +43,6 @@ export default function StuffHeader() { textArea.select() try { - console.log('deprecated::document.execCommand(`copy`)', document.execCommand('copy')) document.execCommand('copy') alert(getMessage('stuff.detail.header.successCopy')) } catch (err) {