Our pure JavaScript Scheduler component


Post by Aniket »

Team,

I am designing my backend api to accept the changes made by the user on the scheduler.

What I see from the docs in crudmanager's sync operation it posts the updated object in below format

From below object , Do i only need to consider the changes array in the object? I see lot of other data as well.

Any thoughts will be appreciated, P.S , I have autosync set to true so that I post every change to the server

Object
action: "update"
batch: false
changes:
duration:
oldValue: 6.77082175925926
value: 3.9166550925925927
__proto__: Object
startDate:
oldValue: Fri Jul 03 2020 05:30:00 GMT+0530 (India Standard Time) {}
value: Mon Jul 06 2020 02:00:00 GMT+0530 (India Standard Time) {}
__proto__: Object
__proto__: Object
fromRelationUpdate: false
record: ClassDefEx
baseTestLocation: (...)
comments: (...)
data:
baseTestLocation: "NML"
cls: ""
comments: ""
deliveryPenalty: 0
draggable: true
dueDate: "1:??????"
dueDatePenalty: 0
duration: 3.9166550925925927
durationUnit: "d"
endDate: Thu Jul 09 2020 23:59:59 GMT+0530 (India Standard Time) {}
eventColor: "#FFFF00"
eventStyle: "border"
exceptionDates: undefined
experimentExecutioner: "185903"
experimentExecutionerDepartment: "??6991-5422"
experimentIdentification: "A02"
experimentPlanner: "185903"
experimentPlannerDepartment: "??6991-5422"
group: null
id: 6
implementationLocation: ""
isColdWeatherTest: false
isCollisionTest: false
isPossessionTest: false
mustNotSpec: ""
mustSpec: "SUNROOF, L2?????18???????"
name: " ??6991-5422 (5?)"
nmlLocation: ""
orderPriority: 0
priorityPenalty: 0
reason: "???????"
reasonTestingItem: "To confirm aerodynamics performance achievement level"
resizable: true
resourceId: 5
startDate: Mon Jul 06 2020 02:00:00 GMT+0530 (India Standard Time) {}
taskType: 0
testApplied: (16) [{…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}]
testFileName: "A(???)"
testItemName: "????"
testSpareDays: 0
testTypeId: 13
totalDuration: 5
weight: 0
__proto__: Object
deliveryPenalty: (...)
draggable: (...)
dueDate: (...)
dueDatePenalty: (...)
eventColor: (...)
eventStyle: (...)
exceptionDates: (...)
experimentExecutioner: (...)
experimentExecutionerDepartment: (...)
experimentIdentification: (...)
experimentPlanner: (...)
experimentPlannerDepartment: (...)
generation: 2
group: (...)
iconCls: (...)
id: (...)
implementationLocation: (...)
isColdWeatherTest: (...)
isCollisionTest: (...)
isPossessionTest: (...)
meta: {modified: {…}, relationCache: {…}, map: {…}}
milestoneWidth: (...)
mustNotSpec: (...)
mustSpec: (...)
name: (...)
nmlLocation: (...)
orderPriority: (...)
originalData:
baseTestLocation: "NML"
comments: ""
deliveryPenalty: 0
draggable: true
dueDate: "1:??????"
dueDatePenalty: 0
endDate: "2020-07-09T23:59:59"
eventColor: "#FFFF00"
eventStyle: "border"
experimentExecutioner: "185903"
experimentExecutionerDepartment: "??6991-5422"
experimentIdentification: "A02"
experimentPlanner: "185903"
experimentPlannerDepartment: "??6991-5422"
group: null
id: 6
implementationLocation: ""
isColdWeatherTest: false
isCollisionTest: false
isPossessionTest: false
mustNotSpec: ""
mustSpec: "SUNROOF, L2?????18???????"
name: " KCH??6991-5422 (5?)"
nmlLocation: ""
orderPriority: 0
priorityPenalty: 0
reason: "???????"
reasonTestingItem: "To confirm aerodynamics performance achievement level"
resizable: true
resourceId: 5
startDate: "2020-07-03T00:00:00Z"
taskType: 0
testApplied: (16) [{…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}]
testFileName: "A(???)"
testItemName: "????"
testSpareDays: 0
testTypeId: 13
totalDuration: 5
weight: 0
__proto__: Object
parentIndex: 24
predecessors: (...)
priorityPenalty: (...)
reason: (...)
reasonTestingItem: (...)
recurrenceRule: (...)
recurringTimeSpanId: (...)
resizable: (...)
resource: (...)
resourceId: (...)
stores: [EventStore]
style: (...)
successors: (...)
taskType: (...)
testApplied: (...)
testFileName: (...)
testItemName: (...)
testSpareDays: (...)
testTypeId: (...)
totalDuration: (...)
unjoinedStores: []
weight: (...)
Symbol(STM_PROP): StateTrackingManager {initialConfig: {…}, isConfiguring: false, configDone: {…}, autoRecordTransactionStopTimeout: 100, makeModelUpdateAction: ?, …}
_cls: DomClassList {b-sch-terminals-visible: 0, Symbol(dirty): true}
_endDateMS: 1594319399000
_eventStore: EventStore {added: StoreBag, removed: StoreBag, modified: StoreBag, idRegister: {…}, internalIdRegister: {…}, …}
_internalId: 74
_isMilestone: false
_startDateMS: 1593981000000
$name: (...)
allChildren: (...)
assignmentStore: (...)
childLevel: (...)
cls: (...)
config: (...)
dates: (...)
descendantCount: (...)
duration: (...)
durationMS: (...)
durationUnit: (...)
endDate: (...)
endDateMS: (...)
eventStore: (...)
expanded: (...)
fieldNames: (...)
fields: (...)
firstChild: (...)
firstStore: (...)
fullDuration: (...)
hasGeneratedId: (...)
hasValidDates: (...)
indexPath: (...)
internalId: (...)
isBatchUpdating: (...)
isCommitting: (...)
isDraggable: (...)
isEvent: (...)
isLeaf: (...)
isLoaded: (...)
isMilestone: (...)
isModel: (...)
isModified: (...)
isOccurrence: (...)
isParent: (...)
isPersistable: (...)
isPhantom: (...)
isRecurring: (...)
isResizable: (...)
isScheduled: (...)
isValid: (...)
json: (...)
lastChild: (...)
modificationData: (...)
modifications: (...)
occurrences: (...)
parentId: (...)
persistableData: (...)
previousSiblingsTotalCount: (...)
rawModificationData: (...)
rawModifications: (...)
recurrence: (...)
recurrenceModel: (...)
recurringEvent: (...)
recurringTimeSpan: (...)
resourceStore: (...)
resources: (...)
root: (...)
startDate: (...)
startDateMS: (...)
stm: (...)
subclass: (...)
supportsRecurring: (...)
visibleDescendantCount: (...)
wbsCode: (...)
get predecessors: ? ()
set predecessors: ? (value)
get successors: ? ()
set successors: ? (value)
__proto__: EventModel
resources: [ClassDefEx]
source: EventStore {added: StoreBag, removed: StoreBag, modified: StoreBag, idRegister: {…}, internalIdRegister: {…}, …}
type: "eventschange"
__proto__: Object

Post by mats »

From below object , Do i only need to consider the changes array in the object?

What is this object, and how does it relate to syncing using CrudManager?


Post by Aniket »

I got this from the console, after posting changes using sync operation to a fake url.

Basically I want to understand how to post the changes and save them at the backend


Post by mats »

crudManager already posts changes to your backend automatically.


Post by Aniket »

Yes, How can I view these changes so that I can design my backend accordingly. for example, which fields to update etc


Post by mats »

Read the Crud Manager guide, or just make a change in any Gantt demo with auto sync and inspect what's actually sent on the network.


Post Reply