feat: consume money projected event amounts
This commit is contained in:
@@ -42,24 +42,22 @@ describe("AccountEventsPage", () => {
|
||||
calculatedAt: "2026-08-14T00:00:00Z",
|
||||
events: [
|
||||
{
|
||||
amount: "1250",
|
||||
currency: "RUB",
|
||||
date: "2026-08-20",
|
||||
dateKind: "event",
|
||||
displayName: "ОФЗ 26238",
|
||||
figi: "FIGI",
|
||||
instrumentUid: "UID",
|
||||
projectedAmount: { currency: "RUB", value: "1250" },
|
||||
ticker: "OFZ",
|
||||
type: "coupon",
|
||||
},
|
||||
{
|
||||
amount: null,
|
||||
currency: null,
|
||||
date: "2026-08-25",
|
||||
dateKind: "event",
|
||||
displayName: "ОФЗ 26238",
|
||||
figi: "FIGI",
|
||||
instrumentUid: "UID",
|
||||
projectedAmount: null,
|
||||
ticker: "OFZ",
|
||||
type: "offer",
|
||||
},
|
||||
|
||||
@@ -104,8 +104,8 @@ const AccountEventRow: FC<AccountEventRowProps> = (props) => {
|
||||
</Stack>
|
||||
<Stack gap={2} align="flex-end">
|
||||
<Text fw={700}>
|
||||
{event.amount && event.currency
|
||||
? formatMoney({ currency: event.currency, value: event.amount })
|
||||
{event.projectedAmount
|
||||
? formatMoney(event.projectedAmount)
|
||||
: t("events.noAmount")}
|
||||
</Text>
|
||||
<Text c="dimmed" size="sm">
|
||||
|
||||
@@ -119,8 +119,7 @@ function mockLoadedAccountPage() {
|
||||
instrumentUid: null,
|
||||
ticker: `BND${index}`,
|
||||
displayName: `Купон ${index}`,
|
||||
currency: "RUB",
|
||||
amount: String(index + 1),
|
||||
projectedAmount: { currency: "RUB", value: String(index + 1) },
|
||||
})),
|
||||
}),
|
||||
),
|
||||
|
||||
@@ -54,8 +54,8 @@ const RecentEvent: FC<RecentEventProps> = (props) => {
|
||||
<Paper className={classes.cash} withBorder>
|
||||
<Text>{`${t(`events.type.${event.type}`)} · ${event.displayName}`}</Text>
|
||||
<Text fw={700}>
|
||||
{event.amount && event.currency
|
||||
? formatMoney({ currency: event.currency, value: event.amount })
|
||||
{event.projectedAmount
|
||||
? formatMoney(event.projectedAmount)
|
||||
: t("events.noAmount")}
|
||||
</Text>
|
||||
</Paper>
|
||||
|
||||
Reference in New Issue
Block a user