Improve UI
This commit is contained in:
@@ -3,6 +3,7 @@ import { useAuthStore } from '../stores/auth.store';
|
||||
import { useCurrentTenant } from '../stores/tenant.store';
|
||||
import { showToast } from '../utils/toast';
|
||||
import i18n from '../i18n';
|
||||
import { getTenantCurrencySymbol } from '../hooks/useTenantCurrency';
|
||||
|
||||
interface SSEEvent {
|
||||
type: string;
|
||||
@@ -211,7 +212,8 @@ export const SSEProvider: React.FC<SSEProviderProps> = ({ children }) => {
|
||||
|
||||
// Add financial impact to message if available
|
||||
if (data.business_impact?.financial_impact_eur) {
|
||||
message = `${message} • €${data.business_impact.financial_impact_eur} en riesgo`;
|
||||
const currencySymbol = getTenantCurrencySymbol(currentTenant?.currency);
|
||||
message = `${message} • ${currencySymbol}${data.business_impact.financial_impact_eur} en riesgo`;
|
||||
}
|
||||
|
||||
showToast[toastType](message, { title, duration });
|
||||
@@ -446,7 +448,8 @@ export const SSEProvider: React.FC<SSEProviderProps> = ({ children }) => {
|
||||
if (data.estimated_impact) {
|
||||
const impact = data.estimated_impact;
|
||||
if (impact.savings_eur) {
|
||||
message = `${message} • €${impact.savings_eur} de ahorro estimado`;
|
||||
const currencySymbol = getTenantCurrencySymbol(currentTenant?.currency);
|
||||
message = `${message} • ${currencySymbol}${impact.savings_eur} de ahorro estimado`;
|
||||
} else if (impact.risk_reduction_percent) {
|
||||
message = `${message} • ${impact.risk_reduction_percent}% reducción de riesgo`;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user