wr: Password 초기화

This commit is contained in:
2026-07-15 10:26:56 +09:00
parent 450de39f8c
commit 6b2ea58b66
6 changed files with 24 additions and 8 deletions
+2 -2
View File
@@ -13,8 +13,8 @@ NEXT_PUBLIC_CS_SERVER_API_URL = http://dev.onasys.co.kr:8000
NEXT_PUBLIC_CS_TUS_UPLOAD = /attach-service/api/v1/tus/upload
NEXT_PUBLIC_GEOSERVER_URL = https://hasudo.geo.rsonesoft.com/geoserver
NEXT_PUBLIC_LX_GEOSERVER_URL = http://con.mind-one.co.kr:11306/geoserver
NEXT_PUBLIC_WR_SERVER_API_URL = http://con.mind-one.co.kr:11083/reuse-service/api/v1
# NEXT_PUBLIC_WR_SERVER_API_URL = http://localhost:8883/reuse-service/api/v1
# NEXT_PUBLIC_WR_SERVER_API_URL = http://con.mind-one.co.kr:11083/reuse-service/api/v1
NEXT_PUBLIC_WR_SERVER_API_URL = http://localhost:8883/reuse-service/api/v1
NEXT_PUBLIC_SEWERAGE_API_URL = http://con.mind-one.co.kr:11083/sewerage-service # 개발 서버 API
# NEXT_PUBLIC_SEWERAGE_API_URL=http://localhost:8883/sewerage-service
NEXT_PUBLIC_NGII_URL = https://map.ngii.go.kr
+6
View File
@@ -39,3 +39,9 @@ yarn-error.log*
# typescript
*.tsbuildinfo
next-env.d.ts
#test
/tests
/test-results
.*.log
playwright.config.ts
+2
View File
@@ -40,3 +40,5 @@ apps/
st
wr
## local backend src 경로
D:\iipbs\wr_back_out - http://localhost:8883/reuse-service
@@ -186,11 +186,11 @@ export default function CoSttn() {
const dmdInfoId = updateData.dmdInfoId;
const dmdInfoSliceId = `${dmdInfoId.slice(0, 3)}-${dmdInfoId.slice(3, 5)}-${dmdInfoId.slice(5, 10)}-${dmdInfoId.slice(10)}`
const handleConfirm = async () => {
if (!updateData?.dmdCoSn) {
if (!updateData?.dmdCoSn || !updateData?.dmdInfoId) {
alert("수요처 식별값이 없어 비밀번호를 초기화할 수 없습니다.");
return;
}
const message = await coSttnPwInit(Number(updateData.dmdCoSn));
const message = await coSttnPwInit(Number(updateData.dmdCoSn), updateData.dmdInfoId);
alert(message);
};
if (await confirm(t('isInitPw', { dmdInfoId: dmdInfoSliceId }))) {
+7 -3
View File
@@ -1,6 +1,7 @@
import type { CommonTableProps } from "@/app/store/common/type/header";
import { fetchType, getFetchWithCount, putFectch } from "@/components/lib/api";
import type { DemandCompType } from "@common/business_components/ui/sdmInsertForm/form";
import { sha512 } from "js-sha512";
import { coSttHeadListExport, coSttNodeListExport } from "./headList";
// 테이블 헤드 리스트
@@ -24,7 +25,7 @@ type coSttnActions = {
coSttnInit: (pageNo: string, pageCnt: string, con: string) => void;
coSttnSearch: (pageNo: string, pageCnt: string, con: string) => void;
coSttnTxtSearch: (pageNo: string, pageCnt: string, con: string, txt: string) => void;
coSttnPwInit: (dmdCoSn: number) => Promise<string>;
coSttnPwInit: (dmdCoSn: number, dmdInfoId: string) => Promise<string>;
};
export type coSttnType = coSttnState & coSttnActions;
@@ -122,9 +123,12 @@ export const coSttnActionsExport: (set: any) => coSttnActions = (
console.log("error", erTxt);
}
},
coSttnPwInit: async (dmdCoSn: number) => {
coSttnPwInit: async (dmdCoSn: number, dmdInfoId: string) => {
try {
const response = await putFectch(`/reuseFc/request/chgPassword/${dmdCoSn}`,[])
const initialPasswordHash = sha512.hex(dmdInfoId.substring(0, 10));
const response = await putFectch(`/reuseFc/request/chgPassword/${dmdCoSn}`, {
dmdAplyPswd: initialPasswordHash,
})
if (response.status === 200) {
return "비밀번호가 초기화되었습니다.";
} else {
+5 -1
View File
@@ -8,7 +8,10 @@
"start": "next start -p 3001",
"start:sn": "next start -p 3001",
"start:wr": "next start -p 3001",
"lint": "next lint"
"lint": "next lint",
"dev:e2e": "next dev --port 3017",
"test:e2e": "playwright test",
"test:e2e:headed": "playwright test --headed"
},
"dependencies": {
"@common/assets": "workspace:*",
@@ -27,6 +30,7 @@
"class-variance-authority": "^0.7.1",
"clsx": "^2.1.1",
"i18next": "^25.3.2",
"js-sha512": "^0.9.0",
"js-cookie": "^3.0.5",
"lucide-react": "^0.474.0",
"moment": "^2.30.1",