Our powerful JS Calendar component


Post by codevlabs »

Dear Support,

I am going through your docs, guides and example to find the best way to build my Angular 16 project. My target to get Resource and Event Data remotely.

crudmanager
I have read about the crudmanager but I can't find any complete examples for angular. Can you please provide complete examples to how I set it up. The only thing i found is the following which i have added to the config. I am not sure if the [events] and [resources] parameters are still required in the <bryntum-calendar> tag when using this method.

crudManager : {
		transport : {
		    load : {
			   url : '/server/load/url'
		    },
		    sync : {
			   url : '/server/save/url'
		    }
		},
		autoLoad : true,
		
}

onDataChange
I am also considering this option as I can easily load and save any events via our API. The main issue i found here is that this event was firing different number of time depending on how many changes were done to the event. I have also tried different filters including only using the events when the assignment store is updated but this store is not updated when a new event is created and saved without multiple changes. If i can capture one event when the event is saved, I can easily post this event to our DB.

syncData($event){
		console.log($event);
		
	if ($event.action == 'update' && $event.record.data){
		
		console.log($event.record.data);
		console.log($event.changes);
		console.log($event.record.data.resourceId);

I apologize if this post may seem elementary but I only just started using your components. Any insight, links to complete angular examples or directions on the best practice would be appreciated. I have tried to find a way forward from your documentation but I can't manage.

Thank you in advance.


Post by tasnim »

Hi,

I'm attaching an Angular demo that implements the crudManager. But for the sync URL, you would need to have the functionality implemented in the server API.

And regarding onDataChange, this is common to fire multiple times depending on the data change.
Here is the docs for it https://bryntum.com/products/calendar/docs/api/Grid/view/GridBase#event-dataChange

Attachments
basic.zip
(244.25 KiB) Downloaded 30 times

Post by codevlabs »

Hi Tasnim. The Demo was very helpful. I implemented crudmanager and it's looking good. thanks.


Post Reply