@feedmepos/mf-inventory-portal 1.0.15 → 1.0.16

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 (64) hide show
  1. package/dist/{App-C3CozprL.js → App-DLe8MywH.js} +2 -2
  2. package/dist/ApprovalView-mxcrI7Ws.js +213 -0
  3. package/dist/{BindingsDialog-Bpz50HNN.js → BindingsDialog-Cps5iMAS.js} +2 -2
  4. package/dist/{BindingsPicker-Bn_AeQgi.js → BindingsPicker-BnY2nyRk.js} +1 -1
  5. package/dist/{BindingsTable-DbXcWHFr.js → BindingsTable-Crqc1Toy.js} +1 -1
  6. package/dist/{ClosingDraftView-CtjmDt_3.js → ClosingDraftView-xzxcHsG2.js} +62 -62
  7. package/dist/{ClosingTemplateView-DGhiOQKV.js → ClosingTemplateView-BDzluWjL.js} +33 -33
  8. package/dist/{DeliveryOrderPrintPreview-RLxr5493.js → DeliveryOrderPrintPreview-CoFsVj7v.js} +1 -1
  9. package/dist/{FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-DFo822rl.js → FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-DYywd7de.js} +18 -18
  10. package/dist/{FmMultiselectDialog-eYRcZtpG.js → FmMultiselectDialog-yBek9I71.js} +1 -1
  11. package/dist/{FmUnitInput.vue_vue_type_script_setup_true_lang-BeuzTVMU.js → FmUnitInput.vue_vue_type_script_setup_true_lang-DBw8E-lP.js} +29 -29
  12. package/dist/{IngredientBindedItem.vue_vue_type_script_setup_true_lang-8YL1bcbX.js → IngredientBindedItem.vue_vue_type_script_setup_true_lang-CyQVlLJN.js} +1 -1
  13. package/dist/IngredientGroupView-B1VuTznd.js +977 -0
  14. package/dist/IngredientsView-D9owzWAW.js +1815 -0
  15. package/dist/{IntegrationView-ouRoofv-.js → IntegrationView-m5khiLP9.js} +944 -929
  16. package/dist/{InventoryBindingForm-Ckd1ejCy.js → InventoryBindingForm-CC4BIA2x.js} +1 -1
  17. package/dist/{InventoryBindingForm.vue_vue_type_script_setup_true_lang-jyZOAbC4.js → InventoryBindingForm.vue_vue_type_script_setup_true_lang-BuY0gbH-.js} +74 -74
  18. package/dist/{InventoryBindingSummary-bWJGU_aJ.js → InventoryBindingSummary-DwRj2rIK.js} +1 -1
  19. package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-DzNsASpl.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-0uTRGWlr.js} +1 -1
  20. package/dist/{PremiumBadge.vue_vue_type_script_setup_true_lang-BDJKZKEb.js → PremiumBadge.vue_vue_type_script_setup_true_lang-DVL1yxig.js} +17 -17
  21. package/dist/{PublishView-BZ4KDOXj.js → PublishView-wqdT_Xcc.js} +17 -17
  22. package/dist/{PurchaseOrderPrintPreview-D3k_iE_g.js → PurchaseOrderPrintPreview-BO7y_wR8.js} +4 -4
  23. package/dist/ReceiveRequestView-Bdps6Tkn.js +2578 -0
  24. package/dist/{RecipeView-Bd6sUyIs.js → RecipeView-DXM3yob3.js} +4 -4
  25. package/dist/{StockView-OzyancyU.js → StockView-D2mRUzX_.js} +108 -108
  26. package/dist/{SupplierView-CISKbPt4.js → SupplierView-BgmS_v_I.js} +37 -37
  27. package/dist/TransferDetails.vue_vue_type_script_setup_true_lang-BYmOYkyh.js +2090 -0
  28. package/dist/{TransferTemplateView-ChzJXcmY.js → TransferTemplateView-CFR_HCmC.js} +129 -129
  29. package/dist/{UnitView-DJhbTYuL.js → UnitView-BvCl-BQQ.js} +28 -28
  30. package/dist/{WarehouseView-DMmKu55g.js → WarehouseView-5-1UF6-S.js} +26 -26
  31. package/dist/api/inventory.d.ts +172 -90
  32. package/dist/api/purchase-order.d.ts +1 -1
  33. package/dist/{app-DH_9BxTV.js → app-qbG0y7FC.js} +33920 -25668
  34. package/dist/app.d.ts +2 -0
  35. package/dist/app.js +5 -5
  36. package/dist/components/FmInventoryTableToolbar.vue.d.ts +36 -0
  37. package/dist/{decimal-DIu_KwVY.js → decimal-BYXpoIsD.js} +1 -1
  38. package/dist/{feature--DGNlqpD.js → feature-DC--7NYs.js} +1864 -973
  39. package/dist/{format-unit-display-SC1gTkmH.js → format-unit-display-C3tB-dzm.js} +23 -23
  40. package/dist/helper/rules.d.ts +1 -1
  41. package/dist/{index-BOIjEdh_.js → index-CP5BcGNL.js} +1 -1
  42. package/dist/{index-CGv_EB2B.js → index-DkptV8zS.js} +4 -4
  43. package/dist/{stock-DjgYdrCF.js → stock-B-x8xRA7.js} +1 -1
  44. package/dist/stores/inventory.d.ts +213 -1
  45. package/dist/{supplier-7UeUXm4V.js → supplier-h4yTBgES.js} +2 -2
  46. package/dist/tsconfig.app.tsbuildinfo +1 -1
  47. package/dist/{use-ingredient-select-dialog-wUHt2JMF.js → use-ingredient-select-dialog-DSYWRwcn.js} +5 -5
  48. package/dist/{use-inventory-binding-dialog-DKa-OW8J.js → use-inventory-binding-dialog-CEZ8ISmT.js} +1 -1
  49. package/dist/views/ingredient-group/components/ingredient-group-rule-field/IngredientGroupRuleField.vue.d.ts +4 -0
  50. package/dist/views/ingredient-group/composables/use-ingredient-group-rule-item.d.ts +5 -0
  51. package/dist/views/ingredient-group/composables/use-ingredient-group-table.d.ts +12 -0
  52. package/dist/views/receive-request/components/transfer-details/usePurchaseOrderFn.d.ts +1 -0
  53. package/dist/views/receive-request/components/transfer-form/TransferForm.vue.d.ts +4 -4
  54. package/dist/views/receive-request/composables/use-process-purchase-order.d.ts +6 -2
  55. package/dist/views/receive-request/composables/use-receive-request-form.d.ts +6 -6
  56. package/dist/views/receive-request/composables/use-receive-request-table.d.ts +6 -6
  57. package/dist/views/receive-request/constants/po-action-to-ui-style.d.ts +1 -0
  58. package/dist/{vue-i18n-s7h3HEbZ.js → vue-i18n-C68epl1Q.js} +261 -261
  59. package/package.json +2 -2
  60. package/dist/ApprovalView-CYk_URDo.js +0 -147
  61. package/dist/IngredientGroupView-tVXqOREY.js +0 -8779
  62. package/dist/IngredientsView-BIIZ5_Aa.js +0 -1749
  63. package/dist/ReceiveRequestView-CWkYnZ68.js +0 -2518
  64. package/dist/TransferDetails.vue_vue_type_script_setup_true_lang-DrviJ7wX.js +0 -1951
