Merged in fix/api-change-remove-points-packages (pull request #1547)
Fix/api change remove points packages * fix/remove-points * fix: translate if points is currency Approved-by: Niclas Edenvin Approved-by: Simon.Emanuelsson
This commit is contained in:
@@ -66,19 +66,9 @@ export function AddedAncillaries({
|
||||
<div className={styles.paymentMobile}>
|
||||
<Body>{intl.formatMessage({ id: "Total" })}</Body>
|
||||
<Body textTransform="bold">
|
||||
{`${ancillary.totalPrice} ${ancillary.currency}`}
|
||||
</Body>
|
||||
<Divider
|
||||
variant="vertical"
|
||||
color="baseSurfaceSubtleNormal"
|
||||
/>
|
||||
<Body textTransform="bold">
|
||||
{intl.formatMessage(
|
||||
{ id: "{value} points" },
|
||||
{
|
||||
value: ancillary.points,
|
||||
}
|
||||
)}
|
||||
{ancillary.currency.toLowerCase() === "points"
|
||||
? `${ancillary.totalPrice} ${intl.formatMessage({ id: "Points" })}`
|
||||
: `${ancillary.totalPrice} ${ancillary.currency}`}
|
||||
</Body>
|
||||
</div>
|
||||
</div>
|
||||
@@ -121,16 +111,9 @@ export function AddedAncillaries({
|
||||
<div className={styles.payment}>
|
||||
<Body>{intl.formatMessage({ id: "Total" })}</Body>
|
||||
<Body textTransform="bold">
|
||||
{`${ancillary.totalPrice} ${ancillary.currency}`}
|
||||
</Body>
|
||||
<Divider variant="vertical" color="baseSurfaceSubtleNormal" />
|
||||
<Body textTransform="bold">
|
||||
{intl.formatMessage(
|
||||
{ id: "{value} points" },
|
||||
{
|
||||
value: ancillary.points,
|
||||
}
|
||||
)}
|
||||
{ancillary.currency.toLowerCase() === "points"
|
||||
? `${ancillary.totalPrice} ${intl.formatMessage({ id: "Points" })}`
|
||||
: `${ancillary.totalPrice} ${ancillary.currency}`}
|
||||
</Body>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -93,7 +93,6 @@ export const packageSchema = z
|
||||
totalPrice: z.number().nullable(),
|
||||
totalUnit: z.number().int().nullable(),
|
||||
currency: z.string().default(""),
|
||||
points: z.number().int().nullable(),
|
||||
}),
|
||||
comment: z.string().nullable().optional(),
|
||||
})
|
||||
@@ -103,7 +102,6 @@ export const packageSchema = z
|
||||
comment: packageData.comment,
|
||||
code: packageData.code,
|
||||
currency: packageData.price.currency,
|
||||
points: packageData.price.points,
|
||||
totalPrice: packageData.price.totalPrice ?? 0,
|
||||
totalUnit: packageData.price.totalUnit ?? 0,
|
||||
unit: packageData.price.unit ?? 0,
|
||||
|
||||
Reference in New Issue
Block a user