Compare commits
No commits in common. "febea389c9a0a682decb82b4ce4519736c563cea" and "b8bbaba37fd2407ee233bf286c614f17e71e4d19" have entirely different histories.
febea389c9
...
b8bbaba37f
@ -1,28 +0,0 @@
|
|||||||
NEXT_PUBLIC_API_SERVER_PATH="https://dev-api.hanasys.jp"
|
|
||||||
|
|
||||||
NEXT_PUBLIC_HOST_URL="//1.248.227.176:4000"
|
|
||||||
|
|
||||||
NEXT_PUBLIC_API_HOST_URL="http://localhost:3000"
|
|
||||||
|
|
||||||
SESSION_SECRET="i3iHH1yp2/2SpQSIySQ4bpyc4g0D+zCF9FAn5xUG0+Y="
|
|
||||||
|
|
||||||
# NEXT_PUBLIC_CONVERTER_API_URL="https://v2.convertapi.com/convert/dwg/to/png?Secret=secret_bV5zuYMyyIYFlOb3"
|
|
||||||
# NEXT_PUBLIC_CONVERTER_API_URL="https://v2.convertapi.com/convert/dwg/to/png?Secret=secret_yAS4QDalL9jgQ7vS"
|
|
||||||
NEXT_PUBLIC_CONVERTER_API_URL="https://v2.convertapi.com/convert/dwg/to/png?Secret=secret_a0FLEK6M2oTpXInK"
|
|
||||||
|
|
||||||
NEXT_PUBLIC_Q_ORDER_AUTO_LOGIN_URL="http://q-order-stg.q-cells.jp:8120/eos/login/autoLogin"
|
|
||||||
NEXT_PUBLIC_Q_MUSUBI_AUTO_LOGIN_URL="http://q-musubi-stg.q-cells.jp:8120/qm/login/autoLogin"
|
|
||||||
|
|
||||||
# 테스트용
|
|
||||||
# AWS_REGION="ap-northeast-2"
|
|
||||||
# AMPLIFY_BUCKET="interplug"
|
|
||||||
# AWS_ACCESS_KEY_ID="AKIAVWMWJCUXFHEAZ4FR"
|
|
||||||
# AWS_SECRET_ACCESS_KEY="NDzSvPUo4/ErpPOEs1eZAnoUBilc1FL7YaoHkqe4"
|
|
||||||
# NEXT_PUBLIC_AWS_S3_BASE_URL="https://interplug.s3.ap-northeast-2.amazonaws.com"
|
|
||||||
|
|
||||||
# 실제 일본 서버
|
|
||||||
AWS_REGION="ap-northeast-1"
|
|
||||||
AMPLIFY_BUCKET="files.hanasys.jp"
|
|
||||||
AWS_ACCESS_KEY_ID="AKIA3K4QWLZHFZRJOM2E"
|
|
||||||
AWS_SECRET_ACCESS_KEY="Cw87TjKwnTWRKgORGxYiFU6GUTgu25eUw4eLBNcA"
|
|
||||||
NEXT_PUBLIC_AWS_S3_BASE_URL="//files.hanasys.jp"
|
|
||||||
12
package.json
12
package.json
@ -3,12 +3,11 @@
|
|||||||
"version": "0.1.0",
|
"version": "0.1.0",
|
||||||
"private": true,
|
"private": true,
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "env-cmd -f .env.localhost next dev",
|
"dev": "next dev",
|
||||||
"build": "env-cmd -f .env.productionnext build",
|
"build": "next build",
|
||||||
"build:dev": "env-cmd -f .env.development next build",
|
"start:cluster1": "next start -p 5000",
|
||||||
"start:cluster1": "env-cmd -f .env.production next start -p 5000",
|
"start:cluster2": "next start -p 5001",
|
||||||
"start:cluster2": "env-cmd -f .env.production next start -p 5001",
|
"start:dev": "next start -p 5010",
|
||||||
"start:dev": "env-cmd -f .env.development next start -p 5010",
|
|
||||||
"lint": "next lint",
|
"lint": "next lint",
|
||||||
"serve": "node server.js"
|
"serve": "node server.js"
|
||||||
},
|
},
|
||||||
@ -19,7 +18,6 @@
|
|||||||
"big.js": "^6.2.2",
|
"big.js": "^6.2.2",
|
||||||
"chart.js": "^4.4.6",
|
"chart.js": "^4.4.6",
|
||||||
"dayjs": "^1.11.13",
|
"dayjs": "^1.11.13",
|
||||||
"env-cmd": "^10.1.0",
|
|
||||||
"fabric": "^5.3.0",
|
"fabric": "^5.3.0",
|
||||||
"framer-motion": "^11.2.13",
|
"framer-motion": "^11.2.13",
|
||||||
"fs": "^0.0.1-security",
|
"fs": "^0.0.1-security",
|
||||||
|
|||||||
@ -14,7 +14,6 @@ import { sessionStore } from '@/store/commonAtom'
|
|||||||
import { isObjectNotEmpty } from '@/util/common-utils'
|
import { isObjectNotEmpty } from '@/util/common-utils'
|
||||||
|
|
||||||
import BoardDetailModal from './community/modal/BoardDetailModal'
|
import BoardDetailModal from './community/modal/BoardDetailModal'
|
||||||
import Config from '@/config/config.export'
|
|
||||||
|
|
||||||
export default function MainPage() {
|
export default function MainPage() {
|
||||||
const [sessionState, setSessionState] = useRecoilState(sessionStore)
|
const [sessionState, setSessionState] = useRecoilState(sessionStore)
|
||||||
@ -136,11 +135,6 @@ export default function MainPage() {
|
|||||||
<ChangePasswordPop setChagePasswordPopOpen={setChagePasswordPopOpen} />
|
<ChangePasswordPop setChagePasswordPopOpen={setChagePasswordPopOpen} />
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
{Config().mode}
|
|
||||||
<br />
|
|
||||||
{Config().baseUrl}
|
|
||||||
<br />
|
|
||||||
{process.env.NEXT_PUBLIC_API_HOST_URL}
|
|
||||||
</>
|
</>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,11 +0,0 @@
|
|||||||
// local, development, production 과 관계없이 동일한 값으로 반환되는 부분은 해당 함수의 return 되는 부분만 수정하면 됩니다. (달라져야 하는 값이 아닌, 같은 값에 대해서는 local, development, production 파일을 모두 수정할 필요가 없어지게 됩니다.)
|
|
||||||
export default function getConfigs(params) {
|
|
||||||
// local, development, production 마다 달라지는 값
|
|
||||||
const { baseUrl, mode } = params
|
|
||||||
|
|
||||||
// 공통으로 반환되는 구조
|
|
||||||
return {
|
|
||||||
baseUrl,
|
|
||||||
mode,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,13 +0,0 @@
|
|||||||
import getConfigs from './config.common'
|
|
||||||
|
|
||||||
// 환경마다 달라져야 할 변수, 값들을 정의합니다. (여기는 development 환경에 맞는 값을 지정합니다.)
|
|
||||||
const baseUrl = 'https://dev.hanssys.jp'
|
|
||||||
const mode = 'development'
|
|
||||||
|
|
||||||
// 환경마다 달라져야 할 값들을 getConfig 함수에 전달합니다.
|
|
||||||
const configDevelopment = getConfigs({
|
|
||||||
baseUrl,
|
|
||||||
mode,
|
|
||||||
})
|
|
||||||
|
|
||||||
export default configDevelopment
|
|
||||||
@ -1,19 +0,0 @@
|
|||||||
import configDevelopment from './config.development'
|
|
||||||
import configLocal from './config.local'
|
|
||||||
import configProduction from './config.production'
|
|
||||||
|
|
||||||
// 클라이언트에서는 이 함수를 사용하여 config 값을 참조합니다.
|
|
||||||
const Config = () => {
|
|
||||||
switch (process.env.NEXT_PUBLIC_RUN_MODE) {
|
|
||||||
case 'local':
|
|
||||||
return configLocal
|
|
||||||
case 'development':
|
|
||||||
return configDevelopment
|
|
||||||
case 'production':
|
|
||||||
return configProduction
|
|
||||||
default:
|
|
||||||
return configLocal
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
export default Config
|
|
||||||
@ -1,13 +0,0 @@
|
|||||||
import getConfigs from './config.common'
|
|
||||||
|
|
||||||
// 환경마다 달라져야 할 변수, 값들을 정의합니다. (여기는 local 환경에 맞는 값을 지정합니다.)
|
|
||||||
const baseUrl = 'http://localhost:3000'
|
|
||||||
const mode = 'local'
|
|
||||||
|
|
||||||
// 환경마다 달라져야 할 값들을 getConfig 함수에 전달합니다.
|
|
||||||
const configLocal = getConfigs({
|
|
||||||
baseUrl,
|
|
||||||
mode,
|
|
||||||
})
|
|
||||||
|
|
||||||
export default configLocal
|
|
||||||
@ -1,13 +0,0 @@
|
|||||||
import getConfigs from './config.common'
|
|
||||||
|
|
||||||
// 환경마다 달라져야 할 변수, 값들을 정의합니다. (여기는 production 환경에 맞는 값을 지정합니다.)
|
|
||||||
const baseUrl = 'https://www.hanasys.jp'
|
|
||||||
const mode = 'production'
|
|
||||||
|
|
||||||
// 환경마다 달라져야 할 값들을 getConfig 함수에 전달합니다.
|
|
||||||
const configProduction = getConfigs({
|
|
||||||
baseUrl,
|
|
||||||
mode,
|
|
||||||
})
|
|
||||||
|
|
||||||
export default configProduction
|
|
||||||
@ -8,7 +8,6 @@ import { useCanvas } from '@/hooks/useCanvas'
|
|||||||
import { deleteBackGroundImage, setBackGroundImage } from '@/lib/imageActions'
|
import { deleteBackGroundImage, setBackGroundImage } from '@/lib/imageActions'
|
||||||
import { settingModalFirstOptionsState } from '@/store/settingAtom'
|
import { settingModalFirstOptionsState } from '@/store/settingAtom'
|
||||||
import { popSpinnerState } from '@/store/popupAtom'
|
import { popSpinnerState } from '@/store/popupAtom'
|
||||||
import Config from '@/config/config.export'
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 배경 이미지 관리
|
* 배경 이미지 관리
|
||||||
@ -98,7 +97,7 @@ export function useRefFiles() {
|
|||||||
setPopSpinnerStore(true)
|
setPopSpinnerStore(true)
|
||||||
console.log('🚀 ~ handleFileDelete ~ handleFileDelete:', refImage)
|
console.log('🚀 ~ handleFileDelete ~ handleFileDelete:', refImage)
|
||||||
console.log('🚀 ~ handleFileDelete ~ currentCanvasPlan.bgImageName:', currentCanvasPlan.bgImageName)
|
console.log('🚀 ~ handleFileDelete ~ currentCanvasPlan.bgImageName:', currentCanvasPlan.bgImageName)
|
||||||
await del({ url: `${Config().baseUrl}/api/image/upload?fileName=${currentCanvasPlan.bgImageName}` })
|
await del({ url: `${process.env.NEXT_PUBLIC_API_HOST_URL}/api/image/upload?fileName=${currentCanvasPlan.bgImageName}` })
|
||||||
setCurrentBgImage(null)
|
setCurrentBgImage(null)
|
||||||
await deleteBackGroundImage({
|
await deleteBackGroundImage({
|
||||||
objectId: currentCanvasPlan.id,
|
objectId: currentCanvasPlan.id,
|
||||||
@ -119,7 +118,7 @@ export function useRefFiles() {
|
|||||||
confirmFn: async () => {
|
confirmFn: async () => {
|
||||||
console.log('🚀 ~ handleAddressDelete ~ handleAddressDelete:', refImage)
|
console.log('🚀 ~ handleAddressDelete ~ handleAddressDelete:', refImage)
|
||||||
console.log('🚀 ~ handleAddressDelete ~ currentCanvasPlan.bgImageName:', currentCanvasPlan.bgImageName)
|
console.log('🚀 ~ handleAddressDelete ~ currentCanvasPlan.bgImageName:', currentCanvasPlan.bgImageName)
|
||||||
await del({ url: `${Config().baseUrl}/api/image/map?fileName=${currentCanvasPlan.bgImageName}` })
|
await del({ url: `${process.env.NEXT_PUBLIC_API_HOST_URL}/api/image/map?fileName=${currentCanvasPlan.bgImageName}` })
|
||||||
setMapPositionAddress('')
|
setMapPositionAddress('')
|
||||||
setCurrentBgImage(null)
|
setCurrentBgImage(null)
|
||||||
await deleteBackGroundImage({
|
await deleteBackGroundImage({
|
||||||
@ -150,7 +149,7 @@ export function useRefFiles() {
|
|||||||
}))
|
}))
|
||||||
|
|
||||||
const res = await get({
|
const res = await get({
|
||||||
url: `${Config().baseUrl}/api/image/map?q=${queryRef.current.value}&fileNm=${currentCanvasPlan.id}&zoom=20`,
|
url: `${process.env.NEXT_PUBLIC_API_HOST_URL}/api/image/map?q=${queryRef.current.value}&fileNm=${currentCanvasPlan.id}&zoom=20`,
|
||||||
})
|
})
|
||||||
console.log('🚀 ~ handleMapImageDown ~ res:', res)
|
console.log('🚀 ~ handleMapImageDown ~ res:', res)
|
||||||
setCurrentBgImage(`${process.env.NEXT_PUBLIC_AWS_S3_BASE_URL}/${res.fileName}`)
|
setCurrentBgImage(`${process.env.NEXT_PUBLIC_AWS_S3_BASE_URL}/${res.fileName}`)
|
||||||
@ -209,7 +208,7 @@ export function useRefFiles() {
|
|||||||
formData.append('file', file)
|
formData.append('file', file)
|
||||||
|
|
||||||
const res = await post({
|
const res = await post({
|
||||||
url: `${Config().baseUrl}/api/image/upload`,
|
url: `${process.env.NEXT_PUBLIC_API_HOST_URL}/api/image/upload`,
|
||||||
data: formData,
|
data: formData,
|
||||||
})
|
})
|
||||||
console.log('🚀 ~ handleUploadImageRefFile ~ res:', res)
|
console.log('🚀 ~ handleUploadImageRefFile ~ res:', res)
|
||||||
@ -241,7 +240,7 @@ export function useRefFiles() {
|
|||||||
|
|
||||||
/** 캐드 도면 파일 업로드 */
|
/** 캐드 도면 파일 업로드 */
|
||||||
const result = await post({
|
const result = await post({
|
||||||
url: `${Config().baseUrl}/api/image/cad`,
|
url: `${process.env.NEXT_PUBLIC_API_HOST_URL}/api/image/cad`,
|
||||||
data: res,
|
data: res,
|
||||||
})
|
})
|
||||||
console.log('🚀 ~ handleUploadConvertRefFile ~ result:', result)
|
console.log('🚀 ~ handleUploadConvertRefFile ~ result:', result)
|
||||||
|
|||||||
@ -5,7 +5,6 @@ import { usePlan } from '../usePlan'
|
|||||||
import { POLYGON_TYPE } from '@/common/common'
|
import { POLYGON_TYPE } from '@/common/common'
|
||||||
import { QcastContext } from '@/app/QcastProvider'
|
import { QcastContext } from '@/app/QcastProvider'
|
||||||
import { useContext } from 'react'
|
import { useContext } from 'react'
|
||||||
import Config from '@/config/config.export'
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 이미지 로더 hook
|
* 이미지 로더 hook
|
||||||
@ -81,7 +80,7 @@ export function useImgLoader() {
|
|||||||
/** 이미지 크롭 요청 */
|
/** 이미지 크롭 요청 */
|
||||||
const result = await post({
|
const result = await post({
|
||||||
// url: `${process.env.NEXT_PUBLIC_API_HOST_URL}/image/canvas`,
|
// url: `${process.env.NEXT_PUBLIC_API_HOST_URL}/image/canvas`,
|
||||||
url: `${Config().baseUrl}/api/image/canvas`,
|
url: `${process.env.NEXT_PUBLIC_API_HOST_URL}/api/image/canvas`,
|
||||||
data: formData,
|
data: formData,
|
||||||
})
|
})
|
||||||
console.log('🚀 ~ handleCanvasToPng ~ result:', result)
|
console.log('🚀 ~ handleCanvasToPng ~ result:', result)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user