-
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 #80 from YAPP-Github/feature/issue-56-manage-plan
[ISSUE-56] 약속 관리 UI 구현
- Loading branch information
Showing
14 changed files
with
526 additions
and
45 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
41 changes: 41 additions & 0 deletions
41
domain/src/main/java/com/yapp/growth/domain/entity/Plan.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,41 @@ | ||
package com.yapp.growth.domain.entity | ||
|
||
sealed class Plan( | ||
open val id: Int, | ||
open val title: String, | ||
open val isLeader: Boolean, | ||
open val category: String, // type? | ||
open val members: List<String>, | ||
) { | ||
data class WaitingPlan( | ||
override val id: Int, | ||
override val title: String, | ||
override val isLeader: Boolean = false, | ||
override val category: String, | ||
override val members: List<String>, | ||
val startTime: String, | ||
val endTime: String, | ||
) : Plan( | ||
id = id, | ||
title = title, | ||
isLeader = isLeader, | ||
category = category, | ||
members = members, | ||
) | ||
|
||
data class FixedPlan( | ||
override val id: Int, | ||
override val title: String, | ||
override val isLeader: Boolean = false, | ||
override val category: String, | ||
override val members: List<String>, | ||
val place: String, | ||
val date: String, | ||
) : Plan( | ||
id = id, | ||
title = title, | ||
isLeader = isLeader, | ||
category = category, | ||
members = members, | ||
) | ||
} |
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
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
presentation/src/main/java/com/yapp/growth/presentation/ui/main/manage/ManageContract.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,28 @@ | ||
package com.yapp.growth.presentation.ui.main.manage | ||
|
||
import com.yapp.growth.base.ViewEvent | ||
import com.yapp.growth.base.ViewSideEffect | ||
import com.yapp.growth.base.ViewState | ||
import com.yapp.growth.domain.entity.Plan | ||
|
||
class ManageContract { | ||
data class ManageViewState( | ||
val waitingPlans: List<Plan.WaitingPlan> = emptyList(), | ||
val fixedPlans: List<Plan.FixedPlan> = emptyList(), | ||
) : ViewState | ||
|
||
sealed class ManageSideEffect : ViewSideEffect { | ||
object NavigateToCreateScreen : ManageSideEffect() | ||
data class NavigateToFixPlanScreen(val planId: Int) : ManageSideEffect() | ||
data class NavigateToMemberResponseScreen(val planId: Int) : ManageSideEffect() | ||
data class NavigateToInvitationScreen(val planId: Int) : ManageSideEffect() | ||
data class SwitchTab(val tabIndex: Int) : ManageSideEffect() | ||
} | ||
|
||
sealed class ManageEvent : ViewEvent { | ||
object OnClickCreateButton : ManageEvent() | ||
data class OnClickWaitingPlan(val planId: Int) : ManageEvent() | ||
data class OnClickFixedPlan(val planId: Int) : ManageEvent() | ||
data class OnClickTab(val tabIndex: Int) : ManageEvent() | ||
} | ||
} |
Oops, something went wrong.