@feedmepos/mf-inventory-portal 0.0.22-dev.9 → 0.0.23-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-Y3Ez8Rjf.js +255 -0
- package/dist/ApprovalView-BUU1G4Q2.js +141 -0
- package/dist/{BindingsDialog-GzX9Bo2g.js → BindingsDialog-8wc4Q0JQ.js} +13 -12
- package/dist/{BindingsPicker-SbOetc0-.js → BindingsPicker-DGWN1LQc.js} +19 -18
- package/dist/{BindingsTable-CAcE5y8U.js → BindingsTable-7NJP2jT6.js} +20 -16
- package/dist/ClosingTemplateView-9s7vmwaT.js +1833 -0
- package/dist/FmDroppableField-8RzKjEdL.js +154 -0
- package/dist/FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-B4DDh9-a.js +267 -0
- package/dist/FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-5DINn0ZB.js +436 -0
- package/dist/FmMultiselectDialog-7hok9sJP.js +411 -0
- package/dist/FmUnitInput.vue_vue_type_script_setup_true_lang-CxR1FCft.js +326 -0
- package/dist/IngredientBindedItem.vue_vue_type_script_setup_true_lang-FQ0HjuL3.js +51 -0
- package/dist/IngredientGroupView-C3maHTCg.js +610 -0
- package/dist/IngredientsView-DCR3IBkR.js +1613 -0
- package/dist/IntegrationView-gO4h89Wj.js +1227 -0
- package/dist/InventoryBindingForm-dh3GeyG-.js +4 -0
- package/dist/InventoryBindingForm.vue_vue_type_script_setup_true_lang-CJuo3i7W.js +278 -0
- package/dist/InventoryBindingSummary-BPoPcEoe.js +75 -0
- package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-1FCwvO8A.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-olm8sZKt.js} +1 -1
- package/dist/PremiumBadge.vue_vue_type_script_setup_true_lang-BezTV43V.js +116 -0
- package/dist/{PurchaseOrderPrintPreview-5HIWHR_f.js → PurchaseOrderPrintPreview-Dix_fIoo.js} +14 -13
- package/dist/ReceiveRequestView-DdPiYb2P.js +4082 -0
- package/dist/RecipeView-C4-a4IEW.js +597 -0
- package/dist/Standalone.vue.d.ts +2 -0
- package/dist/StockView-Du2txrIP.js +7778 -0
- package/dist/SupplierView-D_09FbQh.js +1474 -0
- package/dist/TransferDetails.vue_vue_type_script_setup_true_lang-C9MOos--.js +1144 -0
- package/dist/TransferTemplateView-j3CRy6Lc.js +1262 -0
- package/dist/{UnitView-BpU0Yk7X.js → UnitView-BXw2Vwq1.js} +30 -29
- package/dist/{WarehouseView-DqxWgogc.js → WarehouseView-CKamiETC.js} +205 -202
- package/dist/_plugin-vue_export-helper-CHgC5LLL.js +9 -0
- package/dist/api/bill.d.ts +86 -240
- package/dist/api/closing-template.d.ts +6 -4
- package/dist/api/inventory.d.ts +281 -88
- package/dist/api/netsuite.d.ts +32 -1
- package/dist/api/purchase-order-template.d.ts +4 -2
- package/dist/api/supplier.d.ts +1 -0
- package/dist/app-GUbzqEtW.js +33456 -0
- package/dist/app.d.ts +259 -6
- package/dist/app.js +8 -7
- package/dist/array-hChJVZLE.js +43 -0
- package/dist/components/FmFilterableMenuOptions.vue.d.ts +54 -0
- package/dist/components/FmMinMaxInputRules.d.ts +2 -0
- package/dist/components/FmMultiselectDialog.vue.d.ts +3 -9
- package/dist/components/FmMultiselectDialogProps.d.ts +0 -2
- package/dist/components/FmUnitInputRules.d.ts +2 -0
- package/dist/components/inventory-binding/InventoryBinding.vue.d.ts +5 -5
- package/dist/components/map/GoogleMap.vue.d.ts +4 -4
- package/dist/components/shell/inventory/binding-dialog.vue.d.ts +2 -2
- package/dist/components/shell/inventory/binding-ui.vue.d.ts +2 -2
- package/dist/date2-CLE9fB2R.js +117 -0
- package/dist/dayjs.min-CY1d38w7.js +282 -0
- package/dist/{decimal-DWbwRn_v.js → decimal-SIjO6Mjw.js} +1 -1
- package/dist/defineDeepModel-l40rX7kr.js +13 -0
- package/dist/extensions/array.d.ts +1 -0
- package/dist/feature-BXruKUhX.js +78 -0
- package/dist/{format-time-from-id-BnmaRuab.js → format-time-from-id-CcFsBXmk.js} +1 -1
- package/dist/format-unit-display-DEKg8cJm.js +1198 -0
- package/dist/fuzzy-CVOV9zJc.js +41 -0
- package/dist/googlemap-Dm8ERVai.js +97 -0
- package/dist/helper/rules.d.ts +7 -0
- package/dist/helper/rules.spec.d.ts +1 -0
- package/dist/helper/xlsx.util.d.ts +7 -0
- package/dist/index-BX5KZXhI.js +22279 -0
- package/dist/index-CVsyOEb1.js +10545 -0
- package/dist/index-m9e9nYfl.js +45 -0
- package/dist/netsuite-DAKRv7zr.js +146 -0
- package/dist/normalizeArguments-DP7Hrren.js +1552 -0
- package/dist/router/name.d.ts +1 -0
- package/dist/rules-DlnN8IP3.js +198 -0
- package/dist/stores/integration/foodmarkethub.d.ts +391 -0
- package/dist/stores/integration/index.d.ts +7 -0
- package/dist/stores/integration/netsuite.d.ts +102 -0
- package/dist/stores/inventory.d.ts +295 -9
- package/dist/stores/location.d.ts +508 -485
- package/dist/stores/supplier.d.ts +124 -4
- package/dist/stores/warehouse.d.ts +7 -4
- package/dist/style.css +1 -1
- package/dist/supplier-B21WlSAM.js +77 -0
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/use-inventory-binding-dialog-D3x6xj2O.js +95 -0
- package/dist/{use-template-enabled-locations-2-ClBq9FjN.js → use-template-enabled-locations-2-z-b-UXef.js} +9 -8
- package/dist/useTabStorage-BkIVScW_.js +25 -0
- package/dist/views/closing-template/closing-template-import/ClosingTemplateImport.vue.d.ts +2 -0
- package/dist/views/closing-template/closing-template-import/ClosingTemplateImportItem.vue.d.ts +12 -0
- package/dist/views/closing-template/closing-template-import/ClosingTemplateImportItemProps.d.ts +7 -0
- package/dist/views/closing-template/components/closing-template-form/composables/use-closing-template-items.d.ts +1 -1
- package/dist/views/closing-template/composables/use-closing-template-actions.d.ts +877 -1002
- package/dist/views/closing-template/composables/use-closing-template-table.d.ts +882 -1013
- package/dist/views/closing-template/helpers/import-export.helper.d.ts +58 -0
- package/dist/views/ingredient-group/IngredientGroupView.vue.d.ts +3 -0
- package/dist/views/ingredient-group/components/ingredient-group-dialog/IngredientGroupDialog.vue.d.ts +31 -0
- package/dist/views/ingredient-group/components/ingredient-group-dialog/IngredientGroupDialogProps.d.ts +12 -0
- package/dist/views/ingredient-group/components/ingredient-group-form/IngredientGroupForm.vue.d.ts +20 -0
- package/dist/views/ingredient-group/components/ingredient-group-form/IngredientGroupFormProps.d.ts +12 -0
- package/dist/views/ingredient-group/composables/use-ingredient-group-actions.d.ts +24 -0
- package/dist/views/ingredient-group/composables/use-ingredient-group-table.d.ts +215 -0
- package/dist/views/ingredients/components/convert/ConvertForm.vue.d.ts +2 -2
- package/dist/views/ingredients/components/ingredient-form/IngredientForm.vue.d.ts +2 -2
- package/dist/views/ingredients/components/inventory-binding/InventoryBindingForm.vue.d.ts +5 -5
- package/dist/views/ingredients/composables/use-ingredient-form.d.ts +2 -2
- package/dist/views/ingredients/composables/use-ingredient-table.d.ts +1 -1
- package/dist/views/integration/FoodMarketHub.vue.d.ts +2 -0
- package/dist/views/integration/NetSuite.vue.d.ts +2 -0
- package/dist/views/integration/components/ApplyProductDialog.vue.d.ts +7 -7
- package/dist/views/integration/components/ApplyProductDialogV4.vue.d.ts +7 -7
- package/dist/views/receive-request/components/transfer-details/TransferDetailsProps.d.ts +1 -0
- package/dist/views/receive-request/components/transfer-form/NetSuiteField.vue.d.ts +49 -0
- package/dist/views/receive-request/components/transfer-form/TransferForm.vue.d.ts +1913 -53
- package/dist/views/receive-request/components/transfer-form/TransferFormProps.d.ts +1 -0
- package/dist/views/receive-request/components/transfer-form/components/ForecastStock.vue.d.ts +2 -2
- package/dist/views/receive-request/components/transfer-form/composables/use-transfer-items.d.ts +1 -1
- package/dist/views/receive-request/composables/use-receive-request-form.d.ts +2370 -327
- package/dist/views/receive-request/composables/use-receive-request-table.d.ts +2304 -261
- package/dist/views/recipe/components/recipe-form/RecipeForm.vue.d.ts +2 -2
- package/dist/views/recipe/composables/use-recipe-form.d.ts +2 -2
- package/dist/views/stock/components/StockRecordCard.vue.d.ts +43 -120
- package/dist/views/stock/components/dialog/AdjustedItemForm.vue.d.ts +34 -4
- package/dist/views/stock/composables/use-stock-action.d.ts +2 -2
- package/dist/views/stock/helper/compute-summary-total.d.ts +2 -2
- package/dist/views/supplier/components/supplier-import/SupplierImport.vue.d.ts +2 -0
- package/dist/views/supplier/components/supplier-import/SupplierImportItem.vue.d.ts +12 -0
- package/dist/views/supplier/components/supplier-import/SupplierImportItemProps.d.ts +6 -0
- package/dist/views/supplier/composables/use-supplier-actions.d.ts +10 -0
- package/dist/views/supplier/helpers/import-export.helper.d.ts +50 -0
- package/dist/views/transfer-template/components/transfer-template-details/TransferTemplateDetails.vue.d.ts +0 -2
- package/dist/views/transfer-template/components/transfer-template-details/TransferTemplateDetailsProps.d.ts +0 -1
- package/dist/views/transfer-template/components/transfer-template-form/composables/use-template-enabled-locations.d.ts +71 -82
- package/dist/views/transfer-template/components/transfer-template-form/composables/use-transfer-locations.d.ts +38 -1
- package/dist/views/transfer-template/components/transfer-template-form/composables/use-transfer-template-items.d.ts +1 -1
- package/dist/views/transfer-template/components/transfer-template-import/TransferTemplateImport.vue.d.ts +2 -0
- package/dist/views/transfer-template/components/transfer-template-import/TransferTemplateImportItem.vue.d.ts +12 -0
- package/dist/views/transfer-template/components/transfer-template-import/TransferTemplateImportItemProps.d.ts +9 -0
- package/dist/views/transfer-template/composables/use-transfer-template-actions.d.ts +1279 -1528
- package/dist/views/transfer-template/composables/use-transfer-template-table.d.ts +2207 -446
- package/dist/views/transfer-template/helpers/import-export.helper.d.ts +76 -0
- package/dist/views/transfer-template/helpers/remove-deleted-skus.helper.d.ts +1 -251
- package/dist/views/transfer-template/helpers/template-item.error.helper.d.ts +1 -0
- package/dist/views/unit/composables/use-unit-form.d.ts +2 -2
- package/dist/views/warehouse/components/WarehouseForm.vue.d.ts +14 -8
- package/dist/{xlsx-DiOKvJ6l.js → xlsx-6mM1eNiL.js} +1525 -1525
- package/dist/xlsx.util-BLftcF4q.js +78 -0
- package/package.json +7 -4
- package/dist/ApprovalView-BPsScR5_.js +0 -129
- package/dist/ClosingTemplateView-DECwEnlK.js +0 -1066
- package/dist/FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-DnogYrRE.js +0 -372
- package/dist/IngredientsView-8fT1Ljd5.js +0 -1758
- package/dist/IntegrationView-CjGLRM78.js +0 -1141
- package/dist/PremiumBadge.vue_vue_type_script_setup_true_lang-DlhNc8Vk.js +0 -88
- package/dist/ReceiveRequestView-CXZv8g5U.js +0 -215
- package/dist/RecipeView-sB0Lgmob.js +0 -581
- package/dist/StockView-CY2kNohB.js +0 -1892
- package/dist/SupplierView-DTqeZPts.js +0 -827
- package/dist/TransferDetails.vue_vue_type_script_setup_true_lang-BBby29tW.js +0 -762
- package/dist/TransferDialog.vue_vue_type_script_setup_true_lang-ByNQap9n.js +0 -1498
- package/dist/TransferTemplateView-DkRVfAox.js +0 -1277
- package/dist/app-BuyAj4kw.js +0 -69068
- package/dist/defineDeepModel-DuVmbMwq.js +0 -13
- package/dist/id-to-date-CI5Vv0Ji.js +0 -30
- package/dist/purchase-order-transaction-type-DrFJFvtK.js +0 -676
- package/dist/stores/netsuite.d.ts +0 -49
- package/dist/supplier-BQyK2eSZ.js +0 -69
- package/dist/xlsx.util-CZ7zYxdP.js +0 -109
|
@@ -0,0 +1,278 @@
|
|
|
1
|
+
import { defineComponent as J, computed as y, reactive as Q, resolveComponent as g, openBlock as f, createElementBlock as x, createVNode as m, createElementVNode as n, toDisplayString as v, unref as l, Fragment as C, renderList as A, createBlock as R, withCtx as S, createCommentVNode as T, nextTick as X } from "vue";
|
|
2
|
+
import { a as Z, H as ee, F as ne } from "./app-GUbzqEtW.js";
|
|
3
|
+
import { a as h, o as oe, d as N, c as te } from "./rules-DlnN8IP3.js";
|
|
4
|
+
import { u as ie } from "./use-inventory-binding-dialog-D3x6xj2O.js";
|
|
5
|
+
import { f as le } from "./index-BX5KZXhI.js";
|
|
6
|
+
import { _ as se, c as re, d as de } from "./FmUnitInput.vue_vue_type_script_setup_true_lang-CxR1FCft.js";
|
|
7
|
+
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" }, ve = { class: "flex py-8 px-12 border-b border-fm-color-neutral-gray-200 bg-fm-color-neutral-gray-100 h-[44px] items-center" }, ye = { class: "fm-typo-en-body-md-600 text-fm-color-typo-secondary" }, _e = {
|
|
9
|
+
class: "flex items-center w-full border-b border-fm-color-neutral-gray-100",
|
|
10
|
+
style: { "min-height": "48px" }
|
|
11
|
+
}, ge = { class: "flex-1 fm-typo-en-body-md-400 py-8 px-12" }, xe = { class: "flex flex-col" }, be = {
|
|
12
|
+
key: 0,
|
|
13
|
+
class: "flex gap-4 text-fm-color-system-error-300 fm-typo-en-body-sm-400"
|
|
14
|
+
}, he = { class: "w-[200px]" }, Ve = { class: "w-[52px]" }, 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
|
+
class: "flex items-center w-full",
|
|
16
|
+
style: { "min-height": "48px" }
|
|
17
|
+
}, Ae = { class: "flex-1 fm-typo-en-body-md-400 py-8 px-12" }, Re = { class: "line-clamp-1" }, Se = { class: "w-[150px]" }, Te = { class: "w-[52px]" }, Ne = { class: "flex flex-col px-12 pb-4" }, je = /* @__PURE__ */ J({
|
|
18
|
+
__name: "InventoryBindingForm",
|
|
19
|
+
props: {
|
|
20
|
+
id: {},
|
|
21
|
+
modelValue: { default: () => [] },
|
|
22
|
+
excludeBindingId: {},
|
|
23
|
+
rules: {},
|
|
24
|
+
iframeMode: { type: Boolean },
|
|
25
|
+
disabled: { type: Boolean }
|
|
26
|
+
},
|
|
27
|
+
emits: ["update:modelValue", "click:pick-inventory-bindings"],
|
|
28
|
+
setup(P, { emit: M }) {
|
|
29
|
+
const { t: c } = ae(), B = Z(), k = y(() => B.inventory.recipe ?? []), b = y(() => B.inventory.sku ?? []), s = P, p = M, F = y(() => le({
|
|
30
|
+
bindings: s.modelValue,
|
|
31
|
+
recipes: k.value.map((t) => t._id === s.id ? {
|
|
32
|
+
...t,
|
|
33
|
+
contains: s.modelValue
|
|
34
|
+
} : t),
|
|
35
|
+
skus: b.value
|
|
36
|
+
}).inventoryBindings.filter((t) => t.error).filter((t) => t.reason === ee.enum.circularDependency)), D = y(
|
|
37
|
+
() => new Set(F.value.map((e) => {
|
|
38
|
+
var o;
|
|
39
|
+
return (o = e.bindingPaths[0]) == null ? void 0 : o.id;
|
|
40
|
+
}))
|
|
41
|
+
), K = y(() => s.modelValue.filter((e) => e.type === "RECIPE")), { promptIngredientsBinding: $, promptRecipesBinding: z } = ie();
|
|
42
|
+
async function G() {
|
|
43
|
+
if (s.iframeMode) {
|
|
44
|
+
p("click:pick-inventory-bindings", "RECIPE");
|
|
45
|
+
return;
|
|
46
|
+
}
|
|
47
|
+
z(
|
|
48
|
+
s.modelValue,
|
|
49
|
+
(e) => p("update:modelValue", e),
|
|
50
|
+
s.id ? [s.id] : []
|
|
51
|
+
);
|
|
52
|
+
}
|
|
53
|
+
const I = y(() => s.modelValue.filter((e) => e.type === "SKU") ?? []);
|
|
54
|
+
async function j() {
|
|
55
|
+
if (s.iframeMode) {
|
|
56
|
+
p("click:pick-inventory-bindings", "SKU");
|
|
57
|
+
return;
|
|
58
|
+
}
|
|
59
|
+
$(
|
|
60
|
+
s.modelValue,
|
|
61
|
+
(e) => p("update:modelValue", e),
|
|
62
|
+
s.excludeBindingId,
|
|
63
|
+
s.id ? [s.id] : []
|
|
64
|
+
);
|
|
65
|
+
}
|
|
66
|
+
function L(e, o, t) {
|
|
67
|
+
const r = +o;
|
|
68
|
+
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)), p("update:modelValue", d);
|
|
70
|
+
}
|
|
71
|
+
function w(e, o) {
|
|
72
|
+
const t = o.filter((r) => r.id !== e);
|
|
73
|
+
p("update:modelValue", t);
|
|
74
|
+
}
|
|
75
|
+
function U(e) {
|
|
76
|
+
var t, r;
|
|
77
|
+
if (e.type !== ne.enum.SKU)
|
|
78
|
+
throw new Error("Non-SKU binding does not have unit");
|
|
79
|
+
if (!((t = b.value.find((d) => d._id === e.id)) == null ? void 0 : t.unit))
|
|
80
|
+
throw new Error(`Cannot find ingredient: ${e.id}`);
|
|
81
|
+
return (r = b.value.find((d) => d._id === e.id)) == null ? void 0 : r.unit;
|
|
82
|
+
}
|
|
83
|
+
function Y(e) {
|
|
84
|
+
return { amount: e.amount, measurement: e.measurement };
|
|
85
|
+
}
|
|
86
|
+
function H(e, o, t) {
|
|
87
|
+
const r = t.map((d) => d.id !== e ? d : {
|
|
88
|
+
...d,
|
|
89
|
+
amount: o.amount,
|
|
90
|
+
measurement: o.measurement
|
|
91
|
+
});
|
|
92
|
+
p("update:modelValue", r);
|
|
93
|
+
}
|
|
94
|
+
const E = Q({});
|
|
95
|
+
function O(e) {
|
|
96
|
+
return E[e.id] ?? {
|
|
97
|
+
modelValue: {
|
|
98
|
+
amount: e.amount,
|
|
99
|
+
measurement: e.measurement
|
|
100
|
+
},
|
|
101
|
+
amountAsString: h(e.amount)
|
|
102
|
+
};
|
|
103
|
+
}
|
|
104
|
+
function W(e, o) {
|
|
105
|
+
X(() => {
|
|
106
|
+
E[e.id] = {
|
|
107
|
+
modelValue: {
|
|
108
|
+
amount: e.amount,
|
|
109
|
+
measurement: e.measurement
|
|
110
|
+
},
|
|
111
|
+
amountAsString: o
|
|
112
|
+
};
|
|
113
|
+
});
|
|
114
|
+
}
|
|
115
|
+
return (e, o) => {
|
|
116
|
+
const t = g("FmFormGroup"), r = g("FmButton"), d = g("FmIcon"), a = g("FmTextField"), q = g("FmTooltip");
|
|
117
|
+
return f(), x("div", ue, [
|
|
118
|
+
m(t, {
|
|
119
|
+
disabled: e.disabled,
|
|
120
|
+
"model-value": e.modelValue,
|
|
121
|
+
rules: e.rules
|
|
122
|
+
}, null, 8, ["disabled", "model-value", "rules"]),
|
|
123
|
+
n("div", me, [
|
|
124
|
+
n("div", ce, [
|
|
125
|
+
n("div", pe, v(l(c)("inventory.inventoryBindings.recipe")), 1),
|
|
126
|
+
m(r, {
|
|
127
|
+
variant: "secondary",
|
|
128
|
+
"text-color": "primary",
|
|
129
|
+
"border-color": "primary",
|
|
130
|
+
label: l(c)("inventory.inventoryBindings.linkRecipe"),
|
|
131
|
+
"prepend-icon": "link",
|
|
132
|
+
onClick: G
|
|
133
|
+
}, null, 8, ["label"])
|
|
134
|
+
]),
|
|
135
|
+
n("div", fe, [
|
|
136
|
+
n("div", ve, [
|
|
137
|
+
n("div", ye, v(l(c)("inventory.inventoryBindings.recipe")), 1),
|
|
138
|
+
o[0] || (o[0] = n("div", { class: "w-[200px]" }, null, -1)),
|
|
139
|
+
o[1] || (o[1] = n("div", { class: "w-[52px]" }, null, -1))
|
|
140
|
+
]),
|
|
141
|
+
(f(!0), x(C, null, A(K.value, (i) => (f(), R(t, {
|
|
142
|
+
key: i.id,
|
|
143
|
+
disabled: e.disabled,
|
|
144
|
+
modelValue: +l(h)(i.amount ?? { amount: 1, precision: 0 }),
|
|
145
|
+
rules: [l(oe)(0), l(N)(0)]
|
|
146
|
+
}, {
|
|
147
|
+
default: S(({ invalid: V }) => {
|
|
148
|
+
var _;
|
|
149
|
+
return [
|
|
150
|
+
n("div", _e, [
|
|
151
|
+
n("div", ge, [
|
|
152
|
+
n("div", xe, [
|
|
153
|
+
n("div", null, v((_ = k.value.find((u) => u._id === i.id)) == null ? void 0 : _.name), 1),
|
|
154
|
+
D.value.has(i.id) ? (f(), x("div", be, [
|
|
155
|
+
m(d, {
|
|
156
|
+
name: "error",
|
|
157
|
+
color: "system-error-400",
|
|
158
|
+
size: "sm"
|
|
159
|
+
}),
|
|
160
|
+
o[2] || (o[2] = n("div", null, "There is circular linking in your binding.", -1))
|
|
161
|
+
])) : T("", !0)
|
|
162
|
+
])
|
|
163
|
+
]),
|
|
164
|
+
n("div", he, [
|
|
165
|
+
m(a, {
|
|
166
|
+
class: "w-full",
|
|
167
|
+
disabled: e.disabled,
|
|
168
|
+
modelValue: +l(h)(i.amount ?? { amount: 1, precision: 0 }),
|
|
169
|
+
"onUpdate:modelValue": (u) => L(i.id, u, e.modelValue),
|
|
170
|
+
invalid: V
|
|
171
|
+
}, null, 8, ["disabled", "modelValue", "onUpdate:modelValue", "invalid"])
|
|
172
|
+
]),
|
|
173
|
+
n("div", Ve, [
|
|
174
|
+
m(r, {
|
|
175
|
+
disabled: e.disabled,
|
|
176
|
+
type: "button",
|
|
177
|
+
variant: "plain",
|
|
178
|
+
icon: "delete",
|
|
179
|
+
"icon-color": "#000000",
|
|
180
|
+
onClick: (u) => w(i.id, e.modelValue)
|
|
181
|
+
}, null, 8, ["disabled", "onClick"])
|
|
182
|
+
])
|
|
183
|
+
])
|
|
184
|
+
];
|
|
185
|
+
}),
|
|
186
|
+
_: 2
|
|
187
|
+
}, 1032, ["disabled", "modelValue", "rules"]))), 128))
|
|
188
|
+
])
|
|
189
|
+
]),
|
|
190
|
+
n("div", Be, [
|
|
191
|
+
n("div", ke, [
|
|
192
|
+
n("div", Fe, v(l(c)("inventory.inventoryBindings.ingredient")), 1),
|
|
193
|
+
m(r, {
|
|
194
|
+
variant: "secondary",
|
|
195
|
+
"text-color": "primary",
|
|
196
|
+
"border-color": "primary",
|
|
197
|
+
label: l(c)("inventory.inventoryBindings.linkIngredient"),
|
|
198
|
+
"prepend-icon": "link",
|
|
199
|
+
onClick: j
|
|
200
|
+
}, null, 8, ["label"])
|
|
201
|
+
]),
|
|
202
|
+
n("div", Ie, [
|
|
203
|
+
n("div", we, [
|
|
204
|
+
n("div", Ue, v(l(c)("inventory.inventoryBindings.ingredient")), 1),
|
|
205
|
+
n("div", Ee, v(l(c)("inventory.inventoryBindings.amount")), 1),
|
|
206
|
+
o[3] || (o[3] = n("div", { class: "w-[52px]" }, null, -1))
|
|
207
|
+
]),
|
|
208
|
+
(f(!0), x(C, null, A(I.value, (i, V) => {
|
|
209
|
+
var _;
|
|
210
|
+
return f(), x("div", {
|
|
211
|
+
key: i.id,
|
|
212
|
+
class: "flex flex-col border-b border-fm-color-neutral-gray-100"
|
|
213
|
+
}, [
|
|
214
|
+
n("div", Ce, [
|
|
215
|
+
n("div", Ae, [
|
|
216
|
+
n("span", Re, v((_ = b.value.find((u) => u._id === i.id)) == null ? void 0 : _.name), 1),
|
|
217
|
+
F.value.length ? (f(), R(q, {
|
|
218
|
+
key: 0,
|
|
219
|
+
variant: "plain",
|
|
220
|
+
placement: "bottom",
|
|
221
|
+
content: l(c)("inventory.inventoryBindings.invalidWarning"),
|
|
222
|
+
"hide-arrow": !0,
|
|
223
|
+
"z-index": 50
|
|
224
|
+
}, {
|
|
225
|
+
default: S(() => [
|
|
226
|
+
m(d, {
|
|
227
|
+
name: "error",
|
|
228
|
+
size: "sm",
|
|
229
|
+
color: "#ff3b30"
|
|
230
|
+
})
|
|
231
|
+
]),
|
|
232
|
+
_: 1
|
|
233
|
+
}, 8, ["content"])) : T("", !0)
|
|
234
|
+
]),
|
|
235
|
+
n("div", Se, [
|
|
236
|
+
m(se, {
|
|
237
|
+
"model-value": Y(i),
|
|
238
|
+
"onUpdate:modelValue": (u) => H(i.id, u, e.modelValue),
|
|
239
|
+
"onUpdate:amount": (u) => W(i, u),
|
|
240
|
+
unit: U(i),
|
|
241
|
+
placement: V === I.value.length - 1 ? "top" : "bottom",
|
|
242
|
+
"convert-amount-on-change-unit": ""
|
|
243
|
+
}, null, 8, ["model-value", "onUpdate:modelValue", "onUpdate:amount", "unit", "placement"])
|
|
244
|
+
]),
|
|
245
|
+
n("div", Te, [
|
|
246
|
+
m(r, {
|
|
247
|
+
disabled: e.disabled,
|
|
248
|
+
type: "button",
|
|
249
|
+
variant: "tertiary",
|
|
250
|
+
icon: "delete",
|
|
251
|
+
onClick: (u) => w(i.id, e.modelValue)
|
|
252
|
+
}, null, 8, ["disabled", "onClick"])
|
|
253
|
+
])
|
|
254
|
+
]),
|
|
255
|
+
n("div", Ne, [
|
|
256
|
+
m(t, {
|
|
257
|
+
modelValue: +l(h)(i.amount ?? { amount: 1, precision: 0 }),
|
|
258
|
+
rules: [l(N)(0)]
|
|
259
|
+
}, null, 8, ["modelValue", "rules"]),
|
|
260
|
+
m(t, {
|
|
261
|
+
modelValue: O(i),
|
|
262
|
+
rules: [
|
|
263
|
+
l(re)(),
|
|
264
|
+
l(de)(U(i))
|
|
265
|
+
]
|
|
266
|
+
}, null, 8, ["modelValue", "rules"])
|
|
267
|
+
])
|
|
268
|
+
]);
|
|
269
|
+
}), 128))
|
|
270
|
+
])
|
|
271
|
+
])
|
|
272
|
+
]);
|
|
273
|
+
};
|
|
274
|
+
}
|
|
275
|
+
});
|
|
276
|
+
export {
|
|
277
|
+
je as _
|
|
278
|
+
};
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { defineComponent as s, resolveComponent as c, openBlock as m, createBlock as d, h as g } from "vue";
|
|
2
|
+
import { useI18n as p } from "@feedmepos/mf-common";
|
|
3
|
+
import { components as u } from "@feedmepos/ui-library";
|
|
4
|
+
import { F as r } from "./app-GUbzqEtW.js";
|
|
5
|
+
const B = /* @__PURE__ */ s({
|
|
6
|
+
__name: "InventoryBindingSummary",
|
|
7
|
+
props: {
|
|
8
|
+
rowData: {}
|
|
9
|
+
},
|
|
10
|
+
emits: ["row-click"],
|
|
11
|
+
setup(f, { emit: t }) {
|
|
12
|
+
const a = t, { t: e } = p(), l = [
|
|
13
|
+
{
|
|
14
|
+
id: "name",
|
|
15
|
+
accessorKey: "name",
|
|
16
|
+
size: "auto",
|
|
17
|
+
header: () => e("inventory.inventoryBindings.name"),
|
|
18
|
+
enableSorting: !1
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
id: "ingredient",
|
|
22
|
+
maxSize: 200,
|
|
23
|
+
header: () => e("inventory.inventoryBindings.ingredient"),
|
|
24
|
+
cell(n) {
|
|
25
|
+
const o = n.row.original.binding.filter(
|
|
26
|
+
(i) => i.type === r.enum.SKU
|
|
27
|
+
).length;
|
|
28
|
+
return e("inventory.inventoryBindings.itemsLinked", { count: o });
|
|
29
|
+
},
|
|
30
|
+
enableSorting: !1
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
id: "recipe",
|
|
34
|
+
maxSize: 200,
|
|
35
|
+
header: () => e("inventory.inventoryBindings.recipe"),
|
|
36
|
+
cell(n) {
|
|
37
|
+
const o = n.row.original.binding.filter(
|
|
38
|
+
(i) => i.type === r.enum.RECIPE
|
|
39
|
+
).length;
|
|
40
|
+
return e("inventory.inventoryBindings.itemsLinked", { count: o });
|
|
41
|
+
},
|
|
42
|
+
enableSorting: !1
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
id: "action",
|
|
46
|
+
header: "",
|
|
47
|
+
size: 0,
|
|
48
|
+
cell(n) {
|
|
49
|
+
return g(u.FmButton, {
|
|
50
|
+
icon: "edit",
|
|
51
|
+
iconColor: "neutral-gray-400",
|
|
52
|
+
bgColor: "transparent",
|
|
53
|
+
size: "md",
|
|
54
|
+
onClick() {
|
|
55
|
+
a("row-click", n.row.original);
|
|
56
|
+
}
|
|
57
|
+
});
|
|
58
|
+
},
|
|
59
|
+
enableSorting: !1
|
|
60
|
+
}
|
|
61
|
+
];
|
|
62
|
+
return (n, o) => {
|
|
63
|
+
const i = c("FmTable");
|
|
64
|
+
return m(), d(i, {
|
|
65
|
+
"row-data": n.rowData,
|
|
66
|
+
"column-defs": l,
|
|
67
|
+
"hide-footer": "",
|
|
68
|
+
"shrink-at": 9999
|
|
69
|
+
}, null, 8, ["row-data"]);
|
|
70
|
+
};
|
|
71
|
+
}
|
|
72
|
+
});
|
|
73
|
+
export {
|
|
74
|
+
B as default
|
|
75
|
+
};
|
|
@@ -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 { c as d } from "./rules-DlnN8IP3.js";
|
|
3
3
|
const _ = ["value", "disabled"], D = /* @__PURE__ */ y({
|
|
4
4
|
__name: "NumberPrecisionInput",
|
|
5
5
|
props: {
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
import { u as d, w as f } from "./xlsx-6mM1eNiL.js";
|
|
2
|
+
import { j as _, u as h } from "./app-GUbzqEtW.js";
|
|
3
|
+
import { useCoreStore as F } from "@feedmepos/mf-common";
|
|
4
|
+
import { ref as y, defineComponent as v, resolveComponent as p, openBlock as k, createElementBlock as g, renderSlot as S, createVNode as l, withCtx as x } from "vue";
|
|
5
|
+
function w(e, t) {
|
|
6
|
+
return t.map((r) => typeof r.selector == "function" ? r.selector(e) : e[r.selector]);
|
|
7
|
+
}
|
|
8
|
+
function I(e, t) {
|
|
9
|
+
const r = t.map((o) => o.name), n = e.map((o) => w(o, t));
|
|
10
|
+
return d.aoa_to_sheet([r, ...n]);
|
|
11
|
+
}
|
|
12
|
+
async function C(e, t) {
|
|
13
|
+
const r = d.book_new();
|
|
14
|
+
for (const n of e) {
|
|
15
|
+
const o = I(
|
|
16
|
+
n.data,
|
|
17
|
+
n.columns.map((s) => typeof s == "string" ? {
|
|
18
|
+
name: s,
|
|
19
|
+
selector: s
|
|
20
|
+
} : s)
|
|
21
|
+
);
|
|
22
|
+
d.book_append_sheet(r, o, n.name);
|
|
23
|
+
}
|
|
24
|
+
await f(r, t);
|
|
25
|
+
}
|
|
26
|
+
const m = _((e, t) => {
|
|
27
|
+
const r = h(), n = F();
|
|
28
|
+
return {
|
|
29
|
+
async getInventoryForecast() {
|
|
30
|
+
var a;
|
|
31
|
+
const o = ((a = n.currentBusiness.value) == null ? void 0 : a._id) ?? "", s = r.currentLocationId ?? "", i = `${e.dataBackendUrl}/${o}/${s}/inventory-forecast`;
|
|
32
|
+
try {
|
|
33
|
+
return await t.get(i);
|
|
34
|
+
} catch {
|
|
35
|
+
return { skus: [] };
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
async getPurchaseOrderForecast(o) {
|
|
39
|
+
var u;
|
|
40
|
+
const s = ((u = n.currentBusiness.value) == null ? void 0 : u._id) ?? "", i = r.currentLocationId ?? "", a = `${e.dataBackendUrl}/${s}/${i}/purchase-order-forecast?days=${o}`;
|
|
41
|
+
try {
|
|
42
|
+
return await t.get(a);
|
|
43
|
+
} catch {
|
|
44
|
+
return { skus: [] };
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
};
|
|
48
|
+
});
|
|
49
|
+
function O() {
|
|
50
|
+
return {
|
|
51
|
+
inventoryForecast: { skus: [] },
|
|
52
|
+
purchaseOrderForecast: { skus: [] }
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
const c = y(O());
|
|
56
|
+
function D() {
|
|
57
|
+
return {
|
|
58
|
+
// state
|
|
59
|
+
get inventoryForecast() {
|
|
60
|
+
return c.value.inventoryForecast;
|
|
61
|
+
},
|
|
62
|
+
set inventoryForecast(e) {
|
|
63
|
+
c.value.inventoryForecast = e;
|
|
64
|
+
},
|
|
65
|
+
get purchaseOrderForecast() {
|
|
66
|
+
return c.value.purchaseOrderForecast;
|
|
67
|
+
},
|
|
68
|
+
set purchaseOrderForecast(e) {
|
|
69
|
+
c.value.purchaseOrderForecast = e;
|
|
70
|
+
},
|
|
71
|
+
// actions
|
|
72
|
+
async readStockEstimateBalance() {
|
|
73
|
+
const e = m();
|
|
74
|
+
this.inventoryForecast = await e.getInventoryForecast();
|
|
75
|
+
},
|
|
76
|
+
async readPurchaseOrder(e) {
|
|
77
|
+
const t = m();
|
|
78
|
+
this.purchaseOrderForecast = await t.getPurchaseOrderForecast(e);
|
|
79
|
+
}
|
|
80
|
+
};
|
|
81
|
+
}
|
|
82
|
+
function N(e) {
|
|
83
|
+
let t = e.substring(e.indexOf("_") + 1);
|
|
84
|
+
return t.includes("_") && (t = t.substring(0, t.lastIndexOf("_"))), Number.isNaN(Date.parse(t)) ? null : new Date(t).toISOString();
|
|
85
|
+
}
|
|
86
|
+
const b = { class: "flex items-center gap-8" }, B = "Experience enhanced inventory features with premium plan.", L = /* @__PURE__ */ v({
|
|
87
|
+
__name: "PremiumBadge",
|
|
88
|
+
props: {
|
|
89
|
+
zIndex: {}
|
|
90
|
+
},
|
|
91
|
+
setup(e) {
|
|
92
|
+
return (t, r) => {
|
|
93
|
+
const n = p("FmPill"), o = p("FmTooltip");
|
|
94
|
+
return k(), g("div", b, [
|
|
95
|
+
S(t.$slots, "default"),
|
|
96
|
+
l(o, {
|
|
97
|
+
variant: "plain",
|
|
98
|
+
placement: "top",
|
|
99
|
+
content: B,
|
|
100
|
+
"z-index": t.zIndex
|
|
101
|
+
}, {
|
|
102
|
+
default: x(() => [
|
|
103
|
+
l(n, { variant: "premium" })
|
|
104
|
+
]),
|
|
105
|
+
_: 1
|
|
106
|
+
}, 8, ["z-index"])
|
|
107
|
+
]);
|
|
108
|
+
};
|
|
109
|
+
}
|
|
110
|
+
});
|
|
111
|
+
export {
|
|
112
|
+
L as _,
|
|
113
|
+
C as e,
|
|
114
|
+
N as i,
|
|
115
|
+
D as u
|
|
116
|
+
};
|
package/dist/{PurchaseOrderPrintPreview-5HIWHR_f.js → PurchaseOrderPrintPreview-Dix_fIoo.js}
RENAMED
|
@@ -1,6 +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 o, createCommentVNode as p, renderList as v, normalizeClass as w } from "vue";
|
|
2
2
|
import { useRoute as k } from "vue-router";
|
|
3
|
-
import {
|
|
3
|
+
import { v as y } from "./app-GUbzqEtW.js";
|
|
4
|
+
import { _ as C } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
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 = {
|
|
5
6
|
class: "text-left",
|
|
6
7
|
style: { width: "20%" }
|
|
@@ -51,7 +52,7 @@ const P = { class: "purchase-box" }, R = { valign: "bottom" }, A = { class: "tex
|
|
|
51
52
|
t("div", S, [
|
|
52
53
|
i(l(s.value.supplier.line1), 1),
|
|
53
54
|
e[2] || (e[2] = t("br", null, null, -1)),
|
|
54
|
-
s.value.supplier.line2 ? (n(), u(
|
|
55
|
+
s.value.supplier.line2 ? (n(), u(o, { key: 0 }, [
|
|
55
56
|
i(l(s.value.supplier.line2), 1),
|
|
56
57
|
e[1] || (e[1] = t("br", null, null, -1))
|
|
57
58
|
], 64)) : p("", !0),
|
|
@@ -67,7 +68,7 @@ const P = { class: "purchase-box" }, R = { valign: "bottom" }, A = { class: "tex
|
|
|
67
68
|
t("div", q, [
|
|
68
69
|
i(l(s.value.buyer.line1), 1),
|
|
69
70
|
e[7] || (e[7] = t("br", null, null, -1)),
|
|
70
|
-
s.value.buyer.line2 ? (n(), u(
|
|
71
|
+
s.value.buyer.line2 ? (n(), u(o, { key: 0 }, [
|
|
71
72
|
i(l(s.value.buyer.line2), 1),
|
|
72
73
|
e[6] || (e[6] = t("br", null, null, -1))
|
|
73
74
|
], 64)) : p("", !0),
|
|
@@ -99,7 +100,7 @@ const P = { class: "purchase-box" }, R = { valign: "bottom" }, A = { class: "tex
|
|
|
99
100
|
])
|
|
100
101
|
], -1)),
|
|
101
102
|
t("tbody", null, [
|
|
102
|
-
(n(!0), u(
|
|
103
|
+
(n(!0), u(o, null, v(s.value.items, (r, a) => (n(), u("tr", { key: a }, [
|
|
103
104
|
t("td", L, l(r.code), 1),
|
|
104
105
|
t("td", U, l(r.description), 1),
|
|
105
106
|
t("td", {
|
|
@@ -119,7 +120,7 @@ const P = { class: "purchase-box" }, R = { valign: "bottom" }, A = { class: "tex
|
|
|
119
120
|
t("div", z, [
|
|
120
121
|
e[12] || (e[12] = t("hr", null, null, -1)),
|
|
121
122
|
e[13] || (e[13] = i(" Delivery History: ")),
|
|
122
|
-
(n(!0), u(
|
|
123
|
+
(n(!0), u(o, null, v(s.value.deliveryOrders, (r, a) => (n(), u("div", {
|
|
123
124
|
key: a,
|
|
124
125
|
style: { padding: "10px 30px" }
|
|
125
126
|
}, [
|
|
@@ -135,11 +136,11 @@ const P = { class: "purchase-box" }, R = { valign: "bottom" }, A = { class: "tex
|
|
|
135
136
|
t("div", null, [
|
|
136
137
|
t("table", null, [
|
|
137
138
|
t("tbody", null, [
|
|
138
|
-
(n(!0), u(
|
|
139
|
-
t("td", M, l(
|
|
140
|
-
t("td", J, l(
|
|
141
|
-
t("td", Q, l(
|
|
142
|
-
t("td", j, l(
|
|
139
|
+
(n(!0), u(o, null, v(r.items, (d, _) => (n(), u("tr", { key: _ }, [
|
|
140
|
+
t("td", M, l(d.code), 1),
|
|
141
|
+
t("td", J, l(d.description), 1),
|
|
142
|
+
t("td", Q, l(d.quantity), 1),
|
|
143
|
+
t("td", j, l(d.unit), 1)
|
|
143
144
|
]))), 128))
|
|
144
145
|
])
|
|
145
146
|
])
|
|
@@ -148,7 +149,7 @@ const P = { class: "purchase-box" }, R = { valign: "bottom" }, A = { class: "tex
|
|
|
148
149
|
])
|
|
149
150
|
]));
|
|
150
151
|
}
|
|
151
|
-
}),
|
|
152
|
+
}), tt = /* @__PURE__ */ C(G, [["__scopeId", "data-v-92a03d5c"]]);
|
|
152
153
|
export {
|
|
153
|
-
|
|
154
|
+
tt as default
|
|
154
155
|
};
|