From dd0bcd323b97dc244c43cbd53bf959d227c171d7 Mon Sep 17 00:00:00 2001 From: Yu Sung Date: Wed, 27 Mar 2024 19:21:06 +0900 Subject: [PATCH] =?UTF-8?q?=EC=BD=98=ED=85=90=EC=B8=A0=20=ED=95=9C?= =?UTF-8?q?=EC=A0=95=ED=8C=90=20=EB=93=B1=EB=A1=9D=20=EA=B8=B0=EB=8A=A5=20?= =?UTF-8?q?=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/Content/ContentList.vue | 57 +++++++++++++++++++++++++++++-- 1 file changed, 55 insertions(+), 2 deletions(-) diff --git a/src/views/Content/ContentList.vue b/src/views/Content/ContentList.vue index 657edf8..f97872d 100644 --- a/src/views/Content/ContentList.vue +++ b/src/views/Content/ContentList.vue @@ -371,7 +371,7 @@ - + 예약 공개 @@ -469,6 +469,39 @@ + + + 한정판 + + + + + + + + 판매할 콘텐츠 개수 + + + + + + + 대여만 가능 @@ -603,6 +636,7 @@ export default { return { is_loading: false, is_active_reservation: false, + is_limited_edition: false, reservation_date: '', reservation_time: '', show_create_dialog: false, @@ -677,6 +711,7 @@ export default { this.reservation_time = '' this.reservation_time = '' this.is_active_reservation = false + this.is_limited_edition = false this.show_create_dialog = false this.show_modify_dialog = false this.show_delete_confirm_dialog = false @@ -755,6 +790,16 @@ export default { return } + if (this.is_limited_edition === true) { + if (isNaN(parseInt(this.audio_content.limited))) { + this.notifyError("한정판 개수는 숫자만 입력가능합니다.") + return + } else if (this.audio_content.limited < 1) { + this.notifyError("한정판 개수를 1 이상 입력해 주세요.") + return + } + } + if (this.is_loading) return; this.is_loading = true @@ -773,7 +818,15 @@ export default { isCommentAvailable: this.audio_content.is_comment_available } - if (this.is_active_reservation === true) { + if (this.audio_content.limited > 0) { + request.isOnlyRental = false + } + + if (this.audio_content.price > 0 && this.is_limited_edition === true) { + request.limited = this.audio_content.limited + } + + if (this.is_limited_edition === false && this.is_active_reservation === true) { if (this.reservation_date.trim() === '' || this.reservation_time.trim() === '') { this.notifyError("오픈 예정 날짜와 시간을 선택해 주세요.") this.is_loading = false