Add user's Affiliation and IsAdmin.

This commit is contained in:
Yang Luo
2021-02-14 13:43:55 +08:00
parent 4b66c24bb6
commit 40587f35e3
4 changed files with 53 additions and 12 deletions

View File

@ -14,7 +14,7 @@
import React from "react";
import {Link} from "react-router-dom";
import {Button, Col, Popconfirm, Row, Table} from 'antd';
import {Button, Col, Popconfirm, Row, Switch, Table} from 'antd';
import moment from "moment";
import * as Setting from "./Setting";
import * as UserBackend from "./backend/UserBackend";
@ -131,13 +131,13 @@ class UserListPage extends React.Component {
width: '150px',
sorter: (a, b) => a.passwordType.localeCompare(b.passwordType),
},
{
title: 'Password',
dataIndex: 'password',
key: 'password',
width: '150px',
sorter: (a, b) => a.password.localeCompare(b.password),
},
// {
// title: 'Password',
// dataIndex: 'password',
// key: 'password',
// width: '150px',
// sorter: (a, b) => a.password.localeCompare(b.password),
// },
{
title: 'Display Name',
dataIndex: 'displayName',
@ -179,6 +179,25 @@ class UserListPage extends React.Component {
width: '120px',
sorter: (a, b) => a.phone.localeCompare(b.phone),
},
{
title: 'Affiliation',
dataIndex: 'affiliation',
key: 'affiliation',
width: '120px',
sorter: (a, b) => a.affiliation.localeCompare(b.affiliation),
},
{
title: 'Is Admin',
dataIndex: 'isAdmin',
key: 'isAdmin',
width: '120px',
sorter: (a, b) => a.isAdmin.localeCompare(b.isAdmin),
render: (text, record, index) => {
return (
<Switch disabled checkedChildren="ON" unCheckedChildren="OFF" checked={text} />
)
}
},
{
title: 'Action',
dataIndex: '',