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 {