Renamed groups to roles in the frontend
Working: Account Cost Centre Employee Product Group Product Role User Client
This commit is contained in:
@@ -19,7 +19,7 @@ export class ProductGroupService {
|
||||
}
|
||||
|
||||
get(id: string): Observable<ProductGroup> {
|
||||
const getUrl: string = (id === null) ? `${url}/new` : `${url}/${id}`;
|
||||
const getUrl: string = (id === null) ? `${url}` : `${url}/${id}`;
|
||||
return <Observable<ProductGroup>>this.http.get<ProductGroup>(getUrl)
|
||||
.pipe(
|
||||
catchError(this.log.handleError(serviceName, `get id=${id}`))
|
||||
@@ -27,15 +27,14 @@ export class ProductGroupService {
|
||||
}
|
||||
|
||||
list(): Observable<ProductGroup[]> {
|
||||
const options = {params: new HttpParams().set('l', '')};
|
||||
return <Observable<ProductGroup[]>>this.http.get<ProductGroup[]>(url, options)
|
||||
return <Observable<ProductGroup[]>>this.http.get<ProductGroup[]>(`${url}/list`)
|
||||
.pipe(
|
||||
catchError(this.log.handleError(serviceName, 'list'))
|
||||
);
|
||||
}
|
||||
|
||||
save(productGroup: ProductGroup): Observable<ProductGroup> {
|
||||
return <Observable<ProductGroup>>this.http.post<ProductGroup>(`${url}/new`, productGroup, httpOptions)
|
||||
return <Observable<ProductGroup>>this.http.post<ProductGroup>(`${url}`, productGroup, httpOptions)
|
||||
.pipe(
|
||||
catchError(this.log.handleError(serviceName, 'save'))
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user