포인트 정책 - 정책 등록 요청 후 응답이 오면 바로 is_loading을 false로 변경하여 신규 포인트 정책 리스트를 불러올 수 있도록 수정

This commit is contained in:
Yu Sung 2025-05-19 22:49:05 +09:00
parent cea0887d90
commit 0aff527266
1 changed files with 3 additions and 5 deletions

View File

@ -451,7 +451,6 @@ export default {
async submit() { async submit() {
if (this.is_loading) return; if (this.is_loading) return;
this.is_loading = true this.is_loading = true
try { try {
@ -466,6 +465,7 @@ export default {
'endDate': this.point_policy.end_date 'endDate': this.point_policy.end_date
} }
const res = await api.createPointPolicyList(request) const res = await api.createPointPolicyList(request)
this.is_loading = false
if (res.status === 200 && res.data.success === true) { if (res.status === 200 && res.data.success === true) {
this.cancel() this.cancel()
@ -480,12 +480,11 @@ export default {
} catch (e) { } catch (e) {
this.notifyError("알 수 없는 오류가 발생했습니다. 다시 시도해 주세요.") this.notifyError("알 수 없는 오류가 발생했습니다. 다시 시도해 주세요.")
} }
this.is_loading = false
}, },
async modify() { async modify() {
if (this.is_loading) return; if (this.is_loading) return;
this.is_loading = true
try { try {
const request = {} const request = {}
@ -507,6 +506,7 @@ export default {
} }
const res = await api.updatePointPolicyList(this.selected_point_policy.id, request) const res = await api.updatePointPolicyList(this.selected_point_policy.id, request)
this.is_loading = false
if (res.status === 200 && res.data.success === true) { if (res.status === 200 && res.data.success === true) {
this.cancel() this.cancel()
@ -520,8 +520,6 @@ export default {
} catch (e) { } catch (e) {
this.notifyError("알 수 없는 오류가 발생했습니다. 다시 시도해 주세요.") this.notifyError("알 수 없는 오류가 발생했습니다. 다시 시도해 주세요.")
} }
this.is_loading = false
}, },
async getPointPolicyList() { async getPointPolicyList() {