Renamed groups to roles in the frontend

Working:
 Account
 Cost Centre
 Employee
 Product Group
 Product
 Role
 User
 Client
This commit is contained in:
tanshu
2020-05-12 01:44:57 +05:30
parent cd764be49c
commit 6dbab6442f
50 changed files with 272 additions and 295 deletions
@@ -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'))
);