@feedmepos/mf-inventory-portal 0.0.25-dev.17 → 0.0.25-dev.19

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 (57) hide show
  1. package/dist/{App-7ReqlqA4.js → App-Hgn8IBaK.js} +2 -2
  2. package/dist/{ApprovalView-qAV_1bug.js → ApprovalView-BSk9kEGm.js} +15 -9
  3. package/dist/{BindingsDialog-D8KPqrv8.js → BindingsDialog-SxUwbW5x.js} +2 -2
  4. package/dist/{BindingsPicker-BnnpoQfF.js → BindingsPicker-_zOGJ17i.js} +5 -5
  5. package/dist/{BindingsTable-Dnc5yg5v.js → BindingsTable-I8MLwuIR.js} +5 -5
  6. package/dist/{ClosingDraftView-DV-dP-0G.js → ClosingDraftView-D80vDRO7.js} +53 -53
  7. package/dist/{ClosingTemplateView-Bo5uzKK2.js → ClosingTemplateView-BCE-SHm9.js} +2 -2
  8. package/dist/FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-BmLxDo6V.js +215 -0
  9. package/dist/{FmUnitInput.vue_vue_type_script_setup_true_lang-Bycca0S5.js → FmUnitInput.vue_vue_type_script_setup_true_lang-D21lpws0.js} +1 -1
  10. package/dist/{IngredientBindedItem.vue_vue_type_script_setup_true_lang-sVM6cQes.js → IngredientBindedItem.vue_vue_type_script_setup_true_lang-WTlNX0f8.js} +1 -1
  11. package/dist/{IngredientGroupView-CmkSvOxJ.js → IngredientGroupView-DDD_-og5.js} +1 -1
  12. package/dist/{IngredientsView-DIn-3Jee.js → IngredientsView-CJ4F7BwZ.js} +4 -4
  13. package/dist/{IntegrationView-CtawckJy.js → IntegrationView-B0TjX4yz.js} +1 -1
  14. package/dist/{InventoryBindingForm-Dmd68jKK.js → InventoryBindingForm-DGXN2PXz.js} +1 -1
  15. package/dist/{InventoryBindingForm.vue_vue_type_script_setup_true_lang-DBAwheaI.js → InventoryBindingForm.vue_vue_type_script_setup_true_lang-gQNCKIfa.js} +3 -3
  16. package/dist/{InventoryBindingSummary-Dho1qrPY.js → InventoryBindingSummary-CDAivJA8.js} +1 -1
  17. package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-Dja0BjOa.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-CfaZ1GtI.js} +1 -1
  18. package/dist/{PremiumBadge.vue_vue_type_script_setup_true_lang-CjvQTt0Y.js → PremiumBadge.vue_vue_type_script_setup_true_lang-DmhP_O3l.js} +1 -1
  19. package/dist/{PublishView-DG9ppOMN.js → PublishView-DvriUy_9.js} +13 -13
  20. package/dist/{PurchaseOrderPrintPreview-BfogmnuA.js → PurchaseOrderPrintPreview-Dr-I6VKI.js} +1 -1
  21. package/dist/ReceiveRequestView-FcC0nStC.js +2318 -0
  22. package/dist/{RecipeView-B3t6mU2N.js → RecipeView-BMYzOsb2.js} +3 -3
  23. package/dist/{StockView-DfylYVkd.js → StockView-gTmg4gih.js} +7 -7
  24. package/dist/{SupplierView-BQHWrUpw.js → SupplierView-CrixDjq3.js} +4 -4
  25. package/dist/TransferDetails.vue_vue_type_script_setup_true_lang-15cqyqCC.js +1567 -0
  26. package/dist/{TransferTemplateView-BxO2UFyf.js → TransferTemplateView-DhgyCwnD.js} +7 -7
  27. package/dist/{UnitView-Cl299OpQ.js → UnitView-Bll1VTnD.js} +3 -3
  28. package/dist/{WarehouseView-C9oa2Jis.js → WarehouseView-KstzwWxq.js} +1 -1
  29. package/dist/{app-DZ9U0oko.js → app-qyqp2u_f.js} +7576 -7525
  30. package/dist/app.js +1 -1
  31. package/dist/components/FmMultiselectDialog.d.ts +24 -1
  32. package/dist/components/MountListener.vue.d.ts +15 -0
  33. package/dist/{decimal-Q0qpn1nX.js → decimal-BQ6Hkwom.js} +1 -1
  34. package/dist/{feature-CwrW1toS.js → feature-C6Z6N_iv.js} +52 -63
  35. package/dist/{format-unit-display-Cijlq5k5.js → format-unit-display-T-fT7FAg.js} +13 -13
  36. package/dist/{index-CG9f2hcH.js → index-B6HIaHJq.js} +2 -2
  37. package/dist/{stock-B8OABZwR.js → stock-Cd6rXnhv.js} +1 -1
  38. package/dist/stores/feature.d.ts +0 -4
  39. package/dist/{supplier-OhriR4IQ.js → supplier-b6qWYeQu.js} +1 -1
  40. package/dist/tsconfig.app.tsbuildinfo +1 -1
  41. package/dist/{use-ingredient-select-dialog-P6o_ZU_Z.js → use-ingredient-select-dialog-C8sylcwR.js} +1 -1
  42. package/dist/{use-inventory-binding-dialog-8a_D3hzG.js → use-inventory-binding-dialog-D7wI4_lU.js} +1 -1
  43. package/dist/views/receive-request/components/transfer-details/TransferDetails.vue.d.ts +1387 -0
  44. package/dist/views/receive-request/components/transfer-details/TransferDetailsProps.d.ts +3 -1
  45. package/dist/views/receive-request/components/transfer-dialog/TransferDialogProps.d.ts +3 -0
  46. package/dist/views/receive-request/components/transfer-form/TransferFormProps.d.ts +1 -2
  47. package/dist/views/receive-request/components/transfer-form/composables/use-transfer-items.d.ts +0 -1
  48. package/dist/views/receive-request/composables/use-receive-request-form.d.ts +27 -9
  49. package/dist/views/receive-request/composables/use-receive-request-table.d.ts +22 -9
  50. package/dist/views/receive-request/helper/po-to-po-template.util.d.ts +1 -0
  51. package/dist/views/transfer-template/helpers/location-to-po-supplier.util.d.ts +75 -0
  52. package/dist/{vue-i18n-BmOal3Ap.js → vue-i18n-BmWUvN1e.js} +261 -261
  53. package/package.json +1 -1
  54. package/dist/FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-BPNKuOjZ.js +0 -211
  55. package/dist/ReceiveRequestView-DcshoUs1.js +0 -2239
  56. package/dist/TransferDetails.vue_vue_type_script_setup_true_lang-aQkAoXb3.js +0 -1501
  57. package/dist/views/receive-request/components/transfer-form/TransferForm.vue.d.ts +0 -3006
