diff --git a/src/api/audition.js b/src/api/audition.js
index 7df4cd2..d9b850a 100644
--- a/src/api/audition.js
+++ b/src/api/audition.js
@@ -48,7 +48,12 @@ async function getAuditionApplicantList(id, page) {
return Vue.axios.get("/admin/audition/role/" + id + "/applicant?page=" + (page - 1) + "&size=20");
}
+async function deleteAuditionApplicant(id) {
+ return Vue.axios.delete("/admin/audition/applicant/" + id);
+}
+
export {
getAuditionList, createAudition, updateAudition, getAuditionDetail,
- createAuditionRole, updateAuditionRole, getAuditionRoleDetail, getAuditionApplicantList
+ createAuditionRole, updateAuditionRole, getAuditionRoleDetail, getAuditionApplicantList,
+ deleteAuditionApplicant
}
diff --git a/src/views/Audition/AuditionRoleDetailView.vue b/src/views/Audition/AuditionRoleDetailView.vue
index 94d5997..2739429 100644
--- a/src/views/Audition/AuditionRoleDetailView.vue
+++ b/src/views/Audition/AuditionRoleDetailView.vue
@@ -63,6 +63,9 @@
추천수
|
+
+ 관리
+ |
@@ -95,6 +98,14 @@
/>
{{ item.voteCount }} |
+
+
+ 삭제
+
+ |
@@ -114,6 +125,36 @@
+
+
+
+
+
+ "{{ selected_audition_role_applicant.nickname }}"님의 오디션지원을 취소하시겠습니까?
+
+
+
+
+ 취소
+
+
+ 확인
+
+
+
+
@@ -138,6 +179,9 @@ export default {
audition_role_detail: {},
audition_role_applicant_list: [],
+ selected_audition_role_applicant: {},
+ show_delete_confirm_dialog: false,
+
page: 1,
total_page: 0,
}
@@ -164,6 +208,16 @@ export default {
this.$dialog.notify.success(message)
},
+ deleteConfirm(item) {
+ this.selected_audition_role_applicant = item
+ this.show_delete_confirm_dialog = true
+ },
+
+ deleteCancel() {
+ this.selected_audition_role_applicant = {}
+ this.show_delete_confirm_dialog = false
+ },
+
isValidUrl(string) {
try {
new URL(string); // URL 생성 시 예외가 발생하면 유효하지 않은 URL
@@ -236,6 +290,29 @@ export default {
async next() {
await this.getAuditionRoleApplicant()
},
+
+ async deleteAuditionApplicant() {
+ if (this.is_loading) return;
+ this.is_loading = true
+
+ try {
+ const res = await api.deleteAuditionApplicant(this.selected_audition_role_applicant.applicantId)
+ if (res.status === 200 && res.data.success === true) {
+ this.show_delete_confirm_dialog = false
+ this.notifySuccess(res.data.message || '오디션 지원이 취소 되었습니다.')
+
+ this.audition_role_applicant_list = []
+ this.page = 1
+ await this.getAuditionRoleApplicant()
+ } else {
+ this.notifyError(res.data.message || '알 수 없는 오류가 발생했습니다. 다시 시도해 주세요.')
+ }
+ } catch (e) {
+ this.notifyError('알 수 없는 오류가 발생했습니다. 다시 시도해 주세요.')
+ } finally {
+ this.is_loading = false
+ }
+ },
}
}