feat: Ability to change subscription status in workflows

This commit is contained in:
Dries Augustyns
2026-05-09 08:43:05 +02:00
parent 2ea1802290
commit fadc19d139
4 changed files with 103 additions and 24 deletions
+10 -3
View File
@@ -206,11 +206,18 @@ export default function WorkflowEditorPage() {
}
break;
case 'UPDATE_CONTACT':
if (!config.updates || (typeof config.updates === 'object' && Object.keys(config.updates).length === 0)) {
errors.push(`"${step.name}" step is missing contact updates`);
case 'UPDATE_CONTACT': {
const hasUpdates =
config.updates && typeof config.updates === 'object' && Object.keys(config.updates).length > 0;
const hasSubscriptionAction =
typeof config.subscriptionAction === 'string' &&
config.subscriptionAction !== 'none' &&
config.subscriptionAction !== '';
if (!hasUpdates && !hasSubscriptionAction) {
errors.push(`"${step.name}" step is missing contact updates or a subscription action`);
}
break;
}
}
});