feat(loyalty): implement complete loyalty module MVP
Add stamp-based and points-based loyalty programs for vendors with: Database Models (5 tables): - loyalty_programs: Vendor program configuration - loyalty_cards: Customer cards with stamp/point balances - loyalty_transactions: Immutable audit log - staff_pins: Fraud prevention PINs (bcrypt hashed) - apple_device_registrations: Apple Wallet push tokens Services: - program_service: Program CRUD and statistics - card_service: Customer enrollment and card lookup - stamp_service: Stamp operations with anti-fraud checks - points_service: Points earning and redemption - pin_service: Staff PIN management with lockout - wallet_service: Unified wallet abstraction - google_wallet_service: Google Wallet API integration - apple_wallet_service: Apple Wallet .pkpass generation API Routes: - Admin: /api/v1/admin/loyalty/* (programs list, stats) - Vendor: /api/v1/vendor/loyalty/* (stamp, points, cards, PINs) - Public: /api/v1/loyalty/* (enrollment, Apple Web Service) Anti-Fraud Features: - Staff PIN verification (configurable per program) - Cooldown period between stamps (default 15 min) - Daily stamp limits (default 5/day) - PIN lockout after failed attempts Wallet Integration: - Google Wallet: LoyaltyClass and LoyaltyObject management - Apple Wallet: .pkpass generation with PKCS#7 signing - Apple Web Service endpoints for device registration/updates Also includes: - Alembic migration for all tables with indexes - Localization files (en, fr, de, lu) - Module documentation - Phase 2 interface and user journey plan Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
72
app/modules/loyalty/locales/de.json
Normal file
72
app/modules/loyalty/locales/de.json
Normal file
@@ -0,0 +1,72 @@
|
||||
{
|
||||
"loyalty": {
|
||||
"module": {
|
||||
"name": "Treueprogramme",
|
||||
"description": "Stempel- und punktebasierte Treueprogramme mit Wallet-Integration"
|
||||
},
|
||||
"program": {
|
||||
"title": "Treueprogramm",
|
||||
"create": "Programm erstellen",
|
||||
"edit": "Programm bearbeiten",
|
||||
"activate": "Aktivieren",
|
||||
"deactivate": "Deaktivieren",
|
||||
"type": {
|
||||
"stamps": "Stempel",
|
||||
"points": "Punkte",
|
||||
"hybrid": "Hybrid"
|
||||
}
|
||||
},
|
||||
"card": {
|
||||
"title": "Treuekarte",
|
||||
"number": "Kartennummer",
|
||||
"qr_code": "QR-Code",
|
||||
"enroll": "Kunde anmelden",
|
||||
"deactivate": "Karte deaktivieren"
|
||||
},
|
||||
"stamp": {
|
||||
"title": "Stempel",
|
||||
"add": "Stempel hinzufügen",
|
||||
"redeem": "Prämie einlösen",
|
||||
"count": "{current} von {target}",
|
||||
"until_reward": "Noch {count} bis zur Prämie"
|
||||
},
|
||||
"points": {
|
||||
"title": "Punkte",
|
||||
"earn": "Punkte sammeln",
|
||||
"redeem": "Punkte einlösen",
|
||||
"balance": "{count} Punkte",
|
||||
"per_euro": "{points} Punkte pro Euro"
|
||||
},
|
||||
"pin": {
|
||||
"title": "Mitarbeiter-PINs",
|
||||
"create": "PIN erstellen",
|
||||
"edit": "PIN bearbeiten",
|
||||
"unlock": "PIN entsperren",
|
||||
"locked": "PIN gesperrt bis {time}"
|
||||
},
|
||||
"wallet": {
|
||||
"google": "Zu Google Wallet hinzufügen",
|
||||
"apple": "Zu Apple Wallet hinzufügen"
|
||||
},
|
||||
"stats": {
|
||||
"title": "Statistiken",
|
||||
"total_cards": "Karten insgesamt",
|
||||
"active_cards": "Aktive Karten",
|
||||
"stamps_issued": "Ausgegebene Stempel",
|
||||
"rewards_redeemed": "Eingelöste Prämien"
|
||||
},
|
||||
"errors": {
|
||||
"program_not_found": "Treueprogramm nicht gefunden",
|
||||
"program_inactive": "Treueprogramm ist nicht aktiv",
|
||||
"card_not_found": "Treuekarte nicht gefunden",
|
||||
"card_inactive": "Treuekarte ist nicht aktiv",
|
||||
"cooldown": "Bitte warten Sie {minutes} Minuten vor dem nächsten Stempel",
|
||||
"daily_limit": "Tageslimit von {limit} Stempeln erreicht",
|
||||
"insufficient_stamps": "Benötigt {required} Stempel, vorhanden {current}",
|
||||
"insufficient_points": "Benötigt {required} Punkte, vorhanden {current}",
|
||||
"pin_required": "Mitarbeiter-PIN erforderlich",
|
||||
"pin_invalid": "Ungültiger PIN",
|
||||
"pin_locked": "PIN wegen zu vieler Fehlversuche gesperrt"
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user