@feedmepos/mf-inventory-portal 0.0.22-dev.9 → 0.0.23-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 (163) hide show
  1. package/dist/App-Y3Ez8Rjf.js +255 -0
  2. package/dist/ApprovalView-BUU1G4Q2.js +141 -0
  3. package/dist/{BindingsDialog-GzX9Bo2g.js → BindingsDialog-8wc4Q0JQ.js} +13 -12
  4. package/dist/{BindingsPicker-SbOetc0-.js → BindingsPicker-DGWN1LQc.js} +19 -18
  5. package/dist/{BindingsTable-CAcE5y8U.js → BindingsTable-7NJP2jT6.js} +20 -16
  6. package/dist/ClosingTemplateView-9s7vmwaT.js +1833 -0
  7. package/dist/FmDroppableField-8RzKjEdL.js +154 -0
  8. package/dist/FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-B4DDh9-a.js +267 -0
  9. package/dist/FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-5DINn0ZB.js +436 -0
  10. package/dist/FmMultiselectDialog-7hok9sJP.js +411 -0
  11. package/dist/FmUnitInput.vue_vue_type_script_setup_true_lang-CxR1FCft.js +326 -0
  12. package/dist/IngredientBindedItem.vue_vue_type_script_setup_true_lang-FQ0HjuL3.js +51 -0
  13. package/dist/IngredientGroupView-C3maHTCg.js +610 -0
  14. package/dist/IngredientsView-DCR3IBkR.js +1613 -0
  15. package/dist/IntegrationView-gO4h89Wj.js +1227 -0
  16. package/dist/InventoryBindingForm-dh3GeyG-.js +4 -0
  17. package/dist/InventoryBindingForm.vue_vue_type_script_setup_true_lang-CJuo3i7W.js +278 -0
  18. package/dist/InventoryBindingSummary-BPoPcEoe.js +75 -0
  19. package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-1FCwvO8A.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-olm8sZKt.js} +1 -1
  20. package/dist/PremiumBadge.vue_vue_type_script_setup_true_lang-BezTV43V.js +116 -0
  21. package/dist/{PurchaseOrderPrintPreview-5HIWHR_f.js → PurchaseOrderPrintPreview-Dix_fIoo.js} +14 -13
  22. package/dist/ReceiveRequestView-DdPiYb2P.js +4082 -0
  23. package/dist/RecipeView-C4-a4IEW.js +597 -0
  24. package/dist/Standalone.vue.d.ts +2 -0
  25. package/dist/StockView-Du2txrIP.js +7778 -0
  26. package/dist/SupplierView-D_09FbQh.js +1474 -0
  27. package/dist/TransferDetails.vue_vue_type_script_setup_true_lang-C9MOos--.js +1144 -0
  28. package/dist/TransferTemplateView-j3CRy6Lc.js +1262 -0
  29. package/dist/{UnitView-BpU0Yk7X.js → UnitView-BXw2Vwq1.js} +30 -29
  30. package/dist/{WarehouseView-DqxWgogc.js → WarehouseView-CKamiETC.js} +205 -202
  31. package/dist/_plugin-vue_export-helper-CHgC5LLL.js +9 -0
  32. package/dist/api/bill.d.ts +86 -240
  33. package/dist/api/closing-template.d.ts +6 -4
  34. package/dist/api/inventory.d.ts +281 -88
  35. package/dist/api/netsuite.d.ts +32 -1
  36. package/dist/api/purchase-order-template.d.ts +4 -2
  37. package/dist/api/supplier.d.ts +1 -0
  38. package/dist/app-GUbzqEtW.js +33456 -0
  39. package/dist/app.d.ts +259 -6
  40. package/dist/app.js +8 -7
  41. package/dist/array-hChJVZLE.js +43 -0
  42. package/dist/components/FmFilterableMenuOptions.vue.d.ts +54 -0
  43. package/dist/components/FmMinMaxInputRules.d.ts +2 -0
  44. package/dist/components/FmMultiselectDialog.vue.d.ts +3 -9
  45. package/dist/components/FmMultiselectDialogProps.d.ts +0 -2
  46. package/dist/components/FmUnitInputRules.d.ts +2 -0
  47. package/dist/components/inventory-binding/InventoryBinding.vue.d.ts +5 -5
  48. package/dist/components/map/GoogleMap.vue.d.ts +4 -4
  49. package/dist/components/shell/inventory/binding-dialog.vue.d.ts +2 -2
  50. package/dist/components/shell/inventory/binding-ui.vue.d.ts +2 -2
  51. package/dist/date2-CLE9fB2R.js +117 -0
  52. package/dist/dayjs.min-CY1d38w7.js +282 -0
  53. package/dist/{decimal-DWbwRn_v.js → decimal-SIjO6Mjw.js} +1 -1
  54. package/dist/defineDeepModel-l40rX7kr.js +13 -0
  55. package/dist/extensions/array.d.ts +1 -0
  56. package/dist/feature-BXruKUhX.js +78 -0
  57. package/dist/{format-time-from-id-BnmaRuab.js → format-time-from-id-CcFsBXmk.js} +1 -1
  58. package/dist/format-unit-display-DEKg8cJm.js +1198 -0
  59. package/dist/fuzzy-CVOV9zJc.js +41 -0
  60. package/dist/googlemap-Dm8ERVai.js +97 -0
  61. package/dist/helper/rules.d.ts +7 -0
  62. package/dist/helper/rules.spec.d.ts +1 -0
  63. package/dist/helper/xlsx.util.d.ts +7 -0
  64. package/dist/index-BX5KZXhI.js +22279 -0
  65. package/dist/index-CVsyOEb1.js +10545 -0
  66. package/dist/index-m9e9nYfl.js +45 -0
  67. package/dist/netsuite-DAKRv7zr.js +146 -0
  68. package/dist/normalizeArguments-DP7Hrren.js +1552 -0
  69. package/dist/router/name.d.ts +1 -0
  70. package/dist/rules-DlnN8IP3.js +198 -0
  71. package/dist/stores/integration/foodmarkethub.d.ts +391 -0
  72. package/dist/stores/integration/index.d.ts +7 -0
  73. package/dist/stores/integration/netsuite.d.ts +102 -0
  74. package/dist/stores/inventory.d.ts +295 -9
  75. package/dist/stores/location.d.ts +508 -485
  76. package/dist/stores/supplier.d.ts +124 -4
  77. package/dist/stores/warehouse.d.ts +7 -4
  78. package/dist/style.css +1 -1
  79. package/dist/supplier-B21WlSAM.js +77 -0
  80. package/dist/tsconfig.app.tsbuildinfo +1 -1
  81. package/dist/use-inventory-binding-dialog-D3x6xj2O.js +95 -0
  82. package/dist/{use-template-enabled-locations-2-ClBq9FjN.js → use-template-enabled-locations-2-z-b-UXef.js} +9 -8
  83. package/dist/useTabStorage-BkIVScW_.js +25 -0
  84. package/dist/views/closing-template/closing-template-import/ClosingTemplateImport.vue.d.ts +2 -0
  85. package/dist/views/closing-template/closing-template-import/ClosingTemplateImportItem.vue.d.ts +12 -0
  86. package/dist/views/closing-template/closing-template-import/ClosingTemplateImportItemProps.d.ts +7 -0
  87. package/dist/views/closing-template/components/closing-template-form/composables/use-closing-template-items.d.ts +1 -1
  88. package/dist/views/closing-template/composables/use-closing-template-actions.d.ts +877 -1002
  89. package/dist/views/closing-template/composables/use-closing-template-table.d.ts +882 -1013
  90. package/dist/views/closing-template/helpers/import-export.helper.d.ts +58 -0
  91. package/dist/views/ingredient-group/IngredientGroupView.vue.d.ts +3 -0
  92. package/dist/views/ingredient-group/components/ingredient-group-dialog/IngredientGroupDialog.vue.d.ts +31 -0
  93. package/dist/views/ingredient-group/components/ingredient-group-dialog/IngredientGroupDialogProps.d.ts +12 -0
  94. package/dist/views/ingredient-group/components/ingredient-group-form/IngredientGroupForm.vue.d.ts +20 -0
  95. package/dist/views/ingredient-group/components/ingredient-group-form/IngredientGroupFormProps.d.ts +12 -0
  96. package/dist/views/ingredient-group/composables/use-ingredient-group-actions.d.ts +24 -0
  97. package/dist/views/ingredient-group/composables/use-ingredient-group-table.d.ts +215 -0
  98. package/dist/views/ingredients/components/convert/ConvertForm.vue.d.ts +2 -2
  99. package/dist/views/ingredients/components/ingredient-form/IngredientForm.vue.d.ts +2 -2
  100. package/dist/views/ingredients/components/inventory-binding/InventoryBindingForm.vue.d.ts +5 -5
  101. package/dist/views/ingredients/composables/use-ingredient-form.d.ts +2 -2
  102. package/dist/views/ingredients/composables/use-ingredient-table.d.ts +1 -1
  103. package/dist/views/integration/FoodMarketHub.vue.d.ts +2 -0
  104. package/dist/views/integration/NetSuite.vue.d.ts +2 -0
  105. package/dist/views/integration/components/ApplyProductDialog.vue.d.ts +7 -7
  106. package/dist/views/integration/components/ApplyProductDialogV4.vue.d.ts +7 -7
  107. package/dist/views/receive-request/components/transfer-details/TransferDetailsProps.d.ts +1 -0
  108. package/dist/views/receive-request/components/transfer-form/NetSuiteField.vue.d.ts +49 -0
  109. package/dist/views/receive-request/components/transfer-form/TransferForm.vue.d.ts +1913 -53
  110. package/dist/views/receive-request/components/transfer-form/TransferFormProps.d.ts +1 -0
  111. package/dist/views/receive-request/components/transfer-form/components/ForecastStock.vue.d.ts +2 -2
  112. package/dist/views/receive-request/components/transfer-form/composables/use-transfer-items.d.ts +1 -1
  113. package/dist/views/receive-request/composables/use-receive-request-form.d.ts +2370 -327
  114. package/dist/views/receive-request/composables/use-receive-request-table.d.ts +2304 -261
  115. package/dist/views/recipe/components/recipe-form/RecipeForm.vue.d.ts +2 -2
  116. package/dist/views/recipe/composables/use-recipe-form.d.ts +2 -2
  117. package/dist/views/stock/components/StockRecordCard.vue.d.ts +43 -120
  118. package/dist/views/stock/components/dialog/AdjustedItemForm.vue.d.ts +34 -4
  119. package/dist/views/stock/composables/use-stock-action.d.ts +2 -2
  120. package/dist/views/stock/helper/compute-summary-total.d.ts +2 -2
  121. package/dist/views/supplier/components/supplier-import/SupplierImport.vue.d.ts +2 -0
  122. package/dist/views/supplier/components/supplier-import/SupplierImportItem.vue.d.ts +12 -0
  123. package/dist/views/supplier/components/supplier-import/SupplierImportItemProps.d.ts +6 -0
  124. package/dist/views/supplier/composables/use-supplier-actions.d.ts +10 -0
  125. package/dist/views/supplier/helpers/import-export.helper.d.ts +50 -0
  126. package/dist/views/transfer-template/components/transfer-template-details/TransferTemplateDetails.vue.d.ts +0 -2
  127. package/dist/views/transfer-template/components/transfer-template-details/TransferTemplateDetailsProps.d.ts +0 -1
  128. package/dist/views/transfer-template/components/transfer-template-form/composables/use-template-enabled-locations.d.ts +71 -82
  129. package/dist/views/transfer-template/components/transfer-template-form/composables/use-transfer-locations.d.ts +38 -1
  130. package/dist/views/transfer-template/components/transfer-template-form/composables/use-transfer-template-items.d.ts +1 -1
  131. package/dist/views/transfer-template/components/transfer-template-import/TransferTemplateImport.vue.d.ts +2 -0
  132. package/dist/views/transfer-template/components/transfer-template-import/TransferTemplateImportItem.vue.d.ts +12 -0
  133. package/dist/views/transfer-template/components/transfer-template-import/TransferTemplateImportItemProps.d.ts +9 -0
  134. package/dist/views/transfer-template/composables/use-transfer-template-actions.d.ts +1279 -1528
  135. package/dist/views/transfer-template/composables/use-transfer-template-table.d.ts +2207 -446
  136. package/dist/views/transfer-template/helpers/import-export.helper.d.ts +76 -0
  137. package/dist/views/transfer-template/helpers/remove-deleted-skus.helper.d.ts +1 -251
  138. package/dist/views/transfer-template/helpers/template-item.error.helper.d.ts +1 -0
  139. package/dist/views/unit/composables/use-unit-form.d.ts +2 -2
  140. package/dist/views/warehouse/components/WarehouseForm.vue.d.ts +14 -8
  141. package/dist/{xlsx-DiOKvJ6l.js → xlsx-6mM1eNiL.js} +1525 -1525
  142. package/dist/xlsx.util-BLftcF4q.js +78 -0
  143. package/package.json +7 -4
  144. package/dist/ApprovalView-BPsScR5_.js +0 -129
  145. package/dist/ClosingTemplateView-DECwEnlK.js +0 -1066
  146. package/dist/FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-DnogYrRE.js +0 -372
  147. package/dist/IngredientsView-8fT1Ljd5.js +0 -1758
  148. package/dist/IntegrationView-CjGLRM78.js +0 -1141
  149. package/dist/PremiumBadge.vue_vue_type_script_setup_true_lang-DlhNc8Vk.js +0 -88
  150. package/dist/ReceiveRequestView-CXZv8g5U.js +0 -215
  151. package/dist/RecipeView-sB0Lgmob.js +0 -581
  152. package/dist/StockView-CY2kNohB.js +0 -1892
  153. package/dist/SupplierView-DTqeZPts.js +0 -827
  154. package/dist/TransferDetails.vue_vue_type_script_setup_true_lang-BBby29tW.js +0 -762
  155. package/dist/TransferDialog.vue_vue_type_script_setup_true_lang-ByNQap9n.js +0 -1498
  156. package/dist/TransferTemplateView-DkRVfAox.js +0 -1277
  157. package/dist/app-BuyAj4kw.js +0 -69068
  158. package/dist/defineDeepModel-DuVmbMwq.js +0 -13
  159. package/dist/id-to-date-CI5Vv0Ji.js +0 -30
  160. package/dist/purchase-order-transaction-type-DrFJFvtK.js +0 -676
  161. package/dist/stores/netsuite.d.ts +0 -49
  162. package/dist/supplier-BQyK2eSZ.js +0 -69
  163. package/dist/xlsx.util-CZ7zYxdP.js +0 -109
