@feedmepos/mf-inventory-portal 0.0.25-dev.18 → 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-Bt4a-mva.js → App-Hgn8IBaK.js} +2 -2
  2. package/dist/{ApprovalView-B92jKfUe.js → ApprovalView-BSk9kEGm.js} +15 -9
  3. package/dist/{BindingsDialog-BROfongo.js → BindingsDialog-SxUwbW5x.js} +2 -2
  4. package/dist/{BindingsPicker-DkbAky8B.js → BindingsPicker-_zOGJ17i.js} +5 -5
  5. package/dist/{BindingsTable-JtlhgbpE.js → BindingsTable-I8MLwuIR.js} +5 -5
  6. package/dist/{ClosingDraftView-CBhkErO4.js → ClosingDraftView-D80vDRO7.js} +2 -2
  7. package/dist/{ClosingTemplateView-BG06FAc2.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-DDSGEX3H.js → FmUnitInput.vue_vue_type_script_setup_true_lang-D21lpws0.js} +1 -1
  10. package/dist/{IngredientBindedItem.vue_vue_type_script_setup_true_lang-UFpoor3r.js → IngredientBindedItem.vue_vue_type_script_setup_true_lang-WTlNX0f8.js} +1 -1
  11. package/dist/{IngredientGroupView-B8sPrwGE.js → IngredientGroupView-DDD_-og5.js} +1 -1
  12. package/dist/{IngredientsView-C_de5liQ.js → IngredientsView-CJ4F7BwZ.js} +4 -4
  13. package/dist/{IntegrationView-B20JKMAz.js → IntegrationView-B0TjX4yz.js} +1 -1
  14. package/dist/{InventoryBindingForm-AelrQIZJ.js → InventoryBindingForm-DGXN2PXz.js} +1 -1
  15. package/dist/{InventoryBindingForm.vue_vue_type_script_setup_true_lang-DvOWqJi9.js → InventoryBindingForm.vue_vue_type_script_setup_true_lang-gQNCKIfa.js} +3 -3
  16. package/dist/{InventoryBindingSummary-Eai9AyAo.js → InventoryBindingSummary-CDAivJA8.js} +1 -1
  17. package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-Cr20uHVb.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-CfaZ1GtI.js} +1 -1
  18. package/dist/{PremiumBadge.vue_vue_type_script_setup_true_lang-D8GQ9lbV.js → PremiumBadge.vue_vue_type_script_setup_true_lang-DmhP_O3l.js} +1 -1
  19. package/dist/{PublishView-CYsWjINX.js → PublishView-DvriUy_9.js} +13 -13
  20. package/dist/{PurchaseOrderPrintPreview-DOiuHYql.js → PurchaseOrderPrintPreview-Dr-I6VKI.js} +1 -1
  21. package/dist/ReceiveRequestView-FcC0nStC.js +2318 -0
  22. package/dist/{RecipeView-DUBuigDM.js → RecipeView-BMYzOsb2.js} +3 -3
  23. package/dist/{StockView-CvoWMjr0.js → StockView-gTmg4gih.js} +7 -7
  24. package/dist/{SupplierView-BbXF9J8I.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-QBK2pXLR.js → TransferTemplateView-DhgyCwnD.js} +7 -7
  27. package/dist/{UnitView-k6d61zdw.js → UnitView-Bll1VTnD.js} +3 -3
  28. package/dist/{WarehouseView-DyZNsx5P.js → WarehouseView-KstzwWxq.js} +1 -1
  29. package/dist/{app-upG2BtzF.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-BjTWscOj.js → decimal-BQ6Hkwom.js} +1 -1
  34. package/dist/{feature-CzM4yA1n.js → feature-C6Z6N_iv.js} +52 -63
  35. package/dist/{format-unit-display-Bj_ZIAEo.js → format-unit-display-T-fT7FAg.js} +13 -13
  36. package/dist/{index-rLpwrCyF.js → index-B6HIaHJq.js} +2 -2
  37. package/dist/{stock-QJjIlTf0.js → stock-Cd6rXnhv.js} +1 -1
  38. package/dist/stores/feature.d.ts +0 -4
  39. package/dist/{supplier-B7YGuumI.js → supplier-b6qWYeQu.js} +1 -1
  40. package/dist/tsconfig.app.tsbuildinfo +1 -1
  41. package/dist/{use-ingredient-select-dialog-C_oFS1rx.js → use-ingredient-select-dialog-C8sylcwR.js} +1 -1
  42. package/dist/{use-inventory-binding-dialog-ZDHCZp_m.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-odzbuPVZ.js → vue-i18n-BmWUvN1e.js} +261 -261
  53. package/package.json +1 -1
  54. package/dist/FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-B6Op4HEq.js +0 -211
  55. package/dist/ReceiveRequestView-CJxu7o-R.js +0 -2239
  56. package/dist/TransferDetails.vue_vue_type_script_setup_true_lang-cp-jr0I-.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-upG2BtzF.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-CzM4yA1n.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-upG2BtzF.js";
