@feedmepos/mf-inventory-portal 0.0.21-dev.3 → 0.0.21-dev.5

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.
Files changed (36) hide show
  1. package/dist/ApprovalView-BHoJzHuo.js +129 -0
  2. package/dist/{BindingsDialog-TLWBqVLe.js → BindingsDialog-sUZjZtSl.js} +1 -1
  3. package/dist/{BindingsPicker-CArDO6LQ.js → BindingsPicker-CqzSUVc_.js} +1 -1
  4. package/dist/{BindingsTable-CVBhfcWm.js → BindingsTable-C1o5EgLy.js} +1 -1
  5. package/dist/FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-CpN5Kn8b.js +374 -0
  6. package/dist/{IngredientsView-Sld49F2i.js → IngredientsView-CrXPIQme.js} +100 -92
  7. package/dist/IntegrationView-BJT-KMVp.js +1141 -0
  8. package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-BcDiOeBk.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-DH0CcGmX.js} +1 -1
  9. package/dist/{PremiumBadge.vue_vue_type_script_setup_true_lang-DVQozd4y.js → PremiumBadge.vue_vue_type_script_setup_true_lang-kJKVCH40.js} +1 -1
  10. package/dist/{PurchaseOrderPrintPreview-D0Rnf43J.js → PurchaseOrderPrintPreview-k26o__vy.js} +1 -1
  11. package/dist/ReceiveRequestView-ysOzzBTW.js +216 -0
  12. package/dist/{RecipeView-ppyuFTCK.js → RecipeView-DAH8YIzY.js} +182 -174
  13. package/dist/{StockView-CoDH6Yf_.js → StockView-BlCpuSLe.js} +564 -556
  14. package/dist/{SupplierView-D9pKF63i.js → SupplierView-Bwknjcke.js} +263 -255
  15. package/dist/TableActionableRow.vue_vue_type_script_setup_true_lang-DlNJ6kRg.js +135 -0
  16. package/dist/{TransferDetails.vue_vue_type_script_setup_true_lang-ELF9eLeq.js → TransferDetails.vue_vue_type_script_setup_true_lang-LCNiBfi7.js} +4 -4
  17. package/dist/{TransferDialog.vue_vue_type_script_setup_true_lang-BbcRP-G_.js → TransferDialog.vue_vue_type_script_setup_true_lang-BDvtif2q.js} +5 -5
  18. package/dist/{TransferTemplateView-DMkSlBvQ.js → TransferTemplateView-DcMdNiH6.js} +370 -362
  19. package/dist/{UnitView-DV4WP6eO.js → UnitView-BVMr4KlR.js} +186 -178
  20. package/dist/{WarehouseView-DwbO0UGj.js → WarehouseView-Dd-e-IlG.js} +388 -380
  21. package/dist/{app-Bt8YzxIk.js → app-S6iG6Hux.js} +2531 -2541
  22. package/dist/app.js +3 -3
  23. package/dist/{decimal-SucbZ9G4.js → decimal-nOOdFIFP.js} +1 -1
  24. package/dist/{id-to-date-B81eSX7L.js → id-to-date-CKQ0n3Qi.js} +1 -1
  25. package/dist/{purchase-order-transaction-type-CuGdiH6i.js → purchase-order-transaction-type-CQ-RpJ0h.js} +3 -3
  26. package/dist/stores/layout.d.ts +3 -0
  27. package/dist/{supplier-CMS9fSlT.js → supplier-DQsAfn3q.js} +1 -1
  28. package/dist/tsconfig.app.tsbuildinfo +1 -1
  29. package/dist/{xlsx-BKyJT0L0.js → xlsx-Dgjf-KvE.js} +1 -1
  30. package/dist/{xlsx.util-bHyU3BvF.js → xlsx.util-CODYzgF8.js} +2 -2
  31. package/package.json +4 -4
  32. package/dist/ApprovalView-DE6af6Jx.js +0 -121
  33. package/dist/FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-BCI1_Jqi.js +0 -308
  34. package/dist/IntegrationView-C9lcGzjf.js +0 -1172
  35. package/dist/ReceiveRequestView-CyWq3rxP.js +0 -208
  36. package/dist/layout-B2j73HnF.js +0 -151
