--- client/views/pages/main/Dashboard.vue
+++ client/views/pages/main/Dashboard.vue
... | ... | @@ -432,20 +432,23 @@ |
432 | 432 |
finish: "T" |
433 | 433 |
} |
434 | 434 |
}) |
435 |
- .then(response => { |
|
436 |
- const nextSchedule = this.schedules.find(schedule => schedule.schdl_id > this.nowSchedule.schdl_id); |
|
437 |
- alert("학습을 완료했습니다!"); |
|
438 |
- window.location.reload(); |
|
439 |
- if (nextSchedule) { |
|
440 |
- this.nowSchedule = nextSchedule; |
|
441 |
- this.$router.push({ name: 'Dashboard' }); |
|
442 |
- } else { |
|
443 |
- alert("모든 학습을 완료했습니다!"); |
|
435 |
+ .then(response => { |
|
436 |
+ const nextSchedule = this.schedules.find(schedule => schedule.schdl_id > this.nowSchedule.schdl_id); |
|
437 |
+ alert("학습을 완료했습니다!"); |
|
438 |
+ |
|
439 |
+ if (nextSchedule) { |
|
440 |
+ this.nowSchedule = nextSchedule; |
|
441 |
+ this.fetchSchedule(nextSchedule.unit_id, nextSchedule.book_id); |
|
442 |
+ this.fetchRoadmapData(nextSchedule.unit_id, nextSchedule.book_id); |
|
443 |
+ this.$router.push({ name: 'Dashboard', query: { unit_id: nextSchedule.unit_id, book_id: nextSchedule.book_id } }); |
|
444 |
+ } else { |
|
445 |
+ alert("모든 학습을 완료했습니다!"); |
|
446 |
+ this.state = 'finish'; |
|
444 | 447 |
} |
445 | 448 |
}) |
446 |
- .catch(error => { |
|
447 |
- console.error("Error updating schedule:", error); |
|
448 |
- }); |
|
449 |
+ .catch(error => { |
|
450 |
+ console.error("Error updating schedule:", error); |
|
451 |
+ }); |
|
449 | 452 |
}, |
450 | 453 |
fetchRoadmapData(unit_id, book_id) { |
451 | 454 |
axios({ |
Add a comment
Delete comment
Once you delete this comment, you won't be able to recover it. Are you sure you want to delete this comment?