fix: edit user password optional

This commit is contained in:
jialin
2024-07-19 17:29:39 +08:00
parent b8b0d39635
commit b48be3b883
11 changed files with 56 additions and 25 deletions
+2 -2
View File
@@ -116,7 +116,7 @@ const AddModal: React.FC<AddModalProps> = ({
name="password"
rules={[
{
required: true,
required: action === PageAction.CREATE,
pattern: PasswordReg,
message: intl.formatMessage({ id: 'users.form.rule.password' })
}
@@ -124,7 +124,7 @@ const AddModal: React.FC<AddModalProps> = ({
>
<SealInput.Password
label={intl.formatMessage({ id: 'common.form.password' })}
required
required={action === PageAction.CREATE}
></SealInput.Password>
</Form.Item>
</Form>
+2
View File
@@ -144,6 +144,7 @@ const Users: React.FC = () => {
const handleDelete = (row: ListItem) => {
modalRef.current.show({
content: 'users.table.user',
name: row.name,
async onOk() {
console.log('OK');
await deleteUser(row.id);
@@ -155,6 +156,7 @@ const Users: React.FC = () => {
const handleDeleteBatch = () => {
modalRef.current.show({
content: 'users.table.user',
selection: true,
async onOk() {
await handleBatchRequest(rowSelection.selectedRowKeys, deleteUser);
rowSelection.clearSelections();