@feedmepos/mf-inventory-portal 0.0.23-dev.1 → 0.0.23-dev.10

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 (93) hide show
  1. package/dist/{App-Y3Ez8Rjf.js → App-DDxwfi6I.js} +36 -31
  2. package/dist/{ApprovalView-BUU1G4Q2.js → ApprovalView-7rpIigm0.js} +4 -4
  3. package/dist/{BindingsDialog-8wc4Q0JQ.js → BindingsDialog-DbyzX6mw.js} +2 -2
  4. package/dist/{BindingsPicker-DGWN1LQc.js → BindingsPicker-FZfhZr5O.js} +2 -2
  5. package/dist/{BindingsTable-7NJP2jT6.js → BindingsTable-Bk2770OV.js} +6 -6
  6. package/dist/ClosingDraftView-D9CnCwak.js +772 -0
  7. package/dist/{ClosingTemplateView-9s7vmwaT.js → ClosingTemplateView-DkpHmTtx.js} +32 -31
  8. package/dist/FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-DjBiov5r.js +283 -0
  9. package/dist/{FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-5DINn0ZB.js → FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-CBC214tP.js} +2 -2
  10. package/dist/{FmMultiselectDialog-7hok9sJP.js → FmMultiselectDialog-CK6xwOeG.js} +128 -124
  11. package/dist/FmUnitInput.vue_vue_type_script_setup_true_lang-IFTMUhET.js +329 -0
  12. package/dist/{IngredientBindedItem.vue_vue_type_script_setup_true_lang-FQ0HjuL3.js → IngredientBindedItem.vue_vue_type_script_setup_true_lang-D0otwOX8.js} +1 -1
  13. package/dist/{IngredientGroupView-C3maHTCg.js → IngredientGroupView-D5XtVfIQ.js} +12 -11
  14. package/dist/IngredientsView-c7WnQiTv.js +1666 -0
  15. package/dist/{IntegrationView-gO4h89Wj.js → IntegrationView-CHkhMxVM.js} +50 -50
  16. package/dist/{InventoryBindingForm-dh3GeyG-.js → InventoryBindingForm-BUZ9MS5V.js} +1 -1
  17. package/dist/{InventoryBindingForm.vue_vue_type_script_setup_true_lang-CJuo3i7W.js → InventoryBindingForm.vue_vue_type_script_setup_true_lang-YIRre_Km.js} +13 -13
  18. package/dist/{InventoryBindingSummary-BPoPcEoe.js → InventoryBindingSummary-BUi0mjeC.js} +1 -1
  19. package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-olm8sZKt.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-CpYtHPFH.js} +1 -1
  20. package/dist/{PremiumBadge.vue_vue_type_script_setup_true_lang-BezTV43V.js → PremiumBadge.vue_vue_type_script_setup_true_lang-D8IH1X1o.js} +2 -2
  21. package/dist/{PurchaseOrderPrintPreview-Dix_fIoo.js → PurchaseOrderPrintPreview-BLuoVz5N.js} +1 -1
  22. package/dist/ReceiveRequestView-BNM5JdQO.js +4165 -0
  23. package/dist/{RecipeView-C4-a4IEW.js → RecipeView-DxRumcLY.js} +11 -10
  24. package/dist/{StockView-Du2txrIP.js → StockView-CZyeg3sX.js} +1356 -1457
  25. package/dist/{SupplierView-D_09FbQh.js → SupplierView-C2XLbf27.js} +2352 -783
  26. package/dist/TransferDetails.vue_vue_type_script_setup_true_lang-BQG6UzUU.js +1229 -0
  27. package/dist/{TransferTemplateView-j3CRy6Lc.js → TransferTemplateView-BCxZCU0i.js} +307 -307
  28. package/dist/{UnitView-BXw2Vwq1.js → UnitView-uGpE4txg.js} +81 -80
  29. package/dist/{WarehouseView-CKamiETC.js → WarehouseView-DvQVmixr.js} +25 -24
  30. package/dist/api/bill.d.ts +2 -2
  31. package/dist/api/closing-draft.d.ts +6 -0
  32. package/dist/api/closing.d.ts +1 -0
  33. package/dist/api/netsuite.d.ts +70 -0
  34. package/dist/{app-GUbzqEtW.js → app-BaOENyRY.js} +3425 -3343
  35. package/dist/app.d.ts +3 -0
  36. package/dist/app.js +1 -1
  37. package/dist/components/FmMinMaxInputRules.d.ts +4 -1
  38. package/dist/components/row-action.enum.d.ts +1 -0
  39. package/dist/{date2-CLE9fB2R.js → date2-CfGU3sHq.js} +1 -1
  40. package/dist/{dayjs.min-CY1d38w7.js → dayjs.min-BMk-E1IO.js} +17 -17
  41. package/dist/{decimal-SIjO6Mjw.js → decimal-BkLhxOFS.js} +1 -1
  42. package/dist/{defineDeepModel-l40rX7kr.js → defineDeepModel-Cy-_HBnw.js} +1 -1
  43. package/dist/{feature-BXruKUhX.js → feature-GoxrdjJJ.js} +23 -9
  44. package/dist/form-mode.enum-BKiNVH6A.js +4 -0
  45. package/dist/{format-time-from-id-CcFsBXmk.js → format-time-from-id-96hwVl9P.js} +1 -1
  46. package/dist/format-unit-display-Cp0DBbM8.js +1217 -0
  47. package/dist/{fuzzy-CVOV9zJc.js → fuzzy-CBGiL1wK.js} +1 -1
  48. package/dist/index-0HEhOwKT.js +12087 -0
  49. package/dist/{index-BX5KZXhI.js → index-CoL8wxbn.js} +126 -122
  50. package/dist/{index-m9e9nYfl.js → index-S7yfliEo.js} +1 -1
  51. package/dist/netsuite-D3VPLW8O.js +225 -0
  52. package/dist/router/name.d.ts +1 -0
  53. package/dist/{row-action.enum-PMKMRrZR.js → row-action.enum-7rGLGZ5v.js} +10 -5
  54. package/dist/{rules-DlnN8IP3.js → rules-DxLLla7a.js} +40 -35
  55. package/dist/stock-BbFKtx1y.js +111 -0
  56. package/dist/stores/feature.d.ts +2 -0
  57. package/dist/stores/integration/netsuite.d.ts +81 -0
  58. package/dist/stores/inventory.d.ts +1 -4
  59. package/dist/style.css +1 -1
  60. package/dist/{supplier-B21WlSAM.js → supplier-gGovyyjr.js} +22 -22
  61. package/dist/tsconfig.app.tsbuildinfo +1 -1
  62. package/dist/{use-inventory-binding-dialog-D3x6xj2O.js → use-inventory-binding-dialog-DIBMf_9-.js} +2 -2
  63. package/dist/{use-template-enabled-locations-2-z-b-UXef.js → use-template-enabled-locations-2-Bof9JMYI.js} +2 -2
  64. package/dist/views/closing-draft/ClosingDraftView.vue.d.ts +2 -0
  65. package/dist/views/closing-draft/components/closing-draft-action/ClosingDraftAction.vue.d.ts +22 -0
  66. package/dist/views/closing-draft/components/closing-draft-dialog/ClosingDraftDialog.vue.d.ts +447 -0
  67. package/dist/views/closing-draft/composables/use-closing-draft-actions.d.ts +22 -0
  68. package/dist/views/closing-draft/composables/use-closing-draft-table.d.ts +2601 -0
  69. package/dist/views/closing-draft/helpers/draft-status-to-class-name.helper.d.ts +1 -0
  70. package/dist/views/closing-template/composables/use-closing-template-actions.d.ts +24 -192
  71. package/dist/views/closing-template/composables/use-closing-template-table.d.ts +24 -192
  72. package/dist/views/receive-request/components/transfer-form/NetSuiteField.vue.d.ts +2 -2
  73. package/dist/views/receive-request/components/transfer-form/TransferForm.vue.d.ts +40 -40
  74. package/dist/views/receive-request/components/transfer-form/composables/use-transfer-items.d.ts +1 -0
  75. package/dist/views/receive-request/composables/use-receive-request-form.d.ts +63 -63
  76. package/dist/views/receive-request/composables/use-receive-request-table.d.ts +63 -63
  77. package/dist/views/receive-request/helper/check-netsuite-subsidiary.helper.d.ts +1 -0
  78. package/dist/views/stock/components/StockRecordCard.vue.d.ts +1 -1
  79. package/dist/views/transfer-template/components/transfer-template-form/composables/use-transfer-template-items.d.ts +8 -8
  80. package/dist/views/transfer-template/composables/use-transfer-template-actions.d.ts +96 -96
  81. package/dist/views/transfer-template/composables/use-transfer-template-table.d.ts +96 -96
  82. package/dist/{xlsx-6mM1eNiL.js → xlsx-DOnDmayp.js} +1 -1
  83. package/dist/{xlsx.util-BLftcF4q.js → xlsx.util-BqsQd9YP.js} +1 -1
  84. package/package.json +3 -3
  85. package/dist/FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-B4DDh9-a.js +0 -267
  86. package/dist/FmUnitInput.vue_vue_type_script_setup_true_lang-CxR1FCft.js +0 -326
  87. package/dist/IngredientsView-DCR3IBkR.js +0 -1613
  88. package/dist/ReceiveRequestView-DdPiYb2P.js +0 -4082
  89. package/dist/TransferDetails.vue_vue_type_script_setup_true_lang-C9MOos--.js +0 -1144
  90. package/dist/format-unit-display-DEKg8cJm.js +0 -1198
  91. package/dist/index-CVsyOEb1.js +0 -10545
  92. package/dist/netsuite-DAKRv7zr.js +0 -146
  93. package/dist/normalizeArguments-DP7Hrren.js +0 -1552
