@feedmepos/mf-inventory-portal 1.0.7 → 1.0.8-dev.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{App-DF14rGlK.js → App-VjopKXRf.js} +50 -49
- package/dist/{ApprovalView-C_xhq-_c.js → ApprovalView-Bc8OqfVg.js} +24 -24
- package/dist/{BindingsDialog-CCY1fDj8.js → BindingsDialog-zWAOfSXc.js} +4 -4
- package/dist/{BindingsPicker-CnXbK5O3.js → BindingsPicker-Bf5LuJiL.js} +6 -6
- package/dist/{BindingsTable-cQIUUuVv.js → BindingsTable-D2N-3mnJ.js} +8 -8
- package/dist/{ClosingDraftView-DUZ31x3s.js → ClosingDraftView-BwbzajJY.js} +464 -463
- package/dist/{ClosingTemplateView-6ysEDEcV.js → ClosingTemplateView-CsAIbfui.js} +10 -10
- package/dist/{DeliveryOrderPrintPreview-BGjFS8h7.js → DeliveryOrderPrintPreview-CjylpaJj.js} +1 -1
- package/dist/{FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-CanJ2fzb.js → FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-C_xdzdLD.js} +32 -32
- package/dist/{FmUnitInput.vue_vue_type_script_setup_true_lang-BcKtJQMt.js → FmUnitInput.vue_vue_type_script_setup_true_lang-DhgHX4S_.js} +86 -86
- package/dist/{IngredientBindedItem.vue_vue_type_script_setup_true_lang-Bb9xMoX-.js → IngredientBindedItem.vue_vue_type_script_setup_true_lang-DPa8Pto8.js} +1 -1
- package/dist/{IngredientGroupView-i08KHlW7.js → IngredientGroupView-D6YzbWdd.js} +11 -11
- package/dist/{IngredientsView-D0tBukwK.js → IngredientsView-g-73afqm.js} +15 -14
- package/dist/{IntegrationView-BqCrKL13.js → IntegrationView-CEML0dP4.js} +86 -85
- package/dist/{InventoryBindingForm-BJwIFQVS.js → InventoryBindingForm-E0wJOA8L.js} +1 -1
- package/dist/{InventoryBindingForm.vue_vue_type_script_setup_true_lang-DU9j1Q8M.js → InventoryBindingForm.vue_vue_type_script_setup_true_lang-DFXmypAs.js} +27 -27
- package/dist/{InventoryBindingSummary-B2M3Th8T.js → InventoryBindingSummary-sBQvAPBw.js} +1 -1
- package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-BH4A_Lc5.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-DOeDgymo.js} +1 -1
- package/dist/{PremiumBadge.vue_vue_type_script_setup_true_lang-CdxCyEBi.js → PremiumBadge.vue_vue_type_script_setup_true_lang-DIqYY1-C.js} +10 -10
- package/dist/{PublishView-B9x92vDM.js → PublishView-D_psCmiQ.js} +7 -7
- package/dist/{PurchaseOrderPrintPreview-MbGDNmgh.js → PurchaseOrderPrintPreview-5QqjPwWN.js} +4 -4
- package/dist/{ReceiveRequestView-CTNycYUr.js → ReceiveRequestView-CBGxqac6.js} +53 -52
- package/dist/{RecipeView-sHTcJgzP.js → RecipeView-BAjHNWST.js} +32 -32
- package/dist/{StockView-CUv4dcGJ.js → StockView-Bc62jbCV.js} +73 -72
- package/dist/{SupplierView-hu6OhDss.js → SupplierView-Cyucz_US.js} +159 -159
- package/dist/TransferDetails.vue_vue_type_script_setup_true_lang-CljJoB4v.js +1895 -0
- package/dist/{TransferTemplateView-DMSkUc0D.js → TransferTemplateView-BWURlmou.js} +291 -290
- package/dist/{UnitView-B5q7IVbT.js → UnitView-cjLpKfoN.js} +23 -23
- package/dist/{WarehouseView-Ds6z4Vz6.js → WarehouseView-CUtg5Aiw.js} +26 -26
- package/dist/api/bill.d.ts +2 -2
- package/dist/api/food-market-hub.d.ts +1 -1
- package/dist/api/inventory.d.ts +44 -44
- package/dist/api/netsuite.d.ts +3 -3
- package/dist/api/purchase-order.d.ts +5 -1
- package/dist/{app-BmsY87Mv.js → app-Dgg5mqsW.js} +17155 -17625
- package/dist/app.d.ts +7 -7
- package/dist/app.js +1 -1
- package/dist/components/inventory-binding/InventoryBinding.vue.d.ts +8 -8
- package/dist/components/shell/inventory/binding-dialog.vue.d.ts +2 -2
- package/dist/components/shell/inventory/binding-ui.vue.d.ts +5 -5
- package/dist/composable/usePromise.d.ts +41 -0
- package/dist/{decimal-Baw9w4_A.js → decimal-DcqP_fAm.js} +1 -1
- package/dist/feature-C4mZ_d2m.js +17352 -0
- package/dist/{format-unit-display-D0_KiU3j.js → format-unit-display-D2Uk9Ze_.js} +60 -60
- package/dist/{index-CDydl7WA.js → index-YuTB_T1B.js} +1 -1
- package/dist/{index-C_GU5Tc8.js → index-peSGn9vg.js} +7 -6
- package/dist/{stock-C-hm8Kdq.js → stock-CDP8ZqBZ.js} +1 -1
- package/dist/stores/feature.d.ts +3 -20
- package/dist/stores/integration/foodmarkethub.d.ts +1 -1
- package/dist/stores/integration/netsuite.d.ts +7 -7
- package/dist/stores/inventory.d.ts +44 -44
- package/dist/stores/location.d.ts +137 -137
- package/dist/{supplier-RX_yr24c.js → supplier-C5GbDMxT.js} +4 -4
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/{use-ingredient-select-dialog-BZhczMUl.js → use-ingredient-select-dialog-nH01sayt.js} +1 -1
- package/dist/{use-inventory-binding-dialog-dV-92pLe.js → use-inventory-binding-dialog-CJe6QdGb.js} +1 -1
- package/dist/views/adjustment-template/wastage-template/actions.d.ts +228 -228
- package/dist/views/adjustment-template/wastage-template/form/WastageTemplateItemTable.vue.d.ts +2 -2
- package/dist/views/adjustment-template/wastage-template/form/useAdjustmentTemplateItems.d.ts +1 -1
- package/dist/views/adjustment-template/wastage-template/table.d.ts +234 -234
- package/dist/views/closing-draft/components/closing-draft-dialog/ClosingDraftDialog.vue.d.ts +68 -68
- package/dist/views/closing-draft/composables/use-closing-draft-table.d.ts +408 -408
- package/dist/views/closing-template/components/closing-template-form/composables/use-closing-template-items.d.ts +4 -4
- package/dist/views/closing-template/composables/use-closing-template-actions.d.ts +252 -252
- package/dist/views/closing-template/composables/use-closing-template-table.d.ts +252 -252
- package/dist/views/ingredient-group/composables/use-ingredient-group-table.d.ts +12 -12
- package/dist/views/ingredients/components/convert/ConvertForm.vue.d.ts +2 -2
- package/dist/views/ingredients/components/ingredient-form/IngredientForm.vue.d.ts +8 -8
- package/dist/views/ingredients/components/inventory-binding/InventoryBindingForm.vue.d.ts +3 -3
- package/dist/views/ingredients/composables/use-ingredient-table.d.ts +4 -4
- package/dist/views/integration/components/ApplyProduct.vue.d.ts +2 -2
- package/dist/views/integration/components/ApplyProductDialog.vue.d.ts +2 -2
- package/dist/views/integration/components/ApplyProductDialogV4.vue.d.ts +2 -2
- package/dist/views/integration/components/netsuite/AddLocationDialog.vue.d.ts +204 -204
- package/dist/views/integration/components/netsuite/LocationConfigurationDialog.vue.d.ts +2 -2
- package/dist/views/receive-request/components/transfer-form/TransferForm.vue.d.ts +665 -637
- package/dist/views/receive-request/components/transfer-form/components/ForecastStock.vue.d.ts +22 -22
- package/dist/views/receive-request/components/transfer-form/components/TransferItemTable.vue.d.ts +44 -44
- package/dist/views/receive-request/components/transfer-form/composables/use-transfer-items.d.ts +11 -11
- package/dist/views/receive-request/composables/use-process-purchase-order.d.ts +614 -0
- package/dist/views/receive-request/composables/use-receive-request-form.d.ts +1190 -1142
- package/dist/views/receive-request/composables/use-receive-request-table.d.ts +1192 -1144
- package/dist/views/receive-request/constants/po-action-to-ui-style.d.ts +6 -0
- package/dist/views/recipe/components/recipe-form/RecipeForm.vue.d.ts +2 -2
- package/dist/views/stock/components/StockRecordCard.vue.d.ts +1 -1
- package/dist/views/stock/components/dialog/AdjustedItemForm.vue.d.ts +14 -14
- package/dist/views/transfer-template/components/transfer-template-form/components/TransferTemplateItemTable.vue.d.ts +22 -22
- package/dist/views/transfer-template/components/transfer-template-form/composables/use-template-enabled-locations.d.ts +17 -17
- package/dist/views/transfer-template/components/transfer-template-form/composables/use-transfer-template-items.d.ts +11 -11
- package/dist/views/transfer-template/composables/use-transfer-template-actions.d.ts +805 -805
- package/dist/views/transfer-template/composables/use-transfer-template-table.d.ts +805 -805
- package/dist/views/transfer-template/composables/useTransferTemplateHelper.d.ts +33 -33
- package/dist/{vue-i18n-sbHu6D5a.js → vue-i18n-NNRWZURD.js} +284 -284
- package/package.json +5 -3
- package/dist/TransferDetails.vue_vue_type_script_setup_true_lang-CCKlQGMf.js +0 -1746
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { a as A,
|
|
1
|
+
import { defineComponent as H, ref as E, onMounted as re, resolveComponent as S, openBlock as x, createElementBlock as $, Fragment as ie, createElementVNode as R, toDisplayString as ce, createVNode as v, createCommentVNode as j, computed as F, watch as ue, createBlock as T, withCtx as P, unref as b, isRef as Z, normalizeClass as de, normalizeStyle as me, Teleport as pe, normalizeProps as fe, guardReactiveProps as ve } from "vue";
|
|
2
|
+
import { a as A, d as V, e as O, S as ye, f as ge, D as ee, h as Y, i as q, F as te, l as be, U as _e, A as we, p as ne, q as Re, s as he, r as Ve, u as xe, z as Ce, _ as Ee, B as Se, C as Fe, E as oe } from "./app-Dgg5mqsW.js";
|
|
3
3
|
import { useDialog as ke, useSnackbar as se, useProxiedModel as ae, useBreakpoints as De } from "@feedmepos/ui-library";
|
|
4
4
|
import { i as Ae, _ as Ie } from "./is-linked-ingredient-error-fJ2TJb3z.js";
|
|
5
|
-
import { _ as le } from "./IngredientBindedItem.vue_vue_type_script_setup_true_lang-
|
|
5
|
+
import { _ as le } from "./IngredientBindedItem.vue_vue_type_script_setup_true_lang-DPa8Pto8.js";
|
|
6
6
|
import { defineStore as $e, storeToRefs as Pe } from "pinia";
|
|
7
|
-
import { useI18n as
|
|
8
|
-
import { _ as Be } from "./InventoryBindingForm.vue_vue_type_script_setup_true_lang-
|
|
7
|
+
import { useI18n as K } from "@feedmepos/mf-common";
|
|
8
|
+
import { _ as Be } from "./InventoryBindingForm.vue_vue_type_script_setup_true_lang-DFXmypAs.js";
|
|
9
9
|
import { _ as Te } from "./FmCustomAttribute.vue_vue_type_script_setup_true_lang-D-IWRjRD.js";
|
|
10
10
|
const Me = {
|
|
11
11
|
key: 0,
|
|
12
12
|
class: "flex flex-col items-center w-full h-full gap-24"
|
|
13
|
-
}, Ue = { key: 1 }, Ne = { key: 0 },
|
|
13
|
+
}, Ue = { key: 1 }, Ne = { key: 0 }, ze = /* @__PURE__ */ H({
|
|
14
14
|
__name: "DeleteDialog",
|
|
15
15
|
props: {
|
|
16
16
|
type: {},
|
|
@@ -46,7 +46,7 @@ const Me = {
|
|
|
46
46
|
name: "Menu",
|
|
47
47
|
bindings: y.value
|
|
48
48
|
}, null, 8, ["bindings"])
|
|
49
|
-
])) :
|
|
49
|
+
])) : j("", !0)
|
|
50
50
|
]))
|
|
51
51
|
], 64);
|
|
52
52
|
};
|
|
@@ -117,7 +117,7 @@ const Me = {
|
|
|
117
117
|
text: "Cancel",
|
|
118
118
|
close: !0
|
|
119
119
|
},
|
|
120
|
-
contentComponent:
|
|
120
|
+
contentComponent: ze,
|
|
121
121
|
contentComponentProps: {
|
|
122
122
|
type: "menu",
|
|
123
123
|
data: n,
|
|
@@ -133,8 +133,8 @@ const Me = {
|
|
|
133
133
|
recipeViewLoading: s
|
|
134
134
|
};
|
|
135
135
|
});
|
|
136
|
-
function
|
|
137
|
-
const { updateRecipe: h, deleteRecipe: p } = G(), y = A(), { t: a } =
|
|
136
|
+
function Le() {
|
|
137
|
+
const { updateRecipe: h, deleteRecipe: p } = G(), y = A(), { t: a } = K();
|
|
138
138
|
async function s(u, d) {
|
|
139
139
|
const n = O(d);
|
|
140
140
|
if (u === Y.Edit) {
|
|
@@ -192,20 +192,20 @@ function ze() {
|
|
|
192
192
|
ingredients: c(n.contains, /* @__PURE__ */ new Set([n._id])).map((l) => {
|
|
193
193
|
var _, g, r, m, C;
|
|
194
194
|
const t = d.skuById[l.id];
|
|
195
|
-
return t ? l.recipeIds.slice(1).length ? `(linked recipe ${(_ = d.recipeById[l.recipeIds.at(-1) ?? ""]) == null ? void 0 : _.name}) ${t.name} (${
|
|
195
|
+
return t ? l.recipeIds.slice(1).length ? `(linked recipe ${(_ = d.recipeById[l.recipeIds.at(-1) ?? ""]) == null ? void 0 : _.name}) ${t.name} (${q(l.amount)}${((g = l.measurement) == null ? void 0 : g.abbrev) ?? ((r = t == null ? void 0 : t.unit) == null ? void 0 : r.abbrev)})` : `${t.name} (${q(l.amount)}${((m = l.measurement) == null ? void 0 : m.abbrev) ?? ((C = t == null ? void 0 : t.unit) == null ? void 0 : C.abbrev)})` : null;
|
|
196
196
|
}).filter((l) => l).join(", "),
|
|
197
197
|
original: n
|
|
198
198
|
}));
|
|
199
199
|
}
|
|
200
200
|
return { columnDefs: i, formatRowData: f };
|
|
201
201
|
}
|
|
202
|
-
const Ye = { class: "flex flex-col gap-40" },
|
|
202
|
+
const Ye = { class: "flex flex-col gap-40" }, qe = {
|
|
203
203
|
key: 0,
|
|
204
204
|
class: "col-span-2 mt-16 border-1 border-fm-color-neutral-gray-200 fm-corner-radius-lg flex flex-col p-16 gap-16"
|
|
205
|
-
},
|
|
205
|
+
}, He = {
|
|
206
206
|
key: 0,
|
|
207
207
|
class: "flex flex-col items-center w-full h-full gap-24"
|
|
208
|
-
},
|
|
208
|
+
}, Ke = { key: 1 }, je = { class: "mt-32" }, Ge = /* @__PURE__ */ H({
|
|
209
209
|
__name: "RecipeForm",
|
|
210
210
|
props: {
|
|
211
211
|
mode: {},
|
|
@@ -215,7 +215,7 @@ const Ye = { class: "flex flex-col gap-40" }, je = {
|
|
|
215
215
|
emits: ["update:modelValue", "click:submit"],
|
|
216
216
|
setup(h, { expose: p, emit: y }) {
|
|
217
217
|
var k;
|
|
218
|
-
const a = h, s = y, { t: c } =
|
|
218
|
+
const a = h, s = y, { t: c } = K(), i = F({
|
|
219
219
|
get() {
|
|
220
220
|
var e;
|
|
221
221
|
return ((e = a.modelValue) == null ? void 0 : e.name) ?? "";
|
|
@@ -305,7 +305,7 @@ const Ye = { class: "flex flex-col gap-40" }, je = {
|
|
|
305
305
|
id: (w = e.modelValue) == null ? void 0 : w._id,
|
|
306
306
|
disabled: e.disabled,
|
|
307
307
|
"model-value": f.value,
|
|
308
|
-
"onUpdate:modelValue": o[1] || (o[1] = (
|
|
308
|
+
"onUpdate:modelValue": o[1] || (o[1] = (z) => f.value = z),
|
|
309
309
|
rules: [b(we)(1)]
|
|
310
310
|
}, null, 8, ["id", "disabled", "model-value", "rules"])
|
|
311
311
|
];
|
|
@@ -313,7 +313,7 @@ const Ye = { class: "flex flex-col gap-40" }, je = {
|
|
|
313
313
|
_: 1
|
|
314
314
|
})
|
|
315
315
|
]),
|
|
316
|
-
e.mode !== b(V).CREATE ? (x(), $("div",
|
|
316
|
+
e.mode !== b(V).CREATE ? (x(), $("div", qe, [
|
|
317
317
|
R("div", null, [
|
|
318
318
|
v(D, {
|
|
319
319
|
label: "Show binded items",
|
|
@@ -323,22 +323,22 @@ const Ye = { class: "flex flex-col gap-40" }, je = {
|
|
|
323
323
|
disabled: g.value
|
|
324
324
|
}, null, 8, ["modelValue", "disabled"])
|
|
325
325
|
]),
|
|
326
|
-
g.value ? (x(), $("div",
|
|
326
|
+
g.value ? (x(), $("div", He, [
|
|
327
327
|
v(M),
|
|
328
328
|
R("div", null, [
|
|
329
329
|
v(U, { size: "xl" })
|
|
330
330
|
]),
|
|
331
331
|
o[4] || (o[4] = R("div", { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary pl-8" }, "Loading...", -1)),
|
|
332
332
|
v(M)
|
|
333
|
-
])) : (x(), $("div",
|
|
333
|
+
])) : (x(), $("div", Ke, [
|
|
334
334
|
_.value && t.value.length ? (x(), T(le, {
|
|
335
335
|
key: 0,
|
|
336
336
|
name: "Menu",
|
|
337
337
|
bindings: t.value
|
|
338
|
-
}, null, 8, ["bindings"])) :
|
|
338
|
+
}, null, 8, ["bindings"])) : j("", !0)
|
|
339
339
|
]))
|
|
340
|
-
])) :
|
|
341
|
-
R("div",
|
|
340
|
+
])) : j("", !0),
|
|
341
|
+
R("div", je, [
|
|
342
342
|
v(Te, {
|
|
343
343
|
entity: "inventoryRecipe",
|
|
344
344
|
modelValue: u.value,
|
|
@@ -350,7 +350,7 @@ const Ye = { class: "flex flex-col gap-40" }, je = {
|
|
|
350
350
|
}, 512);
|
|
351
351
|
};
|
|
352
352
|
}
|
|
353
|
-
}), Oe = { class: "flex gap-4" }, Je = /* @__PURE__ */
|
|
353
|
+
}), Oe = { class: "flex gap-4" }, Je = /* @__PURE__ */ H({
|
|
354
354
|
__name: "RecipeDialog",
|
|
355
355
|
props: {
|
|
356
356
|
show: { type: Boolean },
|
|
@@ -359,7 +359,7 @@ const Ye = { class: "flex flex-col gap-40" }, je = {
|
|
|
359
359
|
},
|
|
360
360
|
emits: ["update:show"],
|
|
361
361
|
setup(h) {
|
|
362
|
-
const p = h, y = A(), a = se(), { t: s } =
|
|
362
|
+
const p = h, y = A(), a = se(), { t: s } = K(), c = ae(p, "show"), i = ae(p, "recipe"), f = F(() => {
|
|
363
363
|
switch (p.mode) {
|
|
364
364
|
case V.READ:
|
|
365
365
|
return "";
|
|
@@ -488,7 +488,7 @@ function Qe() {
|
|
|
488
488
|
"RECIPE",
|
|
489
489
|
"",
|
|
490
490
|
(g = y[t.id]) == null ? void 0 : g.name,
|
|
491
|
-
|
|
491
|
+
q(t.amount),
|
|
492
492
|
"UNIT"
|
|
493
493
|
];
|
|
494
494
|
}
|
|
@@ -501,7 +501,7 @@ function Qe() {
|
|
|
501
501
|
"INGREDIENT",
|
|
502
502
|
(g = a[t.id]) == null ? void 0 : g.code,
|
|
503
503
|
(r = a[t.id]) == null ? void 0 : r.name,
|
|
504
|
-
|
|
504
|
+
q(t.amount),
|
|
505
505
|
t.measurement ? t.measurement.abbrev : (C = (m = a[t.id]) == null ? void 0 : m.unit) == null ? void 0 : C.abbrev
|
|
506
506
|
];
|
|
507
507
|
}
|
|
@@ -515,17 +515,17 @@ function Qe() {
|
|
|
515
515
|
}), i = Re(s, ["Name", "Type", "Code", "Item", "Amount", "Unit"]);
|
|
516
516
|
he(i, `RECIPE_${Ve(/* @__PURE__ */ new Date(), "-", "-")}.xlsx`);
|
|
517
517
|
}
|
|
518
|
-
const We = { class: "flex flex-col py-8" }, Xe = { class: "fm-typo-en-body-lg-600 text-fm-color-typo-primary" }, Ze = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, ct = /* @__PURE__ */
|
|
518
|
+
const We = { class: "flex flex-col py-8" }, Xe = { class: "fm-typo-en-body-lg-600 text-fm-color-typo-primary" }, Ze = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, ct = /* @__PURE__ */ H({
|
|
519
519
|
__name: "RecipeView",
|
|
520
520
|
setup(h) {
|
|
521
|
-
const p = A(), y = F(() => p.recipes), a = xe(), { createRecipe: s, updateRecipe: c } = G(), { recipeDialogProps: i, recipeViewLoading: f } = Pe(G()), { columnDefs: u, formatRowData: d } =
|
|
521
|
+
const p = A(), y = F(() => p.recipes), a = xe(), { createRecipe: s, updateRecipe: c } = G(), { recipeDialogProps: i, recipeViewLoading: f } = Pe(G()), { columnDefs: u, formatRowData: d } = Le(), n = F(() => d(y.value));
|
|
522
522
|
function l(e) {
|
|
523
523
|
if (e === "add")
|
|
524
524
|
return s();
|
|
525
525
|
if (e === "export")
|
|
526
526
|
return Qe();
|
|
527
527
|
}
|
|
528
|
-
const t = E(""), _ = F(() => f.value), { breakpoints: g } = De(), r = F(() => g.value.xs || g.value.sm), m = F(() => r.value ? 10 : 20), C = Ce(), { t: k } =
|
|
528
|
+
const t = E(""), _ = F(() => f.value), { breakpoints: g } = De(), r = F(() => g.value.xs || g.value.sm), m = F(() => r.value ? 10 : 20), C = Ce(), { t: k } = K();
|
|
529
529
|
return (e, o) => {
|
|
530
530
|
const B = S("FmTable");
|
|
531
531
|
return x(), T(Ee, {
|
|
@@ -572,19 +572,19 @@ const We = { class: "flex flex-col py-8" }, Xe = { class: "fm-typo-en-body-lg-60
|
|
|
572
572
|
onRowClick: (D) => b(c)(D.original)
|
|
573
573
|
}, {
|
|
574
574
|
default: P((D) => {
|
|
575
|
-
var M, U, N, w,
|
|
575
|
+
var M, U, N, w, z, J, Q, W, L, X;
|
|
576
576
|
return [
|
|
577
577
|
R("div", We, [
|
|
578
578
|
R("div", Xe, [
|
|
579
579
|
v(b(oe), {
|
|
580
580
|
render: (N = (U = (M = D.recipe) == null ? void 0 : M.column) == null ? void 0 : U.columnDef) == null ? void 0 : N.cell,
|
|
581
|
-
props: (
|
|
581
|
+
props: (z = (w = D.recipe) == null ? void 0 : w.getContext) == null ? void 0 : z.call(w)
|
|
582
582
|
}, null, 8, ["render", "props"])
|
|
583
583
|
]),
|
|
584
584
|
R("div", Ze, [
|
|
585
585
|
v(b(oe), {
|
|
586
586
|
render: (W = (Q = (J = D.ingredients) == null ? void 0 : J.column) == null ? void 0 : Q.columnDef) == null ? void 0 : W.cell,
|
|
587
|
-
props: (X = (
|
|
587
|
+
props: (X = (L = D.ingredients) == null ? void 0 : L.getContext) == null ? void 0 : X.call(L)
|
|
588
588
|
}, null, 8, ["render", "props"])
|
|
589
589
|
])
|
|
590
590
|
])
|
|
@@ -1,17 +1,18 @@
|
|
|
1
1
|
import { defineComponent as ie, ref as O, computed as U, resolveComponent as M, openBlock as A, createBlock as Y, withCtx as D, createElementVNode as t, normalizeClass as ge, toDisplayString as h, createVNode as g, createElementBlock as R, Fragment as X, renderList as le, unref as r, h as _e, watch as be, isRef as Ie, createCommentVNode as ne, reactive as at, onMounted as Ge, normalizeStyle as Je, createTextVNode as ce, Teleport as rt, normalizeProps as we, mergeProps as $e } from "vue";
|
|
2
|
-
import { u as pe,
|
|
3
|
-
import { u as Pe, a as
|
|
4
|
-
import { g as Se } from "./decimal-
|
|
5
|
-
import { e as
|
|
2
|
+
import { u as pe, N as lt, e as Te, f as it, a as Ue, F as Le, O as ut, P as Be, i as de, J as ct, t as xe, L as De, A as dt, M as mt, K as fe, Q as pt, T as te, V as vt, W as Ne, l as ft, H as yt, X as _t, Y as kt, Z as Qe, $ as q, a0 as ht, r as Xe, a1 as ke, a2 as gt, a3 as bt, n as Ae, k as ze, o as xt, a4 as St, a5 as Ft, a6 as wt, a7 as $t, a8 as At, z as Ct, _ as Vt, B as Mt, C as Bt, E as Ye } from "./app-Dgg5mqsW.js";
|
|
3
|
+
import { u as Pe, a as He } from "./stock-CDP8ZqBZ.js";
|
|
4
|
+
import { g as Se } from "./decimal-DcqP_fAm.js";
|
|
5
|
+
import { e as Dt, u as Ze, i as et, _ as Ke } from "./PremiumBadge.vue_vue_type_script_setup_true_lang-DIqYY1-C.js";
|
|
6
6
|
import { _ as je, S as Ce, g as tt } from "./StockForecast.vue_vue_type_style_index_0_lang-KLXSWvo5.js";
|
|
7
|
-
import { _ as
|
|
8
|
-
import { useI18n as ue, useCoreStore as
|
|
9
|
-
import { useSnackbar as ye, useDialog as nt, useProxiedModel as
|
|
10
|
-
import { defineStore as
|
|
11
|
-
import { u as
|
|
12
|
-
import { _ as Ht } from "./NumberPrecisionInput.vue_vue_type_script_setup_true_lang-
|
|
13
|
-
import { E as
|
|
7
|
+
import { _ as jt } from "./PreviewBadge.vue_vue_type_script_setup_true_lang-CRZiQHjx.js";
|
|
8
|
+
import { useI18n as ue, useCoreStore as It } from "@feedmepos/mf-common";
|
|
9
|
+
import { useSnackbar as ye, useDialog as nt, useProxiedModel as Ee, useBreakpoints as Tt } from "@feedmepos/ui-library";
|
|
10
|
+
import { defineStore as Ut } from "pinia";
|
|
11
|
+
import { u as Pt } from "./use-inventory-binding-dialog-CJe6QdGb.js";
|
|
12
|
+
import { _ as Ht } from "./NumberPrecisionInput.vue_vue_type_script_setup_true_lang-DOeDgymo.js";
|
|
13
|
+
import { E as Et } from "./empty-placeholder-wf6-BWE8.js";
|
|
14
14
|
import "./array-hChJVZLE.js";
|
|
15
|
+
import { u as Rt } from "./feature-C4mZ_d2m.js";
|
|
15
16
|
var he = /* @__PURE__ */ ((f) => (f.History = "History", f.Convert = "Convert", f.Adjust = "Adjust", f))(he || {});
|
|
16
17
|
const Ot = [
|
|
17
18
|
{
|
|
@@ -45,7 +46,7 @@ async function Nt(f) {
|
|
|
45
46
|
/ /g,
|
|
46
47
|
"_"
|
|
47
48
|
)}_${lt().format("DD_MM_YYYY_HHmm")}.xlsx`;
|
|
48
|
-
await
|
|
49
|
+
await Dt(
|
|
49
50
|
[
|
|
50
51
|
{
|
|
51
52
|
name: "stock",
|
|
@@ -171,14 +172,14 @@ const zt = { class: "fm-typo-en-body-md-400 flex-grow" }, ot = /* @__PURE__ */ i
|
|
|
171
172
|
__name: "StockHeaderPreview",
|
|
172
173
|
setup(f) {
|
|
173
174
|
const { t: y } = ue();
|
|
174
|
-
return (l, o) => (A(), Y(
|
|
175
|
+
return (l, o) => (A(), Y(jt, null, {
|
|
175
176
|
default: D(() => [
|
|
176
177
|
t("div", Yt, h(r(y)("inventory.stock.prediction.daysRemaining")), 1)
|
|
177
178
|
]),
|
|
178
179
|
_: 1
|
|
179
180
|
}));
|
|
180
181
|
}
|
|
181
|
-
}), st =
|
|
182
|
+
}), st = Ut("stockActions", () => {
|
|
182
183
|
const f = O(!1), y = pe(), l = Pe(), o = Ze(), S = ye(), _ = nt(), { t: d } = ue();
|
|
183
184
|
async function m() {
|
|
184
185
|
if (y._currentLocation) {
|
|
@@ -207,11 +208,11 @@ const zt = { class: "fm-typo-en-body-md-400 flex-grow" }, ot = /* @__PURE__ */ i
|
|
|
207
208
|
return;
|
|
208
209
|
}
|
|
209
210
|
const V = {
|
|
210
|
-
maxCount: ((P = l.productBalance.find(({ id:
|
|
211
|
+
maxCount: ((P = l.productBalance.find(({ id: H }) => H === i._id)) == null ? void 0 : P.count) || 0,
|
|
211
212
|
sku: i,
|
|
212
213
|
show: !0,
|
|
213
|
-
"onUpdate:show"(
|
|
214
|
-
w.value.show =
|
|
214
|
+
"onUpdate:show"(H) {
|
|
215
|
+
w.value.show = H;
|
|
215
216
|
},
|
|
216
217
|
onSubmitted() {
|
|
217
218
|
m();
|
|
@@ -383,7 +384,7 @@ const Gt = { class: "flex items-center" }, Jt = { class: "fm-typo-en-title-md-80
|
|
|
383
384
|
},
|
|
384
385
|
emits: ["update:show", "submitted"],
|
|
385
386
|
setup(f, { expose: y, emit: l }) {
|
|
386
|
-
const o = f, S = l, _ =
|
|
387
|
+
const o = f, S = l, _ = Pt(), d = Ue(), m = He(), w = ye(), { t: x } = ue(), a = O(0), n = O(null), F = U(() => d.skus), C = U(
|
|
387
388
|
() => {
|
|
388
389
|
var p, e;
|
|
389
390
|
return (((e = (p = o.sku) == null ? void 0 : p.convert) == null ? void 0 : e.inventoryBindings) ?? []).filter(
|
|
@@ -466,7 +467,7 @@ const Gt = { class: "flex items-center" }, Jt = { class: "fm-typo-en-title-md-80
|
|
|
466
467
|
(e = (p = P.value) == null ? void 0 : p.resetInputs) == null || e.call(p);
|
|
467
468
|
}
|
|
468
469
|
});
|
|
469
|
-
const
|
|
470
|
+
const H = Ee(o, "show");
|
|
470
471
|
async function Z(p, e, s) {
|
|
471
472
|
i.value = !0;
|
|
472
473
|
try {
|
|
@@ -505,7 +506,7 @@ const Gt = { class: "flex items-center" }, Jt = { class: "fm-typo-en-title-md-80
|
|
|
505
506
|
const e = F.value.find((s) => s._id === p);
|
|
506
507
|
return e ? tt(e.unit, !0) : [];
|
|
507
508
|
}
|
|
508
|
-
function
|
|
509
|
+
function E(p, e) {
|
|
509
510
|
const s = N(p), v = s.find((u) => u.value === e) ?? s.find((u) => u.value === null);
|
|
510
511
|
return v ? {
|
|
511
512
|
...v,
|
|
@@ -549,8 +550,8 @@ const Gt = { class: "flex items-center" }, Jt = { class: "fm-typo-en-title-md-80
|
|
|
549
550
|
const s = M("FmTextField"), v = M("FmForm"), u = M("FmCard"), c = M("FmSwitch"), b = M("FmFormGroup"), I = M("FmSelect"), J = M("FmButton"), oe = M("FmSideSheet");
|
|
550
551
|
return A(), Y(oe, {
|
|
551
552
|
"dismiss-away": "",
|
|
552
|
-
modelValue: r(
|
|
553
|
-
"onUpdate:modelValue": e[3] || (e[3] = (T) => Ie(
|
|
553
|
+
modelValue: r(H),
|
|
554
|
+
"onUpdate:modelValue": e[3] || (e[3] = (T) => Ie(H) ? H.value = T : null),
|
|
554
555
|
"max-width": 500
|
|
555
556
|
}, {
|
|
556
557
|
"side-sheet-header": D(() => [
|
|
@@ -646,7 +647,7 @@ const Gt = { class: "flex items-center" }, Jt = { class: "fm-typo-en-title-md-80
|
|
|
646
647
|
disabled: i.value,
|
|
647
648
|
class: "translate-y-[2px]",
|
|
648
649
|
items: N(T.id),
|
|
649
|
-
"model-value": (re =
|
|
650
|
+
"model-value": (re = E(T.id, (se = T.measurement) == null ? void 0 : se.id)) == null ? void 0 : re.value,
|
|
650
651
|
"onUpdate:modelValue": (Q) => K(T.id, Q, n.value ?? []),
|
|
651
652
|
invalid: z
|
|
652
653
|
}, {
|
|
@@ -855,7 +856,7 @@ const Me = {
|
|
|
855
856
|
},
|
|
856
857
|
emits: ["update:show", "submitted"],
|
|
857
858
|
setup(f, { expose: y, emit: l }) {
|
|
858
|
-
const o = f, S = l, _ = Ue(), d = nt(), m =
|
|
859
|
+
const o = f, S = l, _ = Ue(), d = nt(), m = He(), w = ye(), x = O(!1), { t: a } = ue();
|
|
859
860
|
function n() {
|
|
860
861
|
i(Te(k));
|
|
861
862
|
}
|
|
@@ -874,7 +875,7 @@ const Me = {
|
|
|
874
875
|
($ = (V = F.value) == null ? void 0 : V.resetInputs) == null || $.call(V);
|
|
875
876
|
}
|
|
876
877
|
});
|
|
877
|
-
const C =
|
|
878
|
+
const C = Ee(o, "show"), k = at({
|
|
878
879
|
remark: "",
|
|
879
880
|
adjustments: [
|
|
880
881
|
{
|
|
@@ -904,9 +905,9 @@ const Me = {
|
|
|
904
905
|
try {
|
|
905
906
|
await m.adjustSku({
|
|
906
907
|
remark: V.remark,
|
|
907
|
-
adjustments: V.adjustments.map(({ doc: $, remark: B, type: P, amount:
|
|
908
|
+
adjustments: V.adjustments.map(({ doc: $, remark: B, type: P, amount: H, measurement: Z }) => ({
|
|
908
909
|
id: $._id,
|
|
909
|
-
amount:
|
|
910
|
+
amount: H,
|
|
910
911
|
measurement: Z,
|
|
911
912
|
remark: B,
|
|
912
913
|
doc: $,
|
|
@@ -950,10 +951,10 @@ const Me = {
|
|
|
950
951
|
}
|
|
951
952
|
}).onPrimary((B) => {
|
|
952
953
|
k.adjustments = B.map(
|
|
953
|
-
(P) => k.adjustments.find((
|
|
954
|
+
(P) => k.adjustments.find((H) => H.doc._id === P) ?? {
|
|
954
955
|
id: `sku_${(/* @__PURE__ */ new Date()).toISOString()}_${Math.random().toString(16).slice(2, 8)}`,
|
|
955
956
|
type: te.enum.PURCHASE,
|
|
956
|
-
doc: _.skus.find((
|
|
957
|
+
doc: _.skus.find((H) => H._id === P),
|
|
957
958
|
measurement: null,
|
|
958
959
|
remark: "",
|
|
959
960
|
amount: fe(1)
|
|
@@ -965,7 +966,7 @@ const Me = {
|
|
|
965
966
|
k.adjustments.splice(V, 1);
|
|
966
967
|
}
|
|
967
968
|
return (V, $) => {
|
|
968
|
-
const B = M("FmTextarea"), P = M("FmButton"),
|
|
969
|
+
const B = M("FmTextarea"), P = M("FmButton"), H = M("FmForm"), Z = M("FmSideSheet");
|
|
969
970
|
return A(), Y(Z, {
|
|
970
971
|
modelValue: r(C),
|
|
971
972
|
"onUpdate:modelValue": $[2] || ($[2] = (G) => Ie(C) ? C.value = G : null),
|
|
@@ -978,7 +979,7 @@ const Me = {
|
|
|
978
979
|
])
|
|
979
980
|
]),
|
|
980
981
|
default: D(() => [
|
|
981
|
-
g(
|
|
982
|
+
g(H, {
|
|
982
983
|
class: "w-full flex flex-col gap-12",
|
|
983
984
|
ref_key: "formRef",
|
|
984
985
|
ref: F,
|
|
@@ -1002,8 +1003,8 @@ const Me = {
|
|
|
1002
1003
|
(A(!0), R(X, null, le(k.adjustments, (G, N) => (A(), Y(mn, {
|
|
1003
1004
|
key: G.id,
|
|
1004
1005
|
modelValue: k.adjustments[N],
|
|
1005
|
-
"onUpdate:modelValue": (
|
|
1006
|
-
"onClick:delete": (
|
|
1006
|
+
"onUpdate:modelValue": (E) => k.adjustments[N] = E,
|
|
1007
|
+
"onClick:delete": (E) => L(N)
|
|
1007
1008
|
}, null, 8, ["modelValue", "onUpdate:modelValue", "onClick:delete"]))), 128))
|
|
1008
1009
|
]),
|
|
1009
1010
|
_: 1
|
|
@@ -1015,8 +1016,8 @@ const Me = {
|
|
|
1015
1016
|
label: r(a)("inventory.stock.adjust.adjustButton"),
|
|
1016
1017
|
loading: x.value,
|
|
1017
1018
|
onClick: $[1] || ($[1] = (G) => {
|
|
1018
|
-
var N,
|
|
1019
|
-
return (
|
|
1019
|
+
var N, E;
|
|
1020
|
+
return (E = (N = F.value) == null ? void 0 : N.validateInputs) == null ? void 0 : E.call(N);
|
|
1020
1021
|
})
|
|
1021
1022
|
}, null, 8, ["label", "loading"])
|
|
1022
1023
|
])
|
|
@@ -1259,10 +1260,10 @@ function Dn(f, y) {
|
|
|
1259
1260
|
precision: 4
|
|
1260
1261
|
})} ${y.unit.abbrev}`) : null;
|
|
1261
1262
|
}
|
|
1262
|
-
const jn = { class: "flex items-center w-full fm-typo-en-title-md-800" }, In = { class: "flex-1 line-clamp-2" }, Tn = { class: "flex flex-col gap-32 w-full h-full" }, Un = { class: "flex items-center relative gap-4" }, Pn = { class: "flex-1" },
|
|
1263
|
+
const jn = { class: "flex items-center w-full fm-typo-en-title-md-800" }, In = { class: "flex-1 line-clamp-2" }, Tn = { class: "flex flex-col gap-32 w-full h-full" }, Un = { class: "flex items-center relative gap-4" }, Pn = { class: "flex-1" }, Hn = {
|
|
1263
1264
|
key: 0,
|
|
1264
1265
|
class: "flex-1 flex flex-col items-center gap-16"
|
|
1265
|
-
},
|
|
1266
|
+
}, En = { class: "fm-typo-en-body-lg-400 translate-x-4" }, Rn = {
|
|
1266
1267
|
key: 1,
|
|
1267
1268
|
class: "flex flex-col gap-12"
|
|
1268
1269
|
}, On = { class: "pb-16" }, Ln = { class: "fm-typo-cn-body-lg-600" }, Nn = {
|
|
@@ -1282,7 +1283,7 @@ const jn = { class: "flex items-center w-full fm-typo-en-title-md-800" }, In = {
|
|
|
1282
1283
|
},
|
|
1283
1284
|
emits: ["update:show"],
|
|
1284
1285
|
setup(f) {
|
|
1285
|
-
const y =
|
|
1286
|
+
const y = It(), l = Pe(), o = He(), S = hn(), _ = pe(), d = Rt(), { t: m } = ue(), w = f, x = O(!1), a = ye(), n = O(gt(0));
|
|
1286
1287
|
async function F() {
|
|
1287
1288
|
x.value = !0;
|
|
1288
1289
|
try {
|
|
@@ -1304,7 +1305,7 @@ const jn = { class: "flex items-center w-full fm-typo-en-title-md-800" }, In = {
|
|
|
1304
1305
|
});
|
|
1305
1306
|
const C = O([]), k = O([]), i = O(new Array());
|
|
1306
1307
|
function j(e, s) {
|
|
1307
|
-
return s === "day" ?
|
|
1308
|
+
return s === "day" ? At(e) : Xe(e);
|
|
1308
1309
|
}
|
|
1309
1310
|
function L(e, s) {
|
|
1310
1311
|
const v = e.reduce(
|
|
@@ -1325,8 +1326,8 @@ const jn = { class: "flex items-center w-full fm-typo-en-title-md-800" }, In = {
|
|
|
1325
1326
|
async function V() {
|
|
1326
1327
|
let e = await o.readStockAdjustment(
|
|
1327
1328
|
w.sku._id,
|
|
1328
|
-
|
|
1329
|
-
|
|
1329
|
+
St(new Date(n.value.startDate)).toISOString(),
|
|
1330
|
+
Ft(new Date(n.value.endDate)).toISOString()
|
|
1330
1331
|
);
|
|
1331
1332
|
C.value = e;
|
|
1332
1333
|
const s = e.filter(({ ref: v }) => v == null ? void 0 : v.startsWith("bill_")).map(({ ref: v }) => v);
|
|
@@ -1350,7 +1351,7 @@ const jn = { class: "flex items-center w-full fm-typo-en-title-md-800" }, In = {
|
|
|
1350
1351
|
}), P = U(() => {
|
|
1351
1352
|
const e = C.value, s = w.sku;
|
|
1352
1353
|
return Dn(e, s);
|
|
1353
|
-
}),
|
|
1354
|
+
}), H = U(() => {
|
|
1354
1355
|
const e = [...C.value].computeFirst((v) => {
|
|
1355
1356
|
var c, b;
|
|
1356
1357
|
const u = (b = (c = v.skus) == null ? void 0 : c.find) == null ? void 0 : b.call(c, (I) => I.sku._id === w.sku._id);
|
|
@@ -1400,13 +1401,13 @@ const jn = { class: "flex items-center w-full fm-typo-en-title-md-800" }, In = {
|
|
|
1400
1401
|
return ke(s, !1, s.precision);
|
|
1401
1402
|
});
|
|
1402
1403
|
function N() {
|
|
1403
|
-
const { startDate: e, endDate: s } =
|
|
1404
|
+
const { startDate: e, endDate: s } = wt(n.value);
|
|
1404
1405
|
e !== null && s !== null && (n.value = {
|
|
1405
1406
|
startDate: e,
|
|
1406
1407
|
endDate: s
|
|
1407
1408
|
});
|
|
1408
1409
|
}
|
|
1409
|
-
const
|
|
1410
|
+
const E = U(() => w.sku.valuation === ze.Enum.FIFO ? m("inventory.ingredient.valuationMethod.FIFO") : m("inventory.ingredient.valuationMethod.WAVG")), K = U(() => {
|
|
1410
1411
|
var I, J, oe, T;
|
|
1411
1412
|
const e = [...C.value].reverse().computeFirst((z) => {
|
|
1412
1413
|
var W, se;
|
|
@@ -1437,13 +1438,13 @@ const jn = { class: "flex items-center w-full fm-typo-en-title-md-800" }, In = {
|
|
|
1437
1438
|
} : "No data";
|
|
1438
1439
|
});
|
|
1439
1440
|
function me() {
|
|
1440
|
-
const { startDate: e, endDate: s } =
|
|
1441
|
+
const { startDate: e, endDate: s } = $t(n.value);
|
|
1441
1442
|
e !== null && s !== null && (n.value = {
|
|
1442
1443
|
startDate: e,
|
|
1443
1444
|
endDate: s
|
|
1444
1445
|
});
|
|
1445
1446
|
}
|
|
1446
|
-
const p =
|
|
1447
|
+
const p = Ee(w, "show");
|
|
1447
1448
|
return (e, s) => {
|
|
1448
1449
|
const v = M("FmButton"), u = M("FmField"), c = M("FmDateRangePicker"), b = M("FmSpacer"), I = M("FmCircularProgress"), J = M("FmIcon"), oe = M("FmTooltip"), T = M("FmMenuDivider"), z = M("FmChip"), W = M("FmCardSection"), se = M("FmCard"), re = M("FmSideSheet");
|
|
1449
1450
|
return A(), Y(re, {
|
|
@@ -1502,10 +1503,10 @@ const jn = { class: "flex items-center w-full fm-typo-en-title-md-800" }, In = {
|
|
|
1502
1503
|
"prepend-icon": "navigate_next"
|
|
1503
1504
|
})
|
|
1504
1505
|
]),
|
|
1505
|
-
x.value ? (A(), R("div",
|
|
1506
|
+
x.value ? (A(), R("div", Hn, [
|
|
1506
1507
|
g(b),
|
|
1507
1508
|
g(I, { size: "xl" }),
|
|
1508
|
-
t("div",
|
|
1509
|
+
t("div", En, h(r(m)("inventory.stock.history.loading")), 1),
|
|
1509
1510
|
g(b),
|
|
1510
1511
|
g(b)
|
|
1511
1512
|
])) : k.value && ((Q = k.value) == null ? void 0 : Q.length) > 0 ? (A(), R("div", Rn, [
|
|
@@ -1564,7 +1565,7 @@ const jn = { class: "flex items-center w-full fm-typo-en-title-md-800" }, In = {
|
|
|
1564
1565
|
]),
|
|
1565
1566
|
t("div", mo, [
|
|
1566
1567
|
t("div", po, h(r(m)("inventory.stock.history.summary.openingBalance")), 1),
|
|
1567
|
-
t("div", vo, h(
|
|
1568
|
+
t("div", vo, h(H.value), 1)
|
|
1568
1569
|
]),
|
|
1569
1570
|
t("div", fo, [
|
|
1570
1571
|
t("div", yo, h(r(m)("inventory.stock.history.summary.lastStockBalance")), 1),
|
|
@@ -1582,7 +1583,7 @@ const jn = { class: "flex items-center w-full fm-typo-en-title-md-800" }, In = {
|
|
|
1582
1583
|
g(oe, {
|
|
1583
1584
|
variant: "plain",
|
|
1584
1585
|
placement: "top",
|
|
1585
|
-
content: `[${
|
|
1586
|
+
content: `[${E.value}] ${r(m)("inventory.stock.history.estimatedValueTooltip")}`,
|
|
1586
1587
|
"z-index": 50
|
|
1587
1588
|
}, {
|
|
1588
1589
|
default: D(() => [
|
|
@@ -1667,7 +1668,7 @@ const jn = { class: "flex items-center w-full fm-typo-en-title-md-800" }, In = {
|
|
|
1667
1668
|
g(b),
|
|
1668
1669
|
t("div", null, [
|
|
1669
1670
|
t("img", {
|
|
1670
|
-
src: r(
|
|
1671
|
+
src: r(Et),
|
|
1671
1672
|
alt: "List is empty"
|
|
1672
1673
|
}, null, 8, Co)
|
|
1673
1674
|
]),
|
|
@@ -1683,7 +1684,7 @@ const jn = { class: "flex items-center w-full fm-typo-en-title-md-800" }, In = {
|
|
|
1683
1684
|
}, 8, ["modelValue"]);
|
|
1684
1685
|
};
|
|
1685
1686
|
}
|
|
1686
|
-
}), Do = { class: "flex flex-col gap-8" }, jo = { class: "flex flex-col" }, Io = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, To = { class: "fm-typo-en-body-lg-600 text-fm-color-typo-primary line-clamp-1" },
|
|
1687
|
+
}), Do = { class: "flex flex-col gap-8" }, jo = { class: "flex flex-col" }, Io = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, To = { class: "fm-typo-en-body-lg-600 text-fm-color-typo-primary line-clamp-1" }, Qo = /* @__PURE__ */ ie({
|
|
1687
1688
|
__name: "StockView",
|
|
1688
1689
|
setup(f) {
|
|
1689
1690
|
const { t: y } = ue(), l = Ue(), o = pe(), S = Pe(), _ = st(), d = Ze(), { columnDefs: m } = Wt();
|
|
@@ -1707,11 +1708,11 @@ const jn = { class: "flex items-center w-full fm-typo-en-title-md-800" }, In = {
|
|
|
1707
1708
|
}
|
|
1708
1709
|
const n = U(
|
|
1709
1710
|
() => l.skus.map(($) => {
|
|
1710
|
-
var G, N,
|
|
1711
|
+
var G, N, E;
|
|
1711
1712
|
const B = $.trackingMeasurement;
|
|
1712
1713
|
let P = (N = (G = S.stockBalance.skus) == null ? void 0 : G.find(
|
|
1713
1714
|
(K) => K.id === $._id
|
|
1714
|
-
)) == null ? void 0 : N.balance,
|
|
1715
|
+
)) == null ? void 0 : N.balance, H = d.inventoryForecast.skus.find(
|
|
1715
1716
|
(K) => K.id === $._id
|
|
1716
1717
|
);
|
|
1717
1718
|
return {
|
|
@@ -1720,11 +1721,11 @@ const jn = { class: "flex items-center w-full fm-typo-en-title-md-800" }, In = {
|
|
|
1720
1721
|
amount: 0,
|
|
1721
1722
|
precision: 0
|
|
1722
1723
|
},
|
|
1723
|
-
day: (
|
|
1724
|
-
trackingUnitAbbrev: B ? ((
|
|
1724
|
+
day: (H == null ? void 0 : H.depletionDays) ?? void 0,
|
|
1725
|
+
trackingUnitAbbrev: B ? ((E = $.unit.measurements.find((K) => K.id === B)) == null ? void 0 : E.abbrev) ?? "" : $.unit.abbrev
|
|
1725
1726
|
};
|
|
1726
1727
|
})
|
|
1727
|
-
), F = O(""), { breakpoints: C } =
|
|
1728
|
+
), F = O(""), { breakpoints: C } = Tt(), k = U(() => C.value.xs || C.value.sm), i = U(() => k.value ? 10 : 20), j = Ct(), L = U(() => [
|
|
1728
1729
|
{
|
|
1729
1730
|
label: y("inventory.common.refresh"),
|
|
1730
1731
|
value: "refresh"
|
|
@@ -1744,13 +1745,13 @@ const jn = { class: "flex items-center w-full fm-typo-en-title-md-800" }, In = {
|
|
|
1744
1745
|
}
|
|
1745
1746
|
return ($, B) => {
|
|
1746
1747
|
const P = M("FmTable");
|
|
1747
|
-
return A(), Y(
|
|
1748
|
+
return A(), Y(Vt, {
|
|
1748
1749
|
title: r(y)("inventory.stock.title"),
|
|
1749
1750
|
actions: L.value,
|
|
1750
1751
|
"onClick:action": V
|
|
1751
1752
|
}, {
|
|
1752
1753
|
default: D(() => {
|
|
1753
|
-
var
|
|
1754
|
+
var H, Z, G, N;
|
|
1754
1755
|
return [
|
|
1755
1756
|
t("div", {
|
|
1756
1757
|
class: ge([
|
|
@@ -1761,11 +1762,11 @@ const jn = { class: "flex items-center w-full fm-typo-en-title-md-800" }, In = {
|
|
|
1761
1762
|
}
|
|
1762
1763
|
])
|
|
1763
1764
|
}, [
|
|
1764
|
-
g(
|
|
1765
|
+
g(Mt, {
|
|
1765
1766
|
searchable: "",
|
|
1766
1767
|
"change-location": "",
|
|
1767
1768
|
search: F.value,
|
|
1768
|
-
"onUpdate:search": B[0] || (B[0] = (
|
|
1769
|
+
"onUpdate:search": B[0] || (B[0] = (E) => F.value = E)
|
|
1769
1770
|
}, null, 8, ["search"]),
|
|
1770
1771
|
(A(), Y(P, {
|
|
1771
1772
|
style: Je(r(j).tableHeight),
|
|
@@ -1773,13 +1774,13 @@ const jn = { class: "flex items-center w-full fm-typo-en-title-md-800" }, In = {
|
|
|
1773
1774
|
"row-data": n.value,
|
|
1774
1775
|
"search-value": F.value,
|
|
1775
1776
|
loading: w.value || !r(o)._currentLocation,
|
|
1776
|
-
key: (
|
|
1777
|
-
onRowClick: B[1] || (B[1] = (
|
|
1777
|
+
key: (H = r(o)._currentLocation) == null ? void 0 : H.dbName,
|
|
1778
|
+
onRowClick: B[1] || (B[1] = (E) => r(_).showSkuHistory(E.original)),
|
|
1778
1779
|
"page-size": i.value
|
|
1779
1780
|
}, {
|
|
1780
|
-
"list-row": D((
|
|
1781
|
-
g(
|
|
1782
|
-
row:
|
|
1781
|
+
"list-row": D((E) => [
|
|
1782
|
+
g(Bt, {
|
|
1783
|
+
row: E,
|
|
1783
1784
|
onRowClick: r(_).showSkuHistory
|
|
1784
1785
|
}, {
|
|
1785
1786
|
default: D((K) => {
|
|
@@ -1802,16 +1803,16 @@ const jn = { class: "flex items-center w-full fm-typo-en-title-md-800" }, In = {
|
|
|
1802
1803
|
]),
|
|
1803
1804
|
t("div", null, [
|
|
1804
1805
|
g(je, {
|
|
1805
|
-
days:
|
|
1806
|
+
days: E.original.day
|
|
1806
1807
|
}, null, 8, ["days"])
|
|
1807
1808
|
]),
|
|
1808
1809
|
t("div", null, [
|
|
1809
1810
|
g(ot, {
|
|
1810
1811
|
class: "xs:w-[160px]",
|
|
1811
|
-
unit:
|
|
1812
|
-
sku:
|
|
1813
|
-
amount:
|
|
1814
|
-
"default-tracking-measurement":
|
|
1812
|
+
unit: E.original.unit,
|
|
1813
|
+
sku: E.original,
|
|
1814
|
+
amount: E.original.balance,
|
|
1815
|
+
"default-tracking-measurement": E.original.trackingMeasurement ?? void 0
|
|
1815
1816
|
}, null, 8, ["unit", "sku", "amount", "default-tracking-measurement"])
|
|
1816
1817
|
])
|
|
1817
1818
|
])
|
|
@@ -1836,5 +1837,5 @@ const jn = { class: "flex items-center w-full fm-typo-en-title-md-800" }, In = {
|
|
|
1836
1837
|
}
|
|
1837
1838
|
});
|
|
1838
1839
|
export {
|
|
1839
|
-
|
|
1840
|
+
Qo as default
|
|
1840
1841
|
};
|