feat(loyalty): cross-persona page alignment with shared components
Align loyalty pages across admin, merchant, and store personas so each sees the same page set scoped to their access level. Admin acts as a superset of merchant with "on behalf" capabilities. New pages: - Store: Staff PINs management (CRUD) - Merchant: Cards, Card Detail, Transactions, Staff PINs (CRUD), Settings (read-only) - Admin: Merchant Cards, Card Detail, Transactions, PINs (read-only) Architecture: - 4 shared Jinja2 partials (cards-list, card-detail, transactions, pins) - 4 shared JS factory modules parameterized by apiPrefix/scope - Persona templates are thin wrappers including shared partials - PinDetailResponse schema for cross-store PIN listings API: 17 new endpoints (11 merchant, 6 admin on-behalf) Tests: 38 new integration tests, arch-check green i18n: ~130 new keys across en/fr/de/lb Docs: pages-and-navigation.md with full page matrix Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -91,7 +91,9 @@
|
||||
"program": "Program",
|
||||
"overview": "Overview",
|
||||
"settings": "Settings",
|
||||
"wallet_debug": "Wallet Debug"
|
||||
"wallet_debug": "Wallet Debug",
|
||||
"staff_pins": "Staff PINs",
|
||||
"transactions": "Transactions"
|
||||
},
|
||||
"onboarding": {
|
||||
"create_program": {
|
||||
@@ -242,6 +244,105 @@
|
||||
"terms_conditions": "Terms & Conditions",
|
||||
"privacy_policy_url": "Privacy Policy URL"
|
||||
},
|
||||
"cards": {
|
||||
"total_members": "Total Members",
|
||||
"active_30d": "Active (30d)",
|
||||
"new_this_month": "New This Month",
|
||||
"total_points_balance": "Total Points Balance",
|
||||
"search_placeholder": "Search by name, email, phone, or card number...",
|
||||
"all_status": "All Status",
|
||||
"all_stores": "All Stores",
|
||||
"col_member": "Member",
|
||||
"col_card_number": "Card Number",
|
||||
"col_points_balance": "Points Balance",
|
||||
"col_last_activity": "Last Activity",
|
||||
"col_status": "Status",
|
||||
"col_actions": "Actions",
|
||||
"no_members": "No members found",
|
||||
"adjust_search": "Try adjusting your search criteria"
|
||||
},
|
||||
"card_detail": {
|
||||
"title": "Card Detail",
|
||||
"loading": "Loading card details...",
|
||||
"error_loading": "Error loading card details",
|
||||
"points_balance": "Points Balance",
|
||||
"total_earned": "Total Earned",
|
||||
"total_redeemed": "Total Redeemed",
|
||||
"member_since": "Member Since",
|
||||
"customer_information": "Customer Information",
|
||||
"name": "Name",
|
||||
"email": "Email",
|
||||
"phone": "Phone",
|
||||
"birthday": "Birthday",
|
||||
"card_details": "Card Details",
|
||||
"card_number": "Card Number",
|
||||
"status": "Status",
|
||||
"last_activity": "Last Activity",
|
||||
"enrolled_at": "Enrolled At",
|
||||
"transaction_history": "Transaction History",
|
||||
"col_date": "Date",
|
||||
"col_type": "Type",
|
||||
"col_points": "Points",
|
||||
"col_location": "Location",
|
||||
"col_notes": "Notes",
|
||||
"no_transactions": "No transactions found"
|
||||
},
|
||||
"transactions": {
|
||||
"title": "Transactions",
|
||||
"subtitle": "View all loyalty transactions",
|
||||
"loading": "Loading transactions...",
|
||||
"error_loading": "Error loading transactions",
|
||||
"search_placeholder": "Search transactions...",
|
||||
"all_types": "All Types",
|
||||
"all_stores": "All Stores",
|
||||
"col_date": "Date",
|
||||
"col_customer": "Customer",
|
||||
"col_type": "Type",
|
||||
"col_points": "Points",
|
||||
"col_location": "Location",
|
||||
"col_notes": "Notes",
|
||||
"no_transactions": "No transactions found"
|
||||
},
|
||||
"pins": {
|
||||
"title": "Staff PINs",
|
||||
"subtitle": "Manage staff authentication PINs",
|
||||
"loading": "Loading PINs...",
|
||||
"error_loading": "Error loading PINs",
|
||||
"total_pins": "Total PINs",
|
||||
"active_pins": "Active",
|
||||
"locked_pins": "Locked",
|
||||
"all_stores": "All Stores",
|
||||
"all_status": "All Status",
|
||||
"status_active": "Active",
|
||||
"status_inactive": "Inactive",
|
||||
"status_locked": "Locked",
|
||||
"col_name": "Name",
|
||||
"col_staff_id": "Staff ID",
|
||||
"col_store": "Store",
|
||||
"col_status": "Status",
|
||||
"col_locked": "Locked",
|
||||
"col_last_used": "Last Used",
|
||||
"col_actions": "Actions",
|
||||
"no_pins": "No staff PINs found",
|
||||
"create_pin": "Create PIN",
|
||||
"edit_pin": "Edit PIN",
|
||||
"delete_pin": "Delete PIN",
|
||||
"unlock_pin": "Unlock",
|
||||
"confirm_delete": "Are you sure you want to delete this PIN?",
|
||||
"pin_name": "Staff member name",
|
||||
"pin_staff_id": "Employee ID (optional)",
|
||||
"pin_code": "PIN Code",
|
||||
"pin_code_hint": "4-6 digit PIN",
|
||||
"pin_store": "Store",
|
||||
"select_store": "Select store",
|
||||
"pin_created": "PIN created successfully",
|
||||
"pin_updated": "PIN updated successfully",
|
||||
"pin_deleted": "PIN deleted successfully",
|
||||
"pin_unlocked": "PIN unlocked successfully",
|
||||
"save": "Save",
|
||||
"cancel": "Cancel",
|
||||
"read_only_notice": "PINs are read-only in admin view"
|
||||
},
|
||||
"program_form": {
|
||||
"program_type": "Program Type",
|
||||
"points_type_desc": "Earn points per EUR spent",
|
||||
@@ -360,7 +461,31 @@
|
||||
"cross_location_redemption": "Cross-Location Redemption",
|
||||
"allowed": "Allowed",
|
||||
"disabled": "Disabled",
|
||||
"modify_policy": "Modify admin policy"
|
||||
"modify_policy": "Modify admin policy",
|
||||
"view_cards": "View Cards",
|
||||
"view_transactions": "View Transactions",
|
||||
"view_pins": "View PINs"
|
||||
},
|
||||
"merchant_cards": {
|
||||
"title": "Merchant Cards",
|
||||
"subtitle": "View loyalty cards for this merchant",
|
||||
"loading": "Loading cards...",
|
||||
"error_loading": "Error loading cards"
|
||||
},
|
||||
"merchant_card_detail": {
|
||||
"title": "Card Detail"
|
||||
},
|
||||
"merchant_transactions": {
|
||||
"title": "Merchant Transactions",
|
||||
"subtitle": "View all transactions for this merchant",
|
||||
"loading": "Loading transactions...",
|
||||
"error_loading": "Error loading transactions"
|
||||
},
|
||||
"merchant_pins": {
|
||||
"title": "Merchant Staff PINs",
|
||||
"subtitle": "View staff PINs for this merchant (read-only)",
|
||||
"loading": "Loading PINs...",
|
||||
"error_loading": "Error loading PINs"
|
||||
},
|
||||
"merchant_settings": {
|
||||
"title": "Merchant Loyalty Settings",
|
||||
@@ -445,6 +570,34 @@
|
||||
"delete_message": "This will permanently delete your loyalty program and all associated data (cards, transactions, rewards). This action cannot be undone.",
|
||||
"delete_confirm": "Delete Program"
|
||||
},
|
||||
"cards": {
|
||||
"title": "Customer Cards",
|
||||
"subtitle": "View and manage loyalty members across all locations"
|
||||
},
|
||||
"card_detail": {
|
||||
"title": "Card Detail"
|
||||
},
|
||||
"transactions": {
|
||||
"title": "Transactions",
|
||||
"subtitle": "View all loyalty transactions across locations"
|
||||
},
|
||||
"pins": {
|
||||
"title": "Staff PINs",
|
||||
"subtitle": "Manage staff PINs across all locations"
|
||||
},
|
||||
"settings": {
|
||||
"title": "Loyalty Settings",
|
||||
"subtitle": "View loyalty program settings",
|
||||
"admin_controlled": "These settings are managed by the platform administrator",
|
||||
"staff_pin_policy": "Staff PIN Policy",
|
||||
"self_enrollment": "Self Enrollment",
|
||||
"cross_location": "Cross-Location Redemption",
|
||||
"void_transactions": "Allow Void Transactions",
|
||||
"enabled": "Enabled",
|
||||
"disabled": "Disabled",
|
||||
"required": "Required",
|
||||
"optional": "Optional"
|
||||
},
|
||||
"analytics": {
|
||||
"title": "Loyalty Analytics",
|
||||
"subtitle": "Loyalty program statistics across all your stores",
|
||||
@@ -609,6 +762,12 @@
|
||||
"create_program": "Create Program",
|
||||
"contact_admin": "Contact your administrator to set up a loyalty program."
|
||||
},
|
||||
"pins": {
|
||||
"title": "Staff PINs",
|
||||
"subtitle": "Manage staff authentication PINs for this location",
|
||||
"loading": "Loading PINs...",
|
||||
"error_loading": "Error loading PINs"
|
||||
},
|
||||
"settings": {
|
||||
"title": "Loyalty Settings",
|
||||
"page_title": "Loyalty Program Settings",
|
||||
|
||||
Reference in New Issue
Block a user