[Trunk | Library]: stakeholder.service.ts: Monitor change - in "deleteElement()" method add parameter "childrenAction: string = null" to add options:

- delete default element and all elements based on this default (and their contents).
	- delete default element and for all elements (and theis contents) based in this default remove connection with this default which is deleted.


git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-services-library/trunk/ng-openaire-library/src/app@58979 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
konstantina.galouni 2020-06-23 08:27:56 +00:00
parent dae898b5ac
commit 3c2cc0708b
1 changed files with 6 additions and 2 deletions

View File

@ -82,9 +82,13 @@ export class StakeholderService {
}));
}
deleteElement(url: string, path: string[]): Observable<any> {
deleteElement(url: string, path: string[], childrenAction: string = null): Observable<any> {
path = HelperFunctions.encodeArray(path);
return this.http.delete<any>(url + '/' + path.join('/') + '/delete');
let params: string = "";
if(childrenAction) {
params = "?children="+childrenAction;
}
return this.http.delete<any>(url + '/' + path.join('/') + '/delete'+params);
}
reorderIndicators(url: string, path: string[], indicatorIds: string[], type: string = 'chart'): Observable<Indicator[]> {