feat: add edit user component (#616)

Fixes: #585
This commit is contained in:
Aggelos Gamvrinos
2020-05-23 20:39:29 +05:30
committed by GitHub
parent 5b3d0c46dd
commit b333291f08
8 changed files with 253 additions and 7 deletions
+11 -1
View File
@@ -40,6 +40,15 @@ export class UsersService {
return this.http.post('/users', user);
}
/**
* @param {string} userId user ID of user.
* @param {any} user user to be updated.
* @returns {Observable<any>} User.
*/
editUser(userId: string, user: any): Observable<any> {
return this.http.put(`/users/${userId}`, user);
}
/**
* @param {string} userId user ID of user.
* @returns {Observable<any>} User.
@@ -72,7 +81,8 @@ export class UsersService {
*/
getStaff(officeId: any): Observable<any> {
const httpParams = new HttpParams()
.set('officeId', officeId.toString());
.set('officeId', officeId.toString())
.set('status', 'all');
return this.http.get('/staff', { params: httpParams });
}