@mercurjs/admin 2.2.0-canary.35 → 2.2.0-canary.36
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{add-campaign-promotions-FBS4ELIA.js → add-campaign-promotions-OTLO4M5C.js} +3 -3
- package/dist/{campaign-detail-HMU2FMJL.js → campaign-detail-GZV2HK2G.js} +4 -4
- package/dist/{category-detail-PMNXMTV3.js → category-detail-AYVW7LRB.js} +2 -2
- package/dist/{category-products-YMPKVXV4.js → category-products-IF33PO5Y.js} +2 -2
- package/dist/{chunk-VTHMDGGJ.js → chunk-4X4MNAXL.js} +1 -1
- package/dist/{chunk-TJ5IONZX.js → chunk-5YWQDIVG.js} +2 -1
- package/dist/{chunk-IUOZZMSQ.js → chunk-BW5MMF6W.js} +1 -1
- package/dist/{chunk-JHL6ZNJW.js → chunk-CA4K6JDJ.js} +1 -1
- package/dist/{chunk-NDIVJLA3.js → chunk-DP3OBKUP.js} +35 -3
- package/dist/{chunk-LNOZHSZV.js → chunk-EMW5WXXR.js} +1 -1
- package/dist/chunk-FU3QYH6H.js +111 -0
- package/dist/{chunk-CBKKZYGU.js → chunk-GJB4UQZI.js} +1 -1
- package/dist/{chunk-TUPWRX62.js → chunk-GML7DINQ.js} +1 -1
- package/dist/{chunk-PVZBDWLK.js → chunk-GRH7C3QN.js} +1 -1
- package/dist/{chunk-CASK2IOQ.js → chunk-HMKXCYCJ.js} +29 -10
- package/dist/{chunk-HOUYHVRG.js → chunk-IHERG3JP.js} +10 -4
- package/dist/{chunk-ISSZIRBL.js → chunk-LRKN7IQH.js} +1 -1
- package/dist/{chunk-RHFFLVYG.js → chunk-MHCIHDGF.js} +1 -1
- package/dist/{chunk-23R7IMRV.js → chunk-MTOPGOKU.js} +1 -1
- package/dist/{chunk-SU444Q24.js → chunk-O53E5U52.js} +0 -21
- package/dist/{chunk-DPFGN6S6.js → chunk-OB5RWOGA.js} +1 -1
- package/dist/{chunk-4ZXFOBOB.js → chunk-OLAOEVZE.js} +1 -1
- package/dist/{chunk-JDMYGQRU.js → chunk-PPMWEQP3.js} +9 -113
- package/dist/{chunk-PH24SLKA.js → chunk-PQAQM6SB.js} +1 -1
- package/dist/{chunk-TFDRETCH.js → chunk-R6DVBI5F.js} +18 -22
- package/dist/{chunk-UULZCRTC.js → chunk-RZ43M34Q.js} +1 -1
- package/dist/{chunk-KW5DS5GL.js → chunk-TYXSRH47.js} +1 -1
- package/dist/{chunk-7WUQR3ZU.js → chunk-U725ING6.js} +1 -1
- package/dist/{chunk-C45OXCZW.js → chunk-YRGPQ2C4.js} +29 -2
- package/dist/{chunk-XBD7UZZX.js → chunk-ZMSQW2M3.js} +1 -1
- package/dist/{collection-add-products-E7YLYPY5.js → collection-add-products-2G37ZL2J.js} +1 -1
- package/dist/{collection-detail-M4ETYKBU.js → collection-detail-PMSYCWE3.js} +2 -2
- package/dist/{collection-list-RSFOKJBX.js → collection-list-EK2TBM3J.js} +1 -1
- package/dist/{customer-detail-QH4IXPIR.js → customer-detail-ZYJDB47Y.js} +2 -1
- package/dist/{customer-group-add-customers-EOS25HL4.js → customer-group-add-customers-GSEUGBTJ.js} +1 -1
- package/dist/{customer-group-detail-XQOG6SZY.js → customer-group-detail-5VSUJTR3.js} +2 -2
- package/dist/{customer-list-ELN5NIKN.js → customer-list-6PRFTWMO.js} +2 -2
- package/dist/{customers-add-customer-group-PJ24V5YA.js → customers-add-customer-group-56GS7TR7.js} +3 -2
- package/dist/index.js +52 -52
- package/dist/{order-edit-billing-address-RN32LNJH.js → order-edit-billing-address-WQYQSLDB.js} +1 -1
- package/dist/{order-list-ASX7QDPT.js → order-list-FFPY5OGR.js} +3 -2
- package/dist/pages/index.js +25 -24
- package/dist/{price-list-create-TDPYBF7D.js → price-list-create-QEDMB4A6.js} +2 -2
- package/dist/{price-list-detail-U5LPEFWH.js → price-list-detail-7ANY3XOC.js} +2 -2
- package/dist/{price-list-prices-add-J4GDJTQY.js → price-list-prices-add-GVOZDWKE.js} +2 -2
- package/dist/{product-create-OSG3NREE.js → product-create-STXNKMAV.js} +3 -3
- package/dist/{product-edit-attribute-RE6L525Z.js → product-edit-attribute-BSPIDAZJ.js} +4 -27
- package/dist/{product-list-PQ3UMA2U.js → product-list-SIQDX4AT.js} +2 -2
- package/dist/{product-media-7HLOXWZZ.js → product-media-JFLRNBPR.js} +2 -2
- package/dist/{product-organization-XHIT5HXK.js → product-organization-SGLOMAKK.js} +1 -1
- package/dist/{product-tag-detail-W3NUBZ6N.js → product-tag-detail-ZV7V7UW3.js} +3 -3
- package/dist/{product-tag-list-4KNHKDAV.js → product-tag-list-SZHBD5FA.js} +2 -2
- package/dist/{product-type-detail-GNCVQKQU.js → product-type-detail-WSHUE56F.js} +2 -2
- package/dist/{promotion-detail-7V235FES.js → promotion-detail-AWVF7JHY.js} +3 -3
- package/dist/{promotion-list-LKK3V2CK.js → promotion-list-INBZ3OG3.js} +4 -4
- package/dist/{refund-reason-list-AC3RCTYI.js → refund-reason-list-UCZC5ASP.js} +2 -2
- package/dist/{reset-password-R6KN32M2.js → reset-password-ZJW3AHYT.js} +1 -1
- package/dist/{return-reason-list-KRLDNVBC.js → return-reason-list-AJ4E3A56.js} +2 -2
- package/dist/{sales-channel-add-products-HFS7S4XB.js → sales-channel-add-products-LRANEISZ.js} +1 -1
- package/dist/{sales-channel-detail-SZVBKHKH.js → sales-channel-detail-5XXO3BXP.js} +2 -2
- package/dist/{store-details-5JNTBHRP.js → store-details-XNBFIWDL.js} +3 -3
- package/dist/{store-edit-KUNXCGSI.js → store-edit-6KKEQZRH.js} +2 -2
- package/dist/{store-list-ISPAQ4U3.js → store-list-RVZG3UD3.js} +1 -1
- package/dist/{tax-region-create-E63FR7XD.js → tax-region-create-GAXLHDV5.js} +1 -1
- package/dist/{tax-region-tax-override-create-K6EV53SE.js → tax-region-tax-override-create-XOBU6DOL.js} +3 -3
- package/dist/{tax-region-tax-override-edit-A5UDUAMZ.js → tax-region-tax-override-edit-PEQJFCOU.js} +3 -3
- package/package.json +6 -6
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
import {
|
|
2
|
+
useOrderGroupTableFilters
|
|
3
|
+
} from "./chunk-FU3QYH6H.js";
|
|
1
4
|
import {
|
|
2
5
|
useOrderTableQuery
|
|
3
6
|
} from "./chunk-QUHSHIAC.js";
|
|
@@ -28,15 +31,6 @@ import {
|
|
|
28
31
|
import {
|
|
29
32
|
useOrderGroups
|
|
30
33
|
} from "./chunk-PYF5EER5.js";
|
|
31
|
-
import {
|
|
32
|
-
useSellers
|
|
33
|
-
} from "./chunk-NS3GQ2J6.js";
|
|
34
|
-
import {
|
|
35
|
-
useCustomers
|
|
36
|
-
} from "./chunk-RGS5ZOY7.js";
|
|
37
|
-
import {
|
|
38
|
-
useSalesChannels
|
|
39
|
-
} from "./chunk-MW47LDBT.js";
|
|
40
34
|
|
|
41
35
|
// src/pages/orders/order-list/order-list.tsx
|
|
42
36
|
import { Children as Children3 } from "react";
|
|
@@ -77,8 +71,8 @@ import { IconButton, clx } from "@medusajs/ui";
|
|
|
77
71
|
import { TriangleRightMini } from "@medusajs/icons";
|
|
78
72
|
import { keepPreviousData } from "@tanstack/react-query";
|
|
79
73
|
import { createColumnHelper } from "@tanstack/react-table";
|
|
80
|
-
import { useMemo
|
|
81
|
-
import { useTranslation as
|
|
74
|
+
import { useMemo } from "react";
|
|
75
|
+
import { useTranslation as useTranslation2 } from "react-i18next";
|
|
82
76
|
|
|
83
77
|
// src/pages/orders/order-list/const.ts
|
|
84
78
|
var DEFAULT_PROPERTIES = [
|
|
@@ -109,104 +103,6 @@ var DEFAULT_FIELDS = `${DEFAULT_PROPERTIES.join(
|
|
|
109
103
|
","
|
|
110
104
|
)},${DEFAULT_RELATIONS.join(",")}`;
|
|
111
105
|
|
|
112
|
-
// src/pages/orders/order-list/components/order-list-table/use-order-table-filters.tsx
|
|
113
|
-
import { useMemo } from "react";
|
|
114
|
-
import { useTranslation as useTranslation2 } from "react-i18next";
|
|
115
|
-
var useOrderGroupTableFilters = () => {
|
|
116
|
-
const { t } = useTranslation2();
|
|
117
|
-
const { customers } = useCustomers({
|
|
118
|
-
limit: 1e3,
|
|
119
|
-
fields: "id,first_name,last_name,email"
|
|
120
|
-
});
|
|
121
|
-
const { sellers } = useSellers({
|
|
122
|
-
limit: 1e3,
|
|
123
|
-
fields: "id,name"
|
|
124
|
-
});
|
|
125
|
-
const { sales_channels } = useSalesChannels({
|
|
126
|
-
limit: 1e3,
|
|
127
|
-
fields: "id,name"
|
|
128
|
-
});
|
|
129
|
-
return useMemo(() => {
|
|
130
|
-
const filters = [];
|
|
131
|
-
if (customers?.length) {
|
|
132
|
-
filters.push({
|
|
133
|
-
key: "customer_id",
|
|
134
|
-
label: t("fields.customer"),
|
|
135
|
-
type: "select",
|
|
136
|
-
multiple: true,
|
|
137
|
-
searchable: true,
|
|
138
|
-
options: customers.map((c) => ({
|
|
139
|
-
label: [c.first_name, c.last_name].filter(Boolean).join(" ") || c.email,
|
|
140
|
-
value: c.id
|
|
141
|
-
}))
|
|
142
|
-
});
|
|
143
|
-
}
|
|
144
|
-
if (sellers?.length) {
|
|
145
|
-
filters.push({
|
|
146
|
-
key: "seller_id",
|
|
147
|
-
label: "Store",
|
|
148
|
-
type: "select",
|
|
149
|
-
multiple: true,
|
|
150
|
-
searchable: true,
|
|
151
|
-
options: sellers.map((s) => ({
|
|
152
|
-
label: s.name,
|
|
153
|
-
value: s.id
|
|
154
|
-
}))
|
|
155
|
-
});
|
|
156
|
-
}
|
|
157
|
-
if (sales_channels?.length) {
|
|
158
|
-
filters.push({
|
|
159
|
-
key: "sales_channel_id",
|
|
160
|
-
label: t("fields.salesChannel"),
|
|
161
|
-
type: "select",
|
|
162
|
-
multiple: true,
|
|
163
|
-
searchable: true,
|
|
164
|
-
options: sales_channels.map((s) => ({
|
|
165
|
-
label: s.name,
|
|
166
|
-
value: s.id
|
|
167
|
-
}))
|
|
168
|
-
});
|
|
169
|
-
}
|
|
170
|
-
filters.push({
|
|
171
|
-
key: "status",
|
|
172
|
-
label: t("fields.status"),
|
|
173
|
-
type: "select",
|
|
174
|
-
multiple: true,
|
|
175
|
-
options: [
|
|
176
|
-
{ label: "Pending", value: "pending" },
|
|
177
|
-
{ label: "Completed", value: "completed" },
|
|
178
|
-
{ label: "Canceled", value: "canceled" },
|
|
179
|
-
{ label: "Requires action", value: "requires_action" }
|
|
180
|
-
]
|
|
181
|
-
});
|
|
182
|
-
filters.push({
|
|
183
|
-
key: "request",
|
|
184
|
-
label: t("orders.filters.request.label"),
|
|
185
|
-
type: "select",
|
|
186
|
-
multiple: true,
|
|
187
|
-
options: [
|
|
188
|
-
{ label: t("orders.filters.request.edit"), value: "edit" },
|
|
189
|
-
{ label: t("orders.filters.request.return"), value: "return" },
|
|
190
|
-
{ label: t("orders.filters.request.exchange"), value: "exchange" },
|
|
191
|
-
{ label: t("orders.filters.request.claim"), value: "claim" }
|
|
192
|
-
]
|
|
193
|
-
});
|
|
194
|
-
filters.push(
|
|
195
|
-
{
|
|
196
|
-
key: "created_at",
|
|
197
|
-
label: t("fields.createdAt"),
|
|
198
|
-
type: "date"
|
|
199
|
-
},
|
|
200
|
-
{
|
|
201
|
-
key: "updated_at",
|
|
202
|
-
label: t("fields.updatedAt"),
|
|
203
|
-
type: "date"
|
|
204
|
-
}
|
|
205
|
-
);
|
|
206
|
-
return filters;
|
|
207
|
-
}, [customers, sellers, sales_channels, t]);
|
|
208
|
-
};
|
|
209
|
-
|
|
210
106
|
// src/pages/orders/order-list/components/order-list-table/order-list-data-table.tsx
|
|
211
107
|
import { jsx as jsx2, jsxs } from "react/jsx-runtime";
|
|
212
108
|
var PAGE_SIZE = 20;
|
|
@@ -253,7 +149,7 @@ function transformOrderGroups(orderGroups, t) {
|
|
|
253
149
|
});
|
|
254
150
|
}
|
|
255
151
|
var OrderListDataTable = () => {
|
|
256
|
-
const { t } =
|
|
152
|
+
const { t } = useTranslation2();
|
|
257
153
|
const { searchParams, raw } = useOrderTableQuery({
|
|
258
154
|
pageSize: PAGE_SIZE
|
|
259
155
|
});
|
|
@@ -266,7 +162,7 @@ var OrderListDataTable = () => {
|
|
|
266
162
|
placeholderData: keepPreviousData
|
|
267
163
|
}
|
|
268
164
|
);
|
|
269
|
-
const rows =
|
|
165
|
+
const rows = useMemo(
|
|
270
166
|
() => transformOrderGroups(order_groups ?? [], t),
|
|
271
167
|
[order_groups, t]
|
|
272
168
|
);
|
|
@@ -311,8 +207,8 @@ var OrderListDataTable = () => {
|
|
|
311
207
|
};
|
|
312
208
|
var columnHelper = createColumnHelper();
|
|
313
209
|
var useColumns = () => {
|
|
314
|
-
const { t } =
|
|
315
|
-
return
|
|
210
|
+
const { t } = useTranslation2();
|
|
211
|
+
return useMemo(
|
|
316
212
|
() => [
|
|
317
213
|
columnHelper.accessor("display_id", {
|
|
318
214
|
header: () => /* @__PURE__ */ jsx2(TextHeader, { text: t("orders.fields.groupId") }),
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
} from "./chunk-T2WVIET2.js";
|
|
5
5
|
import {
|
|
6
6
|
useProductTableColumns
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-O53E5U52.js";
|
|
8
8
|
import {
|
|
9
9
|
useProductTableFilters
|
|
10
10
|
} from "./chunk-P4LTLPTK.js";
|
|
@@ -425,27 +425,23 @@ var useColumns = () => {
|
|
|
425
425
|
() => [
|
|
426
426
|
columnHelper.display({
|
|
427
427
|
id: "select",
|
|
428
|
-
header: ({ table }) =>
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
}
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
}
|
|
446
|
-
}
|
|
447
|
-
);
|
|
448
|
-
}
|
|
428
|
+
header: ({ table }) => /* @__PURE__ */ jsx4(
|
|
429
|
+
Checkbox,
|
|
430
|
+
{
|
|
431
|
+
checked: table.getIsSomePageRowsSelected() ? "indeterminate" : table.getIsAllPageRowsSelected(),
|
|
432
|
+
onCheckedChange: (value) => table.toggleAllPageRowsSelected(!!value),
|
|
433
|
+
"data-testid": "products-table-header-select-checkbox"
|
|
434
|
+
}
|
|
435
|
+
),
|
|
436
|
+
cell: ({ row }) => /* @__PURE__ */ jsx4(
|
|
437
|
+
Checkbox,
|
|
438
|
+
{
|
|
439
|
+
checked: row.getIsSelected(),
|
|
440
|
+
onCheckedChange: (value) => row.toggleSelected(!!value),
|
|
441
|
+
onClick: (e) => e.stopPropagation(),
|
|
442
|
+
"data-testid": `products-table-cell-${row.id}-select-checkbox`
|
|
443
|
+
}
|
|
444
|
+
)
|
|
449
445
|
}),
|
|
450
446
|
...columns,
|
|
451
447
|
columnHelper.display({
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
useProductTableColumns
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-O53E5U52.js";
|
|
4
4
|
import {
|
|
5
5
|
useProductTableFilters
|
|
6
6
|
} from "./chunk-P4LTLPTK.js";
|
|
@@ -31,7 +31,14 @@ import { Children as Children2 } from "react";
|
|
|
31
31
|
|
|
32
32
|
// src/pages/products/product-list/components/product-list-table/product-list-table.tsx
|
|
33
33
|
import { PencilSquare, Trash } from "@medusajs/icons";
|
|
34
|
-
import {
|
|
34
|
+
import {
|
|
35
|
+
Button,
|
|
36
|
+
Checkbox,
|
|
37
|
+
Container,
|
|
38
|
+
Heading,
|
|
39
|
+
toast,
|
|
40
|
+
usePrompt
|
|
41
|
+
} from "@medusajs/ui";
|
|
35
42
|
import { keepPreviousData } from "@tanstack/react-query";
|
|
36
43
|
import { createColumnHelper } from "@tanstack/react-table";
|
|
37
44
|
import { useMemo, useState, Children } from "react";
|
|
@@ -261,6 +268,26 @@ var useColumns = () => {
|
|
|
261
268
|
const base = useProductTableColumns();
|
|
262
269
|
const columns = useMemo(
|
|
263
270
|
() => [
|
|
271
|
+
columnHelper.display({
|
|
272
|
+
id: "select",
|
|
273
|
+
header: ({ table }) => /* @__PURE__ */ jsx(
|
|
274
|
+
Checkbox,
|
|
275
|
+
{
|
|
276
|
+
checked: table.getIsSomePageRowsSelected() ? "indeterminate" : table.getIsAllPageRowsSelected(),
|
|
277
|
+
onCheckedChange: (value) => table.toggleAllPageRowsSelected(!!value),
|
|
278
|
+
"data-testid": "products-table-header-select-checkbox"
|
|
279
|
+
}
|
|
280
|
+
),
|
|
281
|
+
cell: ({ row }) => /* @__PURE__ */ jsx(
|
|
282
|
+
Checkbox,
|
|
283
|
+
{
|
|
284
|
+
checked: row.getIsSelected(),
|
|
285
|
+
onCheckedChange: (value) => row.toggleSelected(!!value),
|
|
286
|
+
onClick: (e) => e.stopPropagation(),
|
|
287
|
+
"data-testid": `products-table-cell-${row.id}-select-checkbox`
|
|
288
|
+
}
|
|
289
|
+
)
|
|
290
|
+
}),
|
|
264
291
|
...base,
|
|
265
292
|
columnHelper.display({
|
|
266
293
|
id: "actions",
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
2
|
CollectionDetailPage
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-R6DVBI5F.js";
|
|
4
4
|
import "./chunk-T2WVIET2.js";
|
|
5
|
-
import "./chunk-
|
|
5
|
+
import "./chunk-O53E5U52.js";
|
|
6
6
|
import "./chunk-WBSUHLO7.js";
|
|
7
7
|
import "./chunk-P4LTLPTK.js";
|
|
8
8
|
import "./chunk-FWPGOIFA.js";
|
|
@@ -20,7 +20,7 @@ import "./chunk-7SVLKK6Q.js";
|
|
|
20
20
|
import "./chunk-GR6JUIRU.js";
|
|
21
21
|
import "./chunk-QUHSHIAC.js";
|
|
22
22
|
import "./chunk-3XOE4NV5.js";
|
|
23
|
-
import "./chunk-
|
|
23
|
+
import "./chunk-GRH7C3QN.js";
|
|
24
24
|
import "./chunk-DY3XQPHC.js";
|
|
25
25
|
import "./chunk-JHIMVLB2.js";
|
|
26
26
|
import "./chunk-P4LTLPTK.js";
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
CustomerDetailPage
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-HMKXCYCJ.js";
|
|
4
4
|
import "./chunk-54EPH67T.js";
|
|
5
5
|
import "./chunk-OI4DJXUL.js";
|
|
6
|
+
import "./chunk-FU3QYH6H.js";
|
|
6
7
|
import "./chunk-QUHSHIAC.js";
|
|
7
8
|
import "./chunk-3XOE4NV5.js";
|
|
8
9
|
import "./chunk-TZSOL34K.js";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
CUSTOMER_GROUP_DETAIL_FIELDS,
|
|
3
3
|
CustomerGroupDetailPage
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-EMW5WXXR.js";
|
|
5
5
|
import "./chunk-QG6PLWNH.js";
|
|
6
6
|
import "./chunk-HGTPUAHD.js";
|
|
7
|
-
import "./chunk-
|
|
7
|
+
import "./chunk-GRH7C3QN.js";
|
|
8
8
|
import "./chunk-25LYVP3C.js";
|
|
9
9
|
import "./chunk-DB6ANJBO.js";
|
|
10
10
|
import "./chunk-PHOCVOZ5.js";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
CustomerListPage
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-5YWQDIVG.js";
|
|
4
4
|
import "./chunk-QG6PLWNH.js";
|
|
5
5
|
import "./chunk-HGTPUAHD.js";
|
|
6
|
-
import "./chunk-
|
|
6
|
+
import "./chunk-GRH7C3QN.js";
|
|
7
7
|
import "./chunk-25LYVP3C.js";
|
|
8
8
|
import "./chunk-DB6ANJBO.js";
|
|
9
9
|
import "./chunk-PHOCVOZ5.js";
|
package/dist/{customers-add-customer-group-PJ24V5YA.js → customers-add-customer-group-56GS7TR7.js}
RENAMED
|
@@ -158,9 +158,10 @@ var AddCustomerGroupsForm = ({
|
|
|
158
158
|
setIsPending(true);
|
|
159
159
|
try {
|
|
160
160
|
await batchCustomerCustomerGroups({ add: data.customer_group_ids });
|
|
161
|
+
const names = data.customer_group_ids.map((id) => customer_groups?.find((g) => g.id === id)?.name).filter(Boolean);
|
|
161
162
|
toast.success(
|
|
162
|
-
t("customers.groups.add.
|
|
163
|
-
groups:
|
|
163
|
+
names.length === 1 ? t("customers.groups.add.successOne", { groups: names[0] }) : t("customers.groups.add.successMany", {
|
|
164
|
+
groups: names.join(", ")
|
|
164
165
|
})
|
|
165
166
|
);
|
|
166
167
|
handleSuccess(`/customers/${customerId}`);
|