Our state of the art Gantt chart


Post by sravanthi chakilam »

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.

Post by mats »

Can you please append your traffic logs from Network tab?

Post by sravanthi chakilam »

Please find below screen shot. In that utopia Project I have added manually form db it is loading . but when create task from Front end it is not saving in database
Attachments
bryntm.PNG
bryntm.PNG (74.43 KiB) Viewed 2067 times

Post by mats »

We need your raw JSON, not a screenshot :)

Post by sravanthi chakilam »

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}

Post by mats »

Please always use CODE tags when posting code / data

Post by sravanthi chakilam »

Sure I will. Can you please help me on this. It is very helpful if you let me know what is flow of functions to insert the task into the database.In app.module.js page async onAddTaskClick() { function will trigger when click on create button from here how create task function will call

Post by arcady »

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:
const project = window.project = new ProjectModel({
    // enable automatic data persisting
    autoSync : true,
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!

Post by arcady »

I've changed the demo code so now it has "Save" button on the toolbar. You can find it in the next nightly build or in the next gantt release.

Post by sravanthi chakilam »

Thanks for your replay . I have tried by adding
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'
        }
    }
});
in app.module.js but still data is not saving into the database

Post Reply