Skip to content

Commit

Permalink
[Feature] Schedule 화면 디자인 검수 (#85)
Browse files Browse the repository at this point in the history
  • Loading branch information
ajou4095 authored Feb 17, 2024
1 parent c5e58f4 commit 705ccb1
Show file tree
Hide file tree
Showing 16 changed files with 365 additions and 297 deletions.
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package ac.dnd.bookkeeping.android.data.remote.network.model.schedule

import ac.dnd.bookkeeping.android.data.remote.mapper.DataMapper
import ac.dnd.bookkeeping.android.domain.model.feature.relation.RelationSimple
import ac.dnd.bookkeeping.android.domain.model.feature.relation.RelationSimpleGroup
import ac.dnd.bookkeeping.android.domain.model.feature.schedule.Schedule
import ac.dnd.bookkeeping.android.domain.model.feature.schedule.ScheduleRelation
import ac.dnd.bookkeeping.android.domain.model.feature.schedule.ScheduleRelationGroup
import kotlinx.datetime.LocalDate
import kotlinx.datetime.LocalTime
import kotlinx.serialization.SerialName
Expand Down Expand Up @@ -44,6 +44,9 @@ data class GetScheduleItemRes(
relation = relation.toDomain(),
day = day,
event = event,
repeatType = null,
repeatFinish = null,
alarm = null,
time = time,
link = link,
location = location,
Expand All @@ -60,9 +63,9 @@ data class GetScheduleItemRelationRes(
val name: String,
@SerialName("group")
val group: GetScheduleItemRelationGroupRes
) : DataMapper<ScheduleRelation> {
override fun toDomain(): ScheduleRelation {
return ScheduleRelation(
) : DataMapper<RelationSimple> {
override fun toDomain(): RelationSimple {
return RelationSimple(
id = id,
name = name,
group = group.toDomain()
Expand All @@ -76,9 +79,9 @@ data class GetScheduleItemRelationGroupRes(
val id: Long,
@SerialName("name")
val name: String
) : DataMapper<ScheduleRelationGroup> {
override fun toDomain(): ScheduleRelationGroup {
return ScheduleRelationGroup(
) : DataMapper<RelationSimpleGroup> {
override fun toDomain(): RelationSimpleGroup {
return RelationSimpleGroup(
id = id,
name = name
)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
package ac.dnd.bookkeeping.android.data.remote.network.model.schedule

import ac.dnd.bookkeeping.android.data.remote.mapper.DataMapper
import ac.dnd.bookkeeping.android.domain.model.feature.relation.RelationSimple
import ac.dnd.bookkeeping.android.domain.model.feature.relation.RelationSimpleGroup
import ac.dnd.bookkeeping.android.domain.model.feature.schedule.AlarmRepeatType
import ac.dnd.bookkeeping.android.domain.model.feature.schedule.Schedule
import ac.dnd.bookkeeping.android.domain.model.feature.schedule.ScheduleRelation
import ac.dnd.bookkeeping.android.domain.model.feature.schedule.ScheduleRelationGroup
import kotlinx.datetime.LocalDate
import kotlinx.datetime.LocalDateTime
import kotlinx.datetime.LocalTime
import kotlinx.serialization.SerialName
import kotlinx.serialization.Serializable
Expand All @@ -19,6 +21,12 @@ data class GetScheduleRes(
val day: LocalDate,
@SerialName("event")
val event: String,
@SerialName("repeatType")
val repeatType: String = "",
@SerialName("repeatFinish")
val repeatFinish: LocalDate? = null,
@SerialName("alarm")
val alarm: LocalDateTime? = null,
@SerialName("time")
val time: LocalTime? = null,
@SerialName("link")
Expand All @@ -34,6 +42,9 @@ data class GetScheduleRes(
relation = relation.toDomain(),
day = day,
event = event,
repeatType = AlarmRepeatType.fromValue(repeatType),
repeatFinish = repeatFinish,
alarm = alarm,
time = time,
link = link,
location = location,
Expand All @@ -50,9 +61,9 @@ data class GetScheduleRelationRes(
val name: String,
@SerialName("group")
val group: GetScheduleRelationGroupRes
) : DataMapper<ScheduleRelation> {
override fun toDomain(): ScheduleRelation {
return ScheduleRelation(
) : DataMapper<RelationSimple> {
override fun toDomain(): RelationSimple {
return RelationSimple(
id = id,
name = name,
group = group.toDomain()
Expand All @@ -66,9 +77,9 @@ data class GetScheduleRelationGroupRes(
val id: Long,
@SerialName("name")
val name: String
) : DataMapper<ScheduleRelationGroup> {
override fun toDomain(): ScheduleRelationGroup {
return ScheduleRelationGroup(
) : DataMapper<RelationSimpleGroup> {
override fun toDomain(): RelationSimpleGroup {
return RelationSimpleGroup(
id = id,
name = name
)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
package ac.dnd.bookkeeping.android.data.repository.feature.schedule

import ac.dnd.bookkeeping.android.domain.model.feature.relation.RelationSimple
import ac.dnd.bookkeeping.android.domain.model.feature.relation.RelationSimpleGroup
import ac.dnd.bookkeeping.android.domain.model.feature.schedule.Alarm
import ac.dnd.bookkeeping.android.domain.model.feature.schedule.AlarmRelation
import ac.dnd.bookkeeping.android.domain.model.feature.schedule.AlarmRelationGroup
import ac.dnd.bookkeeping.android.domain.model.feature.schedule.AlarmRepeatType
import ac.dnd.bookkeeping.android.domain.model.feature.schedule.Schedule
import ac.dnd.bookkeeping.android.domain.model.feature.schedule.ScheduleRelation
import ac.dnd.bookkeeping.android.domain.model.feature.schedule.ScheduleRelationGroup
import ac.dnd.bookkeeping.android.domain.model.feature.schedule.UnrecordedSchedule
import ac.dnd.bookkeeping.android.domain.model.feature.schedule.UnrecordedScheduleRelation
import ac.dnd.bookkeeping.android.domain.model.feature.schedule.UnrecordedScheduleRelationGroup
Expand Down Expand Up @@ -97,16 +97,19 @@ class MockScheduleRepository @Inject constructor() : ScheduleRepository {
return Result.success(
Schedule(
id = 2378,
relation = ScheduleRelation(
relation = RelationSimple(
id = 4601,
name = "이다빈",
group = ScheduleRelationGroup(
group = RelationSimpleGroup(
id = 5690,
name = "친구"
)
),
day = LocalDate(2024, 2, 25),
event = "결혼",
repeatType = null,
repeatFinish = null,
alarm = LocalDateTime(2024, 2, 25, 12, 0),
time = LocalTime(12, 0),
link = "https://www.google.com/",
location = "롯데월드 호텔",
Expand All @@ -124,33 +127,39 @@ class MockScheduleRepository @Inject constructor() : ScheduleRepository {
listOf(
Schedule(
id = 2378,
relation = ScheduleRelation(
relation = RelationSimple(
id = 4601,
name = "이다빈",
group = ScheduleRelationGroup(
group = RelationSimpleGroup(
id = 5690,
name = "친구"
)
),
day = LocalDate(2024, 2, 25),
event = "결혼",
repeatType = null,
repeatFinish = null,
alarm = LocalDateTime(2024, 2, 25, 12, 0),
time = LocalTime(12, 0),
link = "https://www.google.com/",
location = "롯데월드 호텔",
memo = "메모입니다."
),
Schedule(
id = 23278,
relation = ScheduleRelation(
relation = RelationSimple(
id = 46201,
name = "김진우",
group = ScheduleRelationGroup(
group = RelationSimpleGroup(
id = 56290,
name = "가족"
)
),
day = LocalDate(2024, 2, 25),
event = "생일",
repeatType = null,
repeatFinish = null,
alarm = LocalDateTime(2024, 2, 25, 12, 0),
time = null,
link = "",
location = "",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,27 +1,20 @@
package ac.dnd.bookkeeping.android.domain.model.feature.schedule

import ac.dnd.bookkeeping.android.domain.model.feature.relation.RelationSimple
import kotlinx.datetime.LocalDate
import kotlinx.datetime.LocalDateTime
import kotlinx.datetime.LocalTime

data class Schedule(
val id: Long,
val relation: ScheduleRelation,
val relation: RelationSimple,
val day: LocalDate,
val event: String,
val repeatType: AlarmRepeatType?,
val repeatFinish: LocalDate?,
val alarm: LocalDateTime?,
val time: LocalTime?,
val link: String,
val location: String,
val memo: String
)

data class ScheduleRelation(
val id: Long,
val name: String,
val group: ScheduleRelationGroup
)

data class ScheduleRelationGroup(
val id: Long,
val name: String
)
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
package ac.dnd.bookkeeping.android.domain.usecase.feature.schedule

import ac.dnd.bookkeeping.android.domain.model.feature.schedule.Schedule
import ac.dnd.bookkeeping.android.domain.repository.ScheduleRepository
import javax.inject.Inject

class GetScheduleUseCase @Inject constructor(
private val scheduleRepository: ScheduleRepository
) {
suspend operator fun invoke(
id: Long
): Result<Schedule> {
return scheduleRepository.getSchedule(
id = id
)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ import com.chargemap.compose.numberpicker.NumberPicker
import com.holix.android.bottomsheetdialog.compose.BottomSheetDialogProperties
import kotlinx.datetime.LocalTime

// TODO : 0:00, 12:00 ~ 24:00 정상동작 안함.
@Composable
fun TimePicker(
localTime: LocalTime = LocalTime(0, 0),
Expand Down Expand Up @@ -141,6 +142,7 @@ fun TimePicker(
@Composable
fun TimePickerPreview() {
TimePicker(
localTime = LocalTime(11, 0),
onDismissRequest = {},
onConfirm = {}
)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package ac.dnd.bookkeeping.android.presentation.ui.main.home

import ac.dnd.bookkeeping.android.presentation.R
import ac.dnd.bookkeeping.android.presentation.common.theme.Gray000
import ac.dnd.bookkeeping.android.presentation.common.theme.Icon24
import ac.dnd.bookkeeping.android.presentation.common.util.LaunchedEffectWithLifecycle
import ac.dnd.bookkeeping.android.presentation.common.util.coroutine.event.EventFlow
Expand Down Expand Up @@ -179,7 +180,7 @@ private fun HomeBottomBarScreen(
) {
BottomNavigation(
elevation = 0.dp,
backgroundColor = Color.LightGray,
backgroundColor = Gray000,
modifier = Modifier
.fillMaxWidth()
.height(54.dp)
Expand Down
Loading

0 comments on commit 705ccb1

Please sign in to comment.