@feedmepos/mf-inventory-portal 0.0.19-dev.1 → 0.0.19-dev.11

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 (117) hide show
  1. package/dist/ApprovalView-BtgtZgDY.js +121 -0
  2. package/dist/{BindingsDialog-DpC48bqK.js → BindingsDialog-DDqu7p2z.js} +9 -10
  3. package/dist/{BindingsPicker-BU52g6zk.js → BindingsPicker-BDhn5Do7.js} +7 -8
  4. package/dist/{BindingsTable-aIuFdScv.js → BindingsTable-C5R7orsB.js} +4 -6
  5. package/dist/FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-D0sbKAX9.js +272 -0
  6. package/dist/IngredientsView-Ac52Wd12.js +1751 -0
  7. package/dist/IntegrationView-6mJtJK-d.js +1172 -0
  8. package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-BuyM580N.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-C2BFaTg-.js} +1 -1
  9. package/dist/PremiumBadge.vue_vue_type_script_setup_true_lang-CL0RBLOF.js +88 -0
  10. package/dist/PreviewBadge.vue_vue_type_script_setup_true_lang-CRZiQHjx.js +29 -0
  11. package/dist/{PurchaseOrderPrintPreview-EeKhENYH.js → PurchaseOrderPrintPreview-UzrsJ0AN.js} +12 -12
  12. package/dist/ReceiveRequestView-DW9u9TJZ.js +208 -0
  13. package/dist/RecipeView-W15pCZKU.js +573 -0
  14. package/dist/StockForecast.vue_vue_type_style_index_0_lang-KLXSWvo5.js +59 -0
  15. package/dist/StockView-BqEe-OIX.js +1877 -0
  16. package/dist/SupplierView-CGr2N-e7.js +801 -0
  17. package/dist/TransferDetails.vue_vue_type_script_setup_true_lang-DupNA58V.js +739 -0
  18. package/dist/TransferDialog.vue_vue_type_script_setup_true_lang-COVncBoC.js +1676 -0
  19. package/dist/TransferTemplateView-HgaSR8L8.js +1101 -0
  20. package/dist/UnitView-C07Yrynl.js +638 -0
  21. package/dist/WarehouseView-DL-8j9vX.js +1050 -0
  22. package/dist/api/bill.d.ts +2 -2
  23. package/dist/api/purchase-order-template.d.ts +7 -0
  24. package/dist/app-B1MZZxUg.js +67134 -0
  25. package/dist/app.d.ts +1185 -0
  26. package/dist/app.js +7 -3
  27. package/dist/components/FmDroppableField.vue.d.ts +1 -1
  28. package/dist/components/FmMultiselectDialogProps.d.ts +7 -0
  29. package/dist/components/FmUnitInputProps.d.ts +2 -0
  30. package/dist/components/FmUnitInputRules.d.ts +1 -0
  31. package/dist/components/row-action.enum.d.ts +5 -1
  32. package/dist/composable/defineDeepModel.d.ts +2 -0
  33. package/dist/{decimal-BAZuuTcd.js → decimal-BXf_WdLk.js} +1 -1
  34. package/dist/helper/country.d.ts +2 -0
  35. package/dist/id-to-date-Dlovyec6.js +30 -0
  36. package/dist/layout-BJjS48J5.js +151 -0
  37. package/dist/purchase-order-transaction-type-CMIu0jrP.js +299 -0
  38. package/dist/router/name.d.ts +2 -1
  39. package/dist/row-action.enum-PMKMRrZR.js +50 -0
  40. package/dist/stores/supplier.d.ts +90 -7
  41. package/dist/style.css +1 -1
  42. package/dist/supplier-IDQmZ4VM.js +54 -0
  43. package/dist/tsconfig.app.tsbuildinfo +1 -1
  44. package/dist/views/dev/components/FmMultiselectDialogGrouped.vue.d.ts +2 -0
  45. package/dist/views/ingredients/components/inventory-binding/InventoryBindingForm.vue.d.ts +2 -0
  46. package/dist/views/ingredients/components/inventory-binding/InventoryBindingSummary.vue.d.ts +26 -0
  47. package/dist/views/ingredients/composables/use-ingredient-form.d.ts +14 -2
  48. package/dist/views/ingredients/composables/use-ingredient-table.d.ts +1 -2
  49. package/dist/views/ingredients/helper/calculate-default-cost.d.ts +9 -0
  50. package/dist/views/receive-request/components/transfer-dialog/TransferDialogProps.d.ts +1 -0
  51. package/dist/views/receive-request/components/transfer-form/SparkIcon.vue.d.ts +1 -1
  52. package/dist/views/receive-request/components/transfer-form/TransferForm.vue.d.ts +4 -0
  53. package/dist/views/receive-request/components/transfer-form/TransferForm2.vue.d.ts +22 -0
  54. package/dist/views/receive-request/components/transfer-form/TransferFormProps.d.ts +2 -1
  55. package/dist/views/receive-request/components/transfer-form/components/ForecastStock.vue.d.ts +187 -0
  56. package/dist/views/receive-request/components/transfer-form/components/TransferItem.vue.d.ts +23 -0
  57. package/dist/views/receive-request/components/transfer-form/components/TransferItemTable.vue.d.ts +21 -0
  58. package/dist/views/receive-request/components/transfer-form/composables/use-backdate-po.d.ts +9 -0
  59. package/dist/views/receive-request/components/transfer-form/composables/use-compare-price.d.ts +6 -0
  60. package/dist/views/receive-request/components/transfer-form/composables/use-transfer-items.d.ts +112 -0
  61. package/dist/views/receive-request/composables/use-receive-request-form.d.ts +3 -1
  62. package/dist/views/receive-request/composables/use-receive-request-table.d.ts +18 -12
  63. package/dist/views/receive-request/helper/get-transfer-type.d.ts +2 -0
  64. package/dist/views/recipe/composables/use-recipe-form.d.ts +14 -2
  65. package/dist/views/recipe/composables/use-recipe-table.d.ts +1 -2
  66. package/dist/views/stock/components/StockRecordCard.vue.d.ts +1 -1
  67. package/dist/views/stock/components/dialog/AdjustedItemForm.vue.d.ts +2 -2
  68. package/dist/views/stock/composables/use-stock-action.d.ts +26 -0
  69. package/dist/views/stock/composables/use-stock-table.d.ts +1 -8
  70. package/dist/views/stock/helper/compute-summary-total.d.ts +2 -2
  71. package/dist/views/stock/helper/stock-row-action.d.ts +2 -2
  72. package/dist/views/transfer-template/TransferTemplateView.vue.d.ts +2 -0
  73. package/dist/views/transfer-template/components/transfer-template-details/TransferTemplateDetails.vue.d.ts +20 -0
  74. package/dist/views/transfer-template/components/transfer-template-details/TransferTemplateDetailsProps.d.ts +9 -0
  75. package/dist/views/transfer-template/components/transfer-template-dialog/TransferTemplateDialog.vue.d.ts +22 -0
  76. package/dist/views/transfer-template/components/transfer-template-dialog/TransferTemplateDialogProps.d.ts +10 -0
  77. package/dist/views/transfer-template/components/transfer-template-form/TransferTemplateForm.vue.d.ts +16 -0
  78. package/dist/views/transfer-template/components/transfer-template-form/TransferTemplateFormProps.d.ts +7 -0
  79. package/dist/views/transfer-template/components/transfer-template-form/components/TransferTemplateItem.vue.d.ts +18 -0
  80. package/dist/views/transfer-template/components/transfer-template-form/composables/use-transfer-locations.d.ts +116 -0
  81. package/dist/views/transfer-template/components/transfer-template-form/composables/use-transfer-template-items.d.ts +113 -0
  82. package/dist/views/transfer-template/composables/use-transfer-template-actions.d.ts +914 -0
  83. package/dist/views/transfer-template/composables/use-transfer-template-table.d.ts +290 -0
  84. package/dist/views/unit/composables/use-unit-form.d.ts +14 -2
  85. package/dist/views/unit/composables/use-unit-table.d.ts +1 -2
  86. package/dist/{xlsx-vUzm_udV.js → xlsx-CfdXcS72.js} +1 -1
  87. package/dist/xlsx.util-C5Wx4IUs.js +109 -0
  88. package/package.json +6 -5
  89. package/dist/ApprovalView-BTZwnKLf.js +0 -118
  90. package/dist/FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-DjgmtvXU.js +0 -268
  91. package/dist/FmMultiselectDialog.vue_vue_type_script_setup_true_lang-n09XXJZK.js +0 -143
  92. package/dist/FmUnitInput.vue_vue_type_script_setup_true_lang-B-19iYaK.js +0 -236
  93. package/dist/IngredientsView-DMyEGdik.js +0 -1767
  94. package/dist/IntegrationView-Dn_qL_vC.js +0 -1166
  95. package/dist/InventoryBindingForm.vue_vue_type_script_setup_true_lang-DGTLUrb9.js +0 -276
  96. package/dist/PreviewBadge.vue_vue_type_script_setup_true_lang-BvadeWUz.js +0 -35
  97. package/dist/ReceiveRequestView-BOdgbFFM.js +0 -1394
  98. package/dist/RecipeView-B1aNLDIK.js +0 -573
  99. package/dist/StockForecast.vue_vue_type_style_index_0_lang-B5EK101t.js +0 -58
  100. package/dist/StockView-C_Ur_jTg.js +0 -1862
  101. package/dist/SupplierView-CXfOoHTr.js +0 -796
  102. package/dist/TransferDetails.vue_vue_type_script_setup_true_lang-kjV5Eazv.js +0 -1028
  103. package/dist/UnitView-DHXfAsnq.js +0 -635
  104. package/dist/WarehouseView-DMwbxs1q.js +0 -1043
  105. package/dist/app-BkcO8oNJ.js +0 -66113
  106. package/dist/date2-Cvp5iJkI.js +0 -95
  107. package/dist/dayjs.min-D1_pOsO7.js +0 -282
  108. package/dist/fuzzy-0roCBvgC.js +0 -41
  109. package/dist/index-B_aEOJsR.js +0 -21515
  110. package/dist/layout-BnTfCS_X.js +0 -151
  111. package/dist/number-DLj3W3RW.js +0 -97
  112. package/dist/row-action.enum-BwQbURNh.js +0 -28
  113. package/dist/rules-CCmXA0Yi.js +0 -85
  114. package/dist/stock-estimate-CL4HShG8.js +0 -122
  115. package/dist/supplier-CjAH8O1y.js +0 -65
  116. package/dist/use-inventory-binding-dialog-GkJOzE6V.js +0 -93
  117. package/dist/xlsx.util-B_bqymTM.js +0 -107
