@feedmepos/mf-inventory-portal 1.3.13 → 1.3.14-dev.1

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 (88) hide show
  1. package/dist/App-Cb6qfRCz.js +445 -0
  2. package/dist/{ApprovalView-ClQU6bq0.js → ApprovalView-BxioAXpO.js} +7 -7
  3. package/dist/{BindingsDialog--w8amPhB.js → BindingsDialog-Dn_hP7Ji.js} +13 -13
  4. package/dist/{BindingsPicker-CLZ2cy95.js → BindingsPicker-BEXOUaoI.js} +2 -2
  5. package/dist/{BindingsTable-DMKnwFJt.js → BindingsTable-CsRLA5J_.js} +3 -3
  6. package/dist/{ClosingDraftView-DOSvb2cx.js → ClosingDraftView-DoH9ZcGA.js} +136 -136
  7. package/dist/{ClosingHistoryView-Dbysx1Ca.js → ClosingHistoryView-BWf_gIrc.js} +32 -32
  8. package/dist/{ClosingTemplateView-kOWpFBhr.js → ClosingTemplateView-BKRxzvQX.js} +14 -14
  9. package/dist/{DeliveryOrderPrintPreview-CTrf0b97.js → DeliveryOrderPrintPreview-HzspgQXj.js} +11 -11
  10. package/dist/{FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-HLHu23Ly.js → FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-DstxeP1q.js} +20 -20
  11. package/dist/{FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-BTwfJTx3.js → FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-E9FFFhwx.js} +2 -2
  12. package/dist/{FmMultiselectDialog-D8AXgAuO.js → FmMultiselectDialog-3uKA-o0f.js} +1 -1
  13. package/dist/{FmMultiselectDialog-ByvnmkuF.js → FmMultiselectDialog-uFZKKIiO.js} +2 -2
  14. package/dist/{FmUnitInput.vue_vue_type_script_setup_true_lang-B8Jp-237.js → FmUnitInput.vue_vue_type_script_setup_true_lang-C1KGaqi7.js} +18 -18
  15. package/dist/{ImportView-B8jTVkI3.js → ImportView-zrNDzp3k.js} +6 -6
  16. package/dist/{IngredientBindedItem.vue_vue_type_script_setup_true_lang-D3bMh_iG.js → IngredientBindedItem.vue_vue_type_script_setup_true_lang-B2vMgXVZ.js} +1 -1
  17. package/dist/{IngredientGroupView-DEZHQArP.js → IngredientGroupView-HcAKvPur.js} +5 -5
  18. package/dist/{IngredientsView-D_0aKc2P.js → IngredientsView-CRB5UN-e.js} +15 -15
  19. package/dist/{IntegrationExplorerView-RNQ89fRN.js → IntegrationExplorerView-k3IHeiOU.js} +5 -5
  20. package/dist/{IntegrationView-HyqeX65i.js → IntegrationView-B3WeQTDB.js} +13 -13
  21. package/dist/{InventoryBindingForm-GXWU6jVC.js → InventoryBindingForm-B-7SQKl2.js} +1 -1
  22. package/dist/{InventoryBindingForm.vue_vue_type_script_setup_true_lang-BSWEOGs7.js → InventoryBindingForm.vue_vue_type_script_setup_true_lang-DhPu_GyE.js} +15 -15
  23. package/dist/{InventoryBindingSummary-Dcsun-ae.js → InventoryBindingSummary-Swi6A3W2.js} +1 -1
  24. package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-BPHzJFkv.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-Duv0At06.js} +1 -1
  25. package/dist/{PremiumBadge.vue_vue_type_script_setup_true_lang-eaX2F6rA.js → PremiumBadge.vue_vue_type_script_setup_true_lang--gt60IlU.js} +9 -9
  26. package/dist/{PublishView-BzaSX1CF.js → PublishView-B9HJT61I.js} +11 -11
  27. package/dist/{PurchaseOrderPrintPreview-Dq9RVILX.js → PurchaseOrderPrintPreview-sClUXkgt.js} +9 -9
  28. package/dist/{ReceiveRequestView-CUR65B8h.js → ReceiveRequestView-BbS55juS.js} +23 -23
  29. package/dist/{RecipeView-DA1exNa3.js → RecipeView-BH3asOD4.js} +50 -50
  30. package/dist/{SettingsView-G9VVMREu.js → SettingsView-BJAMNNhr.js} +30 -30
  31. package/dist/StockView-DMLFY7d1.js +2439 -0
  32. package/dist/{SubsidiaryTreeDialog.vue_vue_type_script_setup_true_lang-DflfaS_i.js → SubsidiaryTreeDialog.vue_vue_type_script_setup_true_lang-DeiLMVin.js} +1 -1
  33. package/dist/{SupplierView-Br3PxWl6.js → SupplierView-C3uBrEcc.js} +12 -12
  34. package/dist/{SurchargeView-DnC875ic.js → SurchargeView-S9ByD9Nd.js} +6 -6
  35. package/dist/{SystemTrailDialog.vue_vue_type_script_setup_true_lang-DxElZDE3.js → SystemTrailDialog.vue_vue_type_script_setup_true_lang-ha60Wy7z.js} +2 -2
  36. package/dist/{TemplatePublishDialog.vue_vue_type_script_setup_true_lang-DncbuAH1.js → TemplatePublishDialog.vue_vue_type_script_setup_true_lang-CfyCEElN.js} +1 -1
  37. package/dist/{TransferDetails.vue_vue_type_script_setup_true_lang-R0DRQHII.js → TransferDetails.vue_vue_type_script_setup_true_lang-CKfs-ns0.js} +790 -806
  38. package/dist/{TransferTemplateView-CN-1iASP.js → TransferTemplateView-zbn5CGiZ.js} +17 -17
  39. package/dist/{UnitCostHistoryView-HMfTl2Rl.js → UnitCostHistoryView-LhvAybS8.js} +246 -243
  40. package/dist/{UnitDisplayControl.vue_vue_type_script_setup_true_lang-BQSRm_uN.js → UnitDisplayControl.vue_vue_type_script_setup_true_lang-E2QCl521.js} +4 -4
  41. package/dist/{UnitView-2J7SxbnX.js → UnitView-6oUdlUVo.js} +24 -24
  42. package/dist/{WarehouseView-EIXt8wd0.js → WarehouseView-DQFe99KT.js} +5 -5
  43. package/dist/{WastageTemplateView-B8yQevPX.js → WastageTemplateView-BiYZqiT2.js} +14 -14
  44. package/dist/{app-DZ_O5S5y.js → app-SnX9gL_k.js} +23514 -22309
  45. package/dist/app.d.ts +6 -6
  46. package/dist/app.js +2 -2
  47. package/dist/{closing-template-C3F4uA55.js → closing-template-Ch--jBk-.js} +1 -1
  48. package/dist/components/HrmPermissionGuard.vue.d.ts +54 -0
  49. package/dist/composable/useHrmPermission.d.ts +17 -0
  50. package/dist/{date2-DoKx3vEH.js → date2-CGqqJOqr.js} +1 -1
  51. package/dist/{dayjs.min-BzKmIVU5.js → dayjs.min-JnfBpNSN.js} +1 -1
  52. package/dist/{decimal-CHryhQrv.js → decimal-C-2MQYNP.js} +2 -2
  53. package/dist/{defineDeepModel-Dt72PPYN.js → defineDeepModel-CUJCBuvw.js} +1 -1
  54. package/dist/{duplicate-template-k0PYkiot.js → duplicate-template-BXg5EQRC.js} +1 -1
  55. package/dist/{export-D0nU9NCc.js → export-DUsFBcmf.js} +1 -1
  56. package/dist/{feature-DTXvUM9q.js → feature-gkhmly57.js} +28 -28
  57. package/dist/{format-time-from-id-CjML4YH3.js → format-time-from-id-D1RhcKfL.js} +1 -1
  58. package/dist/{format-unit-display-BASnDwRJ.js → format-unit-display-DXs_-yEW.js} +11 -11
  59. package/dist/{import-export.helper-BGRAKGXv.js → import-export.helper-B84wW0eo.js} +6 -6
  60. package/dist/{index-FhahM2dg.js → index-D3XgyMwL.js} +1 -1
  61. package/dist/{index-Db7jD-CU.js → index-Dp1GAjHf.js} +3 -3
  62. package/dist/{index-D5qTaOFp.js → index-artVJVqL.js} +1 -1
  63. package/dist/{inventory-core-dart.default-Cvvr8rpN.js → inventory-core-dart.default-Bu1oVkLC.js} +10 -10
  64. package/dist/{lodash-B4Uj749H.js → lodash-DZbYS5Vn.js} +1 -1
  65. package/dist/{lz-string-Ckbaw1Bu.js → lz-string-nX96TtT6.js} +17 -17
  66. package/dist/{netsuite-B4O7LRpC.js → netsuite-DQkJKCH9.js} +109 -109
  67. package/dist/{number-9PlMlR2G.js → number-gRrApZRj.js} +7 -7
  68. package/dist/{predefined-templates-BqAy88Rp.js → predefined-templates-D9bzSOz_.js} +1 -1
  69. package/dist/{purchase-order-template-KkhC0FCL.js → purchase-order-template-BiE_We2X.js} +1 -1
  70. package/dist/{recalculationUtils-Rj0SZQO3.js → recalculationUtils-zNt-EW5S.js} +1 -1
  71. package/dist/router/route-permission.d.ts +10 -0
  72. package/dist/{rules-BvLBkdfK.js → rules-CWFFr_mA.js} +2 -2
  73. package/dist/{stock-CoG3l91v.js → stock-C-34Vuxz.js} +3 -3
  74. package/dist/{stock-yUbmIey0.js → stock-V4Oy4QHQ.js} +28 -27
  75. package/dist/{supplier-Qlox4B8s.js → supplier-DbYagMhS.js} +16 -16
  76. package/dist/{surcharge-CsAxFX-L.js → surcharge-CcvvfLHB.js} +5 -5
  77. package/dist/tsconfig.app.tsbuildinfo +1 -1
  78. package/dist/{use-ingredient-select-dialog-BOtDFKQO.js → use-ingredient-select-dialog-B4jFgJ5b.js} +2 -2
  79. package/dist/{use-inventory-binding-dialog-Dz5NbeEn.js → use-inventory-binding-dialog-20flYyGE.js} +2 -2
  80. package/dist/{use-template-enabled-locations-MNNKqChl.js → use-template-enabled-locations-CpDMbAGF.js} +2 -2
  81. package/dist/useHrmPermission-CZW6u2TS.js +16 -0
  82. package/dist/views/receive-request/composables/use-order-draft-permission.d.ts +2 -5
  83. package/dist/{vue-i18n-BqX2td3b.js → vue-i18n-CUrz9OVK.js} +389 -389
  84. package/dist/{xlsx-CtRIIkxr.js → xlsx-DBsOBE1z.js} +1 -1
  85. package/dist/{xlsx.util-Bd4_86rn.js → xlsx.util-xziohm10.js} +1 -1
  86. package/package.json +5 -4
  87. package/dist/App-Dm-YoD_v.js +0 -411
  88. package/dist/StockView-3J7Gkskb.js +0 -2406
