pref: member/org/gourp list (#4295)

* refactor: org api

* refactor: org api

* pref: member/org/group list

* feat: change group owner api

* fix: manage org member

* pref: member search
This commit is contained in:
Finley Ge
2025-03-25 00:10:26 +08:00
committed by archer
parent 6ea57e4609
commit 5a47af6fff
21 changed files with 413 additions and 364 deletions

View File

@@ -19,9 +19,23 @@ type GroupMemberSchemaType = {
type MemberGroupType = MemberGroupSchemaType & {
members: {
tmbId: string;
role: `${GroupMemberRole}`;
}[]; // we can get tmb's info from other api. there is no need but only need to get tmb's id
permission: TeamPermission;
name: string;
avatar: string;
}[];
count: number;
owner: {
tmbId: string;
name: string;
avatar: string;
};
canEdit: boolean;
};
type MemberGroupListType = MemberGroupType[];
type GroupMemberItemType = {
tmbId: string;
name: string;
avatar: string;
role: `${GroupMemberRole}`;
};

View File

@@ -1,5 +1,6 @@
import type { TeamPermission } from 'support/permission/user/controller';
import { ResourcePermissionType } from '../type';
import { SourceMemberType } from 'support/user/type';
type OrgSchemaType = {
_id: string;
@@ -23,4 +24,5 @@ type OrgType = Omit<OrgSchemaType, 'avatar'> & {
avatar: string;
permission: TeamPermission;
members: OrgMemberSchemaType[];
total: number; // members + children orgs
};

View File

@@ -82,6 +82,7 @@ export type TeamMemberItemType = {
contact?: string;
createTime: Date;
updateTime?: Date;
orgs?: string[]; // full path name, pattern: /teamName/orgname1/orgname2
};
export type TeamTagItemType = {