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

merge :: 자습 신청 디테일 #158

Merged
merged 44 commits into from
Jan 3, 2023
Merged
Show file tree
Hide file tree
Changes from 36 commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
1a68523
Merge remote-tracking branch 'origin/develop' into 148-studyRoom-deta…
kimdaehee0824 Dec 24, 2022
3f96ca5
feat :: StudyRoomDetail 파일 생성
kimdaehee0824 Dec 25, 2022
f6efc40
feat :: toSmallDMSTimeString
kimdaehee0824 Dec 26, 2022
0092c14
feat :: StudyRoomSeatView
kimdaehee0824 Dec 26, 2022
2614ef8
fix :: fetchDetailStudyRoom urlPath 수정
kimdaehee0824 Dec 26, 2022
b5f2dca
feat :: Notice class 뭔가 꼬인거 해결
kimdaehee0824 Dec 26, 2022
8d73f1f
fix :: fetchSeatTypes urlPath 수정
kimdaehee0824 Dec 26, 2022
85e35e9
Merge remote-tracking branch 'origin/develop' into 148-studyRoom-deta…
kimdaehee0824 Dec 26, 2022
7859555
error :: 나중에 StudyRoonList 나오면 Revert 시킬거
kimdaehee0824 Dec 26, 2022
9763923
feat :: apply cancel 로직 뺴고 ViewModel 완성
kimdaehee0824 Dec 26, 2022
027af99
feat :: DMSSeatButton DesignSystem에 추가
kimdaehee0824 Dec 26, 2022
0dbec0f
feat :: SeatButton 그림자 추가
kimdaehee0824 Dec 26, 2022
bb67369
feat :: HexColor 추가
kimdaehee0824 Dec 27, 2022
0d50dec
fix :: DetailStudyRoomEntity 휴먼 에러 수정
kimdaehee0824 Dec 27, 2022
9b2a43a
feat ::각종 Entity에 Hashable 추가
kimdaehee0824 Dec 27, 2022
afb5d45
feat :: 일단 코드 만들어 놨는데 ViewModel 상속 안되서 바꿀 예정
kimdaehee0824 Dec 27, 2022
db69c7c
fix :: signUp Toast 추가
kimdaehee0824 Dec 27, 2022
bc5047d
feat :: SeatView 우선 대충 완성
kimdaehee0824 Dec 27, 2022
3e11d7a
feat :: 다크모드
kimdaehee0824 Dec 27, 2022
03e83d1
Merge remote-tracking branch 'origin/develop' into 148-studyRoom-deta…
kimdaehee0824 Dec 27, 2022
edb7b9c
fix :: 머지 에러 해결
kimdaehee0824 Dec 27, 2022
b46d3a9
feat :: 폴더링 다시 하기
sian7563 Dec 27, 2022
c14c1ee
feat :: 이름 수정
sian7563 Dec 27, 2022
35d2b82
feat :: DesignSystem 에 있는 파일 옮기기
sian7563 Dec 27, 2022
cb452c7
feat :: Needle DI
baekteun Dec 28, 2022
6f5b1c8
feat :: 디테일 자습 가능시간 View + 자습실 아이템
baekteun Dec 28, 2022
f5c64e2
feat :: 다크 모드 로고 추가
kimdaehee0824 Dec 28, 2022
e1f680a
feat :: 뷰 넘기는 로직 수정
kimdaehee0824 Dec 28, 2022
9b38fcf
feat :: StudyRoomListCellView 학년 처리
kimdaehee0824 Dec 28, 2022
a150cf6
feat :: toast 추가
kimdaehee0824 Dec 28, 2022
82fa6e4
feat :: fetchDetailStudyRoom 500 새로 처리
kimdaehee0824 Dec 28, 2022
78dbf7d
feat :: LazyHGrid로 변경
kimdaehee0824 Dec 28, 2022
5761a76
feat :: apply, del 로직추가
kimdaehee0824 Dec 28, 2022
53bf379
feat :: empty값 처리하기
kimdaehee0824 Dec 28, 2022
de5a54d
feat :: 자습 신청
baekteun Dec 28, 2022
5164987
feat :: 바텀.
baekteun Dec 28, 2022
d4c5567
feat :: default value -> optional
baekteun Dec 30, 2022
5d951d4
fix :: fetchSchoolList 에러 수정
kimdaehee0824 Jan 2, 2023
047057a
feat :: 오류s 해결s
baekteun Jan 2, 2023
13c8b93
Merge branch '148-studyRoom-detail-ui' of https://github.com/DSM-FLOW…
baekteun Jan 2, 2023
c29ccb3
feat :: 비밀번호 변경 rootPresentation
baekteun Jan 2, 2023
e459305
feat :: 자습실 버그 수정
baekteun Jan 2, 2023
05c4f07
fix :: 무차별 이메일 인증 폭격 고침
baekteun Jan 2, 2023
6e2bff8
:sparkles: :: 비번 변경
baekteun Jan 3, 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
4 changes: 2 additions & 2 deletions Projects/App/Sources/Application/DI/AppComponent.swift
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,8 @@ public extension AppComponent {
var homeComponent: HomeComponent {
HomeComponent(parent: self)
}
var applyComponent: ApplyComponent {
ApplyComponent(parent: self)
var studyRoomDetailComponent: StudyRoomDetailComponent {
StudyRoomDetailComponent(parent: self)
}
var noticeListComponent: NoticeListComponent {
NoticeListComponent(parent: self)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,8 @@ public extension AppComponent {
}

var logoutUseCase: any LogoutUseCase {
LogoutUseCaseImpl(authRepository: authRepository)
shared {
LogoutUseCaseImpl(authRepository: authRepository)
}
}
}
48 changes: 35 additions & 13 deletions Projects/App/Sources/Application/NeedleGenerated.swift
Original file line number Diff line number Diff line change
Expand Up @@ -340,16 +340,30 @@ private class HomeDependency443c4e1871277bd8432aProvider: HomeDependency {
private func factory67229cdf0f755562b2b1f47b58f8f304c97af4d5(_ component: NeedleFoundation.Scope) -> AnyObject {
return HomeDependency443c4e1871277bd8432aProvider(appComponent: parent1(component) as! AppComponent)
}
private class ApplyDependency468ec8d97f04fe0ebd10Provider: ApplyDependency {


init() {

private class StudyRoomDetailDependency00589e4f8d1416a01b43Provider: StudyRoomDetailDependency {
var fetchStudyAvailableTimeUseCase: any FetchStudyAvailableTimeUseCase {
return appComponent.fetchStudyAvailableTimeUseCase
}
var fetchSeatTypesUseCase: any FetchSeatTypesUseCase {
return appComponent.fetchSeatTypesUseCase
}
var fetchDetailStudyRoomUseCase: any FetchDetailStudyRoomUseCase {
return appComponent.fetchDetailStudyRoomUseCase
}
var applyStudyRoomSeatUseCase: any ApplyStudyRoomSeatUseCase {
return appComponent.applyStudyRoomSeatUseCase
}
var cancelStudyRoomSeatUseCase: any CancelStudyRoomSeatUseCase {
return appComponent.cancelStudyRoomSeatUseCase
}
private let appComponent: AppComponent
init(appComponent: AppComponent) {
self.appComponent = appComponent
}
}
/// ^->AppComponent->ApplyComponent
private func factory3cbfeafbe8b73941b232e3b0c44298fc1c149afb(_ component: NeedleFoundation.Scope) -> AnyObject {
return ApplyDependency468ec8d97f04fe0ebd10Provider()
/// ^->AppComponent->StudyRoomDetailComponent
private func factorya36f40c25dcb280bae0ff47b58f8f304c97af4d5(_ component: NeedleFoundation.Scope) -> AnyObject {
return StudyRoomDetailDependency00589e4f8d1416a01b43Provider(appComponent: parent1(component) as! AppComponent)
}
private class StudyRoomListDependencyef56e26c25d5de596604Provider: StudyRoomListDependency {
var fetchStudyRoomListUseCase: any FetchStudyRoomListUseCase {
Expand All @@ -358,6 +372,9 @@ private class StudyRoomListDependencyef56e26c25d5de596604Provider: StudyRoomList
var fetchStudyAvailableTimeUseCase: any FetchStudyAvailableTimeUseCase {
return appComponent.fetchStudyAvailableTimeUseCase
}
var studyRoomDetailComponent: StudyRoomDetailComponent {
return appComponent.studyRoomDetailComponent
}
private let appComponent: AppComponent
init(appComponent: AppComponent) {
self.appComponent = appComponent
Expand Down Expand Up @@ -500,7 +517,7 @@ extension AppComponent: Registration {
localTable["signupTermsComponent-SignupTermsComponent"] = { self.signupTermsComponent as Any }
localTable["mainTabComponent-MainTabComponent"] = { self.mainTabComponent as Any }
localTable["homeComponent-HomeComponent"] = { self.homeComponent as Any }
localTable["applyComponent-ApplyComponent"] = { self.applyComponent as Any }
localTable["studyRoomDetailComponent-StudyRoomDetailComponent"] = { self.studyRoomDetailComponent as Any }
localTable["noticeListComponent-NoticeListComponent"] = { self.noticeListComponent as Any }
localTable["myPageComponent-MyPageComponent"] = { self.myPageComponent as Any }
localTable["changeProfileComponent-ChangeProfileComponent"] = { self.changeProfileComponent as Any }
Expand Down Expand Up @@ -659,15 +676,20 @@ extension HomeComponent: Registration {
keyPathToName[\HomeDependency.fetchWhetherNewNoticeUseCase] = "fetchWhetherNewNoticeUseCase-any FetchWhetherNewNoticeUseCase"
}
}
extension ApplyComponent: Registration {
extension StudyRoomDetailComponent: Registration {
public func registerItems() {

keyPathToName[\StudyRoomDetailDependency.fetchStudyAvailableTimeUseCase] = "fetchStudyAvailableTimeUseCase-any FetchStudyAvailableTimeUseCase"
keyPathToName[\StudyRoomDetailDependency.fetchSeatTypesUseCase] = "fetchSeatTypesUseCase-any FetchSeatTypesUseCase"
keyPathToName[\StudyRoomDetailDependency.fetchDetailStudyRoomUseCase] = "fetchDetailStudyRoomUseCase-any FetchDetailStudyRoomUseCase"
keyPathToName[\StudyRoomDetailDependency.applyStudyRoomSeatUseCase] = "applyStudyRoomSeatUseCase-any ApplyStudyRoomSeatUseCase"
keyPathToName[\StudyRoomDetailDependency.cancelStudyRoomSeatUseCase] = "cancelStudyRoomSeatUseCase-any CancelStudyRoomSeatUseCase"
}
}
extension StudyRoomListComponent: Registration {
public func registerItems() {
keyPathToName[\StudyRoomListDependency.fetchStudyRoomListUseCase] = "fetchStudyRoomListUseCase-any FetchStudyRoomListUseCase"
keyPathToName[\StudyRoomListDependency.fetchStudyAvailableTimeUseCase] = "fetchStudyAvailableTimeUseCase-any FetchStudyAvailableTimeUseCase"
keyPathToName[\StudyRoomListDependency.studyRoomDetailComponent] = "studyRoomDetailComponent-StudyRoomDetailComponent"
}
}
extension AuthenticationEmailComponent: Registration {
Expand Down Expand Up @@ -720,7 +742,7 @@ private func registerProviderFactory(_ componentPath: String, _ factory: @escapi

#if !NEEDLE_DYNAMIC

private func register1() {
@inline(never) private func register1() {
registerProviderFactory("^->AppComponent", factoryEmptyDependencyProvider)
registerProviderFactory("^->AppComponent->SplashComponent", factoryace9f05f51d68f4c0677f47b58f8f304c97af4d5)
registerProviderFactory("^->AppComponent->SchoolConfirmationQuestionsComponent", factoryd462667f0418a53210fcf47b58f8f304c97af4d5)
Expand All @@ -740,7 +762,7 @@ private func register1() {
registerProviderFactory("^->AppComponent->RootComponent", factory264bfc4d4cb6b0629b40f47b58f8f304c97af4d5)
registerProviderFactory("^->AppComponent->SigninComponent", factory2882a056d84a613debccf47b58f8f304c97af4d5)
registerProviderFactory("^->AppComponent->HomeComponent", factory67229cdf0f755562b2b1f47b58f8f304c97af4d5)
registerProviderFactory("^->AppComponent->ApplyComponent", factory3cbfeafbe8b73941b232e3b0c44298fc1c149afb)
registerProviderFactory("^->AppComponent->StudyRoomDetailComponent", factorya36f40c25dcb280bae0ff47b58f8f304c97af4d5)
registerProviderFactory("^->AppComponent->StudyRoomListComponent", factory7451c5364e65ee2d46bbf47b58f8f304c97af4d5)
registerProviderFactory("^->AppComponent->AuthenticationEmailComponent", factory8798d0becd9d2870112af47b58f8f304c97af4d5)
registerProviderFactory("^->AppComponent->ChangePasswordComponent", factoryab7c4d87dab53e0a51b9f47b58f8f304c97af4d5)
Expand Down
10 changes: 0 additions & 10 deletions Projects/Features/ApplyFeature/Sources/ApplyComponent.swift

This file was deleted.

16 changes: 0 additions & 16 deletions Projects/Features/ApplyFeature/Sources/ApplyView.swift

This file was deleted.

5 changes: 0 additions & 5 deletions Projects/Features/ApplyFeature/Sources/ApplyViewModel.swift

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
import DesignSystem
import DomainModule
import Utility
import SwiftUI

struct StudyRoomListCellView: View {
var studyRoomEntity: StudyRoomEntity

var body: some View {
ZStack {
Color.System.surface
.cornerRadius(6)

VStack(alignment: .leading, spacing: 18) {
HStack(spacing: 14) {
Text("\(studyRoomEntity.floor)층")
.dmsFont(.body(.body3), color: .System.primary)

Text(studyRoomEntity.name)
.dmsFont(.body(.body3), color: .System.backgroundTitle)

Spacer()

Text("\(studyRoomEntity.inUseHeadcount)/\(studyRoomEntity.totalAvailableSeat)")
.dmsFont(.body(.body3), color: .GrayScale.gray5)
}

Text("\(gradeToString(studyRoomEntity.availableGrade)) \(studyRoomEntity.availableSex.displayString())")
.dmsFont(.body(.body3), color: .System.primary)
}
.padding(.vertical, 16)
.padding(.horizontal, 16)
}
.frame(height: 68)
.dmsShadow(style: .surface)
}

func gradeToString(_ grade: Int) -> String {
return grade == 0 ? "전학년" : String(grade) + "학년"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ struct StudyRoomNoticeView: View {
Spacer()
}
.background {
Color.GrayScale.gray1
Color.System.surface
}
.cornerRadius(100)
.padding(.horizontal, 24)
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
import SwiftUI
import DataMappingModule

public struct DMSSeatButton: View {
var text: String
var style: DMSSeatButtonStyle.Style
var color: Color
var isSelected: Bool
var action: () -> Void

public init(
text: String = "",
style: DMSSeatButtonStyle.Style = .empty,
color: Color = .blue,
isSelected: Bool = false,
action: @escaping () -> Void = {}
) {
self.text = text
self.style = style
self.color = color
self.isSelected = isSelected
self.action = action
}

public var body: some View {
Button(action: action) {
Text(text)
}
.buttonStyle(DMSSeatButtonStyle(style: style, color: color, isSelected: isSelected))
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@
import SwiftUI
import DataMappingModule

public struct DMSSeatButtonStyle: ButtonStyle {
public enum Style {
case available
case unavailable
case inUse
case empty
}
var style: Style
var color: Color
var isSelected: Bool

public func makeBody(configuration: Configuration) -> some View {
switch style {
case .available:
return AnyView(AvailableButton(configuration: configuration, color: color, isSelected: isSelected))
case .unavailable:
return AnyView(UnAvailableButton(configuration: configuration, color: color))
case .inUse:
return AnyView(InUseButton(configuration: configuration, color: color))
case .empty:
return AnyView(EmptyButton())
}
}
}

// MARK: - Available
extension DMSSeatButtonStyle {
struct AvailableButton: View {
let configuration: ButtonStyle.Configuration
let color: Color
let isSelected: Bool

var body: some View {
ZStack {
if isSelected {
Circle()
.strokeBorder(color)
} else {
Circle()
.foregroundColor(color)
}

configuration.label
.dmsFont(.etc(.overline), color: isSelected ? .GrayScale.gray7 : .GrayScale.gray1)
}
.frame(width: 40, height: 40)
.dmsShadow(style: .surface)
}
}
}

// MARK: - UnAvailable
extension DMSSeatButtonStyle {
struct UnAvailableButton: View {
let configuration: ButtonStyle.Configuration
let color: Color

var body: some View {
ZStack {
Circle()
.foregroundColor(.GrayScale.gray4)

Text("불가")
.dmsFont(.etc(.overline), color: .GrayScale.gray1)
}
.frame(width: 40, height: 40)
.dmsShadow(style: .surface)

}
}
}

// MARK: - InUse
extension DMSSeatButtonStyle {
struct InUseButton: View {
let configuration: ButtonStyle.Configuration
let color: Color

var body: some View {
ZStack {
Circle()
.foregroundColor(color)
.opacity(0.4)

configuration.label
.dmsFont(.etc(.overline), color: .GrayScale.gray1)
}
.frame(width: 40, height: 40)
.dmsShadow(style: .surface)

}
}
}

// MARK: - Empty
extension DMSSeatButtonStyle {
struct EmptyButton: View {
var body: some View {
ZStack {
Circle()
.foregroundColor(.clear)
}
.frame(width: 40, height: 40)

}
}
}
Loading