@mercurjs/vendor 2.0.2 → 2.1.0-canary.4
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/{[id]-TLZZ53G7.js → [id]-2HRWUMSJ.js} +2 -2
- package/dist/{[id]-DCCF7277.js → [id]-57VYN5YF.js} +2 -3
- package/dist/{[id]-UAOAQVEM.js → [id]-FWI6NCSF.js} +3 -4
- package/dist/{[id]-6WYSWXWC.js → [id]-IQNYVYZU.js} +1 -2
- package/dist/{[id]-LZPT5Y55.js → [id]-KCUHMQWF.js} +1 -2
- package/dist/{[id]-PHS2WYFX.js → [id]-LCMQBEOS.js} +2 -3
- package/dist/{[id]-OGHRZ2VY.js → [id]-LJJPLKJ6.js} +5 -4
- package/dist/{[id]-VKG2WEIR.js → [id]-M3PNP527.js} +1 -2
- package/dist/{[id]-EJAHMOOE.js → [id]-MZOT4GAO.js} +2 -3
- package/dist/{[id]-ENTJSLN2.js → [id]-RKEN7EEY.js} +3 -3
- package/dist/{[province_id]-XGA44S7P.js → [province_id]-2MRNXHKU.js} +1 -2
- package/dist/{add-7ZTE42IE.js → add-BVR3LDPH.js} +2 -2
- package/dist/{add-AKC7LTK3.js → add-W7ATBCKS.js} +2 -3
- package/dist/{add-customer-groups-BRC3DKQ2.js → add-customer-groups-ZZVSJJH3.js} +1 -2
- package/dist/{add-products-ZSULNZVI.js → add-products-PINICUAZ.js} +2 -3
- package/dist/{add-promotions-TNFVT5ST.js → add-promotions-2DFXTDEJ.js} +3 -3
- package/dist/{address-3DSJESKM.js → address-RNB2WQPM.js} +1 -2
- package/dist/{breadcrumb-ZMVHXCOX.js → breadcrumb-A3XUO3R2.js} +2 -3
- package/dist/{breadcrumb-UH7FAYU2.js → breadcrumb-MPXARU5F.js} +1 -2
- package/dist/{breadcrumb-D6QNYOAO.js → breadcrumb-Q5KJBAPD.js} +1 -2
- package/dist/{chunk-JRT2U4UI.js → chunk-2DUMXTKS.js} +107 -18
- package/dist/{chunk-CUMY2VZ5.js → chunk-5LKZCG77.js} +1 -96
- package/dist/{chunk-RV5UTYBG.js → chunk-EQQ3BLQ3.js} +2 -2
- package/dist/{chunk-RMBCBXWD.js → chunk-GQFNE5VL.js} +1 -1
- package/dist/chunk-HFRHHT36.js +98 -0
- package/dist/{chunk-O7E4KQAK.js → chunk-HFW7IIO2.js} +1 -1
- package/dist/{chunk-T7LEJIIM.js → chunk-PT3UQCSN.js} +1 -1
- package/dist/{chunk-LA6XSPQG.js → chunk-QDSNLU6X.js} +287 -309
- package/dist/chunk-TLE6YHGH.js +26 -0
- package/dist/{chunk-ASEVHHCT.js → chunk-UDG47AEE.js} +1 -1
- package/dist/{chunk-573EQEW2.js → chunk-V4SZIX7Q.js} +1 -1
- package/dist/{chunk-7XC7ZRG7.js → chunk-VTHSHOX4.js} +1 -1
- package/dist/{chunk-XZG2HZYW.js → chunk-WFE6CT6M.js} +1 -1
- package/dist/{chunk-N2WKLVUX.js → chunk-XF3W2U3Q.js} +1 -1
- package/dist/{chunk-NYRRRCJS.js → chunk-ZCJ737TR.js} +66 -21
- package/dist/{chunk-FNG7ZA7N.js → chunk-ZCUUV464.js} +1 -1
- package/dist/{collections-2M4RFH4P.js → collections-NNFGWUTW.js} +2 -3
- package/dist/{create-6IRE6AMF.js → create-2BPTTXLB.js} +8 -7
- package/dist/{create-D4F457BD.js → create-GCSVAMEH.js} +1 -2
- package/dist/{create-2TUWGQ2D.js → create-N3WNCW7U.js} +1 -2
- package/dist/{create-QK2SSLZK.js → create-T73PSKIV.js} +3 -4
- package/dist/{create-OF2OZ7EI.js → create-TXBY6W3X.js} +1 -2
- package/dist/{create-IFMEEHN4.js → create-VPG7P53M.js} +2 -3
- package/dist/{create-YITFTHMA.js → create-WY4KXB66.js} +1 -2
- package/dist/{create-3WUTLUJO.js → create-YCOR6HY3.js} +1 -2
- package/dist/{edit-SGEECDCR.js → edit-2QUFOE5S.js} +1 -2
- package/dist/{edit-Z7EZRPUP.js → edit-A5ZBINLU.js} +1 -1
- package/dist/{edit-QRJIWTU2.js → edit-B245OLC7.js} +1 -2
- package/dist/{edit-PIE7Y73J.js → edit-CPVFMQEI.js} +3 -4
- package/dist/{edit-ONSN756P.js → edit-CZOV6HBW.js} +1 -1
- package/dist/{edit-J5SC7GHQ.js → edit-KWSXWWOA.js} +1 -2
- package/dist/{edit-ZEIL7EQW.js → edit-QYKH2ZZA.js} +1 -2
- package/dist/{edit-UQAQVEUI.js → edit-U5VL2UQY.js} +4 -5
- package/dist/{edit-stocks-and-prices-543AYFDJ.js → edit-stocks-and-prices-Y233WVZ3.js} +1 -2
- package/dist/{fulfillment-5LNFBSBS.js → fulfillment-FBF3MITY.js} +1 -2
- package/dist/{fulfillment-providers-U7Z7QMOQ.js → fulfillment-providers-Y2YOREHX.js} +2 -3
- package/dist/index.css +32 -26
- package/dist/index.js +86 -87
- package/dist/invite-G7WOO5RZ.js +368 -0
- package/dist/{invite-SI2KIPWI.js → invite-Y2TACGCW.js} +3 -5
- package/dist/{login-QDS5UXKV.js → login-JU7R2RNN.js} +1 -2
- package/dist/{media-RDXCLPKQ.js → media-TXY3WBR3.js} +2 -2
- package/dist/{metadata-7JKDCVYY.js → metadata-7RA6MXW7.js} +1 -2
- package/dist/{metadata-ZV5RYLKR.js → metadata-GSBDSRNM.js} +1 -2
- package/dist/{metadata-X4UIPNL6.js → metadata-JXRXW6UQ.js} +1 -2
- package/dist/{metadata-W5XIPFVU.js → metadata-QM4UGMX5.js} +1 -2
- package/dist/{metadata-UKBRUFH2.js → metadata-RODKLIDO.js} +1 -2
- package/dist/onboarding-VF7EQAAA.js +893 -0
- package/dist/{orders-IAL3JNPU.js → orders-HKUVFCTQ.js} +2 -3
- package/dist/pages/index.d.ts +140 -140
- package/dist/pages/index.js +14 -13
- package/dist/{payment-details-ATUYMVJX.js → payment-details-VWR2S32W.js} +1 -2
- package/dist/{pricing-RBESFX5P.js → pricing-6UZ6SXIE.js} +1 -2
- package/dist/{product-tags-W4BL6RWV.js → product-tags-YXVFIPGQ.js} +3 -4
- package/dist/{product-variant-detail-KU5OCL7E.js → product-variant-detail-O2NOUFFC.js} +1 -2
- package/dist/{products-3VVYJUH7.js → products-3NIIOQBB.js} +2 -3
- package/dist/{products-YYLVCOOY.js → products-Z6MD665K.js} +10 -9
- package/dist/{professional-details-6Y5K6GBL.js → professional-details-SJ4AF5TM.js} +1 -2
- package/dist/{promotions-NBJTFP6N.js → promotions-PJABWGCP.js} +4 -4
- package/dist/{register-ZLE6MNPF.js → register-PSBM4NCS.js} +3 -4
- package/dist/{reset-password-PLCDLFL4.js → reset-password-4RE5TXQ5.js} +1 -1
- package/dist/{sales-channels-UIDLFCX6.js → sales-channels-2OVI6RTV.js} +3 -2
- package/dist/{sales-channels-UWPEFKAO.js → sales-channels-BKOYQXVC.js} +3 -2
- package/dist/{settings-5MNWE5CR.js → settings-F6KJREHK.js} +3 -4
- package/dist/{shipping-profiles-O7XB2DTE.js → shipping-profiles-AQMJSXDB.js} +1 -2
- package/dist/{stock-VJAAYYW5.js → stock-4G4WQIR7.js} +1 -2
- package/dist/{stock-2CGEFBXO.js → stock-NJADHNRP.js} +1 -2
- package/dist/{store-ZBSMNWFT.js → store-HJGETE33.js} +225 -105
- package/dist/{store-closure-43FK32AQ.js → store-closure-QPK4LBBZ.js} +35 -19
- package/dist/{store-select-Q2HE572R.js → store-select-XS2APMBI.js} +1 -2
- package/dist/{team-ZLZJJWIY.js → team-DZ5CV3LG.js} +1 -2
- package/package.json +5 -5
- package/dist/chunk-STBCWNZQ.js +0 -57
- package/dist/invite-P6HTOEIV.js +0 -301
- package/dist/onboarding-DLIBZRKE.js +0 -873
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
require_dist
|
|
3
3
|
} from "./chunk-ZZO3INVE.js";
|
|
4
|
-
import {
|
|
5
|
-
DateRangeDisplay
|
|
6
|
-
} from "./chunk-BWGPN6XV.js";
|
|
7
4
|
import {
|
|
8
5
|
getStylizedAmount
|
|
9
6
|
} from "./chunk-PXYDR7WQ.js";
|
|
7
|
+
import {
|
|
8
|
+
NoRecords
|
|
9
|
+
} from "./chunk-3EF54XFY.js";
|
|
10
10
|
import {
|
|
11
11
|
currencies
|
|
12
12
|
} from "./chunk-IQPN4PZJ.js";
|
|
@@ -16,14 +16,20 @@ import {
|
|
|
16
16
|
import {
|
|
17
17
|
TwoColumnPage
|
|
18
18
|
} from "./chunk-RM5RSDYP.js";
|
|
19
|
-
import
|
|
19
|
+
import {
|
|
20
|
+
DataTable
|
|
21
|
+
} from "./chunk-5LKZCG77.js";
|
|
22
|
+
import "./chunk-THHRRYRS.js";
|
|
23
|
+
import {
|
|
24
|
+
useDate
|
|
25
|
+
} from "./chunk-LRD242C7.js";
|
|
20
26
|
import {
|
|
21
27
|
membersQueryKeys,
|
|
22
28
|
subscriptionQueryKeys,
|
|
23
29
|
useMe,
|
|
24
|
-
useSubscription
|
|
25
|
-
|
|
26
|
-
|
|
30
|
+
useSubscription,
|
|
31
|
+
useUpdateSeller
|
|
32
|
+
} from "./chunk-ZCJ737TR.js";
|
|
27
33
|
import "./chunk-F4OJN2F2.js";
|
|
28
34
|
import "./chunk-LRARA622.js";
|
|
29
35
|
import "./chunk-M6N4ISXL.js";
|
|
@@ -66,8 +72,10 @@ import {
|
|
|
66
72
|
|
|
67
73
|
// src/pages/settings/store/store-detail-page.tsx
|
|
68
74
|
import { Children as Children3 } from "react";
|
|
69
|
-
import {
|
|
75
|
+
import { InformationCircleSolid } from "@medusajs/icons";
|
|
76
|
+
import { Alert, Button, Container as Container7, Heading as Heading7, Text as Text7 } from "@medusajs/ui";
|
|
70
77
|
import { useTranslation as useTranslation8 } from "react-i18next";
|
|
78
|
+
import components from "virtual:mercur/components";
|
|
71
79
|
var import_types2 = __toESM(require_dist(), 1);
|
|
72
80
|
|
|
73
81
|
// src/pages/settings/store/_components/store-address-section.tsx
|
|
@@ -108,68 +116,157 @@ var StoreAddressSection = ({ seller }) => {
|
|
|
108
116
|
}
|
|
109
117
|
)
|
|
110
118
|
] }),
|
|
111
|
-
/* @__PURE__ */ jsx("div", { className: "flex flex-col gap-2 px-2 pb-2", children: /* @__PURE__ */ jsx("div", { className: "px-4 pb-2", children: /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-4", children: [
|
|
119
|
+
formattedAddress ? /* @__PURE__ */ jsx("div", { className: "flex flex-col gap-2 px-2 pb-2", children: /* @__PURE__ */ jsx("div", { className: "px-4 pb-2", children: /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-4", children: [
|
|
112
120
|
/* @__PURE__ */ jsx(IconAvatar, { size: "large", variant: "squared", children: /* @__PURE__ */ jsx(BuildingStorefront, {}) }),
|
|
113
121
|
/* @__PURE__ */ jsxs("div", { className: "flex flex-1 flex-col", children: [
|
|
114
|
-
/* @__PURE__ */ jsx(Text, { size: "small", leading: "compact", weight: "plus", children: [address?.first_name, address?.last_name].filter(Boolean).join(" ") ||
|
|
122
|
+
/* @__PURE__ */ jsx(Text, { size: "small", leading: "compact", weight: "plus", children: [address?.first_name, address?.last_name].filter(Boolean).join(" ") || address?.company || formattedAddress }),
|
|
115
123
|
/* @__PURE__ */ jsx(
|
|
116
124
|
Text,
|
|
117
125
|
{
|
|
118
126
|
size: "small",
|
|
119
127
|
leading: "compact",
|
|
120
128
|
className: "text-ui-fg-subtle",
|
|
121
|
-
children: formattedAddress
|
|
129
|
+
children: formattedAddress
|
|
122
130
|
}
|
|
123
131
|
)
|
|
124
132
|
] })
|
|
125
|
-
] }) }) })
|
|
133
|
+
] }) }) }) : /* @__PURE__ */ jsxs("div", { className: "flex flex-col items-center gap-y-1 pb-6 pt-2", children: [
|
|
134
|
+
/* @__PURE__ */ jsx(Text, { size: "small", leading: "compact", weight: "plus", children: t("store.address.empty.title") }),
|
|
135
|
+
/* @__PURE__ */ jsx(Text, { size: "small", className: "text-ui-fg-muted", children: t("store.address.empty.message") })
|
|
136
|
+
] })
|
|
126
137
|
] });
|
|
127
138
|
};
|
|
128
139
|
|
|
129
|
-
// src/pages/settings/store/_components/store-
|
|
130
|
-
import { PencilSquare as PencilSquare2 } from "@medusajs/icons";
|
|
131
|
-
import {
|
|
140
|
+
// src/pages/settings/store/_components/store-time-off-section.tsx
|
|
141
|
+
import { CalendarMini, EllipsisHorizontal, PencilSquare as PencilSquare2, Trash } from "@medusajs/icons";
|
|
142
|
+
import {
|
|
143
|
+
Container as Container2,
|
|
144
|
+
DropdownMenu,
|
|
145
|
+
Heading as Heading2,
|
|
146
|
+
IconButton,
|
|
147
|
+
toast,
|
|
148
|
+
usePrompt
|
|
149
|
+
} from "@medusajs/ui";
|
|
150
|
+
import { useMemo } from "react";
|
|
132
151
|
import { useTranslation as useTranslation2 } from "react-i18next";
|
|
152
|
+
import { Link } from "react-router-dom";
|
|
133
153
|
import { jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
134
|
-
var
|
|
135
|
-
seller
|
|
136
|
-
}) => {
|
|
154
|
+
var StoreTimeOffSection = ({ seller }) => {
|
|
137
155
|
const { t } = useTranslation2();
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
156
|
+
const { getFullDate } = useDate();
|
|
157
|
+
const prompt = usePrompt();
|
|
158
|
+
const { mutateAsync: updateSeller } = useUpdateSeller(seller.id);
|
|
159
|
+
const data = useMemo(() => {
|
|
160
|
+
if (!seller.closed_from) return [];
|
|
161
|
+
return [
|
|
162
|
+
{
|
|
163
|
+
id: "closure",
|
|
164
|
+
closed_from: new Date(seller.closed_from),
|
|
165
|
+
closed_to: seller.closed_to ? new Date(seller.closed_to) : null,
|
|
166
|
+
note: seller.closure_note ?? null
|
|
167
|
+
}
|
|
168
|
+
];
|
|
169
|
+
}, [seller.closed_from, seller.closed_to, seller.closure_note]);
|
|
170
|
+
const handleDelete = async () => {
|
|
171
|
+
const confirmed = await prompt({
|
|
172
|
+
title: t("store.timeOff.deleteConfirm.title"),
|
|
173
|
+
description: t("store.timeOff.deleteConfirm.description"),
|
|
174
|
+
confirmText: t("actions.delete"),
|
|
175
|
+
cancelText: t("actions.cancel")
|
|
176
|
+
});
|
|
177
|
+
if (!confirmed) return;
|
|
178
|
+
await updateSeller(
|
|
179
|
+
{ closed_from: null, closed_to: null, closure_note: null },
|
|
180
|
+
{
|
|
181
|
+
onSuccess: () => {
|
|
182
|
+
toast.success(t("store.timeOff.deleteSuccess"));
|
|
183
|
+
},
|
|
184
|
+
onError: (error) => {
|
|
185
|
+
toast.error(error.message);
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
);
|
|
189
|
+
};
|
|
190
|
+
const columns = useMemo(
|
|
191
|
+
() => [
|
|
192
|
+
{
|
|
193
|
+
id: "closed_from",
|
|
194
|
+
header: t("store.timeOff.columns.firstDay"),
|
|
195
|
+
accessorFn: (row) => getFullDate({ date: row.closed_from })
|
|
196
|
+
},
|
|
197
|
+
{
|
|
198
|
+
id: "closed_to",
|
|
199
|
+
header: t("store.timeOff.columns.lastDay"),
|
|
200
|
+
accessorFn: (row) => row.closed_to ? getFullDate({ date: row.closed_to }) : "-"
|
|
201
|
+
},
|
|
202
|
+
{
|
|
203
|
+
id: "note",
|
|
204
|
+
header: t("store.timeOff.columns.note"),
|
|
205
|
+
accessorFn: (row) => row.note || "-"
|
|
206
|
+
},
|
|
207
|
+
{
|
|
208
|
+
id: "actions",
|
|
209
|
+
header: "",
|
|
210
|
+
cell: () => /* @__PURE__ */ jsx2("div", { className: "flex justify-end", children: /* @__PURE__ */ jsxs2(DropdownMenu, { children: [
|
|
211
|
+
/* @__PURE__ */ jsx2(DropdownMenu.Trigger, { asChild: true, children: /* @__PURE__ */ jsx2(IconButton, { variant: "transparent", size: "small", children: /* @__PURE__ */ jsx2(EllipsisHorizontal, {}) }) }),
|
|
212
|
+
/* @__PURE__ */ jsxs2(DropdownMenu.Content, { children: [
|
|
213
|
+
/* @__PURE__ */ jsx2(DropdownMenu.Item, { asChild: true, children: /* @__PURE__ */ jsxs2(Link, { to: "store-closure", children: [
|
|
214
|
+
/* @__PURE__ */ jsx2(PencilSquare2, { className: "mr-2" }),
|
|
215
|
+
t("actions.edit")
|
|
216
|
+
] }) }),
|
|
217
|
+
/* @__PURE__ */ jsx2(DropdownMenu.Separator, {}),
|
|
218
|
+
/* @__PURE__ */ jsxs2(DropdownMenu.Item, { onClick: handleDelete, children: [
|
|
219
|
+
/* @__PURE__ */ jsx2(Trash, { className: "mr-2" }),
|
|
220
|
+
t("actions.delete")
|
|
221
|
+
] })
|
|
222
|
+
] })
|
|
223
|
+
] }) }),
|
|
224
|
+
meta: {
|
|
225
|
+
className: "w-[1%]"
|
|
226
|
+
}
|
|
227
|
+
}
|
|
228
|
+
],
|
|
229
|
+
[t, getFullDate, handleDelete]
|
|
230
|
+
);
|
|
231
|
+
if (data.length === 0) {
|
|
232
|
+
return /* @__PURE__ */ jsxs2(Container2, { className: "flex flex-col overflow-hidden p-0", children: [
|
|
233
|
+
/* @__PURE__ */ jsx2("div", { className: "flex items-center justify-between px-6 py-4", children: /* @__PURE__ */ jsx2(Heading2, { level: "h2", children: t("store.timeOff.header") }) }),
|
|
141
234
|
/* @__PURE__ */ jsx2(
|
|
142
|
-
|
|
235
|
+
NoRecords,
|
|
143
236
|
{
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
]
|
|
153
|
-
}
|
|
154
|
-
]
|
|
237
|
+
icon: /* @__PURE__ */ jsx2(CalendarMini, { className: "text-ui-fg-subtle" }),
|
|
238
|
+
title: t("store.timeOff.empty.title"),
|
|
239
|
+
message: t("store.timeOff.empty.message"),
|
|
240
|
+
action: {
|
|
241
|
+
to: "store-closure",
|
|
242
|
+
label: t("store.timeOff.empty.action")
|
|
243
|
+
},
|
|
244
|
+
className: "h-[300px]"
|
|
155
245
|
}
|
|
156
246
|
)
|
|
157
|
-
] })
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
247
|
+
] });
|
|
248
|
+
}
|
|
249
|
+
return /* @__PURE__ */ jsx2(Container2, { className: "flex flex-col overflow-hidden p-0", children: /* @__PURE__ */ jsx2(
|
|
250
|
+
DataTable,
|
|
251
|
+
{
|
|
252
|
+
data,
|
|
253
|
+
columns,
|
|
254
|
+
getRowId: (row) => row.id,
|
|
255
|
+
rowCount: data.length,
|
|
256
|
+
heading: t("store.timeOff.header"),
|
|
257
|
+
enableSearch: false,
|
|
258
|
+
enablePagination: false,
|
|
259
|
+
action: {
|
|
260
|
+
to: "store-closure",
|
|
261
|
+
label: t("actions.create")
|
|
164
262
|
}
|
|
165
|
-
|
|
166
|
-
|
|
263
|
+
}
|
|
264
|
+
) });
|
|
167
265
|
};
|
|
168
266
|
|
|
169
267
|
// src/pages/settings/store/_components/store-general-section.tsx
|
|
170
268
|
import { Children as Children2 } from "react";
|
|
171
|
-
import {
|
|
172
|
-
import { Badge, Container as Container3, Text as Text2 } from "@medusajs/ui";
|
|
269
|
+
import { Badge, Container as Container3, Text as Text3 } from "@medusajs/ui";
|
|
173
270
|
import { useTranslation as useTranslation4 } from "react-i18next";
|
|
174
271
|
|
|
175
272
|
// src/pages/settings/store/_components/store-detail-header.tsx
|
|
@@ -274,38 +371,52 @@ var StoreGeneralSection = ({
|
|
|
274
371
|
alt: seller.name,
|
|
275
372
|
className: "h-full w-full object-cover"
|
|
276
373
|
}
|
|
277
|
-
) : /* @__PURE__ */ jsx4(
|
|
374
|
+
) : /* @__PURE__ */ jsx4(
|
|
375
|
+
"div",
|
|
376
|
+
{
|
|
377
|
+
className: "h-full w-full",
|
|
378
|
+
style: {
|
|
379
|
+
background: `repeating-linear-gradient(
|
|
380
|
+
-45deg,
|
|
381
|
+
transparent,
|
|
382
|
+
transparent 10px,
|
|
383
|
+
rgba(255,255,255,0.5) 10px,
|
|
384
|
+
rgba(255,255,255,0.5) 20px
|
|
385
|
+
)`
|
|
386
|
+
}
|
|
387
|
+
}
|
|
388
|
+
) }),
|
|
278
389
|
/* @__PURE__ */ jsx4(StoreDetailHeader, { seller }),
|
|
279
390
|
/* @__PURE__ */ jsxs4("div", { className: "text-ui-fg-subtle grid grid-cols-2 px-6 py-4", children: [
|
|
280
|
-
/* @__PURE__ */ jsx4(
|
|
281
|
-
/* @__PURE__ */ jsx4(
|
|
391
|
+
/* @__PURE__ */ jsx4(Text3, { size: "small", leading: "compact", weight: "plus", children: t("fields.description") }),
|
|
392
|
+
/* @__PURE__ */ jsx4(Text3, { size: "small", leading: "compact", children: seller.description || "-" })
|
|
282
393
|
] }),
|
|
283
394
|
/* @__PURE__ */ jsxs4("div", { className: "text-ui-fg-subtle grid grid-cols-2 px-6 py-4", children: [
|
|
284
|
-
/* @__PURE__ */ jsx4(
|
|
285
|
-
/* @__PURE__ */ jsx4(
|
|
395
|
+
/* @__PURE__ */ jsx4(Text3, { size: "small", leading: "compact", weight: "plus", children: t("fields.handle") }),
|
|
396
|
+
/* @__PURE__ */ jsx4(Text3, { size: "small", leading: "compact", children: seller.handle ? `/${seller.handle}` : "-" })
|
|
286
397
|
] }),
|
|
287
398
|
/* @__PURE__ */ jsxs4("div", { className: "text-ui-fg-subtle grid grid-cols-2 px-6 py-4", children: [
|
|
288
|
-
/* @__PURE__ */ jsx4(
|
|
289
|
-
/* @__PURE__ */ jsx4(
|
|
399
|
+
/* @__PURE__ */ jsx4(Text3, { size: "small", leading: "compact", weight: "plus", children: t("fields.email") }),
|
|
400
|
+
/* @__PURE__ */ jsx4(Text3, { size: "small", leading: "compact", children: seller.email || "-" })
|
|
290
401
|
] }),
|
|
291
402
|
/* @__PURE__ */ jsxs4("div", { className: "text-ui-fg-subtle grid grid-cols-2 px-6 py-4", children: [
|
|
292
|
-
/* @__PURE__ */ jsx4(
|
|
293
|
-
/* @__PURE__ */ jsx4(
|
|
403
|
+
/* @__PURE__ */ jsx4(Text3, { size: "small", leading: "compact", weight: "plus", children: t("fields.website") }),
|
|
404
|
+
/* @__PURE__ */ jsx4(Text3, { size: "small", leading: "compact", children: seller.website_url || "-" })
|
|
294
405
|
] }),
|
|
295
406
|
/* @__PURE__ */ jsxs4("div", { className: "text-ui-fg-subtle grid grid-cols-2 px-6 py-4", children: [
|
|
296
|
-
/* @__PURE__ */ jsx4(
|
|
407
|
+
/* @__PURE__ */ jsx4(Text3, { size: "small", leading: "compact", weight: "plus", children: t("fields.currency") }),
|
|
297
408
|
/* @__PURE__ */ jsxs4("div", { className: "flex items-center gap-x-2", children: [
|
|
298
409
|
/* @__PURE__ */ jsx4(Badge, { size: "2xsmall", children: seller.currency_code?.toUpperCase() }),
|
|
299
|
-
/* @__PURE__ */ jsx4(
|
|
410
|
+
/* @__PURE__ */ jsx4(Text3, { size: "small", leading: "compact", children: currencies[seller.currency_code?.toUpperCase()]?.name || "-" })
|
|
300
411
|
] })
|
|
301
412
|
] }),
|
|
302
413
|
/* @__PURE__ */ jsxs4("div", { className: "text-ui-fg-subtle grid grid-cols-2 items-center px-6 py-4", children: [
|
|
303
|
-
/* @__PURE__ */ jsx4(
|
|
304
|
-
/* @__PURE__ */ jsx4(
|
|
414
|
+
/* @__PURE__ */ jsx4(Text3, { size: "small", leading: "compact", weight: "plus", children: t("fields.premium") }),
|
|
415
|
+
/* @__PURE__ */ jsx4(Text3, { size: "small", leading: "compact", children: seller.is_premium ? t("general.yes") : t("general.no") })
|
|
305
416
|
] }),
|
|
306
417
|
/* @__PURE__ */ jsxs4("div", { className: "text-ui-fg-subtle grid grid-cols-2 items-center px-6 py-4", children: [
|
|
307
|
-
/* @__PURE__ */ jsx4(
|
|
308
|
-
/* @__PURE__ */ jsx4(
|
|
418
|
+
/* @__PURE__ */ jsx4(Text3, { size: "small", leading: "compact", weight: "plus", children: t("fields.createdAt") }),
|
|
419
|
+
/* @__PURE__ */ jsx4(Text3, { size: "small", leading: "compact", children: new Date(seller.created_at).toLocaleDateString(void 0, {
|
|
309
420
|
year: "numeric",
|
|
310
421
|
month: "long",
|
|
311
422
|
day: "numeric"
|
|
@@ -316,7 +427,7 @@ var StoreGeneralSection = ({
|
|
|
316
427
|
|
|
317
428
|
// src/pages/settings/store/_components/store-subscription-section.tsx
|
|
318
429
|
import { CurrencyDollar } from "@medusajs/icons";
|
|
319
|
-
import { Container as Container4, Heading as Heading4, Text as
|
|
430
|
+
import { Container as Container4, Heading as Heading4, Text as Text4 } from "@medusajs/ui";
|
|
320
431
|
import { useTranslation as useTranslation5 } from "react-i18next";
|
|
321
432
|
import { jsx as jsx5, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
322
433
|
var StoreSubscriptionSection = ({
|
|
@@ -333,9 +444,9 @@ var StoreSubscriptionSection = ({
|
|
|
333
444
|
/* @__PURE__ */ jsx5("div", { className: "flex flex-col gap-2 px-2 pb-2", children: /* @__PURE__ */ jsx5("div", { className: "px-4 pb-2", children: /* @__PURE__ */ jsxs5("div", { className: "flex items-center gap-4", children: [
|
|
334
445
|
/* @__PURE__ */ jsx5(IconAvatar, { size: "large", variant: "squared", children: /* @__PURE__ */ jsx5(CurrencyDollar, {}) }),
|
|
335
446
|
/* @__PURE__ */ jsxs5("div", { className: "flex flex-1 flex-col", children: [
|
|
336
|
-
/* @__PURE__ */ jsx5(
|
|
447
|
+
/* @__PURE__ */ jsx5(Text4, { size: "small", leading: "compact", weight: "plus", children: subscription_plan.currency_code?.toUpperCase() }),
|
|
337
448
|
/* @__PURE__ */ jsxs5(
|
|
338
|
-
|
|
449
|
+
Text4,
|
|
339
450
|
{
|
|
340
451
|
size: "small",
|
|
341
452
|
leading: "compact",
|
|
@@ -357,7 +468,7 @@ var StoreSubscriptionSection = ({
|
|
|
357
468
|
|
|
358
469
|
// src/pages/settings/store/_components/store-payment-details-section.tsx
|
|
359
470
|
import { CreditCard, PencilSquare as PencilSquare4 } from "@medusajs/icons";
|
|
360
|
-
import { Container as Container5, Heading as Heading5, Text as
|
|
471
|
+
import { Container as Container5, Heading as Heading5, Text as Text5 } from "@medusajs/ui";
|
|
361
472
|
import { useTranslation as useTranslation6 } from "react-i18next";
|
|
362
473
|
import { jsx as jsx6, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
363
474
|
var StorePaymentDetailsSection = ({
|
|
@@ -388,12 +499,12 @@ var StorePaymentDetailsSection = ({
|
|
|
388
499
|
}
|
|
389
500
|
)
|
|
390
501
|
] }),
|
|
391
|
-
/* @__PURE__ */ jsx6("div", { className: "flex flex-col gap-2 px-2 pb-2", children: /* @__PURE__ */ jsx6("div", { className: "px-4 pb-2", children: /* @__PURE__ */ jsxs6("div", { className: "flex items-center gap-4", children: [
|
|
502
|
+
details ? /* @__PURE__ */ jsx6("div", { className: "flex flex-col gap-2 px-2 pb-2", children: /* @__PURE__ */ jsx6("div", { className: "px-4 pb-2", children: /* @__PURE__ */ jsxs6("div", { className: "flex items-center gap-4", children: [
|
|
392
503
|
/* @__PURE__ */ jsx6(IconAvatar, { size: "large", variant: "squared", children: /* @__PURE__ */ jsx6(CreditCard, {}) }),
|
|
393
504
|
/* @__PURE__ */ jsxs6("div", { className: "flex flex-1 flex-col", children: [
|
|
394
|
-
/* @__PURE__ */ jsx6(
|
|
505
|
+
/* @__PURE__ */ jsx6(Text5, { size: "small", leading: "compact", weight: "plus", children: details.holder_name || "-" }),
|
|
395
506
|
/* @__PURE__ */ jsx6(
|
|
396
|
-
|
|
507
|
+
Text5,
|
|
397
508
|
{
|
|
398
509
|
size: "small",
|
|
399
510
|
leading: "compact",
|
|
@@ -402,13 +513,16 @@ var StorePaymentDetailsSection = ({
|
|
|
402
513
|
}
|
|
403
514
|
)
|
|
404
515
|
] })
|
|
405
|
-
] }) }) })
|
|
516
|
+
] }) }) }) : /* @__PURE__ */ jsxs6("div", { className: "flex flex-col items-center gap-y-1 pb-6 pt-2", children: [
|
|
517
|
+
/* @__PURE__ */ jsx6(Text5, { size: "small", leading: "compact", weight: "plus", children: t("store.paymentDetails.empty.title") }),
|
|
518
|
+
/* @__PURE__ */ jsx6(Text5, { size: "small", className: "text-ui-fg-muted", children: t("store.paymentDetails.empty.message") })
|
|
519
|
+
] })
|
|
406
520
|
] });
|
|
407
521
|
};
|
|
408
522
|
|
|
409
523
|
// src/pages/settings/store/_components/store-professional-details-section.tsx
|
|
410
524
|
import { Buildings, PencilSquare as PencilSquare5 } from "@medusajs/icons";
|
|
411
|
-
import { Container as Container6, Heading as Heading6, Text as
|
|
525
|
+
import { Container as Container6, Heading as Heading6, Text as Text6 } from "@medusajs/ui";
|
|
412
526
|
import { useTranslation as useTranslation7 } from "react-i18next";
|
|
413
527
|
import { jsx as jsx7, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
414
528
|
var StoreProfessionalDetailsSection = ({
|
|
@@ -416,6 +530,7 @@ var StoreProfessionalDetailsSection = ({
|
|
|
416
530
|
}) => {
|
|
417
531
|
const { t } = useTranslation7();
|
|
418
532
|
const details = seller.professional_details;
|
|
533
|
+
const hasDetails = details?.corporate_name || details?.registration_number || details?.tax_id;
|
|
419
534
|
return /* @__PURE__ */ jsxs7(Container6, { className: "p-0", children: [
|
|
420
535
|
/* @__PURE__ */ jsxs7("div", { className: "flex items-center justify-between px-6 py-4", children: [
|
|
421
536
|
/* @__PURE__ */ jsx7(Heading6, { level: "h2", children: t("store.professionalDetails.header") }),
|
|
@@ -436,12 +551,12 @@ var StoreProfessionalDetailsSection = ({
|
|
|
436
551
|
}
|
|
437
552
|
)
|
|
438
553
|
] }),
|
|
439
|
-
/* @__PURE__ */ jsx7("div", { className: "flex flex-col gap-2 px-2 pb-2", children: /* @__PURE__ */ jsx7("div", { className: "px-4 pb-2", children: /* @__PURE__ */ jsxs7("div", { className: "flex items-center gap-4", children: [
|
|
554
|
+
hasDetails ? /* @__PURE__ */ jsx7("div", { className: "flex flex-col gap-2 px-2 pb-2", children: /* @__PURE__ */ jsx7("div", { className: "px-4 pb-2", children: /* @__PURE__ */ jsxs7("div", { className: "flex items-center gap-4", children: [
|
|
440
555
|
/* @__PURE__ */ jsx7(IconAvatar, { size: "large", variant: "squared", children: /* @__PURE__ */ jsx7(Buildings, {}) }),
|
|
441
556
|
/* @__PURE__ */ jsxs7("div", { className: "flex flex-1 flex-col", children: [
|
|
442
|
-
/* @__PURE__ */ jsx7(
|
|
557
|
+
/* @__PURE__ */ jsx7(Text6, { size: "small", leading: "compact", weight: "plus", children: details?.corporate_name || "-" }),
|
|
443
558
|
/* @__PURE__ */ jsx7(
|
|
444
|
-
|
|
559
|
+
Text6,
|
|
445
560
|
{
|
|
446
561
|
size: "small",
|
|
447
562
|
leading: "compact",
|
|
@@ -450,12 +565,15 @@ var StoreProfessionalDetailsSection = ({
|
|
|
450
565
|
}
|
|
451
566
|
)
|
|
452
567
|
] })
|
|
453
|
-
] }) }) })
|
|
568
|
+
] }) }) }) : /* @__PURE__ */ jsxs7("div", { className: "flex flex-col items-center gap-y-1 pb-6 pt-2", children: [
|
|
569
|
+
/* @__PURE__ */ jsx7(Text6, { size: "small", leading: "compact", weight: "plus", children: t("store.professionalDetails.empty.title") }),
|
|
570
|
+
/* @__PURE__ */ jsx7(Text6, { size: "small", className: "text-ui-fg-muted", children: t("store.professionalDetails.empty.message") })
|
|
571
|
+
] })
|
|
454
572
|
] });
|
|
455
573
|
};
|
|
456
574
|
|
|
457
575
|
// src/pages/settings/store/store-detail-page.tsx
|
|
458
|
-
import { jsx as jsx8, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
576
|
+
import { Fragment as Fragment3, jsx as jsx8, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
459
577
|
var Root = ({ children }) => {
|
|
460
578
|
const { t } = useTranslation8();
|
|
461
579
|
const { seller_member, isPending, isError, error } = useMe();
|
|
@@ -471,14 +589,9 @@ var Root = ({ children }) => {
|
|
|
471
589
|
if (isError) {
|
|
472
590
|
throw error;
|
|
473
591
|
}
|
|
592
|
+
const isPendingApproval = seller.status === import_types2.SellerStatus.PENDING_APPROVAL;
|
|
474
593
|
const statusAlert = (() => {
|
|
475
594
|
switch (seller.status) {
|
|
476
|
-
case import_types2.SellerStatus.PENDING_APPROVAL:
|
|
477
|
-
return {
|
|
478
|
-
variant: "warning",
|
|
479
|
-
title: t("store.alert.pendingApproval.title"),
|
|
480
|
-
description: t("store.alert.pendingApproval.description")
|
|
481
|
-
};
|
|
482
595
|
case import_types2.SellerStatus.SUSPENDED:
|
|
483
596
|
return {
|
|
484
597
|
variant: "error",
|
|
@@ -495,35 +608,42 @@ var Root = ({ children }) => {
|
|
|
495
608
|
return null;
|
|
496
609
|
}
|
|
497
610
|
})();
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
/* @__PURE__ */ jsx8(
|
|
611
|
+
const StoreSetup = components.StoreSetup;
|
|
612
|
+
const StatusBanner = () => /* @__PURE__ */ jsxs8(Fragment3, { children: [
|
|
613
|
+
isPendingApproval && /* @__PURE__ */ jsxs8(Container7, { className: "p-0", children: [
|
|
614
|
+
/* @__PURE__ */ jsxs8("div", { className: "flex items-center gap-x-3 px-6 py-4 border-b border-ui-border-base", children: [
|
|
615
|
+
/* @__PURE__ */ jsx8(InformationCircleSolid, { className: "text-ui-fg-interactive" }),
|
|
616
|
+
/* @__PURE__ */ jsx8(Heading7, { level: "h2", children: t("store.alert.pendingApproval.title") })
|
|
503
617
|
] }),
|
|
504
|
-
/* @__PURE__ */ jsx8(
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
618
|
+
/* @__PURE__ */ jsx8("div", { className: "px-6 py-4", children: /* @__PURE__ */ jsx8(Text7, { size: "small", className: "text-ui-fg-subtle", children: t("store.alert.pendingApproval.description") }) }),
|
|
619
|
+
/* @__PURE__ */ jsx8("div", { className: "flex justify-end px-6 py-4 border-t border-ui-border-base bg-ui-bg-subtle rounded-b-lg", children: /* @__PURE__ */ jsx8(Button, { variant: "secondary", size: "small", children: t("actions.cancel") }) })
|
|
620
|
+
] }),
|
|
621
|
+
StoreSetup && /* @__PURE__ */ jsx8(StoreSetup, { seller }),
|
|
508
622
|
statusAlert && /* @__PURE__ */ jsxs8(Alert, { variant: statusAlert.variant, dismissible: true, className: "p-5", children: [
|
|
509
623
|
/* @__PURE__ */ jsx8("div", { className: "text-ui-fg-subtle txt-small pb-2 font-medium leading-[20px]", children: statusAlert.title }),
|
|
510
|
-
/* @__PURE__ */ jsx8(
|
|
624
|
+
/* @__PURE__ */ jsx8(Text7, { className: "text-ui-fg-subtle txt-small leading-normal", children: statusAlert.description })
|
|
625
|
+
] })
|
|
626
|
+
] });
|
|
627
|
+
if (Children3.count(children) > 0) {
|
|
628
|
+
return /* @__PURE__ */ jsx8(TwoColumnPage, { data: seller, hasOutlet: true, children });
|
|
629
|
+
}
|
|
630
|
+
return /* @__PURE__ */ jsxs8(TwoColumnPage, { data: seller, hasOutlet: true, children: [
|
|
631
|
+
/* @__PURE__ */ jsxs8(TwoColumnPage.Main, { children: [
|
|
632
|
+
/* @__PURE__ */ jsx8(StatusBanner, {}),
|
|
633
|
+
/* @__PURE__ */ jsx8(StoreGeneralSection, { seller }),
|
|
634
|
+
/* @__PURE__ */ jsx8(StoreTimeOffSection, { seller })
|
|
511
635
|
] }),
|
|
512
|
-
/* @__PURE__ */ jsxs8(TwoColumnPage, {
|
|
513
|
-
/* @__PURE__ */ jsx8(
|
|
514
|
-
/* @__PURE__ */
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
subscription_override
|
|
524
|
-
}
|
|
525
|
-
)
|
|
526
|
-
] })
|
|
636
|
+
/* @__PURE__ */ jsxs8(TwoColumnPage.Sidebar, { children: [
|
|
637
|
+
/* @__PURE__ */ jsx8(StoreAddressSection, { seller }),
|
|
638
|
+
/* @__PURE__ */ jsx8(StoreProfessionalDetailsSection, { seller }),
|
|
639
|
+
/* @__PURE__ */ jsx8(StorePaymentDetailsSection, { seller }),
|
|
640
|
+
/* @__PURE__ */ jsx8(
|
|
641
|
+
StoreSubscriptionSection,
|
|
642
|
+
{
|
|
643
|
+
subscription_plan,
|
|
644
|
+
subscription_override
|
|
645
|
+
}
|
|
646
|
+
)
|
|
527
647
|
] })
|
|
528
648
|
] });
|
|
529
649
|
};
|
|
@@ -533,7 +653,7 @@ var StoreDetailPage = Object.assign(Root, {
|
|
|
533
653
|
MainGeneralSection: StoreGeneralSection,
|
|
534
654
|
MainPaymentDetailsSection: StorePaymentDetailsSection,
|
|
535
655
|
MainProfessionalDetailsSection: StoreProfessionalDetailsSection,
|
|
536
|
-
|
|
656
|
+
MainTimeOffSection: StoreTimeOffSection,
|
|
537
657
|
SidebarAddressSection: StoreAddressSection,
|
|
538
658
|
SidebarSubscriptionSection: StoreSubscriptionSection,
|
|
539
659
|
Header: StoreDetailHeader,
|
|
@@ -12,8 +12,7 @@ import {
|
|
|
12
12
|
import {
|
|
13
13
|
useMe,
|
|
14
14
|
useUpdateSeller
|
|
15
|
-
} from "./chunk-
|
|
16
|
-
import "./chunk-STBCWNZQ.js";
|
|
15
|
+
} from "./chunk-ZCJ737TR.js";
|
|
17
16
|
import "./chunk-F4OJN2F2.js";
|
|
18
17
|
import "./chunk-LRARA622.js";
|
|
19
18
|
import "./chunk-M6N4ISXL.js";
|
|
@@ -45,17 +44,15 @@ import { useTranslation as useTranslation2 } from "react-i18next";
|
|
|
45
44
|
|
|
46
45
|
// src/pages/settings/store/store-closure/store-closure-form.tsx
|
|
47
46
|
import { zodResolver } from "@hookform/resolvers/zod";
|
|
48
|
-
import { Button, DatePicker, toast } from "@medusajs/ui";
|
|
47
|
+
import { Button, DatePicker, Textarea, toast } from "@medusajs/ui";
|
|
49
48
|
import { useForm } from "react-hook-form";
|
|
50
49
|
import { useTranslation } from "react-i18next";
|
|
51
50
|
import { z } from "zod";
|
|
52
51
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
53
52
|
var StoreClosureSchema = z.object({
|
|
54
|
-
closed_from: z.date({ required_error: "
|
|
55
|
-
closed_to: z.date().nullable()
|
|
56
|
-
|
|
57
|
-
message: "Close from date cannot be in the past",
|
|
58
|
-
path: ["closed_from"]
|
|
53
|
+
closed_from: z.date({ required_error: "Please enter a first day" }),
|
|
54
|
+
closed_to: z.date().nullable(),
|
|
55
|
+
closure_note: z.string().nullable()
|
|
59
56
|
});
|
|
60
57
|
var StoreClosureForm = ({ seller }) => {
|
|
61
58
|
const { t } = useTranslation();
|
|
@@ -63,7 +60,8 @@ var StoreClosureForm = ({ seller }) => {
|
|
|
63
60
|
const form = useForm({
|
|
64
61
|
defaultValues: {
|
|
65
62
|
closed_from: seller.closed_from ? new Date(seller.closed_from) : null,
|
|
66
|
-
closed_to: seller.closed_to ? new Date(seller.closed_to) : null
|
|
63
|
+
closed_to: seller.closed_to ? new Date(seller.closed_to) : null,
|
|
64
|
+
closure_note: seller.closure_note ?? ""
|
|
67
65
|
},
|
|
68
66
|
resolver: zodResolver(StoreClosureSchema)
|
|
69
67
|
});
|
|
@@ -72,13 +70,12 @@ var StoreClosureForm = ({ seller }) => {
|
|
|
72
70
|
await mutateAsync(
|
|
73
71
|
{
|
|
74
72
|
closed_from: data.closed_from || null,
|
|
75
|
-
closed_to: data.closed_to || null
|
|
73
|
+
closed_to: data.closed_to || null,
|
|
74
|
+
closure_note: data.closure_note || null
|
|
76
75
|
},
|
|
77
76
|
{
|
|
78
77
|
onSuccess: () => {
|
|
79
|
-
toast.success(
|
|
80
|
-
t("store.scheduledClosure.edit.successToast")
|
|
81
|
-
);
|
|
78
|
+
toast.success(t("store.timeOff.create.successToast"));
|
|
82
79
|
handleSuccess();
|
|
83
80
|
},
|
|
84
81
|
onError: (error) => {
|
|
@@ -96,12 +93,11 @@ var StoreClosureForm = ({ seller }) => {
|
|
|
96
93
|
name: "closed_from",
|
|
97
94
|
render: ({ field }) => {
|
|
98
95
|
return /* @__PURE__ */ jsxs(Form.Item, { children: [
|
|
99
|
-
/* @__PURE__ */ jsx(Form.Label, { children: t("store.
|
|
96
|
+
/* @__PURE__ */ jsx(Form.Label, { children: t("store.timeOff.fields.firstDay") }),
|
|
100
97
|
/* @__PURE__ */ jsx(Form.Control, { children: /* @__PURE__ */ jsx(
|
|
101
98
|
DatePicker,
|
|
102
99
|
{
|
|
103
100
|
granularity: "minute",
|
|
104
|
-
hourCycle: 12,
|
|
105
101
|
shouldCloseOnSelect: false,
|
|
106
102
|
...field
|
|
107
103
|
}
|
|
@@ -118,8 +114,7 @@ var StoreClosureForm = ({ seller }) => {
|
|
|
118
114
|
name: "closed_to",
|
|
119
115
|
render: ({ field }) => {
|
|
120
116
|
return /* @__PURE__ */ jsxs(Form.Item, { children: [
|
|
121
|
-
/* @__PURE__ */ jsx(Form.Label, { optional: true, children: t("store.
|
|
122
|
-
/* @__PURE__ */ jsx(Form.Hint, { children: t("store.scheduledClosure.fields.closedToHint") }),
|
|
117
|
+
/* @__PURE__ */ jsx(Form.Label, { optional: true, children: t("store.timeOff.fields.lastDay") }),
|
|
123
118
|
/* @__PURE__ */ jsx(Form.Control, { children: /* @__PURE__ */ jsx(
|
|
124
119
|
DatePicker,
|
|
125
120
|
{
|
|
@@ -128,6 +123,27 @@ var StoreClosureForm = ({ seller }) => {
|
|
|
128
123
|
...field
|
|
129
124
|
}
|
|
130
125
|
) }),
|
|
126
|
+
/* @__PURE__ */ jsx(Form.Hint, { children: t("store.timeOff.fields.lastDayHint") }),
|
|
127
|
+
/* @__PURE__ */ jsx(Form.ErrorMessage, {})
|
|
128
|
+
] });
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
),
|
|
132
|
+
/* @__PURE__ */ jsx(
|
|
133
|
+
Form.Field,
|
|
134
|
+
{
|
|
135
|
+
control: form.control,
|
|
136
|
+
name: "closure_note",
|
|
137
|
+
render: ({ field }) => {
|
|
138
|
+
return /* @__PURE__ */ jsxs(Form.Item, { children: [
|
|
139
|
+
/* @__PURE__ */ jsx(Form.Label, { optional: true, children: t("store.timeOff.fields.note") }),
|
|
140
|
+
/* @__PURE__ */ jsx(Form.Control, { children: /* @__PURE__ */ jsx(
|
|
141
|
+
Textarea,
|
|
142
|
+
{
|
|
143
|
+
...field,
|
|
144
|
+
value: field.value ?? ""
|
|
145
|
+
}
|
|
146
|
+
) }),
|
|
131
147
|
/* @__PURE__ */ jsx(Form.ErrorMessage, {})
|
|
132
148
|
] });
|
|
133
149
|
}
|
|
@@ -161,8 +177,8 @@ var Component = () => {
|
|
|
161
177
|
}
|
|
162
178
|
return /* @__PURE__ */ jsxs2(RouteDrawer, { children: [
|
|
163
179
|
/* @__PURE__ */ jsxs2(RouteDrawer.Header, { children: [
|
|
164
|
-
/* @__PURE__ */ jsx2(RouteDrawer.Title, { asChild: true, children: /* @__PURE__ */ jsx2(Heading, { children: t("store.
|
|
165
|
-
/* @__PURE__ */ jsx2(RouteDrawer.Description, { className: "sr-only", children: t("store.
|
|
180
|
+
/* @__PURE__ */ jsx2(RouteDrawer.Title, { asChild: true, children: /* @__PURE__ */ jsx2(Heading, { children: t("store.timeOff.create.header") }) }),
|
|
181
|
+
/* @__PURE__ */ jsx2(RouteDrawer.Description, { className: "sr-only", children: t("store.timeOff.create.description") })
|
|
166
182
|
] }),
|
|
167
183
|
!isPending && seller && /* @__PURE__ */ jsx2(StoreClosureForm, { seller })
|
|
168
184
|
] });
|
|
@@ -8,8 +8,7 @@ import "./chunk-U2EI2ZLM.js";
|
|
|
8
8
|
import {
|
|
9
9
|
useSelectSeller,
|
|
10
10
|
useSellers
|
|
11
|
-
} from "./chunk-
|
|
12
|
-
import "./chunk-STBCWNZQ.js";
|
|
11
|
+
} from "./chunk-ZCJ737TR.js";
|
|
13
12
|
import "./chunk-F4OJN2F2.js";
|
|
14
13
|
import "./chunk-LRARA622.js";
|
|
15
14
|
import "./chunk-M6N4ISXL.js";
|