@@ -1,20 +1,21 @@
1
- import { ref as M, h as F, defineComponent as j, resolveComponent as R, openBlock as k, createElementBlock as I, createElementVNode as _, normalizeClass as Y, createTextVNode as Fe, toDisplayString as C, unref as v, createCommentVNode as G, createVNode as T, withCtx as P, Fragment as H, renderList as J, computed as E, watch as Re, createSlots as Pe, createBlock as V, isRef as Oe, normalizeStyle as Ye, Teleport as Ke, normalizeProps as Ge, guardReactiveProps as Je, mergeProps as We } from "vue";
2
- import { u as qe, _ as Qe, a as Xe } from "./FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-5DINn0ZB.js";
1
+ import { ref as M, h as F, defineComponent as O, resolveComponent as R, openBlock as k, createElementBlock as I, createElementVNode as _, normalizeClass as Y, createTextVNode as Fe, toDisplayString as C, unref as v, createCommentVNode as G, createVNode as T, withCtx as P, Fragment as H, renderList as J, computed as E, watch as Re, createSlots as Pe, createBlock as V, isRef as je, normalizeStyle as Ye, Teleport as Ke, normalizeProps as Ge, guardReactiveProps as Je, mergeProps as We } from "vue";
2
+ import { u as qe, _ as Qe, a as Xe } from "./FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-CBC214tP.js";
3
3
  import { useCoreStore as le, useI18n as B } from "@feedmepos/mf-common";
