Merge branch 'develop' of https://git.akkerweb.nl/FarmMaps/FarmMapsLib into develop
All checks were successful
FarmMaps.Develop/FarmMapsLib/develop This commit looks good

# Conflicts:
#	projects/common/src/fm/common-service.module.ts
This commit is contained in:
Willem Dantuma 2020-01-22 11:34:32 +01:00
commit 6389331c30
2 changed files with 22 additions and 21 deletions

View File

@ -38,6 +38,7 @@ import {IItemTask,ItemTask} from './models/itemTask';
import { IListItem } from './models/list.item'; import { IListItem } from './models/list.item';
import { ITypeaheadItem } from './models/typeahead.item'; import { ITypeaheadItem } from './models/typeahead.item';
import { IUser } from './models/user'; import { IUser } from './models/user';
import { ICodeListItem } from './models/code.list.item';
import * as commonActions from './actions/app-common.actions'; import * as commonActions from './actions/app-common.actions';
import * as commonReducers from './reducers/app-common.reducer'; import * as commonReducers from './reducers/app-common.reducer';
import * as commonEffects from './effects/app-common.effects'; import * as commonEffects from './effects/app-common.effects';
@ -64,6 +65,7 @@ export {
IListItem, IListItem,
ITypeaheadItem, ITypeaheadItem,
IUser, IUser,
ICodeListItem,
commonActions, commonActions,
commonReducers, commonReducers,
IAuthconfigFactory, IAuthconfigFactory,

View File

@ -15,12 +15,11 @@ export class CodeListItemService {
return this.appConfig.getConfig("apiEndPoint"); return this.appConfig.getConfig("apiEndPoint");
} }
getCodeListItems(codelist: string[], codegroup?: string, dataFilter?: any, onlyBetweenValidFromAndTo: boolean = true): Observable<ICodeListItem[]> { getCodeListItems(codelist: string[], codegroup?: string, dataFilter?: any): Observable<ICodeListItem[]> {
var params = new HttpParams(); var params = new HttpParams();
params = params.append("cl", codelist.join(",")); params = params.append("cl", codelist.join(","));
if (codegroup) params = params.append("g", codegroup); if (codegroup) params = params.append("g", codegroup);
if (onlyBetweenValidFromAndTo) params = params.append("v", onlyBetweenValidFromAndTo);
if (dataFilter) params = params.append("df", dataFilter); if (dataFilter) params = params.append("df", dataFilter);
return this.httpClient.get<ICodeListItem>(`${this.ApiEndpoint()}/api/v1/codelistitems/`, { params: params }); return this.httpClient.get<ICodeListItem[]>(`${this.ApiEndpoint()}/api/v1/codelistitems/`, { params: params });
} }
} }