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

πŸ”€ :: 메인 νŽ˜μ΄μ§€ μ œμž‘ #173

Merged
merged 33 commits into from
Jun 12, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
82dfb97
:sparkles: MainFeature 생성
kimsh153 May 29, 2023
3e2fab1
:heavy_plus_sign: MainBuildable
kimsh153 May 29, 2023
7a9eb59
:heavy_plus_sign: MainBuildable, MainComponent μΆ”κ°€
kimsh153 May 29, 2023
9b3679a
:sparkles: MainIntent 생성
kimsh153 May 29, 2023
e48f060
:sparkles: MainModel 생성
kimsh153 May 29, 2023
9a691f5
:lipstick: MainView 생성
kimsh153 May 29, 2023
68447d8
:bento: SMSLogo Images에 μΆ”κ°€
kimsh153 May 29, 2023
b96b5e8
:bento: Filter, Search Icon μΆ”κ°€
kimsh153 May 29, 2023
6f9642c
:sparkles: Root To Main
kimsh153 May 29, 2023
214fa9d
:lipstick: μ§„μ§œ UI만 μžˆλŠ” μ½”λ“œ
kimsh153 May 30, 2023
4910c52
Merge branch 'master' of https://github.com/GSM-MSG/SMS-iOS into 145-…
kimsh153 May 30, 2023
f1b0e36
:construction: μ‚΄λ €μ£Όμ„Έμš”...
kimsh153 Jun 7, 2023
7f63f17
Merge branch 'master' of https://github.com/GSM-MSG/SMS-iOS into 145-…
kimsh153 Jun 9, 2023
a9d855d
:bento: Icon ν•˜λ‚˜λ‘œ μ••μΆ•, upArrowμ•„μ΄μ½˜ μΆ”κ°€
kimsh153 Jun 12, 2023
1dc9276
:sparkles: 파일 μ—…λ‘œλ“œ 정상화
kimsh153 Jun 12, 2023
504f5a8
:sparkles: Id 좔ㅏ가
kimsh153 Jun 12, 2023
b193213
:sparkles: Git pull
kimsh153 Jun 12, 2023
18c9e94
:sparkles: Emdpoint 버전업, main 생성
kimsh153 Jun 12, 2023
6f2228b
:lipstick: MainView
kimsh153 Jun 12, 2023
3b736b5
:sparkles: Model 가져와야할 μš”μ†Œ μΆ”κ°€
kimsh153 Jun 12, 2023
8e7ff71
:sparkles: MainIntent
kimsh153 Jun 12, 2023
635e512
:rocket: Asdfas
kimsh153 Jun 12, 2023
5d94eeb
Merge branch '145-main-page-ui' of https://github.com/GSM-MSG/SMS-iOS…
kimsh153 Jun 12, 2023
7ca539f
Merge branch 'master' of https://github.com/GSM-MSG/SMS-iOS into 145-…
kimsh153 Jun 12, 2023
c49af96
Update Projects/Domain/StudentDomain/Sources/Endpoint/StudentEndpoint…
kimsh153 Jun 12, 2023
a280616
:recycle: Comment μˆ˜μ •
kimsh153 Jun 12, 2023
d955926
Merge branch 'master' of https://github.com/GSM-MSG/SMS-iOS into 145-…
kimsh153 Jun 12, 2023
0c0d544
Merge branch '145-main-page-ui' of https://github.com/GSM-MSG/SMS-iOS…
kimsh153 Jun 12, 2023
d2dd926
Merge branch 'master' of https://github.com/GSM-MSG/SMS-iOS into 145-…
kimsh153 Jun 12, 2023
3401bff
:recycle: Commnet μˆ˜μ •, 게슀트 둜그인
kimsh153 Jun 12, 2023
9aee445
:recycle: SmsSeparator
kimsh153 Jun 12, 2023
611fd66
:recycle: Toolbar 버그 ν•˜λ“œμ½”λ”©μœΌλ‘œ ν•΄κ²°
kimsh153 Jun 12, 2023
fb4628f
:recycle: NavigationBar둜 λ³€κ²½
kimsh153 Jun 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,18 @@ public extension TargetDependency {
}

