mirror of
https://github.com/casdoor/casdoor.git
synced 2025-07-04 05:10:19 +08:00
Add user soft deletion.
This commit is contained in:
@ -14,7 +14,7 @@
|
||||
|
||||
import React from "react";
|
||||
import {Link} from "react-router-dom";
|
||||
import {Button, Popconfirm, Table} from 'antd';
|
||||
import {Button, Popconfirm, Switch, Table} from 'antd';
|
||||
import moment from "moment";
|
||||
import * as Setting from "./Setting";
|
||||
import * as OrganizationBackend from "./backend/OrganizationBackend";
|
||||
@ -59,6 +59,7 @@ class OrganizationListPage extends React.Component {
|
||||
PasswordSalt: "",
|
||||
phonePrefix: "86",
|
||||
defaultAvatar: "https://casbin.org/img/casbin.svg",
|
||||
enableSoftDeletion: false,
|
||||
}
|
||||
}
|
||||
|
||||
@ -158,7 +159,7 @@ class OrganizationListPage extends React.Component {
|
||||
title: i18next.t("general:Password type"),
|
||||
dataIndex: 'passwordType',
|
||||
key: 'passwordType',
|
||||
width: '100px',
|
||||
width: '150px',
|
||||
sorter: (a, b) => a.passwordType.localeCompare(b.passwordType),
|
||||
},
|
||||
{
|
||||
@ -172,7 +173,7 @@ class OrganizationListPage extends React.Component {
|
||||
title: i18next.t("organization:Default avatar"),
|
||||
dataIndex: 'defaultAvatar',
|
||||
key: 'defaultAvatar',
|
||||
width: '50px',
|
||||
width: '120px',
|
||||
render: (text, record, index) => {
|
||||
return (
|
||||
<a target="_blank" rel="noreferrer" href={text}>
|
||||
@ -181,6 +182,18 @@ class OrganizationListPage extends React.Component {
|
||||
)
|
||||
}
|
||||
},
|
||||
{
|
||||
title: i18next.t("organization:Soft deletion"),
|
||||
dataIndex: 'enableSoftDeletion',
|
||||
key: 'enableSoftDeletion',
|
||||
width: '140px',
|
||||
sorter: (a, b) => a.enableSoftDeletion - b.enableSoftDeletion,
|
||||
render: (text, record, index) => {
|
||||
return (
|
||||
<Switch disabled checkedChildren="ON" unCheckedChildren="OFF" checked={text} />
|
||||
)
|
||||
}
|
||||
},
|
||||
{
|
||||
title: i18next.t("general:Action"),
|
||||
dataIndex: '',
|
||||
|
Reference in New Issue
Block a user