@@ -1,8 +1,8 @@
1
1
  import { ref as U, onUnmounted as F, defineComponent as h, watch as P, onMounted as w, computed as R, resolveComponent as I, openBlock as S, createElementBlock as b, unref as v, createVNode as _, createElementVNode as p, toDisplayString as G, createBlock as x, createCommentVNode as k } from "vue";
2
- import { u as M, a as D, b as H, R as e, g as s, c as W } from "./app-DH_9BxTV.js";
2
+ import { u as M, a as D, b as H, R as e, g as s, c as W } from "./app-qbG0y7FC.js";
3
3
  import { useCoreStore as A, useI18n as B } from "@feedmepos/mf-common";
4
4
  import { useRouter as L, useRoute as K } from "vue-router";
5
- import { u as O } from "./feature--DGNlqpD.js";
5
+ import { u as O } from "./feature-DC--7NYs.js";
6
6
  import { u as $ } from "./useTabStorage-BkIVScW_.js";
7
7
  import { u as Q } from "./googlemap-Dm8ERVai.js";
8
8
  import "./array-Ca8T3f_G.js";
@@ -0,0 +1,213 @@
1
+ import { defineComponent as le, ref as D, watch as ue, computed as d, resolveComponent as ie, openBlock as x, createBlock as W, unref as n, withCtx as k, createElementVNode as i, normalizeClass as ce, createVNode as u, normalizeStyle as pe, toDisplayString as de, createElementBlock as me, createCommentVNode as fe, Teleport as ve, mergeProps as he } from "vue";
2
+ import { u as _e, b as ge, aA as b, aL as ye, ad as X, z as De, N as be, H as Oe, _ as Re, B as Se, C as xe, E as O } from "./app-qbG0y7FC.js";
3
+ import { a as ke, P as q, b as qe, _ as we } from "./TransferDetails.vue_vue_type_script_setup_true_lang-BYmOYkyh.js";
4
+ import { useBreakpoints as Pe } from "@feedmepos/ui-library";
5
+ import { useI18n as Ne } from "@feedmepos/mf-common";
6
+ const Te = { class: "flex flex-col py-8" }, Ae = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Ce = { class: "fm-typo-en-body-lg-600 text-fm-color-typo-primary line-clamp-1" }, Le = { class: "fm-typo-en-body-md-400 text-fm-color-typo-primary line-clamp-1" }, Ve = {
7
+ key: 0,
8
+ class: "fm-typo-en-body-md-400 text-fm-color-typo-primary line-clamp-1"
9
+ }, ze = { class: "pt-8" }, Ue = /* @__PURE__ */ le({
10
+ __name: "ApprovalView",
11
+ setup(Me) {
12
+ const s = ke(q.APPROVAL), { columnDefs: Z } = qe(q.APPROVAL, s), B = _e(), I = ge();
13
+ b.object({
14
+ name: b.string().optional().nullable(),
15
+ start: b.date().optional().nullable(),
16
+ end: b.date().optional().nullable()
17
+ });
18
+ const w = D({
19
+ name: "",
20
+ ...ye()
21
+ }), o = D({
22
+ startDate: X(w.value.start ?? /* @__PURE__ */ new Date()),
23
+ endDate: X(w.value.end ?? /* @__PURE__ */ new Date())
24
+ });
25
+ ue([() => o.value.startDate], () => {
26
+ if (!o.value.startDate)
27
+ return;
28
+ if (!o.value.endDate) {
29
+ o.value.endDate = o.value.startDate;
30
+ return;
31
+ }
32
+ const l = new Date(o.value.startDate);
33
+ if (new Date(o.value.endDate).getTime() < l.getTime()) {
34
+ o.value.endDate = o.value.startDate;
35
+ return;
36
+ }
37
+ s.updateDateRange(o.value.startDate, o.value.endDate);
38
+ });
39
+ const R = D(""), { breakpoints: P } = Pe(), S = d(() => P.value.xs || P.value.sm), ee = d(() => S.value ? 10 : 20), te = De(), { t: N } = Ne(), ae = d(() => [
40
+ {
41
+ label: N("inventory.common.refresh"),
42
+ value: "refresh"
43
+ }
44
+ ]);
45
+ function re(l) {
46
+ switch (l) {
47
+ case "refresh":
48
+ return s.fetchData();
49
+ }
50
+ }
51
+ const se = d(() => {
52
+ const l = [
53
+ {
54
+ type: "string",
55
+ key: "status",
56
+ entity: "purchaseOrderRequest",
57
+ values: Array.from(
58
+ new Set(
59
+ s.purchaseRequests.value.map((t) => {
60
+ var e;
61
+ return ((e = t.purchaseOrder) == null ? void 0 : e.status) ?? "";
62
+ }).filter((t) => t !== "")
63
+ )
64
+ )
65
+ }
66
+ ], r = [
67
+ {
68
+ type: "string",
69
+ key: "netsuiteTransactionNumber",
70
+ entity: "purchaseOrderRequest",
71
+ values: s.purchaseRequests.value.map((t) => {
72
+ var e, a;
73
+ return (a = (e = t.netSuite) == null ? void 0 : e.additionalInfo) == null ? void 0 : a.transactionnumber;
74
+ }).filter((t) => t != null)
75
+ },
76
+ {
77
+ type: "string",
78
+ key: "netsuiteOrderNo",
79
+ entity: "purchaseOrderRequest",
80
+ values: s.purchaseRequests.value.map((t) => {
81
+ var e;
82
+ return (e = t.netSuite) == null ? void 0 : e.refNo;
83
+ }).filter((t) => t != null)
84
+ },
85
+ {
86
+ type: "string",
87
+ key: "netsuiteOrderId",
88
+ entity: "purchaseOrderRequest",
89
+ values: s.purchaseRequests.value.map((t) => {
90
+ var e;
91
+ return (e = t.netSuite) == null ? void 0 : e.id;
92
+ }).filter((t) => t != null)
93
+ }
94
+ ];
95
+ return [...l, ...I.isEnabled ? r : []];
96
+ }), m = D(null), ne = d(() => {
97
+ if (!m.value)
98
+ return s.purchaseRequests.value;
99
+ const l = be.build(m.value);
100
+ return s.purchaseRequests.value.filter((r) => {
101
+ var t, e, a, c, p;
102
+ return Oe(
103
+ {
104
+ netsuiteTransactionNumber: (e = (t = r.netSuite) == null ? void 0 : t.additionalInfo) == null ? void 0 : e.transactionnumber,
105
+ netsuiteOrderNo: (a = r.netSuite) == null ? void 0 : a.refNo,
106
+ netsuiteOrderId: (c = r.netSuite) == null ? void 0 : c.id,
107
+ status: (p = r.purchaseOrder) == null ? void 0 : p.status
108
+ },
109
+ l
110
+ );
111
+ });
112
+ });
113
+ return (l, r) => {
114
+ const t = ie("FmTable");
115
+ return x(), W(Re, {
116
+ title: n(N)("inventory.transfer.approval.title"),
117
+ actions: ae.value,
118
+ "onClick:action": re
119
+ }, {
120
+ default: k(() => [
121
+ i("div", {
122
+ class: ce([
123
+ "flex flex-col gap-8 max-h-full",
124
+ {
125
+ "p-0": S.value,
126
+ "px-24 ": !S.value
127
+ }
128
+ ])
129
+ }, [
130
+ u(Se, {
131
+ "date-range-query": "",
132
+ "date-range": o.value,
133
+ "onUpdate:dateRange": r[0] || (r[0] = (e) => o.value = e),
134
+ searchable: "",
135
+ "change-location": "",
136
+ search: R.value,
137
+ "onUpdate:search": r[1] || (r[1] = (e) => R.value = e),
138
+ filterable: "",
139
+ "filter-attributes": se.value,
140
+ filter: m.value,
141
+ "onUpdate:filter": r[2] || (r[2] = (e) => m.value = e)
142
+ }, null, 8, ["date-range", "search", "filter-attributes", "filter"]),
143
+ u(t, {
144
+ style: pe(n(te).tableHeight),
145
+ "column-defs": n(Z),
146
+ "row-data": ne.value,
147
+ "search-value": R.value,
148
+ loading: !n(B)._currentLocation || n(s).loading.value,
149
+ onRowClick: r[3] || (r[3] = (e) => n(s).promptShowTransferDetails(
150
+ e.original.purchaseOrder,
151
+ e.original
152
+ )),
153
+ "page-size": ee.value
154
+ }, {
155
+ "list-row": k((e) => [
156
+ u(xe, {
157
+ row: e,
158
+ onRowClick: (a) => n(s).promptShowTransferDetails(a.purchaseOrder, a)
159
+ }, {
160
+ default: k((a) => {
161
+ var c, p, T, f, A, C, L, V, v, z, M, h, E, _, F, $, H, Y, U, g, j, G, J, K, y, Q;
162
+ return [
163
+ i("div", Te, [
164
+ i("div", Ae, [
165
+ u(n(O), {
166
+ render: (T = (p = (c = a.purchaseOrder__id) == null ? void 0 : c.column) == null ? void 0 : p.columnDef) == null ? void 0 : T.cell,
167
+ props: (A = (f = a.purchaseOrder__id) == null ? void 0 : f.getContext) == null ? void 0 : A.call(f)
168
+ }, null, 8, ["render", "props"])
169
+ ]),
170
+ i("div", Ce, [
171
+ u(n(O), {
172
+ render: (V = (L = (C = a.to_name) == null ? void 0 : C.column) == null ? void 0 : L.columnDef) == null ? void 0 : V.cell,
173
+ props: (z = (v = a.to_name) == null ? void 0 : v.getContext) == null ? void 0 : z.call(v)
174
+ }, null, 8, ["render", "props"])
175
+ ]),
176
+ i("div", Le, de((F = (_ = (E = (h = (M = e.original.purchaseOrder) == null ? void 0 : M.items) == null ? void 0 : h.map) == null ? void 0 : E.call(h, (oe) => `${oe.name}`)) == null ? void 0 : _.join) == null ? void 0 : F.call(_, ", ")), 1),
177
+ ($ = e.original.purchaseOrder) != null && $.ref ? (x(), me("div", Ve, [
178
+ u(n(O), {
179
+ render: (U = (Y = (H = a.purchaseOrder_ref) == null ? void 0 : H.column) == null ? void 0 : Y.columnDef) == null ? void 0 : U.cell,
180
+ props: (j = (g = a.purchaseOrder_ref) == null ? void 0 : g.getContext) == null ? void 0 : j.call(g)
181
+ }, null, 8, ["render", "props"])
182
+ ])) : fe("", !0),
183
+ i("div", ze, [
184
+ u(n(O), {
185
+ render: (K = (J = (G = a.purchaseOrder_status) == null ? void 0 : G.column) == null ? void 0 : J.columnDef) == null ? void 0 : K.cell,
186
+ props: (Q = (y = a.purchaseOrder_status) == null ? void 0 : y.getContext) == null ? void 0 : Q.call(y)
187
+ }, null, 8, ["render", "props"])
188
+ ])
189
+ ])
190
+ ];
191
+ }),
192
+ _: 2
193
+ }, 1032, ["row", "onRowClick"])
194
+ ]),
195
+ _: 1
196
+ }, 8, ["style", "column-defs", "row-data", "search-value", "loading", "page-size"])
197
+ ], 2),
198
+ (x(), W(ve, { to: "body" }, [
199
+ u(we, he({
200
+ scope: n(q).APPROVAL
201
+ }, n(s).transferDetailsProps.value, {
202
+ onSubmitted: n(s).fetchData
203
+ }), null, 16, ["scope", "onSubmitted"])
204
+ ]))
205
+ ]),
206
+ _: 1
207
+ }, 8, ["title", "actions"]);
208
+ };
209
+ }
210
+ });
211
+ export {
212
+ Ue as default
213
+ };
@@ -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-jyZOAbC4.js";
3
- import { a as L, b6 as S } from "./app-DH_9BxTV.js";
2
+ import { _ as V } from "./InventoryBindingForm.vue_vue_type_script_setup_true_lang-BuY0gbH-.js";
3
+ import { a as L, bb as S } from "./app-qbG0y7FC.js";
4
4
  const U = {
5
5
  key: 0,
6
6
  class: "flex justify-end gap-8 items-center"
@@ -1,5 +1,5 @@
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 { a as M, b6 as x, X as z } from "./app-DH_9BxTV.js";
2
+ import { a as M, bb as x, a1 as z } from "./app-qbG0y7FC.js";
3
3
  const F = {
4
4
  key: 0,
5
5
  class: "flex flex-col gap-16"
@@ -1,5 +1,5 @@
1
1
  import { defineComponent as x, ref as r, provide as C, computed as g, resolveComponent as h, openBlock as l, createElementBlock as u, createStaticVNode as F, Fragment as L, renderList as I, createElementVNode as p, toDisplayString as v, createVNode as w, withModifiers as N, onMounted as E, onUnmounted as z, createBlock as M } from "vue";
2
- import { F as b, a as P, b6 as R } from "./app-DH_9BxTV.js";
2
+ import { F as b, a as P, bb as R } from "./app-qbG0y7FC.js";
3
3
  import "@feedmepos/ui-library";
4
4
  import "@feedmepos/mf-common";
5
5
  const U = { class: "" }, D = ["onClick"], O = { class: "flex-grow-0 flex-shrink-0 basis-5/12 py-8 pl-8" }, V = { class: "flex-grow-0 flex-shrink-0 basis-3/12 py-8" }, S = { class: "flex-grow-0 flex-shrink-0 basis-3/12 py-8" }, $ = { class: "flex-grow-0 flex-shrink-0 basis-1/12 py-4" }, T = /* @__PURE__ */ x({
@@ -1,9 +1,9 @@
1
- import { defineComponent as $e, ref as z, onMounted as Ie, computed as H, resolveComponent as I, openBlock as x, createElementBlock as T, Fragment as K, createTextVNode as pe, createBlock as J, withCtx as O, createElementVNode as o, toDisplayString as V, unref as h, createVNode as w, createCommentVNode as Z, h as F, reactive as Ze, watch as Je, isRef as Ue, normalizeClass as ve, renderList as he, normalizeStyle as He, Teleport as Qe, mergeProps as Xe } from "vue";
2
- import { Y as et, u as je, a8 as tt, af as at, ag as G, l as nt, H as Be, i as E, t as ot, K as De, q as st, r as rt, s as lt, ah as Ee, ai as Le, a3 as ze, aj as ne, a9 as ct, ae, V as Ne, D as Me, h as ke, f as it, e as ut, a as dt, z as mt, _ as ft, B as pt, C as vt, E as we } from "./app-DH_9BxTV.js";
1
+ import { defineComponent as $e, ref as z, onMounted as Ie, computed as E, resolveComponent as I, openBlock as x, createElementBlock as T, Fragment as K, createTextVNode as pe, createBlock as Q, withCtx as O, createElementVNode as o, toDisplayString as V, unref as h, createVNode as w, createCommentVNode as Z, h as F, reactive as Ze, watch as Qe, isRef as Ue, normalizeClass as ve, renderList as he, normalizeStyle as Ee, Teleport as Je, mergeProps as Xe } from "vue";
2
+ import { a2 as et, u as je, ad as tt, ak as at, al as G, l as nt, O as Be, i as H, t as ot, Q as De, q as st, r as rt, s as lt, am as He, an as Le, a8 as ze, ao as ne, ae as ct, aj as ae, $ as Ne, D as Me, h as ke, f as it, e as ut, a as dt, z as mt, _ as ft, B as pt, C as vt, E as we } from "./app-qbG0y7FC.js";
3
3
  import { useCoreStore as yt, useI18n as Ve } from "@feedmepos/mf-common";
4
4
  import { useSnackbar as Te, useDialog as gt, useProxiedModel as bt, components as fe, useBreakpoints as ht } from "@feedmepos/ui-library";
5
5
  import { defineStore as Oe, storeToRefs as Dt } from "pinia";
6
- import { a as Ye, u as Ke } from "./stock-DjgYdrCF.js";
6
+ import { a as Ye, u as Ke } from "./stock-B-x8xRA7.js";
7
7
  import { E as xt } from "./empty-placeholder-wf6-BWE8.js";
8
8
  const Fe = et((n, s) => {
9
9
  function e() {
@@ -49,7 +49,7 @@ const Fe = et((n, s) => {
49
49
  }
50
50
  M.value = !0;
51
51
  });
52
- const y = H({
52
+ const y = E({
53
53
  get() {
54
54
  return v.value === null ? "" : tt(v.value);
55
55
  },
@@ -60,7 +60,7 @@ const Fe = et((n, s) => {
60
60
  } else
61
61
  v.value = null;
62
62
  }
63
- }), j = H({
63
+ }), j = E({
64
64
  get() {
65
65
  return v.value === null ? "" : at(v.value);
66
66
  },
@@ -100,7 +100,7 @@ const Fe = et((n, s) => {
100
100
  }
101
101
  return (k, g) => {
102
102
  const l = I("FmLabel"), d = I("FmDatePicker"), m = I("FmTimePicker"), b = I("FmTextField"), _ = I("FmButton"), L = I("FmForm");
103
- return M.value ? (x(), J(L, {
103
+ return M.value ? (x(), Q(L, {
104
104
  key: 1,
105
105
  onValidationSuccess: U,
106
106
  class: "flex flex-col gap-32",
@@ -166,13 +166,13 @@ function Ge(n) {
166
166
  const s = n.measurementsAmounts.groupBy((i) => i.measurement.id), e = n.sku.unit.measurements.reduce((i, u) => {
167
167
  var M, y;
168
168
  const A = ((y = (M = s.get(u.id)) == null ? void 0 : M[0]) == null ? void 0 : y.amount) ?? Ct, v = Be(u.conversion, A);
169
- return i + +E(v);
170
- }, +E(n.baseAmount));
169
+ return i + +H(v);
170
+ }, +H(n.baseAmount));
171
171
  return ot(e, n.baseAmount.precision);
172
172
  }
173
173
  const St = De(0), jt = De(100);
174
174
  function Ft(n, s, e) {
175
- const i = Ge(n), u = Ee(i, s), A = s.amount === 0 ? null : Le(u, {
175
+ const i = Ge(n), u = He(i, s), A = s.amount === 0 ? null : Le(u, {
176
176
  ...s,
177
177
  amount: Math.abs(s.amount)
178
178
  }), v = A ? Be(A, jt) : null;
@@ -180,17 +180,17 @@ function Ft(n, s, e) {
180
180
  code: n.sku.code,
181
181
  name: n.sku.name,
182
182
  baseUnit: n.sku.unit.abbrev,
183
- baseUnitAmount: +E(n.baseAmount),
183
+ baseUnitAmount: +H(n.baseAmount),
184
184
  ...n.measurementsAmounts.filter(
185
185
  (y) => $t(y.measurement) && e.includes(y.measurement.id)
186
186
  ).reduce(
187
- (y, j, U) => (y[`measurementAbbrev${U}`] = `(${j.measurement.abbrev}) × ${E(j.measurement.conversion)}`, y[`measurementAmount${U}`] = +E(j.amount), y),
187
+ (y, j, U) => (y[`measurementAbbrev${U}`] = `(${j.measurement.abbrev}) × ${H(j.measurement.conversion)}`, y[`measurementAmount${U}`] = +H(j.amount), y),
188
188
  {}
189
189
  ),
190
- systemBalance: +E(s),
191
- physicalBalance: +E(i),
192
- adjustedAmount: +E(u),
193
- adjustedDiffPercentage: v ? +E(ze(v, 2)) : null
190
+ systemBalance: +H(s),
191
+ physicalBalance: +H(i),
192
+ adjustedAmount: +H(u),
193
+ adjustedDiffPercentage: v ? +H(ze(v, 2)) : null
194
194
  };
195
195
  }
196
196
  function $t(n) {
@@ -265,8 +265,8 @@ function Rt(n, s) {
265
265
  ($) => $.balance
266
266
  ), i = [...n.items, ...n.negativeStockItems ?? []], u = qe(i), A = i.map(($) => {
267
267
  var X, se;
268
- const Q = ((X = e.get($.sku._id)) == null ? void 0 : X[0]) ?? St, oe = ((se = u == null ? void 0 : u.get($.sku._id)) == null ? void 0 : se[0]) ?? [];
269
- return Ft($, Q, oe);
268
+ const J = ((X = e.get($.sku._id)) == null ? void 0 : X[0]) ?? St, oe = ((se = u == null ? void 0 : u.get($.sku._id)) == null ? void 0 : se[0]) ?? [];
269
+ return Ft($, J, oe);
270
270
  }), v = Bt(i), y = yt().currentBusiness.value, j = Tt(v), U = [
271
271
  ["Business name:", y == null ? void 0 : y.name],
272
272
  ["Business ID:", y == null ? void 0 : y._id],
@@ -290,7 +290,7 @@ function Rt(n, s) {
290
290
  ],
291
291
  [],
292
292
  j.map(($) => $.name),
293
- ...A.map(($) => j.map((Q) => $[Q.id]))
293
+ ...A.map(($) => j.map((J) => $[J.id]))
294
294
  ], k = j.map(($) => `system:${$.id}`), g = st(U, k), l = `[${y == null ? void 0 : y.name}] closing draft (${rt(new Date(n.updatedAt))}).xlsx`;
295
295
  return lt(g, l), l;
296
296
  }
@@ -588,7 +588,7 @@ const Mt = Oe(
588
588
  updateDraftRef: j
589
589
  };
590
590
  }
591
- ), Pt = { class: "w-full flex flex-col gap-32" }, It = { class: "flex justify-between" }, Ut = { class: "flex" }, Ht = { class: "grid grid-cols-[repeat(4,1fr)] xs:flex xs:flex-col sm:flex sm:flex-col gap-8" }, Et = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Lt = { class: "flex gap-1" }, zt = { class: "fm-typo-en-body-lg-600" }, Nt = { class: "flex flex-col gap-16" }, Vt = { class: "flex items-center" }, Ot = {
591
+ ), Pt = { class: "w-full flex flex-col gap-32" }, It = { class: "flex justify-between" }, Ut = { class: "flex" }, Et = { class: "grid grid-cols-[repeat(4,1fr)] xs:flex xs:flex-col sm:flex sm:flex-col gap-8" }, Ht = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Lt = { class: "flex gap-1" }, zt = { class: "fm-typo-en-body-lg-600" }, Nt = { class: "flex flex-col gap-16" }, Vt = { class: "flex items-center" }, Ot = {
592
592
  key: 0,
593
593
  class: "flex gap-8"
594
594
  }, Yt = {
@@ -603,7 +603,7 @@ const Mt = Oe(
603
603
  }, Zt = {
604
604
  key: 0,
605
605
  class: "flex flex-col items-center gap-8 h-full"
606
- }, Jt = ["src"], Qt = {
606
+ }, Qt = ["src"], Jt = {
607
607
  key: 1,
608
608
  class: "px-4 flex flex-col"
609
609
  }, Xt = { class: "flex gap-12 content-stretch" }, ea = {
@@ -626,29 +626,29 @@ const Mt = Oe(
626
626
  },
627
627
  emits: ["submitted", "refresh"],
628
628
  setup(n, { emit: s }) {
629
- const e = n, i = Ke(), u = Se(), A = bt(e, "show"), v = z(!1), M = z(!1), y = z(!1), j = z(new Array()), U = Ye(), k = Fe(), g = Te(), l = dt(), d = je(), m = Ze({}), b = H(() => new Set(
629
+ const e = n, i = Ke(), u = Se(), A = bt(e, "show"), v = z(!1), M = z(!1), y = z(!1), j = z(new Array()), U = Ye(), k = Fe(), g = Te(), l = dt(), d = je(), m = Ze({}), b = E(() => new Set(
630
630
  l.skus.filter((a) => {
631
631
  var t;
632
632
  return m[(t = a.customAttributes) == null ? void 0 : t.tag];
633
633
  }).map((a) => a._id)
634
- )), _ = s, L = H(() => {
634
+ )), _ = s, L = E(() => {
635
635
  var t, r;
636
636
  const a = [...((t = e.draft) == null ? void 0 : t.items) ?? [], ...((r = e.draft) == null ? void 0 : r.negativeStockItems) ?? []];
637
637
  return b.value.size ? a.filter((f) => b.value.has(f.sku._id)) : a;
638
- }), D = H(() => {
638
+ }), D = E(() => {
639
639
  const a = L.value.map((t) => t.sku);
640
640
  return a.sort((t, r) => t.code.localeCompare(r.code)), a;
641
- }), P = H(() => L.value.groupBy(
641
+ }), P = E(() => L.value.groupBy(
642
642
  (t) => t.sku._id,
643
643
  (t) => t.measurementsAmounts.filter((r) => !r.measurement.abbrev.toLocaleLowerCase().includes("inactive")).map((r) => r.measurement.id)
644
644
  ));
645
- Ie(oe), Je(
645
+ Ie(oe), Qe(
646
646
  () => e.show,
647
647
  (a) => {
648
648
  a && (q.value = ue[0], oe());
649
649
  }
650
650
  );
651
- const $ = De(0), Q = De(100);
651
+ const $ = De(0), J = De(100);
652
652
  async function oe() {
653
653
  var t, r, f;
654
654
  if (!d._currentLocation) return;
@@ -729,12 +729,12 @@ const Mt = Oe(
729
729
  M.value = !1;
730
730
  }
731
731
  }
732
- const se = H(
732
+ const se = E(
733
733
  () => j.value.groupBy(
734
734
  (a) => a.id,
735
735
  (a) => a.balance
736
736
  )
737
- ), xe = H(() => L.value.groupBy((a) => a.sku._id));
737
+ ), xe = E(() => L.value.groupBy((a) => a.sku._id));
738
738
  function le(a) {
739
739
  return F(
740
740
  fe.FmTooltip,
@@ -749,7 +749,7 @@ const Mt = Oe(
749
749
  }
750
750
  );
751
751
  }
752
- const ye = H(() => {
752
+ const ye = E(() => {
753
753
  const a = D.value.reduce((r, f) => {
754
754
  var c, p;
755
755
  return Math.max(r, ((p = (c = P.value) == null ? void 0 : c.get(f._id)) == null ? void 0 : p[0].length) ?? 0);
@@ -924,7 +924,7 @@ const Mt = Oe(
924
924
  }
925
925
  }
926
926
  ];
927
- }), ce = H(() => ye.value.map((a) => a.size ?? 0).reduce((a, t) => a + t)), ie = z(""), ge = H(() => D.value.map((a) => {
927
+ }), ce = E(() => ye.value.map((a) => a.size ?? 0).reduce((a, t) => a + t)), ie = z(""), ge = E(() => D.value.map((a) => {
928
928
  var B, de;
929
929
  const t = (B = xe.value.get(a._id)) == null ? void 0 : B[0], r = ((de = se.value.get(a._id)) == null ? void 0 : de[0]) ?? $;
930
930
  if (!t)
@@ -933,30 +933,30 @@ const Mt = Oe(
933
933
  name: a.name,
934
934
  baseUnit: a.unit.abbrev,
935
935
  baseUnitAmount: 0,
936
- systemBalance: +E(r),
936
+ systemBalance: +H(r),
937
937
  physicalBalance: 0,
938
- adjustedAmount: -+E(r),
938
+ adjustedAmount: -+H(r),
939
939
  adjustedDiffPercentage: -100
940
940
  };
941
- const f = Ge(t), c = Ee(f, r), p = r.amount === 0 ? null : Le(c, {
941
+ const f = Ge(t), c = He(f, r), p = r.amount === 0 ? null : Le(c, {
942
942
  ...r,
943
943
  amount: Math.abs(r.amount)
944
- }), R = p ? Be(p, Q) : null;
944
+ }), R = p ? Be(p, J) : null;
945
945
  return {
946
946
  code: a.code,
947
947
  name: a.name,
948
948
  baseUnit: a.unit.abbrev,
949
- baseUnitAmount: +E(t.baseAmount),
949
+ baseUnitAmount: +H(t.baseAmount),
950
950
  ...t.measurementsAmounts.filter((te) => {
951
951
  var W, re, _e;
952
952
  return (_e = (re = (W = P.value) == null ? void 0 : W.get(a._id)) == null ? void 0 : re[0]) == null ? void 0 : _e.includes(te.measurement.id);
953
- }).reduce((te, W, re) => (te[`measurementAbbrev${re}`] = `(${W.measurement.abbrev}) × ${E(W.measurement.conversion)}`, te[`measurementAmount${re}`] = +E(W.amount), te), {}),
954
- systemBalance: +E(r),
955
- physicalBalance: +E(f),
956
- adjustedAmount: +E(c),
957
- adjustedDiffPercentage: R ? +E(ze(R, 2)) : null
953
+ }).reduce((te, W, re) => (te[`measurementAbbrev${re}`] = `(${W.measurement.abbrev}) × ${H(W.measurement.conversion)}`, te[`measurementAmount${re}`] = +H(W.amount), te), {}),
954
+ systemBalance: +H(r),
955
+ physicalBalance: +H(f),
956
+ adjustedAmount: +H(c),
957
+ adjustedDiffPercentage: R ? +H(ze(R, 2)) : null
958
958
  };
959
- })), Ae = H(() => {
959
+ })), Ae = E(() => {
960
960
  var t, r, f;
961
961
  if (!e.draft) return [];
962
962
  const a = e.draft.approvedAt ? {
@@ -1021,7 +1021,7 @@ const Mt = Oe(
1021
1021
  label: "Action history",
1022
1022
  value: "history"
1023
1023
  }
1024
- ], q = z(ue[0]), ee = H(() => {
1024
+ ], q = z(ue[0]), ee = E(() => {
1025
1025
  var t, r, f, c;
1026
1026
  return [
1027
1027
  ...(((t = e.draft) == null ? void 0 : t.rejectionHistory) ?? []).map(
@@ -1057,7 +1057,7 @@ const Mt = Oe(
1057
1057
  }
1058
1058
  ] : []
1059
1059
  ];
1060
- }), be = H(() => {
1060
+ }), be = E(() => {
1061
1061
  var c, p, R, S;
1062
1062
  if ((c = e == null ? void 0 : e.draft) != null && c.approvedAt) return "Draft is already approved.";
1063
1063
  if (((p = e.draft) == null ? void 0 : p.status) !== ne.enum.DRAFT) return "Status is not draft.";
@@ -1069,7 +1069,7 @@ const Mt = Oe(
1069
1069
  });
1070
1070
  return (a, t) => {
1071
1071
  const r = I("FmButtonGroup"), f = I("FmMenuDivider"), c = I("FmCard"), p = I("FmButton"), R = I("FmCircularProgress"), S = I("FmTextField"), B = I("FmIcon"), de = I("FmChip"), te = I("FmTable"), W = I("FmSpacer"), re = I("FmTooltip"), _e = I("FmSideSheet");
1072
- return x(), J(_e, {
1072
+ return x(), Q(_e, {
1073
1073
  "dismiss-away": "",
1074
1074
  "max-width": 9999,
1075
1075
  "model-value": h(A),
@@ -1081,7 +1081,7 @@ const Mt = Oe(
1081
1081
  return [
1082
1082
  o("div", fa, [
1083
1083
  ((C = e.draft) == null ? void 0 : C.status) === h(ne).enum.DRAFT ? (x(), T(K, { key: 0 }, [
1084
- be.value ? (x(), J(re, {
1084
+ be.value ? (x(), Q(re, {
1085
1085
  key: 0,
1086
1086
  "z-index": 51
1087
1087
  }, {
@@ -1097,19 +1097,19 @@ const Mt = Oe(
1097
1097
  })
1098
1098
  ]),
1099
1099
  _: 1
1100
- })) : (x(), J(p, {
1100
+ })) : (x(), Q(p, {
1101
1101
  key: "approve key",
1102
1102
  label: "Approve",
1103
1103
  onClick: t[4] || (t[4] = () => e.draft && h(u).approveDraft(e.draft, () => _("submitted")))
1104
1104
  }))
1105
1105
  ], 64)) : Z("", !0),
1106
- ((N = e.draft) == null ? void 0 : N.status) === h(ne).enum.DRAFT ? (x(), J(p, {
1106
+ ((N = e.draft) == null ? void 0 : N.status) === h(ne).enum.DRAFT ? (x(), Q(p, {
1107
1107
  key: 1,
1108
1108
  label: "Reject",
1109
1109
  variant: "destructive",
1110
1110
  onClick: t[5] || (t[5] = () => e.draft && h(u).rejectDraft(e.draft, () => _("submitted")))
1111
1111
  })) : Z("", !0),
1112
- (Y = e.draft) != null && Y.approvedAt && ((me = e.draft) == null ? void 0 : me.status) !== h(ne).enum.COMPLETED ? (x(), J(p, {
1112
+ (Y = e.draft) != null && Y.approvedAt && ((me = e.draft) == null ? void 0 : me.status) !== h(ne).enum.COMPLETED ? (x(), Q(p, {
1113
1113
  key: 2,
1114
1114
  label: "Sync",
1115
1115
  loading: y.value,
@@ -1153,12 +1153,12 @@ const Mt = Oe(
1153
1153
  ])
1154
1154
  ]),
1155
1155
  w(f),
1156
- o("div", Ht, [
1156
+ o("div", Et, [
1157
1157
  (x(!0), T(K, null, he(Ae.value, (Y, me) => (x(), T("div", {
1158
1158
  class: "flex flex-col gap-4",
1159
1159
  key: me
1160
1160
  }, [
1161
- o("div", Et, [
1161
+ o("div", Ht, [
1162
1162
  o("div", Lt, V(Y.label), 1)
1163
1163
  ]),
1164
1164
  o("div", zt, V(Y.value), 1)
@@ -1172,7 +1172,7 @@ const Mt = Oe(
1172
1172
  o("div", Vt, [
1173
1173
  t[10] || (t[10] = o("div", { class: "flex-1 fm-typo-en-title-sm-600 text-fm-color-typo-primary" }, " Closing items ", -1)),
1174
1174
  v.value ? Z("", !0) : (x(), T("div", Ot, [
1175
- a.draft && a.draft.status !== h(ne).enum.COMPLETED ? (x(), J(p, {
1175
+ a.draft && a.draft.status !== h(ne).enum.COMPLETED ? (x(), Q(p, {
1176
1176
  key: 0,
1177
1177
  label: "Refresh balance",
1178
1178
  "prepend-icon": "refresh",
@@ -1212,7 +1212,7 @@ const Mt = Oe(
1212
1212
  }, null, 8, ["modelValue"])
1213
1213
  ]),
1214
1214
  h(l).skuTags.size ? (x(), T("div", Gt, [
1215
- (x(!0), T(K, null, he(h(l).skuTags.keys(), (C) => (x(), J(de, {
1215
+ (x(!0), T(K, null, he(h(l).skuTags.keys(), (C) => (x(), Q(de, {
1216
1216
  key: `${C}`,
1217
1217
  label: `${C}`,
1218
1218
  selectable: "",
@@ -1220,7 +1220,7 @@ const Mt = Oe(
1220
1220
  onClick: (N) => m[`${C}`] = !m[`${C}`]
1221
1221
  }, {
1222
1222
  default: O(() => [
1223
- m[`${C}`] ? (x(), J(B, {
1223
+ m[`${C}`] ? (x(), Q(B, {
1224
1224
  key: 0,
1225
1225
  name: "check",
1226
1226
  class: "text-white",
@@ -1241,7 +1241,7 @@ const Mt = Oe(
1241
1241
  ])) : Z("", !0),
1242
1242
  o("div", qt, [
1243
1243
  o("div", {
1244
- style: He({ minWidth: `${ce.value}px` })
1244
+ style: Ee({ minWidth: `${ce.value}px` })
1245
1245
  }, [
1246
1246
  w(te, {
1247
1247
  "column-defs": ye.value,
@@ -1254,7 +1254,7 @@ const Mt = Oe(
1254
1254
  ])
1255
1255
  ], 64)) : Z("", !0),
1256
1256
  q.value.value === "history" ? (x(), T("div", Wt, [
1257
- ee.value.length ? (x(), T("div", Qt, [
1257
+ ee.value.length ? (x(), T("div", Jt, [
1258
1258
  (x(!0), T(K, null, he(ee.value, (C, N) => (x(), T(K, { key: N }, [
1259
1259
  o("div", Xt, [
1260
1260
  o("div", ea, [
@@ -1333,7 +1333,7 @@ const Mt = Oe(
1333
1333
  o("img", {
1334
1334
  src: h(xt),
1335
1335
  alt: "List is empty"
1336
- }, null, 8, Jt)
1336
+ }, null, 8, Qt)
1337
1337
  ]),
1338
1338
  t[14] || (t[14] = o("div", { class: "fm-typo-en-body-lg-600" }, V("No records found"), -1)),
1339
1339
  t[15] || (t[15] = o("div", { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary px-16" }, V("You can track approval and rejection history here"), -1)),
@@ -1352,7 +1352,7 @@ const Mt = Oe(
1352
1352
  setup(n) {
1353
1353
  const { t: s } = Ve(), { viewDraft: e } = Se(), { viewClosingDraftProps: i, viewClosingDraftShow: u } = Dt(Se()), A = je(), v = Mt(), M = mt(), { breakpoints: y } = ht();
1354
1354
  A.watchLocation(v.fetchDrafts);
1355
- const j = H(() => v.loading), U = z(""), k = H(() => y.value.xs || y.value.sm), g = H(() => k.value ? 10 : 20);
1355
+ const j = E(() => v.loading), U = z(""), k = E(() => y.value.xs || y.value.sm), g = E(() => k.value ? 10 : 20);
1356
1356
  function l(b) {
1357
1357
  switch (b) {
1358
1358
  case "refresh":
@@ -1362,7 +1362,7 @@ const Mt = Oe(
1362
1362
  function d(b) {
1363
1363
  return b;
1364
1364
  }
1365
- const m = H(() => k.value ? [
1365
+ const m = E(() => k.value ? [
1366
1366
  {
1367
1367
  label: s("inventory.common.refresh"),
1368
1368
  value: "refresh",
@@ -1400,7 +1400,7 @@ const Mt = Oe(
1400
1400
  "onUpdate:search": _[0] || (_[0] = (D) => U.value = D)
1401
1401
  }, null, 8, ["search"]),
1402
1402
  w(L, {
1403
- style: He(h(M).tableHeight),
1403
+ style: Ee(h(M).tableHeight),
1404
1404
  "column-defs": h(v).columnDefs,
1405
1405
  "row-data": h(v).drafts,
1406
1406
  "search-value": U.value,
@@ -1414,13 +1414,13 @@ const Mt = Oe(
1414
1414
  onRowClick: (P) => h(e)(P)
1415
1415
  }, {
1416
1416
  default: O((P) => {
1417
- var $, Q, oe, X, se, xe, le, ye, ce, ie, ge, Ae, ue, q, ee, be, a, t, r, f;
1417
+ var $, J, oe, X, se, xe, le, ye, ce, ie, ge, Ae, ue, q, ee, be, a, t, r, f;
1418
1418
  return [
1419
1419
  o("div", va, [
1420
1420
  o("div", ya, [
1421
1421
  o("div", ga, [
1422
1422
  w(h(we), {
1423
- render: (oe = (Q = ($ = P._id) == null ? void 0 : $.column) == null ? void 0 : Q.columnDef) == null ? void 0 : oe.cell,
1423
+ render: (oe = (J = ($ = P._id) == null ? void 0 : $.column) == null ? void 0 : J.columnDef) == null ? void 0 : oe.cell,
1424
1424
  props: (se = (X = P._id) == null ? void 0 : X.getContext) == null ? void 0 : se.call(X)
1425
1425
  }, null, 8, ["render", "props"])
1426
1426
  ]),
@@ -1459,7 +1459,7 @@ const Mt = Oe(
1459
1459
  ]),
1460
1460
  _: 1
1461
1461
  }, 8, ["title", "actions"]),
1462
- (x(), J(Qe, { to: "body" }, [
1462
+ (x(), Q(Je, { to: "body" }, [
1463
1463
  w(pa, Xe(h(i), {
1464
1464
  show: h(u),
1465
1465
  "onUpdate:show": _[2] || (_[2] = (D) => Ue(u) ? u.value = D : null),