diff --git a/forms_pro/api/team.py b/forms_pro/api/team.py index bcc8f33..86a5c9d 100644 --- a/forms_pro/api/team.py +++ b/forms_pro/api/team.py @@ -43,7 +43,7 @@ def get_team_members(team_id: str) -> list[GetTeamMembersResponse]: @frappe.whitelist(methods=["POST"]) -def create_team(team_name: str) -> FPTeam: +def create_team(team_name: str, logo_url: str | None = None) -> FPTeam: """ Create a new team @@ -56,6 +56,8 @@ def create_team(team_name: str) -> FPTeam: team: FPTeam = frappe.new_doc("FP Team") team.team_name = team_name + if logo_url: + team.logo = logo_url team.insert() return team diff --git a/forms_pro/api/user.py b/forms_pro/api/user.py index d43d1e4..20adfba 100644 --- a/forms_pro/api/user.py +++ b/forms_pro/api/user.py @@ -9,6 +9,7 @@ class GetUserTeamsResponseSchema(BaseModel): name: str = Field(description="ID of the team") team_name: str = Field(description="The name of the team") + logo: str | None = Field(description="Logo of the team") is_current: bool = Field(description="Whether this is the current team") diff --git a/forms_pro/forms_pro/doctype/fp_team/fp_team.json b/forms_pro/forms_pro/doctype/fp_team/fp_team.json index 5027140..13751e9 100644 --- a/forms_pro/forms_pro/doctype/fp_team/fp_team.json +++ b/forms_pro/forms_pro/doctype/fp_team/fp_team.json @@ -6,6 +6,7 @@ "doctype": "DocType", "engine": "InnoDB", "field_order": [ + "logo", "team_name", "users" ], @@ -22,12 +23,17 @@ "fieldtype": "Table MultiSelect", "label": "Users", "options": "FP Team Member" + }, + { + "fieldname": "logo", + "fieldtype": "Attach Image", + "label": "Logo" } ], "grid_page_length": 50, "index_web_pages_for_search": 1, "links": [], - "modified": "2025-11-19 19:43:50.515720", + "modified": "2026-02-12 19:54:29.693501", "modified_by": "Administrator", "module": "Forms Pro", "name": "FP Team", diff --git a/forms_pro/forms_pro/doctype/fp_team/fp_team.py b/forms_pro/forms_pro/doctype/fp_team/fp_team.py index 4ecc550..13d1655 100644 --- a/forms_pro/forms_pro/doctype/fp_team/fp_team.py +++ b/forms_pro/forms_pro/doctype/fp_team/fp_team.py @@ -27,6 +27,7 @@ class FPTeam(Document): from forms_pro.forms_pro.doctype.fp_team_member.fp_team_member import FPTeamMember + logo: DF.AttachImage | None team_name: DF.Data users: DF.TableMultiSelect[FPTeamMember] # end: auto-generated types diff --git a/forms_pro/public/avatars/avatar-1.jpg b/forms_pro/public/avatars/avatar-1.jpg new file mode 100644 index 0000000..95d90b5 Binary files /dev/null and b/forms_pro/public/avatars/avatar-1.jpg differ diff --git a/forms_pro/public/avatars/avatar-10.jpg b/forms_pro/public/avatars/avatar-10.jpg new file mode 100644 index 0000000..29e4703 Binary files /dev/null and b/forms_pro/public/avatars/avatar-10.jpg differ diff --git a/forms_pro/public/avatars/avatar-11.jpg b/forms_pro/public/avatars/avatar-11.jpg new file mode 100644 index 0000000..07d9a45 Binary files /dev/null and b/forms_pro/public/avatars/avatar-11.jpg differ diff --git a/forms_pro/public/avatars/avatar-12.jpg b/forms_pro/public/avatars/avatar-12.jpg new file mode 100644 index 0000000..4cd64b5 Binary files /dev/null and b/forms_pro/public/avatars/avatar-12.jpg differ diff --git a/forms_pro/public/avatars/avatar-13.jpg b/forms_pro/public/avatars/avatar-13.jpg new file mode 100644 index 0000000..7f68f8f Binary files /dev/null and b/forms_pro/public/avatars/avatar-13.jpg differ diff --git a/forms_pro/public/avatars/avatar-14.jpg b/forms_pro/public/avatars/avatar-14.jpg new file mode 100644 index 0000000..6f536f2 Binary files /dev/null and b/forms_pro/public/avatars/avatar-14.jpg differ diff --git a/forms_pro/public/avatars/avatar-15.jpg b/forms_pro/public/avatars/avatar-15.jpg new file mode 100644 index 0000000..c5d741b Binary files /dev/null and b/forms_pro/public/avatars/avatar-15.jpg differ diff --git a/forms_pro/public/avatars/avatar-16.jpg b/forms_pro/public/avatars/avatar-16.jpg new file mode 100644 index 0000000..ab9d511 Binary files /dev/null and b/forms_pro/public/avatars/avatar-16.jpg differ diff --git a/forms_pro/public/avatars/avatar-17.jpg b/forms_pro/public/avatars/avatar-17.jpg new file mode 100644 index 0000000..6a90006 Binary files /dev/null and b/forms_pro/public/avatars/avatar-17.jpg differ diff --git a/forms_pro/public/avatars/avatar-18.jpg b/forms_pro/public/avatars/avatar-18.jpg new file mode 100644 index 0000000..6e314af Binary files /dev/null and b/forms_pro/public/avatars/avatar-18.jpg differ diff --git a/forms_pro/public/avatars/avatar-19.jpg b/forms_pro/public/avatars/avatar-19.jpg new file mode 100644 index 0000000..8bae852 Binary files /dev/null and b/forms_pro/public/avatars/avatar-19.jpg differ diff --git a/forms_pro/public/avatars/avatar-2.jpg b/forms_pro/public/avatars/avatar-2.jpg new file mode 100644 index 0000000..4ebc3ec Binary files /dev/null and b/forms_pro/public/avatars/avatar-2.jpg differ diff --git a/forms_pro/public/avatars/avatar-20.jpg b/forms_pro/public/avatars/avatar-20.jpg new file mode 100644 index 0000000..ba48ade Binary files /dev/null and b/forms_pro/public/avatars/avatar-20.jpg differ diff --git a/forms_pro/public/avatars/avatar-21.jpg b/forms_pro/public/avatars/avatar-21.jpg new file mode 100644 index 0000000..d64b546 Binary files /dev/null and b/forms_pro/public/avatars/avatar-21.jpg differ diff --git a/forms_pro/public/avatars/avatar-22.jpg b/forms_pro/public/avatars/avatar-22.jpg new file mode 100644 index 0000000..84a8055 Binary files /dev/null and b/forms_pro/public/avatars/avatar-22.jpg differ diff --git a/forms_pro/public/avatars/avatar-23.jpg b/forms_pro/public/avatars/avatar-23.jpg new file mode 100644 index 0000000..8456173 Binary files /dev/null and b/forms_pro/public/avatars/avatar-23.jpg differ diff --git a/forms_pro/public/avatars/avatar-24.jpg b/forms_pro/public/avatars/avatar-24.jpg new file mode 100644 index 0000000..0407f00 Binary files /dev/null and b/forms_pro/public/avatars/avatar-24.jpg differ diff --git a/forms_pro/public/avatars/avatar-25.jpg b/forms_pro/public/avatars/avatar-25.jpg new file mode 100644 index 0000000..864339d Binary files /dev/null and b/forms_pro/public/avatars/avatar-25.jpg differ diff --git a/forms_pro/public/avatars/avatar-26.jpg b/forms_pro/public/avatars/avatar-26.jpg new file mode 100644 index 0000000..be3a0c2 Binary files /dev/null and b/forms_pro/public/avatars/avatar-26.jpg differ diff --git a/forms_pro/public/avatars/avatar-27.jpg b/forms_pro/public/avatars/avatar-27.jpg new file mode 100644 index 0000000..702a100 Binary files /dev/null and b/forms_pro/public/avatars/avatar-27.jpg differ diff --git a/forms_pro/public/avatars/avatar-28.jpg b/forms_pro/public/avatars/avatar-28.jpg new file mode 100644 index 0000000..490e404 Binary files /dev/null and b/forms_pro/public/avatars/avatar-28.jpg differ diff --git a/forms_pro/public/avatars/avatar-29.jpg b/forms_pro/public/avatars/avatar-29.jpg new file mode 100644 index 0000000..74d8839 Binary files /dev/null and b/forms_pro/public/avatars/avatar-29.jpg differ diff --git a/forms_pro/public/avatars/avatar-3.jpg b/forms_pro/public/avatars/avatar-3.jpg new file mode 100644 index 0000000..9486181 Binary files /dev/null and b/forms_pro/public/avatars/avatar-3.jpg differ diff --git a/forms_pro/public/avatars/avatar-30.jpg b/forms_pro/public/avatars/avatar-30.jpg new file mode 100644 index 0000000..199fe4e Binary files /dev/null and b/forms_pro/public/avatars/avatar-30.jpg differ diff --git a/forms_pro/public/avatars/avatar-31.jpg b/forms_pro/public/avatars/avatar-31.jpg new file mode 100644 index 0000000..1117ec6 Binary files /dev/null and b/forms_pro/public/avatars/avatar-31.jpg differ diff --git a/forms_pro/public/avatars/avatar-32.jpg b/forms_pro/public/avatars/avatar-32.jpg new file mode 100644 index 0000000..1e6cd98 Binary files /dev/null and b/forms_pro/public/avatars/avatar-32.jpg differ diff --git a/forms_pro/public/avatars/avatar-33.jpg b/forms_pro/public/avatars/avatar-33.jpg new file mode 100644 index 0000000..d9c2149 Binary files /dev/null and b/forms_pro/public/avatars/avatar-33.jpg differ diff --git a/forms_pro/public/avatars/avatar-34.jpg b/forms_pro/public/avatars/avatar-34.jpg new file mode 100644 index 0000000..818909b Binary files /dev/null and b/forms_pro/public/avatars/avatar-34.jpg differ diff --git a/forms_pro/public/avatars/avatar-35.jpg b/forms_pro/public/avatars/avatar-35.jpg new file mode 100644 index 0000000..134f0c7 Binary files /dev/null and b/forms_pro/public/avatars/avatar-35.jpg differ diff --git a/forms_pro/public/avatars/avatar-36.jpg b/forms_pro/public/avatars/avatar-36.jpg new file mode 100644 index 0000000..7ec9f37 Binary files /dev/null and b/forms_pro/public/avatars/avatar-36.jpg differ diff --git a/forms_pro/public/avatars/avatar-37.jpg b/forms_pro/public/avatars/avatar-37.jpg new file mode 100644 index 0000000..62caa49 Binary files /dev/null and b/forms_pro/public/avatars/avatar-37.jpg differ diff --git a/forms_pro/public/avatars/avatar-38.jpg b/forms_pro/public/avatars/avatar-38.jpg new file mode 100644 index 0000000..463eab5 Binary files /dev/null and b/forms_pro/public/avatars/avatar-38.jpg differ diff --git a/forms_pro/public/avatars/avatar-39.jpg b/forms_pro/public/avatars/avatar-39.jpg new file mode 100644 index 0000000..767842d Binary files /dev/null and b/forms_pro/public/avatars/avatar-39.jpg differ diff --git a/forms_pro/public/avatars/avatar-4.jpg b/forms_pro/public/avatars/avatar-4.jpg new file mode 100644 index 0000000..0676c50 Binary files /dev/null and b/forms_pro/public/avatars/avatar-4.jpg differ diff --git a/forms_pro/public/avatars/avatar-40.jpg b/forms_pro/public/avatars/avatar-40.jpg new file mode 100644 index 0000000..bc905a2 Binary files /dev/null and b/forms_pro/public/avatars/avatar-40.jpg differ diff --git a/forms_pro/public/avatars/avatar-41.jpg b/forms_pro/public/avatars/avatar-41.jpg new file mode 100644 index 0000000..3ec720f Binary files /dev/null and b/forms_pro/public/avatars/avatar-41.jpg differ diff --git a/forms_pro/public/avatars/avatar-42.jpg b/forms_pro/public/avatars/avatar-42.jpg new file mode 100644 index 0000000..5aecf3e Binary files /dev/null and b/forms_pro/public/avatars/avatar-42.jpg differ diff --git a/forms_pro/public/avatars/avatar-43.jpg b/forms_pro/public/avatars/avatar-43.jpg new file mode 100644 index 0000000..62aca49 Binary files /dev/null and b/forms_pro/public/avatars/avatar-43.jpg differ diff --git a/forms_pro/public/avatars/avatar-44.jpg b/forms_pro/public/avatars/avatar-44.jpg new file mode 100644 index 0000000..99a38ff Binary files /dev/null and b/forms_pro/public/avatars/avatar-44.jpg differ diff --git a/forms_pro/public/avatars/avatar-45.jpg b/forms_pro/public/avatars/avatar-45.jpg new file mode 100644 index 0000000..aa3f2cf Binary files /dev/null and b/forms_pro/public/avatars/avatar-45.jpg differ diff --git a/forms_pro/public/avatars/avatar-46.jpg b/forms_pro/public/avatars/avatar-46.jpg new file mode 100644 index 0000000..2856fa5 Binary files /dev/null and b/forms_pro/public/avatars/avatar-46.jpg differ diff --git a/forms_pro/public/avatars/avatar-47.jpg b/forms_pro/public/avatars/avatar-47.jpg new file mode 100644 index 0000000..39c2a3d Binary files /dev/null and b/forms_pro/public/avatars/avatar-47.jpg differ diff --git a/forms_pro/public/avatars/avatar-48.jpg b/forms_pro/public/avatars/avatar-48.jpg new file mode 100644 index 0000000..62fb2f8 Binary files /dev/null and b/forms_pro/public/avatars/avatar-48.jpg differ diff --git a/forms_pro/public/avatars/avatar-49.jpg b/forms_pro/public/avatars/avatar-49.jpg new file mode 100644 index 0000000..ef9d2ab Binary files /dev/null and b/forms_pro/public/avatars/avatar-49.jpg differ diff --git a/forms_pro/public/avatars/avatar-5.jpg b/forms_pro/public/avatars/avatar-5.jpg new file mode 100644 index 0000000..086ef4c Binary files /dev/null and b/forms_pro/public/avatars/avatar-5.jpg differ diff --git a/forms_pro/public/avatars/avatar-50.jpg b/forms_pro/public/avatars/avatar-50.jpg new file mode 100644 index 0000000..81c17d8 Binary files /dev/null and b/forms_pro/public/avatars/avatar-50.jpg differ diff --git a/forms_pro/public/avatars/avatar-6.jpg b/forms_pro/public/avatars/avatar-6.jpg new file mode 100644 index 0000000..2942677 Binary files /dev/null and b/forms_pro/public/avatars/avatar-6.jpg differ diff --git a/forms_pro/public/avatars/avatar-7.jpg b/forms_pro/public/avatars/avatar-7.jpg new file mode 100644 index 0000000..ef59e00 Binary files /dev/null and b/forms_pro/public/avatars/avatar-7.jpg differ diff --git a/forms_pro/public/avatars/avatar-8.jpg b/forms_pro/public/avatars/avatar-8.jpg new file mode 100644 index 0000000..e3afaea Binary files /dev/null and b/forms_pro/public/avatars/avatar-8.jpg differ diff --git a/forms_pro/public/avatars/avatar-9.jpg b/forms_pro/public/avatars/avatar-9.jpg new file mode 100644 index 0000000..03ec79f Binary files /dev/null and b/forms_pro/public/avatars/avatar-9.jpg differ diff --git a/forms_pro/public/avatars/avatar_attribution.md b/forms_pro/public/avatars/avatar_attribution.md new file mode 100644 index 0000000..2b671a0 --- /dev/null +++ b/forms_pro/public/avatars/avatar_attribution.md @@ -0,0 +1,2 @@ +These avatars are sourced from [Outspace Studios](https://avatars.outpace.systems/). +The original source is licensed under [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/). diff --git a/forms_pro/utils/teams.py b/forms_pro/utils/teams.py index 3306760..7333d4f 100644 --- a/forms_pro/utils/teams.py +++ b/forms_pro/utils/teams.py @@ -69,6 +69,7 @@ def get_user_teams(user: str = frappe.session.user): .where(FP_TEAM_MEMBER.user == user) .select( FP_TEAM.team_name, + FP_TEAM.logo, FP_TEAM.name, Case().when(FP_TEAM.name == user_default_team, True).else_(False).as_("is_current"), ) diff --git a/frontend/package.json b/frontend/package.json index 803f46d..138ff02 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -16,7 +16,7 @@ "@vueuse/core": "^13.9.0", "dayjs": "^1.11.19", "feather-icons": "^4.29.2", - "frappe-ui": "^0.1.244", + "frappe-ui": "^0.1.262", "lucide-vue-next": "^0.543.0", "pinia": "^3.0.3", "socket.io-client": "^4.7.2", diff --git a/frontend/public/logo/logo.svg b/frontend/public/logo/logo.svg new file mode 100644 index 0000000..de2b2ed --- /dev/null +++ b/frontend/public/logo/logo.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/frontend/src/components/fields/Attachment.vue b/frontend/src/components/fields/Attachment.vue index 3f850e2..effaad4 100644 --- a/frontend/src/components/fields/Attachment.vue +++ b/frontend/src/components/fields/Attachment.vue @@ -16,7 +16,7 @@ const value = defineModel(); const inPreview = ref(false); -type FileType = { +export type FileType = { content_hash: string; creation: string; docstatus: number; diff --git a/frontend/src/components/team/CreateTeamDialog.vue b/frontend/src/components/team/CreateTeamDialog.vue index f02e8ea..65ca734 100644 --- a/frontend/src/components/team/CreateTeamDialog.vue +++ b/frontend/src/components/team/CreateTeamDialog.vue @@ -1,11 +1,12 @@