diff --git a/apps/wr/.env.local b/apps/wr/.env.local index 18cb6fe85..262ffc33e 100644 --- a/apps/wr/.env.local +++ b/apps/wr/.env.local @@ -1,14 +1,19 @@ NEXT_PUBLIC_SITE_ID = WR NEXT_PUBLIC_PORT = 3001 NEXT_PUBLIC_PROXY_HOST = http://localhost:3001 -NEXT_PUBLIC_SERVER_API_URL = http://dev.onasys.co.kr:8000 -NEXT_PUBLIC_GEOSERVER_URL = http://rsone.iptime.org:10010/geoserver -NEXT_PUBLIC_LX_GEOSERVER_URL = http://con.mind-one.co.kr:11306/geoserver +NEXT_PUBLIC_SERVER_API_URL = http://con.mind-one.co.kr:11080/api/v1 +NEXT_PUBLIC_FO_SERVER_API_URL = http://con.mind-one.co.kr:11082/api/v1 +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_CLAIM_NAME = Authorization NEXT_PUBLIC_AUTH_USER_ID = token-id NEXT_PUBLIC_ACCESS_TOKEN = access-token NEXT_PUBLIC_REFRESH_TOKEN = refresh-token + + NEXT_PUBLIC_SEWERAGE_API_URL=http://con.mind-one.co.kr:11083/sewerage-service/api # 개발 서버 API # NEXT_PUBLIC_SEWERAGE_API_URL=http://192.168.1.128:8883/sewerage-service/api # 최용성 #NEXT_PUBLIC_SEWERAGE_API_URL=http://192.168.1.66:8883/sewerage-service/api # 박이정 + + diff --git a/apps/wr/app/store/ruseFcltMng/fcltReg/pbnstReg/headList.tsx b/apps/wr/app/store/ruseFcltMng/fcltReg/pbnstReg/headList.tsx index 84413fbc2..35e2a9d60 100644 --- a/apps/wr/app/store/ruseFcltMng/fcltReg/pbnstReg/headList.tsx +++ b/apps/wr/app/store/ruseFcltMng/fcltReg/pbnstReg/headList.tsx @@ -1,3 +1,4 @@ +import { numSize, txtSize } from "@/app/store/common/code/basicCode"; import type { TableUpperProps } from "@/app/store/common/type/header"; import type { chHeadType } from "@/app/store/prfmncReg/chkgdnReg/rainChkgdn/headList"; @@ -14,8 +15,13 @@ export const pubFacHeadListExport: TableUpperProps[] = [ export const pbnstMngUpHeadListExport: TableUpperProps[] = [ { id: "choose", title: "선택", type: "checkbox" }, - { id: "operMthd", title: "운영방식",type: "select", selectData: "ruseMngMtd" }, - { id: "rprtvBzenty", title: "대행업체", edit: true ,maxLength:10 }, + { + id: "operMthd", + title: "운영방식", + type: "select", + selectData: "ruseMngMtd", + }, + { id: "rprtvBzenty", title: "대행업체", edit: true, maxLength: 10 }, { id: "bgngDt", title: "시작일", @@ -47,7 +53,7 @@ export const pbnstDemandHeadListExport: TableUpperProps[] = [ export const pbnstOrgwtHeadListRxport: TableUpperProps[] = [ { id: "ruseUtztnFcltNm", title: "하수처리장명" }, - { id: "orgwtWtritQnt", title: "원수취수량" , type:'number'}, + { id: "orgwtWtritQnt", title: "원수취수량", type: "number" }, { id: "tmsYn", title: "하수처리량TMS 전후" }, { id: "dschgFmYn", title: "하수처리장 방류 유량계 전·후​" }, { id: "dtlPstnExpln", title: "상세위치", edit: true }, @@ -60,7 +66,6 @@ export const fcOrgwtsHeadListExport: TableUpperProps[] = [ { id: "addr", title: "위치" }, ]; - export const pbnstMngNmExport: chHeadType[] = [ { headNm: "upChangeRe", text: "운영대행기간", length: 2 }, ]; @@ -69,65 +74,91 @@ export type formDetailType = { id: string; lable: string; type?: string; + maxLenght?: number; selectData?: string; // select box일 경우 - option?:string + option?: string; }; export const wasteWaterFcltINfo: formDetailType[] = [ - { id: "wwtEmsnFcltPrmsnYn", lable: "폐수배출물신고 허가여부", type: "select" , selectData: "yn"}, - { id: "tmsInstlYn", lable: "Tms설치여부", type: "select" , selectData: "yn" }, - { id: "pbnstDrngInflwExclYn", lable: "공공하수도유입제외 허가여부", type: "select" , selectData: "yn" }, + { + id: "wwtEmsnFcltPrmsnYn", + lable: "폐수배출물신고 허가여부", + type: "select", + selectData: "yn", + }, + { id: "tmsInstlYn", lable: "Tms설치여부", type: "select", selectData: "yn" }, + { + id: "pbnstDrngInflwExclYn", + lable: "공공하수도유입제외 허가여부", + type: "select", + selectData: "yn", + }, ]; export const concentratedWaterInfo: formDetailType[] = [ - { id: "erctWtrOcrnCpct", lable: "눙축수 발생량(m³/일)", type: "number" }, - { id: "erctUswtrLinkSpt", lable: "눙축수연계지점" }, - { id: "erctUswtrFcltCpct", lable: "시설용량(m³/일)", type: "number" }, - { id: "erctUswtrPrcsMeth", lable: "눙축수처리방식", type : "select", selectData: "erctUswtrPrcsMeth" }, - { id: "erctUswtrPrcsMsrcCd", lable: "눙축수처리공법" }, + { id: "erctWtrOcrnCpct", lable: "눙축수 발생량(m³/일)", type: "number",maxLenght:numSize }, + { id: "erctUswtrLinkSpt", lable: "눙축수연계지점", maxLenght:txtSize }, + { id: "erctUswtrFcltCpct", lable: "시설용량(m³/일)", type: "number" ,maxLenght:numSize }, + { + id: "erctUswtrPrcsMeth", + lable: "눙축수처리방식", + type: "select", + selectData: "erctUswtrPrcsMeth", + }, + { id: "erctUswtrPrcsMsrcCd", lable: "눙축수처리공법" ,maxLenght:txtSize}, ]; export const ruseFcltinfo: formDetailType[] = [ - { id: "rprcsFcltCpct", lable: "시설용량(m³/일)", type: "number" }, - { id: "majorPrcsMsrcCd", lable: "주처리공법" }, - { id: "addr", lable: "위치(주소)" }, - { id: "rprcsMthdCd", lable: "재처리방식", type: "select", selectData: "rusePrcsMthdCd" }, - { id: "inoutYn", lable: "위치(처리장 내외)" ,type: "select" , selectData: "yn"}, // 머가 내? 외?, - { id: "mainSplyPumpCpct", lable: "메인공급펌프 용량", type: "number" }, + { id: "rprcsFcltCpct", lable: "시설용량(m³/일)", type: "number", maxLenght:numSize }, + { id: "majorPrcsMsrcCd", lable: "주처리공법", maxLenght:txtSize }, + { id: "addr", lable: "위치(주소)", maxLenght:txtSize}, + { + id: "rprcsMthdCd", + lable: "재처리방식", + type: "select", + selectData: "rusePrcsMthdCd", + + }, + { + id: "inoutYn", + lable: "위치(처리장 내외)", + type: "select", + selectData: "yn", + }, // 머가 내? 외?, + { id: "mainSplyPumpCpct", lable: "메인공급펌프 용량", type: "number" , maxLenght:numSize}, ]; export const businessMoneyInfo: formDetailType[] = [ - { id: "gvsbs", lable: "국고", type: "number" }, - { id: "lcep", lable: "지방비", type: "number" }, - { id: "cusrAlotm", lable: "민간투자비", type: "number" }, - { id: "etc", lable: "기타" }, - { id: "totalMoney", lable: "합계", type: "number" ,option:"disabled" }, + { id: "gvsbs", lable: "국고", type: "number" , maxLenght:numSize}, + { id: "lcep", lable: "지방비", type: "number" , maxLenght:numSize}, + { id: "cusrAlotm", lable: "민간투자비", type: "number" , maxLenght:numSize}, + { id: "etc", lable: "기타" , maxLenght:numSize}, + { id: "totalMoney", lable: "합계", type: "number", option: "disabled" }, ]; export const businessSttnInfo: formDetailType[] = [ - { id: "seCd", lable: "구분", type: "select", selectData: "ruseSeCd" }, - { id: "bizMthdCd", lable: "사업방식", type: "select", selectData: "ruseBizMthdCd" }, + { id: "seCd", lable: "구분", type: "select", selectData: "ruseSeCd" }, + { + id: "bizMthdCd", + lable: "사업방식", + type: "select", + selectData: "ruseBizMthdCd", + }, { id: "bizCmcnDay", lable: "사업준공일", type: "date" }, { id: "instlAprvSncnDt", lable: "설치승인인가일", type: "date" }, ]; -export const ruseFcltIntakeList: formDetailType[] = [ - { id: "seCd", lable: "구분" }, - { id: "bizMthdCd", lable: "사업방식" }, - { id: "bizCmcnDay", lable: "사업준공일", type: "date" }, - { id: "instlAprvSncnDt", lable: "설치승인인가일", type: "date" }, -]; export const ruseWaterQulityList: formDetailType[] = [ - { id: "bod", lable: "BOD(mg/L)", type: "text" }, - { id: "grssClfg", lable: "총대장균군수(개/mg)", type: "text" }, - { id: "combResdch", lable: "결합잔류염소(mh/L)", type: "text" }, - { id: "trbt", lable: "탁도(NTU)", type: "text" }, - { id: "smll", lable: "냄새", type: "text" }, - { id: "crmty", lable: "색도", type: "text" }, - { id: "tn", lable: "총질소(mg/L)", type: "text" }, - { id: "tph", lable: "총인(mg/L)", type: "text" }, - { id: "ph", lable: "수소이온농도", type: "text" }, - { id: "clIonQnt", lable: "염화물(mg/L)", type: "text" }, - { id: "cdtnv", lable: "전기전도도(μs/cm)​", type: "text" }, + { id: "bod", lable: "BOD(mg/L)", type: "text", maxLenght:numSize }, + { id: "grssClfg", lable: "총대장균군수(개/mg)", type: "text" , maxLenght:numSize}, + { id: "combResdch", lable: "결합잔류염소(mh/L)", type: "text" , maxLenght:numSize}, + { id: "trbt", lable: "탁도(NTU)", type: "text" , maxLenght:numSize}, + { id: "smll", lable: "냄새", type: "text", maxLenght:numSize }, + { id: "crmty", lable: "색도", type: "text", maxLenght:numSize }, + { id: "tn", lable: "총질소(mg/L)", type: "text", maxLenght:numSize }, + { id: "tph", lable: "총인(mg/L)", type: "text" , maxLenght:numSize}, + { id: "ph", lable: "수소이온농도", type: "text", maxLenght:numSize}, + { id: "clIonQnt", lable: "염화물(mg/L)", type: "text", maxLenght:numSize }, + { id: "cdtnv", lable: "전기전도도(μs/cm)​", type: "text", maxLenght:numSize }, ]; diff --git a/apps/wr/components/lib/config/index.ts b/apps/wr/components/lib/config/index.ts index f85f7bad9..376228d4a 100644 --- a/apps/wr/components/lib/config/index.ts +++ b/apps/wr/components/lib/config/index.ts @@ -1,17 +1,24 @@ +import { + PROXY_HOST, + SERVER_API_CS_TUS_URL, + SERVER_API_CS_URL, + SERVER_API_FO_URL, + SERVER_API_URL, +} from "@/src/shared/config"; -const LOCAL_PORT = "3001"; -const DEV_PORT = "11080"; -const DEV_PORT_NEW="11082" - - -export const LOCAL_URL_WR = `http://localhost:${LOCAL_PORT}/api/v1`; -export const DEV_URL_WR = `http://con.mind-one.co.kr:${DEV_PORT}/api/v1`; +//const DEV_PORT = "11080"; +//const DEV_PORT_NEW="11082" +//export const DEV_URL_WR = `http://con.mind-one.co.kr:${DEV_PORT}/api/v1`; // export const DEV_URL_WR = `http://192.168.0.91:8880/api/v1`; - /// export const DEV_URL_FO = `http://192.168.0.91:8882/api/v1`; -export const DEV_URL_FO = `http://con.mind-one.co.kr:${DEV_PORT_NEW}/api/v1`; +//export const DEV_URL_FO = `http://con.mind-one.co.kr:${DEV_PORT_NEW}/api/v1`; +//export const LOCAL_URL = `http://localhost:${LOCAL_PORT}`; +//export const CS_URL= 'http://dev.onasys.co.kr:8000' +//export const CS_TUS_UPLOAD= "/attach-service/api/v1/tus/upload"; - -export const LOCAL_URL = `http://localhost:${LOCAL_PORT}`; -export const CS_URL= 'http://dev.onasys.co.kr:8000' -export const CS_TUS_UPLOAD= "/attach-service/api/v1/tus/upload"; \ No newline at end of file +export const LOCAL_URL_WR = PROXY_HOST + `/api/v1`; +export const DEV_URL_WR = SERVER_API_URL; +export const DEV_URL_FO = SERVER_API_FO_URL; +export const LOCAL_URL = PROXY_HOST; +export const CS_URL = SERVER_API_CS_URL; +export const CS_TUS_UPLOAD = SERVER_API_CS_TUS_URL; diff --git a/apps/wr/components/ui/form/fcltReg/pbnstReg/buseReg/bugRegForm.tsx b/apps/wr/components/ui/form/fcltReg/pbnstReg/buseReg/bugRegForm.tsx index 37e6d3a5c..85fdd0c0b 100644 --- a/apps/wr/components/ui/form/fcltReg/pbnstReg/buseReg/bugRegForm.tsx +++ b/apps/wr/components/ui/form/fcltReg/pbnstReg/buseReg/bugRegForm.tsx @@ -6,7 +6,6 @@ import { businessSttnInfo, concentratedWaterInfo, ruseFcltinfo, - ruseWaterQulityList, wasteWaterFcltINfo, } from "@/app/store/ruseFcltMng/fcltReg/pbnstReg/headList"; import { @@ -38,6 +37,7 @@ import SdmInsertForm from "@common/business_components/ui/sdmInsertForm"; import type { DemandCompType } from "@common/business_components/ui/sdmInsertForm/form"; import RuseMngTableForm from "@/components/ui/table/pbnstReg/ruseMngTableForm/ruseMngTableForm"; import type { SelectDataType } from "@common/business_components"; +import { BuseWaterQulity } from "./buseWaterQulity/buseWaterQulity"; export function PbnstBuseForm({ indexMng = 0, @@ -474,7 +474,7 @@ export function PbnstBuseForm({ /> - */} +
+ + +
+

