Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Qa/15 21 sent card #148

Merged
merged 8 commits into from
Feb 13, 2024
Original file line number Diff line number Diff line change
Expand Up @@ -141,16 +141,17 @@ fun SentEnvelopeScreen(
),
) {
Text(
text = stringResource(R.string.sent_envelope_card_monee_total) + uiState.envelopeInfo.totalAmounts.toMoneyFormat() +
stringResource(R.string.sent_envelope_card_money_won),
text = stringResource(R.string.sent_envelope_card_money_total, uiState.envelopeInfo.totalAmounts.toMoneyFormat()),
style = SusuTheme.typography.title_m,
color = Gray100,
)
Spacer(modifier = modifier.size(SusuTheme.spacing.spacing_xxs))
SusuBadge(
color = BadgeColor.Gray30,
text = (uiState.envelopeInfo.receivedAmounts - uiState.envelopeInfo.sentAmounts).toMoneyFormat() +
stringResource(R.string.sent_envelope_card_money_won),
text = stringResource(
R.string.sent_envelope_card_money_sent_received,
(uiState.envelopeInfo.receivedAmounts - uiState.envelopeInfo.sentAmounts).toMoneyFormat(),
),
padding = BadgeStyle.smallBadge,
)
Spacer(modifier = modifier.size(SusuTheme.spacing.spacing_xl))
Expand Down Expand Up @@ -183,12 +184,12 @@ fun SentEnvelopeScreen(
horizontalArrangement = Arrangement.SpaceBetween,
) {
Text(
text = uiState.envelopeInfo.sentAmounts.toMoneyFormat() + stringResource(R.string.sent_envelope_card_money_won),
text = stringResource(R.string.sent_envelope_card_money_sent_received, uiState.envelopeInfo.sentAmounts.toMoneyFormat()),
style = SusuTheme.typography.title_xxxxs,
color = Gray90,
)
Text(
text = uiState.envelopeInfo.receivedAmounts.toMoneyFormat() + stringResource(R.string.sent_envelope_card_money_won),
text = stringResource(R.string.sent_envelope_card_money_sent_received, uiState.envelopeInfo.receivedAmounts.toMoneyFormat()),
style = SusuTheme.typography.title_xxxxs,
color = Gray60,
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ import androidx.compose.ui.graphics.StrokeCap
import androidx.compose.ui.layout.ContentScale
import androidx.compose.ui.res.painterResource
import androidx.compose.ui.res.stringResource
import androidx.compose.ui.text.style.TextOverflow
import androidx.compose.ui.unit.dp
import com.susu.core.designsystem.component.badge.BadgeColor
import com.susu.core.designsystem.component.badge.BadgeStyle
Expand All @@ -56,7 +57,10 @@ fun SentCard(
modifier = Modifier
.clip(shape = RoundedCornerShape(4.dp))
.fillMaxWidth()
.background(SusuTheme.colorScheme.background10),
.background(SusuTheme.colorScheme.background10)
.susuClickable {
onClickHistoryShowAll(state.friend.id)
},
) {
Image(
painter = painterResource(id = R.drawable.img_envelope),
Expand All @@ -71,19 +75,25 @@ fun SentCard(
Row(
verticalAlignment = Alignment.CenterVertically,
) {
Text(
text = state.friend.name,
style = SusuTheme.typography.title_xs,
color = Gray100,
)
Spacer(modifier = Modifier.size(SusuTheme.spacing.spacing_s))
SusuBadge(
color = BadgeColor.Gray20,
text = stringResource(R.string.sent_envelope_card_monee_total) + state.totalAmounts.toMoneyFormat() +
stringResource(R.string.sent_envelope_card_money_won),
padding = BadgeStyle.smallBadge,
)
Spacer(modifier = Modifier.weight(1f))
Row(
modifier = Modifier.weight(1f),
) {
Text(
text = state.friend.name,
style = SusuTheme.typography.title_xs,
color = Gray100,
maxLines = 1,
overflow = TextOverflow.Ellipsis,
modifier = Modifier.weight(1f, false),
)
Spacer(modifier = Modifier.size(SusuTheme.spacing.spacing_s))
SusuBadge(
color = BadgeColor.Gray20,
text = stringResource(R.string.sent_envelope_card_money_total, state.totalAmounts.toMoneyFormat()),
padding = BadgeStyle.smallBadge,
)
}
Spacer(modifier = Modifier.size(SusuTheme.spacing.spacing_xxs))
Icon(
painter = painterResource(id = R.drawable.ic_arrow_down),
contentDescription = stringResource(R.string.content_description_envelope_show_history),
Expand Down Expand Up @@ -132,12 +142,12 @@ fun SentCard(
horizontalArrangement = Arrangement.SpaceBetween,
) {
Text(
text = state.sentAmounts.toMoneyFormat() + stringResource(R.string.sent_envelope_card_money_won),
text = stringResource(R.string.sent_envelope_card_money_sent_received, state.sentAmounts.toMoneyFormat()),
style = SusuTheme.typography.title_xxxs,
color = Gray90,
)
Text(
text = state.receivedAmounts.toMoneyFormat() + stringResource(R.string.sent_envelope_card_money_won),
text = stringResource(R.string.sent_envelope_card_money_sent_received, state.receivedAmounts.toMoneyFormat()),
style = SusuTheme.typography.title_xxxs,
color = Gray60,
)
Expand Down
3 changes: 2 additions & 1 deletion feature/sent/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,8 @@
<string name="sent_envelope_add_date_to">λ‹˜μ—κ²Œ</string>
<string name="sent_envelope_add_phone_to">"λ‹˜μ˜ "</string>
<string name="sent_envelope_add_visited_to">"을 "</string>
<string name="sent_envelope_card_monee_total">"전체 "</string>
<string name="sent_envelope_card_money_total">전체 %1$s원</string>
<string name="sent_envelope_card_money_sent_received">%1$s원</string>
<string name="sent_envelope_card_money_won">원</string>

<string name="sent_envelope_detail_delete_title">λ΄‰νˆ¬λ₯Ό μ‚­μ œν• κΉŒμš”?</string>
Expand Down
Loading