Our powerful JS Calendar component


Post by skorer »

Hi,

I've recently started developing the saving changes side of the calendar after I've finished the read only part. While I was trying to understand sync in Crud manager I have got an issue with duration.
I am not using a server or api that works with POST but I am just analyzing the requests when any change happens in the calendar. So when I delete an event on the calendar I expect that only the removed event id appering under the removed part of the request but as you see all other event are looking like they are updated with some duration variable. Those event does not have duration attribute in my event model. Can you help me with this situation?

sync error.png
sync error.png (56.12 KiB) Viewed 323 times

Post by Animal »

In the JSON data which provides those events, include the property

manuallyScheduled : true


Post by skorer »

Do you mean the load json data should be as following?

calendar-data.json
(334.84 KiB) Downloaded 25 times

Post by tasnim »

Hi,

Animal means to add it to each event of events

  "events": {
      "rows": [
          {
              "calendarId": 2111,
              "startDate": "2023-07-02T00:00:00",
              "endDate": "2023-07-03T00:00:00",
              "resourceId": 1,
              "allDay": true,
              "name": "Standart Altyapı Değişiklik",
              "priority": null,
              "changeNumber": null,
              "changeDetail": "Standart Altyapı Değişiklik",
              "owner": null,
              "ownerGroup": null,
              "recordStatus": null,
              "processStatus": null,
              "formType": null,
              "products": null,
              "projectName": null,
              "isXLRoutage": null,
              "isXLRMFoutage": null,
              "link": null,
              "resourceTypeName": "Özel Günler",
              "application": null,
              "manuallyScheduled" : true
          },
          {
              "calendarId": 2173,
              "startDate": "2023-08-26T00:00:00",
              "endDate": "2023-08-27T00:00:00",
              "resourceId": 1,
              "allDay": true,
              "name": "Standart Altyapı Değişiklik",
              "priority": null,
              "changeNumber": null,
              "changeDetail": "Standart Altyapı Değişiklik",
              "owner": null,
              "ownerGroup": null,
              "recordStatus": null,
              "processStatus": null,
              "formType": null,
              "products": null,
              "projectName": null,
              "isXLRoutage": null,
              "isXLRMFoutage": null,
              "link": null,
              "resourceTypeName": "Özel Günler",
              "application": null,
              "manuallyScheduled" : true
              
}

Post by skorer »

It is still sending update requests when I delete an event;

syncerror2.png
syncerror2.png (55.38 KiB) Viewed 314 times
calendar-data.json
(28.54 KiB) Downloaded 29 times

Post by Animal »

I think it is just correcting missing data. In the first event there, it's a one day event. The startDate and endDate are one day apart. But there is no duration property at all. this is being corrected by the SchedulingEngine, and is registering as a change. Send the correct duration in the loading data, and then there will be no change.


Post by skorer »

Loading and displaying data without duration porperty works correctly. Is there any way for making duration property not necessary? It will be complicated to fill all of the duration property especially with other events that are not one day event.


Post by Animal »

If it is not important to your app, and never used, you could define the duration field to not be persistable:

Configure your Project's eventStore like this:

        eventStore : {
            fields : [{
                name    : 'duration',
                persist : false
            }]
        },

Post by skorer »

That is what I was looking for, thank you so much


Post Reply