Our pure JavaScript Scheduler component


Post by kernel »

Hi,
when i change an event in Scheduler, I do some server-side business, including sending mail.
I would show a toast in Scheduler containing server response of this job.
I am looking for an example to follow.

I have requestId received form scheduler: what json structure i should use to send (to what url?) info to Scheduler and how to catch it in Scheduler?

Thanks a lot!

Post by pmiklashevich »

Hello,

How do you send your request?

In general you need to show a toast in the callback, like:
AjaxHelper.get('someurl').then(response => {
    Toast.show(response.msg);
});
https://www.bryntum.com/docs/scheduler/#Common/helper/AjaxHelper
https://www.bryntum.com/docs/scheduler/#Common/widget/Toast

You can subscribe to afterRequest event of the eventStore and add additional info to the response to show it in a toast. https://www.bryntum.com/docs/scheduler/#Scheduler/data/EventStore#event-afterRequest

If you're using crud manager you can subscribe to sync event: https://www.bryntum.com/docs/scheduler/#Scheduler/data/CrudManager#event-sync

Best,
Pavel

Pavlo Miklashevych
Sr. Frontend Developer


Post Reply