Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weโ€™ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

๐Ÿ”€ :: [#384] ์œ ๊ด€๊ธฐ๊ด€ ๊ธฐ๋Šฅ ์ถ”๊ฐ€ #385

Merged
merged 4 commits into from
Jul 24, 2024
12 changes: 4 additions & 8 deletions App/Sources/Application/DI/AppComponent.swift
Original file line number Diff line number Diff line change
Expand Up @@ -179,19 +179,15 @@ public extension AppComponent {
SchoolListComponent(parent: self)
}

var companyListFactory: any CompanyListFactory {
CompanyListComponent(parent: self)
var organizationListFactory: any OrganizationListFactory {
OrganizationListComponent(parent: self)
}

var universityListFactory: any UniversityListFactory {
UniversityListComponent(parent: self)
}

var governmentListFactory: any GovernmentListFactory {
GovernmentListComponent(parent: self)
}

var inputCompanyFactory: any InputCompanyFactory {
InputCompanyComponent(parent: self)
var inputOrganizationFactory: any InputOrganizationFactory {
InputOrganizationComponent(parent: self)
}
}
136 changes: 63 additions & 73 deletions App/Sources/Application/NeedleGenerated.swift

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import Foundation

public enum OrganizationType: String {
case company = "๊ธฐ์—…"
case government = "์œ ๊ด€๊ธฐ๊ด€"
}

extension OrganizationType {
func display() -> String {
switch self {
case .company: return "๊ธฐ์—…"
case .government: return "๊ธฐ๊ด€"
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,8 @@ public protocol AdminRootDependency: Dependency {
var requestUserSignupFactory: any RequestUserSignupFactory { get }
var withdrawUserListFactory: any WithdrawUserListFactory { get }
var schoolListFactory: any SchoolListFactory { get }
var companyListFactory: any CompanyListFactory { get }
var organizationListFactory: any OrganizationListFactory { get }
var universityListFactory: any UniversityListFactory { get }
var governmentListFactory: any GovernmentListFactory { get }
}

public final class AdminRootComponent: Component<AdminRootDependency>, AdminRootFactory {
Expand All @@ -18,9 +17,8 @@ public final class AdminRootComponent: Component<AdminRootDependency>, AdminRoot
requestUserSignupFactory: dependency.requestUserSignupFactory,
withdrawUserListFactory: dependency.withdrawUserListFactory,
schoolListFactory: dependency.schoolListFactory,
companyListFactory: dependency.companyListFactory,
universityListFactory: dependency.universityListFactory,
governmentListFactory: dependency.governmentListFactory
organizationListFactory: dependency.organizationListFactory,
universityListFactory: dependency.universityListFactory
)
}
}
15 changes: 6 additions & 9 deletions App/Sources/Feature/AdminBaseFeature/Source/AdminRootView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,26 +7,23 @@ struct AdminRootView: View {
private let requestUserSignupFactory: any RequestUserSignupFactory
private let withdrawUserListFactory: any WithdrawUserListFactory
private let schoolListFactory: any SchoolListFactory
private let companyListFactory: any CompanyListFactory
private let organizationListFactory: any OrganizationListFactory
private let universityListFactory: any UniversityListFactory
private let governmentListFactory: any GovernmentListFactory

public init(
userListFactory: any UserListFactory,
requestUserSignupFactory: any RequestUserSignupFactory,
withdrawUserListFactory: any WithdrawUserListFactory,
schoolListFactory: any SchoolListFactory,
companyListFactory: any CompanyListFactory,
universityListFactory: any UniversityListFactory,
governmentListFactory: any GovernmentListFactory
organizationListFactory: any OrganizationListFactory,
universityListFactory: any UniversityListFactory
) {
self.userListFactory = userListFactory
self.requestUserSignupFactory = requestUserSignupFactory
self.withdrawUserListFactory = withdrawUserListFactory
self.schoolListFactory = schoolListFactory
self.companyListFactory = companyListFactory
self.organizationListFactory = organizationListFactory
self.universityListFactory = universityListFactory
self.governmentListFactory = governmentListFactory
}

var body: some View {
Expand All @@ -53,7 +50,7 @@ struct AdminRootView: View {
.environmentObject(adminPageState)

case .company:
companyListFactory.makeView()
organizationListFactory.makeView(type: .company, selectedPage: .company)
.eraseToAnyView()
.environmentObject(adminPageState)

Expand All @@ -63,7 +60,7 @@ struct AdminRootView: View {
.environmentObject(adminPageState)

case .government:
governmentListFactory.makeView()
organizationListFactory.makeView(type: .government, selectedPage: .government)
.eraseToAnyView()
.environmentObject(adminPageState)
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import SwiftUI
import Service
import SwiftUI

public struct FieldBottomSheet: View {
let fieldList: [FieldType] = FieldType.allCases
Expand Down Expand Up @@ -34,7 +34,7 @@ public struct FieldBottomSheet: View {
)

Spacer()

BitgouelRadioButton(isSelected: isSelected)
}
.padding(.vertical, 24)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import SwiftUI
import Service
import SwiftUI

public struct InputDataView: View {
let epic: String
Expand All @@ -8,7 +8,7 @@ public struct InputDataView: View {
@Binding var name: String
@State var isShowingFieldBottomSheet: Bool = false
let finalButtonAction: () -> Void

public init(
epic: String,
state: String,
Expand All @@ -24,15 +24,15 @@ public struct InputDataView: View {
self.isShowingFieldBottomSheet = isShowingFieldBottomSheet
self.finalButtonAction = finalButtonAction
}

public var body: some View {
VStack(alignment: .leading) {
VStack(spacing: 0) {
BitgouelTextField(
"\(epic) ์ด๋ฆ„ ์ž…๋ ฅ",
text: $name
)

PickerTextField(
"๋ถ„์•ผ ์„ ํƒ",
text: selectedField?.display() ?? ""
Expand All @@ -41,7 +41,7 @@ public struct InputDataView: View {
}
}
.padding(.top, 32)

Spacer()
}
.navigationTitle("\(epic) \(state)")
Expand All @@ -58,7 +58,7 @@ public struct InputDataView: View {
}
}
}

@ViewBuilder
func finalButton() -> some View {
if state == "์ˆ˜์ •" {
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Loading
Loading