{
this.updateField(table, index, "visible", checked);
}} />
);
},
},
{
title: i18next.t("signup:Regex"),
dataIndex: "regex",
key: "regex",
width: "200px",
render: (text, record, index) => {
const regexIncludeList = ["Display name", "Password", "Email", "Phone", "Location",
"Title", "Homepage", "Bio", "Gender", "Birthday", "Education", "ID card",
"ID card type"];
if (!regexIncludeList.includes(record.name)) {
return null;
}
return (
{
this.updateField(table, index, "regex", e.target.value);
}} />
);
},
},
{
title: i18next.t("organization:View rule"),
dataIndex: "viewRule",
key: "viewRule",
width: "155px",
render: (text, record, index) => {
if (!record.visible) {
return null;
}
const options = [
{id: "Public", name: "Public"},
{id: "Self", name: "Self"},
{id: "Admin", name: "Admin"},
];
return (
);
},
},
{
title: i18next.t("organization:Modify rule"),
dataIndex: "modifyRule",
key: "modifyRule",
width: "155px",
render: (text, record, index) => {
if (!record.visible) {
return null;
}
let options;
if (record.viewRule === "Admin" || record.name === "Is admin") {
options = [
{id: "Admin", name: "Admin"},
{id: "Immutable", name: "Immutable"},
];
} else {
options = [
{id: "Self", name: "Self"},
{id: "Admin", name: "Admin"},
{id: "Immutable", name: "Immutable"},
];
}
return (
);
},
},
{
title: i18next.t("general:Action"),
key: "action",
width: "100px",
render: (text, record, index) => {
return (
} size="small" onClick={() => this.upRow(table, index)} />
} size="small" onClick={() => this.downRow(table, index)} />
} size="small" onClick={() => this.deleteRow(table, index)} />
);
},
},
];
return (
(
{this.props.title}
)}
/>
);
}
render() {
return (
{
this.renderTable(this.props.table)
}
);
}
}
export default AccountTable;