@@ -19,13 +19,14 @@ import { isSaasMode } from "util/envUtils";
19
19
import { selectSystemConfig } from "redux/selectors/configSelectors" ;
20
20
import { default as Form } from "antd/es/form" ;
21
21
import { default as Input } from "antd/es/input" ;
22
- import { Pagination , Spin } from "antd" ;
22
+ import { Pagination , Spin , Tooltip } from "antd" ;
23
23
import { getUser } from "redux/selectors/usersSelectors" ;
24
24
import { getOrgCreateStatus } from "redux/selectors/orgSelectors" ;
25
25
import { useWorkspaceManager } from "util/useWorkspaceManager" ;
26
26
import { Org } from "constants/orgConstants" ;
27
27
import { useState } from "react" ;
28
28
import { SwapOutlined } from "@ant-design/icons" ;
29
+ import dayjs from "dayjs" ;
29
30
30
31
const OrgName = styled . div `
31
32
display: flex;
@@ -170,6 +171,8 @@ type DataItemInfo = {
170
171
del : boolean ;
171
172
orgName : string ;
172
173
logoUrl : string ;
174
+ createdAt ?: number ;
175
+ updatedAt ?: number ;
173
176
} ;
174
177
175
178
function OrganizationSetting ( ) {
@@ -194,6 +197,7 @@ function OrganizationSetting() {
194
197
} ) ;
195
198
196
199
200
+
197
201
// Filter to only show orgs where user has admin permissions
198
202
const adminOrgs = displayWorkspaces . filter ( ( org : Org ) => {
199
203
const role = user . orgRoleMap . get ( org . id ) ;
@@ -205,10 +209,14 @@ function OrganizationSetting() {
205
209
del : adminOrgs . length > 1 ,
206
210
orgName : org . name ,
207
211
logoUrl : org . logoUrl || "" ,
212
+ createdAt : org . createdAt ,
213
+ updatedAt : org . updatedAt ,
208
214
} ) ) ;
209
215
216
+
217
+
210
218
return (
211
- < Level1SettingPageContentWithList >
219
+ < Level1SettingPageContentWithList style = { { minWidth : "1000px" } } >
212
220
< Level1SettingPageTitleWithBtn >
213
221
{ trans ( "settings.organization" ) }
214
222
{ isSaasMode ( sysConfig ) && (
@@ -249,7 +257,7 @@ function OrganizationSetting() {
249
257
onClick : ( ) => history . push ( buildOrgId ( ( record as DataItemInfo ) . id ) ) ,
250
258
} ) }
251
259
columns = { [
252
- {
260
+ {
253
261
title : trans ( "orgSettings.orgName" ) ,
254
262
dataIndex : "orgName" ,
255
263
ellipsis : true ,
@@ -264,6 +272,34 @@ function OrganizationSetting() {
264
272
) ;
265
273
} ,
266
274
} ,
275
+ {
276
+ title : trans ( "orgSettings.createdAt" ) ,
277
+ dataIndex : "createdAt" ,
278
+ width : "150px" ,
279
+ render : ( createdAt : number ) => {
280
+ if ( ! createdAt ) return "-" ;
281
+ return (
282
+ < Tooltip title = { dayjs . unix ( createdAt ) . format ( "YYYY/MM/DD HH:mm:ss" ) }
283
+ placement = "bottom" >
284
+ < span style = { { color : "#8b8fa3" } } > { dayjs . unix ( createdAt ) . fromNow ( ) } </ span >
285
+ </ Tooltip >
286
+ ) ;
287
+ } ,
288
+ } ,
289
+ {
290
+ title : trans ( "orgSettings.updatedAt" ) ,
291
+ dataIndex : "updatedAt" ,
292
+ width : "150px" ,
293
+ render : ( updatedAt : number ) => {
294
+ if ( ! updatedAt ) return "-" ;
295
+ return (
296
+ < Tooltip title = { dayjs . unix ( updatedAt ) . format ( "YYYY/MM/DD HH:mm:ss" ) }
297
+ placement = "bottom" >
298
+ < span style = { { color : "#8b8fa3" } } > { dayjs . unix ( updatedAt ) . fromNow ( ) } </ span >
299
+ </ Tooltip >
300
+ ) ;
301
+ } ,
302
+ } ,
267
303
{ title : " " , dataIndex : "operation" , width : "208px" } ,
268
304
] }
269
305
dataSource = { dataSource . map ( ( item , i ) => ( {
0 commit comments