@@ -0,0 +1,121 @@
1
+ import { defineComponent as B, ref as h, watch as I, computed as ee, resolveComponent as te, openBlock as D, createBlock as H, unref as e, withCtx as g, createElementVNode as s, createVNode as n, normalizeStyle as ae, toDisplayString as oe, createElementBlock as re, createCommentVNode as ne, Teleport as se, mergeProps as le } from "vue";
2
+ import { Y as f, O as U, j as ie } from "./app-B1MZZxUg.js";
3
+ import { b as ce, _ as pe, a as ue } from "./FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-D0sbKAX9.js";
4
+ import { u as me } from "./purchase-order-transaction-type-CMIu0jrP.js";
5
+ import { u as de, _ as fe } from "./TransferDetails.vue_vue_type_script_setup_true_lang-DupNA58V.js";
6
+ import { _ as _e, F as _, u as ve } from "./layout-BJjS48J5.js";
7
+ import { useBreakpoints as he } from "@feedmepos/ui-library";
8
+ import { useI18n as De } from "@feedmepos/mf-common";
9
+ const ge = { class: "px-24 xs:p-0 sm:p-0 flex flex-col gap-8 max-h-full" }, xe = { class: "flex flex-col py-8" }, be = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, ye = { class: "fm-typo-en-body-lg-600 text-fm-color-typo-primary line-clamp-1" }, we = { class: "fm-typo-en-body-md-400 text-fm-color-typo-primary line-clamp-1" }, Oe = {
10
+ key: 0,
11
+ class: "fm-typo-en-body-md-400 text-fm-color-typo-primary line-clamp-1"
12
+ }, Re = { class: "pt-8" }, Ve = /* @__PURE__ */ B({
13
+ __name: "ApprovalView",
14
+ setup(ke) {
15
+ const o = me("approval"), { columnDefs: G } = de("approval", o), J = ie();
16
+ f.object({
17
+ name: f.string().optional().nullable(),
18
+ start: f.date().optional().nullable(),
19
+ end: f.date().optional().nullable()
20
+ });
21
+ const x = h({
22
+ name: "",
23
+ ...ce()
24
+ }), a = h({
25
+ startDate: U(x.value.start ?? /* @__PURE__ */ new Date()),
26
+ endDate: U(x.value.end ?? /* @__PURE__ */ new Date())
27
+ });
28
+ I([() => a.value.startDate], () => {
29
+ if (!a.value.startDate)
30
+ return;
31
+ if (!a.value.endDate) {
32
+ a.value.endDate = a.value.startDate;
33
+ return;
34
+ }
35
+ const y = new Date(a.value.startDate);
36
+ if (new Date(a.value.endDate).getTime() < y.getTime()) {
37
+ a.value.endDate = a.value.startDate;
38
+ return;
39
+ }
40
+ });
41
+ const v = h(""), { breakpoints: b } = he(), K = ee(() => b.value.xs || b.value.sm ? 10 : 20), Q = ve(), { t: W } = De();
42
+ return (y, l) => {
43
+ const X = te("FmTable");
44
+ return D(), H(pe, {
45
+ title: e(W)("inventory.transfer.approval.title")
46
+ }, {
47
+ default: g(() => [
48
+ s("div", ge, [
49
+ n(ue, {
50
+ searchable: "",
51
+ "change-location": "",
52
+ search: v.value,
53
+ "onUpdate:search": l[0] || (l[0] = (r) => v.value = r),
54
+ actions: [{ icon: "refresh", onClick: e(o).fetchData }]
55
+ }, null, 8, ["search", "actions"]),
56
+ n(X, {
57
+ style: ae(e(Q).tableHeight),
58
+ "column-defs": e(G),
59
+ "row-data": e(o).purchaseRequests.value,
60
+ "search-value": v.value,
61
+ loading: !e(J)._currentLocation || e(o).loading.value,
62
+ onRowClick: l[1] || (l[1] = (r) => e(o).promptShowTransferDetails(r.original.purchaseOrder, r.original)),
63
+ "page-size": K.value
64
+ }, {
65
+ "list-row": g((r) => [
66
+ n(_e, {
67
+ row: r,
68
+ onRowClick: (t) => e(o).promptShowTransferDetails(t.purchaseOrder, t)
69
+ }, {
70
+ default: g((t) => {
71
+ var w, O, R, i, k, S, T, C, c, F, Y, p, $, u, z, M, V, j, q, m, L, N, E, P, d, A;
72
+ return [
73
+ s("div", xe, [
74
+ s("div", be, [
75
+ n(e(_), {
76
+ render: (R = (O = (w = t.purchaseOrder__id) == null ? void 0 : w.column) == null ? void 0 : O.columnDef) == null ? void 0 : R.cell,
77
+ props: (k = (i = t.purchaseOrder__id) == null ? void 0 : i.getContext) == null ? void 0 : k.call(i)
78
+ }, null, 8, ["render", "props"])
79
+ ]),
80
+ s("div", ye, [
81
+ n(e(_), {
82
+ render: (C = (T = (S = t.to_name) == null ? void 0 : S.column) == null ? void 0 : T.columnDef) == null ? void 0 : C.cell,
83
+ props: (F = (c = t.to_name) == null ? void 0 : c.getContext) == null ? void 0 : F.call(c)
84
+ }, null, 8, ["render", "props"])
85
+ ]),
86
+ s("div", we, oe((z = (u = ($ = (p = (Y = r.original.purchaseOrder) == null ? void 0 : Y.items) == null ? void 0 : p.map) == null ? void 0 : $.call(p, (Z) => `${Z.name}`)) == null ? void 0 : u.join) == null ? void 0 : z.call(u, ", ")), 1),
87
+ (M = r.original.purchaseOrder) != null && M.ref ? (D(), re("div", Oe, [
88
+ n(e(_), {
89
+ render: (q = (j = (V = t.purchaseOrder_ref) == null ? void 0 : V.column) == null ? void 0 : j.columnDef) == null ? void 0 : q.cell,
90
+ props: (L = (m = t.purchaseOrder_ref) == null ? void 0 : m.getContext) == null ? void 0 : L.call(m)
91
+ }, null, 8, ["render", "props"])
92
+ ])) : ne("", !0),
93
+ s("div", Re, [
94
+ n(e(_), {
95
+ render: (P = (E = (N = t.purchaseOrder_status) == null ? void 0 : N.column) == null ? void 0 : E.columnDef) == null ? void 0 : P.cell,
96
+ props: (A = (d = t.purchaseOrder_status) == null ? void 0 : d.getContext) == null ? void 0 : A.call(d)
97
+ }, null, 8, ["render", "props"])
98
+ ])
99
+ ])
100
+ ];
101
+ }),
102
+ _: 2
103
+ }, 1032, ["row", "onRowClick"])
104
+ ]),
105
+ _: 1
106
+ }, 8, ["style", "column-defs", "row-data", "search-value", "loading", "page-size"])
107
+ ]),
108
+ (D(), H(se, { to: "body" }, [
109
+ n(fe, le(e(o).transferDetailsProps.value, {
110
+ onSubmitted: e(o).fetchData
111
+ }), null, 16, ["onSubmitted"])
112
+ ]))
113
+ ]),
114
+ _: 1
115
+ }, 8, ["title"]);
116
+ };
117
+ }
118
+ });
119
+ export {
120
+ Ve as default
121
+ };
@@ -1,16 +1,15 @@
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-DGTLUrb9.js";
3
- import { u as L, A as S } from "./app-BkcO8oNJ.js";
2
+ import { u as V, aj as L, _ as S } from "./app-B1MZZxUg.js";
4
3
  const U = {
5
4
  key: 0,
6
5
  class: "flex justify-end gap-8 items-center"
7
- }, E = {
6
+ }, j = {
8
7
  key: 1,
9
8
  class: "p-24 flex items-center justify-center gap-16"
10
- }, N = /* @__PURE__ */ P("div", null, "Loading bindings dialog...", -1), O = /* @__PURE__ */ C({
9
+ }, E = /* @__PURE__ */ P("div", null, "Loading bindings dialog...", -1), D = /* @__PURE__ */ C({
11
10
  __name: "BindingsDialog",
12
- setup(j) {
13
- const p = L(), d = o(!0), s = o(new Array()), u = o(), n = S(y);
11
+ setup(N) {
12
+ const p = V(), d = o(!0), s = o(new Array()), u = o(), n = L(y);
14
13
  async function y() {
15
14
  await p.readInventory(), u.value = n.onMessage("props:inventory-bindings", (e) => {
16
15
  d.value = !1, s.value = e;
@@ -53,9 +52,9 @@ const U = {
53
52
  ref_key: "resizeableRef",
54
53
  ref: m
55
54
  }, [
56
- d.value ? (i(), c("div", E, [
55
+ d.value ? (i(), c("div", j, [
57
56
  a(B, { size: "md" }),
58
- N
57
+ E
59
58
  ])) : (i(), I(h, {
60
59
  key: 0,
61
60
  onValidationSuccess: t[1] || (t[1] = () => r.value ? void 0 : b()),
@@ -64,7 +63,7 @@ const U = {
64
63
  class: "flex flex-col gap-16"
65
64
  }, {
66
65
  default: R(() => [
67
- a(V, {
66
+ a(S, {
68
67
  "model-value": s.value,
69
68
  "onUpdate:modelValue": t[0] || (t[0] = (w) => s.value = w),
70
69
  "iframe-mode": "",
@@ -90,5 +89,5 @@ const U = {
90
89
  }
91
90
  });
92
91
  export {
93
- O as default
92
+ D as default
94
93
  };
@@ -1,16 +1,15 @@
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 { _ as x } from "./FmMultiselectDialog.vue_vue_type_script_setup_true_lang-n09XXJZK.js";
3
- import { u as M, A as h } from "./app-BkcO8oNJ.js";
2
+ import { u as x, aj as M, y as h } from "./app-B1MZZxUg.js";
4
3
  const z = {
5
4
  key: 0,
6
5
  class: "flex flex-col gap-16"
7
6
  }, K = { class: "flex justify-end gap-8 items-center" }, w = {
8
7
  key: 1,
9
8
  class: "p-24 flex items-center justify-center gap-16"
10
- }, F = /* @__PURE__ */ k("div", null, "Loading bindings dialog...", -1), H = /* @__PURE__ */ S({
9
+ }, F = /* @__PURE__ */ k("div", null, "Loading bindings dialog...", -1), A = /* @__PURE__ */ S({
11
10
  __name: "BindingsPicker",
12
- setup(L) {
13
- const d = M(), C = r(() => d.recipes), I = r(() => d.skus), g = l(!0), i = l(new Array()), a = l("RECIPE"), c = r(() => a.value === "SKU" ? I.value.map((s) => ({
11
+ setup(j) {
12
+ const d = x(), C = r(() => d.recipes), I = r(() => d.skus), g = l(!0), i = l(new Array()), a = l("RECIPE"), c = r(() => a.value === "SKU" ? I.value.map((s) => ({
14
13
  label: s.name,
15
14
  sublabel: s.code,
16
15
  value: s
@@ -63,7 +62,7 @@ const z = {
63
62
  ];
64
63
  }
65
64
  }
66
- }), b = l(), o = h(B);
65
+ }), b = l(), o = M(B);
67
66
  async function B() {
68
67
  await d.readInventory(), b.value = o.onMessage(
69
68
  "props:binding-items",
@@ -98,7 +97,7 @@ const z = {
98
97
  u(t, { size: "md" }),
99
98
  F
100
99
  ])) : (p(), f("div", z, [
101
- u(x, {
100
+ u(h, {
102
101
  "model-value": _.value,
103
102
  "onUpdate:modelValue": s[0] || (s[0] = (m) => _.value = m),
104
103
  items: c.value
@@ -120,5 +119,5 @@ const z = {
120
119
  }
121
120
  });
122
121
  export {
123
- H as default
122
+ A as default
124
123
  };
@@ -1,9 +1,7 @@
1
1
  import { defineComponent as v, ref as l, 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 { i as _, u as E, A as L } from "./app-BkcO8oNJ.js";
3
- import "./index-B_aEOJsR.js";
2
+ import { q as _, u as E, aj as L } from "./app-B1MZZxUg.js";
4
3
  import { components as F } from "@feedmepos/ui-library";
5
- import "./fuzzy-0roCBvgC.js";
6
- import "./dayjs.min-D1_pOsO7.js";
4
+ import "@feedmepos/mf-common";
7
5
  const P = /* @__PURE__ */ v({
8
6
  __name: "binding-ui",
9
7
  props: {
@@ -92,7 +90,7 @@ const P = /* @__PURE__ */ v({
92
90
  }), R = {
93
91
  key: 1,
94
92
  class: "p-24 flex items-center justify-center gap-16"
95
- }, M = /* @__PURE__ */ x("div", null, "Loading bindings table...", -1), A = /* @__PURE__ */ v({
93
+ }, M = /* @__PURE__ */ x("div", null, "Loading bindings table...", -1), V = /* @__PURE__ */ v({
96
94
  __name: "BindingsTable",
97
95
  setup(k) {
98
96
  const c = E(), d = l(!0), o = l(new Array()), m = f(() => c.recipes), r = f(() => c.skus), g = l(""), i = L(n), e = l();
@@ -143,5 +141,5 @@ const P = /* @__PURE__ */ v({
143
141
  }
144
142
  });
145
143
  export {
146
- A as default
144
+ V as default
147
145
  };
@@ -0,0 +1,272 @@
1
+ import { defineComponent as $, computed as g, resolveComponent as f, openBlock as t, createElementBlock as y, Fragment as k, createElementVNode as m, toDisplayString as R, renderList as F, createBlock as _, createCommentVNode as b, unref as d, createVNode as v, renderSlot as A, Teleport as H, ref as S, withCtx as C, watch as U, mergeModels as Y, useModel as B } from "vue";
2
+ import { FmButtonVariant as j, useBreakpoints as z } from "@feedmepos/ui-library";
3
+ import { useI18n as T } from "@feedmepos/mf-common";
4
+ import { j as Q, O as V } from "./app-B1MZZxUg.js";
5
+ const E = { class: "flex flex-col w-full bg-white h-full" }, O = { class: "flex items-center px-24 py-16 xs:p-12 sm:p-12 gap-4 h-[68px]" }, q = { class: "flex-1 fm-typo-en-title-md-800 flex items-center h-[36px] bg-white" }, G = { key: 0 }, J = { key: 1 }, K = { class: "bg-white flex-1" }, W = { class: "fixed bottom-96 right-16" }, _e = /* @__PURE__ */ $({
6
+ __name: "SingleColumnLayout",
7
+ props: {
8
+ actions: { default: () => [] },
9
+ title: { default: "Title" },
10
+ description: {},
11
+ showBackButton: { type: Boolean },
12
+ defaultPadding: { type: Boolean },
13
+ breadcrumbs: { default: () => [] }
14
+ },
15
+ emits: ["click:action"],
16
+ setup(i, { emit: o }) {
17
+ const l = i, a = o, n = g(() => l.actions.find((r) => r.isPrimary)), s = g(
18
+ () => l.actions.filter((r) => !r.isPrimary).map((r) => ({ ...r, variant: r.variant ?? j.Tertiary }))
19
+ ), { breakpoints: c } = z();
20
+ return (r, e) => {
21
+ const p = f("FmButton");
22
+ return t(), y(k, null, [
23
+ m("div", E, [
24
+ m("div", O, [
25
+ m("div", q, R(r.title), 1),
26
+ s.value.length ? (t(), y("div", G, [
27
+ (t(!0), y(k, null, F(s.value, (h) => (t(), _(p, {
28
+ key: h.value,
29
+ label: h.label,
30
+ "prepend-icon": h.prependIcon,
31
+ variant: h.variant,
32
+ onClick: (L) => a("click:action", h.value)
33
+ }, null, 8, ["label", "prepend-icon", "variant", "onClick"]))), 128))
34
+ ])) : b("", !0),
35
+ n.value && (d(c).lg || d(c).md) ? (t(), y("div", J, [
36
+ v(p, {
37
+ label: n.value.label,
38
+ "prepend-icon": n.value.prependIcon,
39
+ onClick: e[0] || (e[0] = (h) => a("click:action", n.value.value))
40
+ }, null, 8, ["label", "prepend-icon"])
41
+ ])) : b("", !0)
42
+ ]),
43
+ m("div", K, [
44
+ A(r.$slots, "default")
45
+ ])
46
+ ]),
47
+ n.value && (d(c).sm || d(c).xs) ? (t(), _(H, {
48
+ key: 0,
49
+ to: "body"
50
+ }, [
51
+ m("div", W, [
52
+ v(p, {
53
+ label: n.value.label,
54
+ "prepend-icon": n.value.prependIcon,
55
+ onClick: e[1] || (e[1] = (h) => a("click:action", n.value.value)),
56
+ variant: "fab"
57
+ }, null, 8, ["label", "prepend-icon"])
58
+ ])
59
+ ])) : b("", !0)
60
+ ], 64);
61
+ };
62
+ }
63
+ }), X = { class: "inline-flex" }, Z = { class: "inline-flex rounded-md items-center gap-4 justify-center h-[30px] px-8 py-4 bg-fm-color-neutral-gray-100 cursor-pointer text-fm-color-neutral-gray-400" }, ee = { class: "fm-typo-en-body-md-600 select-none text-ellipsis overflow-hidden whitespace-nowrap" }, te = {
64
+ class: "overflow-hidden overflow-y-scroll",
65
+ style: { maxHeight: "105px" }
66
+ }, ne = {
67
+ class: "overflow-hidden overflow-y-scroll",
68
+ style: { maxHeight: "105px" }
69
+ }, oe = /* @__PURE__ */ $({
70
+ __name: "ChangeLocationComponent",
71
+ setup(i) {
72
+ const o = Q(), { t: l } = T(), a = S(""), n = g(
73
+ () => o.locations.map((e) => ({ label: e.name, value: e.dbName, type: e.type })).filter(
74
+ (e) => a.value ? e.label.toLocaleLowerCase().includes(a.value.toLocaleLowerCase()) : !0
75
+ )
76
+ ), s = g(
77
+ () => n.value.filter((e) => e.type === "restaurant")
78
+ ), c = g(
79
+ () => n.value.filter((e) => e.type === "warehouse")
80
+ );
81
+ function r({ value: e }) {
82
+ o.selectLocation(o.locations.find((p) => p.dbName === e));
83
+ }
84
+ return (e, p) => {
85
+ const h = f("FmIcon"), L = f("FmSearch"), D = f("FmMenuDivider"), M = f("FmMenuHeader"), w = f("FmMenuItem"), N = f("FmMenu");
86
+ return t(), y("div", X, [
87
+ v(N, { "close-on-click": !0 }, {
88
+ "menu-button": C(() => {
89
+ var u;
90
+ return [
91
+ m("div", Z, [
92
+ v(h, {
93
+ name: "storefront",
94
+ size: "sm"
95
+ }),
96
+ m("div", ee, R(((u = d(o)._currentLocation) == null ? void 0 : u.name) ?? d(l)("inventory.common.noLocationSelected")), 1),
97
+ v(h, {
98
+ name: "expand_more",
99
+ size: "sm"
100
+ })
101
+ ])
102
+ ];
103
+ }),
104
+ default: C(() => [
105
+ v(L, {
106
+ "model-value": a.value,
107
+ "onUpdate:modelValue": p[0] || (p[0] = (u) => a.value = u),
108
+ class: "w-[200px]",
109
+ placeholder: d(l)("inventory.common.table.toolbar.filterItems")
110
+ }, null, 8, ["model-value", "placeholder"]),
111
+ v(D),
112
+ v(M, {
113
+ label: d(l)("inventory.common.restaurant")
114
+ }, null, 8, ["label"]),
115
+ v(D),
116
+ m("div", te, [
117
+ (t(!0), y(k, null, F(s.value, (u) => {
118
+ var x;
119
+ return t(), _(w, {
120
+ key: u.value,
121
+ "model-value": ((x = d(o)._currentLocation) == null ? void 0 : x.dbName) === u.value,
122
+ label: u.label,
123
+ onClick: (P) => r(u)
124
+ }, null, 8, ["model-value", "label", "onClick"]);
125
+ }), 128))
126
+ ]),
127
+ s.value.length ? b("", !0) : (t(), _(w, {
128
+ key: 0,
129
+ disabled: "",
130
+ label: d(l)("inventory.common.noResultFound")
131
+ }, null, 8, ["label"])),
132
+ v(M, {
133
+ label: d(l)("inventory.common.warehouse")
134
+ }, null, 8, ["label"]),
135
+ v(D),
136
+ m("div", ne, [
137
+ (t(!0), y(k, null, F(c.value, (u) => {
138
+ var x;
139
+ return t(), _(w, {
140
+ key: u.value,
141
+ "model-value": ((x = d(o)._currentLocation) == null ? void 0 : x.dbName) === u.value,
142
+ label: u.label,
143
+ onClick: (P) => r(u)
144
+ }, null, 8, ["model-value", "label", "onClick"]);
145
+ }), 128))
146
+ ]),
147
+ c.value.length ? b("", !0) : (t(), _(w, {
148
+ key: 1,
149
+ disabled: "",
150
+ label: d(l)("inventory.common.noResultFound")
151
+ }, null, 8, ["label"]))
152
+ ]),
153
+ _: 1
154
+ })
155
+ ]);
156
+ };
157
+ }
158
+ });
159
+ function he() {
160
+ const i = /* @__PURE__ */ new Date();
161
+ return i.setDate(i.getDate() - 15), {
162
+ start: i,
163
+ end: /* @__PURE__ */ new Date()
164
+ };
165
+ }
166
+ function I(i = 15) {
167
+ const o = /* @__PURE__ */ new Date();
168
+ o.setDate(o.getDate() - i);
169
+ const l = o, a = /* @__PURE__ */ new Date();
170
+ return {
171
+ startDate: `${V(l)}`,
172
+ endDate: `${V(a)}`
173
+ };
174
+ }
175
+ const le = { class: "inline-flex rounded-md items-center gap-4 justify-center h-[30px] px-8 py-4 bg-fm-color-neutral-gray-100 cursor-pointer text-fm-color-neutral-gray-400" }, ae = { class: "fm-typo-en-body-md-600 select-none text-ellipsis overflow-hidden whitespace-nowrap" }, se = /* @__PURE__ */ $({
176
+ __name: "FmDateRangePickerChip",
177
+ props: {
178
+ modelValue: { default: (i) => i.modelValue ?? I() }
179
+ },
180
+ emits: ["update:modelValue"],
181
+ setup(i, { emit: o }) {
182
+ const l = o, a = S(I());
183
+ U(a, (s) => {
184
+ l("update:modelValue", s);
185
+ });
186
+ const n = g(() => {
187
+ const { startDate: s, endDate: c } = a.value;
188
+ return !s && !c ? "" : `${s} - ${c}`;
189
+ });
190
+ return (s, c) => {
191
+ const r = f("FmIcon"), e = f("FmDateRangePicker");
192
+ return t(), _(e, {
193
+ "show-predefined-range": "",
194
+ modelValue: a.value,
195
+ "onUpdate:modelValue": c[0] || (c[0] = (p) => a.value = p),
196
+ "start-label": "",
197
+ "end-label": ""
198
+ }, {
199
+ "trigger-button": C(() => [
200
+ m("div", le, [
201
+ v(r, {
202
+ name: "calendar_month",
203
+ size: "sm"
204
+ }),
205
+ m("div", ae, R(n.value), 1)
206
+ ])
207
+ ]),
208
+ _: 1
209
+ }, 8, ["modelValue"]);
210
+ };
211
+ }
212
+ }), re = { class: "xs:px-8 sm:px-8 flex gap-8 items-center xs:gap-4 xs:flex-col-reverse sm:gap-4 sm:flex-col-reverse h-48 sm:h-[unset] xs:h-[unset]" }, ce = {
213
+ key: 0,
214
+ class: "xs:w-full sm:w-full flex gap-8 items-center"
215
+ }, ie = { class: "flex-1 w-full flex items-center gap-4" }, ue = /* @__PURE__ */ m("div", { class: "flex-1 xs:hidden sm:hidden" }, null, -1), de = { class: "w-full max-w-[343px] xs:max-w-[unset] sm:max-w-[unset]" }, ye = /* @__PURE__ */ $({
216
+ __name: "FmInventoryTableToolbar",
217
+ props: /* @__PURE__ */ Y({
218
+ dateRangeQuery: { type: Boolean },
219
+ dateRange: {},
220
+ changeLocation: { type: Boolean },
221
+ searchable: { type: Boolean },
222
+ search: {},
223
+ actions: {}
224
+ }, {
225
+ search: {},
226
+ searchModifiers: {},
227
+ dateRange: {},
228
+ dateRangeModifiers: {}
229
+ }),
230
+ emits: ["update:search", "update:dateRange"],
231
+ setup(i) {
232
+ const o = B(i, "search"), l = B(i, "dateRange"), { t: a } = T();
233
+ return (n, s) => {
234
+ const c = f("FmTextField"), r = f("FmButton");
235
+ return t(), y("div", re, [
236
+ n.changeLocation || n.dateRangeQuery ? (t(), y("div", ce, [
237
+ n.changeLocation ? (t(), _(oe, { key: 0 })) : b("", !0),
238
+ n.dateRangeQuery ? (t(), _(se, {
239
+ key: 1,
240
+ "model-value": l.value,
241
+ "onUpdate:modelValue": s[0] || (s[0] = (e) => l.value = e)
242
+ }, null, 8, ["model-value"])) : b("", !0)
243
+ ])) : b("", !0),
244
+ m("div", ie, [
245
+ ue,
246
+ m("div", de, [
247
+ n.searchable ? (t(), _(c, {
248
+ key: 0,
249
+ "model-value": o.value,
250
+ "onUpdate:modelValue": s[1] || (s[1] = (e) => o.value = e),
251
+ "prepend-icon": "search",
252
+ placeholder: d(a)("inventory.common.table.toolbar.filterItems"),
253
+ class: "w-full"
254
+ }, null, 8, ["model-value", "placeholder"])) : b("", !0)
255
+ ]),
256
+ (t(!0), y(k, null, F(n.actions, (e, p) => (t(), _(r, {
257
+ key: p,
258
+ variant: "tertiary",
259
+ "prepend-icon": e.icon,
260
+ onClick: e.onClick
261
+ }, null, 8, ["prepend-icon", "onClick"]))), 128))
262
+ ])
263
+ ]);
264
+ };
265
+ }
266
+ });
267
+ export {
268
+ _e as _,
269
+ ye as a,
270
+ he as b,
271
+ I as i
272
+ };