Merge commit 'b7133c9197a948475692634f3b9e20e2f7688a0c'
This commit is contained in:
@@ -60,6 +60,8 @@ export default function SdmApplyList({}: SdmApplyProps) {
|
|||||||
// 데이터 변환을 위한 별도의 useEffect
|
// 데이터 변환을 위한 별도의 useEffect
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (sdmInfoStatusList.length > 0) {
|
if (sdmInfoStatusList.length > 0) {
|
||||||
|
|
||||||
|
|
||||||
const newTransformedList = sdmInfoStatusList.map((item: DemandCompBizType) => ({
|
const newTransformedList = sdmInfoStatusList.map((item: DemandCompBizType) => ({
|
||||||
...item,
|
...item,
|
||||||
ctpvCd: selectSidoData.find(sido => sido.val === item.ctpvCd?.trim())?.text || '',
|
ctpvCd: selectSidoData.find(sido => sido.val === item.ctpvCd?.trim())?.text || '',
|
||||||
|
|||||||
@@ -54,11 +54,25 @@ function SdmInfoInsertContent() {
|
|||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
const user = sessionStorage.getItem("user");
|
const user = sessionStorage.getItem("user");
|
||||||
|
|
||||||
|
|
||||||
setDefaultValues((prev) => ({
|
setDefaultValues((prev) => ({
|
||||||
...prev,
|
...prev,
|
||||||
sdmNm: searchParams.get("dmdCoNm") || "",
|
sdmNm: searchParams.get("dmdCoNm") || "",
|
||||||
}));
|
}));
|
||||||
sessionStorage.setItem("user", searchParams.get("dmdInfoId") || "");
|
if(searchParams.get("dmdInfoId")){
|
||||||
|
// const data = {
|
||||||
|
// dmdCoNm: searchParams.get("dmdCoNm") || '',
|
||||||
|
// ctpvCd: searchParams.get("ctpvCd") || '',
|
||||||
|
// sggCd: searchParams.get("sggCd") || '',
|
||||||
|
// dmdInfoId: searchParams.get("dmdInfoId") || '',
|
||||||
|
// daddr: searchParams.get("daddr") || '',
|
||||||
|
// telno: searchParams.get("telno") || '',
|
||||||
|
// }
|
||||||
|
|
||||||
|
// sessionStorage.setItem("user", JSON.stringify(data || {}));
|
||||||
|
}
|
||||||
|
//sessionStorage.setItem("user", JSON.parse(user||'') || "");
|
||||||
setIsLogin(user || searchParams.get("dmdInfoId") ? true : false);
|
setIsLogin(user || searchParams.get("dmdInfoId") ? true : false);
|
||||||
}, [searchParams]);
|
}, [searchParams]);
|
||||||
|
|
||||||
|
|||||||
@@ -691,6 +691,7 @@ export const SdmReducer = (set: any): SdmActions => {
|
|||||||
// 수요정보 신청현황
|
// 수요정보 신청현황
|
||||||
getSdmInfoStatusList: async (dmdInfoId: string) => {
|
getSdmInfoStatusList: async (dmdInfoId: string) => {
|
||||||
const res = await getSdmInfoStatusList(dmdInfoId);
|
const res = await getSdmInfoStatusList(dmdInfoId);
|
||||||
|
|
||||||
if(res.length === 0) {
|
if(res.length === 0) {
|
||||||
set((state: SdmType) => ({
|
set((state: SdmType) => ({
|
||||||
Sdm: {
|
Sdm: {
|
||||||
@@ -700,15 +701,15 @@ export const SdmReducer = (set: any): SdmActions => {
|
|||||||
}))
|
}))
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
const sdmInfoStatusList : DemandCompBizType[] = [];
|
//const sdmInfoStatusList : DemandCompBizType[] = [];
|
||||||
|
|
||||||
res.demandInfo.map((el: DemandCompBizType, index: number) => {
|
const sdmInfoStatusList : DemandCompBizType[]= res.demandInfo.map((el: DemandCompBizType, index: number) => {
|
||||||
const matchingInfo = res.demandMatchings.find((matching: DemandMatchings) => matching.dmdInfoSn === el.dmdInfoSn);
|
const matchingInfo = res.demandMatchings.find((matching: DemandMatchings) => matching.dmdInfoSn === el.dmdInfoSn);
|
||||||
const status = matchingInfo?.splyFcltFlg?.trim() === 'Sub' ? '검토' : matchingInfo?.splyFcltFlg?.trim() === 'matched' ? '매칭완료' : '신청';
|
const status = matchingInfo?.splyFcltFlg?.trim() === 'Sub' ? '검토' : matchingInfo?.splyFcltFlg?.trim() === 'matched' ? '매칭완료' : '신청';
|
||||||
const ruseUtztnFcltNm = matchingInfo?.ruseUtztnFcltNm ? matchingInfo.ruseUtztnFcltNm : '';
|
const ruseUtztnFcltNm = matchingInfo?.ruseUtztnFcltNm ? matchingInfo.ruseUtztnFcltNm : '';
|
||||||
|
|
||||||
|
|
||||||
const tmpData = {
|
return( {
|
||||||
...el,
|
...el,
|
||||||
index: ++index,
|
index: ++index,
|
||||||
bzmnNo: res.bzmnNo,
|
bzmnNo: res.bzmnNo,
|
||||||
@@ -725,9 +726,9 @@ export const SdmReducer = (set: any): SdmActions => {
|
|||||||
status : status,
|
status : status,
|
||||||
splyCndtList: el.splyCndtList,
|
splyCndtList: el.splyCndtList,
|
||||||
ruseUtztnFcltNm: ruseUtztnFcltNm || ''
|
ruseUtztnFcltNm: ruseUtztnFcltNm || ''
|
||||||
}
|
})
|
||||||
sdmInfoStatusList.push(tmpData);
|
|
||||||
})
|
})
|
||||||
|
|
||||||
set((state: SdmType) => ({
|
set((state: SdmType) => ({
|
||||||
Sdm: {
|
Sdm: {
|
||||||
...state.Sdm,
|
...state.Sdm,
|
||||||
|
|||||||
Reference in New Issue
Block a user