[ADF-3237] Change and remove form from a task (#3597)

* button added for task standalone

* rebase fixed

* review fix

* test added & fixes

* refresh task details

* change and remove form added

* localize & documentation work

* tests added

* tests fixes

* tests fixes
This commit is contained in:
bbcodrin
2018-07-18 12:14:54 +03:00
committed by Eugenio Romano
parent c6c573bcfb
commit 54380fd693
13 changed files with 160 additions and 65 deletions

View File

@@ -219,6 +219,16 @@ export class TaskListService {
.catch(err => this.handleError(err));
}
/**
* Deletes a form from a task.
* @param taskId Task id related to form
* @returns Null response notifying when the operation is complete
*/
deleteForm(taskId: string): Observable<TaskDetailsModel> {
return Observable.fromPromise(this.callApiDeleteForm(taskId))
.catch(err => this.handleError(err));
}
/**
* Gives completed status to a task.
* @param taskId ID of the target task
@@ -353,6 +363,10 @@ export class TaskListService {
return this.apiService.taskApi.deleteTask(taskId);
}
private callApiDeleteForm(taskId: string) {
return this.apiService.taskApi.removeForm(taskId);
}
private callApiTaskChecklist(taskId: string) {
return this.apiService.taskApi.getChecklist(taskId);
}