@feedmepos/mf-inventory-portal 0.0.23-dev.9 → 0.0.24-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 (140) hide show
  1. package/dist/App-D3sNH2MR.js +276 -0
  2. package/dist/{ApprovalView-e85YmdZN.js → ApprovalView-DHnRx0hJ.js} +17 -20
  3. package/dist/{BindingsDialog-giBUD0IH.js → BindingsDialog-oTeg2Dai.js} +6 -6
  4. package/dist/{BindingsPicker-CC4MmPbF.js → BindingsPicker-CWdjmMJ3.js} +8 -9
  5. package/dist/{BindingsTable-WphZdzrA.js → BindingsTable-bKLR1OKX.js} +18 -22
  6. package/dist/ClosingDraftView-CIQVz7lY.js +1225 -0
  7. package/dist/{ClosingTemplateView-1lzoDyet.js → ClosingTemplateView-D5pLzQwU.js} +259 -274
  8. package/dist/FmCustomAttribute.vue_vue_type_script_setup_true_lang-ClLDcchC.js +142 -0
  9. package/dist/{FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-Cv-vvzr5.js → FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-B_c6Vn6P.js} +23 -24
  10. package/dist/{FmUnitInput.vue_vue_type_script_setup_true_lang-DIFQcrc0.js → FmUnitInput.vue_vue_type_script_setup_true_lang-DhpHOaRH.js} +50 -51
  11. package/dist/{IngredientGroupView-UegBM_JK.js → IngredientGroupView-4C437mso.js} +63 -70
  12. package/dist/IngredientsView-DoiGgjre.js +1706 -0
  13. package/dist/{IntegrationView-FYNNzKia.js → IntegrationView-8ZKE7MAM.js} +123 -126
  14. package/dist/{InventoryBindingForm-DsHv_IHG.js → InventoryBindingForm-CcnfliYQ.js} +1 -1
  15. package/dist/{InventoryBindingForm.vue_vue_type_script_setup_true_lang-BURSXafS.js → InventoryBindingForm.vue_vue_type_script_setup_true_lang-B_J-6C9x.js} +116 -108
  16. package/dist/{InventoryBindingSummary-BLb4MRPZ.js → InventoryBindingSummary-CRdHCzNE.js} +1 -1
  17. package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-BG78-DHs.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-B2-TypU0.js} +1 -1
  18. package/dist/{PremiumBadge.vue_vue_type_script_setup_true_lang-CqID5_7v.js → PremiumBadge.vue_vue_type_script_setup_true_lang-BuQde75S.js} +20 -21
  19. package/dist/PublishView-t5gjGmK_.js +192 -0
  20. package/dist/{PurchaseOrderPrintPreview-BBMU3teq.js → PurchaseOrderPrintPreview-6i53Y-v1.js} +13 -14
  21. package/dist/ReceiveRequestView-uOeSh0Mr.js +1866 -0
  22. package/dist/RecipeView-BTWywckD.js +609 -0
  23. package/dist/StockView-DN2xk8ei.js +1817 -0
  24. package/dist/{SupplierView-B2aObtwK.js → SupplierView-l0XUg3J4.js} +185 -196
  25. package/dist/TransferDetails.vue_vue_type_script_setup_true_lang-CWMn6fFf.js +1327 -0
  26. package/dist/TransferTemplateView-wDKXpCWZ.js +1263 -0
  27. package/dist/UnitView-CUI-k-tS.js +648 -0
  28. package/dist/{WarehouseView-G8pej6Y2.js → WarehouseView-WsI_eG5r.js} +190 -197
  29. package/dist/api/adjustment-template.d.ts +25 -0
  30. package/dist/api/bill.d.ts +240 -84
  31. package/dist/api/inventory.d.ts +19 -6
  32. package/dist/api/netsuite.d.ts +3 -3
  33. package/dist/app-DntcWR3_.js +85558 -0
  34. package/dist/app.d.ts +85 -0
  35. package/dist/app.js +2 -2
  36. package/dist/components/FmCustomAttribute.vue.d.ts +23 -0
  37. package/dist/components/FmLockableField.vue.d.ts +37 -0
  38. package/dist/components/FmMultiselectDialogProps.d.ts +1 -0
  39. package/dist/components/inventory-binding/InventoryBinding.vue.d.ts +3 -1
  40. package/dist/components/shell/inventory/binding-ui.vue.d.ts +3 -1
  41. package/dist/composable/defineDeepModel.d.ts +1 -1
  42. package/dist/{decimal-DC07xoJW.js → decimal-DTCTnMwO.js} +1 -1
  43. package/dist/format-unit-display-Hy48Iw5j.js +1215 -0
  44. package/dist/index-Bv9RYyTZ.js +29202 -0
  45. package/dist/{StockView-C5btudss.js → index-D4yJP9I2.js} +2220 -3863
  46. package/dist/layout/SingleColumnLayout.vue.d.ts +1 -0
  47. package/dist/router/name.d.ts +2 -0
  48. package/dist/stock-BsdmfT-b.js +125 -0
  49. package/dist/stores/feature.d.ts +41 -1
  50. package/dist/stores/integration/netsuite.d.ts +3 -2
  51. package/dist/stores/inventory.d.ts +20 -8
  52. package/dist/stores/location.d.ts +29 -1
  53. package/dist/stores/supplier.d.ts +1 -1
  54. package/dist/style.css +1 -1
  55. package/dist/supplier-CXhkgC4M.js +77 -0
  56. package/dist/tsconfig.app.tsbuildinfo +1 -1
  57. package/dist/{use-inventory-binding-dialog-B0G2XYSw.js → use-inventory-binding-dialog-DPMJmBCr.js} +10 -11
  58. package/dist/views/adjustment-template/import/AdjustmentTemplateImport.vue.d.ts +2 -0
  59. package/dist/views/adjustment-template/import/AdjustmentTemplateImportItem.vue.d.ts +18 -0
  60. package/dist/views/adjustment-template/import/export.d.ts +60 -0
  61. package/dist/views/adjustment-template/wastage-template/WastageTemplateDetails.vue.d.ts +2 -0
  62. package/dist/views/adjustment-template/wastage-template/WastageTemplateDialog.vue.d.ts +22 -0
  63. package/dist/views/adjustment-template/wastage-template/WastageTemplatePublish.vue.d.ts +6 -0
  64. package/dist/views/adjustment-template/wastage-template/WastageTemplateReason.vue.d.ts +18 -0
  65. package/dist/views/adjustment-template/wastage-template/WastageTemplateView.vue.d.ts +2 -0
  66. package/dist/views/adjustment-template/wastage-template/actions.d.ts +1377 -0
  67. package/dist/views/adjustment-template/wastage-template/form/WastageTemplateForm.vue.d.ts +16 -0
  68. package/dist/views/adjustment-template/wastage-template/form/WastageTemplateItemTable.vue.d.ts +35 -0
  69. package/dist/views/adjustment-template/wastage-template/form/useAdjustmentTemplateItems.d.ts +20 -0
  70. package/dist/views/adjustment-template/wastage-template/props.d.ts +36 -0
  71. package/dist/views/adjustment-template/wastage-template/table.d.ts +1351 -0
  72. package/dist/views/closing-draft/components/closing-draft-dialog/ClosingDraftDialog.vue.d.ts +198 -12
  73. package/dist/views/closing-draft/composables/use-closing-draft-actions.d.ts +7 -4
  74. package/dist/views/closing-draft/composables/use-closing-draft-table.d.ts +1559 -467
  75. package/dist/views/closing-draft/helpers/export-draft.helper.d.ts +19 -0
  76. package/dist/views/closing-draft/helpers/get-calculated-total.helper.d.ts +4 -0
  77. package/dist/views/closing-template/components/closing-template-form/composables/use-closing-template-items.d.ts +2 -1
  78. package/dist/views/closing-template/composables/use-closing-template-actions.d.ts +72 -12
  79. package/dist/views/closing-template/composables/use-closing-template-table.d.ts +73 -13
  80. package/dist/views/ingredient-group/composables/use-ingredient-group-table.d.ts +6 -3
  81. package/dist/views/ingredients/components/convert/ConvertFormProps.d.ts +1 -0
  82. package/dist/views/ingredients/components/ingredient-form/IngredientForm.vue.d.ts +4 -2
  83. package/dist/views/ingredients/components/inventory-binding/InventoryBindingForm.vue.d.ts +1 -0
  84. package/dist/views/ingredients/composables/use-ingredient-table.d.ts +2 -1
  85. package/dist/views/publish/PublishView.vue.d.ts +2 -0
  86. package/dist/views/receive-request/components/netsuite/NetSuiteInfo.vue.d.ts +12 -0
  87. package/dist/views/receive-request/components/netsuite/NetSuiteProps.d.ts +13 -0
  88. package/dist/views/receive-request/components/netsuite/NetSuiteSync.vue.d.ts +12 -0
  89. package/dist/views/receive-request/components/transfer-form/NetSuiteField.vue.d.ts +13 -0
  90. package/dist/views/receive-request/components/transfer-form/SparkIcon.vue.d.ts +1 -1
  91. package/dist/views/receive-request/components/transfer-form/TransferForm.vue.d.ts +86 -17
  92. package/dist/views/receive-request/components/transfer-form/components/ForecastStock.vue.d.ts +4 -2
  93. package/dist/views/receive-request/components/transfer-form/composables/use-transfer-items.d.ts +2 -1
  94. package/dist/views/receive-request/composables/use-receive-request-form.d.ts +126 -24
  95. package/dist/views/receive-request/composables/use-receive-request-table.d.ts +126 -24
  96. package/dist/views/recipe/components/recipe-form/RecipeForm.vue.d.ts +2 -0
  97. package/dist/views/stock/components/StockRecordCard.vue.d.ts +120 -42
  98. package/dist/views/stock/components/dialog/AdjustedItemForm.vue.d.ts +6 -4
  99. package/dist/views/stock/helper/compute-summary-total.d.ts +2 -2
  100. package/dist/views/transfer-template/components/transfer-template-form/composables/use-template-enabled-locations.d.ts +4 -0
  101. package/dist/views/transfer-template/components/transfer-template-form/composables/use-transfer-template-items.d.ts +2 -1
  102. package/dist/views/transfer-template/composables/use-transfer-template-actions.d.ts +72 -12
  103. package/dist/views/transfer-template/composables/use-transfer-template-table.d.ts +72 -12
  104. package/dist/views/transfer-template/helpers/import-export.helper.d.ts +2 -1
  105. package/dist/vue-i18n-ByVzHsI7.js +2365 -0
  106. package/package.json +5 -4
  107. package/dist/App-ByLgARNp.js +0 -259
  108. package/dist/ClosingDraftView-CQM1Sx45.js +0 -755
  109. package/dist/FmDroppableField-8RzKjEdL.js +0 -154
  110. package/dist/FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-BvkN-71q.js +0 -436
  111. package/dist/FmMultiselectDialog-DScMA6iG.js +0 -415
  112. package/dist/IngredientBindedItem.vue_vue_type_script_setup_true_lang-t4pim_k9.js +0 -51
  113. package/dist/IngredientsView-BfW-jZLM.js +0 -1666
  114. package/dist/ReceiveRequestView-vbANEzne.js +0 -4165
  115. package/dist/RecipeView-DW4DY0C0.js +0 -598
  116. package/dist/TableActionableRow.vue_vue_type_script_setup_true_lang-DlNJ6kRg.js +0 -135
  117. package/dist/TransferDetails.vue_vue_type_script_setup_true_lang-B2LOvVef.js +0 -1229
  118. package/dist/TransferTemplateView-BKumN_p6.js +0 -1262
  119. package/dist/UnitView-CHLucv9s.js +0 -648
  120. package/dist/_plugin-vue_export-helper-CHgC5LLL.js +0 -9
  121. package/dist/app-BXjk74IB.js +0 -33538
  122. package/dist/date2-CWAt9bRf.js +0 -117
  123. package/dist/dayjs.min-D3jPOnu6.js +0 -282
  124. package/dist/defineDeepModel-CiD4GtOw.js +0 -13
  125. package/dist/feature-6tcLMotY.js +0 -92
  126. package/dist/form-mode.enum-BKiNVH6A.js +0 -4
  127. package/dist/format-time-from-id-CYU5Z9Mt.js +0 -15
  128. package/dist/format-unit-display-CY-0bznr.js +0 -1217
  129. package/dist/fuzzy-BMkhNYLR.js +0 -41
  130. package/dist/index-BXwQa14X.js +0 -45
  131. package/dist/index-CRLd5xyg.js +0 -22283
  132. package/dist/index-DqwAtOgI.js +0 -12087
  133. package/dist/netsuite-fYUUk_ss.js +0 -225
  134. package/dist/row-action.enum-7rGLGZ5v.js +0 -55
  135. package/dist/rules-BmRGm3yv.js +0 -203
  136. package/dist/stock-CEX0DP2B.js +0 -111
  137. package/dist/supplier-CdJmZr7w.js +0 -77
  138. package/dist/use-template-enabled-locations-2-xbPJWHCs.js +0 -86
  139. package/dist/xlsx-CTOKp7SQ.js +0 -24004
  140. package/dist/xlsx.util-D5NFSfDg.js +0 -78
