MCPcopy Create free account
hub / github.com/DHTMLX/scheduler / remoteUpdates

Function remoteUpdates

codebase/sources/dhtmlxscheduler.es.js:1291–1313  ·  view source on GitHub ↗
(message2)

Source from the content-addressed store, hash-verified

1289}
1290function createHandlers(scheduler2) {
1291 function remoteUpdates(message2) {
1292 if (!message2 || !message2.event || !message2.event.id) {
1293 console.error("Invalid message format:", message2);
1294 return;
1295 }
1296 const { type, event: event2 } = message2;
1297 if (scheduler2._dp && scheduler2._dp._in_progress[event2.id]) {
1298 return;
1299 }
1300 if (type === "add-event" && scheduler2._dp) {
1301 for (const id in scheduler2._dp._in_progress) {
1302 if (scheduler2._dp.getState(id) === "inserted") {
1303 scheduler2._dp.attachEvent("onFullSync", function() {
1304 if (!scheduler2.getEvent(event2.id)) {
1305 processUpdate(type, event2);
1306 }
1307 }, { once: true });
1308 return;
1309 }
1310 }
1311 }
1312 processUpdate(type, event2);
1313 }
1314 function processUpdate(type, event2) {
1315 switch (type) {
1316 case "add-event":

Callers

nothing calls this directly

Calls 4

processUpdateFunction · 0.70
getStateMethod · 0.65
attachEventMethod · 0.65
getEventMethod · 0.65

Tested by

no test coverage detected