@@ -64,7 +66,7 @@ function ReturnInfoPopover({ orderReturn }: ReturnInfoPopoverProps) {
{t(`orders.returns.returnRequested`)}
{" · "}
- {formatDate(orderReturn.requested_at)}
+ {getFullDate({ date: orderReturn.requested_at, includeTime: true })}
@@ -73,7 +75,10 @@ function ReturnInfoPopover({ orderReturn }: ReturnInfoPopoverProps) {
{" · "}
{orderReturn.received_at
- ? formatDate(orderReturn.received_at)
+ ? getFullDate({
+ date: orderReturn.received_at,
+ includeTime: true,
+ })
: "-"}
diff --git a/packages/admin/dashboard/src/routes/tax-regions/common/hooks.ts b/packages/admin/dashboard/src/routes/tax-regions/common/hooks.ts
index 0f519a09041ce..1caaa514f8b36 100644
--- a/packages/admin/dashboard/src/routes/tax-regions/common/hooks.ts
+++ b/packages/admin/dashboard/src/routes/tax-regions/common/hooks.ts
@@ -32,20 +32,12 @@ export const useDeleteTaxRegionAction = ({
await mutateAsync(undefined, {
onSuccess: () => {
- toast.success(t("general.success"), {
- description: t("taxRegions.delete.successToast"),
- dismissable: true,
- dismissLabel: t("actions.close"),
- })
+ toast.success(t("taxRegions.delete.successToast"))
navigate(to, { replace: true })
},
onError: (e) => {
- toast.error(t("general.error"), {
- description: e.message,
- dismissable: true,
- dismissLabel: t("actions.close"),
- })
+ toast.error(e.message)
},
})
}
diff --git a/packages/admin/dashboard/src/routes/users/user-edit/components/edit-user-form/edit-user-form.tsx b/packages/admin/dashboard/src/routes/users/user-edit/components/edit-user-form/edit-user-form.tsx
index 7ee591bc17bd1..d448fe6e29900 100644
--- a/packages/admin/dashboard/src/routes/users/user-edit/components/edit-user-form/edit-user-form.tsx
+++ b/packages/admin/dashboard/src/routes/users/user-edit/components/edit-user-form/edit-user-form.tsx
@@ -4,14 +4,14 @@ import { useForm } from "react-hook-form"
import { useTranslation } from "react-i18next"
import * as zod from "zod"
-import { UserDTO } from "@medusajs/types"
+import { HttpTypes } from "@medusajs/types"
import { Form } from "../../../../../components/common/form"
import { RouteDrawer, useRouteModal } from "../../../../../components/modals"
import { KeyboundForm } from "../../../../../components/utilities/keybound-form"
import { useUpdateUser } from "../../../../../hooks/api/users"
type EditUserFormProps = {
- user: UserDTO
+ user: HttpTypes.AdminUser
}
const EditUserFormSchema = zod.object({
diff --git a/packages/admin/dashboard/src/routes/users/user-invite/components/invite-user-form/invite-user-form.tsx b/packages/admin/dashboard/src/routes/users/user-invite/components/invite-user-form/invite-user-form.tsx
index 61622ec318b8a..136d5b420f6b9 100644
--- a/packages/admin/dashboard/src/routes/users/user-invite/components/invite-user-form/invite-user-form.tsx
+++ b/packages/admin/dashboard/src/routes/users/user-invite/components/invite-user-form/invite-user-form.tsx
@@ -1,6 +1,6 @@
import { zodResolver } from "@hookform/resolvers/zod"
import { ArrowPath, Link, Trash } from "@medusajs/icons"
-import { InviteDTO } from "@medusajs/types"
+import { HttpTypes } from "@medusajs/types"
import {
Alert,
Button,
@@ -70,7 +70,7 @@ export const InviteUserForm = () => {
const columns = useColumns()
const { table } = useDataTable({
- data: (invites ?? []) as InviteDTO[],
+ data: invites ?? [],
columns,
count,
enablePagination: true,
@@ -185,7 +185,7 @@ export const InviteUserForm = () => {
)
}
-const InviteActions = ({ invite }: { invite: InviteDTO }) => {
+const InviteActions = ({ invite }: { invite: HttpTypes.AdminInvite }) => {
const { mutateAsync: revokeAsync } = useDeleteInvite(invite.id)
const { mutateAsync: resendAsync } = useResendInvite(invite.id)
@@ -253,7 +253,7 @@ const InviteActions = ({ invite }: { invite: InviteDTO }) => {
)
}
-const columnHelper = createColumnHelper()
+const columnHelper = createColumnHelper()
const useColumns = () => {
const { t } = useTranslation()
diff --git a/packages/admin/dashboard/src/routes/users/user-metadata/user-metadata.tsx b/packages/admin/dashboard/src/routes/users/user-metadata/user-metadata.tsx
index 6c64330f1ea13..e88f49e798898 100644
--- a/packages/admin/dashboard/src/routes/users/user-metadata/user-metadata.tsx
+++ b/packages/admin/dashboard/src/routes/users/user-metadata/user-metadata.tsx
@@ -7,8 +7,8 @@ import { useUpdateUser, useUser } from "../../../hooks/api"
export const UserMetadata = () => {
const { id } = useParams()
- const { user, isPending, isError, error } = useUser(id)
- const { mutateAsync, isPending: isMutating } = useUpdateUser(id)
+ const { user, isPending, isError, error } = useUser(id!)
+ const { mutateAsync, isPending: isMutating } = useUpdateUser(id!)
if (isError) {
throw error
diff --git a/packages/core/types/src/http/invite/admin/entities.ts b/packages/core/types/src/http/invite/admin/entities.ts
index 10dc03dfcc1e0..35cbba36b29a1 100644
--- a/packages/core/types/src/http/invite/admin/entities.ts
+++ b/packages/core/types/src/http/invite/admin/entities.ts
@@ -18,7 +18,7 @@ export interface AdminInvite {
/**
* The date the invite expires.
*/
- expires_at?: Date
+ expires_at: string
/**
* Key-value pairs of custom data.
*/
@@ -26,9 +26,9 @@ export interface AdminInvite {
/**
* The date that the invite was created.
*/
- created_at?: Date
+ created_at: string
/**
* The date that the invite was updated.
*/
- updated_at?: Date
+ updated_at: string
}