@feedmepos/mf-inventory-portal 0.0.23-dev.9 → 0.0.24-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-D3sNH2MR.js +276 -0
- package/dist/{ApprovalView-e85YmdZN.js → ApprovalView-DHnRx0hJ.js} +17 -20
- package/dist/{BindingsDialog-giBUD0IH.js → BindingsDialog-oTeg2Dai.js} +6 -6
- package/dist/{BindingsPicker-CC4MmPbF.js → BindingsPicker-CWdjmMJ3.js} +8 -9
- package/dist/{BindingsTable-WphZdzrA.js → BindingsTable-bKLR1OKX.js} +18 -22
- package/dist/ClosingDraftView-CIQVz7lY.js +1225 -0
- package/dist/{ClosingTemplateView-1lzoDyet.js → ClosingTemplateView-D5pLzQwU.js} +259 -274
- package/dist/FmCustomAttribute.vue_vue_type_script_setup_true_lang-ClLDcchC.js +142 -0
- package/dist/{FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-Cv-vvzr5.js → FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-B_c6Vn6P.js} +23 -24
- package/dist/{FmUnitInput.vue_vue_type_script_setup_true_lang-DIFQcrc0.js → FmUnitInput.vue_vue_type_script_setup_true_lang-DhpHOaRH.js} +50 -51
- package/dist/{IngredientGroupView-UegBM_JK.js → IngredientGroupView-4C437mso.js} +63 -70
- package/dist/IngredientsView-DoiGgjre.js +1706 -0
- package/dist/{IntegrationView-FYNNzKia.js → IntegrationView-8ZKE7MAM.js} +123 -126
- package/dist/{InventoryBindingForm-DsHv_IHG.js → InventoryBindingForm-CcnfliYQ.js} +1 -1
- package/dist/{InventoryBindingForm.vue_vue_type_script_setup_true_lang-BURSXafS.js → InventoryBindingForm.vue_vue_type_script_setup_true_lang-B_J-6C9x.js} +116 -108
- package/dist/{InventoryBindingSummary-BLb4MRPZ.js → InventoryBindingSummary-CRdHCzNE.js} +1 -1
- package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-BG78-DHs.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-B2-TypU0.js} +1 -1
- package/dist/{PremiumBadge.vue_vue_type_script_setup_true_lang-CqID5_7v.js → PremiumBadge.vue_vue_type_script_setup_true_lang-BuQde75S.js} +20 -21
- package/dist/PublishView-t5gjGmK_.js +192 -0
- package/dist/{PurchaseOrderPrintPreview-BBMU3teq.js → PurchaseOrderPrintPreview-6i53Y-v1.js} +13 -14
- package/dist/ReceiveRequestView-uOeSh0Mr.js +1866 -0
- package/dist/RecipeView-BTWywckD.js +609 -0
- package/dist/StockView-DN2xk8ei.js +1817 -0
- package/dist/{SupplierView-B2aObtwK.js → SupplierView-l0XUg3J4.js} +185 -196
- package/dist/TransferDetails.vue_vue_type_script_setup_true_lang-CWMn6fFf.js +1327 -0
- package/dist/TransferTemplateView-wDKXpCWZ.js +1263 -0
- package/dist/UnitView-CUI-k-tS.js +648 -0
- package/dist/{WarehouseView-G8pej6Y2.js → WarehouseView-WsI_eG5r.js} +190 -197
- package/dist/api/adjustment-template.d.ts +25 -0
- package/dist/api/bill.d.ts +240 -84
- package/dist/api/inventory.d.ts +19 -6
- package/dist/api/netsuite.d.ts +3 -3
- package/dist/app-DntcWR3_.js +85558 -0
- package/dist/app.d.ts +85 -0
- package/dist/app.js +2 -2
- package/dist/components/FmCustomAttribute.vue.d.ts +23 -0
- package/dist/components/FmLockableField.vue.d.ts +37 -0
- package/dist/components/FmMultiselectDialogProps.d.ts +1 -0
- package/dist/components/inventory-binding/InventoryBinding.vue.d.ts +3 -1
- package/dist/components/shell/inventory/binding-ui.vue.d.ts +3 -1
- package/dist/composable/defineDeepModel.d.ts +1 -1
- package/dist/{decimal-DC07xoJW.js → decimal-DTCTnMwO.js} +1 -1
- package/dist/format-unit-display-Hy48Iw5j.js +1215 -0
- package/dist/index-Bv9RYyTZ.js +29202 -0
- package/dist/{StockView-C5btudss.js → index-D4yJP9I2.js} +2220 -3863
- package/dist/layout/SingleColumnLayout.vue.d.ts +1 -0
- package/dist/router/name.d.ts +2 -0
- package/dist/stock-BsdmfT-b.js +125 -0
- package/dist/stores/feature.d.ts +41 -1
- package/dist/stores/integration/netsuite.d.ts +3 -2
- package/dist/stores/inventory.d.ts +20 -8
- package/dist/stores/location.d.ts +29 -1
- package/dist/stores/supplier.d.ts +1 -1
- package/dist/style.css +1 -1
- package/dist/supplier-CXhkgC4M.js +77 -0
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/{use-inventory-binding-dialog-B0G2XYSw.js → use-inventory-binding-dialog-DPMJmBCr.js} +10 -11
- package/dist/views/adjustment-template/import/AdjustmentTemplateImport.vue.d.ts +2 -0
- package/dist/views/adjustment-template/import/AdjustmentTemplateImportItem.vue.d.ts +18 -0
- package/dist/views/adjustment-template/import/export.d.ts +60 -0
- package/dist/views/adjustment-template/wastage-template/WastageTemplateDetails.vue.d.ts +2 -0
- package/dist/views/adjustment-template/wastage-template/WastageTemplateDialog.vue.d.ts +22 -0
- package/dist/views/adjustment-template/wastage-template/WastageTemplatePublish.vue.d.ts +6 -0
- package/dist/views/adjustment-template/wastage-template/WastageTemplateReason.vue.d.ts +18 -0
- package/dist/views/adjustment-template/wastage-template/WastageTemplateView.vue.d.ts +2 -0
- package/dist/views/adjustment-template/wastage-template/actions.d.ts +1377 -0
- package/dist/views/adjustment-template/wastage-template/form/WastageTemplateForm.vue.d.ts +16 -0
- package/dist/views/adjustment-template/wastage-template/form/WastageTemplateItemTable.vue.d.ts +35 -0
- package/dist/views/adjustment-template/wastage-template/form/useAdjustmentTemplateItems.d.ts +20 -0
- package/dist/views/adjustment-template/wastage-template/props.d.ts +36 -0
- package/dist/views/adjustment-template/wastage-template/table.d.ts +1351 -0
- package/dist/views/closing-draft/components/closing-draft-dialog/ClosingDraftDialog.vue.d.ts +198 -12
- package/dist/views/closing-draft/composables/use-closing-draft-actions.d.ts +7 -4
- package/dist/views/closing-draft/composables/use-closing-draft-table.d.ts +1559 -467
- package/dist/views/closing-draft/helpers/export-draft.helper.d.ts +19 -0
- package/dist/views/closing-draft/helpers/get-calculated-total.helper.d.ts +4 -0
- package/dist/views/closing-template/components/closing-template-form/composables/use-closing-template-items.d.ts +2 -1
- package/dist/views/closing-template/composables/use-closing-template-actions.d.ts +72 -12
- package/dist/views/closing-template/composables/use-closing-template-table.d.ts +73 -13
- package/dist/views/ingredient-group/composables/use-ingredient-group-table.d.ts +6 -3
- package/dist/views/ingredients/components/convert/ConvertFormProps.d.ts +1 -0
- package/dist/views/ingredients/components/ingredient-form/IngredientForm.vue.d.ts +4 -2
- package/dist/views/ingredients/components/inventory-binding/InventoryBindingForm.vue.d.ts +1 -0
- package/dist/views/ingredients/composables/use-ingredient-table.d.ts +2 -1
- package/dist/views/publish/PublishView.vue.d.ts +2 -0
- package/dist/views/receive-request/components/netsuite/NetSuiteInfo.vue.d.ts +12 -0
- package/dist/views/receive-request/components/netsuite/NetSuiteProps.d.ts +13 -0
- package/dist/views/receive-request/components/netsuite/NetSuiteSync.vue.d.ts +12 -0
- package/dist/views/receive-request/components/transfer-form/NetSuiteField.vue.d.ts +13 -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 +86 -17
- package/dist/views/receive-request/components/transfer-form/components/ForecastStock.vue.d.ts +4 -2
- package/dist/views/receive-request/components/transfer-form/composables/use-transfer-items.d.ts +2 -1
- package/dist/views/receive-request/composables/use-receive-request-form.d.ts +126 -24
- package/dist/views/receive-request/composables/use-receive-request-table.d.ts +126 -24
- package/dist/views/recipe/components/recipe-form/RecipeForm.vue.d.ts +2 -0
- package/dist/views/stock/components/StockRecordCard.vue.d.ts +120 -42
- package/dist/views/stock/components/dialog/AdjustedItemForm.vue.d.ts +6 -4
- package/dist/views/stock/helper/compute-summary-total.d.ts +2 -2
- package/dist/views/transfer-template/components/transfer-template-form/composables/use-template-enabled-locations.d.ts +4 -0
- package/dist/views/transfer-template/components/transfer-template-form/composables/use-transfer-template-items.d.ts +2 -1
- package/dist/views/transfer-template/composables/use-transfer-template-actions.d.ts +72 -12
- package/dist/views/transfer-template/composables/use-transfer-template-table.d.ts +72 -12
- package/dist/views/transfer-template/helpers/import-export.helper.d.ts +2 -1
- package/dist/vue-i18n-ByVzHsI7.js +2365 -0
- package/package.json +5 -4
- package/dist/App-ByLgARNp.js +0 -259
- package/dist/ClosingDraftView-CQM1Sx45.js +0 -755
- package/dist/FmDroppableField-8RzKjEdL.js +0 -154
- package/dist/FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-BvkN-71q.js +0 -436
- package/dist/FmMultiselectDialog-DScMA6iG.js +0 -415
- package/dist/IngredientBindedItem.vue_vue_type_script_setup_true_lang-t4pim_k9.js +0 -51
- package/dist/IngredientsView-BfW-jZLM.js +0 -1666
- package/dist/ReceiveRequestView-vbANEzne.js +0 -4165
- package/dist/RecipeView-DW4DY0C0.js +0 -598
- package/dist/TableActionableRow.vue_vue_type_script_setup_true_lang-DlNJ6kRg.js +0 -135
- package/dist/TransferDetails.vue_vue_type_script_setup_true_lang-B2LOvVef.js +0 -1229
- package/dist/TransferTemplateView-BKumN_p6.js +0 -1262
- package/dist/UnitView-CHLucv9s.js +0 -648
- package/dist/_plugin-vue_export-helper-CHgC5LLL.js +0 -9
- package/dist/app-BXjk74IB.js +0 -33538
- package/dist/date2-CWAt9bRf.js +0 -117
- package/dist/dayjs.min-D3jPOnu6.js +0 -282
- package/dist/defineDeepModel-CiD4GtOw.js +0 -13
- package/dist/feature-6tcLMotY.js +0 -92
- package/dist/form-mode.enum-BKiNVH6A.js +0 -4
- package/dist/format-time-from-id-CYU5Z9Mt.js +0 -15
- package/dist/format-unit-display-CY-0bznr.js +0 -1217
- package/dist/fuzzy-BMkhNYLR.js +0 -41
- package/dist/index-BXwQa14X.js +0 -45
- package/dist/index-CRLd5xyg.js +0 -22283
- package/dist/index-DqwAtOgI.js +0 -12087
- package/dist/netsuite-fYUUk_ss.js +0 -225
- package/dist/row-action.enum-7rGLGZ5v.js +0 -55
- package/dist/rules-BmRGm3yv.js +0 -203
- package/dist/stock-CEX0DP2B.js +0 -111
- package/dist/supplier-CdJmZr7w.js +0 -77
- package/dist/use-template-enabled-locations-2-xbPJWHCs.js +0 -86
- package/dist/xlsx-CTOKp7SQ.js +0 -24004
- package/dist/xlsx.util-D5NFSfDg.js +0 -78
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
import { defineComponent as g, openBlock as a, createElementBlock as i, createElementVNode as m, toDisplayString as u, unref as h, Fragment as C, renderList as N, computed as v, resolveComponent as V, createVNode as S, createCommentVNode as w, h as B } from "vue";
|
|
2
|
+
import { j as b, K as F, f as $ } from "./app-DntcWR3_.js";
|
|
3
|
+
import { useI18n as k, useCoreStore as I } from "@feedmepos/mf-common";
|
|
4
|
+
import { components as O } from "@feedmepos/ui-library";
|
|
5
|
+
const T = { class: "flex flex-col" }, j = { 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" }, z = { class: "flex-1 py-8 px-16" }, D = {
|
|
6
|
+
class: "flex-0 py-8 px-16",
|
|
7
|
+
style: { "flex-basis": "120px" }
|
|
8
|
+
}, E = { class: "flex-1 py-8 px-16" }, K = {
|
|
9
|
+
key: 0,
|
|
10
|
+
class: "flex-0 py-8 px-16",
|
|
11
|
+
style: { "flex-basis": "120px" }
|
|
12
|
+
}, M = {
|
|
13
|
+
key: 1,
|
|
14
|
+
class: "flex-0 py-8 px-16",
|
|
15
|
+
style: { "flex-basis": "120px" }
|
|
16
|
+
}, G = /* @__PURE__ */ g({
|
|
17
|
+
__name: "IngredientBindedItem",
|
|
18
|
+
props: {
|
|
19
|
+
name: {},
|
|
20
|
+
bindings: {}
|
|
21
|
+
},
|
|
22
|
+
setup(_) {
|
|
23
|
+
const { t: p } = k();
|
|
24
|
+
function l(o, c) {
|
|
25
|
+
var n;
|
|
26
|
+
if (o.measurement) {
|
|
27
|
+
const d = F(o.amount, o.measurement.conversion);
|
|
28
|
+
return `${b(d, !1)} ${(n = o.measurement) == null ? void 0 : n.abbrev}`;
|
|
29
|
+
}
|
|
30
|
+
return `${b(o.amount, !1)} ${c.abbrev}`;
|
|
31
|
+
}
|
|
32
|
+
function f(o) {
|
|
33
|
+
return o.unit !== void 0;
|
|
34
|
+
}
|
|
35
|
+
return (o, c) => (a(), i("div", T, [
|
|
36
|
+
m("div", j, [
|
|
37
|
+
m("div", z, u(o.name), 1),
|
|
38
|
+
m("div", D, u(h(p)("inventory.ingredient.bindedItems.amount")), 1)
|
|
39
|
+
]),
|
|
40
|
+
(a(!0), i(C, null, N(o.bindings, (n) => (a(), i("div", {
|
|
41
|
+
key: n.id,
|
|
42
|
+
class: "flex flex-row fm-typo-en-body-md-400 h-48 items-center border-b border-b-fm-color-neutral-gray-100"
|
|
43
|
+
}, [
|
|
44
|
+
m("div", E, u(n.name), 1),
|
|
45
|
+
f(n) ? (a(), i("div", K, u(l(n, n.unit)), 1)) : (a(), i("div", M, u(h(b)(n.amount, !1)), 1))
|
|
46
|
+
]))), 128))
|
|
47
|
+
]));
|
|
48
|
+
}
|
|
49
|
+
}), U = {
|
|
50
|
+
key: 0,
|
|
51
|
+
class: "flex flex-col gap-16"
|
|
52
|
+
}, H = /* @__PURE__ */ g({
|
|
53
|
+
__name: "FmCustomAttribute",
|
|
54
|
+
props: {
|
|
55
|
+
entity: {},
|
|
56
|
+
modelValue: {},
|
|
57
|
+
valueOptions: {}
|
|
58
|
+
},
|
|
59
|
+
emits: ["update:modelValue"],
|
|
60
|
+
setup(_, { emit: p }) {
|
|
61
|
+
const l = _, f = p, { t: o } = k(), c = I();
|
|
62
|
+
function n(s) {
|
|
63
|
+
var e, t;
|
|
64
|
+
if ((t = (e = l.valueOptions) == null ? void 0 : e[s]) != null && t.length)
|
|
65
|
+
return l.valueOptions[s];
|
|
66
|
+
}
|
|
67
|
+
const d = v(() => {
|
|
68
|
+
const s = /* @__PURE__ */ new Set(["671005de24a7f4001c87e25e"]), e = c.currentBusiness.value;
|
|
69
|
+
return e ? s.has(e._id) ? [
|
|
70
|
+
{
|
|
71
|
+
key: "tag",
|
|
72
|
+
type: "string",
|
|
73
|
+
entity: "inventorySku"
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
key: "tag",
|
|
77
|
+
type: "string",
|
|
78
|
+
entity: "inventoryRecipe"
|
|
79
|
+
}
|
|
80
|
+
].filter((r) => r.entity === l.entity) : [] : [];
|
|
81
|
+
}), y = v(() => d.value.map((s) => {
|
|
82
|
+
var t;
|
|
83
|
+
const e = n(s.key);
|
|
84
|
+
return {
|
|
85
|
+
key: s.key,
|
|
86
|
+
type: s.type,
|
|
87
|
+
value: ((t = l.modelValue) == null ? void 0 : t[s.key]) || "",
|
|
88
|
+
options: e
|
|
89
|
+
};
|
|
90
|
+
}) || []), A = [
|
|
91
|
+
{
|
|
92
|
+
header: () => o("portalshell.customAttributes.form.key"),
|
|
93
|
+
accessorKey: "key",
|
|
94
|
+
enableSorting: !1
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
header: () => o("portalshell.customAttributes.form.value"),
|
|
98
|
+
accessorKey: "value",
|
|
99
|
+
enableSorting: !1,
|
|
100
|
+
cell: (s) => {
|
|
101
|
+
const e = s.row.original;
|
|
102
|
+
return B(O.FmTextField, {
|
|
103
|
+
modelValue: e.value,
|
|
104
|
+
placeholder: o("portalshell.customAttributes.form.valuePlaceholder"),
|
|
105
|
+
datalist: e.options,
|
|
106
|
+
rules: [
|
|
107
|
+
(t) => e.type === "number" && isNaN(Number(t)) ? o("portalshell.customAttributes.form.attributeValueMustBeNumber") : !0
|
|
108
|
+
],
|
|
109
|
+
"onUpdate:modelValue": (t) => {
|
|
110
|
+
const r = $(l.modelValue);
|
|
111
|
+
if (r[e.key] = t == null ? void 0 : t.trim(), e.type === "number") {
|
|
112
|
+
if (isNaN(Number(t)))
|
|
113
|
+
return;
|
|
114
|
+
r[e.key] = Number(t);
|
|
115
|
+
}
|
|
116
|
+
Object.keys(r).forEach((x) => {
|
|
117
|
+
r[x] || delete r[x];
|
|
118
|
+
}), f("update:modelValue", r);
|
|
119
|
+
}
|
|
120
|
+
});
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
];
|
|
124
|
+
return (s, e) => {
|
|
125
|
+
const t = V("FmTable");
|
|
126
|
+
return y.value.length ? (a(), i("div", U, [
|
|
127
|
+
e[0] || (e[0] = m("div", { class: "fm-typo-en-title-sm-600" }, "Custom attributes", -1)),
|
|
128
|
+
S(t, {
|
|
129
|
+
"column-defs": A,
|
|
130
|
+
"row-data": y.value,
|
|
131
|
+
"shrink-at": !1,
|
|
132
|
+
"page-size": y.value.length,
|
|
133
|
+
"hide-footer": ""
|
|
134
|
+
}, null, 8, ["row-data", "page-size"])
|
|
135
|
+
])) : w("", !0);
|
|
136
|
+
};
|
|
137
|
+
}
|
|
138
|
+
});
|
|
139
|
+
export {
|
|
140
|
+
G as _,
|
|
141
|
+
H as a
|
|
142
|
+
};
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { computed as y, defineComponent as $, mergeModels as W, useModel as J, resolveComponent as U, openBlock as T, createElementBlock as A, normalizeStyle as K, createElementVNode as D, createVNode as Q, withCtx as X, createBlock as w, createCommentVNode as N, Fragment as Y, renderList as Z, unref as x } from "vue";
|
|
1
|
+
import { j as k, t as B, ao as w, u as H, at as I, aD as R, aE as M } from "./app-DntcWR3_.js";
|
|
2
|
+
import { u as j } from "./supplier-CXhkgC4M.js";
|
|
3
|
+
import { P as S } from "./format-unit-display-Hy48Iw5j.js";
|
|
4
|
+
import { computed as y, defineComponent as $, mergeModels as W, useModel as J, resolveComponent as U, openBlock as T, createElementBlock as A, normalizeStyle as K, createElementVNode as D, createVNode as Q, withCtx as X, createBlock as x, createCommentVNode as E, Fragment as Y, renderList as Z, unref as V } from "vue";
|
|
6
5
|
function z(l, r, e) {
|
|
7
6
|
var s;
|
|
8
7
|
if (!!r.measurement === !!e && ((s = r.measurement) == null ? void 0 : s.id) === e)
|
|
@@ -19,7 +18,7 @@ function z(l, r, e) {
|
|
|
19
18
|
costPerUnit: r.costPerUnit
|
|
20
19
|
};
|
|
21
20
|
}
|
|
22
|
-
function
|
|
21
|
+
function oe(l, r, e, n) {
|
|
23
22
|
var b, g, u;
|
|
24
23
|
if (n != null && n.manualTotalCost)
|
|
25
24
|
return n == null ? void 0 : n.manualTotalCost;
|
|
@@ -27,16 +26,16 @@ function re(l, r, e, n) {
|
|
|
27
26
|
(a) => a.skuId === l._id
|
|
28
27
|
)) == null ? void 0 : u.defaultCost, o = l.defaultCost ? z(l.unit, l.defaultCost, l.trackingMeasurement) : void 0, s = t ?? o, i = s == null ? void 0 : s.costPerUnit, c = i ? s != null && s.measurement ? +k(i) / +k(s == null ? void 0 : s.measurement.conversion) : +k(i) : void 0, p = c ? e ? c * +k(e.conversion) : c : void 0, f = p ? +k(r) * p : void 0;
|
|
29
28
|
return f ? {
|
|
30
|
-
...
|
|
31
|
-
currency:
|
|
29
|
+
...B(f ?? 0, 2),
|
|
30
|
+
currency: w()
|
|
32
31
|
} : {
|
|
33
32
|
amount: 0,
|
|
34
33
|
precision: 0,
|
|
35
|
-
currency:
|
|
34
|
+
currency: w()
|
|
36
35
|
};
|
|
37
36
|
}
|
|
38
37
|
function F(l) {
|
|
39
|
-
return
|
|
38
|
+
return R.parse(l);
|
|
40
39
|
}
|
|
41
40
|
function C(l) {
|
|
42
41
|
return {
|
|
@@ -56,8 +55,8 @@ function C(l) {
|
|
|
56
55
|
}
|
|
57
56
|
};
|
|
58
57
|
}
|
|
59
|
-
function
|
|
60
|
-
const t = j(), o =
|
|
58
|
+
function re(l, r, e = !1, n = !1) {
|
|
59
|
+
const t = j(), o = H();
|
|
61
60
|
o.watchLocation(async () => {
|
|
62
61
|
var v;
|
|
63
62
|
await t.readSuppliers();
|
|
@@ -82,7 +81,7 @@ function ie(l, r, e = !1, n = !1) {
|
|
|
82
81
|
set(u) {
|
|
83
82
|
const a = l() ?? {};
|
|
84
83
|
if (s.value === S.PURCHASE) {
|
|
85
|
-
const _ = (n ? t.suppliers : t.businessSuppliers).find((
|
|
84
|
+
const _ = (n ? t.suppliers : t.businessSuppliers).find((N) => N._id === u);
|
|
86
85
|
r({
|
|
87
86
|
...a,
|
|
88
87
|
supplier: _ ? F(_) : a.supplier
|
|
@@ -213,7 +212,7 @@ class P {
|
|
|
213
212
|
return r.split("").map((t, o) => t !== n ? !1 : o).filter((t) => t !== !1);
|
|
214
213
|
}
|
|
215
214
|
}
|
|
216
|
-
const G = { class: "sticky top-0 bg-white mb-8" }, q = { class: "overflow-y-auto pb-8" },
|
|
215
|
+
const G = { class: "sticky top-0 bg-white mb-8" }, q = { class: "overflow-y-auto pb-8" }, ie = /* @__PURE__ */ $({
|
|
217
216
|
__name: "FmFilterableMenuOptions",
|
|
218
217
|
props: /* @__PURE__ */ W({
|
|
219
218
|
modelValue: {},
|
|
@@ -244,29 +243,29 @@ const G = { class: "sticky top-0 bg-white mb-8" }, q = { class: "overflow-y-auto
|
|
|
244
243
|
placeholder: "Filter options"
|
|
245
244
|
}, {
|
|
246
245
|
append: X(() => [
|
|
247
|
-
e.value ? (T(),
|
|
246
|
+
e.value ? (T(), x(i, {
|
|
248
247
|
key: 0,
|
|
249
248
|
variant: "tertiary",
|
|
250
249
|
"prepend-icon": "close",
|
|
251
250
|
onClick: s[0] || (s[0] = (f) => e.value = "")
|
|
252
|
-
})) :
|
|
251
|
+
})) : E("", !0)
|
|
253
252
|
]),
|
|
254
253
|
_: 1
|
|
255
254
|
}, 8, ["modelValue"])
|
|
256
255
|
]),
|
|
257
256
|
D("div", q, [
|
|
258
|
-
(T(!0), A(Y, null, Z(t.value, (f, L) => (T(),
|
|
257
|
+
(T(!0), A(Y, null, Z(t.value, (f, L) => (T(), x(p, {
|
|
259
258
|
key: L,
|
|
260
259
|
label: f.label,
|
|
261
260
|
sublabel: f.sublabel,
|
|
262
|
-
"model-value":
|
|
263
|
-
onClick: () => o.handleItemChange(
|
|
261
|
+
"model-value": V(M)(o.modelValue, f.value),
|
|
262
|
+
onClick: () => o.handleItemChange(V(M)(o.modelValue, f.value), f),
|
|
264
263
|
onVnodeMounted: (b) => {
|
|
265
264
|
var g;
|
|
266
|
-
return
|
|
265
|
+
return V(M)(o.modelValue, f.value) && ((g = b.el) == null || g.scrollIntoView({ behavior: "smooth", block: "center" }), console.log("scrollTo", b.el)), void 0;
|
|
267
266
|
}
|
|
268
267
|
}, null, 8, ["label", "sublabel", "model-value", "onClick", "onVnodeMounted"]))), 128)),
|
|
269
|
-
t.value.length ?
|
|
268
|
+
t.value.length ? E("", !0) : (T(), x(p, {
|
|
270
269
|
key: 0,
|
|
271
270
|
disabled: "",
|
|
272
271
|
label: "No options available"
|
|
@@ -277,7 +276,7 @@ const G = { class: "sticky top-0 bg-white mb-8" }, q = { class: "overflow-y-auto
|
|
|
277
276
|
}
|
|
278
277
|
});
|
|
279
278
|
export {
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
279
|
+
ie as _,
|
|
280
|
+
oe as c,
|
|
281
|
+
re as u
|
|
283
282
|
};
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { defineComponent as oe, mergeModels as
|
|
2
|
-
import {
|
|
3
|
-
import { I as k, g as L, c as ce, a as g, p as de, t as pe, b as fe, m as ve, n as be, u as ye } from "./rules-BmRGm3yv.js";
|
|
1
|
+
import { defineComponent as oe, mergeModels as z, useModel as se, computed as v, ref as P, watch as O, inject as ie, resolveComponent as b, openBlock as f, createElementBlock as y, createElementVNode as u, createVNode as h, withCtx as g, renderSlot as T, normalizeClass as V, toDisplayString as x, withDirectives as le, vModelText as ae, createCommentVNode as q, createTextVNode as ue, createBlock as W, Fragment as re, renderList as me } from "vue";
|
|
2
|
+
import { $ as I, I as k, P as L, L as ce, j as M, aB as de, t as pe, K as fe, ah as ve, az as be, ay as ye } from "./app-DntcWR3_.js";
|
|
4
3
|
import "@feedmepos/ui-library";
|
|
5
4
|
function E() {
|
|
6
5
|
return {
|
|
@@ -12,12 +11,12 @@ function H() {
|
|
|
12
11
|
return k()(d.amountAsString);
|
|
13
12
|
};
|
|
14
13
|
}
|
|
15
|
-
function
|
|
14
|
+
function Se(l) {
|
|
16
15
|
return function(t) {
|
|
17
16
|
return k()(t.amountAsString) !== !0 ? !0 : +t.amountAsString < l ? `Must be at least ${l}` : !0;
|
|
18
17
|
};
|
|
19
18
|
}
|
|
20
|
-
function
|
|
19
|
+
function Ve(l) {
|
|
21
20
|
return function(t) {
|
|
22
21
|
return k()(t.amountAsString) !== !0 ? !0 : +t.amountAsString > l ? `Must be at most ${l}` : !0;
|
|
23
22
|
};
|
|
@@ -27,20 +26,20 @@ function G(l, d = !1) {
|
|
|
27
26
|
const s = H()(r);
|
|
28
27
|
if (s != !0)
|
|
29
28
|
return d ? s : !0;
|
|
30
|
-
const
|
|
31
|
-
return ce(+r.amountAsString).precision >
|
|
29
|
+
const F = typeof l == "number" ? l : L(l, r.modelValue.measurement);
|
|
30
|
+
return ce(+r.amountAsString).precision > F ? `Cannot exceed precision more than ${M({
|
|
32
31
|
amount: 1,
|
|
33
|
-
precision:
|
|
32
|
+
precision: F
|
|
34
33
|
})}` : !0;
|
|
35
34
|
};
|
|
36
35
|
}
|
|
37
|
-
function
|
|
36
|
+
function Le(l) {
|
|
38
37
|
const d = de(l);
|
|
39
38
|
return function(r) {
|
|
40
39
|
return d(r.modelValue.amount);
|
|
41
40
|
};
|
|
42
41
|
}
|
|
43
|
-
const
|
|
42
|
+
const he = { class: "flex flex-col" }, Me = { class: "flex flex-col" }, ge = { class: "flex-1" }, xe = { class: "flex items-center gap-4" }, Fe = { class: "flex-1 flex gap-4" }, Ae = { class: "shrink-0 grow basis-2/5" }, _e = {
|
|
44
43
|
key: 0,
|
|
45
44
|
class: "text-fm-color-typo-secondary"
|
|
46
45
|
}, Pe = {
|
|
@@ -55,9 +54,9 @@ const Me = { class: "flex flex-col" }, ge = { class: "flex flex-col" }, he = { c
|
|
|
55
54
|
}, Ue = {
|
|
56
55
|
class: "flex items-center",
|
|
57
56
|
style: { "pointer-events": "none" }
|
|
58
|
-
},
|
|
57
|
+
}, $e = /* @__PURE__ */ oe({
|
|
59
58
|
__name: "FmUnitInput",
|
|
60
|
-
props: /* @__PURE__ */
|
|
59
|
+
props: /* @__PURE__ */ z({
|
|
61
60
|
modelValue: {},
|
|
62
61
|
unit: {},
|
|
63
62
|
rules: {},
|
|
@@ -104,27 +103,27 @@ const Me = { class: "flex flex-col" }, ge = { class: "flex flex-col" }, he = { c
|
|
|
104
103
|
modelValue: {},
|
|
105
104
|
modelModifiers: {}
|
|
106
105
|
}),
|
|
107
|
-
emits: /* @__PURE__ */
|
|
106
|
+
emits: /* @__PURE__ */ z(["update:amount", "update:measurement"], ["update:modelValue"]),
|
|
108
107
|
setup(l, { emit: d }) {
|
|
109
|
-
const t = l, r = d, s = se(l, "modelValue"),
|
|
108
|
+
const t = l, r = d, s = se(l, "modelValue"), F = k(), B = v(() => {
|
|
110
109
|
var n;
|
|
111
110
|
return L(t.unit, (n = s.value) == null ? void 0 : n.measurement);
|
|
112
111
|
}), c = P((() => {
|
|
113
112
|
var o;
|
|
114
113
|
const e = ((o = s.value) == null ? void 0 : o.amount) ?? I.reset(), n = be(e), i = t.formatMinimumPrecision ?? n.precision, a = ye(n, i);
|
|
115
|
-
return
|
|
114
|
+
return M(a);
|
|
116
115
|
})());
|
|
117
|
-
|
|
118
|
-
const n =
|
|
116
|
+
O(c, (e) => {
|
|
117
|
+
const n = F(e), i = t.precision ?? B.value, o = typeof t.formatMinimumPrecision == "number" && t.formatMinimumPrecision > i ? t.formatMinimumPrecision : i;
|
|
119
118
|
n == !0 && (s.value = {
|
|
120
119
|
...s.value,
|
|
121
120
|
amount: pe(+e, o)
|
|
122
121
|
}), r("update:amount", e);
|
|
123
122
|
});
|
|
124
|
-
const
|
|
123
|
+
const Z = Symbol.for("fm:form-state"), D = ie(Z, null), A = v(() => t.disabled ?? (D == null ? void 0 : D.getDisabled()) ?? !1), J = P(), R = P(!1), $ = P(!1), Q = v(() => R.value || $.value), X = v(() => {
|
|
125
124
|
var a;
|
|
126
|
-
const i = [...t.unit.measurements.filter((o) => !o.name.toLocaleLowerCase().includes("inactive")).filter((o) => o.abbrev !== t.unit.abbrev || +
|
|
127
|
-
(o) => `${o.abbrev}${
|
|
125
|
+
const i = [...t.unit.measurements.filter((o) => !o.name.toLocaleLowerCase().includes("inactive")).filter((o) => o.abbrev !== t.unit.abbrev || +M(o.conversion) != 1).groupBy(
|
|
126
|
+
(o) => `${o.abbrev}${M(o.conversion)}`
|
|
128
127
|
).values()].map((o) => o[0]).flat();
|
|
129
128
|
return [
|
|
130
129
|
{
|
|
@@ -156,7 +155,7 @@ const Me = { class: "flex flex-col" }, ge = { class: "flex flex-col" }, he = { c
|
|
|
156
155
|
}
|
|
157
156
|
}
|
|
158
157
|
});
|
|
159
|
-
|
|
158
|
+
O(U, (e, n) => {
|
|
160
159
|
var m;
|
|
161
160
|
if (!t.convertAmountOnChangeUnit)
|
|
162
161
|
return;
|
|
@@ -164,7 +163,7 @@ const Me = { class: "flex flex-col" }, ge = { class: "flex flex-col" }, he = { c
|
|
|
164
163
|
value: w,
|
|
165
164
|
precision: N
|
|
166
165
|
});
|
|
167
|
-
c.value =
|
|
166
|
+
c.value = M(S);
|
|
168
167
|
});
|
|
169
168
|
const C = v(() => {
|
|
170
169
|
var e, n;
|
|
@@ -187,32 +186,32 @@ const Me = { class: "flex flex-col" }, ge = { class: "flex flex-col" }, he = { c
|
|
|
187
186
|
function te() {
|
|
188
187
|
if (!t.stepper)
|
|
189
188
|
return;
|
|
190
|
-
const e = +c.value + +
|
|
189
|
+
const e = +c.value + +M(t.stepper);
|
|
191
190
|
c.value = j(e);
|
|
192
191
|
}
|
|
193
192
|
function ne() {
|
|
194
193
|
if (!t.stepper)
|
|
195
194
|
return;
|
|
196
|
-
const e = +c.value - +
|
|
195
|
+
const e = +c.value - +M(t.stepper);
|
|
197
196
|
c.value = j(e);
|
|
198
197
|
}
|
|
199
198
|
return (e, n) => {
|
|
200
199
|
const i = b("FmLabel"), a = b("FmIcon"), o = b("FmMenuItem"), p = b("FmMenu"), w = b("FmTooltip"), N = b("FmField"), S = b("FmFormGroup");
|
|
201
|
-
return f(), y("div",
|
|
202
|
-
u("div",
|
|
203
|
-
u("div",
|
|
204
|
-
|
|
200
|
+
return f(), y("div", he, [
|
|
201
|
+
u("div", Me, [
|
|
202
|
+
u("div", ge, [
|
|
203
|
+
h(i, {
|
|
205
204
|
label: e.label,
|
|
206
205
|
disabled: e.disabled,
|
|
207
206
|
required: e.labelMark === "required",
|
|
208
207
|
optional: e.labelMark === "optional"
|
|
209
208
|
}, null, 8, ["label", "disabled", "required", "optional"])
|
|
210
209
|
]),
|
|
211
|
-
|
|
212
|
-
default:
|
|
213
|
-
u("div",
|
|
210
|
+
h(N, { focused: Q.value }, {
|
|
211
|
+
default: g(() => [
|
|
212
|
+
u("div", xe, [
|
|
214
213
|
T(e.$slots, "prepend"),
|
|
215
|
-
u("div",
|
|
214
|
+
u("div", Fe, [
|
|
216
215
|
u("div", Ae, [
|
|
217
216
|
e.stepperOnly ? (f(), y("span", {
|
|
218
217
|
key: 0,
|
|
@@ -221,11 +220,11 @@ const Me = { class: "flex flex-col" }, ge = { class: "flex flex-col" }, he = { c
|
|
|
221
220
|
"text-fm-color-typo-primary": !A.value,
|
|
222
221
|
"text-fm-color-typo-disabled": A.value
|
|
223
222
|
})
|
|
224
|
-
},
|
|
223
|
+
}, x(c.value), 3)) : le((f(), y("input", {
|
|
225
224
|
key: 1,
|
|
226
225
|
type: "text",
|
|
227
226
|
ref_key: "inputRef",
|
|
228
|
-
ref:
|
|
227
|
+
ref: J,
|
|
229
228
|
onFocus: n[0] || (n[0] = () => R.value = !0),
|
|
230
229
|
onBlur: n[1] || (n[1] = () => R.value = !1),
|
|
231
230
|
"onUpdate:modelValue": n[2] || (n[2] = (m) => c.value = m),
|
|
@@ -238,29 +237,29 @@ const Me = { class: "flex flex-col" }, ge = { class: "flex flex-col" }, he = { c
|
|
|
238
237
|
[ae, c.value]
|
|
239
238
|
])
|
|
240
239
|
]),
|
|
241
|
-
e.separator ? (f(), y("div", _e,
|
|
240
|
+
e.separator ? (f(), y("div", _e, x(e.separator), 1)) : q("", !0),
|
|
242
241
|
u("div", {
|
|
243
242
|
class: V([e.disabled ? "text-fm-color-typo-disabled" : "text-fm-color-typo-secondary"])
|
|
244
243
|
}, [
|
|
245
|
-
|
|
246
|
-
content:
|
|
247
|
-
ue(
|
|
244
|
+
h(w, { "z-index": 51 }, {
|
|
245
|
+
content: g(() => [
|
|
246
|
+
ue(x(C.value), 1)
|
|
248
247
|
]),
|
|
249
|
-
default:
|
|
250
|
-
e.disableUnit ? (f(), y("div", Pe,
|
|
248
|
+
default: g(() => [
|
|
249
|
+
e.disableUnit ? (f(), y("div", Pe, x(C.value), 1)) : (f(), W(p, {
|
|
251
250
|
key: 1,
|
|
252
251
|
onMenuChanged: n[3] || (n[3] = (m) => $.value = m),
|
|
253
252
|
"z-index": 500,
|
|
254
253
|
placement: e.placement,
|
|
255
254
|
disabled: e.disabled
|
|
256
255
|
}, {
|
|
257
|
-
"menu-button":
|
|
256
|
+
"menu-button": g(() => [
|
|
258
257
|
u("div", Ie, [
|
|
259
|
-
u("div", ke,
|
|
260
|
-
|
|
258
|
+
u("div", ke, x(C.value), 1),
|
|
259
|
+
h(a, { name: "keyboard_arrow_down" })
|
|
261
260
|
])
|
|
262
261
|
]),
|
|
263
|
-
default:
|
|
262
|
+
default: g(() => [
|
|
264
263
|
u("div", Be, [
|
|
265
264
|
(f(!0), y(re, null, me(X.value, (m) => (f(), W(o, {
|
|
266
265
|
key: m.value ?? void 0,
|
|
@@ -282,7 +281,7 @@ const Me = { class: "flex flex-col" }, ge = { class: "flex flex-col" }, he = { c
|
|
|
282
281
|
onClick: te
|
|
283
282
|
}, [
|
|
284
283
|
u("div", Re, [
|
|
285
|
-
|
|
284
|
+
h(a, {
|
|
286
285
|
name: "expand_less",
|
|
287
286
|
size: "md"
|
|
288
287
|
})
|
|
@@ -293,7 +292,7 @@ const Me = { class: "flex flex-col" }, ge = { class: "flex flex-col" }, he = { c
|
|
|
293
292
|
onClick: ne
|
|
294
293
|
}, [
|
|
295
294
|
u("div", Ue, [
|
|
296
|
-
|
|
295
|
+
h(a, {
|
|
297
296
|
name: "expand_more",
|
|
298
297
|
size: "md"
|
|
299
298
|
})
|
|
@@ -307,7 +306,7 @@ const Me = { class: "flex flex-col" }, ge = { class: "flex flex-col" }, he = { c
|
|
|
307
306
|
_: 3
|
|
308
307
|
}, 8, ["focused"])
|
|
309
308
|
]),
|
|
310
|
-
|
|
309
|
+
h(S, {
|
|
311
310
|
class: "flex-1",
|
|
312
311
|
"model-value": { modelValue: s.value, amountAsString: String(c.value) },
|
|
313
312
|
info: e.labelInfo,
|
|
@@ -320,10 +319,10 @@ const Me = { class: "flex flex-col" }, ge = { class: "flex flex-col" }, he = { c
|
|
|
320
319
|
}
|
|
321
320
|
});
|
|
322
321
|
export {
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
322
|
+
Se as F,
|
|
323
|
+
$e as _,
|
|
324
|
+
Ve as a,
|
|
325
|
+
Le as b,
|
|
327
326
|
H as c,
|
|
328
327
|
G as d
|
|
329
328
|
};
|