@feedmepos/mf-inventory-portal 1.2.11-dev.2 → 1.2.12-dev.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{App-7THD1njR.js → App-DAWBJNxz.js} +44 -40
- package/dist/{ApprovalView-DMEJRr68.js → ApprovalView-B2WUwSN4.js} +30 -30
- package/dist/{BindingsDialog-BNzLPDnk.js → BindingsDialog-C3OOcB8g.js} +2 -2
- package/dist/{BindingsPicker-b6IVAFK_.js → BindingsPicker-R3Zz0fWB.js} +1 -1
- package/dist/{BindingsTable-C-4XGO_N.js → BindingsTable-B46C8p7M.js} +1 -1
- package/dist/{ClosingDraftView-DVTloUym.js → ClosingDraftView-a_QhmaM4.js} +180 -180
- package/dist/{ClosingTemplateView-C-eHKV0N.js → ClosingTemplateView-CEVmIsVw.js} +3 -3
- package/dist/{DeliveryOrderPrintPreview-ChIV_Wxd.js → DeliveryOrderPrintPreview-BeQFF6sn.js} +1 -1
- package/dist/{FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-DPkGmSYU.js → FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-DIG9NwPj.js} +3 -3
- package/dist/{FmMultiselectDialog-aRqxOX4h.js → FmMultiselectDialog-BunyF2O-.js} +1 -1
- package/dist/{FmUnitInput.vue_vue_type_script_setup_true_lang-_MPI8AAx.js → FmUnitInput.vue_vue_type_script_setup_true_lang-Bx0dzfHO.js} +39 -39
- package/dist/ImportView-CwBeBbXz.js +1220 -0
- package/dist/{IngredientBindedItem.vue_vue_type_script_setup_true_lang-BiHvGyAN.js → IngredientBindedItem.vue_vue_type_script_setup_true_lang-CfwprwJN.js} +1 -1
- package/dist/{IngredientGroupView-DtExVKaV.js → IngredientGroupView-CIPTj0hf.js} +16 -17
- package/dist/IngredientsView-BwBaeLtw.js +2240 -0
- package/dist/{IntegrationView-LnHPQMs8.js → IntegrationView-CvRD-5O6.js} +57 -57
- package/dist/{InventoryBindingForm-Cm9TOWWe.js → InventoryBindingForm-DLQTH1di.js} +1 -1
- package/dist/{InventoryBindingForm.vue_vue_type_script_setup_true_lang-DwGz8gLR.js → InventoryBindingForm.vue_vue_type_script_setup_true_lang-XvIklIYw.js} +31 -31
- package/dist/{InventoryBindingSummary-BQ6ysLf9.js → InventoryBindingSummary-BGFSPQIw.js} +1 -1
- package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-B_ASTDtr.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-B3J0i5IU.js} +1 -1
- package/dist/{PremiumBadge.vue_vue_type_script_setup_true_lang-DdFHN7A8.js → PremiumBadge.vue_vue_type_script_setup_true_lang-CyMRTB5L.js} +1 -1
- package/dist/{PublishView-Dg_U3hW1.js → PublishView-7g0bx6KO.js} +16 -16
- package/dist/{PurchaseOrderPrintPreview-DnwHiTGF.js → PurchaseOrderPrintPreview-LEfLcjkd.js} +1 -1
- package/dist/{ReceiveRequestView-CIzZf6q8.js → ReceiveRequestView-DUNfHRGf.js} +193 -194
- package/dist/RecipeView-XzqGQg_a.js +636 -0
- package/dist/{StockView-D6RmCUZZ.js → StockView-vZr9etBj.js} +165 -166
- package/dist/{SubsidiaryTreeDialog.vue_vue_type_script_setup_true_lang-BAcaiBqq.js → SubsidiaryTreeDialog.vue_vue_type_script_setup_true_lang-3_csD6uU.js} +1 -1
- package/dist/{SupplierView-DmJXuznz.js → SupplierView-CUORFWJW.js} +52 -52
- package/dist/{TransferDetails.vue_vue_type_script_setup_true_lang-9wk6mQHT.js → TransferDetails.vue_vue_type_script_setup_true_lang-DhXoNkss.js} +5 -5
- package/dist/{TransferTemplateView-wcXRmuoK.js → TransferTemplateView-DeliKkYY.js} +97 -97
- package/dist/UnitView-B4NCl6jJ.js +674 -0
- package/dist/{WarehouseView-643lOh1p.js → WarehouseView-jLGGlnwV.js} +32 -32
- package/dist/api/inventory.d.ts +306 -0
- package/dist/{app-CsyUwsea.js → app-DJcCTZjT.js} +7663 -7341
- package/dist/app.d.ts +169 -0
- package/dist/app.js +1 -1
- package/dist/{closing-template-DaHVCTUh.js → closing-template-hM43IpP-.js} +1 -1
- package/dist/{decimal-DveC9JMl.js → decimal-BVu2HlCS.js} +1 -1
- package/dist/{format-unit-display-_9FgoZom.js → format-unit-display-C-M_AirC.js} +25 -25
- package/dist/helper/number.d.ts +1 -0
- package/dist/import-export.helper-C05Vl6i-.js +243 -0
- package/dist/{index-ChAOZMz9.js → index-CNQtmSfJ.js} +1 -1
- package/dist/{index-CZmm0Xbi.js → index-v6hU4gAy.js} +1 -1
- package/dist/{purchase-order-template-D2kAwN4O.js → purchase-order-template-BBCEFnbo.js} +1 -1
- package/dist/router/name.d.ts +1 -0
- package/dist/{stock-CL0X5Bnh.js → stock-CK3LBQmj.js} +1 -1
- package/dist/stores/inventory.d.ts +26 -199
- package/dist/{supplier-D3mOSUzY.js → supplier-CoCAyG12.js} +1 -1
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/{use-ingredient-select-dialog-Ba-l0gZ1.js → use-ingredient-select-dialog-DYfpyC4u.js} +1 -1
- package/dist/{use-inventory-binding-dialog-CpaprD6M.js → use-inventory-binding-dialog-CDwm6TPx.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/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 +3 -3
- package/dist/IngredientsView-DQUK8EMq.js +0 -2475
- package/dist/RecipeView-BQeJBUvu.js +0 -621
- package/dist/UnitView-C1cxS42T.js +0 -667
- package/dist/array-Ca8T3f_G.js +0 -44
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { defineComponent as ae, onMounted as Te, computed as L, ref as
|
|
2
|
-
import {
|
|
1
|
+
import { defineComponent as ae, onMounted as Te, computed as L, ref as Y, watch as Ce, inject as ot, resolveComponent as V, openBlock as $, createElementBlock as N, createElementVNode as e, createVNode as m, withCtx as P, renderSlot as xe, withDirectives as Ue, normalizeClass as re, vModelText as Be, reactive as st, h as j, toDisplayString as I, unref as t, createCommentVNode as oe, Fragment as pe, normalizeStyle as _e, renderList as je, createBlock as le, mergeProps as Qe, createTextVNode as ne, mergeModels as qe, useModel as lt, isRef as Ye, Teleport as nt, normalizeProps as at, guardReactiveProps as rt } from "vue";
|
|
2
|
+
import { O as We, aP as he, t as Ne, L as it, aQ as ut, aR as dt, l as se, aS as mt, b as Ge, a as Ke, Y as Le, c as ge, p as ke, x as be, Z as ye, A as we, M as pt, J as ee, u as Ze, as as ct, a4 as ft, I as Je, e as ue, y as ve, al as yt, W as vt, ad as bt, C as gt, j as Ee, E as ht, G as xt } from "./app-DJcCTZjT.js";
|
|
3
3
|
import { useI18n as me } from "@feedmepos/mf-common";
|
|
4
|
-
import { P as X, f as _t, t as kt, a as ze, u as wt } from "./format-unit-display-
|
|
4
|
+
import { P as X, f as _t, t as kt, a as ze, u as wt } from "./format-unit-display-C-M_AirC.js";
|
|
5
5
|
import { components as de, useSnackbar as Tt, useProxiedModel as Xe, useBreakpoints as Ct } from "@feedmepos/ui-library";
|
|
6
6
|
import { defineStore as Ft, storeToRefs as He } from "pinia";
|
|
7
|
-
import { _ as St, b as It, F as
|
|
8
|
-
import { c as Ot, u as Dt, _ as Vt } from "./FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-
|
|
9
|
-
import { u as At } from "./supplier-
|
|
10
|
-
import { u as Rt } from "./use-ingredient-select-dialog-
|
|
11
|
-
import { u as Pt } from "./purchase-order-template-
|
|
7
|
+
import { _ as St, b as It, F as Mt, a as $t } from "./FmUnitInput.vue_vue_type_script_setup_true_lang-Bx0dzfHO.js";
|
|
8
|
+
import { c as Ot, u as Dt, _ as Vt } from "./FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-DIG9NwPj.js";
|
|
9
|
+
import { u as At } from "./supplier-CoCAyG12.js";
|
|
10
|
+
import { u as Rt } from "./use-ingredient-select-dialog-DYfpyC4u.js";
|
|
11
|
+
import { u as Pt } from "./purchase-order-template-BBCEFnbo.js";
|
|
12
12
|
const Ut = { class: "flex flex-col" }, Bt = { class: "flex flex-col" }, qt = { class: "flex-1" }, Nt = { class: "flex items-center" }, Lt = { class: "flex-1" }, Et = { class: "flex-1" }, zt = /* @__PURE__ */ ae({
|
|
13
13
|
__name: "FmMinMaxInput",
|
|
14
14
|
props: {
|
|
@@ -47,7 +47,7 @@ const Ut = { class: "flex flex-col" }, Bt = { class: "flex flex-col" }, qt = { c
|
|
|
47
47
|
helperState: {}
|
|
48
48
|
},
|
|
49
49
|
setup(p) {
|
|
50
|
-
const h = p, v =
|
|
50
|
+
const h = p, v = We("modelValue"), a = it();
|
|
51
51
|
Te(() => {
|
|
52
52
|
const { min: d, max: y } = v ?? {};
|
|
53
53
|
if (!(!d || !y) && d.precision !== y.precision) {
|
|
@@ -65,22 +65,22 @@ const Ut = { class: "flex flex-col" }, Bt = { class: "flex flex-col" }, qt = { c
|
|
|
65
65
|
+se(i),
|
|
66
66
|
i.precision
|
|
67
67
|
);
|
|
68
|
-
}, u =
|
|
68
|
+
}, u = Y(s(v.min)), x = Y(s(v.max));
|
|
69
69
|
Ce([u, x], ([d, y]) => {
|
|
70
70
|
const w = v ?? {}, i = a(d), g = a(y), O = r.value;
|
|
71
71
|
if (d !== "" && i === !0) {
|
|
72
|
-
const
|
|
73
|
-
w.min =
|
|
72
|
+
const M = Ne(+d, O);
|
|
73
|
+
w.min = M;
|
|
74
74
|
} else
|
|
75
75
|
w.min = null;
|
|
76
76
|
if (y !== "" && g === !0) {
|
|
77
|
-
const
|
|
78
|
-
w.max =
|
|
77
|
+
const M = Ne(+y, O);
|
|
78
|
+
w.max = M;
|
|
79
79
|
} else
|
|
80
80
|
w.max = null;
|
|
81
81
|
v.min = w.min, v.max = w.max;
|
|
82
82
|
});
|
|
83
|
-
const F = Symbol.for("fm:form-state"), c = ot(F, null), o = L(() => h.disabled ?? (c == null ? void 0 : c.getDisabled()) ?? !1), f =
|
|
83
|
+
const F = Symbol.for("fm:form-state"), c = ot(F, null), o = L(() => h.disabled ?? (c == null ? void 0 : c.getDisabled()) ?? !1), f = Y(), b = Y(), k = Y(!1), T = Y(!1), R = L(() => k.value || T.value), U = L(() => [...[
|
|
84
84
|
function() {
|
|
85
85
|
return typeof a(u.value) == "string" || typeof a(x.value) == "string" ? "Must be a number" : !0;
|
|
86
86
|
},
|
|
@@ -90,7 +90,7 @@ const Ut = { class: "flex flex-col" }, Bt = { class: "flex flex-col" }, qt = { c
|
|
|
90
90
|
], ...h.rules ?? []]);
|
|
91
91
|
return (d, y) => {
|
|
92
92
|
const w = V("FmLabel"), i = V("FmField"), g = V("FmFormGroup");
|
|
93
|
-
return
|
|
93
|
+
return $(), N("div", Ut, [
|
|
94
94
|
e("div", Bt, [
|
|
95
95
|
e("div", qt, [
|
|
96
96
|
m(w, {
|
|
@@ -201,7 +201,7 @@ const et = Ft("netsuite-custom-field-helper", () => {
|
|
|
201
201
|
};
|
|
202
202
|
});
|
|
203
203
|
var Q = /* @__PURE__ */ ((p) => (p.Code = "Code", p.Name = "Name", p.DefaultAmount = "DefaultAmount", p.Limit = "Limit", p.Step = "Step", p.Cost = "Cost", p.Delete = "Delete", p))(Q || {});
|
|
204
|
-
function
|
|
204
|
+
function Yt(p, h = {}) {
|
|
205
205
|
const { t: v } = me(), a = Ke(), r = ge(), s = st({}), u = et();
|
|
206
206
|
Te(() => {
|
|
207
207
|
for (const c of p.items) {
|
|
@@ -322,7 +322,7 @@ function Wt(p, h = {}) {
|
|
|
322
322
|
rules: [
|
|
323
323
|
It(o.quantityStep),
|
|
324
324
|
...+se(o.quantity) ? [
|
|
325
|
-
|
|
325
|
+
Mt(
|
|
326
326
|
+se(
|
|
327
327
|
o.minimumQuantity ?? {
|
|
328
328
|
amount: 1,
|
|
@@ -332,7 +332,7 @@ function Wt(p, h = {}) {
|
|
|
332
332
|
)
|
|
333
333
|
)
|
|
334
334
|
] : [],
|
|
335
|
-
|
|
335
|
+
$t(
|
|
336
336
|
o.maximumQuantity ? +se(o.maximumQuantity) : 1 / 0
|
|
337
337
|
),
|
|
338
338
|
function(d) {
|
|
@@ -493,7 +493,7 @@ function Wt(p, h = {}) {
|
|
|
493
493
|
})
|
|
494
494
|
};
|
|
495
495
|
}
|
|
496
|
-
const
|
|
496
|
+
const Wt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-center" }, Kt = { class: "flex-1 flex gap-1 items-center" }, Zt = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, Jt = { class: "fm-typo-en-body-lg-600 text-fm-color-typo-primary" }, Xt = { class: "flex gap-8 w-full" }, eo = { class: "flex-1 flex flex-col gap-4" }, to = { class: "flex-1 flex flex-col gap-4" }, oo = {
|
|
497
497
|
key: 0,
|
|
498
498
|
class: "flex gap-8 w-full"
|
|
499
499
|
}, so = { class: "flex-1 flex flex-col gap-4" }, lo = { class: "flex-1 flex flex-col gap-4" }, no = { class: "flex gap-8 w-full" }, ao = { class: "flex-1 flex flex-col gap-4" }, ro = /* @__PURE__ */ ae({
|
|
@@ -508,9 +508,9 @@ const Yt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
|
|
|
508
508
|
return a;
|
|
509
509
|
}
|
|
510
510
|
return (a, r) => {
|
|
511
|
-
var u, x, F, c, o, f, b, k, T, R, U, d, y, w, i, g, O,
|
|
511
|
+
var u, x, F, c, o, f, b, k, T, R, U, d, y, w, i, g, O, M, _, W, te, E, B, Z, l, n, C, q, z, G;
|
|
512
512
|
const s = V("FmLabel");
|
|
513
|
-
return
|
|
513
|
+
return $(), N("div", Wt, [
|
|
514
514
|
e("div", Gt, [
|
|
515
515
|
e("div", Kt, [
|
|
516
516
|
e("span", Zt, " (" + I(a.row.original.sku.code) + ") ", 1),
|
|
@@ -545,14 +545,14 @@ const Yt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
|
|
|
545
545
|
r[1] || (r[1] = e("div", { class: "fm-typo-en-body-md-600 text-fm-color-primary" }, null, -1))
|
|
546
546
|
])
|
|
547
547
|
]),
|
|
548
|
-
a.row.original ? (
|
|
548
|
+
a.row.original ? ($(), N("div", oo, [
|
|
549
549
|
e("div", so, [
|
|
550
550
|
m(s, {
|
|
551
551
|
label: t(h)(`inventory.transfer.form.items.table.${t(Q).DefaultAmount}`)
|
|
552
552
|
}, null, 8, ["label"]),
|
|
553
553
|
m(t(ee), {
|
|
554
|
-
render: (
|
|
555
|
-
props: (
|
|
554
|
+
render: (M = (O = (g = a.cellByColId[t(Q).DefaultAmount]) == null ? void 0 : g.column) == null ? void 0 : O.columnDef) == null ? void 0 : M.cell,
|
|
555
|
+
props: (W = (_ = a.cellByColId[t(Q).DefaultAmount]) == null ? void 0 : _.getContext) == null ? void 0 : W.call(_)
|
|
556
556
|
}, null, 8, ["render", "props"]),
|
|
557
557
|
r[2] || (r[2] = e("div", { class: "fm-typo-en-body-md-600 text-fm-color-primary" }, null, -1))
|
|
558
558
|
]),
|
|
@@ -594,14 +594,14 @@ const Yt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
|
|
|
594
594
|
function h(v) {
|
|
595
595
|
return v.column.columnDef.meta;
|
|
596
596
|
}
|
|
597
|
-
return (v, a) => (
|
|
597
|
+
return (v, a) => ($(), N(pe, null, [
|
|
598
598
|
e("tr", {
|
|
599
599
|
class: "hover:bg-fm-color-opacity-sm border-b border-fm-color-neutral-gray-100",
|
|
600
600
|
style: _e({ backgroundColor: v.errorMessage ? "#ffd6d6" : void 0 })
|
|
601
601
|
}, [
|
|
602
|
-
(
|
|
602
|
+
($(!0), N(pe, null, je(v.row.getVisibleCells(), (r) => {
|
|
603
603
|
var s, u, x, F, c;
|
|
604
|
-
return
|
|
604
|
+
return $(), N("td", {
|
|
605
605
|
key: r.id,
|
|
606
606
|
class: re(["text-fm-color-typo-primary", ((s = h(r)) == null ? void 0 : s.cellClass) ?? "px-16", "py-2"]),
|
|
607
607
|
style: _e({
|
|
@@ -619,7 +619,7 @@ const Yt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
|
|
|
619
619
|
], 6);
|
|
620
620
|
}), 128))
|
|
621
621
|
], 4),
|
|
622
|
-
v.errorMessage ? (
|
|
622
|
+
v.errorMessage ? ($(), N("tr", uo, [
|
|
623
623
|
e("td", {
|
|
624
624
|
colspan: v.row.getVisibleCells().length,
|
|
625
625
|
class: "text-red-600 px-16 py-2"
|
|
@@ -638,7 +638,7 @@ const Yt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
|
|
|
638
638
|
},
|
|
639
639
|
emits: ["update:disabled"],
|
|
640
640
|
setup(p, { expose: h, emit: v }) {
|
|
641
|
-
const a = p, r = v, s =
|
|
641
|
+
const a = p, r = v, s = We(), { t: u } = me(), x = Y({}), F = Ze(), c = Ke(), o = At(), f = ge(), b = Ge(), k = et();
|
|
642
642
|
Ce(
|
|
643
643
|
() => s.purchaseOrder.items.length,
|
|
644
644
|
() => {
|
|
@@ -702,14 +702,14 @@ const Yt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
|
|
|
702
702
|
return ((q = C.doc) == null ? void 0 : q._id) === ((z = s.purchaseOrder.supplier) == null ? void 0 : z._id);
|
|
703
703
|
}) ? `Location ${(n = s.purchaseOrder.supplier) == null ? void 0 : n.name} must be removed because template cannot be used to transfer to itself.` : !0;
|
|
704
704
|
}
|
|
705
|
-
const
|
|
705
|
+
const M = L({
|
|
706
706
|
get() {
|
|
707
707
|
return s.purchaseOrder.remark ?? void 0;
|
|
708
708
|
},
|
|
709
709
|
set(l) {
|
|
710
710
|
s.purchaseOrder.remark = l;
|
|
711
711
|
}
|
|
712
|
-
}), _ =
|
|
712
|
+
}), _ = Y();
|
|
713
713
|
h({
|
|
714
714
|
validateInputs: () => {
|
|
715
715
|
var l, n;
|
|
@@ -724,7 +724,7 @@ const Yt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
|
|
|
724
724
|
(n = (l = _.value) == null ? void 0 : l.resetInputs) == null || n.call(l);
|
|
725
725
|
}
|
|
726
726
|
});
|
|
727
|
-
const
|
|
727
|
+
const W = L(() => ({
|
|
728
728
|
duplicateItem: (l) => {
|
|
729
729
|
s.purchaseOrder.items = [
|
|
730
730
|
...s.purchaseOrder.items,
|
|
@@ -742,11 +742,11 @@ const Yt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
|
|
|
742
742
|
let n = [];
|
|
743
743
|
l.id ? n = s.purchaseOrder.items.filter((C) => C.id !== l.id) : n = s.purchaseOrder.items.filter((C) => C.sku._id !== l.sku._id), s.purchaseOrder.items = n;
|
|
744
744
|
}
|
|
745
|
-
})), te =
|
|
745
|
+
})), te = Yt(
|
|
746
746
|
{
|
|
747
|
-
duplicateItem:
|
|
748
|
-
updateItem:
|
|
749
|
-
deleteItem:
|
|
747
|
+
duplicateItem: W.value.duplicateItem,
|
|
748
|
+
updateItem: W.value.updateItem,
|
|
749
|
+
deleteItem: W.value.deleteItem,
|
|
750
750
|
get supplier() {
|
|
751
751
|
return s.purchaseOrder.supplier;
|
|
752
752
|
},
|
|
@@ -764,7 +764,7 @@ const Yt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
|
|
|
764
764
|
onUpdate: (l, n, C, q) => {
|
|
765
765
|
if (l < 0 || l >= s.purchaseOrder.items.length) return;
|
|
766
766
|
const z = s.purchaseOrder.items[l];
|
|
767
|
-
z &&
|
|
767
|
+
z && W.value.updateItem({
|
|
768
768
|
...z,
|
|
769
769
|
sku: n,
|
|
770
770
|
// Sku might be outdated, so we need to update it
|
|
@@ -830,7 +830,7 @@ const Yt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
|
|
|
830
830
|
}
|
|
831
831
|
return (l, n) => {
|
|
832
832
|
const C = V("FmTextField"), q = V("FmSelect"), z = V("FmTextarea"), G = V("FmButton"), D = V("FmTable"), A = V("FmFormGroup"), K = V("FmForm");
|
|
833
|
-
return
|
|
833
|
+
return $(), le(K, {
|
|
834
834
|
ref_key: "formRef",
|
|
835
835
|
ref: _,
|
|
836
836
|
class: "flex flex-col gap-32",
|
|
@@ -916,8 +916,8 @@ const Yt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
|
|
|
916
916
|
label: t(u)("inventory.transfer.form.remark"),
|
|
917
917
|
"label-mark": "optional",
|
|
918
918
|
"max-length": 240,
|
|
919
|
-
modelValue:
|
|
920
|
-
"onUpdate:modelValue": n[4] || (n[4] = (S) =>
|
|
919
|
+
modelValue: M.value,
|
|
920
|
+
"onUpdate:modelValue": n[4] || (n[4] = (S) => M.value = S),
|
|
921
921
|
class: re({ "text-fm-color-typo-disabled": l.disabled })
|
|
922
922
|
}, null, 8, ["label", "modelValue", "class"])
|
|
923
923
|
])
|
|
@@ -954,7 +954,7 @@ const Yt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
|
|
|
954
954
|
e("div", go, [
|
|
955
955
|
e("div", ho, [
|
|
956
956
|
e("div", xo, I(t(u)("inventory.transfer.form.items.title")), 1),
|
|
957
|
-
t(b).isEnabled ? (
|
|
957
|
+
t(b).isEnabled ? ($(), le(G, {
|
|
958
958
|
key: 0,
|
|
959
959
|
label: "Check NetSuite",
|
|
960
960
|
"prepend-icon": "troubleshoot",
|
|
@@ -972,7 +972,7 @@ const Yt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
|
|
|
972
972
|
size: "md"
|
|
973
973
|
}, null, 8, ["disabled", "label"])
|
|
974
974
|
]),
|
|
975
|
-
t(b).isEnabled ? (
|
|
975
|
+
t(b).isEnabled ? ($(), N("div", _o, n[9] || (n[9] = [
|
|
976
976
|
ne(" NetSuite is enabled. "),
|
|
977
977
|
e("ul", { style: { "list-style": "initial", "margin-left": "20px" } }, [
|
|
978
978
|
e("li", null, ' When adding new item or changing UOM, the first match available custom code (if any) will be applied to "Code" for each item by default. '),
|
|
@@ -991,7 +991,7 @@ const Yt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
|
|
|
991
991
|
]),
|
|
992
992
|
n[13] || (n[13] = e("p", null, ' You can leave "Max" empty to remove the limit on the maximum quantity of the item when creating an order request. ', -1))
|
|
993
993
|
]),
|
|
994
|
-
(
|
|
994
|
+
($(), le(D, {
|
|
995
995
|
"column-defs": E.value,
|
|
996
996
|
"row-data": t(s).purchaseOrder.items,
|
|
997
997
|
key: t(s).purchaseOrder.items.map((S) => S.sku._id).join("."),
|
|
@@ -1002,12 +1002,12 @@ const Yt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
|
|
|
1002
1002
|
m(po, {
|
|
1003
1003
|
row: S,
|
|
1004
1004
|
errorMessage: x.value[S.index],
|
|
1005
|
-
"onUpdate:item": n[6] || (n[6] = (H) =>
|
|
1005
|
+
"onUpdate:item": n[6] || (n[6] = (H) => W.value.updateItem(H)),
|
|
1006
1006
|
disabled: l.disabled
|
|
1007
1007
|
}, null, 8, ["row", "errorMessage", "disabled"])
|
|
1008
1008
|
]),
|
|
1009
1009
|
"list-row": P((S) => [
|
|
1010
|
-
(
|
|
1010
|
+
($(), le(Je, {
|
|
1011
1011
|
row: S,
|
|
1012
1012
|
key: t(s).purchaseOrder.items.map((H) => H.sku._id).join(".")
|
|
1013
1013
|
}, {
|
|
@@ -1015,7 +1015,7 @@ const Yt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
|
|
|
1015
1015
|
m(ro, {
|
|
1016
1016
|
row: S,
|
|
1017
1017
|
"cell-by-col-id": H,
|
|
1018
|
-
"onUpdate:item": n[7] || (n[7] = (ie) =>
|
|
1018
|
+
"onUpdate:item": n[7] || (n[7] = (ie) => W.value.updateItem(ie)),
|
|
1019
1019
|
disabled: l.disabled
|
|
1020
1020
|
}, null, 8, ["row", "cell-by-col-id", "disabled"])
|
|
1021
1021
|
]),
|
|
@@ -1045,13 +1045,13 @@ const Yt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
|
|
|
1045
1045
|
},
|
|
1046
1046
|
emits: ["confirm"],
|
|
1047
1047
|
setup(p, { emit: h }) {
|
|
1048
|
-
const v = p, a = h, r =
|
|
1048
|
+
const v = p, a = h, r = Y(!1);
|
|
1049
1049
|
function s() {
|
|
1050
1050
|
r.value = !1, a("confirm");
|
|
1051
1051
|
}
|
|
1052
1052
|
return (u, x) => {
|
|
1053
1053
|
const F = V("FmButton"), c = V("FmDialog");
|
|
1054
|
-
return
|
|
1054
|
+
return $(), N("div", null, [
|
|
1055
1055
|
m(F, {
|
|
1056
1056
|
label: v.label,
|
|
1057
1057
|
loading: v.loading,
|
|
@@ -1090,7 +1090,7 @@ const Yt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
|
|
|
1090
1090
|
]);
|
|
1091
1091
|
};
|
|
1092
1092
|
}
|
|
1093
|
-
}), So = { class: "flex items-center" }, Io = { class: "fm-typo-en-title-md-800" },
|
|
1093
|
+
}), So = { class: "flex items-center" }, Io = { class: "fm-typo-en-title-md-800" }, Mo = { class: "flex gap-4" }, $o = /* @__PURE__ */ ae({
|
|
1094
1094
|
__name: "TransferTemplateDialog",
|
|
1095
1095
|
props: /* @__PURE__ */ qe({
|
|
1096
1096
|
mode: {},
|
|
@@ -1134,7 +1134,7 @@ const Yt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
|
|
|
1134
1134
|
}
|
|
1135
1135
|
};
|
|
1136
1136
|
}
|
|
1137
|
-
const o =
|
|
1137
|
+
const o = Y(a.modelValue ?? c()), f = Y(((w = a.modelValue) == null ? void 0 : w._id) ?? `${Math.random()}`);
|
|
1138
1138
|
Ce(
|
|
1139
1139
|
() => a.show,
|
|
1140
1140
|
(i) => {
|
|
@@ -1152,7 +1152,7 @@ const Yt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
|
|
|
1152
1152
|
return x("inventory.transfer.template.update.title");
|
|
1153
1153
|
}
|
|
1154
1154
|
return "";
|
|
1155
|
-
}), T =
|
|
1155
|
+
}), T = Y();
|
|
1156
1156
|
h({
|
|
1157
1157
|
validateInputs: () => {
|
|
1158
1158
|
var i, g;
|
|
@@ -1172,20 +1172,20 @@ const Yt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
|
|
|
1172
1172
|
const i = o.value;
|
|
1173
1173
|
if (i) {
|
|
1174
1174
|
b.value = !0, (((g = i.purchaseOrder.supplier) == null ? void 0 : g.internal) === ve.enum.warehouse || ((O = i.purchaseOrder.supplier) == null ? void 0 : O.internal) === ve.enum.restaurant) && (i.purchaseOrder.items = i.purchaseOrder.items.map(
|
|
1175
|
-
({ totalCost:
|
|
1175
|
+
({ totalCost: M, ..._ }) => _
|
|
1176
1176
|
));
|
|
1177
1177
|
try {
|
|
1178
|
-
await s.createTemplate(i), await new Promise((
|
|
1178
|
+
await s.createTemplate(i), await new Promise((M) => setTimeout(M, 1e3)), u.open({
|
|
1179
1179
|
title: x("inventory.transfer.template.create.success"),
|
|
1180
1180
|
message: x("inventory.transfer.template.create.successMessage"),
|
|
1181
1181
|
type: "success"
|
|
1182
1182
|
}), r("update:show", !1), r("submitted");
|
|
1183
|
-
} catch (
|
|
1183
|
+
} catch (M) {
|
|
1184
1184
|
u.open({
|
|
1185
1185
|
title: x("inventory.transfer.template.create.error"),
|
|
1186
1186
|
message: x("inventory.transfer.template.create.errorMessage"),
|
|
1187
1187
|
type: "error"
|
|
1188
|
-
}), console.error("Error in creating transfer template",
|
|
1188
|
+
}), console.error("Error in creating transfer template", M);
|
|
1189
1189
|
} finally {
|
|
1190
1190
|
b.value = !1;
|
|
1191
1191
|
}
|
|
@@ -1196,20 +1196,20 @@ const Yt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
|
|
|
1196
1196
|
const i = o.value;
|
|
1197
1197
|
if (i) {
|
|
1198
1198
|
b.value = !0, (((g = i.purchaseOrder.supplier) == null ? void 0 : g.internal) === ve.enum.warehouse || ((O = i.purchaseOrder.supplier) == null ? void 0 : O.internal) === ve.enum.restaurant) && (i.purchaseOrder.items = i.purchaseOrder.items.map(
|
|
1199
|
-
({ totalCost:
|
|
1199
|
+
({ totalCost: M, ..._ }) => _
|
|
1200
1200
|
));
|
|
1201
1201
|
try {
|
|
1202
|
-
await s.updateTemplate(i), await new Promise((
|
|
1202
|
+
await s.updateTemplate(i), await new Promise((M) => setTimeout(M, 1e3)), u.open({
|
|
1203
1203
|
title: x("inventory.transfer.template.update.success"),
|
|
1204
1204
|
message: x("inventory.transfer.template.update.successMessage"),
|
|
1205
1205
|
type: "success"
|
|
1206
1206
|
}), r("update:show", !1), r("submitted");
|
|
1207
|
-
} catch (
|
|
1207
|
+
} catch (M) {
|
|
1208
1208
|
u.open({
|
|
1209
1209
|
title: x("inventory.transfer.template.update.error"),
|
|
1210
1210
|
message: x("inventory.transfer.template.update.errorMessage"),
|
|
1211
1211
|
type: "error"
|
|
1212
|
-
}), console.error("Error in updating transfer template",
|
|
1212
|
+
}), console.error("Error in updating transfer template", M);
|
|
1213
1213
|
} finally {
|
|
1214
1214
|
b.value = !1;
|
|
1215
1215
|
}
|
|
@@ -1228,10 +1228,10 @@ const Yt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
|
|
|
1228
1228
|
(g = (i = T.value) == null ? void 0 : i.validateInputs) == null || g.call(i);
|
|
1229
1229
|
}
|
|
1230
1230
|
return (i, g) => {
|
|
1231
|
-
const O = V("FmButton"),
|
|
1232
|
-
return
|
|
1231
|
+
const O = V("FmButton"), M = V("FmSideSheet");
|
|
1232
|
+
return $(), le(M, {
|
|
1233
1233
|
modelValue: t(F),
|
|
1234
|
-
"onUpdate:modelValue": g[3] || (g[3] = (_) =>
|
|
1234
|
+
"onUpdate:modelValue": g[3] || (g[3] = (_) => Ye(F) ? F.value = _ : null),
|
|
1235
1235
|
"dismiss-away": "",
|
|
1236
1236
|
"close-button": "",
|
|
1237
1237
|
"max-width": 1600
|
|
@@ -1242,7 +1242,7 @@ const Yt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
|
|
|
1242
1242
|
])
|
|
1243
1243
|
]),
|
|
1244
1244
|
default: P(() => [
|
|
1245
|
-
(
|
|
1245
|
+
($(), le(To, {
|
|
1246
1246
|
class: "w-full",
|
|
1247
1247
|
ref_key: "formRef",
|
|
1248
1248
|
ref: T,
|
|
@@ -1255,7 +1255,7 @@ const Yt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
|
|
|
1255
1255
|
}, null, 8, ["model-value", "disabled"]))
|
|
1256
1256
|
]),
|
|
1257
1257
|
"side-sheet-footer": P(() => [
|
|
1258
|
-
e("div",
|
|
1258
|
+
e("div", Mo, [
|
|
1259
1259
|
m(Fo, {
|
|
1260
1260
|
loading: b.value,
|
|
1261
1261
|
label: t(x)("common.save"),
|
|
@@ -1289,10 +1289,10 @@ const Yt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
|
|
|
1289
1289
|
}, Lo = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Eo = { class: "flex gap-1" }, zo = { class: "fm-typo-en-body-lg-600" }, Ho = {
|
|
1290
1290
|
key: 1,
|
|
1291
1291
|
class: "flex flex-col gap-4"
|
|
1292
|
-
}, jo = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Qo = { class: "fm-typo-en-body-lg-600" },
|
|
1292
|
+
}, jo = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Qo = { class: "fm-typo-en-body-lg-600" }, Yo = {
|
|
1293
1293
|
key: 2,
|
|
1294
1294
|
class: "flex flex-col gap-4"
|
|
1295
|
-
},
|
|
1295
|
+
}, Wo = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Go = { class: "fm-typo-en-body-lg-600" }, Ko = {
|
|
1296
1296
|
key: 3,
|
|
1297
1297
|
class: "flex flex-col gap-4"
|
|
1298
1298
|
}, Zo = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Jo = { class: "fm-typo-en-body-lg-600" }, Xo = { class: "border border-fm-color-neutral-gray-200 fm-corner-radius-lg p-16" }, es = { class: "flex flex-col gap-8" }, ts = { class: "fm-typo-en-body-lg-600" }, os = { class: "flex w-full gap-4" }, ss = { class: "grow fm-typo-en-body-lg-400 line-clamp-2" }, ls = { class: "fm-typo-en-body-lg-600 shrink-0" }, ns = { class: "flex w-full gap-4 fm-typo-en-body-sm-400" }, as = { class: "grow fm-typo-en-body-lg-400 text-fm-color-typo-secondary line-clamp-2" }, rs = {
|
|
@@ -1315,25 +1315,25 @@ const Yt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
|
|
|
1315
1315
|
}), x = [
|
|
1316
1316
|
{ accessorKey: "name", header: () => "Name" },
|
|
1317
1317
|
{ accessorKey: "type", header: () => "Type" }
|
|
1318
|
-
], F =
|
|
1318
|
+
], F = Y(""), c = L(
|
|
1319
1319
|
() => {
|
|
1320
1320
|
var b, k, T, R;
|
|
1321
1321
|
return ((k = (b = u.value) == null ? void 0 : b.supplier) == null ? void 0 : k.internal) === "restaurant" || ((R = (T = u.value) == null ? void 0 : T.supplier) == null ? void 0 : R.internal) === "warehouse" ? X.TRANSFER : X.PURCHASE;
|
|
1322
1322
|
}
|
|
1323
|
-
), o =
|
|
1323
|
+
), o = Y(!0), f = Xe(v, "show");
|
|
1324
1324
|
return (b, k) => {
|
|
1325
1325
|
var g;
|
|
1326
1326
|
const T = V("FmMenuDivider"), R = V("FmCard"), U = V("FmIcon"), d = V("FmTextField"), y = V("FmTable"), w = V("FmButton"), i = V("FmSideSheet");
|
|
1327
|
-
return
|
|
1327
|
+
return $(), le(i, {
|
|
1328
1328
|
header: t(s)("inventory.transfer.template.details.view", { template: (g = b.template) == null ? void 0 : g.name }),
|
|
1329
1329
|
modelValue: t(f),
|
|
1330
|
-
"onUpdate:modelValue": k[2] || (k[2] = (O) =>
|
|
1330
|
+
"onUpdate:modelValue": k[2] || (k[2] = (O) => Ye(f) ? f.value = O : null),
|
|
1331
1331
|
"dismiss-away": o.value,
|
|
1332
1332
|
"close-button": "",
|
|
1333
1333
|
"max-width": 1200
|
|
1334
1334
|
}, {
|
|
1335
1335
|
default: P(() => {
|
|
1336
|
-
var O,
|
|
1336
|
+
var O, M;
|
|
1337
1337
|
return [
|
|
1338
1338
|
e("div", Oo, [
|
|
1339
1339
|
e("div", null, [
|
|
@@ -1342,7 +1342,7 @@ const Yt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
|
|
|
1342
1342
|
class: "flex flex-col gap-8 px-12 py-16"
|
|
1343
1343
|
}, {
|
|
1344
1344
|
default: P(() => {
|
|
1345
|
-
var _,
|
|
1345
|
+
var _, W, te, E, B, Z, l, n, C;
|
|
1346
1346
|
return [
|
|
1347
1347
|
e("div", Do, [
|
|
1348
1348
|
e("div", Vo, I(t(s)("inventory.transfer.template.details.templateSummary")), 1),
|
|
@@ -1358,26 +1358,26 @@ const Yt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
|
|
|
1358
1358
|
]),
|
|
1359
1359
|
e("div", qo, I(t(yt)(((_ = b.template) == null ? void 0 : _._id) ?? "")), 1)
|
|
1360
1360
|
]),
|
|
1361
|
-
(
|
|
1361
|
+
(W = b.template) != null && W.updatedAt ? ($(), N("div", No, [
|
|
1362
1362
|
e("div", Lo, [
|
|
1363
1363
|
e("div", Eo, I(t(s)("inventory.transfer.receiveRequest.details.updatedAt")), 1)
|
|
1364
1364
|
]),
|
|
1365
1365
|
e("div", zo, [
|
|
1366
1366
|
ne(I(t(vt)(new Date(b.template.updatedAt))) + " ", 1),
|
|
1367
|
-
(te = b.template.updatedBy) != null && te.name ? (
|
|
1367
|
+
(te = b.template.updatedBy) != null && te.name ? ($(), N(pe, { key: 0 }, [
|
|
1368
1368
|
ne(" (" + I(b.template.updatedBy.name) + ") ", 1)
|
|
1369
1369
|
], 64)) : oe("", !0)
|
|
1370
1370
|
])
|
|
1371
1371
|
])) : oe("", !0),
|
|
1372
|
-
(B = (E = u.value) == null ? void 0 : E.supplier) != null && B.name ? (
|
|
1372
|
+
(B = (E = u.value) == null ? void 0 : E.supplier) != null && B.name ? ($(), N("div", Ho, [
|
|
1373
1373
|
e("div", jo, I(t(s)("inventory.transfer.receiveRequest.details.from")), 1),
|
|
1374
1374
|
e("div", Qo, I((l = (Z = u.value) == null ? void 0 : Z.supplier) == null ? void 0 : l.name), 1)
|
|
1375
1375
|
])) : oe("", !0),
|
|
1376
|
-
(n = u.value) != null && n.ref ? (
|
|
1377
|
-
e("div",
|
|
1376
|
+
(n = u.value) != null && n.ref ? ($(), N("div", Yo, [
|
|
1377
|
+
e("div", Wo, I(t(s)("inventory.transfer.receiveRequest.details.reference")), 1),
|
|
1378
1378
|
e("div", Go, I(u.value.ref), 1)
|
|
1379
1379
|
])) : oe("", !0),
|
|
1380
|
-
(C = u.value) != null && C.remark ? (
|
|
1380
|
+
(C = u.value) != null && C.remark ? ($(), N("div", Ko, [
|
|
1381
1381
|
e("div", Zo, I(t(s)("inventory.transfer.receiveRequest.details.remark")), 1),
|
|
1382
1382
|
e("div", Jo, I(u.value.remark), 1)
|
|
1383
1383
|
])) : oe("", !0)
|
|
@@ -1390,7 +1390,7 @@ const Yt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
|
|
|
1390
1390
|
e("div", Xo, [
|
|
1391
1391
|
e("div", es, [
|
|
1392
1392
|
e("div", ts, I(t(s)("inventory.transfer.receiveRequest.details.requestedItems")), 1),
|
|
1393
|
-
(
|
|
1393
|
+
($(!0), N(pe, null, je(((O = u.value) == null ? void 0 : O.items) ?? [], (_) => ($(), N("div", {
|
|
1394
1394
|
key: _.code,
|
|
1395
1395
|
class: "flex flex-col"
|
|
1396
1396
|
}, [
|
|
@@ -1401,9 +1401,9 @@ const Yt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
|
|
|
1401
1401
|
]),
|
|
1402
1402
|
e("div", ns, [
|
|
1403
1403
|
e("div", as, I(_.code), 1),
|
|
1404
|
-
_.totalCost && t(r).enableTotalCost ? (
|
|
1404
|
+
_.totalCost && t(r).enableTotalCost ? ($(), N("div", rs, " (" + I(t(bt)(_.totalCost)) + ") ", 1)) : oe("", !0)
|
|
1405
1405
|
]),
|
|
1406
|
-
t(kt)(_) ? (
|
|
1406
|
+
t(kt)(_) ? ($(), N("div", is, [
|
|
1407
1407
|
m(U, {
|
|
1408
1408
|
name: "error",
|
|
1409
1409
|
color: "system-error-300",
|
|
@@ -1433,7 +1433,7 @@ const Yt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
|
|
|
1433
1433
|
style: { height: "500px" },
|
|
1434
1434
|
"column-defs": x,
|
|
1435
1435
|
"search-value": F.value,
|
|
1436
|
-
"row-data": ((
|
|
1436
|
+
"row-data": ((M = v.template) == null ? void 0 : M.locations) ?? [{ name: "All locations" }]
|
|
1437
1437
|
}, null, 8, ["search-value", "row-data"])
|
|
1438
1438
|
])
|
|
1439
1439
|
])
|
|
@@ -1456,13 +1456,13 @@ const Yt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
|
|
|
1456
1456
|
}), cs = { class: "flex-1 flex flex-col gap-8" }, fs = { class: "flex flex-col" }, ys = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, vs = { class: "fm-typo-en-body-lg-600 text-fm-color-typo-primary" }, bs = { class: "fm-typo-en-body-lg-400" }, gs = { class: "fm-typo-en-body-lg-400 line-clamp-1" }, hs = { class: "fm-typo-en-body-lg-400 line-clamp-2" }, Os = /* @__PURE__ */ ae({
|
|
1457
1457
|
__name: "TransferTemplateView",
|
|
1458
1458
|
setup(p) {
|
|
1459
|
-
const { t: h } = me(), { createTemplate: v, viewTemplate: a, importTemplates: r, exportTemplates: s } = ze(), { templateDialogProps: u, templateDetailsProps: x } = He(ze()), F = wt(), { loading: c, templates: o } = He(F), f =
|
|
1459
|
+
const { t: h } = me(), { createTemplate: v, viewTemplate: a, importTemplates: r, exportTemplates: s } = ze(), { templateDialogProps: u, templateDetailsProps: x } = He(ze()), F = wt(), { loading: c, templates: o } = He(F), f = Y(!1), b = gt(), k = Ze(), { breakpoints: T } = Ct();
|
|
1460
1460
|
Te(F.fetchTemplates);
|
|
1461
1461
|
const R = L(
|
|
1462
1462
|
() => f.value || c.value || !k._currentLocation
|
|
1463
|
-
), U = L(() => o.value), d =
|
|
1464
|
-
function i(
|
|
1465
|
-
switch (
|
|
1463
|
+
), U = L(() => o.value), d = Y(""), y = L(() => T.value.xs || T.value.sm), w = L(() => y.value ? 10 : 20);
|
|
1464
|
+
function i(M) {
|
|
1465
|
+
switch (M) {
|
|
1466
1466
|
case Ee.Add:
|
|
1467
1467
|
return v();
|
|
1468
1468
|
case "refresh":
|
|
@@ -1473,8 +1473,8 @@ const Yt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
|
|
|
1473
1473
|
return s();
|
|
1474
1474
|
}
|
|
1475
1475
|
}
|
|
1476
|
-
function g(
|
|
1477
|
-
return
|
|
1476
|
+
function g(M) {
|
|
1477
|
+
return M;
|
|
1478
1478
|
}
|
|
1479
1479
|
const O = L(() => [
|
|
1480
1480
|
{
|
|
@@ -1499,9 +1499,9 @@ const Yt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
|
|
|
1499
1499
|
isPrimary: !1
|
|
1500
1500
|
}
|
|
1501
1501
|
]);
|
|
1502
|
-
return (
|
|
1503
|
-
const
|
|
1504
|
-
return
|
|
1502
|
+
return (M, _) => {
|
|
1503
|
+
const W = V("FmTable");
|
|
1504
|
+
return $(), N(pe, null, [
|
|
1505
1505
|
m(ht, {
|
|
1506
1506
|
title: t(h)("inventory.transfer.template.title2"),
|
|
1507
1507
|
actions: O.value,
|
|
@@ -1524,7 +1524,7 @@ const Yt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
|
|
|
1524
1524
|
search: d.value,
|
|
1525
1525
|
"onUpdate:search": _[0] || (_[0] = (E) => d.value = E)
|
|
1526
1526
|
}, null, 8, ["search"]),
|
|
1527
|
-
(
|
|
1527
|
+
($(), le(W, {
|
|
1528
1528
|
style: _e(t(b).tableHeight),
|
|
1529
1529
|
"column-defs": t(F).columnDefs,
|
|
1530
1530
|
"row-data": U.value,
|
|
@@ -1540,7 +1540,7 @@ const Yt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
|
|
|
1540
1540
|
onRowClick: (B) => t(a)(B)
|
|
1541
1541
|
}, {
|
|
1542
1542
|
default: P((B) => {
|
|
1543
|
-
var Z, l, n, C, q, z, G, D, A, K, J, S, H, ie, Fe, Se, Ie, $e,
|
|
1543
|
+
var Z, l, n, C, q, z, G, D, A, K, J, S, H, ie, Fe, Se, Ie, Me, $e, Oe, ce, De, Ve, Ae, Re, fe, Pe;
|
|
1544
1544
|
return [
|
|
1545
1545
|
e("div", cs, [
|
|
1546
1546
|
e("div", fs, [
|
|
@@ -1566,7 +1566,7 @@ const Yt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
|
|
|
1566
1566
|
e("div", gs, I(E.original.purchaseOrder.items.length ? E.original.purchaseOrder.items.map((tt) => tt.name).join(", ") : "No items"), 1),
|
|
1567
1567
|
e("div", hs, [
|
|
1568
1568
|
m(t(ee), {
|
|
1569
|
-
render: (Oe = (
|
|
1569
|
+
render: (Oe = ($e = (Me = B.ref) == null ? void 0 : Me.column) == null ? void 0 : $e.columnDef) == null ? void 0 : Oe.cell,
|
|
1570
1570
|
props: (De = (ce = B.ref) == null ? void 0 : ce.getContext) == null ? void 0 : De.call(ce)
|
|
1571
1571
|
}, null, 8, ["render", "props"])
|
|
1572
1572
|
])
|
|
@@ -1590,9 +1590,9 @@ const Yt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
|
|
|
1590
1590
|
}),
|
|
1591
1591
|
_: 1
|
|
1592
1592
|
}, 8, ["title", "actions"]),
|
|
1593
|
-
(
|
|
1593
|
+
($(), le(nt, { to: "body" }, [
|
|
1594
1594
|
m(ps, at(rt(t(x))), null, 16),
|
|
1595
|
-
m(
|
|
1595
|
+
m($o, Qe(t(u), {
|
|
1596
1596
|
onSubmitted: _[2] || (_[2] = (te) => t(F).fetchTemplates())
|
|
1597
1597
|
}), null, 16)
|
|
1598
1598
|
]))
|