fix(dashboard,types): Add missing Metadata form for Region domain and fix payload types (#10449)
This commit is contained in:
committed by
GitHub
parent
be15240909
commit
16663ec813
6
.changeset/five-hairs-do.md
Normal file
6
.changeset/five-hairs-do.md
Normal file
@@ -0,0 +1,6 @@
|
||||
---
|
||||
"@medusajs/dashboard": patch
|
||||
"@medusajs/types": patch
|
||||
---
|
||||
|
||||
fix(dashboard,types): Add missing Metadata form for Region domain and fix types
|
||||
@@ -901,6 +901,10 @@ export const RouteMap: RouteObject[] = [
|
||||
lazy: () =>
|
||||
import("../../routes/regions/region-add-countries"),
|
||||
},
|
||||
{
|
||||
path: "metadata/edit",
|
||||
lazy: () => import("../../routes/regions/region-metadata"),
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
|
||||
@@ -7,8 +7,8 @@ import { useRegion, useUpdateRegion } from "../../../hooks/api"
|
||||
export const RegionMetadata = () => {
|
||||
const { id } = useParams()
|
||||
|
||||
const { region, isPending, isError, error } = useRegion(id)
|
||||
const { mutateAsync, isPending: isMutating } = useUpdateRegion(id)
|
||||
const { region, isPending, isError, error } = useRegion(id!)
|
||||
const { mutateAsync, isPending: isMutating } = useUpdateRegion(id!)
|
||||
|
||||
if (isError) {
|
||||
throw error
|
||||
|
||||
@@ -5,7 +5,7 @@ export interface AdminCreateRegion {
|
||||
automatic_taxes?: boolean
|
||||
is_tax_inclusive?: boolean
|
||||
payment_providers?: string[]
|
||||
metadata?: Record<string, any>
|
||||
metadata?: Record<string, any> | null
|
||||
}
|
||||
|
||||
export interface AdminUpdateRegion {
|
||||
@@ -15,5 +15,5 @@ export interface AdminUpdateRegion {
|
||||
automatic_taxes?: boolean
|
||||
is_tax_inclusive?: boolean
|
||||
payment_providers?: string[]
|
||||
metadata?: Record<string, any>
|
||||
metadata?: Record<string, any> | null
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user