Skip to content

Commit

Permalink
Merge pull request #248 from GSM-MSG/220-mypage-feature
Browse files Browse the repository at this point in the history
  • Loading branch information
kimsh153 authored Aug 24, 2023
2 parents 7bff929 + ae3275b commit 7bc29c6
Show file tree
Hide file tree
Showing 129 changed files with 3,785 additions and 508 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,14 @@ public extension TargetDependency.Feature {
target: ModulePaths.Feature.InputPrizeInfoFeature.targetName(type: .sources),
path: .relativeToFeature(ModulePaths.Feature.InputPrizeInfoFeature.rawValue)
)
static let MyPageFeatureInterface = TargetDependency.project(
target: ModulePaths.Feature.MyPageFeature.targetName(type: .interface),
path: .relativeToFeature(ModulePaths.Feature.MyPageFeature.rawValue)
)
static let MyPageFeature = TargetDependency.project(
target: ModulePaths.Feature.MyPageFeature.targetName(type: .sources),
path: .relativeToFeature(ModulePaths.Feature.MyPageFeature.rawValue)
)
static let InputProjectInfoFeatureInterface = TargetDependency.project(
target: ModulePaths.Feature.InputProjectInfoFeature.targetName(type: .interface),
path: .relativeToFeature(ModulePaths.Feature.InputProjectInfoFeature.rawValue)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ public enum ModulePaths {
public extension ModulePaths {
enum Feature: String {
case InputPrizeInfoFeature
case MyPageFeature
case InputProjectInfoFeature
case SplashFeature
case MainFeature
Expand Down
1 change: 1 addition & 0 deletions Projects/App/Project.swift
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ let targets: [Target] = [
.Feature.TechStackAppendFeature,
.Feature.StudentDetailFeature,
.Feature.FilterFeature,
.Feature.MyPageFeature,
.Domain.AuthDomain,
.Domain.StudentDomain,
.Domain.FileDomain,
Expand Down
6 changes: 6 additions & 0 deletions Projects/App/Sources/Application/DI/AppComponent.swift
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ import KeychainModule
import KeychainModuleInterface
import MainFeature
import MainFeatureInterface
import MyPageFeature
import MyPageFeatureInterface
import MajorDomain
import MajorDomainInterface
import NeedleFoundation
Expand Down Expand Up @@ -102,6 +104,10 @@ final class AppComponent: BootstrapComponent {
MainComponent(parent: self)
}

var myPageBuildable: any MyPageBuildable {
MyPageComponent(parent: self)
}

var techStackAppendBuildable: any TechStackAppendBuildable {
TechStackAppendComponent(parent: self)
}
Expand Down
49 changes: 45 additions & 4 deletions Projects/App/Sources/Application/NeedleGenerated.swift
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ import MainFeature
import MainFeatureInterface
import MajorDomain
import MajorDomainInterface
import MyPageFeature
import MyPageFeatureInterface
import NeedleFoundation
import RootFeature
import SigninFeature
Expand Down Expand Up @@ -105,6 +107,34 @@ private class InputProjectInfoDependencye065c7f60c5c520999a0Provider: InputProje
private func factory2378736e5949c5e8e9f4f47b58f8f304c97af4d5(_ component: NeedleFoundation.Scope) -> AnyObject {
return InputProjectInfoDependencye065c7f60c5c520999a0Provider(appComponent: parent1(component) as! AppComponent)
}
private class MyPageDependency48d84b530313b3ee40feProvider: MyPageDependency {
var userDomainBuildable: any UserDomainBuildable {
return appComponent.userDomainBuildable
}
var authDomainBuildable: any AuthDomainBuildable {
return appComponent.authDomainBuildable
}
var techStackAppendBuildable: any TechStackAppendBuildable {
return appComponent.techStackAppendBuildable
}
var fileDomainBuildable: any FileDomainBuildable {
return appComponent.fileDomainBuildable
}
var studentDomainBuildable: any StudentDomainBuildable {
return appComponent.studentDomainBuildable
}
var majorDomainBuildable: any MajorDomainBuildable {
return appComponent.majorDomainBuildable
}
private let appComponent: AppComponent
init(appComponent: AppComponent) {
self.appComponent = appComponent
}
}
/// ^->AppComponent->MyPageComponent
private func factory0f6f456ebf157d02dfb3f47b58f8f304c97af4d5(_ component: NeedleFoundation.Scope) -> AnyObject {
return MyPageDependency48d84b530313b3ee40feProvider(appComponent: parent1(component) as! AppComponent)
}
private class InputWorkInfoDependency74441f61366e4e5af9a2Provider: InputWorkInfoDependency {


Expand All @@ -120,12 +150,12 @@ private class MainDependency7c6a5b4738b211b8e155Provider: MainDependency {
var studentDomainBuildable: any StudentDomainBuildable {
return appComponent.studentDomainBuildable
}
var authDomainBuildable: any AuthDomainBuildable {
return appComponent.authDomainBuildable
}
var filterBuildable: any FilterBuildable {
return appComponent.filterBuildable
}
var myPageBuildable: any MyPageBuildable {
return appComponent.myPageBuildable
}
var studentDetailBuildable: any StudentDetailBuildable {
return appComponent.studentDetailBuildable
}
Expand Down Expand Up @@ -444,6 +474,16 @@ extension InputProjectInfoComponent: Registration {
keyPathToName[\InputProjectInfoDependency.techStackAppendBuildable] = "techStackAppendBuildable-any TechStackAppendBuildable"
}
}
extension MyPageComponent: Registration {
public func registerItems() {
keyPathToName[\MyPageDependency.userDomainBuildable] = "userDomainBuildable-any UserDomainBuildable"
keyPathToName[\MyPageDependency.authDomainBuildable] = "authDomainBuildable-any AuthDomainBuildable"
keyPathToName[\MyPageDependency.techStackAppendBuildable] = "techStackAppendBuildable-any TechStackAppendBuildable"
keyPathToName[\MyPageDependency.fileDomainBuildable] = "fileDomainBuildable-any FileDomainBuildable"
keyPathToName[\MyPageDependency.studentDomainBuildable] = "studentDomainBuildable-any StudentDomainBuildable"
keyPathToName[\MyPageDependency.majorDomainBuildable] = "majorDomainBuildable-any MajorDomainBuildable"
}
}
extension InputWorkInfoComponent: Registration {
public func registerItems() {

Expand All @@ -452,8 +492,8 @@ extension InputWorkInfoComponent: Registration {
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.myPageBuildable] = "myPageBuildable-any MyPageBuildable"
keyPathToName[\MainDependency.studentDetailBuildable] = "studentDetailBuildable-any StudentDetailBuildable"
keyPathToName[\MainDependency.userDomainBuildable] = "userDomainBuildable-any UserDomainBuildable"
}
Expand Down Expand Up @@ -586,6 +626,7 @@ private func register1() {
registerProviderFactory("^->AppComponent->KeychainComponent", factoryEmptyDependencyProvider)
registerProviderFactory("^->AppComponent->SplashComponent", factoryace9f05f51d68f4c0677f47b58f8f304c97af4d5)
registerProviderFactory("^->AppComponent->InputProjectInfoComponent", factory2378736e5949c5e8e9f4f47b58f8f304c97af4d5)
registerProviderFactory("^->AppComponent->MyPageComponent", factory0f6f456ebf157d02dfb3f47b58f8f304c97af4d5)
registerProviderFactory("^->AppComponent->InputWorkInfoComponent", factoryfff86bd7854b30412216e3b0c44298fc1c149afb)
registerProviderFactory("^->AppComponent->MainComponent", factoryc9274e46e78e70f29c54f47b58f8f304c97af4d5)
registerProviderFactory("^->AppComponent->InputSchoolLifeInfoComponent", factorydc1feebed8f042db375fe3b0c44298fc1c149afb)
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
@@ -1,7 +1,7 @@
{
"images" : [
{
"filename" : "RedLogout.svg",
"filename" : "Logout.svg",
"idiom" : "universal"
}
],
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" : "LogoutLine.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
@@ -1,7 +1,7 @@
{
"images" : [
{
"filename" : "Image.svg",
"filename" : "icon.svg",
"idiom" : "universal"
}
],
Expand Down

This file was deleted.

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
@@ -1,19 +1,18 @@
import DesignSystem
import SwiftUI

struct DatePickerField: View {
public struct DatePickerField: View {
let dateText: String
let action: () -> Void

init(
public init(
dateText: String,
action: @escaping () -> Void
) {
self.dateText = dateText
self.action = action
}

var body: some View {
public var body: some View {
SMSTextField(
"yyyy.mm",
text: Binding(
Expand Down
10 changes: 7 additions & 3 deletions Projects/Core/DesignSystem/Sources/Icon/SMSIcon.swift
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,13 @@ public struct SMSIcon: View {
case plus
case profile
case profileSmallPlus
case redLogout
case redPerson
case search
case smsLogo
case trash
case leftArrow
case logout
case logoutLine
case smallPlus
case upArrow
case magnifyingglass
Expand Down Expand Up @@ -103,8 +104,11 @@ public struct SMSIcon: View {
case .leftArrow:
return DesignSystemAsset.Icons.leftArrow.swiftUIImage

case .redLogout:
return DesignSystemAsset.Icons.redLogout.swiftUIImage
case .logout:
return DesignSystemAsset.Icons.logout.swiftUIImage

case .logoutLine:
return DesignSystemAsset.Icons.logoutLine.swiftUIImage

case .redPerson:
return DesignSystemAsset.Icons.redPerson.swiftUIImage
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,6 @@ import SwiftUI
internal struct PressedSelectionButtonStyle: ButtonStyle {
var isSelected: Bool

init(isSelected: Bool) {
self.isSelected = isSelected
}

@ViewBuilder
func makeBody(configuration: Configuration) -> some View {
Circle()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@ struct AuthRepositoryImpl: AuthRepository {
}

func logout() async throws {
#warning("통신 오류 남")
// try await remoteAuthDataSource.logout()
try await remoteAuthDataSource.logout()
try await localAuthDataSource.logout()
}

Expand Down
11 changes: 11 additions & 0 deletions Projects/Domain/AuthDomain/Testing/UseCase/LogoutUseCaseSpy.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import AuthDomainInterface

final class LogoutUseCaseSpy: LogoutUseCase {
var executeCallCount = 0
var executeHandler: () async throws -> Void = {}

func execute() async throws {
executeCallCount += 1
try await executeHandler()
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import AuthDomainInterface

final class WithdrawalUseCaseSpy: WithdrawalUseCase {
var executeCallCount = 0
var executeHandler: () async throws -> Void = {}

func execute() async throws {
executeCallCount += 1
try await executeHandler()
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ extension RefreshEndpoint {
return .none
}

var headers: [String : String]? {
var headers: [String: String]? {
switch self {
case let .refresh(refreshToken):
return [
Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,13 @@
import Foundation

public enum FileDomainError: Error {
case notHwpFile
case notImageType
case internalServerError
}

extension FileDomainError: LocalizedError {
public var errorDescription: String? {
switch self {
case .notHwpFile:
return "파일 형식이 hwp 혹은 hwpx인 파일이 아닙니다."

case .notImageType:
return "이미지 형식이 jpg, jpeg, png, heic인 이미지가 아닙니다."

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@ public protocol StudentDomainBuildable {
var studentRepository: any StudentRepository { get }
var fetchStudentListUseCase: any FetchStudentListUseCase { get }
var fetchStudentDetailUSeCase: any FetchStudentDetailUseCase { get }
var modifyInformationUseCase: any ModifyInformationUseCase { get }
}
Loading

0 comments on commit 7bc29c6

Please sign in to comment.