{"하수처리수 재이용수 수요처"} diff --git a/apps/wr/components/ui/form/fcltReg/pbnstReg/buseReg/buseWaterQulity/buseWaterQulity.tsx b/apps/wr/components/ui/form/fcltReg/pbnstReg/buseReg/buseWaterQulity/buseWaterQulity.tsx new file mode 100644 index 000000000..8ff9430a4 --- /dev/null +++ b/apps/wr/components/ui/form/fcltReg/pbnstReg/buseReg/buseWaterQulity/buseWaterQulity.tsx @@ -0,0 +1,426 @@ +import type { PbnstRegArrrayType } from "@/app/store/ruseFcltMng/fcltReg/pbnstReg/type"; +import { formH1Class } from "@/components/lib/class/comClass"; +import { FormField, FormUi, SelectBox } from "@common/business_components/ui"; +import { Input, Label } from "@common/components/ui"; +import { useCallback, useEffect, useState } from "react"; +import type { UseFormReturn } from "react-hook-form"; + +export function BuseWaterQulity({ + form, + h1Title, + subTitle, + moClass, + sonClass, + indexMng, + indexBiz, + formType, +}: { + form: UseFormReturn<{ items: PbnstRegArrrayType }>; + h1Title: string; + subTitle: string; + moClass: string; + sonClass: string; + indexMng: number; + indexBiz: number; + formType?: string; +}) { + const [frontPHdata, setFrontPHdata] = useState("0"); + const [backPHdata, setBackPHdata] = useState("0"); + const [chekcPk, setCheakPk] = useState(""); + + // const watchPH = useWatch({ + // name: `items.${indexMng}.fcBizs.${indexBiz}.ph`, + // control: form.control, // useForm에서 받은 control 전달 + // }); + + useEffect(() => { + const watchPH = form.getValues(`items.${indexMng}.fcBizs.${indexBiz}.ph`); + const checkPkAndCycle = + form.getValues(`items.${indexMng}.pbnstRuseFcltId`) + + String(form.getValues(`items.${indexMng}.fcBizs.${indexBiz}.cycl`)); + + console.log("checkPkAndCycle ", checkPkAndCycle); + if (chekcPk !== checkPkAndCycle) { + if (watchPH && watchPH !== undefined) { + const [frontPH, backPH] = watchPH.split("~"); + if (frontPH) { + setFrontPHdata(frontPH); + } + if (backPH) { + setBackPHdata(backPH); + } + } else { + setFrontPHdata("0"); + setBackPHdata("0"); + } + setCheakPk(checkPkAndCycle); + } + }, [form.getValues(`items.${indexMng}.fcBizs.${indexBiz}.ph`), chekcPk]); + + const isSetFrontPh = useCallback( + (frontPHdata: string) => { + if (frontPHdata && frontPHdata.length > 0) { + const PHdata = form.getValues( + `items.${indexMng}.fcBizs.${indexBiz}.ph` + ); + if (PHdata) { + const backPH = PHdata.split("~")[1]; + const MatchData = frontPHdata + "~" + backPH; + form.setValue(`items.${indexMng}.fcBizs.${indexBiz}.ph`, MatchData); + setFrontPHdata(frontPHdata); + } else { + const MatchData = frontPHdata + "~" + "0"; + form.setValue(`items.${indexMng}.fcBizs.${indexBiz}.ph`, MatchData); + setFrontPHdata(frontPHdata); + } + } + }, + [frontPHdata, form, indexMng, indexBiz] + ); + + const isSetBackPh = useCallback( + (backPHdata: string) => { + if (backPHdata && backPHdata.length > 0) { + const PHdata = form.getValues( + `items.${indexMng}.fcBizs.${indexBiz}.ph` + ); + + if (PHdata) { + const frontPH = PHdata.split("~")[0]; + const MatchData = frontPH + "~" + backPHdata; + + console.log(" backPHdata ", MatchData); + form.setValue(`items.${indexMng}.fcBizs.${indexBiz}.ph`, MatchData); + setBackPHdata(backPHdata); + } else { + const MatchData = "0" + "~" + backPHdata; + + form.setValue(`items.${indexMng}.fcBizs.${indexBiz}.ph`, MatchData); + setBackPHdata(backPHdata); + } + } + }, + [backPHdata, form, indexMng, indexBiz] + ); + + return ( + <> + {h1Title ?

{h1Title}

: <>} + {subTitle ?

{subTitle}

: <>} + +
+
+ ( + + { + const inputValue = e.target.value.replace(/[^0-9.]/g, ""); // 숫자만 저장 + field.onChange(inputValue); + }} + value={ + field.value !== undefined && field.value !== "" + ? `${field.value} 이하` + : "" + } + readOnly={formType === "sttn" ? true : false} + maxLength={6} + /> + + )} + /> +
+
+ { + //TODO 불검춣확인필요 + } + ( + + { + field.onChange(String(e.target.value)); + }} + value={field.value ?? ""} + readOnly={formType === "sttn" ? true : false} + maxLength={6} + /> + + )} + /> +
+
+ ( + + { + const inputValue = e.target.value.replace(/[^0-9.]/g, ""); // 숫자만 저장 + field.onChange(inputValue); + }} + value={ + field.value !== undefined && field.value !== "" + ? `${field.value} 이상` + : "" + } + readOnly={formType === "sttn" ? true : false} + maxLength={6} + /> + + )} + /> +
+
+ ( + + { + const inputValue = e.target.value.replace(/[^0-9.]/g, ""); // 숫자만 저장 + field.onChange(inputValue); + }} + value={ + field.value !== undefined && field.value !== "" + ? `${field.value} 이상` + : "" + } + readOnly={formType === "sttn" ? true : false} + maxLength={6} + /> + + )} + /> +
+
+ { + //TODO : 확인필요 + } + ( + + {/* { + field.onChange(String(e.target.value)); + }} + value={field.value ?? ""} + readOnly={formType === "sttn" ? true : false} + maxLength={txtSize} + /> */} + { + field.onChange(val); + }} + value={field.value||undefined} + > + + )} + /> +
+
+ ( + + { + const inputValue = e.target.value.replace(/[^0-9.]/g, ""); // 숫자만 저장 + field.onChange(inputValue); + }} + value={ + field.value !== undefined && field.value !== "" + ? `${field.value} 이하` + : "" + } + readOnly={formType === "sttn" ? true : false} + maxLength={6} + /> + + )} + /> +
+
+ ( + + { + const inputValue = e.target.value.replace(/[^0-9.]/g, ""); // 숫자만 저장 + field.onChange(inputValue); + }} + value={ + field.value !== undefined && field.value !== "" + ? `${field.value} 이하` + : "" + } + readOnly={formType === "sttn" ? true : false} + maxLength={6} + /> + + )} + /> +
+ +
+ ( + + { + const inputValue = e.target.value.replace(/[^0-9.]/g, ""); // 숫자만 저장 + field.onChange(inputValue); + }} + value={ + field.value !== undefined && field.value !== "" + ? `${field.value} 이하` + : "" + } + readOnly={formType === "sttn" ? true : false} + maxLength={6} + /> + + )} + /> +
+
+ ( + + { + const inputValue = e.target.value.replace(/[^0-9.]/g, ""); // 숫자만 저장 + field.onChange(inputValue); + }} + value={ + field.value !== undefined && field.value !== "" + ? `${field.value} 이하` + : "" + } + readOnly={formType === "sttn" ? true : false} + maxLength={7} + /> + + )} + /> +
+ +
+ ( + + { + const inputValue = e.target.value.replace(/[^0-9.]/g, ""); // 숫자만 저장 + field.onChange(inputValue); + }} + value={ + field.value !== undefined && field.value !== "" + ? `${field.value} 이하` + : "" + } + readOnly={formType === "sttn" ? true : false} + maxLength={7} + /> + + )} + /> +
+
+ +
+ + //setFrontPHdata(e.target.value) + isSetFrontPh(e.target.value) + } + value={frontPHdata ?? ""} + readOnly={formType === "sttn"} + maxLength={3} + /> + ~ + { + isSetBackPh(e.target.value); + }} + value={backPHdata ?? ""} + readOnly={formType === "sttn"} + maxLength={3} + /> +
+
+
+ + ); +} diff --git a/apps/wr/src/shared/config/api.ts b/apps/wr/src/shared/config/api.ts new file mode 100644 index 000000000..3eba9fa91 --- /dev/null +++ b/apps/wr/src/shared/config/api.ts @@ -0,0 +1,56 @@ +import { PROXY_HOST } from "./env"; + +export const BASE_URL = `${PROXY_HOST}/server`; + +export const ENDPOINT = { + ATTACH_SERVICE: { + TUS_UPLOAD: "/attach-service/api/v1/tus/upload", + EDITOR_UPLOAD: "/attach-service/api/v1/upload/editor", + IMAGES: "/attach-service/api/v1/images", + MOVIE_THUMBNAIL: "/attach-service/api/v1/movie/thumbnail", + ATTACHMENTS: "/attach-service/api/v1/atfl/attachments", + DOWNLOAD: "/attach-service/api/v1/atflcd/download", + STREAM_VIDEO: "/attach-service/api/v1/stream/video", + }, + USER_SERVICE: { + LOGIN: "/user-service/login", + USERS: "/user-service/api/v1/users", + SILENT_REFRESH: "/user-service/api/v1/users/token/refresh", + AUTHORIZATIONS: "/user-service/api/v1/authorizations", + ROLE_AUTHORIZATIONS: "/user-service/api/v1/role-authorizations", + ROLES: "/user-service/api/v1/roles", + }, + CMS_SERVICE: { + SITES: "/cms-service/api/v1/sites", + IPS: "/cms-service/api/v1/site-ips", + DOMAINS: "/cms-service/api/v1/site-dmns", + POSTINGS: "/cms-service/api/v1/site-pstgs", + CODE: "/cms-service/api/v1/code/cache", + MENUS: "/cms-service/api/v1/menus", + MENU_ROLES: "/cms-service/api/v1/menu-roles", + MENU_AUTHRTS: "/cms-service/api/v1/menu-authrts", + CONTENTS: "/cms-service/api/v1/contents", + CONTENTS_DETAILS: "/cms-service/api/v1/contents-details", + ORGANIZATIONS: "/cms-service/api/v1/ognzs", + USER_ORGANIZATION: "/cms-service/api/v1/user-ognz", + IMAGES: "/cms-service/api/v1/images", + BANNERS: "/cms-service/api/v1/bnrs", + TEMPLATE: "/cms-service/api/v1/tmplt", + TERMS: "/cms-service/api/v1/trms", + LWPO_CODE: "/cms-service/api/v1/lwpo-cds", + UP_CODE: "/cms-service/api/v1/up-codes", + POPUPS: "/cms-service/api/v1/popups", + SCHEDULES: "/cms-service/api/v1/schdls", + SURVEY: "/cms-service/api/v1/srvy", + SURVEY_QUESTION: "/cms-service/api/v1/srvy-qitem", + SURVEY_ARTICLE: "/cms-service/api/v1/srvy-artcl", + }, + BOARD_SERVICE: { + BBS: "/board-service/api/v1/bbs", + BBS_TEMPLATES: "/board-service/api/v1/bbsTmplt", + POSTS: "/board-service/api/v1/posts", + POSTS_COMMENTS: "/board-service/api/v1/posts-cmnts", + }, +}; + +export const JWT_EXPIRATION_TIME = 1800000; diff --git a/apps/wr/src/shared/config/env.ts b/apps/wr/src/shared/config/env.ts new file mode 100644 index 000000000..7fe0226ac --- /dev/null +++ b/apps/wr/src/shared/config/env.ts @@ -0,0 +1,14 @@ +export const SITE_ID = process.env.NEXT_PUBLIC_SITE_ID || "WR"; +export const PORT = process.env.NEXT_PUBLIC_PORT || "3001"; +export const PROXY_HOST = process.env.NEXT_PUBLIC_PROXY_HOST || `http://localhost:${PORT}`; +export const SERVER_API_URL = process.env.NEXT_PUBLIC_SERVER_API_URL ||'http://con.mind-one.co.kr:11080/api/v1'; +export const SERVER_API_FO_URL = process.env.NEXT_PUBLIC_FO_SERVER_API_URL||' http://con.mind-one.co.kr:11082/api/v1'; +export const SERVER_API_CS_URL = process.env.NEXT_PUBLIC_CS_SERVER_API_URL||'http://dev.onasys.co.kr:8000'; +export const SERVER_API_CS_TUS_URL = process.env.NEXT_PUBLIC_CS_TUS_UPLOAD ||'/attach-service/api/v1/tus/upload' +export const CLAIM_NAME = process.env.NEXT_PUBLIC_CLAIM_NAME || "Authorization"; +export const ACCESS_TOKEN = process.env.NEXT_PUBLIC_ACCESS_TOKEN || "access-token"; +export const REFRESH_TOKEN =process.env.NEXT_PUBLIC_REFRESH_TOKEN || "refresh-token"; +export const AUTH_USER_ID = process.env.NEXT_PUBLIC_AUTH_USER_ID || "token-id"; +export const SERVER_SEWERAGE_API_URL = process.env.NEXT_PUBLIC_SEWERAGE_API_URL; + + diff --git a/apps/wr/src/shared/config/index.ts b/apps/wr/src/shared/config/index.ts new file mode 100644 index 000000000..cd83447d5 --- /dev/null +++ b/apps/wr/src/shared/config/index.ts @@ -0,0 +1,2 @@ +export * from "./api"; +export * from "./env";