Hi
I have a weird issue here. I work with Scheduler pro and added projectmodel for syncing with backend. Everything works fine like updates and deletes. But when I add an event, it also gets triggered and the event is created but it keeps being triggered. So the event is created multiple times.
It only happens when adding an event. My projectmodel looks like this:
project : {
// Configure urls used by the built in CrudManager
autoLoad: true,
autoSync: true,
transport : {
load : {
url : schedulerContainer.dataset.resourcesUrl
},
sync : {
url : schedulerContainer.dataset.syncResourcesUrl
}
},
onRequestFail : (event) => {
const
{ requestType, response } = event,
serverMessage = response && response.message,
exceptionText = `Action "${requestType}" failed. ${serverMessage ? ` Server response: ${serverMessage}` : ''}`;
Toast.show({
html : exceptionText,
color : 'b-red',
style : 'color:white',
timeout : 3000
});
console.error(exceptionText);
}
},
The response the server gives after adding the event looks like this:
{
"success":true,
"resources": {
"rows":[]
},
"events": {
"rows": [
{
"id":"2168061_2168061",
"startDate":"2022-09-28T19:00:00+02:00",
"duration":180,
"durationUnit":"m",
"name":"cxwv araz (2)",
"firstName":"cxwv",
"surnames":"araz",
"numberOfPersons":2,
"comments":null,
"allergies":null,
"style":"border-radius:5px"
}
]
},
"assignments":{"rows":[
{
"id":"2168061_2168061_0",
"resourceId":"2168061",
"eventId":"2168061_2168061"
}
]
},
"dependencies":{"rows":[]}}
What can I be doing wrong? Or is it a bug in the system because it has been a problem before as I saw in other topics like viewtopic.php?f=52&t=18761
But I'm not using 'percentDone' so that can't be the problem and it also should be fixed since i'm using the newest version 5.1.3.
Thanks in advance