@medusajs/draft-order 2.23.1 → 2.23.2-snapshot-20261127104753
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 +200 -200
- package/package.json +18 -18
|
@@ -7774,6 +7774,201 @@ var SalesChannelField = ({ control, order }) => {
|
|
|
7774
7774
|
};
|
|
7775
7775
|
var schema$2 = z.object({ sales_channel_id: z.string().min(1) });
|
|
7776
7776
|
var handle$3 = { permissions: EDIT_DRAFT_ORDER_SALES_CHANNEL_PERMISSIONS };
|
|
7777
|
+
// src/admin/routes/draft-orders/[id]/@shipping-address/page.tsx
|
|
7778
|
+
var ShippingAddress = () => {
|
|
7779
|
+
const { id } = useParams();
|
|
7780
|
+
const { order, isPending, isError, error } = useOrder(id, { fields: "+shipping_address" });
|
|
7781
|
+
if (isError) throw error;
|
|
7782
|
+
const isReady = !isPending && !!order;
|
|
7783
|
+
return /* @__PURE__ */ jsxs(RouteDrawer, { children: [/* @__PURE__ */ jsxs(RouteDrawer.Header, { children: [/* @__PURE__ */ jsx(RouteDrawer.Title, {
|
|
7784
|
+
asChild: true,
|
|
7785
|
+
children: /* @__PURE__ */ jsx(Heading, { children: "Edit Shipping Address" })
|
|
7786
|
+
}), /* @__PURE__ */ jsx(RouteDrawer.Description, {
|
|
7787
|
+
asChild: true,
|
|
7788
|
+
children: /* @__PURE__ */ jsx("span", {
|
|
7789
|
+
className: "sr-only",
|
|
7790
|
+
children: "Edit the shipping address for the draft order"
|
|
7791
|
+
})
|
|
7792
|
+
})] }), isReady && /* @__PURE__ */ jsx(ShippingAddressForm, { order })] });
|
|
7793
|
+
};
|
|
7794
|
+
var ShippingAddressForm = ({ order }) => {
|
|
7795
|
+
const form = useForm({
|
|
7796
|
+
defaultValues: {
|
|
7797
|
+
first_name: order.shipping_address?.first_name ?? "",
|
|
7798
|
+
last_name: order.shipping_address?.last_name ?? "",
|
|
7799
|
+
company: order.shipping_address?.company ?? "",
|
|
7800
|
+
address_1: order.shipping_address?.address_1 ?? "",
|
|
7801
|
+
address_2: order.shipping_address?.address_2 ?? "",
|
|
7802
|
+
city: order.shipping_address?.city ?? "",
|
|
7803
|
+
province: order.shipping_address?.province ?? "",
|
|
7804
|
+
country_code: order.shipping_address?.country_code ?? "",
|
|
7805
|
+
postal_code: order.shipping_address?.postal_code ?? "",
|
|
7806
|
+
phone: order.shipping_address?.phone ?? ""
|
|
7807
|
+
},
|
|
7808
|
+
resolver: zodResolver(schema$1)
|
|
7809
|
+
});
|
|
7810
|
+
const { mutateAsync, isPending } = useUpdateDraftOrder(order.id);
|
|
7811
|
+
const { handleSuccess } = useRouteModal();
|
|
7812
|
+
const onSubmit = form.handleSubmit(async (data) => {
|
|
7813
|
+
await mutateAsync({ shipping_address: {
|
|
7814
|
+
first_name: data.first_name,
|
|
7815
|
+
last_name: data.last_name,
|
|
7816
|
+
company: data.company,
|
|
7817
|
+
address_1: data.address_1,
|
|
7818
|
+
address_2: data.address_2,
|
|
7819
|
+
city: data.city,
|
|
7820
|
+
province: data.province,
|
|
7821
|
+
country_code: data.country_code,
|
|
7822
|
+
postal_code: data.postal_code,
|
|
7823
|
+
phone: data.phone
|
|
7824
|
+
} }, {
|
|
7825
|
+
onSuccess: () => {
|
|
7826
|
+
handleSuccess();
|
|
7827
|
+
},
|
|
7828
|
+
onError: (error) => {
|
|
7829
|
+
toast.error(error.message);
|
|
7830
|
+
}
|
|
7831
|
+
});
|
|
7832
|
+
});
|
|
7833
|
+
return /* @__PURE__ */ jsx(RouteDrawer.Form, {
|
|
7834
|
+
form,
|
|
7835
|
+
children: /* @__PURE__ */ jsxs(KeyboundForm, {
|
|
7836
|
+
className: "flex flex-1 flex-col overflow-hidden",
|
|
7837
|
+
onSubmit,
|
|
7838
|
+
children: [/* @__PURE__ */ jsx(RouteDrawer.Body, {
|
|
7839
|
+
className: "flex flex-col gap-y-6 overflow-y-auto",
|
|
7840
|
+
children: /* @__PURE__ */ jsxs("div", {
|
|
7841
|
+
className: "flex flex-col gap-y-4",
|
|
7842
|
+
children: [
|
|
7843
|
+
/* @__PURE__ */ jsx(Form$2.Field, {
|
|
7844
|
+
control: form.control,
|
|
7845
|
+
name: "country_code",
|
|
7846
|
+
render: ({ field }) => /* @__PURE__ */ jsxs(Form$2.Item, { children: [
|
|
7847
|
+
/* @__PURE__ */ jsx(Form$2.Label, { children: "Country" }),
|
|
7848
|
+
/* @__PURE__ */ jsx(Form$2.Control, { children: /* @__PURE__ */ jsx(CountrySelect, { ...field }) }),
|
|
7849
|
+
/* @__PURE__ */ jsx(Form$2.ErrorMessage, {})
|
|
7850
|
+
] })
|
|
7851
|
+
}),
|
|
7852
|
+
/* @__PURE__ */ jsxs("div", {
|
|
7853
|
+
className: "grid grid-cols-2 gap-4",
|
|
7854
|
+
children: [/* @__PURE__ */ jsx(Form$2.Field, {
|
|
7855
|
+
control: form.control,
|
|
7856
|
+
name: "first_name",
|
|
7857
|
+
render: ({ field }) => /* @__PURE__ */ jsxs(Form$2.Item, { children: [
|
|
7858
|
+
/* @__PURE__ */ jsx(Form$2.Label, { children: "First name" }),
|
|
7859
|
+
/* @__PURE__ */ jsx(Form$2.Control, { children: /* @__PURE__ */ jsx(Input, { ...field }) }),
|
|
7860
|
+
/* @__PURE__ */ jsx(Form$2.ErrorMessage, {})
|
|
7861
|
+
] })
|
|
7862
|
+
}), /* @__PURE__ */ jsx(Form$2.Field, {
|
|
7863
|
+
control: form.control,
|
|
7864
|
+
name: "last_name",
|
|
7865
|
+
render: ({ field }) => /* @__PURE__ */ jsxs(Form$2.Item, { children: [
|
|
7866
|
+
/* @__PURE__ */ jsx(Form$2.Label, { children: "Last name" }),
|
|
7867
|
+
/* @__PURE__ */ jsx(Form$2.Control, { children: /* @__PURE__ */ jsx(Input, { ...field }) }),
|
|
7868
|
+
/* @__PURE__ */ jsx(Form$2.ErrorMessage, {})
|
|
7869
|
+
] })
|
|
7870
|
+
})]
|
|
7871
|
+
}),
|
|
7872
|
+
/* @__PURE__ */ jsx(Form$2.Field, {
|
|
7873
|
+
control: form.control,
|
|
7874
|
+
name: "company",
|
|
7875
|
+
render: ({ field }) => /* @__PURE__ */ jsxs(Form$2.Item, { children: [
|
|
7876
|
+
/* @__PURE__ */ jsx(Form$2.Label, {
|
|
7877
|
+
optional: true,
|
|
7878
|
+
children: "Company"
|
|
7879
|
+
}),
|
|
7880
|
+
/* @__PURE__ */ jsx(Form$2.Control, { children: /* @__PURE__ */ jsx(Input, { ...field }) }),
|
|
7881
|
+
/* @__PURE__ */ jsx(Form$2.ErrorMessage, {})
|
|
7882
|
+
] })
|
|
7883
|
+
}),
|
|
7884
|
+
/* @__PURE__ */ jsx(Form$2.Field, {
|
|
7885
|
+
control: form.control,
|
|
7886
|
+
name: "address_1",
|
|
7887
|
+
render: ({ field }) => /* @__PURE__ */ jsxs(Form$2.Item, { children: [
|
|
7888
|
+
/* @__PURE__ */ jsx(Form$2.Label, { children: "Address" }),
|
|
7889
|
+
/* @__PURE__ */ jsx(Form$2.Control, { children: /* @__PURE__ */ jsx(Input, { ...field }) }),
|
|
7890
|
+
/* @__PURE__ */ jsx(Form$2.ErrorMessage, {})
|
|
7891
|
+
] })
|
|
7892
|
+
}),
|
|
7893
|
+
/* @__PURE__ */ jsx(Form$2.Field, {
|
|
7894
|
+
control: form.control,
|
|
7895
|
+
name: "address_2",
|
|
7896
|
+
render: ({ field }) => /* @__PURE__ */ jsxs(Form$2.Item, { children: [
|
|
7897
|
+
/* @__PURE__ */ jsx(Form$2.Label, {
|
|
7898
|
+
optional: true,
|
|
7899
|
+
children: "Apartment, suite, etc."
|
|
7900
|
+
}),
|
|
7901
|
+
/* @__PURE__ */ jsx(Form$2.Control, { children: /* @__PURE__ */ jsx(Input, { ...field }) }),
|
|
7902
|
+
/* @__PURE__ */ jsx(Form$2.ErrorMessage, {})
|
|
7903
|
+
] })
|
|
7904
|
+
}),
|
|
7905
|
+
/* @__PURE__ */ jsxs("div", {
|
|
7906
|
+
className: "grid grid-cols-2 gap-4",
|
|
7907
|
+
children: [/* @__PURE__ */ jsx(Form$2.Field, {
|
|
7908
|
+
control: form.control,
|
|
7909
|
+
name: "postal_code",
|
|
7910
|
+
render: ({ field }) => /* @__PURE__ */ jsxs(Form$2.Item, { children: [
|
|
7911
|
+
/* @__PURE__ */ jsx(Form$2.Label, { children: "Postal code" }),
|
|
7912
|
+
/* @__PURE__ */ jsx(Form$2.Control, { children: /* @__PURE__ */ jsx(Input, { ...field }) }),
|
|
7913
|
+
/* @__PURE__ */ jsx(Form$2.ErrorMessage, {})
|
|
7914
|
+
] })
|
|
7915
|
+
}), /* @__PURE__ */ jsx(Form$2.Field, {
|
|
7916
|
+
control: form.control,
|
|
7917
|
+
name: "city",
|
|
7918
|
+
render: ({ field }) => /* @__PURE__ */ jsxs(Form$2.Item, { children: [
|
|
7919
|
+
/* @__PURE__ */ jsx(Form$2.Label, { children: "City" }),
|
|
7920
|
+
/* @__PURE__ */ jsx(Form$2.Control, { children: /* @__PURE__ */ jsx(Input, { ...field }) }),
|
|
7921
|
+
/* @__PURE__ */ jsx(Form$2.ErrorMessage, {})
|
|
7922
|
+
] })
|
|
7923
|
+
})]
|
|
7924
|
+
}),
|
|
7925
|
+
/* @__PURE__ */ jsx(Form$2.Field, {
|
|
7926
|
+
control: form.control,
|
|
7927
|
+
name: "province",
|
|
7928
|
+
render: ({ field }) => /* @__PURE__ */ jsxs(Form$2.Item, { children: [
|
|
7929
|
+
/* @__PURE__ */ jsx(Form$2.Label, {
|
|
7930
|
+
optional: true,
|
|
7931
|
+
children: "Province / State"
|
|
7932
|
+
}),
|
|
7933
|
+
/* @__PURE__ */ jsx(Form$2.Control, { children: /* @__PURE__ */ jsx(Input, { ...field }) }),
|
|
7934
|
+
/* @__PURE__ */ jsx(Form$2.ErrorMessage, {})
|
|
7935
|
+
] })
|
|
7936
|
+
}),
|
|
7937
|
+
/* @__PURE__ */ jsx(Form$2.Field, {
|
|
7938
|
+
control: form.control,
|
|
7939
|
+
name: "phone",
|
|
7940
|
+
render: ({ field }) => /* @__PURE__ */ jsxs(Form$2.Item, { children: [
|
|
7941
|
+
/* @__PURE__ */ jsx(Form$2.Label, {
|
|
7942
|
+
optional: true,
|
|
7943
|
+
children: "Phone"
|
|
7944
|
+
}),
|
|
7945
|
+
/* @__PURE__ */ jsx(Form$2.Control, { children: /* @__PURE__ */ jsx(Input, { ...field }) }),
|
|
7946
|
+
/* @__PURE__ */ jsx(Form$2.ErrorMessage, {})
|
|
7947
|
+
] })
|
|
7948
|
+
})
|
|
7949
|
+
]
|
|
7950
|
+
})
|
|
7951
|
+
}), /* @__PURE__ */ jsx(RouteDrawer.Footer, { children: /* @__PURE__ */ jsxs("div", {
|
|
7952
|
+
className: "flex justify-end gap-2",
|
|
7953
|
+
children: [/* @__PURE__ */ jsx(RouteDrawer.Close, {
|
|
7954
|
+
asChild: true,
|
|
7955
|
+
children: /* @__PURE__ */ jsx(Button, {
|
|
7956
|
+
size: "small",
|
|
7957
|
+
variant: "secondary",
|
|
7958
|
+
children: "Cancel"
|
|
7959
|
+
})
|
|
7960
|
+
}), /* @__PURE__ */ jsx(Button, {
|
|
7961
|
+
size: "small",
|
|
7962
|
+
type: "submit",
|
|
7963
|
+
isLoading: isPending,
|
|
7964
|
+
children: "Save"
|
|
7965
|
+
})]
|
|
7966
|
+
}) })]
|
|
7967
|
+
})
|
|
7968
|
+
});
|
|
7969
|
+
};
|
|
7970
|
+
var schema$1 = addressSchema;
|
|
7971
|
+
var handle$2 = { permissions: EDIT_DRAFT_ORDER_PERMISSIONS };
|
|
7777
7972
|
// src/admin/routes/draft-orders/[id]/@shipping/page.tsx
|
|
7778
7973
|
var STACKED_FOCUS_MODAL_ID = "shipping-form";
|
|
7779
7974
|
var Shipping = () => {
|
|
@@ -8507,202 +8702,7 @@ var CustomAmountField = ({ control, currencyCode }) => {
|
|
|
8507
8702
|
}
|
|
8508
8703
|
});
|
|
8509
8704
|
};
|
|
8510
|
-
var handle$
|
|
8511
|
-
// src/admin/routes/draft-orders/[id]/@shipping-address/page.tsx
|
|
8512
|
-
var ShippingAddress = () => {
|
|
8513
|
-
const { id } = useParams();
|
|
8514
|
-
const { order, isPending, isError, error } = useOrder(id, { fields: "+shipping_address" });
|
|
8515
|
-
if (isError) throw error;
|
|
8516
|
-
const isReady = !isPending && !!order;
|
|
8517
|
-
return /* @__PURE__ */ jsxs(RouteDrawer, { children: [/* @__PURE__ */ jsxs(RouteDrawer.Header, { children: [/* @__PURE__ */ jsx(RouteDrawer.Title, {
|
|
8518
|
-
asChild: true,
|
|
8519
|
-
children: /* @__PURE__ */ jsx(Heading, { children: "Edit Shipping Address" })
|
|
8520
|
-
}), /* @__PURE__ */ jsx(RouteDrawer.Description, {
|
|
8521
|
-
asChild: true,
|
|
8522
|
-
children: /* @__PURE__ */ jsx("span", {
|
|
8523
|
-
className: "sr-only",
|
|
8524
|
-
children: "Edit the shipping address for the draft order"
|
|
8525
|
-
})
|
|
8526
|
-
})] }), isReady && /* @__PURE__ */ jsx(ShippingAddressForm, { order })] });
|
|
8527
|
-
};
|
|
8528
|
-
var ShippingAddressForm = ({ order }) => {
|
|
8529
|
-
const form = useForm({
|
|
8530
|
-
defaultValues: {
|
|
8531
|
-
first_name: order.shipping_address?.first_name ?? "",
|
|
8532
|
-
last_name: order.shipping_address?.last_name ?? "",
|
|
8533
|
-
company: order.shipping_address?.company ?? "",
|
|
8534
|
-
address_1: order.shipping_address?.address_1 ?? "",
|
|
8535
|
-
address_2: order.shipping_address?.address_2 ?? "",
|
|
8536
|
-
city: order.shipping_address?.city ?? "",
|
|
8537
|
-
province: order.shipping_address?.province ?? "",
|
|
8538
|
-
country_code: order.shipping_address?.country_code ?? "",
|
|
8539
|
-
postal_code: order.shipping_address?.postal_code ?? "",
|
|
8540
|
-
phone: order.shipping_address?.phone ?? ""
|
|
8541
|
-
},
|
|
8542
|
-
resolver: zodResolver(schema$1)
|
|
8543
|
-
});
|
|
8544
|
-
const { mutateAsync, isPending } = useUpdateDraftOrder(order.id);
|
|
8545
|
-
const { handleSuccess } = useRouteModal();
|
|
8546
|
-
const onSubmit = form.handleSubmit(async (data) => {
|
|
8547
|
-
await mutateAsync({ shipping_address: {
|
|
8548
|
-
first_name: data.first_name,
|
|
8549
|
-
last_name: data.last_name,
|
|
8550
|
-
company: data.company,
|
|
8551
|
-
address_1: data.address_1,
|
|
8552
|
-
address_2: data.address_2,
|
|
8553
|
-
city: data.city,
|
|
8554
|
-
province: data.province,
|
|
8555
|
-
country_code: data.country_code,
|
|
8556
|
-
postal_code: data.postal_code,
|
|
8557
|
-
phone: data.phone
|
|
8558
|
-
} }, {
|
|
8559
|
-
onSuccess: () => {
|
|
8560
|
-
handleSuccess();
|
|
8561
|
-
},
|
|
8562
|
-
onError: (error) => {
|
|
8563
|
-
toast.error(error.message);
|
|
8564
|
-
}
|
|
8565
|
-
});
|
|
8566
|
-
});
|
|
8567
|
-
return /* @__PURE__ */ jsx(RouteDrawer.Form, {
|
|
8568
|
-
form,
|
|
8569
|
-
children: /* @__PURE__ */ jsxs(KeyboundForm, {
|
|
8570
|
-
className: "flex flex-1 flex-col overflow-hidden",
|
|
8571
|
-
onSubmit,
|
|
8572
|
-
children: [/* @__PURE__ */ jsx(RouteDrawer.Body, {
|
|
8573
|
-
className: "flex flex-col gap-y-6 overflow-y-auto",
|
|
8574
|
-
children: /* @__PURE__ */ jsxs("div", {
|
|
8575
|
-
className: "flex flex-col gap-y-4",
|
|
8576
|
-
children: [
|
|
8577
|
-
/* @__PURE__ */ jsx(Form$2.Field, {
|
|
8578
|
-
control: form.control,
|
|
8579
|
-
name: "country_code",
|
|
8580
|
-
render: ({ field }) => /* @__PURE__ */ jsxs(Form$2.Item, { children: [
|
|
8581
|
-
/* @__PURE__ */ jsx(Form$2.Label, { children: "Country" }),
|
|
8582
|
-
/* @__PURE__ */ jsx(Form$2.Control, { children: /* @__PURE__ */ jsx(CountrySelect, { ...field }) }),
|
|
8583
|
-
/* @__PURE__ */ jsx(Form$2.ErrorMessage, {})
|
|
8584
|
-
] })
|
|
8585
|
-
}),
|
|
8586
|
-
/* @__PURE__ */ jsxs("div", {
|
|
8587
|
-
className: "grid grid-cols-2 gap-4",
|
|
8588
|
-
children: [/* @__PURE__ */ jsx(Form$2.Field, {
|
|
8589
|
-
control: form.control,
|
|
8590
|
-
name: "first_name",
|
|
8591
|
-
render: ({ field }) => /* @__PURE__ */ jsxs(Form$2.Item, { children: [
|
|
8592
|
-
/* @__PURE__ */ jsx(Form$2.Label, { children: "First name" }),
|
|
8593
|
-
/* @__PURE__ */ jsx(Form$2.Control, { children: /* @__PURE__ */ jsx(Input, { ...field }) }),
|
|
8594
|
-
/* @__PURE__ */ jsx(Form$2.ErrorMessage, {})
|
|
8595
|
-
] })
|
|
8596
|
-
}), /* @__PURE__ */ jsx(Form$2.Field, {
|
|
8597
|
-
control: form.control,
|
|
8598
|
-
name: "last_name",
|
|
8599
|
-
render: ({ field }) => /* @__PURE__ */ jsxs(Form$2.Item, { children: [
|
|
8600
|
-
/* @__PURE__ */ jsx(Form$2.Label, { children: "Last name" }),
|
|
8601
|
-
/* @__PURE__ */ jsx(Form$2.Control, { children: /* @__PURE__ */ jsx(Input, { ...field }) }),
|
|
8602
|
-
/* @__PURE__ */ jsx(Form$2.ErrorMessage, {})
|
|
8603
|
-
] })
|
|
8604
|
-
})]
|
|
8605
|
-
}),
|
|
8606
|
-
/* @__PURE__ */ jsx(Form$2.Field, {
|
|
8607
|
-
control: form.control,
|
|
8608
|
-
name: "company",
|
|
8609
|
-
render: ({ field }) => /* @__PURE__ */ jsxs(Form$2.Item, { children: [
|
|
8610
|
-
/* @__PURE__ */ jsx(Form$2.Label, {
|
|
8611
|
-
optional: true,
|
|
8612
|
-
children: "Company"
|
|
8613
|
-
}),
|
|
8614
|
-
/* @__PURE__ */ jsx(Form$2.Control, { children: /* @__PURE__ */ jsx(Input, { ...field }) }),
|
|
8615
|
-
/* @__PURE__ */ jsx(Form$2.ErrorMessage, {})
|
|
8616
|
-
] })
|
|
8617
|
-
}),
|
|
8618
|
-
/* @__PURE__ */ jsx(Form$2.Field, {
|
|
8619
|
-
control: form.control,
|
|
8620
|
-
name: "address_1",
|
|
8621
|
-
render: ({ field }) => /* @__PURE__ */ jsxs(Form$2.Item, { children: [
|
|
8622
|
-
/* @__PURE__ */ jsx(Form$2.Label, { children: "Address" }),
|
|
8623
|
-
/* @__PURE__ */ jsx(Form$2.Control, { children: /* @__PURE__ */ jsx(Input, { ...field }) }),
|
|
8624
|
-
/* @__PURE__ */ jsx(Form$2.ErrorMessage, {})
|
|
8625
|
-
] })
|
|
8626
|
-
}),
|
|
8627
|
-
/* @__PURE__ */ jsx(Form$2.Field, {
|
|
8628
|
-
control: form.control,
|
|
8629
|
-
name: "address_2",
|
|
8630
|
-
render: ({ field }) => /* @__PURE__ */ jsxs(Form$2.Item, { children: [
|
|
8631
|
-
/* @__PURE__ */ jsx(Form$2.Label, {
|
|
8632
|
-
optional: true,
|
|
8633
|
-
children: "Apartment, suite, etc."
|
|
8634
|
-
}),
|
|
8635
|
-
/* @__PURE__ */ jsx(Form$2.Control, { children: /* @__PURE__ */ jsx(Input, { ...field }) }),
|
|
8636
|
-
/* @__PURE__ */ jsx(Form$2.ErrorMessage, {})
|
|
8637
|
-
] })
|
|
8638
|
-
}),
|
|
8639
|
-
/* @__PURE__ */ jsxs("div", {
|
|
8640
|
-
className: "grid grid-cols-2 gap-4",
|
|
8641
|
-
children: [/* @__PURE__ */ jsx(Form$2.Field, {
|
|
8642
|
-
control: form.control,
|
|
8643
|
-
name: "postal_code",
|
|
8644
|
-
render: ({ field }) => /* @__PURE__ */ jsxs(Form$2.Item, { children: [
|
|
8645
|
-
/* @__PURE__ */ jsx(Form$2.Label, { children: "Postal code" }),
|
|
8646
|
-
/* @__PURE__ */ jsx(Form$2.Control, { children: /* @__PURE__ */ jsx(Input, { ...field }) }),
|
|
8647
|
-
/* @__PURE__ */ jsx(Form$2.ErrorMessage, {})
|
|
8648
|
-
] })
|
|
8649
|
-
}), /* @__PURE__ */ jsx(Form$2.Field, {
|
|
8650
|
-
control: form.control,
|
|
8651
|
-
name: "city",
|
|
8652
|
-
render: ({ field }) => /* @__PURE__ */ jsxs(Form$2.Item, { children: [
|
|
8653
|
-
/* @__PURE__ */ jsx(Form$2.Label, { children: "City" }),
|
|
8654
|
-
/* @__PURE__ */ jsx(Form$2.Control, { children: /* @__PURE__ */ jsx(Input, { ...field }) }),
|
|
8655
|
-
/* @__PURE__ */ jsx(Form$2.ErrorMessage, {})
|
|
8656
|
-
] })
|
|
8657
|
-
})]
|
|
8658
|
-
}),
|
|
8659
|
-
/* @__PURE__ */ jsx(Form$2.Field, {
|
|
8660
|
-
control: form.control,
|
|
8661
|
-
name: "province",
|
|
8662
|
-
render: ({ field }) => /* @__PURE__ */ jsxs(Form$2.Item, { children: [
|
|
8663
|
-
/* @__PURE__ */ jsx(Form$2.Label, {
|
|
8664
|
-
optional: true,
|
|
8665
|
-
children: "Province / State"
|
|
8666
|
-
}),
|
|
8667
|
-
/* @__PURE__ */ jsx(Form$2.Control, { children: /* @__PURE__ */ jsx(Input, { ...field }) }),
|
|
8668
|
-
/* @__PURE__ */ jsx(Form$2.ErrorMessage, {})
|
|
8669
|
-
] })
|
|
8670
|
-
}),
|
|
8671
|
-
/* @__PURE__ */ jsx(Form$2.Field, {
|
|
8672
|
-
control: form.control,
|
|
8673
|
-
name: "phone",
|
|
8674
|
-
render: ({ field }) => /* @__PURE__ */ jsxs(Form$2.Item, { children: [
|
|
8675
|
-
/* @__PURE__ */ jsx(Form$2.Label, {
|
|
8676
|
-
optional: true,
|
|
8677
|
-
children: "Phone"
|
|
8678
|
-
}),
|
|
8679
|
-
/* @__PURE__ */ jsx(Form$2.Control, { children: /* @__PURE__ */ jsx(Input, { ...field }) }),
|
|
8680
|
-
/* @__PURE__ */ jsx(Form$2.ErrorMessage, {})
|
|
8681
|
-
] })
|
|
8682
|
-
})
|
|
8683
|
-
]
|
|
8684
|
-
})
|
|
8685
|
-
}), /* @__PURE__ */ jsx(RouteDrawer.Footer, { children: /* @__PURE__ */ jsxs("div", {
|
|
8686
|
-
className: "flex justify-end gap-2",
|
|
8687
|
-
children: [/* @__PURE__ */ jsx(RouteDrawer.Close, {
|
|
8688
|
-
asChild: true,
|
|
8689
|
-
children: /* @__PURE__ */ jsx(Button, {
|
|
8690
|
-
size: "small",
|
|
8691
|
-
variant: "secondary",
|
|
8692
|
-
children: "Cancel"
|
|
8693
|
-
})
|
|
8694
|
-
}), /* @__PURE__ */ jsx(Button, {
|
|
8695
|
-
size: "small",
|
|
8696
|
-
type: "submit",
|
|
8697
|
-
isLoading: isPending,
|
|
8698
|
-
children: "Save"
|
|
8699
|
-
})]
|
|
8700
|
-
}) })]
|
|
8701
|
-
})
|
|
8702
|
-
});
|
|
8703
|
-
};
|
|
8704
|
-
var schema$1 = addressSchema;
|
|
8705
|
-
var handle$1 = { permissions: EDIT_DRAFT_ORDER_PERMISSIONS };
|
|
8705
|
+
var handle$1 = { permissions: EDIT_DRAFT_ORDER_SHIPPING_PERMISSIONS };
|
|
8706
8706
|
// src/admin/routes/draft-orders/[id]/@transfer-ownership/page.tsx
|
|
8707
8707
|
var TransferOwnership = () => {
|
|
8708
8708
|
const { id } = useParams();
|
|
@@ -9612,13 +9612,13 @@ var plugin = {
|
|
|
9612
9612
|
handle: handle$3
|
|
9613
9613
|
},
|
|
9614
9614
|
{
|
|
9615
|
-
Component:
|
|
9616
|
-
path: "/draft-orders/:id/shipping",
|
|
9615
|
+
Component: ShippingAddress,
|
|
9616
|
+
path: "/draft-orders/:id/shipping-address",
|
|
9617
9617
|
handle: handle$2
|
|
9618
9618
|
},
|
|
9619
9619
|
{
|
|
9620
|
-
Component:
|
|
9621
|
-
path: "/draft-orders/:id/shipping
|
|
9620
|
+
Component: Shipping,
|
|
9621
|
+
path: "/draft-orders/:id/shipping",
|
|
9622
9622
|
handle: handle$1
|
|
9623
9623
|
},
|
|
9624
9624
|
{
|
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-20261127104753",
|
|
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-20261127104753",
|
|
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-20261127104753",
|
|
66
|
+
"@medusajs/cli": "2.23.2-snapshot-20261127104753",
|
|
67
|
+
"@medusajs/dashboard": "2.23.2-snapshot-20261127104753",
|
|
68
|
+
"@medusajs/framework": "2.23.2-snapshot-20261127104753",
|
|
69
|
+
"@medusajs/icons": "2.23.2-snapshot-20261127104753",
|
|
70
|
+
"@medusajs/test-utils": "2.23.2-snapshot-20261127104753",
|
|
71
|
+
"@medusajs/types": "2.23.2-snapshot-20261127104753",
|
|
72
|
+
"@medusajs/ui": "4.3.2-snapshot-20261127104753",
|
|
73
|
+
"@medusajs/ui-preset": "2.23.2-snapshot-20261127104753",
|
|
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-20261127104753",
|
|
78
|
+
"@medusajs/cli": "2.23.2-snapshot-20261127104753",
|
|
79
|
+
"@medusajs/dashboard": "2.23.2-snapshot-20261127104753",
|
|
80
|
+
"@medusajs/framework": "2.23.2-snapshot-20261127104753",
|
|
81
|
+
"@medusajs/icons": "2.23.2-snapshot-20261127104753",
|
|
82
|
+
"@medusajs/test-utils": "2.23.2-snapshot-20261127104753",
|
|
83
|
+
"@medusajs/ui": "4.3.2-snapshot-20261127104753",
|
|
84
84
|
"react": "^19.3.1",
|
|
85
85
|
"react-dom": "^19.3.1",
|
|
86
86
|
"react-router-dom": "^6.30.4 || ^7.0.0"
|