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