@feedmepos/mf-inventory-portal 1.2.0 → 1.2.2-5.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 (147) hide show
  1. package/dist/App-DMkUg806.js +297 -0
  2. package/dist/{ApprovalView-Dr-qd_Ai.js → ApprovalView-DWJh2K6W.js} +65 -64
  3. package/dist/{BindingsDialog-Chh00-83.js → BindingsDialog-EmHCvqJI.js} +2 -2
  4. package/dist/{BindingsPicker-DCTGJ8eM.js → BindingsPicker-h_9jm1s0.js} +3 -3
  5. package/dist/{BindingsTable-BsDs5d0V.js → BindingsTable-BAVWGUoa.js} +1 -1
  6. package/dist/ClosingDraftView-Du4kOwIg.js +1899 -0
  7. package/dist/ClosingHistoryView-DuW2Vtrs.js +355 -0
  8. package/dist/ClosingTemplateView-CfPY8R5M.js +2001 -0
  9. package/dist/{DeliveryOrderPrintPreview-CrH9UVdW.js → DeliveryOrderPrintPreview-C6Cj8mOp.js} +9 -9
  10. package/dist/FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-WWIrybw_.js +230 -0
  11. package/dist/{FmMultiselectDialog-ypgaHejh.js → FmMultiselectDialog-BzWrQOS4.js} +1 -1
  12. package/dist/{FmUnitInput.vue_vue_type_script_setup_true_lang-DJctVhvZ.js → FmUnitInput.vue_vue_type_script_setup_true_lang-DwqVRUFz.js} +36 -36
  13. package/dist/ImportView-lKlYeLay.js +1291 -0
  14. package/dist/{IngredientBindedItem.vue_vue_type_script_setup_true_lang-D59M4Bl1.js → IngredientBindedItem.vue_vue_type_script_setup_true_lang-_2WZMZU2.js} +5 -5
  15. package/dist/{IngredientGroupView-Cf9ePE7_.js → IngredientGroupView-CrmwR2Xt.js} +34 -35
  16. package/dist/IngredientsView-1bAsyz-b.js +2254 -0
  17. package/dist/{IntegrationView-DEDn2mc5.js → IntegrationView-D16qeEc_.js} +1773 -1635
  18. package/dist/{InventoryBindingForm-AB8rum4-.js → InventoryBindingForm-BRwOXV_P.js} +1 -1
  19. package/dist/{InventoryBindingForm.vue_vue_type_script_setup_true_lang-BgZt_9h1.js → InventoryBindingForm.vue_vue_type_script_setup_true_lang-NDbtbtqK.js} +28 -28
  20. package/dist/{InventoryBindingSummary-CWOG5DIz.js → InventoryBindingSummary-DKM2gX8_.js} +1 -1
  21. package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-CmN30iEZ.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-CdaiYTdf.js} +4 -4
  22. package/dist/{PremiumBadge.vue_vue_type_script_setup_true_lang-C1cUDp0u.js → PremiumBadge.vue_vue_type_script_setup_true_lang-B0OKeK5O.js} +7 -7
  23. package/dist/{PublishView-FHyjjevA.js → PublishView-D0NnU22l.js} +73 -63
  24. package/dist/{PurchaseOrderPrintPreview-BPvvkjkR.js → PurchaseOrderPrintPreview-BmuwNbeL.js} +4 -4
  25. package/dist/{ReceiveRequestView-CoWU2g0R.js → ReceiveRequestView-j79m7TKk.js} +343 -333
  26. package/dist/RecipeView-D_fNQQ-C.js +636 -0
  27. package/dist/StockView-DX_xeFBT.js +2385 -0
  28. package/dist/SubsidiaryTreeDialog.vue_vue_type_script_setup_true_lang-Bg49isUy.js +172 -0
  29. package/dist/{SupplierView-CJG2Idbl.js → SupplierView-DuFTqbOg.js} +1193 -1073
  30. package/dist/TransferDetails.vue_vue_type_script_setup_true_lang-c428GXwc.js +3233 -0
  31. package/dist/{TransferTemplateView-DZnPt5b5.js → TransferTemplateView-Ccsfcetz.js} +104 -103
  32. package/dist/UnitView-BklpNsFN.js +674 -0
  33. package/dist/WarehouseView-BrURbU67.js +1066 -0
  34. package/dist/api/adjustment-template.d.ts +1 -0
  35. package/dist/api/bill.d.ts +140 -2
  36. package/dist/api/closing-template.d.ts +1 -0
  37. package/dist/api/closing.d.ts +1 -0
  38. package/dist/api/inventory.d.ts +405 -0
  39. package/dist/api/netsuite.d.ts +5 -1
  40. package/dist/api/purchase-order-template.d.ts +1 -0
  41. package/dist/api/purchase-order.d.ts +3 -0
  42. package/dist/api/shipment.d.ts +11 -0
  43. package/dist/api/stock.d.ts +2 -44
  44. package/dist/api/warehouse.d.ts +3 -1
  45. package/dist/{app-B6mXF-3v.js → app-a9r50k3U.js} +68557 -67576
  46. package/dist/app.d.ts +646 -15
  47. package/dist/app.js +6 -6
  48. package/dist/components/FmAdminBadge.vue.d.ts +1 -4
  49. package/dist/components/FmEnhancedSelect.vue.d.ts +30 -0
  50. package/dist/components/FmInventoryTableToolbar.vue.d.ts +16 -2
  51. package/dist/components/FmLockableField.vue.d.ts +3 -0
  52. package/dist/components/netsuite/ItemSubsidiaryTreeDialog.vue.d.ts +16 -0
  53. package/dist/components/netsuite/SubsidiaryTreeDialog.vue.d.ts +2 -0
  54. package/dist/composable/defineApi.d.ts +1 -1
  55. package/dist/composable/useIframe.d.ts +2 -2
  56. package/dist/{decimal-DErYDfEJ.js → decimal-AusUnA1W.js} +1 -1
  57. package/dist/{format-unit-display-BtjJtmQp.js → format-unit-display-BqkHL-ph.js} +397 -429
  58. package/dist/helper/array.d.ts +1 -0
  59. package/dist/helper/core/country/utils.d.ts +3 -4
  60. package/dist/helper/country.d.ts +6 -255
  61. package/dist/helper/number.d.ts +1 -0
  62. package/dist/import-export.helper-PIyNeHfa.js +238 -0
  63. package/dist/{index-lj4ClRIU.js → index-CjxirPvn.js} +283 -268
  64. package/dist/{index-CvfUsVdt.js → index-Dj9-pdT9.js} +1 -1
  65. package/dist/layout/SingleColumnLayout.vue.d.ts +6 -3
  66. package/dist/purchase-order-template-CQikvY1p.js +41 -0
  67. package/dist/router/name.d.ts +2 -0
  68. package/dist/stock-CDZ2uWSF.js +83 -0
  69. package/dist/stock-Dw908dIC.js +74 -0
  70. package/dist/stores/feature.d.ts +12 -0
  71. package/dist/stores/integration/netsuite.d.ts +42 -0
  72. package/dist/stores/inventory.d.ts +28 -199
  73. package/dist/stores/location.d.ts +331 -1
  74. package/dist/stores/supplier.d.ts +96 -0
  75. package/dist/stores/warehouse.d.ts +4 -0
  76. package/dist/style.css +1 -1
  77. package/dist/{supplier-D_2yzArc.js → supplier-BPPBUudN.js} +1 -1
  78. package/dist/tsconfig.app.tsbuildinfo +1 -1
  79. package/dist/{use-ingredient-select-dialog-C9iEMCVA.js → use-ingredient-select-dialog-C_fSKN3_.js} +5 -5
  80. package/dist/{use-inventory-binding-dialog-CavX3SFd.js → use-inventory-binding-dialog-ClAkJ864.js} +8 -8
  81. package/dist/views/adjustment-template/wastage-template/actions.d.ts +60 -0
  82. package/dist/views/adjustment-template/wastage-template/table.d.ts +60 -0
  83. package/dist/views/closing-draft/components/closing-draft-dialog/ClosingDraftDialog.vue.d.ts +56 -0
  84. package/dist/views/closing-draft/composables/use-closing-draft-actions.d.ts +3 -3
  85. package/dist/views/closing-draft/composables/use-closing-draft-table.d.ts +468 -0
  86. package/dist/views/closing-draft/helpers/export-draft.helper.d.ts +9 -2
  87. package/dist/views/closing-history/ClosingHistoryView.vue.d.ts +2 -0
  88. package/dist/views/closing-template/composables/use-closing-template-actions.d.ts +4 -1
  89. package/dist/views/closing-template/helpers/import-export.helper.d.ts +5 -0
  90. package/dist/views/import/ImportView.vue.d.ts +3 -0
  91. package/dist/views/import/components/ImportDialog.vue.d.ts +2 -0
  92. package/dist/views/import/helper/import-export.helper.d.ts +4 -0
  93. package/dist/views/ingredients/components/ingredient-dialog/IngredientDialogProps.d.ts +1 -1
  94. package/dist/views/ingredients/components/ingredient-form/IngredientForm.vue.d.ts +181 -12
  95. package/dist/views/ingredients/components/ingredient-form/IngredientFormProps.d.ts +6 -0
  96. package/dist/views/ingredients/helper/import-export.helper.d.ts +4 -1
  97. package/dist/views/integration/components/netsuite/business/BusinessNetSuiteSideSheet.vue.d.ts +2 -0
  98. package/dist/views/receive-request/components/delivery-order-form/CreateForm.vue.d.ts +16 -0
  99. package/dist/views/receive-request/components/delivery-order-form/CreateFormProps.d.ts +4 -0
  100. package/dist/views/receive-request/components/delivery-order-form/EditForm.vue.d.ts +16 -0
  101. package/dist/views/receive-request/components/delivery-order-form/EditFormProps.d.ts +4 -0
  102. package/dist/views/receive-request/components/delivery-order-form/SystemTrailDialog.vue.d.ts +21 -0
  103. package/dist/views/receive-request/components/netsuite/NetSuiteTransactionChangeLog.vue.d.ts +15 -0
  104. package/dist/views/receive-request/components/transfer-details/TransferDetailsProps.d.ts +1 -0
  105. package/dist/views/receive-request/components/transfer-form/TransferForm.vue.d.ts +420 -2
  106. package/dist/views/receive-request/composables/use-process-purchase-order.d.ts +99 -0
  107. package/dist/views/receive-request/composables/use-receive-request-form.d.ts +644 -13
  108. package/dist/views/receive-request/composables/use-receive-request-table.d.ts +711 -14
  109. package/dist/views/recipe/RecipeView.vue.d.ts +1 -0
  110. package/dist/views/recipe/components/import-recipes/ImportRecipeItem.vue.d.ts +16 -0
  111. package/dist/views/recipe/components/import-recipes/ImportRecipes.vue.d.ts +2 -0
  112. package/dist/views/recipe/helper/import-recipe.d.ts +48 -0
  113. package/dist/views/stock/components/StockRecordCard.vue.d.ts +70 -1
  114. package/dist/views/stock/components/dialog/RecalculationDialog.vue.d.ts +11 -0
  115. package/dist/views/stock/components/dialog/RecalculationDialogProps.d.ts +3 -0
  116. package/dist/views/stock/components/dialog/StockAdjustmentSideSheet.vue.d.ts +20 -0
  117. package/dist/views/supplier/components/SupplierForm.vue.d.ts +8 -0
  118. package/dist/views/supplier/components/SupplierSupplyItemField.vue.d.ts +3 -0
  119. package/dist/views/supplier/composables/use-supplier-table.d.ts +4 -0
  120. package/dist/views/transfer-template/components/transfer-template-dialog/TransferTemplateDialog.vue.d.ts +8 -0
  121. package/dist/views/transfer-template/components/transfer-template-form/components/NetSuiteCustomCodeSelection.vue.d.ts +2 -0
  122. package/dist/views/transfer-template/components/transfer-template-form/composables/use-transfer-locations.d.ts +16 -0
  123. package/dist/views/transfer-template/composables/use-transfer-template-actions.d.ts +48 -0
  124. package/dist/views/transfer-template/composables/use-transfer-template-table.d.ts +48 -0
  125. package/dist/views/unit/UnitView.vue.d.ts +1 -0
  126. package/dist/views/unit/components/import-units/ImportUnitItem.vue.d.ts +12 -0
  127. package/dist/views/unit/components/import-units/ImportUnitItemProps.d.ts +6 -0
  128. package/dist/views/unit/components/import-units/ImportUnits.vue.d.ts +9 -0
  129. package/dist/views/unit/components/import-units/ImportUnitsProps.d.ts +5 -0
  130. package/dist/views/unit/helper/import-export.helper.d.ts +40 -0
  131. package/dist/views/warehouse/components/WarehouseForm.vue.d.ts +8 -0
  132. package/package.json +3 -3
  133. package/dist/App-Bs0pR0sL.js +0 -276
  134. package/dist/ClosingDraftView-Dyr4hrHk.js +0 -1687
  135. package/dist/ClosingTemplateView-Dw0Lld6E.js +0 -1908
  136. package/dist/FmAdminBadge-BUJh40aj.js +0 -34
  137. package/dist/FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-B-p9ffPK.js +0 -224
  138. package/dist/IngredientsView-61WfWyGy.js +0 -1858
  139. package/dist/RecipeView-CznjQMrS.js +0 -621
  140. package/dist/StockForecast.vue_vue_type_style_index_0_lang-KLXSWvo5.js +0 -59
  141. package/dist/StockView-N-84Q5Ih.js +0 -2086
  142. package/dist/TransferDetails.vue_vue_type_script_setup_true_lang-BmU-VLNN.js +0 -2336
  143. package/dist/UnitView-BrLjAWNq.js +0 -667
  144. package/dist/WarehouseView-CI-RuaPq.js +0 -1034
  145. package/dist/array-Ca8T3f_G.js +0 -44
  146. package/dist/helper/core/country/codes.d.ts +0 -255
  147. package/dist/stock-CIpuon0m.js +0 -146
