feat: edit button functionality added (#1459)

* fix: edit button functionality added

* lint fixes
This commit is contained in:
Ramveer
2022-07-26 16:56:18 +05:30
committed by GitHub
parent a526298ac1
commit eef6fa31d3
10 changed files with 502 additions and 3 deletions
+11 -2
View File
@@ -230,6 +230,15 @@ export class SystemService {
return this.http.get(`/surveys/${surveyId}?template=true`);
}
/**
* @param {string} surveyId Survey ID.
* @param {any} survey Survey Data.
* @returns {Observable<any>}
*/
editSurvey(surveyId: string, survey: any): Observable<any> {
return this.http.put(`/surveys/${surveyId}`, survey);
}
/**
* @returns {Observable<any>} Fetches Jobs.
@@ -272,8 +281,8 @@ export class SystemService {
}
/**
* @param jobId Job Id to be edited
* @returns {Observable<any>} Fetches Scheduler Job.
* @param {string} jobId Job Id on which jobs to run
* @returns {Observable<any>}
*/
runSelectedJob(jobId: string): Promise<any> {
return this.http.post(`/jobs/${jobId}?command=executeJob`, this.emptyPayload).toPromise();