generated from ajou4095/template-android
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* [Fix]: 오류 수정 * [Feat]: 1차 수정 * [Fix]: 오류 & 구조 수정
- Loading branch information
Showing
13 changed files
with
573 additions
and
12 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -48,8 +48,5 @@ fun FieldSubject( | |
) | ||
} | ||
} | ||
Spacer( | ||
modifier = Modifier.height(18.dp) | ||
) | ||
} | ||
} |
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
8 changes: 8 additions & 0 deletions
8
.../bookkeeping/android/presentation/ui/main/home/common/relation/add/AddRelationConstant.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,8 @@ | ||
package ac.dnd.bookkeeping.android.presentation.ui.main.home.common.relation.add | ||
|
||
object AddRelationConstant { | ||
const val ROUTE: String = "addName" | ||
|
||
const val ROUTE_ARGUMENT_MODEL = "relation" | ||
const val CONTAIN_RELATION = "${ROUTE}/{${ROUTE_ARGUMENT_MODEL}}" | ||
} |
46 changes: 46 additions & 0 deletions
46
...okkeeping/android/presentation/ui/main/home/common/relation/add/AddRelationDestination.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,46 @@ | ||
package ac.dnd.bookkeeping.android.presentation.ui.main.home.common.relation.add | ||
|
||
import ac.dnd.bookkeeping.android.presentation.common.util.ErrorObserver | ||
import ac.dnd.bookkeeping.android.presentation.ui.main.ApplicationState | ||
import androidx.compose.runtime.getValue | ||
import androidx.hilt.navigation.compose.hiltViewModel | ||
import androidx.lifecycle.compose.collectAsStateWithLifecycle | ||
import androidx.navigation.NavGraphBuilder | ||
import androidx.navigation.compose.composable | ||
|
||
fun NavGraphBuilder.AddRelationDestination( | ||
appState: ApplicationState | ||
) { | ||
|
||
composable( | ||
route = AddRelationConstant.ROUTE | ||
) { | ||
val viewModel: AddRelationViewModel = hiltViewModel() | ||
|
||
val model: AddRelationModel = let { | ||
val state by viewModel.state.collectAsStateWithLifecycle() | ||
val groups by viewModel.groups.collectAsStateWithLifecycle() | ||
|
||
AddRelationModel( | ||
state = state, | ||
groups = groups | ||
) | ||
} | ||
|
||
ErrorObserver(viewModel) | ||
|
||
AddRelationScreen( | ||
appState = appState, | ||
model = model, | ||
event = viewModel.event, | ||
intent = viewModel::onIntent, | ||
handler = viewModel.handler | ||
) | ||
} | ||
|
||
composable( | ||
route = AddRelationConstant.CONTAIN_RELATION | ||
) { | ||
// TODO Edit relation | ||
} | ||
} |
7 changes: 7 additions & 0 deletions
7
...dnd/bookkeeping/android/presentation/ui/main/home/common/relation/add/AddRelationEvent.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,7 @@ | ||
package ac.dnd.bookkeeping.android.presentation.ui.main.home.common.relation.add | ||
|
||
sealed interface AddRelationEvent { | ||
sealed interface Submit : AddRelationEvent { | ||
data object Success : Submit | ||
} | ||
} |
10 changes: 10 additions & 0 deletions
10
...nd/bookkeeping/android/presentation/ui/main/home/common/relation/add/AddRelationIntent.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,10 @@ | ||
package ac.dnd.bookkeeping.android.presentation.ui.main.home.common.relation.add | ||
|
||
sealed interface AddRelationIntent { | ||
data class OnClickSubmit( | ||
val groupId: Long, | ||
val name: String, | ||
val imageUrl: String, | ||
val memo: String | ||
) : AddRelationIntent | ||
} |
10 changes: 10 additions & 0 deletions
10
...dnd/bookkeeping/android/presentation/ui/main/home/common/relation/add/AddRelationModel.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,10 @@ | ||
package ac.dnd.bookkeeping.android.presentation.ui.main.home.common.relation.add | ||
|
||
import ac.dnd.bookkeeping.android.domain.model.feature.group.Group | ||
import androidx.compose.runtime.Immutable | ||
|
||
@Immutable | ||
data class AddRelationModel( | ||
val state: AddRelationState, | ||
val groups: List<Group> | ||
) |
Oops, something went wrong.