@feedmepos/mf-inventory-portal 0.0.23-dev.4 → 0.0.23-dev.40
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-DReDvY0M.js → App-D8DXxTIq.js} +84 -72
- package/dist/{ApprovalView-BMZlYmRk.js → ApprovalView-BWGXkHV6.js} +25 -28
- package/dist/{BindingsDialog-Y2K4I7H7.js → BindingsDialog-D7WypDot.js} +6 -6
- package/dist/{BindingsPicker-DKBq9c37.js → BindingsPicker-DUlGwkwM.js} +8 -9
- package/dist/{BindingsTable-45v4SDfp.js → BindingsTable-BjeZYCaJ.js} +18 -22
- package/dist/ClosingDraftView-o2LEUfo8.js +1190 -0
- package/dist/{ClosingTemplateView-CKJVYSbj.js → ClosingTemplateView-Dt983Cg4.js} +271 -285
- package/dist/FmCustomAttribute.vue_vue_type_script_setup_true_lang-Dc_7IyBG.js +142 -0
- package/dist/{FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-CMEOp-0r.js → FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-wocPyZls.js} +18 -19
- package/dist/{FmUnitInput.vue_vue_type_script_setup_true_lang-C1DjyjyH.js → FmUnitInput.vue_vue_type_script_setup_true_lang-DzoEp-Pg.js} +25 -26
- package/dist/{IngredientGroupView-BuP-HGeg.js → IngredientGroupView-CIPpIpv1.js} +63 -69
- package/dist/IngredientsView-CFV3kX7Q.js +1707 -0
- package/dist/{IntegrationView-kYCaKG0o.js → IntegrationView-DkW32m-t.js} +89 -92
- package/dist/{InventoryBindingForm-BXHq4h-n.js → InventoryBindingForm-B4CBet9W.js} +1 -1
- package/dist/{InventoryBindingForm.vue_vue_type_script_setup_true_lang-CVxJ_bV3.js → InventoryBindingForm.vue_vue_type_script_setup_true_lang-DpdDVf6O.js} +112 -104
- package/dist/{InventoryBindingSummary-Bjasfc_v.js → InventoryBindingSummary-75ImZtqK.js} +1 -1
- package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-DM0C4raP.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-DfpG3Fy8.js} +1 -1
- package/dist/{PremiumBadge.vue_vue_type_script_setup_true_lang-C3O3JebE.js → PremiumBadge.vue_vue_type_script_setup_true_lang-B4d0c3nk.js} +19 -20
- package/dist/{PurchaseOrderPrintPreview-CmjkfTTS.js → PurchaseOrderPrintPreview-BYO0JcQW.js} +17 -18
- package/dist/ReceiveRequestView-cFLNExw9.js +4194 -0
- package/dist/RecipeView-CjfpaHaT.js +609 -0
- package/dist/StockView-HMtD9qar.js +1818 -0
- package/dist/{SupplierView-DAx7E7sR.js → SupplierView-Cidfe-Xm.js} +2325 -787
- package/dist/TransferDetails.vue_vue_type_script_setup_true_lang-CdU3HPBC.js +1275 -0
- package/dist/TransferTemplateView-Doxr1fXP.js +1264 -0
- package/dist/{UnitView-CQPGZ8-r.js → UnitView-C1af71aM.js} +228 -227
- package/dist/{WarehouseView-jy-RNCgy.js → WarehouseView-CviOLXfX.js} +100 -106
- package/dist/api/adjustment-template.d.ts +25 -0
- package/dist/api/bill.d.ts +240 -84
- package/dist/api/closing-draft.d.ts +6 -0
- package/dist/api/closing.d.ts +1 -0
- package/dist/api/inventory.d.ts +15 -6
- package/dist/api/netsuite.d.ts +3 -3
- package/dist/app-BE8SgDqI.js +84466 -0
- package/dist/app.d.ts +64 -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/row-action.enum.d.ts +1 -0
- package/dist/components/shell/inventory/binding-ui.vue.d.ts +3 -1
- package/dist/composable/defineDeepModel.d.ts +1 -1
- package/dist/{decimal-BAc9M88Q.js → decimal-xj3kVOP6.js} +1 -1
- package/dist/feature-CWpNYcWJ.js +946 -0
- package/dist/format-unit-display-CZ835oaL.js +1215 -0
- package/dist/index-B8IWDKYv.js +29202 -0
- package/dist/{StockView-D9no-mrA.js → index-C6SzYqK7.js} +2242 -3986
- package/dist/router/name.d.ts +2 -0
- package/dist/stock-C2xyYnS7.js +125 -0
- package/dist/stores/feature.d.ts +6 -0
- package/dist/stores/integration/netsuite.d.ts +70 -2
- package/dist/stores/inventory.d.ts +21 -12
- package/dist/stores/supplier.d.ts +1 -1
- package/dist/style.css +1 -1
- package/dist/{supplier-DJC0UZWv.js → supplier-B-7o9hg1.js} +15 -15
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/{use-inventory-binding-dialog-PEQbFRvO.js → use-inventory-binding-dialog-Dm8Ky1MH.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 +1329 -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 +1303 -0
- package/dist/views/closing-draft/ClosingDraftView.vue.d.ts +2 -0
- package/dist/views/closing-draft/components/closing-draft-action/ClosingDraftAction.vue.d.ts +22 -0
- package/dist/views/closing-draft/components/closing-draft-dialog/ClosingDraftDialog.vue.d.ts +625 -0
- package/dist/views/closing-draft/composables/use-closing-draft-actions.d.ts +25 -0
- package/dist/views/closing-draft/composables/use-closing-draft-table.d.ts +3645 -0
- package/dist/views/closing-draft/helpers/draft-status-to-class-name.helper.d.ts +1 -0
- 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 +48 -204
- package/dist/views/closing-template/composables/use-closing-template-table.d.ts +49 -205
- 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/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 +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 +40 -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 +57 -24
- package/dist/views/receive-request/composables/use-receive-request-table.d.ts +57 -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-transfer-template-items.d.ts +2 -1
- package/dist/views/transfer-template/composables/use-transfer-template-actions.d.ts +24 -12
- package/dist/views/transfer-template/composables/use-transfer-template-table.d.ts +24 -12
- package/dist/views/transfer-template/helpers/import-export.helper.d.ts +2 -1
- package/package.json +5 -4
- package/dist/FmDroppableField-8RzKjEdL.js +0 -154
- package/dist/FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-BhdcqRh-.js +0 -436
- package/dist/FmMultiselectDialog-D7YtdoyJ.js +0 -415
- package/dist/IngredientBindedItem.vue_vue_type_script_setup_true_lang-zjvFEF5C.js +0 -51
- package/dist/IngredientsView-DMRN-odY.js +0 -1613
- package/dist/ReceiveRequestView-aQZJO8sq.js +0 -4165
- package/dist/RecipeView-DXO43tFi.js +0 -597
- package/dist/TableActionableRow.vue_vue_type_script_setup_true_lang-DlNJ6kRg.js +0 -135
- package/dist/TransferDetails.vue_vue_type_script_setup_true_lang-DCA0RUfu.js +0 -1209
- package/dist/TransferTemplateView-CfxdQF1t.js +0 -1261
- package/dist/_plugin-vue_export-helper-CHgC5LLL.js +0 -9
- package/dist/app-KnSMkJBV.js +0 -33496
- package/dist/date2-CIeUqUIc.js +0 -117
- package/dist/dayjs.min-Df5jSnDJ.js +0 -282
- package/dist/defineDeepModel-BfuQAIoM.js +0 -13
- package/dist/feature-dwB4OxRQ.js +0 -86
- package/dist/format-time-from-id-BbvzyIN6.js +0 -15
- package/dist/format-unit-display-BBWblJEt.js +0 -1216
- package/dist/fuzzy-B9ryZ9VZ.js +0 -41
- package/dist/index-BN0CY3sZ.js +0 -22277
- package/dist/index-Bj1fJum-.js +0 -45
- package/dist/index-C4yL_7rR.js +0 -10545
- package/dist/netsuite-ByWOS6tI.js +0 -194
- package/dist/normalizeArguments-DP7Hrren.js +0 -1552
- package/dist/row-action.enum-PMKMRrZR.js +0 -50
- package/dist/rules-C12nWDD1.js +0 -198
- package/dist/use-template-enabled-locations-2-k9g5t8tt.js +0 -86
- package/dist/xlsx-B4XHad7S.js +0 -24004
- package/dist/xlsx.util-BSO4SHJi.js +0 -78
|
@@ -1,20 +1,24 @@
|
|
|
1
|
-
import { defineComponent as J, computed as
|
|
2
|
-
import { a as Z,
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { f as le } from "./index-BN0CY3sZ.js";
|
|
6
|
-
import { _ as se, c as re, d as de } from "./FmUnitInput.vue_vue_type_script_setup_true_lang-C1DjyjyH.js";
|
|
1
|
+
import { defineComponent as J, computed as _, reactive as Q, resolveComponent as x, openBlock as m, createElementBlock as y, createVNode as c, createElementVNode as n, toDisplayString as v, unref as l, createBlock as V, createCommentVNode as g, Fragment as R, renderList as N, withCtx as S, nextTick as X } from "vue";
|
|
2
|
+
import { a as Z, aM as ee, aN as ne, i as B, aO as oe, N as T, L as te, F as ie } from "./app-BE8SgDqI.js";
|
|
3
|
+
import { u as le } from "./use-inventory-binding-dialog-Dm8Ky1MH.js";
|
|
4
|
+
import { _ as se, c as re, d as de } from "./FmUnitInput.vue_vue_type_script_setup_true_lang-DzoEp-Pg.js";
|
|
7
5
|
import { useI18n as ae } from "@feedmepos/mf-common";
|
|
8
|
-
const ue = { class: "flex flex-col gap-24" }, me = { class: "flex flex-col gap-16" }, ce = { class: "flex items-center" }, pe = { class: "flex-1 fm-typo-en-title-sm-600" }, fe = { class: "flex flex-col" },
|
|
6
|
+
const ue = { class: "flex flex-col gap-24" }, me = { class: "flex flex-col gap-16" }, ce = { class: "flex items-center" }, pe = { class: "flex-1 fm-typo-en-title-sm-600" }, fe = { class: "flex flex-col" }, ye = { class: "flex py-8 px-12 border-b border-fm-color-neutral-gray-200 bg-fm-color-neutral-gray-100 h-[44px] items-center" }, ve = { class: "fm-typo-en-body-md-600 text-fm-color-typo-secondary" }, _e = {
|
|
9
7
|
class: "flex items-center w-full border-b border-fm-color-neutral-gray-100",
|
|
10
8
|
style: { "min-height": "48px" }
|
|
11
|
-
}, ge = { class: "flex-1 fm-typo-en-body-md-400 py-8 px-12" },
|
|
9
|
+
}, ge = { class: "flex-1 fm-typo-en-body-md-400 py-8 px-12" }, be = { class: "flex flex-col" }, xe = {
|
|
12
10
|
key: 0,
|
|
13
11
|
class: "flex gap-4 text-fm-color-system-error-300 fm-typo-en-body-sm-400"
|
|
14
|
-
}, he = { class: "w-[200px]" }, Ve = {
|
|
12
|
+
}, he = { class: "w-[200px]" }, Ve = {
|
|
13
|
+
key: 0,
|
|
14
|
+
class: "w-[52px]"
|
|
15
|
+
}, Be = { class: "flex flex-col gap-16" }, ke = { class: "flex items-center" }, Fe = { class: "flex-1 fm-typo-en-title-sm-600" }, Ie = { class: "flex flex-col" }, we = { class: "flex py-8 px-12 border-b border-fm-color-neutral-gray-200 bg-fm-color-neutral-gray-100 h-[44px] items-center" }, Ue = { class: "flex-1 fm-typo-en-body-md-600 text-fm-color-typo-secondary" }, Ee = { class: "fm-typo-en-body-md-600 text-fm-color-typo-secondary w-[150px] px-16" }, Ce = {
|
|
15
16
|
class: "flex items-center w-full",
|
|
16
17
|
style: { "min-height": "48px" }
|
|
17
|
-
}, Ae = { class: "flex-1 fm-typo-en-body-md-400 py-8 px-12" }, Re = { class: "line-clamp-1" },
|
|
18
|
+
}, Ae = { class: "flex-1 fm-typo-en-body-md-400 py-8 px-12" }, Re = { class: "line-clamp-1" }, Ne = { class: "w-[150px]" }, Se = {
|
|
19
|
+
key: 0,
|
|
20
|
+
class: "w-[52px]"
|
|
21
|
+
}, Te = { class: "flex flex-col px-12 pb-4" }, ze = /* @__PURE__ */ J({
|
|
18
22
|
__name: "InventoryBindingForm",
|
|
19
23
|
props: {
|
|
20
24
|
id: {},
|
|
@@ -22,88 +26,89 @@ const ue = { class: "flex flex-col gap-24" }, me = { class: "flex flex-col gap-1
|
|
|
22
26
|
excludeBindingId: {},
|
|
23
27
|
rules: {},
|
|
24
28
|
iframeMode: { type: Boolean },
|
|
25
|
-
disabled: { type: Boolean }
|
|
29
|
+
disabled: { type: Boolean },
|
|
30
|
+
readonly: { type: Boolean }
|
|
26
31
|
},
|
|
27
32
|
emits: ["update:modelValue", "click:pick-inventory-bindings"],
|
|
28
|
-
setup(
|
|
29
|
-
const { t:
|
|
33
|
+
setup(M, { emit: P }) {
|
|
34
|
+
const { t: p } = ae(), F = Z(), I = _(() => F.inventory.recipe ?? []), h = _(() => F.inventory.sku ?? []), s = M, f = P, w = _(() => ee({
|
|
30
35
|
bindings: s.modelValue,
|
|
31
|
-
recipes:
|
|
36
|
+
recipes: I.value.map((t) => t._id === s.id ? {
|
|
32
37
|
...t,
|
|
33
38
|
contains: s.modelValue
|
|
34
39
|
} : t),
|
|
35
|
-
skus:
|
|
36
|
-
}).inventoryBindings.filter((t) => t.error).filter((t) => t.reason ===
|
|
37
|
-
() => new Set(
|
|
40
|
+
skus: h.value
|
|
41
|
+
}).inventoryBindings.filter((t) => t.error).filter((t) => t.reason === ne.enum.circularDependency)), D = _(
|
|
42
|
+
() => new Set(w.value.map((e) => {
|
|
38
43
|
var o;
|
|
39
44
|
return (o = e.bindingPaths[0]) == null ? void 0 : o.id;
|
|
40
45
|
}))
|
|
41
|
-
), K =
|
|
46
|
+
), K = _(() => s.modelValue.filter((e) => e.type === "RECIPE")), { promptIngredientsBinding: $, promptRecipesBinding: z } = le();
|
|
42
47
|
async function G() {
|
|
43
48
|
if (s.iframeMode) {
|
|
44
|
-
|
|
49
|
+
f("click:pick-inventory-bindings", "RECIPE");
|
|
45
50
|
return;
|
|
46
51
|
}
|
|
47
52
|
z(
|
|
48
53
|
s.modelValue,
|
|
49
|
-
(e) =>
|
|
54
|
+
(e) => f("update:modelValue", e),
|
|
50
55
|
s.id ? [s.id] : []
|
|
51
56
|
);
|
|
52
57
|
}
|
|
53
|
-
const
|
|
54
|
-
async function
|
|
58
|
+
const U = _(() => s.modelValue.filter((e) => e.type === "SKU") ?? []);
|
|
59
|
+
async function L() {
|
|
55
60
|
if (s.iframeMode) {
|
|
56
|
-
|
|
61
|
+
f("click:pick-inventory-bindings", "SKU");
|
|
57
62
|
return;
|
|
58
63
|
}
|
|
59
64
|
$(
|
|
60
65
|
s.modelValue,
|
|
61
|
-
(e) =>
|
|
66
|
+
(e) => f("update:modelValue", e),
|
|
62
67
|
s.excludeBindingId,
|
|
63
68
|
s.id ? [s.id] : []
|
|
64
69
|
);
|
|
65
70
|
}
|
|
66
|
-
function
|
|
71
|
+
function j(e, o, t) {
|
|
67
72
|
const r = +o;
|
|
68
73
|
let d = t;
|
|
69
|
-
o.length > 0 && isFinite(r) ? d = t.map((a) => (a.id !== e || (a.amount = te(r)), a)) : d = t.map((a) => (a.id !== e || (a.amount = { amount: 0, precision: 0 }), a)),
|
|
74
|
+
o.length > 0 && isFinite(r) ? d = t.map((a) => (a.id !== e || (a.amount = te(r)), a)) : d = t.map((a) => (a.id !== e || (a.amount = { amount: 0, precision: 0 }), a)), f("update:modelValue", d);
|
|
70
75
|
}
|
|
71
|
-
function
|
|
76
|
+
function E(e, o) {
|
|
72
77
|
const t = o.filter((r) => r.id !== e);
|
|
73
|
-
|
|
78
|
+
f("update:modelValue", t);
|
|
74
79
|
}
|
|
75
|
-
function
|
|
80
|
+
function C(e) {
|
|
76
81
|
var t, r;
|
|
77
|
-
if (e.type !==
|
|
82
|
+
if (e.type !== ie.enum.SKU)
|
|
78
83
|
throw new Error("Non-SKU binding does not have unit");
|
|
79
|
-
if (!((t =
|
|
84
|
+
if (!((t = h.value.find((d) => d._id === e.id)) == null ? void 0 : t.unit))
|
|
80
85
|
throw new Error(`Cannot find ingredient: ${e.id}`);
|
|
81
|
-
return (r =
|
|
86
|
+
return (r = h.value.find((d) => d._id === e.id)) == null ? void 0 : r.unit;
|
|
82
87
|
}
|
|
83
|
-
function
|
|
88
|
+
function O(e) {
|
|
84
89
|
return { amount: e.amount, measurement: e.measurement };
|
|
85
90
|
}
|
|
86
|
-
function
|
|
91
|
+
function Y(e, o, t) {
|
|
87
92
|
const r = t.map((d) => d.id !== e ? d : {
|
|
88
93
|
...d,
|
|
89
94
|
amount: o.amount,
|
|
90
95
|
measurement: o.measurement
|
|
91
96
|
});
|
|
92
|
-
|
|
97
|
+
f("update:modelValue", r);
|
|
93
98
|
}
|
|
94
|
-
const
|
|
95
|
-
function
|
|
96
|
-
return
|
|
99
|
+
const A = Q({});
|
|
100
|
+
function W(e) {
|
|
101
|
+
return A[e.id] ?? {
|
|
97
102
|
modelValue: {
|
|
98
103
|
amount: e.amount,
|
|
99
104
|
measurement: e.measurement
|
|
100
105
|
},
|
|
101
|
-
amountAsString:
|
|
106
|
+
amountAsString: B(e.amount)
|
|
102
107
|
};
|
|
103
108
|
}
|
|
104
|
-
function
|
|
109
|
+
function q(e, o) {
|
|
105
110
|
X(() => {
|
|
106
|
-
|
|
111
|
+
A[e.id] = {
|
|
107
112
|
modelValue: {
|
|
108
113
|
amount: e.amount,
|
|
109
114
|
measurement: e.measurement
|
|
@@ -113,73 +118,74 @@ const ue = { class: "flex flex-col gap-24" }, me = { class: "flex flex-col gap-1
|
|
|
113
118
|
});
|
|
114
119
|
}
|
|
115
120
|
return (e, o) => {
|
|
116
|
-
const t =
|
|
117
|
-
return
|
|
118
|
-
|
|
121
|
+
const t = x("FmFormGroup"), r = x("FmButton"), d = x("FmIcon"), a = x("FmTextField"), H = x("FmTooltip");
|
|
122
|
+
return m(), y("div", ue, [
|
|
123
|
+
c(t, {
|
|
119
124
|
disabled: e.disabled,
|
|
120
125
|
"model-value": e.modelValue,
|
|
121
126
|
rules: e.rules
|
|
122
127
|
}, null, 8, ["disabled", "model-value", "rules"]),
|
|
123
128
|
n("div", me, [
|
|
124
129
|
n("div", ce, [
|
|
125
|
-
n("div", pe, v(l(
|
|
126
|
-
m(r, {
|
|
130
|
+
n("div", pe, v(l(p)("inventory.inventoryBindings.recipe")), 1),
|
|
131
|
+
e.readonly ? g("", !0) : (m(), V(r, {
|
|
132
|
+
key: 0,
|
|
127
133
|
variant: "secondary",
|
|
128
134
|
"text-color": "primary",
|
|
129
135
|
"border-color": "primary",
|
|
130
|
-
label: l(
|
|
136
|
+
label: l(p)("inventory.inventoryBindings.linkRecipe"),
|
|
131
137
|
"prepend-icon": "link",
|
|
132
138
|
onClick: G
|
|
133
|
-
}, null, 8, ["label"])
|
|
139
|
+
}, null, 8, ["label"]))
|
|
134
140
|
]),
|
|
135
141
|
n("div", fe, [
|
|
136
|
-
n("div",
|
|
137
|
-
n("div",
|
|
142
|
+
n("div", ye, [
|
|
143
|
+
n("div", ve, v(l(p)("inventory.inventoryBindings.recipe")), 1),
|
|
138
144
|
o[0] || (o[0] = n("div", { class: "w-[200px]" }, null, -1)),
|
|
139
145
|
o[1] || (o[1] = n("div", { class: "w-[52px]" }, null, -1))
|
|
140
146
|
]),
|
|
141
|
-
(
|
|
147
|
+
(m(!0), y(R, null, N(K.value, (i) => (m(), V(t, {
|
|
142
148
|
key: i.id,
|
|
143
149
|
disabled: e.disabled,
|
|
144
|
-
modelValue: +l(
|
|
145
|
-
rules: [l(oe)(0), l(
|
|
150
|
+
modelValue: +l(B)(i.amount ?? { amount: 1, precision: 0 }),
|
|
151
|
+
rules: [l(oe)(0), l(T)(0)]
|
|
146
152
|
}, {
|
|
147
|
-
default: S(({ invalid:
|
|
148
|
-
var
|
|
153
|
+
default: S(({ invalid: k }) => {
|
|
154
|
+
var b;
|
|
149
155
|
return [
|
|
150
156
|
n("div", _e, [
|
|
151
157
|
n("div", ge, [
|
|
152
|
-
n("div",
|
|
153
|
-
n("div", null, v((
|
|
154
|
-
D.value.has(i.id) ? (
|
|
155
|
-
|
|
158
|
+
n("div", be, [
|
|
159
|
+
n("div", null, v((b = I.value.find((u) => u._id === i.id)) == null ? void 0 : b.name), 1),
|
|
160
|
+
D.value.has(i.id) ? (m(), y("div", xe, [
|
|
161
|
+
c(d, {
|
|
156
162
|
name: "error",
|
|
157
163
|
color: "system-error-400",
|
|
158
164
|
size: "sm"
|
|
159
165
|
}),
|
|
160
166
|
o[2] || (o[2] = n("div", null, "There is circular linking in your binding.", -1))
|
|
161
|
-
])) :
|
|
167
|
+
])) : g("", !0)
|
|
162
168
|
])
|
|
163
169
|
]),
|
|
164
170
|
n("div", he, [
|
|
165
|
-
|
|
171
|
+
c(a, {
|
|
166
172
|
class: "w-full",
|
|
167
173
|
disabled: e.disabled,
|
|
168
|
-
modelValue: +l(
|
|
169
|
-
"onUpdate:modelValue": (u) =>
|
|
170
|
-
invalid:
|
|
174
|
+
modelValue: +l(B)(i.amount ?? { amount: 1, precision: 0 }),
|
|
175
|
+
"onUpdate:modelValue": (u) => j(i.id, u, e.modelValue),
|
|
176
|
+
invalid: k
|
|
171
177
|
}, null, 8, ["disabled", "modelValue", "onUpdate:modelValue", "invalid"])
|
|
172
178
|
]),
|
|
173
|
-
|
|
174
|
-
|
|
179
|
+
e.readonly ? g("", !0) : (m(), y("div", Ve, [
|
|
180
|
+
c(r, {
|
|
175
181
|
disabled: e.disabled,
|
|
176
182
|
type: "button",
|
|
177
183
|
variant: "plain",
|
|
178
184
|
icon: "delete",
|
|
179
185
|
"icon-color": "#000000",
|
|
180
|
-
onClick: (u) =>
|
|
186
|
+
onClick: (u) => E(i.id, e.modelValue)
|
|
181
187
|
}, null, 8, ["disabled", "onClick"])
|
|
182
|
-
])
|
|
188
|
+
]))
|
|
183
189
|
])
|
|
184
190
|
];
|
|
185
191
|
}),
|
|
@@ -189,79 +195,81 @@ const ue = { class: "flex flex-col gap-24" }, me = { class: "flex flex-col gap-1
|
|
|
189
195
|
]),
|
|
190
196
|
n("div", Be, [
|
|
191
197
|
n("div", ke, [
|
|
192
|
-
n("div", Fe, v(l(
|
|
193
|
-
m(r, {
|
|
198
|
+
n("div", Fe, v(l(p)("inventory.inventoryBindings.ingredient")), 1),
|
|
199
|
+
e.readonly ? g("", !0) : (m(), V(r, {
|
|
200
|
+
key: 0,
|
|
194
201
|
variant: "secondary",
|
|
195
202
|
"text-color": "primary",
|
|
196
203
|
"border-color": "primary",
|
|
197
|
-
label: l(
|
|
204
|
+
label: l(p)("inventory.inventoryBindings.linkIngredient"),
|
|
198
205
|
"prepend-icon": "link",
|
|
199
|
-
onClick:
|
|
200
|
-
}, null, 8, ["label"])
|
|
206
|
+
onClick: L
|
|
207
|
+
}, null, 8, ["label"]))
|
|
201
208
|
]),
|
|
202
209
|
n("div", Ie, [
|
|
203
210
|
n("div", we, [
|
|
204
|
-
n("div", Ue, v(l(
|
|
205
|
-
n("div", Ee, v(l(
|
|
211
|
+
n("div", Ue, v(l(p)("inventory.inventoryBindings.ingredient")), 1),
|
|
212
|
+
n("div", Ee, v(l(p)("inventory.inventoryBindings.amount")), 1),
|
|
206
213
|
o[3] || (o[3] = n("div", { class: "w-[52px]" }, null, -1))
|
|
207
214
|
]),
|
|
208
|
-
(
|
|
209
|
-
var
|
|
210
|
-
return
|
|
215
|
+
(m(!0), y(R, null, N(U.value, (i, k) => {
|
|
216
|
+
var b;
|
|
217
|
+
return m(), y("div", {
|
|
211
218
|
key: i.id,
|
|
212
219
|
class: "flex flex-col border-b border-fm-color-neutral-gray-100"
|
|
213
220
|
}, [
|
|
214
221
|
n("div", Ce, [
|
|
215
222
|
n("div", Ae, [
|
|
216
|
-
n("span", Re, v((
|
|
217
|
-
|
|
223
|
+
n("span", Re, v((b = h.value.find((u) => u._id === i.id)) == null ? void 0 : b.name), 1),
|
|
224
|
+
w.value.length ? (m(), V(H, {
|
|
218
225
|
key: 0,
|
|
219
226
|
variant: "plain",
|
|
220
227
|
placement: "bottom",
|
|
221
|
-
content: l(
|
|
228
|
+
content: l(p)("inventory.inventoryBindings.invalidWarning"),
|
|
222
229
|
"hide-arrow": !0,
|
|
223
230
|
"z-index": 50
|
|
224
231
|
}, {
|
|
225
232
|
default: S(() => [
|
|
226
|
-
|
|
233
|
+
c(d, {
|
|
227
234
|
name: "error",
|
|
228
235
|
size: "sm",
|
|
229
236
|
color: "#ff3b30"
|
|
230
237
|
})
|
|
231
238
|
]),
|
|
232
239
|
_: 1
|
|
233
|
-
}, 8, ["content"])) :
|
|
240
|
+
}, 8, ["content"])) : g("", !0)
|
|
234
241
|
]),
|
|
235
|
-
n("div",
|
|
236
|
-
|
|
237
|
-
"model-value":
|
|
238
|
-
"onUpdate:modelValue": (u) =>
|
|
239
|
-
"onUpdate:amount": (u) =>
|
|
240
|
-
unit:
|
|
241
|
-
placement:
|
|
242
|
-
"convert-amount-on-change-unit": ""
|
|
243
|
-
|
|
242
|
+
n("div", Ne, [
|
|
243
|
+
c(se, {
|
|
244
|
+
"model-value": O(i),
|
|
245
|
+
"onUpdate:modelValue": (u) => Y(i.id, u, e.modelValue),
|
|
246
|
+
"onUpdate:amount": (u) => q(i, u),
|
|
247
|
+
unit: C(i),
|
|
248
|
+
placement: k === U.value.length - 1 ? "top" : "bottom",
|
|
249
|
+
"convert-amount-on-change-unit": "",
|
|
250
|
+
disabled: e.readonly
|
|
251
|
+
}, null, 8, ["model-value", "onUpdate:modelValue", "onUpdate:amount", "unit", "placement", "disabled"])
|
|
244
252
|
]),
|
|
245
|
-
|
|
246
|
-
|
|
253
|
+
e.readonly ? g("", !0) : (m(), y("div", Se, [
|
|
254
|
+
c(r, {
|
|
247
255
|
disabled: e.disabled,
|
|
248
256
|
type: "button",
|
|
249
257
|
variant: "tertiary",
|
|
250
258
|
icon: "delete",
|
|
251
|
-
onClick: (u) =>
|
|
259
|
+
onClick: (u) => E(i.id, e.modelValue)
|
|
252
260
|
}, null, 8, ["disabled", "onClick"])
|
|
253
|
-
])
|
|
261
|
+
]))
|
|
254
262
|
]),
|
|
255
|
-
n("div",
|
|
256
|
-
|
|
257
|
-
modelValue: +l(
|
|
258
|
-
rules: [l(
|
|
263
|
+
n("div", Te, [
|
|
264
|
+
c(t, {
|
|
265
|
+
modelValue: +l(B)(i.amount ?? { amount: 1, precision: 0 }),
|
|
266
|
+
rules: [l(T)(0)]
|
|
259
267
|
}, null, 8, ["modelValue", "rules"]),
|
|
260
|
-
|
|
261
|
-
modelValue:
|
|
268
|
+
c(t, {
|
|
269
|
+
modelValue: W(i),
|
|
262
270
|
rules: [
|
|
263
271
|
l(re)(),
|
|
264
|
-
l(de)(
|
|
272
|
+
l(de)(C(i))
|
|
265
273
|
]
|
|
266
274
|
}, null, 8, ["modelValue", "rules"])
|
|
267
275
|
])
|
|
@@ -274,5 +282,5 @@ const ue = { class: "flex flex-col gap-24" }, me = { class: "flex flex-col gap-1
|
|
|
274
282
|
}
|
|
275
283
|
});
|
|
276
284
|
export {
|
|
277
|
-
|
|
285
|
+
ze as _
|
|
278
286
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { defineComponent as s, resolveComponent as c, openBlock as m, createBlock as d, h as g } from "vue";
|
|
2
2
|
import { useI18n as p } from "@feedmepos/mf-common";
|
|
3
3
|
import { components as u } from "@feedmepos/ui-library";
|
|
4
|
-
import { F as r } from "./app-
|
|
4
|
+
import { F as r } from "./app-BE8SgDqI.js";
|
|
5
5
|
const B = /* @__PURE__ */ s({
|
|
6
6
|
__name: "InventoryBindingSummary",
|
|
7
7
|
props: {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent as y, computed as V, ref as w, watch as h, resolveComponent as u, openBlock as F, createBlock as A, withCtx as s, createVNode as g, createElementVNode as k, normalizeClass as K } from "vue";
|
|
2
|
-
import {
|
|
2
|
+
import { L as d } from "./app-BE8SgDqI.js";
|
|
3
3
|
const _ = ["value", "disabled"], D = /* @__PURE__ */ y({
|
|
4
4
|
__name: "NumberPrecisionInput",
|
|
5
5
|
props: {
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { j as _, u as h } from "./app-KnSMkJBV.js";
|
|
1
|
+
import { av as d, aw as f, X as _, u as h } from "./app-BE8SgDqI.js";
|
|
3
2
|
import { useCoreStore as F } from "@feedmepos/mf-common";
|
|
4
|
-
import { ref as
|
|
3
|
+
import { ref as v, defineComponent as y, resolveComponent as p, openBlock as k, createElementBlock as g, renderSlot as S, createVNode as l, withCtx as x } from "vue";
|
|
5
4
|
function w(e, t) {
|
|
6
5
|
return t.map((r) => typeof r.selector == "function" ? r.selector(e) : e[r.selector]);
|
|
7
6
|
}
|
|
@@ -9,15 +8,15 @@ function I(e, t) {
|
|
|
9
8
|
const r = t.map((o) => o.name), n = e.map((o) => w(o, t));
|
|
10
9
|
return d.aoa_to_sheet([r, ...n]);
|
|
11
10
|
}
|
|
12
|
-
async function
|
|
11
|
+
async function A(e, t) {
|
|
13
12
|
const r = d.book_new();
|
|
14
13
|
for (const n of e) {
|
|
15
14
|
const o = I(
|
|
16
15
|
n.data,
|
|
17
|
-
n.columns.map((
|
|
18
|
-
name:
|
|
19
|
-
selector:
|
|
20
|
-
} :
|
|
16
|
+
n.columns.map((a) => typeof a == "string" ? {
|
|
17
|
+
name: a,
|
|
18
|
+
selector: a
|
|
19
|
+
} : a)
|
|
21
20
|
);
|
|
22
21
|
d.book_append_sheet(r, o, n.name);
|
|
23
22
|
}
|
|
@@ -27,8 +26,8 @@ const m = _((e, t) => {
|
|
|
27
26
|
const r = h(), n = F();
|
|
28
27
|
return {
|
|
29
28
|
async getInventoryForecast() {
|
|
30
|
-
var
|
|
31
|
-
const o = ((
|
|
29
|
+
var s;
|
|
30
|
+
const o = ((s = n.currentBusiness.value) == null ? void 0 : s._id) ?? "", a = r.currentLocationId ?? "", i = `${e.dataBackendUrl}/${o}/${a}/inventory-forecast`;
|
|
32
31
|
try {
|
|
33
32
|
return await t.get(i);
|
|
34
33
|
} catch {
|
|
@@ -37,9 +36,9 @@ const m = _((e, t) => {
|
|
|
37
36
|
},
|
|
38
37
|
async getPurchaseOrderForecast(o) {
|
|
39
38
|
var u;
|
|
40
|
-
const
|
|
39
|
+
const a = ((u = n.currentBusiness.value) == null ? void 0 : u._id) ?? "", i = r.currentLocationId ?? "", s = `${e.dataBackendUrl}/${a}/${i}/purchase-order-forecast?days=${o}`;
|
|
41
40
|
try {
|
|
42
|
-
return await t.get(
|
|
41
|
+
return await t.get(s);
|
|
43
42
|
} catch {
|
|
44
43
|
return { skus: [] };
|
|
45
44
|
}
|
|
@@ -52,8 +51,8 @@ function O() {
|
|
|
52
51
|
purchaseOrderForecast: { skus: [] }
|
|
53
52
|
};
|
|
54
53
|
}
|
|
55
|
-
const c =
|
|
56
|
-
function
|
|
54
|
+
const c = v(O());
|
|
55
|
+
function C() {
|
|
57
56
|
return {
|
|
58
57
|
// state
|
|
59
58
|
get inventoryForecast() {
|
|
@@ -79,11 +78,11 @@ function D() {
|
|
|
79
78
|
}
|
|
80
79
|
};
|
|
81
80
|
}
|
|
82
|
-
function
|
|
81
|
+
function D(e) {
|
|
83
82
|
let t = e.substring(e.indexOf("_") + 1);
|
|
84
83
|
return t.includes("_") && (t = t.substring(0, t.lastIndexOf("_"))), Number.isNaN(Date.parse(t)) ? null : new Date(t).toISOString();
|
|
85
84
|
}
|
|
86
|
-
const b = { class: "flex items-center gap-8" }, B = "Experience enhanced inventory features with premium plan.",
|
|
85
|
+
const b = { class: "flex items-center gap-8" }, B = "Experience enhanced inventory features with premium plan.", N = /* @__PURE__ */ y({
|
|
87
86
|
__name: "PremiumBadge",
|
|
88
87
|
props: {
|
|
89
88
|
zIndex: {}
|
|
@@ -109,8 +108,8 @@ const b = { class: "flex items-center gap-8" }, B = "Experience enhanced invento
|
|
|
109
108
|
}
|
|
110
109
|
});
|
|
111
110
|
export {
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
111
|
+
N as _,
|
|
112
|
+
A as e,
|
|
113
|
+
D as i,
|
|
114
|
+
C as u
|
|
116
115
|
};
|
package/dist/{PurchaseOrderPrintPreview-CmjkfTTS.js → PurchaseOrderPrintPreview-BYO0JcQW.js}
RENAMED
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import { defineComponent as h, computed as x, ref as m, onMounted as f, openBlock as n, createElementBlock as u, createElementVNode as t, toDisplayString as l, normalizeStyle as g, createTextVNode as i, Fragment as
|
|
1
|
+
import { defineComponent as h, computed as x, ref as m, onMounted as f, openBlock as n, createElementBlock as u, createElementVNode as t, toDisplayString as l, normalizeStyle as g, createTextVNode as i, Fragment as d, createCommentVNode as p, renderList as v, normalizeClass as w } from "vue";
|
|
2
2
|
import { useRoute as k } from "vue-router";
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
const P = { class: "purchase-box" }, R = { valign: "bottom" }, A = { class: "text-right" }, N = { class: "header" }, E = { class: "sub-header" }, O = { class: "caption" }, S = { class: "address" }, D = { class: "text-right" }, T = { class: "sub-header" }, q = { class: "address" }, F = { class: "purchase-body" }, L = { class: "text-left" }, U = { class: "text-left" }, V = { class: "text-right" }, z = { style: { "padding-top": "30px" } }, B = { valign: "bottom" }, H = { class: "header" }, I = { class: "caption" }, M = {
|
|
3
|
+
import { aq as y, _ as C } from "./app-BE8SgDqI.js";
|
|
4
|
+
const P = { class: "purchase-box" }, R = { valign: "bottom" }, A = { class: "text-right" }, N = { class: "header" }, E = { class: "sub-header" }, O = { class: "caption" }, S = { class: "address" }, q = { class: "text-right" }, D = { class: "sub-header" }, T = { class: "address" }, F = { class: "purchase-body" }, L = { class: "text-left" }, U = { class: "text-left" }, V = { class: "text-right" }, z = { style: { "padding-top": "30px" } }, B = { valign: "bottom" }, H = { class: "header" }, I = { class: "caption" }, M = {
|
|
6
5
|
class: "text-left",
|
|
7
6
|
style: { width: "20%" }
|
|
8
7
|
}, J = { class: "text-left" }, Q = {
|
|
@@ -52,7 +51,7 @@ const P = { class: "purchase-box" }, R = { valign: "bottom" }, A = { class: "tex
|
|
|
52
51
|
t("div", S, [
|
|
53
52
|
i(l(s.value.supplier.line1), 1),
|
|
54
53
|
e[2] || (e[2] = t("br", null, null, -1)),
|
|
55
|
-
s.value.supplier.line2 ? (n(), u(
|
|
54
|
+
s.value.supplier.line2 ? (n(), u(d, { key: 0 }, [
|
|
56
55
|
i(l(s.value.supplier.line2), 1),
|
|
57
56
|
e[1] || (e[1] = t("br", null, null, -1))
|
|
58
57
|
], 64)) : p("", !0),
|
|
@@ -62,13 +61,13 @@ const P = { class: "purchase-box" }, R = { valign: "bottom" }, A = { class: "tex
|
|
|
62
61
|
e[4] || (e[4] = t("br", null, null, -1))
|
|
63
62
|
])
|
|
64
63
|
]),
|
|
65
|
-
t("td",
|
|
64
|
+
t("td", q, [
|
|
66
65
|
e[10] || (e[10] = t("div", { class: "header" }, "Delivery To", -1)),
|
|
67
|
-
t("div",
|
|
68
|
-
t("div",
|
|
66
|
+
t("div", D, l(s.value.buyer.name), 1),
|
|
67
|
+
t("div", T, [
|
|
69
68
|
i(l(s.value.buyer.line1), 1),
|
|
70
69
|
e[7] || (e[7] = t("br", null, null, -1)),
|
|
71
|
-
s.value.buyer.line2 ? (n(), u(
|
|
70
|
+
s.value.buyer.line2 ? (n(), u(d, { key: 0 }, [
|
|
72
71
|
i(l(s.value.buyer.line2), 1),
|
|
73
72
|
e[6] || (e[6] = t("br", null, null, -1))
|
|
74
73
|
], 64)) : p("", !0),
|
|
@@ -100,7 +99,7 @@ const P = { class: "purchase-box" }, R = { valign: "bottom" }, A = { class: "tex
|
|
|
100
99
|
])
|
|
101
100
|
], -1)),
|
|
102
101
|
t("tbody", null, [
|
|
103
|
-
(n(!0), u(
|
|
102
|
+
(n(!0), u(d, null, v(s.value.items, (r, a) => (n(), u("tr", { key: a }, [
|
|
104
103
|
t("td", L, l(r.code), 1),
|
|
105
104
|
t("td", U, l(r.description), 1),
|
|
106
105
|
t("td", {
|
|
@@ -120,7 +119,7 @@ const P = { class: "purchase-box" }, R = { valign: "bottom" }, A = { class: "tex
|
|
|
120
119
|
t("div", z, [
|
|
121
120
|
e[12] || (e[12] = t("hr", null, null, -1)),
|
|
122
121
|
e[13] || (e[13] = i(" Delivery History: ")),
|
|
123
|
-
(n(!0), u(
|
|
122
|
+
(n(!0), u(d, null, v(s.value.deliveryOrders, (r, a) => (n(), u("div", {
|
|
124
123
|
key: a,
|
|
125
124
|
style: { padding: "10px 30px" }
|
|
126
125
|
}, [
|
|
@@ -136,11 +135,11 @@ const P = { class: "purchase-box" }, R = { valign: "bottom" }, A = { class: "tex
|
|
|
136
135
|
t("div", null, [
|
|
137
136
|
t("table", null, [
|
|
138
137
|
t("tbody", null, [
|
|
139
|
-
(n(!0), u(
|
|
140
|
-
t("td", M, l(
|
|
141
|
-
t("td", J, l(
|
|
142
|
-
t("td", Q, l(
|
|
143
|
-
t("td", j, l(
|
|
138
|
+
(n(!0), u(d, null, v(r.items, (o, _) => (n(), u("tr", { key: _ }, [
|
|
139
|
+
t("td", M, l(o.code), 1),
|
|
140
|
+
t("td", J, l(o.description), 1),
|
|
141
|
+
t("td", Q, l(o.quantity), 1),
|
|
142
|
+
t("td", j, l(o.unit), 1)
|
|
144
143
|
]))), 128))
|
|
145
144
|
])
|
|
146
145
|
])
|
|
@@ -149,7 +148,7 @@ const P = { class: "purchase-box" }, R = { valign: "bottom" }, A = { class: "tex
|
|
|
149
148
|
])
|
|
150
149
|
]));
|
|
151
150
|
}
|
|
152
|
-
}),
|
|
151
|
+
}), $ = /* @__PURE__ */ C(G, [["__scopeId", "data-v-92a03d5c"]]);
|
|
153
152
|
export {
|
|
154
|
-
|
|
153
|
+
$ as default
|
|
155
154
|
};
|