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}>
|
<div className={styles.paymentMobile}>
|
||||||
<Body>{intl.formatMessage({ id: "Total" })}</Body>
|
<Body>{intl.formatMessage({ id: "Total" })}</Body>
|
||||||
<Body textTransform="bold">
|
<Body textTransform="bold">
|
||||||
{`${ancillary.totalPrice} ${ancillary.currency}`}
|
{ancillary.currency.toLowerCase() === "points"
|
||||||
</Body>
|
? `${ancillary.totalPrice} ${intl.formatMessage({ id: "Points" })}`
|
||||||
<Divider
|
: `${ancillary.totalPrice} ${ancillary.currency}`}
|
||||||
variant="vertical"
|
|
||||||
color="baseSurfaceSubtleNormal"
|
|
||||||
/>
|
|
||||||
<Body textTransform="bold">
|
|
||||||
{intl.formatMessage(
|
|
||||||
{ id: "{value} points" },
|
|
||||||
{
|
|
||||||
value: ancillary.points,
|
|
||||||
}
|
|
||||||
)}
|
|
||||||
</Body>
|
</Body>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -121,16 +111,9 @@ export function AddedAncillaries({
|
|||||||
<div className={styles.payment}>
|
<div className={styles.payment}>
|
||||||
<Body>{intl.formatMessage({ id: "Total" })}</Body>
|
<Body>{intl.formatMessage({ id: "Total" })}</Body>
|
||||||
<Body textTransform="bold">
|
<Body textTransform="bold">
|
||||||
{`${ancillary.totalPrice} ${ancillary.currency}`}
|
{ancillary.currency.toLowerCase() === "points"
|
||||||
</Body>
|
? `${ancillary.totalPrice} ${intl.formatMessage({ id: "Points" })}`
|
||||||
<Divider variant="vertical" color="baseSurfaceSubtleNormal" />
|
: `${ancillary.totalPrice} ${ancillary.currency}`}
|
||||||
<Body textTransform="bold">
|
|
||||||
{intl.formatMessage(
|
|
||||||
{ id: "{value} points" },
|
|
||||||
{
|
|
||||||
value: ancillary.points,
|
|
||||||
}
|
|
||||||
)}
|
|
||||||
</Body>
|
</Body>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -93,7 +93,6 @@ export const packageSchema = z
|
|||||||
totalPrice: z.number().nullable(),
|
totalPrice: z.number().nullable(),
|
||||||
totalUnit: z.number().int().nullable(),
|
totalUnit: z.number().int().nullable(),
|
||||||
currency: z.string().default(""),
|
currency: z.string().default(""),
|
||||||
points: z.number().int().nullable(),
|
|
||||||
}),
|
}),
|
||||||
comment: z.string().nullable().optional(),
|
comment: z.string().nullable().optional(),
|
||||||
})
|
})
|
||||||
@@ -103,7 +102,6 @@ export const packageSchema = z
|
|||||||
comment: packageData.comment,
|
comment: packageData.comment,
|
||||||
code: packageData.code,
|
code: packageData.code,
|
||||||
currency: packageData.price.currency,
|
currency: packageData.price.currency,
|
||||||
points: packageData.price.points,
|
|
||||||
totalPrice: packageData.price.totalPrice ?? 0,
|
totalPrice: packageData.price.totalPrice ?? 0,
|
||||||
totalUnit: packageData.price.totalUnit ?? 0,
|
totalUnit: packageData.price.totalUnit ?? 0,
|
||||||
unit: packageData.price.unit ?? 0,
|
unit: packageData.price.unit ?? 0,
|
||||||
|
|||||||
Reference in New Issue
Block a user