@medusajs/dashboard 2.10.4-preview-20250924060154 → 2.10.4-preview-20250924090158
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-BWIP24MA.mjs → add-campaign-promotions-62IIOR5K.mjs} +3 -3
- package/dist/{api-key-management-detail-WGWZQCFC.mjs → api-key-management-detail-TEW653QF.mjs} +1 -1
- package/dist/{api-key-management-sales-channels-H5TVIHTV.mjs → api-key-management-sales-channels-ESGRJKDT.mjs} +1 -1
- package/dist/app.css +0 -3
- package/dist/app.js +3490 -3464
- package/dist/app.mjs +2 -2
- package/dist/{campaign-detail-EJD7LQCW.mjs → campaign-detail-XYLU3HF4.mjs} +3 -3
- package/dist/{chunk-2252SSK6.mjs → chunk-6W7OL4TX.mjs} +1 -1
- package/dist/{chunk-OQPVQGSH.mjs → chunk-7GBCLBMX.mjs} +24 -11
- package/dist/{chunk-YPSSUJUZ.mjs → chunk-HEBATBOH.mjs} +6 -2
- package/dist/{chunk-U2FXUMKA.mjs → chunk-NDNUJ2UK.mjs} +1 -1
- package/dist/{chunk-CAZKNJTG.mjs → chunk-NKM6CHK6.mjs} +30 -30
- package/dist/{chunk-WP5CXGGO.mjs → chunk-TWP4GTKM.mjs} +1 -1
- package/dist/{chunk-V53HAFWH.mjs → chunk-UOEALCPZ.mjs} +1 -1
- package/dist/{chunk-6RWF7BPW.mjs → chunk-V6JXTITD.mjs} +1 -1
- package/dist/{customer-group-list-UTC5ZCJZ.mjs → customer-group-list-6XY7YF5E.mjs} +1 -1
- package/dist/{inventory-detail-BO5E7KXO.mjs → inventory-detail-WI5T47QL.mjs} +1 -1
- package/dist/{location-edit-RNGPJ26L.mjs → location-edit-X6JBEWIF.mjs} +1 -1
- package/dist/location-list-VNEYHAKV.mjs +323 -0
- package/dist/{location-sales-channels-NSXV65ZM.mjs → location-sales-channels-HVZHZMBY.mjs} +1 -1
- package/dist/{order-detail-6XQLJ5TU.mjs → order-detail-CNQ7HP32.mjs} +30 -22
- package/dist/{order-list-OTPVQKU6.mjs → order-list-YWPAJ7FR.mjs} +2 -2
- package/dist/{product-attributes-5PLACMXK.mjs → product-attributes-6ELSX5OH.mjs} +3 -3
- package/dist/{product-create-6FMLIS5X.mjs → product-create-6NWXJ7AY.mjs} +4 -4
- package/dist/{product-detail-2BJJMCCO.mjs → product-detail-G53SUBEP.mjs} +4 -4
- package/dist/{product-edit-N5P7RVNS.mjs → product-edit-ZYUXMIZP.mjs} +3 -3
- package/dist/{product-list-EUQX3NBE.mjs → product-list-R6IDCNRV.mjs} +2 -2
- package/dist/{product-media-XJGAON6B.mjs → product-media-AKHSFDJQ.mjs} +2 -2
- package/dist/{product-organization-FB6BVKKL.mjs → product-organization-J2UYHJ6I.mjs} +3 -3
- package/dist/{product-sales-channels-QBQDLU7Z.mjs → product-sales-channels-UX7AOJIF.mjs} +1 -1
- package/dist/{product-shipping-profile-UZQSV54B.mjs → product-shipping-profile-FN7L2V4X.mjs} +3 -3
- package/dist/{promotion-detail-VB5GZDCC.mjs → promotion-detail-RISSMGU5.mjs} +112 -63
- package/dist/{promotion-list-NAUTWXNU.mjs → promotion-list-UPVSOD6R.mjs} +3 -3
- package/dist/{refund-reason-list-VBHGRLJJ.mjs → refund-reason-list-RGRFZ5DU.mjs} +9 -4
- package/dist/{reset-password-ZCKXQZNQ.mjs → reset-password-AYCPBCKE.mjs} +1 -1
- package/dist/{sales-channel-list-R4HT6A7P.mjs → sales-channel-list-KNLMJ67Q.mjs} +1 -1
- package/dist/{tax-region-create-2GDG36NQ.mjs → tax-region-create-SP46RW2E.mjs} +1 -1
- package/dist/{user-list-TPBPZ7KJ.mjs → user-list-G4H2RSDX.mjs} +1 -1
- package/package.json +9 -9
- package/src/components/data-table/data-table.tsx +64 -46
- package/src/i18n/translations/$schema.json +19 -2
- package/src/i18n/translations/en.json +6 -2
- package/src/routes/locations/location-edit/components/edit-location-form/edit-location-form.tsx +1 -1
- package/src/routes/locations/location-list/index.ts +0 -1
- package/src/routes/locations/location-list/location-list.tsx +52 -14
- package/src/routes/locations/location-list/use-location-list-table-columns.tsx +185 -0
- package/src/routes/locations/location-list/use-location-list-table-query.tsx +22 -0
- package/src/routes/orders/order-detail/components/order-activity-section/order-timeline.tsx +13 -5
- package/src/routes/refund-reasons/refund-reason-list/components/refund-reason-list-table/refund-reason-list-table.tsx +12 -4
- package/dist/chunk-BKJC5BGQ.mjs +0 -53
- package/dist/location-list-NKIOBHG4.mjs +0 -298
- package/src/routes/locations/location-list/components/location-list-header/index.ts +0 -1
- package/src/routes/locations/location-list/components/location-list-header/location-list-header.tsx +0 -21
- package/src/routes/locations/location-list/loader.ts +0 -36
@@ -0,0 +1,323 @@
|
|
1
|
+
import {
|
2
|
+
ListSummary
|
3
|
+
} from "./chunk-I3VB6NM2.mjs";
|
4
|
+
import "./chunk-PYIO3TDQ.mjs";
|
5
|
+
import {
|
6
|
+
PlaceholderCell
|
7
|
+
} from "./chunk-P3UUX2T6.mjs";
|
8
|
+
import {
|
9
|
+
SidebarLink
|
10
|
+
} from "./chunk-HWKLNKOY.mjs";
|
11
|
+
import "./chunk-EQTBJSBZ.mjs";
|
12
|
+
import {
|
13
|
+
getFormattedAddress
|
14
|
+
} from "./chunk-B6ZOPCPA.mjs";
|
15
|
+
import {
|
16
|
+
TwoColumnPage
|
17
|
+
} from "./chunk-GIZFNLKK.mjs";
|
18
|
+
import {
|
19
|
+
DataTable
|
20
|
+
} from "./chunk-7GBCLBMX.mjs";
|
21
|
+
import {
|
22
|
+
useQueryParams
|
23
|
+
} from "./chunk-C76H5USB.mjs";
|
24
|
+
import {
|
25
|
+
useExtension
|
26
|
+
} from "./chunk-C5P5PL3E.mjs";
|
27
|
+
import "./chunk-DG7J63J2.mjs";
|
28
|
+
import "./chunk-RM6NY572.mjs";
|
29
|
+
import "./chunk-OZPB6JBL.mjs";
|
30
|
+
import "./chunk-OC7BQLYI.mjs";
|
31
|
+
import "./chunk-S4DMV3ZT.mjs";
|
32
|
+
import {
|
33
|
+
stockLocationsQueryKeys,
|
34
|
+
useStockLocations
|
35
|
+
} from "./chunk-32IQRUVY.mjs";
|
36
|
+
import "./chunk-KX4P5L3R.mjs";
|
37
|
+
import {
|
38
|
+
queryClient
|
39
|
+
} from "./chunk-FXYH54JP.mjs";
|
40
|
+
import "./chunk-774WSTCC.mjs";
|
41
|
+
import {
|
42
|
+
sdk
|
43
|
+
} from "./chunk-DEQUVHHE.mjs";
|
44
|
+
import "./chunk-RPUOO7AV.mjs";
|
45
|
+
|
46
|
+
// src/routes/locations/location-list/location-list.tsx
|
47
|
+
import { ShoppingBag, TruckFast } from "@medusajs/icons";
|
48
|
+
import { Container, Heading } from "@medusajs/ui";
|
49
|
+
import { useTranslation as useTranslation2 } from "react-i18next";
|
50
|
+
|
51
|
+
// src/routes/locations/location-list/constants.ts
|
52
|
+
var LOCATION_LIST_FIELDS = "name,*sales_channels,*address,*fulfillment_sets,*fulfillment_sets.service_zones,*fulfillment_sets.service_zones.shipping_options,*fulfillment_sets.service_zones.shipping_options.shipping_profile";
|
53
|
+
|
54
|
+
// src/routes/locations/location-list/use-location-list-table-columns.tsx
|
55
|
+
import { PencilSquare, Trash } from "@medusajs/icons";
|
56
|
+
import {
|
57
|
+
createDataTableColumnHelper,
|
58
|
+
StatusBadge,
|
59
|
+
toast,
|
60
|
+
usePrompt
|
61
|
+
} from "@medusajs/ui";
|
62
|
+
import { useTranslation } from "react-i18next";
|
63
|
+
import { useMemo } from "react";
|
64
|
+
import { useNavigate } from "react-router-dom";
|
65
|
+
import { jsx } from "react/jsx-runtime";
|
66
|
+
var columnHelper = createDataTableColumnHelper();
|
67
|
+
var useLocationListTableColumns = () => {
|
68
|
+
const { t } = useTranslation();
|
69
|
+
const navigate = useNavigate();
|
70
|
+
const prompt = usePrompt();
|
71
|
+
const handleDelete = async (location) => {
|
72
|
+
const result = await prompt({
|
73
|
+
title: t("general.areYouSure"),
|
74
|
+
description: t("stockLocations.delete.confirmation", {
|
75
|
+
name: location.name
|
76
|
+
}),
|
77
|
+
confirmText: t("actions.remove"),
|
78
|
+
cancelText: t("actions.cancel")
|
79
|
+
});
|
80
|
+
if (!result) {
|
81
|
+
return;
|
82
|
+
}
|
83
|
+
try {
|
84
|
+
await sdk.admin.stockLocation.delete(location.id);
|
85
|
+
queryClient.invalidateQueries({
|
86
|
+
queryKey: stockLocationsQueryKeys.lists()
|
87
|
+
});
|
88
|
+
queryClient.invalidateQueries({
|
89
|
+
queryKey: stockLocationsQueryKeys.detail(location.id)
|
90
|
+
});
|
91
|
+
toast.success(
|
92
|
+
t("stockLocations.delete.successToast", {
|
93
|
+
name: location.name
|
94
|
+
})
|
95
|
+
);
|
96
|
+
} catch (e) {
|
97
|
+
toast.error(e.message);
|
98
|
+
}
|
99
|
+
};
|
100
|
+
return useMemo(
|
101
|
+
() => [
|
102
|
+
columnHelper.accessor("name", {
|
103
|
+
header: t("fields.name"),
|
104
|
+
cell: ({ getValue }) => {
|
105
|
+
const name = getValue();
|
106
|
+
if (!name) {
|
107
|
+
return /* @__PURE__ */ jsx(PlaceholderCell, {});
|
108
|
+
}
|
109
|
+
return /* @__PURE__ */ jsx("span", { className: "text-ui-fg-subtle text-small truncate", children: name });
|
110
|
+
}
|
111
|
+
}),
|
112
|
+
columnHelper.accessor("address", {
|
113
|
+
header: t("fields.address"),
|
114
|
+
cell: ({ getValue, row }) => {
|
115
|
+
const address = getValue();
|
116
|
+
const location = row.original;
|
117
|
+
if (!address) {
|
118
|
+
return /* @__PURE__ */ jsx(PlaceholderCell, {});
|
119
|
+
}
|
120
|
+
return /* @__PURE__ */ jsx("div", { className: "flex flex-col", children: /* @__PURE__ */ jsx("span", { className: "text-ui-fg-subtle text-small truncate", children: getFormattedAddress({
|
121
|
+
address: location.address
|
122
|
+
}).join(", ") }) });
|
123
|
+
}
|
124
|
+
}),
|
125
|
+
columnHelper.accessor("fulfillment_sets", {
|
126
|
+
id: "shipping_fulfillment",
|
127
|
+
header: t("stockLocations.fulfillmentSets.shipping.header"),
|
128
|
+
cell: ({ getValue }) => {
|
129
|
+
const fulfillmentSets = getValue();
|
130
|
+
const shippingSet = fulfillmentSets?.find(
|
131
|
+
(f) => f.type === "shipping" /* Shipping */
|
132
|
+
);
|
133
|
+
const fulfillmentSetExists = !!shippingSet;
|
134
|
+
return /* @__PURE__ */ jsx(StatusBadge, { color: fulfillmentSetExists ? "green" : "grey", children: t(
|
135
|
+
fulfillmentSetExists ? "statuses.enabled" : "statuses.disabled"
|
136
|
+
) });
|
137
|
+
}
|
138
|
+
}),
|
139
|
+
columnHelper.accessor("fulfillment_sets", {
|
140
|
+
id: "pickup_fulfillment",
|
141
|
+
header: t("stockLocations.fulfillmentSets.pickup.header"),
|
142
|
+
cell: ({ getValue }) => {
|
143
|
+
const fulfillmentSets = getValue();
|
144
|
+
const pickupSet = fulfillmentSets?.find(
|
145
|
+
(f) => f.type === "pickup" /* Pickup */
|
146
|
+
);
|
147
|
+
const fulfillmentSetExists = !!pickupSet;
|
148
|
+
return /* @__PURE__ */ jsx(StatusBadge, { color: fulfillmentSetExists ? "green" : "grey", children: t(
|
149
|
+
fulfillmentSetExists ? "statuses.enabled" : "statuses.disabled"
|
150
|
+
) });
|
151
|
+
}
|
152
|
+
}),
|
153
|
+
columnHelper.accessor("sales_channels", {
|
154
|
+
header: t("stockLocations.salesChannels.label"),
|
155
|
+
cell: ({ getValue }) => {
|
156
|
+
const salesChannels = getValue();
|
157
|
+
if (!salesChannels?.length) {
|
158
|
+
return /* @__PURE__ */ jsx(PlaceholderCell, {});
|
159
|
+
}
|
160
|
+
return /* @__PURE__ */ jsx("div", { className: "flex items-center", children: /* @__PURE__ */ jsx(
|
161
|
+
ListSummary,
|
162
|
+
{
|
163
|
+
inline: true,
|
164
|
+
n: 1,
|
165
|
+
list: salesChannels.map((s) => s.name)
|
166
|
+
}
|
167
|
+
) });
|
168
|
+
}
|
169
|
+
}),
|
170
|
+
columnHelper.action({
|
171
|
+
actions: (ctx) => {
|
172
|
+
const location = ctx.row.original;
|
173
|
+
return [
|
174
|
+
[
|
175
|
+
{
|
176
|
+
icon: /* @__PURE__ */ jsx(PencilSquare, {}),
|
177
|
+
label: t("actions.edit"),
|
178
|
+
onClick: () => {
|
179
|
+
navigate(`/settings/locations/${location.id}/edit`);
|
180
|
+
}
|
181
|
+
}
|
182
|
+
],
|
183
|
+
[
|
184
|
+
{
|
185
|
+
icon: /* @__PURE__ */ jsx(Trash, {}),
|
186
|
+
label: t("actions.delete"),
|
187
|
+
onClick: () => handleDelete(location)
|
188
|
+
}
|
189
|
+
]
|
190
|
+
];
|
191
|
+
}
|
192
|
+
})
|
193
|
+
],
|
194
|
+
[]
|
195
|
+
);
|
196
|
+
};
|
197
|
+
|
198
|
+
// src/routes/locations/location-list/use-location-list-table-query.tsx
|
199
|
+
var useLocationListTableQuery = ({
|
200
|
+
pageSize = 20,
|
201
|
+
prefix
|
202
|
+
}) => {
|
203
|
+
const queryObject = useQueryParams(["order", "offset", "q"], prefix);
|
204
|
+
const { offset, ...rest } = queryObject;
|
205
|
+
const searchParams = {
|
206
|
+
limit: pageSize,
|
207
|
+
offset: offset ? Number(offset) : 0,
|
208
|
+
...rest
|
209
|
+
};
|
210
|
+
return searchParams;
|
211
|
+
};
|
212
|
+
|
213
|
+
// src/routes/locations/location-list/location-list.tsx
|
214
|
+
import { keepPreviousData } from "@tanstack/react-query";
|
215
|
+
import { jsx as jsx2, jsxs } from "react/jsx-runtime";
|
216
|
+
var PAGE_SIZE = 20;
|
217
|
+
var PREFIX = "loc";
|
218
|
+
function LocationList() {
|
219
|
+
const { t } = useTranslation2();
|
220
|
+
const searchParams = useLocationListTableQuery({
|
221
|
+
pageSize: PAGE_SIZE,
|
222
|
+
prefix: PREFIX
|
223
|
+
});
|
224
|
+
const {
|
225
|
+
stock_locations: stockLocations = [],
|
226
|
+
count,
|
227
|
+
isError,
|
228
|
+
error,
|
229
|
+
isLoading
|
230
|
+
} = useStockLocations(
|
231
|
+
{
|
232
|
+
fields: LOCATION_LIST_FIELDS,
|
233
|
+
...searchParams
|
234
|
+
},
|
235
|
+
{
|
236
|
+
placeholderData: keepPreviousData
|
237
|
+
}
|
238
|
+
);
|
239
|
+
const columns = useLocationListTableColumns();
|
240
|
+
const { getWidgets } = useExtension();
|
241
|
+
if (isError) {
|
242
|
+
throw error;
|
243
|
+
}
|
244
|
+
return /* @__PURE__ */ jsxs(
|
245
|
+
TwoColumnPage,
|
246
|
+
{
|
247
|
+
widgets: {
|
248
|
+
after: getWidgets("location.list.after"),
|
249
|
+
before: getWidgets("location.list.before"),
|
250
|
+
sideAfter: getWidgets("location.list.side.after"),
|
251
|
+
sideBefore: getWidgets("location.list.side.before")
|
252
|
+
},
|
253
|
+
showJSON: true,
|
254
|
+
children: [
|
255
|
+
/* @__PURE__ */ jsx2(TwoColumnPage.Main, { children: /* @__PURE__ */ jsx2(Container, { className: "flex flex-col divide-y p-0", children: /* @__PURE__ */ jsx2(
|
256
|
+
DataTable,
|
257
|
+
{
|
258
|
+
data: stockLocations,
|
259
|
+
columns,
|
260
|
+
rowCount: count,
|
261
|
+
pageSize: PAGE_SIZE,
|
262
|
+
getRowId: (row) => row.id,
|
263
|
+
heading: t("stockLocations.domain"),
|
264
|
+
subHeading: t("stockLocations.list.description"),
|
265
|
+
emptyState: {
|
266
|
+
empty: {
|
267
|
+
heading: t("stockLocations.list.noRecordsMessage"),
|
268
|
+
description: t("stockLocations.list.noRecordsMessageEmpty")
|
269
|
+
},
|
270
|
+
filtered: {
|
271
|
+
heading: t("stockLocations.list.noRecordsMessage"),
|
272
|
+
description: t("stockLocations.list.noRecordsMessageFiltered")
|
273
|
+
}
|
274
|
+
},
|
275
|
+
actions: [
|
276
|
+
{
|
277
|
+
label: t("actions.create"),
|
278
|
+
to: "create"
|
279
|
+
}
|
280
|
+
],
|
281
|
+
isLoading,
|
282
|
+
rowHref: (row) => `/settings/locations/${row.id}`,
|
283
|
+
enableSearch: true,
|
284
|
+
prefix: PREFIX,
|
285
|
+
layout: "fill"
|
286
|
+
}
|
287
|
+
) }) }),
|
288
|
+
/* @__PURE__ */ jsx2(TwoColumnPage.Sidebar, { children: /* @__PURE__ */ jsx2(LinksSection, {}) })
|
289
|
+
]
|
290
|
+
}
|
291
|
+
);
|
292
|
+
}
|
293
|
+
var LinksSection = () => {
|
294
|
+
const { t } = useTranslation2();
|
295
|
+
return /* @__PURE__ */ jsxs(Container, { className: "p-0", children: [
|
296
|
+
/* @__PURE__ */ jsx2("div", { className: "flex items-center justify-between px-6 py-4", children: /* @__PURE__ */ jsx2(Heading, { level: "h2", children: t("stockLocations.sidebar.header") }) }),
|
297
|
+
/* @__PURE__ */ jsx2(
|
298
|
+
SidebarLink,
|
299
|
+
{
|
300
|
+
to: "/settings/locations/shipping-profiles",
|
301
|
+
labelKey: t("stockLocations.sidebar.shippingProfiles.label"),
|
302
|
+
descriptionKey: t(
|
303
|
+
"stockLocations.sidebar.shippingProfiles.description"
|
304
|
+
),
|
305
|
+
icon: /* @__PURE__ */ jsx2(ShoppingBag, {})
|
306
|
+
}
|
307
|
+
),
|
308
|
+
/* @__PURE__ */ jsx2(
|
309
|
+
SidebarLink,
|
310
|
+
{
|
311
|
+
to: "/settings/locations/shipping-option-types",
|
312
|
+
labelKey: t("stockLocations.sidebar.shippingOptionTypes.label"),
|
313
|
+
descriptionKey: t(
|
314
|
+
"stockLocations.sidebar.shippingOptionTypes.description"
|
315
|
+
),
|
316
|
+
icon: /* @__PURE__ */ jsx2(TruckFast, {})
|
317
|
+
}
|
318
|
+
)
|
319
|
+
] });
|
320
|
+
};
|
321
|
+
export {
|
322
|
+
LocationList as Component
|
323
|
+
};
|
@@ -495,7 +495,7 @@ import { Container as Container5, Heading as Heading5 } from "@medusajs/ui";
|
|
495
495
|
import { useTranslation as useTranslation8 } from "react-i18next";
|
496
496
|
|
497
497
|
// src/routes/orders/order-detail/components/order-activity-section/order-timeline.tsx
|
498
|
-
import { Button as Button5, Text as Text6, Tooltip, clx, usePrompt } from "@medusajs/ui";
|
498
|
+
import { Button as Button5, Text as Text6, Tooltip, clx, toast as toast5, usePrompt } from "@medusajs/ui";
|
499
499
|
import { Collapsible as RadixCollapsible } from "radix-ui";
|
500
500
|
import { useMemo as useMemo2, useState as useState3 } from "react";
|
501
501
|
import { useTranslation as useTranslation7 } from "react-i18next";
|
@@ -1133,7 +1133,9 @@ var ReturnBody = ({
|
|
1133
1133
|
if (!res) {
|
1134
1134
|
return;
|
1135
1135
|
}
|
1136
|
-
await cancelReturnRequest()
|
1136
|
+
await cancelReturnRequest().catch((error) => {
|
1137
|
+
toast5.error(error.message);
|
1138
|
+
});
|
1137
1139
|
};
|
1138
1140
|
const numberOfItems = orderReturn.items.reduce((acc, item) => {
|
1139
1141
|
return acc + (isReceived ? item.received_quantity : item.quantity);
|
@@ -1175,7 +1177,9 @@ var ClaimBody = ({
|
|
1175
1177
|
if (!res) {
|
1176
1178
|
return;
|
1177
1179
|
}
|
1178
|
-
await cancelClaim()
|
1180
|
+
await cancelClaim().catch((error) => {
|
1181
|
+
toast5.error(error.message);
|
1182
|
+
});
|
1179
1183
|
};
|
1180
1184
|
const outboundItems = (claim.additional_items || []).reduce(
|
1181
1185
|
(acc, item) => acc + item.quantity,
|
@@ -1225,7 +1229,9 @@ var ExchangeBody = ({
|
|
1225
1229
|
if (!res) {
|
1226
1230
|
return;
|
1227
1231
|
}
|
1228
|
-
await cancelExchange()
|
1232
|
+
await cancelExchange().catch((error) => {
|
1233
|
+
toast5.error(error.message);
|
1234
|
+
});
|
1229
1235
|
};
|
1230
1236
|
const outboundItems = (exchange.additional_items || []).reduce(
|
1231
1237
|
(acc, item) => acc + item.quantity,
|
@@ -1294,7 +1300,9 @@ var TransferOrderRequestBody = ({
|
|
1294
1300
|
if (!res) {
|
1295
1301
|
return;
|
1296
1302
|
}
|
1297
|
-
await cancelTransfer()
|
1303
|
+
await cancelTransfer().catch((error) => {
|
1304
|
+
toast5.error(error.message);
|
1305
|
+
});
|
1298
1306
|
};
|
1299
1307
|
return /* @__PURE__ */ jsxs8("div", { children: [
|
1300
1308
|
/* @__PURE__ */ jsxs8(Text6, { size: "small", className: "text-ui-fg-subtle", children: [
|
@@ -1581,7 +1589,7 @@ import {
|
|
1581
1589
|
StatusBadge,
|
1582
1590
|
Text as Text8,
|
1583
1591
|
Tooltip as Tooltip2,
|
1584
|
-
toast as
|
1592
|
+
toast as toast6,
|
1585
1593
|
usePrompt as usePrompt2
|
1586
1594
|
} from "@medusajs/ui";
|
1587
1595
|
import { format } from "date-fns";
|
@@ -1759,21 +1767,21 @@ var Fulfillment = ({
|
|
1759
1767
|
if (res) {
|
1760
1768
|
await markAsDelivered(void 0, {
|
1761
1769
|
onSuccess: () => {
|
1762
|
-
|
1770
|
+
toast6.success(
|
1763
1771
|
t(
|
1764
1772
|
isPickUpFulfillment ? "orders.fulfillment.toast.fulfillmentPickedUp" : "orders.fulfillment.toast.fulfillmentDelivered"
|
1765
1773
|
)
|
1766
1774
|
);
|
1767
1775
|
},
|
1768
1776
|
onError: (e) => {
|
1769
|
-
|
1777
|
+
toast6.error(e.message);
|
1770
1778
|
}
|
1771
1779
|
});
|
1772
1780
|
}
|
1773
1781
|
};
|
1774
1782
|
const handleCancel = async () => {
|
1775
1783
|
if (fulfillment.shipped_at) {
|
1776
|
-
|
1784
|
+
toast6.warning(t("orders.fulfillment.toast.fulfillmentShipped"));
|
1777
1785
|
return;
|
1778
1786
|
}
|
1779
1787
|
const res = await prompt({
|
@@ -1785,10 +1793,10 @@ var Fulfillment = ({
|
|
1785
1793
|
if (res) {
|
1786
1794
|
await mutateAsync(void 0, {
|
1787
1795
|
onSuccess: () => {
|
1788
|
-
|
1796
|
+
toast6.success(t("orders.fulfillment.toast.canceled"));
|
1789
1797
|
},
|
1790
1798
|
onError: (e) => {
|
1791
|
-
|
1799
|
+
toast6.error(e.message);
|
1792
1800
|
}
|
1793
1801
|
});
|
1794
1802
|
}
|
@@ -1912,7 +1920,7 @@ import {
|
|
1912
1920
|
Heading as Heading8,
|
1913
1921
|
StatusBadge as StatusBadge2,
|
1914
1922
|
Text as Text9,
|
1915
|
-
toast as
|
1923
|
+
toast as toast7,
|
1916
1924
|
usePrompt as usePrompt3
|
1917
1925
|
} from "@medusajs/ui";
|
1918
1926
|
import { useTranslation as useTranslation12 } from "react-i18next";
|
@@ -1936,10 +1944,10 @@ var OrderGeneralSection = ({ order }) => {
|
|
1936
1944
|
}
|
1937
1945
|
await cancelOrder(void 0, {
|
1938
1946
|
onSuccess: () => {
|
1939
|
-
|
1947
|
+
toast7.success(t("orders.orderCanceled"));
|
1940
1948
|
},
|
1941
1949
|
onError: (e) => {
|
1942
|
-
|
1950
|
+
toast7.error(e.message);
|
1943
1951
|
}
|
1944
1952
|
});
|
1945
1953
|
};
|
@@ -2014,7 +2022,7 @@ import {
|
|
2014
2022
|
Heading as Heading9,
|
2015
2023
|
StatusBadge as StatusBadge3,
|
2016
2024
|
Text as Text10,
|
2017
|
-
toast as
|
2025
|
+
toast as toast9,
|
2018
2026
|
Tooltip as Tooltip4,
|
2019
2027
|
usePrompt as usePrompt4
|
2020
2028
|
} from "@medusajs/ui";
|
@@ -2025,14 +2033,14 @@ import { Trans, useTranslation as useTranslation14 } from "react-i18next";
|
|
2025
2033
|
import { useTranslation as useTranslation13 } from "react-i18next";
|
2026
2034
|
import { useState as useState4 } from "react";
|
2027
2035
|
import copy from "copy-to-clipboard";
|
2028
|
-
import { clx as clx2, toast as
|
2036
|
+
import { clx as clx2, toast as toast8, Tooltip as Tooltip3 } from "@medusajs/ui";
|
2029
2037
|
import { jsx as jsx13, jsxs as jsxs14 } from "react/jsx-runtime";
|
2030
2038
|
function DisplayId({ id, className }) {
|
2031
2039
|
const { t } = useTranslation13();
|
2032
2040
|
const [open, setOpen] = useState4(false);
|
2033
2041
|
const onClick = () => {
|
2034
2042
|
copy(id);
|
2035
|
-
|
2043
|
+
toast8.success(t("actions.idCopiedToClipboard"));
|
2036
2044
|
};
|
2037
2045
|
return /* @__PURE__ */ jsx13(Tooltip3, { maxWidth: 260, content: id, open, onOpenChange: setOpen, children: /* @__PURE__ */ jsxs14("span", { onClick, className: clx2("cursor-pointer", className), children: [
|
2038
2046
|
"#",
|
@@ -2142,14 +2150,14 @@ var Payment = ({
|
|
2142
2150
|
{ amount: payment.amount },
|
2143
2151
|
{
|
2144
2152
|
onSuccess: () => {
|
2145
|
-
|
2153
|
+
toast9.success(
|
2146
2154
|
t("orders.payment.capturePaymentSuccess", {
|
2147
2155
|
amount: formatCurrency(payment.amount, currencyCode)
|
2148
2156
|
})
|
2149
2157
|
);
|
2150
2158
|
},
|
2151
2159
|
onError: (error) => {
|
2152
|
-
|
2160
|
+
toast9.error(error.message);
|
2153
2161
|
}
|
2154
2162
|
}
|
2155
2163
|
);
|
@@ -2372,7 +2380,7 @@ import {
|
|
2372
2380
|
Heading as Heading10,
|
2373
2381
|
StatusBadge as StatusBadge4,
|
2374
2382
|
Text as Text12,
|
2375
|
-
toast as
|
2383
|
+
toast as toast10,
|
2376
2384
|
Tooltip as Tooltip7,
|
2377
2385
|
usePrompt as usePrompt5
|
2378
2386
|
} from "@medusajs/ui";
|
@@ -2632,7 +2640,7 @@ var OrderSummarySection = ({
|
|
2632
2640
|
{ order_id: order.id },
|
2633
2641
|
{
|
2634
2642
|
onSuccess: () => {
|
2635
|
-
|
2643
|
+
toast10.success(
|
2636
2644
|
t("orders.payment.markAsPaidPaymentSuccess", {
|
2637
2645
|
amount: formatCurrency(
|
2638
2646
|
paymentCollection.amount,
|
@@ -2642,7 +2650,7 @@ var OrderSummarySection = ({
|
|
2642
2650
|
);
|
2643
2651
|
},
|
2644
2652
|
onError: (error) => {
|
2645
|
-
|
2653
|
+
toast10.error(error.message);
|
2646
2654
|
}
|
2647
2655
|
}
|
2648
2656
|
);
|
@@ -9,7 +9,7 @@ import {
|
|
9
9
|
ConfigurableDataTable,
|
10
10
|
createTableAdapter,
|
11
11
|
orderColumnAdapter
|
12
|
-
} from "./chunk-
|
12
|
+
} from "./chunk-V6JXTITD.mjs";
|
13
13
|
import "./chunk-3I6G3NRU.mjs";
|
14
14
|
import "./chunk-SJ3E4T6B.mjs";
|
15
15
|
import "./chunk-INE2QCSC.mjs";
|
@@ -34,7 +34,7 @@ import {
|
|
34
34
|
import {
|
35
35
|
useDataTableDateFilters
|
36
36
|
} from "./chunk-Q33G337Z.mjs";
|
37
|
-
import "./chunk-
|
37
|
+
import "./chunk-7GBCLBMX.mjs";
|
38
38
|
import "./chunk-C76H5USB.mjs";
|
39
39
|
import "./chunk-PFKKVLZX.mjs";
|
40
40
|
import "./chunk-MNXC6Q4F.mjs";
|
@@ -11,17 +11,17 @@ import {
|
|
11
11
|
} from "./chunk-4TC5YS65.mjs";
|
12
12
|
import {
|
13
13
|
PRODUCT_DETAIL_FIELDS
|
14
|
-
} from "./chunk-
|
14
|
+
} from "./chunk-NDNUJ2UK.mjs";
|
15
15
|
import {
|
16
16
|
FormExtensionZone,
|
17
17
|
useExtendableForm
|
18
|
-
} from "./chunk-
|
18
|
+
} from "./chunk-NKM6CHK6.mjs";
|
19
19
|
import "./chunk-NQIC7ZFS.mjs";
|
20
20
|
import "./chunk-ONB3JEHR.mjs";
|
21
21
|
import "./chunk-4GQOUCX6.mjs";
|
22
22
|
import "./chunk-2VTICXJR.mjs";
|
23
23
|
import "./chunk-D3YQN7HV.mjs";
|
24
|
-
import "./chunk-
|
24
|
+
import "./chunk-HEBATBOH.mjs";
|
25
25
|
import "./chunk-MNXC6Q4F.mjs";
|
26
26
|
import {
|
27
27
|
useExtension
|
@@ -25,7 +25,7 @@ import {
|
|
25
25
|
UploadMediaFormItem,
|
26
26
|
decorateVariantsWithDefaultValues,
|
27
27
|
normalizeProductFormValues
|
28
|
-
} from "./chunk-
|
28
|
+
} from "./chunk-TWP4GTKM.mjs";
|
29
29
|
import "./chunk-ZQRKUG6J.mjs";
|
30
30
|
import {
|
31
31
|
DataGrid,
|
@@ -41,7 +41,7 @@ import "./chunk-2D44OO7A.mjs";
|
|
41
41
|
import "./chunk-Q33G337Z.mjs";
|
42
42
|
import {
|
43
43
|
DataTable
|
44
|
-
} from "./chunk-
|
44
|
+
} from "./chunk-7GBCLBMX.mjs";
|
45
45
|
import "./chunk-C76H5USB.mjs";
|
46
46
|
import "./chunk-PFKKVLZX.mjs";
|
47
47
|
import {
|
@@ -61,13 +61,13 @@ import {
|
|
61
61
|
import {
|
62
62
|
FormExtensionZone,
|
63
63
|
useExtendableForm
|
64
|
-
} from "./chunk-
|
64
|
+
} from "./chunk-NKM6CHK6.mjs";
|
65
65
|
import "./chunk-NQIC7ZFS.mjs";
|
66
66
|
import "./chunk-ONB3JEHR.mjs";
|
67
67
|
import "./chunk-4GQOUCX6.mjs";
|
68
68
|
import "./chunk-2VTICXJR.mjs";
|
69
69
|
import "./chunk-D3YQN7HV.mjs";
|
70
|
-
import "./chunk-
|
70
|
+
import "./chunk-HEBATBOH.mjs";
|
71
71
|
import "./chunk-MNXC6Q4F.mjs";
|
72
72
|
import {
|
73
73
|
useExtension
|
@@ -23,21 +23,21 @@ import {
|
|
23
23
|
} from "./chunk-Q33G337Z.mjs";
|
24
24
|
import {
|
25
25
|
DataTable
|
26
|
-
} from "./chunk-
|
26
|
+
} from "./chunk-7GBCLBMX.mjs";
|
27
27
|
import {
|
28
28
|
useQueryParams
|
29
29
|
} from "./chunk-C76H5USB.mjs";
|
30
30
|
import "./chunk-PFKKVLZX.mjs";
|
31
31
|
import {
|
32
32
|
PRODUCT_DETAIL_FIELDS
|
33
|
-
} from "./chunk-
|
34
|
-
import "./chunk-
|
33
|
+
} from "./chunk-NDNUJ2UK.mjs";
|
34
|
+
import "./chunk-NKM6CHK6.mjs";
|
35
35
|
import "./chunk-NQIC7ZFS.mjs";
|
36
36
|
import "./chunk-ONB3JEHR.mjs";
|
37
37
|
import "./chunk-4GQOUCX6.mjs";
|
38
38
|
import "./chunk-2VTICXJR.mjs";
|
39
39
|
import "./chunk-D3YQN7HV.mjs";
|
40
|
-
import "./chunk-
|
40
|
+
import "./chunk-HEBATBOH.mjs";
|
41
41
|
import "./chunk-MNXC6Q4F.mjs";
|
42
42
|
import {
|
43
43
|
useExtension
|
@@ -15,17 +15,17 @@ import {
|
|
15
15
|
} from "./chunk-4TC5YS65.mjs";
|
16
16
|
import {
|
17
17
|
PRODUCT_DETAIL_FIELDS
|
18
|
-
} from "./chunk-
|
18
|
+
} from "./chunk-NDNUJ2UK.mjs";
|
19
19
|
import {
|
20
20
|
FormExtensionZone,
|
21
21
|
useExtendableForm
|
22
|
-
} from "./chunk-
|
22
|
+
} from "./chunk-NKM6CHK6.mjs";
|
23
23
|
import "./chunk-NQIC7ZFS.mjs";
|
24
24
|
import "./chunk-ONB3JEHR.mjs";
|
25
25
|
import "./chunk-4GQOUCX6.mjs";
|
26
26
|
import "./chunk-2VTICXJR.mjs";
|
27
27
|
import "./chunk-D3YQN7HV.mjs";
|
28
|
-
import "./chunk-
|
28
|
+
import "./chunk-HEBATBOH.mjs";
|
29
29
|
import "./chunk-MNXC6Q4F.mjs";
|
30
30
|
import {
|
31
31
|
useExtension
|
@@ -8,7 +8,7 @@ import {
|
|
8
8
|
ConfigurableDataTable,
|
9
9
|
createTableAdapter,
|
10
10
|
productColumnAdapter
|
11
|
-
} from "./chunk-
|
11
|
+
} from "./chunk-V6JXTITD.mjs";
|
12
12
|
import "./chunk-3I6G3NRU.mjs";
|
13
13
|
import "./chunk-SJ3E4T6B.mjs";
|
14
14
|
import "./chunk-INE2QCSC.mjs";
|
@@ -37,7 +37,7 @@ import {
|
|
37
37
|
import {
|
38
38
|
useDataTableDateFilters
|
39
39
|
} from "./chunk-Q33G337Z.mjs";
|
40
|
-
import "./chunk-
|
40
|
+
import "./chunk-7GBCLBMX.mjs";
|
41
41
|
import "./chunk-C76H5USB.mjs";
|
42
42
|
import "./chunk-PFKKVLZX.mjs";
|
43
43
|
import "./chunk-MNXC6Q4F.mjs";
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import {
|
2
2
|
EditProductMediaSchema,
|
3
3
|
UploadMediaFormItem
|
4
|
-
} from "./chunk-
|
4
|
+
} from "./chunk-TWP4GTKM.mjs";
|
5
5
|
import "./chunk-ZQRKUG6J.mjs";
|
6
6
|
import "./chunk-TYTNUPXB.mjs";
|
7
7
|
import "./chunk-6GU6IDUA.mjs";
|
@@ -13,7 +13,7 @@ import {
|
|
13
13
|
RouteFocusModal,
|
14
14
|
useRouteModal
|
15
15
|
} from "./chunk-4TC5YS65.mjs";
|
16
|
-
import "./chunk-
|
16
|
+
import "./chunk-HEBATBOH.mjs";
|
17
17
|
import "./chunk-OBQI23QM.mjs";
|
18
18
|
import {
|
19
19
|
useProduct,
|