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

Function _prepareItemForForm

codebase/sources/dhtmlxscheduler.js:8582–8604  ·  view source on GitHub ↗
(item)

Source from the content-addressed store, hash-verified

8580 processedItem[this.action_param] = scheduler2.getUserData(item.id, this.action_param);
8581 return processedItem;
8582 }, _prepareItemForForm(item) {
8583 const processedItem = {};
8584 const scheduler2 = this.$scheduler;
8585 const copy = scheduler2.utils.copy(item);
8586 for (var i in copy) {
8587 let prop = copy[i];
8588 if (i.indexOf("_") === 0) {
8589 continue;
8590 } else if (prop) {
8591 if (prop.getUTCFullYear) {
8592 processedItem[i] = scheduler2._helpers.formatDate(prop);
8593 } else if (typeof prop == "object") {
8594 processedItem[i] = this._prepareItemForForm(prop);
8595 } else {
8596 processedItem[i] = prop;
8597 }
8598 } else {
8599 processedItem[i] = "";
8600 }
8601 }
8602 processedItem[this.action_param] = scheduler2.getUserData(item.id, this.action_param);
8603 return processedItem;
8604 }, _prepareDataItem: function(item) {
8605 if (this._serializeAsJson) {
8606 return this._prepareItemForJson(item);
8607 } else {

Callers

nothing calls this directly

Calls 2

copyMethod · 0.65
getUserDataMethod · 0.65

Tested by

no test coverage detected