@feedmepos/mf-inventory-portal 1.0.7 → 1.0.8-dev.2
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-DF14rGlK.js → App-VjopKXRf.js} +50 -49
- package/dist/{ApprovalView-C_xhq-_c.js → ApprovalView-Bc8OqfVg.js} +24 -24
- package/dist/{BindingsDialog-CCY1fDj8.js → BindingsDialog-zWAOfSXc.js} +4 -4
- package/dist/{BindingsPicker-CnXbK5O3.js → BindingsPicker-Bf5LuJiL.js} +6 -6
- package/dist/{BindingsTable-cQIUUuVv.js → BindingsTable-D2N-3mnJ.js} +8 -8
- package/dist/{ClosingDraftView-DUZ31x3s.js → ClosingDraftView-BwbzajJY.js} +464 -463
- package/dist/{ClosingTemplateView-6ysEDEcV.js → ClosingTemplateView-CsAIbfui.js} +10 -10
- package/dist/{DeliveryOrderPrintPreview-BGjFS8h7.js → DeliveryOrderPrintPreview-CjylpaJj.js} +1 -1
- package/dist/{FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-CanJ2fzb.js → FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-C_xdzdLD.js} +32 -32
- package/dist/{FmUnitInput.vue_vue_type_script_setup_true_lang-BcKtJQMt.js → FmUnitInput.vue_vue_type_script_setup_true_lang-DhgHX4S_.js} +86 -86
- package/dist/{IngredientBindedItem.vue_vue_type_script_setup_true_lang-Bb9xMoX-.js → IngredientBindedItem.vue_vue_type_script_setup_true_lang-DPa8Pto8.js} +1 -1
- package/dist/{IngredientGroupView-i08KHlW7.js → IngredientGroupView-D6YzbWdd.js} +11 -11
- package/dist/{IngredientsView-D0tBukwK.js → IngredientsView-g-73afqm.js} +15 -14
- package/dist/{IntegrationView-BqCrKL13.js → IntegrationView-CEML0dP4.js} +86 -85
- package/dist/{InventoryBindingForm-BJwIFQVS.js → InventoryBindingForm-E0wJOA8L.js} +1 -1
- package/dist/{InventoryBindingForm.vue_vue_type_script_setup_true_lang-DU9j1Q8M.js → InventoryBindingForm.vue_vue_type_script_setup_true_lang-DFXmypAs.js} +27 -27
- package/dist/{InventoryBindingSummary-B2M3Th8T.js → InventoryBindingSummary-sBQvAPBw.js} +1 -1
- package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-BH4A_Lc5.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-DOeDgymo.js} +1 -1
- package/dist/{PremiumBadge.vue_vue_type_script_setup_true_lang-CdxCyEBi.js → PremiumBadge.vue_vue_type_script_setup_true_lang-DIqYY1-C.js} +10 -10
- package/dist/{PublishView-B9x92vDM.js → PublishView-D_psCmiQ.js} +7 -7
- package/dist/{PurchaseOrderPrintPreview-MbGDNmgh.js → PurchaseOrderPrintPreview-5QqjPwWN.js} +4 -4
- package/dist/{ReceiveRequestView-CTNycYUr.js → ReceiveRequestView-CBGxqac6.js} +53 -52
- package/dist/{RecipeView-sHTcJgzP.js → RecipeView-BAjHNWST.js} +32 -32
- package/dist/{StockView-CUv4dcGJ.js → StockView-Bc62jbCV.js} +73 -72
- package/dist/{SupplierView-hu6OhDss.js → SupplierView-Cyucz_US.js} +159 -159
- package/dist/TransferDetails.vue_vue_type_script_setup_true_lang-CljJoB4v.js +1895 -0
- package/dist/{TransferTemplateView-DMSkUc0D.js → TransferTemplateView-BWURlmou.js} +291 -290
- package/dist/{UnitView-B5q7IVbT.js → UnitView-cjLpKfoN.js} +23 -23
- package/dist/{WarehouseView-Ds6z4Vz6.js → WarehouseView-CUtg5Aiw.js} +26 -26
- package/dist/api/bill.d.ts +2 -2
- package/dist/api/food-market-hub.d.ts +1 -1
- package/dist/api/inventory.d.ts +44 -44
- package/dist/api/netsuite.d.ts +3 -3
- package/dist/api/purchase-order.d.ts +5 -1
- package/dist/{app-BmsY87Mv.js → app-Dgg5mqsW.js} +17155 -17625
- package/dist/app.d.ts +7 -7
- package/dist/app.js +1 -1
- package/dist/components/inventory-binding/InventoryBinding.vue.d.ts +8 -8
- package/dist/components/shell/inventory/binding-dialog.vue.d.ts +2 -2
- package/dist/components/shell/inventory/binding-ui.vue.d.ts +5 -5
- package/dist/composable/usePromise.d.ts +41 -0
- package/dist/{decimal-Baw9w4_A.js → decimal-DcqP_fAm.js} +1 -1
- package/dist/feature-C4mZ_d2m.js +17352 -0
- package/dist/{format-unit-display-D0_KiU3j.js → format-unit-display-D2Uk9Ze_.js} +60 -60
- package/dist/{index-CDydl7WA.js → index-YuTB_T1B.js} +1 -1
- package/dist/{index-C_GU5Tc8.js → index-peSGn9vg.js} +7 -6
- package/dist/{stock-C-hm8Kdq.js → stock-CDP8ZqBZ.js} +1 -1
- package/dist/stores/feature.d.ts +3 -20
- package/dist/stores/integration/foodmarkethub.d.ts +1 -1
- package/dist/stores/integration/netsuite.d.ts +7 -7
- package/dist/stores/inventory.d.ts +44 -44
- package/dist/stores/location.d.ts +137 -137
- package/dist/{supplier-RX_yr24c.js → supplier-C5GbDMxT.js} +4 -4
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/{use-ingredient-select-dialog-BZhczMUl.js → use-ingredient-select-dialog-nH01sayt.js} +1 -1
- package/dist/{use-inventory-binding-dialog-dV-92pLe.js → use-inventory-binding-dialog-CJe6QdGb.js} +1 -1
- package/dist/views/adjustment-template/wastage-template/actions.d.ts +228 -228
- package/dist/views/adjustment-template/wastage-template/form/WastageTemplateItemTable.vue.d.ts +2 -2
- package/dist/views/adjustment-template/wastage-template/form/useAdjustmentTemplateItems.d.ts +1 -1
- package/dist/views/adjustment-template/wastage-template/table.d.ts +234 -234
- package/dist/views/closing-draft/components/closing-draft-dialog/ClosingDraftDialog.vue.d.ts +68 -68
- package/dist/views/closing-draft/composables/use-closing-draft-table.d.ts +408 -408
- package/dist/views/closing-template/components/closing-template-form/composables/use-closing-template-items.d.ts +4 -4
- package/dist/views/closing-template/composables/use-closing-template-actions.d.ts +252 -252
- package/dist/views/closing-template/composables/use-closing-template-table.d.ts +252 -252
- package/dist/views/ingredient-group/composables/use-ingredient-group-table.d.ts +12 -12
- package/dist/views/ingredients/components/convert/ConvertForm.vue.d.ts +2 -2
- package/dist/views/ingredients/components/ingredient-form/IngredientForm.vue.d.ts +8 -8
- package/dist/views/ingredients/components/inventory-binding/InventoryBindingForm.vue.d.ts +3 -3
- package/dist/views/ingredients/composables/use-ingredient-table.d.ts +4 -4
- package/dist/views/integration/components/ApplyProduct.vue.d.ts +2 -2
- package/dist/views/integration/components/ApplyProductDialog.vue.d.ts +2 -2
- package/dist/views/integration/components/ApplyProductDialogV4.vue.d.ts +2 -2
- package/dist/views/integration/components/netsuite/AddLocationDialog.vue.d.ts +204 -204
- package/dist/views/integration/components/netsuite/LocationConfigurationDialog.vue.d.ts +2 -2
- package/dist/views/receive-request/components/transfer-form/TransferForm.vue.d.ts +665 -637
- package/dist/views/receive-request/components/transfer-form/components/ForecastStock.vue.d.ts +22 -22
- package/dist/views/receive-request/components/transfer-form/components/TransferItemTable.vue.d.ts +44 -44
- package/dist/views/receive-request/components/transfer-form/composables/use-transfer-items.d.ts +11 -11
- package/dist/views/receive-request/composables/use-process-purchase-order.d.ts +614 -0
- package/dist/views/receive-request/composables/use-receive-request-form.d.ts +1190 -1142
- package/dist/views/receive-request/composables/use-receive-request-table.d.ts +1192 -1144
- package/dist/views/receive-request/constants/po-action-to-ui-style.d.ts +6 -0
- package/dist/views/recipe/components/recipe-form/RecipeForm.vue.d.ts +2 -2
- package/dist/views/stock/components/StockRecordCard.vue.d.ts +1 -1
- package/dist/views/stock/components/dialog/AdjustedItemForm.vue.d.ts +14 -14
- package/dist/views/transfer-template/components/transfer-template-form/components/TransferTemplateItemTable.vue.d.ts +22 -22
- package/dist/views/transfer-template/components/transfer-template-form/composables/use-template-enabled-locations.d.ts +17 -17
- package/dist/views/transfer-template/components/transfer-template-form/composables/use-transfer-template-items.d.ts +11 -11
- package/dist/views/transfer-template/composables/use-transfer-template-actions.d.ts +805 -805
- package/dist/views/transfer-template/composables/use-transfer-template-table.d.ts +805 -805
- package/dist/views/transfer-template/composables/useTransferTemplateHelper.d.ts +33 -33
- package/dist/{vue-i18n-sbHu6D5a.js → vue-i18n-NNRWZURD.js} +284 -284
- package/package.json +5 -3
- package/dist/TransferDetails.vue_vue_type_script_setup_true_lang-CCKlQGMf.js +0 -1746
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { ref as D, h as F, defineComponent as O, resolveComponent as R, openBlock as T, createElementBlock as I, createElementVNode as _, normalizeClass as Y, createTextVNode as Fe, toDisplayString as C, unref as v, createCommentVNode as K, createVNode as $, withCtx as P, Fragment as H, renderList as J, computed as E, watch as Re, createSlots as Pe, createBlock as V, isRef as je, normalizeStyle as Ye, Teleport as Ge, normalizeProps as Ke, guardReactiveProps as Je, mergeProps as We } from "vue";
|
|
2
|
-
import {
|
|
2
|
+
import { X as qe, u as le, a9 as Xe, D as Se, h as N, f as Qe, e as Ae, aa as oe, r as Ze, ab as Ee, s as Ue, a as ae, b as et, v as tt, w as Ve, x as nt, y as ot, d as z, E as j, G as st, ac as lt, l as at, C as Ne, A as rt, ad as it, ae as ne, z as ct, _ as mt, B as ut } from "./app-Dgg5mqsW.js";
|
|
3
3
|
import { useCoreStore as re, useI18n as B } from "@feedmepos/mf-common";
|
|
4
4
|
import { useDialogChild as dt, useSnackbar as Z, useDialog as ie, FmButtonVariant as De, components as L, useProxiedModel as pt, useBreakpoints as ft } from "@feedmepos/ui-library";
|
|
5
5
|
import { defineStore as Be, storeToRefs as Le } from "pinia";
|
|
6
|
-
import { u as vt } from "./use-ingredient-select-dialog-
|
|
6
|
+
import { u as vt } from "./use-ingredient-select-dialog-nH01sayt.js";
|
|
7
7
|
const ee = qe((i, o) => {
|
|
8
8
|
function s() {
|
|
9
9
|
var t;
|
|
@@ -96,7 +96,7 @@ const ee = qe((i, o) => {
|
|
|
96
96
|
accessorKey: "_id",
|
|
97
97
|
header: () => o("inventory.closing.table.createdAt"),
|
|
98
98
|
cell(y) {
|
|
99
|
-
return
|
|
99
|
+
return Xe(`${y.getValue()}`);
|
|
100
100
|
},
|
|
101
101
|
enableSorting: !0
|
|
102
102
|
},
|
|
@@ -171,7 +171,7 @@ const ee = qe((i, o) => {
|
|
|
171
171
|
Se[N.Edit],
|
|
172
172
|
Se[N.Delete]
|
|
173
173
|
];
|
|
174
|
-
return
|
|
174
|
+
return Qe(u, (n) => m(n, b));
|
|
175
175
|
},
|
|
176
176
|
enableSorting: !1,
|
|
177
177
|
size: 40,
|
|
@@ -1178,7 +1178,7 @@ const Ht = { class: "flex flex-col gap-16 py-12" }, Ot = { class: "flex" }, jt =
|
|
|
1178
1178
|
]);
|
|
1179
1179
|
};
|
|
1180
1180
|
}
|
|
1181
|
-
}), Wt = { class: "flex flex-col gap-16" }, qt = { class: "flex flex-col gap-24" },
|
|
1181
|
+
}), Wt = { class: "flex flex-col gap-16" }, qt = { class: "flex flex-col gap-24" }, Xt = { class: "flex flex-col gap-16" }, Qt = { class: "flex items-center" }, Zt = { class: "flex-1 fm-typo-en-title-sm-600" }, en = { class: "flex flex-col gap-16" }, tn = { class: "flex items-center" }, nn = { class: "flex-1 gap-8 fm-typo-en-title-sm-600" }, on = /* @__PURE__ */ O({
|
|
1182
1182
|
__name: "ClosingTemplateForm",
|
|
1183
1183
|
props: {
|
|
1184
1184
|
modelValue: {},
|
|
@@ -1272,8 +1272,8 @@ const Ht = { class: "flex flex-col gap-16 py-12" }, Ot = { class: "flex" }, jt =
|
|
|
1272
1272
|
}, null, 8, ["label", "modelValue"])
|
|
1273
1273
|
])
|
|
1274
1274
|
]),
|
|
1275
|
-
_("div",
|
|
1276
|
-
_("div",
|
|
1275
|
+
_("div", Xt, [
|
|
1276
|
+
_("div", Qt, [
|
|
1277
1277
|
_("div", Zt, C(v(e)("inventory.closing.form.locations")), 1),
|
|
1278
1278
|
$(c, {
|
|
1279
1279
|
disabled: n.disabled,
|
|
@@ -1741,7 +1741,7 @@ const un = /* @__PURE__ */ it(cn, [["render", mn]]), dn = { class: "flex flex-co
|
|
|
1741
1741
|
onRowClick: (U) => v(l)(U)
|
|
1742
1742
|
}, {
|
|
1743
1743
|
default: P((U) => {
|
|
1744
|
-
var me, ue, de, W, pe, fe, ve, ge, q, ye, he, be, _e, xe, we,
|
|
1744
|
+
var me, ue, de, W, pe, fe, ve, ge, q, ye, he, be, _e, xe, we, X, ke, Te, $e, Ce, Q, Ie;
|
|
1745
1745
|
return [
|
|
1746
1746
|
_("div", $n, [
|
|
1747
1747
|
_("div", Cn, [
|
|
@@ -1767,14 +1767,14 @@ const un = /* @__PURE__ */ it(cn, [["render", mn]]), dn = { class: "flex flex-co
|
|
|
1767
1767
|
_("div", Mn, [
|
|
1768
1768
|
$(v(j), {
|
|
1769
1769
|
render: (we = (xe = (_e = U.ref) == null ? void 0 : _e.column) == null ? void 0 : xe.columnDef) == null ? void 0 : we.cell,
|
|
1770
|
-
props: (ke = (
|
|
1770
|
+
props: (ke = (X = U.ref) == null ? void 0 : X.getContext) == null ? void 0 : ke.call(X)
|
|
1771
1771
|
}, null, 8, ["render", "props"])
|
|
1772
1772
|
])
|
|
1773
1773
|
]),
|
|
1774
1774
|
_("div", null, [
|
|
1775
1775
|
$(v(j), {
|
|
1776
1776
|
render: (Ce = ($e = (Te = U.status) == null ? void 0 : Te.column) == null ? void 0 : $e.columnDef) == null ? void 0 : Ce.cell,
|
|
1777
|
-
props: (Ie = (
|
|
1777
|
+
props: (Ie = (Q = U.status) == null ? void 0 : Q.getContext) == null ? void 0 : Ie.call(Q)
|
|
1778
1778
|
}, null, 8, ["render", "props"])
|
|
1779
1779
|
])
|
|
1780
1780
|
])
|
package/dist/{DeliveryOrderPrintPreview-BGjFS8h7.js → DeliveryOrderPrintPreview-CjylpaJj.js}
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent as x, computed as f, ref as h, onMounted as g, openBlock as u, createElementBlock as i, createElementVNode as t, createTextVNode as n, toDisplayString as e, createCommentVNode as d, Fragment as o, renderList as p, normalizeClass as _ } from "vue";
|
|
2
2
|
import { useRoute as k } from "vue-router";
|
|
3
|
-
import {
|
|
3
|
+
import { aq as y, ad as w } from "./app-Dgg5mqsW.js";
|
|
4
4
|
const c = { class: "purchase-box" }, A = { valign: "bottom" }, N = { class: "sub-header" }, O = ["src"], P = { style: { "padding-left": "10px" } }, C = { class: "address" }, D = { class: "text-right" }, R = {
|
|
5
5
|
key: 0,
|
|
6
6
|
class: "subtitle"
|
|
@@ -1,30 +1,30 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { u as
|
|
3
|
-
import { P as F } from "./format-unit-display-
|
|
1
|
+
import { i as T, t as I, an as w, u as R, as as B, aD as H, aE as D, aF as U } from "./app-Dgg5mqsW.js";
|
|
2
|
+
import { u as z } from "./supplier-C5GbDMxT.js";
|
|
3
|
+
import { P as F } from "./format-unit-display-D2Uk9Ze_.js";
|
|
4
4
|
import { computed as f, defineComponent as j, mergeModels as q, useModel as x, ref as W, resolveComponent as V, openBlock as S, createElementBlock as N, normalizeStyle as $, createElementVNode as O, createVNode as J, withCtx as K, createBlock as g, createCommentVNode as A, Fragment as Q, renderList as X, unref as M } from "vue";
|
|
5
5
|
function Y(t, i, a) {
|
|
6
|
-
var
|
|
7
|
-
if (!!i.measurement === !!a && ((
|
|
6
|
+
var s;
|
|
7
|
+
if (!!i.measurement === !!a && ((s = i.measurement) == null ? void 0 : s.id) === a)
|
|
8
8
|
return i;
|
|
9
9
|
if (!a)
|
|
10
10
|
return {
|
|
11
11
|
costPerUnit: i.costPerUnit
|
|
12
12
|
};
|
|
13
|
-
const
|
|
14
|
-
return
|
|
13
|
+
const o = t.measurements.find((p) => p.id === a);
|
|
14
|
+
return o ? {
|
|
15
15
|
costPerUnit: i.costPerUnit,
|
|
16
|
-
measurement:
|
|
16
|
+
measurement: o
|
|
17
17
|
} : {
|
|
18
18
|
costPerUnit: i.costPerUnit
|
|
19
19
|
};
|
|
20
20
|
}
|
|
21
|
-
function
|
|
21
|
+
function se(t, i, a, l) {
|
|
22
22
|
var P, _, n;
|
|
23
23
|
if (l != null && l.manualTotalCost)
|
|
24
24
|
return l == null ? void 0 : l.manualTotalCost;
|
|
25
25
|
const u = (n = (_ = (P = l == null ? void 0 : l.supplier) == null ? void 0 : P.supplyItems) == null ? void 0 : _.find(
|
|
26
26
|
(e) => e.skuId === t._id
|
|
27
|
-
)) == null ? void 0 : n.defaultCost,
|
|
27
|
+
)) == null ? void 0 : n.defaultCost, o = t.defaultCost ? Y(t.unit, t.defaultCost, t.trackingMeasurement) : void 0, s = u ?? o, p = s == null ? void 0 : s.costPerUnit, y = p ? s != null && s.measurement ? +T(p) / +T(s == null ? void 0 : s.measurement.conversion) : +T(p) : void 0, v = y ? a ? y * +T(a.conversion) : y : void 0, h = v ? +T(i) * v : void 0;
|
|
28
28
|
return h ? {
|
|
29
29
|
...I(h ?? 0, 2),
|
|
30
30
|
currency: w()
|
|
@@ -55,20 +55,20 @@ function L(t) {
|
|
|
55
55
|
}
|
|
56
56
|
};
|
|
57
57
|
}
|
|
58
|
-
function
|
|
59
|
-
const u =
|
|
60
|
-
|
|
58
|
+
function oe(t, i, a = !1, l = !1) {
|
|
59
|
+
const u = z(), o = R();
|
|
60
|
+
o.watchLocation(async () => {
|
|
61
61
|
var b;
|
|
62
62
|
await u.readSuppliers();
|
|
63
63
|
const n = t();
|
|
64
64
|
if ((b = n.supplier) != null && b._id) return;
|
|
65
|
-
const e = l ? u.suppliers[0] : u.businessSuppliers[0], r = (a ?
|
|
65
|
+
const e = l ? u.suppliers[0] : u.businessSuppliers[0], r = (a ? o.locations.filter((m) => m.doc._id !== o.currentLocation.doc._id) : o.locations)[0];
|
|
66
66
|
i({
|
|
67
67
|
...n,
|
|
68
68
|
supplier: e ? k(e) : r ? L(r) : n.supplier
|
|
69
69
|
});
|
|
70
70
|
});
|
|
71
|
-
const
|
|
71
|
+
const s = f(
|
|
72
72
|
() => {
|
|
73
73
|
var n, e;
|
|
74
74
|
return typeof ((e = (n = t()) == null ? void 0 : n.supplier) == null ? void 0 : e.internal) == "string" ? F.TRANSFER : F.PURCHASE;
|
|
@@ -80,7 +80,7 @@ function se(t, i, a = !1, l = !1) {
|
|
|
80
80
|
},
|
|
81
81
|
set(n) {
|
|
82
82
|
const e = t() ?? {};
|
|
83
|
-
if (
|
|
83
|
+
if (s.value === F.PURCHASE) {
|
|
84
84
|
const C = (l ? u.suppliers : u.businessSuppliers).find((E) => E._id === n);
|
|
85
85
|
i({
|
|
86
86
|
...e,
|
|
@@ -88,7 +88,7 @@ function se(t, i, a = !1, l = !1) {
|
|
|
88
88
|
});
|
|
89
89
|
return;
|
|
90
90
|
}
|
|
91
|
-
const b = (a ?
|
|
91
|
+
const b = (a ? o.locations.filter((m) => m.doc._id !== o.currentLocation.doc._id) : o.locations).find((m) => m.doc._id === n);
|
|
92
92
|
i({
|
|
93
93
|
...e,
|
|
94
94
|
supplier: b ? L(b) : e.supplier
|
|
@@ -99,10 +99,10 @@ function se(t, i, a = !1, l = !1) {
|
|
|
99
99
|
return l ? [...e, ...n] : e;
|
|
100
100
|
}), c = f(() => {
|
|
101
101
|
var d;
|
|
102
|
-
const n = ((d =
|
|
103
|
-
return (a ?
|
|
102
|
+
const n = ((d = o._currentLocation) == null ? void 0 : d.type) === B.warehouse;
|
|
103
|
+
return (a ? o.locations.filter((r) => r.doc._id !== o.currentLocation.doc._id) : o.locations).filter((r) => n || r.acceptRequest).map(L);
|
|
104
104
|
}), P = f(() => {
|
|
105
|
-
if (
|
|
105
|
+
if (s.value === F.PURCHASE) {
|
|
106
106
|
const e = y.value.map((r) => ({
|
|
107
107
|
label: r.name,
|
|
108
108
|
value: r._id
|
|
@@ -121,11 +121,11 @@ function se(t, i, a = !1, l = !1) {
|
|
|
121
121
|
}), _ = f(() => {
|
|
122
122
|
var r, b;
|
|
123
123
|
const n = (b = (r = t()) == null ? void 0 : r.supplier) == null ? void 0 : b._id;
|
|
124
|
-
if (
|
|
124
|
+
if (s.value === F.PURCHASE) {
|
|
125
125
|
const m = u.suppliers.find((C) => C._id === n);
|
|
126
126
|
return m ? k(m) : null;
|
|
127
127
|
}
|
|
128
|
-
const d =
|
|
128
|
+
const d = o.locations.find((m) => m.doc._id);
|
|
129
129
|
return d ? L(d) : null;
|
|
130
130
|
});
|
|
131
131
|
return {
|
|
@@ -153,18 +153,18 @@ const Z = { class: "overflow-y-auto h-full pb-8" }, ae = /* @__PURE__ */ j({
|
|
|
153
153
|
emits: ["update:search"],
|
|
154
154
|
setup(t) {
|
|
155
155
|
const i = t, a = x(t, "search"), l = f(
|
|
156
|
-
() => new
|
|
157
|
-
), u = f(() => l.value.search(a.value)),
|
|
158
|
-
return console.log({ stickyRef:
|
|
156
|
+
() => new D(i.items, ["label", "sublabel"], i.options)
|
|
157
|
+
), u = f(() => l.value.search(a.value)), o = W();
|
|
158
|
+
return console.log({ stickyRef: o }), (s, p) => {
|
|
159
159
|
const y = V("FmButton"), v = V("FmTextField"), h = V("FmMenuItem");
|
|
160
160
|
return S(), N("div", {
|
|
161
161
|
class: "relative",
|
|
162
|
-
style: $({ width:
|
|
162
|
+
style: $({ width: s.width })
|
|
163
163
|
}, [
|
|
164
164
|
O("div", {
|
|
165
165
|
class: "sticky top-0 bg-white mb-8",
|
|
166
166
|
ref_key: "stickyRef",
|
|
167
|
-
ref:
|
|
167
|
+
ref: o
|
|
168
168
|
}, [
|
|
169
169
|
J(v, {
|
|
170
170
|
modelValue: a.value,
|
|
@@ -187,11 +187,11 @@ const Z = { class: "overflow-y-auto h-full pb-8" }, ae = /* @__PURE__ */ j({
|
|
|
187
187
|
key: P,
|
|
188
188
|
label: c.label,
|
|
189
189
|
sublabel: c.sublabel,
|
|
190
|
-
"model-value": M(U)(
|
|
191
|
-
onClick: () =>
|
|
190
|
+
"model-value": M(U)(s.modelValue, c.value),
|
|
191
|
+
onClick: () => s.handleItemChange(M(U)(s.modelValue, c.value), c),
|
|
192
192
|
onVnodeMounted: (_) => {
|
|
193
193
|
var n, e;
|
|
194
|
-
return M(U)(
|
|
194
|
+
return M(U)(s.modelValue, c.value) && ((n = _.el) == null || n.scrollIntoView({ behavior: "instant", block: "end" }), (e = _.el) == null || e.scrollIntoView({ behavior: "smooth", block: "center" })), void 0;
|
|
195
195
|
}
|
|
196
196
|
}, null, 8, ["label", "sublabel", "model-value", "onClick", "onVnodeMounted"]))), 128)),
|
|
197
197
|
u.value.length ? A("", !0) : (S(), g(h, {
|
|
@@ -206,6 +206,6 @@ const Z = { class: "overflow-y-auto h-full pb-8" }, ae = /* @__PURE__ */ j({
|
|
|
206
206
|
});
|
|
207
207
|
export {
|
|
208
208
|
ae as _,
|
|
209
|
-
|
|
210
|
-
|
|
209
|
+
se as c,
|
|
210
|
+
oe as u
|
|
211
211
|
};
|
|
@@ -1,45 +1,45 @@
|
|
|
1
|
-
import { defineComponent as se, mergeModels as z, useModel as ie, computed as v, ref as
|
|
2
|
-
import {
|
|
1
|
+
import { defineComponent as se, mergeModels as z, useModel as ie, computed as v, ref as k, watch as O, onBeforeUnmount as le, inject as ae, resolveComponent as b, openBlock as f, createElementBlock as y, createElementVNode as u, createVNode as h, withCtx as F, renderSlot as q, normalizeClass as T, toDisplayString as A, withDirectives as ue, vModelText as re, createCommentVNode as W, createTextVNode as me, createBlock as E, Fragment as ce, renderList as de } from "vue";
|
|
2
|
+
import { $ as B, I as D, P as L, K as pe, i as M, aB as fe, t as ve, J as be, ah as ye, az as he, ay as Me } from "./app-Dgg5mqsW.js";
|
|
3
3
|
import "@feedmepos/ui-library";
|
|
4
4
|
function G() {
|
|
5
5
|
return {
|
|
6
|
-
amount:
|
|
6
|
+
amount: B.reset()
|
|
7
7
|
};
|
|
8
8
|
}
|
|
9
|
-
function
|
|
9
|
+
function J() {
|
|
10
10
|
return function(p) {
|
|
11
|
-
return
|
|
11
|
+
return D()(p.amountAsString);
|
|
12
12
|
};
|
|
13
13
|
}
|
|
14
|
-
function
|
|
14
|
+
function Te(l) {
|
|
15
15
|
return function(t) {
|
|
16
|
-
return
|
|
16
|
+
return D()(t.amountAsString) !== !0 ? !0 : +t.amountAsString < l ? `Must be at least ${l}` : !0;
|
|
17
17
|
};
|
|
18
18
|
}
|
|
19
|
-
function
|
|
19
|
+
function Le(l) {
|
|
20
20
|
return function(t) {
|
|
21
|
-
return
|
|
21
|
+
return D()(t.amountAsString) !== !0 ? !0 : +t.amountAsString > l ? `Must be at most ${l}` : !0;
|
|
22
22
|
};
|
|
23
23
|
}
|
|
24
24
|
function H(l, p = !1) {
|
|
25
25
|
return function(m) {
|
|
26
|
-
const s =
|
|
26
|
+
const s = J()(m);
|
|
27
27
|
if (s != !0)
|
|
28
28
|
return p ? s : !0;
|
|
29
|
-
const
|
|
30
|
-
return pe(+m.amountAsString).precision >
|
|
29
|
+
const _ = typeof l == "number" ? l : L(l, m.modelValue.measurement);
|
|
30
|
+
return pe(+m.amountAsString).precision > _ ? `Cannot exceed precision more than ${M({
|
|
31
31
|
amount: 1,
|
|
32
|
-
precision:
|
|
32
|
+
precision: _
|
|
33
33
|
})}` : !0;
|
|
34
34
|
};
|
|
35
35
|
}
|
|
36
|
-
function
|
|
36
|
+
function $e(l) {
|
|
37
37
|
const p = fe(l);
|
|
38
38
|
return function(m) {
|
|
39
39
|
return p(m.modelValue.amount);
|
|
40
40
|
};
|
|
41
41
|
}
|
|
42
|
-
const
|
|
42
|
+
const ge = { class: "flex flex-col" }, xe = { class: "flex flex-col" }, Fe = { class: "flex-1" }, Ae = { class: "flex items-center gap-4" }, _e = { class: "flex-1 flex gap-4" }, Pe = { class: "shrink-0 grow basis-2/5" }, Ie = {
|
|
43
43
|
key: 0,
|
|
44
44
|
class: "text-fm-color-typo-secondary"
|
|
45
45
|
}, ke = {
|
|
@@ -48,13 +48,13 @@ const he = { class: "flex flex-col" }, xe = { class: "flex flex-col" }, Fe = { c
|
|
|
48
48
|
}, Be = { class: "flex items-center gap-4" }, De = { class: "line-clamp-1 text-ellipsis break-all" }, Re = { class: "max-w-[200px] flex flex-col gap-[1px]" }, Ue = {
|
|
49
49
|
key: 1,
|
|
50
50
|
class: "flex flex-col gap-4 pl-8 shrink-0"
|
|
51
|
-
},
|
|
51
|
+
}, we = {
|
|
52
52
|
class: "flex items-center",
|
|
53
53
|
style: { "pointer-events": "none" }
|
|
54
|
-
},
|
|
54
|
+
}, Ce = {
|
|
55
55
|
class: "flex items-center",
|
|
56
56
|
style: { "pointer-events": "none" }
|
|
57
|
-
},
|
|
57
|
+
}, je = /* @__PURE__ */ se({
|
|
58
58
|
__name: "FmUnitInput",
|
|
59
59
|
props: /* @__PURE__ */ z({
|
|
60
60
|
modelValue: {},
|
|
@@ -105,35 +105,35 @@ const he = { class: "flex flex-col" }, xe = { class: "flex flex-col" }, Fe = { c
|
|
|
105
105
|
}),
|
|
106
106
|
emits: /* @__PURE__ */ z(["update:amount", "update:measurement"], ["update:modelValue"]),
|
|
107
107
|
setup(l, { emit: p }) {
|
|
108
|
-
const t = l, m = p, s = ie(l, "modelValue"),
|
|
108
|
+
const t = l, m = p, s = ie(l, "modelValue"), _ = D(), R = v(() => {
|
|
109
109
|
var n;
|
|
110
|
-
return
|
|
111
|
-
}), d =
|
|
110
|
+
return L(t.unit, (n = s.value) == null ? void 0 : n.measurement);
|
|
111
|
+
}), d = k((() => {
|
|
112
112
|
var o;
|
|
113
|
-
const e = ((o = s.value) == null ? void 0 : o.amount) ??
|
|
114
|
-
return
|
|
113
|
+
const e = ((o = s.value) == null ? void 0 : o.amount) ?? B.reset(), n = he(e), i = t.formatMinimumPrecision ?? n.precision, a = Me(n, i);
|
|
114
|
+
return M(a);
|
|
115
115
|
})());
|
|
116
|
-
let
|
|
116
|
+
let x = null;
|
|
117
117
|
O(d, (e) => {
|
|
118
|
-
|
|
119
|
-
var r
|
|
120
|
-
const n =
|
|
118
|
+
x && clearTimeout(x), x = setTimeout(() => {
|
|
119
|
+
var r;
|
|
120
|
+
const n = _(e), i = t.precision ?? R.value, o = typeof t.formatMinimumPrecision == "number" && t.formatMinimumPrecision > i ? t.formatMinimumPrecision : i;
|
|
121
121
|
if (n == !0) {
|
|
122
|
-
const
|
|
123
|
-
((r = s.value) == null ? void 0 : r.amount) !==
|
|
122
|
+
const g = ve(+e, o);
|
|
123
|
+
((r = s.value) == null ? void 0 : r.amount) !== g && (s.value = {
|
|
124
124
|
...s.value,
|
|
125
|
-
amount:
|
|
125
|
+
amount: g
|
|
126
126
|
});
|
|
127
127
|
}
|
|
128
|
-
|
|
128
|
+
m("update:amount", e);
|
|
129
129
|
}, 500);
|
|
130
130
|
}), le(() => {
|
|
131
|
-
|
|
131
|
+
x && clearTimeout(x);
|
|
132
132
|
});
|
|
133
|
-
const Z = Symbol.for("fm:form-state"),
|
|
133
|
+
const Z = Symbol.for("fm:form-state"), U = ae(Z, null), P = v(() => t.disabled ?? (U == null ? void 0 : U.getDisabled()) ?? !1), Q = k(), w = k(!1), $ = k(!1), X = v(() => w.value || $.value), Y = v(() => {
|
|
134
134
|
var a;
|
|
135
|
-
const i = [...t.unit.measurements.filter((o) => !o.name.toLocaleLowerCase().includes("inactive")).filter((o) => o.abbrev !== t.unit.abbrev || +
|
|
136
|
-
(o) => `${o.abbrev}${
|
|
135
|
+
const i = [...t.unit.measurements.filter((o) => !o.name.toLocaleLowerCase().includes("inactive")).filter((o) => o.abbrev !== t.unit.abbrev || +M(o.conversion) != 1).groupBy(
|
|
136
|
+
(o) => `${o.abbrev}${M(o.conversion)}`
|
|
137
137
|
).values()].map((o) => o[0]).flat();
|
|
138
138
|
return [
|
|
139
139
|
{
|
|
@@ -145,7 +145,7 @@ const he = { class: "flex flex-col" }, xe = { class: "flex flex-col" }, Fe = { c
|
|
|
145
145
|
value: o.id
|
|
146
146
|
}))
|
|
147
147
|
];
|
|
148
|
-
}),
|
|
148
|
+
}), C = v({
|
|
149
149
|
get() {
|
|
150
150
|
var e, n;
|
|
151
151
|
return ((n = (e = s.value) == null ? void 0 : e.measurement) == null ? void 0 : n.id) ?? null;
|
|
@@ -165,17 +165,17 @@ const he = { class: "flex flex-col" }, xe = { class: "flex flex-col" }, Fe = { c
|
|
|
165
165
|
}
|
|
166
166
|
}
|
|
167
167
|
});
|
|
168
|
-
O(
|
|
168
|
+
O(C, (e, n) => {
|
|
169
169
|
var c;
|
|
170
170
|
if (!t.convertAmountOnChangeUnit)
|
|
171
171
|
return;
|
|
172
|
-
const i = ((c = s.value) == null ? void 0 : c.amount) ??
|
|
173
|
-
value:
|
|
174
|
-
precision:
|
|
172
|
+
const i = ((c = s.value) == null ? void 0 : c.amount) ?? B.reset(), a = t.unit.measurements.find((I) => I.id === n) ?? null, o = t.unit.measurements.find((I) => I.id === e) ?? null, r = a ? be(i, a.conversion) : i, g = o ? ye(r, o.conversion) : r, S = L(t.unit, o), V = B.convertPrecision({
|
|
173
|
+
value: g,
|
|
174
|
+
precision: S
|
|
175
175
|
});
|
|
176
|
-
d.value =
|
|
176
|
+
d.value = M(V);
|
|
177
177
|
});
|
|
178
|
-
const
|
|
178
|
+
const N = v(() => {
|
|
179
179
|
var e, n;
|
|
180
180
|
return ((n = (e = s.value) == null ? void 0 : e.measurement) == null ? void 0 : n.abbrev) ?? t.unit.abbrev;
|
|
181
181
|
}), ee = v(
|
|
@@ -186,96 +186,96 @@ const he = { class: "flex flex-col" }, xe = { class: "flex flex-col" }, Fe = { c
|
|
|
186
186
|
)) ?? [];
|
|
187
187
|
}
|
|
188
188
|
), te = v(() => [...t.applyDefaultRules ? [
|
|
189
|
-
|
|
189
|
+
J(),
|
|
190
190
|
typeof t.precision == "number" ? H(t.precision) : H(t.unit)
|
|
191
191
|
] : [], ...ee.value]);
|
|
192
|
-
function
|
|
193
|
-
const n = t.precision ??
|
|
192
|
+
function j(e) {
|
|
193
|
+
const n = t.precision ?? R.value, a = typeof t.formatMinimumPrecision == "number" && t.formatMinimumPrecision > n ? t.formatMinimumPrecision : n, o = e.toFixed(a), r = o.includes(".") ? o.replace(/0+$/, "") : o;
|
|
194
194
|
return r.endsWith(".") ? r.slice(0, r.length - 1) : r;
|
|
195
195
|
}
|
|
196
196
|
function ne() {
|
|
197
197
|
if (!t.stepper)
|
|
198
198
|
return;
|
|
199
|
-
const e = +d.value + +
|
|
200
|
-
d.value =
|
|
199
|
+
const e = +d.value + +M(t.stepper);
|
|
200
|
+
d.value = j(e);
|
|
201
201
|
}
|
|
202
202
|
function oe() {
|
|
203
203
|
if (!t.stepper)
|
|
204
204
|
return;
|
|
205
|
-
const e = +d.value - +
|
|
206
|
-
d.value =
|
|
205
|
+
const e = +d.value - +M(t.stepper);
|
|
206
|
+
d.value = j(e);
|
|
207
207
|
}
|
|
208
208
|
return (e, n) => {
|
|
209
|
-
const i = b("FmLabel"), a = b("FmIcon"), o = b("FmMenuItem"), r = b("FmMenu"),
|
|
210
|
-
return f(), y("div",
|
|
209
|
+
const i = b("FmLabel"), a = b("FmIcon"), o = b("FmMenuItem"), r = b("FmMenu"), g = b("FmTooltip"), S = b("FmField"), V = b("FmFormGroup");
|
|
210
|
+
return f(), y("div", ge, [
|
|
211
211
|
u("div", xe, [
|
|
212
212
|
u("div", Fe, [
|
|
213
|
-
|
|
213
|
+
h(i, {
|
|
214
214
|
label: e.label,
|
|
215
215
|
disabled: e.disabled,
|
|
216
216
|
required: e.labelMark === "required",
|
|
217
217
|
optional: e.labelMark === "optional"
|
|
218
218
|
}, null, 8, ["label", "disabled", "required", "optional"])
|
|
219
219
|
]),
|
|
220
|
-
|
|
221
|
-
default:
|
|
220
|
+
h(S, { focused: X.value }, {
|
|
221
|
+
default: F(() => [
|
|
222
222
|
u("div", Ae, [
|
|
223
223
|
q(e.$slots, "prepend"),
|
|
224
224
|
u("div", _e, [
|
|
225
225
|
u("div", Pe, [
|
|
226
226
|
e.stepperOnly ? (f(), y("span", {
|
|
227
227
|
key: 0,
|
|
228
|
-
class:
|
|
228
|
+
class: T({
|
|
229
229
|
"fm-text-field--input fm-typo-en-body-lg-400": !0,
|
|
230
|
-
"text-fm-color-typo-primary": !
|
|
231
|
-
"text-fm-color-typo-disabled":
|
|
230
|
+
"text-fm-color-typo-primary": !P.value,
|
|
231
|
+
"text-fm-color-typo-disabled": P.value
|
|
232
232
|
})
|
|
233
|
-
},
|
|
233
|
+
}, A(d.value), 3)) : ue((f(), y("input", {
|
|
234
234
|
key: 1,
|
|
235
235
|
type: "text",
|
|
236
236
|
ref_key: "inputRef",
|
|
237
|
-
ref:
|
|
237
|
+
ref: Q,
|
|
238
238
|
onFocus: n[0] || (n[0] = () => w.value = !0),
|
|
239
239
|
onBlur: n[1] || (n[1] = () => w.value = !1),
|
|
240
240
|
"onUpdate:modelValue": n[2] || (n[2] = (c) => d.value = c),
|
|
241
|
-
class:
|
|
241
|
+
class: T({
|
|
242
242
|
"fm-text-field--input fm-typo-en-body-lg-400": !0,
|
|
243
|
-
"text-fm-color-typo-primary": !
|
|
244
|
-
"text-fm-color-typo-disabled":
|
|
243
|
+
"text-fm-color-typo-primary": !P.value,
|
|
244
|
+
"text-fm-color-typo-disabled": P.value
|
|
245
245
|
})
|
|
246
246
|
}, null, 34)), [
|
|
247
247
|
[re, d.value]
|
|
248
248
|
])
|
|
249
249
|
]),
|
|
250
|
-
e.separator ? (f(), y("div", Ie,
|
|
250
|
+
e.separator ? (f(), y("div", Ie, A(e.separator), 1)) : W("", !0),
|
|
251
251
|
u("div", {
|
|
252
|
-
class:
|
|
252
|
+
class: T([e.disabled ? "text-fm-color-typo-disabled" : "text-fm-color-typo-secondary"])
|
|
253
253
|
}, [
|
|
254
|
-
|
|
255
|
-
content:
|
|
256
|
-
me(
|
|
254
|
+
h(g, { "z-index": 51 }, {
|
|
255
|
+
content: F(() => [
|
|
256
|
+
me(A(N.value), 1)
|
|
257
257
|
]),
|
|
258
|
-
default:
|
|
259
|
-
e.disableUnit ? (f(), y("div", ke,
|
|
258
|
+
default: F(() => [
|
|
259
|
+
e.disableUnit ? (f(), y("div", ke, A(N.value), 1)) : (f(), E(r, {
|
|
260
260
|
key: 1,
|
|
261
|
-
onMenuChanged: n[3] || (n[3] = (c) =>
|
|
261
|
+
onMenuChanged: n[3] || (n[3] = (c) => $.value = c),
|
|
262
262
|
"z-index": 500,
|
|
263
263
|
placement: e.placement,
|
|
264
264
|
disabled: e.disabled
|
|
265
265
|
}, {
|
|
266
|
-
"menu-button":
|
|
266
|
+
"menu-button": F(() => [
|
|
267
267
|
u("div", Be, [
|
|
268
|
-
u("div", De,
|
|
269
|
-
|
|
268
|
+
u("div", De, A(N.value), 1),
|
|
269
|
+
h(a, { name: "keyboard_arrow_down" })
|
|
270
270
|
])
|
|
271
271
|
]),
|
|
272
|
-
default:
|
|
272
|
+
default: F(() => [
|
|
273
273
|
u("div", Re, [
|
|
274
274
|
(f(!0), y(ce, null, de(Y.value, (c) => (f(), E(o, {
|
|
275
275
|
key: c.value ?? void 0,
|
|
276
276
|
label: c.label,
|
|
277
|
-
"model-value": c.value ==
|
|
278
|
-
onClick: (
|
|
277
|
+
"model-value": c.value == C.value,
|
|
278
|
+
onClick: (I) => C.value = c.value
|
|
279
279
|
}, null, 8, ["label", "model-value", "onClick"]))), 128))
|
|
280
280
|
])
|
|
281
281
|
]),
|
|
@@ -290,8 +290,8 @@ const he = { class: "flex flex-col" }, xe = { class: "flex flex-col" }, Fe = { c
|
|
|
290
290
|
class: "w-24 h-12 flex items-center justify-center fm-corner-radius-sm bg-fm-color-neutral-gray-100 hover:bg-fm-color-neutral-gray-200",
|
|
291
291
|
onClick: ne
|
|
292
292
|
}, [
|
|
293
|
-
u("div",
|
|
294
|
-
|
|
293
|
+
u("div", we, [
|
|
294
|
+
h(a, {
|
|
295
295
|
name: "expand_less",
|
|
296
296
|
size: "md"
|
|
297
297
|
})
|
|
@@ -301,8 +301,8 @@ const he = { class: "flex flex-col" }, xe = { class: "flex flex-col" }, Fe = { c
|
|
|
301
301
|
class: "w-24 h-12 flex items-center justify-center fm-corner-radius-sm bg-fm-color-neutral-gray-100 hover:bg-fm-color-neutral-gray-200",
|
|
302
302
|
onClick: oe
|
|
303
303
|
}, [
|
|
304
|
-
u("div",
|
|
305
|
-
|
|
304
|
+
u("div", Ce, [
|
|
305
|
+
h(a, {
|
|
306
306
|
name: "expand_more",
|
|
307
307
|
size: "md"
|
|
308
308
|
})
|
|
@@ -316,7 +316,7 @@ const he = { class: "flex flex-col" }, xe = { class: "flex flex-col" }, Fe = { c
|
|
|
316
316
|
_: 3
|
|
317
317
|
}, 8, ["focused"])
|
|
318
318
|
]),
|
|
319
|
-
|
|
319
|
+
h(V, {
|
|
320
320
|
class: "flex-1",
|
|
321
321
|
"model-value": { modelValue: s.value, amountAsString: String(d.value) },
|
|
322
322
|
info: e.labelInfo,
|
|
@@ -329,10 +329,10 @@ const he = { class: "flex flex-col" }, xe = { class: "flex flex-col" }, Fe = { c
|
|
|
329
329
|
}
|
|
330
330
|
});
|
|
331
331
|
export {
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
332
|
+
Te as F,
|
|
333
|
+
je as _,
|
|
334
|
+
Le as a,
|
|
335
|
+
$e as b,
|
|
336
|
+
J as c,
|
|
337
337
|
H as d
|
|
338
338
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
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 {
|
|
2
|
+
import { i as a, J as y } from "./app-Dgg5mqsW.js";
|
|
3
3
|
import { useI18n as _ } from "@feedmepos/mf-common";
|
|
4
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
5
|
class: "flex-0 py-8 px-16",
|