@feedmepos/mf-inventory-portal 1.0.7-dev.1 → 1.0.7
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-zspCOQeF.js → App-DF14rGlK.js} +49 -50
- package/dist/{ApprovalView-CKJV87es.js → ApprovalView-C_xhq-_c.js} +24 -24
- package/dist/{BindingsDialog-CTmuzAWi.js → BindingsDialog-CCY1fDj8.js} +4 -4
- package/dist/{BindingsPicker-Dabonsov.js → BindingsPicker-CnXbK5O3.js} +6 -6
- package/dist/{BindingsTable-L0yzAoQq.js → BindingsTable-cQIUUuVv.js} +8 -8
- package/dist/{ClosingDraftView-CddxqfNi.js → ClosingDraftView-DUZ31x3s.js} +463 -464
- package/dist/{ClosingTemplateView-BsW-nPec.js → ClosingTemplateView-6ysEDEcV.js} +10 -10
- package/dist/{DeliveryOrderPrintPreview-DQ4msDpJ.js → DeliveryOrderPrintPreview-BGjFS8h7.js} +1 -1
- package/dist/{FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-TnVI2vdF.js → FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-CanJ2fzb.js} +32 -32
- package/dist/{FmUnitInput.vue_vue_type_script_setup_true_lang-BRvXmLV6.js → FmUnitInput.vue_vue_type_script_setup_true_lang-BcKtJQMt.js} +86 -86
- package/dist/{IngredientBindedItem.vue_vue_type_script_setup_true_lang-BHLx7Lbo.js → IngredientBindedItem.vue_vue_type_script_setup_true_lang-Bb9xMoX-.js} +1 -1
- package/dist/{IngredientGroupView-CF2GLMSD.js → IngredientGroupView-i08KHlW7.js} +11 -11
- package/dist/{IngredientsView-DopQVz7u.js → IngredientsView-D0tBukwK.js} +14 -15
- package/dist/{IntegrationView-EnD2l7af.js → IntegrationView-BqCrKL13.js} +85 -86
- package/dist/{InventoryBindingForm-VP2_coNH.js → InventoryBindingForm-BJwIFQVS.js} +1 -1
- package/dist/{InventoryBindingForm.vue_vue_type_script_setup_true_lang-dQF7h_Jp.js → InventoryBindingForm.vue_vue_type_script_setup_true_lang-DU9j1Q8M.js} +27 -27
- package/dist/{InventoryBindingSummary-BCEXzmFu.js → InventoryBindingSummary-B2M3Th8T.js} +1 -1
- package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-RfkBlwxw.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-BH4A_Lc5.js} +1 -1
- package/dist/{PremiumBadge.vue_vue_type_script_setup_true_lang-CGgxjz4P.js → PremiumBadge.vue_vue_type_script_setup_true_lang-CdxCyEBi.js} +10 -10
- package/dist/{PublishView-ExvxeKR_.js → PublishView-B9x92vDM.js} +7 -7
- package/dist/{PurchaseOrderPrintPreview-59AaXtZ_.js → PurchaseOrderPrintPreview-MbGDNmgh.js} +4 -4
- package/dist/{ReceiveRequestView-BxGss8gu.js → ReceiveRequestView-CTNycYUr.js} +52 -53
- package/dist/{RecipeView-BqTsG4xX.js → RecipeView-sHTcJgzP.js} +32 -32
- package/dist/{StockView-D-WvydHv.js → StockView-CUv4dcGJ.js} +72 -73
- package/dist/{SupplierView-C6ruAEih.js → SupplierView-hu6OhDss.js} +11 -12
- package/dist/TransferDetails.vue_vue_type_script_setup_true_lang-CCKlQGMf.js +1746 -0
- package/dist/{TransferTemplateView-qSA3Txpn.js → TransferTemplateView-DMSkUc0D.js} +290 -291
- package/dist/{UnitView-oHDOLM8k.js → UnitView-B5q7IVbT.js} +23 -23
- package/dist/{WarehouseView-C3EqYfCf.js → WarehouseView-Ds6z4Vz6.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 +1 -5
- package/dist/{app-DqrcGlGd.js → app-BmsY87Mv.js} +17641 -17171
- 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/{decimal-rgCB5DGy.js → decimal-Baw9w4_A.js} +1 -1
- package/dist/{format-unit-display-DUWzu8vU.js → format-unit-display-D0_KiU3j.js} +60 -60
- package/dist/{index-YgIaxVhw.js → index-CDydl7WA.js} +1 -1
- package/dist/{index-CH3OzDYK.js → index-C_GU5Tc8.js} +6 -7
- package/dist/{stock-BPNYXwz1.js → stock-C-hm8Kdq.js} +1 -1
- package/dist/stores/feature.d.ts +20 -3
- 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-CnrH580K.js → supplier-RX_yr24c.js} +4 -4
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/{use-ingredient-select-dialog-CpnJoeWb.js → use-ingredient-select-dialog-BZhczMUl.js} +1 -1
- package/dist/{use-inventory-binding-dialog-DHvNwt_F.js → use-inventory-binding-dialog-dV-92pLe.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 +647 -675
- 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-receive-request-form.d.ts +1146 -1194
- package/dist/views/receive-request/composables/use-receive-request-table.d.ts +1170 -1218
- 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 +813 -813
- package/dist/views/transfer-template/composables/use-transfer-template-table.d.ts +813 -813
- package/dist/views/transfer-template/composables/useTransferTemplateHelper.d.ts +33 -33
- package/dist/{vue-i18n-4m7yAqU2.js → vue-i18n-sbHu6D5a.js} +426 -426
- package/package.json +3 -5
- package/dist/TransferDetails.vue_vue_type_script_setup_true_lang-CQ-Om_rI.js +0 -1894
- package/dist/composable/usePromise.d.ts +0 -41
- package/dist/feature-CifIpcNk.js +0 -17345
- package/dist/views/receive-request/composables/use-process-purchase-order.d.ts +0 -614
- package/dist/views/receive-request/constants/po-action-to-ui-style.d.ts +0 -6
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { a as A,
|
|
1
|
+
import { defineComponent as q, 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 K, 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, e as V, f as O, S as ye, h as ge, D as ee, i as Y, j, F as te, m as be, U as _e, A as we, q as ne, r as Re, v as he, s as Ve, u as xe, B as Ce, _ as Ee, C as Se, E as Fe, G as oe } from "./app-BmsY87Mv.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-Bb9xMoX-.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 H } from "@feedmepos/mf-common";
|
|
8
|
+
import { _ as Be } from "./InventoryBindingForm.vue_vue_type_script_setup_true_lang-DU9j1Q8M.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 }, Le = /* @__PURE__ */ q({
|
|
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
|
+
])) : K("", !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: Le,
|
|
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 ze() {
|
|
137
|
+
const { updateRecipe: h, deleteRecipe: p } = G(), y = A(), { t: a } = H();
|
|
138
138
|
async function s(u, d) {
|
|
139
139
|
const n = O(d);
|
|
140
140
|
if (u === Y.Edit) {
|
|
@@ -192,20 +192,20 @@ function Le() {
|
|
|
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} (${j(l.amount)}${((g = l.measurement) == null ? void 0 : g.abbrev) ?? ((r = t == null ? void 0 : t.unit) == null ? void 0 : r.abbrev)})` : `${t.name} (${j(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" }, je = {
|
|
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
|
+
}, qe = {
|
|
206
206
|
key: 0,
|
|
207
207
|
class: "flex flex-col items-center w-full h-full gap-24"
|
|
208
|
-
},
|
|
208
|
+
}, He = { key: 1 }, Ke = { class: "mt-32" }, Ge = /* @__PURE__ */ q({
|
|
209
209
|
__name: "RecipeForm",
|
|
210
210
|
props: {
|
|
211
211
|
mode: {},
|
|
@@ -215,7 +215,7 @@ const Ye = { class: "flex flex-col gap-40" }, qe = {
|
|
|
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 } = H(), 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" }, qe = {
|
|
|
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] = (L) => f.value = L),
|
|
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" }, qe = {
|
|
|
313
313
|
_: 1
|
|
314
314
|
})
|
|
315
315
|
]),
|
|
316
|
-
e.mode !== b(V).CREATE ? (x(), $("div",
|
|
316
|
+
e.mode !== b(V).CREATE ? (x(), $("div", je, [
|
|
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" }, qe = {
|
|
|
323
323
|
disabled: g.value
|
|
324
324
|
}, null, 8, ["modelValue", "disabled"])
|
|
325
325
|
]),
|
|
326
|
-
g.value ? (x(), $("div",
|
|
326
|
+
g.value ? (x(), $("div", qe, [
|
|
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", He, [
|
|
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"])) : K("", !0)
|
|
339
339
|
]))
|
|
340
|
-
])) :
|
|
341
|
-
R("div",
|
|
340
|
+
])) : K("", !0),
|
|
341
|
+
R("div", Ke, [
|
|
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" }, qe = {
|
|
|
350
350
|
}, 512);
|
|
351
351
|
};
|
|
352
352
|
}
|
|
353
|
-
}), Oe = { class: "flex gap-4" }, Je = /* @__PURE__ */
|
|
353
|
+
}), Oe = { class: "flex gap-4" }, Je = /* @__PURE__ */ q({
|
|
354
354
|
__name: "RecipeDialog",
|
|
355
355
|
props: {
|
|
356
356
|
show: { type: Boolean },
|
|
@@ -359,7 +359,7 @@ const Ye = { class: "flex flex-col gap-40" }, qe = {
|
|
|
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 } = H(), 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
|
+
j(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
|
+
j(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__ */ q({
|
|
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 } = ze(), 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 } = H();
|
|
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, L, J, Q, W, z, 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: (L = (w = D.recipe) == null ? void 0 : w.getContext) == null ? void 0 : L.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 = (z = D.ingredients) == null ? void 0 : z.getContext) == null ? void 0 : X.call(z)
|
|
588
588
|
}, null, 8, ["render", "props"])
|
|
589
589
|
])
|
|
590
590
|
])
|
|
@@ -1,18 +1,17 @@
|
|
|
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, O as lt, f as Te, h as it, a as Ue, F as Le, P as ut, Q as Be, j as de, K as ct, t as xe, N as De, A as dt, M as mt, L as fe, T as pt, V as te, W as vt, X as Ne, m as ft, J as yt, Y as _t, Z as kt, $ as Qe, a0 as q, a1 as ht, s as Xe, a2 as ke, a3 as gt, a4 as bt, o as Ae, l as ze, p as xt, c as St, a5 as Ft, a6 as wt, a7 as $t, a8 as At, a9 as Ct, B as Vt, _ as Mt, C as Bt, E as Dt, G as Ye } from "./app-BmsY87Mv.js";
|
|
3
|
+
import { u as Pe, a as Ee } from "./stock-C-hm8Kdq.js";
|
|
4
|
+
import { g as Se } from "./decimal-Baw9w4_A.js";
|
|
5
|
+
import { e as jt, u as Ze, i as et, _ as Ke } from "./PremiumBadge.vue_vue_type_script_setup_true_lang-CdxCyEBi.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 It } from "./PreviewBadge.vue_vue_type_script_setup_true_lang-CRZiQHjx.js";
|
|
8
|
+
import { useI18n as ue, useCoreStore as Tt } from "@feedmepos/mf-common";
|
|
9
|
+
import { useSnackbar as ye, useDialog as nt, useProxiedModel as He, useBreakpoints as Ut } from "@feedmepos/ui-library";
|
|
10
|
+
import { defineStore as Pt } from "pinia";
|
|
11
|
+
import { u as Et } from "./use-inventory-binding-dialog-dV-92pLe.js";
|
|
12
|
+
import { _ as Ht } from "./NumberPrecisionInput.vue_vue_type_script_setup_true_lang-BH4A_Lc5.js";
|
|
13
|
+
import { E as Rt } from "./empty-placeholder-wf6-BWE8.js";
|
|
14
14
|
import "./array-hChJVZLE.js";
|
|
15
|
-
import { u as Rt } from "./feature-CifIpcNk.js";
|
|
16
15
|
var he = /* @__PURE__ */ ((f) => (f.History = "History", f.Convert = "Convert", f.Adjust = "Adjust", f))(he || {});
|
|
17
16
|
const Ot = [
|
|
18
17
|
{
|
|
@@ -46,7 +45,7 @@ async function Nt(f) {
|
|
|
46
45
|
/ /g,
|
|
47
46
|
"_"
|
|
48
47
|
)}_${lt().format("DD_MM_YYYY_HHmm")}.xlsx`;
|
|
49
|
-
await
|
|
48
|
+
await jt(
|
|
50
49
|
[
|
|
51
50
|
{
|
|
52
51
|
name: "stock",
|
|
@@ -172,14 +171,14 @@ const zt = { class: "fm-typo-en-body-md-400 flex-grow" }, ot = /* @__PURE__ */ i
|
|
|
172
171
|
__name: "StockHeaderPreview",
|
|
173
172
|
setup(f) {
|
|
174
173
|
const { t: y } = ue();
|
|
175
|
-
return (l, o) => (A(), Y(
|
|
174
|
+
return (l, o) => (A(), Y(It, null, {
|
|
176
175
|
default: D(() => [
|
|
177
176
|
t("div", Yt, h(r(y)("inventory.stock.prediction.daysRemaining")), 1)
|
|
178
177
|
]),
|
|
179
178
|
_: 1
|
|
180
179
|
}));
|
|
181
180
|
}
|
|
182
|
-
}), st =
|
|
181
|
+
}), st = Pt("stockActions", () => {
|
|
183
182
|
const f = O(!1), y = pe(), l = Pe(), o = Ze(), S = ye(), _ = nt(), { t: d } = ue();
|
|
184
183
|
async function m() {
|
|
185
184
|
if (y._currentLocation) {
|
|
@@ -208,11 +207,11 @@ const zt = { class: "fm-typo-en-body-md-400 flex-grow" }, ot = /* @__PURE__ */ i
|
|
|
208
207
|
return;
|
|
209
208
|
}
|
|
210
209
|
const V = {
|
|
211
|
-
maxCount: ((P = l.productBalance.find(({ id:
|
|
210
|
+
maxCount: ((P = l.productBalance.find(({ id: E }) => E === i._id)) == null ? void 0 : P.count) || 0,
|
|
212
211
|
sku: i,
|
|
213
212
|
show: !0,
|
|
214
|
-
"onUpdate:show"(
|
|
215
|
-
w.value.show =
|
|
213
|
+
"onUpdate:show"(E) {
|
|
214
|
+
w.value.show = E;
|
|
216
215
|
},
|
|
217
216
|
onSubmitted() {
|
|
218
217
|
m();
|
|
@@ -384,7 +383,7 @@ const Gt = { class: "flex items-center" }, Jt = { class: "fm-typo-en-title-md-80
|
|
|
384
383
|
},
|
|
385
384
|
emits: ["update:show", "submitted"],
|
|
386
385
|
setup(f, { expose: y, emit: l }) {
|
|
387
|
-
const o = f, S = l, _ =
|
|
386
|
+
const o = f, S = l, _ = Et(), d = Ue(), m = Ee(), w = ye(), { t: x } = ue(), a = O(0), n = O(null), F = U(() => d.skus), C = U(
|
|
388
387
|
() => {
|
|
389
388
|
var p, e;
|
|
390
389
|
return (((e = (p = o.sku) == null ? void 0 : p.convert) == null ? void 0 : e.inventoryBindings) ?? []).filter(
|
|
@@ -467,7 +466,7 @@ const Gt = { class: "flex items-center" }, Jt = { class: "fm-typo-en-title-md-80
|
|
|
467
466
|
(e = (p = P.value) == null ? void 0 : p.resetInputs) == null || e.call(p);
|
|
468
467
|
}
|
|
469
468
|
});
|
|
470
|
-
const
|
|
469
|
+
const E = He(o, "show");
|
|
471
470
|
async function Z(p, e, s) {
|
|
472
471
|
i.value = !0;
|
|
473
472
|
try {
|
|
@@ -506,7 +505,7 @@ const Gt = { class: "flex items-center" }, Jt = { class: "fm-typo-en-title-md-80
|
|
|
506
505
|
const e = F.value.find((s) => s._id === p);
|
|
507
506
|
return e ? tt(e.unit, !0) : [];
|
|
508
507
|
}
|
|
509
|
-
function
|
|
508
|
+
function H(p, e) {
|
|
510
509
|
const s = N(p), v = s.find((u) => u.value === e) ?? s.find((u) => u.value === null);
|
|
511
510
|
return v ? {
|
|
512
511
|
...v,
|
|
@@ -550,8 +549,8 @@ const Gt = { class: "flex items-center" }, Jt = { class: "fm-typo-en-title-md-80
|
|
|
550
549
|
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");
|
|
551
550
|
return A(), Y(oe, {
|
|
552
551
|
"dismiss-away": "",
|
|
553
|
-
modelValue: r(
|
|
554
|
-
"onUpdate:modelValue": e[3] || (e[3] = (T) => Ie(
|
|
552
|
+
modelValue: r(E),
|
|
553
|
+
"onUpdate:modelValue": e[3] || (e[3] = (T) => Ie(E) ? E.value = T : null),
|
|
555
554
|
"max-width": 500
|
|
556
555
|
}, {
|
|
557
556
|
"side-sheet-header": D(() => [
|
|
@@ -647,7 +646,7 @@ const Gt = { class: "flex items-center" }, Jt = { class: "fm-typo-en-title-md-80
|
|
|
647
646
|
disabled: i.value,
|
|
648
647
|
class: "translate-y-[2px]",
|
|
649
648
|
items: N(T.id),
|
|
650
|
-
"model-value": (re =
|
|
649
|
+
"model-value": (re = H(T.id, (se = T.measurement) == null ? void 0 : se.id)) == null ? void 0 : re.value,
|
|
651
650
|
"onUpdate:modelValue": (Q) => K(T.id, Q, n.value ?? []),
|
|
652
651
|
invalid: z
|
|
653
652
|
}, {
|
|
@@ -856,7 +855,7 @@ const Me = {
|
|
|
856
855
|
},
|
|
857
856
|
emits: ["update:show", "submitted"],
|
|
858
857
|
setup(f, { expose: y, emit: l }) {
|
|
859
|
-
const o = f, S = l, _ = Ue(), d = nt(), m =
|
|
858
|
+
const o = f, S = l, _ = Ue(), d = nt(), m = Ee(), w = ye(), x = O(!1), { t: a } = ue();
|
|
860
859
|
function n() {
|
|
861
860
|
i(Te(k));
|
|
862
861
|
}
|
|
@@ -875,7 +874,7 @@ const Me = {
|
|
|
875
874
|
($ = (V = F.value) == null ? void 0 : V.resetInputs) == null || $.call(V);
|
|
876
875
|
}
|
|
877
876
|
});
|
|
878
|
-
const C =
|
|
877
|
+
const C = He(o, "show"), k = at({
|
|
879
878
|
remark: "",
|
|
880
879
|
adjustments: [
|
|
881
880
|
{
|
|
@@ -905,9 +904,9 @@ const Me = {
|
|
|
905
904
|
try {
|
|
906
905
|
await m.adjustSku({
|
|
907
906
|
remark: V.remark,
|
|
908
|
-
adjustments: V.adjustments.map(({ doc: $, remark: B, type: P, amount:
|
|
907
|
+
adjustments: V.adjustments.map(({ doc: $, remark: B, type: P, amount: E, measurement: Z }) => ({
|
|
909
908
|
id: $._id,
|
|
910
|
-
amount:
|
|
909
|
+
amount: E,
|
|
911
910
|
measurement: Z,
|
|
912
911
|
remark: B,
|
|
913
912
|
doc: $,
|
|
@@ -951,10 +950,10 @@ const Me = {
|
|
|
951
950
|
}
|
|
952
951
|
}).onPrimary((B) => {
|
|
953
952
|
k.adjustments = B.map(
|
|
954
|
-
(P) => k.adjustments.find((
|
|
953
|
+
(P) => k.adjustments.find((E) => E.doc._id === P) ?? {
|
|
955
954
|
id: `sku_${(/* @__PURE__ */ new Date()).toISOString()}_${Math.random().toString(16).slice(2, 8)}`,
|
|
956
955
|
type: te.enum.PURCHASE,
|
|
957
|
-
doc: _.skus.find((
|
|
956
|
+
doc: _.skus.find((E) => E._id === P),
|
|
958
957
|
measurement: null,
|
|
959
958
|
remark: "",
|
|
960
959
|
amount: fe(1)
|
|
@@ -966,7 +965,7 @@ const Me = {
|
|
|
966
965
|
k.adjustments.splice(V, 1);
|
|
967
966
|
}
|
|
968
967
|
return (V, $) => {
|
|
969
|
-
const B = M("FmTextarea"), P = M("FmButton"),
|
|
968
|
+
const B = M("FmTextarea"), P = M("FmButton"), E = M("FmForm"), Z = M("FmSideSheet");
|
|
970
969
|
return A(), Y(Z, {
|
|
971
970
|
modelValue: r(C),
|
|
972
971
|
"onUpdate:modelValue": $[2] || ($[2] = (G) => Ie(C) ? C.value = G : null),
|
|
@@ -979,7 +978,7 @@ const Me = {
|
|
|
979
978
|
])
|
|
980
979
|
]),
|
|
981
980
|
default: D(() => [
|
|
982
|
-
g(
|
|
981
|
+
g(E, {
|
|
983
982
|
class: "w-full flex flex-col gap-12",
|
|
984
983
|
ref_key: "formRef",
|
|
985
984
|
ref: F,
|
|
@@ -1003,8 +1002,8 @@ const Me = {
|
|
|
1003
1002
|
(A(!0), R(X, null, le(k.adjustments, (G, N) => (A(), Y(mn, {
|
|
1004
1003
|
key: G.id,
|
|
1005
1004
|
modelValue: k.adjustments[N],
|
|
1006
|
-
"onUpdate:modelValue": (
|
|
1007
|
-
"onClick:delete": (
|
|
1005
|
+
"onUpdate:modelValue": (H) => k.adjustments[N] = H,
|
|
1006
|
+
"onClick:delete": (H) => L(N)
|
|
1008
1007
|
}, null, 8, ["modelValue", "onUpdate:modelValue", "onClick:delete"]))), 128))
|
|
1009
1008
|
]),
|
|
1010
1009
|
_: 1
|
|
@@ -1016,8 +1015,8 @@ const Me = {
|
|
|
1016
1015
|
label: r(a)("inventory.stock.adjust.adjustButton"),
|
|
1017
1016
|
loading: x.value,
|
|
1018
1017
|
onClick: $[1] || ($[1] = (G) => {
|
|
1019
|
-
var N,
|
|
1020
|
-
return (
|
|
1018
|
+
var N, H;
|
|
1019
|
+
return (H = (N = F.value) == null ? void 0 : N.validateInputs) == null ? void 0 : H.call(N);
|
|
1021
1020
|
})
|
|
1022
1021
|
}, null, 8, ["label", "loading"])
|
|
1023
1022
|
])
|
|
@@ -1260,10 +1259,10 @@ function Dn(f, y) {
|
|
|
1260
1259
|
precision: 4
|
|
1261
1260
|
})} ${y.unit.abbrev}`) : null;
|
|
1262
1261
|
}
|
|
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" },
|
|
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" }, En = {
|
|
1264
1263
|
key: 0,
|
|
1265
1264
|
class: "flex-1 flex flex-col items-center gap-16"
|
|
1266
|
-
},
|
|
1265
|
+
}, Hn = { class: "fm-typo-en-body-lg-400 translate-x-4" }, Rn = {
|
|
1267
1266
|
key: 1,
|
|
1268
1267
|
class: "flex flex-col gap-12"
|
|
1269
1268
|
}, On = { class: "pb-16" }, Ln = { class: "fm-typo-cn-body-lg-600" }, Nn = {
|
|
@@ -1283,7 +1282,7 @@ const jn = { class: "flex items-center w-full fm-typo-en-title-md-800" }, In = {
|
|
|
1283
1282
|
},
|
|
1284
1283
|
emits: ["update:show"],
|
|
1285
1284
|
setup(f) {
|
|
1286
|
-
const y =
|
|
1285
|
+
const y = Tt(), l = Pe(), o = Ee(), S = hn(), _ = pe(), d = St(), { t: m } = ue(), w = f, x = O(!1), a = ye(), n = O(gt(0));
|
|
1287
1286
|
async function F() {
|
|
1288
1287
|
x.value = !0;
|
|
1289
1288
|
try {
|
|
@@ -1305,7 +1304,7 @@ const jn = { class: "flex items-center w-full fm-typo-en-title-md-800" }, In = {
|
|
|
1305
1304
|
});
|
|
1306
1305
|
const C = O([]), k = O([]), i = O(new Array());
|
|
1307
1306
|
function j(e, s) {
|
|
1308
|
-
return s === "day" ?
|
|
1307
|
+
return s === "day" ? Ct(e) : Xe(e);
|
|
1309
1308
|
}
|
|
1310
1309
|
function L(e, s) {
|
|
1311
1310
|
const v = e.reduce(
|
|
@@ -1326,8 +1325,8 @@ const jn = { class: "flex items-center w-full fm-typo-en-title-md-800" }, In = {
|
|
|
1326
1325
|
async function V() {
|
|
1327
1326
|
let e = await o.readStockAdjustment(
|
|
1328
1327
|
w.sku._id,
|
|
1329
|
-
|
|
1330
|
-
|
|
1328
|
+
Ft(new Date(n.value.startDate)).toISOString(),
|
|
1329
|
+
wt(new Date(n.value.endDate)).toISOString()
|
|
1331
1330
|
);
|
|
1332
1331
|
C.value = e;
|
|
1333
1332
|
const s = e.filter(({ ref: v }) => v == null ? void 0 : v.startsWith("bill_")).map(({ ref: v }) => v);
|
|
@@ -1351,7 +1350,7 @@ const jn = { class: "flex items-center w-full fm-typo-en-title-md-800" }, In = {
|
|
|
1351
1350
|
}), P = U(() => {
|
|
1352
1351
|
const e = C.value, s = w.sku;
|
|
1353
1352
|
return Dn(e, s);
|
|
1354
|
-
}),
|
|
1353
|
+
}), E = U(() => {
|
|
1355
1354
|
const e = [...C.value].computeFirst((v) => {
|
|
1356
1355
|
var c, b;
|
|
1357
1356
|
const u = (b = (c = v.skus) == null ? void 0 : c.find) == null ? void 0 : b.call(c, (I) => I.sku._id === w.sku._id);
|
|
@@ -1401,13 +1400,13 @@ const jn = { class: "flex items-center w-full fm-typo-en-title-md-800" }, In = {
|
|
|
1401
1400
|
return ke(s, !1, s.precision);
|
|
1402
1401
|
});
|
|
1403
1402
|
function N() {
|
|
1404
|
-
const { startDate: e, endDate: s } =
|
|
1403
|
+
const { startDate: e, endDate: s } = $t(n.value);
|
|
1405
1404
|
e !== null && s !== null && (n.value = {
|
|
1406
1405
|
startDate: e,
|
|
1407
1406
|
endDate: s
|
|
1408
1407
|
});
|
|
1409
1408
|
}
|
|
1410
|
-
const
|
|
1409
|
+
const H = U(() => w.sku.valuation === ze.Enum.FIFO ? m("inventory.ingredient.valuationMethod.FIFO") : m("inventory.ingredient.valuationMethod.WAVG")), K = U(() => {
|
|
1411
1410
|
var I, J, oe, T;
|
|
1412
1411
|
const e = [...C.value].reverse().computeFirst((z) => {
|
|
1413
1412
|
var W, se;
|
|
@@ -1438,13 +1437,13 @@ const jn = { class: "flex items-center w-full fm-typo-en-title-md-800" }, In = {
|
|
|
1438
1437
|
} : "No data";
|
|
1439
1438
|
});
|
|
1440
1439
|
function me() {
|
|
1441
|
-
const { startDate: e, endDate: s } =
|
|
1440
|
+
const { startDate: e, endDate: s } = At(n.value);
|
|
1442
1441
|
e !== null && s !== null && (n.value = {
|
|
1443
1442
|
startDate: e,
|
|
1444
1443
|
endDate: s
|
|
1445
1444
|
});
|
|
1446
1445
|
}
|
|
1447
|
-
const p =
|
|
1446
|
+
const p = He(w, "show");
|
|
1448
1447
|
return (e, s) => {
|
|
1449
1448
|
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");
|
|
1450
1449
|
return A(), Y(re, {
|
|
@@ -1503,10 +1502,10 @@ const jn = { class: "flex items-center w-full fm-typo-en-title-md-800" }, In = {
|
|
|
1503
1502
|
"prepend-icon": "navigate_next"
|
|
1504
1503
|
})
|
|
1505
1504
|
]),
|
|
1506
|
-
x.value ? (A(), R("div",
|
|
1505
|
+
x.value ? (A(), R("div", En, [
|
|
1507
1506
|
g(b),
|
|
1508
1507
|
g(I, { size: "xl" }),
|
|
1509
|
-
t("div",
|
|
1508
|
+
t("div", Hn, h(r(m)("inventory.stock.history.loading")), 1),
|
|
1510
1509
|
g(b),
|
|
1511
1510
|
g(b)
|
|
1512
1511
|
])) : k.value && ((Q = k.value) == null ? void 0 : Q.length) > 0 ? (A(), R("div", Rn, [
|
|
@@ -1565,7 +1564,7 @@ const jn = { class: "flex items-center w-full fm-typo-en-title-md-800" }, In = {
|
|
|
1565
1564
|
]),
|
|
1566
1565
|
t("div", mo, [
|
|
1567
1566
|
t("div", po, h(r(m)("inventory.stock.history.summary.openingBalance")), 1),
|
|
1568
|
-
t("div", vo, h(
|
|
1567
|
+
t("div", vo, h(E.value), 1)
|
|
1569
1568
|
]),
|
|
1570
1569
|
t("div", fo, [
|
|
1571
1570
|
t("div", yo, h(r(m)("inventory.stock.history.summary.lastStockBalance")), 1),
|
|
@@ -1583,7 +1582,7 @@ const jn = { class: "flex items-center w-full fm-typo-en-title-md-800" }, In = {
|
|
|
1583
1582
|
g(oe, {
|
|
1584
1583
|
variant: "plain",
|
|
1585
1584
|
placement: "top",
|
|
1586
|
-
content: `[${
|
|
1585
|
+
content: `[${H.value}] ${r(m)("inventory.stock.history.estimatedValueTooltip")}`,
|
|
1587
1586
|
"z-index": 50
|
|
1588
1587
|
}, {
|
|
1589
1588
|
default: D(() => [
|
|
@@ -1668,7 +1667,7 @@ const jn = { class: "flex items-center w-full fm-typo-en-title-md-800" }, In = {
|
|
|
1668
1667
|
g(b),
|
|
1669
1668
|
t("div", null, [
|
|
1670
1669
|
t("img", {
|
|
1671
|
-
src: r(
|
|
1670
|
+
src: r(Rt),
|
|
1672
1671
|
alt: "List is empty"
|
|
1673
1672
|
}, null, 8, Co)
|
|
1674
1673
|
]),
|
|
@@ -1684,7 +1683,7 @@ const jn = { class: "flex items-center w-full fm-typo-en-title-md-800" }, In = {
|
|
|
1684
1683
|
}, 8, ["modelValue"]);
|
|
1685
1684
|
};
|
|
1686
1685
|
}
|
|
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" },
|
|
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" }, Jo = /* @__PURE__ */ ie({
|
|
1688
1687
|
__name: "StockView",
|
|
1689
1688
|
setup(f) {
|
|
1690
1689
|
const { t: y } = ue(), l = Ue(), o = pe(), S = Pe(), _ = st(), d = Ze(), { columnDefs: m } = Wt();
|
|
@@ -1708,11 +1707,11 @@ const jn = { class: "flex items-center w-full fm-typo-en-title-md-800" }, In = {
|
|
|
1708
1707
|
}
|
|
1709
1708
|
const n = U(
|
|
1710
1709
|
() => l.skus.map(($) => {
|
|
1711
|
-
var G, N,
|
|
1710
|
+
var G, N, H;
|
|
1712
1711
|
const B = $.trackingMeasurement;
|
|
1713
1712
|
let P = (N = (G = S.stockBalance.skus) == null ? void 0 : G.find(
|
|
1714
1713
|
(K) => K.id === $._id
|
|
1715
|
-
)) == null ? void 0 : N.balance,
|
|
1714
|
+
)) == null ? void 0 : N.balance, E = d.inventoryForecast.skus.find(
|
|
1716
1715
|
(K) => K.id === $._id
|
|
1717
1716
|
);
|
|
1718
1717
|
return {
|
|
@@ -1721,11 +1720,11 @@ const jn = { class: "flex items-center w-full fm-typo-en-title-md-800" }, In = {
|
|
|
1721
1720
|
amount: 0,
|
|
1722
1721
|
precision: 0
|
|
1723
1722
|
},
|
|
1724
|
-
day: (
|
|
1725
|
-
trackingUnitAbbrev: B ? ((
|
|
1723
|
+
day: (E == null ? void 0 : E.depletionDays) ?? void 0,
|
|
1724
|
+
trackingUnitAbbrev: B ? ((H = $.unit.measurements.find((K) => K.id === B)) == null ? void 0 : H.abbrev) ?? "" : $.unit.abbrev
|
|
1726
1725
|
};
|
|
1727
1726
|
})
|
|
1728
|
-
), F = O(""), { breakpoints: C } =
|
|
1727
|
+
), F = O(""), { breakpoints: C } = Ut(), k = U(() => C.value.xs || C.value.sm), i = U(() => k.value ? 10 : 20), j = Vt(), L = U(() => [
|
|
1729
1728
|
{
|
|
1730
1729
|
label: y("inventory.common.refresh"),
|
|
1731
1730
|
value: "refresh"
|
|
@@ -1745,13 +1744,13 @@ const jn = { class: "flex items-center w-full fm-typo-en-title-md-800" }, In = {
|
|
|
1745
1744
|
}
|
|
1746
1745
|
return ($, B) => {
|
|
1747
1746
|
const P = M("FmTable");
|
|
1748
|
-
return A(), Y(
|
|
1747
|
+
return A(), Y(Mt, {
|
|
1749
1748
|
title: r(y)("inventory.stock.title"),
|
|
1750
1749
|
actions: L.value,
|
|
1751
1750
|
"onClick:action": V
|
|
1752
1751
|
}, {
|
|
1753
1752
|
default: D(() => {
|
|
1754
|
-
var
|
|
1753
|
+
var E, Z, G, N;
|
|
1755
1754
|
return [
|
|
1756
1755
|
t("div", {
|
|
1757
1756
|
class: ge([
|
|
@@ -1762,11 +1761,11 @@ const jn = { class: "flex items-center w-full fm-typo-en-title-md-800" }, In = {
|
|
|
1762
1761
|
}
|
|
1763
1762
|
])
|
|
1764
1763
|
}, [
|
|
1765
|
-
g(
|
|
1764
|
+
g(Bt, {
|
|
1766
1765
|
searchable: "",
|
|
1767
1766
|
"change-location": "",
|
|
1768
1767
|
search: F.value,
|
|
1769
|
-
"onUpdate:search": B[0] || (B[0] = (
|
|
1768
|
+
"onUpdate:search": B[0] || (B[0] = (H) => F.value = H)
|
|
1770
1769
|
}, null, 8, ["search"]),
|
|
1771
1770
|
(A(), Y(P, {
|
|
1772
1771
|
style: Je(r(j).tableHeight),
|
|
@@ -1774,13 +1773,13 @@ const jn = { class: "flex items-center w-full fm-typo-en-title-md-800" }, In = {
|
|
|
1774
1773
|
"row-data": n.value,
|
|
1775
1774
|
"search-value": F.value,
|
|
1776
1775
|
loading: w.value || !r(o)._currentLocation,
|
|
1777
|
-
key: (
|
|
1778
|
-
onRowClick: B[1] || (B[1] = (
|
|
1776
|
+
key: (E = r(o)._currentLocation) == null ? void 0 : E.dbName,
|
|
1777
|
+
onRowClick: B[1] || (B[1] = (H) => r(_).showSkuHistory(H.original)),
|
|
1779
1778
|
"page-size": i.value
|
|
1780
1779
|
}, {
|
|
1781
|
-
"list-row": D((
|
|
1782
|
-
g(
|
|
1783
|
-
row:
|
|
1780
|
+
"list-row": D((H) => [
|
|
1781
|
+
g(Dt, {
|
|
1782
|
+
row: H,
|
|
1784
1783
|
onRowClick: r(_).showSkuHistory
|
|
1785
1784
|
}, {
|
|
1786
1785
|
default: D((K) => {
|
|
@@ -1803,16 +1802,16 @@ const jn = { class: "flex items-center w-full fm-typo-en-title-md-800" }, In = {
|
|
|
1803
1802
|
]),
|
|
1804
1803
|
t("div", null, [
|
|
1805
1804
|
g(je, {
|
|
1806
|
-
days:
|
|
1805
|
+
days: H.original.day
|
|
1807
1806
|
}, null, 8, ["days"])
|
|
1808
1807
|
]),
|
|
1809
1808
|
t("div", null, [
|
|
1810
1809
|
g(ot, {
|
|
1811
1810
|
class: "xs:w-[160px]",
|
|
1812
|
-
unit:
|
|
1813
|
-
sku:
|
|
1814
|
-
amount:
|
|
1815
|
-
"default-tracking-measurement":
|
|
1811
|
+
unit: H.original.unit,
|
|
1812
|
+
sku: H.original,
|
|
1813
|
+
amount: H.original.balance,
|
|
1814
|
+
"default-tracking-measurement": H.original.trackingMeasurement ?? void 0
|
|
1816
1815
|
}, null, 8, ["unit", "sku", "amount", "default-tracking-measurement"])
|
|
1817
1816
|
])
|
|
1818
1817
|
])
|
|
@@ -1837,5 +1836,5 @@ const jn = { class: "flex items-center w-full fm-typo-en-title-md-800" }, In = {
|
|
|
1837
1836
|
}
|
|
1838
1837
|
});
|
|
1839
1838
|
export {
|
|
1840
|
-
|
|
1839
|
+
Jo as default
|
|
1841
1840
|
};
|