@mercurjs/admin 2.0.0-canary.25 → 2.0.0-canary.26
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-X5A7WKYY.js → add-campaign-promotions-TXOODRHB.js} +3 -3
- package/dist/{campaign-detail-EB3YWUZ4.js → campaign-detail-FBUQQL2W.js} +3 -3
- package/dist/{chunk-QHKS4KJD.js → chunk-6NNBZIM7.js} +1 -1
- package/dist/{chunk-OTRIBKDR.js → chunk-RILFAVKM.js} +1 -1
- package/dist/{chunk-AJ3NGFHF.js → chunk-SJKPESDA.js} +1 -1
- package/dist/{chunk-6YX65GK2.js → chunk-TO7KBKHJ.js} +7 -4
- package/dist/index.js +20 -12
- package/dist/{order-edit-billing-address-KJXFFXGU.js → order-edit-billing-address-C7YX7626.js} +1 -1
- package/dist/{product-create-EPSQCKCF.js → product-create-FWHZORNL.js} +2 -2
- package/dist/{product-media-ZOQI3VCU.js → product-media-TGVTQNDO.js} +2 -2
- package/dist/{promotion-detail-NYZ3LEN2.js → promotion-detail-NGOQNJER.js} +2 -2
- package/dist/{promotion-list-FKZNIEIH.js → promotion-list-CV35S2NN.js} +3 -3
- package/dist/{reset-password-5IPTUGLT.js → reset-password-EEDB3CUC.js} +1 -1
- package/dist/{seller-details-YXWRIWG6.js → seller-details-MSDVT5IO.js} +78 -42
- package/dist/seller-edit-RUYGO7CB.js +538 -0
- package/dist/{tax-region-create-ERKECE6G.js → tax-region-create-JNOTV4L4.js} +1 -1
- package/package.json +3 -3
- package/dist/seller-edit-YBHIRTYU.js +0 -316
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
2
|
usePromotionTableColumns,
|
|
3
3
|
usePromotionTableQuery
|
|
4
|
-
} from "./chunk-
|
|
5
|
-
import "./chunk-
|
|
4
|
+
} from "./chunk-SJKPESDA.js";
|
|
5
|
+
import "./chunk-RILFAVKM.js";
|
|
6
6
|
import "./chunk-JHIMVLB2.js";
|
|
7
7
|
import "./chunk-FMFVTERD.js";
|
|
8
8
|
import "./chunk-DB6ANJBO.js";
|
|
@@ -15,7 +15,7 @@ import {
|
|
|
15
15
|
import "./chunk-YBZWO4ZV.js";
|
|
16
16
|
import "./chunk-KAZ5BYTQ.js";
|
|
17
17
|
import "./chunk-3EF54XFY.js";
|
|
18
|
-
import "./chunk-
|
|
18
|
+
import "./chunk-TO7KBKHJ.js";
|
|
19
19
|
import "./chunk-TKGWSUEI.js";
|
|
20
20
|
import {
|
|
21
21
|
KeyboundForm
|
|
@@ -4,8 +4,8 @@ import {
|
|
|
4
4
|
import {
|
|
5
5
|
usePromotionTableColumns,
|
|
6
6
|
usePromotionTableQuery
|
|
7
|
-
} from "./chunk-
|
|
8
|
-
import "./chunk-
|
|
7
|
+
} from "./chunk-SJKPESDA.js";
|
|
8
|
+
import "./chunk-RILFAVKM.js";
|
|
9
9
|
import "./chunk-JHIMVLB2.js";
|
|
10
10
|
import "./chunk-FMFVTERD.js";
|
|
11
11
|
import "./chunk-DB6ANJBO.js";
|
|
@@ -21,7 +21,7 @@ import "./chunk-3EF54XFY.js";
|
|
|
21
21
|
import {
|
|
22
22
|
currencies
|
|
23
23
|
} from "./chunk-IQPN4PZJ.js";
|
|
24
|
-
import "./chunk-
|
|
24
|
+
import "./chunk-TO7KBKHJ.js";
|
|
25
25
|
import {
|
|
26
26
|
usePromotionTableFilters
|
|
27
27
|
} from "./chunk-S2WEYEQR.js";
|
|
@@ -12045,15 +12045,18 @@ var en_default = {
|
|
|
12045
12045
|
domain: "Sellers",
|
|
12046
12046
|
fields: {
|
|
12047
12047
|
name: "Name",
|
|
12048
|
+
handle: "Handle",
|
|
12048
12049
|
email: "Email",
|
|
12049
12050
|
phone: "Phone",
|
|
12050
|
-
|
|
12051
|
+
logo: "Logo",
|
|
12052
|
+
cover_image: "Cover Image",
|
|
12051
12053
|
address: "Address",
|
|
12052
|
-
|
|
12054
|
+
address_1: "Address Line 1",
|
|
12055
|
+
address_2: "Address Line 2",
|
|
12053
12056
|
postal_code: "Postal Code",
|
|
12054
12057
|
city: "City",
|
|
12055
|
-
|
|
12056
|
-
|
|
12058
|
+
province: "Province",
|
|
12059
|
+
country_code: "Country Code"
|
|
12057
12060
|
},
|
|
12058
12061
|
status: {
|
|
12059
12062
|
pending: "Pending",
|
package/dist/index.js
CHANGED
|
@@ -17,7 +17,7 @@ import {
|
|
|
17
17
|
} from "./chunk-WIYFXWRI.js";
|
|
18
18
|
import {
|
|
19
19
|
I18n
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-TO7KBKHJ.js";
|
|
21
21
|
import "./chunk-TKGWSUEI.js";
|
|
22
22
|
import {
|
|
23
23
|
KeyboundForm
|
|
@@ -3047,7 +3047,7 @@ function getRouteMap({
|
|
|
3047
3047
|
children: [
|
|
3048
3048
|
{
|
|
3049
3049
|
path: "create",
|
|
3050
|
-
lazy: () => import("./product-create-
|
|
3050
|
+
lazy: () => import("./product-create-FWHZORNL.js")
|
|
3051
3051
|
},
|
|
3052
3052
|
{
|
|
3053
3053
|
path: "import",
|
|
@@ -3103,7 +3103,7 @@ function getRouteMap({
|
|
|
3103
3103
|
},
|
|
3104
3104
|
{
|
|
3105
3105
|
path: "media",
|
|
3106
|
-
lazy: () => import("./product-media-
|
|
3106
|
+
lazy: () => import("./product-media-TGVTQNDO.js")
|
|
3107
3107
|
},
|
|
3108
3108
|
{
|
|
3109
3109
|
path: "prices",
|
|
@@ -3294,7 +3294,7 @@ function getRouteMap({
|
|
|
3294
3294
|
},
|
|
3295
3295
|
{
|
|
3296
3296
|
path: "billing-address",
|
|
3297
|
-
lazy: () => import("./order-edit-billing-address-
|
|
3297
|
+
lazy: () => import("./order-edit-billing-address-C7YX7626.js")
|
|
3298
3298
|
},
|
|
3299
3299
|
{
|
|
3300
3300
|
path: "metadata/edit",
|
|
@@ -3313,7 +3313,7 @@ function getRouteMap({
|
|
|
3313
3313
|
children: [
|
|
3314
3314
|
{
|
|
3315
3315
|
path: "",
|
|
3316
|
-
lazy: () => import("./promotion-list-
|
|
3316
|
+
lazy: () => import("./promotion-list-CV35S2NN.js")
|
|
3317
3317
|
},
|
|
3318
3318
|
{
|
|
3319
3319
|
path: "create",
|
|
@@ -3322,7 +3322,7 @@ function getRouteMap({
|
|
|
3322
3322
|
{
|
|
3323
3323
|
path: ":id",
|
|
3324
3324
|
lazy: async () => {
|
|
3325
|
-
const { Component, Breadcrumb, loader } = await import("./promotion-detail-
|
|
3325
|
+
const { Component, Breadcrumb, loader } = await import("./promotion-detail-NGOQNJER.js");
|
|
3326
3326
|
return {
|
|
3327
3327
|
Component,
|
|
3328
3328
|
loader,
|
|
@@ -3367,7 +3367,7 @@ function getRouteMap({
|
|
|
3367
3367
|
{
|
|
3368
3368
|
path: ":id",
|
|
3369
3369
|
lazy: async () => {
|
|
3370
|
-
const { Component, Breadcrumb, loader } = await import("./campaign-detail-
|
|
3370
|
+
const { Component, Breadcrumb, loader } = await import("./campaign-detail-FBUQQL2W.js");
|
|
3371
3371
|
return {
|
|
3372
3372
|
Component,
|
|
3373
3373
|
loader,
|
|
@@ -3391,7 +3391,7 @@ function getRouteMap({
|
|
|
3391
3391
|
},
|
|
3392
3392
|
{
|
|
3393
3393
|
path: "add-promotions",
|
|
3394
|
-
lazy: () => import("./add-campaign-promotions-
|
|
3394
|
+
lazy: () => import("./add-campaign-promotions-TXOODRHB.js")
|
|
3395
3395
|
}
|
|
3396
3396
|
]
|
|
3397
3397
|
}
|
|
@@ -3606,11 +3606,19 @@ function getRouteMap({
|
|
|
3606
3606
|
},
|
|
3607
3607
|
{
|
|
3608
3608
|
path: ":id",
|
|
3609
|
-
lazy: () =>
|
|
3609
|
+
lazy: async () => {
|
|
3610
|
+
const { Component, Breadcrumb } = await import("./seller-details-MSDVT5IO.js");
|
|
3611
|
+
return {
|
|
3612
|
+
Component,
|
|
3613
|
+
handle: {
|
|
3614
|
+
breadcrumb: (match) => /* @__PURE__ */ jsx15(Breadcrumb, { ...match })
|
|
3615
|
+
}
|
|
3616
|
+
};
|
|
3617
|
+
},
|
|
3610
3618
|
children: [
|
|
3611
3619
|
{
|
|
3612
3620
|
path: "edit",
|
|
3613
|
-
lazy: () => import("./seller-edit-
|
|
3621
|
+
lazy: () => import("./seller-edit-RUYGO7CB.js")
|
|
3614
3622
|
}
|
|
3615
3623
|
]
|
|
3616
3624
|
}
|
|
@@ -4295,7 +4303,7 @@ function getRouteMap({
|
|
|
4295
4303
|
children: [
|
|
4296
4304
|
{
|
|
4297
4305
|
path: "create",
|
|
4298
|
-
lazy: () => import("./tax-region-create-
|
|
4306
|
+
lazy: () => import("./tax-region-create-JNOTV4L4.js")
|
|
4299
4307
|
}
|
|
4300
4308
|
]
|
|
4301
4309
|
},
|
|
@@ -4455,7 +4463,7 @@ function getRouteMap({
|
|
|
4455
4463
|
},
|
|
4456
4464
|
{
|
|
4457
4465
|
path: "/reset-password",
|
|
4458
|
-
lazy: () => import("./reset-password-
|
|
4466
|
+
lazy: () => import("./reset-password-EEDB3CUC.js")
|
|
4459
4467
|
},
|
|
4460
4468
|
{
|
|
4461
4469
|
path: "/invite",
|
|
@@ -31,7 +31,7 @@ import {
|
|
|
31
31
|
UploadMediaFormItem,
|
|
32
32
|
decorateVariantsWithDefaultValues,
|
|
33
33
|
normalizeProductFormValues
|
|
34
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-6NNBZIM7.js";
|
|
35
35
|
import "./chunk-IZ5RG5XI.js";
|
|
36
36
|
import {
|
|
37
37
|
DataGrid,
|
|
@@ -40,7 +40,7 @@ import {
|
|
|
40
40
|
} from "./chunk-KUWNYCGL.js";
|
|
41
41
|
import "./chunk-IQPN4PZJ.js";
|
|
42
42
|
import "./chunk-SMQT3ZNO.js";
|
|
43
|
-
import "./chunk-
|
|
43
|
+
import "./chunk-TO7KBKHJ.js";
|
|
44
44
|
import "./chunk-TKGWSUEI.js";
|
|
45
45
|
import {
|
|
46
46
|
KeyboundForm
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
EditProductMediaSchema,
|
|
3
3
|
UploadMediaFormItem
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-6NNBZIM7.js";
|
|
5
5
|
import "./chunk-IZ5RG5XI.js";
|
|
6
6
|
import "./chunk-SMQT3ZNO.js";
|
|
7
|
-
import "./chunk-
|
|
7
|
+
import "./chunk-TO7KBKHJ.js";
|
|
8
8
|
import "./chunk-TKGWSUEI.js";
|
|
9
9
|
import {
|
|
10
10
|
KeyboundForm
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
} from "./chunk-RK5N3XIX.js";
|
|
4
4
|
import {
|
|
5
5
|
getPromotionStatus
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-RILFAVKM.js";
|
|
7
7
|
import {
|
|
8
8
|
formatPercentage
|
|
9
9
|
} from "./chunk-QDPLZDMX.js";
|
|
@@ -14,7 +14,7 @@ import "./chunk-FMFVTERD.js";
|
|
|
14
14
|
import {
|
|
15
15
|
NoRecords
|
|
16
16
|
} from "./chunk-3EF54XFY.js";
|
|
17
|
-
import "./chunk-
|
|
17
|
+
import "./chunk-TO7KBKHJ.js";
|
|
18
18
|
import {
|
|
19
19
|
TwoColumnPage
|
|
20
20
|
} from "./chunk-U2UCL2VG.js";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
2
|
usePromotionTableColumns,
|
|
3
3
|
usePromotionTableQuery
|
|
4
|
-
} from "./chunk-
|
|
5
|
-
import "./chunk-
|
|
4
|
+
} from "./chunk-SJKPESDA.js";
|
|
5
|
+
import "./chunk-RILFAVKM.js";
|
|
6
6
|
import "./chunk-JHIMVLB2.js";
|
|
7
7
|
import "./chunk-FMFVTERD.js";
|
|
8
8
|
import "./chunk-DB6ANJBO.js";
|
|
@@ -15,7 +15,7 @@ import {
|
|
|
15
15
|
import "./chunk-YBZWO4ZV.js";
|
|
16
16
|
import "./chunk-KAZ5BYTQ.js";
|
|
17
17
|
import "./chunk-3EF54XFY.js";
|
|
18
|
-
import "./chunk-
|
|
18
|
+
import "./chunk-TO7KBKHJ.js";
|
|
19
19
|
import {
|
|
20
20
|
usePromotionTableFilters
|
|
21
21
|
} from "./chunk-S2WEYEQR.js";
|
|
@@ -110,6 +110,19 @@ import {
|
|
|
110
110
|
__toESM
|
|
111
111
|
} from "./chunk-NBMM2TZK.js";
|
|
112
112
|
|
|
113
|
+
// src/pages/sellers/seller-details/breadcrumb.tsx
|
|
114
|
+
import { jsx } from "react/jsx-runtime";
|
|
115
|
+
var SellerDetailBreadcrumb = (props) => {
|
|
116
|
+
const { id } = props.params || {};
|
|
117
|
+
const { seller } = useSeller(id, void 0, {
|
|
118
|
+
enabled: Boolean(id)
|
|
119
|
+
});
|
|
120
|
+
if (!seller) {
|
|
121
|
+
return null;
|
|
122
|
+
}
|
|
123
|
+
return /* @__PURE__ */ jsx("span", { children: seller.name || seller.email });
|
|
124
|
+
};
|
|
125
|
+
|
|
113
126
|
// src/pages/sellers/seller-details/components/seller-details.tsx
|
|
114
127
|
import { useParams } from "react-router-dom";
|
|
115
128
|
|
|
@@ -125,7 +138,7 @@ import {
|
|
|
125
138
|
} from "@medusajs/ui";
|
|
126
139
|
import { useTranslation } from "react-i18next";
|
|
127
140
|
var import_types = __toESM(require_dist(), 1);
|
|
128
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
141
|
+
import { jsx as jsx2, jsxs } from "react/jsx-runtime";
|
|
129
142
|
var statusColorMap = {
|
|
130
143
|
[import_types.SellerStatus.PENDING]: "orange",
|
|
131
144
|
[import_types.SellerStatus.ACTIVE]: "green",
|
|
@@ -174,10 +187,20 @@ var SellerGeneralSection = ({
|
|
|
174
187
|
};
|
|
175
188
|
return /* @__PURE__ */ jsxs(Container, { className: "divide-y p-0", children: [
|
|
176
189
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between px-6 py-4", children: [
|
|
177
|
-
/* @__PURE__ */
|
|
190
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-x-3", children: [
|
|
191
|
+
seller.logo ? /* @__PURE__ */ jsx2(
|
|
192
|
+
"img",
|
|
193
|
+
{
|
|
194
|
+
src: seller.logo,
|
|
195
|
+
alt: seller.name,
|
|
196
|
+
className: "h-10 w-10 rounded-lg object-cover"
|
|
197
|
+
}
|
|
198
|
+
) : /* @__PURE__ */ jsx2("div", { className: "bg-ui-bg-component flex h-10 w-10 items-center justify-center rounded-lg border", children: /* @__PURE__ */ jsx2(User, { className: "text-ui-fg-subtle" }) }),
|
|
199
|
+
/* @__PURE__ */ jsx2(Heading, { children: seller.name || seller.email })
|
|
200
|
+
] }),
|
|
178
201
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-x-2", children: [
|
|
179
|
-
/* @__PURE__ */
|
|
180
|
-
/* @__PURE__ */
|
|
202
|
+
/* @__PURE__ */ jsx2(StatusBadge, { color: statusColor, children: statusText }),
|
|
203
|
+
/* @__PURE__ */ jsx2(
|
|
181
204
|
ActionMenu,
|
|
182
205
|
{
|
|
183
206
|
groups: [
|
|
@@ -186,7 +209,7 @@ var SellerGeneralSection = ({
|
|
|
186
209
|
{
|
|
187
210
|
label: t("actions.edit"),
|
|
188
211
|
to: `/sellers/${seller.id}/edit`,
|
|
189
|
-
icon: /* @__PURE__ */
|
|
212
|
+
icon: /* @__PURE__ */ jsx2(PencilSquare, {})
|
|
190
213
|
}
|
|
191
214
|
]
|
|
192
215
|
},
|
|
@@ -195,7 +218,7 @@ var SellerGeneralSection = ({
|
|
|
195
218
|
{
|
|
196
219
|
label: seller.status === import_types.SellerStatus.SUSPENDED ? "Activate account" : "Suspend account",
|
|
197
220
|
onClick: handleSuspend,
|
|
198
|
-
icon: /* @__PURE__ */
|
|
221
|
+
icon: /* @__PURE__ */ jsx2(User, {})
|
|
199
222
|
}
|
|
200
223
|
]
|
|
201
224
|
}
|
|
@@ -205,32 +228,44 @@ var SellerGeneralSection = ({
|
|
|
205
228
|
] })
|
|
206
229
|
] }),
|
|
207
230
|
/* @__PURE__ */ jsxs("div", { className: "text-ui-fg-subtle grid grid-cols-2 items-center px-6 py-4", children: [
|
|
208
|
-
/* @__PURE__ */
|
|
209
|
-
/* @__PURE__ */
|
|
231
|
+
/* @__PURE__ */ jsx2(Text, { size: "small", leading: "compact", weight: "plus", children: t("sellers.fields.name") }),
|
|
232
|
+
/* @__PURE__ */ jsx2(Text, { size: "small", leading: "compact", children: seller.name || "-" })
|
|
233
|
+
] }),
|
|
234
|
+
/* @__PURE__ */ jsxs("div", { className: "text-ui-fg-subtle grid grid-cols-2 items-center px-6 py-4", children: [
|
|
235
|
+
/* @__PURE__ */ jsx2(Text, { size: "small", leading: "compact", weight: "plus", children: t("sellers.fields.handle") }),
|
|
236
|
+
/* @__PURE__ */ jsx2(Text, { size: "small", leading: "compact", children: seller.handle || "-" })
|
|
210
237
|
] }),
|
|
211
238
|
/* @__PURE__ */ jsxs("div", { className: "text-ui-fg-subtle grid grid-cols-2 items-center px-6 py-4", children: [
|
|
212
|
-
/* @__PURE__ */
|
|
213
|
-
/* @__PURE__ */
|
|
239
|
+
/* @__PURE__ */ jsx2(Text, { size: "small", leading: "compact", weight: "plus", children: t("sellers.fields.email") }),
|
|
240
|
+
/* @__PURE__ */ jsx2(Text, { size: "small", leading: "compact", children: seller.email || "-" })
|
|
214
241
|
] }),
|
|
215
242
|
/* @__PURE__ */ jsxs("div", { className: "text-ui-fg-subtle grid grid-cols-2 items-center px-6 py-4", children: [
|
|
216
|
-
/* @__PURE__ */
|
|
217
|
-
/* @__PURE__ */
|
|
243
|
+
/* @__PURE__ */ jsx2(Text, { size: "small", leading: "compact", weight: "plus", children: t("sellers.fields.phone") }),
|
|
244
|
+
/* @__PURE__ */ jsx2(Text, { size: "small", leading: "compact", children: seller.phone || "-" })
|
|
218
245
|
] }),
|
|
219
246
|
/* @__PURE__ */ jsxs("div", { className: "text-ui-fg-subtle grid grid-cols-2 items-center px-6 py-4", children: [
|
|
220
|
-
/* @__PURE__ */
|
|
221
|
-
/* @__PURE__ */
|
|
247
|
+
/* @__PURE__ */ jsx2(Text, { size: "small", leading: "compact", weight: "plus", children: t("sellers.fields.address_1") }),
|
|
248
|
+
/* @__PURE__ */ jsx2(Text, { size: "small", leading: "compact", children: seller.address_1 || "-" })
|
|
222
249
|
] }),
|
|
223
250
|
/* @__PURE__ */ jsxs("div", { className: "text-ui-fg-subtle grid grid-cols-2 items-center px-6 py-4", children: [
|
|
224
|
-
/* @__PURE__ */
|
|
225
|
-
/* @__PURE__ */
|
|
251
|
+
/* @__PURE__ */ jsx2(Text, { size: "small", leading: "compact", weight: "plus", children: t("sellers.fields.address_2") }),
|
|
252
|
+
/* @__PURE__ */ jsx2(Text, { size: "small", leading: "compact", children: seller.address_2 || "-" })
|
|
226
253
|
] }),
|
|
227
254
|
/* @__PURE__ */ jsxs("div", { className: "text-ui-fg-subtle grid grid-cols-2 items-center px-6 py-4", children: [
|
|
228
|
-
/* @__PURE__ */
|
|
229
|
-
/* @__PURE__ */
|
|
255
|
+
/* @__PURE__ */ jsx2(Text, { size: "small", leading: "compact", weight: "plus", children: t("sellers.fields.city") }),
|
|
256
|
+
/* @__PURE__ */ jsx2(Text, { size: "small", leading: "compact", children: seller.city || "-" })
|
|
230
257
|
] }),
|
|
231
258
|
/* @__PURE__ */ jsxs("div", { className: "text-ui-fg-subtle grid grid-cols-2 items-center px-6 py-4", children: [
|
|
232
|
-
/* @__PURE__ */
|
|
233
|
-
/* @__PURE__ */
|
|
259
|
+
/* @__PURE__ */ jsx2(Text, { size: "small", leading: "compact", weight: "plus", children: t("sellers.fields.province") }),
|
|
260
|
+
/* @__PURE__ */ jsx2(Text, { size: "small", leading: "compact", children: seller.province || "-" })
|
|
261
|
+
] }),
|
|
262
|
+
/* @__PURE__ */ jsxs("div", { className: "text-ui-fg-subtle grid grid-cols-2 items-center px-6 py-4", children: [
|
|
263
|
+
/* @__PURE__ */ jsx2(Text, { size: "small", leading: "compact", weight: "plus", children: t("sellers.fields.postal_code") }),
|
|
264
|
+
/* @__PURE__ */ jsx2(Text, { size: "small", leading: "compact", children: seller.postal_code || "-" })
|
|
265
|
+
] }),
|
|
266
|
+
/* @__PURE__ */ jsxs("div", { className: "text-ui-fg-subtle grid grid-cols-2 items-center px-6 py-4", children: [
|
|
267
|
+
/* @__PURE__ */ jsx2(Text, { size: "small", leading: "compact", weight: "plus", children: t("sellers.fields.country_code") }),
|
|
268
|
+
/* @__PURE__ */ jsx2(Text, { size: "small", leading: "compact", children: seller.country_code || "-" })
|
|
234
269
|
] })
|
|
235
270
|
] });
|
|
236
271
|
};
|
|
@@ -241,7 +276,7 @@ import { Badge, Container as Container2, Heading as Heading2 } from "@medusajs/u
|
|
|
241
276
|
import { keepPreviousData } from "@tanstack/react-query";
|
|
242
277
|
import { createColumnHelper } from "@tanstack/react-table";
|
|
243
278
|
import { useTranslation as useTranslation2 } from "react-i18next";
|
|
244
|
-
import { jsx as
|
|
279
|
+
import { jsx as jsx3, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
245
280
|
var PAGE_SIZE = 10;
|
|
246
281
|
var PREFIX = "selord";
|
|
247
282
|
var DEFAULT_FIELDS = "id,status,display_id,created_at,email,fulfillment_status,payment_status,total,currency_code,*customer";
|
|
@@ -319,8 +354,8 @@ var SellerOrderSection = () => {
|
|
|
319
354
|
throw error;
|
|
320
355
|
}
|
|
321
356
|
return /* @__PURE__ */ jsxs2(Container2, { className: "divide-y p-0", children: [
|
|
322
|
-
/* @__PURE__ */
|
|
323
|
-
/* @__PURE__ */
|
|
357
|
+
/* @__PURE__ */ jsx3("div", { className: "flex items-center justify-between px-6 py-4", children: /* @__PURE__ */ jsx3(Heading2, { level: "h2", children: t("orders.domain") }) }),
|
|
358
|
+
/* @__PURE__ */ jsx3(
|
|
324
359
|
_DataTable,
|
|
325
360
|
{
|
|
326
361
|
columns,
|
|
@@ -355,7 +390,7 @@ var useColumns = () => {
|
|
|
355
390
|
columnHelper.display({
|
|
356
391
|
id: "created_at",
|
|
357
392
|
header: "Date",
|
|
358
|
-
cell: ({ row }) => /* @__PURE__ */
|
|
393
|
+
cell: ({ row }) => /* @__PURE__ */ jsx3(DateCell, { date: row.original.created_at })
|
|
359
394
|
}),
|
|
360
395
|
columnHelper.display({
|
|
361
396
|
id: "customer",
|
|
@@ -367,7 +402,7 @@ var useColumns = () => {
|
|
|
367
402
|
columnHelper.display({
|
|
368
403
|
id: "status",
|
|
369
404
|
header: "Order Status",
|
|
370
|
-
cell: ({ row }) => /* @__PURE__ */
|
|
405
|
+
cell: ({ row }) => /* @__PURE__ */ jsx3(
|
|
371
406
|
Badge,
|
|
372
407
|
{
|
|
373
408
|
size: "2xsmall",
|
|
@@ -382,7 +417,7 @@ var useColumns = () => {
|
|
|
382
417
|
cell: ({ row }) => {
|
|
383
418
|
const status = row.original?.payment_status;
|
|
384
419
|
if (!status) return "-";
|
|
385
|
-
return /* @__PURE__ */
|
|
420
|
+
return /* @__PURE__ */ jsx3(
|
|
386
421
|
Badge,
|
|
387
422
|
{
|
|
388
423
|
size: "2xsmall",
|
|
@@ -398,7 +433,7 @@ var useColumns = () => {
|
|
|
398
433
|
cell: ({ row }) => {
|
|
399
434
|
const status = row.original.fulfillment_status;
|
|
400
435
|
if (!status) return "-";
|
|
401
|
-
return /* @__PURE__ */
|
|
436
|
+
return /* @__PURE__ */ jsx3(
|
|
402
437
|
Badge,
|
|
403
438
|
{
|
|
404
439
|
size: "2xsmall",
|
|
@@ -419,7 +454,7 @@ var useColumns = () => {
|
|
|
419
454
|
row.original.total,
|
|
420
455
|
row.original.currency_code
|
|
421
456
|
);
|
|
422
|
-
return /* @__PURE__ */
|
|
457
|
+
return /* @__PURE__ */ jsx3("div", { className: "flex h-full w-full items-center justify-start overflow-hidden text-left", children: /* @__PURE__ */ jsx3("span", { className: "truncate", children: formatted }) });
|
|
423
458
|
}
|
|
424
459
|
})
|
|
425
460
|
],
|
|
@@ -434,7 +469,7 @@ import { Container as Container3, Heading as Heading3, toast as toast2, usePromp
|
|
|
434
469
|
import { keepPreviousData as keepPreviousData2 } from "@tanstack/react-query";
|
|
435
470
|
import { createColumnHelper as createColumnHelper2 } from "@tanstack/react-table";
|
|
436
471
|
import { useTranslation as useTranslation3 } from "react-i18next";
|
|
437
|
-
import { jsx as
|
|
472
|
+
import { jsx as jsx4, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
438
473
|
var PAGE_SIZE2 = 10;
|
|
439
474
|
var PREFIX2 = "selprod";
|
|
440
475
|
var DEFAULT_FIELDS2 = "*collection,+type_id,+tag_id,+sales_channel_id,+status,+created_at,+updated_at";
|
|
@@ -467,8 +502,8 @@ var SellerProductSection = () => {
|
|
|
467
502
|
throw error;
|
|
468
503
|
}
|
|
469
504
|
return /* @__PURE__ */ jsxs3(Container3, { className: "divide-y p-0", children: [
|
|
470
|
-
/* @__PURE__ */
|
|
471
|
-
/* @__PURE__ */
|
|
505
|
+
/* @__PURE__ */ jsx4("div", { className: "flex items-center justify-between px-6 py-4", children: /* @__PURE__ */ jsx4(Heading3, { level: "h2", children: t("products.domain") }) }),
|
|
506
|
+
/* @__PURE__ */ jsx4(
|
|
472
507
|
_DataTable,
|
|
473
508
|
{
|
|
474
509
|
columns,
|
|
@@ -532,8 +567,8 @@ var useColumns2 = () => {
|
|
|
532
567
|
header: "Product",
|
|
533
568
|
cell: ({ row }) => {
|
|
534
569
|
return /* @__PURE__ */ jsxs3("div", { className: "flex h-full w-full max-w-[250px] items-center gap-x-3 overflow-hidden", children: [
|
|
535
|
-
/* @__PURE__ */
|
|
536
|
-
/* @__PURE__ */
|
|
570
|
+
/* @__PURE__ */ jsx4("div", { className: "w-fit flex-shrink-0", children: /* @__PURE__ */ jsx4(Thumbnail, { src: row.original.thumbnail }) }),
|
|
571
|
+
/* @__PURE__ */ jsx4("span", { title: row.original.title, className: "truncate", children: row.original.title })
|
|
537
572
|
] });
|
|
538
573
|
}
|
|
539
574
|
}),
|
|
@@ -556,12 +591,12 @@ var useColumns2 = () => {
|
|
|
556
591
|
columnHelper2.display({
|
|
557
592
|
id: "status",
|
|
558
593
|
header: "Status",
|
|
559
|
-
cell: ({ row }) => /* @__PURE__ */
|
|
594
|
+
cell: ({ row }) => /* @__PURE__ */ jsx4(ProductStatusCell, { status: row.original.status })
|
|
560
595
|
}),
|
|
561
596
|
columnHelper2.display({
|
|
562
597
|
id: "actions",
|
|
563
598
|
header: "",
|
|
564
|
-
cell: ({ row }) => /* @__PURE__ */
|
|
599
|
+
cell: ({ row }) => /* @__PURE__ */ jsx4(
|
|
565
600
|
ActionMenu,
|
|
566
601
|
{
|
|
567
602
|
groups: [
|
|
@@ -570,7 +605,7 @@ var useColumns2 = () => {
|
|
|
570
605
|
{
|
|
571
606
|
label: t("actions.edit"),
|
|
572
607
|
to: `/products/${row.original.id}/edit`,
|
|
573
|
-
icon: /* @__PURE__ */
|
|
608
|
+
icon: /* @__PURE__ */ jsx4(PencilSquare2, {})
|
|
574
609
|
}
|
|
575
610
|
]
|
|
576
611
|
},
|
|
@@ -579,7 +614,7 @@ var useColumns2 = () => {
|
|
|
579
614
|
{
|
|
580
615
|
label: t("actions.delete"),
|
|
581
616
|
onClick: () => handleDelete(row.original),
|
|
582
|
-
icon: /* @__PURE__ */
|
|
617
|
+
icon: /* @__PURE__ */ jsx4(Trash, {})
|
|
583
618
|
}
|
|
584
619
|
]
|
|
585
620
|
}
|
|
@@ -593,12 +628,12 @@ var useColumns2 = () => {
|
|
|
593
628
|
};
|
|
594
629
|
|
|
595
630
|
// src/pages/sellers/seller-details/components/seller-details.tsx
|
|
596
|
-
import { jsx as
|
|
631
|
+
import { jsx as jsx5, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
597
632
|
var SellerDetails = () => {
|
|
598
633
|
const { id } = useParams();
|
|
599
634
|
const { seller, isLoading, isError, error } = useSeller(id);
|
|
600
635
|
if (isLoading || !seller) {
|
|
601
|
-
return /* @__PURE__ */
|
|
636
|
+
return /* @__PURE__ */ jsx5(SingleColumnPageSkeleton, { sections: 2, showJSON: true, showMetadata: true });
|
|
602
637
|
}
|
|
603
638
|
if (isError) {
|
|
604
639
|
throw error;
|
|
@@ -611,13 +646,14 @@ var SellerDetails = () => {
|
|
|
611
646
|
showJSON: true,
|
|
612
647
|
showMetadata: true,
|
|
613
648
|
children: [
|
|
614
|
-
/* @__PURE__ */
|
|
615
|
-
/* @__PURE__ */
|
|
616
|
-
/* @__PURE__ */
|
|
649
|
+
/* @__PURE__ */ jsx5(SellerGeneralSection, { seller }),
|
|
650
|
+
/* @__PURE__ */ jsx5(SellerOrderSection, {}),
|
|
651
|
+
/* @__PURE__ */ jsx5(SellerProductSection, {})
|
|
617
652
|
]
|
|
618
653
|
}
|
|
619
654
|
);
|
|
620
655
|
};
|
|
621
656
|
export {
|
|
657
|
+
SellerDetailBreadcrumb as Breadcrumb,
|
|
622
658
|
SellerDetails as Component
|
|
623
659
|
};
|