@@ -0,0 +1,297 @@
1
+ import { ref as B, onUnmounted as D, defineComponent as w, watch as L, onMounted as M, computed as P, resolveComponent as y, openBlock as R, createElementBlock as A, unref as T, createVNode as g, createElementVNode as v, toDisplayString as x, createBlock as F, createCommentVNode as W } from "vue";
2
+ import { u as K, a as $, b as j, R as e, c as V, m as _, g as r, d as k } from "./app-a9r50k3U.js";
3
+ import { useCoreStore as U, useI18n as H } from "@feedmepos/mf-common";
4
+ import { useRouter as O, useRoute as z } from "vue-router";
5
+ import { u as Q } from "./useTabStorage-BkIVScW_.js";
6
+ import { u as Y } from "./googlemap-Dm8ERVai.js";
7
+ function q() {
8
+ return {
9
+ loadingHookInstalled: !1,
10
+ isLoading: !1
11
+ };
12
+ }
13
+ const I = B(q());
14
+ function J() {
15
+ const c = O();
16
+ if (!I.value.loadingHookInstalled) {
17
+ I.value.loadingHookInstalled = !0;
18
+ const a = c.beforeEach(() => {
19
+ I.value.isLoading = !0;
20
+ }), d = c.afterEach(() => {
21
+ I.value.isLoading = !1;
22
+ });
23
+ D(() => {
24
+ I.value.loadingHookInstalled = !1, a(), d();
25
+ });
26
+ }
27
+ return {
28
+ get isLoading() {
29
+ return I.value.isLoading;
30
+ }
31
+ };
32
+ }
33
+ const X = {
34
+ key: 0,
35
+ class: "flex flex-col items-center w-full h-full gap-24"
36
+ }, Z = {
37
+ key: 1,
38
+ class: "flex flex-col pt-[200px] gap-32 items-center"
39
+ }, ee = { class: "flex flex-col gap-12 items-center text-center px-24 max-w-[1000px]" }, te = { class: "fm-typo-en-title-lg-600" }, oe = { class: "text-fm-color-typo-secondary fm-typo-en-body-md-400" }, ne = { class: "flex gap-16" }, ae = { href: "https://feedme.ai/product/inventory/features?tab=plans_%26_prices" }, re = { href: "https://feedme.ai/form" }, le = /* @__PURE__ */ w({
40
+ __name: "InventoryView",
41
+ setup(c) {
42
+ const a = K(), d = $(), p = j(), l = U(), s = O(), m = J(), t = V(), { t: E } = H();
43
+ L(
44
+ [() => l.sessionUser.value, () => l.currentBusiness.value],
45
+ ([u, i]) => {
46
+ h(u, i);
47
+ }
48
+ ), M(async () => {
49
+ await t.init(), await l.readBusinesses();
50
+ const u = l.sessionUser.value, i = l.currentBusiness.value;
51
+ h(u, i);
52
+ });
53
+ function h(u, i) {
54
+ !u || !i || N();
55
+ }
56
+ async function N() {
57
+ return await a.init(), await p.readSetting().catch((u) => {
58
+ console.error("[all] error on reading netsuite store", u);
59
+ }), await d.init();
60
+ }
61
+ const C = P(() => s.currentRoute.value.name === e.TRANSFER_TEMPLATE ? t.enablePoTemplate : s.currentRoute.value.name === e.INGREDIENT_GROUP ? t.enableIngredientGroup : !0);
62
+ return (u, i) => {
63
+ const S = y("FmSpacer"), G = y("FmCircularProgress"), o = y("FmButton"), n = y("RouterView");
64
+ return R(), A("div", null, [
65
+ T(m).isLoading ? (R(), A("div", X, [
66
+ g(S),
67
+ v("div", null, [
68
+ g(G, { size: "xl" })
69
+ ]),
70
+ i[0] || (i[0] = v("div", { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary pl-8" }, "Loading page...", -1)),
71
+ g(S)
72
+ ])) : C.value ? T(l).sessionUser.value ? (R(), F(n, { key: 2 })) : W("", !0) : (R(), A("div", Z, [
73
+ v("div", ee, [
74
+ v("div", te, x(T(E)("inventory.common.proPlan.title")), 1),
75
+ v("div", oe, x(T(E)("inventory.common.proPlan.subtitle")), 1)
76
+ ]),
77
+ v("div", ne, [
78
+ v("a", ae, [
79
+ g(o, {
80
+ label: T(E)("inventory.common.proPlan.comparePlans"),
81
+ variant: "secondary"
82
+ }, null, 8, ["label"])
83
+ ]),
84
+ v("a", re, [
85
+ g(o, {
86
+ label: T(E)("inventory.common.proPlan.callUs"),
87
+ "prepend-icon": "call"
88
+ }, null, 8, ["label"])
89
+ ])
90
+ ])
91
+ ]))
92
+ ]);
93
+ };
94
+ }
95
+ }), se = { class: "h-full flex flex-col overflow-auto py-16" }, ie = /* @__PURE__ */ w({
96
+ __name: "NavigationTab",
97
+ setup(c) {
98
+ const a = _.object({
99
+ label: _.string(),
100
+ value: _.string().optional(),
101
+ icon: _.string().optional(),
102
+ hide: _.boolean().optional(),
103
+ children: _.array(_.lazy(() => a)).optional()
104
+ }), d = z(), p = O(), l = U(), s = V(), m = Q(), { t } = H(), { isDev: E } = k();
105
+ L([() => l.currentBusiness.value, () => d.name], ([o, n]) => {
106
+ (o == null ? void 0 : o.menuVersion) === "v3" && (n === e.INGREDIENTS || n === e.RECIPE || n === e.UNIT) && p.push({ name: e.STOCK });
107
+ });
108
+ const h = (o) => o.filter((n) => !n.hide).map((n) => n.children ? { ...n, children: h(n.children) } : n), N = (o) => o.map((n) => {
109
+ delete n.hide;
110
+ const f = n;
111
+ return n.children && (f.children = N(n.children)), f;
112
+ }), C = P(() => {
113
+ var f;
114
+ const o = [
115
+ {
116
+ label: "Non-Production Environment",
117
+ icon: "logo_dev",
118
+ disabled: !0,
119
+ hide: !E
120
+ },
121
+ {
122
+ label: r(e.STOCK, t),
123
+ // icon: 'inventory_2',
124
+ children: [
125
+ {
126
+ label: t("inventory.stock.stock_balance.title"),
127
+ value: e.STOCK
128
+ },
129
+ {
130
+ label: r(e.WASTAGE_TEMPLATE, t),
131
+ value: e.WASTAGE_TEMPLATE,
132
+ hide: !s.enableWastageTemplate
133
+ }
134
+ ]
135
+ },
136
+ {
137
+ label: "Closing",
138
+ children: [
139
+ {
140
+ label: r(e.CLOSING_HISTORY, t),
141
+ value: e.CLOSING_HISTORY
142
+ },
143
+ {
144
+ label: r(e.CLOSING_TEMPLATE, t),
145
+ value: e.CLOSING_TEMPLATE,
146
+ hide: !s.enableClosingTemplate
147
+ },
148
+ {
149
+ label: r(e.CLOSING_DRAFT, t),
150
+ value: e.CLOSING_DRAFT,
151
+ hide: !s.enableClosingTemplate
152
+ }
153
+ ]
154
+ },
155
+ {
156
+ label: r(e.INGREDIENTS, t),
157
+ // icon: 'grocery',
158
+ value: e.INGREDIENTS
159
+ },
160
+ {
161
+ label: r(e.INGREDIENT_GROUP, t),
162
+ // icon: 'grocery',
163
+ value: e.INGREDIENT_GROUP,
164
+ hide: !s.enableIngredientGroup
165
+ },
166
+ {
167
+ label: r(e.RECIPE, t),
168
+ // icon: 'weight',
169
+ value: e.RECIPE
170
+ },
171
+ {
172
+ label: r(e.UNIT, t),
173
+ // icon: 'fastfood',
174
+ value: e.UNIT
175
+ },
176
+ {
177
+ label: t("inventory.transfer.title"),
178
+ // icon: 'swap_horiz',
179
+ children: [
180
+ {
181
+ label: r(e.RECEIVE_REQUEST, t),
182
+ value: e.RECEIVE_REQUEST
183
+ },
184
+ {
185
+ label: r(e.APPROVAL, t),
186
+ value: e.APPROVAL
187
+ },
188
+ {
189
+ label: r(e.TRANSFER_TEMPLATE, t),
190
+ value: e.TRANSFER_TEMPLATE,
191
+ hide: !s.enablePoTemplate
192
+ }
193
+ ]
194
+ },
195
+ {
196
+ label: r(e.SUPPLIER, t),
197
+ // icon: 'group',
198
+ value: e.SUPPLIER
199
+ },
200
+ {
201
+ label: r(e.WAREHOUSE, t),
202
+ // icon: 'warehouse',
203
+ value: e.WAREHOUSE
204
+ },
205
+ {
206
+ label: r(e.PUBLISH, t),
207
+ value: e.PUBLISH
208
+ },
209
+ {
210
+ label: r(e.IMPORT, t),
211
+ value: e.IMPORT,
212
+ hide: !s.enableBulkImport
213
+ },
214
+ {
215
+ label: r(e.INTEGRATION, t),
216
+ // icon: 'integration_instructions',
217
+ value: e.INTEGRATION
218
+ }
219
+ ], n = N(h(o));
220
+ return ((f = l.currentBusiness.value) == null ? void 0 : f.menuVersion) === "v3" ? n.filter(
221
+ (b) => b.value !== e.INGREDIENTS && b.value !== e.RECIPE && b.value !== e.UNIT && b.value !== e.PUBLISH
222
+ ) : n;
223
+ }), u = P({
224
+ get() {
225
+ if (d.name)
226
+ return String(d.name);
227
+ },
228
+ set(o) {
229
+ o && p.push({ name: o });
230
+ }
231
+ }), i = P(
232
+ () => {
233
+ var o;
234
+ return `NavigationTab.${(o = l.currentBusiness.value) == null ? void 0 : o._id}`;
235
+ }
236
+ ), S = B(!1), G = P({
237
+ get() {
238
+ return S.value;
239
+ },
240
+ set(o) {
241
+ S.value = o, o || m.setItem(i.value, "true");
242
+ }
243
+ });
244
+ return L([() => i.value], () => {
245
+ S.value = !1, setTimeout(() => {
246
+ G.value = !m.getItem(i.value);
247
+ }, 2e3);
248
+ }), (o, n) => {
249
+ const f = y("FmCollapsibleTabs");
250
+ return R(), A("div", se, [
251
+ g(f, {
252
+ modelValue: u.value,
253
+ "onUpdate:modelValue": n[0] || (n[0] = (b) => u.value = b),
254
+ items: C.value
255
+ }, null, 8, ["modelValue", "items"])
256
+ ]);
257
+ };
258
+ }
259
+ });
260
+ typeof Promise.withResolvers > "u" && (Promise.withResolvers = () => {
261
+ let c, a;
262
+ return { promise: new Promise((p, l) => {
263
+ c = p, a = l;
264
+ }), resolve: c, reject: a };
265
+ });
266
+ typeof Promise.prototype.delayed > "u" && (Promise.prototype.delayed = async function(c) {
267
+ return await new Promise((a) => setTimeout(a, c)), Promise.resolve(this);
268
+ });
269
+ const fe = /* @__PURE__ */ w({
270
+ __name: "App",
271
+ setup(c) {
272
+ const a = U(), d = Y(), p = k();
273
+ M(() => {
274
+ if (window.location.href.includes("print-preview")) {
275
+ a.setEmbedded(!0), document.body.classList.add("print-mode");
276
+ return;
277
+ }
278
+ a.registerSidebarComponent(ie), d.initGoogleMap(p.appApi.googleMap).catch(() => {
279
+ console.error("Google map cannot be loaded");
280
+ });
281
+ }), L([() => a.currentCountry.value], () => {
282
+ l();
283
+ });
284
+ async function l() {
285
+ var s;
286
+ try {
287
+ await a.readBusinesses(), a.currentBusiness.value = (s = a.businesses.value) == null ? void 0 : s.find((m) => m);
288
+ } catch (m) {
289
+ console.error("error when trying to reset businesses:", m);
290
+ }
291
+ }
292
+ return (s, m) => (R(), F(le));
293
+ }
294
+ });
295
+ export {
296
+ fe as default
297
+ };
@@ -1,15 +1,15 @@
1
- import { defineComponent as ue, ref as y, watch as ie, computed as d, resolveComponent as ce, openBlock as x, createBlock as X, unref as n, withCtx as k, createElementVNode as c, normalizeClass as pe, createVNode as i, normalizeStyle as de, toDisplayString as me, createElementBlock as fe, createCommentVNode as ve, Teleport as he, mergeProps as _e } from "vue";
2
- import { u as De, b as ge, aG as b, aR as ye, ah as Z, B as be, N as Re, H as Oe, _ as Se, C as xe, E as ke, G as R } from "./app-B6mXF-3v.js";
3
- import { a as qe, P as q, b as we, _ as Pe } from "./TransferDetails.vue_vue_type_script_setup_true_lang-BmU-VLNN.js";
1
+ import { defineComponent as ue, ref as y, watch as ie, computed as d, resolveComponent as ce, openBlock as x, createBlock as W, unref as n, withCtx as k, createElementVNode as c, normalizeClass as pe, createVNode as i, normalizeStyle as de, toDisplayString as me, createElementBlock as fe, createCommentVNode as ve, Teleport as he, mergeProps as _e } from "vue";
2
+ import { u as De, b as ge, m as b, aZ as ye, am as X, G as be, N as Oe, H as Re, I as Se, J as xe, K as ke, L as O } from "./app-a9r50k3U.js";
3
+ import { u as qe, P as q, a as we, _ as Pe } from "./TransferDetails.vue_vue_type_script_setup_true_lang-c428GXwc.js";
4
4
  import { useBreakpoints as Ne } from "@feedmepos/ui-library";
5
5
  import { useI18n as Te } from "@feedmepos/mf-common";
6
- const Ce = { class: "flex flex-col py-8" }, Ae = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Me = { class: "fm-typo-en-body-lg-600 text-fm-color-typo-primary line-clamp-1" }, Ve = { class: "fm-typo-en-body-md-400 text-fm-color-typo-primary line-clamp-1" }, Le = {
6
+ const Ae = { class: "flex flex-col py-8" }, Ce = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Me = { 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
7
  key: 0,
8
8
  class: "fm-typo-en-body-md-400 text-fm-color-typo-primary line-clamp-1"
9
9
  }, ze = { class: "pt-8" }, je = /* @__PURE__ */ ue({
10
10
  __name: "ApprovalView",
11
- setup(Ee) {
12
- const s = qe(q.APPROVAL), { columnDefs: B } = we(q.APPROVAL, s), I = De(), ee = ge();
11
+ setup(Fe) {
12
+ const a = qe(q.APPROVAL), { columnDefs: I } = we(q.APPROVAL, a, a.shipments), B = De(), ee = ge();
13
13
  b.object({
14
14
  name: b.string().optional().nullable(),
15
15
  start: b.date().optional().nullable(),
@@ -19,8 +19,8 @@ const Ce = { class: "flex flex-col py-8" }, Ae = { class: "fm-typo-en-body-md-40
19
19
  name: "",
20
20
  ...ye()
21
21
  }), l = y({
22
- startDate: Z(w.value.start ?? /* @__PURE__ */ new Date()),
23
- endDate: Z(w.value.end ?? /* @__PURE__ */ new Date())
22
+ startDate: X(w.value.start ?? /* @__PURE__ */ new Date()),
23
+ endDate: X(w.value.end ?? /* @__PURE__ */ new Date())
24
24
  });
25
25
  ie([() => l.value.startDate], () => {
26
26
  if (!l.value.startDate)
@@ -34,9 +34,9 @@ const Ce = { class: "flex flex-col py-8" }, Ae = { class: "fm-typo-en-body-md-40
34
34
  l.value.endDate = l.value.startDate;
35
35
  return;
36
36
  }
37
- s.updateDateRange(l.value.startDate, l.value.endDate);
37
+ a.updateDateRange(l.value.startDate, l.value.endDate);
38
38
  });
39
- const O = y(""), { breakpoints: P } = Ne(), S = d(() => P.value.xs || P.value.sm), te = d(() => S.value ? 10 : 20), ae = be(), { t: N } = Te(), re = d(() => [
39
+ const R = y(""), { breakpoints: P } = Ne(), S = d(() => P.value.xs || P.value.sm), te = d(() => S.value ? 10 : 20), ae = be(), { t: N } = Te(), re = d(() => [
40
40
  {
41
41
  label: N("inventory.common.refresh"),
42
42
  value: "refresh"
@@ -45,7 +45,7 @@ const Ce = { class: "flex flex-col py-8" }, Ae = { class: "fm-typo-en-body-md-40
45
45
  function se(u) {
46
46
  switch (u) {
47
47
  case "refresh":
48
- return s.fetchData();
48
+ return a.fetchData();
49
49
  }
50
50
  }
51
51
  const ne = d(() => {
@@ -56,69 +56,69 @@ const Ce = { class: "flex flex-col py-8" }, Ae = { class: "fm-typo-en-body-md-40
56
56
  entity: "purchaseOrderRequest",
57
57
  values: Array.from(
58
58
  new Set(
59
- s.purchaseRequests.value.map((e) => {
60
- var a;
61
- return ((a = e.purchaseOrder) == null ? void 0 : a.status) ?? "";
59
+ a.purchaseRequests.value.map((e) => {
60
+ var r;
61
+ return ((r = e.purchaseOrder) == null ? void 0 : r.status) ?? "";
62
62
  }).filter((e) => e !== "")
63
63
  )
64
64
  )
65
65
  }
66
- ], r = [
66
+ ], s = [
67
67
  {
68
68
  type: "string",
69
69
  key: "netsuiteTransactionNumber",
70
70
  entity: "purchaseOrderRequest",
71
- values: s.purchaseRequests.value.map((e) => {
72
- var a, t;
73
- return (t = (a = e.netSuite) == null ? void 0 : a.additionalInfo) == null ? void 0 : t.transactionnumber;
71
+ values: a.purchaseRequests.value.map((e) => {
72
+ var r, t;
73
+ return (t = (r = e.netSuite) == null ? void 0 : r.additionalInfo) == null ? void 0 : t.transactionnumber;
74
74
  }).filter((e) => e != null)
75
75
  },
76
76
  {
77
77
  type: "string",
78
78
  key: "netsuiteOrderNo",
79
79
  entity: "purchaseOrderRequest",
80
- values: s.purchaseRequests.value.map((e) => {
81
- var a;
82
- return (a = e.netSuite) == null ? void 0 : a.refNo;
80
+ values: a.purchaseRequests.value.map((e) => {
81
+ var r;
82
+ return (r = e.netSuite) == null ? void 0 : r.refNo;
83
83
  }).filter((e) => e != null)
84
84
  },
85
85
  {
86
86
  type: "string",
87
87
  key: "netsuiteOrderId",
88
88
  entity: "purchaseOrderRequest",
89
- values: s.purchaseRequests.value.map((e) => {
90
- var a;
91
- return (a = e.netSuite) == null ? void 0 : a.id;
89
+ values: a.purchaseRequests.value.map((e) => {
90
+ var r;
91
+ return (r = e.netSuite) == null ? void 0 : r.id;
92
92
  }).filter((e) => e != null)
93
93
  }
94
94
  ];
95
- return [...u, ...ee.isEnabled ? r : []];
95
+ return [...u, ...ee.isEnabled ? s : []];
96
96
  }), m = y(null), oe = d(() => {
97
97
  if (!m.value)
98
- return s.purchaseRequests.value;
99
- const u = Re.build(m.value);
100
- return s.purchaseRequests.value.filter((r) => {
101
- var e, a, t, o, p;
102
- return Oe(
98
+ return a.purchaseRequests.value;
99
+ const u = Oe.build(m.value);
100
+ return a.purchaseRequests.value.filter((s) => {
101
+ var e, r, t, o, p;
102
+ return Re(
103
103
  {
104
- netsuiteTransactionNumber: (a = (e = r.netSuite) == null ? void 0 : e.additionalInfo) == null ? void 0 : a.transactionnumber,
105
- netsuiteOrderNo: (t = r.netSuite) == null ? void 0 : t.refNo,
106
- netsuiteOrderId: (o = r.netSuite) == null ? void 0 : o.id,
107
- status: (p = r.purchaseOrder) == null ? void 0 : p.status
104
+ netsuiteTransactionNumber: (r = (e = s.netSuite) == null ? void 0 : e.additionalInfo) == null ? void 0 : r.transactionnumber,
105
+ netsuiteOrderNo: (t = s.netSuite) == null ? void 0 : t.refNo,
106
+ netsuiteOrderId: (o = s.netSuite) == null ? void 0 : o.id,
107
+ status: (p = s.purchaseOrder) == null ? void 0 : p.status
108
108
  },
109
109
  u
110
110
  );
111
111
  });
112
112
  });
113
- return (u, r) => {
113
+ return (u, s) => {
114
114
  const e = ce("FmTable");
115
- return x(), X(Se, {
115
+ return x(), W(Se, {
116
116
  title: n(N)("inventory.transfer.approval.title"),
117
117
  actions: re.value,
118
118
  "onClick:action": se
119
119
  }, {
120
120
  default: k(() => {
121
- var a;
121
+ var r;
122
122
  return [
123
123
  c("div", {
124
124
  class: pe([
@@ -132,23 +132,23 @@ const Ce = { class: "flex flex-col py-8" }, Ae = { class: "fm-typo-en-body-md-40
132
132
  i(xe, {
133
133
  "date-range-query": "",
134
134
  "date-range": l.value,
135
- "onUpdate:dateRange": r[0] || (r[0] = (t) => l.value = t),
135
+ "onUpdate:dateRange": s[0] || (s[0] = (t) => l.value = t),
136
136
  searchable: "",
137
137
  "change-location": "",
138
- search: O.value,
139
- "onUpdate:search": r[1] || (r[1] = (t) => O.value = t),
138
+ search: R.value,
139
+ "onUpdate:search": s[1] || (s[1] = (t) => R.value = t),
140
140
  filterable: "",
141
141
  "filter-attributes": ne.value,
142
142
  filter: m.value,
143
- "onUpdate:filter": r[2] || (r[2] = (t) => m.value = t)
143
+ "onUpdate:filter": s[2] || (s[2] = (t) => m.value = t)
144
144
  }, null, 8, ["date-range", "search", "filter-attributes", "filter"]),
145
145
  i(e, {
146
146
  style: de(n(ae).tableHeight),
147
- "column-defs": n(B),
147
+ "column-defs": n(I),
148
148
  "row-data": oe.value,
149
- "search-value": O.value,
150
- loading: !n(I)._currentLocation || n(s).loading.value,
151
- onRowClick: r[3] || (r[3] = (t) => n(s).promptShowTransferDetails(
149
+ "search-value": R.value,
150
+ loading: !n(B)._currentLocation || n(a).loading.value,
151
+ onRowClick: s[3] || (s[3] = (t) => n(a).promptShowTransferDetails(
152
152
  t.original.purchaseOrder,
153
153
  t.original
154
154
  )),
@@ -157,35 +157,35 @@ const Ce = { class: "flex flex-col py-8" }, Ae = { class: "fm-typo-en-body-md-40
157
157
  "list-row": k((t) => [
158
158
  i(ke, {
159
159
  row: t,
160
- onRowClick: (o) => n(s).promptShowTransferDetails(o.purchaseOrder, o)
160
+ onRowClick: (o) => n(a).promptShowTransferDetails(o.purchaseOrder, o)
161
161
  }, {
162
162
  default: k((o) => {
163
- var p, T, C, f, A, M, V, L, v, z, E, h, F, _, $, H, Y, U, j, D, G, J, K, Q, g, W;
163
+ var p, T, A, f, C, M, L, V, v, z, F, h, $, _, E, H, Y, U, j, D, G, J, K, Z, g, Q;
164
164
  return [
165
- c("div", Ce, [
166
- c("div", Ae, [
167
- i(n(R), {
168
- render: (C = (T = (p = o.purchaseOrder__id) == null ? void 0 : p.column) == null ? void 0 : T.columnDef) == null ? void 0 : C.cell,
169
- props: (A = (f = o.purchaseOrder__id) == null ? void 0 : f.getContext) == null ? void 0 : A.call(f)
165
+ c("div", Ae, [
166
+ c("div", Ce, [
167
+ i(n(O), {
168
+ render: (A = (T = (p = o.purchaseOrder__id) == null ? void 0 : p.column) == null ? void 0 : T.columnDef) == null ? void 0 : A.cell,
169
+ props: (C = (f = o.purchaseOrder__id) == null ? void 0 : f.getContext) == null ? void 0 : C.call(f)
170
170
  }, null, 8, ["render", "props"])
171
171
  ]),
172
172
  c("div", Me, [
173
- i(n(R), {
174
- render: (L = (V = (M = o.to_name) == null ? void 0 : M.column) == null ? void 0 : V.columnDef) == null ? void 0 : L.cell,
173
+ i(n(O), {
174
+ render: (V = (L = (M = o.to_name) == null ? void 0 : M.column) == null ? void 0 : L.columnDef) == null ? void 0 : V.cell,
175
175
  props: (z = (v = o.to_name) == null ? void 0 : v.getContext) == null ? void 0 : z.call(v)
176
176
  }, null, 8, ["render", "props"])
177
177
  ]),
178
- c("div", Ve, me(($ = (_ = (F = (h = (E = t.original.purchaseOrder) == null ? void 0 : E.items) == null ? void 0 : h.map) == null ? void 0 : F.call(h, (le) => `${le.name}`)) == null ? void 0 : _.join) == null ? void 0 : $.call(_, ", ")), 1),
179
- (H = t.original.purchaseOrder) != null && H.ref ? (x(), fe("div", Le, [
180
- i(n(R), {
178
+ c("div", Le, me((E = (_ = ($ = (h = (F = t.original.purchaseOrder) == null ? void 0 : F.items) == null ? void 0 : h.map) == null ? void 0 : $.call(h, (le) => `${le.name}`)) == null ? void 0 : _.join) == null ? void 0 : E.call(_, ", ")), 1),
179
+ (H = t.original.purchaseOrder) != null && H.ref ? (x(), fe("div", Ve, [
180
+ i(n(O), {
181
181
  render: (j = (U = (Y = o.purchaseOrder_ref) == null ? void 0 : Y.column) == null ? void 0 : U.columnDef) == null ? void 0 : j.cell,
182
182
  props: (G = (D = o.purchaseOrder_ref) == null ? void 0 : D.getContext) == null ? void 0 : G.call(D)
183
183
  }, null, 8, ["render", "props"])
184
184
  ])) : ve("", !0),
185
185
  c("div", ze, [
186
- i(n(R), {
187
- render: (Q = (K = (J = o.purchaseOrder_status) == null ? void 0 : J.column) == null ? void 0 : K.columnDef) == null ? void 0 : Q.cell,
188
- props: (W = (g = o.purchaseOrder_status) == null ? void 0 : g.getContext) == null ? void 0 : W.call(g)
186
+ i(n(O), {
187
+ render: (Z = (K = (J = o.purchaseOrder_status) == null ? void 0 : J.column) == null ? void 0 : K.columnDef) == null ? void 0 : Z.cell,
188
+ props: (Q = (g = o.purchaseOrder_status) == null ? void 0 : g.getContext) == null ? void 0 : Q.call(g)
189
189
  }, null, 8, ["render", "props"])
190
190
  ])
191
191
  ])
@@ -197,14 +197,15 @@ const Ce = { class: "flex flex-col py-8" }, Ae = { class: "fm-typo-en-body-md-40
197
197
  _: 1
198
198
  }, 8, ["style", "column-defs", "row-data", "search-value", "loading", "page-size"])
199
199
  ], 2),
200
- (x(), X(he, { to: "body" }, [
200
+ (x(), W(he, { to: "body" }, [
201
201
  i(Pe, _e({
202
202
  scope: n(q).APPROVAL
203
203
  }, {
204
- ...n(s).transferDetailsProps.value,
205
- receivedMap: ((a = n(s).transferDetailsProps.value) == null ? void 0 : a.receivedMap) ?? {}
204
+ ...n(a).transferDetailsProps.value,
205
+ receivedMap: ((r = n(a).transferDetailsProps.value) == null ? void 0 : r.receivedMap) ?? {},
206
+ shipments: n(a).shipments.value ?? []
206
207
  }, {
207
- onSubmitted: n(s).fetchData
208
+ onSubmitted: n(a).fetchData
208
209
  }), null, 16, ["scope", "onSubmitted"])
209
210
  ]))
210
211
  ];
@@ -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-BgZt_9h1.js";
3
- import { a as L, b3 as S } from "./app-B6mXF-3v.js";
2
+ import { _ as V } from "./InventoryBindingForm.vue_vue_type_script_setup_true_lang-NDbtbtqK.js";
3
+ import { a as L, bc as S } from "./app-a9r50k3U.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, b3 as x, a2 as z } from "./app-B6mXF-3v.js";
2
+ import { a as x, bc as M, x as z } from "./app-a9r50k3U.js";
3
3
  const F = {
4
4
  key: 0,
5
5
  class: "flex flex-col gap-16"
@@ -9,7 +9,7 @@ const F = {
9
9
  }, N = /* @__PURE__ */ S({
10
10
  __name: "BindingsPicker",
11
11
  setup(L) {
12
- const d = M(), C = r(() => d.recipes), I = r(() => d.skus), g = l(!0), i = l(new Array()), a = l("RECIPE"), c = r(() => a.value === "SKU" ? I.value.map((s) => ({
12
+ const d = x(), C = r(() => d.recipes), I = r(() => d.skus), g = l(!0), i = l(new Array()), a = l("RECIPE"), c = r(() => a.value === "SKU" ? I.value.map((s) => ({
13
13
  label: s.name,
14
14
  sublabel: s.code,
15
15
  value: s
@@ -62,7 +62,7 @@ const F = {
62
62
  ];
63
63
  }
64
64
  }
65
- }), _ = l(), o = x(B);
65
+ }), _ = l(), o = M(B);
66
66
  async function B() {
67
67
  await d.readInventory(), _.value = o.onMessage(
68
68
  "props:binding-items",
@@ -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, b3 as R } from "./app-B6mXF-3v.js";
2
+ import { F as b, a as P, bc as R } from "./app-a9r50k3U.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({