fix(loyalty): terminal icons, server-side i18n, category in transactions
Some checks failed
Some checks failed
- Fix icons: plus-circle → plus, backspace → arrow-left - Convert terminal $t() calls to server-side _() for card_label, stamps_until_reward, reward_label, not_enough_stamps - Inject transaction type labels as server-rendered window._txLabels object (eliminates all async i18n warnings on terminal page) - Resolve category_names in store transactions list endpoint Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -369,9 +369,11 @@ function storeLoyaltyTerminal() {
|
||||
getTransactionLabel(tx) {
|
||||
const type = tx.transaction_type;
|
||||
if (type) {
|
||||
return I18n.t('loyalty.transactions.' + type, {defaultValue: type.replace(/_/g, ' ')});
|
||||
// Use server-rendered labels (no async flicker)
|
||||
if (window._txLabels && window._txLabels[type]) return window._txLabels[type];
|
||||
return type.replace(/_/g, ' ');
|
||||
}
|
||||
return I18n.t('loyalty.common.unknown');
|
||||
return 'Unknown';
|
||||
},
|
||||
|
||||
getTransactionColor(tx) {
|
||||
|
||||
Reference in New Issue
Block a user