Manage SystemManagers

This commit is contained in:
Bastian Wagner
2025-01-02 13:16:45 +01:00
parent bf64103369
commit efbfc2eb01
18 changed files with 266 additions and 23 deletions

View File

@@ -41,7 +41,7 @@ export class AgSystemManagerComponent implements ICellRendererAngularComp {
width: "50vw",
minWidth: "300px",
height: "70vh",
disableClose: true
disableClose: false
})
// ref.afterClosed().subscribe({

View File

@@ -85,4 +85,22 @@ export class ApiService {
deleteCylinder(cylinder: ICylinder): Observable<any> {
return this.http.delete(`api/cylinder/${cylinder.id}`)
}
deleteUser(id: string) {
return this.http.delete(`api/user/${id}`)
}
addManager(systemID: string, email: string): Observable<IUser[]> {
return this.http.post<IUser[]>(`api/system/${systemID}/manager`, {
email,
action: 'add'
});
}
removeManager(systemID: string, email: string): Observable<IUser[]> {
return this.http.post<IUser[]>(`api/system/${systemID}/manager`, {
email,
action: 'remove'
});
}
}