Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
赵月辉
/
fastgpt-migrated
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Unverified
Commit
662a4a46
authored
Mar 06, 2025
by
Finley Ge
Committed by
GitHub
Mar 06, 2025
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: remove defaultTeam (#3989)
parent
3fadabd2
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
6 additions
and
11 deletions
+6
-11
packages/global/support/user/team/controller.d.ts
+0
-1
packages/global/support/user/team/type.d.ts
+0
-2
packages/service/support/user/team/controller.ts
+1
-3
packages/service/support/user/team/teamMemberSchema.ts
+4
-4
projects/app/src/pageComponents/account/team/MemberTable.tsx
+1
-1
No files found.
packages/global/support/user/team/controller.d.ts
View file @
662a4a46
...
@@ -10,7 +10,6 @@ export type AuthTeamRoleProps = {
...
@@ -10,7 +10,6 @@ export type AuthTeamRoleProps = {
export
type
CreateTeamProps
=
{
export
type
CreateTeamProps
=
{
name
:
string
;
name
:
string
;
avatar
?:
string
;
avatar
?:
string
;
defaultTeam
?:
boolean
;
memberName
?:
string
;
memberName
?:
string
;
memberAvatar
?:
string
;
memberAvatar
?:
string
;
notificationAccount
?:
string
;
notificationAccount
?:
string
;
...
...
packages/global/support/user/team/type.d.ts
View file @
662a4a46
...
@@ -47,7 +47,6 @@ export type TeamMemberSchema = {
...
@@ -47,7 +47,6 @@ export type TeamMemberSchema = {
role
:
`
${
TeamMemberRoleEnum
}
`
;
role
:
`
${
TeamMemberRoleEnum
}
`
;
status
:
`
${
TeamMemberStatusEnum
}
`
;
status
:
`
${
TeamMemberStatusEnum
}
`
;
avatar
:
string
;
avatar
:
string
;
defaultTeam
:
boolean
;
};
};
export
type
TeamMemberWithTeamAndUserSchema
=
TeamMemberSchema
&
{
export
type
TeamMemberWithTeamAndUserSchema
=
TeamMemberSchema
&
{
...
@@ -65,7 +64,6 @@ export type TeamTmbItemType = {
...
@@ -65,7 +64,6 @@ export type TeamTmbItemType = {
balance
?:
number
;
balance
?:
number
;
tmbId
:
string
;
tmbId
:
string
;
teamDomain
:
string
;
teamDomain
:
string
;
defaultTeam
:
boolean
;
role
:
`
${
TeamMemberRoleEnum
}
`
;
role
:
`
${
TeamMemberRoleEnum
}
`
;
status
:
`
${
TeamMemberStatusEnum
}
`
;
status
:
`
${
TeamMemberStatusEnum
}
`
;
notificationAccount
?:
string
;
notificationAccount
?:
string
;
...
...
packages/service/support/user/team/controller.ts
View file @
662a4a46
...
@@ -43,7 +43,6 @@ async function getTeamMember(match: Record<string, any>): Promise<TeamTmbItemTyp
...
@@ -43,7 +43,6 @@ async function getTeamMember(match: Record<string, any>): Promise<TeamTmbItemTyp
teamDomain
:
tmb
.
team
?.
teamDomain
,
teamDomain
:
tmb
.
team
?.
teamDomain
,
role
:
tmb
.
role
,
role
:
tmb
.
role
,
status
:
tmb
.
status
,
status
:
tmb
.
status
,
defaultTeam
:
tmb
.
defaultTeam
,
permission
:
new
TeamPermission
({
permission
:
new
TeamPermission
({
per
:
Per
??
TeamDefaultPermissionVal
,
per
:
Per
??
TeamDefaultPermissionVal
,
isOwner
:
tmb
.
role
===
TeamMemberRoleEnum
.
owner
isOwner
:
tmb
.
role
===
TeamMemberRoleEnum
.
owner
...
@@ -71,8 +70,7 @@ export async function getUserDefaultTeam({ userId }: { userId: string }) {
...
@@ -71,8 +70,7 @@ export async function getUserDefaultTeam({ userId }: { userId: string }) {
return
Promise
.
reject
(
'tmbId or userId is required'
);
return
Promise
.
reject
(
'tmbId or userId is required'
);
}
}
return
getTeamMember
({
return
getTeamMember
({
userId
:
new
Types
.
ObjectId
(
userId
),
userId
:
new
Types
.
ObjectId
(
userId
)
defaultTeam
:
true
});
});
}
}
...
...
packages/service/support/user/team/teamMemberSchema.ts
View file @
662a4a46
...
@@ -39,14 +39,14 @@ const TeamMemberSchema = new Schema({
...
@@ -39,14 +39,14 @@ const TeamMemberSchema = new Schema({
updateTime
:
{
updateTime
:
{
type
:
Date
type
:
Date
},
},
defaultTeam
:
{
type
:
Boolean
,
default
:
false
},
// Abandoned
// Abandoned
role
:
{
role
:
{
type
:
String
type
:
String
},
// Abandoned
defaultTeam
:
{
type
:
Boolean
}
}
});
});
...
...
projects/app/src/pageComponents/account/team/MemberTable.tsx
View file @
662a4a46
...
@@ -93,7 +93,7 @@ function MemberTable({ Tabs }: { Tabs: React.ReactNode }) {
...
@@ -93,7 +93,7 @@ function MemberTable({ Tabs }: { Tabs: React.ReactNode }) {
const
{
runAsync
:
onLeaveTeam
}
=
useRequest2
(
const
{
runAsync
:
onLeaveTeam
}
=
useRequest2
(
async
()
=>
{
async
()
=>
{
const
defaultTeam
=
myTeams
.
find
((
item
)
=>
item
.
defaultTeam
)
||
myTeams
[
0
];
const
defaultTeam
=
myTeams
[
0
];
// change to personal team
// change to personal team
onSwitchTeam
(
defaultTeam
.
teamId
);
onSwitchTeam
(
defaultTeam
.
teamId
);
return
delLeaveTeam
();
return
delLeaveTeam
();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment