Skip to content

Commit

Permalink
When the role is modified, update the permissions (#536)
Browse files Browse the repository at this point in the history
  • Loading branch information
yang1666204 authored Aug 29, 2024
1 parent 64bdd51 commit 8dd2b2b
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion ui/src/components/customModal/HandleRoleModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ export default function HandleRoleModal({
type,
}: HandleRoleModalProps) {
const [form] = Form.useForm();
const { initialState } = useModel('@@initialState');
const { initialState, refresh } = useModel('@@initialState');
const handleSubmit = async () => {
try {
await form.validateFields();
Expand Down Expand Up @@ -187,6 +187,9 @@ export default function HandleRoleModal({
pick(formData, ['description', 'permissions']),
);
if (res.successful) {
if (type == Type.EDIT) {
await refresh();
}
message.success(
intl.formatMessage({
id: 'src.components.customModal.66C28C4A',
Expand Down

0 comments on commit 8dd2b2b

Please sign in to comment.