@@ -0,0 +1,45 @@
1
+ import { J as h } from "./app-GUbzqEtW.js";
2
+ var a = { exports: {} };
3
+ function x(r, s = 100, u = {}) {
4
+ if (typeof r != "function")
5
+ throw new TypeError(`Expected the first parameter to be a function, got \`${typeof r}\`.`);
6
+ if (s < 0)
7
+ throw new RangeError("`wait` must not be negative.");
8
+ const { immediate: f } = typeof u == "boolean" ? { immediate: u } : u;
9
+ let t, n, e, m, l;
10
+ function p() {
11
+ const o = Date.now() - m;
12
+ if (o < s && o >= 0)
13
+ e = setTimeout(p, s - o);
14
+ else if (e = void 0, !f) {
15
+ const d = t, i = n;
16
+ t = void 0, n = void 0, l = r.apply(d, i);
17
+ }
18
+ }
19
+ const c = function(...o) {
20
+ if (t && this !== t)
21
+ throw new Error("Debounced method called with different contexts.");
22
+ t = this, n = o, m = Date.now();
23
+ const d = f && !e;
24
+ if (e || (e = setTimeout(p, s)), d) {
25
+ const i = t, b = n;
26
+ t = void 0, n = void 0, l = r.apply(i, b);
27
+ }
28
+ return l;
29
+ };
30
+ return c.clear = () => {
31
+ e && (clearTimeout(e), e = void 0);
32
+ }, c.flush = () => {
33
+ if (!e)
34
+ return;
35
+ const o = t, d = n;
36
+ t = void 0, n = void 0, l = r.apply(o, d), clearTimeout(e), e = void 0;
37
+ }, c;
38
+ }
39
+ a.exports.debounce = x;
40
+ a.exports = x;
41
+ var g = a.exports;
42
+ const y = /* @__PURE__ */ h(g);
43
+ export {
44
+ y as d
45
+ };
@@ -0,0 +1,146 @@
1
+ import { j as v, h as S, u as f } from "./app-GUbzqEtW.js";
2
+ import { useCoreStore as b } from "@feedmepos/mf-common";
3
+ import { useSnackbar as y } from "@feedmepos/ui-library";
4
+ import { ref as I, computed as p } from "vue";
5
+ const N = v((d, l) => {
6
+ const t = b(), i = y();
7
+ return l.onError(async (s) => {
8
+ if (s instanceof S)
9
+ throw i == null || i.open({
10
+ title: s.title,
11
+ message: s.message,
12
+ type: "error"
13
+ }), s;
14
+ }), {
15
+ async readSetting() {
16
+ var a;
17
+ const s = ((a = t.currentBusiness.value) == null ? void 0 : a._id) ?? "", e = `${d.netSuiteBackendUrl}/${s}/settings`;
18
+ return await l.get(e);
19
+ },
20
+ urls: d
21
+ };
22
+ });
23
+ function L() {
24
+ return {
25
+ setting: {
26
+ _id: "",
27
+ items: [],
28
+ childItems: [],
29
+ units: [],
30
+ locations: [],
31
+ subsidiaries: [],
32
+ vendors: [],
33
+ enable: !1,
34
+ syncedAt: null
35
+ }
36
+ };
37
+ }
38
+ const r = I(L());
39
+ function M() {
40
+ const d = p(() => r.value.setting.items.groupBy("netSuiteId", (t) => t.id)), l = p(() => r.value.setting.units.flatMap((t) => t.measurements).groupBy("netSuiteId", (t) => t.id));
41
+ return {
42
+ // state
43
+ get isEnabled() {
44
+ return r.value.setting.enable;
45
+ },
46
+ get isBusinessLocation() {
47
+ return f().businessLevel;
48
+ },
49
+ get state() {
50
+ return r.value;
51
+ },
52
+ get netSuiteItemIdToSkuId() {
53
+ return d.value;
54
+ },
55
+ get netSuiteMeasurementIdToMeasurementId() {
56
+ return l.value;
57
+ },
58
+ getNetSuiteVendor(t) {
59
+ return r.value.setting.vendors.find((i) => i.id === t);
60
+ },
61
+ getNetSuiteLocation(t) {
62
+ const [i, s] = t.split("_");
63
+ return r.value.setting.locations.find((a) => a.id == s && a.type == i);
64
+ },
65
+ getLocationSubsidiary(t) {
66
+ var a;
67
+ if (!t)
68
+ return {
69
+ id: void 0,
70
+ name: "",
71
+ fullName: ""
72
+ };
73
+ const i = ((a = r.value.setting.locations.find((n) => n.netSuiteId === t)) == null ? void 0 : a.subsidiaryId) ?? null, { flat: s } = m(r.value.setting.subsidiaries), e = s.find((n) => n.id === i);
74
+ return {
75
+ id: e == null ? void 0 : e.id,
76
+ name: (e == null ? void 0 : e.name) || "",
77
+ fullName: `${(e == null ? void 0 : e.fullName) ?? ""}`
78
+ };
79
+ },
80
+ currentLocationSubsidiary() {
81
+ var c;
82
+ const t = f(), i = t.currentLocation.doc._id, s = t.currentLocation.type, e = ((c = r.value.setting.locations.find(
83
+ (o) => o.id === i && o.type == s
84
+ )) == null ? void 0 : c.subsidiaryId) ?? null, { flat: a } = m(r.value.setting.subsidiaries), n = a.find((o) => o.id === e);
85
+ return {
86
+ id: n == null ? void 0 : n.id,
87
+ name: (n == null ? void 0 : n.name) || "",
88
+ fullName: `${(n == null ? void 0 : n.fullName) ?? ""}`
89
+ };
90
+ },
91
+ currentVendorSubsidiary(t) {
92
+ var a;
93
+ const i = ((a = r.value.setting.vendors.find((n) => n.id === t)) == null ? void 0 : a.subsidiaryId) ?? null, { flat: s } = m(r.value.setting.subsidiaries), e = s.find((n) => n.id === i);
94
+ return {
95
+ id: e == null ? void 0 : e.id,
96
+ name: (e == null ? void 0 : e.name) || "",
97
+ fullName: `${(e == null ? void 0 : e.fullName) ?? ""}`
98
+ };
99
+ },
100
+ get subsidiaryOptions() {
101
+ const { flat: t } = m(r.value.setting.subsidiaries);
102
+ return t.map((i) => ({
103
+ label: `${"   ".repeat(i.depth)}${i.name}`,
104
+ value: {
105
+ id: i.id,
106
+ name: i.name
107
+ }
108
+ }));
109
+ },
110
+ getAvailableItems(t) {
111
+ const { available: i } = m(r.value.setting.subsidiaries, t);
112
+ return r.value.setting.items.filter((s) => s.subsidiaryIds.some((e) => i.includes(e))).map((s) => s.id);
113
+ },
114
+ async readSetting() {
115
+ const i = await N().readSetting();
116
+ i && (this.state.setting = i);
117
+ }
118
+ };
119
+ }
120
+ function m(d, l) {
121
+ const t = [], i = [];
122
+ function s(n, c, o = !1) {
123
+ return d.filter((u) => u.parentId === c).map((u) => ((o || u.id === l || !l) && t.push(u.id), {
124
+ id: u.id,
125
+ name: u.name,
126
+ country: u.country,
127
+ currency: u.currency,
128
+ parentId: u.parentId,
129
+ depth: n,
130
+ children: s(n + 1, u.id, o || u.id === l)
131
+ }));
132
+ }
133
+ const e = s(0, null);
134
+ function a(n, c = "") {
135
+ const o = n.fullName || n.name, g = c ? `${c} : ${o}` : o;
136
+ i.push({ ...n, fullName: g }), n.children.forEach((u) => a(u, g));
137
+ }
138
+ return e.forEach((n) => a(n)), {
139
+ tree: e,
140
+ available: t,
141
+ flat: i
142
+ };
143
+ }
144
+ export {
145
+ M as u
146
+ };