Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[Fix]: For the new structure /myorg endpoint#1859

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes fromall commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 7 additions & 4 deletionsclient/packages/lowcoder/src/api/userApi.ts
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -63,10 +63,13 @@ export type GetCurrentUserResponse = GenericApiResponse<CurrentUser>;
exportinterfaceGetMyOrgsResponseextendsApiResponse{
data:{
data:Array<{
orgId:string;
orgName:string;
createdAt?:number;
updatedAt?:number;
isCurrentOrg:boolean;
orgView:{
orgId:string;
orgName:string;
createdAt?:number;
updatedAt?:number;
};
}>;
pageNum:number;
pageSize:number;
Expand Down
1 change: 1 addition & 0 deletionsclient/packages/lowcoder/src/constants/orgConstants.ts
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -56,6 +56,7 @@ export type Org = {
createTime?:string;
createdAt?:number;
updatedAt?:number;
isCurrentOrg?:boolean;
};

exporttypeOrgAndRole={
Expand Down
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -242,11 +242,11 @@ export default function WorkspaceSectionComponent({
displayWorkspaces.map((org:Org)=>(
<WorkspaceItem
key={org.id}
$isActive={user.currentOrgId===org.id}
$isActive={org.isCurrentOrg}
onClick={()=>handleOrgSwitch(org.id)}
>
<WorkspaceNametitle={org.name}>{org.name}</WorkspaceName>
{user.currentOrgId===org.id&&<ActiveIcon/>}
{org.isCurrentOrg&&<ActiveIcon/>}
</WorkspaceItem>
))
) :(
Expand Down
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -211,6 +211,7 @@ function OrganizationSetting() {
logoUrl:org.logoUrl||"",
createdAt:org.createdAt,
updatedAt:org.updatedAt,
isCurrentOrg:org.isCurrentOrg,
}));


Expand DownExpand Up@@ -262,7 +263,7 @@ function OrganizationSetting() {
dataIndex:"orgName",
ellipsis:true,
render:(_,record:any)=>{
constisActiveOrg=record.id===user.currentOrgId;
constisActiveOrg=record.isCurrentOrg;
return(
<OrgName>
<StyledOrgLogosource={record.logoUrl}orgName={record.orgName}/>
Expand DownExpand Up@@ -307,7 +308,7 @@ function OrganizationSetting() {
key:i,
operation:(
<OperationWrapper>
{item.id!==user.currentOrgId&&(
{!item.isCurrentOrg&&(
<SwitchBtn
className={"home-datasource-edit-button"}
buttonType={"blue"}
Expand Down
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -25,6 +25,8 @@ const initialState: UsersReduxState = {
workspaces:{
items:[],
totalCount:0,
currentOrg:null

}
};

Expand DownExpand Up@@ -231,6 +233,7 @@ export interface UsersReduxState {
workspaces:{
items:Org[];// Current page of workspaces
totalCount:number;// Total workspaces available
currentOrg:Org|null;
};
}

Expand Down
9 changes: 5 additions & 4 deletionsclient/packages/lowcoder/src/redux/sagas/orgSagas.ts
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -368,10 +368,11 @@ export function* fetchWorkspacesSaga(action: ReduxAction<{page: number, pageSize

// Transform orgId/orgName to match Org interface
consttransformedItems=apiData.data.map(item=>({
id:item.orgId,
name:item.orgName,
createdAt:item.createdAt,
updatedAt:item.updatedAt,
id:item.orgView.orgId,
name:item.orgView.orgName,
createdAt:item.orgView.createdAt,
updatedAt:item.orgView.updatedAt,
isCurrentOrg:item.isCurrentOrg,
}));

yieldput({
Expand Down
9 changes: 5 additions & 4 deletionsclient/packages/lowcoder/src/util/useWorkspaceManager.ts
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -91,10 +91,11 @@ export function useWorkspaceManager({
if(response.data.success){
constapiData=response.data.data;
consttransformedItems=apiData.data.map(item=>({
id:item.orgId,
name:item.orgName,
createdAt:item.createdAt,
updatedAt:item.updatedAt,
id:item.orgView.orgId,
name:item.orgView.orgName,
createdAt:item.orgView.createdAt,
updatedAt:item.orgView.updatedAt,
isCurrentOrg:item.isCurrentOrg,
}));

dispatch({
Expand Down
Loading

[8]ページ先頭

©2009-2025 Movatter.jp