Boersendchcker update
All checks were successful
Deploy / deploy-staging (push) Successful in 5s
Deploy / deploy-production (push) Has been skipped

This commit is contained in:
2026-05-04 02:31:42 +02:00
parent 03166c575e
commit 3cd5d90f1a
7 changed files with 822 additions and 800 deletions

View File

@@ -1,9 +1,7 @@
<?= module_shell_header('boersenchecker', [
'title' => 'Depot-Ueberblick',
]) ?>
<div class="bc-app">
<div class="bc-grid-bg">
<div class="bc-shell bc-stack module-flow" data-bc-home data-chart-endpoint="<?= e($chartEndpoint) ?>">
<div class="bc-page" data-bc-home data-chart-endpoint="<?= e($chartEndpoint) ?>">
<script type="application/json" data-bc-instruments-json><?= json_encode(array_map(static function (array $position): array {
return [
'instrument_id' => (int) ($position['instrument_id'] ?? 0),
@@ -14,15 +12,15 @@
}, $positions), JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES) ?></script>
<?php if ($error): ?>
<div class="bc-alert bc-alert--error"><?= e($error) ?></div>
<section class="section-box"><div class="bc-alert bc-alert--error"><?= e($error) ?></div></section>
<?php elseif ($notice): ?>
<div class="bc-alert bc-alert--success"><?= e($notice) ?></div>
<section class="section-box"><div class="bc-alert bc-alert--success"><?= e($notice) ?></div></section>
<?php endif; ?>
<section class="module-box">
<div class="module-box-head">
<section class="section-box">
<div class="bc-section-head">
<div>
<h2 class="module-box-title">Marktueberblick</h2>
<h2 class="bc-section-title">Marktueberblick</h2>
<p>Depotauswahl, Aktienfokus und aktueller Kursabruf in einem Bereich.</p>
</div>
</div>
@@ -76,31 +74,31 @@
</div>
</section>
<div class="module-box-grid module-box-grid--stats">
<section class="module-box-soft bc-stat">
<div class="bc-overview-grid">
<section class="card-box bc-stat">
<div class="bc-field-label">Positionen</div>
<div class="bc-stat-value"><?= e((string) ($summary['positions'] ?? 0)) ?></div>
<div class="bc-text" style="margin-top:6px;">Aktien im aktuell gewaehlten Depot</div>
</section>
<section class="module-box-soft bc-stat">
<section class="card-box bc-stat">
<div class="bc-field-label">Investiert</div>
<div class="bc-stat-value"><?= isset($summary['invested']) && $summary['invested'] !== null ? e(number_format((float) $summary['invested'], 2, ',', '.')) . ' ' . e($defaultReportCurrency) : 'n/a' ?></div>
<div class="bc-text" style="margin-top:6px;">In Berichtswahrung bewertet</div>
</section>
<section class="module-box-soft bc-stat">
<section class="card-box bc-stat">
<div class="bc-field-label">Aktueller Wert</div>
<div class="bc-stat-value"><?= isset($summary['current']) && $summary['current'] !== null ? e(number_format((float) $summary['current'], 2, ',', '.')) . ' ' . e($defaultReportCurrency) : 'n/a' ?></div>
<div class="bc-text" style="margin-top:6px;">Basierend auf dem letzten gespeicherten Kurs</div>
</section>
<section class="module-box-soft bc-stat">
<section class="card-box bc-stat">
<div class="bc-field-label">Performance</div>
<div class="bc-stat-value"><?= isset($summary['gain']) && $summary['gain'] !== null ? e(number_format((float) $summary['gain'], 2, ',', '.')) . ' ' . e($defaultReportCurrency) : 'n/a' ?></div>
<div class="bc-text" style="margin-top:6px;"><?= !empty($summary['best']['instrument_name']) ? 'Top-Wert: ' . e((string) $summary['best']['instrument_name']) : 'Noch keine Vergleichsdaten' ?></div>
</section>
</div>
<div class="module-box-grid module-box-grid--panels">
<section class="module-box-soft">
<div class="bc-card-grid">
<section class="card-box">
<div class="bc-field-label">Bester Wert</div>
<?php if (!empty($summary['best'])): ?>
<div class="bc-stat-value"><?= e((string) $summary['best']['instrument_name']) ?></div>
@@ -110,7 +108,7 @@
<?php endif; ?>
</section>
<section class="module-box-soft">
<section class="card-box">
<div class="bc-field-label">Schwaechster Wert</div>
<?php if (!empty($summary['worst'])): ?>
<div class="bc-stat-value"><?= e((string) $summary['worst']['instrument_name']) ?></div>
@@ -121,7 +119,7 @@
</section>
<?php foreach (array_slice($positions, 0, 2) as $position): ?>
<section class="module-box-soft bc-stat">
<section class="card-box bc-stat">
<div class="bc-field-label"><?= e((string) $position['instrument_name']) ?></div>
<div class="bc-stat-value"><?= $position['latest_price'] !== null ? e(number_format((float) $position['latest_price'], 2, ',', '.')) . ' ' . e((string) $position['latest_currency']) : 'n/a' ?></div>
<div class="bc-text" style="margin-top:6px;"><?= e((string) (($position['latest_quoted_at'] ?? '') !== '' ? $fmtDateTime((string) $position['latest_quoted_at'], (string) ($position['latest_source'] ?? '')) : 'kein Kurs')) ?></div>
@@ -129,10 +127,10 @@
<?php endforeach; ?>
</div>
<section class="module-box">
<div class="module-box-head">
<section class="section-box">
<div class="bc-section-head">
<div>
<h2 class="module-box-title">Kursverlauf</h2>
<h2 class="bc-section-title">Kursverlauf</h2>
<p>Schlusskurse ueber mehrere Zeitfenster fuer das aktuell gewaehlte Instrument.</p>
</div>
</div>
@@ -161,14 +159,14 @@
</div>
</section>
<section class="module-box-table">
<div class="module-box-head">
<section class="section-box">
<div class="bc-section-head">
<div>
<h2 class="module-box-title">Aktien im Depot</h2>
<h2 class="bc-section-title">Aktien im Depot</h2>
<p>Stueckzahl, Kaufdaten, letzter Kurs und Performance auf einen Blick.</p>
</div>
</div>
<div class="module-box-copy">
<div class="bc-section-copy">
<?php if ($positions === []): ?>
<div class="bc-text" style="padding:0 0 18px;">Keine Aktien im ausgewaehlten Depot.</div>
<?php else: ?>
@@ -207,7 +205,5 @@
<?php endif; ?>
</div>
</section>
</div>
</div>
</div>
<?= module_shell_footer() ?>