From 02a50585127d94443c572775d58b2202f645cbdb Mon Sep 17 00:00:00 2001 From: kimbokon Date: Thu, 1 Jan 2026 22:33:40 +0900 Subject: [PATCH] =?UTF-8?q?=EC=98=81=EC=97=85=EA=B4=80=EB=A6=AC=20?= =?UTF-8?q?=ED=86=B5=ED=95=A9=EB=A1=9C=EA=B7=B8=EC=9D=B8=20=EC=9E=90?= =?UTF-8?q?=EB=8F=99=EB=A1=9C=EA=B7=B8=EC=9D=B8=203=EA=B0=9C=20=EC=9E=84?= =?UTF-8?q?=EC=8B=9C=20=EC=83=9D=EC=84=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- salesmanagement/index.php | 43 ++++++++++++++++++++++++++++----------- 1 file changed, 31 insertions(+), 12 deletions(-) diff --git a/salesmanagement/index.php b/salesmanagement/index.php index 1809430..194415a 100644 --- a/salesmanagement/index.php +++ b/salesmanagement/index.php @@ -1436,15 +1436,14 @@ const [error, setError] = useState(''); const [loading, setLoading] = useState(false); - const handleLogin = async (e) => { - e.preventDefault(); + const executeLogin = async (id, pw) => { setLoading(true); setError(''); try { const res = await fetch('api/sales_members.php?action=login', { method: 'POST', headers: { 'Content-Type': 'application/json' }, - body: JSON.stringify({ member_id: memberId, password }) + body: JSON.stringify({ member_id: id, password: pw }) }); const data = await res.json(); if (data.success) { @@ -1463,6 +1462,17 @@ } }; + const handleLogin = (e) => { + e.preventDefault(); + executeLogin(memberId, password); + }; + + const handleAutoLogin = (id, pw) => { + setMemberId(id); + setPassword(pw); + executeLogin(id, pw); + }; + return (
@@ -1524,17 +1534,26 @@

테스트용 계정 정보

-
- 운영자 - admin / admin +
handleAutoLogin('admin', 'admin')} + className="flex items-center justify-between p-3 bg-slate-50 rounded-xl border border-slate-100 cursor-pointer hover:bg-blue-50 hover:border-blue-200 transition-all group shadow-sm" + > + 운영자 + admin / admin
-
- 영업관리 - sales / sales +
handleAutoLogin('sales', 'sales')} + className="flex items-center justify-between p-3 bg-slate-50 rounded-xl border border-slate-100 cursor-pointer hover:bg-blue-50 hover:border-blue-200 transition-all group shadow-sm" + > + 영업관리 + sales / sales
-
- 매니저 - manager / manager +
handleAutoLogin('manager', 'manager')} + className="flex items-center justify-between p-3 bg-slate-50 rounded-xl border border-slate-100 cursor-pointer hover:bg-blue-50 hover:border-blue-200 transition-all group shadow-sm" + > + 매니저 + manager / manager