@mercurjs/admin 2.2.0-canary.5 → 2.2.0-canary.8
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-FAG3FAOF.js → add-campaign-promotions-RURZSD6G.js} +3 -3
- package/dist/{adjust-inventory-EAAPNIBZ.js → adjust-inventory-4PM2YZK3.js} +2 -3
- package/dist/{api-key-management-detail-PIN6NFQF.js → api-key-management-detail-BG7U2KCT.js} +3 -4
- package/dist/{attribute-create-F55LOXRA.js → attribute-create-L6YA6HTF.js} +46 -25
- package/dist/{attribute-detail-NRDJUPTJ.js → attribute-detail-Q3P7SCZ2.js} +5 -6
- package/dist/{attribute-edit-SB6GN67M.js → attribute-edit-LUY66TG3.js} +2 -2
- package/dist/{attribute-edit-possible-value-5CLQOLVR.js → attribute-edit-possible-value-IOS3625C.js} +2 -2
- package/dist/{attribute-list-URWKNTSJ.js → attribute-list-RUMLW7EI.js} +2 -3
- package/dist/{campaign-detail-QMLFWZ6K.js → campaign-detail-JFNFC6FY.js} +6 -7
- package/dist/{categories-metadata-5GXBBHEH.js → categories-metadata-5THJAHOA.js} +2 -3
- package/dist/{category-detail-RIKOZMPK.js → category-detail-7Y76K4I5.js} +7 -8
- package/dist/{category-products-255EJFTV.js → category-products-T525MDHE.js} +6 -7
- package/dist/{chunk-LD7NVG2X.js → chunk-2666PZI5.js} +2 -2
- package/dist/{chunk-GPJ6KVY2.js → chunk-2AFIUBWT.js} +2 -2
- package/dist/{chunk-SA3MMYXT.js → chunk-362ZBMNT.js} +1 -1
- package/dist/{chunk-VERWLDVW.js → chunk-3UKIBKFD.js} +3 -3
- package/dist/{chunk-SXGSYSW7.js → chunk-3VDLE5GA.js} +12 -4
- package/dist/{chunk-LXMGYWPO.js → chunk-45LX4LPV.js} +2 -2
- package/dist/{chunk-6RHAGO5O.js → chunk-4TWWSI7H.js} +2 -2
- package/dist/{chunk-EBQUMS7H.js → chunk-5MVC35DX.js} +1 -1
- package/dist/{chunk-KTBL35I2.js → chunk-B2STTXQV.js} +1 -1
- package/dist/{chunk-3OUWXGMT.js → chunk-EJBFKCC5.js} +2 -2
- package/dist/{chunk-SS7LB52P.js → chunk-FGWD66ZZ.js} +4 -4
- package/dist/{chunk-AKC67AN5.js → chunk-FJLKDTNA.js} +6 -3
- package/dist/{chunk-UNOG2S56.js → chunk-GOWTUDQ3.js} +4 -4
- package/dist/{chunk-LO7NJYHZ.js → chunk-HEX3M4TL.js} +2 -2
- package/dist/{chunk-NMFVQDVF.js → chunk-HJKZBCDB.js} +2 -2
- package/dist/{chunk-D2NBZVQC.js → chunk-I7L2Q6AL.js} +2 -2
- package/dist/{chunk-34OFJ74B.js → chunk-JB6QDJN3.js} +2 -2
- package/dist/{chunk-M5AJSIRN.js → chunk-JSMUFZZN.js} +1 -1
- package/dist/{chunk-TE245WV3.js → chunk-LSLPZITW.js} +2 -2
- package/dist/{chunk-UFGVU7RF.js → chunk-LXJH3DOV.js} +1 -1
- package/dist/{chunk-XAIID3PU.js → chunk-MU63NHPX.js} +3 -3
- package/dist/{chunk-F7O6IXPA.js → chunk-NC46O6TE.js} +1 -1
- package/dist/{chunk-MFI5TG54.js → chunk-NPQKCEAH.js} +2 -2
- package/dist/{chunk-6NDM5WGE.js → chunk-OMBP3YSV.js} +1 -1
- package/dist/{chunk-TNNQPNXY.js → chunk-OPX5O57R.js} +1 -1
- package/dist/{chunk-6XTHMAA2.js → chunk-PK645GWX.js} +1 -1
- package/dist/{chunk-2XVH2IJL.js → chunk-PK6LEBI7.js} +2 -2
- package/dist/{chunk-CKUIM5ZD.js → chunk-QJUWQDTX.js} +2 -2
- package/dist/{chunk-5J2HQOKK.js → chunk-U4IQFWPI.js} +1 -1
- package/dist/{chunk-F5H5JZQZ.js → chunk-UCYSCKZV.js} +0 -9
- package/dist/{chunk-2MVNFKL6.js → chunk-UGC6Z6CQ.js} +2 -2
- package/dist/{chunk-G3GSRFTB.js → chunk-UQORUXQR.js} +2 -2
- package/dist/{chunk-WRVGLMRW.js → chunk-URZCZO6F.js} +1 -1
- package/dist/{chunk-6WBQDJIH.js → chunk-VXMTBOKI.js} +58 -48
- package/dist/{chunk-N3334MXP.js → chunk-W4GX5X5E.js} +1 -1
- package/dist/{chunk-QFE4AEQJ.js → chunk-WCSHDVMB.js} +9 -48
- package/dist/{chunk-UKDC2AQR.js → chunk-WPVDACTL.js} +1 -1
- package/dist/{chunk-K43FFKGD.js → chunk-WVJJGXM5.js} +1 -1
- package/dist/{collection-add-products-4ZTBHENL.js → collection-add-products-6HKW4CCS.js} +6 -7
- package/dist/{collection-detail-W7OC2ALM.js → collection-detail-BCIH2FB7.js} +7 -8
- package/dist/{collection-list-B7LALPSA.js → collection-list-O24SYINI.js} +6 -7
- package/dist/{collection-metadata-E4C54MTU.js → collection-metadata-5VPC4CJI.js} +2 -3
- package/dist/{commission-rate-create-7MEIKAXK.js → commission-rate-create-7NSSEEH5.js} +8 -9
- package/dist/{commission-rate-detail-XBMB3Y7S.js → commission-rate-detail-2FGQ3V2J.js} +2 -3
- package/dist/{commission-rate-edit-XXUAGK5Q.js → commission-rate-edit-NXSXX4TA.js} +8 -9
- package/dist/{customer-detail-ONZGPCHW.js → customer-detail-SDKM7KM5.js} +2 -3
- package/dist/{customer-group-detail-XTCDJX7O.js → customer-group-detail-AMZNW2XW.js} +2 -3
- package/dist/{customer-group-list-63ER7WQH.js → customer-group-list-ES6FKPEC.js} +2 -3
- package/dist/{customer-group-metadata-N7HGHXNC.js → customer-group-metadata-PU2ZQP2Z.js} +2 -3
- package/dist/{customer-metadata-63OWV4KB.js → customer-metadata-ZCREBYFN.js} +2 -3
- package/dist/{customers-add-customer-group-NUXPXNUC.js → customers-add-customer-group-SQIJ7CDL.js} +2 -3
- package/dist/{edit-inventory-item-YOJTYA7H.js → edit-inventory-item-JUWUPXRF.js} +2 -3
- package/dist/{edit-inventory-item-attributes-JGY633F2.js → edit-inventory-item-attributes-3GQMHSL2.js} +2 -3
- package/dist/{edit-rules-4VAD5Q3L.js → edit-rules-72KZYLNI.js} +2 -3
- package/dist/index.js +139 -193
- package/dist/{inventory-create-3NJZLSFO.js → inventory-create-QUE6RTM5.js} +2 -3
- package/dist/{inventory-detail-B3HU2OVR.js → inventory-detail-42GIKTMR.js} +2 -3
- package/dist/{inventory-metadata-WCFTI7AH.js → inventory-metadata-VLXNSQS7.js} +2 -3
- package/dist/{inventory-stock-M65W4GRN.js → inventory-stock-V37WSJ7V.js} +2 -3
- package/dist/{location-detail-2NCZD5MO.js → location-detail-PBCO6YON.js} +2 -3
- package/dist/{location-fulfillment-providers-3XKOFATD.js → location-fulfillment-providers-UGTP3SCR.js} +4 -5
- package/dist/{location-list-VS6V2FXE.js → location-list-YD4MZG2C.js} +2 -3
- package/dist/{location-service-zone-shipping-option-create-LAM3OHBC.js → location-service-zone-shipping-option-create-BU6RQKYU.js} +2 -3
- package/dist/{login-DJWU5X5L.js → login-4IJPWFIN.js} +2 -3
- package/dist/{marketplace-detail-IQLU7R3J.js → marketplace-detail-LFCGTWIJ.js} +2 -3
- package/dist/{marketplace-metadata-7DNBHUDD.js → marketplace-metadata-BCPLQY5Y.js} +2 -3
- package/dist/{offers-UJCSO3RD.js → offers-5L46FLHU.js} +2 -2
- package/dist/{order-create-exchange-O6COEAGJ.js → order-create-exchange-Z7F6FRMI.js} +2 -3
- package/dist/{order-create-fulfillment-Y4HQ5YRS.js → order-create-fulfillment-DC4LWQYX.js} +2 -3
- package/dist/{order-create-refund-TCNCSOMX.js → order-create-refund-OWCLXLH3.js} +2 -3
- package/dist/{order-create-shipment-EWOJJXEM.js → order-create-shipment-JSYNAOBR.js} +2 -3
- package/dist/{order-detail-BOW62X75.js → order-detail-7GQLUWBA.js} +3 -4
- package/dist/{order-edit-billing-address-5ZBOWDWQ.js → order-edit-billing-address-BW5NU3KC.js} +3 -4
- package/dist/{order-edit-email-DQJW2SAM.js → order-edit-email-GQQY2SU7.js} +2 -3
- package/dist/{order-edit-shipping-address-RIML4XFQ.js → order-edit-shipping-address-DMUVVAZ6.js} +2 -3
- package/dist/{order-list-U5DZYLJK.js → order-list-KTKSHQST.js} +2 -2
- package/dist/{order-metadata-WGZUETFN.js → order-metadata-YJ6LWUYD.js} +2 -3
- package/dist/{order-receive-return-MDUU4L4X.js → order-receive-return-QY6KQBDB.js} +2 -3
- package/dist/{order-request-transfer-QFUMEZPD.js → order-request-transfer-6EOWBAJP.js} +2 -3
- package/dist/pages/index.d.ts +1 -28
- package/dist/pages/index.js +48 -58
- package/dist/{price-list-create-J4AJG42T.js → price-list-create-F5ASYWH2.js} +7 -8
- package/dist/{price-list-detail-D2ETNZ5N.js → price-list-detail-Q7IODVDV.js} +7 -8
- package/dist/{price-list-prices-add-FQLQ5DPX.js → price-list-prices-add-C5OEGJSE.js} +7 -8
- package/dist/{price-list-prices-edit-4HBSUC5W.js → price-list-prices-edit-TGYZNOK4.js} +2 -3
- package/dist/{product-add-existing-attributes-IHCIKDIH.js → product-add-existing-attributes-NTDMPDPZ.js} +4 -5
- package/dist/{product-create-BQXFDMEP.js → product-create-WTEZJRJC.js} +6 -7
- package/dist/{product-create-variant-MVYZPDO7.js → product-create-variant-AVV4LL7R.js} +3 -3
- package/dist/{product-detail-I57XSYLB.js → product-detail-H25AVTG7.js} +4 -5
- package/dist/{product-list-PR532XII.js → product-list-X7ZL4KY5.js} +7 -8
- package/dist/{product-media-J3VTWOU4.js → product-media-IE4P5WAE.js} +2 -2
- package/dist/{product-metadata-T2D4GEIP.js → product-metadata-3DGBHQTM.js} +2 -3
- package/dist/{product-organization-D6UMZAUE.js → product-organization-64KMYNZH.js} +0 -43
- package/dist/{product-tag-create-47G425O2.js → product-tag-create-6TDIKP6X.js} +2 -3
- package/dist/{product-tag-detail-VNGOBWYE.js → product-tag-detail-2OB43Q5H.js} +9 -10
- package/dist/{product-tag-edit-DN7IVL75.js → product-tag-edit-SJY7L6IL.js} +2 -3
- package/dist/{product-tag-list-ZGRJZT2U.js → product-tag-list-H4HRDCAI.js} +9 -10
- package/dist/{product-tag-metadata-YLDBRJMI.js → product-tag-metadata-UCMA6YAN.js} +2 -3
- package/dist/{product-type-detail-MPONGCVO.js → product-type-detail-WTEDFJAW.js} +7 -8
- package/dist/{product-type-metadata-TDAER7JD.js → product-type-metadata-3WCSSNDX.js} +2 -3
- package/dist/{product-variant-detail-5BF6JTHV.js → product-variant-detail-3YX6AL23.js} +2 -3
- package/dist/{product-variant-edit-2RHFG2CZ.js → product-variant-edit-MDXJUTQR.js} +4 -5
- package/dist/{product-variant-metadata-G2LLH7YK.js → product-variant-metadata-34BBPRKZ.js} +2 -3
- package/dist/{promotion-create-G3M4UJX2.js → promotion-create-FSXBFC6B.js} +2 -3
- package/dist/{promotion-detail-4EHU6FKF.js → promotion-detail-OKCXRU4Z.js} +5 -6
- package/dist/{promotion-list-AFBLWKTJ.js → promotion-list-7YRTZF3S.js} +4 -4
- package/dist/{refund-reason-create-6RPQHIJI.js → refund-reason-create-AKZX4RAN.js} +2 -3
- package/dist/{refund-reason-edit-W2TVZB3N.js → refund-reason-edit-LXMQTLR6.js} +2 -3
- package/dist/{refund-reason-list-TS6JWYS4.js → refund-reason-list-6JXGHJRA.js} +7 -8
- package/dist/{region-metadata-TNSJDCBM.js → region-metadata-GS4IS7UT.js} +2 -3
- package/dist/{reservation-detail-KFOVTTFH.js → reservation-detail-CVV36FXP.js} +2 -3
- package/dist/{reservation-metadata-HBFAVVPW.js → reservation-metadata-364D3VZ7.js} +2 -3
- package/dist/{reset-password-3NYZNQPK.js → reset-password-MH3JTCCE.js} +1 -1
- package/dist/{return-reason-list-WBLPUYD4.js → return-reason-list-J7QUYMYH.js} +5 -5
- package/dist/{sales-channel-add-products-IHGDKRKH.js → sales-channel-add-products-Q352GB72.js} +6 -7
- package/dist/{sales-channel-detail-QCFO7VUA.js → sales-channel-detail-7WO26EOP.js} +7 -8
- package/dist/{sales-channel-list-YNHR5EHL.js → sales-channel-list-LSKZXQQC.js} +2 -3
- package/dist/{sales-channel-metadata-OEQVWJRQ.js → sales-channel-metadata-Z75VZHOY.js} +2 -3
- package/dist/{shipping-option-type-create-SMXDCF6I.js → shipping-option-type-create-NCI2LJAA.js} +2 -3
- package/dist/{shipping-option-type-detail-MO3YRUVR.js → shipping-option-type-detail-YNRLWD33.js} +4 -5
- package/dist/{shipping-option-type-edit-KO64TZS6.js → shipping-option-type-edit-XJFALSAR.js} +2 -3
- package/dist/{shipping-option-type-list-6C26GWDM.js → shipping-option-type-list-HZBMHE23.js} +4 -5
- package/dist/{shipping-profile-metadata-FLTMLAZN.js → shipping-profile-metadata-YJMMBUYN.js} +2 -3
- package/dist/{store-bulk-edit-LW6ABDJK.js → store-bulk-edit-BNF3HH5K.js} +1 -1
- package/dist/{store-create-STR6YNFJ.js → store-create-A23PSUWX.js} +2 -3
- package/dist/{store-details-3U4OEFWC.js → store-details-R3J3YYR6.js} +8 -9
- package/dist/{store-edit-KRBR5MGV.js → store-edit-ZGBEXU4H.js} +3 -3
- package/dist/{store-list-PJ3U254I.js → store-list-TPMIQ6OO.js} +6 -7
- package/dist/{store-member-invite-AKH3KHMF.js → store-member-invite-J5XSPWMW.js} +1 -1
- package/dist/{tax-region-create-NEKIT7TT.js → tax-region-create-LQU7MWPP.js} +3 -4
- package/dist/{tax-region-detail-LVN5XSN5.js → tax-region-detail-2KADHBYF.js} +2 -3
- package/dist/{tax-region-edit-4PJV5F5X.js → tax-region-edit-TAWTPUQC.js} +2 -3
- package/dist/{tax-region-metadata-EYRFMJLL.js → tax-region-metadata-W4R2SPDH.js} +2 -3
- package/dist/{tax-region-province-detail-MTHKW7LW.js → tax-region-province-detail-W6BDEQA5.js} +2 -3
- package/dist/{tax-region-tax-override-create-OGW3MPBD.js → tax-region-tax-override-create-M3FKWCY3.js} +8 -9
- package/dist/{tax-region-tax-override-edit-LTZCYN4Y.js → tax-region-tax-override-edit-4TRW73DK.js} +8 -9
- package/dist/{user-metadata-GIR3A7WO.js → user-metadata-XTDSENAD.js} +2 -3
- package/package.json +1 -1
- package/dist/chunk-DDANJIE7.js +0 -207
- package/dist/chunk-J65IXAGI.js +0 -292
- package/dist/chunk-V5XHY5LP.js +0 -39
- package/dist/chunk-ZZ3XFIEM.js +0 -84
- package/dist/product-brand-create-B3ZJGHUQ.js +0 -171
- package/dist/product-brand-detail-O7UKYV4H.js +0 -100
- package/dist/product-brand-edit-3TQDHZNN.js +0 -179
- package/dist/product-brand-list-ZBPBSRQN.js +0 -30
- package/dist/product-brand-metadata-N2CJ5K3Z.js +0 -87
- /package/dist/{chunk-46A3QXAL.js → chunk-LYREZINJ.js} +0 -0
|
@@ -1,179 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
HandleInput
|
|
3
|
-
} from "./chunk-HJ56YXBU.js";
|
|
4
|
-
import "./chunk-TKGWSUEI.js";
|
|
5
|
-
import {
|
|
6
|
-
KeyboundForm
|
|
7
|
-
} from "./chunk-U2ZFCAPX.js";
|
|
8
|
-
import {
|
|
9
|
-
RouteDrawer,
|
|
10
|
-
useRouteModal
|
|
11
|
-
} from "./chunk-FWJLS7XD.js";
|
|
12
|
-
import {
|
|
13
|
-
Form
|
|
14
|
-
} from "./chunk-3QSRE5LS.js";
|
|
15
|
-
import {
|
|
16
|
-
useProductBrand,
|
|
17
|
-
useUpdateProductBrand
|
|
18
|
-
} from "./chunk-ZZ3XFIEM.js";
|
|
19
|
-
import "./chunk-RHKRREUU.js";
|
|
20
|
-
import "./chunk-ZA2KFUFR.js";
|
|
21
|
-
import "./chunk-ZBWL72TB.js";
|
|
22
|
-
import "./chunk-NBMM2TZK.js";
|
|
23
|
-
|
|
24
|
-
// src/pages/product-brands/product-brand-edit/product-brand-edit.tsx
|
|
25
|
-
import { Heading } from "@medusajs/ui";
|
|
26
|
-
import { useTranslation as useTranslation2 } from "react-i18next";
|
|
27
|
-
import { useParams } from "react-router-dom";
|
|
28
|
-
|
|
29
|
-
// src/pages/product-brands/product-brand-edit/components/edit-product-brand-form/edit-product-brand-form.tsx
|
|
30
|
-
import { zodResolver } from "@hookform/resolvers/zod";
|
|
31
|
-
import { Button, Input, toast } from "@medusajs/ui";
|
|
32
|
-
import { useForm } from "react-hook-form";
|
|
33
|
-
import { useTranslation } from "react-i18next";
|
|
34
|
-
import { z } from "zod";
|
|
35
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
36
|
-
var EditProductBrandSchema = z.object({
|
|
37
|
-
name: z.string().min(1),
|
|
38
|
-
handle: z.string().optional()
|
|
39
|
-
});
|
|
40
|
-
var EditProductBrandForm = ({
|
|
41
|
-
productBrand
|
|
42
|
-
}) => {
|
|
43
|
-
const { t } = useTranslation();
|
|
44
|
-
const { handleSuccess } = useRouteModal();
|
|
45
|
-
const form = useForm({
|
|
46
|
-
defaultValues: {
|
|
47
|
-
name: productBrand.name,
|
|
48
|
-
handle: productBrand.handle
|
|
49
|
-
},
|
|
50
|
-
resolver: zodResolver(EditProductBrandSchema)
|
|
51
|
-
});
|
|
52
|
-
const { mutateAsync, isPending } = useUpdateProductBrand(productBrand.id);
|
|
53
|
-
const handleSubmit = form.handleSubmit(async (data) => {
|
|
54
|
-
await mutateAsync(
|
|
55
|
-
{
|
|
56
|
-
name: data.name,
|
|
57
|
-
handle: data.handle ? data.handle : void 0
|
|
58
|
-
},
|
|
59
|
-
{
|
|
60
|
-
onSuccess: ({ product_brand }) => {
|
|
61
|
-
toast.success(
|
|
62
|
-
t("productBrands.edit.successToast", {
|
|
63
|
-
name: product_brand.name
|
|
64
|
-
})
|
|
65
|
-
);
|
|
66
|
-
handleSuccess();
|
|
67
|
-
},
|
|
68
|
-
onError: (error) => {
|
|
69
|
-
toast.error(error.message);
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
);
|
|
73
|
-
});
|
|
74
|
-
return /* @__PURE__ */ jsx(RouteDrawer.Form, { form, "data-testid": "product-brand-edit-form", children: /* @__PURE__ */ jsxs(
|
|
75
|
-
KeyboundForm,
|
|
76
|
-
{
|
|
77
|
-
onSubmit: handleSubmit,
|
|
78
|
-
className: "flex flex-1 flex-col overflow-hidden",
|
|
79
|
-
children: [
|
|
80
|
-
/* @__PURE__ */ jsxs(
|
|
81
|
-
RouteDrawer.Body,
|
|
82
|
-
{
|
|
83
|
-
className: "flex flex-1 flex-col gap-y-8 overflow-y-auto",
|
|
84
|
-
"data-testid": "product-brand-edit-form-body",
|
|
85
|
-
children: [
|
|
86
|
-
/* @__PURE__ */ jsx(
|
|
87
|
-
Form.Field,
|
|
88
|
-
{
|
|
89
|
-
control: form.control,
|
|
90
|
-
name: "name",
|
|
91
|
-
render: ({ field }) => {
|
|
92
|
-
return /* @__PURE__ */ jsxs(Form.Item, { "data-testid": "product-brand-edit-form-name-item", children: [
|
|
93
|
-
/* @__PURE__ */ jsx(Form.Label, { "data-testid": "product-brand-edit-form-name-label", children: t("fields.name") }),
|
|
94
|
-
/* @__PURE__ */ jsx(Form.Control, { "data-testid": "product-brand-edit-form-name-control", children: /* @__PURE__ */ jsx(
|
|
95
|
-
Input,
|
|
96
|
-
{
|
|
97
|
-
...field,
|
|
98
|
-
"data-testid": "product-brand-edit-form-name-input"
|
|
99
|
-
}
|
|
100
|
-
) }),
|
|
101
|
-
/* @__PURE__ */ jsx(Form.ErrorMessage, { "data-testid": "product-brand-edit-form-name-error" })
|
|
102
|
-
] });
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
|
-
),
|
|
106
|
-
/* @__PURE__ */ jsx(
|
|
107
|
-
Form.Field,
|
|
108
|
-
{
|
|
109
|
-
control: form.control,
|
|
110
|
-
name: "handle",
|
|
111
|
-
render: ({ field }) => {
|
|
112
|
-
return /* @__PURE__ */ jsxs(Form.Item, { "data-testid": "product-brand-edit-form-handle-item", children: [
|
|
113
|
-
/* @__PURE__ */ jsx(
|
|
114
|
-
Form.Label,
|
|
115
|
-
{
|
|
116
|
-
optional: true,
|
|
117
|
-
"data-testid": "product-brand-edit-form-handle-label",
|
|
118
|
-
children: t("fields.handle")
|
|
119
|
-
}
|
|
120
|
-
),
|
|
121
|
-
/* @__PURE__ */ jsx(Form.Control, { "data-testid": "product-brand-edit-form-handle-control", children: /* @__PURE__ */ jsx(
|
|
122
|
-
HandleInput,
|
|
123
|
-
{
|
|
124
|
-
...field,
|
|
125
|
-
"data-testid": "product-brand-edit-form-handle-input"
|
|
126
|
-
}
|
|
127
|
-
) }),
|
|
128
|
-
/* @__PURE__ */ jsx(Form.ErrorMessage, { "data-testid": "product-brand-edit-form-handle-error" })
|
|
129
|
-
] });
|
|
130
|
-
}
|
|
131
|
-
}
|
|
132
|
-
)
|
|
133
|
-
]
|
|
134
|
-
}
|
|
135
|
-
),
|
|
136
|
-
/* @__PURE__ */ jsx(RouteDrawer.Footer, { "data-testid": "product-brand-edit-form-footer", children: /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-end gap-x-2", children: [
|
|
137
|
-
/* @__PURE__ */ jsx(RouteDrawer.Close, { asChild: true, children: /* @__PURE__ */ jsx(
|
|
138
|
-
Button,
|
|
139
|
-
{
|
|
140
|
-
size: "small",
|
|
141
|
-
variant: "secondary",
|
|
142
|
-
"data-testid": "product-brand-edit-form-cancel-button",
|
|
143
|
-
children: t("actions.cancel")
|
|
144
|
-
}
|
|
145
|
-
) }),
|
|
146
|
-
/* @__PURE__ */ jsx(
|
|
147
|
-
Button,
|
|
148
|
-
{
|
|
149
|
-
size: "small",
|
|
150
|
-
type: "submit",
|
|
151
|
-
isLoading: isPending,
|
|
152
|
-
"data-testid": "product-brand-edit-form-save-button",
|
|
153
|
-
children: t("actions.save")
|
|
154
|
-
}
|
|
155
|
-
)
|
|
156
|
-
] }) })
|
|
157
|
-
]
|
|
158
|
-
}
|
|
159
|
-
) });
|
|
160
|
-
};
|
|
161
|
-
|
|
162
|
-
// src/pages/product-brands/product-brand-edit/product-brand-edit.tsx
|
|
163
|
-
import { jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
164
|
-
var ProductBrandEdit = () => {
|
|
165
|
-
const { id } = useParams();
|
|
166
|
-
const { t } = useTranslation2();
|
|
167
|
-
const { product_brand, isPending, isError, error } = useProductBrand(id);
|
|
168
|
-
const ready = !isPending && !!product_brand;
|
|
169
|
-
if (isError) {
|
|
170
|
-
throw error;
|
|
171
|
-
}
|
|
172
|
-
return /* @__PURE__ */ jsxs2(RouteDrawer, { "data-testid": "product-brand-edit-drawer", children: [
|
|
173
|
-
/* @__PURE__ */ jsx2(RouteDrawer.Header, { "data-testid": "product-brand-edit-drawer-header", children: /* @__PURE__ */ jsx2(Heading, { "data-testid": "product-brand-edit-drawer-heading", children: t("productBrands.edit.header") }) }),
|
|
174
|
-
ready && /* @__PURE__ */ jsx2(EditProductBrandForm, { productBrand: product_brand })
|
|
175
|
-
] });
|
|
176
|
-
};
|
|
177
|
-
export {
|
|
178
|
-
ProductBrandEdit as Component
|
|
179
|
-
};
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
ProductBrandListPage
|
|
3
|
-
} from "./chunk-J65IXAGI.js";
|
|
4
|
-
import "./chunk-V5XHY5LP.js";
|
|
5
|
-
import "./chunk-26OOAKQ6.js";
|
|
6
|
-
import "./chunk-25LYVP3C.js";
|
|
7
|
-
import "./chunk-JHIMVLB2.js";
|
|
8
|
-
import "./chunk-PHOCVOZ5.js";
|
|
9
|
-
import "./chunk-FQERBIVS.js";
|
|
10
|
-
import "./chunk-NQEXDLYH.js";
|
|
11
|
-
import "./chunk-YN3FGNJM.js";
|
|
12
|
-
import "./chunk-KAZ5BYTQ.js";
|
|
13
|
-
import "./chunk-634XVU3D.js";
|
|
14
|
-
import "./chunk-E74OUNA3.js";
|
|
15
|
-
import "./chunk-H6MYB7GB.js";
|
|
16
|
-
import "./chunk-UZWFZMOX.js";
|
|
17
|
-
import "./chunk-XQNVC4Q7.js";
|
|
18
|
-
import "./chunk-THHRRYRS.js";
|
|
19
|
-
import "./chunk-ZZ3XFIEM.js";
|
|
20
|
-
import "./chunk-BDGZ4EQO.js";
|
|
21
|
-
import "./chunk-LAVHRER2.js";
|
|
22
|
-
import "./chunk-Y7QKP6QU.js";
|
|
23
|
-
import "./chunk-INNFZYX2.js";
|
|
24
|
-
import "./chunk-RHKRREUU.js";
|
|
25
|
-
import "./chunk-ZA2KFUFR.js";
|
|
26
|
-
import "./chunk-ZBWL72TB.js";
|
|
27
|
-
import "./chunk-NBMM2TZK.js";
|
|
28
|
-
export {
|
|
29
|
-
ProductBrandListPage as Component
|
|
30
|
-
};
|
|
@@ -1,87 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
MetadataForm
|
|
3
|
-
} from "./chunk-WYA62MUL.js";
|
|
4
|
-
import "./chunk-TKGWSUEI.js";
|
|
5
|
-
import "./chunk-U2ZFCAPX.js";
|
|
6
|
-
import "./chunk-FWJLS7XD.js";
|
|
7
|
-
import "./chunk-3QSRE5LS.js";
|
|
8
|
-
import "./chunk-46A3QXAL.js";
|
|
9
|
-
import "./chunk-OH4AABUT.js";
|
|
10
|
-
import "./chunk-AEMDNTW5.js";
|
|
11
|
-
import "./chunk-LYD3C73Z.js";
|
|
12
|
-
import {
|
|
13
|
-
useProductBrand,
|
|
14
|
-
useUpdateProductBrand
|
|
15
|
-
} from "./chunk-ZZ3XFIEM.js";
|
|
16
|
-
import "./chunk-4RT7P5ZQ.js";
|
|
17
|
-
import "./chunk-533GMKEG.js";
|
|
18
|
-
import "./chunk-46M463BR.js";
|
|
19
|
-
import "./chunk-YFRC6GEN.js";
|
|
20
|
-
import "./chunk-JPNPTILP.js";
|
|
21
|
-
import "./chunk-DAXXLQKB.js";
|
|
22
|
-
import "./chunk-OHOWEMHO.js";
|
|
23
|
-
import "./chunk-GKGLVDDV.js";
|
|
24
|
-
import "./chunk-ESPLVOFC.js";
|
|
25
|
-
import "./chunk-N6SI4IIT.js";
|
|
26
|
-
import "./chunk-WJJXUXSO.js";
|
|
27
|
-
import "./chunk-LAPEZATU.js";
|
|
28
|
-
import "./chunk-2ZRWLCYP.js";
|
|
29
|
-
import "./chunk-E5WBU7ZR.js";
|
|
30
|
-
import "./chunk-FXWKGNRV.js";
|
|
31
|
-
import "./chunk-VDKOJ5WD.js";
|
|
32
|
-
import "./chunk-ZN7LWXVC.js";
|
|
33
|
-
import "./chunk-5TRY5IMZ.js";
|
|
34
|
-
import "./chunk-EPHVGD5Z.js";
|
|
35
|
-
import "./chunk-N3BYBEDV.js";
|
|
36
|
-
import "./chunk-ZB4SO44T.js";
|
|
37
|
-
import "./chunk-VYMODH6P.js";
|
|
38
|
-
import "./chunk-LEG67A2R.js";
|
|
39
|
-
import "./chunk-PRBE5CM3.js";
|
|
40
|
-
import "./chunk-FEC24V7X.js";
|
|
41
|
-
import "./chunk-EB5QHYKL.js";
|
|
42
|
-
import "./chunk-LAVHRER2.js";
|
|
43
|
-
import "./chunk-Y7QKP6QU.js";
|
|
44
|
-
import "./chunk-INNFZYX2.js";
|
|
45
|
-
import "./chunk-ZRFWXNT3.js";
|
|
46
|
-
import "./chunk-RHKRREUU.js";
|
|
47
|
-
import "./chunk-ZA2KFUFR.js";
|
|
48
|
-
import "./chunk-ZBWL72TB.js";
|
|
49
|
-
import "./chunk-NBMM2TZK.js";
|
|
50
|
-
|
|
51
|
-
// src/pages/product-brands/product-brand-metadata/product-brand-metadata.tsx
|
|
52
|
-
import { useParams } from "react-router-dom";
|
|
53
|
-
import { ClientError } from "@mercurjs/client";
|
|
54
|
-
import { jsx } from "react/jsx-runtime";
|
|
55
|
-
var ProductBrandMetadata = () => {
|
|
56
|
-
const { id } = useParams();
|
|
57
|
-
const { product_brand, isPending, isError, error } = useProductBrand(id);
|
|
58
|
-
const { mutateAsync, isPending: isMutating } = useUpdateProductBrand(id);
|
|
59
|
-
if (isError) {
|
|
60
|
-
throw error;
|
|
61
|
-
}
|
|
62
|
-
const handleSubmit = async (params, callbacks) => {
|
|
63
|
-
try {
|
|
64
|
-
const result = await mutateAsync({
|
|
65
|
-
metadata: params.metadata === void 0 ? void 0 : params.metadata
|
|
66
|
-
});
|
|
67
|
-
callbacks.onSuccess?.();
|
|
68
|
-
return result;
|
|
69
|
-
} catch (error2) {
|
|
70
|
-
const message = error2 instanceof ClientError ? error2.message : "An error occurred";
|
|
71
|
-
callbacks.onError?.(message);
|
|
72
|
-
throw error2;
|
|
73
|
-
}
|
|
74
|
-
};
|
|
75
|
-
return /* @__PURE__ */ jsx(
|
|
76
|
-
MetadataForm,
|
|
77
|
-
{
|
|
78
|
-
metadata: product_brand?.metadata,
|
|
79
|
-
hook: handleSubmit,
|
|
80
|
-
isPending,
|
|
81
|
-
isMutating
|
|
82
|
-
}
|
|
83
|
-
);
|
|
84
|
-
};
|
|
85
|
-
export {
|
|
86
|
-
ProductBrandMetadata as Component
|
|
87
|
-
};
|
|
File without changes
|