
--- client/views/pages/main/Dashboard.vue
+++ client/views/pages/main/Dashboard.vue
... | ... | @@ -1,6 +1,7 @@ |
1 | 1 |
<template> |
2 | 2 |
<p class="title1" v-if="state === 'finish'">오늘 공부를 다했어요! 너무 고생했어요!</p> |
3 | 3 |
<p class="title1" v-else-if="state === 'notRegistered'">지금은 학습 루트가 등록이 안됐어요! 학습 일정에서 학습루트를 등록해볼까요?</p> |
4 |
+ <p class="title1" v-else-if="state === 'noProblem'">교재에 등록된 문제가 없습니다.</p> |
|
4 | 5 |
<div v-else class="main"> |
5 | 6 |
<div class="race-wrap"> |
6 | 7 |
<div class="title-box"> |
... | ... | @@ -155,8 +156,8 @@ |
155 | 156 |
</div> |
156 | 157 |
</div> |
157 | 158 |
</div> |
158 |
- <!-- 카메라 모달 --> |
|
159 |
- <article v-show="showCameraModal" class="popup-wrap"> |
|
159 |
+ <!-- 카메라 모달 --> |
|
160 |
+ <article v-show="showCameraModal" class="popup-wrap"> |
|
160 | 161 |
<div class="popup-box" style="top: 500px; left:500px"> |
161 | 162 |
<div class="flex mb10 justify-between"> |
162 | 163 |
<p class="popup-title">사진 촬영</p> |
... | ... | @@ -341,9 +342,6 @@ |
341 | 342 |
topLeft: { x: 0, y: 0 }, |
342 | 343 |
bottomRight: { x: 0, y: 0 } |
343 | 344 |
}, |
344 |
- |
|
345 |
- |
|
346 |
- roadViewTF: false, |
|
347 | 345 |
roadmapData: [], |
348 | 346 |
|
349 | 347 |
schedules: [], |
... | ... | @@ -384,9 +382,9 @@ |
384 | 382 |
} |
385 | 383 |
console.log(this.state); |
386 | 384 |
}) |
387 |
- .catch(error => { |
|
388 |
- console.error("Error fetching roadmap data:", error); |
|
389 |
- }); |
|
385 |
+ .catch(error => { |
|
386 |
+ console.error("Error fetching roadmap data:", error); |
|
387 |
+ }); |
|
390 | 388 |
}, |
391 | 389 |
finishSchedule() { |
392 | 390 |
axios({ |
... | ... | @@ -400,20 +398,20 @@ |
400 | 398 |
finish: "T" |
401 | 399 |
} |
402 | 400 |
}) |
403 |
- .then(response => { |
|
404 |
- const nextSchedule = this.schedules.find(schedule => schedule.schdl_id > this.nowSchedule.schdl_id); |
|
405 |
- alert("학습을 완료했습니다!"); |
|
406 |
- if (nextSchedule) { |
|
407 |
- this.nowSchedule = nextSchedule; |
|
408 |
- this.$router.push({ name: 'Dashboard' }); |
|
409 |
- } else { |
|
410 |
- window.location.reload(); |
|
411 |
- alert("모든 학습을 완료했습니다!"); |
|
412 |
- } |
|
413 |
- }) |
|
414 |
- .catch(error => { |
|
415 |
- console.error("Error updating schedule:", error); |
|
416 |
- }); |
|
401 |
+ .then(response => { |
|
402 |
+ const nextSchedule = this.schedules.find(schedule => schedule.schdl_id > this.nowSchedule.schdl_id); |
|
403 |
+ alert("학습을 완료했습니다!"); |
|
404 |
+ window.location.reload(); |
|
405 |
+ if (nextSchedule) { |
|
406 |
+ this.nowSchedule = nextSchedule; |
|
407 |
+ this.$router.push({ name: 'Dashboard' }); |
|
408 |
+ } else { |
|
409 |
+ alert("모든 학습을 완료했습니다!"); |
|
410 |
+ } |
|
411 |
+ }) |
|
412 |
+ .catch(error => { |
|
413 |
+ console.error("Error updating schedule:", error); |
|
414 |
+ }); |
|
417 | 415 |
}, |
418 | 416 |
|
419 | 417 |
fetchRoadmapData() { |
... | ... | @@ -428,13 +426,17 @@ |
428 | 426 |
book_id: this.schedules[0].book_id |
429 | 427 |
} |
430 | 428 |
}) |
431 |
- .then(response => { |
|
432 |
- this.roadmapData = response.data; |
|
433 |
- this.roadViewTF = this.roadmapData.length > 0; |
|
434 |
- }) |
|
435 |
- .catch(error => { |
|
436 |
- console.error("Error fetching roadmap data:", error); |
|
437 |
- }); |
|
429 |
+ .then(response => { |
|
430 |
+ if (response.data.length != 0) { |
|
431 |
+ this.roadmapData = response.data; |
|
432 |
+ } else { |
|
433 |
+ this.state = "noProblem" |
|
434 |
+ } |
|
435 |
+ }) |
|
436 |
+ .catch(error => { |
|
437 |
+ this.state = "noProblem" |
|
438 |
+ console.error("Error fetching roadmap data:", error); |
|
439 |
+ }); |
|
438 | 440 |
}, |
439 | 441 |
toggleImage(index) { |
440 | 442 |
this.items[index].isSecondImageVisible = !this.items[index].isSecondImageVisible; |
... | ... | @@ -871,6 +873,7 @@ |
871 | 873 |
align-items: center; |
872 | 874 |
z-index: 100; |
873 | 875 |
} |
876 |
+ |
|
874 | 877 |
video { |
875 | 878 |
width: 100%; |
876 | 879 |
height: auto; |
... | ... | @@ -885,6 +888,7 @@ |
885 | 888 |
background-color: #FFF3D7; |
886 | 889 |
cursor: not-allowed; |
887 | 890 |
} |
891 |
+ |
|
888 | 892 |
.sticker { |
889 | 893 |
position: absolute; |
890 | 894 |
cursor: move; |
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?