Merge branch 'dev' into dev-yj

This commit is contained in:
yjnoh 2025-03-07 12:31:25 +09:00
commit 1cc4854429
10 changed files with 81 additions and 57 deletions

View File

@ -1,4 +1,4 @@
NEXT_PUBLIC_API_SERVER_PATH="http://1.248.227.176:38080"
NEXT_PUBLIC_API_SERVER_PATH="https://dev-api.hanasys.jp"
NEXT_PUBLIC_HOST_URL="http://1.248.227.176:4000"

View File

@ -1,4 +1,4 @@
NEXT_PUBLIC_API_SERVER_PATH="http://1.248.227.176:38080"
NEXT_PUBLIC_API_SERVER_PATH="https://api.hanasys.jp/"
NEXT_PUBLIC_HOST_URL="http://1.248.227.176:4000"

View File

@ -15,6 +15,13 @@ const nextConfig = {
sassOptions: {
includePaths: ['./src/styles'],
},
experimental: {
staleTimes: {
dynamic: 0,
dynamicSWR: 0,
dynamicSSR: 0,
},
},
}
export default nextConfig

View File

@ -5,7 +5,8 @@
"scripts": {
"dev": "next dev",
"build": "next build",
"start": "next start",
"start": "next start -p 3000",
"start:dev": "next start -p 3001",
"lint": "next lint",
"serve": "node server.js"
},

View File

@ -9,7 +9,7 @@ import { setSession, login, checkSession } from '@/lib/authActions'
import { useMessage } from '@/hooks/useMessage'
import { globalLocaleStore } from '@/store/localeAtom'
import { sessionStore } from '@/store/commonAtom'
import { useRouter } from 'next/navigation'
import { redirect, useRouter } from 'next/navigation'
import { useSearchParams } from 'next/navigation'
import GlobalSpinner from '@/components/common/spinner/GlobalSpinner'
@ -28,11 +28,13 @@ export default function Login() {
autoLoginProcess(autoLoginParam)
}
checkSession().then((res) => {
if (res) {
login()
}
})
// console.log('🚀 ~ checkSession ~ checkSession():', checkSession())
// checkSession().then((res) => {
// console.log('🚀 ~ checkSession ~ res:', res)
// if (res) {
// login()
// }
// })
}, [])
const autoLoginProcess = async (autoLoginParam) => {
@ -49,7 +51,7 @@ export default function Login() {
setSessionState(result)
login()
} else {
router.push('/login')
router.push('/login', undefined, { shallow: true })
}
})
}

View File

