fix(dashboard): Allow admins to update default Sales Channel and Stock Location (#11196)

**Note** The huge diff is because the i18n schema wasn't formatted properly again. Not sure how that happened with the update to the script but perhaps someone didn't update their branch to include the change to format the schema on creation.
This commit is contained in:
Kasper Fabricius Kristensen
2025-01-29 17:14:47 +01:00
committed by GitHub
parent 88202761a5
commit 51d2960a57
6 changed files with 571 additions and 1686 deletions

View File

@@ -1,3 +1,9 @@
import { FetchError } from "@medusajs/js-sdk"
import {
AdminSalesChannelListResponse,
AdminSalesChannelResponse,
HttpTypes,
} from "@medusajs/types"
import {
QueryKey,
UseMutationOptions,
@@ -5,16 +11,10 @@ import {
useMutation,
useQuery,
} from "@tanstack/react-query"
import {
AdminSalesChannelListResponse,
AdminSalesChannelResponse,
HttpTypes,
} from "@medusajs/types"
import { sdk } from "../../lib/client"
import { queryClient } from "../../lib/query-client"
import { queryKeysFactory } from "../../lib/query-key-factory"
import { productsQueryKeys } from "./products"
import { FetchError } from "@medusajs/js-sdk"
const SALES_CHANNELS_QUERY_KEY = "sales-channels" as const
export const salesChannelsQueryKeys = queryKeysFactory(SALES_CHANNELS_QUERY_KEY)