fix: Enable and disable surveys
The logic to enable and disable surveys was not implemented, and the state was not shown correctly. The front-end logic now corresponds to the back-end logic (org.apache.fineract.spm.service.SpmService).
This commit is contained in:
@@ -240,6 +240,24 @@ export class SystemService {
|
||||
return this.http.put(`/surveys/${surveyId}`, survey);
|
||||
}
|
||||
|
||||
/**
|
||||
* Activates a survey.
|
||||
* @param {number} surveyId Survey ID.
|
||||
* @returns {Observable<any>}
|
||||
*/
|
||||
activateSurvey(surveyId: number): Observable<any> {
|
||||
return this.http.post(`/surveys/${surveyId}?command=activate`, null);
|
||||
}
|
||||
|
||||
/**
|
||||
* Deactivates a survey.
|
||||
* @param {number} surveyId Survey ID.
|
||||
* @returns {Observable<any>}
|
||||
*/
|
||||
deactivateSurvey(surveyId: number): Observable<any> {
|
||||
return this.http.post(`/surveys/${surveyId}?command=deactivate`, null);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @returns {Observable<any>} Fetches Jobs.
|
||||
|
||||
Reference in New Issue
Block a user