From df9395cdef952fc5ee76d1c28adaf229de4b3d08 Mon Sep 17 00:00:00 2001 From: Yu Sung Date: Wed, 8 Jan 2025 02:56:26 +0900 Subject: [PATCH] =?UTF-8?q?=EC=98=A4=EB=94=94=EC=85=98=20=EC=A7=80?= =?UTF-8?q?=EC=9B=90=20-=20=EB=B3=B8=EC=9D=B8=EC=9D=B8=EC=A6=9D=EC=9D=B4?= =?UTF-8?q?=20=EB=90=98=EC=A7=80=20=EC=95=8A=EC=9D=80=20=EA=B3=84=EC=A0=95?= =?UTF-8?q?=EC=9D=B4=20=EC=98=A4=EB=94=94=EC=85=98=EC=9D=84=20=EC=A7=80?= =?UTF-8?q?=EC=9B=90=ED=95=98=EB=A0=A4=EA=B3=A0=20=ED=95=98=EB=A9=B4=20?= =?UTF-8?q?=EB=B3=B8=EC=9D=B8=EC=9D=B8=EC=A6=9D=20=EC=95=88=EB=82=B4=20?= =?UTF-8?q?=ED=8C=9D=EC=97=85=20=ED=91=9C=EC=8B=9C=20-=20=EC=9E=AC?= =?UTF-8?q?=EC=A7=80=EC=9B=90=EC=8B=9C=20=EC=9E=AC=EC=A7=80=EC=9B=90=20?= =?UTF-8?q?=EC=95=88=EB=82=B4=20=ED=8C=9D=EC=97=85=20=ED=91=9C=EC=8B=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Role/AuditionRoleDetailView.swift | 33 ++++++++++++++++++- .../Role/AuditionRoleDetailViewModel.swift | 2 ++ 2 files changed, 34 insertions(+), 1 deletion(-) diff --git a/SodaLive/Sources/Audition/Role/AuditionRoleDetailView.swift b/SodaLive/Sources/Audition/Role/AuditionRoleDetailView.swift index 144f6ba..b5c58bf 100644 --- a/SodaLive/Sources/Audition/Role/AuditionRoleDetailView.swift +++ b/SodaLive/Sources/Audition/Role/AuditionRoleDetailView.swift @@ -19,7 +19,9 @@ struct AuditionRoleDetailView: View { @State private var isShowApplyMethodView = false @State private var isShowSelectAudioView = false @State private var isShowRecordingView = false + @State private var isShowNoticeAuthView = false @State private var isShowApplyView = false + @State private var isShowNoticeReapply = false var body: some View { BaseView(isLoading: $viewModel.isLoading) { @@ -194,7 +196,15 @@ struct AuditionRoleDetailView: View { .padding(.trailing, 19) .padding(.bottom, 19) .onTapGesture { - isShowApplyMethodView = true + if UserDefaults.bool(forKey: .auth) { + if viewModel.isShowNoticeReapply { + isShowNoticeReapply = true + } else { + isShowApplyMethodView = true + } + } else { + isShowNoticeAuthView = true + } } } } @@ -254,6 +264,27 @@ struct AuditionRoleDetailView: View { } } + if isShowNoticeReapply { + SodaDialog( + title: "재지원 안내", + desc: "재지원 시 이전 지원 내역은 삭제되며 받은 투표수는 무효 처리됩니다.", + confirmButtonTitle: "확인" + ) { + isShowNoticeReapply = false + isShowApplyMethodView = true + } + } + + if isShowNoticeAuthView { + SodaDialog( + title: "- 본인인증 -", + desc: "마이페이지에서 '본인인증'을 하고 다시 오디션에 지원해 주세요.", + confirmButtonTitle: "확인" + ) { + isShowNoticeAuthView = false + } + } + if viewModel.isShowSodaDialog { SodaDialog( title: viewModel.dialogTitle, diff --git a/SodaLive/Sources/Audition/Role/AuditionRoleDetailViewModel.swift b/SodaLive/Sources/Audition/Role/AuditionRoleDetailViewModel.swift index e3bda57..b711c35 100644 --- a/SodaLive/Sources/Audition/Role/AuditionRoleDetailViewModel.swift +++ b/SodaLive/Sources/Audition/Role/AuditionRoleDetailViewModel.swift @@ -36,6 +36,7 @@ final class AuditionRoleDetailViewModel: ObservableObject { @Published var isShowNotifyVote = true @Published var isShowSodaDialog = false + @Published var isShowNoticeReapply = false @Published var dialogTitle = "" @Published var dialogDesc = "" @@ -86,6 +87,7 @@ final class AuditionRoleDetailViewModel: ObservableObject { let roleDetailDecoded = try jsonDecoder.decode(ApiResponse.self, from: roleDetail) if let data = roleDetailDecoded.data, roleDetailDecoded.success { self.name = data.name + self.isShowNoticeReapply = data.isAlreadyApplicant self.auditionRoleDetail = data } else { if let message = roleDetailDecoded.message {