@feedmepos/mf-inventory-portal 0.0.25-dev.11 → 0.0.25-dev.13

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 (65) hide show
  1. package/dist/{App-CO-6e1yq.js → App-Dh5gRSP-.js} +2 -2
  2. package/dist/ApprovalView-D5uEtt6k.js +140 -0
  3. package/dist/{BindingsDialog-oWRH8tAd.js → BindingsDialog-CTFT3z8w.js} +2 -2
  4. package/dist/{BindingsPicker-CpM2ldne.js → BindingsPicker-2Ef8BRE7.js} +1 -1
  5. package/dist/{BindingsTable-BA3ATsO3.js → BindingsTable-CGygQ1XK.js} +1 -1
  6. package/dist/{ClosingDraftView-CS2v3zbm.js → ClosingDraftView-BJypLAmr.js} +2 -2
  7. package/dist/{ClosingTemplateView-BS8RaUgX.js → ClosingTemplateView-Q5DzidlM.js} +2 -2
  8. package/dist/{FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-7qLOtuzy.js → FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-46g6-tKZ.js} +3 -3
  9. package/dist/{FmUnitInput.vue_vue_type_script_setup_true_lang-Dn5wTNsE.js → FmUnitInput.vue_vue_type_script_setup_true_lang-6bQg2aCs.js} +1 -1
  10. package/dist/{IngredientBindedItem.vue_vue_type_script_setup_true_lang-Wv_HtVUG.js → IngredientBindedItem.vue_vue_type_script_setup_true_lang-BkV9XenY.js} +1 -1
  11. package/dist/{IngredientGroupView-DLDfRzPQ.js → IngredientGroupView-APUX5LH2.js} +1 -1
  12. package/dist/{IngredientsView-IpEhZhFt.js → IngredientsView-CMg_ceRg.js} +4 -4
  13. package/dist/{IntegrationView-D8DFRPr1.js → IntegrationView-_8RPUhEn.js} +1 -1
  14. package/dist/{InventoryBindingForm-9255LnDG.js → InventoryBindingForm-Tl-zMqto.js} +1 -1
  15. package/dist/{InventoryBindingForm.vue_vue_type_script_setup_true_lang-BqlOlgnY.js → InventoryBindingForm.vue_vue_type_script_setup_true_lang-BJRsnj9t.js} +54 -54
  16. package/dist/{InventoryBindingSummary-BPEwj0Gs.js → InventoryBindingSummary-DEWxs1BN.js} +1 -1
  17. package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-E53iSENL.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-C6JAyWVz.js} +1 -1
  18. package/dist/{PremiumBadge.vue_vue_type_script_setup_true_lang-CByTbk0u.js → PremiumBadge.vue_vue_type_script_setup_true_lang-B-cgItiN.js} +1 -1
  19. package/dist/{PublishView-SUyD0hW-.js → PublishView-BNyLfPLp.js} +2 -2
  20. package/dist/{PurchaseOrderPrintPreview-CSi_l2J8.js → PurchaseOrderPrintPreview-DU11dxSl.js} +1 -1
  21. package/dist/ReceiveRequestView-BxiADYjh.js +2239 -0
  22. package/dist/{RecipeView-DYGIII7T.js → RecipeView-D_qa4uZi.js} +3 -3
  23. package/dist/{StockView-DjQlAXbi.js → StockView-BsyPwHaJ.js} +7 -7
  24. package/dist/{SupplierView-CB8pq2dk.js → SupplierView-BudjeZWP.js} +4 -4
  25. package/dist/TransferDetails.vue_vue_type_script_setup_true_lang-D-9e8rDq.js +1494 -0
  26. package/dist/TransferTemplateView-DnuPDeZP.js +1660 -0
  27. package/dist/{UnitView-DD8sGjaR.js → UnitView-0WXciTrD.js} +3 -3
  28. package/dist/{WarehouseView-BE131osn.js → WarehouseView-BqjRTN_3.js} +1 -1
  29. package/dist/api/purchase-order.d.ts +1 -0
  30. package/dist/{app-CbAke6dP.js → app-MFSGVtiz.js} +4494 -4276
  31. package/dist/app.js +1 -1
  32. package/dist/components/FmMultiselectDialog.d.ts +23 -0
  33. package/dist/{decimal-ITAjlTW6.js → decimal-rt-lEA2N.js} +1 -1
  34. package/dist/{feature-Dq5knPmf.js → feature-DNwxU2wo.js} +7 -2
  35. package/dist/{format-unit-display-D-Ho5ga9.js → format-unit-display-B8C39Cxn.js} +2 -2
  36. package/dist/{index-DpN0zX69.js → index-DIxkPrGm.js} +2 -2
  37. package/dist/{stock-CjI4mNO9.js → stock-3RGlApSR.js} +1 -1
  38. package/dist/style.css +1 -1
  39. package/dist/{supplier-DnImzKTa.js → supplier-DDg5BqMd.js} +1 -1
  40. package/dist/tsconfig.app.tsbuildinfo +1 -1
  41. package/dist/{use-ingredient-select-dialog-AgNLUJRC.js → use-ingredient-select-dialog-D_9-XpBR.js} +1 -1
  42. package/dist/{use-inventory-binding-dialog-sJsbhbQI.js → use-inventory-binding-dialog-F-PVAZwM.js} +1 -1
  43. package/dist/views/receive-request/components/netsuite/NetSuiteProps.d.ts +2 -0
  44. package/dist/views/receive-request/components/transfer-details/TransferDetailsProps.d.ts +2 -0
  45. package/dist/views/receive-request/components/transfer-form/TransferForm.vue.d.ts +370 -0
  46. package/dist/views/receive-request/components/transfer-form/components/ForecastStock.vue.d.ts +46 -0
  47. package/dist/views/receive-request/components/transfer-form/components/TransferItemTable.vue.d.ts +490 -2
  48. package/dist/views/receive-request/components/transfer-form/components/TransferSubItemTable.vue.d.ts +72 -0
  49. package/dist/views/receive-request/components/transfer-form/composables/use-transfer-items.d.ts +24 -0
  50. package/dist/views/receive-request/components/transfer-form/helpers/calculate-sub-item-total.helper.d.ts +4 -0
  51. package/dist/views/receive-request/composables/use-receive-request-form.d.ts +630 -2
  52. package/dist/views/receive-request/composables/use-receive-request-table.d.ts +626 -2
  53. package/dist/views/transfer-template/components/transfer-template-form/components/TransferTemplateItem.vue.d.ts +270 -2
  54. package/dist/views/transfer-template/components/transfer-template-form/components/TransferTemplateItemTable.vue.d.ts +286 -0
  55. package/dist/views/transfer-template/components/transfer-template-form/components/TransferTemplateSubItem.vue.d.ts +74 -0
  56. package/dist/views/transfer-template/components/transfer-template-form/components/TransferTemplateSubItemTable.vue.d.ts +92 -0
  57. package/dist/views/transfer-template/components/transfer-template-form/composables/use-transfer-template-items.d.ts +35 -0
  58. package/dist/views/transfer-template/composables/use-transfer-template-actions.d.ts +420 -0
  59. package/dist/views/transfer-template/composables/use-transfer-template-table.d.ts +420 -0
  60. package/dist/{vue-i18n-DYyu2tND.js → vue-i18n-DEHYDDMC.js} +395 -395
  61. package/package.json +3 -3
  62. package/dist/ApprovalView-CibKgQlF.js +0 -138
  63. package/dist/ReceiveRequestView-DA7CofZ1.js +0 -1877
  64. package/dist/TransferDetails.vue_vue_type_script_setup_true_lang-IxGRO3vL.js +0 -1461
  65. package/dist/TransferTemplateView-CjVir2Ql.js +0 -1371
