@feedmepos/mf-inventory-portal 0.0.22-dev.4 → 0.0.22-dev.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/{ApprovalView-xF73Z1jN.js → ApprovalView-DKqwRFlF.js} +25 -26
- package/dist/{BindingsDialog-CCSAxGT4.js → BindingsDialog-CtMSqEuE.js} +9 -9
- package/dist/{BindingsPicker-ErFH0uEQ.js → BindingsPicker-DCLNF1PL.js} +22 -22
- package/dist/{BindingsTable-D8ffJgIJ.js → BindingsTable-6ndQuHeA.js} +1 -1
- package/dist/ClosingTemplateView-BPrDQ_8-.js +1688 -0
- package/dist/FmDroppableField-DQFPEiJn.js +152 -0
- package/dist/FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-BUGB0uk3.js +266 -0
- package/dist/FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-CM93v-jp.js +359 -0
- package/dist/IngredientBindedItem.vue_vue_type_script_setup_true_lang-SNp8etCc.js +51 -0
- package/dist/IngredientsView-B1jGkWYN.js +1611 -0
- package/dist/{IntegrationView-54yz2EqS.js → IntegrationView-Bu0waSjB.js} +71 -71
- package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-CKvKlCk-.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-mZQlrYaY.js} +1 -1
- package/dist/PremiumBadge.vue_vue_type_script_setup_true_lang-BEFmqnHk.js +116 -0
- package/dist/{PurchaseOrderPrintPreview-pcpWSfl4.js → PurchaseOrderPrintPreview-DTQViYuX.js} +7 -7
- package/dist/ReceiveRequestView-CNRixgQu.js +4069 -0
- package/dist/RecipeView-HStPC5pE.js +591 -0
- package/dist/Standalone.vue.d.ts +2 -0
- package/dist/StockView-JO3NtkX9.js +7762 -0
- package/dist/{SupplierView-TYCkPXan.js → SupplierView-gtaS4K3U.js} +111 -111
- package/dist/TransferDetails.vue_vue_type_script_setup_true_lang-dPt3qbcX.js +1146 -0
- package/dist/TransferTemplateView-C0pjLfbz.js +2054 -0
- package/dist/{UnitView-B9yE4-rc.js → UnitView-dbInWUk4.js} +18 -18
- package/dist/{WarehouseView-DUtVLTjb.js → WarehouseView-BlTBvLF0.js} +176 -177
- package/dist/api/bill.d.ts +84 -238
- package/dist/api/closing-template.d.ts +6 -4
- package/dist/api/inventory.d.ts +72 -85
- package/dist/api/netsuite.d.ts +47 -0
- package/dist/api/purchase-order-template.d.ts +4 -6
- package/dist/{app-w8TOQVZc.js → app-TB3IWuaU.js} +24520 -23671
- package/dist/app.d.ts +7 -0
- package/dist/app.js +3 -3
- package/dist/components/FmFilterableMenuOptions.vue.d.ts +54 -0
- package/dist/components/FmMinMaxInputRules.d.ts +2 -0
- package/dist/components/FmUnitInputRules.d.ts +2 -0
- package/dist/components/map/GoogleMap.vue.d.ts +4 -4
- package/dist/{decimal-C4q7UMfr.js → decimal-BRAYgPnN.js} +1 -1
- package/dist/defineDeepModel-DrEk5Fhq.js +13 -0
- package/dist/format-time-from-id-kpVYfVQb.js +15 -0
- package/dist/helper/rules.d.ts +7 -0
- package/dist/helper/rules.spec.d.ts +1 -0
- package/dist/helper/xlsx.util.d.ts +7 -0
- package/dist/purchase-order-transaction-type-ZMNa__2l.js +348 -0
- package/dist/stores/api.d.ts +1 -0
- package/dist/stores/feature.d.ts +0 -1
- package/dist/stores/helper/core-store-proxy.d.ts +3 -0
- package/dist/stores/helper/generate-backend-urls.d.ts +1 -0
- package/dist/stores/inventory.d.ts +85 -0
- package/dist/stores/location.d.ts +508 -503
- package/dist/stores/netsuite.d.ts +69 -0
- package/dist/stores/route.d.ts +0 -5
- package/dist/stores/supplier.d.ts +120 -3
- package/dist/style.css +1 -1
- package/dist/supplier-CJcqHpaM.js +70 -0
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/use-template-enabled-locations-2-DyD24laW.js +85 -0
- package/dist/views/closing-template/closing-template-import/ClosingTemplateImportItem.vue.d.ts +12 -0
- package/dist/views/closing-template/closing-template-import/ClosingTemplateImportItemProps.d.ts +7 -0
- package/dist/views/closing-template/composables/use-closing-template-actions.d.ts +1093 -1026
- package/dist/views/closing-template/composables/use-closing-template-table.d.ts +1098 -1037
- package/dist/views/closing-template/helpers/import-export.helper.d.ts +58 -0
- package/dist/views/ingredients/composables/use-ingredient-form.d.ts +2 -2
- package/dist/views/receive-request/components/transfer-details/TransferDetailsProps.d.ts +1 -0
- package/dist/views/receive-request/components/transfer-form/NetSuiteField.vue.d.ts +45 -0
- package/dist/views/receive-request/components/transfer-form/TransferForm.vue.d.ts +1944 -82
- package/dist/views/receive-request/components/transfer-form/TransferFormProps.d.ts +1 -0
- package/dist/views/receive-request/composables/use-receive-request-form.d.ts +2351 -284
- package/dist/views/receive-request/composables/use-receive-request-table.d.ts +2300 -233
- package/dist/views/recipe/composables/use-recipe-form.d.ts +2 -2
- package/dist/views/stock/components/StockRecordCard.vue.d.ts +42 -119
- package/dist/views/stock/composables/use-stock-action.d.ts +2 -2
- package/dist/views/transfer-template/components/transfer-template-details/TransferTemplateDetails.vue.d.ts +0 -2
- package/dist/views/transfer-template/components/transfer-template-details/TransferTemplateDetailsProps.d.ts +0 -1
- package/dist/views/transfer-template/components/transfer-template-form/composables/use-template-enabled-locations-2.d.ts +13 -0
- package/dist/views/transfer-template/components/transfer-template-form/composables/use-template-enabled-locations.d.ts +71 -85
- package/dist/views/transfer-template/components/transfer-template-form/composables/use-transfer-locations.d.ts +39 -2
- package/dist/views/transfer-template/components/transfer-template-import/TransferTemplateImport.vue.d.ts +2 -0
- package/dist/views/transfer-template/components/transfer-template-import/TransferTemplateImportItem.vue.d.ts +12 -0
- package/dist/views/transfer-template/components/transfer-template-import/TransferTemplateImportItemProps.d.ts +9 -0
- package/dist/views/transfer-template/composables/use-transfer-template-actions.d.ts +1263 -1466
- package/dist/views/transfer-template/composables/use-transfer-template-table.d.ts +1688 -897
- package/dist/views/transfer-template/helpers/import-export.helper.d.ts +76 -0
- package/dist/views/transfer-template/helpers/remove-deleted-skus.helper.d.ts +1 -0
- package/dist/views/transfer-template/helpers/template-item.error.helper.d.ts +1 -0
- package/dist/views/unit/composables/use-unit-form.d.ts +2 -2
- package/dist/{xlsx-BggStaH1.js → xlsx-Dd5ckm6-.js} +1525 -1525
- package/dist/xlsx.util-qlqvEcJz.js +78 -0
- package/package.json +7 -5
- package/dist/ClosingTemplateView-DdZlX1ug.js +0 -1030
- package/dist/FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-ZYtBNoaE.js +0 -372
- package/dist/IngredientsView-DnwwQJTN.js +0 -1758
- package/dist/PremiumBadge.vue_vue_type_script_setup_true_lang-Bom_KvXW.js +0 -88
- package/dist/ReceiveRequestView-D5HXMY4Z.js +0 -215
- package/dist/RecipeView-BHkTgm5H.js +0 -581
- package/dist/StockView-iczCFYxn.js +0 -1892
- package/dist/TransferDetails.vue_vue_type_script_setup_true_lang-EN3JgHKF.js +0 -740
- package/dist/TransferDialog.vue_vue_type_script_setup_true_lang-DC0Ss5hi.js +0 -1409
- package/dist/TransferTemplateView-Bbvpuys7.js +0 -1230
- package/dist/defineDeepModel-BOApqV24.js +0 -13
- package/dist/format-time-from-id-Cafjo8fn.js +0 -15
- package/dist/id-to-date-CtSHSVJF.js +0 -30
- package/dist/layout/layout-routes.d.ts +0 -6
- package/dist/purchase-order-transaction-type-CIC5h-6x.js +0 -712
- package/dist/supplier-CM-vZ4bQ.js +0 -69
- package/dist/use-template-enabled-locations-Bm00vEzC.js +0 -57
- package/dist/xlsx.util-CqlYZLKW.js +0 -109
- /package/dist/{layout/InventoryLayout.vue.d.ts → views/closing-template/closing-template-import/ClosingTemplateImport.vue.d.ts} +0 -0
|
@@ -0,0 +1,359 @@
|
|
|
1
|
+
import { reactive as E, onUnmounted as W, defineComponent as T, computed as y, resolveComponent as _, openBlock as a, createElementBlock as f, Fragment as L, createElementVNode as m, unref as c, normalizeClass as D, toDisplayString as R, createCommentVNode as g, renderList as I, createBlock as h, createVNode as x, renderSlot as q, Teleport as G, ref as P, withCtx as N, watch as J, mergeModels as K, useModel as U } from "vue";
|
|
2
|
+
import { FmButtonVariant as X, useBreakpoints as O } from "@feedmepos/ui-library";
|
|
3
|
+
import { i as A, V as H } from "./app-TB3IWuaU.js";
|
|
4
|
+
import { useCoreStore as Z, useI18n as Y } from "@feedmepos/mf-common";
|
|
5
|
+
const S = E({});
|
|
6
|
+
function j() {
|
|
7
|
+
const r = `${Math.random()}`, t = new ResizeObserver((o) => {
|
|
8
|
+
const l = o.map((n) => n.target.scrollHeight).reduce((n, s) => n + s);
|
|
9
|
+
S[r] = l;
|
|
10
|
+
}), d = (o) => {
|
|
11
|
+
const l = o.el;
|
|
12
|
+
l && t.observe(l);
|
|
13
|
+
}, u = (o) => {
|
|
14
|
+
const l = o.el;
|
|
15
|
+
l && t.unobserve(l);
|
|
16
|
+
};
|
|
17
|
+
return W(() => {
|
|
18
|
+
t.disconnect(), delete S[r];
|
|
19
|
+
}), {
|
|
20
|
+
get tableHeight() {
|
|
21
|
+
return {
|
|
22
|
+
height: `calc(100dvh - ${Object.values(S).reduce((n, s) => n + s, 0) + 64}px)`
|
|
23
|
+
};
|
|
24
|
+
},
|
|
25
|
+
onMounted: d,
|
|
26
|
+
onUnmounted: u
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
const ee = { class: "flex flex-col w-full bg-white h-full" }, ne = {
|
|
30
|
+
key: 0,
|
|
31
|
+
class: /* @__PURE__ */ D(["text-fm-color-typo-secondary fm-typo-en-body-sm-400"])
|
|
32
|
+
}, te = { key: 0 }, oe = { key: 1 }, le = { class: "bg-white flex-1" }, ae = { class: "fixed bottom-96 right-16" }, we = /* @__PURE__ */ T({
|
|
33
|
+
__name: "SingleColumnLayout",
|
|
34
|
+
props: {
|
|
35
|
+
actions: { default: () => [] },
|
|
36
|
+
title: { default: "Title" },
|
|
37
|
+
description: {},
|
|
38
|
+
showBackButton: { type: Boolean },
|
|
39
|
+
defaultPadding: { type: Boolean },
|
|
40
|
+
breadcrumbs: { default: () => [] },
|
|
41
|
+
usingBusinessHelperText: {}
|
|
42
|
+
},
|
|
43
|
+
emits: ["click:action"],
|
|
44
|
+
setup(r, { emit: t }) {
|
|
45
|
+
const d = r, u = t, o = y(() => d.actions.find((e) => e.isPrimary)), l = y(
|
|
46
|
+
() => d.actions.filter((e) => !e.isPrimary).map((e) => ({ ...e, variant: e.variant ?? X.Tertiary }))
|
|
47
|
+
), { breakpoints: n } = O(), s = y(() => n.value.xs || n.value.sm), v = A(), k = y(() => v.businessLevel), w = j();
|
|
48
|
+
return (e, p) => {
|
|
49
|
+
const B = _("FmButton");
|
|
50
|
+
return a(), f(L, null, [
|
|
51
|
+
m("div", ee, [
|
|
52
|
+
m("div", {
|
|
53
|
+
onVnodeMounted: p[1] || (p[1] = //@ts-ignore
|
|
54
|
+
(...b) => c(w).onMounted && c(w).onMounted(...b)),
|
|
55
|
+
class: D([
|
|
56
|
+
"flex gap-4",
|
|
57
|
+
{
|
|
58
|
+
"p-12": s.value,
|
|
59
|
+
"px-24 py-16": !s.value
|
|
60
|
+
}
|
|
61
|
+
])
|
|
62
|
+
}, [
|
|
63
|
+
m("div", {
|
|
64
|
+
class: D([
|
|
65
|
+
"flex-1 flex flex-col gap-4 fm-typo-en-title-md-600 bg-white",
|
|
66
|
+
{
|
|
67
|
+
"py-12": s.value
|
|
68
|
+
}
|
|
69
|
+
])
|
|
70
|
+
}, [
|
|
71
|
+
m("div", null, R(e.title), 1),
|
|
72
|
+
e.usingBusinessHelperText && k.value ? (a(), f("div", ne, R(e.usingBusinessHelperText), 1)) : g("", !0)
|
|
73
|
+
], 2),
|
|
74
|
+
l.value.length ? (a(), f("div", te, [
|
|
75
|
+
(a(!0), f(L, null, I(l.value, (b) => (a(), h(B, {
|
|
76
|
+
key: b.value,
|
|
77
|
+
label: b.label,
|
|
78
|
+
"prepend-icon": b.prependIcon,
|
|
79
|
+
variant: b.variant,
|
|
80
|
+
onClick: (M) => u("click:action", b.value)
|
|
81
|
+
}, null, 8, ["label", "prepend-icon", "variant", "onClick"]))), 128))
|
|
82
|
+
])) : g("", !0),
|
|
83
|
+
o.value && (c(n).lg || c(n).md) ? (a(), f("div", oe, [
|
|
84
|
+
x(B, {
|
|
85
|
+
label: o.value.label,
|
|
86
|
+
"prepend-icon": o.value.prependIcon,
|
|
87
|
+
onClick: p[0] || (p[0] = (b) => u("click:action", o.value.value))
|
|
88
|
+
}, null, 8, ["label", "prepend-icon"])
|
|
89
|
+
])) : g("", !0)
|
|
90
|
+
], 2),
|
|
91
|
+
m("div", le, [
|
|
92
|
+
q(e.$slots, "default")
|
|
93
|
+
])
|
|
94
|
+
]),
|
|
95
|
+
o.value && s.value ? (a(), h(G, {
|
|
96
|
+
key: 0,
|
|
97
|
+
to: "body"
|
|
98
|
+
}, [
|
|
99
|
+
m("div", ae, [
|
|
100
|
+
x(B, {
|
|
101
|
+
label: o.value.label,
|
|
102
|
+
"prepend-icon": o.value.prependIcon,
|
|
103
|
+
onClick: p[2] || (p[2] = (b) => u("click:action", o.value.value)),
|
|
104
|
+
variant: "fab"
|
|
105
|
+
}, null, 8, ["label", "prepend-icon"])
|
|
106
|
+
])
|
|
107
|
+
])) : g("", !0)
|
|
108
|
+
], 64);
|
|
109
|
+
};
|
|
110
|
+
}
|
|
111
|
+
}), se = { class: "inline-flex" }, ue = { class: "inline-flex rounded-md items-center gap-4 justify-center h-[30px] px-8 py-4 bg-fm-color-neutral-gray-100 cursor-pointer text-fm-color-neutral-gray-400" }, re = { class: "fm-typo-en-body-md-600 select-none text-ellipsis overflow-hidden whitespace-nowrap" }, ie = { class: "relative" }, ce = { class: "sticky top-0 py-8 bg-white translate-y-[-12px]" }, de = /* @__PURE__ */ T({
|
|
112
|
+
__name: "ChangeLocationComponent",
|
|
113
|
+
props: {
|
|
114
|
+
showBusiness: { type: Boolean }
|
|
115
|
+
},
|
|
116
|
+
setup(r) {
|
|
117
|
+
const t = A(), d = Z(), u = y(() => {
|
|
118
|
+
var e;
|
|
119
|
+
return (e = d.currentBusiness.value) == null ? void 0 : e.name;
|
|
120
|
+
}), { t: o } = Y(), l = P(""), n = y({
|
|
121
|
+
get() {
|
|
122
|
+
return t.businessLevel;
|
|
123
|
+
},
|
|
124
|
+
set(e) {
|
|
125
|
+
t.businessLevel = e;
|
|
126
|
+
}
|
|
127
|
+
}), s = y(
|
|
128
|
+
() => t.locations.map((e) => ({ label: e.name, value: e.dbName, type: e.type })).filter(
|
|
129
|
+
(e) => l.value ? e.label.toLocaleLowerCase().includes(l.value.toLocaleLowerCase()) : !0
|
|
130
|
+
)
|
|
131
|
+
), v = y(
|
|
132
|
+
() => s.value.filter((e) => e.type === "restaurant")
|
|
133
|
+
), k = y(
|
|
134
|
+
() => s.value.filter((e) => e.type === "warehouse")
|
|
135
|
+
);
|
|
136
|
+
function w({ value: e }) {
|
|
137
|
+
n.value = !1, t.selectLocation(t.locations.find((p) => p.dbName === e));
|
|
138
|
+
}
|
|
139
|
+
return (e, p) => {
|
|
140
|
+
const B = _("FmIcon"), b = _("FmSearch"), M = _("FmMenuItem"), Q = _("FmMenu");
|
|
141
|
+
return a(), f("div", se, [
|
|
142
|
+
x(Q, { "close-on-click": !0 }, {
|
|
143
|
+
"menu-button": N(() => {
|
|
144
|
+
var i;
|
|
145
|
+
return [
|
|
146
|
+
m("div", ue, [
|
|
147
|
+
x(B, {
|
|
148
|
+
name: e.showBusiness && n.value ? "store" : "storefront",
|
|
149
|
+
size: "sm"
|
|
150
|
+
}, null, 8, ["name"]),
|
|
151
|
+
m("div", re, R(e.showBusiness && n.value ? u.value : ((i = c(t)._currentLocation) == null ? void 0 : i.name) ?? c(o)("inventory.common.noLocationSelected")), 1),
|
|
152
|
+
x(B, {
|
|
153
|
+
name: "expand_more",
|
|
154
|
+
size: "sm"
|
|
155
|
+
})
|
|
156
|
+
])
|
|
157
|
+
];
|
|
158
|
+
}),
|
|
159
|
+
default: N(() => [
|
|
160
|
+
m("div", ie, [
|
|
161
|
+
m("div", ce, [
|
|
162
|
+
x(b, {
|
|
163
|
+
"model-value": l.value,
|
|
164
|
+
"onUpdate:modelValue": p[0] || (p[0] = (i) => l.value = i),
|
|
165
|
+
placeholder: c(o)("inventory.common.table.toolbar.filterItems")
|
|
166
|
+
}, null, 8, ["model-value", "placeholder"])
|
|
167
|
+
]),
|
|
168
|
+
m("div", null, [
|
|
169
|
+
e.showBusiness ? (a(), h(M, {
|
|
170
|
+
key: 0,
|
|
171
|
+
"model-value": n.value,
|
|
172
|
+
label: u.value,
|
|
173
|
+
sublabel: "Business",
|
|
174
|
+
onClick: p[1] || (p[1] = (i) => n.value = !0)
|
|
175
|
+
}, null, 8, ["model-value", "label"])) : g("", !0),
|
|
176
|
+
(a(!0), f(L, null, I(v.value, (i) => {
|
|
177
|
+
var $;
|
|
178
|
+
return a(), h(M, {
|
|
179
|
+
key: i.value,
|
|
180
|
+
"model-value": !n.value && (($ = c(t)._currentLocation) == null ? void 0 : $.dbName) === i.value,
|
|
181
|
+
label: i.label,
|
|
182
|
+
sublabel: "Restaurant",
|
|
183
|
+
onClick: (F) => w(i),
|
|
184
|
+
onVnodeMounted: (F) => {
|
|
185
|
+
var V, C;
|
|
186
|
+
return !n.value && ((V = c(t)._currentLocation) == null ? void 0 : V.dbName) === i.value && ((C = F.el) == null || C.scrollIntoView({ behavior: "smooth", block: "center" })), void 0;
|
|
187
|
+
}
|
|
188
|
+
}, null, 8, ["model-value", "label", "onClick", "onVnodeMounted"]);
|
|
189
|
+
}), 128)),
|
|
190
|
+
(a(!0), f(L, null, I(k.value, (i) => {
|
|
191
|
+
var $;
|
|
192
|
+
return a(), h(M, {
|
|
193
|
+
key: i.value,
|
|
194
|
+
"model-value": !n.value && (($ = c(t)._currentLocation) == null ? void 0 : $.dbName) === i.value,
|
|
195
|
+
label: i.label,
|
|
196
|
+
sublabel: "Warehouse",
|
|
197
|
+
onClick: (F) => w(i),
|
|
198
|
+
onVnodeMounted: (F) => {
|
|
199
|
+
var V, C;
|
|
200
|
+
return !n.value && ((V = c(t)._currentLocation) == null ? void 0 : V.dbName) === i.value && ((C = F.el) == null || C.scrollIntoView({ behavior: "smooth", block: "center" })), void 0;
|
|
201
|
+
}
|
|
202
|
+
}, null, 8, ["model-value", "label", "onClick", "onVnodeMounted"]);
|
|
203
|
+
}), 128)),
|
|
204
|
+
!e.showBusiness && !v.value.length && !k.value.length ? (a(), h(M, {
|
|
205
|
+
key: 1,
|
|
206
|
+
disabled: "",
|
|
207
|
+
label: c(o)("inventory.common.noResultFound")
|
|
208
|
+
}, null, 8, ["label"])) : g("", !0)
|
|
209
|
+
])
|
|
210
|
+
])
|
|
211
|
+
]),
|
|
212
|
+
_: 1
|
|
213
|
+
})
|
|
214
|
+
]);
|
|
215
|
+
};
|
|
216
|
+
}
|
|
217
|
+
});
|
|
218
|
+
function xe() {
|
|
219
|
+
const r = /* @__PURE__ */ new Date();
|
|
220
|
+
return r.setDate(r.getDate() - 15), {
|
|
221
|
+
start: r,
|
|
222
|
+
end: /* @__PURE__ */ new Date()
|
|
223
|
+
};
|
|
224
|
+
}
|
|
225
|
+
function z(r = 15) {
|
|
226
|
+
const t = /* @__PURE__ */ new Date();
|
|
227
|
+
t.setDate(t.getDate() - r);
|
|
228
|
+
const d = t, u = /* @__PURE__ */ new Date();
|
|
229
|
+
return {
|
|
230
|
+
startDate: `${H(d)}`,
|
|
231
|
+
endDate: `${H(u)}`
|
|
232
|
+
};
|
|
233
|
+
}
|
|
234
|
+
const me = { class: "inline-flex rounded-md items-center gap-4 justify-center h-[30px] px-8 py-4 bg-fm-color-neutral-gray-100 cursor-pointer text-fm-color-neutral-gray-400" }, ve = { class: "fm-typo-en-body-md-600 select-none text-ellipsis overflow-hidden whitespace-nowrap" }, pe = /* @__PURE__ */ T({
|
|
235
|
+
__name: "FmDateRangePickerChip",
|
|
236
|
+
props: {
|
|
237
|
+
modelValue: { default: (r) => r.modelValue ?? z() }
|
|
238
|
+
},
|
|
239
|
+
emits: ["update:modelValue"],
|
|
240
|
+
setup(r, { emit: t }) {
|
|
241
|
+
const d = t, u = P(z());
|
|
242
|
+
J(u, (l) => {
|
|
243
|
+
d("update:modelValue", l);
|
|
244
|
+
});
|
|
245
|
+
const o = y(() => {
|
|
246
|
+
const { startDate: l, endDate: n } = u.value;
|
|
247
|
+
return !l && !n ? "" : `${l} - ${n}`;
|
|
248
|
+
});
|
|
249
|
+
return (l, n) => {
|
|
250
|
+
const s = _("FmIcon"), v = _("FmDateRangePicker");
|
|
251
|
+
return a(), h(v, {
|
|
252
|
+
"show-predefined-range": "",
|
|
253
|
+
modelValue: u.value,
|
|
254
|
+
"onUpdate:modelValue": n[0] || (n[0] = (k) => u.value = k),
|
|
255
|
+
"start-label": "",
|
|
256
|
+
"end-label": ""
|
|
257
|
+
}, {
|
|
258
|
+
"trigger-button": N(() => [
|
|
259
|
+
m("div", me, [
|
|
260
|
+
x(s, {
|
|
261
|
+
name: "calendar_month",
|
|
262
|
+
size: "sm"
|
|
263
|
+
}),
|
|
264
|
+
m("div", ve, R(o.value), 1)
|
|
265
|
+
])
|
|
266
|
+
]),
|
|
267
|
+
_: 1
|
|
268
|
+
}, 8, ["modelValue"]);
|
|
269
|
+
};
|
|
270
|
+
}
|
|
271
|
+
}), fe = { class: "flex-1 w-full flex items-center gap-4" }, be = {
|
|
272
|
+
key: 0,
|
|
273
|
+
class: "flex-1"
|
|
274
|
+
}, ye = { class: "w-full max-w-[343px] xs:max-w-[unset] sm:max-w-[unset]" }, Be = /* @__PURE__ */ T({
|
|
275
|
+
__name: "FmInventoryTableToolbar",
|
|
276
|
+
props: /* @__PURE__ */ K({
|
|
277
|
+
dateRangeQuery: { type: Boolean },
|
|
278
|
+
changeLocation: { type: Boolean },
|
|
279
|
+
searchable: { type: Boolean },
|
|
280
|
+
actions: {},
|
|
281
|
+
usingBusinessHelperText: {},
|
|
282
|
+
showBusiness: { type: Boolean }
|
|
283
|
+
}, {
|
|
284
|
+
search: {},
|
|
285
|
+
searchModifiers: {},
|
|
286
|
+
dateRange: {},
|
|
287
|
+
dateRangeModifiers: {}
|
|
288
|
+
}),
|
|
289
|
+
emits: ["update:search", "update:dateRange"],
|
|
290
|
+
setup(r) {
|
|
291
|
+
const { breakpoints: t } = O(), d = y(() => t.value.xs || t.value.sm), u = U(r, "search"), o = U(r, "dateRange"), { t: l } = Y(), n = j();
|
|
292
|
+
return (s, v) => {
|
|
293
|
+
const k = _("FmTextField"), w = _("FmButton");
|
|
294
|
+
return a(), f("div", {
|
|
295
|
+
class: "flex flex-col gap-8",
|
|
296
|
+
onVnodeMounted: v[2] || (v[2] = //@ts-ignore
|
|
297
|
+
(...e) => c(n).onMounted && c(n).onMounted(...e)),
|
|
298
|
+
onVnodeUnmounted: v[3] || (v[3] = //@ts-ignore
|
|
299
|
+
(...e) => c(n).onUnmounted && c(n).onUnmounted(...e))
|
|
300
|
+
}, [
|
|
301
|
+
m("div", {
|
|
302
|
+
class: D([
|
|
303
|
+
"flex gap-8 items-center",
|
|
304
|
+
{
|
|
305
|
+
"px-8 flex-col-reverse h-[unset]": d.value,
|
|
306
|
+
"h-48": !d.value
|
|
307
|
+
}
|
|
308
|
+
])
|
|
309
|
+
}, [
|
|
310
|
+
s.changeLocation || s.dateRangeQuery ? (a(), f("div", {
|
|
311
|
+
key: 0,
|
|
312
|
+
class: D([
|
|
313
|
+
"flex gap-8 items-center",
|
|
314
|
+
{
|
|
315
|
+
"w-full overflow-x-auto": d.value
|
|
316
|
+
}
|
|
317
|
+
])
|
|
318
|
+
}, [
|
|
319
|
+
s.changeLocation ? (a(), h(de, {
|
|
320
|
+
key: 0,
|
|
321
|
+
"show-business": s.showBusiness
|
|
322
|
+
}, null, 8, ["show-business"])) : g("", !0),
|
|
323
|
+
s.dateRangeQuery ? (a(), h(pe, {
|
|
324
|
+
key: 1,
|
|
325
|
+
"model-value": o.value,
|
|
326
|
+
"onUpdate:modelValue": v[0] || (v[0] = (e) => o.value = e)
|
|
327
|
+
}, null, 8, ["model-value"])) : g("", !0)
|
|
328
|
+
], 2)) : g("", !0),
|
|
329
|
+
m("div", fe, [
|
|
330
|
+
d.value ? g("", !0) : (a(), f("div", be)),
|
|
331
|
+
m("div", ye, [
|
|
332
|
+
s.searchable ? (a(), h(k, {
|
|
333
|
+
key: 0,
|
|
334
|
+
"model-value": u.value,
|
|
335
|
+
"onUpdate:modelValue": v[1] || (v[1] = (e) => u.value = e),
|
|
336
|
+
"prepend-icon": "search",
|
|
337
|
+
placeholder: c(l)("inventory.common.table.toolbar.filterItems"),
|
|
338
|
+
class: "w-full"
|
|
339
|
+
}, null, 8, ["model-value", "placeholder"])) : g("", !0)
|
|
340
|
+
]),
|
|
341
|
+
(a(!0), f(L, null, I(s.actions, (e, p) => (a(), h(w, {
|
|
342
|
+
key: p,
|
|
343
|
+
variant: "tertiary",
|
|
344
|
+
"prepend-icon": e.icon,
|
|
345
|
+
onClick: e.onClick
|
|
346
|
+
}, null, 8, ["prepend-icon", "onClick"]))), 128))
|
|
347
|
+
])
|
|
348
|
+
], 2)
|
|
349
|
+
], 512);
|
|
350
|
+
};
|
|
351
|
+
}
|
|
352
|
+
});
|
|
353
|
+
export {
|
|
354
|
+
we as _,
|
|
355
|
+
Be as a,
|
|
356
|
+
xe as b,
|
|
357
|
+
z as i,
|
|
358
|
+
j as u
|
|
359
|
+
};
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { defineComponent as p, openBlock as s, createElementBlock as n, createElementVNode as r, toDisplayString as o, unref as l, Fragment as d, renderList as x } from "vue";
|
|
2
|
+
import { a, k as y } from "./app-TB3IWuaU.js";
|
|
3
|
+
import { useI18n as _ } from "@feedmepos/mf-common";
|
|
4
|
+
const v = { class: "flex flex-col" }, g = { class: "flex flex-row fm-typo-en-body-md-600 bg-fm-color-neutral-gray-100 text-fm-color-typo-secondary h-48 items-center" }, h = { class: "flex-1 py-8 px-16" }, b = {
|
|
5
|
+
class: "flex-0 py-8 px-16",
|
|
6
|
+
style: { "flex-basis": "120px" }
|
|
7
|
+
}, k = { class: "flex-1 py-8 px-16" }, B = {
|
|
8
|
+
key: 0,
|
|
9
|
+
class: "flex-0 py-8 px-16",
|
|
10
|
+
style: { "flex-basis": "120px" }
|
|
11
|
+
}, I = {
|
|
12
|
+
key: 1,
|
|
13
|
+
class: "flex-0 py-8 px-16",
|
|
14
|
+
style: { "flex-basis": "120px" }
|
|
15
|
+
}, A = /* @__PURE__ */ p({
|
|
16
|
+
__name: "IngredientBindedItem",
|
|
17
|
+
props: {
|
|
18
|
+
name: {},
|
|
19
|
+
bindings: {}
|
|
20
|
+
},
|
|
21
|
+
setup($) {
|
|
22
|
+
const { t: m } = _();
|
|
23
|
+
function c(e, i) {
|
|
24
|
+
var t;
|
|
25
|
+
if (e.measurement) {
|
|
26
|
+
const u = y(e.amount, e.measurement.conversion);
|
|
27
|
+
return `${a(u, !1)} ${(t = e.measurement) == null ? void 0 : t.abbrev}`;
|
|
28
|
+
}
|
|
29
|
+
return `${a(e.amount, !1)} ${i.abbrev}`;
|
|
30
|
+
}
|
|
31
|
+
function f(e) {
|
|
32
|
+
return e.unit !== void 0;
|
|
33
|
+
}
|
|
34
|
+
return (e, i) => (s(), n("div", v, [
|
|
35
|
+
r("div", g, [
|
|
36
|
+
r("div", h, o(e.name), 1),
|
|
37
|
+
r("div", b, o(l(m)("inventory.ingredient.bindedItems.amount")), 1)
|
|
38
|
+
]),
|
|
39
|
+
(s(!0), n(d, null, x(e.bindings, (t) => (s(), n("div", {
|
|
40
|
+
key: t.id,
|
|
41
|
+
class: "flex flex-row fm-typo-en-body-md-400 h-48 items-center border-b border-b-fm-color-neutral-gray-100"
|
|
42
|
+
}, [
|
|
43
|
+
r("div", k, o(t.name), 1),
|
|
44
|
+
f(t) ? (s(), n("div", B, o(c(t, t.unit)), 1)) : (s(), n("div", I, o(l(a)(t.amount, !1)), 1))
|
|
45
|
+
]))), 128))
|
|
46
|
+
]));
|
|
47
|
+
}
|
|
48
|
+
});
|
|
49
|
+
export {
|
|
50
|
+
A as _
|
|
51
|
+
};
|