@feedmepos/mf-inventory-portal 0.0.25-dev.9 → 0.0.26-dev.1
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/{App-9zSE_swt.js → App-CipfIdtR.js} +71 -72
- package/dist/ApprovalView-IC33yBg7.js +143 -0
- package/dist/{BindingsDialog-eGbOIQkw.js → BindingsDialog-EN6Kbnu7.js} +2 -2
- package/dist/{BindingsPicker-CVXrd29s.js → BindingsPicker-DQ_LEoqq.js} +3 -3
- package/dist/BindingsTable-DGXpAyM4.js +120 -0
- package/dist/ClosingDraftView-DR9xsW9I.js +1348 -0
- package/dist/ClosingTemplateView-CC1T7ovX.js +1804 -0
- package/dist/{FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-C9un0wCK.js → FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-CovzlB-s.js} +43 -43
- package/dist/{FmUnitInput.vue_vue_type_script_setup_true_lang-BRSABJnM.js → FmUnitInput.vue_vue_type_script_setup_true_lang-BxEtsFXp.js} +29 -29
- package/dist/{IngredientBindedItem.vue_vue_type_script_setup_true_lang-DeRvrF7O.js → IngredientBindedItem.vue_vue_type_script_setup_true_lang-B8H6vFJ5.js} +1 -1
- package/dist/{IngredientGroupView-ZWCOAljO.js → IngredientGroupView-DRPbXH8d.js} +24 -24
- package/dist/IngredientsView-DSHcH30X.js +1731 -0
- package/dist/{IntegrationView-DO3Ambro.js → IntegrationView-BgACk-jP.js} +605 -669
- package/dist/{InventoryBindingForm-BjtFP29c.js → InventoryBindingForm-Fs-CHoT-.js} +1 -1
- package/dist/{InventoryBindingForm.vue_vue_type_script_setup_true_lang-CFMZ4VsK.js → InventoryBindingForm.vue_vue_type_script_setup_true_lang-DVHQjAEC.js} +63 -63
- package/dist/{InventoryBindingSummary-C6DkVX-B.js → InventoryBindingSummary-CHWMtGtk.js} +1 -1
- package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-nb1t6u2V.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-Cu9V-8Cf.js} +1 -1
- package/dist/{PremiumBadge.vue_vue_type_script_setup_true_lang-BcMAXo4F.js → PremiumBadge.vue_vue_type_script_setup_true_lang-CyVRCAqv.js} +12 -12
- package/dist/PublishView-CI7o5a0F.js +222 -0
- package/dist/{PurchaseOrderPrintPreview-_MCAsdw9.js → PurchaseOrderPrintPreview-CO4a811o.js} +1 -1
- package/dist/ReceiveRequestView-KH5wY5BA.js +2562 -0
- package/dist/{RecipeView-dmmjklwh.js → RecipeView-DxVbUxOG.js} +47 -47
- package/dist/StockView-CiHPAaYh.js +1840 -0
- package/dist/{SupplierView-CO5460uC.js → SupplierView-DPj87kld.js} +448 -461
- package/dist/TransferDetails.vue_vue_type_script_setup_true_lang-CfPPCFh8.js +1566 -0
- package/dist/TransferTemplateView-3W29v8hd.js +1420 -0
- package/dist/{UnitView-DbYzxCXF.js → UnitView-WCtNQFf8.js} +23 -23
- package/dist/{WarehouseView-BII4SEVC.js → WarehouseView-tgFFbQY7.js} +40 -40
- package/dist/api/bill.d.ts +12 -2
- package/dist/api/closing-draft.d.ts +1 -0
- package/dist/api/inventory.d.ts +8 -7
- package/dist/api/netsuite.d.ts +22 -5
- package/dist/api/purchase-order.d.ts +6 -1
- package/dist/api/stock.d.ts +1 -0
- package/dist/{app-IM1yJnE8.js → app-Ba80HxT3.js} +38448 -34777
- package/dist/app.d.ts +965 -120
- package/dist/app.js +1 -1
- package/dist/components/FmDroppableField.vue.d.ts +1 -1
- package/dist/components/FmMultiselectDialog.d.ts +23 -0
- package/dist/components/inventory-binding/InventoryBinding.vue.d.ts +1 -1
- package/dist/components/shell/inventory/binding-ui.vue.d.ts +1 -1
- package/dist/{decimal-DQUpCN-B.js → decimal-DFqusYHB.js} +1 -1
- package/dist/{format-unit-display-COuIZISg.js → format-unit-display-Bsod5Ra6.js} +232 -238
- package/dist/helper/country.d.ts +1 -0
- package/dist/helper/fuzzy.d.ts +1 -1
- package/dist/helper/number.d.ts +1 -1
- package/dist/index-0ekVGPtB.js +12197 -0
- package/dist/index-ZAEVHtfa.js +84 -0
- package/dist/{stock-BJUTiXXk.js → stock-Cn6EQvTz.js} +29 -25
- package/dist/stores/feature.d.ts +11 -6
- package/dist/stores/helper/generate-backend-urls.d.ts +0 -1
- package/dist/stores/integration/index.d.ts +2 -0
- package/dist/stores/integration/netsuite.d.ts +22 -5
- package/dist/stores/inventory.d.ts +141 -8
- package/dist/stores/location.d.ts +0 -9
- package/dist/stores/stock.d.ts +5 -0
- package/dist/stores/warehouse.d.ts +4 -7
- package/dist/style.css +1 -1
- package/dist/{supplier-CM-qQVyI.js → supplier-P1gi71dg.js} +4 -4
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/{use-ingredient-select-dialog-Cn79xFNg.js → use-ingredient-select-dialog-BW5imbB5.js} +1 -1
- package/dist/{use-inventory-binding-dialog-zwOG19YV.js → use-inventory-binding-dialog-BYxb8nXg.js} +1 -1
- package/dist/views/adjustment-template/wastage-template/actions.d.ts +0 -24
- package/dist/views/adjustment-template/wastage-template/table.d.ts +0 -24
- package/dist/views/closing-draft/components/closing-draft-dialog/ClosingDraftDialog.vue.d.ts +92 -8
- package/dist/views/closing-draft/composables/use-closing-draft-actions.d.ts +4 -1
- package/dist/views/closing-draft/composables/use-closing-draft-table.d.ts +552 -48
- package/dist/views/closing-draft/helpers/export-draft.helper.d.ts +1 -1
- package/dist/views/closing-template/components/closing-template-form/composables/use-closing-template-items.d.ts +1 -1
- package/dist/views/closing-template/composables/use-closing-template-actions.d.ts +12 -36
- package/dist/views/closing-template/composables/use-closing-template-table.d.ts +12 -36
- package/dist/views/ingredient-group/composables/use-ingredient-group-table.d.ts +3 -3
- package/dist/views/ingredients/components/ingredient-form/IngredientForm.vue.d.ts +2 -2
- package/dist/views/ingredients/composables/use-ingredient-table.d.ts +1 -1
- package/dist/views/receive-request/components/netsuite/NetSuiteProps.d.ts +2 -0
- package/dist/views/receive-request/components/transfer-details/TransferDetailsProps.d.ts +4 -1
- package/dist/views/receive-request/components/transfer-form/NetSuiteField.vue.d.ts +2 -0
- package/dist/views/receive-request/components/transfer-form/SparkIcon.vue.d.ts +1 -1
- package/dist/views/receive-request/components/transfer-form/TransferForm.vue.d.ts +529 -489
- package/dist/views/receive-request/components/transfer-form/components/ForecastStock.vue.d.ts +8 -4
- package/dist/views/receive-request/components/transfer-form/components/TransferItemTable.vue.d.ts +382 -2
- package/dist/views/receive-request/components/transfer-form/composables/use-transfer-items.d.ts +5 -2
- package/dist/views/receive-request/composables/use-receive-request-form.d.ts +1238 -972
- package/dist/views/receive-request/composables/use-receive-request-table.d.ts +1080 -1003
- package/dist/views/receive-request/import/XilnexImportDialog.vue.d.ts +22 -0
- package/dist/views/receive-request/import/XilnexImportForm.vue.d.ts +17 -0
- package/dist/views/receive-request/import/XilnexResult.vue.d.ts +17 -0
- package/dist/views/receive-request/import/export.d.ts +14 -0
- package/dist/views/receive-request/import/props.d.ts +7 -0
- package/dist/views/stock/components/StockRecordCard.vue.d.ts +6 -1
- package/dist/views/stock/components/dialog/AdjustedItemForm.vue.d.ts +6 -4
- package/dist/views/transfer-template/components/transfer-template-form/components/TransferTemplateItemTable.vue.d.ts +220 -0
- package/dist/views/transfer-template/components/transfer-template-form/composables/use-template-enabled-locations-2.d.ts +0 -8
- package/dist/views/transfer-template/components/transfer-template-form/composables/use-template-enabled-locations.d.ts +0 -1
- package/dist/views/transfer-template/components/transfer-template-form/composables/use-transfer-template-items.d.ts +7 -2
- package/dist/views/transfer-template/composables/use-transfer-template-actions.d.ts +530 -530
- package/dist/views/transfer-template/composables/use-transfer-template-table.d.ts +530 -530
- package/dist/views/transfer-template/composables/useTransferTemplateHelper.d.ts +305 -0
- package/dist/views/warehouse/components/WarehouseForm.vue.d.ts +8 -14
- package/dist/vue-i18n-CjtRsQMl.js +2365 -0
- package/package.json +7 -7
- package/dist/ApprovalView-C2tg-wsm.js +0 -138
- package/dist/BindingsTable-CCsQEFnu.js +0 -145
- package/dist/ClosingDraftView-BI8b3CJ9.js +0 -1225
- package/dist/ClosingTemplateView-miJnC-ML.js +0 -1859
- package/dist/IngredientsView-5-pSX6y_.js +0 -1718
- package/dist/PublishView-DOMQdIJ7.js +0 -192
- package/dist/ReceiveRequestView-902hWGtz.js +0 -1877
- package/dist/StockView-C4lEYLXU.js +0 -7847
- package/dist/TransferDetails.vue_vue_type_script_setup_true_lang-D6sZDCEY.js +0 -1328
- package/dist/TransferTemplateView-C9UwNTnY.js +0 -1371
- package/dist/components/FmAutocompleteTextField.vue.d.ts +0 -31
- package/dist/feature-DMBVVBsQ.js +0 -1005
- package/dist/index-CIrsMt6f.js +0 -35546
- package/dist/views/dev/components/AutocompleteTextField.vue.d.ts +0 -2
- package/dist/vue-i18n-CzPFJ9JY.js +0 -2365
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@feedmepos/mf-inventory-portal",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.26-dev.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"files": [
|
|
6
6
|
"dist"
|
|
@@ -14,11 +14,11 @@
|
|
|
14
14
|
"./style": "./dist/style.css"
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"@feedmepos/core": "
|
|
18
|
-
"@feedmepos/feature-flag": "^0.0.
|
|
17
|
+
"@feedmepos/core": "2.14.10",
|
|
18
|
+
"@feedmepos/feature-flag": "^0.0.15",
|
|
19
19
|
"@feedmepos/menu": "1.0.34",
|
|
20
|
-
"@feedmepos/mf-common": "1.
|
|
21
|
-
"@feedmepos/ui-library": "1.
|
|
20
|
+
"@feedmepos/mf-common": "1.26.7",
|
|
21
|
+
"@feedmepos/ui-library": "1.6.7",
|
|
22
22
|
"@tanstack/vue-table": "^8.17.3",
|
|
23
23
|
"@types/dinero.js": "^1.9.4",
|
|
24
24
|
"@typescript-eslint/typescript-estree": "^8.21.0",
|
|
@@ -42,9 +42,9 @@
|
|
|
42
42
|
"vue-router": "^4.4.0",
|
|
43
43
|
"xlsx": "^0.18.5",
|
|
44
44
|
"zod": "3.17.9",
|
|
45
|
-
"@feedmepos/inventory-core": "^0.
|
|
45
|
+
"@feedmepos/inventory-core": "^1.0.0",
|
|
46
46
|
"@feedmepos/inventory-core-js": "^1.0.1",
|
|
47
|
-
"@feedmepos/zod-inventory": "^1.0.
|
|
47
|
+
"@feedmepos/zod-inventory": "^1.0.11"
|
|
48
48
|
},
|
|
49
49
|
"devDependencies": {
|
|
50
50
|
"@rushstack/eslint-patch": "^1.10.3",
|
|
@@ -1,138 +0,0 @@
|
|
|
1
|
-
import { defineComponent as ae, ref as g, watch as oe, computed as b, resolveComponent as re, openBlock as y, createBlock as G, unref as e, withCtx as x, createElementVNode as s, normalizeClass as ne, createVNode as n, normalizeStyle as se, toDisplayString as le, createElementBlock as ce, createCommentVNode as ie, Teleport as ue, mergeProps as pe } from "vue";
|
|
2
|
-
import { u as me, az as v, aK as de, ab as J, y as fe, _ as ve, z as _e, B as he, E as _ } from "./app-IM1yJnE8.js";
|
|
3
|
-
import { a as De, b as ge, _ as be } from "./TransferDetails.vue_vue_type_script_setup_true_lang-D6sZDCEY.js";
|
|
4
|
-
import { useBreakpoints as ye } from "@feedmepos/ui-library";
|
|
5
|
-
import { useI18n as xe } from "@feedmepos/mf-common";
|
|
6
|
-
const we = { class: "flex flex-col py-8" }, Re = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, ke = { class: "fm-typo-en-body-lg-600 text-fm-color-typo-primary line-clamp-1" }, Oe = { class: "fm-typo-en-body-md-400 text-fm-color-typo-primary line-clamp-1" }, Se = {
|
|
7
|
-
key: 0,
|
|
8
|
-
class: "fm-typo-en-body-md-400 text-fm-color-typo-primary line-clamp-1"
|
|
9
|
-
}, Te = { class: "pt-8" }, Ye = /* @__PURE__ */ ae({
|
|
10
|
-
__name: "ApprovalView",
|
|
11
|
-
setup(Ce) {
|
|
12
|
-
const o = De("approval"), { columnDefs: Q } = ge("approval", o), W = me();
|
|
13
|
-
v.object({
|
|
14
|
-
name: v.string().optional().nullable(),
|
|
15
|
-
start: v.date().optional().nullable(),
|
|
16
|
-
end: v.date().optional().nullable()
|
|
17
|
-
});
|
|
18
|
-
const w = g({
|
|
19
|
-
name: "",
|
|
20
|
-
...de()
|
|
21
|
-
}), a = g({
|
|
22
|
-
startDate: J(w.value.start ?? /* @__PURE__ */ new Date()),
|
|
23
|
-
endDate: J(w.value.end ?? /* @__PURE__ */ new Date())
|
|
24
|
-
});
|
|
25
|
-
oe([() => a.value.startDate], () => {
|
|
26
|
-
if (!a.value.startDate)
|
|
27
|
-
return;
|
|
28
|
-
if (!a.value.endDate) {
|
|
29
|
-
a.value.endDate = a.value.startDate;
|
|
30
|
-
return;
|
|
31
|
-
}
|
|
32
|
-
const c = new Date(a.value.startDate);
|
|
33
|
-
if (new Date(a.value.endDate).getTime() < c.getTime()) {
|
|
34
|
-
a.value.endDate = a.value.startDate;
|
|
35
|
-
return;
|
|
36
|
-
}
|
|
37
|
-
});
|
|
38
|
-
const h = g(""), { breakpoints: R } = ye(), D = b(() => R.value.xs || R.value.sm), X = b(() => D.value ? 10 : 20), Z = fe(), { t: k } = xe(), B = b(() => [
|
|
39
|
-
{
|
|
40
|
-
label: k("common.refresh"),
|
|
41
|
-
value: "refresh"
|
|
42
|
-
}
|
|
43
|
-
]);
|
|
44
|
-
function I(c) {
|
|
45
|
-
switch (c) {
|
|
46
|
-
case "refresh":
|
|
47
|
-
return o.fetchData();
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
return (c, l) => {
|
|
51
|
-
const ee = re("FmTable");
|
|
52
|
-
return y(), G(ve, {
|
|
53
|
-
title: e(k)("inventory.transfer.approval.title"),
|
|
54
|
-
actions: B.value,
|
|
55
|
-
"onClick:action": I
|
|
56
|
-
}, {
|
|
57
|
-
default: x(() => [
|
|
58
|
-
s("div", {
|
|
59
|
-
class: ne([
|
|
60
|
-
"flex flex-col gap-8 max-h-full",
|
|
61
|
-
{
|
|
62
|
-
"p-0": D.value,
|
|
63
|
-
"px-24 ": !D.value
|
|
64
|
-
}
|
|
65
|
-
])
|
|
66
|
-
}, [
|
|
67
|
-
n(_e, {
|
|
68
|
-
searchable: "",
|
|
69
|
-
"change-location": "",
|
|
70
|
-
search: h.value,
|
|
71
|
-
"onUpdate:search": l[0] || (l[0] = (r) => h.value = r)
|
|
72
|
-
}, null, 8, ["search"]),
|
|
73
|
-
n(ee, {
|
|
74
|
-
style: se(e(Z).tableHeight),
|
|
75
|
-
"column-defs": e(Q),
|
|
76
|
-
"row-data": e(o).purchaseRequests.value,
|
|
77
|
-
"search-value": h.value,
|
|
78
|
-
loading: !e(W)._currentLocation || e(o).loading.value,
|
|
79
|
-
onRowClick: l[1] || (l[1] = (r) => e(o).promptShowTransferDetails(r.original.purchaseOrder, r.original)),
|
|
80
|
-
"page-size": X.value
|
|
81
|
-
}, {
|
|
82
|
-
"list-row": x((r) => [
|
|
83
|
-
n(he, {
|
|
84
|
-
row: r,
|
|
85
|
-
onRowClick: (t) => e(o).promptShowTransferDetails(t.purchaseOrder, t)
|
|
86
|
-
}, {
|
|
87
|
-
default: x((t) => {
|
|
88
|
-
var O, S, T, i, C, z, M, $, u, F, V, p, Y, m, q, E, L, N, P, d, j, A, H, K, f, U;
|
|
89
|
-
return [
|
|
90
|
-
s("div", we, [
|
|
91
|
-
s("div", Re, [
|
|
92
|
-
n(e(_), {
|
|
93
|
-
render: (T = (S = (O = t.purchaseOrder__id) == null ? void 0 : O.column) == null ? void 0 : S.columnDef) == null ? void 0 : T.cell,
|
|
94
|
-
props: (C = (i = t.purchaseOrder__id) == null ? void 0 : i.getContext) == null ? void 0 : C.call(i)
|
|
95
|
-
}, null, 8, ["render", "props"])
|
|
96
|
-
]),
|
|
97
|
-
s("div", ke, [
|
|
98
|
-
n(e(_), {
|
|
99
|
-
render: ($ = (M = (z = t.to_name) == null ? void 0 : z.column) == null ? void 0 : M.columnDef) == null ? void 0 : $.cell,
|
|
100
|
-
props: (F = (u = t.to_name) == null ? void 0 : u.getContext) == null ? void 0 : F.call(u)
|
|
101
|
-
}, null, 8, ["render", "props"])
|
|
102
|
-
]),
|
|
103
|
-
s("div", Oe, le((q = (m = (Y = (p = (V = r.original.purchaseOrder) == null ? void 0 : V.items) == null ? void 0 : p.map) == null ? void 0 : Y.call(p, (te) => `${te.name}`)) == null ? void 0 : m.join) == null ? void 0 : q.call(m, ", ")), 1),
|
|
104
|
-
(E = r.original.purchaseOrder) != null && E.ref ? (y(), ce("div", Se, [
|
|
105
|
-
n(e(_), {
|
|
106
|
-
render: (P = (N = (L = t.purchaseOrder_ref) == null ? void 0 : L.column) == null ? void 0 : N.columnDef) == null ? void 0 : P.cell,
|
|
107
|
-
props: (j = (d = t.purchaseOrder_ref) == null ? void 0 : d.getContext) == null ? void 0 : j.call(d)
|
|
108
|
-
}, null, 8, ["render", "props"])
|
|
109
|
-
])) : ie("", !0),
|
|
110
|
-
s("div", Te, [
|
|
111
|
-
n(e(_), {
|
|
112
|
-
render: (K = (H = (A = t.purchaseOrder_status) == null ? void 0 : A.column) == null ? void 0 : H.columnDef) == null ? void 0 : K.cell,
|
|
113
|
-
props: (U = (f = t.purchaseOrder_status) == null ? void 0 : f.getContext) == null ? void 0 : U.call(f)
|
|
114
|
-
}, null, 8, ["render", "props"])
|
|
115
|
-
])
|
|
116
|
-
])
|
|
117
|
-
];
|
|
118
|
-
}),
|
|
119
|
-
_: 2
|
|
120
|
-
}, 1032, ["row", "onRowClick"])
|
|
121
|
-
]),
|
|
122
|
-
_: 1
|
|
123
|
-
}, 8, ["style", "column-defs", "row-data", "search-value", "loading", "page-size"])
|
|
124
|
-
], 2),
|
|
125
|
-
(y(), G(ue, { to: "body" }, [
|
|
126
|
-
n(be, pe(e(o).transferDetailsProps.value, {
|
|
127
|
-
onSubmitted: e(o).fetchData
|
|
128
|
-
}), null, 16, ["onSubmitted"])
|
|
129
|
-
]))
|
|
130
|
-
]),
|
|
131
|
-
_: 1
|
|
132
|
-
}, 8, ["title", "actions"]);
|
|
133
|
-
};
|
|
134
|
-
}
|
|
135
|
-
});
|
|
136
|
-
export {
|
|
137
|
-
Ye as default
|
|
138
|
-
};
|
|
@@ -1,145 +0,0 @@
|
|
|
1
|
-
import { defineComponent as _, ref as c, provide as C, computed as f, resolveComponent as b, openBlock as p, createBlock as h, h as z, onMounted as B, onUnmounted as I, createElementBlock as y, createVNode as N, createElementVNode as x } from "vue";
|
|
2
|
-
import { F as v, a as E, aQ as F } from "./app-IM1yJnE8.js";
|
|
3
|
-
import { components as L } from "@feedmepos/ui-library";
|
|
4
|
-
import "@feedmepos/mf-common";
|
|
5
|
-
const P = /* @__PURE__ */ _({
|
|
6
|
-
__name: "binding-ui",
|
|
7
|
-
props: {
|
|
8
|
-
items: { default: () => [] },
|
|
9
|
-
recipes: { default: () => [] },
|
|
10
|
-
skus: { default: () => [] },
|
|
11
|
-
type: { default: "Product" },
|
|
12
|
-
editable: { type: Boolean, default: !1 }
|
|
13
|
-
},
|
|
14
|
-
emits: ["click:open-binding-dialog"],
|
|
15
|
-
setup(k, { emit: d }) {
|
|
16
|
-
const u = c({
|
|
17
|
-
isOpen: !1,
|
|
18
|
-
initialValue: [],
|
|
19
|
-
context: "",
|
|
20
|
-
name: ""
|
|
21
|
-
});
|
|
22
|
-
C("closeDialog", () => {
|
|
23
|
-
u.value.isOpen = !u.value.isOpen;
|
|
24
|
-
});
|
|
25
|
-
const o = k, m = d, a = f(() => o.items.map((e) => ({
|
|
26
|
-
key: e.key,
|
|
27
|
-
name: e.name,
|
|
28
|
-
_skuLinked: e.bindings.filter(
|
|
29
|
-
({ type: n, id: s }) => n === v.enum.SKU && o.skus.some((l) => l._id === s)
|
|
30
|
-
).length,
|
|
31
|
-
_recipeLinked: e.bindings.filter(
|
|
32
|
-
({ type: n, id: s }) => n === v.enum.RECIPE && o.recipes.some((l) => l._id === s)
|
|
33
|
-
).length,
|
|
34
|
-
onUpdate: async () => {
|
|
35
|
-
o.editable && m("click:open-binding-dialog", o.type, e);
|
|
36
|
-
}
|
|
37
|
-
}))), g = [
|
|
38
|
-
{
|
|
39
|
-
accessorKey: "name",
|
|
40
|
-
header: "Name",
|
|
41
|
-
size: "auto"
|
|
42
|
-
},
|
|
43
|
-
{
|
|
44
|
-
id: "ingredient",
|
|
45
|
-
header: "Ingredient",
|
|
46
|
-
size: 200,
|
|
47
|
-
cell(i) {
|
|
48
|
-
const e = a.value.find((s) => s.key === i.row.original.key), n = e == null ? void 0 : e._skuLinked;
|
|
49
|
-
return n === 1 ? "1 item" : n ? `${n} items` : "Not set";
|
|
50
|
-
}
|
|
51
|
-
},
|
|
52
|
-
{
|
|
53
|
-
id: "recipe",
|
|
54
|
-
header: "Recipe",
|
|
55
|
-
size: 200,
|
|
56
|
-
cell(i) {
|
|
57
|
-
const e = a.value.find((s) => s.key === i.row.original.key), n = e == null ? void 0 : e._recipeLinked;
|
|
58
|
-
return n === 1 ? "1 item" : n ? `${n} items` : "Not set";
|
|
59
|
-
}
|
|
60
|
-
},
|
|
61
|
-
{
|
|
62
|
-
id: "action",
|
|
63
|
-
header: "",
|
|
64
|
-
size: 24,
|
|
65
|
-
cell(i) {
|
|
66
|
-
const e = a.value.find((n) => n.key === i.row.original.key);
|
|
67
|
-
return z(L.FmButton, {
|
|
68
|
-
icon: "edit",
|
|
69
|
-
bgColor: "white",
|
|
70
|
-
textColor: "neutral-grey-400",
|
|
71
|
-
iconColor: "neutral-grey-400",
|
|
72
|
-
class: "text-fm-color-neutral-gray-400",
|
|
73
|
-
onClick() {
|
|
74
|
-
e == null || e.onUpdate();
|
|
75
|
-
}
|
|
76
|
-
});
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
];
|
|
80
|
-
return (i, e) => {
|
|
81
|
-
const n = b("FmTable");
|
|
82
|
-
return p(), h(n, {
|
|
83
|
-
"column-defs": g,
|
|
84
|
-
"row-data": a.value,
|
|
85
|
-
"hide-footer": "",
|
|
86
|
-
"shrink-at": 99999
|
|
87
|
-
}, null, 8, ["row-data"]);
|
|
88
|
-
};
|
|
89
|
-
}
|
|
90
|
-
}), R = {
|
|
91
|
-
key: 1,
|
|
92
|
-
class: "p-24 flex items-center justify-center gap-16"
|
|
93
|
-
}, D = /* @__PURE__ */ _({
|
|
94
|
-
__name: "BindingsTable",
|
|
95
|
-
setup(k) {
|
|
96
|
-
const d = E(), u = c(!0), o = c(new Array()), m = f(() => d.recipes), a = f(() => d.skus), g = c(""), i = F(n), e = c();
|
|
97
|
-
async function n() {
|
|
98
|
-
await d.readInventory(), e.value = i.onMessage(
|
|
99
|
-
"props:grouped-bindings",
|
|
100
|
-
(t) => {
|
|
101
|
-
u.value = !1, o.value = t;
|
|
102
|
-
}
|
|
103
|
-
), i.sendMessage("props:grouped-bindings");
|
|
104
|
-
}
|
|
105
|
-
async function s(t, r) {
|
|
106
|
-
i.sendMessage("@click:open-binding-dialog", {
|
|
107
|
-
key: t,
|
|
108
|
-
binding: r
|
|
109
|
-
});
|
|
110
|
-
}
|
|
111
|
-
const l = c();
|
|
112
|
-
return B(() => {
|
|
113
|
-
const t = l.value;
|
|
114
|
-
t && new ResizeObserver(() => {
|
|
115
|
-
i.sendMessage("resize", t.scrollHeight);
|
|
116
|
-
}).observe(t);
|
|
117
|
-
}), I(() => {
|
|
118
|
-
var t, r;
|
|
119
|
-
(r = (t = e.value) == null ? void 0 : t.removeEventListener) == null || r.call(t);
|
|
120
|
-
}), (t, r) => {
|
|
121
|
-
const w = b("FmCircularProgress");
|
|
122
|
-
return p(), y("div", {
|
|
123
|
-
class: "bg-white",
|
|
124
|
-
ref_key: "resizeableRef",
|
|
125
|
-
ref: l
|
|
126
|
-
}, [
|
|
127
|
-
u.value ? (p(), y("div", R, [
|
|
128
|
-
N(w, { size: "md" }),
|
|
129
|
-
r[0] || (r[0] = x("div", null, "Loading bindings table...", -1))
|
|
130
|
-
])) : (p(), h(P, {
|
|
131
|
-
key: 0,
|
|
132
|
-
items: o.value,
|
|
133
|
-
recipes: m.value,
|
|
134
|
-
skus: a.value,
|
|
135
|
-
type: g.value,
|
|
136
|
-
editable: "",
|
|
137
|
-
"onClick:openBindingDialog": s
|
|
138
|
-
}, null, 8, ["items", "recipes", "skus", "type"]))
|
|
139
|
-
], 512);
|
|
140
|
-
};
|
|
141
|
-
}
|
|
142
|
-
});
|
|
143
|
-
export {
|
|
144
|
-
D as default
|
|
145
|
-
};
|