@feedmepos/mf-inventory-portal 0.0.22-dev.34 → 0.0.22-dev.37
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/{ApprovalView-2pX2IV1F.js → ApprovalView-Dco0PkEf.js} +8 -8
- package/dist/{BindingsDialog-EyImpE9g.js → BindingsDialog-DrCU_kIA.js} +9 -9
- package/dist/{BindingsPicker-CbBNBcWW.js → BindingsPicker-BMIIrlG6.js} +17 -17
- package/dist/{BindingsTable-CJeV7Dd2.js → BindingsTable-BHRmkL1P.js} +1 -1
- package/dist/{ClosingTemplateView-BDEooji1.js → ClosingTemplateView-kiej8Nah.js} +15 -15
- package/dist/FmDroppableField-Bl7A98it.js +152 -0
- package/dist/{FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-DZtc5R4Z.js → FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-DQw4pBwH.js} +25 -25
- package/dist/{FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-z-BBBTkh.js → FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-DBh79EM_.js} +20 -20
- package/dist/IngredientBindedItem.vue_vue_type_script_setup_true_lang-3OkJNtvH.js +51 -0
- package/dist/IngredientsView-m44wAwSR.js +1611 -0
- package/dist/{IntegrationView-1lXCciJp.js → IntegrationView-B4gCx21K.js} +71 -71
- package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-Bgd922-L.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-D1frNXtV.js} +1 -1
- package/dist/{PremiumBadge.vue_vue_type_script_setup_true_lang-Bexig132.js → PremiumBadge.vue_vue_type_script_setup_true_lang-Dbs29jm_.js} +16 -16
- package/dist/{PurchaseOrderPrintPreview-036mLqRD.js → PurchaseOrderPrintPreview-lKu0y_xw.js} +7 -7
- package/dist/ReceiveRequestView-DflWKxgq.js +4053 -0
- package/dist/{RecipeView-BuiA-2uY.js → RecipeView-DfsXdlPn.js} +30 -29
- package/dist/StockView-BSeSpxkV.js +7762 -0
- package/dist/{SupplierView-Ck5hH5gT.js → SupplierView-DPWh1si_.js} +11 -11
- package/dist/{TransferDetails.vue_vue_type_script_setup_true_lang-DFDc3P3S.js → TransferDetails.vue_vue_type_script_setup_true_lang-Dt1lRW3W.js} +260 -262
- package/dist/TransferTemplateView-DGOT4oZN.js +2054 -0
- package/dist/{UnitView-DB2hQFMC.js → UnitView-X9bCqAWe.js} +16 -16
- package/dist/{WarehouseView-CFJiuhpx.js → WarehouseView-BphA-Peq.js} +20 -20
- package/dist/api/bill.d.ts +84 -238
- package/dist/api/purchase-order-template.d.ts +4 -2
- package/dist/{app-Z9P39kGh.js → app-DZiCiBV7.js} +18175 -18188
- package/dist/app.js +2 -2
- package/dist/{decimal-DIe_fFDH.js → decimal-Bx1Y3uW1.js} +1 -1
- package/dist/defineDeepModel-4XZbatJF.js +13 -0
- package/dist/format-time-from-id-CFJvgP70.js +15 -0
- package/dist/helper/xlsx.util.d.ts +7 -0
- package/dist/purchase-order-transaction-type-Ds7YRAAp.js +348 -0
- package/dist/stores/inventory.d.ts +63 -0
- package/dist/stores/location.d.ts +89 -0
- package/dist/stores/netsuite.d.ts +1 -0
- package/dist/stores/supplier.d.ts +120 -3
- package/dist/stores/warehouse.d.ts +7 -4
- package/dist/supplier-BhJT8KOX.js +70 -0
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/{use-template-enabled-locations-2-CeSeHnX0.js → use-template-enabled-locations-2-BrEPVOpT.js} +1 -1
- package/dist/views/closing-template/composables/use-closing-template-actions.d.ts +2 -2
- package/dist/views/closing-template/composables/use-closing-template-table.d.ts +2 -2
- package/dist/views/ingredients/composables/use-ingredient-form.d.ts +2 -2
- package/dist/views/receive-request/components/transfer-form/NetSuiteField.vue.d.ts +44 -0
- package/dist/views/receive-request/components/transfer-form/TransferForm.vue.d.ts +42 -34
- package/dist/views/receive-request/composables/use-receive-request-form.d.ts +75 -51
- package/dist/views/receive-request/composables/use-receive-request-table.d.ts +75 -51
- package/dist/views/recipe/composables/use-recipe-form.d.ts +2 -2
- package/dist/views/stock/components/StockRecordCard.vue.d.ts +42 -119
- package/dist/views/stock/composables/use-stock-action.d.ts +2 -2
- package/dist/views/transfer-template/components/transfer-template-import/TransferTemplateImport.vue.d.ts +2 -0
- package/dist/views/transfer-template/components/transfer-template-import/TransferTemplateImportItem.vue.d.ts +12 -0
- package/dist/views/transfer-template/components/transfer-template-import/TransferTemplateImportItemProps.d.ts +9 -0
- package/dist/views/transfer-template/composables/use-transfer-template-actions.d.ts +10 -6
- package/dist/views/transfer-template/composables/use-transfer-template-table.d.ts +1850 -5
- package/dist/views/transfer-template/helpers/import-export.helper.d.ts +76 -0
- package/dist/views/transfer-template/helpers/remove-deleted-skus.helper.d.ts +1 -230
- package/dist/views/unit/composables/use-unit-form.d.ts +2 -2
- package/dist/views/warehouse/components/WarehouseForm.vue.d.ts +14 -8
- package/dist/{xlsx-DrDljHnF.js → xlsx-B9lpxKgq.js} +651 -651
- package/dist/xlsx.util-DP5wVnRT.js +78 -0
- package/package.json +1 -1
- package/dist/IngredientsView-BvKaI0nb.js +0 -1755
- package/dist/ReceiveRequestView-BGlxEJkh.js +0 -1626
- package/dist/StockView-BKX6NX-g.js +0 -1909
- package/dist/TransferTemplateView-ByYEje9E.js +0 -1237
- package/dist/defineDeepModel-DH8vhBpR.js +0 -13
- package/dist/format-time-from-id-CAjL4U2X.js +0 -15
- package/dist/purchase-order-transaction-type-BJDnbhdk.js +0 -338
- package/dist/supplier-wJJ7ATk2.js +0 -69
- package/dist/xlsx.util-BwF0vRjF.js +0 -109
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { defineComponent as ee, ref as h, watch as te, computed as U, resolveComponent as ae, openBlock as g, createBlock as G, unref as e, withCtx as b, createElementVNode as s, normalizeClass as oe, createVNode as n, normalizeStyle as re, toDisplayString as ne, createElementBlock as se, createCommentVNode as le, Teleport as ie, mergeProps as ce } from "vue";
|
|
2
|
-
import {
|
|
3
|
-
import { b as ue, u as me, _ as de, a as fe } from "./FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-
|
|
4
|
-
import { a as _e, b as ve, _ as De } from "./TransferDetails.vue_vue_type_script_setup_true_lang-
|
|
2
|
+
import { i as pe, ag as f, V as J } from "./app-DZiCiBV7.js";
|
|
3
|
+
import { b as ue, u as me, _ as de, a as fe } from "./FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-DBh79EM_.js";
|
|
4
|
+
import { a as _e, b as ve, _ as De } from "./TransferDetails.vue_vue_type_script_setup_true_lang-Dt1lRW3W.js";
|
|
5
5
|
import { _ as he, F as _ } from "./TableActionableRow.vue_vue_type_script_setup_true_lang-DlNJ6kRg.js";
|
|
6
6
|
import { useBreakpoints as ge } from "@feedmepos/ui-library";
|
|
7
7
|
import { useI18n as be } from "@feedmepos/mf-common";
|
|
@@ -75,7 +75,7 @@ const xe = { class: "flex flex-col py-8" }, ye = { class: "fm-typo-en-body-md-40
|
|
|
75
75
|
onRowClick: (t) => e(o).promptShowTransferDetails(t.purchaseOrder, t)
|
|
76
76
|
}, {
|
|
77
77
|
default: b((t) => {
|
|
78
|
-
var R, k, O, i, S, T, C, z, c, F, M, p,
|
|
78
|
+
var R, k, O, i, S, T, C, z, c, F, M, p, V, u, $, Y, q, L, N, m, j, E, P, A, d, H;
|
|
79
79
|
return [
|
|
80
80
|
s("div", xe, [
|
|
81
81
|
s("div", ye, [
|
|
@@ -90,16 +90,16 @@ const xe = { class: "flex flex-col py-8" }, ye = { class: "fm-typo-en-body-md-40
|
|
|
90
90
|
props: (F = (c = t.to_name) == null ? void 0 : c.getContext) == null ? void 0 : F.call(c)
|
|
91
91
|
}, null, 8, ["render", "props"])
|
|
92
92
|
]),
|
|
93
|
-
s("div", Re, ne((
|
|
93
|
+
s("div", Re, ne(($ = (u = (V = (p = (M = r.original.purchaseOrder) == null ? void 0 : M.items) == null ? void 0 : p.map) == null ? void 0 : V.call(p, (I) => `${I.name}`)) == null ? void 0 : u.join) == null ? void 0 : $.call(u, ", ")), 1),
|
|
94
94
|
(Y = r.original.purchaseOrder) != null && Y.ref ? (g(), se("div", ke, [
|
|
95
95
|
n(e(_), {
|
|
96
|
-
render: (
|
|
97
|
-
props: (
|
|
96
|
+
render: (N = (L = (q = t.purchaseOrder_ref) == null ? void 0 : q.column) == null ? void 0 : L.columnDef) == null ? void 0 : N.cell,
|
|
97
|
+
props: (j = (m = t.purchaseOrder_ref) == null ? void 0 : m.getContext) == null ? void 0 : j.call(m)
|
|
98
98
|
}, null, 8, ["render", "props"])
|
|
99
99
|
])) : le("", !0),
|
|
100
100
|
s("div", Oe, [
|
|
101
101
|
n(e(_), {
|
|
102
|
-
render: (A = (
|
|
102
|
+
render: (A = (P = (E = t.purchaseOrder_status) == null ? void 0 : E.column) == null ? void 0 : P.columnDef) == null ? void 0 : A.cell,
|
|
103
103
|
props: (H = (d = t.purchaseOrder_status) == null ? void 0 : d.getContext) == null ? void 0 : H.call(d)
|
|
104
104
|
}, null, 8, ["render", "props"])
|
|
105
105
|
])
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { defineComponent as C, ref as o, onMounted as M, onUnmounted as F, watch as x, resolveComponent as l, openBlock as i, createElementBlock as
|
|
2
|
-
import { u as V,
|
|
1
|
+
import { defineComponent as C, ref as o, onMounted as M, onUnmounted as F, watch as x, resolveComponent as l, openBlock as i, createElementBlock as c, createBlock as I, withCtx as R, createVNode as a, createCommentVNode as z, createElementVNode as P } from "vue";
|
|
2
|
+
import { u as V, av as L, _ as S } from "./app-DZiCiBV7.js";
|
|
3
3
|
const U = {
|
|
4
4
|
key: 0,
|
|
5
5
|
class: "flex justify-end gap-8 items-center"
|
|
@@ -9,10 +9,10 @@ const U = {
|
|
|
9
9
|
}, A = /* @__PURE__ */ C({
|
|
10
10
|
__name: "BindingsDialog",
|
|
11
11
|
setup(N) {
|
|
12
|
-
const p = V(),
|
|
12
|
+
const p = V(), d = o(!0), s = o(new Array()), u = o(), t = L(y);
|
|
13
13
|
async function y() {
|
|
14
|
-
await p.readInventory(),
|
|
15
|
-
|
|
14
|
+
await p.readInventory(), u.value = t.onMessage("props:inventory-bindings", (e) => {
|
|
15
|
+
d.value = !1, s.value = e;
|
|
16
16
|
}).onMessage("props:inventory-bindings:validate", () => {
|
|
17
17
|
var e;
|
|
18
18
|
(e = f.value) == null || e.validateInputs();
|
|
@@ -36,7 +36,7 @@ const U = {
|
|
|
36
36
|
}).observe(e);
|
|
37
37
|
}), F(() => {
|
|
38
38
|
var e, n;
|
|
39
|
-
(n = (e =
|
|
39
|
+
(n = (e = u.value) == null ? void 0 : e.removeEventListener) == null || n.call(e);
|
|
40
40
|
}), x([() => s.value], ([e]) => {
|
|
41
41
|
t.sendMessage("@update:inventory-bindings", e);
|
|
42
42
|
});
|
|
@@ -47,12 +47,12 @@ const U = {
|
|
|
47
47
|
const f = o();
|
|
48
48
|
return (e, n) => {
|
|
49
49
|
const g = l("FmButton"), B = l("FmForm"), h = l("FmCircularProgress");
|
|
50
|
-
return i(),
|
|
50
|
+
return i(), c("div", {
|
|
51
51
|
class: "bg-white",
|
|
52
52
|
ref_key: "resizeableRef",
|
|
53
53
|
ref: m
|
|
54
54
|
}, [
|
|
55
|
-
|
|
55
|
+
d.value ? (i(), c("div", E, [
|
|
56
56
|
a(h, { size: "md" }),
|
|
57
57
|
n[2] || (n[2] = P("div", null, "Loading bindings dialog...", -1))
|
|
58
58
|
])) : (i(), I(B, {
|
|
@@ -69,7 +69,7 @@ const U = {
|
|
|
69
69
|
"iframe-mode": "",
|
|
70
70
|
"onClick:pickInventoryBindings": k
|
|
71
71
|
}, null, 8, ["model-value"]),
|
|
72
|
-
r.value ? z("", !0) : (i(),
|
|
72
|
+
r.value ? z("", !0) : (i(), c("div", U, [
|
|
73
73
|
a(g, {
|
|
74
74
|
type: "button",
|
|
75
75
|
variant: "tertiary",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { defineComponent as S, computed as
|
|
2
|
-
import { u as M,
|
|
1
|
+
import { defineComponent as S, computed as u, ref as l, onMounted as U, onUnmounted as V, resolveComponent as E, openBlock as p, createElementBlock as f, createVNode as r, createElementVNode as k } from "vue";
|
|
2
|
+
import { u as M, av as x, y as z } from "./app-DZiCiBV7.js";
|
|
3
3
|
const F = {
|
|
4
4
|
key: 0,
|
|
5
5
|
class: "flex flex-col gap-16"
|
|
@@ -9,14 +9,14 @@ const F = {
|
|
|
9
9
|
}, N = /* @__PURE__ */ S({
|
|
10
10
|
__name: "BindingsPicker",
|
|
11
11
|
setup(L) {
|
|
12
|
-
const d = M(), C =
|
|
12
|
+
const d = M(), C = u(() => d.recipes), I = u(() => d.skus), g = l(!0), i = l(new Array()), a = l("RECIPE"), c = u(() => a.value === "SKU" ? I.value.map((s) => ({
|
|
13
13
|
label: s.name,
|
|
14
14
|
sublabel: s.code,
|
|
15
15
|
value: s
|
|
16
16
|
})) : C.value.map((s) => ({
|
|
17
17
|
label: s.name,
|
|
18
18
|
value: s
|
|
19
|
-
}))), b =
|
|
19
|
+
}))), b = u({
|
|
20
20
|
get() {
|
|
21
21
|
if (a.value === "SKU") {
|
|
22
22
|
const e = i.value.filter((n) => n.type === "SKU");
|
|
@@ -31,7 +31,7 @@ const F = {
|
|
|
31
31
|
const s = i.value.filter((n) => n.type === "SKU");
|
|
32
32
|
e = e, i.value = [
|
|
33
33
|
...e.map((n) => {
|
|
34
|
-
const t = i.value.find((
|
|
34
|
+
const t = i.value.find((m) => m.id === n._id);
|
|
35
35
|
return t || {
|
|
36
36
|
type: "RECIPE",
|
|
37
37
|
id: n._id,
|
|
@@ -49,7 +49,7 @@ const F = {
|
|
|
49
49
|
i.value = [
|
|
50
50
|
...s,
|
|
51
51
|
...e.map((n) => {
|
|
52
|
-
const t = i.value.find((
|
|
52
|
+
const t = i.value.find((m) => m.id === n._id);
|
|
53
53
|
return t || {
|
|
54
54
|
type: "SKU",
|
|
55
55
|
id: n._id,
|
|
@@ -62,9 +62,9 @@ const F = {
|
|
|
62
62
|
];
|
|
63
63
|
}
|
|
64
64
|
}
|
|
65
|
-
}),
|
|
65
|
+
}), y = l(), o = x(B);
|
|
66
66
|
async function B() {
|
|
67
|
-
await d.readInventory(),
|
|
67
|
+
await d.readInventory(), y.value = o.onMessage(
|
|
68
68
|
"props:binding-items",
|
|
69
69
|
(e) => {
|
|
70
70
|
g.value = !1, a.value = e.type, i.value = e.bindings;
|
|
@@ -77,38 +77,38 @@ const F = {
|
|
|
77
77
|
function R() {
|
|
78
78
|
o.sendMessage("@submit:items", i.value);
|
|
79
79
|
}
|
|
80
|
-
const
|
|
80
|
+
const _ = l();
|
|
81
81
|
return U(() => {
|
|
82
|
-
const e =
|
|
82
|
+
const e = _.value;
|
|
83
83
|
e && new ResizeObserver(() => {
|
|
84
84
|
o.sendMessage("resize", e.scrollHeight);
|
|
85
85
|
}).observe(e);
|
|
86
86
|
}), V(() => {
|
|
87
87
|
var e, s;
|
|
88
|
-
(s = (e =
|
|
88
|
+
(s = (e = y.value) == null ? void 0 : e.removeEventListener) == null || s.call(e);
|
|
89
89
|
}), (e, s) => {
|
|
90
90
|
const n = E("FmButton"), t = E("FmCircularProgress");
|
|
91
91
|
return p(), f("div", {
|
|
92
92
|
class: "bg-white",
|
|
93
93
|
ref_key: "resizeableRef",
|
|
94
|
-
ref:
|
|
94
|
+
ref: _
|
|
95
95
|
}, [
|
|
96
96
|
g.value ? (p(), f("div", w, [
|
|
97
|
-
|
|
97
|
+
r(t, { size: "md" }),
|
|
98
98
|
s[1] || (s[1] = k("div", null, "Loading bindings dialog...", -1))
|
|
99
99
|
])) : (p(), f("div", F, [
|
|
100
|
-
|
|
100
|
+
r(z, {
|
|
101
101
|
"model-value": b.value,
|
|
102
|
-
"onUpdate:modelValue": s[0] || (s[0] = (
|
|
102
|
+
"onUpdate:modelValue": s[0] || (s[0] = (v) => b.value = v),
|
|
103
103
|
items: c.value
|
|
104
104
|
}, null, 8, ["model-value", "items"]),
|
|
105
105
|
k("div", K, [
|
|
106
|
-
|
|
106
|
+
r(n, {
|
|
107
107
|
variant: "tertiary",
|
|
108
108
|
label: "Close",
|
|
109
109
|
onClick: P
|
|
110
110
|
}),
|
|
111
|
-
|
|
111
|
+
r(n, {
|
|
112
112
|
label: "Submit",
|
|
113
113
|
onClick: R
|
|
114
114
|
})
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent as _, ref as c, provide as C, computed as f, resolveComponent as b, openBlock as p, createBlock as h, h as z, onMounted as B, onUnmounted as I, createElementBlock as y, createVNode as N, createElementVNode as x } from "vue";
|
|
2
|
-
import {
|
|
2
|
+
import { j as v, u as E, av as L } from "./app-DZiCiBV7.js";
|
|
3
3
|
import { components as F } from "@feedmepos/ui-library";
|
|
4
4
|
import "@feedmepos/mf-common";
|
|
5
5
|
const P = /* @__PURE__ */ _({
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { ref as F, h as x, computed as P, defineComponent as Y, openBlock as k, createElementBlock as S, createElementVNode as f, toDisplayString as I, createVNode as _, unref as c, Fragment as _e, renderList as Ce, resolveComponent as V, createBlock as B, withCtx as R, watch as Me, isRef as Pe, createTextVNode as ve, normalizeClass as Fe, normalizeStyle as Se, Teleport as Ae, normalizeProps as Ve, guardReactiveProps as Ie, mergeProps as Re } from "vue";
|
|
2
|
-
import { u as Ue, _ as Ee, a as ze } from "./FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-
|
|
2
|
+
import { u as Ue, _ as Ee, a as ze } from "./FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-DBh79EM_.js";
|
|
3
3
|
import { useCoreStore as Ne, useI18n as J } from "@feedmepos/mf-common";
|
|
4
|
-
import { useDialog as
|
|
4
|
+
import { useDialog as X, useSnackbar as Q, FmButtonVariant as be, components as U, useProxiedModel as Be, useBreakpoints as Le } from "@feedmepos/ui-library";
|
|
5
5
|
import { defineStore as we, storeToRefs as Ye } from "pinia";
|
|
6
6
|
import { F as E, D as ye, R as z } from "./row-action.enum-PMKMRrZR.js";
|
|
7
|
-
import {
|
|
7
|
+
import { n as je, c as xe, i as ke, u as Ke, R as Ge, A as He, y as Je, X as qe, Y as he } from "./app-DZiCiBV7.js";
|
|
8
8
|
import { c as Oe, F as N, _ as Te } from "./TableActionableRow.vue_vue_type_script_setup_true_lang-DlNJ6kRg.js";
|
|
9
|
-
import { f as
|
|
9
|
+
import { f as Xe } from "./format-time-from-id-CFJvgP70.js";
|
|
10
10
|
import "vue-router";
|
|
11
|
-
import { d as
|
|
12
|
-
import { u as
|
|
11
|
+
import { d as Qe } from "./defineDeepModel-4XZbatJF.js";
|
|
12
|
+
import { u as We } from "./use-template-enabled-locations-2-BrEPVOpT.js";
|
|
13
13
|
const q = je((m, g) => {
|
|
14
14
|
function v() {
|
|
15
15
|
var s;
|
|
@@ -46,7 +46,7 @@ const q = je((m, g) => {
|
|
|
46
46
|
}
|
|
47
47
|
};
|
|
48
48
|
}), O = we("closingTemplateActions", () => {
|
|
49
|
-
const m =
|
|
49
|
+
const m = X(), g = Q(), v = q(), t = F({});
|
|
50
50
|
function o() {
|
|
51
51
|
t.value = {
|
|
52
52
|
mode: E.CREATE,
|
|
@@ -181,7 +181,7 @@ const q = je((m, g) => {
|
|
|
181
181
|
accessorKey: "_id",
|
|
182
182
|
header: () => g("inventory.closing.table.createdAt"),
|
|
183
183
|
cell(e) {
|
|
184
|
-
return
|
|
184
|
+
return Xe(`${e.getValue()}`);
|
|
185
185
|
},
|
|
186
186
|
enableSorting: !0
|
|
187
187
|
},
|
|
@@ -525,11 +525,11 @@ const et = { class: "flex flex-col gap-16 py-12" }, tt = { class: "flex" }, st =
|
|
|
525
525
|
disabled: { type: Boolean }
|
|
526
526
|
},
|
|
527
527
|
setup(m, { expose: g }) {
|
|
528
|
-
const v = m, t =
|
|
528
|
+
const v = m, t = Qe(), { t: o } = J(), s = Ke(), b = X(), {
|
|
529
529
|
promptSelectLocations: n,
|
|
530
530
|
columnDefs: r,
|
|
531
531
|
rowData: d
|
|
532
|
-
} =
|
|
532
|
+
} = We({
|
|
533
533
|
getLocations() {
|
|
534
534
|
return t.locations;
|
|
535
535
|
},
|
|
@@ -704,7 +704,7 @@ const et = { class: "flex flex-col gap-16 py-12" }, tt = { class: "flex" }, st =
|
|
|
704
704
|
emits: ["update:show", "submitted"],
|
|
705
705
|
setup(m, { expose: g, emit: v }) {
|
|
706
706
|
var C;
|
|
707
|
-
const t = m, o = v, s = q(), b =
|
|
707
|
+
const t = m, o = v, s = q(), b = Q(), { t: n } = J(), r = Be(t, "show");
|
|
708
708
|
function d() {
|
|
709
709
|
return {
|
|
710
710
|
_id: "",
|
|
@@ -861,7 +861,7 @@ const wt = /* @__PURE__ */ qe(ht, [["render", _t]]), xt = { class: "flex flex-co
|
|
|
861
861
|
__name: "ClosingTemplatePublish",
|
|
862
862
|
emits: ["close"],
|
|
863
863
|
setup(m, { emit: g }) {
|
|
864
|
-
const v = F(!1), t =
|
|
864
|
+
const v = F(!1), t = Q(), o = q(), s = De(), b = g;
|
|
865
865
|
async function n() {
|
|
866
866
|
v.value = !0;
|
|
867
867
|
try {
|
|
@@ -926,7 +926,7 @@ const wt = /* @__PURE__ */ qe(ht, [["render", _t]]), xt = { class: "flex flex-co
|
|
|
926
926
|
}), Ft = { class: "flex-1 flex flex-col gap-8" }, St = { class: "flex flex-col" }, At = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Vt = { class: "fm-typo-en-body-lg-600 text-fm-color-typo-primary" }, It = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary line-clamp-2" }, Rt = { class: "fm-typo-en-body-lg-400 line-clamp-2" }, qt = /* @__PURE__ */ Y({
|
|
927
927
|
__name: "ClosingTemplateView",
|
|
928
928
|
setup(m) {
|
|
929
|
-
const { t: g } = J(), { createTemplate: v, updateTemplate: t } = O(), { templateDialogProps: o, templateDetailsProps: s } = Ye(O()), b = ke(), n =
|
|
929
|
+
const { t: g } = J(), { createTemplate: v, updateTemplate: t } = O(), { templateDialogProps: o, templateDetailsProps: s } = Ye(O()), b = ke(), n = X(), r = De(), d = Ue(), { breakpoints: u } = Le();
|
|
930
930
|
b.watchLocation(r.fetchTemplates);
|
|
931
931
|
const y = P(() => r.loading), p = F(""), w = P(() => u.value.xs || u.value.sm), e = P(() => w.value ? 10 : 20);
|
|
932
932
|
function l(a) {
|
|
@@ -1011,13 +1011,13 @@ const wt = /* @__PURE__ */ qe(ht, [["render", _t]]), xt = { class: "flex flex-co
|
|
|
1011
1011
|
onRowClick: (T) => c(t)(T)
|
|
1012
1012
|
}, {
|
|
1013
1013
|
default: R((T) => {
|
|
1014
|
-
var
|
|
1014
|
+
var W, Z, ee, j, te, se, le, oe, K, ne, ae, ie, re, ce, ue, G, de, me, pe, fe, H, ge;
|
|
1015
1015
|
return [
|
|
1016
1016
|
f("div", Ft, [
|
|
1017
1017
|
f("div", St, [
|
|
1018
1018
|
f("div", At, [
|
|
1019
1019
|
_(c(N), {
|
|
1020
|
-
render: (ee = (Z = (
|
|
1020
|
+
render: (ee = (Z = (W = T._id) == null ? void 0 : W.column) == null ? void 0 : Z.columnDef) == null ? void 0 : ee.cell,
|
|
1021
1021
|
props: (te = (j = T._id) == null ? void 0 : j.getContext) == null ? void 0 : te.call(j)
|
|
1022
1022
|
}, null, 8, ["render", "props"])
|
|
1023
1023
|
]),
|
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
import { defineComponent as O, ref as r, computed as v, resolveComponent as z, openBlock as n, createElementBlock as p, createElementVNode as d, createCommentVNode as k, renderSlot as c, createBlock as C, normalizeClass as u, toDisplayString as g } from "vue";
|
|
2
|
+
import { X as N } from "./app-DZiCiBV7.js";
|
|
3
|
+
const M = {
|
|
4
|
+
key: 0,
|
|
5
|
+
class: "relative"
|
|
6
|
+
}, W = ["accept", "disabled"], X = { class: "flex flex-col gap-8" }, q = ["accept", "disabled"], G = /* @__PURE__ */ O({
|
|
7
|
+
__name: "FmDroppableField",
|
|
8
|
+
props: {
|
|
9
|
+
buttonLabel: {},
|
|
10
|
+
label: { default: "" },
|
|
11
|
+
disabled: { type: Boolean, default: !1 },
|
|
12
|
+
accept: { default: "" },
|
|
13
|
+
maxFileSize: { default: 8e6 },
|
|
14
|
+
contentClass: {}
|
|
15
|
+
},
|
|
16
|
+
emits: ["file-upload", "file-rejected"],
|
|
17
|
+
setup(S, { emit: $ }) {
|
|
18
|
+
const l = S, y = $, t = r(!1), i = r(null), s = r(null), f = r(), B = (e) => {
|
|
19
|
+
l.disabled || (e.stopPropagation(), e.preventDefault());
|
|
20
|
+
}, V = (e) => {
|
|
21
|
+
l.disabled || (e.stopPropagation(), e.preventDefault(), t.value = !0);
|
|
22
|
+
}, R = (e) => {
|
|
23
|
+
l.disabled || (e.stopPropagation(), e.preventDefault(), t.value = !1);
|
|
24
|
+
}, j = (e) => {
|
|
25
|
+
var a;
|
|
26
|
+
l.disabled || (e.stopPropagation(), e.preventDefault(), t.value = !1, F((a = e.dataTransfer) == null ? void 0 : a.files));
|
|
27
|
+
};
|
|
28
|
+
function F(e) {
|
|
29
|
+
if (e)
|
|
30
|
+
if (f.value = e, i.value = T(e[0]), s.value = A(e[0]), i.value && s.value)
|
|
31
|
+
y("file-upload", e[0]);
|
|
32
|
+
else {
|
|
33
|
+
const a = L();
|
|
34
|
+
y("file-rejected", [
|
|
35
|
+
{
|
|
36
|
+
file: e[0],
|
|
37
|
+
reason: a
|
|
38
|
+
}
|
|
39
|
+
]);
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
const L = () => {
|
|
43
|
+
const e = new Array();
|
|
44
|
+
return i.value || e.push("invalid-type"), s.value || e.push("invalid-size"), e;
|
|
45
|
+
}, T = (e) => {
|
|
46
|
+
if (!l.accept) return !0;
|
|
47
|
+
const a = l.accept.split(",").map((o) => o.trim());
|
|
48
|
+
for (const o of a)
|
|
49
|
+
if (E(o)) {
|
|
50
|
+
if (D(o) === D(e.type)) return !0;
|
|
51
|
+
} else if (P(e) === o || e.type === o) return !0;
|
|
52
|
+
return !1;
|
|
53
|
+
}, A = (e) => e.size <= l.maxFileSize, E = (e) => e.indexOf("*") !== -1, P = (e) => "." + e.name.split(".").pop(), D = (e) => e.substring(0, e.indexOf("/")), w = v(() => {
|
|
54
|
+
if (t.value) return "Drop file to upload";
|
|
55
|
+
if (i.value) {
|
|
56
|
+
if (!s.value) return `File size exceeds ${l.maxFileSize * 1e-6}mb`;
|
|
57
|
+
} else return "File type is not valid";
|
|
58
|
+
return "";
|
|
59
|
+
}), m = v(() => f.value ? !i.value || !s.value : !1), _ = (e) => {
|
|
60
|
+
const a = e.target;
|
|
61
|
+
F(a.files);
|
|
62
|
+
}, x = v(() => {
|
|
63
|
+
var e;
|
|
64
|
+
return (e = f.value) == null ? void 0 : e.item(0);
|
|
65
|
+
}), b = r();
|
|
66
|
+
return (e, a) => {
|
|
67
|
+
const o = z("FmLabel"), I = z("FmButton");
|
|
68
|
+
return n(), p("label", {
|
|
69
|
+
class: "fm-droppable-field",
|
|
70
|
+
ref_key: "fmButtonRef",
|
|
71
|
+
ref: b
|
|
72
|
+
}, [
|
|
73
|
+
e.$slots.default ? (n(), p("div", M, [
|
|
74
|
+
d("input", {
|
|
75
|
+
accept: e.accept,
|
|
76
|
+
disabled: e.disabled,
|
|
77
|
+
class: "fm-droppable-field__input",
|
|
78
|
+
type: "file",
|
|
79
|
+
onChange: _
|
|
80
|
+
}, null, 40, W)
|
|
81
|
+
])) : k("", !0),
|
|
82
|
+
c(e.$slots, "default", {
|
|
83
|
+
isDragging: t.value,
|
|
84
|
+
isValidFileType: i.value,
|
|
85
|
+
isValidFileSize: s.value,
|
|
86
|
+
singleValidFile: x.value,
|
|
87
|
+
openFileDialog: () => {
|
|
88
|
+
var h;
|
|
89
|
+
return console.log("click", b.value), (h = b.value) == null ? void 0 : h.click();
|
|
90
|
+
}
|
|
91
|
+
}, () => [
|
|
92
|
+
d("div", X, [
|
|
93
|
+
e.$slots.label ? c(e.$slots, "label", { key: 0 }, void 0, !0) : (n(), C(o, {
|
|
94
|
+
key: 1,
|
|
95
|
+
label: e.label
|
|
96
|
+
}, null, 8, ["label"]))
|
|
97
|
+
]),
|
|
98
|
+
d("div", {
|
|
99
|
+
class: u([[
|
|
100
|
+
e.contentClass ? e.contentClass : "w-full h-full",
|
|
101
|
+
{
|
|
102
|
+
"fm-droppable-field__container--dragging": t.value,
|
|
103
|
+
"fm-droppable-field__container--invalid": m.value && !e.disabled,
|
|
104
|
+
"fm-droppable-field__container--disabled": e.disabled
|
|
105
|
+
}
|
|
106
|
+
], "fm-droppable-field__container"]),
|
|
107
|
+
onDragenter: B,
|
|
108
|
+
onDragleave: R,
|
|
109
|
+
onDragover: V,
|
|
110
|
+
onDrop: j
|
|
111
|
+
}, [
|
|
112
|
+
(t.value || m.value) && !e.disabled ? (n(), p("div", {
|
|
113
|
+
key: 0,
|
|
114
|
+
class: u({
|
|
115
|
+
"fm-typo-en-body-lg-600": !0,
|
|
116
|
+
"text-fm-color-primary": t.value,
|
|
117
|
+
"text-fm-color-typo-error": m.value
|
|
118
|
+
})
|
|
119
|
+
}, g(w.value), 3)) : (n(), C(I, {
|
|
120
|
+
key: 1,
|
|
121
|
+
disabled: e.disabled,
|
|
122
|
+
label: e.buttonLabel ?? "Add files",
|
|
123
|
+
size: "md",
|
|
124
|
+
variant: "secondary"
|
|
125
|
+
}, null, 8, ["disabled", "label"])),
|
|
126
|
+
c(e.$slots, "accept-text", {}, () => [
|
|
127
|
+
l.accept ? (n(), p("div", {
|
|
128
|
+
key: 0,
|
|
129
|
+
class: u([[e.disabled ? "text-fm-color-typo-disabled" : "text-fm-color-typo-secondary"], "fm-typo-en-body-md-400"])
|
|
130
|
+
}, g(`Accepts ${l.accept}`), 3)) : k("", !0)
|
|
131
|
+
], !0),
|
|
132
|
+
d("input", {
|
|
133
|
+
accept: e.accept,
|
|
134
|
+
disabled: e.disabled,
|
|
135
|
+
class: "fm-droppable-field__input",
|
|
136
|
+
type: "file",
|
|
137
|
+
onChange: _
|
|
138
|
+
}, null, 40, q)
|
|
139
|
+
], 34),
|
|
140
|
+
c(e.$slots, "helper-text", {}, () => [
|
|
141
|
+
d("div", {
|
|
142
|
+
class: u([[e.disabled ? "text-fm-color-typo-disabled" : "text-fm-color-typo-secondary"], "fm-typo-en-body-sm-400"])
|
|
143
|
+
}, g(`Max size ${l.maxFileSize * 1e-6}mb`), 3)
|
|
144
|
+
], !0)
|
|
145
|
+
], !0)
|
|
146
|
+
], 512);
|
|
147
|
+
};
|
|
148
|
+
}
|
|
149
|
+
}), K = /* @__PURE__ */ N(G, [["__scopeId", "data-v-311b22a0"]]);
|
|
150
|
+
export {
|
|
151
|
+
K as F
|
|
152
|
+
};
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { a as S, t as B,
|
|
2
|
-
import { u as
|
|
3
|
-
import { P as k } from "./purchase-order-transaction-type-
|
|
4
|
-
import { computed as y, defineComponent as $, mergeModels as W, useModel as
|
|
1
|
+
import { a as S, t as B, a7 as A, i as D, ae as R, am as H, an as V } from "./app-DZiCiBV7.js";
|
|
2
|
+
import { u as j } from "./supplier-BhJT8KOX.js";
|
|
3
|
+
import { P as k } from "./purchase-order-transaction-type-Ds7YRAAp.js";
|
|
4
|
+
import { computed as y, defineComponent as $, mergeModels as W, useModel as J, resolveComponent as w, openBlock as F, createElementBlock as I, normalizeStyle as K, createElementVNode as N, createVNode as Q, withCtx as X, createBlock as x, createCommentVNode as E, Fragment as Y, renderList as Z, unref as M } from "vue";
|
|
5
5
|
function ne(c, l, t, s) {
|
|
6
|
-
var
|
|
6
|
+
var g, b, u;
|
|
7
7
|
if (s != null && s.manualTotalCost)
|
|
8
8
|
return s == null ? void 0 : s.manualTotalCost;
|
|
9
|
-
const e = (u = (
|
|
9
|
+
const e = (u = (b = (g = s == null ? void 0 : s.supplier) == null ? void 0 : g.supplyItems) == null ? void 0 : b.find(
|
|
10
10
|
(r) => r.skuId === c._id
|
|
11
11
|
)) == null ? void 0 : u.defaultCost, o = c.defaultCost, n = e ?? o, i = n == null ? void 0 : n.costPerUnit, a = i ? n != null && n.measurement ? +S(i) / +S(n == null ? void 0 : n.measurement.conversion) : +S(i) : void 0, p = a ? t ? a * +S(t.conversion) : a : void 0, d = p ? +S(l) * p : void 0;
|
|
12
12
|
return d ? {
|
|
@@ -19,7 +19,7 @@ function ne(c, l, t, s) {
|
|
|
19
19
|
};
|
|
20
20
|
}
|
|
21
21
|
function _(c) {
|
|
22
|
-
return
|
|
22
|
+
return H.parse(c);
|
|
23
23
|
}
|
|
24
24
|
function T(c) {
|
|
25
25
|
return {
|
|
@@ -40,12 +40,12 @@ function T(c) {
|
|
|
40
40
|
};
|
|
41
41
|
}
|
|
42
42
|
function oe(c, l, t = !1, s = !1) {
|
|
43
|
-
const e =
|
|
43
|
+
const e = j(), o = D();
|
|
44
44
|
o.watchLocation(async () => {
|
|
45
|
-
var
|
|
45
|
+
var v;
|
|
46
46
|
await e.readSuppliers();
|
|
47
47
|
const u = c();
|
|
48
|
-
if ((
|
|
48
|
+
if ((v = u.supplier) != null && v._id) return;
|
|
49
49
|
const r = s ? e.suppliers[0] : e.businessSuppliers[0], f = (t ? o.locations.filter((m) => m.doc._id !== o.currentLocation.doc._id) : o.locations)[0];
|
|
50
50
|
l({
|
|
51
51
|
...u,
|
|
@@ -72,10 +72,10 @@ function oe(c, l, t = !1, s = !1) {
|
|
|
72
72
|
});
|
|
73
73
|
return;
|
|
74
74
|
}
|
|
75
|
-
const
|
|
75
|
+
const v = (t ? o.locations.filter((m) => m.doc._id !== o.currentLocation.doc._id) : o.locations).find((m) => m.doc._id === u);
|
|
76
76
|
l({
|
|
77
77
|
...r,
|
|
78
|
-
supplier:
|
|
78
|
+
supplier: v ? T(v) : r.supplier
|
|
79
79
|
});
|
|
80
80
|
}
|
|
81
81
|
}), a = y(() => e.locationSuppliers.map(_)), p = y(() => e.businessSuppliers.map(_)), d = y(() => {
|
|
@@ -83,9 +83,9 @@ function oe(c, l, t = !1, s = !1) {
|
|
|
83
83
|
return s ? [...r, ...u] : r;
|
|
84
84
|
}), P = y(() => {
|
|
85
85
|
var h;
|
|
86
|
-
const u = ((h = o._currentLocation) == null ? void 0 : h.type) ===
|
|
86
|
+
const u = ((h = o._currentLocation) == null ? void 0 : h.type) === R.warehouse;
|
|
87
87
|
return (t ? o.locations.filter((f) => f.doc._id !== o.currentLocation.doc._id) : o.locations).filter((f) => u || f.acceptRequest).map(T);
|
|
88
|
-
}),
|
|
88
|
+
}), g = y(() => {
|
|
89
89
|
if (n.value === k.PURCHASE) {
|
|
90
90
|
const r = a.value.map((f) => ({
|
|
91
91
|
label: f.name,
|
|
@@ -102,9 +102,9 @@ function oe(c, l, t = !1, s = !1) {
|
|
|
102
102
|
sublabel: r.internal ? `${r.internal}` : void 0,
|
|
103
103
|
value: r._id
|
|
104
104
|
}));
|
|
105
|
-
}),
|
|
106
|
-
var f,
|
|
107
|
-
const u = (
|
|
105
|
+
}), b = y(() => {
|
|
106
|
+
var f, v;
|
|
107
|
+
const u = (v = (f = c()) == null ? void 0 : f.supplier) == null ? void 0 : v._id;
|
|
108
108
|
if (n.value === k.PURCHASE) {
|
|
109
109
|
const m = e.suppliers.find((C) => C._id === u);
|
|
110
110
|
return m ? _(m) : null;
|
|
@@ -114,11 +114,11 @@ function oe(c, l, t = !1, s = !1) {
|
|
|
114
114
|
});
|
|
115
115
|
return {
|
|
116
116
|
transferLocationModel: i,
|
|
117
|
-
transferLocationOptions:
|
|
117
|
+
transferLocationOptions: g,
|
|
118
118
|
locationOptionsTypePurchase: d,
|
|
119
119
|
locationOptionsTypePurchaseLocationLevel: a,
|
|
120
120
|
locationOptionsTypeTransfer: P,
|
|
121
|
-
selectedLocation:
|
|
121
|
+
selectedLocation: b
|
|
122
122
|
};
|
|
123
123
|
}
|
|
124
124
|
class O {
|
|
@@ -211,17 +211,17 @@ const z = { class: "sticky top-0 bg-white mb-8" }, G = { class: "overflow-y-auto
|
|
|
211
211
|
}),
|
|
212
212
|
emits: ["update:search"],
|
|
213
213
|
setup(c) {
|
|
214
|
-
const l = c, t =
|
|
214
|
+
const l = c, t = J(c, "search"), s = y(
|
|
215
215
|
() => new L(l.items, ["label", "sublabel"], l.options)
|
|
216
216
|
), e = y(() => s.value.search(t.value));
|
|
217
217
|
return (o, n) => {
|
|
218
218
|
const i = w("FmButton"), a = w("FmTextField"), p = w("FmMenuItem");
|
|
219
219
|
return F(), I("div", {
|
|
220
220
|
class: "relative",
|
|
221
|
-
style:
|
|
221
|
+
style: K({ maxHeight: `${o.maxHeight}px`, width: o.width })
|
|
222
222
|
}, [
|
|
223
223
|
N("div", z, [
|
|
224
|
-
|
|
224
|
+
Q(a, {
|
|
225
225
|
modelValue: t.value,
|
|
226
226
|
"onUpdate:modelValue": n[1] || (n[1] = (d) => t.value = d),
|
|
227
227
|
placeholder: "Filter options"
|
|
@@ -244,9 +244,9 @@ const z = { class: "sticky top-0 bg-white mb-8" }, G = { class: "overflow-y-auto
|
|
|
244
244
|
sublabel: d.sublabel,
|
|
245
245
|
"model-value": M(V)(o.modelValue, d.value),
|
|
246
246
|
onClick: () => o.handleItemChange(M(V)(o.modelValue, d.value), d),
|
|
247
|
-
onVnodeMounted: (
|
|
248
|
-
var
|
|
249
|
-
return M(V)(o.modelValue, d.value) && ((
|
|
247
|
+
onVnodeMounted: (g) => {
|
|
248
|
+
var b;
|
|
249
|
+
return M(V)(o.modelValue, d.value) && ((b = g.el) == null || b.scrollIntoView({ behavior: "smooth" }), console.log("scrollTo", g.el)), void 0;
|
|
250
250
|
}
|
|
251
251
|
}, null, 8, ["label", "sublabel", "model-value", "onClick", "onVnodeMounted"]))), 128)),
|
|
252
252
|
e.value.length ? E("", !0) : (F(), x(p, {
|