diff --git a/lang/es.json b/lang/es.json index cfd7b919..9364919a 100644 --- a/lang/es.json +++ b/lang/es.json @@ -1645,6 +1645,7 @@ "Uruguayan Peso": "Peso uruguayo", "Usage Information:": "Información de Uso:", "Use Defaults": "Usar Valores Predeterminados", + "Use a negative value for expenses (e.g. -21.99) and a positive value for income.": "Usa un valor negativo para gastos (ej. -21,99) y un valor positivo para ingresos.", "Use a strong password (minimum 12 characters). This password will encrypt your data.": "Usa una contraseña fuerte (mínimo 12 caracteres). Esta contraseña encriptará tus datos.", "Use a strong password (minimum 12 characters). This\\n password will encrypt your data.": "Usa una contraseña segura (mínimo 12 caracteres). Esta contraseña cifrará tus datos.", "Use a view-only key.": "Usa una clave de solo lectura.", diff --git a/resources/js/components/automation-rules/rule-builder.tsx b/resources/js/components/automation-rules/rule-builder.tsx index 38cf861d..a064cbf5 100644 --- a/resources/js/components/automation-rules/rule-builder.tsx +++ b/resources/js/components/automation-rules/rule-builder.tsx @@ -275,62 +275,79 @@ function ConditionRow({ const inputType = fieldConfig?.type === 'number' ? 'number' : 'text'; + const showAmountHint = showValueInput && inputType === 'number'; + return ( -
- +
+
+ - + - {showValueInput && ( - - onChange({ ...condition, value: e.target.value }) - } - placeholder={__('Value')} - className="w-full sm:flex-1" - step={inputType === 'number' ? 'any' : undefined} - /> + {showValueInput && ( + + onChange({ ...condition, value: e.target.value }) + } + placeholder={__('Value')} + className="w-full sm:flex-1" + step={inputType === 'number' ? 'any' : undefined} + /> + )} + + {!showValueInput && ( +
+ )} + + +
+ + {showAmountHint && ( +

+ {__( + 'Use a negative value for expenses (e.g. -21.99) and a positive value for income.', + )} +

)} - - {!showValueInput &&
} - -
); }