Merged in feat/update-earn-burn-description-for-non-transactional-types (pull request #2555)
feat(LOY-294): Empty Stay description if 0 nights and and non-transactional confirmationNumber * feat(LOY-294): Empty Stay description if 0 nights and and non-transactional confirmationNumber Approved-by: Matilda Landström
This commit is contained in:
@@ -4,7 +4,7 @@ import { usePathname } from "next/navigation"
|
||||
import { useIntl } from "react-intl"
|
||||
|
||||
import { dt } from "@scandic-hotels/common/dt"
|
||||
import Body from "@scandic-hotels/design-system/Body"
|
||||
import { Typography } from "@scandic-hotels/design-system/Typography"
|
||||
import { Transactions } from "@scandic-hotels/trpc/enums/transactions"
|
||||
|
||||
import { webviews } from "@/constants/routes/webviews"
|
||||
@@ -33,9 +33,12 @@ export default function Row({ transaction }: RowProps) {
|
||||
)
|
||||
|
||||
let description =
|
||||
transaction.hotelName && transaction.city
|
||||
? `${transaction.hotelName}, ${transaction.city} ${nightsMsg}`
|
||||
: `${nightsMsg}`
|
||||
transaction.confirmationNumber === "non-transactional" &&
|
||||
transaction.nights === 0
|
||||
? ""
|
||||
: transaction.hotelName && transaction.city
|
||||
? `${transaction.hotelName}, ${transaction.city} ${nightsMsg}`
|
||||
: `${nightsMsg}`
|
||||
|
||||
switch (transaction.type) {
|
||||
case Transactions.rewardType.stay:
|
||||
@@ -108,7 +111,9 @@ export default function Row({ transaction }: RowProps) {
|
||||
/>
|
||||
</Table.TD>
|
||||
<Table.TD>
|
||||
<Body textTransform="bold">{description}</Body>
|
||||
<Typography variant="Body/Paragraph/mdBold">
|
||||
<p>{description}</p>
|
||||
</Typography>
|
||||
</Table.TD>
|
||||
<Table.TD>{renderConfirmationNumber()}</Table.TD>
|
||||
<Table.TD>
|
||||
|
||||
Reference in New Issue
Block a user