-
Notifications
You must be signed in to change notification settings - Fork 1
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 #299 from Nexters/feature/Boolti-298
Feature/boolti 298 공연 상세 UI 변경 (출연진 탭 추가)
- Loading branch information
Showing
14 changed files
with
442 additions
and
98 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
39 changes: 39 additions & 0 deletions
39
data/src/main/java/com/nexters/boolti/data/network/response/CastTeamsDto.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,39 @@ | ||
package com.nexters.boolti.data.network.response | ||
|
||
import com.nexters.boolti.domain.model.Cast | ||
import com.nexters.boolti.domain.model.CastTeams | ||
import kotlinx.serialization.Serializable | ||
import java.time.LocalDateTime | ||
import java.time.format.DateTimeFormatter | ||
|
||
@Serializable | ||
data class CastTeamsDto( | ||
val id: String = "", | ||
val name: String = "", | ||
val members: List<CastDto> = emptyList(), | ||
) { | ||
fun toDomain(): CastTeams = CastTeams( | ||
id = id, | ||
teamName = name, | ||
members = members.map(CastDto::toDomain), | ||
) | ||
|
||
@Serializable | ||
data class CastDto( | ||
val id: String = "", | ||
val userCode: String = "", | ||
val userImgPath: String? = null, | ||
val userNickname: String = "", | ||
val roleName: String = "", | ||
val createdAt: String = LocalDateTime.MIN.format(DateTimeFormatter.ISO_LOCAL_DATE_TIME), | ||
val modifiedAt: String?, | ||
) { | ||
fun toDomain(): Cast = Cast( | ||
id = id, | ||
userCode = userCode, | ||
photo = userImgPath, | ||
nickname = userNickname, | ||
roleName = roleName, | ||
) | ||
} | ||
} |
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
15 changes: 15 additions & 0 deletions
15
domain/src/main/java/com/nexters/boolti/domain/model/Cast.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,15 @@ | ||
package com.nexters.boolti.domain.model | ||
|
||
data class CastTeams( | ||
val id: String = "", | ||
val teamName: String = "", | ||
val members: List<Cast> = emptyList(), | ||
) | ||
|
||
data class Cast( | ||
val id: String = "", | ||
val userCode: String = "", | ||
val photo: String? = null, | ||
val nickname: String = "", | ||
val roleName: String = "", | ||
) |
4 changes: 3 additions & 1 deletion
4
domain/src/main/java/com/nexters/boolti/domain/repository/ShowRepository.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 |
---|---|---|
@@ -1,9 +1,11 @@ | ||
package com.nexters.boolti.domain.repository | ||
|
||
import com.nexters.boolti.domain.model.CastTeams | ||
import com.nexters.boolti.domain.model.Show | ||
import com.nexters.boolti.domain.model.ShowDetail | ||
|
||
interface ShowRepository { | ||
suspend fun search(keyword: String): Result<List<Show>> | ||
suspend fun searchById(id: String): Result<ShowDetail> | ||
} | ||
suspend fun requestCastTeams(showId: String): Result<List<CastTeams>> | ||
} |
42 changes: 42 additions & 0 deletions
42
presentation/src/main/java/com/nexters/boolti/presentation/component/UserThumbnail.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,42 @@ | ||
package com.nexters.boolti.presentation.component | ||
|
||
import androidx.compose.foundation.border | ||
import androidx.compose.foundation.layout.size | ||
import androidx.compose.foundation.shape.CircleShape | ||
import androidx.compose.material3.MaterialTheme | ||
import androidx.compose.runtime.Composable | ||
import androidx.compose.ui.Modifier | ||
import androidx.compose.ui.draw.clip | ||
import androidx.compose.ui.graphics.Color | ||
import androidx.compose.ui.layout.ContentScale | ||
import androidx.compose.ui.res.painterResource | ||
import androidx.compose.ui.unit.Dp | ||
import androidx.compose.ui.unit.dp | ||
import coil.compose.AsyncImage | ||
import com.nexters.boolti.presentation.R | ||
|
||
@Composable | ||
fun UserThumbnail( | ||
size: Dp, | ||
model: Any?, | ||
modifier: Modifier = Modifier, | ||
defaultImage: Int = R.drawable.ic_fallback_profile, | ||
outlineColor: Color = MaterialTheme.colorScheme.outline, | ||
contentDescription: String? = null, | ||
) { | ||
AsyncImage( | ||
modifier = modifier | ||
.size(size) | ||
.clip(shape = CircleShape) | ||
.border( | ||
width = 1.dp, | ||
color = outlineColor, | ||
shape = CircleShape, | ||
), | ||
model = model, | ||
contentDescription = contentDescription, | ||
placeholder = painterResource(id = defaultImage), | ||
fallback = painterResource(id = defaultImage), | ||
contentScale = ContentScale.Crop, | ||
) | ||
} |
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
Oops, something went wrong.