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" 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" NEXT_PUBLIC_HOST_URL="http://1.248.227.176:4000"

View File

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

View File

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

View File

@ -9,7 +9,7 @@ import { setSession, login, checkSession } from '@/lib/authActions'
import { useMessage } from '@/hooks/useMessage' import { useMessage } from '@/hooks/useMessage'
import { globalLocaleStore } from '@/store/localeAtom' import { globalLocaleStore } from '@/store/localeAtom'
import { sessionStore } from '@/store/commonAtom' import { sessionStore } from '@/store/commonAtom'
import { useRouter } from 'next/navigation' import { redirect, useRouter } from 'next/navigation'
import { useSearchParams } from 'next/navigation' import { useSearchParams } from 'next/navigation'
import GlobalSpinner from '@/components/common/spinner/GlobalSpinner' import GlobalSpinner from '@/components/common/spinner/GlobalSpinner'
@ -28,11 +28,13 @@ export default function Login() {
autoLoginProcess(autoLoginParam) autoLoginProcess(autoLoginParam)
} }
checkSession().then((res) => { // console.log('🚀 ~ checkSession ~ checkSession():', checkSession())
if (res) { // checkSession().then((res) => {
login() // console.log('🚀 ~ checkSession ~ res:', res)
} // if (res) {
}) // login()
// }
// })
}, []) }, [])
const autoLoginProcess = async (autoLoginParam) => { const autoLoginProcess = async (autoLoginParam) => {
@ -49,7 +51,7 @@ export default function Login() {
setSessionState(result) setSessionState(result)
login() login()
} else { } 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 { dimmedStore, sessionStore } from '@/store/commonAtom'
import { useMessage } from '@/hooks/useMessage' import { useMessage } from '@/hooks/useMessage'
import { logout } from '@/lib/authActions' import { checkSession, logout } from '@/lib/authActions'
import QSelectBox from '@/components/common/select/QSelectBox' import QSelectBox from '@/components/common/select/QSelectBox'
@ -178,6 +178,7 @@ export default function Header(props) {
<Link <Link
key={`${menu.id}`} key={`${menu.id}`}
href={menu.url} href={menu.url}
replace={true}
onClick={() => { onClick={() => {
// moveHome() // moveHome()
removeStuffRecoil(menu) removeStuffRecoil(menu)
@ -203,6 +204,7 @@ export default function Header(props) {
<Link <Link
scroll={false} scroll={false}
href={m.url} href={m.url}
replace={true}
onClick={() => { onClick={() => {
removeStuffRecoil(m) removeStuffRecoil(m)
}} }}
@ -266,7 +268,7 @@ export default function Header(props) {
code: 'DELETE', code: 'DELETE',
}) })
logout() logout()
router.replace('/login') router.replace('/login', undefined, { shallow: true })
}} }}
> >
{getMessage('header.logout')} {getMessage('header.logout')}

View File

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

View File

@ -1665,13 +1665,13 @@ export const useTrestle = () => {
canvas.add(bracket) canvas.add(bracket)
canvas.renderAll() canvas.renderAll()
if (direction === 'south') { if (direction === 'south') {
startPointY -= height startPointY -= height - moduleIntvlVer / 10
} else if (direction === 'north') { } else if (direction === 'north') {
startPointY += height startPointY += height + moduleIntvlVer / 10
} else if (direction === 'east') { } else if (direction === 'east') {
startPointX -= width startPointX -= width - moduleIntvlHor / 10
} else if (direction === 'west') { } 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 { actionHandler, anchorWrapper, polygonPositionHandler } from '@/util/canvas-util'
import { useRecoilState, useRecoilValue } from 'recoil' import { useRecoilState, useRecoilValue, useResetRecoilState, useSetRecoilState } from 'recoil'
import { canvasSizeState, canvasState, fontSizeState } from '@/store/canvasAtom' import { canvasSizeState, canvasState, canvasZoomState, fontSizeState } from '@/store/canvasAtom'
import { QLine } from '@/components/fabric/QLine' import { QLine } from '@/components/fabric/QLine'
import { QPolygon } from '@/components/fabric/QPolygon' import { QPolygon } from '@/components/fabric/QPolygon'
import { defineQLine } from '@/util/qline-utils' import { defineQLine } from '@/util/qline-utils'
@ -27,6 +27,7 @@ export function useCanvas(id) {
const { setCanvasForEvent, attachDefaultEventOnCanvas } = useCanvasEvent() const { setCanvasForEvent, attachDefaultEventOnCanvas } = useCanvasEvent()
const isImageDisplay = useRecoilValue(imageDisplaySelector) const isImageDisplay = useRecoilValue(imageDisplaySelector)
const {} = useFont() const {} = useFont()
const resetCanvasZoom = useResetRecoilState(canvasZoomState)
/** /**
* 처음 셋팅 * 처음 셋팅
@ -43,7 +44,7 @@ export function useCanvas(id) {
setCanvas(c) setCanvas(c)
setCanvasForEvent(c) setCanvasForEvent(c)
attachDefaultEventOnCanvas() attachDefaultEventOnCanvas()
resetCanvasZoom()
return () => { return () => {
// c.dispose() // c.dispose()
c.clear() c.clear()

View File

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