From 9170b9bb22827eef292a9114e8aee3fbed5c679a Mon Sep 17 00:00:00 2001 From: qcigano Date: Mon, 3 Aug 2026 20:14:29 +0200 Subject: [PATCH] Treuebonus-Karte deutlich detaillierter: Meilensteine, Kennzahlen, Regeln MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Die Treuebonus-Karte im Konto zeigte bisher nur einen nackten Fortschrittsbalken mit einem Satz Text. Jetzt: (1) zehn Meilenstein-Striche direkt im Balken plus Geschenk-Symbol am Ziel, (2) vier Kennzahl-Kacheln im gleichen Stil wie beim Abo- Status (Gesammelt, Noch nötig, Bonus bei Ziel, Bisher eingelöst), (3) ein neues Datenfeld "wie oft insgesamt schon eingelöst + wann zuletzt" (account.ts), das in einer eigenen, gold→grün abgewandelten "Bonus bereit"-Karte mit Glow-Effekt landet statt eines einfachen Links, (4) eine kurze Icon-Liste mit den Sammelregeln statt einem einzelnen Erklärsatz. Alles in 4 Sprachen, mit echten Vorschau-Zuständen (Fortschritt/bereit/gesperrt) per Screenshot verifiziert. Co-Authored-By: Claude Sonnet 5 --- src/i18n/ui.ts | 40 ++++++++++++ src/pages/ch/konto/angemeldet.astro | 88 +++++++++++++++++++++++---- src/pages/en/konto/angemeldet.astro | 88 +++++++++++++++++++++++---- src/pages/fr/konto/angemeldet.astro | 88 +++++++++++++++++++++++---- src/pages/konto/angemeldet.astro | 94 +++++++++++++++++++++++++---- src/scripts/account.ts | 20 ++++++ src/styles/global.css | 51 ++++++++++++++++ 7 files changed, 417 insertions(+), 52 deletions(-) diff --git a/src/i18n/ui.ts b/src/i18n/ui.ts index 1109c80..55a6ade 100644 --- a/src/i18n/ui.ts +++ b/src/i18n/ui.ts @@ -241,6 +241,16 @@ export const ui = { loyaltyUnlockedText: "Du hast zehn Bestellungen abgeschlossen und erhältst bei deiner nächsten Bestellung 20 % Rabatt auf einen Artikel deiner Wahl.", loyaltyGoToCart: "Artikel im Warenkorb auswählen →", loyaltyExplainer: "Es zählen nur vollständig abgeschlossene und bezahlte Bestellungen. Nach der Einlösung beginnt dein Fortschritt wieder bei null.", + loyaltyStatCollected: "Gesammelt", + loyaltyStatMissing: "Noch nötig", + loyaltyStatBonus: "Bonus bei Ziel", + loyaltyStatRedeemed: "Bisher eingelöst", + loyaltyStatRedeemedNever: "Noch nie", + loyaltyStatRedeemedSuffix: "×", + loyaltyLastRedeemed: "Zuletzt eingelöst am {date}", + loyaltyRuleValid: "Zählt: vollständig abgeschlossene & bezahlte Bestellungen", + loyaltyRuleInvalid: "Zählt nicht: stornierte oder noch offene Bestellungen", + loyaltyRuleReset: "Nach der Einlösung startet dein Fortschritt wieder bei 0", loyaltyLockedTitle: "🔒 Nur mit aktivem Abo verfügbar", loyaltyLockedText: "Der Treuebonus ist ein Extra für unsere Abo-Mitglieder. Schließe ein Abo ab, um Bestellungen für deine 20 %-Belohnung zu sammeln.", loyaltyLockedBtn: "Zum Abo →", @@ -543,6 +553,16 @@ export const ui = { loyaltyUnlockedText: "You've completed ten orders and get 20% off an item of your choice on your next order.", loyaltyGoToCart: "Choose item in cart →", loyaltyExplainer: "Only fully completed and paid orders count. After redemption your progress starts again from zero.", + loyaltyStatCollected: "Collected", + loyaltyStatMissing: "Still needed", + loyaltyStatBonus: "Reward at goal", + loyaltyStatRedeemed: "Redeemed so far", + loyaltyStatRedeemedNever: "Never yet", + loyaltyStatRedeemedSuffix: "×", + loyaltyLastRedeemed: "Last redeemed on {date}", + loyaltyRuleValid: "Counts: fully completed & paid orders", + loyaltyRuleInvalid: "Doesn't count: cancelled or still open orders", + loyaltyRuleReset: "After redemption your progress restarts at 0", loyaltyLockedTitle: "🔒 Only available with an active subscription", loyaltyLockedText: "The loyalty reward is an extra for our subscription members. Subscribe to start collecting orders towards your 20% reward.", loyaltyLockedBtn: "Go to subscription →", @@ -845,6 +865,16 @@ export const ui = { loyaltyUnlockedText: "Du hesch zäh Bstellige abgschlosse und übercho bi dinere nächschte Bstellig 20 % Rabatt uf en Artikel dinere Wahl.", loyaltyGoToCart: "Artikel im Warenchorb uswähle →", loyaltyExplainer: "Es zelle nume vollständig abgschlosseni und bezahlti Bstellige. Nach dr Ilösig fangt din Fortschritt wieder bi null a.", + loyaltyStatCollected: "Gsammlet", + loyaltyStatMissing: "No nötig", + loyaltyStatBonus: "Bonus bim Ziel", + loyaltyStatRedeemed: "Bisher iglöst", + loyaltyStatRedeemedNever: "No nie", + loyaltyStatRedeemedSuffix: "×", + loyaltyLastRedeemed: "Zletscht iglöst am {date}", + loyaltyRuleValid: "Zellt: vollständig abgschlosseni & bezahlti Bstellige", + loyaltyRuleInvalid: "Zellt nid: stornierti oder no offeni Bstellige", + loyaltyRuleReset: "Nach dr Ilösig fangt din Fortschritt wieder bi 0 a", loyaltyLockedTitle: "🔒 Nume mit aktivem Abo verfüegbar", loyaltyLockedText: "Dr Treuebonus isch es Extra für üsi Abo-Mitglieder. Schliess es Abo ab, um Bstellige für dini 20 %-Belohnig z sammle.", loyaltyLockedBtn: "Zum Abo →", @@ -1147,6 +1177,16 @@ export const ui = { loyaltyUnlockedText: "Vous avez validé dix commandes et bénéficiez de 20 % de réduction sur l'article de votre choix lors de votre prochaine commande.", loyaltyGoToCart: "Choisir l'article dans le panier →", loyaltyExplainer: "Seules les commandes entièrement finalisées et payées comptent. Après utilisation, votre progression repart de zéro.", + loyaltyStatCollected: "Cumulées", + loyaltyStatMissing: "Encore nécessaires", + loyaltyStatBonus: "Récompense à l'objectif", + loyaltyStatRedeemed: "Utilisées jusqu'ici", + loyaltyStatRedeemedNever: "Jamais encore", + loyaltyStatRedeemedSuffix: "×", + loyaltyLastRedeemed: "Dernière utilisation le {date}", + loyaltyRuleValid: "Compte : commandes entièrement finalisées et payées", + loyaltyRuleInvalid: "Ne compte pas : commandes annulées ou encore ouvertes", + loyaltyRuleReset: "Après utilisation, votre progression repart de 0", loyaltyLockedTitle: "🔒 Disponible uniquement avec un abonnement actif", loyaltyLockedText: "La récompense fidélité est un bonus réservé à nos abonné(e)s. Abonnez-vous pour commencer à cumuler des commandes vers votre récompense de 20 %.", loyaltyLockedBtn: "Voir l'abonnement →", diff --git a/src/pages/ch/konto/angemeldet.astro b/src/pages/ch/konto/angemeldet.astro index abd4c37..5fc9eb1 100644 --- a/src/pages/ch/konto/angemeldet.astro +++ b/src/pages/ch/konto/angemeldet.astro @@ -6,6 +6,7 @@ import type { Locale } from "../../../i18n/config"; import { useTranslations } from "../../../i18n/ui"; import { formatPrice } from "../../../i18n/format"; import { ABO_STUFEN, aboStufenKonfig, aboStufeName, aboStufeVorteil, type AboStufe } from "../../../data/abo"; +import { TREUE_ZIEL, TREUE_RABATT_PROZENT } from "../../../scripts/account"; const lang: Locale = "ch"; const t = useTranslations(lang); @@ -333,11 +334,58 @@ const angekommeneBestellungen = beispielBestellungen.filter((b) => b.status ===
-
+
+
+
+ +
+ +

+ +
+
+ + {t.accountDash.loyaltyStatCollected} + +
+
+ + {t.accountDash.loyaltyStatMissing} + +
+
+ + {t.accountDash.loyaltyStatBonus} + {TREUE_RABATT_PROZENT}% +
+
+ + {t.accountDash.loyaltyStatRedeemed} + +
+
+ + +

- -

{t.accountDash.loyaltyExplainer}

+ +
    +
  • {t.accountDash.loyaltyRuleValid}
  • +
  • {t.accountDash.loyaltyRuleInvalid}
  • +
  • {t.accountDash.loyaltyRuleReset}
  • +
@@ -480,8 +528,8 @@ const angekommeneBestellungen = beispielBestellungen.filter((b) => b.status === -