public extension TargetDependency.Feature {
static let MainFeatureTesting = TargetDependency.project(
target: ModulePaths.Feature.MainFeature.targetName(type: .testing),
path: .relativeToFeature(ModulePaths.Feature.MainFeature.rawValue)
)
static let MainFeatureInterface = TargetDependency.project(
target: ModulePaths.Feature.MainFeature.targetName(type: .interface),
path: .relativeToFeature(ModulePaths.Feature.MainFeature.rawValue)
)
static let MainFeature = TargetDependency.project(
target: ModulePaths.Feature.MainFeature.targetName(type: .sources),
path: .relativeToFeature(ModulePaths.Feature.MainFeature.rawValue)
)
static let TechStackAppendFeatureInterface = TargetDependency.project(
target: ModulePaths.Feature.TechStackAppendFeature.targetName(type: .interface),
path: .relativeToFeature(ModulePaths.Feature.TechStackAppendFeature.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 MainFeature
case TechStackAppendFeature
case StudentDetailFeature
case InputInformationBaseFeature
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.MainFeature,
.Feature.TechStackAppendFeature,
.Feature.StudentDetailFeature,
.Domain.AuthDomain,
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 @@ -17,6 +17,8 @@ import InputSchoolLifeInfoFeature
import InputSchoolLifeInfoFeatureInterface
import InputWorkInfoFeature
import InputWorkInfoFeatureInterface
import MainFeature
import MainFeatureInterface
import RootFeature
import TechStackAppendFeatureInterface
import TechStackAppendFeature
Expand Down Expand Up @@ -81,6 +83,10 @@ final class AppComponent: BootstrapComponent {
InputLanguageInfoComponent(parent: self)
}

var mainBuildable: any MainBuildable {
MainComponent(parent: self)
}

var techStackAppendBuildable: any TechStackAppendBuildable {
TechStackAppendComponent(parent: self)
}
Expand Down
27 changes: 26 additions & 1 deletion Projects/App/Sources/Application/NeedleGenerated.swift
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ import JwtStore
import JwtStoreInterface
import KeychainModule
import KeychainModuleInterface
import MainFeature
import MainFeatureInterface
import MajorDomain
import MajorDomainInterface
import NeedleFoundation
Expand Down Expand Up @@ -80,6 +82,19 @@ private class InputWorkInfoDependency74441f61366e4e5af9a2Provider: InputWorkInfo
private func factoryfff86bd7854b30412216e3b0c44298fc1c149afb(_ component: NeedleFoundation.Scope) -> AnyObject {
return InputWorkInfoDependency74441f61366e4e5af9a2Provider()
}
private class MainDependency7c6a5b4738b211b8e155Provider: MainDependency {
var studentDomainBuildable: any StudentDomainBuildable {
return appComponent.studentDomainBuildable
}
private let appComponent: AppComponent
init(appComponent: AppComponent) {
self.appComponent = appComponent
}
}
/// ^->AppComponent->MainComponent
private func factoryc9274e46e78e70f29c54f47b58f8f304c97af4d5(_ component: NeedleFoundation.Scope) -> AnyObject {
return MainDependency7c6a5b4738b211b8e155Provider(appComponent: parent1(component) as! AppComponent)
}
private class InputSchoolLifeInfoDependency30edf0903f9bdb7a60fbProvider: InputSchoolLifeInfoDependency {


Expand All @@ -98,6 +113,9 @@ private class RootDependency3944cc797a4a88956fb5Provider: RootDependency {
var inputInformationBuildable: any InputInformationBuildable {
return appComponent.inputInformationBuildable
}
var mainBuildable: any MainBuildable {
return appComponent.mainBuildable
}
private let appComponent: AppComponent
init(appComponent: AppComponent) {
self.appComponent = appComponent
Expand Down Expand Up @@ -331,6 +349,11 @@ extension InputWorkInfoComponent: Registration {

}
}
extension MainComponent: Registration {
public func registerItems() {
keyPathToName[\MainDependency.studentDomainBuildable] = "studentDomainBuildable-any StudentDomainBuildable"
}
}
extension InputSchoolLifeInfoComponent: Registration {
public func registerItems() {

Expand All @@ -340,6 +363,7 @@ extension RootComponent: Registration {
public func registerItems() {
keyPathToName[\RootDependency.signinBuildable] = "signinBuildable-any SigninBuildable"
keyPathToName[\RootDependency.inputInformationBuildable] = "inputInformationBuildable-any InputInformationBuildable"
keyPathToName[\RootDependency.mainBuildable] = "mainBuildable-any MainBuildable"
}
}
extension SigninComponent: Registration {
Expand Down Expand Up @@ -436,11 +460,12 @@ 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->InputWorkInfoComponent", factoryfff86bd7854b30412216e3b0c44298fc1c149afb)
registerProviderFactory("^->AppComponent->MainComponent", factoryc9274e46e78e70f29c54f47b58f8f304c97af4d5)
registerProviderFactory("^->AppComponent->InputSchoolLifeInfoComponent", factorydc1feebed8f042db375fe3b0c44298fc1c149afb)
registerProviderFactory("^->AppComponent->RootComponent", factory264bfc4d4cb6b0629b40f47b58f8f304c97af4d5)
registerProviderFactory("^->AppComponent->SigninComponent", factory2882a056d84a613debccf47b58f8f304c97af4d5)
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"images" : [
{
"filename" : "Filter.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,12 @@
{
"images" : [
{
"filename" : "SMSLogo.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,12 @@
{
"images" : [
{
"filename" : "Search.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,12 @@
{
"images" : [
{
"filename" : "UpArrow.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.
16 changes: 16 additions & 0 deletions Projects/Core/DesignSystem/Sources/Icon/SMSIcon.swift
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,18 @@ public struct SMSIcon: View {
case check
case checkmark
case downChevron
case filter
case greenCheck
case photo
case plus
case profile
case profileSmallPlus
case search
case smsLogo
case trash
case leftArrow
case smallPlus
case upArrow
case magnifyingglass
case xmark
}
Expand Down Expand Up @@ -61,6 +65,9 @@ public struct SMSIcon: View {
case .downChevron:
return DesignSystemAsset.Icons.downChevron.swiftUIImage

case .filter:
return DesignSystemAsset.Icons.filter.swiftUIImage

case .greenCheck:
return DesignSystemAsset.Icons.greenCheck.swiftUIImage

Expand All @@ -76,6 +83,12 @@ public struct SMSIcon: View {
case .profileSmallPlus:
return DesignSystemAsset.Icons.profileSmallPlus.swiftUIImage

case .search:
return DesignSystemAsset.Icons.search.swiftUIImage

case .smsLogo:
return DesignSystemAsset.Icons.smsLogo.swiftUIImage

case .trash:
return DesignSystemAsset.Icons.trash.swiftUIImage

Expand All @@ -85,6 +98,9 @@ public struct SMSIcon: View {
case .smallPlus:
return DesignSystemAsset.Icons.smallPlus.swiftUIImage

case .upArrow:
return DesignSystemAsset.Icons.upArrow.swiftUIImage

case .magnifyingglass:
return DesignSystemAsset.Icons.magnifyingglass.swiftUIImage

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,12 @@ public struct JwtInterceptor: InterceptorType {
var newRequest = request
newRequest.httpShouldHandleCookies = false
let token = getToken(type: jwtType.toJwtStoreProperty)
guard !token.isEmpty else {
completion(.success(newRequest))
return
}

newRequest.setValue(token, forHTTPHeaderField: jwtType.rawValue)
newRequest.setValue(jwtType == .accessToken ? "Bearer \(token)" : token, forHTTPHeaderField: jwtType.rawValue)
if checkTokenIsExpired() {
reissueToken(newRequest, jwtType: jwtType, completion: completion)
} else {
Expand All @@ -54,7 +58,7 @@ private extension JwtInterceptor {
func getToken(type: JwtStoreProperty) -> String {
switch type {
case .accessToken:
return "Bearer \(jwtStore.load(property: type))"
return jwtStore.load(property: type)

default:
return jwtStore.load(property: type)
Expand Down
11 changes: 10 additions & 1 deletion Projects/Domain/FileDomain/Sources/Endpoint/FileEndpoint.swift
Original file line number Diff line number Diff line change
Expand Up @@ -32,21 +32,30 @@ extension FileEndpoint: SMSEndpoint {
MultiPartFormData(field: "file", data: file, fileName: fileName)
])

case let .imageUpload(image, fileName):
return .uploadMultipart([
MultiPartFormData(field: "file", data: image, fileName: fileName)
])

default:
return .requestPlain
}
}

var jwtTokenType: JwtTokenType {
switch self {
case .dreamBookUpload:
case .dreamBookUpload, .imageUpload:
return .accessToken

default:
return .none
}
}

var headers: [String: String]? {
nil
}

var errorMap: [Int: ErrorType]? {
switch self {
case .dreamBookUpload:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
import Foundation

public struct SingleStudentEntity: Equatable {
public let id: String
public let profileImageURL: String
public let name: String
public let major: String
public let techStack: [String]

public init(profileImageURL: String, name: String, major: String, techStack: [String]) {
public init(id: String, profileImageURL: String, name: String, major: String, techStack: [String]) {
self.id = id
self.profileImageURL = profileImageURL
self.name = name
self.major = major
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ public struct FetchStudentListResponseDTO: Decodable {
public let isLast: Bool

public struct SingleStudentResponseDTO: Decodable {
public let id: String
public let profileImg: String
public let name: String
public let major: String
Expand All @@ -22,6 +23,7 @@ public struct FetchStudentListResponseDTO: Decodable {
public extension FetchStudentListResponseDTO.SingleStudentResponseDTO {
func toDomain() -> SingleStudentEntity {
SingleStudentEntity(
id: id,
profileImageURL: profileImg,
name: name,
major: major,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,10 @@ final class InputInformationIntent: InputInformationIntentProtocol {
let inputSchoolLifeInfo = state.inputSchoolLifeInformationObject,
let inputWorkInfo = state.inputWorkInfomationObject,
let militaryServiceType = state.militaryServiceType
else { return }
else {
model?.updateIsCompleteToInputAllInfo(isComplete: false)
return
}

model?.updateIsLoading(isLoading: true)
Task {
Expand Down Expand Up @@ -67,10 +70,12 @@ final class InputInformationIntent: InputInformationIntentProtocol {
)

try await inputInformationUseCase.execute(req: inputInformationRequest)
inputInformationDelegate?.completeToInputInformation()
model?.updateIsLoading(isLoading: false)
} catch {
model?.updateErrorMessage(message: error.localizedDescription)
model?.updateIsLoading(isLoading: false)
model?.updateIsCompleteToInputAllInfo(isComplete: false)
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ final class InputInformationModel: ObservableObject, InputInformationStateProtoc
var certificates: [String] = []
var militaryServiceType: MilitaryServiceType?
var languages: [InputStudentInformationRequestDTO.LanguageCertificate] = []
var isCompleteToInputAllInfo: Bool = false
@Published var isCompleteToInputAllInfo: Bool = false
}

extension InputInformationModel: InputInformationActionProtocol {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ struct InputProfileInfoView: View {
) {
intent.majorSheetIsRequired()
}
.keyboardType(.emailAddress)
.focused($focusField, equals: .email)
.titleWrapper("이메일")

Expand Down Expand Up @@ -105,6 +106,7 @@ struct InputProfileInfoView: View {
) {
focusField = .techStack
}
.keyboardType(.URL)
.focused($focusField, equals: .portfoilo)
.titleWrapper("포트폴리였 URL")

Expand Down
6 changes: 6 additions & 0 deletions Projects/Feature/MainFeature/Interface/MainBuildable.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import SwiftUI

public protocol MainBuildable {
associatedtype ViewType: View
func makeView(delegate: any MainDelegate) -> ViewType
}
Loading