BoldSignEasily embed eSignatures in your .NET applications. Free sandbox with native SDK available.
Hi
Using:
angular 9, nswag generated typescript api client. Server-side .net core.
I have an
issue using the Gantt chart in combination with nswag.
When we get
the datasource data from the server (via nswag client) the items are of type
GantDataSource, which has some additional methods ( “toJSON()” this method is
used when serializing the data before sending to the web api. )
Saving data to the server works fine when no new items are added / manipulated. When we add a new task item to the chart the
new task is added to the datasource as a js object (without the toJSON()
method.)
Manipulating
the items in the grid also converts the bound GanttDataSource object(s) to a
normal js objects.
Is it possible
to override the type generated in the “Add” button?
Nswag: https://github.com/RicoSuter/NSwag
Our server-side
model:
public class GanttDataSource
{
public int TaskId { get; set; }
public string TaskName { get; set; }
public DateTime StartDate { get; set; }
public DateTime EndDate { get; set; }
public DateTime? BaselineStartDate { get; set; }
public DateTime? BaselineEndDate { get; set; }
public string Duration { get; set; }
public int Progress { get; set; }
public string Predecessor
{ get; set; }
public List<GanttDataSource>
SubTasks { get; set; }
public List<IndicatorsModel>
Indicators { get; set; }
public int[] ResourceId { get; set; }
}