@@ -2442,11 +2442,19 @@
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": ["alreadyManaged", "alreadyManagedWithSku"],
|
||||
"required": [
|
||||
"alreadyManaged",
|
||||
"alreadyManagedWithSku"
|
||||
],
|
||||
"additionalProperties": false
|
||||
}
|
||||
},
|
||||
"required": ["heading", "description", "loading", "tooltips"],
|
||||
"required": [
|
||||
"heading",
|
||||
"description",
|
||||
"loading",
|
||||
"tooltips"
|
||||
],
|
||||
"additionalProperties": false
|
||||
},
|
||||
"toasts": {
|
||||
@@ -8338,6 +8346,9 @@
|
||||
"deleteUserWarning": {
|
||||
"type": "string"
|
||||
},
|
||||
"deleteUserSuccess": {
|
||||
"type": "string"
|
||||
},
|
||||
"invite": {
|
||||
"type": "string"
|
||||
}
|
||||
@@ -8358,6 +8369,7 @@
|
||||
"inviteStatus",
|
||||
"roles",
|
||||
"deleteUserWarning",
|
||||
"deleteUserSuccess",
|
||||
"invite"
|
||||
],
|
||||
"additionalProperties": false
|
||||
|
||||
@@ -2243,6 +2243,7 @@
|
||||
"member": "Member"
|
||||
},
|
||||
"deleteUserWarning": "You are about to delete the user {{name}}. This action cannot be undone.",
|
||||
"deleteUserSuccess": "User {{name}} deleted successfully",
|
||||
"invite": "Invite"
|
||||
},
|
||||
"store": {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { PencilSquare, Trash } from "@medusajs/icons"
|
||||
import { HttpTypes } from "@medusajs/types"
|
||||
import { Container, Heading, Text, usePrompt } from "@medusajs/ui"
|
||||
import { Container, Heading, Text, toast, usePrompt } from "@medusajs/ui"
|
||||
import { useTranslation } from "react-i18next"
|
||||
import { useNavigate } from "react-router-dom"
|
||||
import { ActionMenu } from "../../../../../components/common/action-menu"
|
||||
@@ -37,8 +37,12 @@ export const UserGeneralSection = ({ user }: UserGeneralSectionProps) => {
|
||||
|
||||
await mutateAsync(undefined, {
|
||||
onSuccess: () => {
|
||||
toast.success(t("users.deleteUserSuccess", { name: user.email }))
|
||||
navigate("..")
|
||||
},
|
||||
onError: (error) => {
|
||||
toast.error(error.message)
|
||||
},
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user