db backup-restore with fk
All checks were successful
Deploy Nyla Frontend to Production / deploy (push) Successful in 44s

This commit is contained in:
ValueOn AG 2026-05-25 14:33:50 +02:00
parent 036e6a38db
commit 50c05e91d7
2 changed files with 9 additions and 5 deletions

View file

@ -178,7 +178,7 @@ const StorePage: React.FC = () => {
)} )}
{subscriptionInfo.status === 'TRIALING' && subscriptionInfo.trialEndsAt && ( {subscriptionInfo.status === 'TRIALING' && subscriptionInfo.trialEndsAt && (
<span className={styles.bannerSeparator}> <span className={styles.bannerSeparator}>
{t('Testphase endet am')}: {new Date(subscriptionInfo.trialEndsAt).toLocaleDateString()} {t('Testphase endet am')}: {new Date(Number(subscriptionInfo.trialEndsAt) * 1000).toLocaleDateString('de-CH', { day: '2-digit', month: '2-digit', year: 'numeric' })}
</span> </span>
)} )}
</div> </div>

View file

@ -23,12 +23,16 @@ import { useLanguage } from '../../providers/language/LanguageContext';
const _formatCurrency = (amount: number) => const _formatCurrency = (amount: number) =>
new Intl.NumberFormat('de-CH', { style: 'currency', currency: 'CHF' }).format(amount); new Intl.NumberFormat('de-CH', { style: 'currency', currency: 'CHF' }).format(amount);
const _formatDate = (iso: string | null | undefined): string => { const _formatDate = (value: string | number | null | undefined): string => {
if (!iso) return '—'; if (value == null || value === '') return '—';
try { try {
return new Date(iso).toLocaleDateString('de-CH', { day: '2-digit', month: '2-digit', year: 'numeric' }); const num = typeof value === 'number' ? value : Number(value);
const ms = !isNaN(num) && num < 1e12 ? num * 1000 : num;
const d = !isNaN(ms) ? new Date(ms) : new Date(value);
if (isNaN(d.getTime())) return String(value);
return d.toLocaleDateString('de-CH', { day: '2-digit', month: '2-digit', year: 'numeric' });
} catch { } catch {
return iso; return String(value);
} }
}; };