doku
This commit is contained in:
@@ -3191,21 +3191,14 @@
|
||||
const totalHoldingsValue = latest ? convertMeasurementMoney(latest, latest.total_holdings_value, reportCurrency) : null;
|
||||
const earnedValue = latest ? convertMeasurementMoney(latest, latest.earned_value, reportCurrency) : null;
|
||||
const settledCryptoSpendValue = latest ? convertMeasurementMoney(latest, latest.settled_crypto_spend_value, reportCurrency) : null;
|
||||
const totalEarnedOverall = latest && latest.growth_since_baseline !== null && latest.growth_since_baseline !== undefined
|
||||
? Number(latest.growth_since_baseline)
|
||||
const variableEarnedCurrentAsset = latest && latest.holdings_current_asset !== null && latest.holdings_current_asset !== undefined
|
||||
? Number(latest.holdings_current_asset)
|
||||
: null;
|
||||
const totalEarnedOverallFiat = totalEarnedOverall !== null
|
||||
? convertCurrencyValue(totalEarnedOverall, currentCoinCurrency, reportCurrency)
|
||||
const fixedCryptoSpendCurrentAsset = latest && latest.fixed_crypto_spend_current_asset !== null && latest.fixed_crypto_spend_current_asset !== undefined
|
||||
? Number(latest.fixed_crypto_spend_current_asset)
|
||||
: null;
|
||||
const totalSpentOverallCurrentAsset = latest
|
||||
? convertMeasurementMoney(
|
||||
latest,
|
||||
(Number(latest.cash_invested_capital) || 0) + (Number(latest.reinvested_capital) || 0),
|
||||
currentCoinCurrency
|
||||
)
|
||||
: null;
|
||||
const totalSpentOverallFiat = totalSpentOverallCurrentAsset !== null
|
||||
? convertCurrencyValue(totalSpentOverallCurrentAsset, currentCoinCurrency, reportCurrency)
|
||||
const totalEarnedCurrentAsset = latest && latest.earned_current_asset !== null && latest.earned_current_asset !== undefined
|
||||
? Number(latest.earned_current_asset)
|
||||
: null;
|
||||
const spentByType = allMinerRows.reduce((summary, row) => {
|
||||
const amount = Number(row?.effective_amount);
|
||||
@@ -3279,19 +3272,20 @@
|
||||
h(StatCard, {
|
||||
key: 'earned-overall',
|
||||
label: `Bisher verdient gesamt ${currentCoinCurrency}`,
|
||||
value: totalEarnedOverall !== null ? fmtNumber(totalEarnedOverall, 6) : 'n/a',
|
||||
value: totalEarnedCurrentAsset !== null ? fmtNumber(totalEarnedCurrentAsset, 6) : 'n/a',
|
||||
sub: [
|
||||
totalEarnedOverallFiat !== null ? `≈ ${fmtMoney(totalEarnedOverallFiat, reportCurrency)}` : null,
|
||||
variableEarnedCurrentAsset !== null ? `Variabel ${fmtNumber(variableEarnedCurrentAsset, 6)} ${currentCoinCurrency}` : null,
|
||||
fixedCryptoSpendCurrentAsset !== null ? `Fix ${fmtNumber(fixedCryptoSpendCurrentAsset, 6)} ${currentCoinCurrency}` : null,
|
||||
currentSettings?.baseline_measured_at ? `Seit Baseline ${fmtDate(currentSettings.baseline_measured_at)}` : 'Benötigt Baseline',
|
||||
].filter(Boolean).join(' · '),
|
||||
}),
|
||||
h(StatCard, {
|
||||
key: 'spent-overall',
|
||||
label: `Bisher ausgegeben gesamt ${currentCoinCurrency}`,
|
||||
value: totalSpentOverallCurrentAsset !== null ? fmtNumber(totalSpentOverallCurrentAsset, 6) : 'n/a',
|
||||
label: `Krypto-Ausgaben fix ${currentCoinCurrency}`,
|
||||
value: fixedCryptoSpendCurrentAsset !== null ? fmtNumber(fixedCryptoSpendCurrentAsset, 6) : 'n/a',
|
||||
sub: [
|
||||
totalSpentOverallFiat !== null ? `≈ ${fmtMoney(totalSpentOverallFiat, reportCurrency)}` : null,
|
||||
`Krypto ${fmtNumber(spentByType.crypto, 6)} ${currentCoinCurrency}`,
|
||||
settledCryptoSpendValue !== null ? `Historischer Gegenwert ${fmtMoney(settledCryptoSpendValue, reportCurrency)}` : null,
|
||||
'Kurs aus gespeichertem fx-rates-Snapshot',
|
||||
`FIAT ${fmtMoney(spentByType.fiat, reportCurrency)}`,
|
||||
].filter(Boolean).join(' · '),
|
||||
}),
|
||||
@@ -3317,11 +3311,11 @@
|
||||
value: earnedValue !== null ? fmtMoney(earnedValue, reportCurrency) : 'n/a',
|
||||
sub: [
|
||||
holdingsCurrentAsset !== null && holdingsCurrentAsset !== undefined
|
||||
? `Gesamtbestand ${fmtNumber(holdingsCurrentAsset, 6)} ${currentCoinCurrency}`
|
||||
? `Variabel ${fmtNumber(holdingsCurrentAsset, 6)} ${currentCoinCurrency}`
|
||||
: null,
|
||||
latestValue !== null ? `Miner ${fmtMoney(latestValue, reportCurrency)}` : null,
|
||||
walletValue !== null ? `Wallet ${fmtMoney(walletValue, reportCurrency)}` : null,
|
||||
settledCryptoSpendValue !== null ? `Ausgegeben ${fmtMoney(settledCryptoSpendValue, reportCurrency)}` : null,
|
||||
settledCryptoSpendValue !== null ? `Fix ausgegeben ${fmtMoney(settledCryptoSpendValue, reportCurrency)}` : null,
|
||||
latestPrice !== null
|
||||
? `Kurs ${fmtNumber(latestPrice, 6)} ${reportCurrency}${latest && latest.price_is_fallback ? ' · Fallback aus letztem Kurs' : ''}`
|
||||
: null,
|
||||
|
||||
Reference in New Issue
Block a user