-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add organization members page #10
Conversation
perryr16
commented
Feb 12, 2025
•
edited
Loading
edited
- Members page to update or delete org users
- fetches and formats access level tree
- creates a reusable error handler that accurately passes backend error messages to the frontend via an error service
- general tweaks
tab pages lint styles
handleError(error: HttpErrorResponse, defaultMessage: string) { | ||
const errorMessage = (error.error as { message: string })?.message || defaultMessage | ||
this._snackBar.alert(errorMessage, 'OK', true) | ||
return throwError(() => new Error(error?.message || defaultMessage)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All of the backend error responses come in as
{ status: 'error', message: 'some descriptive error message' }
This should reduce a lot of duplicate code and make service catchErrors much simpler going forward
I'm getting a warning in console when I open the member modal:
I think if you update form-modal's iterator for accessLevelInstance to track by ali.id instead of ali it will fix the issue. Otherwise, this looks good, glad you pulled the table out to a component, and the error service is a really good idea! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pending the fix for that NG0956 error, this looks good to me.