Compare commits

..

7 Commits

Author SHA1 Message Date
a834ef6b4c Release 1.228.1 (#1617) 2023-01-18 22:01:59 +01:00
e5bd0d1bfa Release 1.228.0 (#1616) 2023-01-18 21:39:11 +01:00
7fa6eda45d Feature/remove emergency fund as asset class (#1615)
* Remove emergency fund as asset class

* Update changelog
2023-01-18 21:37:22 +01:00
f47e4d3b04 Clean up imports (#1613) 2023-01-17 20:10:08 +01:00
0300c6f3b7 Feature/extend hints on account page (#1609)
* Extend hints

* Update changelog
2023-01-17 20:09:50 +01:00
4865c45fd4 Feature/reduce data gathering interval to every four hours (#1611)
* Reduce execution interval

* Update changelog
2023-01-17 10:04:03 +01:00
2beceb36cf Overriding tooltip title for graphs where grouping is defined (#1605)
* Overriding tooltip title for graphs where grouping is defined

* Update changelog

Co-authored-by: Thomas <4159106+dtslvr@users.noreply.github.com>
2023-01-16 10:46:48 +01:00
21 changed files with 320 additions and 145 deletions

View File

@ -5,6 +5,19 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## 1.228.1 - 2023-01-18
### Added
- Extended the hints in user settings
### Changed
- Improved the date formatting in the tooltip of the dividend timeline grouped by month / year
- Improved the date formatting in the tooltip of the investment timeline grouped by month / year
- Reduced the execution interval of the data gathering to every 4 hours
- Removed emergency fund as an asset class
## 1.227.1 - 2023-01-14
### Changed

View File

@ -20,7 +20,7 @@ import { ExchangeRateDataService } from '@ghostfolio/api/services/exchange-rate-
import { ImpersonationService } from '@ghostfolio/api/services/impersonation.service';
import { SymbolProfileService } from '@ghostfolio/api/services/symbol-profile.service';
import {
ASSET_SUB_CLASS_EMERGENCY_FUND,
EMERGENCY_FUND_TAG_ID,
MAX_CHART_ITEMS,
UNKNOWN_KEY
} from '@ghostfolio/common/config';
@ -575,7 +575,6 @@ export class PortfolioService {
) {
const cashPositions = await this.getCashPositions({
cashDetails,
emergencyFund,
userCurrency,
investment: totalInvestmentInBaseCurrency,
value: filteredValueInBaseCurrency
@ -595,6 +594,41 @@ export class PortfolioService {
withExcludedAccounts
});
if (
filters?.length === 1 &&
filters[0].id === EMERGENCY_FUND_TAG_ID &&
filters[0].type === 'TAG'
) {
const cashPositions = await this.getCashPositions({
cashDetails,
userCurrency,
investment: totalInvestmentInBaseCurrency,
value: filteredValueInBaseCurrency
});
const emergencyFundInCash = emergencyFund
.minus(
this.getEmergencyFundPositionsValueInBaseCurrency({
activities: orders
})
)
.toNumber();
accounts[UNKNOWN_KEY] = {
balance: 0,
currency: userCurrency,
current: emergencyFundInCash,
name: UNKNOWN_KEY,
original: emergencyFundInCash
};
holdings[userCurrency] = {
...cashPositions[userCurrency],
investment: emergencyFundInCash,
value: emergencyFundInCash
};
}
const summary = await this.getSummary({
impersonationId,
userCurrency,
@ -1184,16 +1218,14 @@ export class PortfolioService {
private async getCashPositions({
cashDetails,
emergencyFund,
investment,
userCurrency,
value
}: {
cashDetails: CashDetails;
emergencyFund: Big;
investment: Big;
value: Big;
userCurrency: string;
value: Big;
}) {
const cashPositions: PortfolioDetails['holdings'] = {
[userCurrency]: this.getInitialCashPosition({
@ -1224,28 +1256,6 @@ export class PortfolioService {
}
}
if (emergencyFund.gt(0)) {
cashPositions[ASSET_SUB_CLASS_EMERGENCY_FUND] = {
...cashPositions[userCurrency],
assetSubClass: ASSET_SUB_CLASS_EMERGENCY_FUND,
investment: emergencyFund.toNumber(),
name: ASSET_SUB_CLASS_EMERGENCY_FUND,
symbol: ASSET_SUB_CLASS_EMERGENCY_FUND,
value: emergencyFund.toNumber()
};
cashPositions[userCurrency].investment = new Big(
cashPositions[userCurrency].investment
)
.minus(emergencyFund)
.toNumber();
cashPositions[userCurrency].value = new Big(
cashPositions[userCurrency].value
)
.minus(emergencyFund)
.toNumber();
}
for (const symbol of Object.keys(cashPositions)) {
// Calculate allocations for each currency
cashPositions[symbol].allocationCurrent = value.gt(0)
@ -1359,8 +1369,8 @@ export class PortfolioService {
}) {
const emergencyFundOrders = activities.filter((activity) => {
return (
activity.tags?.some(({ name }) => {
return name === 'EMERGENCY_FUND';
activity.tags?.some(({ id }) => {
return id === EMERGENCY_FUND_TAG_ID;
}) ?? false
);
});

View File

@ -19,8 +19,8 @@ export class CronService {
private readonly twitterBotService: TwitterBotService
) {}
@Cron(CronExpression.EVERY_HOUR)
public async runEveryHour() {
@Cron(CronExpression.EVERY_4_HOURS)
public async runEveryFourHours() {
await this.dataGatheringService.gather7Days();
}

View File

@ -4,12 +4,12 @@ import { CacheService } from '@ghostfolio/client/services/cache.service';
import { DataService } from '@ghostfolio/client/services/data.service';
import { UserService } from '@ghostfolio/client/services/user/user.service';
import {
ghostfolioPrefix,
PROPERTY_COUPONS,
PROPERTY_CURRENCIES,
PROPERTY_IS_READ_ONLY_MODE,
PROPERTY_IS_USER_SIGNUP_ENABLED,
PROPERTY_SYSTEM_MESSAGE
PROPERTY_SYSTEM_MESSAGE,
ghostfolioPrefix
} from '@ghostfolio/common/config';
import { Coupon, InfoItem, User } from '@ghostfolio/common/interfaces';
import { hasPermission, permissions } from '@ghostfolio/common/permissions';

View File

@ -11,7 +11,8 @@ import {
import {
getTooltipOptions,
getTooltipPositionerMapTop,
getVerticalHoverLinePlugin
getVerticalHoverLinePlugin,
transformTickToAbbreviation
} from '@ghostfolio/common/chart-helper';
import { primaryColorRgb, secondaryColorRgb } from '@ghostfolio/common/config';
import {
@ -19,8 +20,7 @@ import {
getBackgroundColor,
getDateFormatString,
getTextColor,
parseDate,
transformTickToAbbreviation
parseDate
} from '@ghostfolio/common/helper';
import { LineChartItem } from '@ghostfolio/common/interfaces';
import { InvestmentItem } from '@ghostfolio/common/interfaces/investment-item.interface';
@ -136,10 +136,13 @@ export class InvestmentChartComponent implements OnChanges, OnDestroy {
date,
investment: last(this.investments).investment
});
this.values.push({ date, value: last(this.values).value });
this.values.push({
date,
value: last(this.values).value
});
}
const data = {
const chartData = {
labels: this.historicalDataItems.map(({ date }) => {
return parseDate(date);
}),
@ -191,7 +194,7 @@ export class InvestmentChartComponent implements OnChanges, OnDestroy {
if (this.chartCanvas) {
if (this.chart) {
this.chart.data = data;
this.chart.data = chartData;
this.chart.options.plugins.tooltip = <unknown>(
this.getTooltipPluginConfiguration()
);
@ -213,7 +216,7 @@ export class InvestmentChartComponent implements OnChanges, OnDestroy {
this.chart.update();
} else {
this.chart = new Chart(this.chartCanvas.nativeElement, {
data,
data: chartData,
options: {
animation: false,
elements: {
@ -328,6 +331,7 @@ export class InvestmentChartComponent implements OnChanges, OnDestroy {
...getTooltipOptions({
colorScheme: this.colorScheme,
currency: this.isInPercent ? undefined : this.currency,
groupBy: this.groupBy,
locale: this.isInPercent ? undefined : this.locale,
unit: this.isInPercent ? '%' : undefined
}),

View File

@ -74,8 +74,8 @@
<div class="pr-1 w-50">
<div i18n>Presenter View</div>
<div class="hint-text text-muted" i18n>
Hides sensitive values such as absolute performances and
quantities.
Protection for sensitive information like absolute performances
and quantity values
</div>
</div>
<div class="pl-1 w-50">
@ -210,8 +210,11 @@
</form>
</div>
<div class="d-flex mt-4 py-1">
<div class="align-items-center d-flex pr-1 pt-1 w-50">
<ng-container i18n>Zen Mode</ng-container>
<div class="pr-1 w-50">
<div i18n>Zen Mode</div>
<div class="hint-text text-muted" i18n>
Distraction-free experience for turbulent times
</div>
</div>
<div class="pl-1 w-50">
<mat-slide-toggle
@ -239,6 +242,9 @@
>
<div class="pr-1 w-50">
<div i18n>Experimental Features</div>
<div class="hint-text text-muted" i18n>
Sneak peek at upcoming functionality
</div>
</div>
<div class="pl-1 w-50">
<mat-slide-toggle

View File

@ -11,7 +11,7 @@ import { IcsService } from '@ghostfolio/client/services/ics/ics.service';
import { ImpersonationStorageService } from '@ghostfolio/client/services/impersonation-storage.service';
import { UserService } from '@ghostfolio/client/services/user/user.service';
import { downloadAsFile } from '@ghostfolio/common/helper';
import { UniqueAsset, User } from '@ghostfolio/common/interfaces';
import { User } from '@ghostfolio/common/interfaces';
import { hasPermission, permissions } from '@ghostfolio/common/permissions';
import { DataSource, Order as OrderModel } from '@prisma/client';
import { format, parseISO } from 'date-fns';

View File

@ -1433,14 +1433,6 @@
<context context-type="linenumber">75</context>
</context-group>
</trans-unit>
<trans-unit id="31b2f7072bfeddc35fec6b3f731fc47d44eba155" datatype="html">
<source> Hides sensitive values such as absolute performances and quantities. </source>
<target state="new"/>
<context-group purpose="location">
<context context-type="sourcefile">apps/client/src/app/pages/account/account-page.html</context>
<context context-type="linenumber">76,79</context>
</context-group>
</trans-unit>
<trans-unit id="68baf7bff1f9242d0f6e4c0952dafefa6553cecd" datatype="html">
<source>Base Currency</source>
<target state="translated">Basiswährung</target>
@ -1478,7 +1470,7 @@
<target state="translated">Einloggen mit Fingerabdruck</target>
<context-group purpose="location">
<context context-type="sourcefile">apps/client/src/app/pages/account/account-page.html</context>
<context context-type="linenumber">226</context>
<context context-type="linenumber">229</context>
</context-group>
</trans-unit>
<trans-unit id="83c4d4d764d2e2725ab8e919ec16ac400e1f290a" datatype="html">
@ -1486,7 +1478,7 @@
<target state="translated">Benutzer ID</target>
<context-group purpose="location">
<context context-type="sourcefile">apps/client/src/app/pages/account/account-page.html</context>
<context context-type="linenumber">253</context>
<context context-type="linenumber">259</context>
</context-group>
</trans-unit>
<trans-unit id="9021c579c084e68d9db06a569d76f024111c6c54" datatype="html">
@ -1494,7 +1486,7 @@
<target state="translated">Zugangsberechtigung</target>
<context-group purpose="location">
<context context-type="sourcefile">apps/client/src/app/pages/account/account-page.html</context>
<context context-type="linenumber">262</context>
<context context-type="linenumber">268</context>
</context-group>
</trans-unit>
<trans-unit id="5e41f1b4c46ad9e0a9bc83fa36445483aa5cc324" datatype="html">
@ -2570,7 +2562,7 @@
<target state="translated">Experimentelle Funktionen</target>
<context-group purpose="location">
<context context-type="sourcefile">apps/client/src/app/pages/account/account-page.html</context>
<context context-type="linenumber">241</context>
<context context-type="linenumber">244</context>
</context-group>
</trans-unit>
<trans-unit id="1b25c6e22f822e07a3e4d5aae4edc5b41fe083c2" datatype="html">
@ -3145,6 +3137,30 @@
<context context-type="linenumber">14</context>
</context-group>
</trans-unit>
<trans-unit id="36f3a413e742253688f48766189344d6f52611d8" datatype="html">
<source> Protection for sensitive information like absolute performances and quantity values </source>
<target state="translated"> Ausblenden von sensiblen Informationen wie absoluter Performance und Stückzahl </target>
<context-group purpose="location">
<context context-type="sourcefile">apps/client/src/app/pages/account/account-page.html</context>
<context context-type="linenumber">76,79</context>
</context-group>
</trans-unit>
<trans-unit id="2e744a88d8fa3204bb7cf407e7e3f3680f9e67a4" datatype="html">
<source> Distraction-free experience for turbulent times </source>
<target state="translated"> Unbeschwertes Erlebnis für turbulente Zeiten </target>
<context-group purpose="location">
<context context-type="sourcefile">apps/client/src/app/pages/account/account-page.html</context>
<context context-type="linenumber">215,217</context>
</context-group>
</trans-unit>
<trans-unit id="b706a0f7740f8180094b8f6144462d121da49aa4" datatype="html">
<source> Sneak peek at upcoming functionality </source>
<target state="translated"> Vorschau auf kommende Funktionalität </target>
<context-group purpose="location">
<context context-type="sourcefile">apps/client/src/app/pages/account/account-page.html</context>
<context context-type="linenumber">245,247</context>
</context-group>
</trans-unit>
</body>
</file>
</xliff>

View File

@ -1434,14 +1434,6 @@
<context context-type="linenumber">75</context>
</context-group>
</trans-unit>
<trans-unit id="31b2f7072bfeddc35fec6b3f731fc47d44eba155" datatype="html">
<source> Hides sensitive values such as absolute performances and quantities. </source>
<target state="translated">Esconde valores sensibles como los rendimientos absolutos y las cantidades.</target>
<context-group purpose="location">
<context context-type="sourcefile">apps/client/src/app/pages/account/account-page.html</context>
<context context-type="linenumber">76,79</context>
</context-group>
</trans-unit>
<trans-unit id="68baf7bff1f9242d0f6e4c0952dafefa6553cecd" datatype="html">
<source>Base Currency</source>
<target state="translated">Divisa base</target>
@ -1479,7 +1471,7 @@
<target state="translated">Accede con huella digital</target>
<context-group purpose="location">
<context context-type="sourcefile">apps/client/src/app/pages/account/account-page.html</context>
<context context-type="linenumber">226</context>
<context context-type="linenumber">229</context>
</context-group>
</trans-unit>
<trans-unit id="83c4d4d764d2e2725ab8e919ec16ac400e1f290a" datatype="html">
@ -1487,7 +1479,7 @@
<target state="translated">ID usuario</target>
<context-group purpose="location">
<context context-type="sourcefile">apps/client/src/app/pages/account/account-page.html</context>
<context context-type="linenumber">253</context>
<context context-type="linenumber">259</context>
</context-group>
</trans-unit>
<trans-unit id="9021c579c084e68d9db06a569d76f024111c6c54" datatype="html">
@ -1495,7 +1487,7 @@
<target state="translated">Acceso concedido</target>
<context-group purpose="location">
<context context-type="sourcefile">apps/client/src/app/pages/account/account-page.html</context>
<context context-type="linenumber">262</context>
<context context-type="linenumber">268</context>
</context-group>
</trans-unit>
<trans-unit id="5e41f1b4c46ad9e0a9bc83fa36445483aa5cc324" datatype="html">
@ -2571,7 +2563,7 @@
<target state="translated">Funcionalidades experimentales</target>
<context-group purpose="location">
<context context-type="sourcefile">apps/client/src/app/pages/account/account-page.html</context>
<context context-type="linenumber">241</context>
<context context-type="linenumber">244</context>
</context-group>
</trans-unit>
<trans-unit id="1931353503905413384" datatype="html">
@ -3146,6 +3138,30 @@
<context context-type="linenumber">14</context>
</context-group>
</trans-unit>
<trans-unit id="36f3a413e742253688f48766189344d6f52611d8" datatype="html">
<source> Protection for sensitive information like absolute performances and quantity values </source>
<target state="new"> Protection for sensitive information like absolute performances and quantity values </target>
<context-group purpose="location">
<context context-type="sourcefile">apps/client/src/app/pages/account/account-page.html</context>
<context context-type="linenumber">76,79</context>
</context-group>
</trans-unit>
<trans-unit id="2e744a88d8fa3204bb7cf407e7e3f3680f9e67a4" datatype="html">
<source> Distraction-free experience for turbulent times </source>
<target state="new"> Distraction-free experience for turbulent times </target>
<context-group purpose="location">
<context context-type="sourcefile">apps/client/src/app/pages/account/account-page.html</context>
<context context-type="linenumber">215,217</context>
</context-group>
</trans-unit>
<trans-unit id="b706a0f7740f8180094b8f6144462d121da49aa4" datatype="html">
<source> Sneak peek at upcoming functionality </source>
<target state="new"> Sneak peek at upcoming functionality </target>
<context-group purpose="location">
<context context-type="sourcefile">apps/client/src/app/pages/account/account-page.html</context>
<context context-type="linenumber">245,247</context>
</context-group>
</trans-unit>
</body>
</file>
</xliff>

View File

@ -1785,14 +1785,6 @@
<context context-type="linenumber">75</context>
</context-group>
</trans-unit>
<trans-unit id="31b2f7072bfeddc35fec6b3f731fc47d44eba155" datatype="html">
<source> Hides sensitive values such as absolute performances and quantities. </source>
<target state="translated"> Masque les données sensibles telles que la performance absolue et les quantités. </target>
<context-group purpose="location">
<context context-type="sourcefile">apps/client/src/app/pages/account/account-page.html</context>
<context context-type="linenumber">76,79</context>
</context-group>
</trans-unit>
<trans-unit id="68baf7bff1f9242d0f6e4c0952dafefa6553cecd" datatype="html">
<source>Base Currency</source>
<target state="translated">Devise de Base</target>
@ -1890,7 +1882,7 @@
<target state="translated">Se connecter avec empreinte</target>
<context-group purpose="location">
<context context-type="sourcefile">apps/client/src/app/pages/account/account-page.html</context>
<context context-type="linenumber">226</context>
<context context-type="linenumber">229</context>
</context-group>
</trans-unit>
<trans-unit id="03b120b05e0922e5e830c3466fda9ee0bfbf59e9" datatype="html">
@ -1898,7 +1890,7 @@
<target state="translated">Fonctionnalités expérimentales</target>
<context-group purpose="location">
<context context-type="sourcefile">apps/client/src/app/pages/account/account-page.html</context>
<context context-type="linenumber">241</context>
<context context-type="linenumber">244</context>
</context-group>
</trans-unit>
<trans-unit id="83c4d4d764d2e2725ab8e919ec16ac400e1f290a" datatype="html">
@ -1906,7 +1898,7 @@
<target state="translated">ID d&apos;utilisateur</target>
<context-group purpose="location">
<context context-type="sourcefile">apps/client/src/app/pages/account/account-page.html</context>
<context context-type="linenumber">253</context>
<context context-type="linenumber">259</context>
</context-group>
</trans-unit>
<trans-unit id="9021c579c084e68d9db06a569d76f024111c6c54" datatype="html">
@ -1914,7 +1906,7 @@
<target state="translated">Accès donné</target>
<context-group purpose="location">
<context context-type="sourcefile">apps/client/src/app/pages/account/account-page.html</context>
<context context-type="linenumber">262</context>
<context context-type="linenumber">268</context>
</context-group>
</trans-unit>
<trans-unit id="5e41f1b4c46ad9e0a9bc83fa36445483aa5cc324" datatype="html">
@ -3144,6 +3136,30 @@
<context context-type="linenumber">14</context>
</context-group>
</trans-unit>
<trans-unit id="36f3a413e742253688f48766189344d6f52611d8" datatype="html">
<source> Protection for sensitive information like absolute performances and quantity values </source>
<target state="new"> Protection for sensitive information like absolute performances and quantity values </target>
<context-group purpose="location">
<context context-type="sourcefile">apps/client/src/app/pages/account/account-page.html</context>
<context context-type="linenumber">76,79</context>
</context-group>
</trans-unit>
<trans-unit id="2e744a88d8fa3204bb7cf407e7e3f3680f9e67a4" datatype="html">
<source> Distraction-free experience for turbulent times </source>
<target state="new"> Distraction-free experience for turbulent times </target>
<context-group purpose="location">
<context context-type="sourcefile">apps/client/src/app/pages/account/account-page.html</context>
<context context-type="linenumber">215,217</context>
</context-group>
</trans-unit>
<trans-unit id="b706a0f7740f8180094b8f6144462d121da49aa4" datatype="html">
<source> Sneak peek at upcoming functionality </source>
<target state="new"> Sneak peek at upcoming functionality </target>
<context-group purpose="location">
<context context-type="sourcefile">apps/client/src/app/pages/account/account-page.html</context>
<context context-type="linenumber">245,247</context>
</context-group>
</trans-unit>
</body>
</file>
</xliff>

View File

@ -1434,14 +1434,6 @@
<context context-type="linenumber">75</context>
</context-group>
</trans-unit>
<trans-unit id="31b2f7072bfeddc35fec6b3f731fc47d44eba155" datatype="html">
<source> Hides sensitive values such as absolute performances and quantities. </source>
<target state="translated">Nasconde valori sensibili come le prestazioni e le quantità assolute. </target>
<context-group purpose="location">
<context context-type="sourcefile">apps/client/src/app/pages/account/account-page.html</context>
<context context-type="linenumber">76,79</context>
</context-group>
</trans-unit>
<trans-unit id="68baf7bff1f9242d0f6e4c0952dafefa6553cecd" datatype="html">
<source>Base Currency</source>
<target state="translated">Valuta base</target>
@ -1479,7 +1471,7 @@
<target state="translated">Accesso con impronta digitale</target>
<context-group purpose="location">
<context context-type="sourcefile">apps/client/src/app/pages/account/account-page.html</context>
<context context-type="linenumber">226</context>
<context context-type="linenumber">229</context>
</context-group>
</trans-unit>
<trans-unit id="83c4d4d764d2e2725ab8e919ec16ac400e1f290a" datatype="html">
@ -1487,7 +1479,7 @@
<target state="translated">ID utente</target>
<context-group purpose="location">
<context context-type="sourcefile">apps/client/src/app/pages/account/account-page.html</context>
<context context-type="linenumber">253</context>
<context context-type="linenumber">259</context>
</context-group>
</trans-unit>
<trans-unit id="9021c579c084e68d9db06a569d76f024111c6c54" datatype="html">
@ -1495,7 +1487,7 @@
<target state="translated">Accesso concesso</target>
<context-group purpose="location">
<context context-type="sourcefile">apps/client/src/app/pages/account/account-page.html</context>
<context context-type="linenumber">262</context>
<context context-type="linenumber">268</context>
</context-group>
</trans-unit>
<trans-unit id="5e41f1b4c46ad9e0a9bc83fa36445483aa5cc324" datatype="html">
@ -2571,7 +2563,7 @@
<target state="translated">Funzionalità sperimentali</target>
<context-group purpose="location">
<context context-type="sourcefile">apps/client/src/app/pages/account/account-page.html</context>
<context context-type="linenumber">241</context>
<context context-type="linenumber">244</context>
</context-group>
</trans-unit>
<trans-unit id="1931353503905413384" datatype="html">
@ -3146,6 +3138,30 @@
<context context-type="linenumber">14</context>
</context-group>
</trans-unit>
<trans-unit id="36f3a413e742253688f48766189344d6f52611d8" datatype="html">
<source> Protection for sensitive information like absolute performances and quantity values </source>
<target state="new"> Protection for sensitive information like absolute performances and quantity values </target>
<context-group purpose="location">
<context context-type="sourcefile">apps/client/src/app/pages/account/account-page.html</context>
<context context-type="linenumber">76,79</context>
</context-group>
</trans-unit>
<trans-unit id="2e744a88d8fa3204bb7cf407e7e3f3680f9e67a4" datatype="html">
<source> Distraction-free experience for turbulent times </source>
<target state="new"> Distraction-free experience for turbulent times </target>
<context-group purpose="location">
<context context-type="sourcefile">apps/client/src/app/pages/account/account-page.html</context>
<context context-type="linenumber">215,217</context>
</context-group>
</trans-unit>
<trans-unit id="b706a0f7740f8180094b8f6144462d121da49aa4" datatype="html">
<source> Sneak peek at upcoming functionality </source>
<target state="new"> Sneak peek at upcoming functionality </target>
<context-group purpose="location">
<context context-type="sourcefile">apps/client/src/app/pages/account/account-page.html</context>
<context context-type="linenumber">245,247</context>
</context-group>
</trans-unit>
</body>
</file>
</xliff>

View File

@ -1433,14 +1433,6 @@
<context context-type="linenumber">75</context>
</context-group>
</trans-unit>
<trans-unit id="31b2f7072bfeddc35fec6b3f731fc47d44eba155" datatype="html">
<source> Hides sensitive values such as absolute performances and quantities. </source>
<target state="translated">Verbergt gevoelige waarden zoals absolute prestaties en hoeveelheden. </target>
<context-group purpose="location">
<context context-type="sourcefile">apps/client/src/app/pages/account/account-page.html</context>
<context context-type="linenumber">76,79</context>
</context-group>
</trans-unit>
<trans-unit id="68baf7bff1f9242d0f6e4c0952dafefa6553cecd" datatype="html">
<source>Base Currency</source>
<target state="translated">Basisvaluta</target>
@ -1478,7 +1470,7 @@
<target state="translated">Aanmelden met vingerafdruk</target>
<context-group purpose="location">
<context context-type="sourcefile">apps/client/src/app/pages/account/account-page.html</context>
<context context-type="linenumber">226</context>
<context context-type="linenumber">229</context>
</context-group>
</trans-unit>
<trans-unit id="83c4d4d764d2e2725ab8e919ec16ac400e1f290a" datatype="html">
@ -1486,7 +1478,7 @@
<target state="translated">Gebruikers-ID</target>
<context-group purpose="location">
<context context-type="sourcefile">apps/client/src/app/pages/account/account-page.html</context>
<context context-type="linenumber">253</context>
<context context-type="linenumber">259</context>
</context-group>
</trans-unit>
<trans-unit id="9021c579c084e68d9db06a569d76f024111c6c54" datatype="html">
@ -1494,7 +1486,7 @@
<target state="translated">Verleende toegang</target>
<context-group purpose="location">
<context context-type="sourcefile">apps/client/src/app/pages/account/account-page.html</context>
<context context-type="linenumber">262</context>
<context context-type="linenumber">268</context>
</context-group>
</trans-unit>
<trans-unit id="5e41f1b4c46ad9e0a9bc83fa36445483aa5cc324" datatype="html">
@ -2570,7 +2562,7 @@
<target state="translated">Experimentele functies</target>
<context-group purpose="location">
<context context-type="sourcefile">apps/client/src/app/pages/account/account-page.html</context>
<context context-type="linenumber">241</context>
<context context-type="linenumber">244</context>
</context-group>
</trans-unit>
<trans-unit id="1931353503905413384" datatype="html">
@ -3145,6 +3137,30 @@
<context context-type="linenumber">14</context>
</context-group>
</trans-unit>
<trans-unit id="36f3a413e742253688f48766189344d6f52611d8" datatype="html">
<source> Protection for sensitive information like absolute performances and quantity values </source>
<target state="new"> Protection for sensitive information like absolute performances and quantity values </target>
<context-group purpose="location">
<context context-type="sourcefile">apps/client/src/app/pages/account/account-page.html</context>
<context context-type="linenumber">76,79</context>
</context-group>
</trans-unit>
<trans-unit id="2e744a88d8fa3204bb7cf407e7e3f3680f9e67a4" datatype="html">
<source> Distraction-free experience for turbulent times </source>
<target state="new"> Distraction-free experience for turbulent times </target>
<context-group purpose="location">
<context context-type="sourcefile">apps/client/src/app/pages/account/account-page.html</context>
<context context-type="linenumber">215,217</context>
</context-group>
</trans-unit>
<trans-unit id="b706a0f7740f8180094b8f6144462d121da49aa4" datatype="html">
<source> Sneak peek at upcoming functionality </source>
<target state="new"> Sneak peek at upcoming functionality </target>
<context-group purpose="location">
<context context-type="sourcefile">apps/client/src/app/pages/account/account-page.html</context>
<context context-type="linenumber">245,247</context>
</context-group>
</trans-unit>
</body>
</file>
</xliff>

View File

@ -1773,14 +1773,6 @@
<context context-type="linenumber">75</context>
</context-group>
</trans-unit>
<trans-unit id="31b2f7072bfeddc35fec6b3f731fc47d44eba155" datatype="html">
<source> Hides sensitive values such as absolute performances and quantities. </source>
<target state="new"> Hides sensitive values such as absolute performances and quantities. </target>
<context-group purpose="location">
<context context-type="sourcefile">apps/client/src/app/pages/account/account-page.html</context>
<context context-type="linenumber">76,79</context>
</context-group>
</trans-unit>
<trans-unit id="68baf7bff1f9242d0f6e4c0952dafefa6553cecd" datatype="html">
<source>Base Currency</source>
<target state="new">Base Currency</target>
@ -1866,7 +1858,7 @@
<target state="new">Sign in with fingerprint</target>
<context-group purpose="location">
<context context-type="sourcefile">apps/client/src/app/pages/account/account-page.html</context>
<context context-type="linenumber">226</context>
<context context-type="linenumber">229</context>
</context-group>
</trans-unit>
<trans-unit id="03b120b05e0922e5e830c3466fda9ee0bfbf59e9" datatype="html">
@ -1874,7 +1866,7 @@
<target state="new">Experimental Features</target>
<context-group purpose="location">
<context context-type="sourcefile">apps/client/src/app/pages/account/account-page.html</context>
<context context-type="linenumber">241</context>
<context context-type="linenumber">244</context>
</context-group>
</trans-unit>
<trans-unit id="83c4d4d764d2e2725ab8e919ec16ac400e1f290a" datatype="html">
@ -1882,7 +1874,7 @@
<target state="new">User ID</target>
<context-group purpose="location">
<context context-type="sourcefile">apps/client/src/app/pages/account/account-page.html</context>
<context context-type="linenumber">253</context>
<context context-type="linenumber">259</context>
</context-group>
</trans-unit>
<trans-unit id="9021c579c084e68d9db06a569d76f024111c6c54" datatype="html">
@ -1890,7 +1882,7 @@
<target state="new">Granted Access</target>
<context-group purpose="location">
<context context-type="sourcefile">apps/client/src/app/pages/account/account-page.html</context>
<context context-type="linenumber">262</context>
<context context-type="linenumber">268</context>
</context-group>
</trans-unit>
<trans-unit id="5e41f1b4c46ad9e0a9bc83fa36445483aa5cc324" datatype="html">
@ -3145,6 +3137,30 @@
<context context-type="linenumber">14</context>
</context-group>
</trans-unit>
<trans-unit id="36f3a413e742253688f48766189344d6f52611d8" datatype="html">
<source> Protection for sensitive information like absolute performances and quantity values </source>
<target state="new"> Protection for sensitive information like absolute performances and quantity values </target>
<context-group purpose="location">
<context context-type="sourcefile">apps/client/src/app/pages/account/account-page.html</context>
<context context-type="linenumber">76,79</context>
</context-group>
</trans-unit>
<trans-unit id="2e744a88d8fa3204bb7cf407e7e3f3680f9e67a4" datatype="html">
<source> Distraction-free experience for turbulent times </source>
<target state="new"> Distraction-free experience for turbulent times </target>
<context-group purpose="location">
<context context-type="sourcefile">apps/client/src/app/pages/account/account-page.html</context>
<context context-type="linenumber">215,217</context>
</context-group>
</trans-unit>
<trans-unit id="b706a0f7740f8180094b8f6144462d121da49aa4" datatype="html">
<source> Sneak peek at upcoming functionality </source>
<target state="new"> Sneak peek at upcoming functionality </target>
<context-group purpose="location">
<context context-type="sourcefile">apps/client/src/app/pages/account/account-page.html</context>
<context context-type="linenumber">245,247</context>
</context-group>
</trans-unit>
</body>
</file>
</xliff>

View File

@ -1297,13 +1297,6 @@
<context context-type="linenumber">75</context>
</context-group>
</trans-unit>
<trans-unit id="31b2f7072bfeddc35fec6b3f731fc47d44eba155" datatype="html">
<source> Hides sensitive values such as absolute performances and quantities. </source>
<context-group purpose="location">
<context context-type="sourcefile">apps/client/src/app/pages/account/account-page.html</context>
<context context-type="linenumber">76,79</context>
</context-group>
</trans-unit>
<trans-unit id="68baf7bff1f9242d0f6e4c0952dafefa6553cecd" datatype="html">
<source>Base Currency</source>
<context-group purpose="location">
@ -1336,21 +1329,21 @@
<source>Sign in with fingerprint</source>
<context-group purpose="location">
<context context-type="sourcefile">apps/client/src/app/pages/account/account-page.html</context>
<context context-type="linenumber">226</context>
<context context-type="linenumber">229</context>
</context-group>
</trans-unit>
<trans-unit id="83c4d4d764d2e2725ab8e919ec16ac400e1f290a" datatype="html">
<source>User ID</source>
<context-group purpose="location">
<context context-type="sourcefile">apps/client/src/app/pages/account/account-page.html</context>
<context context-type="linenumber">253</context>
<context context-type="linenumber">259</context>
</context-group>
</trans-unit>
<trans-unit id="9021c579c084e68d9db06a569d76f024111c6c54" datatype="html">
<source>Granted Access</source>
<context-group purpose="location">
<context context-type="sourcefile">apps/client/src/app/pages/account/account-page.html</context>
<context context-type="linenumber">262</context>
<context context-type="linenumber">268</context>
</context-group>
</trans-unit>
<trans-unit id="5e41f1b4c46ad9e0a9bc83fa36445483aa5cc324" datatype="html">
@ -2310,7 +2303,7 @@
<source>Experimental Features</source>
<context-group purpose="location">
<context context-type="sourcefile">apps/client/src/app/pages/account/account-page.html</context>
<context context-type="linenumber">241</context>
<context context-type="linenumber">244</context>
</context-group>
</trans-unit>
<trans-unit id="1931353503905413384" datatype="html">
@ -2816,6 +2809,27 @@
<context context-type="linenumber">27</context>
</context-group>
</trans-unit>
<trans-unit id="2e744a88d8fa3204bb7cf407e7e3f3680f9e67a4" datatype="html">
<source> Distraction-free experience for turbulent times </source>
<context-group purpose="location">
<context context-type="sourcefile">apps/client/src/app/pages/account/account-page.html</context>
<context context-type="linenumber">215,217</context>
</context-group>
</trans-unit>
<trans-unit id="36f3a413e742253688f48766189344d6f52611d8" datatype="html">
<source> Protection for sensitive information like absolute performances and quantity values </source>
<context-group purpose="location">
<context context-type="sourcefile">apps/client/src/app/pages/account/account-page.html</context>
<context context-type="linenumber">76,79</context>
</context-group>
</trans-unit>
<trans-unit id="b706a0f7740f8180094b8f6144462d121da49aa4" datatype="html">
<source> Sneak peek at upcoming functionality </source>
<context-group purpose="location">
<context context-type="sourcefile">apps/client/src/app/pages/account/account-page.html</context>
<context context-type="linenumber">245,247</context>
</context-group>
</trans-unit>
</body>
</file>
</xliff>

View File

@ -1,16 +1,41 @@
import { Chart, TooltipPosition } from 'chart.js';
import { format } from 'date-fns';
import { getBackgroundColor, getTextColor } from './helper';
import { ColorScheme } from './types';
import {
DATE_FORMAT,
DATE_FORMAT_MONTHLY,
DATE_FORMAT_YEARLY,
getBackgroundColor,
getTextColor
} from './helper';
import { ColorScheme, GroupBy } from './types';
export function formatGroupedDate({
date,
groupBy
}: {
date: Date;
groupBy: GroupBy;
}) {
if (groupBy === 'month') {
return format(date, DATE_FORMAT_MONTHLY);
} else if (groupBy === 'year') {
return format(date, DATE_FORMAT_YEARLY);
}
return format(date, DATE_FORMAT);
}
export function getTooltipOptions({
colorScheme,
currency = '',
groupBy,
locale = '',
unit = ''
}: {
colorScheme?: ColorScheme;
currency?: string;
groupBy?: GroupBy;
locale?: string;
unit?: string;
} = {}) {
@ -38,6 +63,13 @@ export function getTooltipOptions({
}
}
return label;
},
title: (contexts) => {
if (groupBy) {
return formatGroupedDate({ groupBy, date: contexts[0].parsed.x });
}
return contexts[0].label;
}
},
caretSize: 0,
@ -97,3 +129,7 @@ export function getVerticalHoverLinePlugin(
id: 'verticalHoverLine'
};
}
export function transformTickToAbbreviation(value: number) {
return value < 1000000 ? `${value / 1000}K` : `${value / 1000000}M`;
}

View File

@ -33,8 +33,6 @@ export const warnColorRgb = {
b: 69
};
export const ASSET_SUB_CLASS_EMERGENCY_FUND = 'EMERGENCY_FUND';
export const DATA_GATHERING_QUEUE = 'DATA_GATHERING_QUEUE';
export const DATA_GATHERING_QUEUE_PRIORITY_LOW = Number.MAX_SAFE_INTEGER;
export const DATA_GATHERING_QUEUE_PRIORITY_HIGH = 1;
@ -43,6 +41,8 @@ export const DEFAULT_DATE_FORMAT_MONTH_YEAR = 'MMM yyyy';
export const DEFAULT_LANGUAGE_CODE = 'en';
export const DEFAULT_PAGE_SIZE = 50;
export const EMERGENCY_FUND_TAG_ID = '4452656d-9fa4-4bd0-ba38-70492e31d180';
export const GATHER_ASSET_PROFILE_PROCESS = 'GATHER_ASSET_PROFILE';
export const GATHER_ASSET_PROFILE_PROCESS_OPTIONS: JobOptions = {
attempts: 10,

View File

@ -233,6 +233,8 @@ export function resolveMarketCondition(
}
export const DATE_FORMAT = 'yyyy-MM-dd';
export const DATE_FORMAT_MONTHLY = 'MMMM yyyy';
export const DATE_FORMAT_YEARLY = 'yyyy';
export function parseDate(date: string) {
return parse(date, DATE_FORMAT, new Date());
@ -241,7 +243,3 @@ export function parseDate(date: string) {
export function prettifySymbol(aSymbol: string): string {
return aSymbol?.replace(ghostfolioScraperApiSymbolPrefix, '');
}
export function transformTickToAbbreviation(value: number) {
return value < 1000000 ? `${value / 1000}K` : `${value / 1000000}M`;
}

View File

@ -8,7 +8,7 @@ export interface PortfolioPosition {
allocationCurrent: number;
allocationInvestment: number;
assetClass?: AssetClass;
assetSubClass?: AssetSubClass | 'CASH' | 'EMERGENCY_FUND';
assetSubClass?: AssetSubClass | 'CASH';
countries: Country[];
currency: string;
dataSource: DataSource;

View File

@ -13,9 +13,11 @@ import {
ViewChild
} from '@angular/core';
import { FormBuilder, FormControl } from '@angular/forms';
import { getTooltipOptions } from '@ghostfolio/common/chart-helper';
import {
getTooltipOptions,
transformTickToAbbreviation
} from '@ghostfolio/common/chart-helper';
import { primaryColorRgb } from '@ghostfolio/common/config';
import { transformTickToAbbreviation } from '@ghostfolio/common/helper';
import { ColorScheme } from '@ghostfolio/common/types';
import {
BarController,

View File

@ -13,7 +13,6 @@ import { MatPaginator } from '@angular/material/paginator';
import { MatSort } from '@angular/material/sort';
import { MatTableDataSource } from '@angular/material/table';
import { Router } from '@angular/router';
import { ASSET_SUB_CLASS_EMERGENCY_FUND } from '@ghostfolio/common/config';
import { PortfolioPosition, UniqueAsset } from '@ghostfolio/common/interfaces';
import { AssetClass, Order as OrderModel } from '@prisma/client';
import { Subject, Subscription } from 'rxjs';
@ -42,10 +41,7 @@ export class HoldingsTableComponent implements OnChanges, OnDestroy, OnInit {
public dataSource: MatTableDataSource<PortfolioPosition> =
new MatTableDataSource();
public displayedColumns = [];
public ignoreAssetSubClasses = [
AssetClass.CASH.toString(),
ASSET_SUB_CLASS_EMERGENCY_FUND
];
public ignoreAssetSubClasses = [AssetClass.CASH.toString()];
public isLoading = true;
public routeQueryParams: Subscription;

View File

@ -1,6 +1,6 @@
{
"name": "ghostfolio",
"version": "1.227.1",
"version": "1.228.1",
"homepage": "https://ghostfol.io",
"license": "AGPL-3.0",
"scripts": {