跳到主要内容

onBeforeAutoScheduleConflictResolve

信息

This event requires the Gantt PRO auto_scheduling plugin and prompt mode.

Description​

Fires before Gantt presents choices for a new constraint conflict introduced by a user edit

onBeforeAutoScheduleConflictResolve: (conflicts: AutoScheduleConflict[], resolve: (choice: AutoScheduleConflictChoice) => void, resolutions: AutoScheduleConflictResolution[]) => boolean;

Parameters​

  • conflicts describes the affected tasks, constraints, required and actual dates, and the driving dependency IDs when available. Each conflict in this event has kind: "constraint-violation".
  • resolve accepts one offered choice or "cancel".
  • resolutions contains the offered choices. Each entry has choice and localized text, and can include the task IDs or link IDs affected by the choice.

Returns​

Return false to replace the built-in dialog. Call resolve with the choice from your dialog, or with "cancel" to revert the edit. Any other return allows Gantt to show its dialog.

Details​

The callback can be called later, after the user makes a choice. An unavailable choice throws an error. If Gantt can no longer deactivate the proposed links, for example because a link update is vetoed, it can offer an updated set of choices. Use onAfterAutoScheduleConflictResolve to handle the final decision.

Change log​

  • Added in v10.1.
Need help?
Got a question about the documentation? Reach out to our technical support team for help and guidance. For custom component solutions, visit the Services page.