feat(automations): multi-option form-field conditions (all / any / none / exact)
This commit is contained in:
@@ -112,7 +112,7 @@ function conditionDefaults(field: AutomationConditionField): Partial<AutomationS
|
||||
return { conditionOp: 'eq', conditionValue: 'normal', conditionKey: null };
|
||||
}
|
||||
if (field === 'form_field') {
|
||||
return { conditionOp: 'contains', conditionValue: '', conditionKey: null };
|
||||
return { conditionOp: 'contains', conditionValue: '', conditionValues: [], conditionKey: null };
|
||||
}
|
||||
return { conditionOp: 'is_set', conditionValue: undefined, conditionKey: null };
|
||||
}
|
||||
@@ -197,6 +197,7 @@ function hydrate(row?: AutomationRuleDto | null) {
|
||||
dueOffsetMinutes: s.dueOffsetMinutes ?? null,
|
||||
activityTypeDefId: s.activityTypeDefId ?? null,
|
||||
conditionKey: s.conditionKey ?? null,
|
||||
conditionValues: s.conditionValues ?? [],
|
||||
}));
|
||||
if (!steps.value.length) steps.value = [makeStep('create_activity')];
|
||||
selected.value = 'trigger';
|
||||
|
||||
Reference in New Issue
Block a user