feat(automations): multi-option form-field conditions (all / any / none / exact)
This commit is contained in:
@@ -10,6 +10,7 @@ import {
|
||||
AUTOMATION_NOTIFY_CHANNEL_LABELS,
|
||||
AUTOMATION_TRIGGER_LABELS,
|
||||
MAX_AUTOMATION_STEPS,
|
||||
formConditionValues,
|
||||
isAutomationCondition,
|
||||
splitAutomationBranches,
|
||||
type AutomationAction,
|
||||
@@ -174,7 +175,8 @@ function stepHint(step: AutomationStep) {
|
||||
const opLabel = AUTOMATION_CONDITION_OP_LABELS[op];
|
||||
if (step.conditionField === 'form_field') {
|
||||
if (op === 'is_set' || op === 'is_empty') return opLabel;
|
||||
return `${opLabel} «${step.conditionValue ?? ''}»`;
|
||||
const joiner = op === 'contains_any' || op === 'not_contains' ? ' یا ' : ' و ';
|
||||
return `${opLabel} ${formConditionValues(step).map((v) => `«${v}»`).join(joiner) || '«»'}`;
|
||||
}
|
||||
if (step.conditionField === 'deal_amount' && step.conditionValue != null) {
|
||||
return `${opLabel} ${toFaDigits(Number(step.conditionValue))}`;
|
||||
|
||||
Reference in New Issue
Block a user