4
4
  import { useDialogChild as Ze, useSnackbar as Z, useDialog as ae, FmButtonVariant as Se, components as L, useProxiedModel as et, useBreakpoints as tt } from "@feedmepos/ui-library";
5
5
  import { defineStore as Ae, storeToRefs as Ee } from "pinia";
6
- import { D as Me, R as N, F as z } from "./row-action.enum-PMKMRrZR.js";
7
- import { j as nt, u as re, c as Ue, a as ie, i as ot } from "./app-GUbzqEtW.js";
8
- import { a as oe, b as Ve, d as Ne, s as Be, r as st } from "./xlsx.util-BLftcF4q.js";
6
+ import { F as z } from "./form-mode.enum-BKiNVH6A.js";
7
+ import { k as nt, u as re, c as Ue, a as ie, i as ot } from "./app-BaOENyRY.js";
8
+ import { a as oe, b as Ve, d as Ne, s as Be, r as st } from "./xlsx.util-BqsQd9YP.js";
9
9
  import { F as lt } from "./FmDroppableField-8RzKjEdL.js";
10
- import { f as at, d as ne } from "./date2-CLE9fB2R.js";
11
- import { c as rt, F as O, _ as Le } from "./TableActionableRow.vue_vue_type_script_setup_true_lang-DlNJ6kRg.js";
12
- import { f as it } from "./format-time-from-id-CcFsBXmk.js";
13
- import { u as ct } from "./netsuite-DAKRv7zr.js";
14
- import { R as mt, A as ut } from "./rules-DlnN8IP3.js";
15
- import { F as dt } from "./FmMultiselectDialog-7hok9sJP.js";
16
- import { d as pt } from "./defineDeepModel-l40rX7kr.js";
17
- import { u as ft } from "./use-template-enabled-locations-2-z-b-UXef.js";
10
+ import { f as at, d as ne } from "./date2-CfGU3sHq.js";
11
+ import { D as Me, R as N } from "./row-action.enum-7rGLGZ5v.js";
12
+ import { c as rt, F as j, _ as Le } from "./TableActionableRow.vue_vue_type_script_setup_true_lang-DlNJ6kRg.js";
13
+ import { f as it } from "./format-time-from-id-96hwVl9P.js";
14
+ import { u as ct } from "./netsuite-D3VPLW8O.js";
15
+ import { R as mt, A as ut } from "./rules-DxLLla7a.js";
16
+ import { F as dt } from "./FmMultiselectDialog-CK6xwOeG.js";
17
+ import { d as pt } from "./defineDeepModel-Cy-_HBnw.js";
18
+ import { u as ft } from "./use-template-enabled-locations-2-Bof9JMYI.js";
18
19
  import { _ as vt } from "./_plugin-vue_export-helper-CHgC5LLL.js";
