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

๐Ÿ”€ :: FilterFeature ์ œ์ž‘ #221

Merged
merged 39 commits into from
Jul 5, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
b71e7c7
:sparkles: FilterFeature
kimsh153 May 30, 2023
25108c7
Merge branch 'master' of https://github.com/GSM-MSG/SMS-iOS into 150-โ€ฆ
kimsh153 May 30, 2023
b258495
:sparkles: FilterInterface ์„ธํŒ…
kimsh153 May 30, 2023
f18d481
:sparkles: Intent, Model ์ƒ์„ฑ
kimsh153 May 30, 2023
debdf19
:heavy_plus_sign: Dependency ์„ค์ •
kimsh153 May 30, 2023
23355b0
:sparkles: FilterView ์„ธํŒ…
kimsh153 May 30, 2023
8f77da9
:lipstick: Filter Root์ œ์ž‘
kimsh153 May 30, 2023
cb1ec44
Merge branch 'master' of https://github.com/GSM-MSG/SMS-iOS into 150-โ€ฆ
kimsh153 Jun 13, 2023
c77fb58
:sparkles: Filter์—ฐ๊ฒฐ
kimsh153 Jun 13, 2023
04ec5db
Merge branch 'master' of https://github.com/GSM-MSG/SMS-iOS into 150-โ€ฆ
kimsh153 Jun 13, 2023
2a0c412
:fire: Filter root
kimsh153 Jul 4, 2023
4a46a2d
:heavy_plus_sign: TechStackAppendBuilder
kimsh153 Jul 4, 2023
72a76a3
:sparkles: FilterTechStack Intent
kimsh153 Jul 4, 2023
b565f64
:sparkles: FilterTechStack model
kimsh153 Jul 4, 2023
a1b3c72
:lipstick: SliderView
kimsh153 Jul 4, 2023
889b77d
:lipstick: FilterView Publishing
kimsh153 Jul 4, 2023
60a23f3
:lipstick: Filter connection filter
kimsh153 Jul 4, 2023
3d05d56
Merge branch 'master' of https://github.com/GSM-MSG/SMS-iOS into 150-โ€ฆ
kimsh153 Jul 4, 2023
75ab22f
:recycle: ์ถฉ๋Œ ํ•ด๊ฒฐ
kimsh153 Jul 4, 2023
ef7ddb7
:sparkles: CaseIterable ์ถ”๊ฐ€
kimsh153 Jul 5, 2023
872813e
:sparkles: DisPlay ์ถ”๊ฐ€
kimsh153 Jul 5, 2023
3e3d6be
:lipstick: DataBinding ์ž‘์—… ๋
kimsh153 Jul 5, 2023
9e12df4
:lipstick: ์ˆ˜์ •๋œ slider ์ˆ˜์ •
kimsh153 Jul 5, 2023
649aa81
:sparkles: ๋ฐ์ดํ„ฐ ๋ฐ”์ธ๋”ฉ ์™„๋ฃŒ
kimsh153 Jul 5, 2023
15ad28c
:sparkles: ์ดˆ๊ธฐํ™” ๊ธฐ๋Šฅ ์ œ์ž‘
kimsh153 Jul 5, 2023
d01a8cd
:sparkles: Filter ํ™•์ธ ์—ฐ๊ฒฐ
kimsh153 Jul 5, 2023
200a611
:sparkles: Filter To Main Data connectio
kimsh153 Jul 5, 2023
9213c09
:memo: API ๋ช…์„ธ์„œ ์ˆ˜์ •๋œ ์‚ฌํ•ญ ๋ฐ˜์˜
kimsh153 Jul 5, 2023
4f12668
:fire: ์ฃผ์„ ์ง€์šฐ๊ธฐ
kimsh153 Jul 5, 2023
16259eb
:fire: ์•ˆ ์“ฐ๋Š” ์ฝ”๋“œ ์ง€์šฐ๊ธฐ
kimsh153 Jul 5, 2023
0266a02
:recycle: 5.9 ๋ฌธ๋ฒ• ๋‹ค์šด๊ทธ๋ ˆ์ด๋“œ
kimsh153 Jul 5, 2023
93a40c7
Update Projects/Feature/MainFeature/Sources/Model/FilterOption.swift
kimsh153 Jul 5, 2023
81065ff
Update Projects/Feature/MainFeature/Sources/Scene/MainView.swift
kimsh153 Jul 5, 2023
7293a26
:recycle: Comment ์ˆ˜์ •
kimsh153 Jul 5, 2023
62fb164
:recycle: Comment๋ฐ˜์˜
kimsh153 Jul 5, 2023
e980526
:recycle: ์ฝ”๋งจํŠธ ๋ฐ˜์˜
kimsh153 Jul 5, 2023
a6262ff
:recycle: Code Style ๋งž์ถ”๊ธฐ
kimsh153 Jul 5, 2023
e10dfa6
:recycle: == ์‹œ๋„ํ•œ ํ…Œ์ŠคํŠธ ์ˆ˜์ •
kimsh153 Jul 5, 2023
c5313da
:recycle: ์ฝ”๋“œ ์ปจ๋ฐด์…˜ ๋งž์ถ”๊ธฐ
kimsh153 Jul 5, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,18 @@ public extension TargetDependency.Feature {
target: ModulePaths.Feature.StudentDetailFeature.targetName(type: .sources),
path: .relativeToFeature(ModulePaths.Feature.StudentDetailFeature.rawValue)
)
static let FilterFeatureTesting = TargetDependency.project(
target: ModulePaths.Feature.FilterFeature.targetName(type: .testing),
path: .relativeToFeature(ModulePaths.Feature.FilterFeature.rawValue)
)
static let FilterFeatureInterface = TargetDependency.project(
target: ModulePaths.Feature.FilterFeature.targetName(type: .interface),
path: .relativeToFeature(ModulePaths.Feature.FilterFeature.rawValue)
)
static let FilterFeature = TargetDependency.project(
target: ModulePaths.Feature.FilterFeature.targetName(type: .sources),
path: .relativeToFeature(ModulePaths.Feature.FilterFeature.rawValue)
)
static let InputInformationBaseFeature = TargetDependency.project(
target: ModulePaths.Feature.InputInformationBaseFeature.targetName(type: .sources),
path: .relativeToFeature(ModulePaths.Feature.InputInformationBaseFeature.rawValue)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ public extension ModulePaths {
case MainFeature
case TechStackAppendFeature
case StudentDetailFeature
case FilterFeature
case InputInformationBaseFeature
case RootFeature
case InputLanguageInfoFeature
Expand Down
1 change: 1 addition & 0 deletions Projects/App/Project.swift
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ let targets: [Target] = [
.Feature.SplashFeature,
.Feature.TechStackAppendFeature,
.Feature.StudentDetailFeature,
.Feature.FilterFeature,
.Domain.AuthDomain,
.Domain.StudentDomain,
.Domain.FileDomain,
Expand Down
7 changes: 6 additions & 1 deletion Projects/App/Sources/Application/DI/AppComponent.swift
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ import InputSchoolLifeInfoFeature
import InputSchoolLifeInfoFeatureInterface
import InputWorkInfoFeature
import InputWorkInfoFeatureInterface
import FilterFeature
import FilterFeatureInterface
import JwtStore
import JwtStoreInterface
import KeychainModule
Expand All @@ -27,7 +29,6 @@ import MajorDomain
import MajorDomainInterface
import NeedleFoundation
import RootFeature
import RootFeature
import SigninFeature
import SigninFeatureInterface
import SplashFeature
Expand Down Expand Up @@ -97,6 +98,10 @@ final class AppComponent: BootstrapComponent {
StudentDetailComponent(parent: self)
}

var filterBuildable: any FilterBuildable {
FilterComponent(parent: self)
}

var splashBuildable: any SplashBuildable {
SplashComponent(parent: self)
}
Expand Down
31 changes: 30 additions & 1 deletion Projects/App/Sources/Application/NeedleGenerated.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ import BaseDomain
import BaseFeature
import FileDomain
import FileDomainInterface
import FilterFeature
import FilterFeatureInterface
import Foundation
import InputCertificateInfoFeature
import InputCertificateInfoFeatureInterface
Expand Down Expand Up @@ -104,6 +106,9 @@ private class MainDependency7c6a5b4738b211b8e155Provider: MainDependency {
var authDomainBuildable: any AuthDomainBuildable {
return appComponent.authDomainBuildable
}
var filterBuildable: any FilterBuildable {
return appComponent.filterBuildable
}
var studentDetailBuildable: any StudentDetailBuildable {
return appComponent.studentDetailBuildable
}
Expand All @@ -130,6 +135,22 @@ private class InputSchoolLifeInfoDependency30edf0903f9bdb7a60fbProvider: InputSc
private func factorydc1feebed8f042db375fe3b0c44298fc1c149afb(_ component: NeedleFoundation.Scope) -> AnyObject {
return InputSchoolLifeInfoDependency30edf0903f9bdb7a60fbProvider()
}
private class FilterDependencya3adf5d0affb84ca15efProvider: FilterDependency {
var techStackAppendBuildable: any TechStackAppendBuildable {
return appComponent.techStackAppendBuildable
}
var majorDomainBuildable: any MajorDomainBuildable {
return appComponent.majorDomainBuildable
}
private let appComponent: AppComponent
init(appComponent: AppComponent) {
self.appComponent = appComponent
}
}
/// ^->AppComponent->FilterComponent
private func factoryf50b858bcdf190c46b17f47b58f8f304c97af4d5(_ component: NeedleFoundation.Scope) -> AnyObject {
return FilterDependencya3adf5d0affb84ca15efProvider(appComponent: parent1(component) as! AppComponent)
}
private class RootDependency3944cc797a4a88956fb5Provider: RootDependency {
var signinBuildable: any SigninBuildable {
return appComponent.signinBuildable
Expand Down Expand Up @@ -388,6 +409,7 @@ extension MainComponent: Registration {
public func registerItems() {
keyPathToName[\MainDependency.studentDomainBuildable] = "studentDomainBuildable-any StudentDomainBuildable"
keyPathToName[\MainDependency.authDomainBuildable] = "authDomainBuildable-any AuthDomainBuildable"
keyPathToName[\MainDependency.filterBuildable] = "filterBuildable-any FilterBuildable"
keyPathToName[\MainDependency.studentDetailBuildable] = "studentDetailBuildable-any StudentDetailBuildable"
keyPathToName[\MainDependency.userDomainBuildable] = "userDomainBuildable-any UserDomainBuildable"
}
Expand All @@ -397,6 +419,12 @@ extension InputSchoolLifeInfoComponent: Registration {

}
}
extension FilterComponent: Registration {
public func registerItems() {
keyPathToName[\FilterDependency.techStackAppendBuildable] = "techStackAppendBuildable-any TechStackAppendBuildable"
keyPathToName[\FilterDependency.majorDomainBuildable] = "majorDomainBuildable-any MajorDomainBuildable"
}
}
extension RootComponent: Registration {
public func registerItems() {
keyPathToName[\RootDependency.signinBuildable] = "signinBuildable-any SigninBuildable"
Expand Down Expand Up @@ -500,14 +528,15 @@ private func registerProviderFactory(_ componentPath: String, _ factory: @escapi

#if !NEEDLE_DYNAMIC

@inline(never) private func register1() {
private func register1() {
registerProviderFactory("^->AppComponent->JwtStoreComponent", factoryb27d5aae1eb7e73575a6f47b58f8f304c97af4d5)
registerProviderFactory("^->AppComponent", factoryEmptyDependencyProvider)
registerProviderFactory("^->AppComponent->KeychainComponent", factoryEmptyDependencyProvider)
registerProviderFactory("^->AppComponent->SplashComponent", factoryace9f05f51d68f4c0677f47b58f8f304c97af4d5)
registerProviderFactory("^->AppComponent->InputWorkInfoComponent", factoryfff86bd7854b30412216e3b0c44298fc1c149afb)
registerProviderFactory("^->AppComponent->MainComponent", factoryc9274e46e78e70f29c54f47b58f8f304c97af4d5)
registerProviderFactory("^->AppComponent->InputSchoolLifeInfoComponent", factorydc1feebed8f042db375fe3b0c44298fc1c149afb)
registerProviderFactory("^->AppComponent->FilterComponent", factoryf50b858bcdf190c46b17f47b58f8f304c97af4d5)
registerProviderFactory("^->AppComponent->RootComponent", factory264bfc4d4cb6b0629b40f47b58f8f304c97af4d5)
registerProviderFactory("^->AppComponent->SigninComponent", factory2882a056d84a613debccf47b58f8f304c97af4d5)
registerProviderFactory("^->AppComponent->InputMilitaryInfoComponent", factory6e35522c47cca1190471e3b0c44298fc1c149afb)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ public struct FetchStudentListRequestDTO: Encodable {
public let size: Int
public let majors: [String]?
public let techStacks: [String]?
public let grade: Int?
public let classNum: Int?
public let grade: [Int]?
public let classNum: [Int]?
public let department: [String]?
public let stuNumSort: SortType?
public let formOfEmployment: [String]?
Expand All @@ -22,8 +22,8 @@ public struct FetchStudentListRequestDTO: Encodable {
size: Int,
majors: [String]? = nil,
techStacks: [String]? = nil,
grade: Int? = nil,
classNum: Int? = nil,
grade: [Int]? = nil,
classNum: [Int]? = nil,
department: [String]? = nil,
stuNumSort: SortType? = nil,
formOfEmployment: [String]? = nil,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import Foundation

// swiftlint: disable identifier_name
public enum DepartmentType: String, Codable {
public enum DepartmentType: String, Codable, CaseIterable {
case software = "SW_DEVELOPMENT"
case smartIoT = "SMART_IOT_DEVELOPMENT"
case ai = "AI_DEVELOPMENT"
Expand Down
15 changes: 14 additions & 1 deletion Projects/Domain/StudentDomain/Interface/Enums/SortType.swift
Original file line number Diff line number Diff line change
@@ -1,6 +1,19 @@
import Foundation

public enum SortType: String, Codable {
public enum SortType: String, Codable, CaseIterable {
case asc = "ASCENDING"
case desc = "DESCENDING"
}

public extension SortType {
var display: String {
switch self {
case .asc:
return "์˜ค๋ฆ„์ฐจ์ˆœ"

case .desc:
return "๋‚ด๋ฆผ์ฐจ์ˆœ"
}
}
}

Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import SwiftUI

public protocol FilterBuildable {
associatedtype ViewType: View
func makeView(delegate: FilterDelegate) -> ViewType
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
public protocol FilterDelegate: AnyObject {
func filterDidCompleted(filterOption: FilterOptionDTO?)
}
48 changes: 48 additions & 0 deletions Projects/Feature/FilterFeature/Interface/FilterOption.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
import Foundation
import StudentDomainInterface

public struct FilterOptionDTO {
public let majors: [String]?
public let techStacks: [String]?
public let grade: [Int]?
public let classNum: [Int]?
public let department: [String]?
public let stuNumSort: SortType?
public let formOfEmployment: [String]?
public let minGsmAuthenticationScore: Int?
public let maxGsmAuthenticationScore: Int?
public let gsmAuthenticationScoreSort: SortType?
public let minSalary: Int?
public let maxSalary: Int?
public let salarySort: SortType?

public init(
majors: [String]? = nil,
techStacks: [String]? = nil,
grade: [Int]? = nil,
classNum: [Int]? = nil,
department: [String]? = nil,
stuNumSort: SortType? = nil,
formOfEmployment: [String]? = nil,
minGsmAuthenticationScore: Int? = nil,
maxGsmAuthenticationScore: Int? = nil,
gsmAuthenticationScoreSort: SortType? = nil,
minSalary: Int? = nil,
maxSalary: Int? = nil,
salarySort: SortType? = nil
) {
self.majors = majors
self.techStacks = techStacks
self.grade = grade
self.classNum = classNum
self.department = department
self.stuNumSort = stuNumSort
self.formOfEmployment = formOfEmployment
self.minGsmAuthenticationScore = minGsmAuthenticationScore
self.maxGsmAuthenticationScore = maxGsmAuthenticationScore
self.gsmAuthenticationScoreSort = gsmAuthenticationScoreSort
self.minSalary = minSalary
self.maxSalary = maxSalary
self.salarySort = salarySort
}
}
19 changes: 19 additions & 0 deletions Projects/Feature/FilterFeature/Project.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import ProjectDescription
import ProjectDescriptionHelpers
import DependencyPlugin

let project = Project.makeModule(
name: ModulePaths.Feature.FilterFeature.rawValue,
product: .staticLibrary,
targets: [.interface, .testing, .unitTest],
internalDependencies: [
.Feature.BaseFeature,
baekteun marked this conversation as resolved.
Show resolved Hide resolved
.Feature.TechStackAppendFeatureInterface,
.Domain.MajorDomainInterface,
.Domain.UserDomainInterface,
.Domain.StudentDomainInterface
],
interfaceDependencies: [
.Domain.StudentDomainInterface
]
)
31 changes: 31 additions & 0 deletions Projects/Feature/FilterFeature/Sources/DI/FilterComponent.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
import SwiftUI
import FilterFeatureInterface
import TechStackAppendFeatureInterface
import BaseFeature
import MajorDomainInterface
import NeedleFoundation

public protocol FilterDependency: Dependency {
var techStackAppendBuildable: any TechStackAppendBuildable { get }
var majorDomainBuildable: any MajorDomainBuildable { get }
}

public final class FilterComponent: Component<FilterDependency>, FilterBuildable {
public func makeView(delegate: any FilterDelegate) -> some View {
let model = FilterModel()
let intent = FilterIntent(
model: model,
filterDelegate: delegate,
fetchMajorListUseCase: dependency.majorDomainBuildable.fetchMajorListUseCase
)
let container = MVIContainer(
intent: intent as FilterIntentProtocol,
model: model as FilterStateProtocol,
modelChangePublisher: model.objectWillChange
)
return FilterView(
container: container,
techStackAppendBuildable: dependency.techStackAppendBuildable
)
}
}
Loading