fix: 포커싱 기준 수정, plan 참조 변수 대상 수정
This commit is contained in:
parent
f2ae403265
commit
7b40f48144
@ -143,8 +143,8 @@ export function usePlan() {
|
|||||||
const checkUnsavedCanvasPlan = async (userId) => {
|
const checkUnsavedCanvasPlan = async (userId) => {
|
||||||
swalFire({
|
swalFire({
|
||||||
text:
|
text:
|
||||||
(!initCanvasPlans.some((initCanvasPlans) => initCanvasPlans.id === plan.id) ? 'New ' : '') +
|
(!initCanvasPlans.some((initCanvasPlans) => initCanvasPlans.id === currentCanvasPlan.id) ? 'New ' : '') +
|
||||||
`Plan ${plan.ordering}의 변경 사항을 저장하시겠습니까?`,
|
`Plan ${currentCanvasPlan.ordering}의 변경 사항을 저장하시겠습니까?`,
|
||||||
type: 'confirm',
|
type: 'confirm',
|
||||||
confirmFn: async () => {
|
confirmFn: async () => {
|
||||||
initCanvasPlans.some((plan) => plan.id === currentCanvasPlan.id)
|
initCanvasPlans.some((plan) => plan.id === currentCanvasPlan.id)
|
||||||
@ -374,7 +374,7 @@ export function usePlan() {
|
|||||||
if (res.length > 0) {
|
if (res.length > 0) {
|
||||||
setInitCanvasPlans(res)
|
setInitCanvasPlans(res)
|
||||||
setPlans(res)
|
setPlans(res)
|
||||||
updateCurrentPlan(Number(pid))
|
updateCurrentPlan(res[pid - 1].id)
|
||||||
setPlanNum(res.length)
|
setPlanNum(res.length)
|
||||||
} else {
|
} else {
|
||||||
addPlan(userId, objectNo, '')
|
addPlan(userId, objectNo, '')
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user