Merge branch 'develop' into feature/vectortileselect

This commit is contained in:
Willem Dantuma 2020-11-03 20:22:25 +01:00
commit 6277236993
4 changed files with 0 additions and 75 deletions

View File

@ -23,7 +23,6 @@ import { appConfigFactory } from "./shared/app.config.factory";
import { AuthGuard } from './services/auth-guard.service'; import { AuthGuard } from './services/auth-guard.service';
import { NavBarGuard } from './services/nav-bar-guard.service'; import { NavBarGuard } from './services/nav-bar-guard.service';
import { FullScreenGuard } from './services/full-screen-guard.service'; import { FullScreenGuard } from './services/full-screen-guard.service';
import { CodeListItemService } from './services/codelistitem.service';
import { AuthCallbackGuard } from './components/auth-callback/auth-callback.guard'; import { AuthCallbackGuard } from './components/auth-callback/auth-callback.guard';
import { ResumableFileUploadService } from './components/resumable-file-upload/resumable-file-upload.service'; import { ResumableFileUploadService } from './components/resumable-file-upload/resumable-file-upload.service';
import { NgbDateNativeAdapter } from './services/date-adapter.service' import { NgbDateNativeAdapter } from './services/date-adapter.service'
@ -42,7 +41,6 @@ export {
TypeaheadService, TypeaheadService,
UserService, UserService,
WeatherService, WeatherService,
CodeListItemService,
AppConfig, AppConfig,
AccessTokenInterceptor, AccessTokenInterceptor,
AuthGuard, AuthGuard,

View File

@ -47,7 +47,6 @@ import { ISenMLItem } from './models/senml-item';
import { IPackage,IPackages } from './models/package'; import { IPackage,IPackages } from './models/package';
import { IUser } from './models/user'; import { IUser } from './models/user';
import { IQueryState } from './models/query.state'; import { IQueryState } from './models/query.state';
import { ICodeListItem } from './models/code.list.item';
import { IDataLayer } from './models/data.layer'; import { IDataLayer } from './models/data.layer';
import { IColor,IGradientstop} from './models/gradient'; import { IColor,IGradientstop} from './models/gradient';
import * as commonActions from './actions/app-common.actions'; import * as commonActions from './actions/app-common.actions';
@ -82,7 +81,6 @@ export {
IListItem, IListItem,
ITypeaheadItem, ITypeaheadItem,
IUser, IUser,
ICodeListItem,
IQueryState, IQueryState,
IPackage, IPackage,
IPackages, IPackages,

View File

@ -1,30 +0,0 @@
export interface ICodeListItem {
codeList: string;
code: string;
codeGroup?: string;
unit?: string;
description?: string;
validFrom?: Date;
validTo?: Date;
created?: Date;
updated?: Date;
data?:any;
readWrite?: boolean;
}
export class CodeListItem implements ICodeListItem {
public codeList: string;
public code: string;
public codeGroup?: string;
public unit?: string;
public description:string;
public validFrom?: Date;
public validTo?: Date;
public created?: Date;
public updated?: Date;
public data?:any;
public readWrite?: boolean;
constructor() {
}
}

View File

@ -1,41 +0,0 @@
import { Injectable } from '@angular/core';
import { Observable } from 'rxjs';
import { HttpClient, HttpParams } from "@angular/common/http";
import { AppConfig } from "../shared/app.config";
import { ICodeListItem } from '../models/code.list.item';
@Injectable({
providedIn: 'root',
})
export class CodeListItemService {
constructor(public httpClient: HttpClient, public appConfig: AppConfig) {
}
ApiEndpoint() {
return this.appConfig.getConfig("apiEndPoint");
}
getCodeListItems(codelist: string[]): Observable<ICodeListItem[]> {
var params = new HttpParams();
for (const cl of codelist) {
params = params.append('cl', cl);
}
return this.httpClient.get<ICodeListItem[]>(`${this.ApiEndpoint()}/api/v1/codelistitems/`, { params: params });
}
getCodeListItem(codeList: string, code: string): Observable<ICodeListItem> {
return this.httpClient.get<ICodeListItem>(`${this.ApiEndpoint()}/api/v1/codelistitems/${codeList}/${code}`);
}
postCodeListItem(codeListItem: ICodeListItem): Observable<ICodeListItem> {
return this.httpClient.post<ICodeListItem>(`${this.ApiEndpoint()}/api/v1/codelistitems/${codeListItem.codeList}`, codeListItem);
}
putCodeListItem(codeListItem: ICodeListItem): Observable<ICodeListItem> {
return this.httpClient.put<ICodeListItem>(`${this.ApiEndpoint()}/api/v1/codelistitems/${codeListItem.codeList}`, codeListItem);
}
deleteCodeListItem(codelist: string, code: string): Observable<any> {
return this.httpClient.delete(`${this.ApiEndpoint()}/api/v1/codelistitems/${codelist}/${code}`);
}
}