@@ -1,8 +1,8 @@
1
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, g as s, c as W } from "./app-DZ9U0oko.js";
2
+ import { u as k, a as D, b as H, R as e, g as s, c as W } from "./app-qyqp2u_f.js";
3
3
  import { useCoreStore as A, useI18n as B } from "@feedmepos/mf-common";
4
4
  import { useRouter as C, useRoute as K } from "vue-router";
5
- import { u as O } from "./feature-CwrW1toS.js";
5
+ import { u as O } from "./feature-C6Z6N_iv.js";
6
6
  import { u as $ } from "./useTabStorage-BkIVScW_.js";
7
7
  import { u as Q } from "./googlemap-Dm8ERVai.js";
8
8
  import "./array-hChJVZLE.js";
@@ -1,6 +1,6 @@
1
- import { defineComponent as oe, ref as g, watch as re, computed as b, resolveComponent as ne, openBlock as y, createBlock as J, unref as e, withCtx as x, createElementVNode as s, normalizeClass as se, createVNode as n, normalizeStyle as le, toDisplayString as ce, createElementBlock as ie, createCommentVNode as ue, Teleport as pe, mergeProps as me } from "vue";
2
- import { u as de, az as _, aK as fe, ab as Q, y as _e, _ as ve, z as he, B as De, E as v } from "./app-DZ9U0oko.js";
3
- import { a as ge, P as O, b as be, _ as ye } from "./TransferDetails.vue_vue_type_script_setup_true_lang-aQkAoXb3.js";
1
+ import { defineComponent as oe, ref as g, watch as re, computed as b, resolveComponent as ne, openBlock as y, createBlock as K, unref as e, withCtx as x, createElementVNode as s, normalizeClass as se, createVNode as n, normalizeStyle as le, toDisplayString as ce, createElementBlock as ie, createCommentVNode as ue, Teleport as pe, mergeProps as me } from "vue";
2
+ import { u as de, az as _, aJ as fe, ab as Q, y as _e, _ as ve, z as he, B as De, E as v } from "./app-qyqp2u_f.js";
3
+ import { a as ge, P as O, b as be, _ as ye } from "./TransferDetails.vue_vue_type_script_setup_true_lang-15cqyqCC.js";
4
4
  import { useBreakpoints as xe } from "@feedmepos/ui-library";
5
5
  import { useI18n as Oe } from "@feedmepos/mf-common";
