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 EmployeeService {
|
||||
}
|
||||
|
||||
get(id: string): Observable<Employee> {
|
||||
const getUrl: string = (id === null) ? `${url}/new` : `${url}/${id}`;
|
||||
const getUrl: string = (id === null) ? `${url}` : `${url}/${id}`;
|
||||
return <Observable<Employee>>this.http.get<Employee>(getUrl)
|
||||
.pipe(
|
||||
catchError(this.log.handleError(serviceName, `get id=${id}`))
|
||||
@ -27,15 +27,14 @@ export class EmployeeService {
|
||||
}
|
||||
|
||||
list(): Observable<Employee[]> {
|
||||
const options = {params: new HttpParams().set('l', '')};
|
||||
return <Observable<Employee[]>>this.http.get<Employee[]>(url, options)
|
||||
return <Observable<Employee[]>>this.http.get<Employee[]>(`${url}/list`)
|
||||
.pipe(
|
||||
catchError(this.log.handleError(serviceName, 'list'))
|
||||
);
|
||||
}
|
||||
|
||||
save(employee: Employee): Observable<Employee> {
|
||||
return <Observable<Employee>>this.http.post<Employee>(`${url}/new`, employee, httpOptions)
|
||||
return <Observable<Employee>>this.http.post<Employee>(`${url}`, employee, httpOptions)
|
||||
.pipe(
|
||||
catchError(this.log.handleError(serviceName, 'save'))
|
||||
);
|
||||
@ -65,7 +64,7 @@ export class EmployeeService {
|
||||
|
||||
autocomplete(term: string): Observable<Employee[]> {
|
||||
const options = {params: new HttpParams().set('q', term)};
|
||||
return <Observable<Employee[]>>this.http.get<Employee[]>(url, options)
|
||||
return <Observable<Employee[]>>this.http.get<Employee[]>(`${url}/query`, options)
|
||||
.pipe(
|
||||
catchError(this.log.handleError(serviceName, 'autocomplete'))
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user