Hi ,
I have downloaded gantt-1.0.2-trial.zip and keep this folder my project folder and I am accessing gantt by using https://localhost/jmsdemo/gantt-1.0.2-trial/examples/php/index.html
I have created local database and configured in config.php
But when I create new task it just appending in ui but not saving in database . May I Know what is the reason.
Support Forum
I can see below response while loading the page when I am creating the task I could not see anything in Network tab {"success":true,"requestId":"15604232315070","project":{"calendar":null},"calendars":{"rows":[],"total":0},"resources":{"rows":[{"id":11,"name":"Appanna","city":"Bnaglore","calendar":null},{"id":12,"name":"Danushka","city":"Sri Lanka","calendar":null}],"total":2},"assignments":{"rows":[],"total":0},"dependencies":{"rows":[],"total":0},"tasks":{"rows":[{"id":4037,"parentId":null,"name":"Utopia project","startDate":"2019-06-13 00:00:00+01:00","endDate":"2019-07-31 00:00:00+01:00","effort":null,"effortUnit":"hour","duration":null,"durationUnit":"day","percentDone":0,"schedulingMode":null,"note":null,"constraintType":null,"constraintDate":null,"manuallyScheduled":false,"effortDriven":false,"cls":null,"iconCls":null,"color":null,"expanded":false,"calendar":null,"deadline":null,"index":0,"leaf":true}]},"timeRanges":{"rows":[]},"revision":0}
Ok, thing is we've actually forgotten to add a button to trigger data persisting.
As a quick workaround you can add autoSync config to the project model initialization in the demo app.js file:
After adding this config the project will be automatically persisted after every change. And we, in the meantime, will add "Save" button.
Thank you for the feedback!
As a quick workaround you can add autoSync config to the project model initialization in the demo app.js file:
const project = window.project = new ProjectModel({
// enable automatic data persisting
autoSync : true,
Thank you for the feedback!
Thanks for your replay . I have tried by adding
in app.module.js but still data is not saving into the database
const project = window.project = new ProjectModel({
// Let the Project know we want to use our own Task model with custom fields / methods
autoSync : true,
taskModelClass : Task,
transport : {
load : {
url : 'php/load.php',
paramName : 'q'
},
sync : {
url : 'php/sync.php'
}
}
});