@feedmepos/mf-inventory-portal 0.0.17-dev.9 → 0.0.18-dev.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ApprovalView-G-u9nPxH.js +118 -0
- package/dist/{BindingsDialog-Dw_DCOTY.js → BindingsDialog-CVeD1mOn.js} +2 -2
- package/dist/{BindingsPicker-BRLTF4Qs.js → BindingsPicker-K04aOoGr.js} +2 -2
- package/dist/BindingsTable-65aYkpX7.js +147 -0
- package/dist/FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-DgHp7KgJ.js +268 -0
- package/dist/{FmMultiselectDialog.vue_vue_type_script_setup_true_lang-YzVhmNJc.js → FmMultiselectDialog.vue_vue_type_script_setup_true_lang-C5WBLEy3.js} +2 -2
- package/dist/{FmUnitInput.vue_vue_type_script_setup_true_lang-Dv01gy7k.js → FmUnitInput.vue_vue_type_script_setup_true_lang-QKFZeZKM.js} +12 -12
- package/dist/IngredientsView-6Q2UWsu-.js +1776 -0
- package/dist/{IntegrationView-Xnl758CS.js → IntegrationView-ZMPPIopU.js} +260 -266
- package/dist/{InventoryBindingForm.vue_vue_type_script_setup_true_lang-CUj9Mnt6.js → InventoryBindingForm.vue_vue_type_script_setup_true_lang-C8YTZoBw.js} +6 -6
- package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-CW0h41FP.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-kidodonU.js} +1 -1
- package/dist/{PurchaseOrderPrintPreview-DzimxkGt.js → PurchaseOrderPrintPreview-B4uzudnC.js} +1 -1
- package/dist/ReceiveRequestView-DuHtLwZN.js +1394 -0
- package/dist/{RecipeView-B9NcEw7x.js → RecipeView-CRj0pC9N.js} +182 -190
- package/dist/StockView-CQbeZ5pU.js +1862 -0
- package/dist/SupplierView-CrfQATQf.js +796 -0
- package/dist/{TransferDetails.vue_vue_type_script_setup_true_lang-BSwsz8Xt.js → TransferDetails.vue_vue_type_script_setup_true_lang-CLUo-Tve.js} +21 -20
- package/dist/{UnitView-BvbaRHxG.js → UnitView-D1acjiRV.js} +129 -133
- package/dist/{WarehouseView-Cf5Bmfhn.js → WarehouseView-DID1G1qK.js} +260 -264
- package/dist/app-D1teOEQX.js +66113 -0
- package/dist/app.js +1 -1
- package/dist/array-AvWd53LI.js +30 -0
- package/dist/components/FmInventoryTableToolbar.vue.d.ts +53 -0
- package/dist/date2-6Vt_hnAG.js +95 -0
- package/dist/dayjs.min-Co7-8-Mb.js +282 -0
- package/dist/{decimal-S-jYTEL5.js → decimal-ziY3648r.js} +1 -1
- package/dist/extensions/array.d.ts +1 -0
- package/dist/{fuzzy-DW00BX8H.js → fuzzy-gvHXFsh0.js} +1 -1
- package/dist/{dayjs.min-M4PEyOKN.js → index-Do1KDD1S.js} +3594 -3356
- package/dist/{layout-DACHKQ9G.js → layout-BxDEsp4a.js} +1 -1
- package/dist/number-Dvvpk3SV.js +97 -0
- package/dist/{rules-ldw61cGA.js → rules-CQu9yXsg.js} +16 -15
- package/dist/stock-estimate-Wysv30cx.js +122 -0
- package/dist/{supplier-DjKC4TaM.js → supplier-BFdAYn3E.js} +1 -1
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/{use-inventory-binding-dialog-D1M09VoX.js → use-inventory-binding-dialog-CuyOzZ5r.js} +2 -2
- package/dist/views/ingredients/IngredientsView.vue.d.ts +1 -0
- package/dist/{xlsx-BcM9fWkc.js → xlsx-BG4CsaGF.js} +1 -1
- package/dist/{xlsx.util-BNXjhkYU.js → xlsx.util-BkVYceD0.js} +2 -2
- package/package.json +4 -4
- package/dist/ApprovalView-BJ_SGOrx.js +0 -134
- package/dist/BindingsTable-BMIkL0Bk.js +0 -121
- package/dist/ChangeLocationComponent.vue_vue_type_script_setup_true_lang-D9Qp3jke.js +0 -97
- package/dist/IngredientsView-DYFkUsHx.js +0 -1802
- package/dist/ReceiveRequestView-C_0jK6GY.js +0 -1435
- package/dist/SingleColumnLayout.vue_vue_type_script_setup_true_lang-Dov3Uq2z.js +0 -64
- package/dist/StockView-JPw1K8aU.js +0 -1960
- package/dist/SupplierView-CiQLFWmQ.js +0 -804
- package/dist/app-BbXzmbBO.js +0 -42892
- package/dist/components/FmTableToolbar.vue.d.ts +0 -49
- package/dist/date2-DFqSdEvG.js +0 -189
- package/dist/init-date-range-B_ha80e0.js +0 -21
- package/dist/stock-estimate-DOP1qO5w.js +0 -145
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
import { defineComponent as Z, ref as h, watch as B, computed as I, resolveComponent as ee, openBlock as D, createBlock as H, withCtx as g, createElementVNode as n, createVNode as s, unref as e, normalizeStyle as te, toDisplayString as ae, createElementBlock as oe, createCommentVNode as re, Teleport as se, mergeProps as ne } from "vue";
|
|
2
|
+
import { r as f, f as le } from "./app-D1teOEQX.js";
|
|
3
|
+
import { b as ce, _ as ie, a as pe } from "./FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-DgHp7KgJ.js";
|
|
4
|
+
import { a as ue, b as me, _ as de } from "./TransferDetails.vue_vue_type_script_setup_true_lang-CLUo-Tve.js";
|
|
5
|
+
import { c as U } from "./date2-6Vt_hnAG.js";
|
|
6
|
+
import { _ as fe, F as _, u as _e } from "./layout-BxDEsp4a.js";
|
|
7
|
+
import { useBreakpoints as ve } from "@feedmepos/ui-library";
|
|
8
|
+
const he = { class: "px-24 xs:p-0 sm:p-0 flex flex-col gap-8 max-h-full" }, De = { class: "flex flex-col py-8" }, ge = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, be = { class: "fm-typo-en-body-lg-600 text-fm-color-typo-primary line-clamp-1" }, xe = { class: "fm-typo-en-body-md-400 text-fm-color-typo-primary line-clamp-1" }, ye = {
|
|
9
|
+
key: 0,
|
|
10
|
+
class: "fm-typo-en-body-md-400 text-fm-color-typo-primary line-clamp-1"
|
|
11
|
+
}, we = { class: "pt-8" }, ze = /* @__PURE__ */ Z({
|
|
12
|
+
__name: "ApprovalView",
|
|
13
|
+
setup(Re) {
|
|
14
|
+
const o = ue("approval"), { columnDefs: G } = me("approval", o), J = le();
|
|
15
|
+
f.object({
|
|
16
|
+
name: f.string().optional().nullable(),
|
|
17
|
+
start: f.date().optional().nullable(),
|
|
18
|
+
end: f.date().optional().nullable()
|
|
19
|
+
});
|
|
20
|
+
const b = h({
|
|
21
|
+
name: "",
|
|
22
|
+
...ce()
|
|
23
|
+
}), a = h({
|
|
24
|
+
startDate: U(b.value.start ?? /* @__PURE__ */ new Date()),
|
|
25
|
+
endDate: U(b.value.end ?? /* @__PURE__ */ new Date())
|
|
26
|
+
});
|
|
27
|
+
B([() => a.value.startDate], () => {
|
|
28
|
+
if (!a.value.startDate)
|
|
29
|
+
return;
|
|
30
|
+
if (!a.value.endDate) {
|
|
31
|
+
a.value.endDate = a.value.startDate;
|
|
32
|
+
return;
|
|
33
|
+
}
|
|
34
|
+
const y = new Date(a.value.startDate);
|
|
35
|
+
if (new Date(a.value.endDate).getTime() < y.getTime()) {
|
|
36
|
+
a.value.endDate = a.value.startDate;
|
|
37
|
+
return;
|
|
38
|
+
}
|
|
39
|
+
});
|
|
40
|
+
const v = h(""), { breakpoints: x } = ve(), K = I(() => x.value.xs || x.value.sm ? 10 : 20), Q = _e();
|
|
41
|
+
return (y, l) => {
|
|
42
|
+
const W = ee("FmTable");
|
|
43
|
+
return D(), H(ie, { title: "Approval" }, {
|
|
44
|
+
default: g(() => [
|
|
45
|
+
n("div", he, [
|
|
46
|
+
s(pe, {
|
|
47
|
+
searchable: "",
|
|
48
|
+
"change-location": "",
|
|
49
|
+
search: v.value,
|
|
50
|
+
"onUpdate:search": l[0] || (l[0] = (r) => v.value = r),
|
|
51
|
+
actions: [{ icon: "refresh", onClick: e(o).fetchData }]
|
|
52
|
+
}, null, 8, ["search", "actions"]),
|
|
53
|
+
s(W, {
|
|
54
|
+
style: te(e(Q).tableHeight),
|
|
55
|
+
"column-defs": e(G),
|
|
56
|
+
"row-data": e(o).purchaseRequests.value,
|
|
57
|
+
"search-value": v.value,
|
|
58
|
+
loading: !e(J)._currentLocation || e(o).loading.value,
|
|
59
|
+
onRowClick: l[1] || (l[1] = (r) => e(o).promptShowTransferDetails(r.original.purchaseOrder, r.original)),
|
|
60
|
+
"page-size": K.value
|
|
61
|
+
}, {
|
|
62
|
+
"list-row": g((r) => [
|
|
63
|
+
s(fe, {
|
|
64
|
+
row: r,
|
|
65
|
+
onRowClick: (t) => e(o).promptShowTransferDetails(t.purchaseOrder, t)
|
|
66
|
+
}, {
|
|
67
|
+
default: g((t) => {
|
|
68
|
+
var w, R, k, c, O, S, T, C, i, F, $, p, z, u, M, V, Y, q, L, m, N, j, A, E, d, P;
|
|
69
|
+
return [
|
|
70
|
+
n("div", De, [
|
|
71
|
+
n("div", ge, [
|
|
72
|
+
s(e(_), {
|
|
73
|
+
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 = (c = t.purchaseOrder__id) == null ? void 0 : c.getContext) == null ? void 0 : O.call(c)
|
|
75
|
+
}, null, 8, ["render", "props"])
|
|
76
|
+
]),
|
|
77
|
+
n("div", be, [
|
|
78
|
+
s(e(_), {
|
|
79
|
+
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 = (i = t.to_name) == null ? void 0 : i.getContext) == null ? void 0 : F.call(i)
|
|
81
|
+
}, null, 8, ["render", "props"])
|
|
82
|
+
]),
|
|
83
|
+
n("div", xe, ae((M = (u = (z = (p = ($ = r.original.purchaseOrder) == null ? void 0 : $.items) == null ? void 0 : p.map) == null ? void 0 : z.call(p, (X) => `${X.name}`)) == null ? void 0 : u.join) == null ? void 0 : M.call(u, ", ")), 1),
|
|
84
|
+
(V = r.original.purchaseOrder) != null && V.ref ? (D(), oe("div", ye, [
|
|
85
|
+
s(e(_), {
|
|
86
|
+
render: (L = (q = (Y = t.purchaseOrder_ref) == null ? void 0 : Y.column) == null ? void 0 : q.columnDef) == null ? void 0 : L.cell,
|
|
87
|
+
props: (N = (m = t.purchaseOrder_ref) == null ? void 0 : m.getContext) == null ? void 0 : N.call(m)
|
|
88
|
+
}, null, 8, ["render", "props"])
|
|
89
|
+
])) : re("", !0),
|
|
90
|
+
n("div", we, [
|
|
91
|
+
s(e(_), {
|
|
92
|
+
render: (E = (A = (j = t.purchaseOrder_status) == null ? void 0 : j.column) == null ? void 0 : A.columnDef) == null ? void 0 : E.cell,
|
|
93
|
+
props: (P = (d = t.purchaseOrder_status) == null ? void 0 : d.getContext) == null ? void 0 : P.call(d)
|
|
94
|
+
}, null, 8, ["render", "props"])
|
|
95
|
+
])
|
|
96
|
+
])
|
|
97
|
+
];
|
|
98
|
+
}),
|
|
99
|
+
_: 2
|
|
100
|
+
}, 1032, ["row", "onRowClick"])
|
|
101
|
+
]),
|
|
102
|
+
_: 1
|
|
103
|
+
}, 8, ["style", "column-defs", "row-data", "search-value", "loading", "page-size"])
|
|
104
|
+
]),
|
|
105
|
+
(D(), H(se, { to: "body" }, [
|
|
106
|
+
s(de, ne(e(o).transferDetailsProps.value, {
|
|
107
|
+
onSubmitted: e(o).fetchData
|
|
108
|
+
}), null, 16, ["onSubmitted"])
|
|
109
|
+
]))
|
|
110
|
+
]),
|
|
111
|
+
_: 1
|
|
112
|
+
});
|
|
113
|
+
};
|
|
114
|
+
}
|
|
115
|
+
});
|
|
116
|
+
export {
|
|
117
|
+
ze as default
|
|
118
|
+
};
|
|
@@ -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-C8YTZoBw.js";
|
|
3
|
+
import { u as L, A as S } from "./app-D1teOEQX.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-C5WBLEy3.js";
|
|
3
|
+
import { u as M, A as h } from "./app-D1teOEQX.js";
|
|
4
4
|
const z = {
|
|
5
5
|
key: 0,
|
|
6
6
|
class: "flex flex-col gap-16"
|
|
@@ -0,0 +1,147 @@
|
|
|
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-D1teOEQX.js";
|
|
3
|
+
import "./index-Do1KDD1S.js";
|
|
4
|
+
import { components as F } from "@feedmepos/ui-library";
|
|
5
|
+
import "./fuzzy-gvHXFsh0.js";
|
|
6
|
+
import "./dayjs.min-Co7-8-Mb.js";
|
|
7
|
+
const P = /* @__PURE__ */ v({
|
|
8
|
+
__name: "binding-ui",
|
|
9
|
+
props: {
|
|
10
|
+
items: { default: () => [] },
|
|
11
|
+
recipes: { default: () => [] },
|
|
12
|
+
skus: { default: () => [] },
|
|
13
|
+
type: { default: "Product" },
|
|
14
|
+
editable: { type: Boolean, default: !1 }
|
|
15
|
+
},
|
|
16
|
+
emits: ["click:open-binding-dialog"],
|
|
17
|
+
setup(k, { emit: c }) {
|
|
18
|
+
const d = l({
|
|
19
|
+
isOpen: !1,
|
|
20
|
+
initialValue: [],
|
|
21
|
+
context: "",
|
|
22
|
+
name: ""
|
|
23
|
+
});
|
|
24
|
+
C("closeDialog", () => {
|
|
25
|
+
d.value.isOpen = !d.value.isOpen;
|
|
26
|
+
});
|
|
27
|
+
const o = k, m = c, r = f(() => o.items.map((e) => ({
|
|
28
|
+
key: e.key,
|
|
29
|
+
name: e.name,
|
|
30
|
+
_skuLinked: e.bindings.filter(
|
|
31
|
+
({ type: n, id: s }) => n === _.enum.SKU && o.skus.some((a) => a._id === s)
|
|
32
|
+
).length,
|
|
33
|
+
_recipeLinked: e.bindings.filter(
|
|
34
|
+
({ type: n, id: s }) => n === _.enum.RECIPE && o.recipes.some((a) => a._id === s)
|
|
35
|
+
).length,
|
|
36
|
+
onUpdate: async () => {
|
|
37
|
+
o.editable && m("click:open-binding-dialog", o.type, e);
|
|
38
|
+
}
|
|
39
|
+
}))), g = [
|
|
40
|
+
{
|
|
41
|
+
accessorKey: "name",
|
|
42
|
+
header: "Name",
|
|
43
|
+
size: "auto"
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
id: "ingredient",
|
|
47
|
+
header: "Ingredient",
|
|
48
|
+
size: 200,
|
|
49
|
+
cell(i) {
|
|
50
|
+
const e = r.value.find((s) => s.key === i.row.original.key), n = e == null ? void 0 : e._skuLinked;
|
|
51
|
+
return n === 1 ? "1 item" : n ? `${n} items` : "Not set";
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
id: "recipe",
|
|
56
|
+
header: "Recipe",
|
|
57
|
+
size: 200,
|
|
58
|
+
cell(i) {
|
|
59
|
+
const e = r.value.find((s) => s.key === i.row.original.key), n = e == null ? void 0 : e._recipeLinked;
|
|
60
|
+
return n === 1 ? "1 item" : n ? `${n} items` : "Not set";
|
|
61
|
+
}
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
id: "action",
|
|
65
|
+
header: "",
|
|
66
|
+
size: 24,
|
|
67
|
+
cell(i) {
|
|
68
|
+
const e = r.value.find((n) => n.key === i.row.original.key);
|
|
69
|
+
return z(F.FmButton, {
|
|
70
|
+
icon: "edit",
|
|
71
|
+
bgColor: "white",
|
|
72
|
+
textColor: "neutral-grey-400",
|
|
73
|
+
iconColor: "neutral-grey-400",
|
|
74
|
+
class: "text-fm-color-neutral-gray-400",
|
|
75
|
+
onClick() {
|
|
76
|
+
e == null || e.onUpdate();
|
|
77
|
+
}
|
|
78
|
+
});
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
];
|
|
82
|
+
return (i, e) => {
|
|
83
|
+
const n = b("FmTable");
|
|
84
|
+
return p(), h(n, {
|
|
85
|
+
"column-defs": g,
|
|
86
|
+
"row-data": r.value,
|
|
87
|
+
"hide-footer": "",
|
|
88
|
+
"shrink-at": 99999
|
|
89
|
+
}, null, 8, ["row-data"]);
|
|
90
|
+
};
|
|
91
|
+
}
|
|
92
|
+
}), R = {
|
|
93
|
+
key: 1,
|
|
94
|
+
class: "p-24 flex items-center justify-center gap-16"
|
|
95
|
+
}, M = /* @__PURE__ */ x("div", null, "Loading bindings table...", -1), A = /* @__PURE__ */ v({
|
|
96
|
+
__name: "BindingsTable",
|
|
97
|
+
setup(k) {
|
|
98
|
+
const c = E(), d = l(!0), o = l(new Array()), m = f(() => c.recipes), r = f(() => c.skus), g = l(""), i = L(n), e = l();
|
|
99
|
+
async function n() {
|
|
100
|
+
await c.readInventory(), e.value = i.onMessage(
|
|
101
|
+
"props:grouped-bindings",
|
|
102
|
+
(t) => {
|
|
103
|
+
d.value = !1, o.value = t;
|
|
104
|
+
}
|
|
105
|
+
), i.sendMessage("props:grouped-bindings");
|
|
106
|
+
}
|
|
107
|
+
async function s(t, u) {
|
|
108
|
+
i.sendMessage("@click:open-binding-dialog", {
|
|
109
|
+
key: t,
|
|
110
|
+
binding: u
|
|
111
|
+
});
|
|
112
|
+
}
|
|
113
|
+
const a = l();
|
|
114
|
+
return B(() => {
|
|
115
|
+
const t = a.value;
|
|
116
|
+
t && new ResizeObserver(() => {
|
|
117
|
+
i.sendMessage("resize", t.scrollHeight);
|
|
118
|
+
}).observe(t);
|
|
119
|
+
}), I(() => {
|
|
120
|
+
var t, u;
|
|
121
|
+
(u = (t = e.value) == null ? void 0 : t.removeEventListener) == null || u.call(t);
|
|
122
|
+
}), (t, u) => {
|
|
123
|
+
const w = b("FmCircularProgress");
|
|
124
|
+
return p(), y("div", {
|
|
125
|
+
class: "bg-white",
|
|
126
|
+
ref_key: "resizeableRef",
|
|
127
|
+
ref: a
|
|
128
|
+
}, [
|
|
129
|
+
d.value ? (p(), y("div", R, [
|
|
130
|
+
N(w, { size: "md" }),
|
|
131
|
+
M
|
|
132
|
+
])) : (p(), h(P, {
|
|
133
|
+
key: 0,
|
|
134
|
+
items: o.value,
|
|
135
|
+
recipes: m.value,
|
|
136
|
+
skus: r.value,
|
|
137
|
+
type: g.value,
|
|
138
|
+
editable: "",
|
|
139
|
+
"onClick:openBindingDialog": s
|
|
140
|
+
}, null, 8, ["items", "recipes", "skus", "type"]))
|
|
141
|
+
], 512);
|
|
142
|
+
};
|
|
143
|
+
}
|
|
144
|
+
});
|
|
145
|
+
export {
|
|
146
|
+
A as default
|
|
147
|
+
};
|
|
@@ -0,0 +1,268 @@
|
|
|
1
|
+
import { defineComponent as D, computed as b, resolveComponent as p, openBlock as t, createElementBlock as f, Fragment as k, createElementVNode as i, toDisplayString as M, renderList as $, createBlock as v, createCommentVNode as h, unref as y, createVNode as m, renderSlot as S, Teleport as P, ref as I, withCtx as C, watch as A, mergeModels as H, useModel as B } from "vue";
|
|
2
|
+
import { FmButtonVariant as U, useBreakpoints as Y } from "@feedmepos/ui-library";
|
|
3
|
+
import { f as z } from "./app-D1teOEQX.js";
|
|
4
|
+
import { c as L } from "./date2-6Vt_hnAG.js";
|
|
5
|
+
const Q = { class: "flex flex-col w-full bg-white h-full" }, j = { class: "flex items-center px-24 py-16 xs:p-12 sm:p-12 gap-4 h-[68px]" }, E = { class: "flex-1 fm-typo-en-title-md-800 flex items-center h-[36px] bg-white" }, W = { key: 0 }, q = { key: 1 }, G = { class: "bg-white flex-1" }, J = { class: "fixed bottom-96 right-16" }, ve = /* @__PURE__ */ D({
|
|
6
|
+
__name: "SingleColumnLayout",
|
|
7
|
+
props: {
|
|
8
|
+
actions: { default: () => [] },
|
|
9
|
+
title: { default: "Title" },
|
|
10
|
+
description: {},
|
|
11
|
+
showBackButton: { type: Boolean },
|
|
12
|
+
defaultPadding: { type: Boolean },
|
|
13
|
+
breadcrumbs: { default: () => [] }
|
|
14
|
+
},
|
|
15
|
+
emits: ["click:action"],
|
|
16
|
+
setup(r, { emit: o }) {
|
|
17
|
+
const a = r, n = o, l = b(() => a.actions.find((e) => e.isPrimary)), u = b(
|
|
18
|
+
() => a.actions.filter((e) => !e.isPrimary).map((e) => ({ ...e, variant: e.variant ?? U.Tertiary }))
|
|
19
|
+
), { breakpoints: s } = Y();
|
|
20
|
+
return (e, d) => {
|
|
21
|
+
const g = p("FmButton");
|
|
22
|
+
return t(), f(k, null, [
|
|
23
|
+
i("div", Q, [
|
|
24
|
+
i("div", j, [
|
|
25
|
+
i("div", E, M(e.title), 1),
|
|
26
|
+
u.value.length ? (t(), f("div", W, [
|
|
27
|
+
(t(!0), f(k, null, $(u.value, (_) => (t(), v(g, {
|
|
28
|
+
key: _.value,
|
|
29
|
+
label: _.label,
|
|
30
|
+
"prepend-icon": _.prependIcon,
|
|
31
|
+
variant: _.variant,
|
|
32
|
+
onClick: (w) => n("click:action", _.value)
|
|
33
|
+
}, null, 8, ["label", "prepend-icon", "variant", "onClick"]))), 128))
|
|
34
|
+
])) : h("", !0),
|
|
35
|
+
l.value && (y(s).lg || y(s).md) ? (t(), f("div", q, [
|
|
36
|
+
m(g, {
|
|
37
|
+
label: l.value.label,
|
|
38
|
+
"prepend-icon": l.value.prependIcon,
|
|
39
|
+
onClick: d[0] || (d[0] = (_) => n("click:action", l.value.value))
|
|
40
|
+
}, null, 8, ["label", "prepend-icon"])
|
|
41
|
+
])) : h("", !0)
|
|
42
|
+
]),
|
|
43
|
+
i("div", G, [
|
|
44
|
+
S(e.$slots, "default")
|
|
45
|
+
])
|
|
46
|
+
]),
|
|
47
|
+
l.value && (y(s).sm || y(s).xs) ? (t(), v(P, {
|
|
48
|
+
key: 0,
|
|
49
|
+
to: "body"
|
|
50
|
+
}, [
|
|
51
|
+
i("div", J, [
|
|
52
|
+
m(g, {
|
|
53
|
+
label: l.value.label,
|
|
54
|
+
"prepend-icon": l.value.prependIcon,
|
|
55
|
+
onClick: d[1] || (d[1] = (_) => n("click:action", l.value.value)),
|
|
56
|
+
variant: "fab"
|
|
57
|
+
}, null, 8, ["label", "prepend-icon"])
|
|
58
|
+
])
|
|
59
|
+
])) : h("", !0)
|
|
60
|
+
], 64);
|
|
61
|
+
};
|
|
62
|
+
}
|
|
63
|
+
}), K = { class: "inline-flex" }, O = { 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" }, X = { class: "fm-typo-en-body-md-600 select-none text-ellipsis overflow-hidden whitespace-nowrap" }, Z = {
|
|
64
|
+
class: "overflow-hidden overflow-y-scroll",
|
|
65
|
+
style: { maxHeight: "105px" }
|
|
66
|
+
}, ee = {
|
|
67
|
+
class: "overflow-hidden overflow-y-scroll",
|
|
68
|
+
style: { maxHeight: "105px" }
|
|
69
|
+
}, te = /* @__PURE__ */ D({
|
|
70
|
+
__name: "ChangeLocationComponent",
|
|
71
|
+
setup(r) {
|
|
72
|
+
const o = z(), a = I(""), n = b(
|
|
73
|
+
() => o.locations.map((e) => ({ label: e.name, value: e.dbName, type: e.type })).filter(
|
|
74
|
+
(e) => a.value ? e.label.toLocaleLowerCase().includes(a.value.toLocaleLowerCase()) : !0
|
|
75
|
+
)
|
|
76
|
+
), l = b(
|
|
77
|
+
() => n.value.filter((e) => e.type === "restaurant")
|
|
78
|
+
), u = b(
|
|
79
|
+
() => n.value.filter((e) => e.type === "warehouse")
|
|
80
|
+
);
|
|
81
|
+
function s({ value: e }) {
|
|
82
|
+
o.selectLocation(o.locations.find((d) => d.dbName === e));
|
|
83
|
+
}
|
|
84
|
+
return (e, d) => {
|
|
85
|
+
const g = p("FmIcon"), _ = p("FmSearch"), w = p("FmMenuDivider"), R = p("FmMenuHeader"), F = p("FmMenuItem"), N = p("FmMenu");
|
|
86
|
+
return t(), f("div", K, [
|
|
87
|
+
m(N, { "close-on-click": !0 }, {
|
|
88
|
+
"menu-button": C(() => {
|
|
89
|
+
var c;
|
|
90
|
+
return [
|
|
91
|
+
i("div", O, [
|
|
92
|
+
m(g, {
|
|
93
|
+
name: "storefront",
|
|
94
|
+
size: "sm"
|
|
95
|
+
}),
|
|
96
|
+
i("div", X, M(((c = y(o)._currentLocation) == null ? void 0 : c.name) ?? "No location selected"), 1),
|
|
97
|
+
m(g, {
|
|
98
|
+
name: "expand_more",
|
|
99
|
+
size: "sm"
|
|
100
|
+
})
|
|
101
|
+
])
|
|
102
|
+
];
|
|
103
|
+
}),
|
|
104
|
+
default: C(() => [
|
|
105
|
+
m(_, {
|
|
106
|
+
"model-value": a.value,
|
|
107
|
+
"onUpdate:modelValue": d[0] || (d[0] = (c) => a.value = c),
|
|
108
|
+
class: "w-[200px]",
|
|
109
|
+
placeholder: "Filter result"
|
|
110
|
+
}, null, 8, ["model-value"]),
|
|
111
|
+
m(w),
|
|
112
|
+
m(R, { label: "Restaurant" }),
|
|
113
|
+
m(w),
|
|
114
|
+
i("div", Z, [
|
|
115
|
+
(t(!0), f(k, null, $(l.value, (c) => {
|
|
116
|
+
var x;
|
|
117
|
+
return t(), v(F, {
|
|
118
|
+
key: c.value,
|
|
119
|
+
"model-value": ((x = y(o)._currentLocation) == null ? void 0 : x.dbName) === c.value,
|
|
120
|
+
label: c.label,
|
|
121
|
+
onClick: (T) => s(c)
|
|
122
|
+
}, null, 8, ["model-value", "label", "onClick"]);
|
|
123
|
+
}), 128))
|
|
124
|
+
]),
|
|
125
|
+
l.value.length ? h("", !0) : (t(), v(F, {
|
|
126
|
+
key: 0,
|
|
127
|
+
disabled: "",
|
|
128
|
+
label: "No result found"
|
|
129
|
+
})),
|
|
130
|
+
m(R, { label: "Warehouse" }),
|
|
131
|
+
m(w),
|
|
132
|
+
i("div", ee, [
|
|
133
|
+
(t(!0), f(k, null, $(u.value, (c) => {
|
|
134
|
+
var x;
|
|
135
|
+
return t(), v(F, {
|
|
136
|
+
key: c.value,
|
|
137
|
+
"model-value": ((x = y(o)._currentLocation) == null ? void 0 : x.dbName) === c.value,
|
|
138
|
+
label: c.label,
|
|
139
|
+
onClick: (T) => s(c)
|
|
140
|
+
}, null, 8, ["model-value", "label", "onClick"]);
|
|
141
|
+
}), 128))
|
|
142
|
+
]),
|
|
143
|
+
u.value.length ? h("", !0) : (t(), v(F, {
|
|
144
|
+
key: 1,
|
|
145
|
+
disabled: "",
|
|
146
|
+
label: "No result found"
|
|
147
|
+
}))
|
|
148
|
+
]),
|
|
149
|
+
_: 1
|
|
150
|
+
})
|
|
151
|
+
]);
|
|
152
|
+
};
|
|
153
|
+
}
|
|
154
|
+
});
|
|
155
|
+
function fe() {
|
|
156
|
+
const r = /* @__PURE__ */ new Date();
|
|
157
|
+
return r.setDate(r.getDate() - 15), {
|
|
158
|
+
start: r,
|
|
159
|
+
end: /* @__PURE__ */ new Date()
|
|
160
|
+
};
|
|
161
|
+
}
|
|
162
|
+
function V(r = 15) {
|
|
163
|
+
const o = /* @__PURE__ */ new Date();
|
|
164
|
+
o.setDate(o.getDate() - r);
|
|
165
|
+
const a = o, n = /* @__PURE__ */ new Date();
|
|
166
|
+
return {
|
|
167
|
+
startDate: `${L(a)}`,
|
|
168
|
+
endDate: `${L(n)}`
|
|
169
|
+
};
|
|
170
|
+
}
|
|
171
|
+
const ne = { 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" }, oe = { class: "fm-typo-en-body-md-600 select-none text-ellipsis overflow-hidden whitespace-nowrap" }, le = /* @__PURE__ */ D({
|
|
172
|
+
__name: "FmDateRangePickerChip",
|
|
173
|
+
props: {
|
|
174
|
+
modelValue: { default: (r) => r.modelValue ?? V() }
|
|
175
|
+
},
|
|
176
|
+
emits: ["update:modelValue"],
|
|
177
|
+
setup(r, { emit: o }) {
|
|
178
|
+
const a = o, n = I(V());
|
|
179
|
+
A(n, (u) => {
|
|
180
|
+
a("update:modelValue", u);
|
|
181
|
+
});
|
|
182
|
+
const l = b(() => {
|
|
183
|
+
const { startDate: u, endDate: s } = n.value;
|
|
184
|
+
return !u && !s ? "" : `${u} - ${s}`;
|
|
185
|
+
});
|
|
186
|
+
return (u, s) => {
|
|
187
|
+
const e = p("FmIcon"), d = p("FmDateRangePicker");
|
|
188
|
+
return t(), v(d, {
|
|
189
|
+
"show-predefined-range": "",
|
|
190
|
+
modelValue: n.value,
|
|
191
|
+
"onUpdate:modelValue": s[0] || (s[0] = (g) => n.value = g),
|
|
192
|
+
"start-label": "",
|
|
193
|
+
"end-label": ""
|
|
194
|
+
}, {
|
|
195
|
+
"trigger-button": C(() => [
|
|
196
|
+
i("div", ne, [
|
|
197
|
+
m(e, {
|
|
198
|
+
name: "calendar_month",
|
|
199
|
+
size: "sm"
|
|
200
|
+
}),
|
|
201
|
+
i("div", oe, M(l.value), 1)
|
|
202
|
+
])
|
|
203
|
+
]),
|
|
204
|
+
_: 1
|
|
205
|
+
}, 8, ["modelValue"]);
|
|
206
|
+
};
|
|
207
|
+
}
|
|
208
|
+
}), ae = { 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]" }, se = {
|
|
209
|
+
key: 0,
|
|
210
|
+
class: "xs:w-full sm:w-full flex gap-8 items-center"
|
|
211
|
+
}, re = { class: "flex-1 w-full flex items-center gap-4" }, ce = /* @__PURE__ */ i("div", { class: "flex-1 xs:hidden sm:hidden" }, null, -1), ie = { class: "w-full max-w-[343px] xs:max-w-[unset] sm:max-w-[unset]" }, _e = /* @__PURE__ */ D({
|
|
212
|
+
__name: "FmInventoryTableToolbar",
|
|
213
|
+
props: /* @__PURE__ */ H({
|
|
214
|
+
dateRangeQuery: { type: Boolean },
|
|
215
|
+
dateRange: {},
|
|
216
|
+
changeLocation: { type: Boolean },
|
|
217
|
+
searchable: { type: Boolean },
|
|
218
|
+
search: {},
|
|
219
|
+
actions: {}
|
|
220
|
+
}, {
|
|
221
|
+
search: {},
|
|
222
|
+
searchModifiers: {},
|
|
223
|
+
dateRange: {},
|
|
224
|
+
dateRangeModifiers: {}
|
|
225
|
+
}),
|
|
226
|
+
emits: ["update:search", "update:dateRange"],
|
|
227
|
+
setup(r) {
|
|
228
|
+
const o = B(r, "search"), a = B(r, "dateRange");
|
|
229
|
+
return (n, l) => {
|
|
230
|
+
const u = p("FmTextField"), s = p("FmButton");
|
|
231
|
+
return t(), f("div", ae, [
|
|
232
|
+
n.changeLocation || n.dateRangeQuery ? (t(), f("div", se, [
|
|
233
|
+
n.changeLocation ? (t(), v(te, { key: 0 })) : h("", !0),
|
|
234
|
+
n.dateRangeQuery ? (t(), v(le, {
|
|
235
|
+
key: 1,
|
|
236
|
+
"model-value": a.value,
|
|
237
|
+
"onUpdate:modelValue": l[0] || (l[0] = (e) => a.value = e)
|
|
238
|
+
}, null, 8, ["model-value"])) : h("", !0)
|
|
239
|
+
])) : h("", !0),
|
|
240
|
+
i("div", re, [
|
|
241
|
+
ce,
|
|
242
|
+
i("div", ie, [
|
|
243
|
+
n.searchable ? (t(), v(u, {
|
|
244
|
+
key: 0,
|
|
245
|
+
"model-value": o.value,
|
|
246
|
+
"onUpdate:modelValue": l[1] || (l[1] = (e) => o.value = e),
|
|
247
|
+
"prepend-icon": "search",
|
|
248
|
+
placeholder: "Filter items",
|
|
249
|
+
class: "w-full"
|
|
250
|
+
}, null, 8, ["model-value"])) : h("", !0)
|
|
251
|
+
]),
|
|
252
|
+
(t(!0), f(k, null, $(n.actions, (e, d) => (t(), v(s, {
|
|
253
|
+
key: d,
|
|
254
|
+
variant: "tertiary",
|
|
255
|
+
"prepend-icon": e.icon,
|
|
256
|
+
onClick: e.onClick
|
|
257
|
+
}, null, 8, ["prepend-icon", "onClick"]))), 128))
|
|
258
|
+
])
|
|
259
|
+
]);
|
|
260
|
+
};
|
|
261
|
+
}
|
|
262
|
+
});
|
|
263
|
+
export {
|
|
264
|
+
ve as _,
|
|
265
|
+
_e as a,
|
|
266
|
+
fe as b,
|
|
267
|
+
V as i
|
|
268
|
+
};
|
|
@@ -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-D1teOEQX.js";
|
|
4
|
+
import { f as H } from "./fuzzy-gvHXFsh0.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 "./
|
|
3
|
-
import { g as
|
|
4
|
-
import { I as
|
|
2
|
+
import { F } from "./index-Do1KDD1S.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-Dvvpk3SV.js";
|
|
4
|
+
import { I as w } from "./rules-CQu9yXsg.js";
|
|
5
5
|
function $() {
|
|
6
6
|
return {
|
|
7
7
|
amount: F.reset()
|
|
@@ -9,12 +9,12 @@ function $() {
|
|
|
9
9
|
}
|
|
10
10
|
function q() {
|
|
11
11
|
return function(d) {
|
|
12
|
-
return
|
|
12
|
+
return w()(d.amountAsString);
|
|
13
13
|
};
|
|
14
14
|
}
|
|
15
15
|
function _e(u) {
|
|
16
16
|
return function(n) {
|
|
17
|
-
return
|
|
17
|
+
return w()(n.amountAsString) !== !0 ? !0 : +n.amountAsString <= u ? `Must be more than ${u}` : !0;
|
|
18
18
|
};
|
|
19
19
|
}
|
|
20
20
|
function z(u, d = !1) {
|
|
@@ -22,8 +22,8 @@ function z(u, d = !1) {
|
|
|
22
22
|
const o = q()(r);
|
|
23
23
|
if (o != !0)
|
|
24
24
|
return d ? o : !0;
|
|
25
|
-
const b = typeof u == "number" ? u :
|
|
26
|
-
return se(+r.amountAsString).precision > b ? `Cannot exceed precision more than ${
|
|
25
|
+
const b = typeof u == "number" ? u : C(u, r.modelValue.measurement);
|
|
26
|
+
return se(+r.amountAsString).precision > b ? `Cannot exceed precision more than ${k({
|
|
27
27
|
amount: 1,
|
|
28
28
|
precision: b
|
|
29
29
|
})}` : !0;
|
|
@@ -80,13 +80,13 @@ const pe = { class: "flex flex-col" }, fe = { class: "flex flex-col" }, ve = { c
|
|
|
80
80
|
}),
|
|
81
81
|
emits: /* @__PURE__ */ U(["update:amount", "update:measurement"], ["update:modelValue"]),
|
|
82
82
|
setup(u, { emit: d }) {
|
|
83
|
-
const n = u, r = d, o = X(u, "modelValue"), b =
|
|
83
|
+
const n = u, r = d, o = X(u, "modelValue"), b = w(), N = m(() => {
|
|
84
84
|
var t;
|
|
85
|
-
return
|
|
85
|
+
return C(n.unit, (t = o.value) == null ? void 0 : t.measurement);
|
|
86
86
|
}), f = h((() => {
|
|
87
87
|
var l;
|
|
88
88
|
const e = ((l = o.value) == null ? void 0 : l.amount) ?? F.reset(), t = ce(e), a = n.formatMinimumPrecision ?? t.precision, c = de(t, a);
|
|
89
|
-
return
|
|
89
|
+
return k(c);
|
|
90
90
|
})());
|
|
91
91
|
j(f, (e) => {
|
|
92
92
|
const t = b(e), a = n.precision ?? N.value, l = typeof n.formatMinimumPrecision == "number" && n.formatMinimumPrecision > a ? n.formatMinimumPrecision : a;
|
|
@@ -131,11 +131,11 @@ const pe = { class: "flex flex-col" }, fe = { class: "flex flex-col" }, ve = { c
|
|
|
131
131
|
var _;
|
|
132
132
|
if (!n.convertAmountOnChangeUnit)
|
|
133
133
|
return;
|
|
134
|
-
const a = ((_ = o.value) == null ? void 0 : _.amount) ?? F.reset(), c = n.unit.measurements.find((B) => B.id === t) ?? null, l = n.unit.measurements.find((B) => B.id === e) ?? null, y = c ? re(a, c.conversion) : a, I = l ? me(y, l.conversion) : y, P =
|
|
134
|
+
const a = ((_ = o.value) == null ? void 0 : _.amount) ?? F.reset(), c = n.unit.measurements.find((B) => B.id === t) ?? null, l = n.unit.measurements.find((B) => B.id === e) ?? null, y = c ? re(a, c.conversion) : a, I = l ? me(y, l.conversion) : y, P = C(n.unit, l), s = F.convertPrecision({
|
|
135
135
|
value: I,
|
|
136
136
|
precision: P
|
|
137
137
|
});
|
|
138
|
-
f.value =
|
|
138
|
+
f.value = k(s);
|
|
139
139
|
});
|
|
140
140
|
const Z = m(() => {
|
|
141
141
|
var e, t;
|