feat: Use tag ids instead of values wherever possible (#8394)
This commit is contained in:
+1
-16
@@ -95,7 +95,7 @@ export const useProductTableFilters = (
|
||||
|
||||
if (product_tags && !isProductTagExcluded) {
|
||||
const tagFilter: Filter = {
|
||||
key: "tags",
|
||||
key: "tag_id",
|
||||
label: t("fields.tag"),
|
||||
type: "select",
|
||||
multiple: true,
|
||||
@@ -108,21 +108,6 @@ export const useProductTableFilters = (
|
||||
filters = [...filters, tagFilter]
|
||||
}
|
||||
|
||||
// if (product_tags) {
|
||||
// const tagFilter: Filter = {
|
||||
// key: "tags",
|
||||
// label: t("fields.tag"),
|
||||
// type: "select",
|
||||
// multiple: true,
|
||||
// options: product_tags.map((t) => ({
|
||||
// label: t.value,
|
||||
// value: t.id,
|
||||
// })),
|
||||
// }
|
||||
|
||||
// filters = [...filters, tagFilter]
|
||||
// }
|
||||
|
||||
if (sales_channels) {
|
||||
const salesChannelFilter: Filter = {
|
||||
key: "sales_channel_id",
|
||||
|
||||
@@ -21,7 +21,7 @@ export const useProductTableQuery = ({
|
||||
"category_id",
|
||||
"collection_id",
|
||||
"is_giftcard",
|
||||
"tags",
|
||||
"tag_id",
|
||||
"type_id",
|
||||
"status",
|
||||
"id",
|
||||
@@ -36,7 +36,7 @@ export const useProductTableQuery = ({
|
||||
updated_at,
|
||||
category_id,
|
||||
collection_id,
|
||||
tags,
|
||||
tag_id,
|
||||
type_id,
|
||||
is_giftcard,
|
||||
status,
|
||||
@@ -54,7 +54,7 @@ export const useProductTableQuery = ({
|
||||
collection_id: collection_id?.split(","),
|
||||
is_giftcard: is_giftcard ? is_giftcard === "true" : undefined,
|
||||
order: order,
|
||||
tags: tags ? { value: tags.split(",") } : undefined,
|
||||
tag_id: tag_id ? tag_id.split(",") : undefined,
|
||||
type_id: type_id?.split(","),
|
||||
status: status?.split(",") as HttpTypes.AdminProductStatus[],
|
||||
q,
|
||||
|
||||
Reference in New Issue
Block a user