@medusajs/dashboard 2.10.4-snapshot-20250929174531 → 2.10.4-snapshot-20250930123356
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-3BB3BLFD.mjs → add-campaign-promotions-YATCZFPA.mjs} +3 -3
- package/dist/{api-key-management-detail-ZQLQKGYF.mjs → api-key-management-detail-6URA7AKM.mjs} +1 -2
- package/dist/app.js +152 -74
- package/dist/app.mjs +3 -4
- package/dist/{campaign-create-CQ3XBHSY.mjs → campaign-create-SGLXQU2F.mjs} +3 -2
- package/dist/{campaign-detail-LASOFZ2O.mjs → campaign-detail-6WW6QFB2.mjs} +5 -6
- package/dist/{categories-metadata-HUIY6V4F.mjs → categories-metadata-LISTDI2Y.mjs} +1 -2
- package/dist/{category-detail-ZJJBYVFX.mjs → category-detail-K3GNLMQZ.mjs} +2 -3
- package/dist/{category-products-7N4TITQ4.mjs → category-products-EGGFU5IA.mjs} +2 -3
- package/dist/{chunk-5WMJLYEP.mjs → chunk-4KGC42TY.mjs} +1 -1
- package/dist/{chunk-NFQXNOP7.mjs → chunk-55PVXDDC.mjs} +1 -1
- package/dist/{chunk-7DFTLGA5.mjs → chunk-7PAOPX4A.mjs} +102 -102
- package/dist/{chunk-U4R5MBF2.mjs → chunk-ASFB7W5A.mjs} +1 -1
- package/dist/{chunk-DKOCYXB5.mjs → chunk-CLIAKOWC.mjs} +10 -2
- package/dist/{chunk-AXXGAOQL.mjs → chunk-ENN7KGKR.mjs} +9 -4
- package/dist/{chunk-CY33DS7K.mjs → chunk-GOJZH5OP.mjs} +52 -1
- package/dist/{chunk-IP2QPPWC.mjs → chunk-HGAQ6CRN.mjs} +1 -1
- package/dist/{chunk-PAG2HG6I.mjs → chunk-LFSI4NJU.mjs} +94 -22
- package/dist/{chunk-7JJTWGHU.mjs → chunk-S34JJVBQ.mjs} +7 -0
- package/dist/{chunk-QPLPGRYF.mjs → chunk-TR3FWQXE.mjs} +1 -1
- package/dist/{chunk-CXTAH75K.mjs → chunk-VLNUSUNX.mjs} +1 -1
- package/dist/{chunk-RBDAWRFF.mjs → chunk-W4JWOYEI.mjs} +1 -1
- package/dist/{chunk-XR7I5HGZ.mjs → chunk-WKSE3SCT.mjs} +1 -1
- package/dist/{chunk-VWQYN2RW.mjs → chunk-ZEED3CMI.mjs} +1 -1
- package/dist/{collection-add-products-WKMNYPLS.mjs → collection-add-products-3FN6PUXN.mjs} +2 -3
- package/dist/{collection-detail-NONKXELG.mjs → collection-detail-3XJA3YAW.mjs} +2 -3
- package/dist/{collection-list-3ZHLS2LP.mjs → collection-list-SDEPSNRJ.mjs} +2 -3
- package/dist/{collection-metadata-J6P3K7U6.mjs → collection-metadata-U3U5IAXY.mjs} +1 -2
- package/dist/{customer-detail-5Y7ICDMA.mjs → customer-detail-3LRBZ3JI.mjs} +1 -2
- package/dist/{customer-group-detail-PXP73BFA.mjs → customer-group-detail-PSWUMSNT.mjs} +1 -2
- package/dist/{customer-group-list-3DB643XQ.mjs → customer-group-list-CWMPWYDT.mjs} +1 -2
- package/dist/{customers-add-customer-group-BVUVU46N.mjs → customers-add-customer-group-B2A4NE3V.mjs} +1 -2
- package/dist/{edit-rules-3MSTPCE5.mjs → edit-rules-5IC62HEP.mjs} +1 -2
- package/dist/{inventory-create-NEYX7PZJ.mjs → inventory-create-W5TWRGTB.mjs} +1 -2
- package/dist/{inventory-detail-66HDQL3W.mjs → inventory-detail-NA3TYSDI.mjs} +1 -2
- package/dist/{inventory-metadata-OSTUWM23.mjs → inventory-metadata-IHX3PKUU.mjs} +1 -2
- package/dist/{inventory-stock-XY2OCAY3.mjs → inventory-stock-N63HVL4Y.mjs} +1 -2
- package/dist/{location-detail-UZHD3IKW.mjs → location-detail-LTPCPYBB.mjs} +1 -2
- package/dist/{location-fulfillment-providers-D4RMKQXU.mjs → location-fulfillment-providers-D7RUW43H.mjs} +2 -3
- package/dist/{location-service-zone-shipping-option-create-OASLL2K7.mjs → location-service-zone-shipping-option-create-7OWIMXRU.mjs} +1 -2
- package/dist/{login-LQRL2ZDY.mjs → login-35YVS44T.mjs} +1 -2
- package/dist/{order-create-claim-7UF734QH.mjs → order-create-claim-IL5IJQDA.mjs} +1 -2
- package/dist/{order-create-edit-MZHUVTGE.mjs → order-create-edit-MZZBDG2K.mjs} +1 -2
- package/dist/{order-create-exchange-2UGEF65S.mjs → order-create-exchange-CWS4HFYS.mjs} +1 -2
- package/dist/{order-create-fulfillment-HGJ2YPUB.mjs → order-create-fulfillment-I22AFZNL.mjs} +1 -2
- package/dist/{order-create-refund-CJDKVBSE.mjs → order-create-refund-MGNKZZU7.mjs} +18 -79
- package/dist/{order-create-shipment-3FDVQ6WT.mjs → order-create-shipment-DQ2MGT73.mjs} +1 -2
- package/dist/{order-detail-SEPCRJW5.mjs → order-detail-G3IQFZ4U.mjs} +4 -8
- package/dist/{order-edit-billing-address-J75NQFRY.mjs → order-edit-billing-address-LBI4BH2D.mjs} +1 -2
- package/dist/{order-edit-email-ABFQKE6A.mjs → order-edit-email-LZIAGMIQ.mjs} +1 -2
- package/dist/{order-edit-shipping-address-OXW7TAJD.mjs → order-edit-shipping-address-7ASMMZHB.mjs} +1 -2
- package/dist/{order-metadata-5NF3ICQL.mjs → order-metadata-WKPBFYBS.mjs} +1 -2
- package/dist/{order-receive-return-IM65P7XQ.mjs → order-receive-return-5NEE4MCK.mjs} +1 -2
- package/dist/{order-request-transfer-LZ25KEDA.mjs → order-request-transfer-3VT2ZUA7.mjs} +1 -2
- package/dist/{price-list-create-EC5VGCMW.mjs → price-list-create-RSXHRPDW.mjs} +2 -3
- package/dist/{price-list-detail-CRTJA5O4.mjs → price-list-detail-27WN2S6M.mjs} +2 -3
- package/dist/{price-list-prices-add-HYCM4QDY.mjs → price-list-prices-add-P76O76X3.mjs} +2 -3
- package/dist/{product-attributes-WVQRK3GQ.mjs → product-attributes-XSMFVMPL.mjs} +4 -5
- package/dist/{product-create-PWSPOVUS.mjs → product-create-IGZFHXVZ.mjs} +4 -5
- package/dist/{product-create-variant-V2QGXFEF.mjs → product-create-variant-3A7UARG7.mjs} +1 -2
- package/dist/{product-detail-EBPCCBI4.mjs → product-detail-CW42KVKT.mjs} +4 -5
- package/dist/{product-edit-5E6D43KE.mjs → product-edit-EXLC7FN7.mjs} +4 -5
- package/dist/{product-export-VFC3I5DK.mjs → product-export-EIIBIYBL.mjs} +2 -3
- package/dist/{product-import-V7EZJ2TU.mjs → product-import-WXFKSQMH.mjs} +1 -2
- package/dist/{product-list-FFZO57JG.mjs → product-list-KEND4NTM.mjs} +2 -3
- package/dist/{product-media-TRKQTA4G.mjs → product-media-NJZ6JSA7.mjs} +2 -2
- package/dist/{product-metadata-VYQ65KYI.mjs → product-metadata-6WVU7KCL.mjs} +1 -2
- package/dist/{product-organization-OCVSTKEK.mjs → product-organization-V2LE3CYO.mjs} +4 -5
- package/dist/{product-shipping-profile-SG6NDHF4.mjs → product-shipping-profile-K4FB5YNC.mjs} +4 -5
- package/dist/{product-stock-LJRYRSKN.mjs → product-stock-EYYSNQN6.mjs} +1 -2
- package/dist/{product-tag-create-EB5CVUOP.mjs → product-tag-create-LZJJQDDN.mjs} +1 -2
- package/dist/{product-tag-detail-V5CZY4R4.mjs → product-tag-detail-IZWWHAL4.mjs} +4 -5
- package/dist/{product-tag-edit-YATSW5OK.mjs → product-tag-edit-GJ7T5EWE.mjs} +1 -2
- package/dist/{product-tag-list-2LFGEFGL.mjs → product-tag-list-CT5SDORF.mjs} +4 -5
- package/dist/{product-tag-metadata-R5P5FWAZ.mjs → product-tag-metadata-2PE6F6PT.mjs} +1 -2
- package/dist/{product-type-detail-BZNI5GJ5.mjs → product-type-detail-X7TH5D5P.mjs} +2 -3
- package/dist/{product-type-metadata-SUQHWLWA.mjs → product-type-metadata-UBVJNWEL.mjs} +1 -2
- package/dist/{product-variant-detail-W2JHQQQJ.mjs → product-variant-detail-IUAHUIF3.mjs} +1 -2
- package/dist/{product-variant-edit-DSY77FF4.mjs → product-variant-edit-7QDJ2IRD.mjs} +1 -2
- package/dist/{product-variant-metadata-HE3MRTJB.mjs → product-variant-metadata-VNDDDM3T.mjs} +1 -2
- package/dist/{promotion-add-campaign-YOUUM6RB.mjs → promotion-add-campaign-SOGZKDNX.mjs} +2 -2
- package/dist/{promotion-create-NBFV4XQV.mjs → promotion-create-DRWLH3CY.mjs} +8 -5
- package/dist/{promotion-detail-247QD6DA.mjs → promotion-detail-VHNQCTRH.mjs} +3 -4
- package/dist/{promotion-list-WDHOSD55.mjs → promotion-list-6KMDX6OB.mjs} +3 -3
- package/dist/{refund-reason-create-45ZZOX7F.mjs → refund-reason-create-77GSQ4W5.mjs} +38 -3
- package/dist/{refund-reason-edit-E2HDAQZI.mjs → refund-reason-edit-UHR7VTDK.mjs} +49 -1
- package/dist/{refund-reason-list-WI7NHRDS.mjs → refund-reason-list-WIIPT75C.mjs} +3 -4
- package/dist/{region-metadata-3JIGHAUI.mjs → region-metadata-6VLWB5VQ.mjs} +1 -2
- package/dist/{reservation-detail-FENCNQDA.mjs → reservation-detail-3ATQ33U7.mjs} +1 -2
- package/dist/{reservation-metadata-DQ3A7MHU.mjs → reservation-metadata-2SVXKSIC.mjs} +1 -2
- package/dist/{reset-password-LCVV4NOA.mjs → reset-password-AOR576NC.mjs} +1 -1
- package/dist/{return-reason-list-FW7OYUOW.mjs → return-reason-list-T7KQHIYV.mjs} +1 -1
- package/dist/{sales-channel-add-products-G4EUOCWY.mjs → sales-channel-add-products-UFRCO4JR.mjs} +2 -3
- package/dist/{sales-channel-detail-NT7PEVVH.mjs → sales-channel-detail-4B6KT7EU.mjs} +2 -3
- package/dist/{sales-channel-list-REV2RETE.mjs → sales-channel-list-3KAKOZV7.mjs} +1 -2
- package/dist/{sales-channel-metadata-O5O6ADG5.mjs → sales-channel-metadata-VWG77T3Y.mjs} +1 -2
- package/dist/{shipping-option-type-create-7FSJNHHA.mjs → shipping-option-type-create-ZSUEJDPC.mjs} +1 -2
- package/dist/{shipping-option-type-detail-6UQST7RY.mjs → shipping-option-type-detail-LUIV6WLP.mjs} +2 -3
- package/dist/{shipping-option-type-edit-B475WRRR.mjs → shipping-option-type-edit-MC4UYHRM.mjs} +1 -2
- package/dist/{shipping-option-type-list-DTETSFSA.mjs → shipping-option-type-list-AA3VLD4U.mjs} +2 -3
- package/dist/{shipping-profile-metadata-PRINFNSY.mjs → shipping-profile-metadata-37X46LSP.mjs} +1 -2
- package/dist/{store-detail-QKF2TVNW.mjs → store-detail-PGMGDA2T.mjs} +1 -2
- package/dist/{store-metadata-M6GIKI5P.mjs → store-metadata-DPM7CH4C.mjs} +1 -2
- package/dist/{tax-region-create-4DTM3RTZ.mjs → tax-region-create-EFDLXWCS.mjs} +2 -3
- package/dist/{tax-region-detail-SLCI3JYL.mjs → tax-region-detail-S5R5D4KY.mjs} +2 -3
- package/dist/{tax-region-edit-CJ63JXFQ.mjs → tax-region-edit-ECTOKAGZ.mjs} +1 -2
- package/dist/{tax-region-province-detail-BGL2USQF.mjs → tax-region-province-detail-7DEEXMWA.mjs} +1 -2
- package/dist/{tax-region-tax-override-create-L4WOTSBO.mjs → tax-region-tax-override-create-6EHKZAZ4.mjs} +4 -5
- package/dist/{tax-region-tax-override-edit-2JAVNE37.mjs → tax-region-tax-override-edit-AZBQQPYI.mjs} +4 -5
- package/dist/{user-metadata-DFTGB46F.mjs → user-metadata-HPKKLNTP.mjs} +1 -2
- package/dist/{workflow-execution-detail-YNT2RKIP.mjs → workflow-execution-detail-Z6JEL2HO.mjs} +1 -2
- package/package.json +9 -9
- package/src/hooks/table/columns/use-refund-reason-table-columns.tsx +7 -0
- package/src/i18n/translations/$schema.json +36 -2
- package/src/i18n/translations/en.json +10 -2
- package/src/routes/campaigns/campaign-create/components/create-campaign-form/create-campaign-form.tsx +7 -2
- package/src/routes/campaigns/campaign-detail/components/campaign-budget/campaign-budget.tsx +5 -1
- package/src/routes/campaigns/common/components/create-campaign-form-fields/create-campaign-form-fields.tsx +50 -1
- package/src/routes/campaigns/common/constants.ts +1 -0
- package/src/routes/orders/order-create-refund/components/create-refund-form/create-refund-form.tsx +12 -76
- package/src/routes/orders/order-detail/components/order-summary-section/order-summary-section.tsx +1 -5
- package/src/routes/promotions/promotion-create/components/create-promotion-form/create-promotion-form.tsx +7 -0
- package/src/routes/refund-reasons/refund-reason-create/components/refund-reason-create-form/refund-reason-create-form.tsx +46 -0
- package/src/routes/refund-reasons/refund-reason-edit/components/refund-reason-edit-form/refund-reason-edit-form.tsx +23 -1
- package/dist/chunk-5U3FFMC7.mjs +0 -84
@@ -10954,7 +10954,7 @@ var en_default = {
|
|
10954
10954
|
delete: {
|
10955
10955
|
title: "Are you sure?",
|
10956
10956
|
description: "You are about to delete the campaign '{{name}}'. This action cannot be undone.",
|
10957
|
-
successToast: "Campaign '{{name}}' was successfully
|
10957
|
+
successToast: "Campaign '{{name}}' was successfully deleted."
|
10958
10958
|
},
|
10959
10959
|
edit: {
|
10960
10960
|
header: "Edit Campaign",
|
@@ -10998,7 +10998,11 @@ var en_default = {
|
|
10998
10998
|
type: "Type",
|
10999
10999
|
currency: "Currency",
|
11000
11000
|
limit: "Limit",
|
11001
|
-
used: "Used"
|
11001
|
+
used: "Used",
|
11002
|
+
budgetAttribute: "Limit usage per",
|
11003
|
+
budgetAttributeTooltip: "Define how many times the promotion can be used by a specific customer or email.",
|
11004
|
+
limitBudgetAttributeCustomer: "Budget limit per customer",
|
11005
|
+
limitBudgetAttributeEmail: "Budget limit per email"
|
11002
11006
|
},
|
11003
11007
|
type: {
|
11004
11008
|
spend: {
|
@@ -11521,6 +11525,10 @@ var en_default = {
|
|
11521
11525
|
label: "Label",
|
11522
11526
|
placeholder: "Gesture of goodwill"
|
11523
11527
|
},
|
11528
|
+
code: {
|
11529
|
+
label: "Code",
|
11530
|
+
placeholder: "gesture_of_goodwill"
|
11531
|
+
},
|
11524
11532
|
description: {
|
11525
11533
|
label: "Description",
|
11526
11534
|
placeholder: "Customer had a bad shopping experience"
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import {
|
2
2
|
CreateCampaignFormFields
|
3
|
-
} from "./chunk-
|
3
|
+
} from "./chunk-GOJZH5OP.mjs";
|
4
4
|
import {
|
5
5
|
VisuallyHidden
|
6
6
|
} from "./chunk-F6ZOHZVB.mjs";
|
@@ -32,7 +32,8 @@ var DEFAULT_CAMPAIGN_VALUES = {
|
|
32
32
|
budget: {
|
33
33
|
type: "usage",
|
34
34
|
currency_code: null,
|
35
|
-
limit: null
|
35
|
+
limit: null,
|
36
|
+
attribute: null
|
36
37
|
}
|
37
38
|
};
|
38
39
|
|
@@ -45,8 +46,9 @@ var CreateCampaignSchema = zod.object({
|
|
45
46
|
starts_at: zod.date().nullable(),
|
46
47
|
ends_at: zod.date().nullable(),
|
47
48
|
budget: zod.object({
|
49
|
+
attribute: zod.string().nullish(),
|
48
50
|
limit: zod.number().min(0).nullish(),
|
49
|
-
type: zod.enum(["spend", "usage"]),
|
51
|
+
type: zod.enum(["spend", "usage", "use_by_attribute"]),
|
50
52
|
currency_code: zod.string().nullish()
|
51
53
|
})
|
52
54
|
});
|
@@ -59,6 +61,8 @@ var CreateCampaignForm = () => {
|
|
59
61
|
resolver: zodResolver(CreateCampaignSchema)
|
60
62
|
});
|
61
63
|
const handleSubmit = form.handleSubmit(async (data) => {
|
64
|
+
const attribute = data.budget.attribute || null;
|
65
|
+
const type = attribute ? "use_by_attribute" : data.budget.type;
|
62
66
|
await mutateAsync(
|
63
67
|
{
|
64
68
|
name: data.name,
|
@@ -67,7 +71,8 @@ var CreateCampaignForm = () => {
|
|
67
71
|
starts_at: data.starts_at,
|
68
72
|
ends_at: data.ends_at,
|
69
73
|
budget: {
|
70
|
-
type
|
74
|
+
type,
|
75
|
+
attribute,
|
71
76
|
limit: data.budget.limit ? data.budget.limit : void 0,
|
72
77
|
currency_code: data.budget.currency_code
|
73
78
|
}
|
@@ -1,3 +1,6 @@
|
|
1
|
+
import {
|
2
|
+
Combobox
|
3
|
+
} from "./chunk-OFN7DIZA.mjs";
|
1
4
|
import {
|
2
5
|
currencies,
|
3
6
|
getCurrencySymbol
|
@@ -177,13 +180,14 @@ var CreateCampaignFormFields = ({ form, fieldScope = "" }) => {
|
|
177
180
|
RadioGroup,
|
178
181
|
{
|
179
182
|
dir: direction,
|
180
|
-
className: "flex gap-y-3",
|
183
|
+
className: "flex gap-x-4 gap-y-3",
|
181
184
|
...field,
|
182
185
|
onValueChange: field.onChange,
|
183
186
|
children: [
|
184
187
|
/* @__PURE__ */ jsx(
|
185
188
|
RadioGroup.ChoiceBox,
|
186
189
|
{
|
190
|
+
className: "flex-1",
|
187
191
|
value: "usage",
|
188
192
|
label: t("campaigns.budget.type.usage.title"),
|
189
193
|
description: t("campaigns.budget.type.usage.description")
|
@@ -192,6 +196,7 @@ var CreateCampaignFormFields = ({ form, fieldScope = "" }) => {
|
|
192
196
|
/* @__PURE__ */ jsx(
|
193
197
|
RadioGroup.ChoiceBox,
|
194
198
|
{
|
199
|
+
className: "flex-1",
|
195
200
|
value: "spend",
|
196
201
|
label: t("campaigns.budget.type.spend.title"),
|
197
202
|
description: t("campaigns.budget.type.spend.description"),
|
@@ -294,6 +299,52 @@ var CreateCampaignFormFields = ({ form, fieldScope = "" }) => {
|
|
294
299
|
] });
|
295
300
|
}
|
296
301
|
}
|
302
|
+
),
|
303
|
+
!isTypeSpend && /* @__PURE__ */ jsx(
|
304
|
+
Form.Field,
|
305
|
+
{
|
306
|
+
control: form.control,
|
307
|
+
name: `${fieldScope}budget.attribute`,
|
308
|
+
render: ({ field }) => {
|
309
|
+
return /* @__PURE__ */ jsxs(Form.Item, { className: "basis-1/2", children: [
|
310
|
+
/* @__PURE__ */ jsx(
|
311
|
+
Form.Label,
|
312
|
+
{
|
313
|
+
tooltip: t(
|
314
|
+
"campaigns.budget.fields.budgetAttributeTooltip"
|
315
|
+
),
|
316
|
+
children: t("campaigns.budget.fields.budgetAttribute")
|
317
|
+
}
|
318
|
+
),
|
319
|
+
/* @__PURE__ */ jsx(Form.Control, { children: /* @__PURE__ */ jsx(
|
320
|
+
Combobox,
|
321
|
+
{
|
322
|
+
...field,
|
323
|
+
onChange: (e) => {
|
324
|
+
if (typeof e === "undefined") {
|
325
|
+
field.onChange(null);
|
326
|
+
} else {
|
327
|
+
field.onChange(e);
|
328
|
+
}
|
329
|
+
},
|
330
|
+
allowClear: true,
|
331
|
+
options: [
|
332
|
+
{
|
333
|
+
label: t("fields.customer"),
|
334
|
+
value: "customer_id"
|
335
|
+
},
|
336
|
+
{
|
337
|
+
label: t("fields.email"),
|
338
|
+
value: "customer_email"
|
339
|
+
}
|
340
|
+
]
|
341
|
+
},
|
342
|
+
"attribute"
|
343
|
+
) }),
|
344
|
+
/* @__PURE__ */ jsx(Form.ErrorMessage, {})
|
345
|
+
] });
|
346
|
+
}
|
347
|
+
}
|
297
348
|
)
|
298
349
|
] })
|
299
350
|
] });
|
@@ -39,17 +39,83 @@ var useVariants = (query, options) => {
|
|
39
39
|
return { ...data, ...rest };
|
40
40
|
};
|
41
41
|
|
42
|
-
// src/hooks/api/
|
42
|
+
// src/hooks/api/refund-reasons.tsx
|
43
43
|
import {
|
44
44
|
useMutation,
|
45
45
|
useQuery as useQuery3
|
46
46
|
} from "@tanstack/react-query";
|
47
|
+
var REFUND_REASONS_QUERY_KEY = "refund_reasons";
|
48
|
+
var refundReasonsQueryKeys = queryKeysFactory(REFUND_REASONS_QUERY_KEY);
|
49
|
+
var useRefundReasons = (query, options) => {
|
50
|
+
const { data, ...rest } = useQuery3({
|
51
|
+
queryFn: () => sdk.admin.refundReason.list(query),
|
52
|
+
queryKey: refundReasonsQueryKeys.list(query),
|
53
|
+
...options
|
54
|
+
});
|
55
|
+
return { ...data, ...rest };
|
56
|
+
};
|
57
|
+
var useRefundReason = (id, query, options) => {
|
58
|
+
const { data, ...rest } = useQuery3({
|
59
|
+
queryFn: () => sdk.admin.refundReason.retrieve(id, query),
|
60
|
+
queryKey: refundReasonsQueryKeys.detail(id),
|
61
|
+
...options
|
62
|
+
});
|
63
|
+
return { ...data, ...rest };
|
64
|
+
};
|
65
|
+
var useCreateRefundReason = (query, options) => {
|
66
|
+
return useMutation({
|
67
|
+
mutationFn: async (data) => sdk.admin.refundReason.create(data, query),
|
68
|
+
onSuccess: (data, variables, context) => {
|
69
|
+
queryClient.invalidateQueries({
|
70
|
+
queryKey: refundReasonsQueryKeys.lists()
|
71
|
+
});
|
72
|
+
options?.onSuccess?.(data, variables, context);
|
73
|
+
},
|
74
|
+
...options
|
75
|
+
});
|
76
|
+
};
|
77
|
+
var useUpdateRefundReason = (id, options) => {
|
78
|
+
return useMutation({
|
79
|
+
mutationFn: async (data) => sdk.admin.refundReason.update(id, data),
|
80
|
+
onSuccess: (data, variables, context) => {
|
81
|
+
queryClient.invalidateQueries({
|
82
|
+
queryKey: refundReasonsQueryKeys.lists()
|
83
|
+
});
|
84
|
+
queryClient.invalidateQueries({
|
85
|
+
queryKey: refundReasonsQueryKeys.detail(data.refund_reason.id)
|
86
|
+
});
|
87
|
+
options?.onSuccess?.(data, variables, context);
|
88
|
+
},
|
89
|
+
...options
|
90
|
+
});
|
91
|
+
};
|
92
|
+
var useDeleteRefundReasonLazy = (options) => {
|
93
|
+
return useMutation({
|
94
|
+
mutationFn: (id) => sdk.admin.refundReason.delete(id),
|
95
|
+
onSuccess: (data, variables, context) => {
|
96
|
+
queryClient.invalidateQueries({
|
97
|
+
queryKey: refundReasonsQueryKeys.lists()
|
98
|
+
});
|
99
|
+
queryClient.invalidateQueries({
|
100
|
+
queryKey: refundReasonsQueryKeys.details()
|
101
|
+
});
|
102
|
+
options?.onSuccess?.(data, variables, context);
|
103
|
+
},
|
104
|
+
...options
|
105
|
+
});
|
106
|
+
};
|
107
|
+
|
108
|
+
// src/hooks/api/shipping-option-types.tsx
|
109
|
+
import {
|
110
|
+
useMutation as useMutation2,
|
111
|
+
useQuery as useQuery4
|
112
|
+
} from "@tanstack/react-query";
|
47
113
|
var SHIPPING_OPTION_TYPES_QUERY_KEY = "shipping_option_types";
|
48
114
|
var shippingOptionTypesQueryKeys = queryKeysFactory(
|
49
115
|
SHIPPING_OPTION_TYPES_QUERY_KEY
|
50
116
|
);
|
51
117
|
var useShippingOptionType = (id, query, options) => {
|
52
|
-
const { data, ...rest } =
|
118
|
+
const { data, ...rest } = useQuery4({
|
53
119
|
queryFn: () => sdk.admin.shippingOptionType.retrieve(id, query),
|
54
120
|
queryKey: shippingOptionTypesQueryKeys.detail(id),
|
55
121
|
...options
|
@@ -57,7 +123,7 @@ var useShippingOptionType = (id, query, options) => {
|
|
57
123
|
return { ...data, ...rest };
|
58
124
|
};
|
59
125
|
var useShippingOptionTypes = (query, options) => {
|
60
|
-
const { data, ...rest } =
|
126
|
+
const { data, ...rest } = useQuery4({
|
61
127
|
queryFn: () => sdk.admin.shippingOptionType.list(query),
|
62
128
|
queryKey: shippingOptionTypesQueryKeys.list(query),
|
63
129
|
...options
|
@@ -65,7 +131,7 @@ var useShippingOptionTypes = (query, options) => {
|
|
65
131
|
return { ...data, ...rest };
|
66
132
|
};
|
67
133
|
var useCreateShippingOptionType = (options) => {
|
68
|
-
return
|
134
|
+
return useMutation2({
|
69
135
|
mutationFn: (payload) => sdk.admin.shippingOptionType.create(payload),
|
70
136
|
onSuccess: (data, variables, context) => {
|
71
137
|
queryClient.invalidateQueries({
|
@@ -77,7 +143,7 @@ var useCreateShippingOptionType = (options) => {
|
|
77
143
|
});
|
78
144
|
};
|
79
145
|
var useUpdateShippingOptionType = (id, options) => {
|
80
|
-
return
|
146
|
+
return useMutation2({
|
81
147
|
mutationFn: (payload) => sdk.admin.shippingOptionType.update(id, payload),
|
82
148
|
onSuccess: (data, variables, context) => {
|
83
149
|
queryClient.invalidateQueries({
|
@@ -92,7 +158,7 @@ var useUpdateShippingOptionType = (id, options) => {
|
|
92
158
|
});
|
93
159
|
};
|
94
160
|
var useDeleteShippingOptionType = (id, options) => {
|
95
|
-
return
|
161
|
+
return useMutation2({
|
96
162
|
mutationFn: () => sdk.admin.shippingOptionType.delete(id),
|
97
163
|
onSuccess: (data, variables, context) => {
|
98
164
|
queryClient.invalidateQueries({
|
@@ -109,13 +175,13 @@ var useDeleteShippingOptionType = (id, options) => {
|
|
109
175
|
|
110
176
|
// src/hooks/api/tags.tsx
|
111
177
|
import {
|
112
|
-
useMutation as
|
113
|
-
useQuery as
|
178
|
+
useMutation as useMutation3,
|
179
|
+
useQuery as useQuery5
|
114
180
|
} from "@tanstack/react-query";
|
115
181
|
var TAGS_QUERY_KEY = "tags";
|
116
182
|
var productTagsQueryKeys = queryKeysFactory(TAGS_QUERY_KEY);
|
117
183
|
var useProductTag = (id, query, options) => {
|
118
|
-
const { data, ...rest } =
|
184
|
+
const { data, ...rest } = useQuery5({
|
119
185
|
queryKey: productTagsQueryKeys.detail(id, query),
|
120
186
|
queryFn: async () => sdk.admin.productTag.retrieve(id),
|
121
187
|
...options
|
@@ -123,7 +189,7 @@ var useProductTag = (id, query, options) => {
|
|
123
189
|
return { ...data, ...rest };
|
124
190
|
};
|
125
191
|
var useProductTags = (query, options) => {
|
126
|
-
const { data, ...rest } =
|
192
|
+
const { data, ...rest } = useQuery5({
|
127
193
|
queryKey: productTagsQueryKeys.list(query),
|
128
194
|
queryFn: async () => sdk.admin.productTag.list(query),
|
129
195
|
...options
|
@@ -131,7 +197,7 @@ var useProductTags = (query, options) => {
|
|
131
197
|
return { ...data, ...rest };
|
132
198
|
};
|
133
199
|
var useCreateProductTag = (query, options) => {
|
134
|
-
return
|
200
|
+
return useMutation3({
|
135
201
|
mutationFn: async (data) => sdk.admin.productTag.create(data, query),
|
136
202
|
onSuccess: (data, variables, context) => {
|
137
203
|
queryClient.invalidateQueries({
|
@@ -143,7 +209,7 @@ var useCreateProductTag = (query, options) => {
|
|
143
209
|
});
|
144
210
|
};
|
145
211
|
var useUpdateProductTag = (id, query, options) => {
|
146
|
-
return
|
212
|
+
return useMutation3({
|
147
213
|
mutationFn: async (data) => sdk.admin.productTag.update(id, data, query),
|
148
214
|
onSuccess: (data, variables, context) => {
|
149
215
|
queryClient.invalidateQueries({
|
@@ -158,7 +224,7 @@ var useUpdateProductTag = (id, query, options) => {
|
|
158
224
|
});
|
159
225
|
};
|
160
226
|
var useDeleteProductTag = (id, options) => {
|
161
|
-
return
|
227
|
+
return useMutation3({
|
162
228
|
mutationFn: async () => sdk.admin.productTag.delete(id),
|
163
229
|
onSuccess: (data, variables, context) => {
|
164
230
|
queryClient.invalidateQueries({
|
@@ -174,16 +240,16 @@ var useDeleteProductTag = (id, options) => {
|
|
174
240
|
};
|
175
241
|
|
176
242
|
// src/hooks/api/fulfillment.tsx
|
177
|
-
import { useMutation as
|
243
|
+
import { useMutation as useMutation4 } from "@tanstack/react-query";
|
178
244
|
var FULFILLMENTS_QUERY_KEY = "fulfillments";
|
179
245
|
var fulfillmentsQueryKeys = queryKeysFactory(FULFILLMENTS_QUERY_KEY);
|
180
246
|
|
181
247
|
// src/hooks/api/notification.tsx
|
182
|
-
import { useQuery as
|
248
|
+
import { useQuery as useQuery6 } from "@tanstack/react-query";
|
183
249
|
var NOTIFICATION_QUERY_KEY = "notification";
|
184
250
|
var notificationQueryKeys = queryKeysFactory(NOTIFICATION_QUERY_KEY);
|
185
251
|
var useNotifications = (query, options) => {
|
186
|
-
const { data, ...rest } =
|
252
|
+
const { data, ...rest } = useQuery6({
|
187
253
|
queryFn: () => sdk.admin.notification.list(query),
|
188
254
|
queryKey: notificationQueryKeys.list(query),
|
189
255
|
...options
|
@@ -192,13 +258,13 @@ var useNotifications = (query, options) => {
|
|
192
258
|
};
|
193
259
|
|
194
260
|
// src/hooks/api/payment-collections.tsx
|
195
|
-
import { useMutation as
|
261
|
+
import { useMutation as useMutation5 } from "@tanstack/react-query";
|
196
262
|
var PAYMENT_COLLECTION_QUERY_KEY = "payment-collection";
|
197
263
|
var paymentCollectionQueryKeys = queryKeysFactory(
|
198
264
|
PAYMENT_COLLECTION_QUERY_KEY
|
199
265
|
);
|
200
266
|
var useMarkPaymentCollectionAsPaid = (orderId, paymentCollectionId, options) => {
|
201
|
-
return
|
267
|
+
return useMutation5({
|
202
268
|
mutationFn: (payload) => sdk.admin.paymentCollection.markAsPaid(paymentCollectionId, payload),
|
203
269
|
onSuccess: (data, variables, context) => {
|
204
270
|
queryClient.invalidateQueries({
|
@@ -218,8 +284,8 @@ var useMarkPaymentCollectionAsPaid = (orderId, paymentCollectionId, options) =>
|
|
218
284
|
|
219
285
|
// src/hooks/api/payments.tsx
|
220
286
|
import {
|
221
|
-
useMutation as
|
222
|
-
useQuery as
|
287
|
+
useMutation as useMutation6,
|
288
|
+
useQuery as useQuery7
|
223
289
|
} from "@tanstack/react-query";
|
224
290
|
var PAYMENT_QUERY_KEY = "payment";
|
225
291
|
var paymentQueryKeys = queryKeysFactory(PAYMENT_QUERY_KEY);
|
@@ -228,7 +294,7 @@ var paymentProvidersQueryKeys = queryKeysFactory(
|
|
228
294
|
PAYMENT_PROVIDERS_QUERY_KEY
|
229
295
|
);
|
230
296
|
var useCapturePayment = (orderId, paymentId, options) => {
|
231
|
-
return
|
297
|
+
return useMutation6({
|
232
298
|
mutationFn: (payload) => sdk.admin.payment.capture(paymentId, payload),
|
233
299
|
onSuccess: (data, variables, context) => {
|
234
300
|
queryClient.invalidateQueries({
|
@@ -243,7 +309,7 @@ var useCapturePayment = (orderId, paymentId, options) => {
|
|
243
309
|
});
|
244
310
|
};
|
245
311
|
var useRefundPayment = (orderId, paymentId, options) => {
|
246
|
-
return
|
312
|
+
return useMutation6({
|
247
313
|
mutationFn: (payload) => sdk.admin.payment.refund(paymentId, payload),
|
248
314
|
onSuccess: (data, variables, context) => {
|
249
315
|
queryClient.invalidateQueries({
|
@@ -267,6 +333,12 @@ export {
|
|
267
333
|
usePlugins,
|
268
334
|
productVariantQueryKeys,
|
269
335
|
useVariants,
|
336
|
+
refundReasonsQueryKeys,
|
337
|
+
useRefundReasons,
|
338
|
+
useRefundReason,
|
339
|
+
useCreateRefundReason,
|
340
|
+
useUpdateRefundReason,
|
341
|
+
useDeleteRefundReasonLazy,
|
270
342
|
shippingOptionTypesQueryKeys,
|
271
343
|
useShippingOptionType,
|
272
344
|
useShippingOptionTypes,
|
@@ -56,6 +56,13 @@ var useRefundReasonTableColumns = () => {
|
|
56
56
|
sortAscLabel: t("filters.sorting.alphabeticallyAsc"),
|
57
57
|
sortDescLabel: t("filters.sorting.alphabeticallyDesc")
|
58
58
|
}),
|
59
|
+
columnHelper2.accessor("code", {
|
60
|
+
header: () => t("fields.code"),
|
61
|
+
enableSorting: true,
|
62
|
+
sortLabel: t("fields.code"),
|
63
|
+
sortAscLabel: t("filters.sorting.alphabeticallyAsc"),
|
64
|
+
sortDescLabel: t("filters.sorting.alphabeticallyDesc")
|
65
|
+
}),
|
59
66
|
columnHelper2.accessor("description", {
|
60
67
|
header: () => t("fields.description"),
|
61
68
|
cell: ({ getValue }) => /* @__PURE__ */ jsx2(DescriptionCell, { description: getValue() }),
|
@@ -17,7 +17,7 @@ import "./chunk-HQKGZADC.mjs";
|
|
17
17
|
import "./chunk-EMIHDNB7.mjs";
|
18
18
|
import {
|
19
19
|
useProductTableFilters
|
20
|
-
} from "./chunk-
|
20
|
+
} from "./chunk-4KGC42TY.mjs";
|
21
21
|
import "./chunk-Z26G6WFJ.mjs";
|
22
22
|
import "./chunk-M3VFKDXJ.mjs";
|
23
23
|
import "./chunk-C76H5USB.mjs";
|
@@ -34,9 +34,8 @@ import "./chunk-LPEUYMRK.mjs";
|
|
34
34
|
import "./chunk-S4DMV3ZT.mjs";
|
35
35
|
import "./chunk-67ORSRVT.mjs";
|
36
36
|
import "./chunk-OBQI23QM.mjs";
|
37
|
-
import "./chunk-
|
37
|
+
import "./chunk-LFSI4NJU.mjs";
|
38
38
|
import "./chunk-KOSCMAIC.mjs";
|
39
|
-
import "./chunk-5U3FFMC7.mjs";
|
40
39
|
import "./chunk-X6DSNTTX.mjs";
|
41
40
|
import "./chunk-I6E6CALJ.mjs";
|
42
41
|
import "./chunk-RGP3IXX4.mjs";
|
@@ -18,7 +18,7 @@ import "./chunk-HQKGZADC.mjs";
|
|
18
18
|
import "./chunk-EMIHDNB7.mjs";
|
19
19
|
import {
|
20
20
|
useProductTableFilters
|
21
|
-
} from "./chunk-
|
21
|
+
} from "./chunk-4KGC42TY.mjs";
|
22
22
|
import "./chunk-Z26G6WFJ.mjs";
|
23
23
|
import "./chunk-M3VFKDXJ.mjs";
|
24
24
|
import {
|
@@ -39,9 +39,8 @@ import {
|
|
39
39
|
import "./chunk-OC7BQLYI.mjs";
|
40
40
|
import "./chunk-S4DMV3ZT.mjs";
|
41
41
|
import "./chunk-67ORSRVT.mjs";
|
42
|
-
import "./chunk-
|
42
|
+
import "./chunk-LFSI4NJU.mjs";
|
43
43
|
import "./chunk-KOSCMAIC.mjs";
|
44
|
-
import "./chunk-5U3FFMC7.mjs";
|
45
44
|
import "./chunk-X6DSNTTX.mjs";
|
46
45
|
import "./chunk-I6E6CALJ.mjs";
|
47
46
|
import "./chunk-RGP3IXX4.mjs";
|
@@ -32,7 +32,7 @@ import "./chunk-2PGNKUXS.mjs";
|
|
32
32
|
import "./chunk-W7625H47.mjs";
|
33
33
|
import "./chunk-DLZWPHHO.mjs";
|
34
34
|
import "./chunk-LSEYENCI.mjs";
|
35
|
-
import "./chunk-
|
35
|
+
import "./chunk-4KGC42TY.mjs";
|
36
36
|
import "./chunk-Z26G6WFJ.mjs";
|
37
37
|
import "./chunk-M3VFKDXJ.mjs";
|
38
38
|
import {
|
@@ -50,9 +50,8 @@ import {
|
|
50
50
|
import "./chunk-OC7BQLYI.mjs";
|
51
51
|
import "./chunk-S4DMV3ZT.mjs";
|
52
52
|
import "./chunk-67ORSRVT.mjs";
|
53
|
-
import "./chunk-
|
53
|
+
import "./chunk-LFSI4NJU.mjs";
|
54
54
|
import "./chunk-KOSCMAIC.mjs";
|
55
|
-
import "./chunk-5U3FFMC7.mjs";
|
56
55
|
import "./chunk-X6DSNTTX.mjs";
|
57
56
|
import "./chunk-I6E6CALJ.mjs";
|
58
57
|
import "./chunk-RGP3IXX4.mjs";
|
@@ -8,9 +8,8 @@ import "./chunk-LPEUYMRK.mjs";
|
|
8
8
|
import "./chunk-OC7BQLYI.mjs";
|
9
9
|
import "./chunk-S4DMV3ZT.mjs";
|
10
10
|
import "./chunk-OBQI23QM.mjs";
|
11
|
-
import "./chunk-
|
11
|
+
import "./chunk-LFSI4NJU.mjs";
|
12
12
|
import "./chunk-KOSCMAIC.mjs";
|
13
|
-
import "./chunk-5U3FFMC7.mjs";
|
14
13
|
import "./chunk-X6DSNTTX.mjs";
|
15
14
|
import "./chunk-I6E6CALJ.mjs";
|
16
15
|
import "./chunk-RGP3IXX4.mjs";
|
@@ -54,9 +54,8 @@ import {
|
|
54
54
|
import "./chunk-OC7BQLYI.mjs";
|
55
55
|
import "./chunk-S4DMV3ZT.mjs";
|
56
56
|
import "./chunk-67ORSRVT.mjs";
|
57
|
-
import "./chunk-
|
57
|
+
import "./chunk-LFSI4NJU.mjs";
|
58
58
|
import "./chunk-KOSCMAIC.mjs";
|
59
|
-
import "./chunk-5U3FFMC7.mjs";
|
60
59
|
import "./chunk-X6DSNTTX.mjs";
|
61
60
|
import "./chunk-I6E6CALJ.mjs";
|
62
61
|
import "./chunk-RGP3IXX4.mjs";
|
@@ -37,9 +37,8 @@ import {
|
|
37
37
|
import "./chunk-OC7BQLYI.mjs";
|
38
38
|
import "./chunk-S4DMV3ZT.mjs";
|
39
39
|
import "./chunk-67ORSRVT.mjs";
|
40
|
-
import "./chunk-
|
40
|
+
import "./chunk-LFSI4NJU.mjs";
|
41
41
|
import "./chunk-KOSCMAIC.mjs";
|
42
|
-
import "./chunk-5U3FFMC7.mjs";
|
43
42
|
import "./chunk-X6DSNTTX.mjs";
|
44
43
|
import "./chunk-I6E6CALJ.mjs";
|
45
44
|
import "./chunk-RGP3IXX4.mjs";
|
@@ -21,9 +21,8 @@ import "./chunk-OZPB6JBL.mjs";
|
|
21
21
|
import "./chunk-OC7BQLYI.mjs";
|
22
22
|
import "./chunk-S4DMV3ZT.mjs";
|
23
23
|
import "./chunk-67ORSRVT.mjs";
|
24
|
-
import "./chunk-
|
24
|
+
import "./chunk-LFSI4NJU.mjs";
|
25
25
|
import "./chunk-KOSCMAIC.mjs";
|
26
|
-
import "./chunk-5U3FFMC7.mjs";
|
27
26
|
import "./chunk-X6DSNTTX.mjs";
|
28
27
|
import "./chunk-I6E6CALJ.mjs";
|
29
28
|
import "./chunk-RGP3IXX4.mjs";
|
package/dist/{customers-add-customer-group-BVUVU46N.mjs → customers-add-customer-group-B2A4NE3V.mjs}
RENAMED
@@ -34,9 +34,8 @@ import "./chunk-OC7BQLYI.mjs";
|
|
34
34
|
import "./chunk-S4DMV3ZT.mjs";
|
35
35
|
import "./chunk-67ORSRVT.mjs";
|
36
36
|
import "./chunk-OBQI23QM.mjs";
|
37
|
-
import "./chunk-
|
37
|
+
import "./chunk-LFSI4NJU.mjs";
|
38
38
|
import "./chunk-KOSCMAIC.mjs";
|
39
|
-
import "./chunk-5U3FFMC7.mjs";
|
40
39
|
import "./chunk-X6DSNTTX.mjs";
|
41
40
|
import "./chunk-I6E6CALJ.mjs";
|
42
41
|
import "./chunk-RGP3IXX4.mjs";
|
@@ -13,9 +13,8 @@ import {
|
|
13
13
|
} from "./chunk-4TC5YS65.mjs";
|
14
14
|
import "./chunk-S4DMV3ZT.mjs";
|
15
15
|
import "./chunk-OBQI23QM.mjs";
|
16
|
-
import "./chunk-
|
16
|
+
import "./chunk-LFSI4NJU.mjs";
|
17
17
|
import "./chunk-KOSCMAIC.mjs";
|
18
|
-
import "./chunk-5U3FFMC7.mjs";
|
19
18
|
import "./chunk-X6DSNTTX.mjs";
|
20
19
|
import "./chunk-I6E6CALJ.mjs";
|
21
20
|
import "./chunk-RGP3IXX4.mjs";
|
@@ -35,9 +35,8 @@ import {
|
|
35
35
|
import {
|
36
36
|
Form
|
37
37
|
} from "./chunk-OBQI23QM.mjs";
|
38
|
-
import "./chunk-
|
38
|
+
import "./chunk-LFSI4NJU.mjs";
|
39
39
|
import "./chunk-KOSCMAIC.mjs";
|
40
|
-
import "./chunk-5U3FFMC7.mjs";
|
41
40
|
import "./chunk-X6DSNTTX.mjs";
|
42
41
|
import "./chunk-I6E6CALJ.mjs";
|
43
42
|
import "./chunk-RGP3IXX4.mjs";
|
@@ -54,9 +54,8 @@ import {
|
|
54
54
|
import "./chunk-OC7BQLYI.mjs";
|
55
55
|
import "./chunk-S4DMV3ZT.mjs";
|
56
56
|
import "./chunk-67ORSRVT.mjs";
|
57
|
-
import "./chunk-
|
57
|
+
import "./chunk-LFSI4NJU.mjs";
|
58
58
|
import "./chunk-KOSCMAIC.mjs";
|
59
|
-
import "./chunk-5U3FFMC7.mjs";
|
60
59
|
import "./chunk-X6DSNTTX.mjs";
|
61
60
|
import "./chunk-I6E6CALJ.mjs";
|
62
61
|
import "./chunk-RGP3IXX4.mjs";
|
@@ -11,9 +11,8 @@ import "./chunk-LPEUYMRK.mjs";
|
|
11
11
|
import "./chunk-OC7BQLYI.mjs";
|
12
12
|
import "./chunk-S4DMV3ZT.mjs";
|
13
13
|
import "./chunk-OBQI23QM.mjs";
|
14
|
-
import "./chunk-
|
14
|
+
import "./chunk-LFSI4NJU.mjs";
|
15
15
|
import "./chunk-KOSCMAIC.mjs";
|
16
|
-
import "./chunk-5U3FFMC7.mjs";
|
17
16
|
import "./chunk-X6DSNTTX.mjs";
|
18
17
|
import "./chunk-I6E6CALJ.mjs";
|
19
18
|
import "./chunk-RGP3IXX4.mjs";
|