Merge pull request '📌 feat: Implement usePlan hook for managing floor plan state and interactions, including canvas data handling, plan creation, deletion, and context management.' (#9) from feature/plan-add-dont-dbclick into dev
Reviewed-on: #9
This commit is contained in:
commit
5e9c22a928
@ -52,6 +52,9 @@ export function usePlan(params = {}) {
|
||||
const { fetchBasicSettings, basicSettingCopySave } = useCanvasSetting()
|
||||
const [canvasSetting, setCanvasSetting] = useRecoilState(canvasSettingState)
|
||||
|
||||
/** 전역 로딩바 컨텍스트 */
|
||||
const { setIsGlobalLoading } = useContext(QcastContext)
|
||||
|
||||
/**
|
||||
* 플랜 복사 시 모듈이 있을경우 모듈 데이터 복사하기 위한 처리
|
||||
*/
|
||||
@ -450,13 +453,21 @@ export function usePlan(params = {}) {
|
||||
text: `Plan ${currentCanvasPlan.planNo} ` + getMessage('plan.message.confirm.copy'),
|
||||
type: 'confirm',
|
||||
confirmFn: async () => {
|
||||
setIsGlobalLoading(true)
|
||||
await postObjectPlan(userId, objectNo, true, false)
|
||||
setIsGlobalLoading(false)
|
||||
},
|
||||
denyFn: async () => {
|
||||
setIsGlobalLoading(true)
|
||||
await postObjectPlan(userId, objectNo, false, false)
|
||||
setIsGlobalLoading(false)
|
||||
},
|
||||
})
|
||||
: await postObjectPlan(userId, objectNo, false, false)
|
||||
: async () => {
|
||||
setIsGlobalLoading(true)
|
||||
await postObjectPlan(userId, objectNo, false, false)
|
||||
setIsGlobalLoading(false)
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user