🗑️ Remove unused Code
This commit is contained in:
@@ -12,7 +12,7 @@ struct AlloVoisinsSwiftUIApp: App {
|
|||||||
var body: some Scene {
|
var body: some Scene {
|
||||||
WindowGroup {
|
WindowGroup {
|
||||||
NavigationStack {
|
NavigationStack {
|
||||||
ResiliationNavigationView(resiliationType: .apProWithTrial)
|
ResiliationNavigationScreen(resiliationType: .apProWithTrial)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,23 @@
|
|||||||
|
//
|
||||||
|
// ResiliationNavigationScreen.swift
|
||||||
|
// AlloVoisinsSwiftUI
|
||||||
|
//
|
||||||
|
// Created by Victor on 14/10/2024.
|
||||||
|
//
|
||||||
|
|
||||||
|
import SwiftUI
|
||||||
|
|
||||||
|
struct ResiliationNavigationScreen: View {
|
||||||
|
@StateObject private var viewModel: ResiliationViewModel
|
||||||
|
|
||||||
|
init(resiliationType: ResiliationType) {
|
||||||
|
self._viewModel = StateObject(wrappedValue: ResiliationViewModel(resiliationType: resiliationType))
|
||||||
|
}
|
||||||
|
|
||||||
|
var body: some View {
|
||||||
|
NavigationStack {
|
||||||
|
ResiliationCheckStepsScreen(viewModel: viewModel)
|
||||||
|
.navigationBarTitle("Résiliation", displayMode: .inline)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,47 +0,0 @@
|
|||||||
//
|
|
||||||
// ResiliationNavigationView.swift
|
|
||||||
// AlloVoisinsSwiftUI
|
|
||||||
//
|
|
||||||
// Created by Victor on 14/10/2024.
|
|
||||||
//
|
|
||||||
|
|
||||||
// import SwiftUI
|
|
||||||
//
|
|
||||||
// struct ResiliationProcess: View {
|
|
||||||
// @StateObject var viewModel = ResiliationViewModel(resiliationType: .apPart)
|
|
||||||
// @StateObject var coordinator: ResiliationNavigationCoordinator
|
|
||||||
//
|
|
||||||
// init() {
|
|
||||||
// let vm = ResiliationViewModel(resiliationType: .apPart)
|
|
||||||
// self._viewModel = StateObject(wrappedValue: vm)
|
|
||||||
// self._coordinator = StateObject(wrappedValue: ResiliationNavigationCoordinator(viewModel: vm))
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// var body: some View {
|
|
||||||
// ResiliationNavigationView(coordinator: coordinator, viewModel: viewModel)
|
|
||||||
// .onAppear {
|
|
||||||
// coordinator.start()
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// #Preview {
|
|
||||||
// ResiliationProcess()
|
|
||||||
// }
|
|
||||||
|
|
||||||
import SwiftUI
|
|
||||||
|
|
||||||
struct ResiliationNavigationView: View {
|
|
||||||
@StateObject private var viewModel: ResiliationViewModel
|
|
||||||
|
|
||||||
init(resiliationType: ResiliationType) {
|
|
||||||
self._viewModel = StateObject(wrappedValue: ResiliationViewModel(resiliationType: resiliationType))
|
|
||||||
}
|
|
||||||
|
|
||||||
var body: some View {
|
|
||||||
NavigationStack {
|
|
||||||
ResiliationCheckStepsScreen(viewModel: viewModel)
|
|
||||||
.navigationBarTitle("Résiliation", displayMode: .inline)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
//
|
|
||||||
// ResiliationNavigationCoordinator.swift
|
|
||||||
// AlloVoisinsSwiftUI
|
|
||||||
//
|
|
||||||
// Created by Victor on 14/10/2024.
|
|
||||||
//
|
|
||||||
|
|
||||||
import SwiftUI
|
|
||||||
@@ -29,10 +29,6 @@ class ResiliationViewModel: ObservableObject {
|
|||||||
self.resiliationReasons = ResiliationReason.getRadioResiliation(for: resiliationType)
|
self.resiliationReasons = ResiliationReason.getRadioResiliation(for: resiliationType)
|
||||||
}
|
}
|
||||||
|
|
||||||
func moveToReason() {
|
|
||||||
currentScreen = .reason
|
|
||||||
}
|
|
||||||
|
|
||||||
func setSelectedReason(_ reason: ResiliationReason) {
|
func setSelectedReason(_ reason: ResiliationReason) {
|
||||||
selectedReason = reason
|
selectedReason = reason
|
||||||
promotionalScreens = selectResiliationPromotions(
|
promotionalScreens = selectResiliationPromotions(
|
||||||
@@ -94,39 +90,6 @@ class ResiliationViewModel: ObservableObject {
|
|||||||
return [.extendMyTrialPeriod, .profileCompletion, .allovoisinsPromotion]
|
return [.extendMyTrialPeriod, .profileCompletion, .allovoisinsPromotion]
|
||||||
}
|
}
|
||||||
|
|
||||||
private func getPromotionalScreen(for screen: ResiliationPromotionalScreen) -> any View {
|
|
||||||
switch screen {
|
|
||||||
case .externalReview:
|
|
||||||
break
|
|
||||||
case .webinarPresentation:
|
|
||||||
return WebinaireScreen()
|
|
||||||
case .profileCompletion:
|
|
||||||
return ProfileCompletionScreen()
|
|
||||||
case .editPerimeter:
|
|
||||||
return ResizePerimeterScreen()
|
|
||||||
case .onlyProSearches:
|
|
||||||
return OnlyProRequestsScreen()
|
|
||||||
case .oneMonthBoosterOffered:
|
|
||||||
return BoosterSubscriptionSelectionScreen()
|
|
||||||
case .allovoisinsPromotion:
|
|
||||||
return AlloVoisinReputationScreen()
|
|
||||||
case .extendMyTrialPeriod:
|
|
||||||
return MoreTimeScreen()
|
|
||||||
case .askPartProStatusChangeWithCancellation:
|
|
||||||
return StatusChangeScreen()
|
|
||||||
case .customerSupportForPro:
|
|
||||||
return PersonalizedSupportScreen()
|
|
||||||
case .customerSupportForPart:
|
|
||||||
return PersonalizedSupportScreen()
|
|
||||||
case .askPartProStatusChange:
|
|
||||||
return StatusChangeScreen()
|
|
||||||
case .ordersPresentation:
|
|
||||||
break
|
|
||||||
}
|
|
||||||
|
|
||||||
return EmptyView()
|
|
||||||
}
|
|
||||||
|
|
||||||
@ViewBuilder
|
@ViewBuilder
|
||||||
func getPromotionalScreenNew(for screen: ResiliationPromotionalScreen) -> some View {
|
func getPromotionalScreenNew(for screen: ResiliationPromotionalScreen) -> some View {
|
||||||
switch screen {
|
switch screen {
|
||||||
|
|||||||
Reference in New Issue
Block a user