frappe / gantt

Open Source Javascript Gantt
https://frappe.io/gantt
MIT License
4.6k stars 1.02k forks source link

Any one have any code for saving the changes made when dragged to a Database? #391

Closed LeeWheeler closed 4 months ago

LeeWheeler commented 5 months ago

Hi All,

Doe's anyone have any code that they can share for saving the positions to a Database?

I use C#

I've been trasked with a school project, the Gannt code is perfect but I can't flag a save back to the Database on move.

Thanks x

richardhj commented 4 months ago

Maybe ask ChatGPT but be more specific on your environment ;-)

safwansamsudeen commented 4 months ago

Can't you use the change events to ping the server code and save the progress/start/end date to the DB?

LeeWheeler commented 4 months ago

[richardhj] My environment is C# Dot Net. [safwansamsudeen] Wouldn't know where to start :) I'm l;earning C# at Uni and I think that if I can get your code to work then I will have a tool for life. I have it populating from a DB and everything works, I just have zero idea on how to write it back when something is chnaged as don't know JS.

safwansamsudeen commented 4 months ago

I do not know C#, but I assume you'll have to send a POST request to the server using the JS fetch or Ajax.

This request should contain details that should be stored in the DB, and should be sent using the on_progress_change or on_date_change events.