오디션 지원
- 본인인증이 되지 않은 계정이 오디션을 지원하려고 하면 본인인증 안내 팝업 표시 - 재지원시 재지원 안내 팝업 표시
This commit is contained in:
parent
6c0ea9595c
commit
df9395cdef
|
@ -19,7 +19,9 @@ struct AuditionRoleDetailView: View {
|
||||||
@State private var isShowApplyMethodView = false
|
@State private var isShowApplyMethodView = false
|
||||||
@State private var isShowSelectAudioView = false
|
@State private var isShowSelectAudioView = false
|
||||||
@State private var isShowRecordingView = false
|
@State private var isShowRecordingView = false
|
||||||
|
@State private var isShowNoticeAuthView = false
|
||||||
@State private var isShowApplyView = false
|
@State private var isShowApplyView = false
|
||||||
|
@State private var isShowNoticeReapply = false
|
||||||
|
|
||||||
var body: some View {
|
var body: some View {
|
||||||
BaseView(isLoading: $viewModel.isLoading) {
|
BaseView(isLoading: $viewModel.isLoading) {
|
||||||
|
@ -194,7 +196,15 @@ struct AuditionRoleDetailView: View {
|
||||||
.padding(.trailing, 19)
|
.padding(.trailing, 19)
|
||||||
.padding(.bottom, 19)
|
.padding(.bottom, 19)
|
||||||
.onTapGesture {
|
.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 {
|
if viewModel.isShowSodaDialog {
|
||||||
SodaDialog(
|
SodaDialog(
|
||||||
title: viewModel.dialogTitle,
|
title: viewModel.dialogTitle,
|
||||||
|
|
|
@ -36,6 +36,7 @@ final class AuditionRoleDetailViewModel: ObservableObject {
|
||||||
|
|
||||||
@Published var isShowNotifyVote = true
|
@Published var isShowNotifyVote = true
|
||||||
@Published var isShowSodaDialog = false
|
@Published var isShowSodaDialog = false
|
||||||
|
@Published var isShowNoticeReapply = false
|
||||||
@Published var dialogTitle = ""
|
@Published var dialogTitle = ""
|
||||||
@Published var dialogDesc = ""
|
@Published var dialogDesc = ""
|
||||||
|
|
||||||
|
@ -86,6 +87,7 @@ final class AuditionRoleDetailViewModel: ObservableObject {
|
||||||
let roleDetailDecoded = try jsonDecoder.decode(ApiResponse<GetAuditionRoleDetailResponse>.self, from: roleDetail)
|
let roleDetailDecoded = try jsonDecoder.decode(ApiResponse<GetAuditionRoleDetailResponse>.self, from: roleDetail)
|
||||||
if let data = roleDetailDecoded.data, roleDetailDecoded.success {
|
if let data = roleDetailDecoded.data, roleDetailDecoded.success {
|
||||||
self.name = data.name
|
self.name = data.name
|
||||||
|
self.isShowNoticeReapply = data.isAlreadyApplicant
|
||||||
self.auditionRoleDetail = data
|
self.auditionRoleDetail = data
|
||||||
} else {
|
} else {
|
||||||
if let message = roleDetailDecoded.message {
|
if let message = roleDetailDecoded.message {
|
||||||
|
|
Loading…
Reference in New Issue