|
|
@ -201,6 +201,8 @@ export class WorkPackagesListService { |
|
|
|
.then(() => { |
|
|
|
.then(() => { |
|
|
|
this.NotificationsService.addSuccess(this.I18n.t('js.notice_successful_delete')); |
|
|
|
this.NotificationsService.addSuccess(this.I18n.t('js.notice_successful_delete')); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this.removeMenuItem(query); |
|
|
|
|
|
|
|
|
|
|
|
let id; |
|
|
|
let id; |
|
|
|
if (query.project) { |
|
|
|
if (query.project) { |
|
|
|
id = query.project.$href!.split('/').pop(); |
|
|
|
id = query.project.$href!.split('/').pop(); |
|
|
@ -368,20 +370,12 @@ export class WorkPackagesListService { |
|
|
|
let query = this.currentQuery; |
|
|
|
let query = this.currentQuery; |
|
|
|
|
|
|
|
|
|
|
|
if(query.starred) { |
|
|
|
if(query.starred) { |
|
|
|
this |
|
|
|
this.createMenuItem(query); |
|
|
|
.queryMenuItemFactory |
|
|
|
|
|
|
|
.generateMenuItem(query.name, |
|
|
|
|
|
|
|
this.$state.href('work-packages.list', { query_id: query.id }), |
|
|
|
|
|
|
|
query.id); |
|
|
|
|
|
|
|
} else { |
|
|
|
} else { |
|
|
|
this |
|
|
|
this.removeMenuItem(query); |
|
|
|
.queryMenuItemFactory |
|
|
|
|
|
|
|
.removeMenuItem(query.id); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
this |
|
|
|
this.activateMenuItem(); |
|
|
|
.queryMenuItemFactory |
|
|
|
|
|
|
|
.activateMenuItem(); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private handleQueryLoadingError(error:ErrorResource, queryProps:any, queryId:number, projectIdentifier?:string) { |
|
|
|
private handleQueryLoadingError(error:ErrorResource, queryProps:any, queryId:number, projectIdentifier?:string) { |
|
|
@ -411,6 +405,26 @@ export class WorkPackagesListService { |
|
|
|
|
|
|
|
|
|
|
|
return deferred.promise; |
|
|
|
return deferred.promise; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private createMenuItem(query:QueryResource) { |
|
|
|
|
|
|
|
this |
|
|
|
|
|
|
|
.queryMenuItemFactory |
|
|
|
|
|
|
|
.generateMenuItem(query.name, |
|
|
|
|
|
|
|
this.$state.href('work-packages.list', { query_id: query.id }), |
|
|
|
|
|
|
|
query.id); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private removeMenuItem(query:QueryResource) { |
|
|
|
|
|
|
|
this |
|
|
|
|
|
|
|
.queryMenuItemFactory |
|
|
|
|
|
|
|
.removeMenuItem(query.id); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private activateMenuItem() { |
|
|
|
|
|
|
|
this |
|
|
|
|
|
|
|
.queryMenuItemFactory |
|
|
|
|
|
|
|
.activateMenuItem(); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
angular |
|
|
|
angular |
|
|
|