build 오류 해결 jscookies 문제 확인 필요

This commit is contained in:
truthwing
2025-07-22 21:06:50 +09:00
parent 425eb39a86
commit e891702da2
16 changed files with 136 additions and 60 deletions
@@ -52,7 +52,7 @@ export default function ModalSimilarPage({ sply = 0, usageCd = '', money = 0 }:
return spans;
}, [similarCaseList]);
const handleCellClick = (index: number, headId: string) => {
const handleCellClick = (index: number) => {
setMoneyDetailList([{
reqBizGrssCst: similarCaseList[index]?.reqBizGrssCst ?? '',
reqBizReuseFcltCst: similarCaseList[index]?.reqBizReuseFcltCst ?? '',
@@ -124,10 +124,10 @@ export default function ModalSimilarPage({ sply = 0, usageCd = '', money = 0 }:
key={`similar-case-cell-${head.id}-${index}-${el.ruseBizNm}`}
rowSpan={(head.id === 'businessName' || head.id ==='businessDuration' || head.id === 'money') ? rowSpans[index] : undefined}
style={(head.id === 'businessName' || head.id === 'businessDuration' || head.id === 'money') && index > 0 && similarCaseList[index - 1]?.ruseBizNm === el.ruseBizNm ? { display: 'none' } : undefined}
onClick={() => handleCellClick(index, head.id)}
onClick={() => handleCellClick(index)}
onKeyDown={(e) => {
if (e.key === 'Enter' || e.key === ' ') {
handleCellClick(index, head.id);
handleCellClick(index);
}
}}
>
@@ -9,7 +9,7 @@ import { zodResolver } from "@hookform/resolvers/zod";
import { useSearchParams } from "next/navigation";
import { Suspense, useEffect, useState } from "react";
import { FormProvider, useForm, type SubmitHandler } from "react-hook-form";
import { Toaster, toast } from "react-hot-toast";
import { Toaster } from "react-hot-toast";
import * as z from "zod";
import SdmLogin from "../sdmLogin/page";
+4 -13
View File
@@ -1,8 +1,7 @@
'use client';
import React, { useState, useEffect, useRef } from 'react';
import Image from 'next/image';
import { CHART_FORM, MainChart, type ChartConfig } from '@common/business_components';
import React, { useEffect, useRef, useState } from 'react';
interface RegionData {
name: string;
@@ -22,12 +21,10 @@ interface TableData {
const WrStatusPage: React.FC = () => {
const [selectedRegion, setSelectedRegion] = useState<string | null>(null);
const [originalFills, setOriginalFills] = useState<Record<string, string>>({});
const [hoveredRegion, setHoveredRegion] = useState<string | null>(null);
const [tooltipPosition, setTooltipPosition] = useState<{ x: number; y: number } | null>(null);
const [favorites, setFavorites] = useState<Record<string, boolean>>({});
const svgContainerRef = useRef<HTMLDivElement>(null);
const [chartData, setChartData] = useState<any[]>([
const [chartData] = useState<any[]>([
{
label : '서울',
하수 : 4,
@@ -244,12 +241,6 @@ const WrStatusPage: React.FC = () => {
}
};
const handleFavoriteClick = (region: string) => {
setFavorites(prev => ({
...prev,
[region]: !prev[region]
}));
};
const createDonutMarker = (svg: SVGSVGElement, x: number, y: number, name: string, values: number[]) => {
const colors = ['#FF6B6B', '#4ECDC4', '#45B7D1', '#FED16A'];
@@ -395,13 +386,13 @@ const WrStatusPage: React.FC = () => {
if (selectedRegion === pathId) {
path.setAttribute('fill', '#2563eb');
} else {
const original = originalFills[pathId] || '#ffffff';
const original = '#ffffff';
path.setAttribute('fill', original);
}
}
});
}
}, [selectedRegion, originalFills]);
}, [selectedRegion]);
return (
<div className="flex h-screen bg-[#F4F7FB] text-gray-800">
+39
View File
@@ -14,6 +14,26 @@ export type SelectDataType = {
val: string;
}
export interface MenuItem {
menuCd: number;
menuKornNm: string;
menuEngNm: string;
parentId: number | null;
sortSeq: number;
iconNm?: string;
children: MenuItem[] | null;
levelNo: number;
urlPath: string;
menuLnkgTypeCd: string;
menuLnkgSn: number;
menuPath: string;
qrcd: string;
useYn: string;
otptYn: string;
newWndwYn: string;
requiredUrlPath: boolean;
}
// grid header
export type TableUpperProps = {
id: string;
@@ -312,6 +332,7 @@ const fetchEnvPartData = async (): Promise<envPartSelectDataType[]> => {
====================================*/
export type CommonAction = {
initializeCommonData: () => Promise<void>;
getMenuAuth: (menuCd:number) => Promise<void>;
}
export type CommonType = {
@@ -358,6 +379,24 @@ export const CommonState:CommonType = {
export const CommonReducer:(set:any)=>CommonAction=(set: any) => {
return {
getMenuAuth : async (menuCd : number) =>{
const response = await getFetch(
"local",
`/cms-service/api/v1/menu-authrts/pageinfo/${menuCd}`
);
set((state: CommonType) => {
return {
...state,
auth: {
mngAuthrtYn: response[0].mngAuthrtYn,
inqAuthrtYn: response[0].mngAuthrtYn,
regAuthrtYn: response[0].mngAuthrtYn,
mdfcnAuthrtYn: response[0].mngAuthrtYn,
delAuthrtYn: response[0].mngAuthrtYn,
},
};
});
},
// 시도 변경 이벤트
initializeCommonData: async () => {
const promiseSet = await Promise.all([fetchSidoData(), fetchSigunData(), fetchRegionData(), fetchUnitWaterShedData(), fetchMiddleRegionData(), fetchEnvPartData()]);
-2
View File
@@ -253,8 +253,6 @@ export const upHeadSdmInfoStatus: TableUpperProps[] = [
]
// 수요정보 신청현황 데이터
const sdmInfoStatusList : DemandCompType[] = [
]
/**====================================
* Store - Api