-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #33 from Noostak/feat/NST-15/groupDetail
[Feat/NST-13] 그룹상세화면 구현
- Loading branch information
Showing
17 changed files
with
864 additions
and
24 deletions.
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.