1
|
import { environment } from 'src/environments/environment';
|
2
|
import { Observable } from 'rxjs';
|
3
|
import { HttpClient } from '@angular/common/http';
|
4
|
import { Injectable } from '@angular/core';
|
5
|
import { DocumentSubclassification } from '../../models/document-subclassification.interface';
|
6
|
import { GenericRestService } from '../generic-rest.service';
|
7
|
|
8
|
@Injectable({
|
9
|
providedIn: 'root'
|
10
|
})
|
11
|
export class DocumentSubclassificationsService extends GenericRestService<DocumentSubclassification> {
|
12
|
|
13
|
constructor(private http: HttpClient) {
|
14
|
super(`${environment.baseApiUrl}${environment.apiUrl.configurationWs}/documents-subclassifications`, http); // TODO: Change this when GenericRestService<> changes.
|
15
|
}
|
16
|
|
17
|
public getByDocumentClassificationId(docClassificationId: number): Observable<DocumentSubclassification[]> {
|
18
|
return this.http.get<DocumentSubclassification[]>(this.baseUrl + '/categories/' + docClassificationId);
|
19
|
}
|
20
|
}
|