Вキ
Size: a a a
Вキ
L
Вキ
С
private fetchAllCategories(lobId): Observable<PresentationCategoryDTO[]> {
return this.xhrTool.marshall(this.http.get(Api.path('/categories/tree'),
{params: { lobId, deep: 'true' }}));
}
private searchPresentations(lobId, tags: string[], searchPhrase: string, languages: string): Observable<PresentationCategoryDTO[]> {
const params: { tags: string; text: string; language: string} = {
tags: encodeURIComponent(tags.join(',')),
language: encodeURIComponent(languages),
text: encodeURIComponent(searchPhrase),
};
return this.xhrTool.marshall(this.http.get(Api.path('/categories/tree'),
{params: { lobId, ...params, deep: 'true' }}));
}
Вキ
private fetchAllCategories(lobId): Observable<PresentationCategoryDTO[]> {
return this.xhrTool.marshall(this.http.get(Api.path('/categories/tree'),
{params: { lobId, deep: 'true' }}));
}
private searchPresentations(lobId, tags: string[], searchPhrase: string, languages: string): Observable<PresentationCategoryDTO[]> {
const params: { tags: string; text: string; language: string} = {
tags: encodeURIComponent(tags.join(',')),
language: encodeURIComponent(languages),
text: encodeURIComponent(searchPhrase),
};
return this.xhrTool.marshall(this.http.get(Api.path('/categories/tree'),
{params: { lobId, ...params, deep: 'true' }}));
}
L
С
Вキ
L
это что такое?)
this.xhrTool.marshall
С
getPresentationCategories(lobId, tags: string[], searchPhrase: string, languages: string): Observable<any> {
const responseObs = tags.length > 0 || searchPhrase !== '' || languages !== '' ?
this.searchPresentations(lobId, tags, searchPhrase, languages) :
this.fetchAllCategories(lobId)
;
return responseObs.pipe(
map((response: any) => response.content),
map((categoriesDTO: PresentationCategoryDTO[]) => {
return categoriesDTO;
}),
);
}
С
это что такое?)
this.xhrTool.marshall
Вキ
V
L
return responseObs.pipe(
map((response: any) => response.content),
map((categoriesDTO: PresentationCategoryDTO[]) => {
return categoriesDTO;
}),
);
С
L
С