6
6
  const Re = { class: "flex flex-col py-8" }, we = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Pe = { class: "fm-typo-en-body-lg-600 text-fm-color-typo-primary line-clamp-1" }, ke = { class: "fm-typo-en-body-md-400 text-fm-color-typo-primary line-clamp-1" }, Se = {
@@ -49,7 +49,7 @@ const Re = { class: "flex flex-col py-8" }, we = { class: "fm-typo-en-body-md-40
49
49
  }
50
50
  return (c, l) => {
51
51
  const te = ne("FmTable");
52
- return y(), J(ve, {
52
+ return y(), K(ve, {
53
53
  title: e(P)("inventory.transfer.approval.title"),
54
54
  actions: I.value,
55
55
  "onClick:action": ee
@@ -76,16 +76,22 @@ const Re = { class: "flex flex-col py-8" }, we = { class: "fm-typo-en-body-md-40
76
76
  "row-data": e(o).purchaseRequests.value,
77
77
  "search-value": h.value,
78
78
  loading: !e(X)._currentLocation || e(o).loading.value,
79
- onRowClick: l[1] || (l[1] = (r) => e(o).promptShowTransferDetails(r.original.purchaseOrder, r.original)),
79
+ onRowClick: l[1] || (l[1] = (r) => e(o).promptShowTransferDetails(
80
+ r.original.purchaseOrder,
81
+ r.original
82
+ )),
80
83
  "page-size": Z.value
81
84
  }, {
82
85
  "list-row": x((r) => [
83
86
  n(De, {
84
87
  row: r,
85
- onRowClick: (t) => e(o).promptShowTransferDetails(t.purchaseOrder, t)
88
+ onRowClick: (t) => e(o).promptShowTransferDetails(
89
+ t.purchaseOrder,
90
+ t
91
+ )
86
92
  }, {
87
93
  default: x((t) => {
88
- var k, S, C, i, T, A, z, V, u, L, M, p, $, m, E, F, Y, q, N, d, j, H, K, U, f, G;
94
+ var k, S, C, i, T, A, z, V, u, L, M, p, $, m, E, F, Y, q, N, d, j, H, J, U, f, G;
89
95
  return [
90
96
  s("div", Re, [
91
97
  s("div", we, [
@@ -109,7 +115,7 @@ const Re = { class: "flex flex-col py-8" }, we = { class: "fm-typo-en-body-md-40
109
115
  ])) : ue("", !0),
110
116
  s("div", Ce, [
111
117
  n(e(v), {
112
- render: (U = (K = (H = t.purchaseOrder_status) == null ? void 0 : H.column) == null ? void 0 : K.columnDef) == null ? void 0 : U.cell,
118
+ render: (U = (J = (H = t.purchaseOrder_status) == null ? void 0 : H.column) == null ? void 0 : J.columnDef) == null ? void 0 : U.cell,
113
119
  props: (G = (f = t.purchaseOrder_status) == null ? void 0 : f.getContext) == null ? void 0 : G.call(f)
114
120
  }, null, 8, ["render", "props"])
115
121
  ])
@@ -122,7 +128,7 @@ const Re = { class: "flex flex-col py-8" }, we = { class: "fm-typo-en-body-md-40
122
128
  _: 1
123
129
  }, 8, ["style", "column-defs", "row-data", "search-value", "loading", "page-size"])
124
130
  ], 2),
125
- (y(), J(pe, { to: "body" }, [
131
+ (y(), K(pe, { to: "body" }, [
126
132
  n(ye, me({
127
133
  scope: e(O).APPROVAL
128
134
  }, e(o).transferDetailsProps.value, {
@@ -1,6 +1,6 @@
1
1
  import { defineComponent as C, ref as o, onMounted as M, onUnmounted as F, watch as x, resolveComponent as l, openBlock as i, createElementBlock as c, createBlock as I, withCtx as R, createVNode as a, createCommentVNode as z, createElementVNode as P } from "vue";
2
- import { _ as V } from "./InventoryBindingForm.vue_vue_type_script_setup_true_lang-DBAwheaI.js";
3
- import { a as L, aR as S } from "./app-DZ9U0oko.js";
2
+ import { _ as V } from "./InventoryBindingForm.vue_vue_type_script_setup_true_lang-gQNCKIfa.js";
3
+ import { a as L, aQ as S } from "./app-qyqp2u_f.js";
4
4
  const U = {
5
5
  key: 0,
6
6
  class: "flex justify-end gap-8 items-center"
@@ -1,5 +1,5 @@
1
1
  import { defineComponent as S, computed as r, ref as l, onMounted as U, onUnmounted as V, resolveComponent as E, openBlock as p, createElementBlock as f, createVNode as u, createElementVNode as k } from "vue";
2
- import { a as M, aR as x, H as z } from "./app-DZ9U0oko.js";
2
+ import { a as M, aQ as x, H as z } from "./app-qyqp2u_f.js";
3
3
  const F = {
4
4
  key: 0,
5
5
  class: "flex flex-col gap-16"
@@ -71,10 +71,10 @@ const F = {
71
71
  }
72
72
  ), o.sendMessage("props:binding-items");
73
73
  }
74
- function R() {
74
+ function P() {
75
75
  o.sendMessage("@close");
76
76
  }
77
- function P() {
77
+ function R() {
78
78
  o.sendMessage("@submit:items", i.value);
79
79
  }
80
80
  const y = l();
@@ -106,11 +106,11 @@ const F = {
106
106
  u(n, {
107
107
  variant: "tertiary",
108
108
  label: "Close",
109
- onClick: R
109
+ onClick: P
110
110
  }),
111
111
  u(n, {
112
112
  label: "Submit",
113
- onClick: P
113
+ onClick: R
114
114
  })
115
115
  ])
116
116
  ]))
@@ -1,8 +1,8 @@
1
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, aR as F } from "./app-DZ9U0oko.js";
2
+ import { F as v, a as E, aQ as F } from "./app-qyqp2u_f.js";
3
3
  import { components as L } from "@feedmepos/ui-library";
4
4
  import "@feedmepos/mf-common";
5
- const R = /* @__PURE__ */ _({
5
+ const P = /* @__PURE__ */ _({
6
6
  __name: "binding-ui",
7
7
  props: {
8
8
  items: { default: () => [] },
@@ -87,7 +87,7 @@ const R = /* @__PURE__ */ _({
87
87
  }, null, 8, ["row-data"]);
88
88
  };
89
89
  }
90
- }), P = {
90
+ }), R = {
91
91
  key: 1,
92
92
  class: "p-24 flex items-center justify-center gap-16"
93
93
  }, D = /* @__PURE__ */ _({
@@ -124,10 +124,10 @@ const R = /* @__PURE__ */ _({
124
124
  ref_key: "resizeableRef",
125
125
  ref: l
126
126
  }, [
127
- u.value ? (p(), y("div", P, [
127
+ u.value ? (p(), y("div", R, [
128
128
  N(w, { size: "md" }),
129
129
  r[0] || (r[0] = x("div", null, "Loading bindings table...", -1))
130
- ])) : (p(), h(R, {
130
+ ])) : (p(), h(P, {
131
131
  key: 0,
132
132
  items: o.value,
133
133
  recipes: m.value,
@@ -1,9 +1,9 @@
1
1
  import { defineComponent as ke, ref as V, resolveComponent as P, openBlock as _, createBlock as q, withCtx as O, createElementVNode as n, createTextVNode as Ae, toDisplayString as z, unref as x, createVNode as k, h as w, reactive as Oe, computed as I, onMounted as Ye, watch as Ke, isRef as Te, createElementBlock as B, Fragment as K, createCommentVNode as X, normalizeClass as ue, renderList as fe, normalizeStyle as Re, Teleport as Ge, mergeProps as We } from "vue";
2
- import { W as qe, u as we, aj as G, l as Ze, J as Ce, i as $, t as Je, K as pe, p as Qe, q as Xe, r as et, ak as Pe, al as Ie, a6 as Me, am as Ue, an as oe, ac as tt, ai as ee, T as Ee, D as Be, h as xe, f as at, e as nt, a as ot, y as st, _ as rt, z as lt, B as ct, E as he } from "./app-DZ9U0oko.js";
2
+ import { W as qe, u as we, aj as G, l as Ze, J as Ce, i as $, t as Je, K as pe, p as Qe, q as Xe, r as et, ak as Pe, al as Ie, a6 as Me, am as Ue, an as oe, ac as tt, ai as ee, T as Ee, D as Be, h as xe, f as at, e as nt, a as ot, y as st, _ as rt, z as lt, B as ct, E as he } from "./app-qyqp2u_f.js";
3
3
  import { useCoreStore as it, useI18n as He } from "@feedmepos/mf-common";
4
4
  import { useSnackbar as je, useDialog as ut, useProxiedModel as dt, components as ie, useBreakpoints as mt } from "@feedmepos/ui-library";
5
5
  import { defineStore as ze, storeToRefs as ft } from "pinia";
6
- import { u as Le } from "./stock-B8OABZwR.js";
6
+ import { u as Le } from "./stock-Cd6rXnhv.js";
7
7
  import { E as pt } from "./empty-placeholder-wf6-BWE8.js";
8
8
  const Se = qe((o, p) => {
9
9
  function e() {
@@ -650,57 +650,6 @@ const wt = ze(
650
650
  header: () => "Base unit",
651
651
  accessorKey: "baseUnit"
652
652
  },
653
- {
654
- id: "physicalBalances",
655
- header: () => "Amounts",
656
- enableSorting: !1,
657
- cell(r) {
658
- const c = r.row.original, l = (S, E) => w(
659
- ie.FmTooltip,
660
- { zIndex: 50 },
661
- {
662
- default() {
663
- return w(
664
- "div",
665
- {
666
- class: "fm-typo-en-body-md-400 py-4 px-8 border-1 border-fm-color-typo-secondary fm-corner-radius-md line-clamp-1"
667
- },
668
- [
669
- w("span", { class: "text-fm-color-typo-primary" }, `${S} `),
670
- w(
671
- "span",
672
- {
673
- class: "text-fm-color-typo-secondary",
674
- style: { maxWidth: "80px" }
675
- },
676
- E
677
- )
678
- ]
679
- );
680
- },
681
- content() {
682
- return `${S} ${E}`;
683
- }
684
- }
685
- );
686
- let i = Array.from({ length: a }).map((S, E) => {
687
- if (!c[`measurementAmount${E}`])
688
- return null;
689
- const F = c[`measurementAmount${E}`], le = c[`measurementAbbrev${E}`];
690
- return l(F, le);
691
- }).filter((S) => S);
692
- return (c.baseUnitAmount || !i.length) && (i = [l(c.baseUnitAmount, c.baseUnit), ...i]), w(
693
- "div",
694
- {
695
- class: "flex gap-8 flex-nowrap",
696
- style: {
697
- minWidth: `${120 * i.length}px`
698
- }
699
- },
700
- i
701
- );
702
- }
703
- },
704
653
  {
705
654
  id: "physicalBalance",
706
655
  accessorKey: "physicalBalance",
@@ -766,6 +715,57 @@ const wt = ze(
766
715
  meta: {
767
716
  textAlign: "right"
768
717
  }
718
+ },
719
+ {
720
+ id: "physicalBalances",
721
+ header: () => "Amounts",
722
+ enableSorting: !1,
723
+ cell(r) {
724
+ const c = r.row.original, l = (S, E) => w(
725
+ ie.FmTooltip,
726
+ { zIndex: 50 },
727
+ {
728
+ default() {
729
+ return w(
730
+ "div",
731
+ {
732
+ class: "fm-typo-en-body-md-400 py-4 px-8 border-1 border-fm-color-typo-secondary fm-corner-radius-md line-clamp-1"
733
+ },
734
+ [
735
+ w("span", { class: "text-fm-color-typo-primary" }, `${S} `),
736
+ w(
737
+ "span",
738
+ {
739
+ class: "text-fm-color-typo-secondary",
740
+ style: { maxWidth: "80px" }
741
+ },
742
+ E
743
+ )
744
+ ]
745
+ );
746
+ },
747
+ content() {
748
+ return `${S} ${E}`;
749
+ }
750
+ }
751
+ );
752
+ let i = Array.from({ length: a }).map((S, E) => {
753
+ if (!c[`measurementAmount${E}`])
754
+ return null;
755
+ const F = c[`measurementAmount${E}`], le = c[`measurementAbbrev${E}`];
756
+ return l(F, le);
757
+ }).filter((S) => S);
758
+ return (c.baseUnitAmount || !i.length) && (i = [l(c.baseUnitAmount, c.baseUnit), ...i]), w(
759
+ "div",
760
+ {
761
+ class: "flex gap-8 flex-nowrap",
762
+ style: {
763
+ minWidth: `${120 * i.length}px`
764
+ }
765
+ },
766
+ i
767
+ );
768
+ }
769
769
  }
770
770
  ];
771
771
  }), ye = I(() => ae.value.map((a) => a.size ?? 0).reduce((a, t) => a + t)), re = V(""), de = I(() => f.value.map((a) => {
@@ -1,9 +1,9 @@
1
1
  import { ref as R, h as A, defineComponent as W, resolveComponent as E, openBlock as w, createElementBlock as I, createElementVNode as b, normalizeClass as q, createTextVNode as Fe, toDisplayString as C, unref as i, createCommentVNode as Q, createVNode as T, withCtx as P, Fragment as j, renderList as X, computed as U, watch as Re, createSlots as ie, createBlock as N, isRef as Pe, normalizeStyle as Ye, Teleport as Ge, normalizeProps as Ke, guardReactiveProps as We, mergeProps as Je } from "vue";
2
- import { W as qe, u as ue, ac as Qe, D as Se, h as O, f as Xe, e as Ae, ad as ce, q as Ze, ae as Ee, r as Ue, a as de, b as et, s as tt, v as Ve, w as nt, x as ot, d as K, E as J, G as st, af as lt, l as at, ag as rt, B as Ne, A as it, ah as ct, ai as re, y as mt, _ as ut, z as dt } from "./app-DZ9U0oko.js";
2
+ import { W as qe, u as ue, ac as Qe, D as Se, h as O, f as Xe, e as Ae, ad as ce, q as Ze, ae as Ee, r as Ue, a as de, b as et, s as tt, v as Ve, w as nt, x as ot, d as K, E as J, G as st, af as lt, l as at, ag as rt, B as Ne, A as it, ah as ct, ai as re, y as mt, _ as ut, z as dt } from "./app-qyqp2u_f.js";
3
3
  import { useCoreStore as pe, useI18n as Y } from "@feedmepos/mf-common";
4
4
  import { useDialogChild as pt, useSnackbar as se, useDialog as Be, FmButtonVariant as De, components as G, useProxiedModel as ft, useBreakpoints as gt } from "@feedmepos/ui-library";
5
5
  import { defineStore as Le, storeToRefs as ze } from "pinia";
6
- import { u as vt } from "./use-ingredient-select-dialog-P6o_ZU_Z.js";
6
+ import { u as vt } from "./use-ingredient-select-dialog-C8sylcwR.js";
7
7
  const le = qe((l, o) => {
8
8
  function n() {
9
9
  var t;
@@ -0,0 +1,215 @@
1
+ import { aG as E, i as k, t as B, as as w, u as H, ax as z, aH as D, aI as V } from "./app-qyqp2u_f.js";
2
+ import { u as x } from "./supplier-b6qWYeQu.js";
3
+ import { P as F } from "./format-unit-display-T-fT7FAg.js";
4
+ import { computed as d, defineComponent as j, mergeModels as q, useModel as W, ref as $, resolveComponent as g, openBlock as L, createElementBlock as N, normalizeStyle as J, createElementVNode as A, createVNode as K, withCtx as Q, createBlock as M, createCommentVNode as I, Fragment as X, renderList as Y, unref as R } from "vue";
5
+ function C(e) {
6
+ return E.parse(e);
7
+ }
8
+ function S(e) {
9
+ return {
10
+ _id: e.doc._id,
11
+ internal: e.type,
12
+ contactName: e.doc.profile.name,
13
+ name: e.doc.profile.name ?? "",
14
+ email: e.doc.profile.email,
15
+ phoneNumber: e.doc.profile.phoneNo,
16
+ registrationNumber: e.doc.profile.regNo,
17
+ address: e.doc.profile.address ?? {
18
+ line1: "",
19
+ state: "",
20
+ city: "",
21
+ postcode: "",
22
+ country: ""
23
+ }
24
+ };
25
+ }
26
+ function Z(e, l, a) {
27
+ var n;
28
+ if (!!l.measurement === !!a && ((n = l.measurement) == null ? void 0 : n.id) === a)
29
+ return l;
30
+ if (!a)
31
+ return {
32
+ costPerUnit: l.costPerUnit
33
+ };
34
+ const s = e.measurements.find((c) => c.id === a);
35
+ return s ? {
36
+ costPerUnit: l.costPerUnit,
37
+ measurement: s
38
+ } : {
39
+ costPerUnit: l.costPerUnit
40
+ };
41
+ }
42
+ function se(e, l, a, r) {
43
+ var _, P, T;
44
+ if (r != null && r.manualTotalCost)
45
+ return r == null ? void 0 : r.manualTotalCost;
46
+ const u = (T = (P = (_ = r == null ? void 0 : r.supplier) == null ? void 0 : _.supplyItems) == null ? void 0 : P.find(
47
+ (o) => o.skuId === e._id
48
+ )) == null ? void 0 : T.defaultCost, s = e.defaultCost ? Z(e.unit, e.defaultCost, e.trackingMeasurement) : void 0, n = u ?? s, c = n == null ? void 0 : n.costPerUnit, h = c ? n != null && n.measurement ? +k(c) / +k(n == null ? void 0 : n.measurement.conversion) : +k(c) : void 0, v = h ? a ? h * +k(a.conversion) : h : void 0, y = v ? +k(l) * v : void 0;
49
+ return y ? {
50
+ ...B(y ?? 0, 2),
51
+ currency: w()
52
+ } : {
53
+ amount: 0,
54
+ precision: 0,
55
+ currency: w()
56
+ };
57
+ }
58
+ function ae(e, l, a = !1, r = !1) {
59
+ const u = x(), s = H(), n = d(() => e().isReturnPo ?? !1);
60
+ s.watchLocation(async () => {
61
+ var b;
62
+ if (n.value) return;
63
+ await u.readSuppliers();
64
+ const o = e();
65
+ if ((b = o.supplier) != null && b._id) return;
66
+ const t = r ? u.suppliers[0] : u.businessSuppliers[0], i = (a ? s.locations.filter((m) => m.doc._id !== s.currentLocation.doc._id) : s.locations)[0];
67
+ l({
68
+ ...o,
69
+ supplier: t ? C(t) : i ? S(i) : o.supplier
70
+ });
71
+ });
72
+ const c = d(() => {
73
+ var o, t;
74
+ return n.value ? F.TRANSFER : typeof ((t = (o = e()) == null ? void 0 : o.supplier) == null ? void 0 : t.internal) == "string" ? F.TRANSFER : F.PURCHASE;
75
+ }), h = d({
76
+ get() {
77
+ var o, t;
78
+ return (t = (o = e()) == null ? void 0 : o.supplier) == null ? void 0 : t._id;
79
+ },
80
+ set(o) {
81
+ const t = e() ?? {};
82
+ if (c.value === F.PURCHASE) {
83
+ const U = (r ? u.suppliers : u.businessSuppliers).find((O) => O._id === o);
84
+ l({
85
+ ...t,
86
+ supplier: U ? C(U) : t.supplier
87
+ });
88
+ return;
89
+ }
90
+ const b = (a ? s.locations.filter((m) => m.doc._id !== s.currentLocation.doc._id) : s.locations).find((m) => m.doc._id === o);
91
+ l({
92
+ ...t,
93
+ supplier: b ? S(b) : t.supplier
94
+ });
95
+ }
96
+ }), v = d(() => u.locationSuppliers.map(C)), y = d(() => u.businessSuppliers.map(C)), p = d(() => {
97
+ if (n.value) return [];
98
+ const o = [...v.value], t = [...y.value];
99
+ return r ? [...t, ...o] : t;
100
+ }), _ = d(() => {
101
+ var f;
102
+ if (n.value) return [S(s.currentLocation)];
103
+ const o = ((f = s._currentLocation) == null ? void 0 : f.type) === z.enum.warehouse;
104
+ return (a ? s.locations.filter((i) => i.doc._id !== s.currentLocation.doc._id) : s.locations).filter((i) => o || i.acceptRequest).map(S);
105
+ }), P = d(() => {
106
+ if (c.value === F.PURCHASE) {
107
+ const t = v.value.map((i) => ({
108
+ label: i.name,
109
+ value: i._id
110
+ })), f = y.value.map((i) => ({
111
+ label: i.name,
112
+ sublabel: "Business supplier",
113
+ value: i._id
114
+ }));
115
+ return r ? [...t, ...f] : f;
116
+ }
117
+ return _.value.map((t) => ({
118
+ label: t.name,
119
+ sublabel: t.internal ? `${t.internal}` : void 0,
120
+ value: t._id
121
+ }));
122
+ }), T = d(() => {
123
+ var i, b;
124
+ if (n.value)
125
+ return S(s.currentLocation);
126
+ const o = (b = (i = e()) == null ? void 0 : i.supplier) == null ? void 0 : b._id;
127
+ if (c.value === F.PURCHASE) {
128
+ const m = u.suppliers.find((U) => U._id === o);
129
+ return m ? C(m) : null;
130
+ }
131
+ const f = s.locations.find((m) => m.doc._id);
132
+ return f ? S(f) : null;
133
+ });
134
+ return {
135
+ transferLocationModel: h,
136
+ transferLocationOptions: P,
137
+ locationOptionsTypePurchase: p,
138
+ locationOptionsTypePurchaseLocationLevel: v,
139
+ locationOptionsTypeTransfer: _,
140
+ selectedLocation: T
141
+ };
142
+ }
143
+ const G = { class: "overflow-y-auto h-full pb-8" }, re = /* @__PURE__ */ j({
144
+ __name: "FmFilterableMenuOptions",
145
+ props: /* @__PURE__ */ q({
146
+ modelValue: {},
147
+ maxHeight: {},
148
+ width: {},
149
+ handleItemChange: { type: Function },
150
+ items: {},
151
+ options: {}
152
+ }, {
153
+ search: {},
154
+ searchModifiers: {}
155
+ }),
156
+ emits: ["update:search"],
157
+ setup(e) {
158
+ const l = e, a = W(e, "search"), r = d(
159
+ () => new D(l.items, ["label", "sublabel"], l.options)
160
+ ), u = d(() => r.value.search(a.value)), s = $();
161
+ return console.log({ stickyRef: s }), (n, c) => {
162
+ const h = g("FmButton"), v = g("FmTextField"), y = g("FmMenuItem");
163
+ return L(), N("div", {
164
+ class: "relative",
165
+ style: J({ width: n.width })
166
+ }, [
167
+ A("div", {
168
+ class: "sticky top-0 bg-white mb-8",
169
+ ref_key: "stickyRef",
170
+ ref: s
171
+ }, [
172
+ K(v, {
173
+ modelValue: a.value,
174
+ "onUpdate:modelValue": c[1] || (c[1] = (p) => a.value = p),
175
+ placeholder: "Filter options"
176
+ }, {
177
+ append: Q(() => [
178
+ a.value ? (L(), M(h, {
179
+ key: 0,
180
+ variant: "tertiary",
181
+ "prepend-icon": "close",
182
+ onClick: c[0] || (c[0] = (p) => a.value = "")
183
+ })) : I("", !0)
184
+ ]),
185
+ _: 1
186
+ }, 8, ["modelValue"])
187
+ ], 512),
188
+ A("div", G, [
189
+ (L(!0), N(X, null, Y(u.value, (p, _) => (L(), M(y, {
190
+ key: _,
191
+ label: p.label,
192
+ sublabel: p.sublabel,
193
+ "model-value": R(V)(n.modelValue, p.value),
194
+ onClick: () => n.handleItemChange(R(V)(n.modelValue, p.value), p),
195
+ onVnodeMounted: (P) => {
196
+ var T, o;
197
+ return R(V)(n.modelValue, p.value) && ((T = P.el) == null || T.scrollIntoView({ behavior: "instant", block: "end" }), (o = P.el) == null || o.scrollIntoView({ behavior: "smooth", block: "center" })), void 0;
198
+ }
199
+ }, null, 8, ["label", "sublabel", "model-value", "onClick", "onVnodeMounted"]))), 128)),
200
+ u.value.length ? I("", !0) : (L(), M(y, {
201
+ key: 0,
202
+ disabled: "",
203
+ label: "No options available"
204
+ }))
205
+ ])
206
+ ], 4);
207
+ };
208
+ }
209
+ });
210
+ export {
211
+ re as _,
212
+ se as c,
213
+ S as l,
214
+ ae as u
215
+ };
@@ -1,5 +1,5 @@
1
1
  import { defineComponent as oe, mergeModels as j, useModel as se, computed as v, ref as P, watch as z, inject as ie, resolveComponent as b, openBlock as f, createElementBlock as y, createElementVNode as u, createVNode as M, withCtx as g, renderSlot as T, normalizeClass as V, toDisplayString as F, withDirectives as le, vModelText as ae, createCommentVNode as q, createTextVNode as ue, createBlock as W, Fragment as re, renderList as me } from "vue";
2
- import { Z as I, I as k, O as L, K as ce, i as h, aF as de, t as pe, J as fe, al as ve, aD as be, aC as ye } from "./app-DZ9U0oko.js";
2
+ import { Z as I, I as k, O as L, K as ce, i as h, aF as de, t as pe, J as fe, al as ve, aD as be, aC as ye } from "./app-qyqp2u_f.js";
3
3
  import "@feedmepos/ui-library";
4
4
  function E() {
5
5
  return {
@@ -1,5 +1,5 @@
1
1
  import { defineComponent as p, openBlock as s, createElementBlock as n, createElementVNode as r, toDisplayString as o, unref as l, Fragment as d, renderList as x } from "vue";
2
- import { i as a, J as y } from "./app-DZ9U0oko.js";
2
+ import { i as a, J as y } from "./app-qyqp2u_f.js";
3
3
  import { useI18n as _ } from "@feedmepos/mf-common";
4
4
  const v = { class: "flex flex-col" }, g = { class: "flex flex-row fm-typo-en-body-md-600 bg-fm-color-neutral-gray-100 text-fm-color-typo-secondary h-48 items-center" }, h = { class: "flex-1 py-8 px-16" }, b = {
5
5
  class: "flex-0 py-8 px-16",
@@ -1,5 +1,5 @@
1
1
  import { ref as C, computed as F, defineComponent as Y, resolveComponent as S, openBlock as M, createBlock as O, withCtx as R, createElementVNode as x, createVNode as g, unref as l, createElementBlock as ee, toDisplayString as j, createTextVNode as te, watch as ue, isRef as ce, normalizeClass as de, normalizeStyle as me, createSlots as pe, Teleport as fe, normalizeProps as ve, guardReactiveProps as ge } from "vue";
2
- import { a as J, d as h, e as B, f as ye, D as oe, h as Q, G as be, l as _e, A as xe, H as ne, o as se, u as ke, y as he, _ as we, z as Se, B as Ie, E as ae } from "./app-DZ9U0oko.js";
2
+ import { a as J, d as h, e as B, f as ye, D as oe, h as Q, G as be, l as _e, A as xe, H as ne, o as se, u as ke, y as he, _ as we, z as Se, B as Ie, E as ae } from "./app-qyqp2u_f.js";
3
3
  import { useDialog as le, useSnackbar as Z, useProxiedModel as Fe, useBreakpoints as Ce } from "@feedmepos/ui-library";
4
4
  import { useI18n as W } from "@feedmepos/mf-common";
5
5
  import { defineStore as ie, storeToRefs as re } from "pinia";
@@ -1,13 +1,13 @@
1
1
  import { ref as j, defineComponent as oe, computed as S, resolveComponent as C, openBlock as f, createBlock as B, withCtx as V, createVNode as p, unref as m, createElementBlock as A, Fragment as Q, createElementVNode as u, createCommentVNode as Y, renderSlot as ce, createTextVNode as Ie, toDisplayString as D, normalizeClass as X, onMounted as ot, watch as Oe, renderList as de, isRef as De, createSlots as qe, normalizeStyle as lt, Teleport as Pe, normalizeProps as at, guardReactiveProps as rt } from "vue";
2
- import { a as le, d as K, e as Ge, S as st, f as it, D as Be, h as fe, A as ge, b as Me, i as We, j as be, t as Ke, k as pe, l as xe, U as dt, m as ut, M as mt, n as Ne, C as ke, o as Le, p as Ze, q as ct, r as Je, s as pt, v as vt, I as ft, w as yt, x as gt, u as bt, y as ht, _ as _t, z as xt, B as kt, E as ze } from "./app-DZ9U0oko.js";
2
+ import { a as le, d as K, e as Ge, S as st, f as it, D as Be, h as fe, A as ge, b as Me, i as We, j as be, t as Ke, k as pe, l as xe, U as dt, m as ut, M as mt, n as Ne, C as ke, o as Le, p as Ze, q as ct, r as Je, s as pt, v as vt, I as ft, w as yt, x as gt, u as bt, y as ht, _ as _t, z as xt, B as kt, E as ze } from "./app-qyqp2u_f.js";
3
3
  import { useDialog as Qe, useSnackbar as he, useProxiedModel as He, useDialogChild as Vt, useBreakpoints as St } from "@feedmepos/ui-library";
4
4
  import { i as Ct, _ as wt } from "./is-linked-ingredient-error-fJ2TJb3z.js";
5
5
  import { useI18n as ae, useCoreStore as ve } from "@feedmepos/mf-common";
6
6
  import { defineStore as Ft, storeToRefs as It } from "pinia";
7
7
  import { g as Mt, _ as Ve, S as Se } from "./StockForecast.vue_vue_type_style_index_0_lang-KLXSWvo5.js";
8
- import { _ as $t } from "./InventoryBindingForm.vue_vue_type_script_setup_true_lang-DBAwheaI.js";
9
- import { _ as Ce } from "./IngredientBindedItem.vue_vue_type_script_setup_true_lang-sVM6cQes.js";
10
- import { u as Xe } from "./feature-CwrW1toS.js";
8
+ import { _ as $t } from "./InventoryBindingForm.vue_vue_type_script_setup_true_lang-gQNCKIfa.js";
9
+ import { _ as Ce } from "./IngredientBindedItem.vue_vue_type_script_setup_true_lang-WTlNX0f8.js";
10
+ import { u as Xe } from "./feature-C6Z6N_iv.js";
11
11
  import { _ as we } from "./PreviewBadge.vue_vue_type_script_setup_true_lang-CRZiQHjx.js";
12
12
  import { _ as Et } from "./FmCustomAttribute.vue_vue_type_script_setup_true_lang-D-IWRjRD.js";
13
13
  import "./array-hChJVZLE.js";
@@ -1,6 +1,6 @@
1
1
  import { ref as Q, computed as H, defineComponent as Z, mergeModels as ve, useModel as pe, onMounted as Ie, resolveComponent as O, openBlock as k, createElementBlock as z, createElementVNode as f, toDisplayString as L, unref as b, createVNode as V, createBlock as K, withCtx as J, Fragment as G, renderList as U, normalizeClass as q, normalizeStyle as ye, createSlots as be, createCommentVNode as F, withModifiers as Ee, reactive as te, watch as ne, isRef as ie, Teleport as oe } from "vue";
2
2
  import { E as he } from "./empty-placeholder-wf6-BWE8.js";
3
- import { u as _, aP as se, b as re, aQ as Be, aJ as Ce, e as T, _ as Se, z as ke } from "./app-DZ9U0oko.js";
3
+ import { u as _, aO as se, b as re, aP as Be, aI as Ce, e as T, _ as Se, z as ke } from "./app-qyqp2u_f.js";
4
4
  import { useSnackbar as le, useDialogChild as xe, useDialog as ae, useProxiedModel as ue, useBreakpoints as $ } from "@feedmepos/ui-library";
5
5
  import { useI18n as Y, useCoreStore as we } from "@feedmepos/mf-common";
6
6
  function Me() {
@@ -1,4 +1,4 @@
1
- import { _ as f } from "./InventoryBindingForm.vue_vue_type_script_setup_true_lang-DBAwheaI.js";
1
+ import { _ as f } from "./InventoryBindingForm.vue_vue_type_script_setup_true_lang-gQNCKIfa.js";
2
2
  export {
3
3
  f as default
4
4
  };
@@ -1,7 +1,7 @@
1
1
  import { defineComponent as J, computed as _, reactive as Q, resolveComponent as x, openBlock as m, createElementBlock as y, createVNode as c, createElementVNode as n, toDisplayString as v, unref as l, createBlock as V, createCommentVNode as g, Fragment as R, renderList as S, withCtx as T, nextTick as X } from "vue";
2
- import { a as Z, aS as ee, aT as ne, i as B, aU as oe, L as N, K as te, F as ie } from "./app-DZ9U0oko.js";
3
- import { u as le } from "./use-inventory-binding-dialog-8a_D3hzG.js";
4
- import { _ as re, c as se, d as de } from "./FmUnitInput.vue_vue_type_script_setup_true_lang-Bycca0S5.js";
2
+ import { a as Z, aR as ee, aS as ne, i as B, aT as oe, L as N, K as te, F as ie } from "./app-qyqp2u_f.js";
3
+ import { u as le } from "./use-inventory-binding-dialog-D7wI4_lU.js";
4
+ import { _ as re, c as se, d as de } from "./FmUnitInput.vue_vue_type_script_setup_true_lang-D21lpws0.js";
5
5
  import { useI18n as ae } from "@feedmepos/mf-common";
6
6
  const ue = { class: "flex flex-col gap-24" }, me = { class: "flex flex-col gap-16" }, ce = { class: "flex items-center" }, pe = { class: "flex-1 fm-typo-en-title-sm-600" }, fe = { class: "flex flex-col" }, ye = { class: "flex py-8 px-12 border-b border-fm-color-neutral-gray-200 bg-fm-color-neutral-gray-100 h-[44px] items-center" }, ve = { class: "fm-typo-en-body-md-600 text-fm-color-typo-secondary" }, _e = {
7
7
  class: "flex items-center w-full border-b border-fm-color-neutral-gray-100",
@@ -1,7 +1,7 @@
1
1
  import { defineComponent as s, resolveComponent as c, openBlock as m, createBlock as d, h as g } from "vue";
2
2
  import { useI18n as p } from "@feedmepos/mf-common";
3
3
  import { components as u } from "@feedmepos/ui-library";
4
- import { F as r } from "./app-DZ9U0oko.js";
4
+ import { F as r } from "./app-qyqp2u_f.js";
5
5
  const B = /* @__PURE__ */ s({
6
6
  __name: "InventoryBindingSummary",
7
7
  props: {
@@ -1,5 +1,5 @@
1
1
  import { defineComponent as y, computed as V, ref as w, watch as h, resolveComponent as u, openBlock as F, createBlock as A, withCtx as s, createVNode as g, createElementVNode as k, normalizeClass as K } from "vue";
2
- import { K as d } from "./app-DZ9U0oko.js";
2
+ import { K as d } from "./app-qyqp2u_f.js";
3
3
  const _ = ["value", "disabled"], D = /* @__PURE__ */ y({
4
4
  __name: "NumberPrecisionInput",
5
5
  props: {
@@ -1,4 +1,4 @@
1
- import { aA as d, aB as f, W as _, u as h } from "./app-DZ9U0oko.js";
1
+ import { aA as d, aB as f, W as _, u as h } from "./app-qyqp2u_f.js";
2
2
  import { useCoreStore as F } from "@feedmepos/mf-common";
3
3
  import { ref as y, defineComponent as v, resolveComponent as p, openBlock as k, createElementBlock as g, renderSlot as S, createVNode as l, withCtx as x } from "vue";
4
4
  function I(e, t) {