3
- import { a as ge, P as O, b as be, _ as ye } from "./TransferDetails.vue_vue_type_script_setup_true_lang-cp-jr0I-.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-DvOWqJi9.js";
3
- import { a as L, aR as S } from "./app-upG2BtzF.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-upG2BtzF.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-upG2BtzF.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-upG2BtzF.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-QJjIlTf0.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() {
@@ -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-upG2BtzF.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-C_oFS1rx.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-upG2BtzF.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-upG2BtzF.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-upG2BtzF.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-upG2BtzF.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-DvOWqJi9.js";
9
- import { _ as Ce } from "./IngredientBindedItem.vue_vue_type_script_setup_true_lang-UFpoor3r.js";
10
- import { u as Xe } from "./feature-CzM4yA1n.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-upG2BtzF.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-DvOWqJi9.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-upG2BtzF.js";
3
- import { u as le } from "./use-inventory-binding-dialog-ZDHCZp_m.js";
4
- import { _ as re, c as se, d as de } from "./FmUnitInput.vue_vue_type_script_setup_true_lang-DDSGEX3H.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-upG2BtzF.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-upG2BtzF.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-upG2BtzF.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) {
@@ -1,11 +1,11 @@
1
1
  import { defineComponent as Q, ref as z, computed as r, resolveComponent as s, openBlock as I, createBlock as R, unref as h, createSlots as X, withCtx as u, createElementVNode as v, normalizeClass as Z, createVNode as n, normalizeStyle as ee, Teleport as te, h as f } from "vue";
2
- import { u as oe, a as ne, aO as ae, y as se, _ as le, ai as B } from "./app-upG2BtzF.js";
2
+ import { u as oe, a as ne, aN as ae, y as se, _ as le, ai as B } from "./app-qyqp2u_f.js";
3
3
  import { useBreakpoints as ie, useDialog as re, useSnackbar as ue, components as H } from "@feedmepos/ui-library";