@@ -0,0 +1,276 @@
1
+ import { ref as x, onUnmounted as F, defineComponent as h, watch as P, onMounted as U, computed as g, resolveComponent as b, openBlock as S, createElementBlock as I, unref as v, createVNode as _, createElementVNode as p, toDisplayString as w, createBlock as G, createCommentVNode as M } from "vue";
2
+ import { u as k, a as D, b as H, R as e, c as B, g as s, d as W } from "./app-DntcWR3_.js";
3
+ import { useCoreStore as A, useI18n as O } from "@feedmepos/mf-common";
4
+ import { useRouter as C, useRoute as K } from "vue-router";
5
+ import { u as $ } from "./useTabStorage-BkIVScW_.js";
6
+ import { u as Q } from "./googlemap-Dm8ERVai.js";
7
+ import "./array-hChJVZLE.js";
8
+ function j() {
9
+ return {
10
+ loadingHookInstalled: !1,
11
+ isLoading: !1
12
+ };
13
+ }
14
+ const E = x(j());
15
+ function z() {
16
+ const l = C();
17
+ if (!E.value.loadingHookInstalled) {
18
+ E.value.loadingHookInstalled = !0;
19
+ const n = l.beforeEach(() => {
20
+ E.value.isLoading = !0;
21
+ }), i = l.afterEach(() => {
22
+ E.value.isLoading = !1;
23
+ });
24
+ F(() => {
25
+ E.value.loadingHookInstalled = !1, n(), i();
26
+ });
27
+ }
28
+ return {
29
+ get isLoading() {
30
+ return E.value.isLoading;
31
+ }
32
+ };
33
+ }
34
+ const q = {
35
+ key: 0,
36
+ class: "flex flex-col items-center w-full h-full gap-24"
37
+ }, J = {
38
+ key: 1,
39
+ class: "flex flex-col pt-[200px] gap-32 items-center"
40
+ }, X = { class: "flex flex-col gap-12 items-center text-center px-24 max-w-[1000px]" }, Y = { class: "fm-typo-en-title-lg-600" }, Z = { class: "text-fm-color-typo-secondary fm-typo-en-body-md-400" }, ee = { class: "flex gap-16" }, te = { href: "https://feedme.ai/product/inventory/features?tab=plans_%26_prices" }, oe = { href: "https://feedme.ai/form" }, ne = /* @__PURE__ */ h({
41
+ __name: "InventoryView",
42
+ setup(l) {
43
+ const n = k(), i = D(), u = H(), r = A(), c = C(), o = z(), R = B(), { t: d } = O();
44
+ P(
45
+ [() => r.sessionUser.value, () => r.currentBusiness.value],
46
+ ([t, a]) => {
47
+ f(t, a);
48
+ }
49
+ ), U(async () => {
50
+ await R.init(), await r.readBusinesses();
51
+ const t = r.sessionUser.value, a = r.currentBusiness.value;
52
+ f(t, a);
53
+ });
54
+ function f(t, a) {
55
+ !t || !a || T();
56
+ }
57
+ async function T() {
58
+ return await n.init(), await u.readSetting().catch((t) => {
59
+ console.error("error on reading netsuite store", t);
60
+ }), await i.init();
61
+ }
62
+ const y = g(() => c.currentRoute.value.name === e.TRANSFER_TEMPLATE ? R.enablePoTemplate : !0);
63
+ return (t, a) => {
64
+ const m = b("FmSpacer"), N = b("FmCircularProgress"), L = b("FmButton"), V = b("RouterView");
65
+ return S(), I("div", null, [
66
+ v(o).isLoading ? (S(), I("div", q, [
67
+ _(m),
68
+ p("div", null, [
69
+ _(N, { size: "xl" })
70
+ ]),
71
+ a[0] || (a[0] = p("div", { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary pl-8" }, "Loading page...", -1)),
72
+ _(m)
73
+ ])) : y.value ? v(r).sessionUser.value ? (S(), G(V, { key: 2 })) : M("", !0) : (S(), I("div", J, [
74
+ p("div", X, [
75
+ p("div", Y, w(v(d)("inventory.common.proPlan.title")), 1),
76
+ p("div", Z, w(v(d)("inventory.common.proPlan.subtitle")), 1)
77
+ ]),
78
+ p("div", ee, [
79
+ p("a", te, [
80
+ _(L, {
81
+ label: v(d)("inventory.common.proPlan.comparePlans"),
82
+ variant: "secondary"
83
+ }, null, 8, ["label"])
84
+ ]),
85
+ p("a", oe, [
86
+ _(L, {
87
+ label: v(d)("inventory.common.proPlan.callUs"),
88
+ "prepend-icon": "call"
89
+ }, null, 8, ["label"])
90
+ ])
91
+ ])
92
+ ]))
93
+ ]);
94
+ };
95
+ }
96
+ }), ae = { class: "h-full flex flex-col overflow-auto py-16" }, re = /* @__PURE__ */ h({
97
+ __name: "NavigationTab",
98
+ setup(l) {
99
+ const n = K(), i = C(), u = A(), r = B(), c = $(), { t: o } = O();
100
+ P([() => u.currentBusiness.value, () => n.name], ([t, a]) => {
101
+ (t == null ? void 0 : t.menuVersion) === "v3" && (a === e.INGREDIENTS || a === e.RECIPE || a === e.UNIT) && i.push({ name: e.STOCK });
102
+ });
103
+ const R = g(() => {
104
+ var a;
105
+ const t = [
106
+ {
107
+ label: s(e.STOCK, o),
108
+ // icon: 'inventory_2',
109
+ children: [
110
+ {
111
+ label: "Stock balance",
112
+ value: e.STOCK
113
+ },
114
+ ...r.enableWastageTemplate ? [
115
+ {
116
+ label: s(e.WASTAGE_TEMPLATE, o),
117
+ value: e.WASTAGE_TEMPLATE
118
+ }
119
+ ] : []
120
+ ]
121
+ },
122
+ ...r.enableClosingTemplate ? [
123
+ {
124
+ label: "Closing",
125
+ children: [
126
+ {
127
+ label: s(e.CLOSING_TEMPLATE, o),
128
+ value: e.CLOSING_TEMPLATE
129
+ },
130
+ {
131
+ label: s(e.CLOSING_DRAFT, o),
132
+ value: e.CLOSING_DRAFT
133
+ }
134
+ ]
135
+ }
136
+ ] : [],
137
+ {
138
+ label: s(e.INGREDIENTS, o),
139
+ // icon: 'grocery',
140
+ value: e.INGREDIENTS
141
+ },
142
+ ...r.enableIngredientGroup ? [
143
+ {
144
+ label: s(e.INGREDIENT_GROUP, o),
145
+ // icon: 'grocery',
146
+ value: e.INGREDIENT_GROUP
147
+ }
148
+ ] : [],
149
+ {
150
+ label: s(e.RECIPE, o),
151
+ // icon: 'weight',
152
+ value: e.RECIPE
153
+ },
154
+ {
155
+ label: s(e.UNIT, o),
156
+ // icon: 'fastfood',
157
+ value: e.UNIT
158
+ },
159
+ {
160
+ label: o("inventory.transfer.title"),
161
+ // icon: 'swap_horiz',
162
+ children: [
163
+ {
164
+ label: s(e.RECEIVE_REQUEST, o),
165
+ value: e.RECEIVE_REQUEST
166
+ },
167
+ {
168
+ label: s(e.APPROVAL, o),
169
+ value: e.APPROVAL
170
+ },
171
+ ...r.enablePoTemplate ? [
172
+ {
173
+ label: s(e.TRANSFER_TEMPLATE, o),
174
+ value: e.TRANSFER_TEMPLATE
175
+ }
176
+ ] : []
177
+ ]
178
+ },
179
+ {
180
+ label: s(e.SUPPLIER, o),
181
+ // icon: 'group',
182
+ value: e.SUPPLIER
183
+ },
184
+ {
185
+ label: s(e.WAREHOUSE, o),
186
+ // icon: 'warehouse',
187
+ value: e.WAREHOUSE
188
+ },
189
+ {
190
+ label: s(e.PUBLISH, o),
191
+ value: e.PUBLISH
192
+ },
193
+ {
194
+ label: s(e.INTEGRATION, o),
195
+ // icon: 'integration_instructions',
196
+ value: e.INTEGRATION
197
+ }
198
+ ];
199
+ return ((a = u.currentBusiness.value) == null ? void 0 : a.menuVersion) === "v3" ? t.filter(
200
+ (m) => m.value !== e.INGREDIENTS && m.value !== e.RECIPE && m.value !== e.UNIT
201
+ ) : t;
202
+ }), d = g({
203
+ get() {
204
+ if (n.name)
205
+ return String(n.name);
206
+ },
207
+ set(t) {
208
+ t && i.push({ name: t });
209
+ }
210
+ }), f = g(
211
+ () => {
212
+ var t;
213
+ return `NavigationTab.${(t = u.currentBusiness.value) == null ? void 0 : t._id}`;
214
+ }
215
+ ), T = x(!1), y = g({
216
+ get() {
217
+ return T.value;
218
+ },
219
+ set(t) {
220
+ T.value = t, t || c.setItem(f.value, "true");
221
+ }
222
+ });
223
+ return P([() => f.value], () => {
224
+ T.value = !1, setTimeout(() => {
225
+ y.value = !c.getItem(f.value);
226
+ }, 2e3);
227
+ }), (t, a) => {
228
+ const m = b("FmCollapsibleTabs");
229
+ return S(), I("div", ae, [
230
+ _(m, {
231
+ modelValue: d.value,
232
+ "onUpdate:modelValue": a[0] || (a[0] = (N) => d.value = N),
233
+ items: R.value
234
+ }, null, 8, ["modelValue", "items"])
235
+ ]);
236
+ };
237
+ }
238
+ });
239
+ typeof Promise.withResolvers > "u" && (Promise.withResolvers = () => {
240
+ let l, n;
241
+ return { promise: new Promise((u, r) => {
242
+ l = u, n = r;
243
+ }), resolve: l, reject: n };
244
+ });
245
+ typeof Promise.prototype.delayed > "u" && (Promise.prototype.delayed = async function(l) {
246
+ return await new Promise((n) => setTimeout(n, l)), Promise.resolve(this);
247
+ });
248
+ const de = /* @__PURE__ */ h({
249
+ __name: "App",
250
+ setup(l) {
251
+ const n = A(), i = Q(), u = W();
252
+ U(() => {
253
+ if (window.location.href.includes("print-preview")) {
254
+ n.setEmbedded(!0);
255
+ return;
256
+ }
257
+ n.registerSidebarComponent(re), i.initGoogleMap(u.appApi.googleMap).catch(() => {
258
+ console.error("Google map cannot be loaded");
259
+ });
260
+ }), P([() => n.currentCountry.value], () => {
261
+ r();
262
+ });
263
+ async function r() {
264
+ var c;
265
+ try {
266
+ await n.readBusinesses(), n.currentBusiness.value = (c = n.businesses.value) == null ? void 0 : c.find((o) => o);
267
+ } catch (o) {
268
+ console.error("error when trying to reset businesses:", o);
269
+ }
270
+ }
271
+ return (c, o) => (S(), G(ne));
272
+ }
273
+ });
274
+ export {
275
+ de as default
276
+ };
@@ -1,18 +1,15 @@
1
- import { defineComponent as ae, ref as g, watch as oe, computed as b, resolveComponent as re, openBlock as x, createBlock as J, unref as e, withCtx as y, createElementVNode as s, normalizeClass as ne, createVNode as n, normalizeStyle as se, toDisplayString as le, createElementBlock as ce, createCommentVNode as ie, Teleport as pe, mergeProps as ue } from "vue";
2
- import { u as me, z as v } from "./app-BXjk74IB.js";
3
- import { b as de, u as fe, _ as ve, a as _e } from "./FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-BvkN-71q.js";
4
- import { a as he, b as De, _ as ge } from "./TransferDetails.vue_vue_type_script_setup_true_lang-B2LOvVef.js";
5
- import { c as K } from "./date2-CWAt9bRf.js";
6
- import { _ as be, F as _ } from "./TableActionableRow.vue_vue_type_script_setup_true_lang-DlNJ6kRg.js";
1
+ import { defineComponent as ae, ref as g, watch as oe, computed as b, resolveComponent as re, openBlock as x, createBlock as J, unref as e, withCtx as y, createElementVNode as s, normalizeClass as ne, createVNode as n, normalizeStyle as se, toDisplayString as le, createElementBlock as ce, createCommentVNode as ie, Teleport as ue, mergeProps as pe } from "vue";
2
+ import { u as me, av as v, aF as de, a8 as K, z as fe, _ as ve, B as _e, E as he, G as _ } from "./app-DntcWR3_.js";
3
+ import { a as De, b as ge, _ as be } from "./TransferDetails.vue_vue_type_script_setup_true_lang-CWMn6fFf.js";
7
4
  import { useBreakpoints as xe } from "@feedmepos/ui-library";
8
5
  import { useI18n as ye } from "@feedmepos/mf-common";
9
6
  const we = { class: "flex flex-col py-8" }, Re = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, ke = { class: "fm-typo-en-body-lg-600 text-fm-color-typo-primary line-clamp-1" }, Oe = { class: "fm-typo-en-body-md-400 text-fm-color-typo-primary line-clamp-1" }, Se = {
10
7
  key: 0,
11
8
  class: "fm-typo-en-body-md-400 text-fm-color-typo-primary line-clamp-1"
12
- }, Te = { class: "pt-8" }, Ne = /* @__PURE__ */ ae({
9
+ }, Te = { class: "pt-8" }, Ye = /* @__PURE__ */ ae({
13
10
  __name: "ApprovalView",
14
11
  setup(Ce) {
15
- const o = he("approval"), { columnDefs: Q } = De("approval", o), W = me();
12
+ const o = De("approval"), { columnDefs: Q } = ge("approval", o), W = me();
16
13
  v.object({
17
14
  name: v.string().optional().nullable(),
18
15
  start: v.date().optional().nullable(),
@@ -83,12 +80,12 @@ const we = { class: "flex flex-col py-8" }, Re = { class: "fm-typo-en-body-md-40
83
80
  "page-size": X.value
84
81
  }, {
85
82
  "list-row": y((r) => [
86
- n(be, {
83
+ n(he, {
87
84
  row: r,
88
85
  onRowClick: (t) => e(o).promptShowTransferDetails(t.purchaseOrder, t)
89
86
  }, {
90
87
  default: y((t) => {
91
- var O, S, T, i, C, z, F, M, p, $, V, u, Y, m, q, L, N, P, j, d, A, E, H, U, f, G;
88
+ var O, S, T, i, C, z, F, M, u, $, V, p, Y, m, q, E, L, N, P, d, j, A, H, G, f, U;
92
89
  return [
93
90
  s("div", we, [
94
91
  s("div", Re, [
@@ -100,20 +97,20 @@ const we = { class: "flex flex-col py-8" }, Re = { class: "fm-typo-en-body-md-40
100
97
  s("div", ke, [
101
98
  n(e(_), {
102
99
  render: (M = (F = (z = t.to_name) == null ? void 0 : z.column) == null ? void 0 : F.columnDef) == null ? void 0 : M.cell,
103
- props: ($ = (p = t.to_name) == null ? void 0 : p.getContext) == null ? void 0 : $.call(p)
100
+ props: ($ = (u = t.to_name) == null ? void 0 : u.getContext) == null ? void 0 : $.call(u)
104
101
  }, null, 8, ["render", "props"])
105
102
  ]),
106
- s("div", Oe, le((q = (m = (Y = (u = (V = r.original.purchaseOrder) == null ? void 0 : V.items) == null ? void 0 : u.map) == null ? void 0 : Y.call(u, (te) => `${te.name}`)) == null ? void 0 : m.join) == null ? void 0 : q.call(m, ", ")), 1),
107
- (L = r.original.purchaseOrder) != null && L.ref ? (x(), ce("div", Se, [
103
+ s("div", Oe, le((q = (m = (Y = (p = (V = r.original.purchaseOrder) == null ? void 0 : V.items) == null ? void 0 : p.map) == null ? void 0 : Y.call(p, (te) => `${te.name}`)) == null ? void 0 : m.join) == null ? void 0 : q.call(m, ", ")), 1),
104
+ (E = r.original.purchaseOrder) != null && E.ref ? (x(), ce("div", Se, [
108
105
  n(e(_), {
109
- render: (j = (P = (N = t.purchaseOrder_ref) == null ? void 0 : N.column) == null ? void 0 : P.columnDef) == null ? void 0 : j.cell,
110
- props: (A = (d = t.purchaseOrder_ref) == null ? void 0 : d.getContext) == null ? void 0 : A.call(d)
106
+ render: (P = (N = (L = t.purchaseOrder_ref) == null ? void 0 : L.column) == null ? void 0 : N.columnDef) == null ? void 0 : P.cell,
107
+ props: (j = (d = t.purchaseOrder_ref) == null ? void 0 : d.getContext) == null ? void 0 : j.call(d)
111
108
  }, null, 8, ["render", "props"])
112
109
  ])) : ie("", !0),
113
110
  s("div", Te, [
114
111
  n(e(_), {
115
- render: (U = (H = (E = t.purchaseOrder_status) == null ? void 0 : E.column) == null ? void 0 : H.columnDef) == null ? void 0 : U.cell,
116
- props: (G = (f = t.purchaseOrder_status) == null ? void 0 : f.getContext) == null ? void 0 : G.call(f)
112
+ render: (G = (H = (A = t.purchaseOrder_status) == null ? void 0 : A.column) == null ? void 0 : H.columnDef) == null ? void 0 : G.cell,
113
+ props: (U = (f = t.purchaseOrder_status) == null ? void 0 : f.getContext) == null ? void 0 : U.call(f)
117
114
  }, null, 8, ["render", "props"])
118
115
  ])
119
116
  ])
@@ -125,8 +122,8 @@ const we = { class: "flex flex-col py-8" }, Re = { class: "fm-typo-en-body-md-40
125
122
  _: 1
126
123
  }, 8, ["style", "column-defs", "row-data", "search-value", "loading", "page-size"])
127
124
  ], 2),
128
- (x(), J(pe, { to: "body" }, [
129
- n(ge, ue(e(o).transferDetailsProps.value, {
125
+ (x(), J(ue, { to: "body" }, [
126
+ n(be, pe(e(o).transferDetailsProps.value, {
130
127
  onSubmitted: e(o).fetchData
131
128
  }), null, 16, ["onSubmitted"])
132
129
  ]))
@@ -137,5 +134,5 @@ const we = { class: "flex flex-col py-8" }, Re = { class: "fm-typo-en-body-md-40
137
134
  }
138
135
  });
139
136
  export {
140
- Ne as default
137
+ Ye as default
141
138
  };
@@ -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-BURSXafS.js";
3
- import { a as L, J as S } from "./app-BXjk74IB.js";
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 L } from "vue";
2
+ import { _ as P } from "./InventoryBindingForm.vue_vue_type_script_setup_true_lang-B_J-6C9x.js";
3
+ import { a as V, aL as S } from "./app-DntcWR3_.js";
4
4
  const U = {
5
5
  key: 0,
6
6
  class: "flex justify-end gap-8 items-center"
@@ -10,7 +10,7 @@ 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 = V(), d = o(!0), s = o(new Array()), u = o(), t = S(y);
14
14
  async function y() {
15
15
  await p.readInventory(), u.value = t.onMessage("props:inventory-bindings", (e) => {
16
16
  d.value = !1, s.value = e;
@@ -55,7 +55,7 @@ const U = {
55
55
  }, [
56
56
  d.value ? (i(), c("div", E, [
57
57
  a(h, { size: "md" }),
58
- n[2] || (n[2] = P("div", null, "Loading bindings dialog...", -1))
58
+ n[2] || (n[2] = L("div", null, "Loading bindings dialog...", -1))
59
59
  ])) : (i(), I(B, {
60
60
  key: 0,
61
61
  onValidationSuccess: n[1] || (n[1] = () => r.value ? void 0 : b()),
@@ -64,7 +64,7 @@ const U = {
64
64
  class: "flex flex-col gap-16"
65
65
  }, {
66
66
  default: R(() => [
67
- a(V, {
67
+ a(P, {
68
68
  "model-value": s.value,
69
69
  "onUpdate:modelValue": n[0] || (n[0] = (w) => s.value = w),
70
70
  "iframe-mode": "",
@@ -1,16 +1,15 @@
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 { F as M } from "./FmMultiselectDialog-DScMA6iG.js";
3
- import { a as x, J as F } from "./app-BXjk74IB.js";
4
- const z = {
2
+ import { a as M, aL as x, J as z } from "./app-DntcWR3_.js";
3
+ const F = {
5
4
  key: 0,
6
5
  class: "flex flex-col gap-16"
7
6
  }, K = { class: "flex justify-end gap-8 items-center" }, w = {
8
7
  key: 1,
9
8
  class: "p-24 flex items-center justify-center gap-16"
10
- }, A = /* @__PURE__ */ S({
9
+ }, N = /* @__PURE__ */ S({
11
10
  __name: "BindingsPicker",
12
11
  setup(L) {
13
- 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) => ({
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) => ({
14
13
  label: s.name,
15
14
  sublabel: s.code,
16
15
  value: s
@@ -63,7 +62,7 @@ const z = {
63
62
  ];
64
63
  }
65
64
  }
66
- }), _ = l(), o = F(B);
65
+ }), _ = l(), o = x(B);
67
66
  async function B() {
68
67
  await d.readInventory(), _.value = o.onMessage(
69
68
  "props:binding-items",
@@ -97,8 +96,8 @@ const z = {
97
96
  g.value ? (p(), f("div", w, [
98
97
  u(t, { size: "md" }),
99
98
  s[1] || (s[1] = k("div", null, "Loading bindings dialog...", -1))
100
- ])) : (p(), f("div", z, [
101
- u(M, {
99
+ ])) : (p(), f("div", F, [
100
+ u(z, {
102
101
  "model-value": b.value,
103
102
  "onUpdate:modelValue": s[0] || (s[0] = (m) => b.value = m),
104
103
  items: c.value
@@ -120,5 +119,5 @@ const z = {
120
119
  }
121
120
  });
122
121
  export {
123
- A as default
122
+ N as default
124
123
  };
@@ -1,11 +1,7 @@
1
- import { defineComponent as _, ref as c, provide as C, computed as f, resolveComponent as b, openBlock as p, createBlock as h, h as z, onMounted as B, onUnmounted as I, createElementBlock as y, createVNode as N, createElementVNode as x } from "vue";
2
- import { F as v, a as E, J as F } from "./app-BXjk74IB.js";
3
- import "./index-CRLd5xyg.js";
4
- import { components as L } from "@feedmepos/ui-library";
5
- import "./fuzzy-BMkhNYLR.js";
6
- /* empty css */
1
+ import { defineComponent as _, ref as c, provide as C, computed as f, resolveComponent as b, openBlock as p, createBlock as h, h as z, onMounted as B, onUnmounted as I, createElementBlock as y, createVNode as N, createElementVNode as L } from "vue";
2
+ import { F as v, a as x, aL as E } from "./app-DntcWR3_.js";
3
+ import { components as F } from "@feedmepos/ui-library";
7
4
  import "@feedmepos/mf-common";
8
- import "./dayjs.min-D3jPOnu6.js";
9
5
  const P = /* @__PURE__ */ _({
10
6
  __name: "binding-ui",
11
7
  props: {
@@ -26,17 +22,17 @@ const P = /* @__PURE__ */ _({
26
22
  C("closeDialog", () => {
27
23
  u.value.isOpen = !u.value.isOpen;
28
24
  });
29
- const s = k, m = d, a = f(() => s.items.map((e) => ({
25
+ const o = k, m = d, a = f(() => o.items.map((e) => ({
30
26
  key: e.key,
31
27
  name: e.name,
32
28
  _skuLinked: e.bindings.filter(
33
- ({ type: n, id: o }) => n === v.enum.SKU && s.skus.some((l) => l._id === o)
29
+ ({ type: n, id: s }) => n === v.enum.SKU && o.skus.some((l) => l._id === s)
34
30
  ).length,
35
31
  _recipeLinked: e.bindings.filter(
36
- ({ type: n, id: o }) => n === v.enum.RECIPE && s.recipes.some((l) => l._id === o)
32
+ ({ type: n, id: s }) => n === v.enum.RECIPE && o.recipes.some((l) => l._id === s)
37
33
  ).length,
38
34
  onUpdate: async () => {
39
- s.editable && m("click:open-binding-dialog", s.type, e);
35
+ o.editable && m("click:open-binding-dialog", o.type, e);
40
36
  }
41
37
  }))), g = [
42
38
  {
@@ -49,7 +45,7 @@ const P = /* @__PURE__ */ _({
49
45
  header: "Ingredient",
50
46
  size: 200,
51
47
  cell(i) {
52
- const e = a.value.find((o) => o.key === i.row.original.key), n = e == null ? void 0 : e._skuLinked;
48
+ const e = a.value.find((s) => s.key === i.row.original.key), n = e == null ? void 0 : e._skuLinked;
53
49
  return n === 1 ? "1 item" : n ? `${n} items` : "Not set";
54
50
  }
55
51
  },
@@ -58,7 +54,7 @@ const P = /* @__PURE__ */ _({
58
54
  header: "Recipe",
59
55
  size: 200,
60
56
  cell(i) {
61
- const e = a.value.find((o) => o.key === i.row.original.key), n = e == null ? void 0 : e._recipeLinked;
57
+ const e = a.value.find((s) => s.key === i.row.original.key), n = e == null ? void 0 : e._recipeLinked;
62
58
  return n === 1 ? "1 item" : n ? `${n} items` : "Not set";
63
59
  }
64
60
  },
@@ -68,7 +64,7 @@ const P = /* @__PURE__ */ _({
68
64
  size: 24,
69
65
  cell(i) {
70
66
  const e = a.value.find((n) => n.key === i.row.original.key);
71
- return z(L.FmButton, {
67
+ return z(F.FmButton, {
72
68
  icon: "edit",
73
69
  bgColor: "white",
74
70
  textColor: "neutral-grey-400",
@@ -94,19 +90,19 @@ const P = /* @__PURE__ */ _({
94
90
  }), R = {
95
91
  key: 1,
96
92
  class: "p-24 flex items-center justify-center gap-16"
97
- }, S = /* @__PURE__ */ _({
93
+ }, D = /* @__PURE__ */ _({
98
94
  __name: "BindingsTable",
99
95
  setup(k) {
100
- const d = E(), u = c(!0), s = c(new Array()), m = f(() => d.recipes), a = f(() => d.skus), g = c(""), i = F(n), e = c();
96
+ const d = x(), u = c(!0), o = c(new Array()), m = f(() => d.recipes), a = f(() => d.skus), g = c(""), i = E(n), e = c();
101
97
  async function n() {
102
98
  await d.readInventory(), e.value = i.onMessage(
103
99
  "props:grouped-bindings",
104
100
  (t) => {
105
- u.value = !1, s.value = t;
101
+ u.value = !1, o.value = t;
106
102
  }
107
103
  ), i.sendMessage("props:grouped-bindings");
108
104
  }
109
- async function o(t, r) {
105
+ async function s(t, r) {
110
106
  i.sendMessage("@click:open-binding-dialog", {
111
107
  key: t,
112
108
  binding: r
@@ -130,20 +126,20 @@ const P = /* @__PURE__ */ _({
130
126
  }, [
131
127
  u.value ? (p(), y("div", R, [
132
128
  N(w, { size: "md" }),
133
- r[0] || (r[0] = x("div", null, "Loading bindings table...", -1))
129
+ r[0] || (r[0] = L("div", null, "Loading bindings table...", -1))
134
130
  ])) : (p(), h(P, {
135
131
  key: 0,
136
- items: s.value,
132
+ items: o.value,
137
133
  recipes: m.value,
138
134
  skus: a.value,
139
135
  type: g.value,
140
136
  editable: "",
141
- "onClick:openBindingDialog": o
137
+ "onClick:openBindingDialog": s
142
138
  }, null, 8, ["items", "recipes", "skus", "type"]))
143
139
  ], 512);
144
140
  };
145
141
  }
146
142
  });
147
143
  export {
148
- S as default
144
+ D as default
149
145
  };