@@ -0,0 +1,445 @@
1
+ import { ref as U, onUnmounted as q, defineComponent as k, watch as G, onMounted as D, computed as I, resolveComponent as R, openBlock as g, createElementBlock as T, unref as N, createVNode as b, createElementVNode as u, toDisplayString as x, createBlock as V, createCommentVNode as $, withCtx as w, withDirectives as J, vModelText as X, Fragment as Z, renderList as ee, createTextVNode as B } from "vue";
2
+ import { u as te, a as ne, R as e, r as W, m as y, g as r, b as K, d as oe } from "./app-SnX9gL_k.js";
3
+ import { useCoreStore as H, useI18n as Y } from "@feedmepos/mf-common";
4
+ import { useRouter as M, createRouter as le, createWebHistory as ae, useRoute as se } from "vue-router";
5
+ import { u as j, a as re, I as ie } from "./feature-gkhmly57.js";
6
+ import { u as ue } from "./netsuite-DQkJKCH9.js";
7
+ import { u as ce } from "./useTabStorage-BkIVScW_.js";
8
+ import { F as de } from "./FmAdminBadge-DjnBAgyv.js";
9
+ import { u as me } from "./googlemap-BGi_aKUA.js";
10
+ function pe() {
11
+ return {
12
+ loadingHookInstalled: !1,
13
+ isLoading: !1
14
+ };
15
+ }
16
+ const C = U(pe());
17
+ function fe() {
18
+ const p = M();
19
+ if (!C.value.loadingHookInstalled) {
20
+ C.value.loadingHookInstalled = !0;
21
+ const a = p.beforeEach(() => {
22
+ C.value.isLoading = !0;
23
+ }), d = p.afterEach(() => {
24
+ C.value.isLoading = !1;
25
+ });
26
+ q(() => {
27
+ C.value.loadingHookInstalled = !1, a(), d();
28
+ });
29
+ }
30
+ return {
31
+ get isLoading() {
32
+ return C.value.isLoading;
33
+ }
34
+ };
35
+ }
36
+ const ve = {
37
+ key: 0,
38
+ class: "flex flex-col items-center w-full h-full gap-24"
39
+ }, ge = {
40
+ key: 1,
41
+ class: "flex flex-col pt-[200px] gap-32 items-center"
42
+ }, _e = { class: "flex flex-col gap-12 items-center text-center px-24 max-w-[1000px]" }, Ee = { class: "fm-typo-en-title-lg-600" }, be = { class: "text-fm-color-typo-secondary fm-typo-en-body-md-400" }, he = { class: "flex gap-16" }, Te = { href: "https://feedme.ai/product/inventory/features?tab=plans_%26_prices" }, Se = { href: "https://feedme.ai/form" }, Ie = /* @__PURE__ */ k({
43
+ __name: "InventoryView",
44
+ setup(p) {
45
+ const a = te(), d = ne(), m = ue(), i = H(), s = M(), c = fe(), t = j(), { t: v } = Y();
46
+ G(
47
+ [() => i.sessionUser.value, () => i.currentBusiness.value],
48
+ ([_, E]) => {
49
+ f(_, E);
50
+ }
51
+ ), D(async () => {
52
+ await t.init(), await i.readBusinesses();
53
+ const _ = i.sessionUser.value, E = i.currentBusiness.value;
54
+ f(_, E);
55
+ });
56
+ function f(_, E) {
57
+ !_ || !E || A();
58
+ }
59
+ async function A() {
60
+ return await a.init(), await m.readSetting().catch((_) => {
61
+ console.error("[all] error on reading netsuite store", _);
62
+ }), await d.init();
63
+ }
64
+ const n = I(() => s.currentRoute.value.name === e.TRANSFER_TEMPLATE ? t.enablePoTemplate : s.currentRoute.value.name === e.INGREDIENT_GROUP ? t.enableIngredientGroup : !0);
65
+ return (_, E) => {
66
+ const O = R("FmSpacer"), F = R("FmCircularProgress"), P = R("FmButton"), L = R("RouterView");
67
+ return g(), T("div", null, [
68
+ N(c).isLoading ? (g(), T("div", ve, [
69
+ b(O),
70
+ u("div", null, [
71
+ b(F, { size: "xl" })
72
+ ]),
73
+ E[0] || (E[0] = u("div", { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary pl-8" }, "Loading page...", -1)),
74
+ b(O)
75
+ ])) : n.value ? N(i).sessionUser.value ? (g(), V(L, { key: 2 })) : $("", !0) : (g(), T("div", ge, [
76
+ u("div", _e, [
77
+ u("div", Ee, x(N(v)("inventory.common.proPlan.title")), 1),
78
+ u("div", be, x(N(v)("inventory.common.proPlan.subtitle")), 1)
79
+ ]),
80
+ u("div", he, [
81
+ u("a", Te, [
82
+ b(P, {
83
+ label: N(v)("inventory.common.proPlan.comparePlans"),
84
+ variant: "secondary"
85
+ }, null, 8, ["label"])
86
+ ]),
87
+ u("a", Se, [
88
+ b(P, {
89
+ label: N(v)("inventory.common.proPlan.callUs"),
90
+ "prepend-icon": "call"
91
+ }, null, 8, ["label"])
92
+ ])
93
+ ])
94
+ ]))
95
+ ]);
96
+ };
97
+ }
98
+ }), Q = W.reduce(
99
+ (p, a) => (p[a.name] = a, p),
100
+ {}
101
+ );
102
+ le({
103
+ history: ae(),
104
+ routes: [
105
+ {
106
+ path: "/",
107
+ redirect: Q[e.STOCK]
108
+ },
109
+ ...W
110
+ ]
111
+ });
112
+ const Re = { class: "flex items-center gap-2" }, ye = { class: "text-xs text-gray-400 font-normal" }, xe = { class: "flex flex-col gap-3" }, Pe = { class: "max-h-[480px] flex flex-col gap-1" }, Ne = { class: "font-mono text-xs text-gray-700 break-all min-w-0" }, Ce = {
113
+ key: 0,
114
+ class: "inline-flex items-center gap-1 text-xs font-medium text-green-700 bg-green-50 px-2 py-0.5 rounded-full"
115
+ }, Ae = {
116
+ key: 1,
117
+ class: "inline-flex items-center gap-1 text-xs font-medium text-red-700 bg-red-50 px-2 py-0.5 rounded-full"
118
+ }, Le = {
119
+ key: 2,
120
+ class: "inline-flex items-center gap-1 text-xs font-medium text-gray-500 bg-gray-100 px-2 py-0.5 rounded-full"
121
+ }, we = {
122
+ key: 0,
123
+ class: "text-center text-sm text-gray-400 py-4"
124
+ }, Oe = /* @__PURE__ */ k({
125
+ __name: "FmFeatureFlagDialog",
126
+ setup(p) {
127
+ const a = U(!1), d = U(""), m = I(() => {
128
+ const { getFlagValue: c } = re();
129
+ return Object.values(ie).map((t) => {
130
+ const v = c(t, (f) => f === "true");
131
+ return {
132
+ name: t,
133
+ enabled: v
134
+ };
135
+ });
136
+ }), i = I(() => {
137
+ const c = d.value.toLowerCase();
138
+ return c ? m.value.filter((t) => t.name.toLowerCase().includes(c)) : m.value;
139
+ }), s = I(() => {
140
+ const c = m.value.filter((f) => f.enabled === !0).length, t = m.value.filter((f) => f.enabled === !1).length, v = m.value.filter((f) => f.enabled === null).length;
141
+ return { enabled: c, disabled: t, unknown: v, total: m.value.length };
142
+ });
143
+ return (c, t) => {
144
+ const v = R("FmButton"), f = R("FmSpacer"), A = R("FmDialog");
145
+ return g(), V(A, {
146
+ modelValue: a.value,
147
+ "onUpdate:modelValue": t[2] || (t[2] = (n) => a.value = n),
148
+ overlay: !0
149
+ }, {
150
+ "dialog-button": w(() => [
151
+ b(de, null, {
152
+ default: w(() => [
153
+ b(v, {
154
+ variant: "secondary",
155
+ label: "Feature flags"
156
+ })
157
+ ]),
158
+ _: 1
159
+ })
160
+ ]),
161
+ "dialog-header": w(() => [
162
+ u("div", Re, [
163
+ t[3] || (t[3] = u("span", null, "Feature Flags", -1)),
164
+ u("span", ye, x(s.value.enabled) + " enabled · " + x(s.value.disabled) + " disabled · " + x(s.value.unknown) + " unknown ", 1)
165
+ ])
166
+ ]),
167
+ "dialog-footer": w(() => [
168
+ b(f, { class: "sm:hidden xs:hidden" }),
169
+ b(v, {
170
+ class: "sm:w-full xs:w-full",
171
+ label: "Close",
172
+ size: "md",
173
+ variant: "primary",
174
+ onClick: t[1] || (t[1] = (n) => a.value = !1)
175
+ })
176
+ ]),
177
+ default: w(() => [
178
+ u("div", xe, [
179
+ J(u("input", {
180
+ "onUpdate:modelValue": t[0] || (t[0] = (n) => d.value = n),
181
+ type: "text",
182
+ placeholder: "Search flags...",
183
+ class: "w-full px-3 py-2 text-sm border border-gray-300 rounded-md focus:outline-none focus:ring-1 focus:ring-blue-500"
184
+ }, null, 512), [
185
+ [X, d.value]
186
+ ]),
187
+ u("div", Pe, [
188
+ (g(!0), T(Z, null, ee(i.value, (n) => (g(), T("div", {
189
+ key: n.name,
190
+ class: "flex items-start justify-between gap-2 px-3 py-2 rounded-md hover:bg-gray-50 text-sm"
191
+ }, [
192
+ u("span", Ne, x(n.name), 1),
193
+ n.enabled === !0 ? (g(), T("span", Ce, t[4] || (t[4] = [
194
+ u("span", { class: "w-1.5 h-1.5 rounded-full bg-green-500" }, null, -1),
195
+ B(" Enabled ")
196
+ ]))) : n.enabled === !1 ? (g(), T("span", Ae, t[5] || (t[5] = [
197
+ u("span", { class: "w-1.5 h-1.5 rounded-full bg-red-500" }, null, -1),
198
+ B(" Disabled ")
199
+ ]))) : (g(), T("span", Le, t[6] || (t[6] = [
200
+ u("span", { class: "w-1.5 h-1.5 rounded-full bg-gray-400" }, null, -1),
201
+ B(" Unknown ")
202
+ ])))
203
+ ]))), 128)),
204
+ i.value.length === 0 ? (g(), T("div", we, ' No flags matching "' + x(d.value) + '" ', 1)) : $("", !0)
205
+ ])
206
+ ])
207
+ ]),
208
+ _: 1
209
+ }, 8, ["modelValue"]);
210
+ };
211
+ }
212
+ }), Fe = { class: "h-full flex flex-col overflow-auto py-16 gap-2" }, Ue = /* @__PURE__ */ k({
213
+ __name: "NavigationTab",
214
+ setup(p) {
215
+ const a = y.object({
216
+ label: y.string(),
217
+ value: y.string().optional(),
218
+ icon: y.string().optional(),
219
+ hide: y.boolean().optional(),
220
+ children: y.array(y.lazy(() => a)).optional()
221
+ }), d = se(), m = M(), i = H(), s = j(), c = ce(), { t } = Y(), { isDev: v } = K(), f = I(
222
+ () => {
223
+ var o;
224
+ return ((o = i.sessionUser.value) == null ? void 0 : o.permissions) ?? [];
225
+ }
226
+ ), A = (o = []) => o.length === 0 ? !0 : oe(o, f.value).granted, n = (o) => {
227
+ var h, S;
228
+ const l = (S = (h = Q[o]) == null ? void 0 : h.meta) == null ? void 0 : S.validationManifest;
229
+ return A(l == null ? void 0 : l.requiredCaslPermissions);
230
+ };
231
+ G([() => i.currentBusiness.value, () => d.name], ([o, l]) => {
232
+ (o == null ? void 0 : o.menuVersion) === "v3" && (l === e.INGREDIENTS || l === e.RECIPE || l === e.UNIT) && m.push({ name: e.STOCK });
233
+ });
234
+ const _ = (o) => o.filter((l) => !l.hide).map((l) => l.children ? { ...l, children: _(l.children) } : l).filter((l) => !l.children || l.children.length > 0), E = (o) => o.map((l) => {
235
+ delete l.hide;
236
+ const h = l;
237
+ return l.children && (h.children = E(l.children)), h;
238
+ }), O = I(() => {
239
+ var h;
240
+ const o = [
241
+ {
242
+ label: "Non-Production Environment",
243
+ icon: "logo_dev",
244
+ disabled: !0,
245
+ hide: !v
246
+ },
247
+ {
248
+ label: r(e.STOCK, t),
249
+ // icon: 'inventory_2',
250
+ children: [
251
+ {
252
+ label: t("inventory.stock.stock_balance.title"),
253
+ value: e.STOCK,
254
+ hide: !n(e.STOCK)
255
+ },
256
+ {
257
+ label: r(e.UNIT_COST_HISTORY, t),
258
+ value: e.UNIT_COST_HISTORY,
259
+ hide: !n(e.UNIT_COST_HISTORY) || !s.enableTotalCost
260
+ },
261
+ {
262
+ label: r(e.WASTAGE_TEMPLATE, t),
263
+ value: e.WASTAGE_TEMPLATE,
264
+ hide: !n(e.WASTAGE_TEMPLATE) || !s.enableWastageTemplate
265
+ }
266
+ ]
267
+ },
268
+ {
269
+ label: t("inventory.closing.title"),
270
+ children: [
271
+ {
272
+ label: r(e.CLOSING_HISTORY, t),
273
+ value: e.CLOSING_HISTORY,
274
+ hide: !n(e.CLOSING_HISTORY)
275
+ },
276
+ {
277
+ label: r(e.CLOSING_TEMPLATE, t),
278
+ value: e.CLOSING_TEMPLATE,
279
+ hide: !n(e.CLOSING_TEMPLATE) || !s.enableClosingTemplate
280
+ },
281
+ {
282
+ label: r(e.CLOSING_DRAFT, t),
283
+ value: e.CLOSING_DRAFT,
284
+ hide: !n(e.CLOSING_DRAFT) || !s.enableClosingTemplate
285
+ }
286
+ ]
287
+ },
288
+ {
289
+ label: r(e.INGREDIENTS, t),
290
+ // icon: 'grocery',
291
+ value: e.INGREDIENTS,
292
+ hide: !n(e.INGREDIENTS)
293
+ },
294
+ {
295
+ label: r(e.INGREDIENT_GROUP, t),
296
+ // icon: 'grocery',
297
+ value: e.INGREDIENT_GROUP,
298
+ hide: !s.enableIngredientGroup
299
+ },
300
+ {
301
+ label: r(e.RECIPE, t),
302
+ // icon: 'weight',
303
+ value: e.RECIPE,
304
+ hide: !n(e.RECIPE)
305
+ },
306
+ {
307
+ label: r(e.UNIT, t),
308
+ // icon: 'fastfood',
309
+ value: e.UNIT,
310
+ hide: !n(e.UNIT)
311
+ },
312
+ {
313
+ label: t("inventory.transfer.title"),
314
+ // icon: 'swap_horiz',
315
+ children: [
316
+ {
317
+ label: r(e.RECEIVE_REQUEST, t),
318
+ value: e.RECEIVE_REQUEST,
319
+ hide: !n(e.RECEIVE_REQUEST)
320
+ },
321
+ {
322
+ label: r(e.APPROVAL, t),
323
+ value: e.APPROVAL,
324
+ hide: !n(e.APPROVAL)
325
+ },
326
+ {
327
+ label: r(e.SURCHARGE, t),
328
+ value: e.SURCHARGE,
329
+ hide: !n(e.SURCHARGE) || !s.enableSurcharge
330
+ },
331
+ {
332
+ label: r(e.TRANSFER_TEMPLATE, t),
333
+ value: e.TRANSFER_TEMPLATE,
334
+ hide: !n(e.TRANSFER_TEMPLATE) || !s.enablePoTemplate
335
+ }
336
+ ]
337
+ },
338
+ {
339
+ label: r(e.SUPPLIER, t),
340
+ // icon: 'group',
341
+ value: e.SUPPLIER,
342
+ hide: !n(e.SUPPLIER)
343
+ },
344
+ {
345
+ label: r(e.WAREHOUSE, t),
346
+ // icon: 'warehouse',
347
+ value: e.WAREHOUSE,
348
+ hide: !n(e.WAREHOUSE)
349
+ },
350
+ {
351
+ label: r(e.PUBLISH, t),
352
+ value: e.PUBLISH,
353
+ hide: !n(e.PUBLISH)
354
+ },
355
+ {
356
+ label: r(e.IMPORT, t),
357
+ value: e.IMPORT,
358
+ hide: !n(e.IMPORT) || !s.enableBulkImport
359
+ },
360
+ {
361
+ label: r(e.INTEGRATION, t),
362
+ // icon: 'integration_instructions',
363
+ value: e.INTEGRATION,
364
+ hide: !n(e.INTEGRATION)
365
+ }
366
+ ], l = E(_(o));
367
+ return ((h = i.currentBusiness.value) == null ? void 0 : h.menuVersion) === "v3" ? l.filter(
368
+ (S) => S.value !== e.INGREDIENTS && S.value !== e.RECIPE && S.value !== e.UNIT && S.value !== e.PUBLISH
369
+ ) : l;
370
+ }), F = I({
371
+ get() {
372
+ if (d.name)
373
+ return String(d.name);
374
+ },
375
+ set(o) {
376
+ o && m.push({ name: o });
377
+ }
378
+ }), P = I(
379
+ () => {
380
+ var o;
381
+ return `NavigationTab.${(o = i.currentBusiness.value) == null ? void 0 : o._id}`;
382
+ }
383
+ ), L = U(!1), z = I({
384
+ get() {
385
+ return L.value;
386
+ },
387
+ set(o) {
388
+ L.value = o, o || c.setItem(P.value, "true");
389
+ }
390
+ });
391
+ return G([() => P.value], () => {
392
+ L.value = !1, setTimeout(() => {
393
+ z.value = !c.getItem(P.value);
394
+ }, 2e3);
395
+ }), (o, l) => {
396
+ const h = R("FmCollapsibleTabs");
397
+ return g(), T("div", Fe, [
398
+ b(Oe),
399
+ b(h, {
400
+ modelValue: F.value,
401
+ "onUpdate:modelValue": l[0] || (l[0] = (S) => F.value = S),
402
+ items: O.value
403
+ }, null, 8, ["modelValue", "items"])
404
+ ]);
405
+ };
406
+ }
407
+ });
408
+ typeof Promise.withResolvers > "u" && (Promise.withResolvers = () => {
409
+ let p, a;
410
+ return { promise: new Promise((m, i) => {
411
+ p = m, a = i;
412
+ }), resolve: p, reject: a };
413
+ });
414
+ typeof Promise.prototype.delayed > "u" && (Promise.prototype.delayed = async function(p) {
415
+ return await new Promise((a) => setTimeout(a, p)), Promise.resolve(this);
416
+ });
417
+ const Ke = /* @__PURE__ */ k({
418
+ __name: "App",
419
+ setup(p) {
420
+ const a = H(), d = me(), m = K();
421
+ D(() => {
422
+ if (window.location.href.includes("print-preview")) {
423
+ a.setEmbedded(!0), document.body.classList.add("print-mode");
424
+ return;
425
+ }
426
+ a.registerSidebarComponent(Ue), d.initGoogleMap(m.appApi.googleMap).catch(() => {
427
+ console.error("Google map cannot be loaded");
428
+ });
429
+ }), G([() => a.currentCountry.value], () => {
430
+ i();
431
+ });
432
+ async function i() {
433
+ var s;
434
+ try {
435
+ await a.readBusinesses(), a.currentBusiness.value = (s = a.businesses.value) == null ? void 0 : s.find((c) => c);
436
+ } catch (c) {
437
+ console.error("error when trying to reset businesses:", c);
438
+ }
439
+ }
440
+ return (s, c) => (g(), V(Ie));
441
+ }
442
+ });
443
+ export {
444
+ Ke as default
445
+ };
@@ -1,16 +1,16 @@
1
1
  import { defineComponent as ce, ref as y, watch as de, computed as c, resolveComponent as fe, openBlock as x, createBlock as Z, unref as a, withCtx as T, createElementVNode as p, normalizeClass as ve, createVNode as u, normalizeStyle as he, toDisplayString as _e, createElementBlock as De, createCommentVNode as ge, Teleport as ye, mergeProps as be, isRef as Re } from "vue";
2
- import { u as Oe, m as b } from "./app-DZ_O5S5y.js";
3
- import { a as Se, _ as Pe } from "./FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-BTwfJTx3.js";
4
- import { a as xe, P as w, b as Te, _ as we, c as ke } from "./TransferDetails.vue_vue_type_script_setup_true_lang-R0DRQHII.js";
5
- import { b as I } from "./date2-DoKx3vEH.js";
2
+ import { u as Oe, m as b } from "./app-SnX9gL_k.js";
3
+ import { a as Se, _ as Pe } from "./FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-E9FFFhwx.js";
4
+ import { a as xe, P as w, b as Te, _ as we, c as ke } from "./TransferDetails.vue_vue_type_script_setup_true_lang-CKfs-ns0.js";
5
+ import { b as I } from "./date2-CGqqJOqr.js";
6
6
  import { u as qe, _ as Ce } from "./SingleColumnLayout.vue_vue_type_script_setup_true_lang-sUxHOj47.js";
7
7
  import { _ as Ne, F as R } from "./TableActionableRow.vue_vue_type_script_setup_true_lang-Ca_eYa8-.js";
8
8
  import { useBreakpoints as Ve } from "@feedmepos/ui-library";
9
9
  import { useI18n as Ae } from "@feedmepos/mf-common";
10
10
  import { P as Me, J as Fe } from "./app-DiX-EfV6.js";
11
- import { u as Le } from "./netsuite-B4O7LRpC.js";
12
- import { f as $e } from "./predefined-templates-BqAy88Rp.js";
13
- import "./inventory-core-dart.default-Cvvr8rpN.js";
11
+ import { u as Le } from "./netsuite-DQkJKCH9.js";
12
+ import { f as $e } from "./predefined-templates-D9bzSOz_.js";
13
+ import "./inventory-core-dart.default-Bu1oVkLC.js";
14
14
  const ze = { class: "flex flex-col py-8" }, Ee = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Ue = { class: "fm-typo-en-body-lg-600 text-fm-color-typo-primary line-clamp-1" }, Ye = { class: "fm-typo-en-body-md-400 text-fm-color-typo-primary line-clamp-1" }, He = {
15
15
  key: 0,
16
16
  class: "fm-typo-en-body-md-400 text-fm-color-typo-primary line-clamp-1"
@@ -1,6 +1,6 @@
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-BSWEOGs7.js";
3
- import { a as L, al as S } from "./app-DZ_O5S5y.js";
1
+ import { defineComponent as C, ref as t, 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-DhPu_GyE.js";
3
+ import { a as L, ao as S } from "./app-SnX9gL_k.js";
4
4
  const U = {
5
5
  key: 0,
6
6
  class: "flex justify-end gap-8 items-center"
@@ -10,42 +10,42 @@ const U = {
10
10
  }, D = /* @__PURE__ */ C({
11
11
  __name: "BindingsDialog",
12
12
  setup(N) {
13
- const p = L(), d = o(!0), s = o(new Array()), u = o(), t = S(y);
13
+ const p = L(), d = t(!0), s = t(new Array()), u = t(), o = S(y);
14
14
  async function y() {
15
- await p.readInventory(), u.value = t.onMessage("props:inventory-bindings", (e) => {
15
+ await p.readInventory(), u.value = o.onMessage("props:inventory-bindings", (e) => {
16
16
  d.value = !1, s.value = e;
17
17
  }).onMessage("props:inventory-bindings:validate", () => {
18
18
  var e;
19
19
  (e = f.value) == null || e.validateInputs();
20
- }), t.sendMessage("props:inventory-bindings");
20
+ }), o.sendMessage("props:inventory-bindings");
21
21
  }
22
22
  function b() {
23
- t.sendMessage("@submit:inventory-bindings", s.value);
23
+ o.sendMessage("@submit:inventory-bindings", s.value);
24
24
  }
25
25
  function _() {
26
- t.sendMessage("@close:inventory-bindings");
26
+ o.sendMessage("@close:inventory-bindings");
27
27
  }
28
28
  function k(e) {
29
- t.sendMessage("@click:pick-inventory-bindings", e);
29
+ o.sendMessage("@click:pick-inventory-bindings", e);
30
30
  }
31
- const m = o(), r = o(!0);
31
+ const m = t(), r = t(!0);
32
32
  M(() => {
33
33
  v();
34
34
  const e = m.value;
35
35
  e && new ResizeObserver(() => {
36
- t.sendMessage("resize", e.scrollHeight);
36
+ o.sendMessage("resize", e.scrollHeight);
37
37
  }).observe(e);
38
38
  }), F(() => {
39
39
  var e, n;
40
40
  (n = (e = u.value) == null ? void 0 : e.removeEventListener) == null || n.call(e);
41
41
  }), x([() => s.value], ([e]) => {
42
- t.sendMessage("@update:inventory-bindings", e);
42
+ o.sendMessage("@update:inventory-bindings", e);
43
43
  });
44
44
  function v() {
45
45
  const e = new URLSearchParams(window.location.href.split("?")[1] || "");
46
46
  console.log(v.name, e, e.has("hideButton")), r.value = e.has("hideButton");
47
47
  }
48
- const f = o();
48
+ const f = t();
49
49
  return (e, n) => {
50
50
  const g = l("FmButton"), B = l("FmForm"), h = l("FmCircularProgress");
51
51
  return i(), c("div", {
@@ -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 { a as M } from "./FmMultiselectDialog-ByvnmkuF.js";
3
- import { a as x, al as z } from "./app-DZ_O5S5y.js";
2
+ import { a as M } from "./FmMultiselectDialog-uFZKKIiO.js";
3
+ import { a as x, ao as z } from "./app-SnX9gL_k.js";
4
4
  const F = {
5
5
  key: 0,
6
6
  class: "flex flex-col gap-16"
@@ -1,11 +1,11 @@
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, al as R } from "./app-DZ_O5S5y.js";
3
- import "./dayjs.min-BzKmIVU5.js";
2
+ import { F as b, a as P, ao as R } from "./app-SnX9gL_k.js";
3
+ import "./dayjs.min-JnfBpNSN.js";
4
4
  import "@feedmepos/ui-library";
5
5
  /* empty css */
6
6
  import "@feedmepos/mf-common";
7
7
  import "./app-DiX-EfV6.js";
8
- import "./lodash-B4Uj749H.js";
8
+ import "./lodash-DZbYS5Vn.js";
9
9
  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({
10
10
  __name: "binding-ui",
11
11
  props: {