BoldSign®Effortlessly integrate e-signatures into your app with the BoldSign® API. Create a sandbox account!
Hi
do you haven an example of Gantt working with Redux (Ngrx) ( synchronize data between gantt data and state,update , add , delete ,...etc )? it will be very helpfull.
Thanks,
Hi Syncfusion Team,
any update aboute NGRX sample?
Best regards,
appComponent.ts
public actionComplete(args: any) {
if (args.requestType == "save") {
this.TaskService.updateRecord(this.tasks).subscribe(() => {
args.endEdit();
}, (e) => {
this.ganttChart.endEdit();
}
);
}
if (args.requestType == 'add') {
this.TaskService.addRecord(this.tasks).subscribe(() => {
args.endEdit();
});
this.TaskService.addRecord(this.tasks).subscribe(() => { }, error => console.log(error), () => {
args.endEdit();
});
}
if (args.requestType == 'delete') {
this.TaskService.deleteRecord(this.tasks).subscribe(() => {
args.endEdit();
});
}
}
|
addRecord(state: any): Observable<any> {// you can apply empty string instead of state.data to get failure(error)
return this.http.post<TaskModel>(this.apiUrl, state.data, httpOptions);
}
/** DELETE: delete the record from the server */
deleteRecord(state: any): Observable<any> {
const id = state.data[0].id;
const url = `${this.apiUrl}/${id}`;
return this.http.delete<TaskModel>(url, httpOptions);
}
/** PUT: update the record on the server */
updateRecord(state: any): Observable<any> {
return this.http.put(this.apiUrl, state.data, httpOptions);
} |
Hi Monisha,
at first, i would to thank you for your help and support,I tried to integrate your proposed solution but i found it is not serve NgRX purpose that i want to use , i'm confusion if you understand the NgRX that i mean and i'm sorry if i didn't explain it clearly.
so i want to use NgRx for State Management third librerie for Angular
is possible to use it with ej2-Gantt ? like i mention in this ticket (https://www.syncfusion.com/forums/172586/cannot-read-properties-of-undefined-reading-ganttproperties ) i tried to implement it but an error appear.
Thanks,