|
|
|
@ -35,7 +35,7 @@ export class ApiWorkPackagesService { |
|
|
|
|
|
|
|
|
|
public list(offset:number, pageSize:number, query:api.ex.Query) { |
|
|
|
|
var workPackages; |
|
|
|
|
var uncachedProvider = this.apiV3.setDefaultHttpFields({cache: false}); |
|
|
|
|
var uncachedProvider:restangular.IService = this.uncachedAPI(); |
|
|
|
|
|
|
|
|
|
if (query.projectId) { |
|
|
|
|
workPackages = uncachedProvider.service('work_packages', this.apiV3.one('projects', query.projectId)); |
|
|
|
@ -47,6 +47,12 @@ export class ApiWorkPackagesService { |
|
|
|
|
return workPackages.getList(this.queryAsV3Params(offset, pageSize, query)); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private uncachedAPI():restangular.IService { |
|
|
|
|
return this.apiV3.withConfig(function(RestangularConfigurer) { |
|
|
|
|
RestangularConfigurer.setDefaultHttpFields({ cache: false }); |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
protected queryAsV3Params(offset:number, pageSize:number, query:api.ex.Query) { |
|
|
|
|
|
|
|
|
|
const v3Filters = _.map(query.filters, (filter:any) => { |
|
|
|
|