19
20
  const ee = nt((r, s) => {
20
21
  function o() {
@@ -537,7 +538,7 @@ function kt(r) {
537
538
  const Tt = { class: "flex items-center gap-12 pl-8" }, $t = { class: "flex flex-col" }, Ct = { class: "fm-typo-en-body-md-400 text-fm-color-typo-primary flex items-center gap-4" }, It = {
538
539
  key: 0,
539
540
  class: "text-fm-color-typo-secondary fm-typo-en-body-sm-400"
540
- }, St = { key: 0 }, De = /* @__PURE__ */ j({
541
+ }, St = { key: 0 }, De = /* @__PURE__ */ O({
541
542
  __name: "ClosingTemplateImportItem",
542
543
  props: {
543
544
  type: {},
@@ -606,7 +607,7 @@ const Tt = { class: "flex items-center gap-12 pl-8" }, $t = { class: "flex flex-
606
607
  }, Vt = { class: "text-fm-color-system-error-300 fm-typo-en-body-sm-400" }, Nt = {
607
608
  key: 0,
608
609
  class: "max-h-[200px] overflow-y-auto flex flex-col gap-8"
609
- }, Bt = { class: "fm-typo-en-body-lg-600" }, Lt = /* @__PURE__ */ j({
610
+ }, Bt = { class: "fm-typo-en-body-lg-600" }, Lt = /* @__PURE__ */ O({
610
611
  __name: "ClosingTemplateImport",
611
612
  setup(r) {
612
613
  const s = M(null), o = Ze(), l = Z(), e = M(!1), t = M(!1), y = M(new Array()), p = M([]), f = M([]), i = E(
@@ -1149,7 +1150,7 @@ function zt(r) {
1149
1150
  })
1150
1151
  };
1151
1152
  }
1152
- const Ht = { class: "flex flex-col gap-16 py-12" }, jt = { class: "flex" }, Ot = { class: "flex-1 flex flex-col" }, Yt = { class: "fm-typo-en-title-sm-600 text-fm-color-typo-primary" }, Kt = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, Gt = { class: "flex flex-col gap-4" }, Jt = /* @__PURE__ */ j({
1153
+ const Ht = { class: "flex flex-col gap-16 py-12" }, Ot = { class: "flex" }, jt = { class: "flex-1 flex flex-col" }, Yt = { class: "fm-typo-en-title-sm-600 text-fm-color-typo-primary" }, Kt = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary" }, Gt = { class: "flex flex-col gap-4" }, Jt = /* @__PURE__ */ O({
1153
1154
  __name: "ClosingTemplateItem",
1154
1155
  props: {
1155
1156
  cellByColId: {},
@@ -1162,13 +1163,13 @@ const Ht = { class: "flex flex-col gap-16 py-12" }, jt = { class: "flex" }, Ot =
1162
1163
  return (e, t) => {
1163
1164
  var y, p, f, i, d;
1164
1165
  return k(), I("div", Ht, [
1165
- _("div", jt, [
1166
- _("div", Ot, [
1166
+ _("div", Ot, [
1167
+ _("div", jt, [
1167
1168
  _("div", Yt, C(o.value.original.sku.name), 1),
1168
1169
  _("div", Kt, C(o.value.original.sku.code), 1)
1169
1170
  ]),
1170
1171
  _("div", null, [
1171
- T(v(O), {
1172
+ T(v(j), {
1172
1173
  render: (f = (p = (y = e.cellByColId[v(K).Delete]) == null ? void 0 : y.column) == null ? void 0 : p.columnDef) == null ? void 0 : f.cell,
1173
1174
  props: (d = (i = e.cellByColId[v(K).Delete]) == null ? void 0 : i.getContext) == null ? void 0 : d.call(i)
1174
1175
  }, null, 8, ["render", "props"])
@@ -1181,7 +1182,7 @@ const Ht = { class: "flex flex-col gap-16 py-12" }, jt = { class: "flex" }, Ot =
1181
1182
  return k(), I("div", {
1182
1183
  key: m.id
1183
1184
  }, [
1184
- T(v(O), {
1185
+ T(v(j), {
1185
1186
  render: (h = (g = m.column) == null ? void 0 : g.columnDef) == null ? void 0 : h.cell,
1186
1187
  props: (u = m.getContext) == null ? void 0 : u.call(m)
1187
1188
  }, null, 8, ["render", "props"])
@@ -1191,7 +1192,7 @@ const Ht = { class: "flex flex-col gap-16 py-12" }, jt = { class: "flex" }, Ot =
1191
1192
  ]);
1192
1193
  };
1193
1194
  }
1194
- }), Wt = { class: "flex flex-col gap-16" }, qt = { class: "flex flex-col gap-24" }, Qt = { class: "flex flex-col gap-16" }, Xt = { class: "flex items-center" }, Zt = { class: "flex-1 fm-typo-en-title-sm-600" }, en = { class: "flex flex-col gap-16" }, tn = { class: "flex items-center" }, nn = { class: "flex-1 gap-8 fm-typo-en-title-sm-600" }, on = /* @__PURE__ */ j({
1195
+ }), Wt = { class: "flex flex-col gap-16" }, qt = { class: "flex flex-col gap-24" }, Qt = { class: "flex flex-col gap-16" }, Xt = { class: "flex items-center" }, Zt = { class: "flex-1 fm-typo-en-title-sm-600" }, en = { class: "flex flex-col gap-16" }, tn = { class: "flex items-center" }, nn = { class: "flex-1 gap-8 fm-typo-en-title-sm-600" }, on = /* @__PURE__ */ O({
1195
1196
  __name: "ClosingTemplateForm",
1196
1197
  props: {
1197
1198
  modelValue: {},
@@ -1385,7 +1386,7 @@ const Ht = { class: "flex flex-col gap-16 py-12" }, jt = { class: "flex" }, Ot =
1385
1386
  }, 8, ["disabled"]);
1386
1387
  };
1387
1388
  }
1388
- }), sn = { class: "flex items-center" }, ln = { class: "fm-typo-en-title-md-600" }, an = { class: "flex gap-4" }, rn = /* @__PURE__ */ j({
1389
+ }), sn = { class: "flex items-center" }, ln = { class: "fm-typo-en-title-md-600" }, an = { class: "flex gap-4" }, rn = /* @__PURE__ */ O({
1389
1390
  __name: "ClosingTemplateDialog",
1390
1391
  props: {
1391
1392
  mode: {},
@@ -1497,7 +1498,7 @@ const Ht = { class: "flex flex-col gap-16 py-12" }, jt = { class: "flex" }, Ot =
1497
1498
  const A = R("FmButton"), D = R("FmSideSheet");
1498
1499
  return k(), V(D, {
1499
1500
  modelValue: v(f),
1500
- "onUpdate:modelValue": w[2] || (w[2] = (S) => Oe(f) ? f.value = S : null),
1501
+ "onUpdate:modelValue": w[2] || (w[2] = (S) => je(f) ? f.value = S : null),
1501
1502
  "dismiss-away": "",
1502
1503
  "close-button": "",
1503
1504
  "max-width": 800
@@ -1551,7 +1552,7 @@ const un = /* @__PURE__ */ vt(cn, [["render", mn]]), dn = { class: "flex flex-co
1551
1552
  }, yn = {
1552
1553
  key: 3,
1553
1554
  class: "fm-typo-en-body-lg-400 text-fm-color-typo-primary flex flex-col gap-12"
1554
- }, hn = { class: "fm-typo-en-body-md-600" }, bn = { class: "fm-typo-en-body-md-600" }, _n = { key: 4 }, xn = { class: "fm-typo-en-body-md-600" }, wn = { class: "fm-typo-en-body-md-600" }, kn = { class: "flex sm:flex-col xs:flex-col justify-end gap-8 w-full mb-16" }, Tn = /* @__PURE__ */ j({
1555
+ }, hn = { class: "fm-typo-en-body-md-600" }, bn = { class: "fm-typo-en-body-md-600" }, _n = { key: 4 }, xn = { class: "fm-typo-en-body-md-600" }, wn = { class: "fm-typo-en-body-md-600" }, kn = { class: "flex sm:flex-col xs:flex-col justify-end gap-8 w-full mb-16" }, Tn = /* @__PURE__ */ O({
1555
1556
  __name: "ClosingTemplatePublish",
1556
1557
  emits: ["close"],
1557
1558
  setup(r, { emit: s }) {
@@ -1643,7 +1644,7 @@ const un = /* @__PURE__ */ vt(cn, [["render", mn]]), dn = { class: "flex flex-co
1643
1644
  ]);
1644
1645
  };
1645
1646
  }
1646
- }), $n = { class: "flex-1 flex flex-col gap-8" }, Cn = { class: "flex flex-col" }, In = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Sn = { class: "fm-typo-en-body-lg-600 text-fm-color-typo-primary" }, Mn = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary line-clamp-2" }, Dn = { class: "fm-typo-en-body-lg-400 line-clamp-2" }, Wn = /* @__PURE__ */ j({
1647
+ }), $n = { class: "flex-1 flex flex-col gap-8" }, Cn = { class: "flex flex-col" }, In = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Sn = { class: "fm-typo-en-body-lg-600 text-fm-color-typo-primary" }, Mn = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary line-clamp-2" }, Dn = { class: "fm-typo-en-body-lg-400 line-clamp-2" }, qn = /* @__PURE__ */ O({
1647
1648
  __name: "ClosingTemplateView",
1648
1649
  setup(r) {
1649
1650
  const { t: s } = B(), { createTemplate: o, updateTemplate: l, exportTemplates: e, importTemplates: t } = se(), { templateDialogProps: y, templateDetailsProps: p } = Ee(se()), f = re(), i = ae(), d = te(), m = qe(), { breakpoints: g } = tt();
@@ -1775,13 +1776,13 @@ const un = /* @__PURE__ */ vt(cn, [["render", mn]]), dn = { class: "flex flex-co
1775
1776
  _("div", $n, [
1776
1777
  _("div", Cn, [
1777
1778
  _("div", In, [
1778
- T(v(O), {
1779
+ T(v(j), {
1779
1780
  render: (de = (ue = (me = U._id) == null ? void 0 : me.column) == null ? void 0 : ue.columnDef) == null ? void 0 : de.cell,
1780
1781
  props: (pe = (W = U._id) == null ? void 0 : W.getContext) == null ? void 0 : pe.call(W)
1781
1782
  }, null, 8, ["render", "props"])
1782
1783
  ]),
1783
1784
  _("div", Sn, [
1784
- T(v(O), {
1785
+ T(v(j), {
1785
1786
  render: (ge = (ve = (fe = U.name) == null ? void 0 : fe.column) == null ? void 0 : ve.columnDef) == null ? void 0 : ge.cell,
1786
1787
  props: (ye = (q = U.name) == null ? void 0 : q.getContext) == null ? void 0 : ye.call(q)
1787
1788
  }, null, 8, ["render", "props"])
@@ -1790,18 +1791,18 @@ const un = /* @__PURE__ */ vt(cn, [["render", mn]]), dn = { class: "flex flex-co
1790
1791
  count: ((be = S.original.locations) == null ? void 0 : be.length) ?? 0
1791
1792
  }) : v(s)("inventory.closing.table.enabledForAll")), 1),
1792
1793
  _("div", Mn, C([
1793
- ...S.original.items.slice(0, 3).map((je) => je.sku.name),
1794
+ ...S.original.items.slice(0, 3).map((Oe) => Oe.sku.name),
1794
1795
  ...S.original.items.length >= 3 ? [`and ${S.original.items.length - 3} more items`] : []
1795
1796
  ].join(", ")), 1),
1796
1797
  _("div", Dn, [
1797
- T(v(O), {
1798
+ T(v(j), {
1798
1799
  render: (we = (xe = (_e = U.ref) == null ? void 0 : _e.column) == null ? void 0 : xe.columnDef) == null ? void 0 : we.cell,
1799
1800
  props: (ke = (Q = U.ref) == null ? void 0 : Q.getContext) == null ? void 0 : ke.call(Q)
1800
1801
  }, null, 8, ["render", "props"])
1801
1802
  ])
1802
1803
  ]),
1803
1804
  _("div", null, [
1804
- T(v(O), {
1805
+ T(v(j), {
1805
1806
  render: (Ce = ($e = (Te = U.status) == null ? void 0 : Te.column) == null ? void 0 : $e.columnDef) == null ? void 0 : Ce.cell,
1806
1807
  props: (Ie = (X = U.status) == null ? void 0 : X.getContext) == null ? void 0 : Ie.call(X)
1807
1808
  }, null, 8, ["render", "props"])
@@ -1829,5 +1830,5 @@ const un = /* @__PURE__ */ vt(cn, [["render", mn]]), dn = { class: "flex flex-co
1829
1830
  }
1830
1831
  });
1831
1832
  export {
1832
- Wn as default
1833
+ qn as default
1833
1834
  };
@@ -0,0 +1,283 @@
1
+ import { w as V, u as E, I, B as H, D as M } from "./app-BaOENyRY.js";
2
+ import { a as k, t as R } from "./rules-DxLLla7a.js";
3
+ import { u as j } from "./supplier-gGovyyjr.js";
4
+ import { P as S } from "./format-unit-display-Cp0DBbM8.js";
5
+ import { computed as y, defineComponent as $, mergeModels as W, useModel as J, resolveComponent as U, openBlock as T, createElementBlock as A, normalizeStyle as K, createElementVNode as D, createVNode as Q, withCtx as X, createBlock as w, createCommentVNode as N, Fragment as Y, renderList as Z, unref as x } from "vue";
6
+ function z(l, r, e) {
7
+ var s;
8
+ if (!!r.measurement === !!e && ((s = r.measurement) == null ? void 0 : s.id) === e)
9
+ return r;
10
+ if (!e)
11
+ return {
12
+ costPerUnit: r.costPerUnit
13
+ };
14
+ const o = l.measurements.find((i) => i.id === e);
15
+ return o ? {
16
+ costPerUnit: r.costPerUnit,
17
+ measurement: o
18
+ } : {
19
+ costPerUnit: r.costPerUnit
20
+ };
21
+ }
22
+ function re(l, r, e, n) {
23
+ var b, g, u;
24
+ if (n != null && n.manualTotalCost)
25
+ return n == null ? void 0 : n.manualTotalCost;
26
+ const t = (u = (g = (b = n == null ? void 0 : n.supplier) == null ? void 0 : b.supplyItems) == null ? void 0 : g.find(
27
+ (a) => a.skuId === l._id
28
+ )) == null ? void 0 : u.defaultCost, o = l.defaultCost ? z(l.unit, l.defaultCost, l.trackingMeasurement) : void 0, s = t ?? o, i = s == null ? void 0 : s.costPerUnit, c = i ? s != null && s.measurement ? +k(i) / +k(s == null ? void 0 : s.measurement.conversion) : +k(i) : void 0, p = c ? e ? c * +k(e.conversion) : c : void 0, f = p ? +k(r) * p : void 0;
29
+ return f ? {
30
+ ...R(f ?? 0, 2),
31
+ currency: V()
32
+ } : {
33
+ amount: 0,
34
+ precision: 0,
35
+ currency: V()
36
+ };
37
+ }
38
+ function F(l) {
39
+ return H.parse(l);
40
+ }
41
+ function C(l) {
42
+ return {
43
+ _id: l.doc._id,
44
+ internal: l.type,
45
+ contactName: l.doc.profile.name,
46
+ name: l.doc.profile.name ?? "",
47
+ email: l.doc.profile.email,
48
+ phoneNumber: l.doc.profile.phoneNo,
49
+ registrationNumber: l.doc.profile.regNo,
50
+ address: l.doc.profile.address ?? {
51
+ line1: "",
52
+ state: "",
53
+ city: "",
54
+ postcode: "",
55
+ country: ""
56
+ }
57
+ };
58
+ }
59
+ function ie(l, r, e = !1, n = !1) {
60
+ const t = j(), o = E();
61
+ o.watchLocation(async () => {
62
+ var v;
63
+ await t.readSuppliers();
64
+ const u = l();
65
+ if ((v = u.supplier) != null && v._id) return;
66
+ const a = n ? t.suppliers[0] : t.businessSuppliers[0], d = (e ? o.locations.filter((m) => m.doc._id !== o.currentLocation.doc._id) : o.locations)[0];
67
+ r({
68
+ ...u,
69
+ supplier: a ? F(a) : d ? C(d) : u.supplier
70
+ });
71
+ });
72
+ const s = y(
73
+ () => {
74
+ var u, a;
75
+ return typeof ((a = (u = l()) == null ? void 0 : u.supplier) == null ? void 0 : a.internal) == "string" ? S.TRANSFER : S.PURCHASE;
76
+ }
77
+ ), i = y({
78
+ get() {
79
+ var u, a;
80
+ return (a = (u = l()) == null ? void 0 : u.supplier) == null ? void 0 : a._id;
81
+ },
82
+ set(u) {
83
+ const a = l() ?? {};
84
+ if (s.value === S.PURCHASE) {
85
+ const _ = (n ? t.suppliers : t.businessSuppliers).find((B) => B._id === u);
86
+ r({
87
+ ...a,
88
+ supplier: _ ? F(_) : a.supplier
89
+ });
90
+ return;
91
+ }
92
+ const v = (e ? o.locations.filter((m) => m.doc._id !== o.currentLocation.doc._id) : o.locations).find((m) => m.doc._id === u);
93
+ r({
94
+ ...a,
95
+ supplier: v ? C(v) : a.supplier
96
+ });
97
+ }
98
+ }), c = y(() => t.locationSuppliers.map(F)), p = y(() => t.businessSuppliers.map(F)), f = y(() => {
99
+ const u = [...c.value], a = [...p.value];
100
+ return n ? [...a, ...u] : a;
101
+ }), L = y(() => {
102
+ var h;
103
+ const u = ((h = o._currentLocation) == null ? void 0 : h.type) === I.warehouse;
104
+ return (e ? o.locations.filter((d) => d.doc._id !== o.currentLocation.doc._id) : o.locations).filter((d) => u || d.acceptRequest).map(C);
105
+ }), b = y(() => {
106
+ if (s.value === S.PURCHASE) {
107
+ const a = c.value.map((d) => ({
108
+ label: d.name,
109
+ value: d._id
110
+ })), h = p.value.map((d) => ({
111
+ label: d.name,
112
+ sublabel: "Business supplier",
113
+ value: d._id
114
+ }));
115
+ return n ? [...a, ...h] : h;
116
+ }
117
+ return L.value.map((a) => ({
118
+ label: a.name,
119
+ sublabel: a.internal ? `${a.internal}` : void 0,
120
+ value: a._id
121
+ }));
122
+ }), g = y(() => {
123
+ var d, v;
124
+ const u = (v = (d = l()) == null ? void 0 : d.supplier) == null ? void 0 : v._id;
125
+ if (s.value === S.PURCHASE) {
126
+ const m = t.suppliers.find((_) => _._id === u);
127
+ return m ? F(m) : null;
128
+ }
129
+ const h = o.locations.find((m) => m.doc._id);
130
+ return h ? C(h) : null;
131
+ });
132
+ return {
133
+ transferLocationModel: i,
134
+ transferLocationOptions: b,
135
+ locationOptionsTypePurchase: f,
136
+ locationOptionsTypePurchaseLocationLevel: c,
137
+ locationOptionsTypeTransfer: L,
138
+ selectedLocation: g
139
+ };
140
+ }
141
+ class O {
142
+ static getDescendantProperty(r, e, n = []) {
143
+ let t, o, s, i, c, p;
144
+ if (e) {
145
+ if (s = e.indexOf("."), s === -1 ? t = e : (t = e.slice(0, s), o = e.slice(s + 1)), i = r[t], i !== null && typeof i < "u")
146
+ if (!o && (typeof i == "string" || typeof i == "number"))
147
+ n.push(i);
148
+ else if (Object.prototype.toString.call(i) === "[object Array]")
149
+ for (c = 0, p = i.length; c < p; c++)
150
+ O.getDescendantProperty(i[c], o, n);
151
+ else o && O.getDescendantProperty(i, o, n);
152
+ } else
153
+ n.push(r);
154
+ return n;
155
+ }
156
+ }
157
+ class P {
158
+ constructor(r = [], e = [], n = {}) {
159
+ Array.isArray(e) || (n = e, e = []), this.haystack = r, this.keys = e, this.options = Object.assign({
160
+ caseSensitive: !1,
161
+ sort: !1
162
+ }, n);
163
+ }
164
+ search(r = "") {
165
+ if (r === "")
166
+ return this.haystack;
167
+ const e = [];
168
+ for (let n = 0; n < this.haystack.length; n++) {
169
+ const t = this.haystack[n];
170
+ if (this.keys.length === 0) {
171
+ const o = P.isMatch(t, r, this.options.caseSensitive);
172
+ o && e.push({ item: t, score: o });
173
+ } else
174
+ for (let o = 0; o < this.keys.length; o++) {
175
+ const s = O.getDescendantProperty(t, this.keys[o]);
176
+ let i = !1;
177
+ for (let c = 0; c < s.length; c++) {
178
+ const p = P.isMatch(s[c], r, this.options.caseSensitive);
179
+ if (p) {
180
+ i = !0, e.push({ item: t, score: p });
181
+ break;
182
+ }
183
+ }
184
+ if (i)
185
+ break;
186
+ }
187
+ }
188
+ return this.options.sort && e.sort((n, t) => n.score - t.score), e.map((n) => n.item);
189
+ }
190
+ static isMatch(r, e, n) {
191
+ r = String(r), e = String(e), n || (r = r.toLocaleLowerCase(), e = e.toLocaleLowerCase());
192
+ const t = P.nearestIndexesFor(r, e);
193
+ return t ? r === e ? 1 : t.length > 1 ? 2 + (t[t.length - 1] - t[0]) : 2 + t[0] : !1;
194
+ }
195
+ static nearestIndexesFor(r, e) {
196
+ const n = e.split("");
197
+ let t = [];
198
+ return P.indexesOfFirstLetter(r, e).forEach((s, i) => {
199
+ let c = s + 1;
200
+ t[i] = [s];
201
+ for (let p = 1; p < n.length; p++) {
202
+ const f = n[p];
203
+ if (c = r.indexOf(f, c), c === -1) {
204
+ t[i] = !1;
205
+ break;
206
+ }
207
+ t[i].push(c), c++;
208
+ }
209
+ }), t = t.filter((s) => s !== !1), t.length ? t.sort((s, i) => s.length === 1 ? s[0] - i[0] : (s = s[s.length - 1] - s[0], i = i[i.length - 1] - i[0], s - i))[0] : !1;
210
+ }
211
+ static indexesOfFirstLetter(r, e) {
212
+ const n = e[0];
213
+ return r.split("").map((t, o) => t !== n ? !1 : o).filter((t) => t !== !1);
214
+ }
215
+ }
216
+ const G = { class: "sticky top-0 bg-white mb-8" }, q = { class: "overflow-y-auto pb-8" }, le = /* @__PURE__ */ $({
217
+ __name: "FmFilterableMenuOptions",
218
+ props: /* @__PURE__ */ W({
219
+ modelValue: {},
220
+ maxHeight: {},
221
+ width: {},
222
+ handleItemChange: { type: Function },
223
+ items: {},
224
+ options: {}
225
+ }, {
226
+ search: {},
227
+ searchModifiers: {}
228
+ }),
229
+ emits: ["update:search"],
230
+ setup(l) {
231
+ const r = l, e = J(l, "search"), n = y(
232
+ () => new P(r.items, ["label", "sublabel"], r.options)
233
+ ), t = y(() => n.value.search(e.value));
234
+ return (o, s) => {
235
+ const i = U("FmButton"), c = U("FmTextField"), p = U("FmMenuItem");
236
+ return T(), A("div", {
237
+ class: "relative",
238
+ style: K({ maxHeight: `${o.maxHeight}px`, width: o.width })
239
+ }, [
240
+ D("div", G, [
241
+ Q(c, {
242
+ modelValue: e.value,
243
+ "onUpdate:modelValue": s[1] || (s[1] = (f) => e.value = f),
244
+ placeholder: "Filter options"
245
+ }, {
246
+ append: X(() => [
247
+ e.value ? (T(), w(i, {
248
+ key: 0,
249
+ variant: "tertiary",
250
+ "prepend-icon": "close",
251
+ onClick: s[0] || (s[0] = (f) => e.value = "")
252
+ })) : N("", !0)
253
+ ]),
254
+ _: 1
255
+ }, 8, ["modelValue"])
256
+ ]),
257
+ D("div", q, [
258
+ (T(!0), A(Y, null, Z(t.value, (f, L) => (T(), w(p, {
259
+ key: L,
260
+ label: f.label,
261
+ sublabel: f.sublabel,
262
+ "model-value": x(M)(o.modelValue, f.value),
263
+ onClick: () => o.handleItemChange(x(M)(o.modelValue, f.value), f),
264
+ onVnodeMounted: (b) => {
265
+ var g;
266
+ return x(M)(o.modelValue, f.value) && ((g = b.el) == null || g.scrollIntoView({ behavior: "smooth", block: "center" }), console.log("scrollTo", b.el)), void 0;
267
+ }
268
+ }, null, 8, ["label", "sublabel", "model-value", "onClick", "onVnodeMounted"]))), 128)),
269
+ t.value.length ? N("", !0) : (T(), w(p, {
270
+ key: 0,
271
+ disabled: "",
272
+ label: "No options available"
273
+ }))
274
+ ])
275
+ ], 4);
276
+ };
277
+ }
278
+ });
279
+ export {
280
+ le as _,
281
+ re as c,
282
+ ie as u
283
+ };
@@ -1,8 +1,8 @@
1
1
  import { reactive as W, onUnmounted as q, defineComponent as T, ref as H, computed as _, resolveComponent as k, openBlock as o, createElementBlock as w, Fragment as V, createElementVNode as f, normalizeClass as D, unref as g, toDisplayString as R, createCommentVNode as b, createBlock as d, withCtx as I, createVNode as M, renderList as S, renderSlot as G, Teleport as z, watch as J, mergeModels as K, useModel as P } from "vue";
2
2
  import { useBreakpoints as Y } from "@feedmepos/ui-library";
3
- import { u as j } from "./app-GUbzqEtW.js";
3
+ import { u as j } from "./app-BaOENyRY.js";
4
4
  import { useCoreStore as X, useI18n as Q } from "@feedmepos/mf-common";
5
- import { c as O } from "./date2-CLE9fB2R.js";
5
+ import { c as O } from "./date2-CfGU3sHq.js";
6
6
  const N = W({});
7
7
  function E() {
8
8
  const v = `${Math.random()}`, l = new ResizeObserver((s) => {