@feedmepos/mf-inventory-portal 1.2.11 → 1.2.12-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-BCVrJ7-x.js → App-T4sL7Sy4.js} +44 -40
- package/dist/{ApprovalView-BMEzgj9q.js → ApprovalView-CfmNwkYs.js} +30 -30
- package/dist/{BindingsDialog-Do_UsSE4.js → BindingsDialog-DDYAQsNs.js} +2 -2
- package/dist/{BindingsPicker-CFUwkcKX.js → BindingsPicker-CXZhlZ4b.js} +1 -1
- package/dist/{BindingsTable-a7rhi6MZ.js → BindingsTable-LQ59h-NA.js} +1 -1
- package/dist/{ClosingDraftView-Dv4lj9E7.js → ClosingDraftView-B1J4RCvY.js} +180 -180
- package/dist/{ClosingTemplateView-BRX45M7h.js → ClosingTemplateView-6NoqcDMF.js} +3 -3
- package/dist/{DeliveryOrderPrintPreview-CwMX74nM.js → DeliveryOrderPrintPreview--XMB1yg_.js} +1 -1
- package/dist/{FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-CL3yU8XA.js → FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-BXxGymbF.js} +3 -3
- package/dist/{FmMultiselectDialog-BiLym6fH.js → FmMultiselectDialog-DPPNjHO8.js} +1 -1
- package/dist/{FmUnitInput.vue_vue_type_script_setup_true_lang-BAGo4_1C.js → FmUnitInput.vue_vue_type_script_setup_true_lang-CSgYZv-j.js} +39 -39
- package/dist/ImportView-ClHIcxRw.js +1195 -0
- package/dist/{IngredientBindedItem.vue_vue_type_script_setup_true_lang-BIImtfdR.js → IngredientBindedItem.vue_vue_type_script_setup_true_lang-tUefDFh2.js} +1 -1
- package/dist/{IngredientGroupView-CLVfJFTD.js → IngredientGroupView-BjtjeGay.js} +16 -17
- package/dist/IngredientsView-BA6Y-uhX.js +2240 -0
- package/dist/{IntegrationView-Crm8R-cF.js → IntegrationView-D8HiAM5K.js} +57 -57
- package/dist/{InventoryBindingForm-DQeaxeQX.js → InventoryBindingForm-DCtBdWkM.js} +1 -1
- package/dist/{InventoryBindingForm.vue_vue_type_script_setup_true_lang-yQZC9peR.js → InventoryBindingForm.vue_vue_type_script_setup_true_lang-RxoPehX0.js} +31 -31
- package/dist/{InventoryBindingSummary-DUiYadJR.js → InventoryBindingSummary-DGLMoDKd.js} +1 -1
- package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-DOpF4cSz.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-D0ElZcnn.js} +1 -1
- package/dist/{PremiumBadge.vue_vue_type_script_setup_true_lang-DFjhh2P6.js → PremiumBadge.vue_vue_type_script_setup_true_lang-BNm3V8o4.js} +1 -1
- package/dist/{PublishView-D3FS3ioY.js → PublishView-DQcrQkVJ.js} +16 -16
- package/dist/{PurchaseOrderPrintPreview-ByURcesK.js → PurchaseOrderPrintPreview-1NMEozJD.js} +1 -1
- package/dist/{ReceiveRequestView-mt0ja21g.js → ReceiveRequestView-BFs8VYre.js} +193 -194
- package/dist/RecipeView-DgF_kShy.js +636 -0
- package/dist/{StockView-C9erE0Vu.js → StockView-B80E0r1r.js} +165 -166
- package/dist/{SubsidiaryTreeDialog.vue_vue_type_script_setup_true_lang-BC1mwDJX.js → SubsidiaryTreeDialog.vue_vue_type_script_setup_true_lang-CFFDw9Mj.js} +1 -1
- package/dist/{SupplierView-C_NMItXg.js → SupplierView-E_fX8cgQ.js} +52 -52
- package/dist/TransferDetails.vue_vue_type_script_setup_true_lang-Bxl2Gege.js +3221 -0
- package/dist/{TransferTemplateView-DOVDiF7-.js → TransferTemplateView-B-uBdQgp.js} +97 -97
- package/dist/UnitView-DOIy_8oz.js +674 -0
- package/dist/{WarehouseView-lz2uVygR.js → WarehouseView-DZSetx-S.js} +32 -32
- package/dist/api/inventory.d.ts +306 -0
- package/dist/api/purchase-order.d.ts +1 -0
- package/dist/{app-D0bYbsGd.js → app-CLG8lnmY.js} +8810 -8475
- package/dist/app.d.ts +169 -0
- package/dist/app.js +1 -1
- package/dist/{closing-template-CrxsMQM1.js → closing-template-CHz79DOu.js} +1 -1
- package/dist/{decimal-OP8pLXox.js → decimal-BNFgzHyV.js} +1 -1
- package/dist/{format-unit-display-AxULhwcM.js → format-unit-display-DYY0F6KV.js} +25 -25
- package/dist/helper/number.d.ts +1 -0
- package/dist/import-export.helper-uZNU9S1q.js +243 -0
- package/dist/{index-BZumsz4L.js → index-Bu7FmfHi.js} +1 -1
- package/dist/{index-DwPtx2QV.js → index-DiYSFnk1.js} +1 -1
- package/dist/{purchase-order-template-BO_iyudu.js → purchase-order-template-DtfKTZLV.js} +1 -1
- package/dist/router/name.d.ts +1 -0
- package/dist/{stock-DZbjPfvD.js → stock-RE6RExO9.js} +1 -1
- package/dist/stores/feature.d.ts +2 -0
- package/dist/stores/inventory.d.ts +26 -199
- package/dist/{supplier-CcKZR4JV.js → supplier-DkLAGLl7.js} +1 -1
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/{use-ingredient-select-dialog-DgZXbr91.js → use-ingredient-select-dialog-Bg_kT9z-.js} +1 -1
- package/dist/{use-inventory-binding-dialog-xJk-GAkH.js → use-inventory-binding-dialog-CpS4GfwM.js} +1 -1
- package/dist/views/import/ImportView.vue.d.ts +3 -0
- package/dist/views/import/components/ImportDialog.vue.d.ts +2 -0
- package/dist/views/import/helper/import-export.helper.d.ts +4 -0
- package/dist/views/ingredients/helper/import-export.helper.d.ts +3 -1
- package/dist/views/receive-request/components/delivery-order-form/SystemTrailDialog.vue.d.ts +17 -0
- package/dist/views/recipe/RecipeView.vue.d.ts +1 -0
- package/dist/views/recipe/components/import-recipes/ImportRecipeItem.vue.d.ts +16 -0
- package/dist/views/recipe/components/import-recipes/ImportRecipes.vue.d.ts +2 -0
- package/dist/views/recipe/helper/import-recipe.d.ts +48 -0
- package/dist/views/unit/UnitView.vue.d.ts +1 -0
- package/dist/views/unit/components/import-units/ImportUnitItem.vue.d.ts +12 -0
- package/dist/views/unit/components/import-units/ImportUnitItemProps.d.ts +6 -0
- package/dist/views/unit/components/import-units/ImportUnits.vue.d.ts +9 -0
- package/dist/views/unit/components/import-units/ImportUnitsProps.d.ts +5 -0
- package/dist/views/unit/helper/import-export.helper.d.ts +40 -0
- package/package.json +1 -1
- package/dist/IngredientsView-DETE0BaL.js +0 -2475
- package/dist/RecipeView-B04R5lQ1.js +0 -621
- package/dist/TransferDetails.vue_vue_type_script_setup_true_lang-Cts9z9LO.js +0 -3057
- package/dist/UnitView-BVOtZ1eJ.js +0 -667
- package/dist/array-Ca8T3f_G.js +0 -44
|
@@ -1,26 +1,25 @@
|
|
|
1
|
-
import { defineComponent as ce, ref as N, computed as H, resolveComponent as D, openBlock as F, createBlock as
|
|
2
|
-
import { u as ve,
|
|
3
|
-
import { u as Oe, a as _e } from "./stock-
|
|
4
|
-
import { g as we } from "./decimal-
|
|
5
|
-
import { e as Lt, u as st, i as at, _ as
|
|
6
|
-
import { _ as Te, S as
|
|
1
|
+
import { defineComponent as ce, ref as N, computed as H, resolveComponent as D, openBlock as F, createBlock as G, withCtx as I, createElementVNode as e, normalizeClass as he, toDisplayString as _, createVNode as k, createElementBlock as O, Fragment as Z, renderList as ie, unref as u, h as pe, watch as xe, isRef as Ue, createCommentVNode as te, reactive as ut, mergeModels as Ke, useModel as ct, onMounted as Ee, createTextVNode as ue, normalizeStyle as tt, Teleport as dt, normalizeProps as Ae, mergeProps as Ve } from "vue";
|
|
2
|
+
import { u as ve, a0 as mt, f as He, h as Pe, i as pt, a as Re, F as We, a1 as vt, x as je, l as me, X as ft, t as Se, $ as Fe, A as yt, M as _t, Z as ye, a2 as bt, a3 as ne, a4 as kt, a5 as qe, p as gt, v as ht, a6 as xt, a7 as St, a8 as Ft, a9 as Ce, aa as wt, ab as nt, Y as X, ac as $t, W as ot, ad as ke, ae as At, af as Vt, r as Me, o as Xe, s as Ct, c as Mt, ag as Bt, ah as Dt, ai as It, aj as jt, ak as Tt, b as Ut, N as Et, H as Ht, C as Pt, E as Rt, G as Ot, I as Nt, J as Je } from "./app-CLG8lnmY.js";
|
|
3
|
+
import { u as Oe, a as _e } from "./stock-RE6RExO9.js";
|
|
4
|
+
import { g as we } from "./decimal-BNFgzHyV.js";
|
|
5
|
+
import { e as Lt, u as st, i as at, _ as Qe } from "./PremiumBadge.vue_vue_type_script_setup_true_lang-BNm3V8o4.js";
|
|
6
|
+
import { _ as Te, S as Be, g as lt, a as zt } from "./SubsidiaryTreeDialog.vue_vue_type_script_setup_true_lang-CFFDw9Mj.js";
|
|
7
7
|
import { _ as Yt } from "./PreviewBadge.vue_vue_type_script_setup_true_lang-CRZiQHjx.js";
|
|
8
8
|
import { useI18n as de, useCoreStore as Ne } from "@feedmepos/mf-common";
|
|
9
|
-
import { useSnackbar as be, useDialog as Le, useProxiedModel as ze, useBreakpoints as
|
|
10
|
-
import { defineStore as
|
|
11
|
-
import { u as Wt } from "./use-inventory-binding-dialog-
|
|
12
|
-
import { _ as qt } from "./NumberPrecisionInput.vue_vue_type_script_setup_true_lang-
|
|
9
|
+
import { useSnackbar as be, useDialog as Le, useProxiedModel as ze, useBreakpoints as Gt } from "@feedmepos/ui-library";
|
|
10
|
+
import { defineStore as Kt } from "pinia";
|
|
11
|
+
import { u as Wt } from "./use-inventory-binding-dialog-CpS4GfwM.js";
|
|
12
|
+
import { _ as qt } from "./NumberPrecisionInput.vue_vue_type_script_setup_true_lang-D0ElZcnn.js";
|
|
13
13
|
import { E as Xt } from "./empty-placeholder-wf6-BWE8.js";
|
|
14
|
-
import "./array-Ca8T3f_G.js";
|
|
15
14
|
var ge = /* @__PURE__ */ ((b) => (b.History = "History", b.Convert = "Convert", b.Adjust = "Adjust", b))(ge || {});
|
|
16
|
-
const
|
|
15
|
+
const Jt = [
|
|
17
16
|
{
|
|
18
17
|
translationKey: "inventory.stock.action.history",
|
|
19
18
|
color: "text-neutral-700",
|
|
20
19
|
value: "History"
|
|
21
20
|
/* History */
|
|
22
21
|
}
|
|
23
|
-
],
|
|
22
|
+
], Qt = [
|
|
24
23
|
{
|
|
25
24
|
translationKey: "inventory.stock.action.history",
|
|
26
25
|
color: "text-neutral-700",
|
|
@@ -136,7 +135,7 @@ const en = { class: "fm-typo-en-body-md-400 flex-grow" }, rt = /* @__PURE__ */ c
|
|
|
136
135
|
), x = N(!1);
|
|
137
136
|
return (C, c) => {
|
|
138
137
|
const l = D("FmIcon"), v = D("FmMenuItem"), $ = D("FmMenu");
|
|
139
|
-
return F(),
|
|
138
|
+
return F(), G($, {
|
|
140
139
|
"stop-click-propagation": "",
|
|
141
140
|
onMenuChanged: c[0] || (c[0] = (A) => x.value = A)
|
|
142
141
|
}, {
|
|
@@ -156,7 +155,7 @@ const en = { class: "fm-typo-en-body-md-400 flex-grow" }, rt = /* @__PURE__ */ c
|
|
|
156
155
|
], 2)
|
|
157
156
|
]),
|
|
158
157
|
default: I(() => [
|
|
159
|
-
(F(!0), O(Z, null, ie(h.value, (A) => (F(),
|
|
158
|
+
(F(!0), O(Z, null, ie(h.value, (A) => (F(), G(v, {
|
|
160
159
|
key: A.value ?? 0,
|
|
161
160
|
label: A.label,
|
|
162
161
|
"model-value": d(A),
|
|
@@ -171,14 +170,14 @@ const en = { class: "fm-typo-en-body-md-400 flex-grow" }, rt = /* @__PURE__ */ c
|
|
|
171
170
|
__name: "StockHeaderPreview",
|
|
172
171
|
setup(b) {
|
|
173
172
|
const { t: g } = de();
|
|
174
|
-
return (p, o) => (F(),
|
|
173
|
+
return (p, o) => (F(), G(Yt, null, {
|
|
175
174
|
default: I(() => [
|
|
176
175
|
e("div", tn, _(u(g)("inventory.stock.prediction.daysRemaining")), 1)
|
|
177
176
|
]),
|
|
178
177
|
_: 1
|
|
179
178
|
}));
|
|
180
179
|
}
|
|
181
|
-
}), it =
|
|
180
|
+
}), it = Kt("stockActions", () => {
|
|
182
181
|
const b = N(!1), g = ve(), p = Oe(), o = st(), j = be(), h = Le(), { t: d } = de();
|
|
183
182
|
async function i() {
|
|
184
183
|
if (g._currentLocation) {
|
|
@@ -198,8 +197,8 @@ const en = { class: "fm-typo-en-body-md-400 flex-grow" }, rt = /* @__PURE__ */ c
|
|
|
198
197
|
}
|
|
199
198
|
const x = N();
|
|
200
199
|
async function C(V) {
|
|
201
|
-
var
|
|
202
|
-
if (!!!((
|
|
200
|
+
var M, B, E;
|
|
201
|
+
if (!!!((B = (M = V.convert) == null ? void 0 : M.inventoryBindings) != null && B.length)) {
|
|
203
202
|
h.open({
|
|
204
203
|
title: d("inventory.stock.error.convert.title"),
|
|
205
204
|
message: d("inventory.stock.error.convert.message")
|
|
@@ -331,7 +330,7 @@ function on() {
|
|
|
331
330
|
return pe(Te, {
|
|
332
331
|
days: i
|
|
333
332
|
});
|
|
334
|
-
const c = i <= x ?
|
|
333
|
+
const c = i <= x ? Be.low : i <= C ? Be.mid : Be.high;
|
|
335
334
|
return pe(Te, {
|
|
336
335
|
days: i,
|
|
337
336
|
level: c
|
|
@@ -344,7 +343,7 @@ function on() {
|
|
|
344
343
|
cell(d) {
|
|
345
344
|
var i;
|
|
346
345
|
return pt(
|
|
347
|
-
((i = b._currentLocation) == null ? void 0 : i.type) === "restaurant" ?
|
|
346
|
+
((i = b._currentLocation) == null ? void 0 : i.type) === "restaurant" ? Jt : Qt,
|
|
348
347
|
(x) => g.onActionMenu(x, d.row.original)
|
|
349
348
|
);
|
|
350
349
|
},
|
|
@@ -423,7 +422,7 @@ const an = { class: "flex items-center" }, ln = { class: "fm-typo-en-title-md-80
|
|
|
423
422
|
y && (c.value = 0);
|
|
424
423
|
});
|
|
425
424
|
function n() {
|
|
426
|
-
|
|
425
|
+
Q(o.sku, Se(c.value), l.value);
|
|
427
426
|
}
|
|
428
427
|
function r(y) {
|
|
429
428
|
if (l.value)
|
|
@@ -439,7 +438,7 @@ const an = { class: "flex items-center" }, ln = { class: "fm-typo-en-title-md-80
|
|
|
439
438
|
}) ?? null : null, s = je(o.sku.unit, t), f = bt(+y);
|
|
440
439
|
return Ze(f).isInteger().max(s).error ? "Precision cannot be more than " + s : !0;
|
|
441
440
|
}
|
|
442
|
-
const
|
|
441
|
+
const M = H(
|
|
443
442
|
() => {
|
|
444
443
|
var y, t;
|
|
445
444
|
return (y = o.sku.convert) != null && y.measurement ? (t = o.sku.unit.measurements.find((s) => {
|
|
@@ -447,7 +446,7 @@ const an = { class: "flex items-center" }, ln = { class: "fm-typo-en-title-md-80
|
|
|
447
446
|
return s.id === ((f = o.sku.convert) == null ? void 0 : f.measurement);
|
|
448
447
|
})) == null ? void 0 : t.abbrev : o.sku.unit.abbrev;
|
|
449
448
|
}
|
|
450
|
-
),
|
|
449
|
+
), B = H(() => {
|
|
451
450
|
var f, m;
|
|
452
451
|
const t = vt({
|
|
453
452
|
bindings: ((f = o.sku.convert) == null ? void 0 : f.inventoryBindings) ?? [],
|
|
@@ -458,15 +457,15 @@ const an = { class: "flex items-center" }, ln = { class: "fm-typo-en-title-md-80
|
|
|
458
457
|
return (m = l.value ?? t) == null ? void 0 : m.map((a) => {
|
|
459
458
|
var ae, re, q, ee, Ye;
|
|
460
459
|
const S = d.skus.find((fe) => fe._id === a.id), U = ((ae = a.measurement) == null ? void 0 : ae.abbrev) ?? ((re = S == null ? void 0 : S.unit) == null ? void 0 : re.abbrev), z = (q = o.sku.convert) != null && q.measurement ? o.sku.unit.measurements.find((fe) => {
|
|
461
|
-
var
|
|
462
|
-
return fe.id === ((
|
|
460
|
+
var Ge;
|
|
461
|
+
return fe.id === ((Ge = o.sku.convert) == null ? void 0 : Ge.measurement);
|
|
463
462
|
}) ?? null : null, se = je(o.sku.unit, z), T = w(`${c.value}`) === !0 ? me(
|
|
464
463
|
ft(
|
|
465
464
|
a.amount,
|
|
466
465
|
Se(+c.value, se)
|
|
467
466
|
),
|
|
468
467
|
!1
|
|
469
|
-
) : "0",
|
|
468
|
+
) : "0", K = (Ye = (ee = l.value) == null ? void 0 : ee.find((fe) => fe.id === (S == null ? void 0 : S._id))) == null ? void 0 : Ye.amount, W = K ? me(K, !1) : null;
|
|
470
469
|
return {
|
|
471
470
|
sku: S,
|
|
472
471
|
convertAmount: W ?? T,
|
|
@@ -489,7 +488,7 @@ const an = { class: "flex items-center" }, ln = { class: "fm-typo-en-title-md-80
|
|
|
489
488
|
}
|
|
490
489
|
});
|
|
491
490
|
const P = ze(o, "show");
|
|
492
|
-
async function
|
|
491
|
+
async function Q(y, t, s) {
|
|
493
492
|
V.value = !0;
|
|
494
493
|
try {
|
|
495
494
|
await i.convertSku({
|
|
@@ -518,7 +517,7 @@ const an = { class: "flex items-center" }, ln = { class: "fm-typo-en-title-md-80
|
|
|
518
517
|
V.value = !1;
|
|
519
518
|
}
|
|
520
519
|
}
|
|
521
|
-
function
|
|
520
|
+
function J(y, t, s) {
|
|
522
521
|
const f = +t;
|
|
523
522
|
let m = s;
|
|
524
523
|
t.length > 0 && isFinite(f) ? m = s.map((a) => (a.id !== y || (a.amount = ye(f)), a)) : m = s.map((a) => (a.id !== y || (a.amount = { amount: 0, precision: 0 }), a)), l.value = m;
|
|
@@ -569,7 +568,7 @@ const an = { class: "flex items-center" }, ln = { class: "fm-typo-en-title-md-80
|
|
|
569
568
|
}
|
|
570
569
|
), (y, t) => {
|
|
571
570
|
const s = D("FmTextField"), f = D("FmForm"), m = D("FmCard"), a = D("FmSwitch"), S = D("FmFormGroup"), U = D("FmSelect"), z = D("FmButton"), se = D("FmSideSheet");
|
|
572
|
-
return F(),
|
|
571
|
+
return F(), G(se, {
|
|
573
572
|
"dismiss-away": "",
|
|
574
573
|
modelValue: u(P),
|
|
575
574
|
"onUpdate:modelValue": t[3] || (t[3] = (T) => Ue(P) ? P.value = T : null),
|
|
@@ -594,8 +593,8 @@ const an = { class: "flex items-center" }, ln = { class: "fm-typo-en-title-md-80
|
|
|
594
593
|
"onUpdate:modelValue": t[0] || (t[0] = (T) => c.value = T),
|
|
595
594
|
label: u(C)("inventory.stock.convert.amount"),
|
|
596
595
|
rules: [r, w, u(Fe)(0)],
|
|
597
|
-
"append-text":
|
|
598
|
-
"helper-text": l.value ? void 0 : `Max ${y.maxCount} ${
|
|
596
|
+
"append-text": M.value,
|
|
597
|
+
"helper-text": l.value ? void 0 : `Max ${y.maxCount} ${M.value}`
|
|
599
598
|
}, null, 8, ["disabled", "model-value", "label", "rules", "append-text", "helper-text"])
|
|
600
599
|
]),
|
|
601
600
|
_: 1
|
|
@@ -607,10 +606,10 @@ const an = { class: "flex items-center" }, ln = { class: "fm-typo-en-title-md-80
|
|
|
607
606
|
default: I(() => [
|
|
608
607
|
e("div", un, [
|
|
609
608
|
e("div", cn, _(u(C)("inventory.stock.convert.deductionSummary")), 1),
|
|
610
|
-
(F(!0), O(Z, null, ie(
|
|
611
|
-
var
|
|
609
|
+
(F(!0), O(Z, null, ie(B.value, (T) => {
|
|
610
|
+
var K, W;
|
|
612
611
|
return F(), O("div", {
|
|
613
|
-
key: (
|
|
612
|
+
key: (K = T.sku) == null ? void 0 : K._id,
|
|
614
613
|
class: "flex items-center"
|
|
615
614
|
}, [
|
|
616
615
|
e("div", dn, _((W = T.sku) == null ? void 0 : W.name), 1),
|
|
@@ -638,19 +637,19 @@ const an = { class: "flex items-center" }, ln = { class: "fm-typo-en-title-md-80
|
|
|
638
637
|
}, null, 8, ["modelValue", "rules"]),
|
|
639
638
|
e("div", vn, [
|
|
640
639
|
e("div", fn, _(u(C)("inventory.stock.convert.ingredients")), 1),
|
|
641
|
-
(F(!0), O(Z, null, ie(l.value, (T) => (F(),
|
|
640
|
+
(F(!0), O(Z, null, ie(l.value, (T) => (F(), G(S, {
|
|
642
641
|
key: T.id,
|
|
643
642
|
disabled: V.value,
|
|
644
643
|
modelValue: +u(me)(T.amount ?? { amount: 1, precision: 0 }),
|
|
645
644
|
rules: [
|
|
646
645
|
u(_t)(
|
|
647
|
-
v.value.find((
|
|
646
|
+
v.value.find((K) => K._id === T.id).unit,
|
|
648
647
|
T.measurement
|
|
649
648
|
),
|
|
650
649
|
u(Fe)(0)
|
|
651
650
|
]
|
|
652
651
|
}, {
|
|
653
|
-
default: I(({ invalid:
|
|
652
|
+
default: I(({ invalid: K }) => {
|
|
654
653
|
var W, ae, re;
|
|
655
654
|
return [
|
|
656
655
|
e("div", yn, [
|
|
@@ -661,8 +660,8 @@ const an = { class: "flex items-center" }, ln = { class: "fm-typo-en-title-md-80
|
|
|
661
660
|
modelValue: +u(me)(
|
|
662
661
|
T.amount ?? { amount: 1, precision: 0 }
|
|
663
662
|
),
|
|
664
|
-
"onUpdate:modelValue": (q) =>
|
|
665
|
-
invalid:
|
|
663
|
+
"onUpdate:modelValue": (q) => J(T.id, q, l.value ?? []),
|
|
664
|
+
invalid: K
|
|
666
665
|
}, null, 8, ["disabled", "modelValue", "onUpdate:modelValue", "invalid"]),
|
|
667
666
|
k(U, {
|
|
668
667
|
disabled: V.value,
|
|
@@ -670,7 +669,7 @@ const an = { class: "flex items-center" }, ln = { class: "fm-typo-en-title-md-80
|
|
|
670
669
|
items: R(T.id),
|
|
671
670
|
"model-value": (re = oe(T.id, (ae = T.measurement) == null ? void 0 : ae.id)) == null ? void 0 : re.value,
|
|
672
671
|
"onUpdate:modelValue": (q) => L(T.id, q, l.value ?? []),
|
|
673
|
-
invalid:
|
|
672
|
+
invalid: K
|
|
674
673
|
}, {
|
|
675
674
|
"helper-text": I(() => t[4] || (t[4] = [])),
|
|
676
675
|
_: 2
|
|
@@ -709,8 +708,8 @@ const an = { class: "flex items-center" }, ln = { class: "fm-typo-en-title-md-80
|
|
|
709
708
|
loading: V.value,
|
|
710
709
|
label: u(C)("inventory.stock.convert.convertButton"),
|
|
711
710
|
onClick: t[2] || (t[2] = (T) => {
|
|
712
|
-
var
|
|
713
|
-
return (W = (
|
|
711
|
+
var K, W;
|
|
712
|
+
return (W = (K = E.value) == null ? void 0 : K.validateInputs) == null ? void 0 : W.call(K);
|
|
714
713
|
})
|
|
715
714
|
}, null, 8, ["loading", "label"])
|
|
716
715
|
])
|
|
@@ -815,7 +814,7 @@ const Ie = {
|
|
|
815
814
|
});
|
|
816
815
|
return (c, l) => {
|
|
817
816
|
const v = D("FmButton"), $ = D("FmSelect"), A = D("FmTextarea"), V = D("FmCard");
|
|
818
|
-
return F(),
|
|
817
|
+
return F(), G(V, {
|
|
819
818
|
variant: "outlined",
|
|
820
819
|
class: "grid grid-cols-2 gap-8 p-16"
|
|
821
820
|
}, {
|
|
@@ -884,16 +883,16 @@ const Ie = {
|
|
|
884
883
|
const v = N();
|
|
885
884
|
g({
|
|
886
885
|
validateInputs: () => {
|
|
887
|
-
var w,
|
|
888
|
-
(
|
|
886
|
+
var w, M;
|
|
887
|
+
(M = (w = v.value) == null ? void 0 : w.validateInputs) == null || M.call(w);
|
|
889
888
|
},
|
|
890
889
|
resetInputsValidation: () => {
|
|
891
|
-
var w,
|
|
892
|
-
(
|
|
890
|
+
var w, M;
|
|
891
|
+
(M = (w = v.value) == null ? void 0 : w.resetInputsValidation) == null || M.call(w);
|
|
893
892
|
},
|
|
894
893
|
resetInputs: () => {
|
|
895
|
-
var w,
|
|
896
|
-
(
|
|
894
|
+
var w, M;
|
|
895
|
+
(M = (w = v.value) == null ? void 0 : w.resetInputs) == null || M.call(w);
|
|
897
896
|
}
|
|
898
897
|
});
|
|
899
898
|
const $ = ze(o, "show"), A = ut({
|
|
@@ -926,37 +925,37 @@ const Ie = {
|
|
|
926
925
|
try {
|
|
927
926
|
await i.adjustSku({
|
|
928
927
|
remark: w.remark,
|
|
929
|
-
adjustments: w.adjustments.map(({ doc:
|
|
930
|
-
id:
|
|
928
|
+
adjustments: w.adjustments.map(({ doc: M, remark: B, type: E, amount: P, measurement: Q }) => ({
|
|
929
|
+
id: M._id,
|
|
931
930
|
amount: P,
|
|
932
|
-
measurement:
|
|
933
|
-
remark:
|
|
934
|
-
doc:
|
|
931
|
+
measurement: Q,
|
|
932
|
+
remark: B,
|
|
933
|
+
doc: M,
|
|
935
934
|
type: E
|
|
936
935
|
}))
|
|
937
936
|
}), j("update:show", !1), j("submitted");
|
|
938
|
-
} catch (
|
|
937
|
+
} catch (M) {
|
|
939
938
|
x.open({
|
|
940
939
|
title: c("inventory.stock.adjust.error.title"),
|
|
941
940
|
message: c("inventory.stock.adjust.error.message"),
|
|
942
941
|
type: "error"
|
|
943
|
-
}), console.log("error on adjust ingredients", w,
|
|
942
|
+
}), console.log("error on adjust ingredients", w, M);
|
|
944
943
|
} finally {
|
|
945
944
|
C.value = !1;
|
|
946
945
|
}
|
|
947
946
|
}
|
|
948
947
|
function n() {
|
|
949
|
-
const w = h.skus.map((
|
|
950
|
-
label:
|
|
951
|
-
sublabel:
|
|
952
|
-
value:
|
|
953
|
-
})),
|
|
948
|
+
const w = h.skus.map((B) => ({
|
|
949
|
+
label: B.name,
|
|
950
|
+
sublabel: B.code,
|
|
951
|
+
value: B._id
|
|
952
|
+
})), M = w.filter((B) => A.adjustments.find((E) => E.doc._id === B.value)).map((B) => B.value);
|
|
954
953
|
d.open({
|
|
955
954
|
title: "Select ingredients",
|
|
956
955
|
contentComponent: ht,
|
|
957
956
|
contentComponentProps: {
|
|
958
957
|
items: w,
|
|
959
|
-
modelValue:
|
|
958
|
+
modelValue: M
|
|
960
959
|
},
|
|
961
960
|
overlay: !0,
|
|
962
961
|
closeButton: !0,
|
|
@@ -970,8 +969,8 @@ const Ie = {
|
|
|
970
969
|
close: !0,
|
|
971
970
|
variant: "tertiary"
|
|
972
971
|
}
|
|
973
|
-
}).onPrimary((
|
|
974
|
-
A.adjustments =
|
|
972
|
+
}).onPrimary((B) => {
|
|
973
|
+
A.adjustments = B.map(
|
|
975
974
|
(E) => A.adjustments.find((P) => P.doc._id === E) ?? {
|
|
976
975
|
id: `sku_${(/* @__PURE__ */ new Date()).toISOString()}_${Math.random().toString(16).slice(2, 8)}`,
|
|
977
976
|
type: ne.enum.PURCHASE,
|
|
@@ -986,11 +985,11 @@ const Ie = {
|
|
|
986
985
|
function r(w) {
|
|
987
986
|
A.adjustments.splice(w, 1);
|
|
988
987
|
}
|
|
989
|
-
return (w,
|
|
990
|
-
const
|
|
991
|
-
return F(),
|
|
988
|
+
return (w, M) => {
|
|
989
|
+
const B = D("FmTextarea"), E = D("FmButton"), P = D("FmForm"), Q = D("FmSideSheet");
|
|
990
|
+
return F(), G(Q, {
|
|
992
991
|
modelValue: u($),
|
|
993
|
-
"onUpdate:modelValue":
|
|
992
|
+
"onUpdate:modelValue": M[2] || (M[2] = (J) => Ue($) ? $.value = J : null),
|
|
994
993
|
"dismiss-away": "",
|
|
995
994
|
"max-width": 500
|
|
996
995
|
}, {
|
|
@@ -1007,10 +1006,10 @@ const Ie = {
|
|
|
1007
1006
|
onValidationSuccess: l
|
|
1008
1007
|
}, {
|
|
1009
1008
|
default: I(() => [
|
|
1010
|
-
k(
|
|
1009
|
+
k(B, {
|
|
1011
1010
|
label: u(c)("inventory.stock.adjust.remark"),
|
|
1012
1011
|
modelValue: A.remark,
|
|
1013
|
-
"onUpdate:modelValue":
|
|
1012
|
+
"onUpdate:modelValue": M[0] || (M[0] = (J) => A.remark = J)
|
|
1014
1013
|
}, null, 8, ["label", "modelValue"]),
|
|
1015
1014
|
e("div", wn, [
|
|
1016
1015
|
e("div", $n, _(u(c)("inventory.stock.adjust.adjustedItems")), 1),
|
|
@@ -1021,8 +1020,8 @@ const Ie = {
|
|
|
1021
1020
|
onClick: n
|
|
1022
1021
|
})
|
|
1023
1022
|
]),
|
|
1024
|
-
(F(!0), O(Z, null, ie(A.adjustments, (
|
|
1025
|
-
key:
|
|
1023
|
+
(F(!0), O(Z, null, ie(A.adjustments, (J, R) => (F(), G(xn, {
|
|
1024
|
+
key: J.id,
|
|
1026
1025
|
modelValue: A.adjustments[R],
|
|
1027
1026
|
"onUpdate:modelValue": (oe) => A.adjustments[R] = oe,
|
|
1028
1027
|
"onClick:delete": (oe) => r(R)
|
|
@@ -1036,7 +1035,7 @@ const Ie = {
|
|
|
1036
1035
|
k(E, {
|
|
1037
1036
|
label: u(c)("inventory.stock.adjust.adjustButton"),
|
|
1038
1037
|
loading: C.value,
|
|
1039
|
-
onClick:
|
|
1038
|
+
onClick: M[1] || (M[1] = (J) => {
|
|
1040
1039
|
var R, oe;
|
|
1041
1040
|
return (oe = (R = v.value) == null ? void 0 : R.validateInputs) == null ? void 0 : oe.call(R);
|
|
1042
1041
|
})
|
|
@@ -1064,18 +1063,18 @@ const Ie = {
|
|
|
1064
1063
|
};
|
|
1065
1064
|
return await g.post(h, d);
|
|
1066
1065
|
}
|
|
1067
|
-
})),
|
|
1066
|
+
})), Mn = {
|
|
1068
1067
|
key: 0,
|
|
1069
1068
|
class: "flex justify-center items-center h-32"
|
|
1070
|
-
},
|
|
1069
|
+
}, Bn = { class: "mb-3" }, Dn = { class: "flex flex-col gap-8" }, In = { class: "flex flex-col text-fm-color-typo-primary mb-3 text-center" }, jn = { class: "text-fm-color-neutral-gray-400 fm-typo-en-body-sm-600" }, Tn = { class: "flex flex-col gap-4 text-fm-color-typo-primary mb-3" }, Un = { class: "flex flex-col gap-4 text-fm-color-typo-primary mb-3" }, En = { class: "flex flex-col gap-4 text-fm-color-typo-primary mb-3" }, Hn = { class: "flex flex-col w-full px-2" }, Pn = { class: "flex gap-2" }, Rn = /* @__PURE__ */ ce({
|
|
1071
1070
|
__name: "AmendAdjustmentForm",
|
|
1072
|
-
props: /* @__PURE__ */
|
|
1071
|
+
props: /* @__PURE__ */ Ke({
|
|
1073
1072
|
adjustmentId: {}
|
|
1074
1073
|
}, {
|
|
1075
1074
|
modelValue: {},
|
|
1076
1075
|
modelModifiers: {}
|
|
1077
1076
|
}),
|
|
1078
|
-
emits: /* @__PURE__ */
|
|
1077
|
+
emits: /* @__PURE__ */ Ke(["refreshHistory"], ["update:modelValue"]),
|
|
1079
1078
|
setup(b, { emit: g }) {
|
|
1080
1079
|
const p = b, o = g, j = _e(), h = ct(b, "modelValue"), d = N(!1), i = N(!1), x = N(!1), C = N({
|
|
1081
1080
|
_id: `inventoryAdjustment_${(/* @__PURE__ */ new Date()).toISOString()}_XXXXX`,
|
|
@@ -1091,12 +1090,12 @@ const Ie = {
|
|
|
1091
1090
|
var r, w;
|
|
1092
1091
|
if ((w = (r = c == null ? void 0 : c.value) == null ? void 0 : r.validateInputs) == null || w.call(r), !i.value) return;
|
|
1093
1092
|
const n = {};
|
|
1094
|
-
Object.keys(h.value || {}).forEach((
|
|
1095
|
-
var
|
|
1096
|
-
Object.keys(((
|
|
1097
|
-
var
|
|
1098
|
-
const P = (
|
|
1099
|
-
P && $(P.amount) > 0 && (n[
|
|
1093
|
+
Object.keys(h.value || {}).forEach((M) => {
|
|
1094
|
+
var B;
|
|
1095
|
+
Object.keys(((B = h.value) == null ? void 0 : B[M]) || {}).forEach((E) => {
|
|
1096
|
+
var Q, J;
|
|
1097
|
+
const P = (J = (Q = h.value) == null ? void 0 : Q[M]) == null ? void 0 : J[Number(E)];
|
|
1098
|
+
P && $(P.amount) > 0 && (n[M] || (n[M] = []), n[M].push(P));
|
|
1100
1099
|
});
|
|
1101
1100
|
}), await j.revertWastageAdjustment({
|
|
1102
1101
|
targetWastageAdjustmentId: p.adjustmentId,
|
|
@@ -1106,18 +1105,18 @@ const Ie = {
|
|
|
1106
1105
|
function v(n, r, w) {
|
|
1107
1106
|
return H({
|
|
1108
1107
|
get: () => {
|
|
1109
|
-
var
|
|
1110
|
-
const
|
|
1111
|
-
return
|
|
1108
|
+
var B, E, P;
|
|
1109
|
+
const M = (P = (E = (B = h.value) == null ? void 0 : B[n]) == null ? void 0 : E[r]) == null ? void 0 : P.amount;
|
|
1110
|
+
return M ? $(M, !0) : 0;
|
|
1112
1111
|
},
|
|
1113
|
-
set: (
|
|
1112
|
+
set: (M) => {
|
|
1114
1113
|
h.value || (h.value = {});
|
|
1115
|
-
const
|
|
1116
|
-
|
|
1117
|
-
amount: Ce.fromNumber(
|
|
1114
|
+
const B = { ...h.value };
|
|
1115
|
+
B[n] || (B[n] = {}), B[n][r] = {
|
|
1116
|
+
amount: Ce.fromNumber(M),
|
|
1118
1117
|
type: ne.Enum.WASTAGE,
|
|
1119
1118
|
measurement: w
|
|
1120
|
-
}, h.value =
|
|
1119
|
+
}, h.value = B;
|
|
1121
1120
|
}
|
|
1122
1121
|
});
|
|
1123
1122
|
}
|
|
@@ -1132,8 +1131,8 @@ const Ie = {
|
|
|
1132
1131
|
return r === 0 ? "N/A" : (n + r).toString();
|
|
1133
1132
|
}
|
|
1134
1133
|
return (n, r) => {
|
|
1135
|
-
const w = D("FmIcon"),
|
|
1136
|
-
return F(),
|
|
1134
|
+
const w = D("FmIcon"), M = D("FmStepperField"), B = D("FmCard"), E = D("FmForm"), P = D("FmSpacer"), Q = D("FmButton"), J = D("FmDialog");
|
|
1135
|
+
return F(), G(J, {
|
|
1137
1136
|
modelValue: x.value,
|
|
1138
1137
|
"onUpdate:modelValue": r[4] || (r[4] = (R) => x.value = R),
|
|
1139
1138
|
overlay: !0
|
|
@@ -1162,14 +1161,14 @@ const Ie = {
|
|
|
1162
1161
|
r[13] || (r[13] = e("span", { class: "text-fm-color-system-warning-400 fm-typo-en-body-sm-400" }, "1. New adjustment EXTRA will be created for each reversal", -1)),
|
|
1163
1162
|
e("div", Pn, [
|
|
1164
1163
|
k(P),
|
|
1165
|
-
k(
|
|
1164
|
+
k(Q, {
|
|
1166
1165
|
class: "sm:w-full xs:w-full",
|
|
1167
1166
|
label: "Close",
|
|
1168
1167
|
size: "md",
|
|
1169
1168
|
variant: "tertiary",
|
|
1170
1169
|
onClick: r[3] || (r[3] = (R) => x.value = !1)
|
|
1171
1170
|
}),
|
|
1172
|
-
k(
|
|
1171
|
+
k(Q, {
|
|
1173
1172
|
class: "sm:w-full xs:w-full",
|
|
1174
1173
|
label: "Submit",
|
|
1175
1174
|
size: "md",
|
|
@@ -1180,7 +1179,7 @@ const Ie = {
|
|
|
1180
1179
|
])
|
|
1181
1180
|
]),
|
|
1182
1181
|
default: I(() => [
|
|
1183
|
-
d.value ? (F(), O("div",
|
|
1182
|
+
d.value ? (F(), O("div", Mn)) : (F(), G(E, {
|
|
1184
1183
|
key: 1,
|
|
1185
1184
|
ref_key: "formRef",
|
|
1186
1185
|
ref: c,
|
|
@@ -1193,14 +1192,14 @@ const Ie = {
|
|
|
1193
1192
|
blameFormChildOnValidationFailed: ""
|
|
1194
1193
|
}, {
|
|
1195
1194
|
default: I(() => [
|
|
1196
|
-
e("p",
|
|
1195
|
+
e("p", Bn, [
|
|
1197
1196
|
r[6] || (r[6] = e("b", null, "Date:", -1)),
|
|
1198
1197
|
r[7] || (r[7] = e("br", null, null, -1)),
|
|
1199
1198
|
ue(" " + _(u(St)(u(Ft)(C.value._id))), 1)
|
|
1200
1199
|
]),
|
|
1201
1200
|
e("div", Dn, [
|
|
1202
1201
|
(F(!0), O(Z, null, ie(C.value.skus, (R, oe) => (F(), O(Z, { key: oe }, [
|
|
1203
|
-
(F(!0), O(Z, null, ie(R.amounts, (L, Y) => (F(),
|
|
1202
|
+
(F(!0), O(Z, null, ie(R.amounts, (L, Y) => (F(), G(B, {
|
|
1204
1203
|
key: Y,
|
|
1205
1204
|
variant: "outlined",
|
|
1206
1205
|
class: "p-2"
|
|
@@ -1219,7 +1218,7 @@ const Ie = {
|
|
|
1219
1218
|
r[9] || (r[9] = e("span", { class: "fm-typo-en-body-lg-600" }, "Current amount:", -1)),
|
|
1220
1219
|
e("span", null, _(u(Ce).toFormatString({ value: L.amount })) + " " + _(A(R, L)), 1)
|
|
1221
1220
|
]),
|
|
1222
|
-
k(
|
|
1221
|
+
k(M, {
|
|
1223
1222
|
"model-value": v(R.sku._id, Y).value,
|
|
1224
1223
|
"onUpdate:modelValue": (le) => v(R.sku._id, Y).value = le,
|
|
1225
1224
|
class: "mb-3",
|
|
@@ -1255,16 +1254,16 @@ const Ie = {
|
|
|
1255
1254
|
}), On = { class: "p-16" }, Nn = { class: "fm-typo-en-body-md-600 flex-grow" }, Ln = { class: "flex-grow text-fm-color-typo-secondary" }, zn = {
|
|
1256
1255
|
key: 0,
|
|
1257
1256
|
class: "my-5"
|
|
1258
|
-
}, Yn = { class: "text-neutral-400" },
|
|
1257
|
+
}, Yn = { class: "text-neutral-400" }, Gn = { class: "flex-grow" }, Kn = { class: "flex gap-1" }, Wn = { class: "flex flex-col gap-1" }, qn = {
|
|
1259
1258
|
key: 1,
|
|
1260
1259
|
class: "t-system text-fsecondary"
|
|
1261
1260
|
}, Xn = {
|
|
1262
1261
|
key: 2,
|
|
1263
1262
|
class: "inline-flex items-center rounded-md bg-yellow-400/10 px-2 text-xs font-medium text-yellow-500 inset-ring inset-ring-yellow-400/20"
|
|
1264
|
-
},
|
|
1263
|
+
}, Jn = {
|
|
1265
1264
|
key: 1,
|
|
1266
1265
|
class: "shrink-0 text-fm-color-typo-secondary"
|
|
1267
|
-
},
|
|
1266
|
+
}, Qn = /* @__PURE__ */ ce({
|
|
1268
1267
|
__name: "StockRecordCard",
|
|
1269
1268
|
props: {
|
|
1270
1269
|
record: {},
|
|
@@ -1337,7 +1336,7 @@ const Ie = {
|
|
|
1337
1336
|
})));
|
|
1338
1337
|
return (c, l) => {
|
|
1339
1338
|
const v = D("FmIcon"), $ = D("FmTooltip"), A = D("FmCard");
|
|
1340
|
-
return F(),
|
|
1339
|
+
return F(), G(A, { variant: "outlined" }, {
|
|
1341
1340
|
default: I(() => [
|
|
1342
1341
|
e("div", On, [
|
|
1343
1342
|
e("div", {
|
|
@@ -1381,14 +1380,14 @@ const Ie = {
|
|
|
1381
1380
|
class: "flex gap-1 w-full"
|
|
1382
1381
|
}, [
|
|
1383
1382
|
e("div", Yn, _(V.time), 1),
|
|
1384
|
-
e("div",
|
|
1383
|
+
e("div", Gn, [
|
|
1385
1384
|
(F(!0), O(Z, null, ie(V.adjustments, (n) => (F(), O("div", {
|
|
1386
1385
|
key: n.name,
|
|
1387
1386
|
class: "flex gap-1"
|
|
1388
1387
|
}, [
|
|
1389
|
-
e("div",
|
|
1388
|
+
e("div", Kn, [
|
|
1390
1389
|
ue(_(u(x)(`inventory.inventoryAdjustment.type.${n.name}`)) + " ", 1),
|
|
1391
|
-
n.backdateFrom ? (F(),
|
|
1390
|
+
n.backdateFrom ? (F(), G($, {
|
|
1392
1391
|
key: 0,
|
|
1393
1392
|
variant: "plain",
|
|
1394
1393
|
placement: "top",
|
|
@@ -1418,12 +1417,12 @@ const Ie = {
|
|
|
1418
1417
|
"ml-auto": !0
|
|
1419
1418
|
})
|
|
1420
1419
|
}, _(n.amount), 3),
|
|
1421
|
-
n.name === u(ne).Enum.WASTAGE ? (F(),
|
|
1420
|
+
n.name === u(ne).Enum.WASTAGE ? (F(), G(Rn, {
|
|
1422
1421
|
key: 0,
|
|
1423
1422
|
adjustmentId: n.adjustmentId,
|
|
1424
1423
|
onRefreshHistory: l[1] || (l[1] = (r) => c.$emit("refreshHistory"))
|
|
1425
1424
|
}, null, 8, ["adjustmentId"])) : te("", !0),
|
|
1426
|
-
n.cost ? (F(), O("div",
|
|
1425
|
+
n.cost ? (F(), O("div", Jn, " (" + _(u(ke)(n.cost, !1, n.cost.precision)) + ") ", 1)) : te("", !0)
|
|
1427
1426
|
]))), 128))
|
|
1428
1427
|
])
|
|
1429
1428
|
]))), 128))
|
|
@@ -1503,13 +1502,13 @@ const to = { class: "flex items-center w-full fm-typo-en-title-md-800" }, no = {
|
|
|
1503
1502
|
}, uo = { class: "pb-16" }, co = { class: "fm-typo-cn-body-lg-600" }, mo = {
|
|
1504
1503
|
class: "grid gap-12 fm-typo-en-body-md-400",
|
|
1505
1504
|
style: { "grid-template-columns": "auto auto auto", "grid-auto-rows": "1fr" }
|
|
1506
|
-
}, po = { class: "flex flex-col gap-1" }, vo = { class: "text-fm-color-typo-secondary" }, fo = { class: "font-bold" }, yo = { class: "flex flex-col gap-1" }, _o = { class: "text-fm-color-typo-secondary flex" }, bo = { class: "font-bold" }, ko = { class: "flex flex-col gap-1" }, go = { class: "text-fm-color-typo-secondary" }, ho = { class: "font-bold" }, xo = { class: "flex flex-col gap-1" }, So = { class: "text-fm-color-typo-secondary" }, Fo = { class: "font-bold" }, wo = { class: "flex flex-col gap-1" }, $o = { class: "text-fm-color-typo-secondary" }, Ao = { class: "font-bold" }, Vo = { class: "flex flex-col gap-1" }, Co = { class: "text-fm-color-typo-secondary" },
|
|
1505
|
+
}, po = { class: "flex flex-col gap-1" }, vo = { class: "text-fm-color-typo-secondary" }, fo = { class: "font-bold" }, yo = { class: "flex flex-col gap-1" }, _o = { class: "text-fm-color-typo-secondary flex" }, bo = { class: "font-bold" }, ko = { class: "flex flex-col gap-1" }, go = { class: "text-fm-color-typo-secondary" }, ho = { class: "font-bold" }, xo = { class: "flex flex-col gap-1" }, So = { class: "text-fm-color-typo-secondary" }, Fo = { class: "font-bold" }, wo = { class: "flex flex-col gap-1" }, $o = { class: "text-fm-color-typo-secondary" }, Ao = { class: "font-bold" }, Vo = { class: "flex flex-col gap-1" }, Co = { class: "text-fm-color-typo-secondary" }, Mo = { class: "font-bold" }, Bo = { class: "flex flex-col gap-1" }, Do = { class: "text-fm-color-typo-secondary" }, Io = { class: "font-bold" }, jo = { class: "flex flex-col gap-1" }, To = { class: "text-fm-color-typo-secondary" }, Uo = { class: "font-bold" }, Eo = { class: "flex flex-col gap-1" }, Ho = { class: "text-fm-color-typo-secondary" }, Po = { class: "font-bold" }, Ro = {
|
|
1507
1506
|
key: 0,
|
|
1508
1507
|
class: "flex flex-col gap-8"
|
|
1509
|
-
}, Oo = { class: "flex" }, No = { class: "flex-1 flex flex-col gap-1" }, Lo = { class: "flex gap-1 items-center text-fm-color-typo-secondary" }, zo = { class: "font-bold" }, Yo = { class: "flex-1 flex flex-col gap-1" },
|
|
1508
|
+
}, Oo = { class: "flex" }, No = { class: "flex-1 flex flex-col gap-1" }, Lo = { class: "flex gap-1 items-center text-fm-color-typo-secondary" }, zo = { class: "font-bold" }, Yo = { class: "flex-1 flex flex-col gap-1" }, Go = { class: "flex gap-1 items-center text-fm-color-typo-secondary" }, Ko = { class: "flex flex-col gap-1" }, Wo = { class: "font-bold" }, qo = {
|
|
1510
1509
|
key: 2,
|
|
1511
1510
|
class: "flex-1 flex flex-col items-center gap-8"
|
|
1512
|
-
}, Xo = ["src"],
|
|
1511
|
+
}, Xo = ["src"], Jo = { class: "font-bold text-lg" }, Qo = { class: "text-xs text-neutral-400 text-center" }, Zo = /* @__PURE__ */ ce({
|
|
1513
1512
|
__name: "StockHistory",
|
|
1514
1513
|
props: {
|
|
1515
1514
|
sku: {},
|
|
@@ -1517,7 +1516,7 @@ const to = { class: "flex items-center w-full fm-typo-en-title-md-800" }, no = {
|
|
|
1517
1516
|
},
|
|
1518
1517
|
emits: ["update:show"],
|
|
1519
1518
|
setup(b) {
|
|
1520
|
-
const g = Ne(), p = Oe(), o = _e(), j = Cn(), h = ve(), d =
|
|
1519
|
+
const g = Ne(), p = Oe(), o = _e(), j = Cn(), h = ve(), d = Mt(), { t: i } = de(), x = b, C = N(!1), c = be(), l = N(At(0));
|
|
1521
1520
|
async function v() {
|
|
1522
1521
|
C.value = !0;
|
|
1523
1522
|
try {
|
|
@@ -1560,18 +1559,18 @@ const to = { class: "flex items-center w-full fm-typo-en-title-md-800" }, no = {
|
|
|
1560
1559
|
async function w() {
|
|
1561
1560
|
let t = await o.readStockAdjustment(
|
|
1562
1561
|
x.sku._id,
|
|
1563
|
-
|
|
1562
|
+
Bt(new Date(l.value.startDate)).toISOString(),
|
|
1564
1563
|
Dt(new Date(l.value.endDate)).toISOString()
|
|
1565
1564
|
);
|
|
1566
1565
|
$.value = t;
|
|
1567
1566
|
const s = t.filter(({ ref: f }) => f == null ? void 0 : f.startsWith("bill_")).map(({ ref: f }) => f);
|
|
1568
|
-
await
|
|
1567
|
+
await M(s), A.value = r(t, "day").map(({ date: f, adjustments: m }) => ({
|
|
1569
1568
|
date: f,
|
|
1570
1569
|
adjustments: m,
|
|
1571
1570
|
adjustmentsByTime: r(m, "minute")
|
|
1572
1571
|
}));
|
|
1573
1572
|
}
|
|
1574
|
-
async function
|
|
1573
|
+
async function M(t) {
|
|
1575
1574
|
t.length && (V.value = await j.findBillsById(t).catch((s) => {
|
|
1576
1575
|
var a;
|
|
1577
1576
|
console.error("Error on using latest bill API, retrying using legacy api", s);
|
|
@@ -1579,7 +1578,7 @@ const to = { class: "flex items-center w-full fm-typo-en-title-md-800" }, no = {
|
|
|
1579
1578
|
return j.findBillsByBusinessId(f, [m], t);
|
|
1580
1579
|
}));
|
|
1581
1580
|
}
|
|
1582
|
-
const
|
|
1581
|
+
const B = H(() => {
|
|
1583
1582
|
const t = $.value, s = x.sku;
|
|
1584
1583
|
return Zn(t, s);
|
|
1585
1584
|
}), E = H(() => {
|
|
@@ -1598,7 +1597,7 @@ const to = { class: "flex items-center w-full fm-typo-en-title-md-800" }, no = {
|
|
|
1598
1597
|
value: t,
|
|
1599
1598
|
precision: 4
|
|
1600
1599
|
})} ${s.unit.abbrev}` : "";
|
|
1601
|
-
}),
|
|
1600
|
+
}), Q = H(() => {
|
|
1602
1601
|
const t = [...$.value].reverse().computeFirst((f) => {
|
|
1603
1602
|
var a, S;
|
|
1604
1603
|
const m = (S = (a = f.skus) == null ? void 0 : a.find) == null ? void 0 : S.call(a, (U) => U.sku._id === x.sku._id);
|
|
@@ -1608,7 +1607,7 @@ const to = { class: "flex items-center w-full fm-typo-en-title-md-800" }, no = {
|
|
|
1608
1607
|
precision: 0
|
|
1609
1608
|
}, s = x.sku;
|
|
1610
1609
|
return s ? `${X.toFormatString({ value: t, precision: 4 })} ${s.unit.abbrev}` : "";
|
|
1611
|
-
}),
|
|
1610
|
+
}), J = H(() => {
|
|
1612
1611
|
var f;
|
|
1613
1612
|
const s = $.value.flatMap((m) => {
|
|
1614
1613
|
var a;
|
|
@@ -1629,7 +1628,7 @@ const to = { class: "flex items-center w-full fm-typo-en-title-md-800" }, no = {
|
|
|
1629
1628
|
{
|
|
1630
1629
|
amount: 0,
|
|
1631
1630
|
precision: 0,
|
|
1632
|
-
currency:
|
|
1631
|
+
currency: Me((f = g.currentCountry) == null ? void 0 : f.value)
|
|
1633
1632
|
}
|
|
1634
1633
|
);
|
|
1635
1634
|
return ke(s, !1, s.precision);
|
|
@@ -1643,9 +1642,9 @@ const to = { class: "flex items-center w-full fm-typo-en-title-md-800" }, no = {
|
|
|
1643
1642
|
}
|
|
1644
1643
|
const oe = H(() => x.sku.valuation === Xe.Enum.FIFO ? i("inventory.ingredient.valuationMethod.FIFO") : i("inventory.ingredient.valuationMethod.WAVG")), L = H(() => {
|
|
1645
1644
|
var U, z, se, T;
|
|
1646
|
-
const t = [...$.value].reverse().computeFirst((
|
|
1645
|
+
const t = [...$.value].reverse().computeFirst((K) => {
|
|
1647
1646
|
var W, ae;
|
|
1648
|
-
return (ae = (W =
|
|
1647
|
+
return (ae = (W = K.skus) == null ? void 0 : W.find) == null ? void 0 : ae.call(W, (re) => re.sku._id === x.sku._id);
|
|
1649
1648
|
});
|
|
1650
1649
|
if (!t) return "No data";
|
|
1651
1650
|
const s = [...t.amounts].reverse()[0], f = {
|
|
@@ -1654,7 +1653,7 @@ const to = { class: "flex items-center w-full fm-typo-en-title-md-800" }, no = {
|
|
|
1654
1653
|
}, m = s.amount, a = m.amount == 0 ? X.fromNumber(0) : X.divide([f, m]);
|
|
1655
1654
|
return {
|
|
1656
1655
|
...X.multiply([a, m]),
|
|
1657
|
-
currency: ((se = s.cost) == null ? void 0 : se.currency) ||
|
|
1656
|
+
currency: ((se = s.cost) == null ? void 0 : se.currency) || Me(((T = g.currentCountry) == null ? void 0 : T.value) ?? Ct)
|
|
1658
1657
|
};
|
|
1659
1658
|
}), Y = H(() => {
|
|
1660
1659
|
var f;
|
|
@@ -1668,7 +1667,7 @@ const to = { class: "flex items-center w-full fm-typo-en-title-md-800" }, no = {
|
|
|
1668
1667
|
amount: 0,
|
|
1669
1668
|
precision: 0
|
|
1670
1669
|
}),
|
|
1671
|
-
currency:
|
|
1670
|
+
currency: Me((f = g.currentCountry) == null ? void 0 : f.value)
|
|
1672
1671
|
} : "No data";
|
|
1673
1672
|
});
|
|
1674
1673
|
function le() {
|
|
@@ -1680,8 +1679,8 @@ const to = { class: "flex items-center w-full fm-typo-en-title-md-800" }, no = {
|
|
|
1680
1679
|
}
|
|
1681
1680
|
const y = ze(x, "show");
|
|
1682
1681
|
return (t, s) => {
|
|
1683
|
-
const f = D("FmButton"), m = D("FmField"), a = D("FmDateRangePicker"), S = D("FmSpacer"), U = D("FmCircularProgress"), z = D("FmIcon"), se = D("FmTooltip"), T = D("FmMenuDivider"),
|
|
1684
|
-
return F(),
|
|
1682
|
+
const f = D("FmButton"), m = D("FmField"), a = D("FmDateRangePicker"), S = D("FmSpacer"), U = D("FmCircularProgress"), z = D("FmIcon"), se = D("FmTooltip"), T = D("FmMenuDivider"), K = D("FmChip"), W = D("FmCardSection"), ae = D("FmCard"), re = D("FmSideSheet");
|
|
1683
|
+
return F(), G(re, {
|
|
1685
1684
|
"dismiss-away": "",
|
|
1686
1685
|
modelValue: u(y),
|
|
1687
1686
|
"onUpdate:modelValue": s[4] || (s[4] = (q) => Ue(y) ? y.value = q : null),
|
|
@@ -1754,12 +1753,12 @@ const to = { class: "flex items-center w-full fm-typo-en-title-md-800" }, no = {
|
|
|
1754
1753
|
e("div", mo, [
|
|
1755
1754
|
e("div", po, [
|
|
1756
1755
|
e("div", vo, _(u(i)("inventory.stock.history.summary.totalPurchase")), 1),
|
|
1757
|
-
e("div", fo, _(
|
|
1756
|
+
e("div", fo, _(B.value.PURCHASE), 1)
|
|
1758
1757
|
]),
|
|
1759
1758
|
e("div", yo, [
|
|
1760
1759
|
e("div", _o, [
|
|
1761
1760
|
ue(_(u(i)("inventory.stock.history.summary.totalSales")) + " ", 1),
|
|
1762
|
-
E.value != null ? (F(),
|
|
1761
|
+
E.value != null ? (F(), G(se, {
|
|
1763
1762
|
key: 0,
|
|
1764
1763
|
variant: "plain",
|
|
1765
1764
|
placement: "top",
|
|
@@ -1775,27 +1774,27 @@ const to = { class: "flex items-center w-full fm-typo-en-title-md-800" }, no = {
|
|
|
1775
1774
|
_: 1
|
|
1776
1775
|
}, 8, ["content"])) : te("", !0)
|
|
1777
1776
|
]),
|
|
1778
|
-
e("div", bo, _(
|
|
1777
|
+
e("div", bo, _(B.value.SALES), 1)
|
|
1779
1778
|
]),
|
|
1780
1779
|
e("div", ko, [
|
|
1781
1780
|
e("div", go, _(u(i)("inventory.stock.history.summary.totalLose")), 1),
|
|
1782
|
-
e("div", ho, _(
|
|
1781
|
+
e("div", ho, _(B.value.LOSE), 1)
|
|
1783
1782
|
]),
|
|
1784
1783
|
e("div", xo, [
|
|
1785
1784
|
e("div", So, _(u(i)("inventory.stock.history.summary.totalRequest")), 1),
|
|
1786
|
-
e("div", Fo, _(
|
|
1785
|
+
e("div", Fo, _(B.value.REQUEST), 1)
|
|
1787
1786
|
]),
|
|
1788
1787
|
e("div", wo, [
|
|
1789
1788
|
e("div", $o, _(u(i)("inventory.stock.history.summary.totalReceive")), 1),
|
|
1790
|
-
e("div", Ao, _(
|
|
1789
|
+
e("div", Ao, _(B.value.RECEIVE), 1)
|
|
1791
1790
|
]),
|
|
1792
1791
|
e("div", Vo, [
|
|
1793
1792
|
e("div", Co, _(u(i)("inventory.stock.history.summary.totalConvert")), 1),
|
|
1794
|
-
e("div",
|
|
1793
|
+
e("div", Mo, _(B.value.CONVERT), 1)
|
|
1795
1794
|
]),
|
|
1796
|
-
e("div",
|
|
1795
|
+
e("div", Bo, [
|
|
1797
1796
|
e("div", Do, _(u(i)("inventory.stock.history.summary.totalDamage")), 1),
|
|
1798
|
-
e("div", Io, _(
|
|
1797
|
+
e("div", Io, _(B.value.DAMAGE), 1)
|
|
1799
1798
|
]),
|
|
1800
1799
|
e("div", jo, [
|
|
1801
1800
|
e("div", To, _(u(i)("inventory.stock.history.summary.openingBalance")), 1),
|
|
@@ -1803,14 +1802,14 @@ const to = { class: "flex items-center w-full fm-typo-en-title-md-800" }, no = {
|
|
|
1803
1802
|
]),
|
|
1804
1803
|
e("div", Eo, [
|
|
1805
1804
|
e("div", Ho, _(u(i)("inventory.stock.history.summary.lastStockBalance")), 1),
|
|
1806
|
-
e("div", Po, _(
|
|
1805
|
+
e("div", Po, _(Q.value), 1)
|
|
1807
1806
|
])
|
|
1808
1807
|
]),
|
|
1809
1808
|
u(d).enableTotalCost ? (F(), O("div", Ro, [
|
|
1810
1809
|
k(T, { class: "w-full" }),
|
|
1811
1810
|
e("div", Oo, [
|
|
1812
1811
|
e("div", No, [
|
|
1813
|
-
k(
|
|
1812
|
+
k(Qe, { "z-index": 50 }, {
|
|
1814
1813
|
default: I(() => [
|
|
1815
1814
|
e("div", Lo, [
|
|
1816
1815
|
ue(_(u(i)("inventory.stock.history.estimatedValue")) + " ", 1),
|
|
@@ -1834,7 +1833,7 @@ const to = { class: "flex items-center w-full fm-typo-en-title-md-800" }, no = {
|
|
|
1834
1833
|
}),
|
|
1835
1834
|
e("div", zo, [
|
|
1836
1835
|
t.sku.valuation === u(Xe).Enum.FIFO ? (F(), O(Z, { key: 0 }, [
|
|
1837
|
-
k(
|
|
1836
|
+
k(K, {
|
|
1838
1837
|
label: "FIFO",
|
|
1839
1838
|
compact: ""
|
|
1840
1839
|
}),
|
|
@@ -1853,9 +1852,9 @@ const to = { class: "flex items-center w-full fm-typo-en-title-md-800" }, no = {
|
|
|
1853
1852
|
])
|
|
1854
1853
|
]),
|
|
1855
1854
|
e("div", Yo, [
|
|
1856
|
-
k(
|
|
1855
|
+
k(Qe, { "z-index": 50 }, {
|
|
1857
1856
|
default: I(() => [
|
|
1858
|
-
e("div",
|
|
1857
|
+
e("div", Go, [
|
|
1859
1858
|
ue(_(u(i)("inventory.stock.history.costSold")) + " ", 1),
|
|
1860
1859
|
k(se, {
|
|
1861
1860
|
variant: "plain",
|
|
@@ -1863,7 +1862,7 @@ const to = { class: "flex items-center w-full fm-typo-en-title-md-800" }, no = {
|
|
|
1863
1862
|
"z-index": 50
|
|
1864
1863
|
}, {
|
|
1865
1864
|
content: I(() => [
|
|
1866
|
-
e("div",
|
|
1865
|
+
e("div", Ko, _(u(i)("inventory.stock.history.costSoldTooltip")), 1)
|
|
1867
1866
|
]),
|
|
1868
1867
|
default: I(() => [
|
|
1869
1868
|
k(z, {
|
|
@@ -1877,7 +1876,7 @@ const to = { class: "flex items-center w-full fm-typo-en-title-md-800" }, no = {
|
|
|
1877
1876
|
]),
|
|
1878
1877
|
_: 1
|
|
1879
1878
|
}),
|
|
1880
|
-
e("div", Wo, _(
|
|
1879
|
+
e("div", Wo, _(J.value), 1)
|
|
1881
1880
|
])
|
|
1882
1881
|
])
|
|
1883
1882
|
])) : te("", !0)
|
|
@@ -1891,7 +1890,7 @@ const to = { class: "flex items-center w-full fm-typo-en-title-md-800" }, no = {
|
|
|
1891
1890
|
(F(!0), O(Z, null, ie(A.value, (ee) => (F(), O(Z, {
|
|
1892
1891
|
key: ee.date
|
|
1893
1892
|
}, [
|
|
1894
|
-
t.sku ? (F(),
|
|
1893
|
+
t.sku ? (F(), G(Qn, {
|
|
1895
1894
|
key: 0,
|
|
1896
1895
|
record: ee,
|
|
1897
1896
|
sku: t.sku,
|
|
@@ -1907,8 +1906,8 @@ const to = { class: "flex items-center w-full fm-typo-en-title-md-800" }, no = {
|
|
|
1907
1906
|
alt: "List is empty"
|
|
1908
1907
|
}, null, 8, Xo)
|
|
1909
1908
|
]),
|
|
1910
|
-
e("div",
|
|
1911
|
-
e("div",
|
|
1909
|
+
e("div", Jo, _(u(i)("inventory.stock.history.noRecords")), 1),
|
|
1910
|
+
e("div", Qo, _(u(i)("inventory.stock.history.changeDateRange")), 1),
|
|
1912
1911
|
k(S),
|
|
1913
1912
|
k(S)
|
|
1914
1913
|
]))
|
|
@@ -1922,7 +1921,7 @@ const to = { class: "flex items-center w-full fm-typo-en-title-md-800" }, no = {
|
|
|
1922
1921
|
}), es = {
|
|
1923
1922
|
key: 0,
|
|
1924
1923
|
class: "flex items-center gap-1"
|
|
1925
|
-
}, ts = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, ns = { class: "flex flex-col gap-8" }, os = { class: "flex flex-col" }, ss = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, as = { class: "fm-typo-en-body-lg-600 text-fm-color-typo-primary line-clamp-1" },
|
|
1924
|
+
}, ts = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, ns = { class: "flex flex-col gap-8" }, os = { class: "flex flex-col" }, ss = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, as = { class: "fm-typo-en-body-lg-600 text-fm-color-typo-primary line-clamp-1" }, ks = /* @__PURE__ */ ce({
|
|
1926
1925
|
__name: "StockView",
|
|
1927
1926
|
setup(b) {
|
|
1928
1927
|
const { t: g } = de(), p = Re(), o = ve(), j = Oe(), h = it(), d = _e(), i = st(), x = Ut(), { columnDefs: C } = on(), c = Le(), l = be();
|
|
@@ -1990,7 +1989,7 @@ const to = { class: "flex items-center w-full fm-typo-en-title-md-800" }, no = {
|
|
|
1990
1989
|
const L = r.value ? Et.build(r.value) : null, Y = [];
|
|
1991
1990
|
for (const s of p.skus) {
|
|
1992
1991
|
let f = !0;
|
|
1993
|
-
if (x.isEnabled &&
|
|
1992
|
+
if (x.isEnabled && B.value && v.value && f && (f = v.value.has(s._id)), L && f && (f = Ht(
|
|
1994
1993
|
{
|
|
1995
1994
|
status: s.isInactive ? "Inactive" : "Active"
|
|
1996
1995
|
},
|
|
@@ -2015,7 +2014,7 @@ const to = { class: "flex items-center w-full fm-typo-en-title-md-800" }, no = {
|
|
|
2015
2014
|
}
|
|
2016
2015
|
}
|
|
2017
2016
|
return Y;
|
|
2018
|
-
}),
|
|
2017
|
+
}), M = N(""), B = N(!0), { breakpoints: E } = Gt(), P = H(() => E.value.xs || E.value.sm), Q = H(() => P.value ? 10 : 20), J = Pt(), R = H(() => [
|
|
2019
2018
|
{
|
|
2020
2019
|
label: g("inventory.stock.stock_balance.refreshBalance"),
|
|
2021
2020
|
value: "refresh-balance",
|
|
@@ -2043,7 +2042,7 @@ const to = { class: "flex items-center w-full fm-typo-en-title-md-800" }, no = {
|
|
|
2043
2042
|
}
|
|
2044
2043
|
return (L, Y) => {
|
|
2045
2044
|
const le = D("FmSwitch"), y = D("FmTable");
|
|
2046
|
-
return F(),
|
|
2045
|
+
return F(), G(Rt, {
|
|
2047
2046
|
title: u(g)("inventory.stock.title"),
|
|
2048
2047
|
actions: R.value,
|
|
2049
2048
|
"onClick:action": oe
|
|
@@ -2063,8 +2062,8 @@ const to = { class: "flex items-center w-full fm-typo-en-title-md-800" }, no = {
|
|
|
2063
2062
|
k(Ot, {
|
|
2064
2063
|
searchable: "",
|
|
2065
2064
|
"change-location": "",
|
|
2066
|
-
search:
|
|
2067
|
-
"onUpdate:search": Y[1] || (Y[1] = (a) =>
|
|
2065
|
+
search: M.value,
|
|
2066
|
+
"onUpdate:search": Y[1] || (Y[1] = (a) => M.value = a),
|
|
2068
2067
|
"hide-filter-options": !0,
|
|
2069
2068
|
filterable: "",
|
|
2070
2069
|
"filter-attributes": n.value,
|
|
@@ -2078,8 +2077,8 @@ const to = { class: "flex items-center w-full fm-typo-en-title-md-800" }, no = {
|
|
|
2078
2077
|
k(Pe, null, {
|
|
2079
2078
|
default: I(() => [
|
|
2080
2079
|
k(le, {
|
|
2081
|
-
modelValue:
|
|
2082
|
-
"onUpdate:modelValue": Y[0] || (Y[0] = (a) =>
|
|
2080
|
+
modelValue: B.value,
|
|
2081
|
+
"onUpdate:modelValue": Y[0] || (Y[0] = (a) => B.value = a)
|
|
2083
2082
|
}, null, 8, ["modelValue"])
|
|
2084
2083
|
]),
|
|
2085
2084
|
_: 1
|
|
@@ -2088,15 +2087,15 @@ const to = { class: "flex items-center w-full fm-typo-en-title-md-800" }, no = {
|
|
|
2088
2087
|
]),
|
|
2089
2088
|
_: 1
|
|
2090
2089
|
}, 8, ["search", "filter-attributes", "filter"]),
|
|
2091
|
-
(F(),
|
|
2092
|
-
style: tt(u(
|
|
2090
|
+
(F(), G(y, {
|
|
2091
|
+
style: tt(u(J).tableHeight),
|
|
2093
2092
|
"column-defs": u(C),
|
|
2094
2093
|
"row-data": w.value,
|
|
2095
|
-
"search-value":
|
|
2094
|
+
"search-value": M.value,
|
|
2096
2095
|
loading: $.value || !u(o)._currentLocation,
|
|
2097
2096
|
key: (t = u(o)._currentLocation) == null ? void 0 : t.dbName,
|
|
2098
2097
|
onRowClick: Y[3] || (Y[3] = (a) => u(h).showSkuHistory(a.original)),
|
|
2099
|
-
"page-size":
|
|
2098
|
+
"page-size": Q.value
|
|
2100
2099
|
}, {
|
|
2101
2100
|
"list-row": I((a) => [
|
|
2102
2101
|
k(Nt, {
|
|
@@ -2104,18 +2103,18 @@ const to = { class: "flex items-center w-full fm-typo-en-title-md-800" }, no = {
|
|
|
2104
2103
|
onRowClick: u(h).showSkuHistory
|
|
2105
2104
|
}, {
|
|
2106
2105
|
default: I((S) => {
|
|
2107
|
-
var U, z, se, T,
|
|
2106
|
+
var U, z, se, T, K, W, ae, re, q, ee;
|
|
2108
2107
|
return [
|
|
2109
2108
|
e("div", ns, [
|
|
2110
2109
|
e("div", os, [
|
|
2111
2110
|
e("div", ss, [
|
|
2112
|
-
k(u(
|
|
2111
|
+
k(u(Je), {
|
|
2113
2112
|
render: (se = (z = (U = S.code) == null ? void 0 : U.column) == null ? void 0 : z.columnDef) == null ? void 0 : se.cell,
|
|
2114
|
-
props: (
|
|
2113
|
+
props: (K = (T = S.code) == null ? void 0 : T.getContext) == null ? void 0 : K.call(T)
|
|
2115
2114
|
}, null, 8, ["render", "props"])
|
|
2116
2115
|
]),
|
|
2117
2116
|
e("div", as, [
|
|
2118
|
-
k(u(
|
|
2117
|
+
k(u(Je), {
|
|
2119
2118
|
render: (re = (ae = (W = S.name) == null ? void 0 : W.column) == null ? void 0 : ae.columnDef) == null ? void 0 : re.cell,
|
|
2120
2119
|
props: (ee = (q = S.name) == null ? void 0 : q.getContext) == null ? void 0 : ee.call(q)
|
|
2121
2120
|
}, null, 8, ["render", "props"])
|
|
@@ -2144,10 +2143,10 @@ const to = { class: "flex items-center w-full fm-typo-en-title-md-800" }, no = {
|
|
|
2144
2143
|
_: 1
|
|
2145
2144
|
}, 8, ["style", "column-defs", "row-data", "search-value", "loading", "page-size"]))
|
|
2146
2145
|
], 2),
|
|
2147
|
-
(F(),
|
|
2148
|
-
(s = u(h).stockHistoryProps) != null && s.sku ? (F(),
|
|
2149
|
-
(f = u(h).convertSkuDialogProps) != null && f.sku ? (F(),
|
|
2150
|
-
(m = u(h).adjustSkuDialogProps) != null && m.stock ? (F(),
|
|
2146
|
+
(F(), G(dt, { to: "body" }, [
|
|
2147
|
+
(s = u(h).stockHistoryProps) != null && s.sku ? (F(), G(Zo, Ae(Ve({ key: 0 }, u(h).stockHistoryProps)), null, 16)) : te("", !0),
|
|
2148
|
+
(f = u(h).convertSkuDialogProps) != null && f.sku ? (F(), G(kn, Ae(Ve({ key: 1 }, u(h).convertSkuDialogProps)), null, 16)) : te("", !0),
|
|
2149
|
+
(m = u(h).adjustSkuDialogProps) != null && m.stock ? (F(), G(Vn, Ae(Ve({ key: 2 }, u(h).adjustSkuDialogProps)), null, 16)) : te("", !0)
|
|
2151
2150
|
]))
|
|
2152
2151
|
];
|
|
2153
2152
|
}),
|
|
@@ -2157,5 +2156,5 @@ const to = { class: "flex items-center w-full fm-typo-en-title-md-800" }, no = {
|
|
|
2157
2156
|
}
|
|
2158
2157
|
});
|
|
2159
2158
|
export {
|
|
2160
|
-
|
|
2159
|
+
ks as default
|
|
2161
2160
|
};
|