[FE] Improve custom role delete modal
On the Roles and Permissions page, when trying to delete a role, a modal is shown:
We should make the following improvements:
-
When the
Delete role
button is clicked, the modal is immediately closed while the delete request is running in the background. If the request is taking a long time, there's no UI indication of this happening and the custom roles list is not refreshed in the meantime. We should keep the modal open until the delete request is complete, and show the modal as loading. -
The delete mutation uses an
update()
function. We should not use this unless we're doing an optimistic update, which we aren't in this case. We should switch it to reading the promise returned by the mutation call. -
We should remove
memberRole { id }
fromdelete_member_role.mutation.graphql
. It's not used.