@mercurjs/admin 2.2.0-canary.40 → 2.2.0-canary.41
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/{attribute-create-VGL7LGIH.js → attribute-create-VAR6C5GW.js} +4 -2
- package/dist/{attribute-detail-EKDAYT4B.js → attribute-detail-LBACUDU3.js} +1 -1
- package/dist/{attribute-edit-OBNLNOJS.js → attribute-edit-WXO5FGR6.js} +2 -2
- package/dist/{attribute-edit-possible-value-QDFVWLA3.js → attribute-edit-possible-value-RO7BY3NC.js} +2 -2
- package/dist/{campaign-detail-RNB3FEJZ.js → campaign-detail-6J7PTIIP.js} +1 -1
- package/dist/{campaign-edit-MAS3DCFB.js → campaign-edit-DBAJFIH4.js} +18 -5
- package/dist/{campaign-list-CDV4GWWD.js → campaign-list-XH7UM5JJ.js} +1 -1
- package/dist/{category-create-AIS2MG7E.js → category-create-CJZZZLDD.js} +1 -1
- package/dist/{category-detail-557376TZ.js → category-detail-XV6CDZZL.js} +5 -5
- package/dist/{category-edit-LYR2IOTA.js → category-edit-2NCWDSZY.js} +19 -6
- package/dist/{category-list-XKRI24VN.js → category-list-WYMOJJLW.js} +1 -1
- package/dist/{category-products-44PCDDNN.js → category-products-CQV2TKLY.js} +4 -4
- package/dist/{chunk-HRDVGFS7.js → chunk-27XNPAJP.js} +9 -3
- package/dist/{chunk-KGA2XI6W.js → chunk-2CJIE5MY.js} +18 -7
- package/dist/{chunk-PMVWIBTI.js → chunk-3L4IFGRJ.js} +45 -8
- package/dist/{chunk-HQM7D57C.js → chunk-4RLXMDIJ.js} +2 -2
- package/dist/{chunk-5ACJR6WB.js → chunk-4XYSIVPO.js} +2 -2
- package/dist/{chunk-J3L2FUIA.js → chunk-5DAFNAZJ.js} +49 -33
- package/dist/{chunk-BLR3NTU6.js → chunk-5PNM6QNB.js} +2 -0
- package/dist/{chunk-GCU4LHGY.js → chunk-5UT374IW.js} +69 -24
- package/dist/{chunk-BTJR5RSV.js → chunk-7U2JJYMP.js} +41 -13
- package/dist/{chunk-2Z2M5K5A.js → chunk-ADTYNS4J.js} +1 -1
- package/dist/chunk-APAT344J.js +144 -0
- package/dist/{chunk-NWSKT55Z.js → chunk-BQWSY6FS.js} +1 -1
- package/dist/{chunk-NZVS6B77.js → chunk-CBD7HK2G.js} +54 -17
- package/dist/{chunk-WKDHY2DJ.js → chunk-COOOOQ2N.js} +1 -1
- package/dist/{chunk-56UFDHNO.js → chunk-DJD3MWED.js} +1 -1
- package/dist/{chunk-BVIIRGSW.js → chunk-F3F4JC7E.js} +3 -1
- package/dist/{chunk-7O7LYBHL.js → chunk-FNCDMOOR.js} +50 -18
- package/dist/{chunk-TDJSZ73V.js → chunk-GXU246YJ.js} +31 -4
- package/dist/{chunk-OYZIFLLC.js → chunk-I5HY5Q3K.js} +1 -1
- package/dist/{chunk-MZOINNCV.js → chunk-IASJSRP5.js} +70 -49
- package/dist/{chunk-THPXRTE5.js → chunk-IMLKFVFH.js} +23 -6
- package/dist/{chunk-EX4AGESR.js → chunk-IZBV7MCY.js} +61 -27
- package/dist/{chunk-Q6QXFLUY.js → chunk-JEN37H6L.js} +2 -0
- package/dist/{chunk-FICKHCWL.js → chunk-K2JORJRZ.js} +3 -1
- package/dist/{chunk-NISAIYSW.js → chunk-KRFXBBBU.js} +2 -2
- package/dist/{chunk-OAN4CZKX.js → chunk-KUCNCDST.js} +2 -0
- package/dist/{chunk-VJ4LQXMA.js → chunk-L2D2AMTK.js} +4 -2
- package/dist/{chunk-DPG4AWSG.js → chunk-LBDSZT5Q.js} +17 -6
- package/dist/{chunk-4346EIRG.js → chunk-LGOPKYNG.js} +1 -1
- package/dist/{chunk-VYQ6ASFF.js → chunk-MFCQTAVI.js} +15 -4
- package/dist/{chunk-TH26CWVG.js → chunk-NLJ5F7FS.js} +1 -1
- package/dist/{chunk-MOG7LT73.js → chunk-NPHYCQMP.js} +4 -2
- package/dist/{chunk-LVRCEGL7.js → chunk-ORCMDF54.js} +27 -11
- package/dist/{chunk-65YE4SVL.js → chunk-OVUKVGGD.js} +18 -7
- package/dist/{chunk-VPYI4X6C.js → chunk-PLU2GB4L.js} +27 -7
- package/dist/{chunk-GISFIAGQ.js → chunk-QAONUPAX.js} +42 -13
- package/dist/{chunk-W3P3RP5R.js → chunk-QFFF542X.js} +9 -3
- package/dist/{chunk-JU2O2H7I.js → chunk-RATQZHCS.js} +2 -2
- package/dist/{chunk-DI2M3J5Q.js → chunk-RMB7MPIT.js} +1 -1
- package/dist/{chunk-KFYTUQXT.js → chunk-S2C6DUQJ.js} +2 -2
- package/dist/{chunk-UZ452ISX.js → chunk-U4MV53CS.js} +32 -14
- package/dist/{chunk-VBKFXL2Q.js → chunk-USG4EATH.js} +19 -4
- package/dist/{chunk-IVBNI2QE.js → chunk-VIJXGPDE.js} +78 -24
- package/dist/{chunk-W7CJSBDM.js → chunk-VLYPVR5U.js} +19 -8
- package/dist/{chunk-6KWWJE5P.js → chunk-VXDRQQRZ.js} +3 -3
- package/dist/{chunk-DSTHXHJ5.js → chunk-VYSB4CTB.js} +1356 -1356
- package/dist/{chunk-YRUCTB6M.js → chunk-WEVSVBVF.js} +1 -1
- package/dist/{chunk-3BTRS4AA.js → chunk-WMK3BQPH.js} +1 -1
- package/dist/{chunk-EGHDC6K6.js → chunk-X6KFVVHH.js} +2 -2
- package/dist/{chunk-2FPQHWJZ.js → chunk-X7IR2TVL.js} +106 -24
- package/dist/{collection-add-products-JFUIZEZI.js → collection-add-products-XUKFZOCQ.js} +4 -4
- package/dist/{collection-detail-2WOLOVWF.js → collection-detail-ID4FKP22.js} +5 -5
- package/dist/{collection-edit-UMZN5JZ6.js → collection-edit-GPUKISIV.js} +18 -5
- package/dist/{collection-list-B3Y2ALLZ.js → collection-list-C6U4CPLD.js} +4 -4
- package/dist/{customer-detail-ZGDPIWA4.js → customer-detail-IG2QAAQL.js} +1 -1
- package/dist/{customer-edit-D55FJLIN.js → customer-edit-TADBOMPB.js} +18 -5
- package/dist/{customer-group-detail-FXUICFYC.js → customer-group-detail-2B7XJ7NT.js} +1 -1
- package/dist/{customer-group-edit-NZ5SUPFQ.js → customer-group-edit-BX4HKVNN.js} +33 -18
- package/dist/{customer-group-list-R2DP2D42.js → customer-group-list-7LN5TN3G.js} +1 -1
- package/dist/{customer-list-Z4DUQHCH.js → customer-list-K5TV3PSF.js} +1 -1
- package/dist/{edit-inventory-item-73BY4I5T.js → edit-inventory-item-4RXYRJ7O.js} +19 -6
- package/dist/{edit-reservation-BC5IOLK6.js → edit-reservation-HA6J6U2N.js} +18 -5
- package/dist/extension-targets.d.ts +195 -0
- package/dist/extension-targets.js +1 -0
- package/dist/index.d.ts +6 -2
- package/dist/index.js +136 -108
- package/dist/{inventory-create-XQKH3HZQ.js → inventory-create-B3FHGX6A.js} +1 -1
- package/dist/{inventory-detail-RZJNTJDF.js → inventory-detail-7VEJHRBB.js} +2 -2
- package/dist/{inventory-list-SPSBDJXO.js → inventory-list-IRQUQD4G.js} +1 -1
- package/dist/{location-fulfillment-providers-XXZ7AIUF.js → location-fulfillment-providers-MFM4SHJJ.js} +2 -2
- package/dist/{offer-detail-page-2G5BUOIB.js → offer-detail-page-THKNBFWZ.js} +61 -16
- package/dist/{offer-variant-detail-page-V6TKNYZL.js → offer-variant-detail-page-NDGPFP6P.js} +1 -1
- package/dist/{offers-2QQFKGAX.js → offers-LYLEYD3A.js} +22 -7
- package/dist/{order-detail-QUGH2GXH.js → order-detail-NYKOH7OO.js} +1 -1
- package/dist/{order-list-GMUOLGZY.js → order-list-EZWCH5YW.js} +3 -3
- package/dist/pages/index.js +47 -47
- package/dist/{price-list-create-HKN72A6Q.js → price-list-create-YHSA7U3L.js} +5 -5
- package/dist/{price-list-detail-6JAMNNJW.js → price-list-detail-3SS3DGRU.js} +5 -5
- package/dist/{price-list-edit-RZQMPHXU.js → price-list-edit-TRRPPI43.js} +19 -6
- package/dist/{price-list-list-HLWCOORV.js → price-list-list-REIHOWWT.js} +1 -1
- package/dist/{price-list-prices-add-ST6WNQNH.js → price-list-prices-add-X2GLUD7O.js} +5 -5
- package/dist/{product-add-existing-attributes-J6MML6MT.js → product-add-existing-attributes-GPAZOIXH.js} +2 -2
- package/dist/{product-create-B4DTC2OM.js → product-create-6FDBZUB4.js} +3 -3
- package/dist/{product-create-attribute-BP6NN4GO.js → product-create-attribute-YFIEH7HD.js} +1 -1
- package/dist/{product-create-variant-VDQQNHAK.js → product-create-variant-4O22DW7M.js} +3 -3
- package/dist/{product-detail-MFJ3AIU6.js → product-detail-VORTX3LT.js} +3 -3
- package/dist/{product-edit-attribute-AXPTES26.js → product-edit-attribute-NUJB7M6R.js} +2 -2
- package/dist/{product-list-DMQSLXM4.js → product-list-2WE2JY4F.js} +15 -12
- package/dist/{product-media-XRBLOV7D.js → product-media-LINHO45U.js} +2 -2
- package/dist/{product-tag-detail-4FL4CU5S.js → product-tag-detail-2PMM6RG6.js} +6 -6
- package/dist/{product-tag-list-YPTIDXPX.js → product-tag-list-KBNI6UDN.js} +6 -6
- package/dist/{product-type-detail-RAYCHYAF.js → product-type-detail-UKJ6RIHU.js} +5 -5
- package/dist/{product-variant-edit-C4HXFQFW.js → product-variant-edit-MAM2RQ4V.js} +2 -2
- package/dist/{promotion-create-7VBA6JFM.js → promotion-create-3EDHAI7E.js} +1 -1
- package/dist/{promotion-detail-KXXWEFHW.js → promotion-detail-PLGDC3A7.js} +1 -1
- package/dist/{promotion-edit-details-YM5JPGEC.js → promotion-edit-details-RTLPOQ4H.js} +20 -6
- package/dist/{promotion-list-56ZDROMH.js → promotion-list-D6HSZKGU.js} +1 -1
- package/dist/{refund-reason-list-PBLA5HYO.js → refund-reason-list-OWXAGHOQ.js} +5 -5
- package/dist/{reservation-detail-MAWHNY2H.js → reservation-detail-PWZ3PLC4.js} +2 -2
- package/dist/{reservation-list-UWZRPRPH.js → reservation-list-URKNAFIX.js} +1 -1
- package/dist/{return-reason-list-NPAAMB5H.js → return-reason-list-4ANB2PXX.js} +5 -5
- package/dist/{sales-channel-add-products-2BBIMN6N.js → sales-channel-add-products-NATZ7L5S.js} +4 -4
- package/dist/{sales-channel-detail-D5R7HPC7.js → sales-channel-detail-VDYOKH35.js} +5 -5
- package/dist/{store-bulk-edit-OIYKZ6AZ.js → store-bulk-edit-I2J5YYZK.js} +1 -1
- package/dist/{store-create-Y3BGG5P5.js → store-create-4UHISWQE.js} +1 -1
- package/dist/{store-details-56IHJJQV.js → store-details-4D7MSGVL.js} +5 -5
- package/dist/{store-edit-HWOGEOCH.js → store-edit-MQZMWYXY.js} +22 -8
- package/dist/{store-list-5DRW6QZF.js → store-list-EBAHJOZO.js} +4 -4
- package/dist/{store-member-invite-7ORIMT73.js → store-member-invite-J2JFDOHX.js} +1 -1
- package/dist/{tax-region-tax-override-create-R5GKEOK6.js → tax-region-tax-override-create-5PIUENUZ.js} +6 -6
- package/dist/{tax-region-tax-override-edit-MLJKNLAR.js → tax-region-tax-override-edit-GBPRPUTS.js} +6 -6
- package/package.json +17 -12
- package/dist/chunk-LFKTHNWI.js +0 -83
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
} from "./chunk-KOURHC2N.js";
|
|
4
4
|
import {
|
|
5
5
|
useSellersTableQuery
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-COOOOQ2N.js";
|
|
7
7
|
import {
|
|
8
8
|
DateCell
|
|
9
9
|
} from "./chunk-25LYVP3C.js";
|
|
@@ -19,7 +19,7 @@ import {
|
|
|
19
19
|
} from "./chunk-H6MYB7GB.js";
|
|
20
20
|
import {
|
|
21
21
|
require_dist
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-VYSB4CTB.js";
|
|
23
23
|
import {
|
|
24
24
|
useSellers
|
|
25
25
|
} from "./chunk-BILFRATX.js";
|
|
@@ -32,6 +32,7 @@ import {
|
|
|
32
32
|
|
|
33
33
|
// src/pages/stores/store-list/store-list.tsx
|
|
34
34
|
import { Children as Children3 } from "react";
|
|
35
|
+
import { WidgetZone } from "@mercurjs/dashboard-shared";
|
|
35
36
|
|
|
36
37
|
// src/pages/stores/store-list/components/store-list-table/store-list-table.tsx
|
|
37
38
|
import { Children as Children2 } from "react";
|
|
@@ -69,7 +70,10 @@ import { useNavigate } from "react-router-dom";
|
|
|
69
70
|
import { Checkbox } from "@medusajs/ui";
|
|
70
71
|
import { PencilSquare } from "@medusajs/icons";
|
|
71
72
|
import { keepPreviousData } from "@tanstack/react-query";
|
|
72
|
-
import {
|
|
73
|
+
import {
|
|
74
|
+
createColumnHelper as createColumnHelper2
|
|
75
|
+
} from "@tanstack/react-table";
|
|
76
|
+
import { useExtendableTable } from "@mercurjs/dashboard-shared";
|
|
73
77
|
|
|
74
78
|
// src/hooks/table/columns/use-seller-table-columns.tsx
|
|
75
79
|
import { createColumnHelper } from "@tanstack/react-table";
|
|
@@ -155,8 +159,12 @@ var StoreListDataTable = () => {
|
|
|
155
159
|
placeholderData: keepPreviousData
|
|
156
160
|
}
|
|
157
161
|
);
|
|
158
|
-
const columns = useColumns();
|
|
159
|
-
const
|
|
162
|
+
const { columns, filters: extFilters } = useColumns();
|
|
163
|
+
const baseFilters = useSellerTableFilters();
|
|
164
|
+
const filters = useMemo2(
|
|
165
|
+
() => [...baseFilters, ...extFilters],
|
|
166
|
+
[baseFilters, extFilters]
|
|
167
|
+
);
|
|
160
168
|
const { table } = useDataTable({
|
|
161
169
|
data: sellers ?? [],
|
|
162
170
|
columns,
|
|
@@ -224,40 +232,48 @@ var StoreActions = ({ seller }) => {
|
|
|
224
232
|
};
|
|
225
233
|
var useColumns = () => {
|
|
226
234
|
const base = useSellersTableColumns();
|
|
227
|
-
|
|
228
|
-
() =>
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
235
|
+
const selectColumn = useMemo2(
|
|
236
|
+
() => columnHelper2.display({
|
|
237
|
+
id: "select",
|
|
238
|
+
header: ({ table }) => {
|
|
239
|
+
return /* @__PURE__ */ jsx4(
|
|
240
|
+
Checkbox,
|
|
241
|
+
{
|
|
242
|
+
checked: table.getIsSomePageRowsSelected() ? "indeterminate" : table.getIsAllPageRowsSelected(),
|
|
243
|
+
onCheckedChange: (value) => table.toggleAllPageRowsSelected(!!value)
|
|
244
|
+
}
|
|
245
|
+
);
|
|
246
|
+
},
|
|
247
|
+
cell: ({ row }) => {
|
|
248
|
+
return /* @__PURE__ */ jsx4(
|
|
249
|
+
Checkbox,
|
|
250
|
+
{
|
|
251
|
+
checked: row.getIsSelected(),
|
|
252
|
+
onCheckedChange: (value) => row.toggleSelected(!!value),
|
|
253
|
+
onClick: (e) => {
|
|
254
|
+
e.stopPropagation();
|
|
237
255
|
}
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
}
|
|
252
|
-
}),
|
|
253
|
-
...base,
|
|
256
|
+
}
|
|
257
|
+
);
|
|
258
|
+
}
|
|
259
|
+
}),
|
|
260
|
+
[]
|
|
261
|
+
);
|
|
262
|
+
const { columns: extended, filters } = useExtendableTable({
|
|
263
|
+
model: "store",
|
|
264
|
+
columns: [selectColumn, ...base]
|
|
265
|
+
});
|
|
266
|
+
const columns = useMemo2(
|
|
267
|
+
() => [
|
|
268
|
+
...extended,
|
|
254
269
|
columnHelper2.display({
|
|
255
270
|
id: "actions",
|
|
256
271
|
cell: ({ row }) => /* @__PURE__ */ jsx4(StoreActions, { seller: row.original })
|
|
257
272
|
})
|
|
258
273
|
],
|
|
259
|
-
[
|
|
274
|
+
[extended]
|
|
260
275
|
);
|
|
276
|
+
return { columns, filters };
|
|
261
277
|
};
|
|
262
278
|
|
|
263
279
|
// src/pages/stores/store-list/components/store-list-table/store-list-table.tsx
|
|
@@ -272,7 +288,7 @@ var StoreListTable = ({ children }) => {
|
|
|
272
288
|
// src/pages/stores/store-list/store-list.tsx
|
|
273
289
|
import { jsx as jsx6 } from "react/jsx-runtime";
|
|
274
290
|
var Root = ({ children }) => {
|
|
275
|
-
return /* @__PURE__ */ jsx6(SingleColumnPage, { hasOutlet: true, children: Children3.count(children) > 0 ? children : /* @__PURE__ */ jsx6(StoreListTable, {}) });
|
|
291
|
+
return /* @__PURE__ */ jsx6(SingleColumnPage, { hasOutlet: true, children: /* @__PURE__ */ jsx6(WidgetZone, { id: "stores.list", children: Children3.count(children) > 0 ? children : /* @__PURE__ */ jsx6(StoreListTable, {}) }) });
|
|
276
292
|
};
|
|
277
293
|
var StoreListPage = Object.assign(Root, {
|
|
278
294
|
Table: StoreListTable,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ProductMediaSection
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-F3F4JC7E.js";
|
|
4
4
|
import {
|
|
5
5
|
SectionRow
|
|
6
6
|
} from "./chunk-3XPXUIK3.js";
|
|
@@ -22,7 +22,7 @@ import {
|
|
|
22
22
|
} from "./chunk-THHRRYRS.js";
|
|
23
23
|
import {
|
|
24
24
|
require_dist
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-VYSB4CTB.js";
|
|
26
26
|
import {
|
|
27
27
|
useSeller
|
|
28
28
|
} from "./chunk-BILFRATX.js";
|
|
@@ -55,6 +55,7 @@ import {
|
|
|
55
55
|
// src/pages/products/product-detail/product-detail.tsx
|
|
56
56
|
import { Children } from "react";
|
|
57
57
|
import { useLoaderData, useParams } from "react-router-dom";
|
|
58
|
+
import { WidgetZone } from "@mercurjs/dashboard-shared";
|
|
58
59
|
|
|
59
60
|
// src/pages/products/product-detail/components/product-active-edit-section/product-active-edit-section.tsx
|
|
60
61
|
var import_types = __toESM(require_dist(), 1);
|
|
@@ -306,6 +307,7 @@ import { useState as useState3 } from "react";
|
|
|
306
307
|
import { Button as Button2, Container, Heading, Text as Text2, toast as toast2 } from "@medusajs/ui";
|
|
307
308
|
import { ExclamationCircleSolid } from "@medusajs/icons";
|
|
308
309
|
import { useTranslation as useTranslation3 } from "react-i18next";
|
|
310
|
+
import { DisplayExtensionZone } from "@mercurjs/dashboard-shared";
|
|
309
311
|
import { jsx as jsx3, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
310
312
|
var ProductActiveRequestSection = ({
|
|
311
313
|
product
|
|
@@ -451,7 +453,8 @@ var ProductActiveRequestSection = ({
|
|
|
451
453
|
isLoading: isRejecting,
|
|
452
454
|
onConfirm: handleReject
|
|
453
455
|
}
|
|
454
|
-
)
|
|
456
|
+
),
|
|
457
|
+
/* @__PURE__ */ jsx3(DisplayExtensionZone, { model: "product", zone: "request", data: product })
|
|
455
458
|
]
|
|
456
459
|
}
|
|
457
460
|
);
|
|
@@ -476,6 +479,7 @@ import {
|
|
|
476
479
|
usePrompt
|
|
477
480
|
} from "@medusajs/ui";
|
|
478
481
|
import { useTranslation as useTranslation4 } from "react-i18next";
|
|
482
|
+
import { DisplayExtensionZone as DisplayExtensionZone2 } from "@mercurjs/dashboard-shared";
|
|
479
483
|
import { jsx as jsx4, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
480
484
|
var AttributeActions = ({
|
|
481
485
|
productId,
|
|
@@ -655,7 +659,8 @@ var ProductAttributeSection = ({
|
|
|
655
659
|
attributes: infoAttributes,
|
|
656
660
|
productId: product.id
|
|
657
661
|
}
|
|
658
|
-
)
|
|
662
|
+
),
|
|
663
|
+
/* @__PURE__ */ jsx4(DisplayExtensionZone2, { model: "product", zone: "attributes", data: product })
|
|
659
664
|
] });
|
|
660
665
|
};
|
|
661
666
|
|
|
@@ -664,7 +669,16 @@ import { PencilSquare as PencilSquare2, Trash as Trash2 } from "@medusajs/icons"
|
|
|
664
669
|
import { Container as Container3, Heading as Heading3, StatusBadge, usePrompt as usePrompt2 } from "@medusajs/ui";
|
|
665
670
|
import { useTranslation as useTranslation5 } from "react-i18next";
|
|
666
671
|
import { useNavigate } from "react-router-dom";
|
|
672
|
+
import { DisplayExtensionZone as DisplayExtensionZone3, DisplayField } from "@mercurjs/dashboard-shared";
|
|
667
673
|
import { jsx as jsx5, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
674
|
+
var GENERAL_FIELD_IDS = [
|
|
675
|
+
"title",
|
|
676
|
+
"status",
|
|
677
|
+
"description",
|
|
678
|
+
"subtitle",
|
|
679
|
+
"handle",
|
|
680
|
+
"discountable"
|
|
681
|
+
];
|
|
668
682
|
var productStatusColor = (status) => {
|
|
669
683
|
switch (status) {
|
|
670
684
|
case "draft":
|
|
@@ -711,7 +725,7 @@ var ProductGeneralSection = ({
|
|
|
711
725
|
className: "flex items-center justify-between px-6 py-4",
|
|
712
726
|
"data-testid": "product-general-header",
|
|
713
727
|
children: [
|
|
714
|
-
/* @__PURE__ */ jsx5(Heading3, { "data-testid": "product-general-title", children: product.title }),
|
|
728
|
+
/* @__PURE__ */ jsx5(DisplayField, { model: "product", zone: "general", id: "title", data: product, children: /* @__PURE__ */ jsx5(Heading3, { "data-testid": "product-general-title", children: product.title }) }),
|
|
715
729
|
/* @__PURE__ */ jsxs5(
|
|
716
730
|
"div",
|
|
717
731
|
{
|
|
@@ -719,11 +733,20 @@ var ProductGeneralSection = ({
|
|
|
719
733
|
"data-testid": "product-general-actions",
|
|
720
734
|
children: [
|
|
721
735
|
/* @__PURE__ */ jsx5(
|
|
722
|
-
|
|
736
|
+
DisplayField,
|
|
723
737
|
{
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
738
|
+
model: "product",
|
|
739
|
+
zone: "general",
|
|
740
|
+
id: "status",
|
|
741
|
+
data: product,
|
|
742
|
+
children: /* @__PURE__ */ jsx5(
|
|
743
|
+
StatusBadge,
|
|
744
|
+
{
|
|
745
|
+
color: productStatusColor(product.status),
|
|
746
|
+
"data-testid": "product-status-badge",
|
|
747
|
+
children: t(`products.productStatus.${product.status}`)
|
|
748
|
+
}
|
|
749
|
+
)
|
|
727
750
|
}
|
|
728
751
|
),
|
|
729
752
|
/* @__PURE__ */ jsx5(
|
|
@@ -758,36 +781,54 @@ var ProductGeneralSection = ({
|
|
|
758
781
|
]
|
|
759
782
|
}
|
|
760
783
|
),
|
|
761
|
-
/* @__PURE__ */ jsx5(
|
|
784
|
+
/* @__PURE__ */ jsx5(DisplayField, { model: "product", zone: "general", id: "description", data: product, children: /* @__PURE__ */ jsx5(
|
|
762
785
|
SectionRow,
|
|
763
786
|
{
|
|
764
787
|
title: t("fields.description"),
|
|
765
788
|
value: product.description,
|
|
766
789
|
"data-testid": "product-description-row"
|
|
767
790
|
}
|
|
768
|
-
),
|
|
769
|
-
/* @__PURE__ */ jsx5(
|
|
791
|
+
) }),
|
|
792
|
+
/* @__PURE__ */ jsx5(DisplayField, { model: "product", zone: "general", id: "subtitle", data: product, children: /* @__PURE__ */ jsx5(
|
|
770
793
|
SectionRow,
|
|
771
794
|
{
|
|
772
795
|
title: t("fields.subtitle"),
|
|
773
796
|
value: product.subtitle,
|
|
774
797
|
"data-testid": "product-subtitle-row"
|
|
775
798
|
}
|
|
776
|
-
),
|
|
777
|
-
/* @__PURE__ */ jsx5(
|
|
799
|
+
) }),
|
|
800
|
+
/* @__PURE__ */ jsx5(DisplayField, { model: "product", zone: "general", id: "handle", data: product, children: /* @__PURE__ */ jsx5(
|
|
778
801
|
SectionRow,
|
|
779
802
|
{
|
|
780
803
|
title: t("fields.handle"),
|
|
781
804
|
value: `/${product.handle}`,
|
|
782
805
|
"data-testid": "product-handle-row"
|
|
783
806
|
}
|
|
807
|
+
) }),
|
|
808
|
+
/* @__PURE__ */ jsx5(
|
|
809
|
+
DisplayField,
|
|
810
|
+
{
|
|
811
|
+
model: "product",
|
|
812
|
+
zone: "general",
|
|
813
|
+
id: "discountable",
|
|
814
|
+
data: product,
|
|
815
|
+
children: /* @__PURE__ */ jsx5(
|
|
816
|
+
SectionRow,
|
|
817
|
+
{
|
|
818
|
+
title: t("fields.discountable"),
|
|
819
|
+
value: product.discountable ? t("fields.true") : t("fields.false"),
|
|
820
|
+
"data-testid": "product-discountable-row"
|
|
821
|
+
}
|
|
822
|
+
)
|
|
823
|
+
}
|
|
784
824
|
),
|
|
785
825
|
/* @__PURE__ */ jsx5(
|
|
786
|
-
|
|
826
|
+
DisplayExtensionZone3,
|
|
787
827
|
{
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
828
|
+
model: "product",
|
|
829
|
+
zone: "general",
|
|
830
|
+
data: product,
|
|
831
|
+
builtInFieldIds: GENERAL_FIELD_IDS
|
|
791
832
|
}
|
|
792
833
|
)
|
|
793
834
|
] });
|
|
@@ -798,6 +839,7 @@ import { PencilSquare as PencilSquare3 } from "@medusajs/icons";
|
|
|
798
839
|
import { Badge as Badge2, Container as Container4, Heading as Heading4, Tooltip as Tooltip2 } from "@medusajs/ui";
|
|
799
840
|
import { useTranslation as useTranslation6 } from "react-i18next";
|
|
800
841
|
import { Link } from "react-router-dom";
|
|
842
|
+
import { DisplayExtensionZone as DisplayExtensionZone4 } from "@mercurjs/dashboard-shared";
|
|
801
843
|
import { jsx as jsx6, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
802
844
|
var ProductOrganizationSection = ({
|
|
803
845
|
product
|
|
@@ -893,7 +935,8 @@ var ProductOrganizationSection = ({
|
|
|
893
935
|
) : void 0,
|
|
894
936
|
"data-testid": "product-type-row"
|
|
895
937
|
}
|
|
896
|
-
)
|
|
938
|
+
),
|
|
939
|
+
/* @__PURE__ */ jsx6(DisplayExtensionZone4, { model: "product", zone: "organize", data: product })
|
|
897
940
|
]
|
|
898
941
|
}
|
|
899
942
|
);
|
|
@@ -912,6 +955,7 @@ var OrganizationTag = ({ label, to }) => {
|
|
|
912
955
|
// src/pages/products/product-detail/components/product-variant-section/product-variant-section.tsx
|
|
913
956
|
import { useCallback, useMemo } from "react";
|
|
914
957
|
import { PencilSquare as PencilSquare4, Trash as Trash3 } from "@medusajs/icons";
|
|
958
|
+
import { DisplayExtensionZone as DisplayExtensionZone5 } from "@mercurjs/dashboard-shared";
|
|
915
959
|
import {
|
|
916
960
|
Badge as Badge3,
|
|
917
961
|
Button as Button3,
|
|
@@ -999,7 +1043,8 @@ var ProductVariantSection = ({
|
|
|
999
1043
|
message: t("products.variants.empty.description")
|
|
1000
1044
|
}
|
|
1001
1045
|
}
|
|
1002
|
-
)
|
|
1046
|
+
),
|
|
1047
|
+
/* @__PURE__ */ jsx7(DisplayExtensionZone5, { model: "product", zone: "variants", data: product })
|
|
1003
1048
|
] });
|
|
1004
1049
|
};
|
|
1005
1050
|
var columnHelper = createColumnHelper();
|
|
@@ -1206,17 +1251,17 @@ var Root = ({ children }) => {
|
|
|
1206
1251
|
showMetadata: true,
|
|
1207
1252
|
"data-testid": "product-detail-page",
|
|
1208
1253
|
children: [
|
|
1209
|
-
/* @__PURE__ */
|
|
1254
|
+
/* @__PURE__ */ jsx8(TwoColumnPage.Main, { "data-testid": "product-detail-main", children: /* @__PURE__ */ jsxs8(WidgetZone, { id: "product.detail.main", data: product, children: [
|
|
1210
1255
|
/* @__PURE__ */ jsx8(ProductActiveRequestSection, { product }),
|
|
1211
1256
|
/* @__PURE__ */ jsx8(ProductActiveEditSection, { product }),
|
|
1212
1257
|
/* @__PURE__ */ jsx8(ProductGeneralSection, { product }),
|
|
1213
1258
|
/* @__PURE__ */ jsx8(ProductMediaSection, { product }),
|
|
1214
1259
|
/* @__PURE__ */ jsx8(ProductVariantSection, { product })
|
|
1215
|
-
] }),
|
|
1216
|
-
/* @__PURE__ */
|
|
1260
|
+
] }) }),
|
|
1261
|
+
/* @__PURE__ */ jsx8(TwoColumnPage.Sidebar, { "data-testid": "product-detail-sidebar", children: /* @__PURE__ */ jsxs8(WidgetZone, { id: "product.detail.side", data: product, children: [
|
|
1217
1262
|
/* @__PURE__ */ jsx8(ProductOrganizationSection, { product }),
|
|
1218
1263
|
/* @__PURE__ */ jsx8(ProductAttributeSection, { product })
|
|
1219
|
-
] })
|
|
1264
|
+
] }) })
|
|
1220
1265
|
]
|
|
1221
1266
|
}
|
|
1222
1267
|
);
|
|
@@ -12,10 +12,10 @@ import {
|
|
|
12
12
|
} from "./chunk-RK5N3XIX.js";
|
|
13
13
|
import {
|
|
14
14
|
useProductTableColumns
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-I5HY5Q3K.js";
|
|
16
16
|
import {
|
|
17
17
|
useProductTableFilters
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-LGOPKYNG.js";
|
|
19
19
|
import {
|
|
20
20
|
useProductTableQuery
|
|
21
21
|
} from "./chunk-H7NIKMPE.js";
|
|
@@ -47,11 +47,13 @@ import {
|
|
|
47
47
|
// src/pages/price-lists/price-list-detail/price-list-detail.tsx
|
|
48
48
|
import { Children } from "react";
|
|
49
49
|
import { useParams } from "react-router-dom";
|
|
50
|
+
import { WidgetZone } from "@mercurjs/dashboard-shared";
|
|
50
51
|
|
|
51
52
|
// src/pages/price-lists/price-list-detail/components/price-list-configuration-section/price-list-configuration-section.tsx
|
|
52
53
|
import { PencilSquare } from "@medusajs/icons";
|
|
53
54
|
import { Container, Heading } from "@medusajs/ui";
|
|
54
55
|
import { useTranslation } from "react-i18next";
|
|
56
|
+
import { DisplayExtensionZone } from "@mercurjs/dashboard-shared";
|
|
55
57
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
56
58
|
var PriceListConfigurationSection = ({
|
|
57
59
|
priceList
|
|
@@ -89,6 +91,14 @@ var PriceListConfigurationSection = ({
|
|
|
89
91
|
showTime: true,
|
|
90
92
|
"data-testid": "price-list-configuration-section-date-range"
|
|
91
93
|
}
|
|
94
|
+
),
|
|
95
|
+
/* @__PURE__ */ jsx(
|
|
96
|
+
DisplayExtensionZone,
|
|
97
|
+
{
|
|
98
|
+
model: "price_list",
|
|
99
|
+
zone: "configuration",
|
|
100
|
+
data: priceList
|
|
101
|
+
}
|
|
92
102
|
)
|
|
93
103
|
] });
|
|
94
104
|
};
|
|
@@ -129,6 +139,7 @@ var CustomerGroupDisplay = ({
|
|
|
129
139
|
import { PencilSquare as PencilSquare2, Trash } from "@medusajs/icons";
|
|
130
140
|
import { Container as Container2, Heading as Heading2, StatusBadge, Text } from "@medusajs/ui";
|
|
131
141
|
import { useTranslation as useTranslation2 } from "react-i18next";
|
|
142
|
+
import { DisplayExtensionZone as DisplayExtensionZone2, DisplayField } from "@mercurjs/dashboard-shared";
|
|
132
143
|
import { jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
133
144
|
var PriceListGeneralSection = ({
|
|
134
145
|
priceList
|
|
@@ -138,11 +149,18 @@ var PriceListGeneralSection = ({
|
|
|
138
149
|
const { color, text } = getPriceListStatus(t, priceList);
|
|
139
150
|
const handleDelete = useDeletePriceListAction({ priceList });
|
|
140
151
|
const type = priceList.type === "sale" ? t("priceLists.fields.type.options.sale.label") : t("priceLists.fields.type.options.override.label");
|
|
152
|
+
const GENERAL_FIELD_IDS = [
|
|
153
|
+
"title",
|
|
154
|
+
"status",
|
|
155
|
+
"type",
|
|
156
|
+
"description",
|
|
157
|
+
"price_overrides"
|
|
158
|
+
];
|
|
141
159
|
return /* @__PURE__ */ jsxs2(Container2, { className: "divide-y p-0", "data-testid": "price-list-general-section-container", children: [
|
|
142
160
|
/* @__PURE__ */ jsxs2("div", { className: "flex items-center justify-between px-6 py-4", "data-testid": "price-list-general-section-header", children: [
|
|
143
|
-
/* @__PURE__ */ jsx2(Heading2, { "data-testid": "price-list-general-section-title", children: priceList.title }),
|
|
161
|
+
/* @__PURE__ */ jsx2(DisplayField, { model: "price_list", zone: "general", id: "title", data: priceList, children: /* @__PURE__ */ jsx2(Heading2, { "data-testid": "price-list-general-section-title", children: priceList.title }) }),
|
|
144
162
|
/* @__PURE__ */ jsxs2("div", { className: "flex items-center gap-x-4", children: [
|
|
145
|
-
/* @__PURE__ */ jsx2(StatusBadge, { color, "data-testid": "price-list-general-section-status", children: text }),
|
|
163
|
+
/* @__PURE__ */ jsx2(DisplayField, { model: "price_list", zone: "general", id: "status", data: priceList, children: /* @__PURE__ */ jsx2(StatusBadge, { color, "data-testid": "price-list-general-section-status", children: text }) }),
|
|
146
164
|
/* @__PURE__ */ jsx2(
|
|
147
165
|
ActionMenu,
|
|
148
166
|
{
|
|
@@ -171,18 +189,19 @@ var PriceListGeneralSection = ({
|
|
|
171
189
|
)
|
|
172
190
|
] })
|
|
173
191
|
] }),
|
|
174
|
-
/* @__PURE__ */ jsxs2("div", { className: "text-ui-fg-subtle grid grid-cols-2 items-center px-6 py-4", "data-testid": "price-list-general-section-type", children: [
|
|
192
|
+
/* @__PURE__ */ jsx2(DisplayField, { model: "price_list", zone: "general", id: "type", data: priceList, children: /* @__PURE__ */ jsxs2("div", { className: "text-ui-fg-subtle grid grid-cols-2 items-center px-6 py-4", "data-testid": "price-list-general-section-type", children: [
|
|
175
193
|
/* @__PURE__ */ jsx2(Text, { leading: "compact", size: "small", weight: "plus", "data-testid": "price-list-general-section-type-label", children: t("fields.type") }),
|
|
176
194
|
/* @__PURE__ */ jsx2(Text, { size: "small", className: "text-pretty", "data-testid": "price-list-general-section-type-value", children: type })
|
|
177
|
-
] }),
|
|
178
|
-
/* @__PURE__ */ jsxs2("div", { className: "text-ui-fg-subtle grid grid-cols-2 items-center px-6 py-4", "data-testid": "price-list-general-section-description", children: [
|
|
195
|
+
] }) }),
|
|
196
|
+
/* @__PURE__ */ jsx2(DisplayField, { model: "price_list", zone: "general", id: "description", data: priceList, children: /* @__PURE__ */ jsxs2("div", { className: "text-ui-fg-subtle grid grid-cols-2 items-center px-6 py-4", "data-testid": "price-list-general-section-description", children: [
|
|
179
197
|
/* @__PURE__ */ jsx2(Text, { leading: "compact", size: "small", weight: "plus", "data-testid": "price-list-general-section-description-label", children: t("fields.description") }),
|
|
180
198
|
/* @__PURE__ */ jsx2(Text, { size: "small", className: "text-pretty", "data-testid": "price-list-general-section-description-value", children: priceList.description })
|
|
181
|
-
] }),
|
|
182
|
-
/* @__PURE__ */ jsxs2("div", { className: "text-ui-fg-subtle grid grid-cols-2 items-center px-6 py-4", "data-testid": "price-list-general-section-price-overrides", children: [
|
|
199
|
+
] }) }),
|
|
200
|
+
/* @__PURE__ */ jsx2(DisplayField, { model: "price_list", zone: "general", id: "price_overrides", data: priceList, children: /* @__PURE__ */ jsxs2("div", { className: "text-ui-fg-subtle grid grid-cols-2 items-center px-6 py-4", "data-testid": "price-list-general-section-price-overrides", children: [
|
|
183
201
|
/* @__PURE__ */ jsx2(Text, { leading: "compact", size: "small", weight: "plus", "data-testid": "price-list-general-section-price-overrides-label", children: t("priceLists.fields.priceOverrides.label") }),
|
|
184
202
|
/* @__PURE__ */ jsx2(Text, { size: "small", className: "text-pretty", "data-testid": "price-list-general-section-price-overrides-value", children: overrideCount || "-" })
|
|
185
|
-
] })
|
|
203
|
+
] }) }),
|
|
204
|
+
/* @__PURE__ */ jsx2(DisplayExtensionZone2, { model: "price_list", zone: "general", data: priceList, builtInFieldIds: GENERAL_FIELD_IDS })
|
|
186
205
|
] });
|
|
187
206
|
};
|
|
188
207
|
|
|
@@ -194,6 +213,7 @@ import { createColumnHelper } from "@tanstack/react-table";
|
|
|
194
213
|
import { useMemo, useState } from "react";
|
|
195
214
|
import { useTranslation as useTranslation3 } from "react-i18next";
|
|
196
215
|
import { useNavigate } from "react-router-dom";
|
|
216
|
+
import { DisplayExtensionZone as DisplayExtensionZone3 } from "@mercurjs/dashboard-shared";
|
|
197
217
|
import { jsx as jsx3, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
198
218
|
var PAGE_SIZE = 10;
|
|
199
219
|
var PREFIX = "p";
|
|
@@ -333,6 +353,14 @@ var PriceListProductSection = ({
|
|
|
333
353
|
queryObject: raw,
|
|
334
354
|
"data-testid": "price-list-product-section-table"
|
|
335
355
|
}
|
|
356
|
+
),
|
|
357
|
+
/* @__PURE__ */ jsx3(
|
|
358
|
+
DisplayExtensionZone3,
|
|
359
|
+
{
|
|
360
|
+
model: "price_list",
|
|
361
|
+
zone: "products",
|
|
362
|
+
data: priceList
|
|
363
|
+
}
|
|
336
364
|
)
|
|
337
365
|
] });
|
|
338
366
|
};
|
|
@@ -450,11 +478,11 @@ var Root = ({ children }) => {
|
|
|
450
478
|
throw error;
|
|
451
479
|
}
|
|
452
480
|
return Children.count(children) > 0 ? /* @__PURE__ */ jsx4(TwoColumnPage, { data: price_list, showJSON: true, "data-testid": "price-list-detail-page", children }) : /* @__PURE__ */ jsxs4(TwoColumnPage, { data: price_list, showJSON: true, "data-testid": "price-list-detail-page", children: [
|
|
453
|
-
/* @__PURE__ */
|
|
481
|
+
/* @__PURE__ */ jsx4(TwoColumnPage.Main, { children: /* @__PURE__ */ jsxs4(WidgetZone, { id: "price-lists.detail.main", data: price_list, children: [
|
|
454
482
|
/* @__PURE__ */ jsx4(PriceListGeneralSection, { priceList: price_list }),
|
|
455
483
|
/* @__PURE__ */ jsx4(PriceListProductSection, { priceList: price_list })
|
|
456
|
-
] }),
|
|
457
|
-
/* @__PURE__ */ jsx4(TwoColumnPage.Sidebar, { children: /* @__PURE__ */ jsx4(PriceListConfigurationSection, { priceList: price_list }) })
|
|
484
|
+
] }) }),
|
|
485
|
+
/* @__PURE__ */ jsx4(TwoColumnPage.Sidebar, { children: /* @__PURE__ */ jsx4(WidgetZone, { id: "price-lists.detail.side", data: price_list, children: /* @__PURE__ */ jsx4(PriceListConfigurationSection, { priceList: price_list }) }) })
|
|
458
486
|
] });
|
|
459
487
|
};
|
|
460
488
|
var PriceListDetailPage = Object.assign(Root, {
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
import {
|
|
2
|
+
SectionRow
|
|
3
|
+
} from "./chunk-3XPXUIK3.js";
|
|
4
|
+
import {
|
|
5
|
+
ActionMenu
|
|
6
|
+
} from "./chunk-BDGZ4EQO.js";
|
|
7
|
+
|
|
8
|
+
// src/pages/inventory/inventory-detail/components/inventory-item-general-section.tsx
|
|
9
|
+
import { Container, Heading } from "@medusajs/ui";
|
|
10
|
+
import { PencilSquare } from "@medusajs/icons";
|
|
11
|
+
import { useTranslation } from "react-i18next";
|
|
12
|
+
import { DisplayExtensionZone, DisplayField } from "@mercurjs/dashboard-shared";
|
|
13
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
14
|
+
var InventoryItemGeneralSection = ({
|
|
15
|
+
inventoryItem
|
|
16
|
+
}) => {
|
|
17
|
+
const { t } = useTranslation();
|
|
18
|
+
const getQuantityFormat = (quantity) => {
|
|
19
|
+
if (quantity !== void 0 && !isNaN(quantity)) {
|
|
20
|
+
return t("inventory.quantityAcrossLocations", {
|
|
21
|
+
quantity,
|
|
22
|
+
locations: inventoryItem.location_levels?.length
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
return "-";
|
|
26
|
+
};
|
|
27
|
+
return /* @__PURE__ */ jsxs(Container, { className: "divide-y p-0", "data-testid": "inventory-item-general-section", children: [
|
|
28
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between px-6 py-4", "data-testid": "inventory-item-general-header", children: [
|
|
29
|
+
/* @__PURE__ */ jsx(
|
|
30
|
+
DisplayField,
|
|
31
|
+
{
|
|
32
|
+
model: "inventory_item",
|
|
33
|
+
zone: "general",
|
|
34
|
+
id: "title",
|
|
35
|
+
data: inventoryItem,
|
|
36
|
+
children: /* @__PURE__ */ jsxs(Heading, { "data-testid": "inventory-item-general-title", children: [
|
|
37
|
+
inventoryItem.title ?? inventoryItem.sku,
|
|
38
|
+
" ",
|
|
39
|
+
t("fields.details")
|
|
40
|
+
] })
|
|
41
|
+
}
|
|
42
|
+
),
|
|
43
|
+
/* @__PURE__ */ jsx(
|
|
44
|
+
ActionMenu,
|
|
45
|
+
{
|
|
46
|
+
groups: [
|
|
47
|
+
{
|
|
48
|
+
actions: [
|
|
49
|
+
{
|
|
50
|
+
icon: /* @__PURE__ */ jsx(PencilSquare, {}),
|
|
51
|
+
label: t("actions.edit"),
|
|
52
|
+
to: "edit"
|
|
53
|
+
}
|
|
54
|
+
]
|
|
55
|
+
}
|
|
56
|
+
],
|
|
57
|
+
"data-testid": "inventory-item-general-action-menu"
|
|
58
|
+
}
|
|
59
|
+
)
|
|
60
|
+
] }),
|
|
61
|
+
/* @__PURE__ */ jsx(
|
|
62
|
+
DisplayField,
|
|
63
|
+
{
|
|
64
|
+
model: "inventory_item",
|
|
65
|
+
zone: "general",
|
|
66
|
+
id: "sku",
|
|
67
|
+
data: inventoryItem,
|
|
68
|
+
children: /* @__PURE__ */ jsx(SectionRow, { title: t("fields.sku"), value: inventoryItem.sku ?? "-", "data-testid": "inventory-item-sku-row" })
|
|
69
|
+
}
|
|
70
|
+
),
|
|
71
|
+
/* @__PURE__ */ jsx(
|
|
72
|
+
DisplayField,
|
|
73
|
+
{
|
|
74
|
+
model: "inventory_item",
|
|
75
|
+
zone: "general",
|
|
76
|
+
id: "stocked_quantity",
|
|
77
|
+
data: inventoryItem,
|
|
78
|
+
children: /* @__PURE__ */ jsx(
|
|
79
|
+
SectionRow,
|
|
80
|
+
{
|
|
81
|
+
title: t("fields.inStock"),
|
|
82
|
+
value: getQuantityFormat(inventoryItem.stocked_quantity),
|
|
83
|
+
"data-testid": "inventory-item-in-stock-row"
|
|
84
|
+
}
|
|
85
|
+
)
|
|
86
|
+
}
|
|
87
|
+
),
|
|
88
|
+
/* @__PURE__ */ jsx(
|
|
89
|
+
DisplayField,
|
|
90
|
+
{
|
|
91
|
+
model: "inventory_item",
|
|
92
|
+
zone: "general",
|
|
93
|
+
id: "reserved_quantity",
|
|
94
|
+
data: inventoryItem,
|
|
95
|
+
children: /* @__PURE__ */ jsx(
|
|
96
|
+
SectionRow,
|
|
97
|
+
{
|
|
98
|
+
title: t("inventory.reserved"),
|
|
99
|
+
value: getQuantityFormat(inventoryItem.reserved_quantity),
|
|
100
|
+
"data-testid": "inventory-item-reserved-row"
|
|
101
|
+
}
|
|
102
|
+
)
|
|
103
|
+
}
|
|
104
|
+
),
|
|
105
|
+
/* @__PURE__ */ jsx(
|
|
106
|
+
DisplayField,
|
|
107
|
+
{
|
|
108
|
+
model: "inventory_item",
|
|
109
|
+
zone: "general",
|
|
110
|
+
id: "available_quantity",
|
|
111
|
+
data: inventoryItem,
|
|
112
|
+
children: /* @__PURE__ */ jsx(
|
|
113
|
+
SectionRow,
|
|
114
|
+
{
|
|
115
|
+
title: t("inventory.available"),
|
|
116
|
+
value: getQuantityFormat(
|
|
117
|
+
inventoryItem.stocked_quantity - inventoryItem.reserved_quantity
|
|
118
|
+
),
|
|
119
|
+
"data-testid": "inventory-item-available-row"
|
|
120
|
+
}
|
|
121
|
+
)
|
|
122
|
+
}
|
|
123
|
+
),
|
|
124
|
+
/* @__PURE__ */ jsx(
|
|
125
|
+
DisplayExtensionZone,
|
|
126
|
+
{
|
|
127
|
+
model: "inventory_item",
|
|
128
|
+
zone: "general",
|
|
129
|
+
data: inventoryItem,
|
|
130
|
+
builtInFieldIds: [
|
|
131
|
+
"title",
|
|
132
|
+
"sku",
|
|
133
|
+
"stocked_quantity",
|
|
134
|
+
"reserved_quantity",
|
|
135
|
+
"available_quantity"
|
|
136
|
+
]
|
|
137
|
+
}
|
|
138
|
+
)
|
|
139
|
+
] });
|
|
140
|
+
};
|
|
141
|
+
|
|
142
|
+
export {
|
|
143
|
+
InventoryItemGeneralSection
|
|
144
|
+
};
|