mirror of
https://github.com/xtr-dev/payload-automation.git
synced 2025-12-10 17:03:22 +00:00
Fix workflow steps UI showing JSON fields instead of dynamic input fields
- Replace generic JSON input field with dynamic fields based on step inputSchema - Steps now show proper form fields (URL for HTTP requests, collection/data for CRUD operations) - Improves user experience by providing structured forms instead of raw JSON editing - Clean up debug files from repository 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -197,11 +197,17 @@ export const createWorkflowCollection: <T extends string>(options: WorkflowsPlug
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
name: 'input',
|
||||
type: 'json',
|
||||
required: false
|
||||
},
|
||||
...(steps || []).flatMap(step => (step.inputSchema || []).map(field => ({
|
||||
...field,
|
||||
admin: {
|
||||
...(field.admin || {}),
|
||||
condition: (...args) => args[1]?.step === step.slug && (
|
||||
field.admin?.condition ?
|
||||
field.admin.condition.call(this, ...args) :
|
||||
true
|
||||
),
|
||||
},
|
||||
} as Field))),
|
||||
{
|
||||
name: 'dependencies',
|
||||
type: 'text',
|
||||
|
||||
Reference in New Issue
Block a user