@feedmepos/mf-inventory-portal 1.0.15-dev.2 → 1.0.15-dev.3
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-CgxrN-aD.js → App-3Zym4rob.js} +2 -2
- package/dist/ApprovalView-C4qLlZua.js +213 -0
- package/dist/{BindingsDialog-B_ZMDl-b.js → BindingsDialog-DHaF8DtC.js} +2 -2
- package/dist/{BindingsPicker-B84BG8zT.js → BindingsPicker-C04HnWZ-.js} +1 -1
- package/dist/{BindingsTable-DrvoykYc.js → BindingsTable-CnZUt7GU.js} +1 -1
- package/dist/{ClosingDraftView-Ds9sI2Eg.js → ClosingDraftView-DaMruAln.js} +41 -41
- package/dist/{ClosingTemplateView-BhZ1OXkD.js → ClosingTemplateView-B3lyKcz-.js} +2 -2
- package/dist/{DeliveryOrderPrintPreview-Yuxf-jCh.js → DeliveryOrderPrintPreview-CGPkYOfW.js} +1 -1
- package/dist/{FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-D6ktiUO5.js → FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-DFJNtwjV.js} +43 -43
- package/dist/{FmMultiselectDialog-4lVsA2Rn.js → FmMultiselectDialog-yR5Mo3U-.js} +1 -1
- package/dist/{FmUnitInput.vue_vue_type_script_setup_true_lang-XmTRSHn_.js → FmUnitInput.vue_vue_type_script_setup_true_lang-DoY67RWl.js} +57 -57
- package/dist/{IngredientBindedItem.vue_vue_type_script_setup_true_lang-B3PvtR0j.js → IngredientBindedItem.vue_vue_type_script_setup_true_lang-BSuFAwN3.js} +1 -1
- package/dist/IngredientGroupView-B-hyo-7W.js +898 -0
- package/dist/IngredientsView-Cod5ahQy.js +1778 -0
- package/dist/{IntegrationView-BnrCkjWt.js → IntegrationView-D9KZtPN3.js} +5 -5
- package/dist/{InventoryBindingForm-uyHh2TI_.js → InventoryBindingForm-CrRoablh.js} +1 -1
- package/dist/{InventoryBindingForm.vue_vue_type_script_setup_true_lang-CECDj9Pw.js → InventoryBindingForm.vue_vue_type_script_setup_true_lang-W9p7khOs.js} +46 -46
- package/dist/{InventoryBindingSummary-DyHCqgIe.js → InventoryBindingSummary-D88BG4ze.js} +1 -1
- package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-Dx2lMf6h.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-VtM-wvuF.js} +1 -1
- package/dist/{PremiumBadge.vue_vue_type_script_setup_true_lang-BCX3vlmU.js → PremiumBadge.vue_vue_type_script_setup_true_lang-Ccx9QvpN.js} +15 -15
- package/dist/{PublishView-BVGyY6nn.js → PublishView-DhE7YE-k.js} +13 -13
- package/dist/{PurchaseOrderPrintPreview-pbYIFiOG.js → PurchaseOrderPrintPreview-CF_VeOeU.js} +4 -4
- package/dist/ReceiveRequestView-Bx9-NHyn.js +2576 -0
- package/dist/{RecipeView-DcgoCf4g.js → RecipeView-JhM5Z4CP.js} +4 -4
- package/dist/{StockView-zO2uL662.js → StockView-u7jlKoO5.js} +108 -108
- package/dist/{SupplierView-I5bqiX_2.js → SupplierView-BDBBQnGy.js} +37 -37
- package/dist/TransferDetails.vue_vue_type_script_setup_true_lang-BJiobEDM.js +2090 -0
- package/dist/{TransferTemplateView-BDOt17yc.js → TransferTemplateView-CNMHm8Gy.js} +149 -149
- package/dist/{UnitView-BVY5S6-3.js → UnitView-UVgn7ofI.js} +32 -32
- package/dist/{WarehouseView-m6MKrtYq.js → WarehouseView-CEw69mhn.js} +26 -26
- package/dist/{app-DtICLubM.js → app-cfPLYfcH.js} +33227 -25194
- package/dist/app.js +5 -5
- package/dist/components/FmInventoryTableToolbar.vue.d.ts +36 -0
- package/dist/{decimal-C1dAcCf3.js → decimal-BeCLbdwn.js} +1 -1
- package/dist/{feature-Y7qzvbl4.js → feature-dhG2tL_A.js} +79 -79
- package/dist/{format-unit-display-CPqfS4vp.js → format-unit-display-D3UdcFM6.js} +48 -48
- package/dist/{index-DIEdSG3y.js → index-BUou6R58.js} +1 -1
- package/dist/{index-0qsqwB0T.js → index-BkR-Qpc0.js} +4 -4
- package/dist/{stock-CowNp_xM.js → stock-DQPwSZX1.js} +1 -1
- package/dist/{supplier-JVTTlQNL.js → supplier-CAcd6PiU.js} +2 -2
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/{use-ingredient-select-dialog-Df59lld2.js → use-ingredient-select-dialog-E3qfQso7.js} +5 -5
- package/dist/{use-inventory-binding-dialog-Bxxb93Kz.js → use-inventory-binding-dialog-DRKy4nUx.js} +1 -1
- package/dist/{vue-i18n-DJOdRwc3.js → vue-i18n-DLrqHK28.js} +271 -271
- package/package.json +4 -4
- package/dist/ApprovalView-DNGhkVc9.js +0 -147
- package/dist/IngredientGroupView-usK9stxT.js +0 -8779
- package/dist/IngredientsView-DPx8Z2zo.js +0 -1749
- package/dist/ReceiveRequestView-DZAgH2_u.js +0 -2516
- package/dist/TransferDetails.vue_vue_type_script_setup_true_lang-NyQg_yR9.js +0 -2020
|
@@ -1,18 +1,18 @@
|
|
|
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
|
|
2
|
-
import { u as pe,
|
|
3
|
-
import { u as Pe, a as
|
|
4
|
-
import { g as Se } from "./decimal-
|
|
5
|
-
import { e as Dt, u as Ze, i as et, _ as Ke } from "./PremiumBadge.vue_vue_type_script_setup_true_lang-
|
|
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 J, renderList as le, unref as r, h as _e, watch as be, isRef as Ie, createCommentVNode as ne, reactive as at, onMounted as qe, normalizeStyle as Qe, createTextVNode as ce, Teleport as rt, normalizeProps as we, mergeProps as $e } from "vue";
|
|
2
|
+
import { u as pe, T as lt, e as Te, f as it, a as Ue, F as Le, V as ut, W as Be, i as de, L as ct, t as xe, Q as De, A as dt, M as mt, P as fe, X as pt, Y as te, Z as vt, $ as Ne, l as ft, a0 as yt, a1 as _t, a2 as kt, a3 as Xe, O as G, a4 as ht, r as Je, a5 as ke, a6 as gt, a7 as bt, n as Ae, k as ze, o as xt, a8 as St, a9 as Ft, aa as wt, ab as $t, ac as At, z as Ct, _ as Vt, B as Mt, C as Bt, E as Ye } from "./app-cfPLYfcH.js";
|
|
3
|
+
import { u as Pe, a as Ee } from "./stock-DQPwSZX1.js";
|
|
4
|
+
import { g as Se } from "./decimal-BeCLbdwn.js";
|
|
5
|
+
import { e as Dt, u as Ze, i as et, _ as Ke } from "./PremiumBadge.vue_vue_type_script_setup_true_lang-Ccx9QvpN.js";
|
|
6
6
|
import { _ as je, S as Ce, g as tt } from "./StockForecast.vue_vue_type_style_index_0_lang-KLXSWvo5.js";
|
|
7
7
|
import { _ as jt } from "./PreviewBadge.vue_vue_type_script_setup_true_lang-CRZiQHjx.js";
|
|
8
8
|
import { useI18n as ue, useCoreStore as It } from "@feedmepos/mf-common";
|
|
9
|
-
import { useSnackbar as ye, useDialog as nt, useProxiedModel as
|
|
9
|
+
import { useSnackbar as ye, useDialog as nt, useProxiedModel as He, useBreakpoints as Tt } from "@feedmepos/ui-library";
|
|
10
10
|
import { defineStore as Ut } from "pinia";
|
|
11
|
-
import { u as Pt } from "./use-inventory-binding-dialog-
|
|
12
|
-
import { _ as
|
|
13
|
-
import { E as
|
|
11
|
+
import { u as Pt } from "./use-inventory-binding-dialog-DRKy4nUx.js";
|
|
12
|
+
import { _ as Et } from "./NumberPrecisionInput.vue_vue_type_script_setup_true_lang-VtM-wvuF.js";
|
|
13
|
+
import { E as Ht } from "./empty-placeholder-wf6-BWE8.js";
|
|
14
14
|
import "./array-Ca8T3f_G.js";
|
|
15
|
-
import { u as Rt } from "./feature-
|
|
15
|
+
import { u as Rt } from "./feature-dhG2tL_A.js";
|
|
16
16
|
var he = /* @__PURE__ */ ((f) => (f.History = "History", f.Convert = "Convert", f.Adjust = "Adjust", f))(he || {});
|
|
17
17
|
const Ot = [
|
|
18
18
|
{
|
|
@@ -157,7 +157,7 @@ const zt = { class: "fm-typo-en-body-md-400 flex-grow" }, ot = /* @__PURE__ */ i
|
|
|
157
157
|
], 2)
|
|
158
158
|
]),
|
|
159
159
|
default: D(() => [
|
|
160
|
-
(A(!0), R(
|
|
160
|
+
(A(!0), R(J, null, le(_.value, (k) => (A(), Y(F, {
|
|
161
161
|
key: k.value ?? 0,
|
|
162
162
|
label: k.label,
|
|
163
163
|
"model-value": i(k),
|
|
@@ -208,11 +208,11 @@ const zt = { class: "fm-typo-en-body-md-400 flex-grow" }, ot = /* @__PURE__ */ i
|
|
|
208
208
|
return;
|
|
209
209
|
}
|
|
210
210
|
const V = {
|
|
211
|
-
maxCount: ((P = l.productBalance.find(({ id:
|
|
211
|
+
maxCount: ((P = l.productBalance.find(({ id: E }) => E === u._id)) == null ? void 0 : P.count) || 0,
|
|
212
212
|
sku: u,
|
|
213
213
|
show: !0,
|
|
214
|
-
"onUpdate:show"(
|
|
215
|
-
w.value.show =
|
|
214
|
+
"onUpdate:show"(E) {
|
|
215
|
+
w.value.show = E;
|
|
216
216
|
},
|
|
217
217
|
onSubmitted() {
|
|
218
218
|
m();
|
|
@@ -375,7 +375,7 @@ const Gt = {
|
|
|
375
375
|
function We(f) {
|
|
376
376
|
return { ...Gt, context: f };
|
|
377
377
|
}
|
|
378
|
-
const qt = { class: "flex items-center" },
|
|
378
|
+
const qt = { class: "flex items-center" }, Qt = { class: "fm-typo-en-title-md-800" }, Xt = { class: "flex flex-col gap-24 w-full" }, Jt = { class: "flex flex-col gap-8" }, Zt = { class: "fm-typo-en-body-lg-600" }, en = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary flex-grow" }, tn = { class: "fm-typo-en-body-lg-600 text-fm-color-typo-error" }, nn = { class: "flex flex-col p-16 gap-8" }, on = { class: "flex flex-col gap-4" }, sn = { class: "fm-typo-en-body-md-600 text-fm-color-typo-secondary bg-fm-color-neutral-gray-100 border-b py-12 px-16" }, an = { class: "grid grid-cols-[auto_100px_100px_48px] xs:grid-cols-[auto_80px_120px_48px] gap-8 px-8 items-center" }, rn = { class: "xs:col-span-3" }, ln = { class: "flex gap-8" }, un = /* @__PURE__ */ ie({
|
|
379
379
|
__name: "ConvertSkuDialog",
|
|
380
380
|
props: {
|
|
381
381
|
sku: {},
|
|
@@ -384,7 +384,7 @@ const qt = { class: "flex items-center" }, Jt = { class: "fm-typo-en-title-md-80
|
|
|
384
384
|
},
|
|
385
385
|
emits: ["update:show", "submitted"],
|
|
386
386
|
setup(f, { expose: y, emit: l }) {
|
|
387
|
-
const o = f, S = l, _ = Pt(), i = Ue(), m =
|
|
387
|
+
const o = f, S = l, _ = Pt(), i = Ue(), m = Ee(), w = ye(), { t: x } = ue(), a = O(0), n = O(null), F = U(() => i.skus), C = U(
|
|
388
388
|
() => {
|
|
389
389
|
var p, e;
|
|
390
390
|
return (((e = (p = o.sku) == null ? void 0 : p.convert) == null ? void 0 : e.inventoryBindings) ?? []).filter(
|
|
@@ -436,11 +436,11 @@ const qt = { class: "flex items-center" }, Jt = { class: "fm-typo-en-title-md-80
|
|
|
436
436
|
recipes: i.recipes
|
|
437
437
|
}).inventoryBindings.filter((d) => "success" in d && d.success).map((d) => d).map((d) => d.binding);
|
|
438
438
|
return (c = n.value ?? e) == null ? void 0 : c.map((d) => {
|
|
439
|
-
var se, re,
|
|
440
|
-
const b = i.skus.find((ve) => ve._id === d.id), I = ((se = d.measurement) == null ? void 0 : se.abbrev) ?? ((re = b == null ? void 0 : b.unit) == null ? void 0 : re.abbrev),
|
|
439
|
+
var se, re, X, ee, Re;
|
|
440
|
+
const b = i.skus.find((ve) => ve._id === d.id), I = ((se = d.measurement) == null ? void 0 : se.abbrev) ?? ((re = b == null ? void 0 : b.unit) == null ? void 0 : re.abbrev), Q = (X = o.sku.convert) != null && X.measurement ? o.sku.unit.measurements.find((ve) => {
|
|
441
441
|
var Oe;
|
|
442
442
|
return ve.id === ((Oe = o.sku.convert) == null ? void 0 : Oe.measurement);
|
|
443
|
-
}) ?? null : null, oe = Be(o.sku.unit,
|
|
443
|
+
}) ?? null : null, oe = Be(o.sku.unit, Q), T = V(`${a.value}`) === !0 ? de(
|
|
444
444
|
ct(
|
|
445
445
|
d.amount,
|
|
446
446
|
xe(+a.value, oe)
|
|
@@ -468,7 +468,7 @@ const qt = { class: "flex items-center" }, Jt = { class: "fm-typo-en-title-md-80
|
|
|
468
468
|
(e = (p = P.value) == null ? void 0 : p.resetInputs) == null || e.call(p);
|
|
469
469
|
}
|
|
470
470
|
});
|
|
471
|
-
const
|
|
471
|
+
const E = He(o, "show");
|
|
472
472
|
async function Z(p, e, s) {
|
|
473
473
|
u.value = !0;
|
|
474
474
|
try {
|
|
@@ -507,7 +507,7 @@ const qt = { class: "flex items-center" }, Jt = { class: "fm-typo-en-title-md-80
|
|
|
507
507
|
const e = F.value.find((s) => s._id === p);
|
|
508
508
|
return e ? tt(e.unit, !0) : [];
|
|
509
509
|
}
|
|
510
|
-
function
|
|
510
|
+
function H(p, e) {
|
|
511
511
|
const s = N(p), v = s.find((c) => c.value === e) ?? s.find((c) => c.value === null);
|
|
512
512
|
return v ? {
|
|
513
513
|
...v,
|
|
@@ -522,7 +522,7 @@ const qt = { class: "flex items-center" }, Jt = { class: "fm-typo-en-title-md-80
|
|
|
522
522
|
const c = F.value.find((d) => d._id === p);
|
|
523
523
|
v = s.map((d) => {
|
|
524
524
|
var b, I;
|
|
525
|
-
return d.id !== p || (d.measurement = (I = (b = c == null ? void 0 : c.unit) == null ? void 0 : b.measurements) == null ? void 0 : I.find((
|
|
525
|
+
return d.id !== p || (d.measurement = (I = (b = c == null ? void 0 : c.unit) == null ? void 0 : b.measurements) == null ? void 0 : I.find((Q) => Q.id === e)), d;
|
|
526
526
|
}) ?? [];
|
|
527
527
|
}
|
|
528
528
|
n.value = v;
|
|
@@ -548,20 +548,20 @@ const qt = { class: "flex items-center" }, Jt = { class: "fm-typo-en-title-md-80
|
|
|
548
548
|
p || (n.value = null, a.value = 0);
|
|
549
549
|
}
|
|
550
550
|
), (p, e) => {
|
|
551
|
-
const s = M("FmTextField"), v = M("FmForm"), c = M("FmCard"), d = M("FmSwitch"), b = M("FmFormGroup"), I = M("FmSelect"),
|
|
551
|
+
const s = M("FmTextField"), v = M("FmForm"), c = M("FmCard"), d = M("FmSwitch"), b = M("FmFormGroup"), I = M("FmSelect"), Q = M("FmButton"), oe = M("FmSideSheet");
|
|
552
552
|
return A(), Y(oe, {
|
|
553
553
|
"dismiss-away": "",
|
|
554
|
-
modelValue: r(
|
|
555
|
-
"onUpdate:modelValue": e[3] || (e[3] = (T) => Ie(
|
|
554
|
+
modelValue: r(E),
|
|
555
|
+
"onUpdate:modelValue": e[3] || (e[3] = (T) => Ie(E) ? E.value = T : null),
|
|
556
556
|
"max-width": 500
|
|
557
557
|
}, {
|
|
558
558
|
"side-sheet-header": D(() => [
|
|
559
559
|
t("div", qt, [
|
|
560
|
-
t("div",
|
|
560
|
+
t("div", Qt, h(r(x)("inventory.stock.convert.title", { name: p.sku.name })), 1)
|
|
561
561
|
])
|
|
562
562
|
]),
|
|
563
563
|
default: D(() => [
|
|
564
|
-
t("div",
|
|
564
|
+
t("div", Xt, [
|
|
565
565
|
g(v, {
|
|
566
566
|
ref_key: "formRef",
|
|
567
567
|
ref: P,
|
|
@@ -585,9 +585,9 @@ const qt = { class: "flex items-center" }, Jt = { class: "fm-typo-en-title-md-80
|
|
|
585
585
|
class: "p-16"
|
|
586
586
|
}, {
|
|
587
587
|
default: D(() => [
|
|
588
|
-
t("div",
|
|
588
|
+
t("div", Jt, [
|
|
589
589
|
t("div", Zt, h(r(x)("inventory.stock.convert.deductionSummary")), 1),
|
|
590
|
-
(A(!0), R(
|
|
590
|
+
(A(!0), R(J, null, le(B.value, (T) => {
|
|
591
591
|
var z, W;
|
|
592
592
|
return A(), R("div", {
|
|
593
593
|
key: (z = T.sku) == null ? void 0 : z._id,
|
|
@@ -611,14 +611,14 @@ const qt = { class: "flex items-center" }, Jt = { class: "fm-typo-en-title-md-80
|
|
|
611
611
|
label: r(x)("inventory.stock.convert.overrideDeduction"),
|
|
612
612
|
"label-placement": "right"
|
|
613
613
|
}, null, 8, ["modelValue", "label"]),
|
|
614
|
-
k.value ? (A(), R(
|
|
614
|
+
k.value ? (A(), R(J, { key: 0 }, [
|
|
615
615
|
g(b, {
|
|
616
616
|
modelValue: n.value,
|
|
617
617
|
rules: [r(dt)(1, "Must have at least one ingredient binding")]
|
|
618
618
|
}, null, 8, ["modelValue", "rules"]),
|
|
619
619
|
t("div", on, [
|
|
620
620
|
t("div", sn, h(r(x)("inventory.stock.convert.ingredients")), 1),
|
|
621
|
-
(A(!0), R(
|
|
621
|
+
(A(!0), R(J, null, le(n.value, (T) => (A(), Y(b, {
|
|
622
622
|
key: T.id,
|
|
623
623
|
disabled: u.value,
|
|
624
624
|
modelValue: +r(de)(T.amount ?? { amount: 1, precision: 0 }),
|
|
@@ -634,33 +634,33 @@ const qt = { class: "flex items-center" }, Jt = { class: "fm-typo-en-title-md-80
|
|
|
634
634
|
var W, se, re;
|
|
635
635
|
return [
|
|
636
636
|
t("div", an, [
|
|
637
|
-
t("div", rn, h((W = F.value.find((
|
|
637
|
+
t("div", rn, h((W = F.value.find((X) => X._id === T.id)) == null ? void 0 : W.name), 1),
|
|
638
638
|
g(s, {
|
|
639
639
|
class: "xs:col-span-2",
|
|
640
640
|
disabled: u.value,
|
|
641
641
|
modelValue: +r(de)(
|
|
642
642
|
T.amount ?? { amount: 1, precision: 0 }
|
|
643
643
|
),
|
|
644
|
-
"onUpdate:modelValue": (
|
|
644
|
+
"onUpdate:modelValue": (X) => q(T.id, X, n.value ?? []),
|
|
645
645
|
invalid: z
|
|
646
646
|
}, null, 8, ["disabled", "modelValue", "onUpdate:modelValue", "invalid"]),
|
|
647
647
|
g(I, {
|
|
648
648
|
disabled: u.value,
|
|
649
649
|
class: "translate-y-[2px]",
|
|
650
650
|
items: N(T.id),
|
|
651
|
-
"model-value": (re =
|
|
652
|
-
"onUpdate:modelValue": (
|
|
651
|
+
"model-value": (re = H(T.id, (se = T.measurement) == null ? void 0 : se.id)) == null ? void 0 : re.value,
|
|
652
|
+
"onUpdate:modelValue": (X) => K(T.id, X, n.value ?? []),
|
|
653
653
|
invalid: z
|
|
654
654
|
}, {
|
|
655
655
|
"helper-text": D(() => e[4] || (e[4] = [])),
|
|
656
656
|
_: 2
|
|
657
657
|
}, 1032, ["disabled", "items", "model-value", "onUpdate:modelValue", "invalid"]),
|
|
658
|
-
g(
|
|
658
|
+
g(Q, {
|
|
659
659
|
disabled: u.value,
|
|
660
660
|
type: "button",
|
|
661
661
|
variant: "tertiary",
|
|
662
662
|
icon: "delete",
|
|
663
|
-
onClick: (
|
|
663
|
+
onClick: (X) => ae(T.id, n.value ?? [])
|
|
664
664
|
}, null, 8, ["disabled", "onClick"])
|
|
665
665
|
])
|
|
666
666
|
];
|
|
@@ -669,7 +669,7 @@ const qt = { class: "flex items-center" }, Jt = { class: "fm-typo-en-title-md-80
|
|
|
669
669
|
}, 1032, ["disabled", "modelValue", "rules"]))), 128))
|
|
670
670
|
]),
|
|
671
671
|
t("div", null, [
|
|
672
|
-
g(
|
|
672
|
+
g(Q, {
|
|
673
673
|
icon: "link",
|
|
674
674
|
label: r(x)("inventory.stock.convert.linkIngredient"),
|
|
675
675
|
variant: "plain",
|
|
@@ -685,7 +685,7 @@ const qt = { class: "flex items-center" }, Jt = { class: "fm-typo-en-title-md-80
|
|
|
685
685
|
]),
|
|
686
686
|
"side-sheet-footer": D(() => [
|
|
687
687
|
t("div", ln, [
|
|
688
|
-
g(
|
|
688
|
+
g(Q, {
|
|
689
689
|
loading: u.value,
|
|
690
690
|
label: r(x)("inventory.stock.convert.convertButton"),
|
|
691
691
|
onClick: e[2] || (e[2] = (T) => {
|
|
@@ -818,7 +818,7 @@ const Me = {
|
|
|
818
818
|
rules: [r(ft)()],
|
|
819
819
|
"label-mark": "required"
|
|
820
820
|
}, null, 8, ["disabled", "items", "modelValue", "rules"]),
|
|
821
|
-
g(
|
|
821
|
+
g(Et, {
|
|
822
822
|
disabled: a.disabled,
|
|
823
823
|
label: "Amount",
|
|
824
824
|
step: +r(de)({
|
|
@@ -857,7 +857,7 @@ const Me = {
|
|
|
857
857
|
},
|
|
858
858
|
emits: ["update:show", "submitted"],
|
|
859
859
|
setup(f, { expose: y, emit: l }) {
|
|
860
|
-
const o = f, S = l, _ = Ue(), i = nt(), m =
|
|
860
|
+
const o = f, S = l, _ = Ue(), i = nt(), m = Ee(), w = ye(), x = O(!1), { t: a } = ue();
|
|
861
861
|
function n() {
|
|
862
862
|
u(Te(k));
|
|
863
863
|
}
|
|
@@ -876,7 +876,7 @@ const Me = {
|
|
|
876
876
|
($ = (V = F.value) == null ? void 0 : V.resetInputs) == null || $.call(V);
|
|
877
877
|
}
|
|
878
878
|
});
|
|
879
|
-
const C =
|
|
879
|
+
const C = He(o, "show"), k = at({
|
|
880
880
|
remark: "",
|
|
881
881
|
adjustments: [
|
|
882
882
|
{
|
|
@@ -906,9 +906,9 @@ const Me = {
|
|
|
906
906
|
try {
|
|
907
907
|
await m.adjustSku({
|
|
908
908
|
remark: V.remark,
|
|
909
|
-
adjustments: V.adjustments.map(({ doc: $, remark: B, type: P, amount:
|
|
909
|
+
adjustments: V.adjustments.map(({ doc: $, remark: B, type: P, amount: E, measurement: Z }) => ({
|
|
910
910
|
id: $._id,
|
|
911
|
-
amount:
|
|
911
|
+
amount: E,
|
|
912
912
|
measurement: Z,
|
|
913
913
|
remark: B,
|
|
914
914
|
doc: $,
|
|
@@ -952,10 +952,10 @@ const Me = {
|
|
|
952
952
|
}
|
|
953
953
|
}).onPrimary((B) => {
|
|
954
954
|
k.adjustments = B.map(
|
|
955
|
-
(P) => k.adjustments.find((
|
|
955
|
+
(P) => k.adjustments.find((E) => E.doc._id === P) ?? {
|
|
956
956
|
id: `sku_${(/* @__PURE__ */ new Date()).toISOString()}_${Math.random().toString(16).slice(2, 8)}`,
|
|
957
957
|
type: te.enum.PURCHASE,
|
|
958
|
-
doc: _.skus.find((
|
|
958
|
+
doc: _.skus.find((E) => E._id === P),
|
|
959
959
|
measurement: null,
|
|
960
960
|
remark: "",
|
|
961
961
|
amount: fe(1)
|
|
@@ -967,7 +967,7 @@ const Me = {
|
|
|
967
967
|
k.adjustments.splice(V, 1);
|
|
968
968
|
}
|
|
969
969
|
return (V, $) => {
|
|
970
|
-
const B = M("FmTextarea"), P = M("FmButton"),
|
|
970
|
+
const B = M("FmTextarea"), P = M("FmButton"), E = M("FmForm"), Z = M("FmSideSheet");
|
|
971
971
|
return A(), Y(Z, {
|
|
972
972
|
modelValue: r(C),
|
|
973
973
|
"onUpdate:modelValue": $[2] || ($[2] = (q) => Ie(C) ? C.value = q : null),
|
|
@@ -980,7 +980,7 @@ const Me = {
|
|
|
980
980
|
])
|
|
981
981
|
]),
|
|
982
982
|
default: D(() => [
|
|
983
|
-
g(
|
|
983
|
+
g(E, {
|
|
984
984
|
class: "w-full flex flex-col gap-12",
|
|
985
985
|
ref_key: "formRef",
|
|
986
986
|
ref: F,
|
|
@@ -1001,11 +1001,11 @@ const Me = {
|
|
|
1001
1001
|
onClick: j
|
|
1002
1002
|
})
|
|
1003
1003
|
]),
|
|
1004
|
-
(A(!0), R(
|
|
1004
|
+
(A(!0), R(J, null, le(k.adjustments, (q, N) => (A(), Y(mn, {
|
|
1005
1005
|
key: q.id,
|
|
1006
1006
|
modelValue: k.adjustments[N],
|
|
1007
|
-
"onUpdate:modelValue": (
|
|
1008
|
-
"onClick:delete": (
|
|
1007
|
+
"onUpdate:modelValue": (H) => k.adjustments[N] = H,
|
|
1008
|
+
"onClick:delete": (H) => L(N)
|
|
1009
1009
|
}, null, 8, ["modelValue", "onUpdate:modelValue", "onClick:delete"]))), 128))
|
|
1010
1010
|
]),
|
|
1011
1011
|
_: 1
|
|
@@ -1017,8 +1017,8 @@ const Me = {
|
|
|
1017
1017
|
label: r(a)("inventory.stock.adjust.adjustButton"),
|
|
1018
1018
|
loading: x.value,
|
|
1019
1019
|
onClick: $[1] || ($[1] = (q) => {
|
|
1020
|
-
var N,
|
|
1021
|
-
return (
|
|
1020
|
+
var N, H;
|
|
1021
|
+
return (H = (N = F.value) == null ? void 0 : N.validateInputs) == null ? void 0 : H.call(N);
|
|
1022
1022
|
})
|
|
1023
1023
|
}, null, 8, ["label", "loading"])
|
|
1024
1024
|
])
|
|
@@ -1074,7 +1074,7 @@ const Me = {
|
|
|
1074
1074
|
}).flatMap((u) => u.amounts);
|
|
1075
1075
|
for (const u of C) {
|
|
1076
1076
|
const j = u.measurement ? kt(u.measurement.conversion, u.amount) : u.amount;
|
|
1077
|
-
n[k = u.type] ?? (n[k] = { amount: 0, precision: 0 }), n[u.type] =
|
|
1077
|
+
n[k = u.type] ?? (n[k] = { amount: 0, precision: 0 }), n[u.type] = Xe(j, n[u.type]);
|
|
1078
1078
|
}
|
|
1079
1079
|
return Object.entries(n).reduce(
|
|
1080
1080
|
(u, [j, L]) => (u[j] = /// comment, because without it formatter makes code uglier
|
|
@@ -1126,7 +1126,7 @@ const Me = {
|
|
|
1126
1126
|
size: "md"
|
|
1127
1127
|
}, null, 8, ["name"])
|
|
1128
1128
|
]),
|
|
1129
|
-
(A(!0), R(
|
|
1129
|
+
(A(!0), R(J, null, le(i.value, (k, u) => (A(), R("div", {
|
|
1130
1130
|
key: u,
|
|
1131
1131
|
class: "flex flex-row py-1",
|
|
1132
1132
|
style: { "font-size": "0.8rem" }
|
|
@@ -1143,7 +1143,7 @@ const Me = {
|
|
|
1143
1143
|
t("div", {
|
|
1144
1144
|
ref_key: "detailRef",
|
|
1145
1145
|
ref: o,
|
|
1146
|
-
style:
|
|
1146
|
+
style: Qe({
|
|
1147
1147
|
fontSize: "0.8rem",
|
|
1148
1148
|
maxHeight: _.value,
|
|
1149
1149
|
overflow: "hidden",
|
|
@@ -1151,13 +1151,13 @@ const Me = {
|
|
|
1151
1151
|
})
|
|
1152
1152
|
}, [
|
|
1153
1153
|
w.value.length ? (A(), R("hr", Sn)) : ne("", !0),
|
|
1154
|
-
(A(!0), R(
|
|
1154
|
+
(A(!0), R(J, null, le(w.value, (k) => (A(), R("div", {
|
|
1155
1155
|
key: k.time,
|
|
1156
1156
|
class: "flex gap-1 w-full"
|
|
1157
1157
|
}, [
|
|
1158
1158
|
t("div", Fn, h(k.time), 1),
|
|
1159
1159
|
t("div", wn, [
|
|
1160
|
-
(A(!0), R(
|
|
1160
|
+
(A(!0), R(J, null, le(k.adjustments, (u) => (A(), R("div", {
|
|
1161
1161
|
key: u.name,
|
|
1162
1162
|
class: "flex gap-1"
|
|
1163
1163
|
}, [
|
|
@@ -1170,7 +1170,7 @@ const Me = {
|
|
|
1170
1170
|
"z-index": 50
|
|
1171
1171
|
}, {
|
|
1172
1172
|
content: D(() => [
|
|
1173
|
-
t("div", An, h(r(m)("inventory.stock.record.backdate", [r(
|
|
1173
|
+
t("div", An, h(r(m)("inventory.stock.record.backdate", [r(Je)(new Date(u.backdateFrom))])), 1)
|
|
1174
1174
|
]),
|
|
1175
1175
|
default: D(() => [
|
|
1176
1176
|
g(n, {
|
|
@@ -1261,16 +1261,16 @@ function Dn(f, y) {
|
|
|
1261
1261
|
precision: 4
|
|
1262
1262
|
})} ${y.unit.abbrev}`) : null;
|
|
1263
1263
|
}
|
|
1264
|
-
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" },
|
|
1264
|
+
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 = {
|
|
1265
1265
|
key: 0,
|
|
1266
1266
|
class: "flex-1 flex flex-col items-center gap-16"
|
|
1267
|
-
},
|
|
1267
|
+
}, Hn = { class: "fm-typo-en-body-lg-400 translate-x-4" }, Rn = {
|
|
1268
1268
|
key: 1,
|
|
1269
1269
|
class: "flex flex-col gap-12"
|
|
1270
1270
|
}, On = { class: "pb-16" }, Ln = { class: "fm-typo-cn-body-lg-600" }, Nn = {
|
|
1271
1271
|
class: "grid gap-12 fm-typo-en-body-md-400",
|
|
1272
1272
|
style: { "grid-template-columns": "auto auto auto", "grid-auto-rows": "1fr" }
|
|
1273
|
-
}, zn = { class: "flex flex-col gap-1" }, Yn = { class: "text-fm-color-typo-secondary" }, Kn = { class: "font-bold" }, Wn = { class: "flex flex-col gap-1" }, Gn = { class: "text-fm-color-typo-secondary flex" }, qn = { class: "font-bold" },
|
|
1273
|
+
}, zn = { class: "flex flex-col gap-1" }, Yn = { class: "text-fm-color-typo-secondary" }, Kn = { class: "font-bold" }, Wn = { class: "flex flex-col gap-1" }, Gn = { class: "text-fm-color-typo-secondary flex" }, qn = { class: "font-bold" }, Qn = { class: "flex flex-col gap-1" }, Xn = { class: "text-fm-color-typo-secondary" }, Jn = { class: "font-bold" }, Zn = { class: "flex flex-col gap-1" }, eo = { class: "text-fm-color-typo-secondary" }, to = { class: "font-bold" }, no = { class: "flex flex-col gap-1" }, oo = { class: "text-fm-color-typo-secondary" }, so = { class: "font-bold" }, ao = { class: "flex flex-col gap-1" }, ro = { class: "text-fm-color-typo-secondary" }, lo = { class: "font-bold" }, io = { class: "flex flex-col gap-1" }, uo = { class: "text-fm-color-typo-secondary" }, co = { class: "font-bold" }, mo = { class: "flex flex-col gap-1" }, po = { class: "text-fm-color-typo-secondary" }, vo = { class: "font-bold" }, fo = { class: "flex flex-col gap-1" }, yo = { class: "text-fm-color-typo-secondary" }, _o = { class: "font-bold" }, ko = {
|
|
1274
1274
|
key: 0,
|
|
1275
1275
|
class: "flex flex-col gap-8"
|
|
1276
1276
|
}, ho = { class: "flex" }, go = { class: "flex-1 flex flex-col gap-1" }, bo = { class: "flex gap-1 items-center text-fm-color-typo-secondary" }, xo = { class: "font-bold" }, So = { class: "flex-1 flex flex-col gap-1" }, Fo = { class: "flex gap-1 items-center text-fm-color-typo-secondary" }, wo = { class: "flex flex-col gap-1" }, $o = { class: "font-bold" }, Ao = {
|
|
@@ -1284,7 +1284,7 @@ const jn = { class: "flex items-center w-full fm-typo-en-title-md-800" }, In = {
|
|
|
1284
1284
|
},
|
|
1285
1285
|
emits: ["update:show"],
|
|
1286
1286
|
setup(f) {
|
|
1287
|
-
const y = It(), l = Pe(), o =
|
|
1287
|
+
const y = It(), l = Pe(), o = Ee(), S = hn(), _ = pe(), i = Rt(), { t: m } = ue(), w = f, x = O(!1), a = ye(), n = O(gt(0));
|
|
1288
1288
|
async function F() {
|
|
1289
1289
|
x.value = !0;
|
|
1290
1290
|
try {
|
|
@@ -1306,7 +1306,7 @@ const jn = { class: "flex items-center w-full fm-typo-en-title-md-800" }, In = {
|
|
|
1306
1306
|
});
|
|
1307
1307
|
const C = O([]), k = O([]), u = O(new Array());
|
|
1308
1308
|
function j(e, s) {
|
|
1309
|
-
return s === "day" ? At(e) :
|
|
1309
|
+
return s === "day" ? At(e) : Je(e);
|
|
1310
1310
|
}
|
|
1311
1311
|
function L(e, s) {
|
|
1312
1312
|
const v = e.reduce(
|
|
@@ -1352,7 +1352,7 @@ const jn = { class: "flex items-center w-full fm-typo-en-title-md-800" }, In = {
|
|
|
1352
1352
|
}), P = U(() => {
|
|
1353
1353
|
const e = C.value, s = w.sku;
|
|
1354
1354
|
return Dn(e, s);
|
|
1355
|
-
}),
|
|
1355
|
+
}), E = U(() => {
|
|
1356
1356
|
const e = [...C.value].computeFirst((v) => {
|
|
1357
1357
|
var d, b;
|
|
1358
1358
|
const c = (b = (d = v.skus) == null ? void 0 : d.find) == null ? void 0 : b.call(d, (I) => I.sku._id === w.sku._id);
|
|
@@ -1389,7 +1389,7 @@ const jn = { class: "flex items-center w-full fm-typo-en-title-md-800" }, In = {
|
|
|
1389
1389
|
currency: b.currency
|
|
1390
1390
|
};
|
|
1391
1391
|
return {
|
|
1392
|
-
...
|
|
1392
|
+
...Xe(I, b),
|
|
1393
1393
|
currency: c.currency
|
|
1394
1394
|
};
|
|
1395
1395
|
},
|
|
@@ -1408,8 +1408,8 @@ const jn = { class: "flex items-center w-full fm-typo-en-title-md-800" }, In = {
|
|
|
1408
1408
|
endDate: s
|
|
1409
1409
|
});
|
|
1410
1410
|
}
|
|
1411
|
-
const
|
|
1412
|
-
var I,
|
|
1411
|
+
const H = U(() => w.sku.valuation === ze.Enum.FIFO ? m("inventory.ingredient.valuationMethod.FIFO") : m("inventory.ingredient.valuationMethod.WAVG")), K = U(() => {
|
|
1412
|
+
var I, Q, oe, T;
|
|
1413
1413
|
const e = [...C.value].reverse().computeFirst((z) => {
|
|
1414
1414
|
var W, se;
|
|
1415
1415
|
return (se = (W = z.skus) == null ? void 0 : W.find) == null ? void 0 : se.call(W, (re) => re.sku._id === w.sku._id);
|
|
@@ -1417,7 +1417,7 @@ const jn = { class: "flex items-center w-full fm-typo-en-title-md-800" }, In = {
|
|
|
1417
1417
|
if (!e) return "No data";
|
|
1418
1418
|
const s = e.amounts.reverse()[0], v = {
|
|
1419
1419
|
amount: ((I = s.cost) == null ? void 0 : I.amount) ?? 0,
|
|
1420
|
-
precision: ((
|
|
1420
|
+
precision: ((Q = s.cost) == null ? void 0 : Q.precision) ?? 0
|
|
1421
1421
|
}, c = s.amount, d = c.amount == 0 ? G.fromNumber(0) : G.divide([v, c]);
|
|
1422
1422
|
return {
|
|
1423
1423
|
...G.multiply([d, c]),
|
|
@@ -1427,7 +1427,7 @@ const jn = { class: "flex items-center w-full fm-typo-en-title-md-800" }, In = {
|
|
|
1427
1427
|
var v;
|
|
1428
1428
|
const e = [...C.value].reverse().computeFirst((c) => {
|
|
1429
1429
|
var b, I;
|
|
1430
|
-
const d = (I = (b = c.skus) == null ? void 0 : b.find) == null ? void 0 : I.call(b, (
|
|
1430
|
+
const d = (I = (b = c.skus) == null ? void 0 : b.find) == null ? void 0 : I.call(b, (Q) => Q.sku._id === w.sku._id);
|
|
1431
1431
|
return d == null ? void 0 : d.toCostBalances;
|
|
1432
1432
|
});
|
|
1433
1433
|
return e ? {
|
|
@@ -1445,13 +1445,13 @@ const jn = { class: "flex items-center w-full fm-typo-en-title-md-800" }, In = {
|
|
|
1445
1445
|
endDate: s
|
|
1446
1446
|
});
|
|
1447
1447
|
}
|
|
1448
|
-
const p =
|
|
1448
|
+
const p = He(w, "show");
|
|
1449
1449
|
return (e, s) => {
|
|
1450
|
-
const v = M("FmButton"), c = M("FmField"), d = M("FmDateRangePicker"), b = M("FmSpacer"), I = M("FmCircularProgress"),
|
|
1450
|
+
const v = M("FmButton"), c = M("FmField"), d = M("FmDateRangePicker"), b = M("FmSpacer"), I = M("FmCircularProgress"), Q = M("FmIcon"), oe = M("FmTooltip"), T = M("FmMenuDivider"), z = M("FmChip"), W = M("FmCardSection"), se = M("FmCard"), re = M("FmSideSheet");
|
|
1451
1451
|
return A(), Y(re, {
|
|
1452
1452
|
"dismiss-away": "",
|
|
1453
1453
|
modelValue: r(p),
|
|
1454
|
-
"onUpdate:modelValue": s[4] || (s[4] = (
|
|
1454
|
+
"onUpdate:modelValue": s[4] || (s[4] = (X) => Ie(p) ? p.value = X : null),
|
|
1455
1455
|
"close-button": !1,
|
|
1456
1456
|
"max-width": 560
|
|
1457
1457
|
}, {
|
|
@@ -1461,12 +1461,12 @@ const jn = { class: "flex items-center w-full fm-typo-en-title-md-800" }, In = {
|
|
|
1461
1461
|
g(v, {
|
|
1462
1462
|
variant: "tertiary",
|
|
1463
1463
|
"prepend-icon": "close",
|
|
1464
|
-
onClick: s[0] || (s[0] = (
|
|
1464
|
+
onClick: s[0] || (s[0] = (X) => p.value = !1)
|
|
1465
1465
|
})
|
|
1466
1466
|
])
|
|
1467
1467
|
]),
|
|
1468
1468
|
default: D(() => {
|
|
1469
|
-
var
|
|
1469
|
+
var X;
|
|
1470
1470
|
return [
|
|
1471
1471
|
t("div", Tn, [
|
|
1472
1472
|
t("div", Un, [
|
|
@@ -1504,13 +1504,13 @@ const jn = { class: "flex items-center w-full fm-typo-en-title-md-800" }, In = {
|
|
|
1504
1504
|
"prepend-icon": "navigate_next"
|
|
1505
1505
|
})
|
|
1506
1506
|
]),
|
|
1507
|
-
x.value ? (A(), R("div",
|
|
1507
|
+
x.value ? (A(), R("div", En, [
|
|
1508
1508
|
g(b),
|
|
1509
1509
|
g(I, { size: "xl" }),
|
|
1510
|
-
t("div",
|
|
1510
|
+
t("div", Hn, h(r(m)("inventory.stock.history.loading")), 1),
|
|
1511
1511
|
g(b),
|
|
1512
1512
|
g(b)
|
|
1513
|
-
])) : k.value && ((
|
|
1513
|
+
])) : k.value && ((X = k.value) == null ? void 0 : X.length) > 0 ? (A(), R("div", Rn, [
|
|
1514
1514
|
g(se, { variant: "outlined" }, {
|
|
1515
1515
|
default: D(() => [
|
|
1516
1516
|
g(W, { class: "flex flex-col gap-4" }, {
|
|
@@ -1534,7 +1534,7 @@ const jn = { class: "flex items-center w-full fm-typo-en-title-md-800" }, In = {
|
|
|
1534
1534
|
"z-index": 50
|
|
1535
1535
|
}, {
|
|
1536
1536
|
default: D(() => [
|
|
1537
|
-
g(
|
|
1537
|
+
g(Q, {
|
|
1538
1538
|
name: "warning",
|
|
1539
1539
|
size: "sm"
|
|
1540
1540
|
})
|
|
@@ -1544,9 +1544,9 @@ const jn = { class: "flex items-center w-full fm-typo-en-title-md-800" }, In = {
|
|
|
1544
1544
|
]),
|
|
1545
1545
|
t("div", qn, h(B.value.SALES), 1)
|
|
1546
1546
|
]),
|
|
1547
|
-
t("div",
|
|
1548
|
-
t("div",
|
|
1549
|
-
t("div",
|
|
1547
|
+
t("div", Qn, [
|
|
1548
|
+
t("div", Xn, h(r(m)("inventory.stock.history.summary.totalLose")), 1),
|
|
1549
|
+
t("div", Jn, h(B.value.LOSE), 1)
|
|
1550
1550
|
]),
|
|
1551
1551
|
t("div", Zn, [
|
|
1552
1552
|
t("div", eo, h(r(m)("inventory.stock.history.summary.totalRequest")), 1),
|
|
@@ -1566,7 +1566,7 @@ const jn = { class: "flex items-center w-full fm-typo-en-title-md-800" }, In = {
|
|
|
1566
1566
|
]),
|
|
1567
1567
|
t("div", mo, [
|
|
1568
1568
|
t("div", po, h(r(m)("inventory.stock.history.summary.openingBalance")), 1),
|
|
1569
|
-
t("div", vo, h(
|
|
1569
|
+
t("div", vo, h(E.value), 1)
|
|
1570
1570
|
]),
|
|
1571
1571
|
t("div", fo, [
|
|
1572
1572
|
t("div", yo, h(r(m)("inventory.stock.history.summary.lastStockBalance")), 1),
|
|
@@ -1584,11 +1584,11 @@ const jn = { class: "flex items-center w-full fm-typo-en-title-md-800" }, In = {
|
|
|
1584
1584
|
g(oe, {
|
|
1585
1585
|
variant: "plain",
|
|
1586
1586
|
placement: "top",
|
|
1587
|
-
content: `[${
|
|
1587
|
+
content: `[${H.value}] ${r(m)("inventory.stock.history.estimatedValueTooltip")}`,
|
|
1588
1588
|
"z-index": 50
|
|
1589
1589
|
}, {
|
|
1590
1590
|
default: D(() => [
|
|
1591
|
-
g(
|
|
1591
|
+
g(Q, {
|
|
1592
1592
|
name: "help",
|
|
1593
1593
|
size: "sm"
|
|
1594
1594
|
})
|
|
@@ -1600,7 +1600,7 @@ const jn = { class: "flex items-center w-full fm-typo-en-title-md-800" }, In = {
|
|
|
1600
1600
|
_: 1
|
|
1601
1601
|
}),
|
|
1602
1602
|
t("div", xo, [
|
|
1603
|
-
e.sku.valuation === r(ze).Enum.FIFO ? (A(), R(
|
|
1603
|
+
e.sku.valuation === r(ze).Enum.FIFO ? (A(), R(J, { key: 0 }, [
|
|
1604
1604
|
g(z, {
|
|
1605
1605
|
label: "FIFO",
|
|
1606
1606
|
compact: ""
|
|
@@ -1610,7 +1610,7 @@ const jn = { class: "flex items-center w-full fm-typo-en-title-md-800" }, In = {
|
|
|
1610
1610
|
!1,
|
|
1611
1611
|
ae.value.precision
|
|
1612
1612
|
) : ae.value), 1)
|
|
1613
|
-
], 64)) : (A(), R(
|
|
1613
|
+
], 64)) : (A(), R(J, { key: 1 }, [
|
|
1614
1614
|
ce(h(typeof K.value != "string" ? r(ke)(
|
|
1615
1615
|
K.value,
|
|
1616
1616
|
!1,
|
|
@@ -1633,7 +1633,7 @@ const jn = { class: "flex items-center w-full fm-typo-en-title-md-800" }, In = {
|
|
|
1633
1633
|
t("div", wo, h(r(m)("inventory.stock.history.costSoldTooltip")), 1)
|
|
1634
1634
|
]),
|
|
1635
1635
|
default: D(() => [
|
|
1636
|
-
g(
|
|
1636
|
+
g(Q, {
|
|
1637
1637
|
name: "help",
|
|
1638
1638
|
size: "sm"
|
|
1639
1639
|
})
|
|
@@ -1655,7 +1655,7 @@ const jn = { class: "flex items-center w-full fm-typo-en-title-md-800" }, In = {
|
|
|
1655
1655
|
_: 1
|
|
1656
1656
|
}),
|
|
1657
1657
|
s[5] || (s[5] = t("div", null, null, -1)),
|
|
1658
|
-
(A(!0), R(
|
|
1658
|
+
(A(!0), R(J, null, le(k.value, (ee) => (A(), R(J, {
|
|
1659
1659
|
key: ee.date
|
|
1660
1660
|
}, [
|
|
1661
1661
|
e.sku ? (A(), Y(Mn, {
|
|
@@ -1669,7 +1669,7 @@ const jn = { class: "flex items-center w-full fm-typo-en-title-md-800" }, In = {
|
|
|
1669
1669
|
g(b),
|
|
1670
1670
|
t("div", null, [
|
|
1671
1671
|
t("img", {
|
|
1672
|
-
src: r(
|
|
1672
|
+
src: r(Ht),
|
|
1673
1673
|
alt: "List is empty"
|
|
1674
1674
|
}, null, 8, Co)
|
|
1675
1675
|
]),
|
|
@@ -1685,7 +1685,7 @@ const jn = { class: "flex items-center w-full fm-typo-en-title-md-800" }, In = {
|
|
|
1685
1685
|
}, 8, ["modelValue"]);
|
|
1686
1686
|
};
|
|
1687
1687
|
}
|
|
1688
|
-
}), 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" },
|
|
1688
|
+
}), 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" }, Xo = /* @__PURE__ */ ie({
|
|
1689
1689
|
__name: "StockView",
|
|
1690
1690
|
setup(f) {
|
|
1691
1691
|
const { t: y } = ue(), l = Ue(), o = pe(), S = Pe(), _ = st(), i = Ze(), { columnDefs: m } = Wt();
|
|
@@ -1709,11 +1709,11 @@ const jn = { class: "flex items-center w-full fm-typo-en-title-md-800" }, In = {
|
|
|
1709
1709
|
}
|
|
1710
1710
|
const n = U(
|
|
1711
1711
|
() => l.skus.map(($) => {
|
|
1712
|
-
var q, N,
|
|
1712
|
+
var q, N, H;
|
|
1713
1713
|
const B = $.trackingMeasurement;
|
|
1714
1714
|
let P = (N = (q = S.stockBalance.skus) == null ? void 0 : q.find(
|
|
1715
1715
|
(K) => K.id === $._id
|
|
1716
|
-
)) == null ? void 0 : N.balance,
|
|
1716
|
+
)) == null ? void 0 : N.balance, E = i.inventoryForecast.skus.find(
|
|
1717
1717
|
(K) => K.id === $._id
|
|
1718
1718
|
);
|
|
1719
1719
|
return {
|
|
@@ -1722,8 +1722,8 @@ const jn = { class: "flex items-center w-full fm-typo-en-title-md-800" }, In = {
|
|
|
1722
1722
|
amount: 0,
|
|
1723
1723
|
precision: 0
|
|
1724
1724
|
},
|
|
1725
|
-
day: (
|
|
1726
|
-
trackingUnitAbbrev: B ? ((
|
|
1725
|
+
day: (E == null ? void 0 : E.depletionDays) ?? void 0,
|
|
1726
|
+
trackingUnitAbbrev: B ? ((H = $.unit.measurements.find((K) => K.id === B)) == null ? void 0 : H.abbrev) ?? "" : $.unit.abbrev
|
|
1727
1727
|
};
|
|
1728
1728
|
})
|
|
1729
1729
|
), F = O(""), { breakpoints: C } = Tt(), k = U(() => C.value.xs || C.value.sm), u = U(() => k.value ? 10 : 20), j = Ct(), L = U(() => [
|
|
@@ -1752,7 +1752,7 @@ const jn = { class: "flex items-center w-full fm-typo-en-title-md-800" }, In = {
|
|
|
1752
1752
|
"onClick:action": V
|
|
1753
1753
|
}, {
|
|
1754
1754
|
default: D(() => {
|
|
1755
|
-
var
|
|
1755
|
+
var E, Z, q, N;
|
|
1756
1756
|
return [
|
|
1757
1757
|
t("div", {
|
|
1758
1758
|
class: ge([
|
|
@@ -1767,21 +1767,21 @@ const jn = { class: "flex items-center w-full fm-typo-en-title-md-800" }, In = {
|
|
|
1767
1767
|
searchable: "",
|
|
1768
1768
|
"change-location": "",
|
|
1769
1769
|
search: F.value,
|
|
1770
|
-
"onUpdate:search": B[0] || (B[0] = (
|
|
1770
|
+
"onUpdate:search": B[0] || (B[0] = (H) => F.value = H)
|
|
1771
1771
|
}, null, 8, ["search"]),
|
|
1772
1772
|
(A(), Y(P, {
|
|
1773
|
-
style:
|
|
1773
|
+
style: Qe(r(j).tableHeight),
|
|
1774
1774
|
"column-defs": r(m),
|
|
1775
1775
|
"row-data": n.value,
|
|
1776
1776
|
"search-value": F.value,
|
|
1777
1777
|
loading: w.value || !r(o)._currentLocation,
|
|
1778
|
-
key: (
|
|
1779
|
-
onRowClick: B[1] || (B[1] = (
|
|
1778
|
+
key: (E = r(o)._currentLocation) == null ? void 0 : E.dbName,
|
|
1779
|
+
onRowClick: B[1] || (B[1] = (H) => r(_).showSkuHistory(H.original)),
|
|
1780
1780
|
"page-size": u.value
|
|
1781
1781
|
}, {
|
|
1782
|
-
"list-row": D((
|
|
1782
|
+
"list-row": D((H) => [
|
|
1783
1783
|
g(Bt, {
|
|
1784
|
-
row:
|
|
1784
|
+
row: H,
|
|
1785
1785
|
onRowClick: r(_).showSkuHistory
|
|
1786
1786
|
}, {
|
|
1787
1787
|
default: D((K) => {
|
|
@@ -1804,16 +1804,16 @@ const jn = { class: "flex items-center w-full fm-typo-en-title-md-800" }, In = {
|
|
|
1804
1804
|
]),
|
|
1805
1805
|
t("div", null, [
|
|
1806
1806
|
g(je, {
|
|
1807
|
-
days:
|
|
1807
|
+
days: H.original.day
|
|
1808
1808
|
}, null, 8, ["days"])
|
|
1809
1809
|
]),
|
|
1810
1810
|
t("div", null, [
|
|
1811
1811
|
g(ot, {
|
|
1812
1812
|
class: "xs:w-[160px]",
|
|
1813
|
-
unit:
|
|
1814
|
-
sku:
|
|
1815
|
-
amount:
|
|
1816
|
-
"default-tracking-measurement":
|
|
1813
|
+
unit: H.original.unit,
|
|
1814
|
+
sku: H.original,
|
|
1815
|
+
amount: H.original.balance,
|
|
1816
|
+
"default-tracking-measurement": H.original.trackingMeasurement ?? void 0
|
|
1817
1817
|
}, null, 8, ["unit", "sku", "amount", "default-tracking-measurement"])
|
|
1818
1818
|
])
|
|
1819
1819
|
])
|
|
@@ -1838,5 +1838,5 @@ const jn = { class: "flex items-center w-full fm-typo-en-title-md-800" }, In = {
|
|
|
1838
1838
|
}
|
|
1839
1839
|
});
|
|
1840
1840
|
export {
|
|
1841
|
-
|
|
1841
|
+
Xo as default
|
|
1842
1842
|
};
|