build 오류 해결 jscookies 문제 확인 필요
This commit is contained in:
@@ -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()]);
|
||||
|
||||
Reference in New Issue
Block a user