4
- import { u as ce } from "./vue-i18n-odzbuPVZ.js";
4
+ import { u as ce } from "./vue-i18n-BmWUvN1e.js";
5
5
  const me = { class: "flex flex-col py-8" }, de = { 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" }, ge = /* @__PURE__ */ Q({
6
6
  __name: "PublishView",
7
7
  setup(be) {
8
- const { t: o } = ce(), { breakpoints: x } = ie(), l = oe(), A = ne(), S = ae(), g = z(!1), c = r(() => A.state.inventory.updatedAt ? A.state.inventory.updatedAt : null), Y = se(), P = re(), N = ue(), $ = r(() => l.locations), _ = r(() => x.value.xs || x.value.sm), O = r(() => _.value ? 10 : 20), U = r(() => [
8
+ const { t: o } = ce(), { breakpoints: x } = ie(), l = oe(), A = ne(), S = ae(), g = z(!1), c = r(() => A.state.inventory.updatedAt ? A.state.inventory.updatedAt : null), N = se(), P = re(), Y = ue(), $ = r(() => l.locations), _ = r(() => x.value.xs || x.value.sm), U = r(() => _.value ? 10 : 20), q = r(() => [
9
9
  {
10
10
  label: "Refresh",
11
11
  value: "refresh",
@@ -13,7 +13,7 @@ const me = { class: "flex flex-col py-8" }, de = { class: "fm-typo-en-body-md-40
13
13
  },
14
14
  { label: o("inventory.publish.actions.publishAll"), value: "publish", isPrimary: !0 }
15
15
  ]);
16
- async function q(e) {
16
+ async function E(e) {
17
17
  switch (e) {
18
18
  case "publish":
19
19
  P.open({
@@ -30,13 +30,13 @@ const me = { class: "flex flex-col py-8" }, de = { class: "fm-typo-en-body-md-40
30
30
  break;
31
31
  }
32
32
  }
33
- const w = z(!1), E = [
33
+ const w = z(!1), K = [
34
34
  {
35
35
  value: "publish",
36
36
  label: o("inventory.publish.actions.publishAll")
37
37
  }
38
38
  ];
39
- function K(e) {
39
+ function O(e) {
40
40
  switch (w.value = !1, e) {
41
41
  case "publish":
42
42
  console.log("publish all");
@@ -105,7 +105,7 @@ const me = { class: "flex flex-col py-8" }, de = { class: "fm-typo-en-body-md-40
105
105
  primaryActions: { text: "Publish", close: !0 },
106
106
  secondaryActions: { text: "Cancel", close: !0 }
107
107
  }).onPrimary(async () => {
108
- await S.publishInventory(a.split("_")[1]), await l.readLocations(), N.open({ message: "Publish request submitted", type: "success" });
108
+ await S.publishInventory(a.split("_")[1]), await l.readLocations(), Y.open({ message: "Publish request submitted", type: "success" });
109
109
  });
110
110
  }
111
111
  }) : null
@@ -136,8 +136,8 @@ const me = { class: "flex flex-col py-8" }, de = { class: "fm-typo-en-body-md-40
136
136
  const a = s("FmChip"), m = s("FlexRender"), d = s("TableActionableRow"), j = s("FmTable"), G = s("FmCollapsibleTabs"), J = s("FmBottomSheet");
137
137
  return I(), R(le, {
138
138
  title: h(o)("inventory.publish.title"),
139
- actions: U.value,
140
- "onClick:action": q
139
+ actions: q.value,
140
+ "onClick:action": E
141
141
  }, X({
142
142
  default: u(() => [
143
143
  v("div", {
@@ -150,12 +150,12 @@ const me = { class: "flex flex-col py-8" }, de = { class: "fm-typo-en-body-md-40
150
150
  ])
151
151
  }, [
152
152
  n(j, {
153
- style: ee(h(Y).tableHeight),
153
+ style: ee(h(N).tableHeight),
154
154
  "column-defs": W,
155
155
  "row-data": $.value,
156
156
  loading: !h(l)._currentLocation || g.value,
157
157
  "loading-text": "Loading",
158
- "page-size": O.value
158
+ "page-size": U.value
159
159
  }, {
160
160
  "list-row": u((i) => [
161
161
  n(d, { row: i }, {
@@ -193,8 +193,8 @@ const me = { class: "flex flex-col py-8" }, de = { class: "fm-typo-en-body-md-40
193
193
  default: u(() => [
194
194
  n(G, {
195
195
  class: "pb-8",
196
- items: E,
197
- "onUpdate:modelValue": t[0] || (t[0] = (i) => K(i))
196
+ items: K,
197
+ "onUpdate:modelValue": t[0] || (t[0] = (i) => O(i))
198
198
  })
199
199
  ]),
200
200
  _: 1
@@ -1,6 +1,6 @@
1
1
  import { defineComponent as h, computed as x, ref as m, onMounted as f, openBlock as n, createElementBlock as u, createElementVNode as t, toDisplayString as l, normalizeStyle as g, createTextVNode as i, Fragment as d, createCommentVNode as p, renderList as v, normalizeClass as w } from "vue";
2
2
  import { useRoute as k } from "vue-router";
3
- import { av as y, ah as C } from "./app-upG2BtzF.js";
3
+ import { av as y, ah as C } from "./app-qyqp2u_f.js";
4
4
  const P = { class: "purchase-box" }, R = { valign: "bottom" }, A = { class: "text-right" }, N = { class: "header" }, E = { class: "sub-header" }, O = { class: "caption" }, S = { class: "address" }, D = { class: "text-right" }, T = { class: "sub-header" }, q = { class: "address" }, F = { class: "purchase-body" }, L = { class: "text-left" }, U = { class: "text-left" }, V = { class: "text-right" }, z = { style: { "padding-top": "30px" } }, B = { valign: "bottom" }, H = { class: "header" }, I = { class: "caption" }, M = {
5
5
  class: "text-left",
6
6
  style: { width: "20%" }