-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Convert Reusable Code to Widgets & Refactor Event/Organizer Models (#237
) * Convert event editor user lookup to a reusable widget This converts the event editor user lookup form field to a widget so it can be used throughout the application. Additional Changes to Be Made: Create a new model to represent public users/info so the form field can be used for ANY user. * Create new `PublicUser` model This commit creates a PublicUser model to represent public information about a user. This is surfaced on the frontend as "PublicProfile" to match referencing the User as "Profile". This PublicUser model replaces the EventOrganizer and EventMember models. * Remove attendees from Event model This commit removes the list of attendees from the Event model to avoid exposing the attendee information when retrieving events. This list is never actually used, so it does not impact the code. * Create user chip list widget This commit turns the user chip list on the event details card into a widget so it can be reused to display user information. It also adds an "enableMailTo" field so users may be listed without allowing other users to email them.
- Loading branch information
1 parent
1f2da54
commit debb6a1
Showing
24 changed files
with
301 additions
and
262 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
from pydantic import BaseModel | ||
from .registration_type import RegistrationType | ||
|
||
|
||
__authors__ = ["Ajay Gandecha"] | ||
__copyright__ = "Copyright 2023" | ||
__license__ = "MIT" | ||
|
||
|
||
class PublicUser(BaseModel): | ||
""" | ||
Pydantic model to represent public information about users to avoid | ||
exposing sensitive information about them. | ||
This model is based on the `UserEntity` model, which defines the shape | ||
of the `User` database in the PostgreSQL database | ||
""" | ||
|
||
id: int | None | ||
first_name: str | ||
last_name: str | ||
pronouns: str | ||
email: str | ||
github_avatar: str | None = None |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.