@feedmepos/mf-inventory-portal 0.0.21-dev.4 → 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 (32) hide show
  1. package/dist/ApprovalView-BHoJzHuo.js +129 -0
  2. package/dist/{BindingsDialog-BFLeun5L.js → BindingsDialog-sUZjZtSl.js} +1 -1
  3. package/dist/{BindingsPicker-CnjJZH9t.js → BindingsPicker-CqzSUVc_.js} +1 -1
  4. package/dist/{BindingsTable-C3VTa0YL.js → BindingsTable-C1o5EgLy.js} +1 -1
  5. package/dist/{FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-DYBTXD_J.js → FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-CpN5Kn8b.js} +1 -1
  6. package/dist/{IngredientsView-CQYJfAze.js → IngredientsView-CrXPIQme.js} +99 -91
  7. package/dist/IntegrationView-BJT-KMVp.js +1141 -0
  8. package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-Wv8RvXJL.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-DH0CcGmX.js} +1 -1
  9. package/dist/{PremiumBadge.vue_vue_type_script_setup_true_lang-DsOGlAb7.js → PremiumBadge.vue_vue_type_script_setup_true_lang-kJKVCH40.js} +1 -1
  10. package/dist/{PurchaseOrderPrintPreview-B0hDduXB.js → PurchaseOrderPrintPreview-k26o__vy.js} +1 -1
  11. package/dist/ReceiveRequestView-ysOzzBTW.js +216 -0
  12. package/dist/{RecipeView-DYKhSgtw.js → RecipeView-DAH8YIzY.js} +182 -174
  13. package/dist/{StockView-BIGGG87A.js → StockView-BlCpuSLe.js} +547 -539
  14. package/dist/{SupplierView-DQzopnzt.js → SupplierView-Bwknjcke.js} +263 -255
  15. package/dist/{TransferDetails.vue_vue_type_script_setup_true_lang-D8-sMRGm.js → TransferDetails.vue_vue_type_script_setup_true_lang-LCNiBfi7.js} +3 -3
  16. package/dist/{TransferDialog.vue_vue_type_script_setup_true_lang-CSUnXAyq.js → TransferDialog.vue_vue_type_script_setup_true_lang-BDvtif2q.js} +4 -4
  17. package/dist/{TransferTemplateView-DWF54okN.js → TransferTemplateView-DcMdNiH6.js} +372 -364
  18. package/dist/{UnitView-Cdw8xxzV.js → UnitView-BVMr4KlR.js} +186 -178
  19. package/dist/{WarehouseView-DOelxuIh.js → WarehouseView-Dd-e-IlG.js} +388 -380
  20. package/dist/{app-SBnQEeEV.js → app-S6iG6Hux.js} +4 -4
  21. package/dist/app.js +1 -1
  22. package/dist/{decimal-BlEB2PrM.js → decimal-nOOdFIFP.js} +1 -1
  23. package/dist/{id-to-date-Y6berpHs.js → id-to-date-CKQ0n3Qi.js} +1 -1
  24. package/dist/{purchase-order-transaction-type-Dp0wsGal.js → purchase-order-transaction-type-CQ-RpJ0h.js} +2 -2
  25. package/dist/{supplier-I_rYvljH.js → supplier-DQsAfn3q.js} +1 -1
  26. package/dist/tsconfig.app.tsbuildinfo +1 -1
  27. package/dist/{xlsx-DGwG2ekM.js → xlsx-Dgjf-KvE.js} +1 -1
  28. package/dist/{xlsx.util-Dsf-EgrG.js → xlsx.util-CODYzgF8.js} +2 -2
  29. package/package.json +3 -3
  30. package/dist/ApprovalView-BS4jzhAR.js +0 -121
  31. package/dist/IntegrationView-9V2OcyP_.js +0 -1172
  32. package/dist/ReceiveRequestView-3boFHkOO.js +0 -208
@@ -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-SBnQEeEV.js";
3
- import { i as W, u as ge, _ as De, a as be } from "./FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-DYBTXD_J.js";
4
- import { u as he } from "./purchase-order-transaction-type-Dp0wsGal.js";
5
- import { u as xe, _ as Se, g as Re } from "./TransferDetails.vue_vue_type_script_setup_true_lang-D8-sMRGm.js";
6
- import { i as ke, e as Ce } from "./id-to-date-Y6berpHs.js";
7
- import { useSnackbar as qe, useBreakpoints as we } from "@feedmepos/ui-library";
8
- import { _ as Te } from "./TransferDialog.vue_vue_type_script_setup_true_lang-CSUnXAyq.js";
9
- import { _ as Fe, F as x } from "./TableActionableRow.vue_vue_type_script_setup_true_lang-DlNJ6kRg.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 = qe();
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 = he("receive/request", i.value), { columnDefs: ee } = xe("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(ke(n._id) ?? ""), p = n.effectiveAt ? new Date(n.effectiveAt) : void 0, f = Z(
46
- Re(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 Ce(
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 } = we(), oe = J(() => O.value.xs || O.value.sm ? 10 : 20), re = ge(), 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(De, {
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(be, {
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(Fe, {
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(Te, Q(e(a).transferDialogProps.value, {
193
- onSubmitted: e(a).fetchData
194
- }), null, 16, ["onSubmitted"]),
195
- c(Se, 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
- };