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

๐Ÿ”€ :: ์ •๋ณด์ž…๋ ฅ - ํ”„๋กœ์ ํŠธ ํŽ˜์ด์ง€ #227

Merged
merged 28 commits into from
Jul 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
ff63415
:sparkles: : InputProjectInfoFeature module
baekteun Jul 9, 2023
24017fa
:lipstick: :: ํ”„๋กœ์ ํŠธ ์ž…๋ ฅ ์ค‘๊ฐ„ ๋‚ด์šฉ๊นŒ์ง€ ์™„์„ฑ
baekteun Jul 9, 2023
71bd26c
:lipstick: :: ํ”„๋กœ์ ํŠธ ์ž…๋ ฅ - ์ง„ํ–‰๊ธฐ๊ฐ„
baekteun Jul 9, 2023
ce5d048
:lipstick: :: ํ”„๋กœ์ ํŠธ ์ž…๋ ฅ - ๊ด€๋ จ ๋งํฌ
baekteun Jul 9, 2023
ae3d0e4
:sparkles: :: Filter์—์„œ ํ˜„์žฌ ์œ ์ € ๊ถŒํ•œ Model์— ์ €์žฅ
baekteun Jul 9, 2023
080487f
:sparkles: :: Intent, Model
baekteun Jul 9, 2023
a7f7f61
:sparkles: :: View to Intent ๋ฐ”์ธ๋”ฉ
baekteun Jul 9, 2023
749a7ca
:sparkles: :: DatePicker
baekteun Jul 10, 2023
8081a99
:sparkles: :: DatePick and icon pick
baekteun Jul 10, 2023
2608d41
:lipstick: :: titleWrapper๋ฅผ buttonWrapper์˜ ์˜ํ–ฅ์œผ๋กœ๋ถ€ํ„ฐ ๋ถ„๋ฆฌ์‹œํ‚ค๊ธฐ
baekteun Jul 10, 2023
46923cf
:lipstick: :: ์ด์ „, ๋‹ค์Œ ๋ฒ„ํŠผ ์ถ”๊ฐ€
baekteun Jul 10, 2023
da01671
:sparkles: :: project ์ ‘๊ธฐ!
baekteun Jul 10, 2023
898b489
:bug: :: ๊ทผ๋ฌด ์ง€์—ญ ๋ฒ„๊ทธ
baekteun Jul 11, 2023
7101e2b
:sparkles: :: InputProjectInfo DI
baekteun Jul 12, 2023
ee69226
:sparkles: :: ์ •๋ณด ์ž…๋ ฅ ํผ๋„์— ProjectInfo ์ถ”๊ฐ€
baekteun Jul 12, 2023
62fbb3c
:sparkles: :: InputProject intnet action
baekteun Jul 12, 2023
3951156
:sparkles: :: ProjectInfo ์ด์ „, ๋‹ค์Œ View ๋ฐ”์ธ๋”ฉ
baekteun Jul 12, 2023
8d0daca
:sparkles: :: ํ…Œํฌ์ŠคํŽ™ ์ œ๊ฑฐ
baekteun Jul 12, 2023
3f3e526
:heavy_plus_sign: :: TechStackAppendFeature -> InputProjectInfoFeature
baekteun Jul 12, 2023
fddeb4b
:art: :: ์–ด์ƒ‰ํ•œ ๊ณต๋ฐฑ ์ œ๊ฑฐ
baekteun Jul 12, 2023
dc07254
:pencil2: :: techStack, techStacks ์˜คํƒ€ ์ˆ˜์ •
baekteun Jul 12, 2023
078d1e2
:sparkles: :: ํ”„๋กœ์ ํŠธ ์ง„ํ–‰์ผ ์ง„ํ–‰์ค‘ ์—ฌ๋ถ€ ํ™•์ธ
baekteun Jul 12, 2023
a6e2360
:sparkles: :: ์Šคํƒ ์ตœ๋Œ€ ๊ฐœ์ˆ˜ ์ œํ•œ
baekteun Jul 12, 2023
02e1aa2
:recycle: :: View Component ๋ถ„๋ฆฌ ๋ฐ ๋นˆ ๋‚ด์šฉ๋ฌผ ๊ฑฐ๋ฅด๊ธฐ
baekteun Jul 12, 2023
616bb4b
:bug: :: DateUtil -> DesignSystem
baekteun Jul 12, 2023
fc07292
:sparkles: :: ์‚ฌ์šฉ ๊ธฐ์ˆ  ์ถ”๊ฐ€ ๊ธฐ๋Šฅ ์ถ”๊ฐ€
baekteun Jul 12, 2023
1b29dde
:bug: :: Demo์•ฑ์—์„œ ๋ฐ˜์˜
baekteun Jul 12, 2023
c125c0e
:sparkles: :: Needle Generate DI
baekteun Jul 12, 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 @@ -9,6 +9,14 @@ public extension TargetDependency {
}

