diff --git a/scripts/lazy-route-bundle-baseline.json b/scripts/lazy-route-bundle-baseline.json
index 624f95f..6838a7f 100644
--- a/scripts/lazy-route-bundle-baseline.json
+++ b/scripts/lazy-route-bundle-baseline.json
@@ -1,11 +1,11 @@
{
- "src/app/routes/ProtectedLayout.tsx": 3077,
- "src/pages/account-events/index.ts": 4441,
- "src/pages/account-operations/index.ts": 13862,
- "src/pages/account/index.ts": 22402,
- "src/pages/accounts/index.ts": 6179,
- "src/pages/login/index.ts": 667,
- "src/pages/not-found/index.ts": 882,
- "src/pages/register/index.ts": 673,
- "src/pages/settings/index.ts": 39008
+ "src/app/routes/ProtectedLayout.tsx": 3057,
+ "src/pages/account-events/index.ts": 4364,
+ "src/pages/account-operations/index.ts": 13854,
+ "src/pages/account/index.ts": 24695,
+ "src/pages/accounts/index.ts": 6145,
+ "src/pages/login/index.ts": 662,
+ "src/pages/not-found/index.ts": 877,
+ "src/pages/register/index.ts": 668,
+ "src/pages/settings/index.ts": 38979
}
diff --git a/src/pages/account/ui/AccountPage.module.css b/src/pages/account/ui/AccountPage.module.css
index c8a92b9..26cff9d 100644
--- a/src/pages/account/ui/AccountPage.module.css
+++ b/src/pages/account/ui/AccountPage.module.css
@@ -32,6 +32,36 @@
color: var(--mantine-color-red-6);
}
+.stockCard {
+ padding: var(--mantine-spacing-md);
+}
+
+.stockMain {
+ display: grid;
+ grid-template-columns: auto minmax(0, 1fr) auto;
+ gap: var(--mantine-spacing-sm);
+ align-items: center;
+}
+
+.stockIdentity,
+.stockValue {
+ min-width: 0;
+}
+
+.stockIdentifiers {
+ overflow-wrap: anywhere;
+}
+
+.stockValue {
+ white-space: nowrap;
+}
+
+.stockMeta {
+ padding-top: var(--mantine-spacing-xs);
+ margin-top: var(--mantine-spacing-sm);
+ border-top: 1px solid var(--mantine-color-gray-2);
+}
+
.mono {
font-family: var(--mantine-font-family-monospace);
}
diff --git a/src/pages/account/ui/AccountPage.test.tsx b/src/pages/account/ui/AccountPage.test.tsx
index e87b69c..935e7d9 100644
--- a/src/pages/account/ui/AccountPage.test.tsx
+++ b/src/pages/account/ui/AccountPage.test.tsx
@@ -214,6 +214,36 @@ describe("AccountPage states", () => {
expect(screen.queryByRole("img", { name: "Абра" })).not.toBeInTheDocument();
});
+ it("groups stock supporting metrics into quiet single lines", () => {
+ renderPage(
+ ,
+ );
+
+ expect(screen.getByText("Количество: 2 · RU000QUIET1")).not.toHaveAttribute(
+ "data-line-clamp",
+ );
+ expect(
+ screen.getByText("Средняя цена: 11 ₽ · Доля: 100 %"),
+ ).toBeInTheDocument();
+ });
+
it("renders bond cards with logo, fallback, and signed unlabeled return like stocks", () => {
renderPage(
= (props) => {
- const { position, wide = false } = props;
+ const { position, wide = false, variant } = props;
const { t } = useTranslation();
+ const isStock = variant === "stock";
const returnClass = position.returnTone
? classes[position.returnTone]
: undefined;
@@ -25,6 +27,62 @@ const PositionCard: FC = (props) => {
value: position.returnText,
})
: null;
+ const identifierText = [
+ t("portfolio.quantity", { value: position.quantity }),
+ position.isin,
+ ]
+ .filter(Boolean)
+ .join(" · ");
+ const secondaryText = [
+ position.averagePurchasePrice
+ ? t("portfolio.avgPrice", {
+ value: formatMoney(position.averagePurchasePrice),
+ })
+ : null,
+ position.shareText
+ ? t("portfolio.share", { value: position.shareText })
+ : null,
+ ]
+ .filter(Boolean)
+ .join(" · ");
+
+ if (isStock)
+ return (
+
+
+
+
+
+ {position.displayName}
+
+
+ {identifierText}
+
+
+
+ {position.currentValue ? (
+
+ {formatMoney(position.currentValue)}
+
+ ) : null}
+ {returnText ? (
+
+ {returnText}
+
+ ) : null}
+
+
+ {secondaryText ? (
+
+ {secondaryText}
+
+ ) : null}
+
+ );
return (
diff --git a/src/pages/account/ui/components/PositionSection.view.tsx b/src/pages/account/ui/components/PositionSection.view.tsx
index e24973f..6289f26 100644
--- a/src/pages/account/ui/components/PositionSection.view.tsx
+++ b/src/pages/account/ui/components/PositionSection.view.tsx
@@ -20,6 +20,7 @@ const PositionSection: FC = (props) => {
key={`${position.figi}-${position.displayName}-${position.quantity}`}
position={position}
wide={section.wide}
+ variant={section.kind === "stocks" ? "stock" : undefined}
/>
))}