@feedmepos/mf-inventory-portal 1.0.36-dev.7 → 1.0.37-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-Cw7dAyRr.js → App-DomXC0uh.js} +46 -47
- package/dist/{ApprovalView-uzxVamAD.js → ApprovalView-DnINEwhh.js} +20 -20
- package/dist/{BindingsDialog-CjAyz7qd.js → BindingsDialog-MstJl2hJ.js} +10 -10
- package/dist/{BindingsPicker-VWQEClDc.js → BindingsPicker-BCgoeZK5.js} +1 -1
- package/dist/{BindingsTable-D_AidNg-.js → BindingsTable-knJs1DaE.js} +4 -4
- package/dist/{ClosingDraftView-DnPQE4xl.js → ClosingDraftView-Cg4siKrJ.js} +27 -27
- package/dist/{ClosingTemplateView-BzeUoP0S.js → ClosingTemplateView-D7nxxW1T.js} +2 -2
- package/dist/{DeliveryOrderPrintPreview-CQBfbvjK.js → DeliveryOrderPrintPreview-DUqWxzpS.js} +4 -4
- package/dist/{FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-C5iYx065.js → FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-DMeIIyKI.js} +11 -11
- package/dist/{FmMultiselectDialog-DLZju68a.js → FmMultiselectDialog-H6rOzolY.js} +1 -1
- package/dist/{FmUnitInput.vue_vue_type_script_setup_true_lang-elcx6AO6.js → FmUnitInput.vue_vue_type_script_setup_true_lang-BAk4KHnz.js} +31 -31
- package/dist/{IngredientBindedItem.vue_vue_type_script_setup_true_lang-DMmGsyfI.js → IngredientBindedItem.vue_vue_type_script_setup_true_lang-SxPkPzU1.js} +1 -1
- package/dist/{IngredientGroupView-bFYU22r_.js → IngredientGroupView-CAA69KE_.js} +21 -21
- package/dist/{IngredientsView-BrfeKO6V.js → IngredientsView-BYhDmhQb.js} +42 -43
- package/dist/IntegrationView-CGBFyLWN.js +3303 -0
- package/dist/{InventoryBindingForm-DrNO6vLb.js → InventoryBindingForm-X-CFcWEY.js} +1 -1
- package/dist/{InventoryBindingForm.vue_vue_type_script_setup_true_lang-DU_Nt6VM.js → InventoryBindingForm.vue_vue_type_script_setup_true_lang-CwV5nKPo.js} +18 -18
- package/dist/{InventoryBindingSummary-BztWC0Gi.js → InventoryBindingSummary-Cch1pODC.js} +1 -1
- package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-OvRfk02N.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-Uc6h5Apn.js} +4 -4
- package/dist/{PremiumBadge.vue_vue_type_script_setup_true_lang-BsbrYUky.js → PremiumBadge.vue_vue_type_script_setup_true_lang-BcWa_Dww.js} +10 -10
- package/dist/{PublishView-BwmvDibM.js → PublishView-DCAdzucX.js} +19 -19
- package/dist/{PurchaseOrderPrintPreview-DRo0ctOc.js → PurchaseOrderPrintPreview-IDiFQ15P.js} +12 -12
- package/dist/{ReceiveRequestView-yb4E_Dg6.js → ReceiveRequestView-7eslFHYc.js} +106 -107
- package/dist/{RecipeView-Dyf9kDoR.js → RecipeView-DOLJ5Gsx.js} +38 -39
- package/dist/{StockView-Cg-KD9qT.js → StockView-vCgmnyKT.js} +68 -69
- package/dist/{SupplierView-BtVTg_Ht.js → SupplierView-B6xdSB6T.js} +11 -12
- package/dist/{TransferDetails.vue_vue_type_script_setup_true_lang-lNmQ3zTi.js → TransferDetails.vue_vue_type_script_setup_true_lang-DrfHulTL.js} +105 -106
- package/dist/{TransferTemplateView-AUp2tI1x.js → TransferTemplateView-g1V3JX-5.js} +143 -144
- package/dist/{UnitView-BgbQjCfN.js → UnitView-BD28XnQL.js} +19 -19
- package/dist/{WarehouseView-BedfDS6s.js → WarehouseView-Cjgl43Xz.js} +14 -14
- package/dist/api/netsuite.d.ts +2 -0
- package/dist/app-dN4odAZ8.js +124833 -0
- package/dist/app.js +6 -6
- package/dist/{decimal-uKQOh7Qw.js → decimal-Blq-Ws2M.js} +1 -1
- package/dist/{format-unit-display-EMi6Weg0.js → format-unit-display-CzANmeBd.js} +13 -13
- package/dist/{index-B4jwhkHY.js → index-61_R9xfw.js} +3 -4
- package/dist/{index-BN_lVBL8.js → index-B8dsKHa4.js} +1 -1
- package/dist/{stock-SaEl13YM.js → stock-D7E6dj7b.js} +1 -1
- package/dist/stores/feature.d.ts +2 -0
- package/dist/stores/integration/netsuite.d.ts +1 -0
- package/dist/{supplier-hdrIxTLp.js → supplier-UeD3tjJh.js} +25 -26
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/{use-ingredient-select-dialog-B7XYGX1J.js → use-ingredient-select-dialog-CydPG1Ol.js} +1 -1
- package/dist/{use-inventory-binding-dialog-t7XQb2UV.js → use-inventory-binding-dialog-DzRlrnI6.js} +1 -1
- package/dist/views/integration/components/netsuite/InventoryTransferOutTable.vue.d.ts +2 -0
- package/dist/{vue-i18n-DBsdCMy_.js → vue-i18n-D64xeCoR.js} +285 -285
- package/package.json +1 -1
- package/dist/IntegrationView-KlnDvvRE.js +0 -6531
- package/dist/app-nDgEuY-Q.js +0 -102338
- package/dist/feature-_ggdK-7_.js +0 -19100
|
@@ -1,15 +1,14 @@
|
|
|
1
|
-
import { defineComponent as ae, onMounted as Te, computed as E, ref as Y, watch as Ce, inject as ot, resolveComponent as V, openBlock as
|
|
2
|
-
import {
|
|
1
|
+
import { defineComponent as ae, onMounted as Te, computed as E, 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 U, renderSlot as xe, withDirectives as Pe, normalizeClass as re, vModelText as Be, reactive as st, h as j, toDisplayString as S, 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 { K as We, aG as he, t as Ne, I as it, aH as ut, aI as dt, j as se, aJ as mt, b as Ge, a as Ke, Q as Ee, c as ge, m as ke, Y as be, T as ye, A as we, M as pt, G as ee, u as Je, aj as ct, a0 as ft, E as Ze, e as ue, aK as ve, af as yt, s as vt, a7 as bt, B as gt, i as Le, _ as ht, C as xt } from "./app-dN4odAZ8.js";
|
|
3
3
|
import { useI18n as me } from "@feedmepos/mf-common";
|
|
4
|
-
import { P as
|
|
5
|
-
import { components as de, useSnackbar as Ct, useProxiedModel as
|
|
4
|
+
import { P as X, a as _t, f as kt, t as wt, b as ze, u as Tt } from "./format-unit-display-CzANmeBd.js";
|
|
5
|
+
import { components as de, useSnackbar as Ct, useProxiedModel as Xe, useBreakpoints as Ft } from "@feedmepos/ui-library";
|
|
6
6
|
import { defineStore as It, storeToRefs as He } from "pinia";
|
|
7
|
-
import { _ as St, b as
|
|
8
|
-
import { u as
|
|
9
|
-
import {
|
|
10
|
-
import { u as
|
|
11
|
-
|
|
12
|
-
const Ut = { class: "flex flex-col" }, Bt = { class: "flex flex-col" }, qt = { class: "flex-1" }, Nt = { class: "flex items-center" }, Et = { class: "flex-1" }, Lt = { class: "flex-1" }, zt = /* @__PURE__ */ ae({
|
|
7
|
+
import { _ as St, b as Mt, F as $t, a as Ot } from "./FmUnitInput.vue_vue_type_script_setup_true_lang-BAk4KHnz.js";
|
|
8
|
+
import { c as Dt, u as Vt, _ as At } from "./FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-DMeIIyKI.js";
|
|
9
|
+
import { u as Rt } from "./supplier-UeD3tjJh.js";
|
|
10
|
+
import { u as Ut } from "./use-ingredient-select-dialog-CydPG1Ol.js";
|
|
11
|
+
const Pt = { class: "flex flex-col" }, Bt = { class: "flex flex-col" }, qt = { class: "flex-1" }, Nt = { class: "flex items-center" }, Et = { class: "flex-1" }, Lt = { class: "flex-1" }, zt = /* @__PURE__ */ ae({
|
|
13
12
|
__name: "FmMinMaxInput",
|
|
14
13
|
props: {
|
|
15
14
|
rules: {},
|
|
@@ -69,18 +68,18 @@ const Ut = { class: "flex flex-col" }, Bt = { class: "flex flex-col" }, qt = { c
|
|
|
69
68
|
Ce([u, x], ([d, y]) => {
|
|
70
69
|
const w = v ?? {}, i = a(d), g = a(y), O = r.value;
|
|
71
70
|
if (d !== "" && i === !0) {
|
|
72
|
-
const
|
|
73
|
-
w.min =
|
|
71
|
+
const M = Ne(+d, O);
|
|
72
|
+
w.min = M;
|
|
74
73
|
} else
|
|
75
74
|
w.min = null;
|
|
76
75
|
if (y !== "" && g === !0) {
|
|
77
|
-
const
|
|
78
|
-
w.max =
|
|
76
|
+
const M = Ne(+y, O);
|
|
77
|
+
w.max = M;
|
|
79
78
|
} else
|
|
80
79
|
w.max = null;
|
|
81
80
|
v.min = w.min, v.max = w.max;
|
|
82
81
|
});
|
|
83
|
-
const F = Symbol.for("fm:form-state"), c = ot(F, null), o = E(() => h.disabled ?? (c == null ? void 0 : c.getDisabled()) ?? !1), f = Y(), b = Y(), k = Y(!1), T = Y(!1), R = E(() => k.value || T.value),
|
|
82
|
+
const F = Symbol.for("fm:form-state"), c = ot(F, null), o = E(() => h.disabled ?? (c == null ? void 0 : c.getDisabled()) ?? !1), f = Y(), b = Y(), k = Y(!1), T = Y(!1), R = E(() => k.value || T.value), P = E(() => [...[
|
|
84
83
|
function() {
|
|
85
84
|
return typeof a(u.value) == "string" || typeof a(x.value) == "string" ? "Must be a number" : !0;
|
|
86
85
|
},
|
|
@@ -90,7 +89,7 @@ const Ut = { class: "flex flex-col" }, Bt = { class: "flex flex-col" }, qt = { c
|
|
|
90
89
|
], ...h.rules ?? []]);
|
|
91
90
|
return (d, y) => {
|
|
92
91
|
const w = V("FmLabel"), i = V("FmField"), g = V("FmFormGroup");
|
|
93
|
-
return
|
|
92
|
+
return $(), N("div", Pt, [
|
|
94
93
|
e("div", Bt, [
|
|
95
94
|
e("div", qt, [
|
|
96
95
|
m(w, {
|
|
@@ -101,12 +100,12 @@ const Ut = { class: "flex flex-col" }, Bt = { class: "flex flex-col" }, qt = { c
|
|
|
101
100
|
}, null, 8, ["label", "disabled", "required", "optional"])
|
|
102
101
|
]),
|
|
103
102
|
m(i, { focused: R.value }, {
|
|
104
|
-
default:
|
|
103
|
+
default: U(() => [
|
|
105
104
|
e("div", Nt, [
|
|
106
105
|
xe(d.$slots, "prepend"),
|
|
107
106
|
y[6] || (y[6] = e("div", { class: "text-fm-color-typo-secondary fm-typo-en-body-lg-400 pr-4" }, "Min.", -1)),
|
|
108
107
|
e("div", Et, [
|
|
109
|
-
|
|
108
|
+
Pe(e("input", {
|
|
110
109
|
type: "text",
|
|
111
110
|
ref_key: "minInputRef",
|
|
112
111
|
ref: f,
|
|
@@ -125,7 +124,7 @@ const Ut = { class: "flex flex-col" }, Bt = { class: "flex flex-col" }, qt = { c
|
|
|
125
124
|
y[7] || (y[7] = e("div", { class: "block h-32 mx-4 w-[1px] bg-fm-color-neutral-gray-200" }, null, -1)),
|
|
126
125
|
y[8] || (y[8] = e("div", { class: "text-fm-color-typo-secondary fm-typo-en-body-lg-400 pr-4" }, "Max.", -1)),
|
|
127
126
|
e("div", Lt, [
|
|
128
|
-
|
|
127
|
+
Pe(e("input", {
|
|
129
128
|
type: "text",
|
|
130
129
|
ref_key: "maxInputRef",
|
|
131
130
|
ref: b,
|
|
@@ -151,7 +150,7 @@ const Ut = { class: "flex flex-col" }, Bt = { class: "flex flex-col" }, qt = { c
|
|
|
151
150
|
class: "flex-1",
|
|
152
151
|
"model-value": d.modelValue,
|
|
153
152
|
info: d.labelInfo,
|
|
154
|
-
rules:
|
|
153
|
+
rules: P.value,
|
|
155
154
|
"helper-text": d.helperText,
|
|
156
155
|
"helper-state": d.helperState
|
|
157
156
|
}, null, 8, ["model-value", "info", "rules", "helper-text", "helper-state"])
|
|
@@ -288,9 +287,9 @@ function Yt(p, h = {}) {
|
|
|
288
287
|
minSize: 200,
|
|
289
288
|
cell(c) {
|
|
290
289
|
var R;
|
|
291
|
-
const o = c.row.original, f = a.skuById[o.sku._id], b = a.unitById[(R = f.unit) == null ? void 0 : R._id], k = b.measurements.find((
|
|
290
|
+
const o = c.row.original, f = a.skuById[o.sku._id], b = a.unitById[(R = f.unit) == null ? void 0 : R._id], k = b.measurements.find((P) => {
|
|
292
291
|
var d;
|
|
293
|
-
return ((d = o.measurement) == null ? void 0 : d.id) ===
|
|
292
|
+
return ((d = o.measurement) == null ? void 0 : d.id) === P.id;
|
|
294
293
|
}), T = o.sku.unit._id !== f.unit._id || !b || o.measurement && !k;
|
|
295
294
|
return j(St, {
|
|
296
295
|
style: {
|
|
@@ -304,11 +303,11 @@ function Yt(p, h = {}) {
|
|
|
304
303
|
disabled: p.disabled,
|
|
305
304
|
key: o.sku._id,
|
|
306
305
|
unit: b,
|
|
307
|
-
"onUpdate:modelValue": (
|
|
306
|
+
"onUpdate:modelValue": (P) => {
|
|
308
307
|
u.validateUnitInput(
|
|
309
308
|
o,
|
|
310
309
|
f,
|
|
311
|
-
|
|
310
|
+
P,
|
|
312
311
|
(d) => {
|
|
313
312
|
p.updateItem({
|
|
314
313
|
...o,
|
|
@@ -320,9 +319,9 @@ function Yt(p, h = {}) {
|
|
|
320
319
|
);
|
|
321
320
|
},
|
|
322
321
|
rules: [
|
|
323
|
-
|
|
322
|
+
Mt(o.quantityStep),
|
|
324
323
|
...+se(o.quantity) ? [
|
|
325
|
-
|
|
324
|
+
$t(
|
|
326
325
|
+se(
|
|
327
326
|
o.minimumQuantity ?? {
|
|
328
327
|
amount: 1,
|
|
@@ -489,11 +488,11 @@ function Yt(p, h = {}) {
|
|
|
489
488
|
...b,
|
|
490
489
|
id: f
|
|
491
490
|
});
|
|
492
|
-
return c.enableTotalCost && p.transferType ===
|
|
491
|
+
return c.enableTotalCost && p.transferType === X.PURCHASE ? o : o.filter((f) => f.id !== "Cost");
|
|
493
492
|
})
|
|
494
493
|
};
|
|
495
494
|
}
|
|
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" }, Jt = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" },
|
|
495
|
+
const Wt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-center" }, Kt = { class: "flex-1 flex gap-1 items-center" }, Jt = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, Zt = { 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
496
|
key: 0,
|
|
498
497
|
class: "flex gap-8 w-full"
|
|
499
498
|
}, 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,13 +507,13 @@ const Wt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
|
|
|
508
507
|
return a;
|
|
509
508
|
}
|
|
510
509
|
return (a, r) => {
|
|
511
|
-
var u, x, F, c, o, f, b, k, T, R,
|
|
510
|
+
var u, x, F, c, o, f, b, k, T, R, P, d, y, w, i, g, O, M, _, W, te, L, B, J, l, n, C, q, z, G;
|
|
512
511
|
const s = V("FmLabel");
|
|
513
|
-
return
|
|
512
|
+
return $(), N("div", Wt, [
|
|
514
513
|
e("div", Gt, [
|
|
515
514
|
e("div", Kt, [
|
|
516
515
|
e("span", Jt, " (" + S(a.row.original.sku.code) + ") ", 1),
|
|
517
|
-
e("span",
|
|
516
|
+
e("span", Zt, S(a.row.original.sku.name), 1)
|
|
518
517
|
]),
|
|
519
518
|
e("div", null, [
|
|
520
519
|
m(t(ee), {
|
|
@@ -523,7 +522,7 @@ const Wt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
|
|
|
523
522
|
}, null, 8, ["render", "props"])
|
|
524
523
|
])
|
|
525
524
|
]),
|
|
526
|
-
e("div",
|
|
525
|
+
e("div", Xt, [
|
|
527
526
|
e("div", eo, [
|
|
528
527
|
m(s, {
|
|
529
528
|
label: t(h)(`inventory.transfer.form.items.table.${t(Q).Code}`)
|
|
@@ -539,19 +538,19 @@ const Wt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
|
|
|
539
538
|
label: t(h)(`inventory.transfer.form.items.table.${t(Q).Name}`)
|
|
540
539
|
}, null, 8, ["label"]),
|
|
541
540
|
m(t(ee), {
|
|
542
|
-
render: (y = (d = (
|
|
541
|
+
render: (y = (d = (P = a.cellByColId[t(Q).Name]) == null ? void 0 : P.column) == null ? void 0 : d.columnDef) == null ? void 0 : y.cell,
|
|
543
542
|
props: (i = (w = a.cellByColId[t(Q).Name]) == null ? void 0 : w.getContext) == null ? void 0 : i.call(w)
|
|
544
543
|
}, null, 8, ["render", "props"]),
|
|
545
544
|
r[1] || (r[1] = e("div", { class: "fm-typo-en-body-md-600 text-fm-color-primary" }, null, -1))
|
|
546
545
|
])
|
|
547
546
|
]),
|
|
548
|
-
a.row.original ? (
|
|
547
|
+
a.row.original ? ($(), N("div", oo, [
|
|
549
548
|
e("div", so, [
|
|
550
549
|
m(s, {
|
|
551
550
|
label: t(h)(`inventory.transfer.form.items.table.${t(Q).DefaultAmount}`)
|
|
552
551
|
}, null, 8, ["label"]),
|
|
553
552
|
m(t(ee), {
|
|
554
|
-
render: (
|
|
553
|
+
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
554
|
props: (W = (_ = a.cellByColId[t(Q).DefaultAmount]) == null ? void 0 : _.getContext) == null ? void 0 : W.call(_)
|
|
556
555
|
}, null, 8, ["render", "props"]),
|
|
557
556
|
r[2] || (r[2] = e("div", { class: "fm-typo-en-body-md-600 text-fm-color-primary" }, null, -1))
|
|
@@ -594,14 +593,14 @@ const Wt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
|
|
|
594
593
|
function h(v) {
|
|
595
594
|
return v.column.columnDef.meta;
|
|
596
595
|
}
|
|
597
|
-
return (v, a) => (
|
|
596
|
+
return (v, a) => ($(), N(pe, null, [
|
|
598
597
|
e("tr", {
|
|
599
598
|
class: "hover:bg-fm-color-opacity-sm border-b border-fm-color-neutral-gray-100",
|
|
600
599
|
style: _e({ backgroundColor: v.errorMessage ? "#ffd6d6" : void 0 })
|
|
601
600
|
}, [
|
|
602
|
-
(
|
|
601
|
+
($(!0), N(pe, null, je(v.row.getVisibleCells(), (r) => {
|
|
603
602
|
var s, u, x, F, c;
|
|
604
|
-
return
|
|
603
|
+
return $(), N("td", {
|
|
605
604
|
key: r.id,
|
|
606
605
|
class: re(["text-fm-color-typo-primary", ((s = h(r)) == null ? void 0 : s.cellClass) ?? "px-16", "py-2"]),
|
|
607
606
|
style: _e({
|
|
@@ -619,7 +618,7 @@ const Wt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
|
|
|
619
618
|
], 6);
|
|
620
619
|
}), 128))
|
|
621
620
|
], 4),
|
|
622
|
-
v.errorMessage ? (
|
|
621
|
+
v.errorMessage ? ($(), N("tr", uo, [
|
|
623
622
|
e("td", {
|
|
624
623
|
colspan: v.row.getVisibleCells().length,
|
|
625
624
|
class: "text-red-600 px-16 py-2"
|
|
@@ -658,14 +657,14 @@ const Wt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
|
|
|
658
657
|
), R = E({
|
|
659
658
|
get() {
|
|
660
659
|
var l, n;
|
|
661
|
-
return typeof ((n = (l = s.purchaseOrder) == null ? void 0 : l.supplier) == null ? void 0 : n.internal) == "string" ?
|
|
660
|
+
return typeof ((n = (l = s.purchaseOrder) == null ? void 0 : l.supplier) == null ? void 0 : n.internal) == "string" ? X.TRANSFER : X.PURCHASE;
|
|
662
661
|
},
|
|
663
662
|
set(l) {
|
|
664
663
|
var C, q;
|
|
665
|
-
const n = typeof ((q = (C = s.purchaseOrder) == null ? void 0 : C.supplier) == null ? void 0 : q.internal) == "string" ?
|
|
666
|
-
l !== n && (s.purchaseOrder.supplier = l ===
|
|
664
|
+
const n = typeof ((q = (C = s.purchaseOrder) == null ? void 0 : C.supplier) == null ? void 0 : q.internal) == "string" ? X.TRANSFER : X.PURCHASE;
|
|
665
|
+
l !== n && (s.purchaseOrder.supplier = l === X.PURCHASE ? T.locationOptionsTypePurchase.value[0] : T.locationOptionsTypeTransfer.value[0]);
|
|
667
666
|
}
|
|
668
|
-
}),
|
|
667
|
+
}), P = E(() => T.transferLocationOptions.value), d = E({
|
|
669
668
|
get() {
|
|
670
669
|
var l;
|
|
671
670
|
return (l = s.purchaseOrder.supplier) == null ? void 0 : l._id;
|
|
@@ -702,7 +701,7 @@ const Wt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
|
|
|
702
701
|
return ((q = C.doc) == null ? void 0 : q._id) === ((z = s.purchaseOrder.supplier) == null ? void 0 : z._id);
|
|
703
702
|
}) ? `Location ${(n = s.purchaseOrder.supplier) == null ? void 0 : n.name} must be removed because template cannot be used to transfer to itself.` : !0;
|
|
704
703
|
}
|
|
705
|
-
const
|
|
704
|
+
const M = E({
|
|
706
705
|
get() {
|
|
707
706
|
return s.purchaseOrder.remark ?? void 0;
|
|
708
707
|
},
|
|
@@ -754,7 +753,7 @@ const Wt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
|
|
|
754
753
|
return s.purchaseOrder.items;
|
|
755
754
|
},
|
|
756
755
|
get transferType() {
|
|
757
|
-
return
|
|
756
|
+
return X.PURCHASE;
|
|
758
757
|
},
|
|
759
758
|
get disabled() {
|
|
760
759
|
return a.disabled;
|
|
@@ -773,7 +772,7 @@ const Wt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
|
|
|
773
772
|
});
|
|
774
773
|
}
|
|
775
774
|
})
|
|
776
|
-
), L = E(() => te.columnDefs.value), { promptSelectIngredients: B } =
|
|
775
|
+
), L = E(() => te.columnDefs.value), { promptSelectIngredients: B } = Ut();
|
|
777
776
|
async function J() {
|
|
778
777
|
const n = c.skus.map((D) => ({
|
|
779
778
|
label: D.name,
|
|
@@ -788,25 +787,25 @@ const Wt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
|
|
|
788
787
|
const A = c.skuById[D], K = C.find((H) => H.sku._id === A._id);
|
|
789
788
|
if (K)
|
|
790
789
|
return K;
|
|
791
|
-
const
|
|
790
|
+
const Z = { amount: 1, precision: be(A.unit) };
|
|
792
791
|
let I = {
|
|
793
792
|
id: f.usePurchaseOrderV2 ? crypto.randomUUID() : void 0,
|
|
794
793
|
sku: A,
|
|
795
794
|
code: A.code,
|
|
796
795
|
name: A.name,
|
|
797
|
-
quantity:
|
|
798
|
-
minimumQuantity:
|
|
796
|
+
quantity: Z,
|
|
797
|
+
minimumQuantity: Z,
|
|
799
798
|
// maximumQuantity: adjustmentAmountMultiplyDecimal(minimumQuantity, {
|
|
800
799
|
// amount: 100,
|
|
801
800
|
// precision: 0
|
|
802
801
|
// }),
|
|
803
|
-
quantityStep:
|
|
802
|
+
quantityStep: Z
|
|
804
803
|
};
|
|
805
804
|
return k.validateUnitInput(
|
|
806
805
|
I,
|
|
807
806
|
A,
|
|
808
807
|
{
|
|
809
|
-
amount:
|
|
808
|
+
amount: Z,
|
|
810
809
|
measurement: null
|
|
811
810
|
},
|
|
812
811
|
(H) => {
|
|
@@ -822,7 +821,7 @@ const Wt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
|
|
|
822
821
|
if (A.length > 0)
|
|
823
822
|
G.push(...A);
|
|
824
823
|
else {
|
|
825
|
-
const K = q.find((
|
|
824
|
+
const K = q.find((Z) => Z.sku._id === D);
|
|
826
825
|
K && G.push(K);
|
|
827
826
|
}
|
|
828
827
|
}
|
|
@@ -830,14 +829,14 @@ const Wt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
|
|
|
830
829
|
}
|
|
831
830
|
return (l, n) => {
|
|
832
831
|
const C = V("FmTextField"), q = V("FmSelect"), z = V("FmTextarea"), G = V("FmButton"), D = V("FmTable"), A = V("FmFormGroup"), K = V("FmForm");
|
|
833
|
-
return
|
|
832
|
+
return $(), le(K, {
|
|
834
833
|
ref_key: "formRef",
|
|
835
834
|
ref: _,
|
|
836
835
|
class: "flex flex-col gap-32",
|
|
837
836
|
disabled: l.disabled
|
|
838
837
|
}, {
|
|
839
|
-
default:
|
|
840
|
-
var
|
|
838
|
+
default: U(() => {
|
|
839
|
+
var Z;
|
|
841
840
|
return [
|
|
842
841
|
e("div", co, [
|
|
843
842
|
e("div", fo, [
|
|
@@ -855,20 +854,20 @@ const Wt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
|
|
|
855
854
|
items: [
|
|
856
855
|
{
|
|
857
856
|
label: t(u)("inventory.transfer.form.type.purchase"),
|
|
858
|
-
value: t(
|
|
857
|
+
value: t(X).PURCHASE,
|
|
859
858
|
disabled: !t(T).locationOptionsTypePurchase.value.length,
|
|
860
859
|
sublabel: t(T).locationOptionsTypePurchase.value.length ? void 0 : t(u)("inventory.transfer.form.noSupplierAvailable")
|
|
861
860
|
},
|
|
862
861
|
{
|
|
863
862
|
label: t(u)("inventory.transfer.form.type.transfer"),
|
|
864
|
-
value: t(
|
|
863
|
+
value: t(X).TRANSFER,
|
|
865
864
|
disabled: !t(T).locationOptionsTypeTransfer.value.length,
|
|
866
865
|
sublabel: t(T).locationOptionsTypeTransfer.value.length ? void 0 : t(u)("inventory.transfer.form.noLocationAvailable")
|
|
867
866
|
}
|
|
868
867
|
],
|
|
869
|
-
rules: [t(we)(1)(
|
|
868
|
+
rules: [t(we)(1)(P.value)]
|
|
870
869
|
}, {
|
|
871
|
-
default:
|
|
870
|
+
default: U(() => [
|
|
872
871
|
e("span", {
|
|
873
872
|
class: re([
|
|
874
873
|
"line-clamp-1 fm-typo-en-body-lg-400",
|
|
@@ -879,21 +878,21 @@ const Wt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
|
|
|
879
878
|
_: 1
|
|
880
879
|
}, 8, ["label", "model-value", "items", "rules"]),
|
|
881
880
|
m(q, {
|
|
882
|
-
label: R.value === t(
|
|
881
|
+
label: R.value === t(X).PURCHASE ? t(u)("inventory.transfer.form.purchaseFrom") : t(u)("inventory.transfer.form.transferFrom"),
|
|
883
882
|
modelValue: d.value,
|
|
884
883
|
"onUpdate:modelValue": n[2] || (n[2] = (I) => d.value = I),
|
|
885
|
-
items:
|
|
884
|
+
items: P.value
|
|
886
885
|
}, {
|
|
887
|
-
"menu-wrapper":
|
|
886
|
+
"menu-wrapper": U((I) => {
|
|
888
887
|
var H;
|
|
889
888
|
return [
|
|
890
889
|
m(At, Qe(I, {
|
|
891
|
-
items:
|
|
890
|
+
items: P.value,
|
|
892
891
|
"model-value": (H = l.modelValue.purchaseOrder.supplier) == null ? void 0 : H._id
|
|
893
892
|
}), null, 16, ["items", "model-value"])
|
|
894
893
|
];
|
|
895
894
|
}),
|
|
896
|
-
default:
|
|
895
|
+
default: U(() => {
|
|
897
896
|
var I;
|
|
898
897
|
return [
|
|
899
898
|
e("span", {
|
|
@@ -901,7 +900,7 @@ const Wt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
|
|
|
901
900
|
"line-clamp-1 fm-typo-en-body-lg-400",
|
|
902
901
|
l.disabled ? "text-fm-color-typo-disabled" : "text-fm-color-typo-primary"
|
|
903
902
|
])
|
|
904
|
-
}, S((I =
|
|
903
|
+
}, S((I = P.value.find((H) => H.value === d.value)) == null ? void 0 : I.label), 3)
|
|
905
904
|
];
|
|
906
905
|
}),
|
|
907
906
|
_: 1
|
|
@@ -916,8 +915,8 @@ const Wt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
|
|
|
916
915
|
label: t(u)("inventory.transfer.form.remark"),
|
|
917
916
|
"label-mark": "optional",
|
|
918
917
|
"max-length": 240,
|
|
919
|
-
modelValue:
|
|
920
|
-
"onUpdate:modelValue": n[4] || (n[4] = (I) =>
|
|
918
|
+
modelValue: M.value,
|
|
919
|
+
"onUpdate:modelValue": n[4] || (n[4] = (I) => M.value = I),
|
|
921
920
|
class: re({ "text-fm-color-typo-disabled": l.disabled })
|
|
922
921
|
}, null, 8, ["label", "modelValue", "class"])
|
|
923
922
|
])
|
|
@@ -944,7 +943,7 @@ const Wt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
|
|
|
944
943
|
e("div", bo, [
|
|
945
944
|
m(A, {
|
|
946
945
|
"model-value": [
|
|
947
|
-
(
|
|
946
|
+
(Z = a.modelValue.purchaseOrder.supplier) == null ? void 0 : Z._id,
|
|
948
947
|
...a.modelValue.locations ?? []
|
|
949
948
|
].join(","),
|
|
950
949
|
rules: [O]
|
|
@@ -954,7 +953,7 @@ const Wt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
|
|
|
954
953
|
e("div", go, [
|
|
955
954
|
e("div", ho, [
|
|
956
955
|
e("div", xo, S(t(u)("inventory.transfer.form.items.title")), 1),
|
|
957
|
-
t(b).isEnabled ? (
|
|
956
|
+
t(b).isEnabled ? ($(), le(G, {
|
|
958
957
|
key: 0,
|
|
959
958
|
label: "Check NetSuite",
|
|
960
959
|
"prepend-icon": "troubleshoot",
|
|
@@ -972,7 +971,7 @@ const Wt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
|
|
|
972
971
|
size: "md"
|
|
973
972
|
}, null, 8, ["disabled", "label"])
|
|
974
973
|
]),
|
|
975
|
-
t(b).isEnabled ? (
|
|
974
|
+
t(b).isEnabled ? ($(), N("div", _o, n[9] || (n[9] = [
|
|
976
975
|
ne(" NetSuite is enabled. "),
|
|
977
976
|
e("ul", { style: { "list-style": "initial", "margin-left": "20px" } }, [
|
|
978
977
|
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,14 +990,14 @@ const Wt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
|
|
|
991
990
|
]),
|
|
992
991
|
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
992
|
]),
|
|
994
|
-
(
|
|
993
|
+
($(), le(D, {
|
|
995
994
|
"column-defs": L.value,
|
|
996
995
|
"row-data": t(s).purchaseOrder.items,
|
|
997
996
|
key: t(s).purchaseOrder.items.map((I) => I.sku._id).join("."),
|
|
998
997
|
"hide-footer": "",
|
|
999
998
|
"page-size": t(s).purchaseOrder.items.length
|
|
1000
999
|
}, {
|
|
1001
|
-
"table-row":
|
|
1000
|
+
"table-row": U((I) => [
|
|
1002
1001
|
m(po, {
|
|
1003
1002
|
row: I,
|
|
1004
1003
|
errorMessage: x.value[I.index],
|
|
@@ -1006,12 +1005,12 @@ const Wt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
|
|
|
1006
1005
|
disabled: l.disabled
|
|
1007
1006
|
}, null, 8, ["row", "errorMessage", "disabled"])
|
|
1008
1007
|
]),
|
|
1009
|
-
"list-row":
|
|
1010
|
-
(
|
|
1008
|
+
"list-row": U((I) => [
|
|
1009
|
+
($(), le(Ze, {
|
|
1011
1010
|
row: I,
|
|
1012
1011
|
key: t(s).purchaseOrder.items.map((H) => H.sku._id).join(".")
|
|
1013
1012
|
}, {
|
|
1014
|
-
default:
|
|
1013
|
+
default: U((H) => [
|
|
1015
1014
|
m(ro, {
|
|
1016
1015
|
row: I,
|
|
1017
1016
|
"cell-by-col-id": H,
|
|
@@ -1051,7 +1050,7 @@ const Wt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
|
|
|
1051
1050
|
}
|
|
1052
1051
|
return (u, x) => {
|
|
1053
1052
|
const F = V("FmButton"), c = V("FmDialog");
|
|
1054
|
-
return
|
|
1053
|
+
return $(), N("div", null, [
|
|
1055
1054
|
m(F, {
|
|
1056
1055
|
label: v.label,
|
|
1057
1056
|
loading: v.loading,
|
|
@@ -1062,10 +1061,10 @@ const Wt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
|
|
|
1062
1061
|
"onUpdate:modelValue": x[2] || (x[2] = (o) => r.value = o),
|
|
1063
1062
|
overlay: !0
|
|
1064
1063
|
}, {
|
|
1065
|
-
"dialog-header":
|
|
1064
|
+
"dialog-header": U(() => [
|
|
1066
1065
|
e("div", null, S(v.confirmTitle || "Confirm"), 1)
|
|
1067
1066
|
]),
|
|
1068
|
-
"dialog-footer":
|
|
1067
|
+
"dialog-footer": U(() => [
|
|
1069
1068
|
e("div", Co, [
|
|
1070
1069
|
m(F, {
|
|
1071
1070
|
label: "Cancel",
|
|
@@ -1080,7 +1079,7 @@ const Wt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
|
|
|
1080
1079
|
})
|
|
1081
1080
|
])
|
|
1082
1081
|
]),
|
|
1083
|
-
default:
|
|
1082
|
+
default: U(() => [
|
|
1084
1083
|
xe(u.$slots, "dialog-content", {}, () => [
|
|
1085
1084
|
ne(S(v.confirmMessage || "Are you sure you want to proceed?"), 1)
|
|
1086
1085
|
])
|
|
@@ -1090,7 +1089,7 @@ const Wt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
|
|
|
1090
1089
|
]);
|
|
1091
1090
|
};
|
|
1092
1091
|
}
|
|
1093
|
-
}), Io = { class: "flex items-center" }, So = { class: "fm-typo-en-title-md-800" },
|
|
1092
|
+
}), Io = { class: "flex items-center" }, So = { class: "fm-typo-en-title-md-800" }, Mo = { class: "flex gap-4" }, $o = /* @__PURE__ */ ae({
|
|
1094
1093
|
__name: "TransferTemplateDialog",
|
|
1095
1094
|
props: /* @__PURE__ */ qe({
|
|
1096
1095
|
mode: {},
|
|
@@ -1103,7 +1102,7 @@ const Wt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
|
|
|
1103
1102
|
emits: /* @__PURE__ */ qe(["update:show", "submitted"], ["update:disabled"]),
|
|
1104
1103
|
setup(p, { expose: h, emit: v }) {
|
|
1105
1104
|
var w;
|
|
1106
|
-
const a = p, r = v, s = _t(), u = Ct(), { t: x } = me(), F =
|
|
1105
|
+
const a = p, r = v, s = _t(), u = Ct(), { t: x } = me(), F = Xe(a, "show");
|
|
1107
1106
|
function c() {
|
|
1108
1107
|
return {
|
|
1109
1108
|
_id: "",
|
|
@@ -1172,44 +1171,44 @@ const Wt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
|
|
|
1172
1171
|
const i = o.value;
|
|
1173
1172
|
if (i) {
|
|
1174
1173
|
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:
|
|
1174
|
+
({ totalCost: M, ..._ }) => _
|
|
1176
1175
|
));
|
|
1177
1176
|
try {
|
|
1178
|
-
await s.createTemplate(i), await new Promise((
|
|
1177
|
+
await s.createTemplate(i), await new Promise((M) => setTimeout(M, 1e3)), u.open({
|
|
1179
1178
|
title: x("inventory.transfer.template.create.success"),
|
|
1180
1179
|
message: x("inventory.transfer.template.create.successMessage"),
|
|
1181
1180
|
type: "success"
|
|
1182
1181
|
}), r("update:show", !1), r("submitted");
|
|
1183
|
-
} catch (
|
|
1182
|
+
} catch (M) {
|
|
1184
1183
|
u.open({
|
|
1185
1184
|
title: x("inventory.transfer.template.create.error"),
|
|
1186
1185
|
message: x("inventory.transfer.template.create.errorMessage"),
|
|
1187
1186
|
type: "error"
|
|
1188
|
-
}), console.error("Error in creating transfer template",
|
|
1187
|
+
}), console.error("Error in creating transfer template", M);
|
|
1189
1188
|
} finally {
|
|
1190
1189
|
b.value = !1;
|
|
1191
1190
|
}
|
|
1192
1191
|
}
|
|
1193
1192
|
}
|
|
1194
|
-
async function
|
|
1193
|
+
async function P() {
|
|
1195
1194
|
var g, O;
|
|
1196
1195
|
const i = o.value;
|
|
1197
1196
|
if (i) {
|
|
1198
1197
|
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:
|
|
1198
|
+
({ totalCost: M, ..._ }) => _
|
|
1200
1199
|
));
|
|
1201
1200
|
try {
|
|
1202
|
-
await s.updateTemplate(i), await new Promise((
|
|
1201
|
+
await s.updateTemplate(i), await new Promise((M) => setTimeout(M, 1e3)), u.open({
|
|
1203
1202
|
title: x("inventory.transfer.template.update.success"),
|
|
1204
1203
|
message: x("inventory.transfer.template.update.successMessage"),
|
|
1205
1204
|
type: "success"
|
|
1206
1205
|
}), r("update:show", !1), r("submitted");
|
|
1207
|
-
} catch (
|
|
1206
|
+
} catch (M) {
|
|
1208
1207
|
u.open({
|
|
1209
1208
|
title: x("inventory.transfer.template.update.error"),
|
|
1210
1209
|
message: x("inventory.transfer.template.update.errorMessage"),
|
|
1211
1210
|
type: "error"
|
|
1212
|
-
}), console.error("Error in updating transfer template",
|
|
1211
|
+
}), console.error("Error in updating transfer template", M);
|
|
1213
1212
|
} finally {
|
|
1214
1213
|
b.value = !1;
|
|
1215
1214
|
}
|
|
@@ -1220,7 +1219,7 @@ const Wt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
|
|
|
1220
1219
|
case ue.CREATE:
|
|
1221
1220
|
return R();
|
|
1222
1221
|
case ue.UPDATE:
|
|
1223
|
-
return
|
|
1222
|
+
return P();
|
|
1224
1223
|
}
|
|
1225
1224
|
}
|
|
1226
1225
|
function y() {
|
|
@@ -1228,21 +1227,21 @@ const Wt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
|
|
|
1228
1227
|
(g = (i = T.value) == null ? void 0 : i.validateInputs) == null || g.call(i);
|
|
1229
1228
|
}
|
|
1230
1229
|
return (i, g) => {
|
|
1231
|
-
const O = V("FmButton"),
|
|
1232
|
-
return
|
|
1230
|
+
const O = V("FmButton"), M = V("FmSideSheet");
|
|
1231
|
+
return $(), le(M, {
|
|
1233
1232
|
modelValue: t(F),
|
|
1234
1233
|
"onUpdate:modelValue": g[3] || (g[3] = (_) => Ye(F) ? F.value = _ : null),
|
|
1235
1234
|
"dismiss-away": "",
|
|
1236
1235
|
"close-button": "",
|
|
1237
1236
|
"max-width": 1600
|
|
1238
1237
|
}, {
|
|
1239
|
-
"side-sheet-header":
|
|
1238
|
+
"side-sheet-header": U(() => [
|
|
1240
1239
|
e("div", Io, [
|
|
1241
1240
|
e("div", So, S(k.value), 1)
|
|
1242
1241
|
])
|
|
1243
1242
|
]),
|
|
1244
|
-
default:
|
|
1245
|
-
(
|
|
1243
|
+
default: U(() => [
|
|
1244
|
+
($(), le(To, {
|
|
1246
1245
|
class: "w-full",
|
|
1247
1246
|
ref_key: "formRef",
|
|
1248
1247
|
ref: T,
|
|
@@ -1254,15 +1253,15 @@ const Wt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
|
|
|
1254
1253
|
key: f.value
|
|
1255
1254
|
}, null, 8, ["model-value", "disabled"]))
|
|
1256
1255
|
]),
|
|
1257
|
-
"side-sheet-footer":
|
|
1258
|
-
e("div",
|
|
1256
|
+
"side-sheet-footer": U(() => [
|
|
1257
|
+
e("div", Mo, [
|
|
1259
1258
|
m(Fo, {
|
|
1260
1259
|
loading: b.value,
|
|
1261
1260
|
label: t(x)("common.save"),
|
|
1262
1261
|
"confirm-title": `Save ${a.mode === t(ue).CREATE ? "Template" : "Changes"}`,
|
|
1263
1262
|
onConfirm: y
|
|
1264
1263
|
}, {
|
|
1265
|
-
"dialog-content":
|
|
1264
|
+
"dialog-content": U(() => g[4] || (g[4] = [
|
|
1266
1265
|
e("div", { class: "fm-typo-en-body-md-400 bg-fm-color-primary-oats p-8 rounded" }, [
|
|
1267
1266
|
ne(" Warning: This action "),
|
|
1268
1267
|
e("span", { class: "text-fm-color-system-error-300" }, "will not"),
|
|
@@ -1283,7 +1282,7 @@ const Wt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
|
|
|
1283
1282
|
}, 8, ["modelValue"]);
|
|
1284
1283
|
};
|
|
1285
1284
|
}
|
|
1286
|
-
}), Oo = { class: "flex flex-col gap-16 w-full h-full overflow-y-auto" }, Do = { class: "flex justify-between" }, Vo = { class: "fm-typo-en-body-lg-600" }, Ao = { class: "fm-status-badge fm-status-badge-info-secondary" }, Ro = { class: "flex flex-col gap-8" },
|
|
1285
|
+
}), Oo = { class: "flex flex-col gap-16 w-full h-full overflow-y-auto" }, Do = { class: "flex justify-between" }, Vo = { class: "fm-typo-en-body-lg-600" }, Ao = { class: "fm-status-badge fm-status-badge-info-secondary" }, Ro = { class: "flex flex-col gap-8" }, Uo = { class: "flex flex-col gap-4" }, Po = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Bo = { class: "flex gap-1" }, qo = { class: "fm-typo-en-body-lg-600" }, No = {
|
|
1287
1286
|
key: 0,
|
|
1288
1287
|
class: "flex flex-col gap-4"
|
|
1289
1288
|
}, Eo = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Lo = { class: "flex gap-1" }, zo = { class: "fm-typo-en-body-lg-600" }, Ho = {
|
|
@@ -1295,7 +1294,7 @@ const Wt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
|
|
|
1295
1294
|
}, Wo = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Go = { class: "fm-typo-en-body-lg-600" }, Ko = {
|
|
1296
1295
|
key: 3,
|
|
1297
1296
|
class: "flex flex-col gap-4"
|
|
1298
|
-
}, Jo = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" },
|
|
1297
|
+
}, Jo = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Zo = { 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 = {
|
|
1299
1298
|
key: 0,
|
|
1300
1299
|
class: "shrink-0 fm-typo-en-body-lg-400 text-fm-color-typo-secondary"
|
|
1301
1300
|
}, is = {
|
|
@@ -1318,13 +1317,13 @@ const Wt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
|
|
|
1318
1317
|
], F = Y(""), c = E(
|
|
1319
1318
|
() => {
|
|
1320
1319
|
var b, k, T, R;
|
|
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" ?
|
|
1320
|
+
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
1321
|
}
|
|
1323
|
-
), o = Y(!0), f =
|
|
1322
|
+
), o = Y(!0), f = Xe(v, "show");
|
|
1324
1323
|
return (b, k) => {
|
|
1325
1324
|
var g;
|
|
1326
|
-
const T = V("FmMenuDivider"), R = V("FmCard"),
|
|
1327
|
-
return
|
|
1325
|
+
const T = V("FmMenuDivider"), R = V("FmCard"), P = V("FmIcon"), d = V("FmTextField"), y = V("FmTable"), w = V("FmButton"), i = V("FmSideSheet");
|
|
1326
|
+
return $(), le(i, {
|
|
1328
1327
|
header: t(s)("inventory.transfer.template.details.view", { template: (g = b.template) == null ? void 0 : g.name }),
|
|
1329
1328
|
modelValue: t(f),
|
|
1330
1329
|
"onUpdate:modelValue": k[2] || (k[2] = (O) => Ye(f) ? f.value = O : null),
|
|
@@ -1332,8 +1331,8 @@ const Wt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
|
|
|
1332
1331
|
"close-button": "",
|
|
1333
1332
|
"max-width": 1200
|
|
1334
1333
|
}, {
|
|
1335
|
-
default:
|
|
1336
|
-
var O,
|
|
1334
|
+
default: U(() => {
|
|
1335
|
+
var O, M;
|
|
1337
1336
|
return [
|
|
1338
1337
|
e("div", Oo, [
|
|
1339
1338
|
e("div", null, [
|
|
@@ -1341,7 +1340,7 @@ const Wt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
|
|
|
1341
1340
|
variant: "outlined",
|
|
1342
1341
|
class: "flex flex-col gap-8 px-12 py-16"
|
|
1343
1342
|
}, {
|
|
1344
|
-
default:
|
|
1343
|
+
default: U(() => {
|
|
1345
1344
|
var _, W, te, L, B, J, l, n, C;
|
|
1346
1345
|
return [
|
|
1347
1346
|
e("div", Do, [
|
|
@@ -1352,34 +1351,34 @@ const Wt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
|
|
|
1352
1351
|
]),
|
|
1353
1352
|
m(T),
|
|
1354
1353
|
e("div", Ro, [
|
|
1355
|
-
e("div",
|
|
1356
|
-
e("div",
|
|
1354
|
+
e("div", Uo, [
|
|
1355
|
+
e("div", Po, [
|
|
1357
1356
|
e("div", Bo, S(t(s)("inventory.transfer.receiveRequest.details.createdAt")), 1)
|
|
1358
1357
|
]),
|
|
1359
1358
|
e("div", qo, S(t(yt)(((_ = b.template) == null ? void 0 : _._id) ?? "")), 1)
|
|
1360
1359
|
]),
|
|
1361
|
-
(W = b.template) != null && W.updatedAt ? (
|
|
1360
|
+
(W = b.template) != null && W.updatedAt ? ($(), N("div", No, [
|
|
1362
1361
|
e("div", Eo, [
|
|
1363
1362
|
e("div", Lo, S(t(s)("inventory.transfer.receiveRequest.details.updatedAt")), 1)
|
|
1364
1363
|
]),
|
|
1365
1364
|
e("div", zo, [
|
|
1366
1365
|
ne(S(t(vt)(new Date(b.template.updatedAt))) + " ", 1),
|
|
1367
|
-
(te = b.template.updatedBy) != null && te.name ? (
|
|
1366
|
+
(te = b.template.updatedBy) != null && te.name ? ($(), N(pe, { key: 0 }, [
|
|
1368
1367
|
ne(" (" + S(b.template.updatedBy.name) + ") ", 1)
|
|
1369
1368
|
], 64)) : oe("", !0)
|
|
1370
1369
|
])
|
|
1371
1370
|
])) : oe("", !0),
|
|
1372
|
-
(B = (L = u.value) == null ? void 0 : L.supplier) != null && B.name ? (
|
|
1371
|
+
(B = (L = u.value) == null ? void 0 : L.supplier) != null && B.name ? ($(), N("div", Ho, [
|
|
1373
1372
|
e("div", jo, S(t(s)("inventory.transfer.receiveRequest.details.from")), 1),
|
|
1374
1373
|
e("div", Qo, S((l = (J = u.value) == null ? void 0 : J.supplier) == null ? void 0 : l.name), 1)
|
|
1375
1374
|
])) : oe("", !0),
|
|
1376
|
-
(n = u.value) != null && n.ref ? (
|
|
1375
|
+
(n = u.value) != null && n.ref ? ($(), N("div", Yo, [
|
|
1377
1376
|
e("div", Wo, S(t(s)("inventory.transfer.receiveRequest.details.reference")), 1),
|
|
1378
1377
|
e("div", Go, S(u.value.ref), 1)
|
|
1379
1378
|
])) : oe("", !0),
|
|
1380
|
-
(C = u.value) != null && C.remark ? (
|
|
1379
|
+
(C = u.value) != null && C.remark ? ($(), N("div", Ko, [
|
|
1381
1380
|
e("div", Jo, S(t(s)("inventory.transfer.receiveRequest.details.remark")), 1),
|
|
1382
|
-
e("div",
|
|
1381
|
+
e("div", Zo, S(u.value.remark), 1)
|
|
1383
1382
|
])) : oe("", !0)
|
|
1384
1383
|
])
|
|
1385
1384
|
];
|
|
@@ -1387,10 +1386,10 @@ const Wt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
|
|
|
1387
1386
|
_: 1
|
|
1388
1387
|
})
|
|
1389
1388
|
]),
|
|
1390
|
-
e("div",
|
|
1389
|
+
e("div", Xo, [
|
|
1391
1390
|
e("div", es, [
|
|
1392
1391
|
e("div", ts, S(t(s)("inventory.transfer.receiveRequest.details.requestedItems")), 1),
|
|
1393
|
-
(
|
|
1392
|
+
($(!0), N(pe, null, je(((O = u.value) == null ? void 0 : O.items) ?? [], (_) => ($(), N("div", {
|
|
1394
1393
|
key: _.code,
|
|
1395
1394
|
class: "flex flex-col"
|
|
1396
1395
|
}, [
|
|
@@ -1401,10 +1400,10 @@ const Wt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
|
|
|
1401
1400
|
]),
|
|
1402
1401
|
e("div", ns, [
|
|
1403
1402
|
e("div", as, S(_.code), 1),
|
|
1404
|
-
_.totalCost && t(r).enableTotalCost ? (
|
|
1403
|
+
_.totalCost && t(r).enableTotalCost ? ($(), N("div", rs, " (" + S(t(bt)(_.totalCost)) + ") ", 1)) : oe("", !0)
|
|
1405
1404
|
]),
|
|
1406
|
-
t(wt)(_) ? (
|
|
1407
|
-
m(
|
|
1405
|
+
t(wt)(_) ? ($(), N("div", is, [
|
|
1406
|
+
m(P, {
|
|
1408
1407
|
name: "error",
|
|
1409
1408
|
color: "system-error-300",
|
|
1410
1409
|
size: "sm"
|
|
@@ -1433,14 +1432,14 @@ const Wt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
|
|
|
1433
1432
|
style: { height: "500px" },
|
|
1434
1433
|
"column-defs": x,
|
|
1435
1434
|
"search-value": F.value,
|
|
1436
|
-
"row-data": ((
|
|
1435
|
+
"row-data": ((M = v.template) == null ? void 0 : M.locations) ?? [{ name: "All locations" }]
|
|
1437
1436
|
}, null, 8, ["search-value", "row-data"])
|
|
1438
1437
|
])
|
|
1439
1438
|
])
|
|
1440
1439
|
])
|
|
1441
1440
|
];
|
|
1442
1441
|
}),
|
|
1443
|
-
"side-sheet-footer":
|
|
1442
|
+
"side-sheet-footer": U(() => [
|
|
1444
1443
|
e("div", ms, [
|
|
1445
1444
|
m(w, {
|
|
1446
1445
|
label: t(s)("common.edit"),
|
|
@@ -1453,16 +1452,16 @@ const Wt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
|
|
|
1453
1452
|
}, 8, ["header", "modelValue", "dismiss-away"]);
|
|
1454
1453
|
};
|
|
1455
1454
|
}
|
|
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" },
|
|
1455
|
+
}), 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" }, $s = /* @__PURE__ */ ae({
|
|
1457
1456
|
__name: "TransferTemplateView",
|
|
1458
1457
|
setup(p) {
|
|
1459
1458
|
const { t: h } = me(), { createTemplate: v, viewTemplate: a, importTemplates: r, exportTemplates: s } = ze(), { templateDialogProps: u, templateDetailsProps: x } = He(ze()), F = Tt(), { loading: c, templates: o } = He(F), f = Y(!1), b = gt(), k = Je(), { breakpoints: T } = Ft();
|
|
1460
1459
|
Te(F.fetchTemplates);
|
|
1461
1460
|
const R = E(
|
|
1462
1461
|
() => f.value || c.value || !k._currentLocation
|
|
1463
|
-
),
|
|
1464
|
-
function i(
|
|
1465
|
-
switch (
|
|
1462
|
+
), P = E(() => o.value), d = Y(""), y = E(() => T.value.xs || T.value.sm), w = E(() => y.value ? 10 : 20);
|
|
1463
|
+
function i(M) {
|
|
1464
|
+
switch (M) {
|
|
1466
1465
|
case Le.Add:
|
|
1467
1466
|
return v();
|
|
1468
1467
|
case "refresh":
|
|
@@ -1473,8 +1472,8 @@ const Wt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
|
|
|
1473
1472
|
return s();
|
|
1474
1473
|
}
|
|
1475
1474
|
}
|
|
1476
|
-
function g(
|
|
1477
|
-
return
|
|
1475
|
+
function g(M) {
|
|
1476
|
+
return M;
|
|
1478
1477
|
}
|
|
1479
1478
|
const O = E(() => [
|
|
1480
1479
|
{
|
|
@@ -1499,15 +1498,15 @@ const Wt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
|
|
|
1499
1498
|
isPrimary: !1
|
|
1500
1499
|
}
|
|
1501
1500
|
]);
|
|
1502
|
-
return (
|
|
1501
|
+
return (M, _) => {
|
|
1503
1502
|
const W = V("FmTable");
|
|
1504
|
-
return
|
|
1503
|
+
return $(), N(pe, null, [
|
|
1505
1504
|
m(ht, {
|
|
1506
1505
|
title: t(h)("inventory.transfer.template.title2"),
|
|
1507
1506
|
actions: O.value,
|
|
1508
1507
|
"onClick:action": i
|
|
1509
1508
|
}, {
|
|
1510
|
-
default:
|
|
1509
|
+
default: U(() => {
|
|
1511
1510
|
var te;
|
|
1512
1511
|
return [
|
|
1513
1512
|
e("div", {
|
|
@@ -1524,23 +1523,23 @@ const Wt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
|
|
|
1524
1523
|
search: d.value,
|
|
1525
1524
|
"onUpdate:search": _[0] || (_[0] = (L) => d.value = L)
|
|
1526
1525
|
}, null, 8, ["search"]),
|
|
1527
|
-
(
|
|
1526
|
+
($(), le(W, {
|
|
1528
1527
|
style: _e(t(b).tableHeight),
|
|
1529
1528
|
"column-defs": t(F).columnDefs,
|
|
1530
|
-
"row-data":
|
|
1529
|
+
"row-data": P.value,
|
|
1531
1530
|
"search-value": d.value,
|
|
1532
1531
|
loading: R.value,
|
|
1533
1532
|
key: (te = t(k)._currentLocation) == null ? void 0 : te.dbName,
|
|
1534
1533
|
onRowClick: _[1] || (_[1] = (L) => t(a)(L.original)),
|
|
1535
1534
|
"page-size": w.value
|
|
1536
1535
|
}, {
|
|
1537
|
-
"list-row":
|
|
1538
|
-
m(
|
|
1536
|
+
"list-row": U((L) => [
|
|
1537
|
+
m(Ze, {
|
|
1539
1538
|
row: L,
|
|
1540
1539
|
onRowClick: (B) => t(a)(B)
|
|
1541
1540
|
}, {
|
|
1542
|
-
default:
|
|
1543
|
-
var J, l, n, C, q, z, G, D, A, K,
|
|
1541
|
+
default: U((B) => {
|
|
1542
|
+
var J, l, n, C, q, z, G, D, A, K, Z, I, H, ie, Fe, Ie, Se, Me, $e, Oe, ce, De, Ve, Ae, Re, fe, Ue;
|
|
1544
1543
|
return [
|
|
1545
1544
|
e("div", cs, [
|
|
1546
1545
|
e("div", fs, [
|
|
@@ -1558,7 +1557,7 @@ const Wt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
|
|
|
1558
1557
|
]),
|
|
1559
1558
|
e("div", bs, [
|
|
1560
1559
|
m(t(ee), {
|
|
1561
|
-
render: (H = (I = (
|
|
1560
|
+
render: (H = (I = (Z = B.supplier) == null ? void 0 : Z.column) == null ? void 0 : I.columnDef) == null ? void 0 : H.cell,
|
|
1562
1561
|
props: (Fe = (ie = B.supplier) == null ? void 0 : ie.getContext) == null ? void 0 : Fe.call(ie)
|
|
1563
1562
|
}, null, 8, ["render", "props"])
|
|
1564
1563
|
]),
|
|
@@ -1566,7 +1565,7 @@ const Wt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
|
|
|
1566
1565
|
e("div", gs, S(L.original.purchaseOrder.items.length ? L.original.purchaseOrder.items.map((tt) => tt.name).join(", ") : "No items"), 1),
|
|
1567
1566
|
e("div", hs, [
|
|
1568
1567
|
m(t(ee), {
|
|
1569
|
-
render: (Oe = (
|
|
1568
|
+
render: (Oe = ($e = (Me = B.ref) == null ? void 0 : Me.column) == null ? void 0 : $e.columnDef) == null ? void 0 : Oe.cell,
|
|
1570
1569
|
props: (De = (ce = B.ref) == null ? void 0 : ce.getContext) == null ? void 0 : De.call(ce)
|
|
1571
1570
|
}, null, 8, ["render", "props"])
|
|
1572
1571
|
])
|
|
@@ -1574,7 +1573,7 @@ const Wt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
|
|
|
1574
1573
|
e("div", null, [
|
|
1575
1574
|
m(t(ee), {
|
|
1576
1575
|
render: (Re = (Ae = (Ve = B.type) == null ? void 0 : Ve.column) == null ? void 0 : Ae.columnDef) == null ? void 0 : Re.cell,
|
|
1577
|
-
props: (
|
|
1576
|
+
props: (Ue = (fe = B.type) == null ? void 0 : fe.getContext) == null ? void 0 : Ue.call(fe)
|
|
1578
1577
|
}, null, 8, ["render", "props"])
|
|
1579
1578
|
])
|
|
1580
1579
|
])
|
|
@@ -1590,9 +1589,9 @@ const Wt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
|
|
|
1590
1589
|
}),
|
|
1591
1590
|
_: 1
|
|
1592
1591
|
}, 8, ["title", "actions"]),
|
|
1593
|
-
(
|
|
1592
|
+
($(), le(nt, { to: "body" }, [
|
|
1594
1593
|
m(ps, at(rt(t(x))), null, 16),
|
|
1595
|
-
m(
|
|
1594
|
+
m($o, Qe(t(u), {
|
|
1596
1595
|
onSubmitted: _[2] || (_[2] = (te) => t(F).fetchTemplates())
|
|
1597
1596
|
}), null, 16)
|
|
1598
1597
|
]))
|
|
@@ -1601,5 +1600,5 @@ const Wt = { class: "flex flex-col gap-8 py-16" }, Gt = { class: "flex items-cen
|
|
|
1601
1600
|
}
|
|
1602
1601
|
});
|
|
1603
1602
|
export {
|
|
1604
|
-
|
|
1603
|
+
$s as default
|
|
1605
1604
|
};
|