
--- client/views/pages/main/MyPlan.vue
+++ client/views/pages/main/MyPlan.vue
... | ... | @@ -25,13 +25,18 @@ |
25 | 25 |
<p class="title2">{{ schedule.book_nm }}</p> |
26 | 26 |
<!-- <p class="title2">wirte a</p> --> |
27 | 27 |
</div> |
28 |
- <button v-if="schedule.finish=='T'" type="button" title="바로가기" class="yellow-btn" @click="goToPage('Dashboard')"> |
|
28 |
+ <button v-if="schedule.finish == 'T'" type="button" title="바로가기" class="yellow-btn" |
|
29 |
+ @click="goToPage('Dashboard')"> |
|
29 | 30 |
학습완료 |
30 | 31 |
</button> |
31 |
- <button v-else type="button" title="바로가기" class="yellow-btn" @click="goToPage('Dashboard')"> |
|
32 |
+ <button v-else type="button" title="바로가기" class="yellow-btn" |
|
33 |
+ @click="goToPage('Dashboard')"> |
|
32 | 34 |
바로가기 |
33 | 35 |
</button> |
34 | 36 |
<div><img src="../../../resources/img/img214_19s.png" alt=""></div> |
37 |
+ <button type="button" class="popup-close-btn" @click="deleteSchedule(schedule.schdl_id)"> |
|
38 |
+ <svg-icon type="mdi" :path="mdiWindowClose" class="close-btn"></svg-icon> |
|
39 |
+ </button> |
|
35 | 40 |
</div> |
36 | 41 |
</div> |
37 | 42 |
</div> |
... | ... | @@ -143,6 +148,20 @@ |
143 | 148 |
console.error("fetchUnits - error:", error); |
144 | 149 |
alert("단원 목록을 불러오는 중 오류가 발생했습니다."); |
145 | 150 |
}); |
151 |
+ }, deleteSchedule(scheduleId){ |
|
152 |
+ axios.post("/schedule/scheduleDelete.json", { scheduleId: scheduleId }, { |
|
153 |
+ headers: { |
|
154 |
+ "Content-Type": "application/json; charset=UTF-8", |
|
155 |
+ } |
|
156 |
+ }) |
|
157 |
+ .then(response => { |
|
158 |
+ alert("학습일정이 삭제되었습니다.") |
|
159 |
+ window.location.reload(); |
|
160 |
+ }) |
|
161 |
+ .catch(error => { |
|
162 |
+ console.error("fetchUnits - error:", error); |
|
163 |
+ alert("단원 목록을 불러오는 중 오류가 발생했습니다."); |
|
164 |
+ }); |
|
146 | 165 |
} |
147 | 166 |
}, |
148 | 167 |
watch: { |
--- client/views/pages/main/MyPlan2.vue
+++ client/views/pages/main/MyPlan2.vue
... | ... | @@ -273,8 +273,7 @@ |
273 | 273 |
}) |
274 | 274 |
.then(response => { |
275 | 275 |
const units = response.data.map(item => item.schdl_unit); |
276 |
- this.unitList.push(...units); |
|
277 |
- console.log(this.unitList) |
|
276 |
+ this.unitList.push(...units); |
|
278 | 277 |
}) |
279 | 278 |
.catch(error => { |
280 | 279 |
console.error("searchUnit - error: ", error); |
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?