@@ -1,208 +0,0 @@
1
- import { defineComponent as ie, ref as R, watch as L, computed as J, resolveComponent as ce, openBlock as b, createBlock as k, unref as e, withCtx as C, createElementVNode as u, createVNode as c, normalizeStyle as le, toDisplayString as ue, createElementBlock as me, createCommentVNode as de, Teleport as pe, mergeProps as Q } from "vue";
2
- import { Y as h, j as fe, o as G, a as Z, G as ve, Z as _e, b as ye } from "./app-Bt8YzxIk.js";
3
- import { i as W, _ as ge, a as De } from "./FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-BCI1_Jqi.js";
4
- import { u as be } from "./purchase-order-transaction-type-CuGdiH6i.js";
5
- import { u as he, _ as xe, g as Se } from "./TransferDetails.vue_vue_type_script_setup_true_lang-ELF9eLeq.js";
6
- import { i as Re, e as ke } from "./id-to-date-B81eSX7L.js";
7
- import { useSnackbar as Ce, useBreakpoints as qe } from "@feedmepos/ui-library";
8
- import { _ as we } from "./TransferDialog.vue_vue_type_script_setup_true_lang-BbcRP-G_.js";
9
- import { _ as Te, F as x, u as Fe } from "./layout-B2j73HnF.js";
10
- import "./array-ClJzD_Lt.js";
11
- import { useI18n as Oe } from "@feedmepos/mf-common";
12
- const Ye = { class: "px-24 xs:p-0 sm:p-0 flex flex-col gap-8 max-h-full" }, Ee = { class: "flex flex-col py-8" }, Me = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Pe = { class: "fm-typo-en-body-lg-600 text-fm-color-typo-primary line-clamp-1" }, Ue = { class: "fm-typo-en-body-md-400 text-fm-color-typo-primary line-clamp-1" }, $e = {
13
- key: 0,
14
- class: "fm-typo-en-body-md-400 text-fm-color-typo-primary line-clamp-1"
15
- }, Ne = { class: "pt-8" }, X = "ReceiveRequestViewSearchCriteria", Xe = /* @__PURE__ */ ie({
16
- __name: "ReceiveRequestView",
17
- setup(je) {
18
- const { t: m } = Oe(), B = Ce();
19
- h.object({
20
- name: h.string().optional().nullable(),
21
- startDate: h.string().optional().nullable(),
22
- endDate: h.string().optional().nullable()
23
- });
24
- const q = _e(), w = ye();
25
- function I() {
26
- const o = {
27
- name: "",
28
- ...W()
29
- }, r = q.getItem(X);
30
- if (!r)
31
- return o;
32
- try {
33
- return JSON.parse(r);
34
- } catch {
35
- return o;
36
- }
37
- }
38
- function T() {
39
- q.setItem(X, JSON.stringify(i.value));
40
- }
41
- const i = R(I()), a = be("receive/request", i.value), { columnDefs: ee } = he("receive/request", a), F = fe();
42
- async function te() {
43
- const o = `inventory-record_${G(i.value.startDate).format("DD-MM-YYYY_HH-mm")}-${G(i.value.endDate).format("DD-MM-YYYY_HH-mm")}.xlsx`, r = a.purchaseOrders.value.flatMap(
44
- (n) => n.items.map((t) => {
45
- const s = new Date(Re(n._id) ?? ""), p = n.effectiveAt ? new Date(n.effectiveAt) : void 0, f = Z(
46
- Se(t.sku, n.deliveryOrder || [])
47
- ), v = Z(t.quantity);
48
- return {
49
- "SKU code": t.code,
50
- "SKU name": t.name,
51
- "PO #": n.seqNumber,
52
- "Effective at": p,
53
- Date: s,
54
- Status: n.status,
55
- Reference: n.ref ?? "",
56
- "Received quantity": f,
57
- "Ordered quantity": v,
58
- Unit: t.sku.unit.abbrev,
59
- "Total cost": t.totalCost ? ve(t.totalCost) : null
60
- };
61
- })
62
- ), l = [
63
- "SKU code",
64
- "SKU name",
65
- "PO #",
66
- "Date",
67
- "Status",
68
- "Reference",
69
- "Received quantity",
70
- "Ordered quantity",
71
- "Unit"
72
- ];
73
- w.enableBackdatePo && l.insert("Effective at", 4), w.enableTotalCost && l.push("Total cost"), await ke(
74
- [
75
- {
76
- name: "purchases",
77
- data: r,
78
- columns: l
79
- }
80
- ],
81
- o
82
- ), B.open({
83
- title: m("inventory.transfer.receiveRequest.export.success"),
84
- message: m("inventory.transfer.receiveRequest.export.message", [o]),
85
- type: "success"
86
- });
87
- }
88
- const S = R(W()), d = R("");
89
- L([() => S.value], ([o]) => {
90
- !o.startDate || !o.endDate || (i.value.startDate = o.startDate, i.value.endDate = o.endDate, a.updateDateRange(
91
- i.value.startDate,
92
- i.value.endDate
93
- ), T());
94
- }), L([() => d.value], () => {
95
- T();
96
- });
97
- function ae(o) {
98
- o === "create" && a.promptCreateTransferDialog();
99
- }
100
- const { breakpoints: O } = qe(), oe = J(() => O.value.xs || O.value.sm ? 10 : 20), re = Fe(), ne = J(() => [
101
- {
102
- icon: "refresh",
103
- onClick: a.fetchData
104
- },
105
- {
106
- icon: "ios_share",
107
- onClick: te
108
- }
109
- ]);
110
- return (o, r) => {
111
- const l = ce("FmTable");
112
- return b(), k(ge, {
113
- title: e(m)("inventory.transfer.receiveRequest.title2"),
114
- actions: [
115
- {
116
- label: e(m)("inventory.transfer.receiveRequest.actions.create"),
117
- value: "create",
118
- isPrimary: !0,
119
- prependIcon: "add"
120
- }
121
- ],
122
- "onClick:action": ae
123
- }, {
124
- default: C(() => {
125
- var n;
126
- return [
127
- u("div", Ye, [
128
- c(De, {
129
- "date-range-query": "",
130
- "date-range": S.value,
131
- "onUpdate:dateRange": r[0] || (r[0] = (t) => S.value = t),
132
- searchable: "",
133
- "change-location": "",
134
- search: d.value,
135
- "onUpdate:search": r[1] || (r[1] = (t) => d.value = t),
136
- actions: ne.value
137
- }, null, 8, ["date-range", "search", "actions"]),
138
- (b(), k(l, {
139
- style: le(e(re).tableHeight),
140
- "column-defs": e(ee),
141
- "row-data": e(a).purchaseOrders.value,
142
- "search-value": d.value,
143
- loading: !e(F)._currentLocation || e(a).loading.value,
144
- onRowClick: r[2] || (r[2] = (t) => e(a).promptShowTransferDetails(t.original)),
145
- key: (n = e(F)._currentLocation) == null ? void 0 : n.dbName,
146
- "page-size": oe.value
147
- }, {
148
- "list-row": C((t) => [
149
- c(Te, {
150
- row: t,
151
- onRowClick: e(a).promptShowTransferDetails
152
- }, {
153
- default: C((s) => {
154
- var p, f, v, _, Y, E, M, P, y, U, $, N, j, g, A, H, V, K, D, z;
155
- return [
156
- u("div", Ee, [
157
- u("div", Me, [
158
- c(e(x), {
159
- render: (v = (f = (p = s._id) == null ? void 0 : p.column) == null ? void 0 : f.columnDef) == null ? void 0 : v.cell,
160
- props: (Y = (_ = s._id) == null ? void 0 : _.getContext) == null ? void 0 : Y.call(_)
161
- }, null, 8, ["render", "props"])
162
- ]),
163
- u("div", Pe, [
164
- c(e(x), {
165
- render: (P = (M = (E = s.supplier_name) == null ? void 0 : E.column) == null ? void 0 : M.columnDef) == null ? void 0 : P.cell,
166
- props: (U = (y = s.supplier_name) == null ? void 0 : y.getContext) == null ? void 0 : U.call(y)
167
- }, null, 8, ["render", "props"])
168
- ]),
169
- u("div", Ue, ue(t.original.items.map((se) => `${se.name}`).join(", ")), 1),
170
- t.original.ref ? (b(), me("div", $e, [
171
- c(e(x), {
172
- render: (j = (N = ($ = s.ref) == null ? void 0 : $.column) == null ? void 0 : N.columnDef) == null ? void 0 : j.cell,
173
- props: (A = (g = s.ref) == null ? void 0 : g.getContext) == null ? void 0 : A.call(g)
174
- }, null, 8, ["render", "props"])
175
- ])) : de("", !0),
176
- u("div", Ne, [
177
- c(e(x), {
178
- render: (K = (V = (H = s.status) == null ? void 0 : H.column) == null ? void 0 : V.columnDef) == null ? void 0 : K.cell,
179
- props: (z = (D = s.status) == null ? void 0 : D.getContext) == null ? void 0 : z.call(D)
180
- }, null, 8, ["render", "props"])
181
- ])
182
- ])
183
- ];
184
- }),
185
- _: 2
186
- }, 1032, ["row", "onRowClick"])
187
- ]),
188
- _: 1
189
- }, 8, ["style", "column-defs", "row-data", "search-value", "loading", "page-size"]))
190
- ]),
191
- (b(), k(pe, { to: "body" }, [
192
- c(we, Q(e(a).transferDialogProps.value, {
193
- onSubmitted: e(a).fetchData
194
- }), null, 16, ["onSubmitted"]),
195
- c(xe, Q(e(a).transferDetailsProps.value, {
196
- onSubmitted: e(a).fetchData
197
- }), null, 16, ["onSubmitted"])
198
- ]))
199
- ];
200
- }),
201
- _: 1
202
- }, 8, ["title", "actions"]);
203
- };
204
- }
205
- });
206
- export {
207
- Xe as default
208
- };
@@ -1,151 +0,0 @@
1
- import { useI18n as R } from "@feedmepos/mf-common";
2
- import { components as I, useBreakpoints as B } from "@feedmepos/ui-library";
3
- import { h as s, defineComponent as F, computed as M, openBlock as a, createBlock as V, resolveDynamicComponent as x, unref as p, normalizeClass as z, withCtx as D, createElementVNode as c, renderSlot as L, normalizeProps as N, guardReactiveProps as P, createElementBlock as m, Fragment as k, renderList as _, createVNode as b, createCommentVNode as w } from "vue";
4
- import { aj as j } from "./app-Bt8YzxIk.js";
5
- const { FmMenu: E, FmButton: S, FmMenuItem: $ } = I;
6
- function U(o, r) {
7
- return s(
8
- E,
9
- {
10
- trigger: "click",
11
- stopClickPropagation: !0
12
- },
13
- {
14
- "menu-button": () => s(S, {
15
- type: "button",
16
- variant: "tertiary",
17
- icon: "more_vert",
18
- iconColor: "#000000",
19
- size: "md"
20
- }),
21
- default: () => s(
22
- "div",
23
- {
24
- style: {
25
- backgroundColor: "white",
26
- padding: "4px",
27
- width: "160px"
28
- }
29
- },
30
- o.map(({ translationKey: l, color: e, value: t }) => {
31
- const { t: u } = R(), n = u(l);
32
- return s(
33
- $,
34
- {
35
- onClick() {
36
- r(t ?? n);
37
- }
38
- },
39
- {
40
- label: () => s(
41
- "span",
42
- {
43
- class: e
44
- },
45
- n
46
- )
47
- }
48
- );
49
- })
50
- )
51
- }
52
- );
53
- }
54
- /**
55
- * vue-table
56
- *
57
- * Copyright (c) TanStack
58
- *
59
- * This source code is licensed under the MIT license found in the
60
- * LICENSE.md file in the root directory of this source tree.
61
- *
62
- * @license MIT
63
- */
64
- const y = F({
65
- props: ["render", "props"],
66
- setup: (o) => () => typeof o.render == "function" || typeof o.render == "object" ? s(o.render, o.props) : o.render
67
- }), A = { class: "flex gap-4 w-full" }, H = { class: "flex-1" }, T = { class: "flex flex-col" }, q = { key: 0 }, G = { key: 0 }, W = /* @__PURE__ */ F({
68
- __name: "TableActionableRow",
69
- props: {
70
- row: {},
71
- onRowClick: {},
72
- actionColumnId: { default: "action" }
73
- },
74
- setup(o) {
75
- const r = o, l = M(
76
- () => r.row.getVisibleCells().reduce(
77
- (e, t) => (e[t.column.id] = t, e),
78
- {}
79
- )
80
- );
81
- return (e, t) => (a(), V(x(e.onRowClick ? p(I).FmListItem : "div"), {
82
- class: z([
83
- "w-full border-b border-fm-color-neutral-gray-100",
84
- {
85
- "bg-fm-color-neutral-gray-100": e.row.getIsSelected(),
86
- "cursor-pointer": typeof e.onRowClick == "function"
87
- }
88
- ]),
89
- onClick: t[0] || (t[0] = (u) => {
90
- var n;
91
- return (n = e.onRowClick) == null ? void 0 : n.call(e, e.row.original);
92
- })
93
- }, {
94
- default: D(() => {
95
- var u, n, f, d, C;
96
- return [
97
- c("div", A, [
98
- c("div", H, [
99
- L(e.$slots, "default", N(P(l.value)), () => [
100
- c("div", T, [
101
- (a(!0), m(k, null, _(r.row.getVisibleCells(), (i) => {
102
- var g, v, h;
103
- return a(), m(k, {
104
- key: i.id
105
- }, [
106
- i.column.id !== e.actionColumnId ? (a(), m("div", q, [
107
- b(p(y), {
108
- render: (v = (g = i.column) == null ? void 0 : g.columnDef) == null ? void 0 : v.cell,
109
- props: (h = i.getContext) == null ? void 0 : h.call(i)
110
- }, null, 8, ["render", "props"])
111
- ])) : w("", !0)
112
- ], 64);
113
- }), 128))
114
- ])
115
- ])
116
- ]),
117
- l.value[e.actionColumnId ?? ""] ? (a(), m("div", G, [
118
- c("div", null, [
119
- b(p(y), {
120
- render: (f = (n = (u = l.value[e.actionColumnId ?? ""]) == null ? void 0 : u.column) == null ? void 0 : n.columnDef) == null ? void 0 : f.cell,
121
- props: (C = (d = l.value[e.actionColumnId ?? ""]) == null ? void 0 : d.getContext) == null ? void 0 : C.call(d)
122
- }, null, 8, ["render", "props"])
123
- ])
124
- ])) : w("", !0)
125
- ])
126
- ];
127
- }),
128
- _: 3
129
- }, 8, ["class"]));
130
- }
131
- });
132
- function X() {
133
- return {
134
- get tableHeight() {
135
- const o = j(), { breakpoints: r } = B();
136
- return o.isIframeMode ? r.value.xs || r.value.sm ? {
137
- height: "calc(100dvh - 180px)"
138
- } : {
139
- height: "calc(100dvh - 124px)"
140
- } : {
141
- height: "calc(100dvh - 180px)"
142
- };
143
- }
144
- };
145
- }
146
- export {
147
- y as F,
148
- W as _,
149
- U as c,
150
- X as u
151
- };