오디션 지원

- 본인인증이 되지 않은 계정이 오디션을 지원하려고 하면 본인인증 안내 팝업 표시
- 재지원시 재지원 안내 팝업 표시
This commit is contained in:
Yu Sung 2025-01-08 02:56:26 +09:00
parent 6c0ea9595c
commit df9395cdef
2 changed files with 34 additions and 1 deletions

View File

@ -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,

View File

@ -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<GetAuditionRoleDetailResponse>.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 {