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
+4 -6
View File
@@ -19,7 +19,7 @@ export class UserService {
}
get(id: string): Observable<User> {
const getUrl: string = (id === null) ? `${url}/new` : `${url}/${id}`;
const getUrl: string = (id === null) ? `${url}` : `${url}/${id}`;
return <Observable<User>>this.http.get<User>(getUrl)
.pipe(
catchError(this.log.handleError(serviceName, `get id=${id}`))
@@ -27,23 +27,21 @@ export class UserService {
}
list(): Observable<User[]> {
const options = {params: new HttpParams().set('l', '')};
return <Observable<User[]>>this.http.get<User[]>(url, options)
return <Observable<User[]>>this.http.get<User[]>(`${url}/list`)
.pipe(
catchError(this.log.handleError(serviceName, 'list'))
);
}
listOfNames(): Observable<string[]> {
const options = {params: new HttpParams().set('n', '')};
return <Observable<string[]>>this.http.get<string[]>(url, options)
return <Observable<string[]>>this.http.get<string[]>(`${url}/active`)
.pipe(
catchError(this.log.handleError(serviceName, 'list'))
);
}
save(user: User): Observable<User> {
return <Observable<User>>this.http.post<User>(`${url}/new`, user, httpOptions)
return <Observable<User>>this.http.post<User>(`${url}`, user, httpOptions)
.pipe(
catchError(this.log.handleError(serviceName, 'save'))
);