@medusajs/draft-order 2.23.1 → 2.23.2-snapshot-20261127103409
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/.medusa/server/src/admin/index.mjs +181 -181
- package/package.json +18 -18
|
@@ -6001,77 +6001,6 @@ var CustomItemsForm = () => {
|
|
|
6001
6001
|
};
|
|
6002
6002
|
var schema$4 = z.object({ email: z.string().email() });
|
|
6003
6003
|
var handle$8 = { permissions: EDIT_DRAFT_ORDER_PERMISSIONS };
|
|
6004
|
-
// src/admin/routes/draft-orders/[id]/@email/page.tsx
|
|
6005
|
-
var Email = () => {
|
|
6006
|
-
const { id } = useParams();
|
|
6007
|
-
const { order, isPending, isError, error } = useOrder(id, { fields: "+email" });
|
|
6008
|
-
if (isError) throw error;
|
|
6009
|
-
const isReady = !isPending && !!order;
|
|
6010
|
-
return /* @__PURE__ */ jsxs(RouteDrawer, { children: [/* @__PURE__ */ jsxs(RouteDrawer.Header, { children: [/* @__PURE__ */ jsx(RouteDrawer.Title, {
|
|
6011
|
-
asChild: true,
|
|
6012
|
-
children: /* @__PURE__ */ jsx(Heading, { children: "Edit Email" })
|
|
6013
|
-
}), /* @__PURE__ */ jsx(RouteDrawer.Description, {
|
|
6014
|
-
asChild: true,
|
|
6015
|
-
children: /* @__PURE__ */ jsx("span", {
|
|
6016
|
-
className: "sr-only",
|
|
6017
|
-
children: "Edit the email for the draft order"
|
|
6018
|
-
})
|
|
6019
|
-
})] }), isReady && /* @__PURE__ */ jsx(EmailForm, { order })] });
|
|
6020
|
-
};
|
|
6021
|
-
var EmailForm = ({ order }) => {
|
|
6022
|
-
const form = useForm({
|
|
6023
|
-
defaultValues: { email: order.email ?? "" },
|
|
6024
|
-
resolver: zodResolver(schema$3)
|
|
6025
|
-
});
|
|
6026
|
-
const { mutateAsync, isPending } = useUpdateDraftOrder(order.id);
|
|
6027
|
-
const { handleSuccess } = useRouteModal();
|
|
6028
|
-
const onSubmit = form.handleSubmit(async (data) => {
|
|
6029
|
-
await mutateAsync({ email: data.email }, {
|
|
6030
|
-
onSuccess: () => {
|
|
6031
|
-
handleSuccess();
|
|
6032
|
-
},
|
|
6033
|
-
onError: (error) => {
|
|
6034
|
-
toast.error(error.message);
|
|
6035
|
-
}
|
|
6036
|
-
});
|
|
6037
|
-
});
|
|
6038
|
-
return /* @__PURE__ */ jsx(RouteDrawer.Form, {
|
|
6039
|
-
form,
|
|
6040
|
-
children: /* @__PURE__ */ jsxs(KeyboundForm, {
|
|
6041
|
-
className: "flex flex-1 flex-col overflow-hidden",
|
|
6042
|
-
onSubmit,
|
|
6043
|
-
children: [/* @__PURE__ */ jsx(RouteDrawer.Body, {
|
|
6044
|
-
className: "flex flex-col gap-y-6 overflow-y-auto",
|
|
6045
|
-
children: /* @__PURE__ */ jsx(Form$2.Field, {
|
|
6046
|
-
control: form.control,
|
|
6047
|
-
name: "email",
|
|
6048
|
-
render: ({ field }) => /* @__PURE__ */ jsxs(Form$2.Item, { children: [
|
|
6049
|
-
/* @__PURE__ */ jsx(Form$2.Label, { children: "Email" }),
|
|
6050
|
-
/* @__PURE__ */ jsx(Form$2.Control, { children: /* @__PURE__ */ jsx(Input, { ...field }) }),
|
|
6051
|
-
/* @__PURE__ */ jsx(Form$2.ErrorMessage, {})
|
|
6052
|
-
] })
|
|
6053
|
-
})
|
|
6054
|
-
}), /* @__PURE__ */ jsx(RouteDrawer.Footer, { children: /* @__PURE__ */ jsxs("div", {
|
|
6055
|
-
className: "flex justify-end gap-2",
|
|
6056
|
-
children: [/* @__PURE__ */ jsx(RouteDrawer.Close, {
|
|
6057
|
-
asChild: true,
|
|
6058
|
-
children: /* @__PURE__ */ jsx(Button, {
|
|
6059
|
-
size: "small",
|
|
6060
|
-
variant: "secondary",
|
|
6061
|
-
children: "Cancel"
|
|
6062
|
-
})
|
|
6063
|
-
}), /* @__PURE__ */ jsx(Button, {
|
|
6064
|
-
size: "small",
|
|
6065
|
-
type: "submit",
|
|
6066
|
-
isLoading: isPending,
|
|
6067
|
-
children: "Save"
|
|
6068
|
-
})]
|
|
6069
|
-
}) })]
|
|
6070
|
-
})
|
|
6071
|
-
});
|
|
6072
|
-
};
|
|
6073
|
-
var schema$3 = z.object({ email: z.string().email() });
|
|
6074
|
-
var handle$7 = { permissions: EDIT_DRAFT_ORDER_PERMISSIONS };
|
|
6075
6004
|
// src/admin/components/inputs/number-input.tsx
|
|
6076
6005
|
var NumberInput = forwardRef(({ value, onChange, size = "base", min = 0, max, step = 1, className, disabled, ...props }, ref) => {
|
|
6077
6006
|
const handleChange = (event) => {
|
|
@@ -7138,6 +7067,77 @@ var customItemSchema = z.object({
|
|
|
7138
7067
|
quantity: z.number(),
|
|
7139
7068
|
unit_price: z.union([z.number(), z.string()])
|
|
7140
7069
|
});
|
|
7070
|
+
var handle$7 = { permissions: EDIT_DRAFT_ORDER_PERMISSIONS };
|
|
7071
|
+
// src/admin/routes/draft-orders/[id]/@email/page.tsx
|
|
7072
|
+
var Email = () => {
|
|
7073
|
+
const { id } = useParams();
|
|
7074
|
+
const { order, isPending, isError, error } = useOrder(id, { fields: "+email" });
|
|
7075
|
+
if (isError) throw error;
|
|
7076
|
+
const isReady = !isPending && !!order;
|
|
7077
|
+
return /* @__PURE__ */ jsxs(RouteDrawer, { children: [/* @__PURE__ */ jsxs(RouteDrawer.Header, { children: [/* @__PURE__ */ jsx(RouteDrawer.Title, {
|
|
7078
|
+
asChild: true,
|
|
7079
|
+
children: /* @__PURE__ */ jsx(Heading, { children: "Edit Email" })
|
|
7080
|
+
}), /* @__PURE__ */ jsx(RouteDrawer.Description, {
|
|
7081
|
+
asChild: true,
|
|
7082
|
+
children: /* @__PURE__ */ jsx("span", {
|
|
7083
|
+
className: "sr-only",
|
|
7084
|
+
children: "Edit the email for the draft order"
|
|
7085
|
+
})
|
|
7086
|
+
})] }), isReady && /* @__PURE__ */ jsx(EmailForm, { order })] });
|
|
7087
|
+
};
|
|
7088
|
+
var EmailForm = ({ order }) => {
|
|
7089
|
+
const form = useForm({
|
|
7090
|
+
defaultValues: { email: order.email ?? "" },
|
|
7091
|
+
resolver: zodResolver(schema$3)
|
|
7092
|
+
});
|
|
7093
|
+
const { mutateAsync, isPending } = useUpdateDraftOrder(order.id);
|
|
7094
|
+
const { handleSuccess } = useRouteModal();
|
|
7095
|
+
const onSubmit = form.handleSubmit(async (data) => {
|
|
7096
|
+
await mutateAsync({ email: data.email }, {
|
|
7097
|
+
onSuccess: () => {
|
|
7098
|
+
handleSuccess();
|
|
7099
|
+
},
|
|
7100
|
+
onError: (error) => {
|
|
7101
|
+
toast.error(error.message);
|
|
7102
|
+
}
|
|
7103
|
+
});
|
|
7104
|
+
});
|
|
7105
|
+
return /* @__PURE__ */ jsx(RouteDrawer.Form, {
|
|
7106
|
+
form,
|
|
7107
|
+
children: /* @__PURE__ */ jsxs(KeyboundForm, {
|
|
7108
|
+
className: "flex flex-1 flex-col overflow-hidden",
|
|
7109
|
+
onSubmit,
|
|
7110
|
+
children: [/* @__PURE__ */ jsx(RouteDrawer.Body, {
|
|
7111
|
+
className: "flex flex-col gap-y-6 overflow-y-auto",
|
|
7112
|
+
children: /* @__PURE__ */ jsx(Form$2.Field, {
|
|
7113
|
+
control: form.control,
|
|
7114
|
+
name: "email",
|
|
7115
|
+
render: ({ field }) => /* @__PURE__ */ jsxs(Form$2.Item, { children: [
|
|
7116
|
+
/* @__PURE__ */ jsx(Form$2.Label, { children: "Email" }),
|
|
7117
|
+
/* @__PURE__ */ jsx(Form$2.Control, { children: /* @__PURE__ */ jsx(Input, { ...field }) }),
|
|
7118
|
+
/* @__PURE__ */ jsx(Form$2.ErrorMessage, {})
|
|
7119
|
+
] })
|
|
7120
|
+
})
|
|
7121
|
+
}), /* @__PURE__ */ jsx(RouteDrawer.Footer, { children: /* @__PURE__ */ jsxs("div", {
|
|
7122
|
+
className: "flex justify-end gap-2",
|
|
7123
|
+
children: [/* @__PURE__ */ jsx(RouteDrawer.Close, {
|
|
7124
|
+
asChild: true,
|
|
7125
|
+
children: /* @__PURE__ */ jsx(Button, {
|
|
7126
|
+
size: "small",
|
|
7127
|
+
variant: "secondary",
|
|
7128
|
+
children: "Cancel"
|
|
7129
|
+
})
|
|
7130
|
+
}), /* @__PURE__ */ jsx(Button, {
|
|
7131
|
+
size: "small",
|
|
7132
|
+
type: "submit",
|
|
7133
|
+
isLoading: isPending,
|
|
7134
|
+
children: "Save"
|
|
7135
|
+
})]
|
|
7136
|
+
}) })]
|
|
7137
|
+
})
|
|
7138
|
+
});
|
|
7139
|
+
};
|
|
7140
|
+
var schema$3 = z.object({ email: z.string().email() });
|
|
7141
7141
|
var handle$6 = { permissions: EDIT_DRAFT_ORDER_PERMISSIONS };
|
|
7142
7142
|
// src/admin/components/common/inline-tip.tsx
|
|
7143
7143
|
/**
|
|
@@ -7431,6 +7431,107 @@ function getHasUneditableRows(metadata) {
|
|
|
7431
7431
|
return Object.values(metadata).some((value) => !EDITABLE_TYPES.includes(typeof value));
|
|
7432
7432
|
}
|
|
7433
7433
|
var handle$5 = { permissions: EDIT_DRAFT_ORDER_PERMISSIONS };
|
|
7434
|
+
// src/admin/routes/draft-orders/[id]/@sales-channel/page.tsx
|
|
7435
|
+
var SalesChannel = () => {
|
|
7436
|
+
const { id } = useParams();
|
|
7437
|
+
const { draft_order, isPending, isError, error } = useDraftOrder(id, { fields: "+sales_channel_id" }, { enabled: !!id });
|
|
7438
|
+
if (isError) throw error;
|
|
7439
|
+
const ISrEADY = !!draft_order && !isPending;
|
|
7440
|
+
return /* @__PURE__ */ jsxs(RouteDrawer, { children: [/* @__PURE__ */ jsxs(RouteDrawer.Header, { children: [/* @__PURE__ */ jsx(RouteDrawer.Title, {
|
|
7441
|
+
asChild: true,
|
|
7442
|
+
children: /* @__PURE__ */ jsx(Heading, { children: "Edit Sales Channel" })
|
|
7443
|
+
}), /* @__PURE__ */ jsx(RouteDrawer.Description, {
|
|
7444
|
+
asChild: true,
|
|
7445
|
+
children: /* @__PURE__ */ jsx("span", {
|
|
7446
|
+
className: "sr-only",
|
|
7447
|
+
children: "Update which sales channel the draft order is associated with"
|
|
7448
|
+
})
|
|
7449
|
+
})] }), ISrEADY && /* @__PURE__ */ jsx(SalesChannelForm, { order: draft_order })] });
|
|
7450
|
+
};
|
|
7451
|
+
var SalesChannelForm = ({ order }) => {
|
|
7452
|
+
const form = useForm({
|
|
7453
|
+
defaultValues: { sales_channel_id: order.sales_channel_id || "" },
|
|
7454
|
+
resolver: zodResolver(schema$2)
|
|
7455
|
+
});
|
|
7456
|
+
const { mutateAsync, isPending } = useUpdateDraftOrder(order.id);
|
|
7457
|
+
const { handleSuccess } = useRouteModal();
|
|
7458
|
+
const onSubmit = form.handleSubmit(async (data) => {
|
|
7459
|
+
await mutateAsync({ sales_channel_id: data.sales_channel_id }, {
|
|
7460
|
+
onSuccess: () => {
|
|
7461
|
+
toast.success("Sales channel updated");
|
|
7462
|
+
handleSuccess();
|
|
7463
|
+
},
|
|
7464
|
+
onError: (error) => {
|
|
7465
|
+
toast.error(error.message);
|
|
7466
|
+
}
|
|
7467
|
+
});
|
|
7468
|
+
});
|
|
7469
|
+
return /* @__PURE__ */ jsx(RouteDrawer.Form, {
|
|
7470
|
+
form,
|
|
7471
|
+
children: /* @__PURE__ */ jsxs(KeyboundForm, {
|
|
7472
|
+
className: "flex flex-1 flex-col overflow-hidden",
|
|
7473
|
+
onSubmit,
|
|
7474
|
+
children: [/* @__PURE__ */ jsx(RouteDrawer.Body, {
|
|
7475
|
+
className: "flex flex-col gap-y-6 overflow-y-auto",
|
|
7476
|
+
children: /* @__PURE__ */ jsx(SalesChannelField, {
|
|
7477
|
+
control: form.control,
|
|
7478
|
+
order
|
|
7479
|
+
})
|
|
7480
|
+
}), /* @__PURE__ */ jsx(RouteDrawer.Footer, { children: /* @__PURE__ */ jsxs("div", {
|
|
7481
|
+
className: "flex justify-end gap-2",
|
|
7482
|
+
children: [/* @__PURE__ */ jsx(RouteDrawer.Close, {
|
|
7483
|
+
asChild: true,
|
|
7484
|
+
children: /* @__PURE__ */ jsx(Button, {
|
|
7485
|
+
size: "small",
|
|
7486
|
+
variant: "secondary",
|
|
7487
|
+
children: "Cancel"
|
|
7488
|
+
})
|
|
7489
|
+
}), /* @__PURE__ */ jsx(Button, {
|
|
7490
|
+
size: "small",
|
|
7491
|
+
type: "submit",
|
|
7492
|
+
isLoading: isPending,
|
|
7493
|
+
children: "Save"
|
|
7494
|
+
})]
|
|
7495
|
+
}) })]
|
|
7496
|
+
})
|
|
7497
|
+
});
|
|
7498
|
+
};
|
|
7499
|
+
var SalesChannelField = ({ control, order }) => {
|
|
7500
|
+
const salesChannels = useComboboxData({
|
|
7501
|
+
queryFn: async (params) => {
|
|
7502
|
+
return await sdk.admin.salesChannel.list(params);
|
|
7503
|
+
},
|
|
7504
|
+
queryKey: ["sales-channels"],
|
|
7505
|
+
getOptions: (data) => {
|
|
7506
|
+
return data.sales_channels.map((salesChannel) => ({
|
|
7507
|
+
label: salesChannel.name,
|
|
7508
|
+
value: salesChannel.id
|
|
7509
|
+
}));
|
|
7510
|
+
},
|
|
7511
|
+
defaultValue: order.sales_channel_id || void 0
|
|
7512
|
+
});
|
|
7513
|
+
return /* @__PURE__ */ jsx(Form$2.Field, {
|
|
7514
|
+
control,
|
|
7515
|
+
name: "sales_channel_id",
|
|
7516
|
+
render: ({ field }) => {
|
|
7517
|
+
return /* @__PURE__ */ jsxs(Form$2.Item, { children: [
|
|
7518
|
+
/* @__PURE__ */ jsx(Form$2.Label, { children: "Sales Channel" }),
|
|
7519
|
+
/* @__PURE__ */ jsx(Form$2.Control, { children: /* @__PURE__ */ jsx(Combobox$1, {
|
|
7520
|
+
options: salesChannels.options,
|
|
7521
|
+
fetchNextPage: salesChannels.fetchNextPage,
|
|
7522
|
+
isFetchingNextPage: salesChannels.isFetchingNextPage,
|
|
7523
|
+
searchValue: salesChannels.searchValue,
|
|
7524
|
+
onSearchValueChange: salesChannels.onSearchValueChange,
|
|
7525
|
+
placeholder: "Select sales channel",
|
|
7526
|
+
...field
|
|
7527
|
+
}) }),
|
|
7528
|
+
/* @__PURE__ */ jsx(Form$2.ErrorMessage, {})
|
|
7529
|
+
] });
|
|
7530
|
+
}
|
|
7531
|
+
});
|
|
7532
|
+
};
|
|
7533
|
+
var schema$2 = z.object({ sales_channel_id: z.string().min(1) });
|
|
7534
|
+
var handle$4 = { permissions: EDIT_DRAFT_ORDER_SALES_CHANNEL_PERMISSIONS };
|
|
7434
7535
|
// src/admin/hooks/api/promotions.tsx
|
|
7435
7536
|
var PROMOTION_QUERY_KEY = "promotions";
|
|
7436
7537
|
var promotionsQueryKeys = {
|
|
@@ -7672,108 +7773,7 @@ function getPromotionIds(items, shippingMethods) {
|
|
|
7672
7773
|
}
|
|
7673
7774
|
return Array.from(promotionIds);
|
|
7674
7775
|
}
|
|
7675
|
-
var handle$
|
|
7676
|
-
// src/admin/routes/draft-orders/[id]/@sales-channel/page.tsx
|
|
7677
|
-
var SalesChannel = () => {
|
|
7678
|
-
const { id } = useParams();
|
|
7679
|
-
const { draft_order, isPending, isError, error } = useDraftOrder(id, { fields: "+sales_channel_id" }, { enabled: !!id });
|
|
7680
|
-
if (isError) throw error;
|
|
7681
|
-
const ISrEADY = !!draft_order && !isPending;
|
|
7682
|
-
return /* @__PURE__ */ jsxs(RouteDrawer, { children: [/* @__PURE__ */ jsxs(RouteDrawer.Header, { children: [/* @__PURE__ */ jsx(RouteDrawer.Title, {
|
|
7683
|
-
asChild: true,
|
|
7684
|
-
children: /* @__PURE__ */ jsx(Heading, { children: "Edit Sales Channel" })
|
|
7685
|
-
}), /* @__PURE__ */ jsx(RouteDrawer.Description, {
|
|
7686
|
-
asChild: true,
|
|
7687
|
-
children: /* @__PURE__ */ jsx("span", {
|
|
7688
|
-
className: "sr-only",
|
|
7689
|
-
children: "Update which sales channel the draft order is associated with"
|
|
7690
|
-
})
|
|
7691
|
-
})] }), ISrEADY && /* @__PURE__ */ jsx(SalesChannelForm, { order: draft_order })] });
|
|
7692
|
-
};
|
|
7693
|
-
var SalesChannelForm = ({ order }) => {
|
|
7694
|
-
const form = useForm({
|
|
7695
|
-
defaultValues: { sales_channel_id: order.sales_channel_id || "" },
|
|
7696
|
-
resolver: zodResolver(schema$2)
|
|
7697
|
-
});
|
|
7698
|
-
const { mutateAsync, isPending } = useUpdateDraftOrder(order.id);
|
|
7699
|
-
const { handleSuccess } = useRouteModal();
|
|
7700
|
-
const onSubmit = form.handleSubmit(async (data) => {
|
|
7701
|
-
await mutateAsync({ sales_channel_id: data.sales_channel_id }, {
|
|
7702
|
-
onSuccess: () => {
|
|
7703
|
-
toast.success("Sales channel updated");
|
|
7704
|
-
handleSuccess();
|
|
7705
|
-
},
|
|
7706
|
-
onError: (error) => {
|
|
7707
|
-
toast.error(error.message);
|
|
7708
|
-
}
|
|
7709
|
-
});
|
|
7710
|
-
});
|
|
7711
|
-
return /* @__PURE__ */ jsx(RouteDrawer.Form, {
|
|
7712
|
-
form,
|
|
7713
|
-
children: /* @__PURE__ */ jsxs(KeyboundForm, {
|
|
7714
|
-
className: "flex flex-1 flex-col overflow-hidden",
|
|
7715
|
-
onSubmit,
|
|
7716
|
-
children: [/* @__PURE__ */ jsx(RouteDrawer.Body, {
|
|
7717
|
-
className: "flex flex-col gap-y-6 overflow-y-auto",
|
|
7718
|
-
children: /* @__PURE__ */ jsx(SalesChannelField, {
|
|
7719
|
-
control: form.control,
|
|
7720
|
-
order
|
|
7721
|
-
})
|
|
7722
|
-
}), /* @__PURE__ */ jsx(RouteDrawer.Footer, { children: /* @__PURE__ */ jsxs("div", {
|
|
7723
|
-
className: "flex justify-end gap-2",
|
|
7724
|
-
children: [/* @__PURE__ */ jsx(RouteDrawer.Close, {
|
|
7725
|
-
asChild: true,
|
|
7726
|
-
children: /* @__PURE__ */ jsx(Button, {
|
|
7727
|
-
size: "small",
|
|
7728
|
-
variant: "secondary",
|
|
7729
|
-
children: "Cancel"
|
|
7730
|
-
})
|
|
7731
|
-
}), /* @__PURE__ */ jsx(Button, {
|
|
7732
|
-
size: "small",
|
|
7733
|
-
type: "submit",
|
|
7734
|
-
isLoading: isPending,
|
|
7735
|
-
children: "Save"
|
|
7736
|
-
})]
|
|
7737
|
-
}) })]
|
|
7738
|
-
})
|
|
7739
|
-
});
|
|
7740
|
-
};
|
|
7741
|
-
var SalesChannelField = ({ control, order }) => {
|
|
7742
|
-
const salesChannels = useComboboxData({
|
|
7743
|
-
queryFn: async (params) => {
|
|
7744
|
-
return await sdk.admin.salesChannel.list(params);
|
|
7745
|
-
},
|
|
7746
|
-
queryKey: ["sales-channels"],
|
|
7747
|
-
getOptions: (data) => {
|
|
7748
|
-
return data.sales_channels.map((salesChannel) => ({
|
|
7749
|
-
label: salesChannel.name,
|
|
7750
|
-
value: salesChannel.id
|
|
7751
|
-
}));
|
|
7752
|
-
},
|
|
7753
|
-
defaultValue: order.sales_channel_id || void 0
|
|
7754
|
-
});
|
|
7755
|
-
return /* @__PURE__ */ jsx(Form$2.Field, {
|
|
7756
|
-
control,
|
|
7757
|
-
name: "sales_channel_id",
|
|
7758
|
-
render: ({ field }) => {
|
|
7759
|
-
return /* @__PURE__ */ jsxs(Form$2.Item, { children: [
|
|
7760
|
-
/* @__PURE__ */ jsx(Form$2.Label, { children: "Sales Channel" }),
|
|
7761
|
-
/* @__PURE__ */ jsx(Form$2.Control, { children: /* @__PURE__ */ jsx(Combobox$1, {
|
|
7762
|
-
options: salesChannels.options,
|
|
7763
|
-
fetchNextPage: salesChannels.fetchNextPage,
|
|
7764
|
-
isFetchingNextPage: salesChannels.isFetchingNextPage,
|
|
7765
|
-
searchValue: salesChannels.searchValue,
|
|
7766
|
-
onSearchValueChange: salesChannels.onSearchValueChange,
|
|
7767
|
-
placeholder: "Select sales channel",
|
|
7768
|
-
...field
|
|
7769
|
-
}) }),
|
|
7770
|
-
/* @__PURE__ */ jsx(Form$2.ErrorMessage, {})
|
|
7771
|
-
] });
|
|
7772
|
-
}
|
|
7773
|
-
});
|
|
7774
|
-
};
|
|
7775
|
-
var schema$2 = z.object({ sales_channel_id: z.string().min(1) });
|
|
7776
|
-
var handle$3 = { permissions: EDIT_DRAFT_ORDER_SALES_CHANNEL_PERMISSIONS };
|
|
7776
|
+
var handle$3 = { permissions: EDIT_DRAFT_ORDER_PROMOTIONS_PERMISSIONS };
|
|
7777
7777
|
// src/admin/routes/draft-orders/[id]/@shipping/page.tsx
|
|
7778
7778
|
var STACKED_FOCUS_MODAL_ID = "shipping-form";
|
|
7779
7779
|
var Shipping = () => {
|
|
@@ -9587,13 +9587,13 @@ var plugin = {
|
|
|
9587
9587
|
handle: handle$8
|
|
9588
9588
|
},
|
|
9589
9589
|
{
|
|
9590
|
-
Component:
|
|
9591
|
-
path: "/draft-orders/:id/
|
|
9590
|
+
Component: Items,
|
|
9591
|
+
path: "/draft-orders/:id/items",
|
|
9592
9592
|
handle: handle$7
|
|
9593
9593
|
},
|
|
9594
9594
|
{
|
|
9595
|
-
Component:
|
|
9596
|
-
path: "/draft-orders/:id/
|
|
9595
|
+
Component: Email,
|
|
9596
|
+
path: "/draft-orders/:id/email",
|
|
9597
9597
|
handle: handle$6
|
|
9598
9598
|
},
|
|
9599
9599
|
{
|
|
@@ -9602,13 +9602,13 @@ var plugin = {
|
|
|
9602
9602
|
handle: handle$5
|
|
9603
9603
|
},
|
|
9604
9604
|
{
|
|
9605
|
-
Component:
|
|
9606
|
-
path: "/draft-orders/:id/
|
|
9605
|
+
Component: SalesChannel,
|
|
9606
|
+
path: "/draft-orders/:id/sales-channel",
|
|
9607
9607
|
handle: handle$4
|
|
9608
9608
|
},
|
|
9609
9609
|
{
|
|
9610
|
-
Component:
|
|
9611
|
-
path: "/draft-orders/:id/
|
|
9610
|
+
Component: Promotions,
|
|
9611
|
+
path: "/draft-orders/:id/promotions",
|
|
9612
9612
|
handle: handle$3
|
|
9613
9613
|
},
|
|
9614
9614
|
{
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@medusajs/draft-order",
|
|
3
|
-
"version": "2.23.
|
|
3
|
+
"version": "2.23.2-snapshot-20261127103409",
|
|
4
4
|
"description": "A draft order plugin for Medusa.",
|
|
5
5
|
"author": "Medusa (https://medusajs.com)",
|
|
6
6
|
"license": "MIT",
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
"@ariakit/react": "^0.4.15",
|
|
51
51
|
"@babel/runtime": "^8.0.10",
|
|
52
52
|
"@hookform/resolvers": "6.0.0",
|
|
53
|
-
"@medusajs/js-sdk": "2.23.
|
|
53
|
+
"@medusajs/js-sdk": "2.23.2-snapshot-20261127103409",
|
|
54
54
|
"@tanstack/react-query": "5.107.1",
|
|
55
55
|
"@uiw/react-json-view": "^2.0.0-alpha.17",
|
|
56
56
|
"date-fns": "^4.4.0",
|
|
@@ -62,25 +62,25 @@
|
|
|
62
62
|
"zod": "4.6.7"
|
|
63
63
|
},
|
|
64
64
|
"devDependencies": {
|
|
65
|
-
"@medusajs/admin-sdk": "2.23.
|
|
66
|
-
"@medusajs/cli": "2.23.
|
|
67
|
-
"@medusajs/dashboard": "2.23.
|
|
68
|
-
"@medusajs/framework": "2.23.
|
|
69
|
-
"@medusajs/icons": "2.23.
|
|
70
|
-
"@medusajs/test-utils": "2.23.
|
|
71
|
-
"@medusajs/types": "2.23.
|
|
72
|
-
"@medusajs/ui": "4.3.
|
|
73
|
-
"@medusajs/ui-preset": "2.23.
|
|
65
|
+
"@medusajs/admin-sdk": "2.23.2-snapshot-20261127103409",
|
|
66
|
+
"@medusajs/cli": "2.23.2-snapshot-20261127103409",
|
|
67
|
+
"@medusajs/dashboard": "2.23.2-snapshot-20261127103409",
|
|
68
|
+
"@medusajs/framework": "2.23.2-snapshot-20261127103409",
|
|
69
|
+
"@medusajs/icons": "2.23.2-snapshot-20261127103409",
|
|
70
|
+
"@medusajs/test-utils": "2.23.2-snapshot-20261127103409",
|
|
71
|
+
"@medusajs/types": "2.23.2-snapshot-20261127103409",
|
|
72
|
+
"@medusajs/ui": "4.3.2-snapshot-20261127103409",
|
|
73
|
+
"@medusajs/ui-preset": "2.23.2-snapshot-20261127103409",
|
|
74
74
|
"cross-env": "^10.1.0"
|
|
75
75
|
},
|
|
76
76
|
"peerDependencies": {
|
|
77
|
-
"@medusajs/admin-sdk": "2.23.
|
|
78
|
-
"@medusajs/cli": "2.23.
|
|
79
|
-
"@medusajs/dashboard": "2.23.
|
|
80
|
-
"@medusajs/framework": "2.23.
|
|
81
|
-
"@medusajs/icons": "2.23.
|
|
82
|
-
"@medusajs/test-utils": "2.23.
|
|
83
|
-
"@medusajs/ui": "4.3.
|
|
77
|
+
"@medusajs/admin-sdk": "2.23.2-snapshot-20261127103409",
|
|
78
|
+
"@medusajs/cli": "2.23.2-snapshot-20261127103409",
|
|
79
|
+
"@medusajs/dashboard": "2.23.2-snapshot-20261127103409",
|
|
80
|
+
"@medusajs/framework": "2.23.2-snapshot-20261127103409",
|
|
81
|
+
"@medusajs/icons": "2.23.2-snapshot-20261127103409",
|
|
82
|
+
"@medusajs/test-utils": "2.23.2-snapshot-20261127103409",
|
|
83
|
+
"@medusajs/ui": "4.3.2-snapshot-20261127103409",
|
|
84
84
|
"react": "^19.3.1",
|
|
85
85
|
"react-dom": "^19.3.1",
|
|
86
86
|
"react-router-dom": "^6.30.4 || ^7.0.0"
|