import { Component, Input, OnInit, AfterViewChecked, ViewChild } from '@angular/core'; import { HttpClient , HttpHeaders, HttpParams} from '@angular/common/http'; import { TokenService, TokenProvider } from './login/token.service' import { Injectable } from '@angular/core'; import { Toolbox } from '../services/toolbox'; import {RestBase} from './rest-base'; import 'rxjs/Rx'; @Injectable() export class OrganisationService implements OnInit { constructor(public restBase: RestBase) { } ngOnInit(){ } getOrganisationIdsLabels() { return this.restBase.get("organisation/listAllLabelIDs"); } getOrganisationIds(){ return this.restBase.get("organisations"); } getAllOrganisations(){ return this.restBase.get("organisation/getAll"); } create(organisation){ return this.restBase.post("organisation/create", organisation); } delete(organisationID){ var organisation = {"id": organisationID}; return this.restBase.post("organisation/delete", organisation); } }