Browse Source

Bugfix/storybook story of portfolio filter form (#7564)

* Fix holdings mock

* Update changelog
pull/7525/head
Thomas Kaul 20 hours ago
committed by GitHub
parent
commit
6361c604fc
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 1
      CHANGELOG.md
  2. 74
      libs/ui/src/lib/portfolio-filter-form/portfolio-filter-form.component.stories.ts

1
CHANGELOG.md

@ -17,6 +17,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Fixed
- Fixed the check for duplicates in the preview step of the activities import for activities without a comment
- Fixed the holdings mock data in the _Storybook_ story of the portfolio filter form component
## 3.44.0 - 2026-08-07

74
libs/ui/src/lib/portfolio-filter-form/portfolio-filter-form.component.stories.ts

@ -1,8 +1,44 @@
import { AccountWithPlatform } from '@ghostfolio/common/types';
import '@angular/localize/init';
import { Meta, moduleMetadata, StoryObj } from '@storybook/angular';
import { holdings } from '../mocks/holdings';
import { GfPortfolioFilterFormComponent } from './portfolio-filter-form.component';
const accounts: AccountWithPlatform[] = [
{
comment: null,
createdAt: new Date('2025-06-01T06:53:10.569Z'),
currency: 'USD',
id: '733110b6-7c55-44eb-8cc5-c4c3e9d48a79',
name: 'Trading Account',
platform: {
id: '9da3a8a7-4795-43e3-a6db-ccb914189737',
name: 'Interactive Brokers',
url: 'https://interactivebrokers.com'
},
platformId: '9da3a8a7-4795-43e3-a6db-ccb914189737',
updatedAt: new Date('2025-06-01T06:53:10.569Z'),
userId: '081aa387-487d-4438-83a4-3060eb2a016e'
},
{
comment: null,
createdAt: new Date('2025-06-01T06:48:53.055Z'),
currency: 'USD',
id: '24ba27d6-e04b-4fb4-b856-b24c2ef0422a',
name: 'Investment Account',
platform: {
id: '43e8fcd1-5b79-4100-b678-d2229bd1660d',
name: 'Fidelity',
url: 'https://www.fidelity.com'
},
platformId: '43e8fcd1-5b79-4100-b678-d2229bd1660d',
updatedAt: new Date('2025-06-01T06:48:53.055Z'),
userId: '081aa387-487d-4438-83a4-3060eb2a016e'
}
];
const meta: Meta<GfPortfolioFilterFormComponent> = {
title: 'Portfolio Filter Form',
component: GfPortfolioFilterFormComponent,
@ -18,43 +54,14 @@ type Story = StoryObj<GfPortfolioFilterFormComponent>;
export const Default: Story = {
args: {
accounts: [
{
id: '733110b6-7c55-44eb-8cc5-c4c3e9d48a79',
name: 'Trading Account',
platform: {
name: 'Interactive Brokers',
url: 'https://interactivebrokers.com'
}
},
{
id: '24ba27d6-e04b-4fb4-b856-b24c2ef0422a',
name: 'Investment Account',
platform: {
name: 'Fidelity',
url: 'https://fidelity.com'
}
}
] as any,
accounts,
holdings,
assetClasses: [
{ id: 'COMMODITY', label: 'Commodity', type: 'ASSET_CLASS' },
{ id: 'EQUITY', label: 'Equity', type: 'ASSET_CLASS' },
{ id: 'FIXED_INCOME', label: 'Fixed Income', type: 'ASSET_CLASS' }
],
holdings: [
{
currency: 'USD',
dataSource: 'YAHOO',
name: 'Apple Inc.',
symbol: 'AAPL'
},
{
currency: 'USD',
dataSource: 'YAHOO',
name: 'Microsoft Corporation',
symbol: 'MSFT'
}
] as any,
disabled: false,
tags: [
{
id: 'EMERGENCY_FUND',
@ -66,8 +73,7 @@ export const Default: Story = {
label: 'Retirement Fund',
type: 'TAG'
}
],
disabled: false
]
}
};

Loading…
Cancel
Save