-
Notifications
You must be signed in to change notification settings - Fork 0
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
[Feat/NST-13] 그룹상세화면 구현 #33
Merged
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 12 additions & 0 deletions
12
...ak_iOS/Noostak_iOS/Global/Resources/Assets.xcassets/ic_arrow_right.imageset/Contents.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{ | ||
"images" : [ | ||
{ | ||
"filename" : "Vector.svg", | ||
"idiom" : "universal" | ||
} | ||
], | ||
"info" : { | ||
"author" : "xcode", | ||
"version" : 1 | ||
} | ||
} |
3 changes: 3 additions & 0 deletions
3
...Noostak_iOS/Global/Resources/Assets.xcassets/ic_arrow_right.imageset/Vector.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 12 additions & 0 deletions
12
..._iOS/Noostak_iOS/Global/Resources/Assets.xcassets/ic_group_default.imageset/Contents.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{ | ||
"images" : [ | ||
{ | ||
"filename" : "Supervisor account.svg", | ||
"idiom" : "universal" | ||
} | ||
], | ||
"info" : { | ||
"author" : "xcode", | ||
"version" : 1 | ||
} | ||
} |
10 changes: 10 additions & 0 deletions
10
...obal/Resources/Assets.xcassets/ic_group_default.imageset/Supervisor account.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 12 additions & 0 deletions
12
Noostak_iOS/Noostak_iOS/Global/Resources/Assets.xcassets/ic_share.imageset/Contents.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{ | ||
"images" : [ | ||
{ | ||
"filename" : "icon_share.svg", | ||
"idiom" : "universal" | ||
} | ||
], | ||
"info" : { | ||
"author" : "xcode", | ||
"version" : 1 | ||
} | ||
} |
5 changes: 5 additions & 0 deletions
5
...S/Noostak_iOS/Global/Resources/Assets.xcassets/ic_share.imageset/icon_share.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 22 additions & 0 deletions
22
Noostak_iOS/Noostak_iOS/Presentation/GroupDetail/Reactor/ConfirmedCellReactor.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
// | ||
// ConfirmedCellReactor.swift | ||
// Noostak_iOS | ||
// | ||
// Created by 오연서 on 2/3/25. | ||
// | ||
|
||
import ReactorKit | ||
import RxSwift | ||
|
||
final class ConfirmedCellReactor: Reactor { | ||
typealias Action = NoAction | ||
struct State { | ||
let schedule: ExtendedSchedule | ||
} | ||
|
||
let initialState: State | ||
|
||
init(schedule: ExtendedSchedule) { | ||
self.initialState = State(schedule: schedule) | ||
} | ||
} |
134 changes: 134 additions & 0 deletions
134
Noostak_iOS/Noostak_iOS/Presentation/GroupDetail/Reactor/GroupDetailReactor.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,134 @@ | ||
// | ||
// GroupDetailReactor.swift | ||
// Noostak_iOS | ||
// | ||
// Created by 오연서 on 1/31/25. | ||
// | ||
|
||
import ReactorKit | ||
import RxSwift | ||
import UIKit | ||
|
||
final class GroupDetailReactor: Reactor { | ||
enum Action { | ||
case selectSegment(Int) // 세그먼트 선택 | ||
case loadInProgressData | ||
case loadConfirmedData | ||
} | ||
enum Mutation { | ||
case setSelectedSegment(Int) | ||
case setInProgressData([InProgressCellReactor]) | ||
case setConfirmedData([ConfirmedCellReactor]) | ||
} | ||
struct State { | ||
var selectedSegmentIndex: Int = 0 | ||
var inProgressCellReactors: [InProgressCellReactor] = [] | ||
var confirmedCellReactors: [ConfirmedCellReactor] = [] | ||
} | ||
|
||
let initialState = State( | ||
selectedSegmentIndex: 0, | ||
inProgressCellReactors: mockInProgressData.map { InProgressCellReactor(schedule: $0) }, | ||
confirmedCellReactors: mockConfirmedData.map { ConfirmedCellReactor(schedule: $0) } | ||
) | ||
|
||
func mutate(action: Action) -> Observable<Mutation> { | ||
switch action { | ||
case .selectSegment(let index): | ||
return Observable.just(.setSelectedSegment(index)) | ||
|
||
case .loadInProgressData: | ||
let reactors = mockInProgressData.map { InProgressCellReactor(schedule: $0) } | ||
return Observable.just(.setInProgressData(reactors)) | ||
|
||
case .loadConfirmedData: | ||
let reactors = mockConfirmedData.map { ConfirmedCellReactor(schedule: $0) } | ||
return Observable.just(.setConfirmedData(reactors)) | ||
} | ||
} | ||
|
||
func reduce(state: State, mutation: Mutation) -> State { | ||
var newState = state | ||
switch mutation { | ||
case .setSelectedSegment(let index): | ||
newState.selectedSegmentIndex = index | ||
|
||
case .setInProgressData(let reactors): | ||
newState.inProgressCellReactors = reactors | ||
|
||
case .setConfirmedData(let reactors): | ||
newState.confirmedCellReactors = reactors | ||
} | ||
return newState | ||
} | ||
} | ||
|
||
let mockInProgressData: [ExtendedSchedule] = [ | ||
ExtendedSchedule(schedule: Schedule(id: 1, | ||
name: "뉴스탹진행중", | ||
category: .hobby, | ||
selectionDates: [], | ||
selectionStartTime: Date(), | ||
selectionEndTime: Date()), | ||
date: "2024-09-05T10:00:00", | ||
startTime: "2024-09-05T10:00:00", | ||
endTime: "2024-09-05T18:00:00", | ||
availableMembers: [], | ||
unavailableMembers: [], | ||
groupMemberCount: 24, | ||
availableMemberCount: 11), | ||
ExtendedSchedule(schedule: Schedule(id: 2, | ||
name: "뉴스탹2", | ||
category: .important, | ||
selectionDates: [], | ||
selectionStartTime: Date(), | ||
selectionEndTime: Date()), | ||
date: "2024-09-05T10:00:00", | ||
startTime: "2024-09-05T10:00:00", | ||
endTime: "2024-09-05T18:00:00", | ||
availableMembers: [], | ||
unavailableMembers: [], | ||
groupMemberCount: 23, | ||
availableMemberCount: 12), | ||
ExtendedSchedule(schedule: Schedule(id: 1, | ||
name: "뉴스탹3", | ||
category: .hobby, | ||
selectionDates: [], | ||
selectionStartTime: Date(), | ||
selectionEndTime: Date()), | ||
date: "2024-09-05T10:00:00", | ||
startTime: "2024-09-05T10:00:00", | ||
endTime: "2024-09-05T18:00:00", | ||
availableMembers: [], | ||
unavailableMembers: [], | ||
groupMemberCount: 24, | ||
availableMemberCount: 11) | ||
] | ||
let mockConfirmedData: [ExtendedSchedule] = [ | ||
ExtendedSchedule(schedule: Schedule(id: 1, | ||
name: "뉴스탹유ㅏㄴ", | ||
category: .hobby, | ||
selectionDates: [], | ||
selectionStartTime: Date(), | ||
selectionEndTime: Date()), | ||
date: "2024-09-05T10:00:00", | ||
startTime: "2024-09-05T10:00:00", | ||
endTime: "2024-09-05T18:00:00", | ||
availableMembers: [], | ||
unavailableMembers: [], | ||
groupMemberCount: 24, | ||
availableMemberCount: 11), | ||
ExtendedSchedule(schedule: Schedule(id: 2, | ||
name: "뉴스탹2", | ||
category: .important, | ||
selectionDates: [], | ||
selectionStartTime: Date(), | ||
selectionEndTime: Date()), | ||
date: "2024-09-05T10:00:00", | ||
startTime: "2024-09-05T10:00:00", | ||
endTime: "2024-09-05T18:00:00", | ||
availableMembers: [], | ||
unavailableMembers: [], | ||
groupMemberCount: 23, | ||
availableMemberCount: 12) | ||
] |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NSTDateUtility는 모든 개발자들이 사용하는 유틸리티일거에요.
본 유틸리티에서 static func으로 추가하여 사용한다면, 불특정 다수의 개발자가 해당 함수를 사용할 수 있겠죠?
or
둘 중 하나로 골라서 진행해보시면 좋을 것 같아요!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
오우 이거 수정한다는걸 깜먹고 올렸네요 수정하고 올리겠슴당