public extension TargetDependency.Feature {
static let InputProjectInfoFeatureInterface = TargetDependency.project(
target: ModulePaths.Feature.InputProjectInfoFeature.targetName(type: .interface),
path: .relativeToFeature(ModulePaths.Feature.InputProjectInfoFeature.rawValue)
)
static let InputProjectInfoFeature = TargetDependency.project(
target: ModulePaths.Feature.InputProjectInfoFeature.targetName(type: .sources),
path: .relativeToFeature(ModulePaths.Feature.InputProjectInfoFeature.rawValue)
)
static let SplashFeatureInterface = TargetDependency.project(
target: ModulePaths.Feature.SplashFeature.targetName(type: .interface),
path: .relativeToFeature(ModulePaths.Feature.SplashFeature.rawValue)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ public enum ModulePaths {

public extension ModulePaths {
enum Feature: String {
case InputProjectInfoFeature
case SplashFeature
case MainFeature
case TechStackAppendFeature
Expand Down
1 change: 1 addition & 0 deletions Projects/App/Project.swift
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ let targets: [Target] = [
.Feature.InputMilitaryInfoFeature,
.Feature.InputCertificateInfoFeature,
.Feature.InputLanguageInfoFeature,
.Feature.InputProjectInfoFeature,
.Feature.MainFeature,
.Feature.SplashFeature,
.Feature.TechStackAppendFeature,
Expand Down
10 changes: 8 additions & 2 deletions Projects/App/Sources/Application/DI/AppComponent.swift
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ import AuthDomainInterface
import BaseDomain
import FileDomain
import FileDomainInterface
import FilterFeature
import FilterFeatureInterface
import InputCertificateInfoFeature
import InputCertificateInfoFeatureInterface
import InputInformationFeature
Expand All @@ -13,12 +15,12 @@ import InputMilitaryInfoFeature
import InputMilitaryInfoFeatureInterface
import InputProfileInfoFeature
import InputProfileInfoFeatureInterface
import InputProjectInfoFeature
import InputProjectInfoFeatureInterface
import InputSchoolLifeInfoFeature
import InputSchoolLifeInfoFeatureInterface
import InputWorkInfoFeature
import InputWorkInfoFeatureInterface
import FilterFeature
import FilterFeatureInterface
import JwtStore
import JwtStoreInterface
import KeychainModule
Expand Down Expand Up @@ -86,6 +88,10 @@ final class AppComponent: BootstrapComponent {
InputLanguageInfoComponent(parent: self)
}

var inputProjectInfoBuildable: any InputProjectInfoBuildable {
InputProjectInfoComponent(parent: self)
}

var mainBuildable: any MainBuildable {
MainComponent(parent: self)
}
Expand Down
29 changes: 29 additions & 0 deletions Projects/App/Sources/Application/NeedleGenerated.swift
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ import InputMilitaryInfoFeature
import InputMilitaryInfoFeatureInterface
import InputProfileInfoFeature
import InputProfileInfoFeatureInterface
import InputProjectInfoFeature
import InputProjectInfoFeatureInterface
import InputSchoolLifeInfoFeature
import InputSchoolLifeInfoFeatureInterface
import InputWorkInfoFeature
Expand Down Expand Up @@ -88,6 +90,19 @@ private class SplashDependencye0cb7136f2ec3edfd60aProvider: SplashDependency {
private func factoryace9f05f51d68f4c0677f47b58f8f304c97af4d5(_ component: NeedleFoundation.Scope) -> AnyObject {
return SplashDependencye0cb7136f2ec3edfd60aProvider(appComponent: parent1(component) as! AppComponent)
}
private class InputProjectInfoDependencye065c7f60c5c520999a0Provider: InputProjectInfoDependency {
var techStackAppendBuildable: any TechStackAppendBuildable {
return appComponent.techStackAppendBuildable
}
private let appComponent: AppComponent
init(appComponent: AppComponent) {
self.appComponent = appComponent
}
}
/// ^->AppComponent->InputProjectInfoComponent
private func factory2378736e5949c5e8e9f4f47b58f8f304c97af4d5(_ component: NeedleFoundation.Scope) -> AnyObject {
return InputProjectInfoDependencye065c7f60c5c520999a0Provider(appComponent: parent1(component) as! AppComponent)
}
private class InputWorkInfoDependency74441f61366e4e5af9a2Provider: InputWorkInfoDependency {


Expand Down Expand Up @@ -142,6 +157,9 @@ private class FilterDependencya3adf5d0affb84ca15efProvider: FilterDependency {
var majorDomainBuildable: any MajorDomainBuildable {
return appComponent.majorDomainBuildable
}
var userDomainBuildable: any UserDomainBuildable {
return appComponent.userDomainBuildable
}
private let appComponent: AppComponent
init(appComponent: AppComponent) {
self.appComponent = appComponent
Expand Down Expand Up @@ -243,6 +261,9 @@ private class InputInformationDependency7b32a8e7e8a8f0ab5466Provider: InputInfor
var inputLanguageInfoBuildable: any InputLanguageInfoBuildable {
return appComponent.inputLanguageInfoBuildable
}
var inputProjectInfoBuildable: any InputProjectInfoBuildable {
return appComponent.inputProjectInfoBuildable
}
var fileDomainBuildable: any FileDomainBuildable {
return appComponent.fileDomainBuildable
}
Expand Down Expand Up @@ -402,6 +423,11 @@ extension SplashComponent: Registration {
keyPathToName[\SplashDependency.authDomainBuildable] = "authDomainBuildable-any AuthDomainBuildable"
}
}
extension InputProjectInfoComponent: Registration {
public func registerItems() {
keyPathToName[\InputProjectInfoDependency.techStackAppendBuildable] = "techStackAppendBuildable-any TechStackAppendBuildable"
}
}
extension InputWorkInfoComponent: Registration {
public func registerItems() {

Expand All @@ -425,6 +451,7 @@ extension FilterComponent: Registration {
public func registerItems() {
keyPathToName[\FilterDependency.techStackAppendBuildable] = "techStackAppendBuildable-any TechStackAppendBuildable"
keyPathToName[\FilterDependency.majorDomainBuildable] = "majorDomainBuildable-any MajorDomainBuildable"
keyPathToName[\FilterDependency.userDomainBuildable] = "userDomainBuildable-any UserDomainBuildable"
}
}
extension RootComponent: Registration {
Expand Down Expand Up @@ -464,6 +491,7 @@ extension InputInformationComponent: Registration {
keyPathToName[\InputInformationDependency.inputMilitaryInfoBuildable] = "inputMilitaryInfoBuildable-any InputMilitaryInfoBuildable"
keyPathToName[\InputInformationDependency.inputCertificateInfoBuildable] = "inputCertificateInfoBuildable-any InputCertificateInfoBuildable"
keyPathToName[\InputInformationDependency.inputLanguageInfoBuildable] = "inputLanguageInfoBuildable-any InputLanguageInfoBuildable"
keyPathToName[\InputInformationDependency.inputProjectInfoBuildable] = "inputProjectInfoBuildable-any InputProjectInfoBuildable"
keyPathToName[\InputInformationDependency.fileDomainBuildable] = "fileDomainBuildable-any FileDomainBuildable"
keyPathToName[\InputInformationDependency.studentDomainBuildable] = "studentDomainBuildable-any StudentDomainBuildable"
}
Expand Down Expand Up @@ -535,6 +563,7 @@ private func registerProviderFactory(_ componentPath: String, _ factory: @escapi
registerProviderFactory("^->AppComponent", factoryEmptyDependencyProvider)
registerProviderFactory("^->AppComponent->KeychainComponent", factoryEmptyDependencyProvider)
registerProviderFactory("^->AppComponent->SplashComponent", factoryace9f05f51d68f4c0677f47b58f8f304c97af4d5)
registerProviderFactory("^->AppComponent->InputProjectInfoComponent", factory2378736e5949c5e8e9f4f47b58f8f304c97af4d5)
registerProviderFactory("^->AppComponent->InputWorkInfoComponent", factoryfff86bd7854b30412216e3b0c44298fc1c149afb)
registerProviderFactory("^->AppComponent->MainComponent", factoryc9274e46e78e70f29c54f47b58f8f304c97af4d5)
registerProviderFactory("^->AppComponent->InputSchoolLifeInfoComponent", factorydc1feebed8f042db375fe3b0c44298fc1c149afb)
Expand Down
3 changes: 2 additions & 1 deletion Projects/Core/DesignSystem/Project.swift
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ let project = Project.makeModule(
.SPM.Lottie
],
internalDependencies: [
.Shared.ViewUtil
.Shared.ViewUtil,
.Shared.DateUtil
],
resources: ["Resources/**"],
resourceSynthesizers: .default + [
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"images" : [
{
"filename" : "Calendar.svg",
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"images" : [
{
"filename" : "WaterWave.svg",
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
import DateUtil
import SwiftUI
import ViewUtil

public extension View {
func datePicker(
isShowing: Binding<Bool>,
completion: @escaping (Date) -> Void
) -> some View {
self.smsBottomSheet(isShowing: isShowing) {
BottomSheetYearMonthDatePickerView(isShowing: isShowing, completion: completion)
}
}
}

public struct BottomSheetYearMonthDatePickerView: View {
@Binding var isShowing: Bool
@Environment(\.dismiss) var dismiss
@State var selectedYear = 0
@State var selectedMonth = 0
var completion: (Date) -> Void
var currentYear: Int {
Date().year
}

public init(
isShowing: Binding<Bool>,
completion: @escaping (Date) -> Void
) {
self._isShowing = isShowing
self.completion = completion
}

public var body: some View {
VStack(spacing: 16) {
HStack {
SMSText("๋‚ ์งœ์„ ํƒ", font: .title2)

Spacer()

SMSText("์™„๋ฃŒ", font: .body2)
.foregroundColor(.sms(.primary(.p2)))
.buttonWrapper {
let year = selectedYear + currentYear - 10
let month = selectedMonth + 1
guard let date = DateComponents(calendar: .current, year: year, month: month).date else { return }
self.isShowing = false
self.completion(date)
}
}

HStack(spacing: 0) {
Picker(selection: $selectedYear) {
ForEach(currentYear - 10 ..< currentYear + 1) { year in
SMSText("\(year)", font: .title1)
}
} label: {
EmptyView()
}

Picker(selection: $selectedMonth) {
ForEach(1..<13) { month in
SMSText("\(month)", font: .title1)
}
} label: {
EmptyView()
}
}
.pickerStyle(.wheel)
}
.padding(.horizontal, 20)
}
}
8 changes: 8 additions & 0 deletions Projects/Core/DesignSystem/Sources/Icon/SMSIcon.swift
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ public struct SMSIcon: View {

public enum Icon: CaseIterable {
case book
case calendar
case camera
case check
case checkmark
Expand All @@ -39,6 +40,7 @@ public struct SMSIcon: View {
case smallPlus
case upArrow
case magnifyingglass
case waterWave
case xmark
case xmarkOutline
}
Expand All @@ -56,6 +58,9 @@ public struct SMSIcon: View {
case .book:
return DesignSystemAsset.Icons.book.swiftUIImage

case .calendar:
return DesignSystemAsset.Icons.calendar.swiftUIImage

case .camera:
return DesignSystemAsset.Icons.camera.swiftUIImage

Expand Down Expand Up @@ -113,6 +118,9 @@ public struct SMSIcon: View {
case .magnifyingglass:
return DesignSystemAsset.Icons.magnifyingglass.swiftUIImage

case .waterWave:
return DesignSystemAsset.Icons.waterWave.swiftUIImage

case .xmark:
return DesignSystemAsset.Icons.xmark.swiftUIImage

Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
import SwiftUI
import FilterFeatureInterface
import TechStackAppendFeatureInterface
import BaseFeature
import FilterFeatureInterface
import MajorDomainInterface
import NeedleFoundation
import SwiftUI
import TechStackAppendFeatureInterface
import UserDomainInterface

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

public final class FilterComponent: Component<FilterDependency>, FilterBuildable {
Expand All @@ -16,7 +18,8 @@ public final class FilterComponent: Component<FilterDependency>, FilterBuildable
let intent = FilterIntent(
model: model,
filterDelegate: delegate,
fetchMajorListUseCase: dependency.majorDomainBuildable.fetchMajorListUseCase
fetchMajorListUseCase: dependency.majorDomainBuildable.fetchMajorListUseCase,
loadUserRoleUseCase: dependency.userDomainBuildable.loadUserRoleUseCase
)
let container = MVIContainer(
intent: intent as FilterIntentProtocol,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,25 +1,31 @@
import Combine
import SwiftUI
import FilterFeatureInterface
import StudentDomainInterface
import MajorDomainInterface
import StudentDomainInterface
import SwiftUI
import UserDomainInterface

final class FilterIntent: FilterIntentProtocol {
private weak var model: (any FilterActionProtocol)?
private weak var filterDelegate: (any FilterDelegate)?
private let fetchMajorListUseCase: any FetchMajorListUseCase
private let loadUserRoleUseCase: any LoadUserRoleUseCase

init(
model: any FilterActionProtocol,
filterDelegate: any FilterDelegate,
fetchMajorListUseCase: any FetchMajorListUseCase
fetchMajorListUseCase: any FetchMajorListUseCase,
loadUserRoleUseCase: any LoadUserRoleUseCase
) {
self.filterDelegate = filterDelegate
self.model = model
self.fetchMajorListUseCase = fetchMajorListUseCase
self.loadUserRoleUseCase = loadUserRoleUseCase
}

func onAppear() {
let userRole = loadUserRoleUseCase.execute()
model?.updateUserRole(role: userRole)
Task {
let majorList = try await fetchMajorListUseCase.execute()
model?.updpateMajorList(majorList: majorList)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ struct FilterView: View {
.padding(.bottom, 20)

VStack(alignment: .leading, spacing: 40) {
ConditionView(state.userRole == .student) {
ConditionView(state.userRole == .student || state.userRole == .teacher) {
gradeSection()

classSection()
Expand All @@ -42,7 +42,7 @@ struct FilterView: View {

majorSection()

ConditionView(state.userRole == .student) {
ConditionView(state.userRole == .student || state.userRole == .teacher) {
ConditionView(state.userRole == .teacher) {
formOfEmploymentSetcion()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ struct InputCertificateInfoView: View {
InputInformationPageTitleView(
title: "์ž๊ฒฉ์ฆ",
isRequired: false,
pageCount: 6,
pageCount: 7,
selectedPage: 4
)

Expand Down
Loading