@feedmepos/mf-inventory-portal 1.2.1 → 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-DwRrbVDo.js → ApprovalView-DWJh2K6W.js} +65 -64
  3. package/dist/{BindingsDialog-DUVKv10-.js → BindingsDialog-EmHCvqJI.js} +2 -2
  4. package/dist/{BindingsPicker-Daib_iq4.js → BindingsPicker-h_9jm1s0.js} +3 -3
  5. package/dist/{BindingsTable-Bv9UmcJP.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-DZPcRAja.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-CZmwOkrb.js → FmMultiselectDialog-BzWrQOS4.js} +1 -1
  12. package/dist/{FmUnitInput.vue_vue_type_script_setup_true_lang-C-2V2bGc.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-BGnoF1Zz.js → IngredientBindedItem.vue_vue_type_script_setup_true_lang-_2WZMZU2.js} +5 -5
  15. package/dist/{IngredientGroupView-CAVYpEj3.js → IngredientGroupView-CrmwR2Xt.js} +34 -35
  16. package/dist/IngredientsView-1bAsyz-b.js +2254 -0
  17. package/dist/{IntegrationView-DdLFyZ4H.js → IntegrationView-D16qeEc_.js} +1773 -1635
  18. package/dist/{InventoryBindingForm-C7BdEDtM.js → InventoryBindingForm-BRwOXV_P.js} +1 -1
  19. package/dist/{InventoryBindingForm.vue_vue_type_script_setup_true_lang-B7DND2dQ.js → InventoryBindingForm.vue_vue_type_script_setup_true_lang-NDbtbtqK.js} +28 -28
  20. package/dist/{InventoryBindingSummary-IZ7F-Lti.js → InventoryBindingSummary-DKM2gX8_.js} +1 -1
  21. package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-sgqVSlUB.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-CdaiYTdf.js} +4 -4
  22. package/dist/{PremiumBadge.vue_vue_type_script_setup_true_lang-DeF32bHu.js → PremiumBadge.vue_vue_type_script_setup_true_lang-B0OKeK5O.js} +7 -7
  23. package/dist/{PublishView-DkgfYneI.js → PublishView-D0NnU22l.js} +73 -63
  24. package/dist/{PurchaseOrderPrintPreview-CltLC4o4.js → PurchaseOrderPrintPreview-BmuwNbeL.js} +4 -4
  25. package/dist/{ReceiveRequestView-Dj7ji0DY.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-DE_M_9kd.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-gWGBCF3u.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-CruHLH1e.js → app-a9r50k3U.js} +68551 -67573
  46. package/dist/app.d.ts +643 -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-izbvCC1j.js → decimal-AusUnA1W.js} +1 -1
  57. package/dist/{format-unit-display-4SAdfyZB.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-B6GGthLw.js → index-CjxirPvn.js} +283 -268
  64. package/dist/{index-CnQloOEo.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-CTVE1lHO.js → supplier-BPPBUudN.js} +1 -1
  78. package/dist/tsconfig.app.tsbuildinfo +1 -1
  79. package/dist/{use-ingredient-select-dialog-CM80TfX0.js → use-ingredient-select-dialog-C_fSKN3_.js} +5 -5
  80. package/dist/{use-inventory-binding-dialog-D_omdhgn.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-BqaRC0Sb.js +0 -276
  134. package/dist/ClosingDraftView-sJ_zRPeo.js +0 -1687
  135. package/dist/ClosingTemplateView-cNgXHq1r.js +0 -1908
  136. package/dist/FmAdminBadge-oCnz8SW6.js +0 -34
  137. package/dist/FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-BKR8C4p_.js +0 -224
  138. package/dist/IngredientsView-CHHeAJH_.js +0 -1858
  139. package/dist/RecipeView-BukmKdVG.js +0 -621
  140. package/dist/StockForecast.vue_vue_type_style_index_0_lang-KLXSWvo5.js +0 -59
  141. package/dist/StockView-wxRCw_w-.js +0 -2087
  142. package/dist/TransferDetails.vue_vue_type_script_setup_true_lang-eqUOnJoM.js +0 -2336
  143. package/dist/UnitView-BgwDmGZo.js +0 -667
  144. package/dist/WarehouseView-BdccenhO.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-BJP5BB5b.js +0 -146
@@ -1,10 +1,10 @@
1
1
  import { defineComponent as x, computed as f, ref as h, onMounted as g, openBlock as u, createElementBlock as i, createElementVNode as t, createTextVNode as n, toDisplayString as e, createCommentVNode as d, Fragment as o, renderList as p, normalizeClass as _ } from "vue";
2
2
  import { useRoute as k } from "vue-router";
3
- import { aA as y, ao as w } from "./app-CruHLH1e.js";
4
- const A = { class: "purchase-box" }, c = { valign: "bottom" }, N = { class: "sub-header" }, O = ["src"], P = { style: { "padding-left": "10px" } }, C = { class: "address" }, D = { class: "text-right" }, R = {
3
+ import { aL as y, aw as w } from "./app-a9r50k3U.js";
4
+ const c = { class: "purchase-box" }, A = { valign: "bottom" }, N = { class: "sub-header" }, O = ["src"], P = { style: { "padding-left": "10px" } }, C = { class: "address" }, D = { class: "text-right" }, R = {
5
5
  key: 0,
6
6
  class: "subtitle"
7
- }, S = { class: "sub-header" }, E = { class: "caption" }, T = { class: "address" }, q = { class: "text-right" }, F = { class: "sub-header" }, I = { class: "address" }, U = { class: "purchase-body" }, B = { class: "text-left" }, H = { class: "text-left" }, L = { class: "text-left" }, M = { class: "text-left" }, V = { class: "text-left" }, J = { class: "text-right" }, j = { key: 0 }, z = {
7
+ }, S = { class: "sub-header" }, E = { class: "caption" }, T = { class: "address" }, q = { class: "text-right" }, F = { class: "sub-header" }, I = { class: "address" }, L = { class: "purchase-body" }, U = { class: "text-left" }, B = { class: "text-left" }, H = { class: "text-left" }, M = { class: "text-left" }, V = { class: "text-left" }, J = { class: "text-right" }, j = { key: 0 }, z = {
8
8
  key: 1,
9
9
  style: { "padding-top": "30px" }
10
10
  }, G = { valign: "bottom" }, Q = { class: "header" }, K = { class: "caption" }, W = {
@@ -32,9 +32,9 @@ const A = { class: "purchase-box" }, c = { valign: "bottom" }, N = { class: "sub
32
32
  const b = k(), s = h(JSON.parse(b.query.data));
33
33
  return g(() => {
34
34
  setTimeout(() => window.print(), 500);
35
- }), (lt, l) => (u(), i("div", A, [
35
+ }), (lt, l) => (u(), i("div", c, [
36
36
  t("table", null, [
37
- t("tr", c, [
37
+ t("tr", A, [
38
38
  t("td", null, [
39
39
  t("div", N, [
40
40
  t("img", {
@@ -106,7 +106,7 @@ const A = { class: "purchase-box" }, c = { valign: "bottom" }, N = { class: "sub
106
106
  ])
107
107
  ])
108
108
  ]),
109
- t("div", U, [
109
+ t("div", L, [
110
110
  t("table", null, [
111
111
  l[19] || (l[19] = t("thead", { class: "item-header" }, [
112
112
  t("tr", null, [
@@ -126,9 +126,9 @@ const A = { class: "purchase-box" }, c = { valign: "bottom" }, N = { class: "sub
126
126
  ], -1)),
127
127
  t("tbody", null, [
128
128
  t("tr", null, [
129
- t("td", B, e(s.value.orderNumber), 1),
130
- t("td", H, e(s.value.ref), 1),
131
- t("td", L, e(s.value.supplier.phoneNumber), 1)
129
+ t("td", U, e(s.value.orderNumber), 1),
130
+ t("td", B, e(s.value.ref), 1),
131
+ t("td", H, e(s.value.supplier.phoneNumber), 1)
132
132
  ])
133
133
  ])
134
134
  ]),
@@ -0,0 +1,230 @@
1
+ import { n as C, t as E, aI as M, u as R, aN as B, aX as D, p as H, aY as U } from "./app-a9r50k3U.js";
2
+ import { u as z } from "./supplier-BPPBUudN.js";
3
+ import { P as T } from "./format-unit-display-BqkHL-ph.js";
4
+ import { computed as f, defineComponent as j, mergeModels as q, useModel as x, ref as W, resolveComponent as w, openBlock as L, createElementBlock as O, normalizeStyle as $, createElementVNode as I, createVNode as X, withCtx as Y, createBlock as V, createCommentVNode as N, Fragment as J, renderList as K, unref as g } from "vue";
5
+ function Q(e, a, r) {
6
+ var o;
7
+ if (!!a.measurement === !!r && ((o = a.measurement) == null ? void 0 : o.id) === r)
8
+ return a;
9
+ if (!r)
10
+ return {
11
+ costPerUnit: a.costPerUnit
12
+ };
13
+ const n = e.measurements.find((p) => p.id === r);
14
+ return n ? {
15
+ costPerUnit: a.costPerUnit,
16
+ measurement: n
17
+ } : {
18
+ costPerUnit: a.costPerUnit
19
+ };
20
+ }
21
+ function oe(e, a, r, u) {
22
+ var P, _, s;
23
+ const l = (s = (_ = (P = u == null ? void 0 : u.supplier) == null ? void 0 : P.supplyItems) == null ? void 0 : _.find(
24
+ (t) => t.skuId === e._id
25
+ )) == null ? void 0 : s.defaultCost;
26
+ if (u != null && u.manualTotalCost)
27
+ return {
28
+ cost: u.manualTotalCost,
29
+ skuDefaultCost: e.defaultCost ?? void 0,
30
+ supplierOverrideCost: l ?? void 0
31
+ };
32
+ const n = e.defaultCost ? Q(e.unit, e.defaultCost, e.trackingMeasurement) : void 0, o = l ?? n, p = o == null ? void 0 : o.costPerUnit, v = p ? o != null && o.measurement ? +C(p) / +C(o == null ? void 0 : o.measurement.conversion) : +C(p) : void 0, b = v ? r ? v * +C(r.conversion) : v : void 0, h = b ? +C(a) * b : void 0;
33
+ return {
34
+ cost: h ? {
35
+ ...E(h ?? 0, 2),
36
+ currency: M()
37
+ } : {
38
+ amount: 0,
39
+ precision: 0,
40
+ currency: M()
41
+ },
42
+ skuDefaultCost: e.defaultCost ?? void 0,
43
+ supplierOverrideCost: l ?? void 0
44
+ };
45
+ }
46
+ function k(e) {
47
+ const a = D.safeParse(e);
48
+ if (a.success) return a.data;
49
+ throw new Error("Invalid supplier data");
50
+ }
51
+ function F(e) {
52
+ return {
53
+ _id: e.doc._id,
54
+ internal: e.type,
55
+ contactName: e.doc.profile.name,
56
+ name: e.doc.profile.name ?? "",
57
+ email: e.doc.profile.email,
58
+ phoneNumber: e.doc.profile.phoneNo,
59
+ registrationNumber: e.doc.profile.regNo,
60
+ address: e.doc.profile.address ?? {
61
+ line1: "",
62
+ state: "",
63
+ city: "",
64
+ postcode: "",
65
+ country: ""
66
+ },
67
+ preparationTime: e.preparationTime
68
+ };
69
+ }
70
+ function ne(e, a, r = !1, u = !1) {
71
+ const l = z(), n = R();
72
+ n.watchLocation(async () => {
73
+ var y;
74
+ await l.readSuppliers();
75
+ const s = e();
76
+ if ((y = s.supplier) != null && y._id) return;
77
+ const t = u ? l.suppliers[0] : l.businessSuppliers[0], i = (r ? n.locations.filter((d) => d.doc._id !== n.currentLocation.doc._id) : n.locations)[0];
78
+ a({
79
+ ...s,
80
+ supplier: t ? k(t) : i ? F(i) : s.supplier
81
+ });
82
+ });
83
+ const o = f(
84
+ () => {
85
+ var s, t;
86
+ return typeof ((t = (s = e()) == null ? void 0 : s.supplier) == null ? void 0 : t.internal) == "string" ? T.TRANSFER : T.PURCHASE;
87
+ }
88
+ ), p = f({
89
+ get() {
90
+ var s, t;
91
+ return (t = (s = e()) == null ? void 0 : s.supplier) == null ? void 0 : t._id;
92
+ },
93
+ set(s) {
94
+ const t = e() ?? {};
95
+ if (o.value === T.PURCHASE) {
96
+ const S = (u ? l.suppliers : l.businessSuppliers).find((A) => A._id === s);
97
+ a({
98
+ ...t,
99
+ supplier: S ? k(S) : t.supplier
100
+ });
101
+ return;
102
+ }
103
+ const y = (r ? n.allLocations.filter(
104
+ (d) => d.doc._id !== n.currentLocation.doc._id
105
+ ) : n.allLocations).find((d) => d.doc._id === s);
106
+ a({
107
+ ...t,
108
+ supplier: y ? F(y) : t.supplier
109
+ });
110
+ }
111
+ }), v = f(() => l.locationSuppliers.map(k)), b = f(() => l.businessSuppliers.map(k)), h = f(() => {
112
+ const s = [...v.value], t = [...b.value];
113
+ return u ? [...t, ...s] : t;
114
+ }), c = f(() => {
115
+ var m;
116
+ const s = ((m = n._currentLocation) == null ? void 0 : m.type) === B.warehouse;
117
+ return (r ? n.allLocations.filter(
118
+ (i) => i.doc._id !== n.currentLocation.doc._id
119
+ ) : n.allLocations).filter((i) => s || i.acceptRequest).map(F);
120
+ }), P = f(() => {
121
+ if (o.value === T.PURCHASE) {
122
+ const t = v.value.map((i) => ({
123
+ label: i.name,
124
+ value: i._id
125
+ })), m = b.value.map((i) => ({
126
+ label: i.name,
127
+ sublabel: "Business supplier",
128
+ value: i._id
129
+ }));
130
+ return u ? [...t, ...m] : m;
131
+ }
132
+ return c.value.map((t) => ({
133
+ label: t.name,
134
+ sublabel: t.internal ? `${t.internal}` : void 0,
135
+ value: t._id
136
+ }));
137
+ }), _ = f(() => {
138
+ var i, y;
139
+ const s = (y = (i = e()) == null ? void 0 : i.supplier) == null ? void 0 : y._id;
140
+ if (o.value === T.PURCHASE) {
141
+ const d = l.suppliers.find((S) => S._id === s);
142
+ return d ? k(d) : null;
143
+ }
144
+ const m = n.allLocations.find((d) => d.doc._id);
145
+ return m ? F(m) : null;
146
+ });
147
+ return {
148
+ transferLocationModel: p,
149
+ transferLocationOptions: P,
150
+ locationOptionsTypePurchase: h,
151
+ locationOptionsTypePurchaseLocationLevel: v,
152
+ locationOptionsTypeTransfer: c,
153
+ selectedLocation: _
154
+ };
155
+ }
156
+ const Z = { class: "overflow-y-auto h-full pb-8" }, ae = /* @__PURE__ */ j({
157
+ __name: "FmFilterableMenuOptions",
158
+ props: /* @__PURE__ */ q({
159
+ modelValue: {},
160
+ maxHeight: {},
161
+ width: {},
162
+ handleItemChange: { type: Function },
163
+ items: {},
164
+ options: {}
165
+ }, {
166
+ search: {},
167
+ searchModifiers: {}
168
+ }),
169
+ emits: ["update:search"],
170
+ setup(e) {
171
+ const a = e, r = x(e, "search"), u = f(
172
+ () => new H(a.items, ["label", "sublabel"], {
173
+ caseSensitive: !1,
174
+ sort: !0
175
+ })
176
+ ), l = f(() => u.value.search(r.value)), n = W();
177
+ return console.log({ stickyRef: n }), (o, p) => {
178
+ const v = w("FmButton"), b = w("FmTextField"), h = w("FmMenuItem");
179
+ return L(), O("div", {
180
+ class: "relative",
181
+ style: $({ width: o.width })
182
+ }, [
183
+ I("div", {
184
+ class: "sticky top-0 bg-white mb-8",
185
+ ref_key: "stickyRef",
186
+ ref: n
187
+ }, [
188
+ X(b, {
189
+ modelValue: r.value,
190
+ "onUpdate:modelValue": p[1] || (p[1] = (c) => r.value = c),
191
+ placeholder: "Filter options"
192
+ }, {
193
+ append: Y(() => [
194
+ r.value ? (L(), V(v, {
195
+ key: 0,
196
+ variant: "tertiary",
197
+ "prepend-icon": "close",
198
+ onClick: p[0] || (p[0] = (c) => r.value = "")
199
+ })) : N("", !0)
200
+ ]),
201
+ _: 1
202
+ }, 8, ["modelValue"])
203
+ ], 512),
204
+ I("div", Z, [
205
+ (L(!0), O(J, null, K(l.value, (c, P) => (L(), V(h, {
206
+ key: P,
207
+ label: c.label,
208
+ sublabel: c.sublabel,
209
+ "model-value": g(U)(o.modelValue, c.value),
210
+ onClick: () => o.handleItemChange(g(U)(o.modelValue, c.value), c),
211
+ onVnodeMounted: (_) => {
212
+ var s, t;
213
+ return g(U)(o.modelValue, c.value) && ((s = _.el) == null || s.scrollIntoView({ behavior: "instant", block: "end" }), (t = _.el) == null || t.scrollIntoView({ behavior: "smooth", block: "center" })), void 0;
214
+ }
215
+ }, null, 8, ["label", "sublabel", "model-value", "onClick", "onVnodeMounted"]))), 128)),
216
+ l.value.length ? N("", !0) : (L(), V(h, {
217
+ key: 0,
218
+ disabled: "",
219
+ label: "No options available"
220
+ }))
221
+ ])
222
+ ], 4);
223
+ };
224
+ }
225
+ });
226
+ export {
227
+ ae as _,
228
+ oe as c,
229
+ ne as u
230
+ };
@@ -1,7 +1,7 @@
1
1
  import { defineStore as p } from "pinia";
2
2
  import { useDialog as y } from "@feedmepos/ui-library";
3
3
  import { useI18n as v } from "@feedmepos/mf-common";
4
- import { a2 as a } from "./app-CruHLH1e.js";
4
+ import { x as a } from "./app-a9r50k3U.js";
5
5
  import { h as S } from "vue";
6
6
  const w = p("inventoryMultiSelectDialog", () => {
7
7
  const l = y(), { t: n } = v();
@@ -1,17 +1,17 @@
1
- import { defineComponent as ie, mergeModels as W, useModel as ae, computed as v, ref as B, watch as E, onBeforeUnmount as le, inject as ue, resolveComponent as b, openBlock as d, createElementBlock as y, createElementVNode as u, createVNode as h, withCtx as F, renderSlot as G, normalizeClass as L, toDisplayString as _, withDirectives as re, vModelText as me, createCommentVNode as I, createTextVNode as ce, createBlock as U, Fragment as de, renderList as pe } from "vue";
2
- import { Q as D, I as R, Y as O, T as fe, j as M, aM as ve, t as be, b6 as ye, P as he, as as Me, aK as ge, aJ as xe } from "./app-CruHLH1e.js";
1
+ import { defineComponent as ie, mergeModels as W, useModel as ae, computed as v, ref as B, watch as E, onBeforeUnmount as le, inject as ue, resolveComponent as b, openBlock as d, createElementBlock as y, createElementVNode as u, createVNode as h, withCtx as F, renderSlot as G, normalizeClass as $, toDisplayString as A, withDirectives as re, vModelText as me, createCommentVNode as I, createTextVNode as ce, createBlock as U, Fragment as de, renderList as pe } from "vue";
2
+ import { $ as D, P as R, z as j, a0 as fe, n as M, aW as ve, t as be, bf as ye, Z as he, aA as Me, aU as ge, aT as xe } from "./app-a9r50k3U.js";
3
3
  import "@feedmepos/ui-library";
4
4
  function H() {
5
5
  return {
6
6
  amount: D.reset()
7
7
  };
8
8
  }
9
- function K() {
9
+ function J() {
10
10
  return function(f) {
11
11
  return R()(f.amountAsString);
12
12
  };
13
13
  }
14
- function $e(l) {
14
+ function Oe(l) {
15
15
  return function(t) {
16
16
  return R()(t.amountAsString) !== !0 ? !0 : +t.amountAsString < l ? `Must be at least ${l}` : !0;
17
17
  };
@@ -21,15 +21,15 @@ function qe(l) {
21
21
  return R()(t.amountAsString) !== !0 ? !0 : +t.amountAsString > l ? `Must be at most ${l}` : !0;
22
22
  };
23
23
  }
24
- function J(l, f = !1) {
24
+ function Z(l, f = !1) {
25
25
  return function(c) {
26
- const s = K()(c);
26
+ const s = J()(c);
27
27
  if (s != !0)
28
28
  return f ? s : !0;
29
- const A = typeof l == "number" ? l : O(l, c.modelValue.measurement);
30
- return fe(+c.amountAsString).precision > A ? `Cannot exceed precision more than ${M({
29
+ const _ = typeof l == "number" ? l : j(l, c.modelValue.measurement);
30
+ return fe(+c.amountAsString).precision > _ ? `Cannot exceed precision more than ${M({
31
31
  amount: 1,
32
- precision: A
32
+ precision: _
33
33
  })}` : !0;
34
34
  };
35
35
  }
@@ -39,7 +39,7 @@ function ze(l) {
39
39
  return f(c.modelValue.amount);
40
40
  };
41
41
  }
42
- const Fe = { class: "flex flex-col" }, _e = { class: "flex flex-col" }, Ae = { class: "flex-1" }, Pe = { class: "flex items-center gap-4" }, ke = { class: "flex-1 flex gap-4" }, Be = { class: "shrink-0 grow basis-2/5" }, Ie = {
42
+ const Fe = { class: "flex flex-col" }, Ae = { class: "flex flex-col" }, _e = { class: "flex-1" }, Pe = { class: "flex items-center gap-4" }, ke = { class: "flex-1 flex gap-4" }, Be = { class: "shrink-0 grow basis-2/5" }, Ie = {
43
43
  key: 0,
44
44
  class: "text-fm-color-typo-secondary"
45
45
  }, Ue = {
@@ -105,9 +105,9 @@ const Fe = { class: "flex flex-col" }, _e = { class: "flex flex-col" }, Ae = { c
105
105
  }),
106
106
  emits: /* @__PURE__ */ W(["update:amount", "update:measurement"], ["update:modelValue"]),
107
107
  setup(l, { emit: f }) {
108
- const t = l, c = f, s = ae(l, "modelValue"), A = R(), w = v(() => {
108
+ const t = l, c = f, s = ae(l, "modelValue"), _ = R(), w = v(() => {
109
109
  var n;
110
- return O(t.unit, (n = s.value) == null ? void 0 : n.measurement);
110
+ return j(t.unit, (n = s.value) == null ? void 0 : n.measurement);
111
111
  }), p = B((() => {
112
112
  var o;
113
113
  const e = ((o = s.value) == null ? void 0 : o.amount) ?? D.reset(), n = ge(e), i = t.formatMinimumPrecision ?? n.precision, a = xe(n, i);
@@ -117,7 +117,7 @@ const Fe = { class: "flex flex-col" }, _e = { class: "flex flex-col" }, Ae = { c
117
117
  E(p, (e) => {
118
118
  x && clearTimeout(x), x = setTimeout(() => {
119
119
  var r;
120
- const n = A(e), i = t.precision ?? w.value, o = typeof t.formatMinimumPrecision == "number" && t.formatMinimumPrecision > i ? t.formatMinimumPrecision : i;
120
+ const n = _(e), i = t.precision ?? w.value, o = typeof t.formatMinimumPrecision == "number" && t.formatMinimumPrecision > i ? t.formatMinimumPrecision : i;
121
121
  if (n == !0) {
122
122
  const g = be(+e, o);
123
123
  ((r = s.value) == null ? void 0 : r.amount) !== g && (s.value = {
@@ -130,7 +130,7 @@ const Fe = { class: "flex flex-col" }, _e = { class: "flex flex-col" }, Ae = { c
130
130
  }), le(() => {
131
131
  x && clearTimeout(x);
132
132
  });
133
- const Y = Symbol.for("fm:form-state"), C = ue(Y, null), P = v(() => t.disabled ?? (C == null ? void 0 : C.getDisabled()) ?? !1), Z = B(), S = B(!1), $ = B(!1), X = v(() => S.value || $.value), ee = v(() => {
133
+ const Q = Symbol.for("fm:form-state"), C = ue(Q, null), P = v(() => t.disabled ?? (C == null ? void 0 : C.getDisabled()) ?? !1), X = B(), S = B(!1), O = B(!1), Y = v(() => S.value || O.value), ee = v(() => {
134
134
  var a;
135
135
  const e = t.unit.measurements.filter((o) => !o.name.toLocaleLowerCase().includes("inactive")).filter((o) => o.abbrev !== t.unit.abbrev || +M(o.conversion) != 1), n = ye.groupBy(
136
136
  e,
@@ -172,11 +172,11 @@ const Fe = { class: "flex flex-col" }, _e = { class: "flex flex-col" }, Ae = { c
172
172
  var m;
173
173
  if (!t.convertAmountOnChangeUnit)
174
174
  return;
175
- const i = ((m = s.value) == null ? void 0 : m.amount) ?? D.reset(), a = t.unit.measurements.find((k) => k.id === n) ?? null, o = t.unit.measurements.find((k) => k.id === e) ?? null, r = a ? he(i, a.conversion) : i, g = o ? Me(r, o.conversion) : r, T = O(t.unit, o), j = D.convertPrecision({
175
+ const i = ((m = s.value) == null ? void 0 : m.amount) ?? D.reset(), a = t.unit.measurements.find((k) => k.id === n) ?? null, o = t.unit.measurements.find((k) => k.id === e) ?? null, r = a ? he(i, a.conversion) : i, g = o ? Me(r, o.conversion) : r, T = j(t.unit, o), L = D.convertPrecision({
176
176
  value: g,
177
177
  precision: T
178
178
  });
179
- p.value = M(j);
179
+ p.value = M(L);
180
180
  });
181
181
  const q = v(() => {
182
182
  var e;
@@ -192,8 +192,8 @@ const Fe = { class: "flex flex-col" }, _e = { class: "flex flex-col" }, Ae = { c
192
192
  )) ?? [];
193
193
  }
194
194
  ), ne = v(() => [...t.applyDefaultRules ? [
195
- K(),
196
- typeof t.precision == "number" ? J(t.precision) : J(t.unit)
195
+ J(),
196
+ typeof t.precision == "number" ? Z(t.precision) : Z(t.unit)
197
197
  ] : [], ...te.value]);
198
198
  function z(e) {
199
199
  const n = t.precision ?? w.value, a = typeof t.formatMinimumPrecision == "number" && t.formatMinimumPrecision > n ? t.formatMinimumPrecision : n, o = e.toFixed(a), r = o.includes(".") ? o.replace(/0+$/, "") : o;
@@ -212,10 +212,10 @@ const Fe = { class: "flex flex-col" }, _e = { class: "flex flex-col" }, Ae = { c
212
212
  p.value = z(e);
213
213
  }
214
214
  return (e, n) => {
215
- const i = b("FmLabel"), a = b("FmIcon"), o = b("FmMenuItem"), r = b("FmMenu"), g = b("FmTooltip"), T = b("FmField"), j = b("FmFormGroup");
215
+ const i = b("FmLabel"), a = b("FmIcon"), o = b("FmMenuItem"), r = b("FmMenu"), g = b("FmTooltip"), T = b("FmField"), L = b("FmFormGroup");
216
216
  return d(), y("div", Fe, [
217
- u("div", _e, [
218
- u("div", Ae, [
217
+ u("div", Ae, [
218
+ u("div", _e, [
219
219
  h(i, {
220
220
  label: e.label,
221
221
  disabled: e.disabled,
@@ -223,7 +223,7 @@ const Fe = { class: "flex flex-col" }, _e = { class: "flex flex-col" }, Ae = { c
223
223
  optional: e.labelMark === "optional"
224
224
  }, null, 8, ["label", "disabled", "required", "optional"])
225
225
  ]),
226
- h(T, { focused: X.value }, {
226
+ h(T, { focused: Y.value }, {
227
227
  default: F(() => [
228
228
  u("div", Pe, [
229
229
  G(e.$slots, "prepend"),
@@ -231,20 +231,20 @@ const Fe = { class: "flex flex-col" }, _e = { class: "flex flex-col" }, Ae = { c
231
231
  u("div", Be, [
232
232
  e.stepperOnly ? (d(), y("span", {
233
233
  key: 0,
234
- class: L({
234
+ class: $({
235
235
  "fm-text-field--input fm-typo-en-body-lg-400": !0,
236
236
  "text-fm-color-typo-primary": !P.value,
237
237
  "text-fm-color-typo-disabled": P.value
238
238
  })
239
- }, _(p.value), 3)) : re((d(), y("input", {
239
+ }, A(p.value), 3)) : re((d(), y("input", {
240
240
  key: 1,
241
241
  type: "text",
242
242
  ref_key: "inputRef",
243
- ref: Z,
243
+ ref: X,
244
244
  onFocus: n[0] || (n[0] = () => S.value = !0),
245
245
  onBlur: n[1] || (n[1] = () => S.value = !1),
246
246
  "onUpdate:modelValue": n[2] || (n[2] = (m) => p.value = m),
247
- class: L({
247
+ class: $({
248
248
  "fm-text-field--input fm-typo-en-body-lg-400": !0,
249
249
  "text-fm-color-typo-primary": !P.value,
250
250
  "text-fm-color-typo-disabled": P.value
@@ -253,13 +253,13 @@ const Fe = { class: "flex flex-col" }, _e = { class: "flex flex-col" }, Ae = { c
253
253
  [me, p.value]
254
254
  ])
255
255
  ]),
256
- e.separator ? (d(), y("div", Ie, _(e.separator), 1)) : I("", !0),
256
+ e.separator ? (d(), y("div", Ie, A(e.separator), 1)) : I("", !0),
257
257
  u("div", {
258
- class: L([e.disabled ? "text-fm-color-typo-disabled" : "text-fm-color-typo-secondary"])
258
+ class: $([e.disabled ? "text-fm-color-typo-disabled" : "text-fm-color-typo-secondary"])
259
259
  }, [
260
260
  h(g, { "z-index": 51 }, {
261
261
  content: F(() => [
262
- ce(_(V.value), 1)
262
+ ce(A(V.value), 1)
263
263
  ]),
264
264
  default: F(() => [
265
265
  e.disableUnit ? (d(), y("div", Ue, [
@@ -267,10 +267,10 @@ const Fe = { class: "flex flex-col" }, _e = { class: "flex flex-col" }, Ae = { c
267
267
  key: 0,
268
268
  name: "square_foot"
269
269
  })),
270
- u("div", De, _(V.value), 1)
270
+ u("div", De, A(V.value), 1)
271
271
  ])) : (d(), U(r, {
272
272
  key: 1,
273
- onMenuChanged: n[3] || (n[3] = (m) => $.value = m),
273
+ onMenuChanged: n[3] || (n[3] = (m) => O.value = m),
274
274
  "z-index": 500,
275
275
  placement: e.placement,
276
276
  disabled: e.disabled
@@ -282,7 +282,7 @@ const Fe = { class: "flex flex-col" }, _e = { class: "flex flex-col" }, Ae = { c
282
282
  key: 0,
283
283
  name: "square_foot"
284
284
  })),
285
- u("div", Ce, _(V.value), 1)
285
+ u("div", Ce, A(V.value), 1)
286
286
  ]),
287
287
  h(a, { name: "keyboard_arrow_down" })
288
288
  ])
@@ -335,7 +335,7 @@ const Fe = { class: "flex flex-col" }, _e = { class: "flex flex-col" }, Ae = { c
335
335
  _: 3
336
336
  }, 8, ["focused"])
337
337
  ]),
338
- h(j, {
338
+ h(L, {
339
339
  class: "flex-1",
340
340
  "model-value": { modelValue: s.value, amountAsString: String(p.value) },
341
341
  info: e.labelInfo,
@@ -348,10 +348,10 @@ const Fe = { class: "flex flex-col" }, _e = { class: "flex flex-col" }, Ae = { c
348
348
  }
349
349
  });
350
350
  export {
351
- $e as F,
351
+ Oe as F,
352
352
  We as _,
353
353
  qe as a,
354
354
  ze as b,
355
- K as c,
356
- J as d
355
+ J as c,
356
+ Z as d
357
357
  };