@@ -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-CbAke6dP.js";
2
+ import { u as k, a as D, b as H, R as e, g as s, c as W } from "./app-MFSGVtiz.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-Dq5knPmf.js";
5
+ import { u as O } from "./feature-DNwxU2wo.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";
@@ -0,0 +1,140 @@
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-MFSGVtiz.js";
3
+ import { a as ge, P as O, b as be, _ as ye } from "./TransferDetails.vue_vue_type_script_setup_true_lang-D-9e8rDq.js";
4
+ import { useBreakpoints as xe } from "@feedmepos/ui-library";
5
+ import { useI18n as Oe } from "@feedmepos/mf-common";
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 = {
7
+ key: 0,
8
+ class: "fm-typo-en-body-md-400 text-fm-color-typo-primary line-clamp-1"
9
+ }, Ce = { class: "pt-8" }, $e = /* @__PURE__ */ oe({
10
+ __name: "ApprovalView",
11
+ setup(Te) {
12
+ const o = ge(O.APPROVAL), { columnDefs: W } = be(O.APPROVAL, o), X = de();
13
+ _.object({
14
+ name: _.string().optional().nullable(),
15
+ start: _.date().optional().nullable(),
16
+ end: _.date().optional().nullable()
17
+ });
18
+ const R = g({
19
+ name: "",
20
+ ...fe()
21
+ }), a = g({
22
+ startDate: Q(R.value.start ?? /* @__PURE__ */ new Date()),
23
+ endDate: Q(R.value.end ?? /* @__PURE__ */ new Date())
24
+ });
25
+ re([() => a.value.startDate], () => {
26
+ if (!a.value.startDate)
27
+ return;
28
+ if (!a.value.endDate) {
29
+ a.value.endDate = a.value.startDate;
30
+ return;
31
+ }
32
+ const c = new Date(a.value.startDate);
33
+ if (new Date(a.value.endDate).getTime() < c.getTime()) {
34
+ a.value.endDate = a.value.startDate;
35
+ return;
36
+ }
37
+ });
38
+ const h = g(""), { breakpoints: w } = xe(), D = b(() => w.value.xs || w.value.sm), Z = b(() => D.value ? 10 : 20), B = _e(), { t: P } = Oe(), I = b(() => [
39
+ {
40
+ label: P("common.refresh"),
41
+ value: "refresh"
42
+ }
43
+ ]);
44
+ function ee(c) {
45
+ switch (c) {
46
+ case "refresh":
47
+ return o.fetchData();
48
+ }
49
+ }
50
+ return (c, l) => {
51
+ const te = ne("FmTable");
52
+ return y(), J(ve, {
53
+ title: e(P)("inventory.transfer.approval.title"),
54
+ actions: I.value,
55
+ "onClick:action": ee
56
+ }, {
57
+ default: x(() => [
58
+ s("div", {
59
+ class: se([
60
+ "flex flex-col gap-8 max-h-full",
61
+ {
62
+ "p-0": D.value,
63
+ "px-24 ": !D.value
64
+ }
65
+ ])
66
+ }, [
67
+ n(he, {
68
+ searchable: "",
69
+ "change-location": "",
70
+ search: h.value,
71
+ "onUpdate:search": l[0] || (l[0] = (r) => h.value = r)
72
+ }, null, 8, ["search"]),
73
+ n(te, {
74
+ style: le(e(B).tableHeight),
75
+ "column-defs": e(W),
76
+ "row-data": e(o).purchaseRequests.value,
77
+ "search-value": h.value,
78
+ loading: !e(X)._currentLocation || e(o).loading.value,
79
+ onRowClick: l[1] || (l[1] = (r) => e(o).promptShowTransferDetails(r.original.purchaseOrder, r.original)),
80
+ "page-size": Z.value
81
+ }, {
82
+ "list-row": x((r) => [
83
+ n(De, {
84
+ row: r,
85
+ onRowClick: (t) => e(o).promptShowTransferDetails(t.purchaseOrder, t)
86
+ }, {
87
+ 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;
89
+ return [
90
+ s("div", Re, [
91
+ s("div", we, [
92
+ n(e(v), {
93
+ render: (C = (S = (k = t.purchaseOrder__id) == null ? void 0 : k.column) == null ? void 0 : S.columnDef) == null ? void 0 : C.cell,
94
+ props: (T = (i = t.purchaseOrder__id) == null ? void 0 : i.getContext) == null ? void 0 : T.call(i)
95
+ }, null, 8, ["render", "props"])
96
+ ]),
97
+ s("div", Pe, [
98
+ n(e(v), {
99
+ render: (V = (z = (A = t.to_name) == null ? void 0 : A.column) == null ? void 0 : z.columnDef) == null ? void 0 : V.cell,
100
+ props: (L = (u = t.to_name) == null ? void 0 : u.getContext) == null ? void 0 : L.call(u)
101
+ }, null, 8, ["render", "props"])
102
+ ]),
103
+ s("div", ke, ce((E = (m = ($ = (p = (M = r.original.purchaseOrder) == null ? void 0 : M.items) == null ? void 0 : p.map) == null ? void 0 : $.call(p, (ae) => `${ae.name}`)) == null ? void 0 : m.join) == null ? void 0 : E.call(m, ", ")), 1),
104
+ (F = r.original.purchaseOrder) != null && F.ref ? (y(), ie("div", Se, [
105
+ n(e(v), {
106
+ render: (N = (q = (Y = t.purchaseOrder_ref) == null ? void 0 : Y.column) == null ? void 0 : q.columnDef) == null ? void 0 : N.cell,
107
+ props: (j = (d = t.purchaseOrder_ref) == null ? void 0 : d.getContext) == null ? void 0 : j.call(d)
108
+ }, null, 8, ["render", "props"])
109
+ ])) : ue("", !0),
110
+ s("div", Ce, [
111
+ 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,
113
+ props: (G = (f = t.purchaseOrder_status) == null ? void 0 : f.getContext) == null ? void 0 : G.call(f)
114
+ }, null, 8, ["render", "props"])
115
+ ])
116
+ ])
117
+ ];
118
+ }),
119
+ _: 2
120
+ }, 1032, ["row", "onRowClick"])
121
+ ]),
122
+ _: 1
123
+ }, 8, ["style", "column-defs", "row-data", "search-value", "loading", "page-size"])
124
+ ], 2),
125
+ (y(), J(pe, { to: "body" }, [
126
+ n(ye, me({
127
+ scope: e(O).APPROVAL
128
+ }, e(o).transferDetailsProps.value, {
129
+ onSubmitted: e(o).fetchData
130
+ }), null, 16, ["scope", "onSubmitted"])
131
+ ]))
132
+ ]),
133
+ _: 1
134
+ }, 8, ["title", "actions"]);
135
+ };
136
+ }
137
+ });
138
+ export {
139
+ $e as default
140
+ };
@@ -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-BqlOlgnY.js";
3
- import { a as L, aQ as S } from "./app-CbAke6dP.js";
2
+ import { _ as V } from "./InventoryBindingForm.vue_vue_type_script_setup_true_lang-BJRsnj9t.js";
3
+ import { a as L, aQ as S } from "./app-MFSGVtiz.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, aQ as x, H as z } from "./app-CbAke6dP.js";
2
+ import { a as M, aQ as x, H as z } from "./app-MFSGVtiz.js";
3
3
  const F = {
4
4
  key: 0,
5
5
  class: "flex flex-col gap-16"
@@ -1,5 +1,5 @@
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, aQ as F } from "./app-CbAke6dP.js";
2
+ import { F as v, a as E, aQ as F } from "./app-MFSGVtiz.js";
3
3
  import { components as L } from "@feedmepos/ui-library";