@ -8,7 +8,7 @@ import { useRecoilState, useRecoilValue, useResetRecoilState } from 'recoil'
import { dimmedStore, sessionStore } from '@/store/commonAtom'
import { useMessage } from '@/hooks/useMessage'
import { logout } from '@/lib/authActions'
import { checkSession, logout } from '@/lib/authActions'
import QSelectBox from '@/components/common/select/QSelectBox'
@ -178,6 +178,7 @@ export default function Header(props) {
<Link
key={`${menu.id}`}
href={menu.url}
replace={true}
onClick={() => {
// moveHome()
removeStuffRecoil(menu)
@ -203,6 +204,7 @@ export default function Header(props) {
<Link
scroll={false}
href={m.url}
replace={true}
onClick={() => {
removeStuffRecoil(m)
}}
@ -266,7 +268,7 @@ export default function Header(props) {
code: 'DELETE',
})
logout()
router.replace('/login')
router.replace('/login', undefined, { shallow: true })
}}
>
{getMessage('header.logout')}

View File

@ -2,7 +2,6 @@
import { useState, useEffect, useRef, useContext } from 'react'
import { useRouter, useSearchParams } from 'next/navigation'
import { Button } from '@nextui-org/react'
import Select from 'react-select'
import { useAxios } from '@/hooks/useAxios'
import { globalLocaleStore } from '@/store/localeAtom'
@ -1710,12 +1709,12 @@ export default function StuffDetail() {
{getMessage('stuff.detail.required')}
</div>
<div className="left-unit-box">
<Button className="btn-origin grey mr5" onPress={onTempSave} style={{ display: showButton }}>
<button type="button" className="btn-origin grey mr5" onClick={onTempSave} style={{ display: showButton }}>
{getMessage('stuff.detail.btn.tempSave')}
</Button>
<Button type="submit" className="btn-origin navy mr5" style={{ display: showButton }}>
</button>
<button type="submit" className="btn-origin navy mr5" style={{ display: showButton }}>
{getMessage('stuff.detail.btn.save')}
</Button>
</button>
<button
type="button"
className="btn-origin grey"
@ -1752,9 +1751,16 @@ export default function StuffDetail() {
)) ||
null}
</div>
<Button type="button" className="btn-origin grey" onPress={onSearchDesignRequestPopOpen} style={{ display: showButton }}>
<button
type="button"
className="btn-origin grey"
onClick={() => {
onSearchDesignRequestPopOpen()
}}
style={{ display: showButton }}
>
{getMessage('stuff.planReqPopup.title')}
</Button>
</button>
</div>
</td>
</tr>
@ -2003,9 +2009,9 @@ export default function StuffDetail() {
<div className="input-wrap mr5" style={{ width: '200px' }}>
<input type="text" className="input-light" disabled value={form.watch('zipNo') || ''} />
</div>
<Button className="btn-origin grey" onPress={onSearchPostNumberPopOpen} style={{ display: showButton }}>
<button type="button" className="btn-origin grey" onClick={onSearchPostNumberPopOpen} style={{ display: showButton }}>
{getMessage('stuff.detail.btn.addressPop')}
</Button>
</button>
<div className="guide">{getMessage('stuff.detail.btn.addressPop.guide')}</div>
</div>
</td>
@ -2093,9 +2099,9 @@ export default function StuffDetail() {
></Select>
</div>
<span className="mr10">{getMessage('stuff.detail.standardWindSpeedIdSpan')}</span>
<Button type="button" className="btn-origin grey" onPress={onSearchWindSpeedPopOpen} style={{ display: showButton }}>
<button type="button" className="btn-origin grey" onClick={onSearchWindSpeedPopOpen} style={{ display: showButton }}>
{getMessage('stuff.detail.btn.windSpeedPop')}
</Button>
</button>
</div>
</td>
</tr>
@ -2206,12 +2212,12 @@ export default function StuffDetail() {
</table>
</div>
<div className="sub-right-footer">
<Button className="btn-origin grey mr5" onPress={onTempSave} style={{ display: showButton }}>
<button type="button" className="btn-origin grey mr5" onClick={onTempSave} style={{ display: showButton }}>
{getMessage('stuff.detail.btn.tempSave')}
</Button>
<Button type="submit" className="btn-origin navy mr5" style={{ display: showButton }}>
</button>
<button type="submit" className="btn-origin navy mr5" style={{ display: showButton }}>
{getMessage('stuff.detail.btn.save')}
</Button>
</button>
<button
type="button"
className="btn-origin grey"
@ -2246,23 +2252,23 @@ export default function StuffDetail() {
>
{getMessage('stuff.detail.btn.moveList')}
</button>
<Button type="submit" className="btn-origin navy mr5" style={{ display: showButton }}>
<button type="submit" className="btn-origin navy mr5" style={{ display: showButton }}>
{getMessage('stuff.detail.btn.save')}
</Button>
<Button type="button" className="btn-origin grey" onPress={onDelete} style={{ display: showButton }}>
</button>
<button type="button" className="btn-origin grey" onClick={onDelete} style={{ display: showButton }}>
{getMessage('stuff.detail.btn.delete')}
</Button>
</button>
</div>
</>
) : (
<>
<div className="left-unit-box">
<Button className="btn-origin grey mr5" onPress={onTempSave} style={{ display: showButton }}>
<button type="button" className="btn-origin grey mr5" onClick={onTempSave} style={{ display: showButton }}>
{getMessage('stuff.detail.btn.tempSave')}
</Button>
<Button type="submit" className="btn-origin navy mr5" style={{ display: showButton }}>
</button>
<button type="submit" className="btn-origin navy mr5" style={{ display: showButton }}>
{getMessage('stuff.detail.btn.save')}
</Button>
</button>
<button
type="button"
className="btn-origin grey"
@ -2304,9 +2310,14 @@ export default function StuffDetail() {
</div>
{managementState?.tempFlg === '1' ? (
<>
<Button className="btn-origin grey" onPress={onSearchDesignRequestPopOpen} style={{ display: showButton }}>
<button
type="button"
className="btn-origin grey"
onClick={onSearchDesignRequestPopOpen}
style={{ display: showButton }}
>
{getMessage('stuff.planReqPopup.title')}
</Button>
</button>
</>
) : null}
</div>
@ -2565,9 +2576,9 @@ export default function StuffDetail() {
<div className="input-wrap mr5" style={{ width: '200px' }}>
<input type="text" className="input-light" disabled value={form.watch('zipNo') || ''} />
</div>
<Button className="btn-origin grey" onPress={onSearchPostNumberPopOpen} style={{ display: showButton }}>
<button type="button" className="btn-origin grey" onClick={onSearchPostNumberPopOpen} style={{ display: showButton }}>
{getMessage('stuff.detail.btn.addressPop')}
</Button>
</button>
<div className="guide">{getMessage('stuff.detail.btn.addressPop.guide')}</div>
</div>
</td>
@ -2660,9 +2671,9 @@ export default function StuffDetail() {
></Select>
</div>
<span className="mr10">{getMessage('stuff.detail.standardWindSpeedIdSpan')}</span>
<Button type="button" className="btn-origin grey" onPress={onSearchWindSpeedPopOpen} style={{ display: showButton }}>
<button type="button" className="btn-origin grey" onClick={onSearchWindSpeedPopOpen} style={{ display: showButton }}>
{getMessage('stuff.detail.btn.windSpeedPop')}
</Button>
</button>
</div>
</td>
</tr>
@ -2825,23 +2836,23 @@ export default function StuffDetail() {
>
{getMessage('stuff.detail.btn.moveList')}
</button>
<Button type="submit" className="btn-origin navy mr5" style={{ display: showButton }}>
<button type="submit" className="btn-origin navy mr5" style={{ display: showButton }}>
{getMessage('stuff.detail.btn.save')}
</Button>
<Button type="button" className="btn-origin grey" onPress={onDelete} style={{ display: showButton }}>
</button>
<button type="button" className="btn-origin grey" onClick={onDelete} style={{ display: showButton }}>
{getMessage('stuff.detail.btn.delete')}
</Button>
</button>
</div>
</>
) : (
<>
<div className="sub-right-footer">
<Button className="btn-origin grey mr5" onPress={onTempSave} style={{ display: showButton }}>
<button type="button" className="btn-origin grey mr5" onClick={onTempSave} style={{ display: showButton }}>
{getMessage('stuff.detail.btn.tempSave')}
</Button>
<Button type="submit" className="btn-origin navy mr5" style={{ display: showButton }}>
</button>
<button type="submit" className="btn-origin navy mr5" style={{ display: showButton }}>
{getMessage('stuff.detail.btn.save')}
</Button>
</button>
<button
type="button"
className="btn-origin grey"

View File

@ -1665,13 +1665,13 @@ export const useTrestle = () => {
canvas.add(bracket)
canvas.renderAll()
if (direction === 'south') {
startPointY -= height
startPointY -= height - moduleIntvlVer / 10
} else if (direction === 'north') {
startPointY += height
startPointY += height + moduleIntvlVer / 10
} else if (direction === 'east') {
startPointX -= width
startPointX -= width - moduleIntvlHor / 10
} else if (direction === 'west') {
startPointX += width
startPointX += width + moduleIntvlHor / 10
}
}
}

View File

@ -3,8 +3,8 @@ import { fabric } from 'fabric'
import { actionHandler, anchorWrapper, polygonPositionHandler } from '@/util/canvas-util'
import { useRecoilState, useRecoilValue } from 'recoil'
import { canvasSizeState, canvasState, fontSizeState } from '@/store/canvasAtom'
import { useRecoilState, useRecoilValue, useResetRecoilState, useSetRecoilState } from 'recoil'
import { canvasSizeState, canvasState, canvasZoomState, fontSizeState } from '@/store/canvasAtom'
import { QLine } from '@/components/fabric/QLine'
import { QPolygon } from '@/components/fabric/QPolygon'
import { defineQLine } from '@/util/qline-utils'
@ -27,6 +27,7 @@ export function useCanvas(id) {
const { setCanvasForEvent, attachDefaultEventOnCanvas } = useCanvasEvent()
const isImageDisplay = useRecoilValue(imageDisplaySelector)
const {} = useFont()
const resetCanvasZoom = useResetRecoilState(canvasZoomState)
/**
* 처음 셋팅
@ -43,7 +44,7 @@ export function useCanvas(id) {
setCanvas(c)
setCanvasForEvent(c)
attachDefaultEventOnCanvas()
resetCanvasZoom()
return () => {
// c.dispose()
c.clear()

View File

@ -1,2 +1,2 @@
var exec = require('child_process').exec
exec('yarn serve', { windowsHide: true })
exec('yarn start', { windowsHide: true })