Merged in fix/my-stay-ancillaries (pull request #1663)
fix: small design fix, fix bug that redirects to planet, add translations * fix: small design fix, fix bug that redirects to planet, add translations * fix: if user does not have enough points, default quantitywithcard to 1 * fix: fix pr comment Approved-by: Linus Flood Approved-by: Matilda Landström
This commit is contained in:
@@ -140,6 +140,7 @@ export default function PaymentClient({
|
||||
if (result.reservationStatus == BookingStatusEnum.BookingCompleted) {
|
||||
const confirmationUrl = `${bookingConfirmation(lang)}?${BOOKING_CONFIRMATION_NUMBER}=${result.id}`
|
||||
router.push(confirmationUrl)
|
||||
return
|
||||
}
|
||||
|
||||
setBookingNumber(result.id)
|
||||
|
||||
@@ -74,7 +74,7 @@
|
||||
padding-bottom: var(--Space-x025);
|
||||
}
|
||||
|
||||
.divider {
|
||||
.pointsDivider {
|
||||
display: flex;
|
||||
gap: var(--Space-x2);
|
||||
height: 24px;
|
||||
|
||||
@@ -80,10 +80,13 @@ export default function AddAncillaryFlowModal({
|
||||
|
||||
const defaultDeliveryTime = deliveryTimeOptions[0].value
|
||||
|
||||
const hasInsufficientPoints =
|
||||
(user?.membership?.currentPoints ?? 0) < (selectedAncillary?.points ?? 0)
|
||||
|
||||
const formMethods = useForm<AncillaryFormData>({
|
||||
defaultValues: {
|
||||
quantityWithPoints: null,
|
||||
quantityWithCard: user ? null : 1,
|
||||
quantityWithCard: !user || hasInsufficientPoints ? 1 : null,
|
||||
deliveryTime: defaultDeliveryTime,
|
||||
optionalText: "",
|
||||
termsAndConditions: false,
|
||||
@@ -320,7 +323,7 @@ export default function AddAncillaryFlowModal({
|
||||
</p>
|
||||
</Typography>
|
||||
{selectedAncillary.points && (
|
||||
<div className={styles.divider}>
|
||||
<div className={styles.pointsDivider}>
|
||||
<Divider variant="vertical" color="subtle" />
|
||||
<Typography variant="Body/Paragraph/mdBold">
|
||||
<p>
|
||||
|
||||
Reference in New Issue
Block a user