4
4
  import "@feedmepos/mf-common";
5
5
  const P = /* @__PURE__ */ _({
@@ -1,9 +1,9 @@
1
1
  import { defineComponent as ye, ref as O, resolveComponent as E, openBlock as _, createBlock as ne, withCtx as N, createElementVNode as o, createTextVNode as ge, toDisplayString as L, unref as h, createVNode as D, h as $, computed as M, onMounted as He, watch as ze, isRef as _e, createElementBlock as F, Fragment as Z, createCommentVNode as le, normalizeClass as ie, renderList as ue, normalizeStyle as we, Teleport as Ee, mergeProps as Le } from "vue";
2
- import { W as Ne, u as be, aj as q, l as Oe, J as he, i as C, t as Ve, K as ce, p as Ke, q as Ye, r as Ge, ak as ke, al as je, a6 as Ce, am as Se, an as oe, ac as qe, ai as J, T as Be, D as De, h as de, f as We, e as Ze, a as Je, y as Qe, _ as Xe, z as et, B as tt, E as me } from "./app-CbAke6dP.js";
2
+ import { W as Ne, u as be, aj as q, l as Oe, J as he, i as C, t as Ve, K as ce, p as Ke, q as Ye, r as Ge, ak as ke, al as je, a6 as Ce, am as Se, an as oe, ac as qe, ai as J, T as Be, D as De, h as de, f as We, e as Ze, a as Je, y as Qe, _ as Xe, z as et, B as tt, E as me } from "./app-MFSGVtiz.js";
3
3
  import { useCoreStore as at, useI18n as Fe } from "@feedmepos/mf-common";
4
4
  import { useSnackbar as Ae, useDialog as nt, useProxiedModel as ot, components as ae, useBreakpoints as st } from "@feedmepos/ui-library";
5
5
  import { defineStore as Re, storeToRefs as rt } from "pinia";
6
- import { u as $e } from "./stock-CjI4mNO9.js";
6
+ import { u as $e } from "./stock-3RGlApSR.js";
7
7
  import { E as lt } from "./empty-placeholder-wf6-BWE8.js";
8
8
  const Te = Ne((n, d) => {
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-CbAke6dP.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-MFSGVtiz.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-AgNLUJRC.js";
6
+ import { u as vt } from "./use-ingredient-select-dialog-D_9-XpBR.js";
7
7
  const le = qe((l, o) => {
8
8
  function n() {
9
9
  var t;
@@ -1,6 +1,6 @@
1
- import { i as T, t as R, as as w, u as B, ax as E, aH as H, aI as z, aJ as U } from "./app-CbAke6dP.js";
2
- import { u as D } from "./supplier-DnImzKTa.js";
3
- import { P as F } from "./format-unit-display-D-Ho5ga9.js";
1
+ import { i as T, t as R, as as w, u as B, ax as E, aH as H, aI as z, aJ as U } from "./app-MFSGVtiz.js";
2
+ import { u as D } from "./supplier-DDg5BqMd.js";
3
+ import { P as F } from "./format-unit-display-B8C39Cxn.js";
4
4
  import { computed as f, defineComponent as x, mergeModels as j, useModel as q, ref as W, resolveComponent as V, openBlock as S, createElementBlock as I, normalizeStyle as $, createElementVNode as N, createVNode as J, withCtx as K, createBlock as g, createCommentVNode as O, Fragment as Q, renderList as X, unref as M } from "vue";
5
5
  function Y(t, i, a) {
6
6
  var s;
@@ -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-CbAke6dP.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-MFSGVtiz.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-CbAke6dP.js";
2
+ import { i as a, J as y } from "./app-MFSGVtiz.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-CbAke6dP.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-MFSGVtiz.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-CbAke6dP.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-MFSGVtiz.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-BqlOlgnY.js";
9
- import { _ as Ce } from "./IngredientBindedItem.vue_vue_type_script_setup_true_lang-Wv_HtVUG.js";
10
- import { u as Xe } from "./feature-Dq5knPmf.js";
8
+ import { _ as $t } from "./InventoryBindingForm.vue_vue_type_script_setup_true_lang-BJRsnj9t.js";
9
+ import { _ as Ce } from "./IngredientBindedItem.vue_vue_type_script_setup_true_lang-BkV9XenY.js";
10
+ import { u as Xe } from "./feature-DNwxU2wo.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 _, aO as se, b as re, aP as Be, aJ as Ce, e as T, _ as Se, z as ke } from "./app-CbAke6dP.js";
3
+ import { u as _, aO as se, b as re, aP as Be, aJ as Ce, e as T, _ as Se, z as ke } from "./app-MFSGVtiz.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-BqlOlgnY.js";
1
+ import { _ as f } from "./InventoryBindingForm.vue_vue_type_script_setup_true_lang-BJRsnj9t.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, aR as ee, aS as ne, i as B, aT as oe, L as N, K as te, F as ie } from "./app-CbAke6dP.js";
3
- import { u as le } from "./use-inventory-binding-dialog-sJsbhbQI.js";
4
- import { _ as se, c as re, d as de } from "./FmUnitInput.vue_vue_type_script_setup_true_lang-Dn5wTNsE.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-MFSGVtiz.js";
3
+ import { u as le } from "./use-inventory-binding-dialog-F-PVAZwM.js";
4
+ import { _ as re, c as se, d as de } from "./FmUnitInput.vue_vue_type_script_setup_true_lang-6bQg2aCs.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",
@@ -31,70 +31,70 @@ const ue = { class: "flex flex-col gap-24" }, me = { class: "flex flex-col gap-1
31
31
  },
32
32
  emits: ["update:modelValue", "click:pick-inventory-bindings"],
33
33
  setup(P, { emit: M }) {
34
- const { t: p } = ae(), F = Z(), I = _(() => F.inventory.recipe ?? []), h = _(() => F.inventory.sku ?? []), s = P, f = M, w = _(() => ee({
35
- bindings: s.modelValue,
36
- recipes: I.value.map((t) => t._id === s.id ? {
37
- ...t,
38
- contains: s.modelValue
39
- } : t),
34
+ const { t: p } = ae(), F = Z(), I = _(() => F.inventory.recipe ?? []), h = _(() => F.inventory.sku ?? []), r = P, f = M, w = _(() => ee({
35
+ bindings: r.modelValue,
36
+ recipes: I.value.map((o) => o._id === r.id ? {
37
+ ...o,
38
+ contains: r.modelValue
39
+ } : o),
40
40
  skus: h.value
41
- }).inventoryBindings.filter((t) => t.error).filter((t) => t.reason === ne.enum.circularDependency)), K = _(
41
+ }).inventoryBindings.filter((o) => "error" in o && o.error).map((o) => o).filter((o) => o.reason === ne.enum.circularDependency)), K = _(
42
42
  () => new Set(w.value.map((e) => {
43
- var o;
44
- return (o = e.bindingPaths[0]) == null ? void 0 : o.id;
43
+ var t;
44
+ return (t = e.bindingPaths[0]) == null ? void 0 : t.id;
45
45
  }))
46
- ), D = _(() => s.modelValue.filter((e) => e.type === "RECIPE")), { promptIngredientsBinding: $, promptRecipesBinding: z } = le();
46
+ ), D = _(() => r.modelValue.filter((e) => e.type === "RECIPE")), { promptIngredientsBinding: $, promptRecipesBinding: z } = le();
47
47
  async function G() {
48
- if (s.iframeMode) {
48
+ if (r.iframeMode) {
49
49
  f("click:pick-inventory-bindings", "RECIPE");
50
50
  return;
51
51
  }
52
52
  z(
53
- s.modelValue,
53
+ r.modelValue,
54
54
  (e) => f("update:modelValue", e),
55
- s.id ? [s.id] : []
55
+ r.id ? [r.id] : []
56
56
  );
57
57
  }
58
- const U = _(() => s.modelValue.filter((e) => e.type === "SKU") ?? []);
58
+ const U = _(() => r.modelValue.filter((e) => e.type === "SKU") ?? []);
59
59
  async function L() {
60
- if (s.iframeMode) {
60
+ if (r.iframeMode) {
61
61
  f("click:pick-inventory-bindings", "SKU");
62
62
  return;
63
63
  }
64
64
  $(
65
- s.modelValue,
65
+ r.modelValue,
66
66
  (e) => f("update:modelValue", e),
67
- s.excludeBindingId,
68
- s.id ? [s.id] : []
67
+ r.excludeBindingId,
68
+ r.id ? [r.id] : []
69
69
  );
70
70
  }
71
- function j(e, o, t) {
72
- const r = +o;
73
- let d = t;
74
- o.length > 0 && isFinite(r) ? d = t.map((a) => (a.id !== e || (a.amount = te(r)), a)) : d = t.map((a) => (a.id !== e || (a.amount = { amount: 0, precision: 0 }), a)), f("update:modelValue", d);
71
+ function j(e, t, o) {
72
+ const s = +t;
73
+ let d = o;
74
+ t.length > 0 && isFinite(s) ? d = o.map((a) => (a.id !== e || (a.amount = te(s)), a)) : d = o.map((a) => (a.id !== e || (a.amount = { amount: 0, precision: 0 }), a)), f("update:modelValue", d);
75
75
  }
76
- function E(e, o) {
77
- const t = o.filter((r) => r.id !== e);
78
- f("update:modelValue", t);
76
+ function E(e, t) {
77
+ const o = t.filter((s) => s.id !== e);
78
+ f("update:modelValue", o);
79
79
  }
80
80
  function C(e) {
81
- var t, r;
81
+ var o, s;
82
82
  if (e.type !== ie.enum.SKU)
83
83
  throw new Error("Non-SKU binding does not have unit");
84
- if (!((t = h.value.find((d) => d._id === e.id)) == null ? void 0 : t.unit))
84
+ if (!((o = h.value.find((d) => d._id === e.id)) == null ? void 0 : o.unit))
85
85
  throw new Error(`Cannot find ingredient: ${e.id}`);
86
- return (r = h.value.find((d) => d._id === e.id)) == null ? void 0 : r.unit;
86
+ return (s = h.value.find((d) => d._id === e.id)) == null ? void 0 : s.unit;
87
87
  }
88
88
  function Y(e) {
89
89
  return { amount: e.amount, measurement: e.measurement };
90
90
  }
91
- function O(e, o, t) {
92
- const r = t.map((d) => d.id !== e ? d : {
91
+ function O(e, t, o) {
92
+ const s = o.map((d) => d.id !== e ? d : {
93
93
  ...d,
94
- amount: o.amount,
95
- measurement: o.measurement
94
+ amount: t.amount,
95
+ measurement: t.measurement
96
96
  });
97
- f("update:modelValue", r);
97
+ f("update:modelValue", s);
98
98
  }
99
99
  const A = Q({});
100
100
  function W(e) {
@@ -106,21 +106,21 @@ const ue = { class: "flex flex-col gap-24" }, me = { class: "flex flex-col gap-1
106
106
  amountAsString: B(e.amount)
107
107
  };
108
108
  }
109
- function q(e, o) {
109
+ function q(e, t) {
110
110
  X(() => {
111
111
  A[e.id] = {
112
112
  modelValue: {
113
113
  amount: e.amount,
114
114
  measurement: e.measurement
115
115
  },
116
- amountAsString: o
116
+ amountAsString: t
117
117
  };
118
118
  });
119
119
  }
120
- return (e, o) => {
121
- const t = x("FmFormGroup"), r = x("FmButton"), d = x("FmIcon"), a = x("FmTextField"), H = x("FmTooltip");
120
+ return (e, t) => {
121
+ const o = x("FmFormGroup"), s = x("FmButton"), d = x("FmIcon"), a = x("FmTextField"), H = x("FmTooltip");
122
122
  return m(), y("div", ue, [
123
- c(t, {
123
+ c(o, {
124
124
  disabled: e.disabled,
125
125
  "model-value": e.modelValue,
126
126
  rules: e.rules
@@ -128,7 +128,7 @@ const ue = { class: "flex flex-col gap-24" }, me = { class: "flex flex-col gap-1
128
128
  n("div", me, [
129
129
  n("div", ce, [
130
130
  n("div", pe, v(l(p)("inventory.inventoryBindings.recipe")), 1),
131
- e.readonly ? g("", !0) : (m(), V(r, {
131
+ e.readonly ? g("", !0) : (m(), V(s, {
132
132
  key: 0,
133
133
  variant: "secondary",
134
134
  "text-color": "primary",
@@ -141,10 +141,10 @@ const ue = { class: "flex flex-col gap-24" }, me = { class: "flex flex-col gap-1
141
141
  n("div", fe, [
142
142
  n("div", ye, [
143
143
  n("div", ve, v(l(p)("inventory.inventoryBindings.recipe")), 1),
144
- o[0] || (o[0] = n("div", { class: "w-[200px]" }, null, -1)),
145
- o[1] || (o[1] = n("div", { class: "w-[52px]" }, null, -1))
144
+ t[0] || (t[0] = n("div", { class: "w-[200px]" }, null, -1)),
145
+ t[1] || (t[1] = n("div", { class: "w-[52px]" }, null, -1))
146
146
  ]),
147
- (m(!0), y(R, null, S(D.value, (i) => (m(), V(t, {
147
+ (m(!0), y(R, null, S(D.value, (i) => (m(), V(o, {
148
148
  key: i.id,
149
149
  disabled: e.disabled,
150
150
  modelValue: +l(B)(i.amount ?? { amount: 1, precision: 0 }),
@@ -163,7 +163,7 @@ const ue = { class: "flex flex-col gap-24" }, me = { class: "flex flex-col gap-1
163
163
  color: "system-error-400",
164
164
  size: "sm"
165
165
  }),
166
- o[2] || (o[2] = n("div", null, "There is circular linking in your binding.", -1))
166
+ t[2] || (t[2] = n("div", null, "There is circular linking in your binding.", -1))
167
167
  ])) : g("", !0)
168
168
  ])
169
169
  ]),
@@ -177,7 +177,7 @@ const ue = { class: "flex flex-col gap-24" }, me = { class: "flex flex-col gap-1
177
177
  }, null, 8, ["disabled", "modelValue", "onUpdate:modelValue", "invalid"])
178
178
  ]),
179
179
  e.readonly ? g("", !0) : (m(), y("div", Ve, [
180
- c(r, {
180
+ c(s, {
181
181
  disabled: e.disabled,
182
182
  type: "button",
183
183
  variant: "plain",
@@ -196,7 +196,7 @@ const ue = { class: "flex flex-col gap-24" }, me = { class: "flex flex-col gap-1
196
196
  n("div", Be, [
197
197
  n("div", ke, [
198
198
  n("div", Fe, v(l(p)("inventory.inventoryBindings.ingredient")), 1),
199
- e.readonly ? g("", !0) : (m(), V(r, {
199
+ e.readonly ? g("", !0) : (m(), V(s, {
200
200
  key: 0,
201
201
  variant: "secondary",
202
202
  "text-color": "primary",
@@ -210,7 +210,7 @@ const ue = { class: "flex flex-col gap-24" }, me = { class: "flex flex-col gap-1
210
210
  n("div", we, [
211
211
  n("div", Ue, v(l(p)("inventory.inventoryBindings.ingredient")), 1),
212
212
  n("div", Ee, v(l(p)("inventory.inventoryBindings.amount")), 1),
213
- o[3] || (o[3] = n("div", { class: "w-[52px]" }, null, -1))
213
+ t[3] || (t[3] = n("div", { class: "w-[52px]" }, null, -1))
214
214
  ]),
215
215
  (m(!0), y(R, null, S(U.value, (i, k) => {
216
216
  var b;
@@ -240,7 +240,7 @@ const ue = { class: "flex flex-col gap-24" }, me = { class: "flex flex-col gap-1
240
240
  }, 8, ["content"])) : g("", !0)
241
241
  ]),
242
242
  n("div", Se, [
243
- c(se, {
243
+ c(re, {
244
244
  "model-value": Y(i),
245
245
  "onUpdate:modelValue": (u) => O(i.id, u, e.modelValue),
246
246
  "onUpdate:amount": (u) => q(i, u),
@@ -251,7 +251,7 @@ const ue = { class: "flex flex-col gap-24" }, me = { class: "flex flex-col gap-1
251
251
  }, null, 8, ["model-value", "onUpdate:modelValue", "onUpdate:amount", "unit", "placement", "disabled"])
252
252
  ]),
253
253
  e.readonly ? g("", !0) : (m(), y("div", Te, [
254
- c(r, {
254
+ c(s, {
255
255
  disabled: e.disabled,
256
256
  type: "button",
257
257
  variant: "tertiary",
@@ -261,14 +261,14 @@ const ue = { class: "flex flex-col gap-24" }, me = { class: "flex flex-col gap-1
261
261
  ]))
262
262
  ]),
263
263
  n("div", Ne, [
264
- c(t, {
264
+ c(o, {
265
265
  modelValue: +l(B)(i.amount ?? { amount: 1, precision: 0 }),
266
266
  rules: [l(N)(0)]
267
267
  }, null, 8, ["modelValue", "rules"]),
268
- c(t, {
268
+ c(o, {
269
269
  modelValue: W(i),
270
270
  rules: [
271
- l(re)(),
271
+ l(se)(),
272
272
  l(de)(C(i))
273
273
  ]
274
274
  }, null, 8, ["modelValue", "rules"])
@@ -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-CbAke6dP.js";
4
+ import { F as r } from "./app-MFSGVtiz.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-CbAke6dP.js";
2
+ import { K as d } from "./app-MFSGVtiz.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-CbAke6dP.js";
1
+ import { aA as d, aB as f, W as _, u as h } from "./app-MFSGVtiz.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,7 +1,7 @@
1
1
  import { defineComponent as j, computed as i, ref as q, resolveComponent as a, openBlock as z, createBlock as D, unref as p, createSlots as G, withCtx as r, createElementVNode as b, normalizeClass as J, createVNode as n, normalizeStyle as Q, Teleport as W, h } from "vue";
2
- import { u as X, a as Z, y as ee, _ as te, ai as P } from "./app-CbAke6dP.js";
2
+ import { u as X, a as Z, y as ee, _ as te, ai as P } from "./app-MFSGVtiz.js";
3
3
  import { useBreakpoints as oe, components as ne } from "@feedmepos/ui-library";
4
- import { u as le } from "./vue-i18n-DYyu2tND.js";
4
+ import { u as le } from "./vue-i18n-DEHYDDMC.js";
5
5
  const ae = { class: "flex flex-col py-8" }, se = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, ie = { class: "fm-typo-en-body-lg-600 text-fm-color-typo-primary" }, pe = /* @__PURE__ */ j({
6
6
  __name: "PublishView",
7
7
  setup(re) {
@@ -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-CbAke6dP.js";
3
+ import { av as y, ah as C } from "./app-MFSGVtiz.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%" }