-
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 #263 from Nexters/feature/256
feat/256 : 결제 내역에 선물 케이스 추가
- Loading branch information
Showing
31 changed files
with
462 additions
and
103 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
8 changes: 8 additions & 0 deletions
8
data/src/main/java/com/nexters/boolti/data/network/request/GiftCancelRequest.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 com.nexters.boolti.data.network.request | ||
|
||
import kotlinx.serialization.Serializable | ||
|
||
@Serializable | ||
data class GiftCancelRequest( | ||
val giftUuid: String, | ||
) |
64 changes: 64 additions & 0 deletions
64
data/src/main/java/com/nexters/boolti/data/network/response/GiftPaymentInfoResponse.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,64 @@ | ||
package com.nexters.boolti.data.network.response | ||
|
||
import com.nexters.boolti.data.network.response.ReservationDetailResponse.CardDetailResponse | ||
import com.nexters.boolti.data.network.response.ReservationDetailResponse.EasyPayDetailResponse | ||
import com.nexters.boolti.data.util.toLocalDateTime | ||
import com.nexters.boolti.data.util.toPaymentType | ||
import com.nexters.boolti.data.util.toReservationState | ||
import com.nexters.boolti.domain.model.ReservationDetail | ||
import kotlinx.serialization.SerialName | ||
import kotlinx.serialization.Serializable | ||
|
||
@Serializable | ||
internal data class GiftPaymentInfoResponse( | ||
val csReservationId: String, | ||
val showImg: String, | ||
val showName: String, | ||
val showDate: String, | ||
val salesTicketName: String, | ||
val salesTicketType: String, | ||
val ticketCount: Int, | ||
val salesEndTime: String, | ||
val meansType: String?, | ||
val totalAmountPrice: Int = 0, | ||
val reservationStatus: String, | ||
val senderName: String, | ||
val senderPhoneNumber: String, | ||
val recipientName: String = "", | ||
val recipientPhoneNumber: String = "", | ||
val giftId: String, | ||
val giftUuid: String, | ||
val giftMessage: String, | ||
val giftInvitePath: String, | ||
val cardDetail: CardDetailResponse? = null, | ||
val easyPayDetail: EasyPayDetailResponse? = null, | ||
) { | ||
fun toDomain(): ReservationDetail { | ||
return ReservationDetail( | ||
id = giftId, | ||
giftUuid = giftUuid, | ||
giftInviteImage = giftInvitePath, | ||
showImage = showImg, | ||
showName = showName, | ||
showDate = showDate.toLocalDateTime(), | ||
ticketName = salesTicketName, | ||
isInviteTicket = false, | ||
ticketCount = ticketCount, | ||
bankName = "", | ||
accountNumber = "", | ||
accountHolder = "", | ||
salesEndDateTime = salesEndTime.toLocalDateTime(), | ||
paymentType = meansType.toPaymentType(), | ||
totalAmountPrice = totalAmountPrice, | ||
reservationState = reservationStatus.toReservationState(), | ||
completedDateTime = null, | ||
visitorName = recipientName, | ||
visitorPhoneNumber = recipientPhoneNumber, | ||
depositorName = senderName, | ||
depositorPhoneNumber = senderPhoneNumber, | ||
csReservationId = csReservationId, | ||
cardDetail = cardDetail?.toDomain(), | ||
provider = easyPayDetail?.provider ?: "" | ||
) | ||
} | ||
} |
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
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
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 |
---|---|---|
|
@@ -6,5 +6,6 @@ enum class ReservationState { | |
RESERVED, | ||
REFUNDING, | ||
REFUNDED, | ||
REGISTERING_GIFT, | ||
UNDEFINED, | ||
} |
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
58 changes: 58 additions & 0 deletions
58
...ation/src/main/java/com/nexters/boolti/presentation/reservationdetail/ResendGiftButton.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,58 @@ | ||
package com.nexters.boolti.presentation.reservationdetail | ||
|
||
import androidx.compose.foundation.layout.Box | ||
import androidx.compose.foundation.layout.PaddingValues | ||
import androidx.compose.foundation.layout.fillMaxWidth | ||
import androidx.compose.foundation.layout.height | ||
import androidx.compose.foundation.layout.size | ||
import androidx.compose.foundation.shape.RoundedCornerShape | ||
import androidx.compose.material3.ButtonDefaults | ||
import androidx.compose.material3.Icon | ||
import androidx.compose.material3.MaterialTheme | ||
import androidx.compose.material3.Text | ||
import androidx.compose.material3.TextButton | ||
import androidx.compose.runtime.Composable | ||
import androidx.compose.ui.Alignment | ||
import androidx.compose.ui.Modifier | ||
import androidx.compose.ui.graphics.Color | ||
import androidx.compose.ui.res.painterResource | ||
import androidx.compose.ui.res.stringResource | ||
import androidx.compose.ui.text.style.TextAlign | ||
import androidx.compose.ui.unit.dp | ||
import com.nexters.boolti.presentation.R | ||
import com.nexters.boolti.presentation.theme.Grey95 | ||
import com.nexters.boolti.presentation.theme.KakaoYellow | ||
|
||
@Composable | ||
fun ResendGiftButton( | ||
onClick: () -> Unit, | ||
modifier: Modifier = Modifier, | ||
) { | ||
TextButton( | ||
onClick = onClick, | ||
modifier = modifier | ||
.fillMaxWidth() | ||
.height(48.dp), | ||
shape = RoundedCornerShape(4.dp), | ||
colors = ButtonDefaults.outlinedButtonColors(containerColor = KakaoYellow), | ||
contentPadding = PaddingValues(horizontal = 20.dp) | ||
) { | ||
Box( | ||
modifier = Modifier.fillMaxWidth(), | ||
contentAlignment = Alignment.CenterStart, | ||
) { | ||
Icon( | ||
painter = painterResource(R.drawable.ic_kakaotalk), contentDescription = null, | ||
modifier = Modifier.size(width = 20.dp, height = 20.dp), | ||
tint = Color.Black, | ||
) | ||
Text( | ||
stringResource(id = R.string.gift_resend_message), | ||
modifier = Modifier.fillMaxWidth(), | ||
style = MaterialTheme.typography.titleMedium, | ||
color = Grey95, | ||
textAlign = TextAlign.Center, | ||
) | ||
} | ||
} | ||
} |
9 changes: 5 additions & 4 deletions
9
...servations/ReservationDetailNavigation.kt → ...tiondetail/ReservationDetailNavigation.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,21 +1,22 @@ | ||
package com.nexters.boolti.presentation.screen.reservations | ||
package com.nexters.boolti.presentation.reservationdetail | ||
|
||
import androidx.navigation.NavGraphBuilder | ||
import androidx.navigation.compose.composable | ||
import com.nexters.boolti.presentation.screen.MainDestination | ||
import com.nexters.boolti.presentation.screen.reservationId | ||
|
||
fun NavGraphBuilder.ReservationDetailScreen( | ||
navigateTo: (String) -> Unit, | ||
popBackStack: () -> Unit, | ||
) { | ||
composable( | ||
route = "${MainDestination.ReservationDetail.route}/{$reservationId}", | ||
route = MainDestination.ReservationDetail.route, | ||
arguments = MainDestination.ReservationDetail.arguments, | ||
) { | ||
ReservationDetailScreen( | ||
onBackPressed = popBackStack, | ||
navigateToRefund = { id -> navigateTo("${MainDestination.Refund.route}/$id") }, | ||
navigateToRefund = { id, isGift -> | ||
navigateTo(MainDestination.Refund.createRoute(id = id, isGift = isGift)) | ||
}, | ||
) | ||
} | ||
} |
Oops, something went wrong.