Our powerful JS Calendar component


Post by Nagesh@Apoorva.com »

Hi Team,
When a resource is removed it is considered as a delete event. And the data we are getting in sync API is very limited, just remove object and id when we removed resources for the event. But we want this considered as an update and not just the id we want the entire event data. Is this Possible?

Attachments
remove resource.png
remove resource.png (47.12 KiB) Viewed 313 times

Post by tasnim »

Hi,

For a delete action, all you need is just an id
Could you please explain in a bit more detail what you want to achieve?


Post by Nagesh@Apoorva.com »

When a resource is removed, I don't want the event to be deleted. I want it to behave like an update even when the resource is removed.


Post by tasnim »


Post by Nagesh@Apoorva.com »

No.
Have a look at our event editor, we have a dedicated Delete button to delete an event.

event editor.png
event editor.png (70.79 KiB) Viewed 273 times

So when the user removed a resource we want to consider this as an update like the user changing name or event timings. Have a look at the image below

update.png
update.png (163 KiB) Viewed 273 times

When an event name is updated I was able to see all the data not just whatever fields I was changing since we are using "writeAllFields: true".
When I removed a resource, which is an update here I was able to get only the id. I was not intended to delete the event, it's just an update. update the resource for that event to null.

delete.png
delete.png (131.81 KiB) Viewed 273 times

Post by Nagesh@Apoorva.com »

Hi Team, we are waiting for your reply.


Post by Animal »

I don't understand. You are going to remove the resource. You get the id of the resource to remove. You ask the database to remove the row with that id.

I do not understand what actual database state you want to finish with.


Post by Nagesh@Apoorva.com »

Hi, our requirement is, the user can create an event without resources.The user creates an event with a resource and then edits the event and removes the resource. In the current Bryntum calendar, this is considered as delete, but as per our requirement, the user updates the event by removing resources. So in the database, the resource assigned to that event will be updated to null not the row delete.
Update is the database state we want to finish.


Post by Animal »

OK. What I think you mean is that when you deassign all resources from an event, the event is deleted.

This was fixed in 5.3.5: https://github.com/bryntum/support/issues/6732


Post Reply