mirror of https://github.com/langgenius/dify.git
feat: show placeholder '--' for invalid cron expressions in node display
- Return '--' placeholder when cron mode has empty or invalid expressions - Prevents displaying fallback dates that confuse users - Maintains consistent UX for invalid schedule configurations
This commit is contained in:
parent
e49534b70c
commit
6943a379c9
|
|
@ -244,6 +244,12 @@ export const getFormattedExecutionTimes = (data: ScheduleTriggerNodeType, count:
|
|||
}
|
||||
|
||||
export const getNextExecutionTime = (data: ScheduleTriggerNodeType): string => {
|
||||
// Return placeholder for cron mode with empty or invalid expression
|
||||
if (data.mode === 'cron') {
|
||||
if (!data.cron_expression || data.cron_expression.trim() === '' || !isValidCronExpression(data.cron_expression))
|
||||
return '--'
|
||||
}
|
||||
|
||||
const times = getFormattedExecutionTimes(data, 1)
|
||||
if (times.length === 0) {
|
||||
const userCurrentTime = getUserTimezoneCurrentTime(data.timezone)
|
||||
|
|
|
|||
Loading…
Reference in New Issue