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

[Feat]: Add Create/Update Time column on the Orgs Page#1806

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
2 changes: 2 additions & 0 deletionsclient/packages/lowcoder/src/api/userApi.ts
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -65,6 +65,8 @@ export interface GetMyOrgsResponse extends ApiResponse {
data: Array<{
orgId: string;
orgName: string;
createdAt?: number;
updatedAt?: number;
}>;
pageNum: number;
pageSize: number;
Expand Down
2 changes: 2 additions & 0 deletionsclient/packages/lowcoder/src/constants/orgConstants.ts
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -54,6 +54,8 @@ export type Org = {
createdBy: string;
commonSettings: CommonSettingResponseData;
createTime?: string;
createdAt?: number;
updatedAt?: number;
};

export type OrgAndRole = {
Expand Down
4 changes: 3 additions & 1 deletionclient/packages/lowcoder/src/i18n/locales/en.ts
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -3062,7 +3062,9 @@ export const en = {
"inviteSuccessMessage": "Join the Workspace Successfully",
"inviteFailMessage": "Failed to Join Workspace",
"uploadErrorMessage": "Upload Error",
"orgName": "Workspace Name"
"orgName": "Workspace Name",
"createdAt": "Created",
"updatedAt": "Updated"
},
"freeLimit": "Free Trial",

Expand Down
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -19,13 +19,14 @@ import { isSaasMode } from "util/envUtils";
import { selectSystemConfig } from "redux/selectors/configSelectors";
import { default as Form } from "antd/es/form";
import { default as Input } from "antd/es/input";
import { Pagination, Spin } from "antd";
import { Pagination, Spin, Tooltip } from "antd";
import { getUser } from "redux/selectors/usersSelectors";
import { getOrgCreateStatus } from "redux/selectors/orgSelectors";
import { useWorkspaceManager } from "util/useWorkspaceManager";
import { Org } from "constants/orgConstants";
import { useState } from "react";
import { SwapOutlined } from "@ant-design/icons";
import dayjs from "dayjs";

const OrgName = styled.div`
display: flex;
Expand DownExpand Up@@ -170,6 +171,8 @@ type DataItemInfo = {
del: boolean;
orgName: string;
logoUrl: string;
createdAt?: number;
updatedAt?: number;
};

function OrganizationSetting() {
Expand All@@ -194,6 +197,7 @@ function OrganizationSetting() {
});



// Filter to only show orgs where user has admin permissions
const adminOrgs = displayWorkspaces.filter((org: Org) => {
const role = user.orgRoleMap.get(org.id);
Expand All@@ -205,10 +209,14 @@ function OrganizationSetting() {
del: adminOrgs.length > 1,
orgName: org.name,
logoUrl: org.logoUrl || "",
createdAt: org.createdAt,
updatedAt: org.updatedAt,
}));



return (
<Level1SettingPageContentWithList>
<Level1SettingPageContentWithList style={{ minWidth: "1000px" }}>
<Level1SettingPageTitleWithBtn>
{trans("settings.organization")}
{isSaasMode(sysConfig) && (
Expand DownExpand Up@@ -249,7 +257,7 @@ function OrganizationSetting() {
onClick: () => history.push(buildOrgId((record as DataItemInfo).id)),
})}
columns={[
{
{
title: trans("orgSettings.orgName"),
dataIndex: "orgName",
ellipsis: true,
Expand All@@ -264,6 +272,34 @@ function OrganizationSetting() {
);
},
},
{
title: trans("orgSettings.createdAt"),
dataIndex: "createdAt",
width: "150px",
render: (createdAt: number) => {
if (!createdAt) return "-";
return (
<Tooltip title={dayjs.unix(createdAt).format("YYYY/MM/DD HH:mm:ss")}
placement="bottom">
<span style={{ color: "#8b8fa3" }}>{dayjs.unix(createdAt).fromNow()}</span>
</Tooltip>
);
},
},
{
title: trans("orgSettings.updatedAt"),
dataIndex: "updatedAt",
width: "150px",
render: (updatedAt: number) => {
if (!updatedAt) return "-";
return (
<Tooltip title={dayjs.unix(updatedAt).format("YYYY/MM/DD HH:mm:ss")}
placement="bottom">
<span style={{ color: "#8b8fa3" }}>{dayjs.unix(updatedAt).fromNow()}</span>
</Tooltip>
);
},
},
{ title: " ", dataIndex: "operation", width: "208px" },
]}
dataSource={dataSource.map((item, i) => ({
Expand Down
2 changes: 2 additions & 0 deletionsclient/packages/lowcoder/src/redux/sagas/orgSagas.ts
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -370,6 +370,8 @@ export function* fetchWorkspacesSaga(action: ReduxAction<{page: number, pageSize
const transformedItems = apiData.data.map(item => ({
id: item.orgId,
name: item.orgName,
createdAt: item.createdAt,
updatedAt: item.updatedAt,
}));

yield put({
Expand Down
2 changes: 2 additions & 0 deletionsclient/packages/lowcoder/src/util/useWorkspaceManager.ts
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -93,6 +93,8 @@ export function useWorkspaceManager({
const transformedItems = apiData.data.map(item => ({
id: item.orgId,
name: item.orgName,
createdAt: item.createdAt,
updatedAt: item.updatedAt,
}));

dispatch({
Expand Down
Loading

[8]ページ先頭

©2009-2025 Movatter.jp