Project

General

Profile

1 50169 argiro.kok
import {Injectable} from '@angular/core';
2 55964 argiro.kok
import {HttpClient} from "@angular/common/http";
3 61262 konstantin
import {timeout} from "rxjs/operators";
4 50169 argiro.kok
5
@Injectable()
6
export class HtmlProjectReportService {
7
8 55964 argiro.kok
    constructor(private http: HttpClient ) {}
9 50169 argiro.kok
10 58275 k.triantaf
    getHTML(id: string, requestType:string, csvAPIURL: string ):any {
11 50586 argiro.kok
        let url = csvAPIURL;
12 58275 k.triantaf
        url += '?format=html&type='+requestType+'&fq=(' +
13
          //'((oaftype exact result) and (resulttypeid exact "'+resultTypeId+'")) and
14
          '(relprojectid exact "'+id+'"))';
15 50586 argiro.kok
16 61262 konstantin
        return this.http.get(url,{responseType: 'text'}).pipe(timeout(10000));
17 50169 argiro.kok
    }
18
}