@feedmepos/mf-inventory-portal 0.0.18-dev.3 → 0.0.19-dev.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{ApprovalView-G-u9nPxH.js → ApprovalView-DU7oB2Zk.js} +42 -39
- package/dist/{BindingsDialog-CVeD1mOn.js → BindingsDialog-BgfV0G46.js} +2 -2
- package/dist/{BindingsPicker-K04aOoGr.js → BindingsPicker-tUI5WYBk.js} +2 -2
- package/dist/{BindingsTable-65aYkpX7.js → BindingsTable-8G-Nc4pC.js} +18 -17
- package/dist/FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-DaHXKF1s.js +273 -0
- package/dist/{FmMultiselectDialog.vue_vue_type_script_setup_true_lang-C5WBLEy3.js → FmMultiselectDialog.vue_vue_type_script_setup_true_lang-CxOk5ule.js} +2 -2
- package/dist/{FmUnitInput.vue_vue_type_script_setup_true_lang-QKFZeZKM.js → FmUnitInput.vue_vue_type_script_setup_true_lang-D-vJDMKb.js} +3 -3
- package/dist/IngredientsView-CAh7D4tL.js +1760 -0
- package/dist/{IntegrationView-ZMPPIopU.js → IntegrationView-Bf7yHuS8.js} +3 -3
- package/dist/InventoryBindingForm.vue_vue_type_script_setup_true_lang-BdVrpR9J.js +277 -0
- package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-kidodonU.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-BKlWhMnB.js} +1 -1
- package/dist/{PurchaseOrderPrintPreview-B4uzudnC.js → PurchaseOrderPrintPreview-YFcOtdfJ.js} +1 -1
- package/dist/ReceiveRequestView-bIXyVVX9.js +1401 -0
- package/dist/RecipeView-BD0mvxCg.js +575 -0
- package/dist/StockForecast.vue_vue_type_style_index_0_lang-KLXSWvo5.js +59 -0
- package/dist/StockView-BCq37bGl.js +1865 -0
- package/dist/SupplierView-BiSqTXnz.js +804 -0
- package/dist/TransferDetails.vue_vue_type_script_setup_true_lang-CvbKNb0C.js +1033 -0
- package/dist/UnitView-DSdn__9m.js +643 -0
- package/dist/WarehouseView-B8UxxAL6.js +1051 -0
- package/dist/api/bill.d.ts +2 -2
- package/dist/app-RVyC2D4O.js +43892 -0
- package/dist/app.d.ts +1002 -0
- package/dist/app.js +4 -3
- package/dist/components/FmDroppableField.vue.d.ts +1 -1
- package/dist/{date2-6Vt_hnAG.js → date2-C2PfOqbB.js} +1 -1
- package/dist/{dayjs.min-Co7-8-Mb.js → dayjs.min-0pzT_dbr.js} +1 -1
- package/dist/{decimal-ziY3648r.js → decimal-BtIn4K57.js} +1 -1
- package/dist/{fuzzy-gvHXFsh0.js → fuzzy-yzIM5KUK.js} +1 -1
- package/dist/{index-Do1KDD1S.js → index-l87_vggM.js} +1 -1
- package/dist/{layout-BxDEsp4a.js → layout-ITqYtCVu.js} +1 -1
- package/dist/{number-Dvvpk3SV.js → number-B5d98l0m.js} +1 -1
- package/dist/router/name.d.ts +2 -1
- package/dist/{rules-CQu9yXsg.js → rules-CCwuHe8Y.js} +2 -2
- package/dist/{stock-estimate-Wysv30cx.js → stock-estimate-C4PL0Fcz.js} +2 -2
- package/dist/style.css +1 -1
- package/dist/{supplier-BFdAYn3E.js → supplier-CA0OR3DU.js} +1 -1
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/{use-inventory-binding-dialog-CuyOzZ5r.js → use-inventory-binding-dialog-CTriImiV.js} +2 -2
- package/dist/views/receive-request/components/transfer-form/SparkIcon.vue.d.ts +1 -1
- package/dist/views/stock/components/StockRecordCard.vue.d.ts +1 -1
- package/dist/views/stock/components/dialog/AdjustedItemForm.vue.d.ts +2 -2
- package/dist/views/stock/helper/compute-summary-total.d.ts +2 -2
- package/dist/{xlsx-BG4CsaGF.js → xlsx-DAVatAlv.js} +660 -660
- package/dist/xlsx.util-BsZI2tNE.js +109 -0
- package/package.json +6 -5
- package/dist/FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-DgHp7KgJ.js +0 -268
- package/dist/IngredientsView-6Q2UWsu-.js +0 -1776
- package/dist/InventoryBindingForm.vue_vue_type_script_setup_true_lang-C8YTZoBw.js +0 -276
- package/dist/ReceiveRequestView-DuHtLwZN.js +0 -1394
- package/dist/RecipeView-CRj0pC9N.js +0 -573
- package/dist/StockForecast.vue_vue_type_style_index_0_lang-B5EK101t.js +0 -58
- package/dist/StockView-CQbeZ5pU.js +0 -1862
- package/dist/SupplierView-CrfQATQf.js +0 -796
- package/dist/TransferDetails.vue_vue_type_script_setup_true_lang-CLUo-Tve.js +0 -1028
- package/dist/UnitView-D1acjiRV.js +0 -635
- package/dist/WarehouseView-DID1G1qK.js +0 -1043
- package/dist/app-D1teOEQX.js +0 -66113
- package/dist/xlsx.util-BkVYceD0.js +0 -107
|
@@ -1,17 +1,18 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { r as f, f as
|
|
3
|
-
import { b as ce, _ as
|
|
4
|
-
import { a as
|
|
5
|
-
import { c as U } from "./date2-
|
|
6
|
-
import { _ as
|
|
7
|
-
import { useBreakpoints as
|
|
8
|
-
|
|
1
|
+
import { defineComponent as B, ref as h, watch as I, computed as ee, resolveComponent as te, openBlock as D, createBlock as H, unref as e, withCtx as g, createElementVNode as s, createVNode as n, normalizeStyle as ae, toDisplayString as oe, createElementBlock as re, createCommentVNode as ne, Teleport as se, mergeProps as le } from "vue";
|
|
2
|
+
import { r as f, f as ie } from "./app-RVyC2D4O.js";
|
|
3
|
+
import { b as ce, _ as pe, a as ue } from "./FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-DaHXKF1s.js";
|
|
4
|
+
import { a as me, b as de, _ as fe } from "./TransferDetails.vue_vue_type_script_setup_true_lang-CvbKNb0C.js";
|
|
5
|
+
import { c as U } from "./date2-C2PfOqbB.js";
|
|
6
|
+
import { _ as _e, F as _, u as ve } from "./layout-ITqYtCVu.js";
|
|
7
|
+
import { useBreakpoints as he } from "@feedmepos/ui-library";
|
|
8
|
+
import { useI18n as De } from "@feedmepos/mf-common";
|
|
9
|
+
const ge = { class: "px-24 xs:p-0 sm:p-0 flex flex-col gap-8 max-h-full" }, be = { class: "flex flex-col py-8" }, xe = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, ye = { class: "fm-typo-en-body-lg-600 text-fm-color-typo-primary line-clamp-1" }, we = { class: "fm-typo-en-body-md-400 text-fm-color-typo-primary line-clamp-1" }, Re = {
|
|
9
10
|
key: 0,
|
|
10
11
|
class: "fm-typo-en-body-md-400 text-fm-color-typo-primary line-clamp-1"
|
|
11
|
-
},
|
|
12
|
+
}, ke = { class: "pt-8" }, Ye = /* @__PURE__ */ B({
|
|
12
13
|
__name: "ApprovalView",
|
|
13
|
-
setup(
|
|
14
|
-
const o =
|
|
14
|
+
setup(Oe) {
|
|
15
|
+
const o = me("approval"), { columnDefs: G } = de("approval", o), J = ie();
|
|
15
16
|
f.object({
|
|
16
17
|
name: f.string().optional().nullable(),
|
|
17
18
|
start: f.date().optional().nullable(),
|
|
@@ -24,7 +25,7 @@ const he = { class: "px-24 xs:p-0 sm:p-0 flex flex-col gap-8 max-h-full" }, De =
|
|
|
24
25
|
startDate: U(b.value.start ?? /* @__PURE__ */ new Date()),
|
|
25
26
|
endDate: U(b.value.end ?? /* @__PURE__ */ new Date())
|
|
26
27
|
});
|
|
27
|
-
|
|
28
|
+
I([() => a.value.startDate], () => {
|
|
28
29
|
if (!a.value.startDate)
|
|
29
30
|
return;
|
|
30
31
|
if (!a.value.endDate) {
|
|
@@ -37,21 +38,23 @@ const he = { class: "px-24 xs:p-0 sm:p-0 flex flex-col gap-8 max-h-full" }, De =
|
|
|
37
38
|
return;
|
|
38
39
|
}
|
|
39
40
|
});
|
|
40
|
-
const v = h(""), { breakpoints: x } =
|
|
41
|
+
const v = h(""), { breakpoints: x } = he(), K = ee(() => x.value.xs || x.value.sm ? 10 : 20), Q = ve(), { t: W } = De();
|
|
41
42
|
return (y, l) => {
|
|
42
|
-
const
|
|
43
|
-
return D(), H(
|
|
43
|
+
const X = te("FmTable");
|
|
44
|
+
return D(), H(pe, {
|
|
45
|
+
title: e(W)("inventory.transfer.approval.title")
|
|
46
|
+
}, {
|
|
44
47
|
default: g(() => [
|
|
45
|
-
|
|
46
|
-
|
|
48
|
+
s("div", ge, [
|
|
49
|
+
n(ue, {
|
|
47
50
|
searchable: "",
|
|
48
51
|
"change-location": "",
|
|
49
52
|
search: v.value,
|
|
50
53
|
"onUpdate:search": l[0] || (l[0] = (r) => v.value = r),
|
|
51
54
|
actions: [{ icon: "refresh", onClick: e(o).fetchData }]
|
|
52
55
|
}, null, 8, ["search", "actions"]),
|
|
53
|
-
|
|
54
|
-
style:
|
|
56
|
+
n(X, {
|
|
57
|
+
style: ae(e(Q).tableHeight),
|
|
55
58
|
"column-defs": e(G),
|
|
56
59
|
"row-data": e(o).purchaseRequests.value,
|
|
57
60
|
"search-value": v.value,
|
|
@@ -60,37 +63,37 @@ const he = { class: "px-24 xs:p-0 sm:p-0 flex flex-col gap-8 max-h-full" }, De =
|
|
|
60
63
|
"page-size": K.value
|
|
61
64
|
}, {
|
|
62
65
|
"list-row": g((r) => [
|
|
63
|
-
|
|
66
|
+
n(_e, {
|
|
64
67
|
row: r,
|
|
65
68
|
onRowClick: (t) => e(o).promptShowTransferDetails(t.purchaseOrder, t)
|
|
66
69
|
}, {
|
|
67
70
|
default: g((t) => {
|
|
68
|
-
var w, R, k,
|
|
71
|
+
var w, R, k, i, O, S, T, C, c, F, $, p, z, u, M, V, Y, q, L, m, N, j, E, P, d, A;
|
|
69
72
|
return [
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
+
s("div", be, [
|
|
74
|
+
s("div", xe, [
|
|
75
|
+
n(e(_), {
|
|
73
76
|
render: (k = (R = (w = t.purchaseOrder__id) == null ? void 0 : w.column) == null ? void 0 : R.columnDef) == null ? void 0 : k.cell,
|
|
74
|
-
props: (O = (
|
|
77
|
+
props: (O = (i = t.purchaseOrder__id) == null ? void 0 : i.getContext) == null ? void 0 : O.call(i)
|
|
75
78
|
}, null, 8, ["render", "props"])
|
|
76
79
|
]),
|
|
77
|
-
|
|
78
|
-
|
|
80
|
+
s("div", ye, [
|
|
81
|
+
n(e(_), {
|
|
79
82
|
render: (C = (T = (S = t.to_name) == null ? void 0 : S.column) == null ? void 0 : T.columnDef) == null ? void 0 : C.cell,
|
|
80
|
-
props: (F = (
|
|
83
|
+
props: (F = (c = t.to_name) == null ? void 0 : c.getContext) == null ? void 0 : F.call(c)
|
|
81
84
|
}, null, 8, ["render", "props"])
|
|
82
85
|
]),
|
|
83
|
-
|
|
84
|
-
(V = r.original.purchaseOrder) != null && V.ref ? (D(),
|
|
85
|
-
|
|
86
|
+
s("div", we, oe((M = (u = (z = (p = ($ = r.original.purchaseOrder) == null ? void 0 : $.items) == null ? void 0 : p.map) == null ? void 0 : z.call(p, (Z) => `${Z.name}`)) == null ? void 0 : u.join) == null ? void 0 : M.call(u, ", ")), 1),
|
|
87
|
+
(V = r.original.purchaseOrder) != null && V.ref ? (D(), re("div", Re, [
|
|
88
|
+
n(e(_), {
|
|
86
89
|
render: (L = (q = (Y = t.purchaseOrder_ref) == null ? void 0 : Y.column) == null ? void 0 : q.columnDef) == null ? void 0 : L.cell,
|
|
87
90
|
props: (N = (m = t.purchaseOrder_ref) == null ? void 0 : m.getContext) == null ? void 0 : N.call(m)
|
|
88
91
|
}, null, 8, ["render", "props"])
|
|
89
|
-
])) :
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
render: (
|
|
93
|
-
props: (
|
|
92
|
+
])) : ne("", !0),
|
|
93
|
+
s("div", ke, [
|
|
94
|
+
n(e(_), {
|
|
95
|
+
render: (P = (E = (j = t.purchaseOrder_status) == null ? void 0 : j.column) == null ? void 0 : E.columnDef) == null ? void 0 : P.cell,
|
|
96
|
+
props: (A = (d = t.purchaseOrder_status) == null ? void 0 : d.getContext) == null ? void 0 : A.call(d)
|
|
94
97
|
}, null, 8, ["render", "props"])
|
|
95
98
|
])
|
|
96
99
|
])
|
|
@@ -103,16 +106,16 @@ const he = { class: "px-24 xs:p-0 sm:p-0 flex flex-col gap-8 max-h-full" }, De =
|
|
|
103
106
|
}, 8, ["style", "column-defs", "row-data", "search-value", "loading", "page-size"])
|
|
104
107
|
]),
|
|
105
108
|
(D(), H(se, { to: "body" }, [
|
|
106
|
-
|
|
109
|
+
n(fe, le(e(o).transferDetailsProps.value, {
|
|
107
110
|
onSubmitted: e(o).fetchData
|
|
108
111
|
}), null, 16, ["onSubmitted"])
|
|
109
112
|
]))
|
|
110
113
|
]),
|
|
111
114
|
_: 1
|
|
112
|
-
});
|
|
115
|
+
}, 8, ["title"]);
|
|
113
116
|
};
|
|
114
117
|
}
|
|
115
118
|
});
|
|
116
119
|
export {
|
|
117
|
-
|
|
120
|
+
Ye as default
|
|
118
121
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
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 { _ as V } from "./InventoryBindingForm.vue_vue_type_script_setup_true_lang-
|
|
3
|
-
import { u as L, A as S } from "./app-
|
|
2
|
+
import { _ as V } from "./InventoryBindingForm.vue_vue_type_script_setup_true_lang-BdVrpR9J.js";
|
|
3
|
+
import { u as L, A as S } from "./app-RVyC2D4O.js";
|
|
4
4
|
const U = {
|
|
5
5
|
key: 0,
|
|
6
6
|
class: "flex justify-end gap-8 items-center"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent as S, computed as r, ref as l, onMounted as U, onUnmounted as V, resolveComponent as E, openBlock as p, createElementBlock as f, createVNode as u, createElementVNode as k } from "vue";
|
|
2
|
-
import { _ as x } from "./FmMultiselectDialog.vue_vue_type_script_setup_true_lang-
|
|
3
|
-
import { u as M, A as h } from "./app-
|
|
2
|
+
import { _ as x } from "./FmMultiselectDialog.vue_vue_type_script_setup_true_lang-CxOk5ule.js";
|
|
3
|
+
import { u as M, A as h } from "./app-RVyC2D4O.js";
|
|
4
4
|
const z = {
|
|
5
5
|
key: 0,
|
|
6
6
|
class: "flex flex-col gap-16"
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { defineComponent as v, ref as l, 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 { i as _, u as E, A as L } from "./app-
|
|
3
|
-
import "./index-
|
|
2
|
+
import { i as _, u as E, A as L } from "./app-RVyC2D4O.js";
|
|
3
|
+
import "./index-l87_vggM.js";
|
|
4
4
|
import { components as F } from "@feedmepos/ui-library";
|
|
5
|
-
import "./fuzzy-
|
|
6
|
-
import "./dayjs.min-
|
|
5
|
+
import "./fuzzy-yzIM5KUK.js";
|
|
6
|
+
import "./dayjs.min-0pzT_dbr.js";
|
|
7
|
+
import "@feedmepos/mf-common";
|
|
7
8
|
const P = /* @__PURE__ */ v({
|
|
8
9
|
__name: "binding-ui",
|
|
9
10
|
props: {
|
|
@@ -24,17 +25,17 @@ const P = /* @__PURE__ */ v({
|
|
|
24
25
|
C("closeDialog", () => {
|
|
25
26
|
d.value.isOpen = !d.value.isOpen;
|
|
26
27
|
});
|
|
27
|
-
const
|
|
28
|
+
const s = k, m = c, r = f(() => s.items.map((e) => ({
|
|
28
29
|
key: e.key,
|
|
29
30
|
name: e.name,
|
|
30
31
|
_skuLinked: e.bindings.filter(
|
|
31
|
-
({ type: n, id:
|
|
32
|
+
({ type: n, id: o }) => n === _.enum.SKU && s.skus.some((a) => a._id === o)
|
|
32
33
|
).length,
|
|
33
34
|
_recipeLinked: e.bindings.filter(
|
|
34
|
-
({ type: n, id:
|
|
35
|
+
({ type: n, id: o }) => n === _.enum.RECIPE && s.recipes.some((a) => a._id === o)
|
|
35
36
|
).length,
|
|
36
37
|
onUpdate: async () => {
|
|
37
|
-
|
|
38
|
+
s.editable && m("click:open-binding-dialog", s.type, e);
|
|
38
39
|
}
|
|
39
40
|
}))), g = [
|
|
40
41
|
{
|
|
@@ -47,7 +48,7 @@ const P = /* @__PURE__ */ v({
|
|
|
47
48
|
header: "Ingredient",
|
|
48
49
|
size: 200,
|
|
49
50
|
cell(i) {
|
|
50
|
-
const e = r.value.find((
|
|
51
|
+
const e = r.value.find((o) => o.key === i.row.original.key), n = e == null ? void 0 : e._skuLinked;
|
|
51
52
|
return n === 1 ? "1 item" : n ? `${n} items` : "Not set";
|
|
52
53
|
}
|
|
53
54
|
},
|
|
@@ -56,7 +57,7 @@ const P = /* @__PURE__ */ v({
|
|
|
56
57
|
header: "Recipe",
|
|
57
58
|
size: 200,
|
|
58
59
|
cell(i) {
|
|
59
|
-
const e = r.value.find((
|
|
60
|
+
const e = r.value.find((o) => o.key === i.row.original.key), n = e == null ? void 0 : e._recipeLinked;
|
|
60
61
|
return n === 1 ? "1 item" : n ? `${n} items` : "Not set";
|
|
61
62
|
}
|
|
62
63
|
},
|
|
@@ -92,19 +93,19 @@ const P = /* @__PURE__ */ v({
|
|
|
92
93
|
}), R = {
|
|
93
94
|
key: 1,
|
|
94
95
|
class: "p-24 flex items-center justify-center gap-16"
|
|
95
|
-
}, M = /* @__PURE__ */ x("div", null, "Loading bindings table...", -1),
|
|
96
|
+
}, M = /* @__PURE__ */ x("div", null, "Loading bindings table...", -1), K = /* @__PURE__ */ v({
|
|
96
97
|
__name: "BindingsTable",
|
|
97
98
|
setup(k) {
|
|
98
|
-
const c = E(), d = l(!0),
|
|
99
|
+
const c = E(), d = l(!0), s = l(new Array()), m = f(() => c.recipes), r = f(() => c.skus), g = l(""), i = L(n), e = l();
|
|
99
100
|
async function n() {
|
|
100
101
|
await c.readInventory(), e.value = i.onMessage(
|
|
101
102
|
"props:grouped-bindings",
|
|
102
103
|
(t) => {
|
|
103
|
-
d.value = !1,
|
|
104
|
+
d.value = !1, s.value = t;
|
|
104
105
|
}
|
|
105
106
|
), i.sendMessage("props:grouped-bindings");
|
|
106
107
|
}
|
|
107
|
-
async function
|
|
108
|
+
async function o(t, u) {
|
|
108
109
|
i.sendMessage("@click:open-binding-dialog", {
|
|
109
110
|
key: t,
|
|
110
111
|
binding: u
|
|
@@ -131,17 +132,17 @@ const P = /* @__PURE__ */ v({
|
|
|
131
132
|
M
|
|
132
133
|
])) : (p(), h(P, {
|
|
133
134
|
key: 0,
|
|
134
|
-
items:
|
|
135
|
+
items: s.value,
|
|
135
136
|
recipes: m.value,
|
|
136
137
|
skus: r.value,
|
|
137
138
|
type: g.value,
|
|
138
139
|
editable: "",
|
|
139
|
-
"onClick:openBindingDialog":
|
|
140
|
+
"onClick:openBindingDialog": o
|
|
140
141
|
}, null, 8, ["items", "recipes", "skus", "type"]))
|
|
141
142
|
], 512);
|
|
142
143
|
};
|
|
143
144
|
}
|
|
144
145
|
});
|
|
145
146
|
export {
|
|
146
|
-
|
|
147
|
+
K as default
|
|
147
148
|
};
|
|
@@ -0,0 +1,273 @@
|
|
|
1
|
+
import { defineComponent as $, computed as g, resolveComponent as f, openBlock as t, createElementBlock as y, Fragment as k, createElementVNode as m, toDisplayString as R, renderList as F, createBlock as _, createCommentVNode as b, unref as d, createVNode as v, renderSlot as A, Teleport as H, ref as S, withCtx as C, watch as U, mergeModels as Y, useModel as B } from "vue";
|
|
2
|
+
import { FmButtonVariant as z, useBreakpoints as Q } from "@feedmepos/ui-library";
|
|
3
|
+
import { useI18n as T } from "@feedmepos/mf-common";
|
|
4
|
+
import { f as j } from "./app-RVyC2D4O.js";
|
|
5
|
+
import { c as V } from "./date2-C2PfOqbB.js";
|
|
6
|
+
const E = { class: "flex flex-col w-full bg-white h-full" }, q = { class: "flex items-center px-24 py-16 xs:p-12 sm:p-12 gap-4 h-[68px]" }, G = { class: "flex-1 fm-typo-en-title-md-800 flex items-center h-[36px] bg-white" }, J = { key: 0 }, K = { key: 1 }, O = { class: "bg-white flex-1" }, W = { class: "fixed bottom-96 right-16" }, he = /* @__PURE__ */ $({
|
|
7
|
+
__name: "SingleColumnLayout",
|
|
8
|
+
props: {
|
|
9
|
+
actions: { default: () => [] },
|
|
10
|
+
title: { default: "Title" },
|
|
11
|
+
description: {},
|
|
12
|
+
showBackButton: { type: Boolean },
|
|
13
|
+
defaultPadding: { type: Boolean },
|
|
14
|
+
breadcrumbs: { default: () => [] }
|
|
15
|
+
},
|
|
16
|
+
emits: ["click:action"],
|
|
17
|
+
setup(i, { emit: o }) {
|
|
18
|
+
const l = i, a = o, n = g(() => l.actions.find((r) => r.isPrimary)), s = g(
|
|
19
|
+
() => l.actions.filter((r) => !r.isPrimary).map((r) => ({ ...r, variant: r.variant ?? z.Tertiary }))
|
|
20
|
+
), { breakpoints: c } = Q();
|
|
21
|
+
return (r, e) => {
|
|
22
|
+
const p = f("FmButton");
|
|
23
|
+
return t(), y(k, null, [
|
|
24
|
+
m("div", E, [
|
|
25
|
+
m("div", q, [
|
|
26
|
+
m("div", G, R(r.title), 1),
|
|
27
|
+
s.value.length ? (t(), y("div", J, [
|
|
28
|
+
(t(!0), y(k, null, F(s.value, (h) => (t(), _(p, {
|
|
29
|
+
key: h.value,
|
|
30
|
+
label: h.label,
|
|
31
|
+
"prepend-icon": h.prependIcon,
|
|
32
|
+
variant: h.variant,
|
|
33
|
+
onClick: (L) => a("click:action", h.value)
|
|
34
|
+
}, null, 8, ["label", "prepend-icon", "variant", "onClick"]))), 128))
|
|
35
|
+
])) : b("", !0),
|
|
36
|
+
n.value && (d(c).lg || d(c).md) ? (t(), y("div", K, [
|
|
37
|
+
v(p, {
|
|
38
|
+
label: n.value.label,
|
|
39
|
+
"prepend-icon": n.value.prependIcon,
|
|
40
|
+
onClick: e[0] || (e[0] = (h) => a("click:action", n.value.value))
|
|
41
|
+
}, null, 8, ["label", "prepend-icon"])
|
|
42
|
+
])) : b("", !0)
|
|
43
|
+
]),
|
|
44
|
+
m("div", O, [
|
|
45
|
+
A(r.$slots, "default")
|
|
46
|
+
])
|
|
47
|
+
]),
|
|
48
|
+
n.value && (d(c).sm || d(c).xs) ? (t(), _(H, {
|
|
49
|
+
key: 0,
|
|
50
|
+
to: "body"
|
|
51
|
+
}, [
|
|
52
|
+
m("div", W, [
|
|
53
|
+
v(p, {
|
|
54
|
+
label: n.value.label,
|
|
55
|
+
"prepend-icon": n.value.prependIcon,
|
|
56
|
+
onClick: e[1] || (e[1] = (h) => a("click:action", n.value.value)),
|
|
57
|
+
variant: "fab"
|
|
58
|
+
}, null, 8, ["label", "prepend-icon"])
|
|
59
|
+
])
|
|
60
|
+
])) : b("", !0)
|
|
61
|
+
], 64);
|
|
62
|
+
};
|
|
63
|
+
}
|
|
64
|
+
}), X = { class: "inline-flex" }, Z = { class: "inline-flex rounded-md items-center gap-4 justify-center h-[30px] px-8 py-4 bg-fm-color-neutral-gray-100 cursor-pointer text-fm-color-neutral-gray-400" }, ee = { class: "fm-typo-en-body-md-600 select-none text-ellipsis overflow-hidden whitespace-nowrap" }, te = {
|
|
65
|
+
class: "overflow-hidden overflow-y-scroll",
|
|
66
|
+
style: { maxHeight: "105px" }
|
|
67
|
+
}, ne = {
|
|
68
|
+
class: "overflow-hidden overflow-y-scroll",
|
|
69
|
+
style: { maxHeight: "105px" }
|
|
70
|
+
}, oe = /* @__PURE__ */ $({
|
|
71
|
+
__name: "ChangeLocationComponent",
|
|
72
|
+
setup(i) {
|
|
73
|
+
const o = j(), { t: l } = T(), a = S(""), n = g(
|
|
74
|
+
() => o.locations.map((e) => ({ label: e.name, value: e.dbName, type: e.type })).filter(
|
|
75
|
+
(e) => a.value ? e.label.toLocaleLowerCase().includes(a.value.toLocaleLowerCase()) : !0
|
|
76
|
+
)
|
|
77
|
+
), s = g(
|
|
78
|
+
() => n.value.filter((e) => e.type === "restaurant")
|
|
79
|
+
), c = g(
|
|
80
|
+
() => n.value.filter((e) => e.type === "warehouse")
|
|
81
|
+
);
|
|
82
|
+
function r({ value: e }) {
|
|
83
|
+
o.selectLocation(o.locations.find((p) => p.dbName === e));
|
|
84
|
+
}
|
|
85
|
+
return (e, p) => {
|
|
86
|
+
const h = f("FmIcon"), L = f("FmSearch"), D = f("FmMenuDivider"), M = f("FmMenuHeader"), w = f("FmMenuItem"), N = f("FmMenu");
|
|
87
|
+
return t(), y("div", X, [
|
|
88
|
+
v(N, { "close-on-click": !0 }, {
|
|
89
|
+
"menu-button": C(() => {
|
|
90
|
+
var u;
|
|
91
|
+
return [
|
|
92
|
+
m("div", Z, [
|
|
93
|
+
v(h, {
|
|
94
|
+
name: "storefront",
|
|
95
|
+
size: "sm"
|
|
96
|
+
}),
|
|
97
|
+
m("div", ee, R(((u = d(o)._currentLocation) == null ? void 0 : u.name) ?? d(l)("inventory.common.noLocationSelected")), 1),
|
|
98
|
+
v(h, {
|
|
99
|
+
name: "expand_more",
|
|
100
|
+
size: "sm"
|
|
101
|
+
})
|
|
102
|
+
])
|
|
103
|
+
];
|
|
104
|
+
}),
|
|
105
|
+
default: C(() => [
|
|
106
|
+
v(L, {
|
|
107
|
+
"model-value": a.value,
|
|
108
|
+
"onUpdate:modelValue": p[0] || (p[0] = (u) => a.value = u),
|
|
109
|
+
class: "w-[200px]",
|
|
110
|
+
placeholder: d(l)("inventory.common.table.toolbar.filterItems")
|
|
111
|
+
}, null, 8, ["model-value", "placeholder"]),
|
|
112
|
+
v(D),
|
|
113
|
+
v(M, {
|
|
114
|
+
label: d(l)("inventory.common.restaurant")
|
|
115
|
+
}, null, 8, ["label"]),
|
|
116
|
+
v(D),
|
|
117
|
+
m("div", te, [
|
|
118
|
+
(t(!0), y(k, null, F(s.value, (u) => {
|
|
119
|
+
var x;
|
|
120
|
+
return t(), _(w, {
|
|
121
|
+
key: u.value,
|
|
122
|
+
"model-value": ((x = d(o)._currentLocation) == null ? void 0 : x.dbName) === u.value,
|
|
123
|
+
label: u.label,
|
|
124
|
+
onClick: (P) => r(u)
|
|
125
|
+
}, null, 8, ["model-value", "label", "onClick"]);
|
|
126
|
+
}), 128))
|
|
127
|
+
]),
|
|
128
|
+
s.value.length ? b("", !0) : (t(), _(w, {
|
|
129
|
+
key: 0,
|
|
130
|
+
disabled: "",
|
|
131
|
+
label: d(l)("inventory.common.noResultFound")
|
|
132
|
+
}, null, 8, ["label"])),
|
|
133
|
+
v(M, {
|
|
134
|
+
label: d(l)("inventory.common.warehouse")
|
|
135
|
+
}, null, 8, ["label"]),
|
|
136
|
+
v(D),
|
|
137
|
+
m("div", ne, [
|
|
138
|
+
(t(!0), y(k, null, F(c.value, (u) => {
|
|
139
|
+
var x;
|
|
140
|
+
return t(), _(w, {
|
|
141
|
+
key: u.value,
|
|
142
|
+
"model-value": ((x = d(o)._currentLocation) == null ? void 0 : x.dbName) === u.value,
|
|
143
|
+
label: u.label,
|
|
144
|
+
onClick: (P) => r(u)
|
|
145
|
+
}, null, 8, ["model-value", "label", "onClick"]);
|
|
146
|
+
}), 128))
|
|
147
|
+
]),
|
|
148
|
+
c.value.length ? b("", !0) : (t(), _(w, {
|
|
149
|
+
key: 1,
|
|
150
|
+
disabled: "",
|
|
151
|
+
label: d(l)("inventory.common.noResultFound")
|
|
152
|
+
}, null, 8, ["label"]))
|
|
153
|
+
]),
|
|
154
|
+
_: 1
|
|
155
|
+
})
|
|
156
|
+
]);
|
|
157
|
+
};
|
|
158
|
+
}
|
|
159
|
+
});
|
|
160
|
+
function ye() {
|
|
161
|
+
const i = /* @__PURE__ */ new Date();
|
|
162
|
+
return i.setDate(i.getDate() - 15), {
|
|
163
|
+
start: i,
|
|
164
|
+
end: /* @__PURE__ */ new Date()
|
|
165
|
+
};
|
|
166
|
+
}
|
|
167
|
+
function I(i = 15) {
|
|
168
|
+
const o = /* @__PURE__ */ new Date();
|
|
169
|
+
o.setDate(o.getDate() - i);
|
|
170
|
+
const l = o, a = /* @__PURE__ */ new Date();
|
|
171
|
+
return {
|
|
172
|
+
startDate: `${V(l)}`,
|
|
173
|
+
endDate: `${V(a)}`
|
|
174
|
+
};
|
|
175
|
+
}
|
|
176
|
+
const le = { class: "inline-flex rounded-md items-center gap-4 justify-center h-[30px] px-8 py-4 bg-fm-color-neutral-gray-100 cursor-pointer text-fm-color-neutral-gray-400" }, ae = { class: "fm-typo-en-body-md-600 select-none text-ellipsis overflow-hidden whitespace-nowrap" }, se = /* @__PURE__ */ $({
|
|
177
|
+
__name: "FmDateRangePickerChip",
|
|
178
|
+
props: {
|
|
179
|
+
modelValue: { default: (i) => i.modelValue ?? I() }
|
|
180
|
+
},
|
|
181
|
+
emits: ["update:modelValue"],
|
|
182
|
+
setup(i, { emit: o }) {
|
|
183
|
+
const l = o, a = S(I());
|
|
184
|
+
U(a, (s) => {
|
|
185
|
+
l("update:modelValue", s);
|
|
186
|
+
});
|
|
187
|
+
const n = g(() => {
|
|
188
|
+
const { startDate: s, endDate: c } = a.value;
|
|
189
|
+
return !s && !c ? "" : `${s} - ${c}`;
|
|
190
|
+
});
|
|
191
|
+
return (s, c) => {
|
|
192
|
+
const r = f("FmIcon"), e = f("FmDateRangePicker");
|
|
193
|
+
return t(), _(e, {
|
|
194
|
+
"show-predefined-range": "",
|
|
195
|
+
modelValue: a.value,
|
|
196
|
+
"onUpdate:modelValue": c[0] || (c[0] = (p) => a.value = p),
|
|
197
|
+
"start-label": "",
|
|
198
|
+
"end-label": ""
|
|
199
|
+
}, {
|
|
200
|
+
"trigger-button": C(() => [
|
|
201
|
+
m("div", le, [
|
|
202
|
+
v(r, {
|
|
203
|
+
name: "calendar_month",
|
|
204
|
+
size: "sm"
|
|
205
|
+
}),
|
|
206
|
+
m("div", ae, R(n.value), 1)
|
|
207
|
+
])
|
|
208
|
+
]),
|
|
209
|
+
_: 1
|
|
210
|
+
}, 8, ["modelValue"]);
|
|
211
|
+
};
|
|
212
|
+
}
|
|
213
|
+
}), re = { class: "xs:px-8 sm:px-8 flex gap-8 items-center xs:gap-4 xs:flex-col-reverse sm:gap-4 sm:flex-col-reverse h-48 sm:h-[unset] xs:h-[unset]" }, ce = {
|
|
214
|
+
key: 0,
|
|
215
|
+
class: "xs:w-full sm:w-full flex gap-8 items-center"
|
|
216
|
+
}, ie = { class: "flex-1 w-full flex items-center gap-4" }, ue = /* @__PURE__ */ m("div", { class: "flex-1 xs:hidden sm:hidden" }, null, -1), de = { class: "w-full max-w-[343px] xs:max-w-[unset] sm:max-w-[unset]" }, be = /* @__PURE__ */ $({
|
|
217
|
+
__name: "FmInventoryTableToolbar",
|
|
218
|
+
props: /* @__PURE__ */ Y({
|
|
219
|
+
dateRangeQuery: { type: Boolean },
|
|
220
|
+
dateRange: {},
|
|
221
|
+
changeLocation: { type: Boolean },
|
|
222
|
+
searchable: { type: Boolean },
|
|
223
|
+
search: {},
|
|
224
|
+
actions: {}
|
|
225
|
+
}, {
|
|
226
|
+
search: {},
|
|
227
|
+
searchModifiers: {},
|
|
228
|
+
dateRange: {},
|
|
229
|
+
dateRangeModifiers: {}
|
|
230
|
+
}),
|
|
231
|
+
emits: ["update:search", "update:dateRange"],
|
|
232
|
+
setup(i) {
|
|
233
|
+
const o = B(i, "search"), l = B(i, "dateRange"), { t: a } = T();
|
|
234
|
+
return (n, s) => {
|
|
235
|
+
const c = f("FmTextField"), r = f("FmButton");
|
|
236
|
+
return t(), y("div", re, [
|
|
237
|
+
n.changeLocation || n.dateRangeQuery ? (t(), y("div", ce, [
|
|
238
|
+
n.changeLocation ? (t(), _(oe, { key: 0 })) : b("", !0),
|
|
239
|
+
n.dateRangeQuery ? (t(), _(se, {
|
|
240
|
+
key: 1,
|
|
241
|
+
"model-value": l.value,
|
|
242
|
+
"onUpdate:modelValue": s[0] || (s[0] = (e) => l.value = e)
|
|
243
|
+
}, null, 8, ["model-value"])) : b("", !0)
|
|
244
|
+
])) : b("", !0),
|
|
245
|
+
m("div", ie, [
|
|
246
|
+
ue,
|
|
247
|
+
m("div", de, [
|
|
248
|
+
n.searchable ? (t(), _(c, {
|
|
249
|
+
key: 0,
|
|
250
|
+
"model-value": o.value,
|
|
251
|
+
"onUpdate:modelValue": s[1] || (s[1] = (e) => o.value = e),
|
|
252
|
+
"prepend-icon": "search",
|
|
253
|
+
placeholder: d(a)("inventory.common.table.toolbar.filterItems"),
|
|
254
|
+
class: "w-full"
|
|
255
|
+
}, null, 8, ["model-value", "placeholder"])) : b("", !0)
|
|
256
|
+
]),
|
|
257
|
+
(t(!0), y(k, null, F(n.actions, (e, p) => (t(), _(r, {
|
|
258
|
+
key: p,
|
|
259
|
+
variant: "tertiary",
|
|
260
|
+
"prepend-icon": e.icon,
|
|
261
|
+
onClick: e.onClick
|
|
262
|
+
}, null, 8, ["prepend-icon", "onClick"]))), 128))
|
|
263
|
+
])
|
|
264
|
+
]);
|
|
265
|
+
};
|
|
266
|
+
}
|
|
267
|
+
});
|
|
268
|
+
export {
|
|
269
|
+
he as _,
|
|
270
|
+
be as a,
|
|
271
|
+
ye as b,
|
|
272
|
+
I as i
|
|
273
|
+
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { defineComponent as $, ref as C, onMounted as N, watch as E, computed as f, resolveComponent as m, openBlock as v, createElementBlock as _, createElementVNode as s, createVNode as d, createTextVNode as M, toDisplayString as T, createSlots as U, withCtx as h, createBlock as I, Fragment as j, renderList as z } from "vue";
|
|
2
2
|
import { useDialogChild as q } from "@feedmepos/ui-library";
|
|
3
|
-
import { y as c } from "./app-
|
|
4
|
-
import { f as H } from "./fuzzy-
|
|
3
|
+
import { y as c } from "./app-RVyC2D4O.js";
|
|
4
|
+
import { f as H } from "./fuzzy-yzIM5KUK.js";
|
|
5
5
|
const R = { class: "flex flex-col h-[400px]" }, G = { class: "flex justify-between py-24 items-center relative" }, J = { class: "flex gap-16 basis-1/2" }, K = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, O = /* @__PURE__ */ s("span", { class: "xs:hidden" }, "selected", -1), P = /* @__PURE__ */ s("div", { class: "absolute pointer-events-none -bottom-[304px] left-0 w-full h-[308px] overflow-hidden flex flex-col justify-between" }, [
|
|
6
6
|
/* @__PURE__ */ s("div", { class: "h-1 fm-shadow-light-200" }),
|
|
7
7
|
/* @__PURE__ */ s("div", {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { defineComponent as Q, mergeModels as U, useModel as X, computed as m, ref as h, watch as j, inject as Y, resolveComponent as p, openBlock as M, createElementBlock as D, createElementVNode as i, createVNode as v, withCtx as R, renderSlot as L, withDirectives as ee, normalizeClass as te, vModelText as ne, toDisplayString as T, createCommentVNode as oe, Fragment as ae, renderList as ue, createBlock as le } from "vue";
|
|
2
|
-
import { F } from "./index-
|
|
3
|
-
import { g as C, c as se, a as k, t as ie, b as re, k as me, l as ce, u as de } from "./number-
|
|
4
|
-
import { I as w } from "./rules-
|
|
2
|
+
import { F } from "./index-l87_vggM.js";
|
|
3
|
+
import { g as C, c as se, a as k, t as ie, b as re, k as me, l as ce, u as de } from "./number-B5d98l0m.js";
|
|
4
|
+
import { I as w } from "./rules-CCwuHe8Y.js";
|
|
5
5
|
function $() {
|
|
6
6
|
return {
|
|
7
7
|
amount: F.reset()
|