-
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 #122 from 2rabs/rt/add-schedule-detail-screen
✨ スケジュール詳細画面を追加
- Loading branch information
Showing
19 changed files
with
660 additions
and
2 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
28 changes: 28 additions & 0 deletions
28
app/ios/Modules/Sources/Schedule/ComposeScheduleDetailScreen.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,28 @@ | ||
import KmpContainer | ||
import NitoKmp | ||
import SwiftUI | ||
import UIKit | ||
|
||
public struct ComposeScheduleDetailScreen: UIViewControllerRepresentable { | ||
private let scheduleId: String | ||
|
||
public init(scheduleId: String) { | ||
self.scheduleId = scheduleId | ||
} | ||
|
||
public func makeUIViewController(context: Context) -> UIViewController { | ||
return ScheduleDetailScreen_iosKt.ScheduleDetailRouteViewController( | ||
id: scheduleId, | ||
stateMachine: ScheduleDetailStateMachine( | ||
id: scheduleId, | ||
fetchParticipantScheduleById: Container.shared.get( | ||
type: FetchParticipantScheduleByIdUseCase.self), | ||
userMessageStateHolder: Container.shared.get(type: UserMessageStateHolder.self), | ||
dateTimeFormatter: Container.shared.get(type: CommonNitoDateFormatter.self) | ||
) | ||
) | ||
} | ||
|
||
public func updateUIViewController(_ uiViewController: UIViewController, context: Context) { | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
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
5 changes: 5 additions & 0 deletions
5
...e/schedule/src/commonMain/kotlin/club/nito/feature/schedule/detail/ScheduleDetailEvent.kt
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,5 @@ | ||
package club.nito.feature.schedule.detail | ||
|
||
public sealed class ScheduleDetailEvent { | ||
public data class NavigateToScheduleDetail(val scheduleId: String) : ScheduleDetailEvent() | ||
} |
9 changes: 9 additions & 0 deletions
9
.../schedule/src/commonMain/kotlin/club/nito/feature/schedule/detail/ScheduleDetailIntent.kt
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,9 @@ | ||
package club.nito.feature.schedule.detail | ||
|
||
import club.nito.core.domain.model.ParticipantSchedule | ||
|
||
public sealed class ScheduleDetailIntent { | ||
public data class ClickParticipate(val schedule: ParticipantSchedule) : ScheduleDetailIntent() | ||
public data class ClickParticipateSchedule(val schedule: ParticipantSchedule) : ScheduleDetailIntent() | ||
public data object ClickDismissConfirmParticipateDialog : ScheduleDetailIntent() | ||
} |
26 changes: 26 additions & 0 deletions
26
...edule/src/commonMain/kotlin/club/nito/feature/schedule/detail/ScheduleDetailNavigation.kt
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,26 @@ | ||
package club.nito.feature.schedule.detail | ||
|
||
import club.nito.core.model.schedule.ScheduleId | ||
import moe.tlaster.precompose.navigation.NavOptions | ||
import moe.tlaster.precompose.navigation.Navigator | ||
import moe.tlaster.precompose.navigation.RouteBuilder | ||
import moe.tlaster.precompose.navigation.path | ||
|
||
private const val ROUTE: String = "/schedules" | ||
|
||
public fun Navigator.navigateToScheduleDetail( | ||
id: ScheduleId, | ||
navOptions: NavOptions? = null, | ||
) { | ||
this.navigate("$ROUTE/$id", navOptions) | ||
} | ||
|
||
public fun RouteBuilder.scheduleDetailScreen() { | ||
scene( | ||
route = "$ROUTE/{id}", | ||
) { backStackEntry -> | ||
backStackEntry.path<String>("id")?.let { id -> | ||
ScheduleDetailRoute(id = id) | ||
} | ||
} | ||
} |
Oops, something went wrong.