- i18n.js with 130+ translation keys for es/en, loaded in all 11 templates - sidebar.js uses t() for all nav labels, adds MX/US language toggle - app-init.js role labels use i18n - currency.py service with convert() and format_currency() - config.py adds DEFAULT_CURRENCY and EXCHANGE_RATE_USD_MXN settings - config_bp.py adds GET/PUT /pos/api/config/currency endpoints - config.html adds currency/exchange-rate section (Section 8) - config.js adds loadCurrency/saveCurrency with localStorage sync - pos.js fmt() reads pos_currency from localStorage for USD/MXN display Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -40,9 +40,10 @@
|
||||
|
||||
var name = employee.name || payload.name || 'Usuario';
|
||||
var role = employee.role || payload.role || '';
|
||||
var _t = typeof window.t === 'function' ? window.t : function(k) { return k; };
|
||||
var roleLabels = {
|
||||
'owner': 'Dueño', 'admin': 'Administrador', 'cashier': 'Cajero',
|
||||
'warehouse': 'Almacén', 'accountant': 'Contador'
|
||||
'owner': _t('role_owner'), 'admin': _t('role_admin'), 'cashier': _t('role_cashier'),
|
||||
'warehouse': _t('role_warehouse'), 'accountant': _t('role_accountant')
|
||||
};
|
||||
var roleLabel = roleLabels[role] || role;
|
||||
var initials = name.split(' ').map(function(p) { return p[0]; }).join('').toUpperCase().substring(0, 2);
|
||||
|
||||
Reference in New Issue
Block a user