@feedmepos/mf-inventory-portal 0.0.22-dev.5 → 0.0.22-dev.50

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 (144) hide show
  1. package/dist/ApprovalView-CyIOcyG5.js +140 -0
  2. package/dist/{BindingsDialog-DQJhC3Mo.js → BindingsDialog-BXePN5iL.js} +10 -10
  3. package/dist/{BindingsPicker-YfbPb_dG.js → BindingsPicker-Bd_qb0aO.js} +15 -15
  4. package/dist/{BindingsTable-D3MVcHXZ.js → BindingsTable-BV-nP9HU.js} +4 -4
  5. package/dist/ClosingTemplateView-CSvWLccZ.js +1829 -0
  6. package/dist/FmDroppableField-DwZ6ujPh.js +154 -0
  7. package/dist/FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-DpCoW_-F.js +266 -0
  8. package/dist/FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-BpzreBHD.js +435 -0
  9. package/dist/IngredientBindedItem.vue_vue_type_script_setup_true_lang-C8k7pSPT.js +51 -0
  10. package/dist/IngredientGroupView-C0hPeD41.js +608 -0
  11. package/dist/IngredientsView-CpwVIGXd.js +1608 -0
  12. package/dist/IntegrationView-Bt8pGAHS.js +1225 -0
  13. package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-wsBLYBpB.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-yA-qJUUz.js} +1 -1
  14. package/dist/PremiumBadge.vue_vue_type_script_setup_true_lang-BqcqoKyN.js +116 -0
  15. package/dist/{PurchaseOrderPrintPreview-BcAmgmD8.js → PurchaseOrderPrintPreview-D3ugzCW_.js} +7 -7
  16. package/dist/ReceiveRequestView-D14YTEEe.js +4073 -0
  17. package/dist/RecipeView-D0WsMfKm.js +594 -0
  18. package/dist/Standalone.vue.d.ts +2 -0
  19. package/dist/StockView-sxI0L6MP.js +7770 -0
  20. package/dist/SupplierView-clAkARuW.js +1468 -0
  21. package/dist/TransferDetails.vue_vue_type_script_setup_true_lang-C9NU1m6S.js +1150 -0
  22. package/dist/TransferTemplateView-DpI6kVqX.js +1258 -0
  23. package/dist/{UnitView-B95q8Xrj.js → UnitView-CneJsDum.js} +18 -18
  24. package/dist/{WarehouseView-CHGXvyeS.js → WarehouseView-DYbFWTlh.js} +176 -177
  25. package/dist/api/bill.d.ts +84 -238
  26. package/dist/api/closing-template.d.ts +6 -4
  27. package/dist/api/inventory.d.ts +282 -91
  28. package/dist/api/netsuite.d.ts +71 -0
  29. package/dist/api/purchase-order-template.d.ts +4 -6
  30. package/dist/api/supplier.d.ts +1 -0
  31. package/dist/{app-CfXF4jdF.js → app-B4pi48sM.js} +26414 -24985
  32. package/dist/app.d.ts +88 -3
  33. package/dist/app.js +3 -3
  34. package/dist/components/FmFilterableMenuOptions.vue.d.ts +54 -0
  35. package/dist/components/FmMinMaxInputRules.d.ts +2 -0
  36. package/dist/components/FmMultiselectDialog.vue.d.ts +3 -9
  37. package/dist/components/FmMultiselectDialogProps.d.ts +0 -2
  38. package/dist/components/FmUnitInputRules.d.ts +2 -0
  39. package/dist/components/inventory-binding/InventoryBinding.vue.d.ts +5 -5
  40. package/dist/components/map/GoogleMap.vue.d.ts +4 -4
  41. package/dist/components/shell/inventory/binding-dialog.vue.d.ts +2 -2
  42. package/dist/components/shell/inventory/binding-ui.vue.d.ts +2 -2
  43. package/dist/{decimal-BZ7tX47r.js → decimal-C8O2p3Sg.js} +1 -1
  44. package/dist/defineDeepModel-BXP1vLGf.js +13 -0
  45. package/dist/extensions/array.d.ts +1 -0
  46. package/dist/format-time-from-id-DgW7OJL_.js +15 -0
  47. package/dist/format-unit-display-BP4O0Pym.js +1195 -0
  48. package/dist/helper/rules.d.ts +7 -0
  49. package/dist/helper/rules.spec.d.ts +1 -0
  50. package/dist/helper/xlsx.util.d.ts +7 -0
  51. package/dist/router/name.d.ts +1 -0
  52. package/dist/stores/api.d.ts +1 -0
  53. package/dist/stores/feature.d.ts +0 -1
  54. package/dist/stores/helper/core-store-proxy.d.ts +3 -0
  55. package/dist/stores/helper/generate-backend-urls.d.ts +1 -0
  56. package/dist/stores/integration/foodmarkethub.d.ts +391 -0
  57. package/dist/stores/integration/index.d.ts +7 -0
  58. package/dist/stores/integration/netsuite.d.ts +102 -0
  59. package/dist/stores/inventory.d.ts +294 -9
  60. package/dist/stores/location.d.ts +508 -503
  61. package/dist/stores/supplier.d.ts +124 -4
  62. package/dist/style.css +1 -1
  63. package/dist/supplier-D-8XhuF_.js +77 -0
  64. package/dist/tsconfig.app.tsbuildinfo +1 -1
  65. package/dist/use-template-enabled-locations-2-C2E4j3k-.js +85 -0
  66. package/dist/views/closing-template/closing-template-import/ClosingTemplateImport.vue.d.ts +2 -0
  67. package/dist/views/closing-template/closing-template-import/ClosingTemplateImportItem.vue.d.ts +12 -0
  68. package/dist/views/closing-template/closing-template-import/ClosingTemplateImportItemProps.d.ts +7 -0
  69. package/dist/views/closing-template/components/closing-template-form/composables/use-closing-template-items.d.ts +1 -1
  70. package/dist/views/closing-template/composables/use-closing-template-actions.d.ts +877 -1038
  71. package/dist/views/closing-template/composables/use-closing-template-table.d.ts +882 -1049
  72. package/dist/views/closing-template/helpers/import-export.helper.d.ts +58 -0
  73. package/dist/views/ingredient-group/IngredientGroupView.vue.d.ts +3 -0
  74. package/dist/views/ingredient-group/components/ingredient-group-dialog/IngredientGroupDialog.vue.d.ts +31 -0
  75. package/dist/views/ingredient-group/components/ingredient-group-dialog/IngredientGroupDialogProps.d.ts +12 -0
  76. package/dist/views/ingredient-group/components/ingredient-group-form/IngredientGroupForm.vue.d.ts +20 -0
  77. package/dist/views/ingredient-group/components/ingredient-group-form/IngredientGroupFormProps.d.ts +12 -0
  78. package/dist/views/ingredient-group/composables/use-ingredient-group-actions.d.ts +24 -0
  79. package/dist/views/ingredient-group/composables/use-ingredient-group-table.d.ts +215 -0
  80. package/dist/views/ingredients/components/convert/ConvertForm.vue.d.ts +2 -2
  81. package/dist/views/ingredients/components/ingredient-form/IngredientForm.vue.d.ts +2 -2
  82. package/dist/views/ingredients/components/inventory-binding/InventoryBindingForm.vue.d.ts +5 -5
  83. package/dist/views/ingredients/composables/use-ingredient-form.d.ts +2 -2
  84. package/dist/views/ingredients/composables/use-ingredient-table.d.ts +1 -1
  85. package/dist/views/integration/FoodMarketHub.vue.d.ts +2 -0
  86. package/dist/views/integration/NetSuite.vue.d.ts +2 -0
  87. package/dist/views/integration/components/ApplyProductDialog.vue.d.ts +7 -7
  88. package/dist/views/integration/components/ApplyProductDialogV4.vue.d.ts +7 -7
  89. package/dist/views/receive-request/components/transfer-details/TransferDetailsProps.d.ts +1 -0
  90. package/dist/views/receive-request/components/transfer-form/NetSuiteField.vue.d.ts +49 -0
  91. package/dist/views/receive-request/components/transfer-form/TransferForm.vue.d.ts +1961 -87
  92. package/dist/views/receive-request/components/transfer-form/TransferFormProps.d.ts +1 -0
  93. package/dist/views/receive-request/components/transfer-form/components/ForecastStock.vue.d.ts +2 -2
  94. package/dist/views/receive-request/components/transfer-form/composables/use-transfer-items.d.ts +1 -1
  95. package/dist/views/receive-request/composables/use-receive-request-form.d.ts +2377 -292
  96. package/dist/views/receive-request/composables/use-receive-request-table.d.ts +2329 -244
  97. package/dist/views/recipe/components/recipe-form/RecipeForm.vue.d.ts +2 -2
  98. package/dist/views/recipe/composables/use-recipe-form.d.ts +2 -2
  99. package/dist/views/stock/components/StockRecordCard.vue.d.ts +42 -119
  100. package/dist/views/stock/components/dialog/AdjustedItemForm.vue.d.ts +32 -2
  101. package/dist/views/stock/composables/use-stock-action.d.ts +2 -2
  102. package/dist/views/supplier/components/supplier-import/SupplierImport.vue.d.ts +2 -0
  103. package/dist/views/supplier/components/supplier-import/SupplierImportItem.vue.d.ts +12 -0
  104. package/dist/views/supplier/components/supplier-import/SupplierImportItemProps.d.ts +6 -0
  105. package/dist/views/supplier/composables/use-supplier-actions.d.ts +10 -0
  106. package/dist/views/supplier/helpers/import-export.helper.d.ts +50 -0
  107. package/dist/views/transfer-template/components/transfer-template-details/TransferTemplateDetails.vue.d.ts +0 -2
  108. package/dist/views/transfer-template/components/transfer-template-details/TransferTemplateDetailsProps.d.ts +0 -1
  109. package/dist/views/transfer-template/components/transfer-template-form/composables/use-template-enabled-locations-2.d.ts +13 -0
  110. package/dist/views/transfer-template/components/transfer-template-form/composables/use-template-enabled-locations.d.ts +71 -85
  111. package/dist/views/transfer-template/components/transfer-template-form/composables/use-transfer-locations.d.ts +39 -2
  112. package/dist/views/transfer-template/components/transfer-template-form/composables/use-transfer-template-items.d.ts +1 -1
  113. package/dist/views/transfer-template/components/transfer-template-import/TransferTemplateImport.vue.d.ts +2 -0
  114. package/dist/views/transfer-template/components/transfer-template-import/TransferTemplateImportItem.vue.d.ts +12 -0
  115. package/dist/views/transfer-template/components/transfer-template-import/TransferTemplateImportItemProps.d.ts +9 -0
  116. package/dist/views/transfer-template/composables/use-transfer-template-actions.d.ts +1277 -1478
  117. package/dist/views/transfer-template/composables/use-transfer-template-table.d.ts +1697 -906
  118. package/dist/views/transfer-template/helpers/import-export.helper.d.ts +76 -0
  119. package/dist/views/transfer-template/helpers/remove-deleted-skus.helper.d.ts +1 -247
  120. package/dist/views/transfer-template/helpers/template-item.error.helper.d.ts +1 -0
  121. package/dist/views/unit/composables/use-unit-form.d.ts +2 -2
  122. package/dist/{xlsx-BtP1Qjj6.js → xlsx-Dsy-fxZw.js} +1525 -1525
  123. package/dist/xlsx.util-CxGmvsp9.js +78 -0
  124. package/package.json +10 -7
  125. package/dist/ApprovalView-BdaNwUBc.js +0 -129
  126. package/dist/ClosingTemplateView-BpErgepi.js +0 -1030
  127. package/dist/FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-D3B7kOlU.js +0 -372
  128. package/dist/IngredientsView-GqrkpCm5.js +0 -1758
  129. package/dist/IntegrationView-7c3MpUzS.js +0 -1141
  130. package/dist/PremiumBadge.vue_vue_type_script_setup_true_lang-BIwdObb1.js +0 -88
  131. package/dist/ReceiveRequestView-BAuXvzQW.js +0 -215
  132. package/dist/RecipeView-C6tZPQ-K.js +0 -581
  133. package/dist/StockView-4uXHYz4E.js +0 -1892
  134. package/dist/SupplierView-CuWvKCWY.js +0 -827
  135. package/dist/TransferDetails.vue_vue_type_script_setup_true_lang-CTQ9HIqf.js +0 -740
  136. package/dist/TransferDialog.vue_vue_type_script_setup_true_lang--6JoXOLD.js +0 -1409
  137. package/dist/TransferTemplateView-D1Lfi3aW.js +0 -1230
  138. package/dist/defineDeepModel-BKAs9qN6.js +0 -13
  139. package/dist/format-time-from-id-B7ZE4sdX.js +0 -15
  140. package/dist/id-to-date-D1lOqIir.js +0 -30
  141. package/dist/purchase-order-transaction-type-tZ7cj1dz.js +0 -702
  142. package/dist/supplier-BIDBk5S6.js +0 -69
  143. package/dist/use-template-enabled-locations-DlMnS9WJ.js +0 -57
  144. package/dist/xlsx.util-BKFiH-ig.js +0 -109
@@ -0,0 +1,435 @@
1
+ import { reactive as W, onUnmounted as q, defineComponent as T, ref as H, computed as _, resolveComponent as k, openBlock as o, createElementBlock as w, Fragment as V, createElementVNode as f, normalizeClass as D, unref as g, toDisplayString as R, createCommentVNode as b, createBlock as d, withCtx as I, createVNode as M, renderList as S, renderSlot as G, Teleport as z, watch as J, mergeModels as K, useModel as P } from "vue";
2
+ import { useBreakpoints as Y } from "@feedmepos/ui-library";
3
+ import { i as j, V as O } from "./app-B4pi48sM.js";
4
+ import { useCoreStore as X, useI18n as Q } from "@feedmepos/mf-common";
5
+ const N = W({});
6
+ function E() {
7
+ const v = `${Math.random()}`, l = new ResizeObserver((s) => {
8
+ const t = s.map((e) => e.target.scrollHeight).reduce((e, c) => e + c);
9
+ N[v] = t;
10
+ }), m = (s) => {
11
+ const t = s.el;
12
+ t && l.observe(t);
13
+ }, a = (s) => {
14
+ const t = s.el;
15
+ t && l.unobserve(t);
16
+ };
17
+ return q(() => {
18
+ l.disconnect(), delete N[v];
19
+ }), {
20
+ get tableHeight() {
21
+ return {
22
+ height: `calc(100dvh - ${Object.values(N).reduce((e, c) => e + c, 0) + 80}px)`
23
+ };
24
+ },
25
+ onMounted: m,
26
+ onUnmounted: a
27
+ };
28
+ }
29
+ const Z = {
30
+ key: 0,
31
+ class: /* @__PURE__ */ D(["text-fm-color-typo-secondary fm-typo-en-body-sm-400"])
32
+ }, ee = { class: "bg-white flex-1" }, ne = { class: "fixed bottom-96 right-16" }, he = /* @__PURE__ */ T({
33
+ __name: "SingleColumnLayout",
34
+ props: {
35
+ actions: { default: () => [] },
36
+ title: { default: "Title" },
37
+ description: {},
38
+ showBackButton: { type: Boolean },
39
+ defaultPadding: { type: Boolean },
40
+ breadcrumbs: { default: () => [] },
41
+ usingBusinessHelperText: {}
42
+ },
43
+ emits: ["click:action"],
44
+ setup(v, { emit: l }) {
45
+ const m = v, a = l, s = H(!1), t = _(() => m.actions.find((y) => y.isPrimary)), e = _(() => m.actions.filter((y) => !y.isPrimary)), c = _(
46
+ () => e.value.map(
47
+ (y) => ({
48
+ label: y.label,
49
+ value: y.value
50
+ })
51
+ )
52
+ ), { breakpoints: p } = Y(), h = _(() => p.value.xs || p.value.sm), L = j(), n = _(() => L.businessLevel), B = E();
53
+ return (y, u) => {
54
+ const x = k("FmButton"), U = k("FmMenuItem"), i = k("FmMenu"), F = k("FmCollapsibleTabs"), C = k("FmBottomSheet");
55
+ return o(), w(V, null, [
56
+ f("div", {
57
+ class: D([
58
+ "flex flex-col w-full bg-white h-full",
59
+ {
60
+ "gap-12": h.value
61
+ }
62
+ ])
63
+ }, [
64
+ f("div", {
65
+ onVnodeMounted: u[5] || (u[5] = //@ts-ignore
66
+ (...r) => g(B).onMounted && g(B).onMounted(...r)),
67
+ class: D([
68
+ "flex gap-8 items-center",
69
+ {
70
+ "p-12 border-b-[1px] border-b-fm-color-neutral-gray-100": h.value,
71
+ "px-24 py-16": !h.value
72
+ }
73
+ ])
74
+ }, [
75
+ f("div", {
76
+ class: D([
77
+ "flex-1 flex flex-col gap-4 fm-typo-en-title-md-600 bg-white",
78
+ {
79
+ "py-12": h.value
80
+ }
81
+ ])
82
+ }, [
83
+ f("div", null, R(y.title), 1),
84
+ y.usingBusinessHelperText && n.value ? (o(), w("div", Z, R(y.usingBusinessHelperText), 1)) : b("", !0)
85
+ ], 2),
86
+ h.value ? (o(), w(V, { key: 0 }, [
87
+ e.value.length ? (o(), d(x, {
88
+ key: 0,
89
+ variant: "tertiary",
90
+ "prepend-icon": "more_vert",
91
+ onClick: u[0] || (u[0] = (r) => s.value = !0)
92
+ })) : b("", !0)
93
+ ], 64)) : (o(), w(V, { key: 1 }, [
94
+ e.value[0] ? (o(), d(x, {
95
+ key: e.value[0].value,
96
+ label: e.value[0].label,
97
+ "prepend-icon": e.value[0].prependIcon,
98
+ variant: e.value[0].variant,
99
+ "bg-color": e.value[0].variant ? void 0 : "neutral-gray-100",
100
+ "text-color": e.value[0].variant ? void 0 : "neutral-gray-400",
101
+ onClick: u[1] || (u[1] = (r) => a("click:action", e.value[0].value))
102
+ }, null, 8, ["label", "prepend-icon", "variant", "bg-color", "text-color"])) : b("", !0),
103
+ e.value[1] ? (o(), d(x, {
104
+ key: e.value[1].value,
105
+ label: e.value[1].label,
106
+ "prepend-icon": e.value[1].prependIcon,
107
+ variant: e.value[1].variant,
108
+ "bg-color": e.value[1].variant ? void 0 : "neutral-gray-100",
109
+ "text-color": e.value[1].variant ? void 0 : "neutral-gray-400",
110
+ onClick: u[2] || (u[2] = (r) => a("click:action", e.value[1].value))
111
+ }, null, 8, ["label", "prepend-icon", "variant", "bg-color", "text-color"])) : b("", !0),
112
+ e.value.length === 3 ? (o(), d(x, {
113
+ key: e.value[2].value,
114
+ label: e.value[2].label,
115
+ "prepend-icon": e.value[2].prependIcon,
116
+ variant: e.value[2].variant,
117
+ "bg-color": e.value[2].variant ? void 0 : "neutral-gray-100",
118
+ "text-color": e.value[2].variant ? void 0 : "neutral-gray-400",
119
+ onClick: u[3] || (u[3] = (r) => a("click:action", e.value[2].value))
120
+ }, null, 8, ["label", "prepend-icon", "variant", "bg-color", "text-color"])) : b("", !0),
121
+ e.value.length > 3 ? (o(), d(i, { key: 3 }, {
122
+ "menu-button": I(() => [
123
+ M(x, {
124
+ label: "More",
125
+ "append-icon": "expand_more",
126
+ "bg-color": "neutral-gray-100",
127
+ "text-color": "neutral-gray-400"
128
+ })
129
+ ]),
130
+ default: I(() => [
131
+ (o(!0), w(V, null, S(e.value.slice(2), (r, $) => (o(), d(U, {
132
+ key: $,
133
+ label: r.label,
134
+ onClick: (pe) => a("click:action", r.value)
135
+ }, null, 8, ["label", "onClick"]))), 128))
136
+ ]),
137
+ _: 1
138
+ })) : b("", !0),
139
+ t.value ? (o(), d(x, {
140
+ key: 4,
141
+ label: t.value.label,
142
+ "prepend-icon": t.value.prependIcon,
143
+ onClick: u[4] || (u[4] = (r) => a("click:action", t.value.value))
144
+ }, null, 8, ["label", "prepend-icon"])) : b("", !0)
145
+ ], 64))
146
+ ], 2),
147
+ f("div", ee, [
148
+ G(y.$slots, "default")
149
+ ])
150
+ ], 2),
151
+ t.value && h.value ? (o(), d(z, {
152
+ key: 0,
153
+ to: "body"
154
+ }, [
155
+ f("div", ne, [
156
+ M(x, {
157
+ label: t.value.label,
158
+ "prepend-icon": t.value.prependIcon,
159
+ onClick: u[6] || (u[6] = (r) => a("click:action", t.value.value)),
160
+ variant: "fab"
161
+ }, null, 8, ["label", "prepend-icon"])
162
+ ])
163
+ ])) : b("", !0),
164
+ e.value.length ? (o(), d(z, {
165
+ key: 1,
166
+ to: "body"
167
+ }, [
168
+ M(C, {
169
+ "dismiss-away": "",
170
+ "no-header": "",
171
+ modelValue: s.value,
172
+ "onUpdate:modelValue": u[8] || (u[8] = (r) => s.value = r)
173
+ }, {
174
+ default: I(() => [
175
+ M(F, {
176
+ class: "pb-8",
177
+ items: c.value,
178
+ "onUpdate:modelValue": u[7] || (u[7] = (r) => (a("click:action", r), s.value = !1))
179
+ }, null, 8, ["items"])
180
+ ]),
181
+ _: 1
182
+ }, 8, ["modelValue"])
183
+ ])) : b("", !0)
184
+ ], 64);
185
+ };
186
+ }
187
+ }), te = { class: "inline-flex" }, oe = { 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" }, le = { class: "fm-typo-en-body-md-600 select-none text-ellipsis overflow-hidden whitespace-nowrap" }, ae = { class: "relative" }, se = { class: "sticky top-0 py-8 bg-white translate-y-[-12px]" }, ue = /* @__PURE__ */ T({
188
+ __name: "ChangeLocationComponent",
189
+ props: {
190
+ showBusiness: { type: Boolean }
191
+ },
192
+ setup(v) {
193
+ const l = j(), m = X(), a = _(() => {
194
+ var n;
195
+ return (n = m.currentBusiness.value) == null ? void 0 : n.name;
196
+ }), { t: s } = Q(), t = H(""), e = _({
197
+ get() {
198
+ return l.businessLevel;
199
+ },
200
+ set(n) {
201
+ l.businessLevel = n;
202
+ }
203
+ }), c = _(
204
+ () => l.locations.map((n) => ({ label: n.name, value: n.dbName, type: n.type })).filter(
205
+ (n) => t.value ? n.label.toLocaleLowerCase().includes(t.value.toLocaleLowerCase()) : !0
206
+ )
207
+ ), p = _(
208
+ () => c.value.filter((n) => n.type === "restaurant")
209
+ ), h = _(
210
+ () => c.value.filter((n) => n.type === "warehouse")
211
+ );
212
+ function L({ value: n }) {
213
+ e.value = !1, l.selectLocation(l.locations.find((B) => B.dbName === n));
214
+ }
215
+ return (n, B) => {
216
+ const y = k("FmIcon"), u = k("FmSearch"), x = k("FmMenuItem"), U = k("FmMenu");
217
+ return o(), w("div", te, [
218
+ M(U, { "close-on-click": !0 }, {
219
+ "menu-button": I(() => {
220
+ var i;
221
+ return [
222
+ f("div", oe, [
223
+ M(y, {
224
+ name: n.showBusiness && e.value ? "store" : "storefront",
225
+ size: "sm"
226
+ }, null, 8, ["name"]),
227
+ f("div", le, R(n.showBusiness && e.value ? a.value : ((i = g(l)._currentLocation) == null ? void 0 : i.name) ?? g(s)("inventory.common.noLocationSelected")), 1),
228
+ M(y, {
229
+ name: "expand_more",
230
+ size: "sm"
231
+ })
232
+ ])
233
+ ];
234
+ }),
235
+ default: I(() => [
236
+ f("div", ae, [
237
+ f("div", se, [
238
+ M(u, {
239
+ "model-value": t.value,
240
+ "onUpdate:modelValue": B[0] || (B[0] = (i) => t.value = i),
241
+ placeholder: g(s)("inventory.common.table.toolbar.filterItems")
242
+ }, null, 8, ["model-value", "placeholder"])
243
+ ]),
244
+ f("div", null, [
245
+ n.showBusiness ? (o(), d(x, {
246
+ key: 0,
247
+ "model-value": e.value,
248
+ label: a.value,
249
+ sublabel: "Business",
250
+ onClick: B[1] || (B[1] = (i) => e.value = !0)
251
+ }, null, 8, ["model-value", "label"])) : b("", !0),
252
+ (o(!0), w(V, null, S(p.value, (i) => {
253
+ var F;
254
+ return o(), d(x, {
255
+ key: i.value,
256
+ "model-value": !e.value && ((F = g(l)._currentLocation) == null ? void 0 : F.dbName) === i.value,
257
+ label: i.label,
258
+ sublabel: "Restaurant",
259
+ onClick: (C) => L(i),
260
+ onVnodeMounted: (C) => {
261
+ var r, $;
262
+ return !e.value && ((r = g(l)._currentLocation) == null ? void 0 : r.dbName) === i.value && (($ = C.el) == null || $.scrollIntoView({ behavior: "smooth", block: "center" })), void 0;
263
+ }
264
+ }, null, 8, ["model-value", "label", "onClick", "onVnodeMounted"]);
265
+ }), 128)),
266
+ (o(!0), w(V, null, S(h.value, (i) => {
267
+ var F;
268
+ return o(), d(x, {
269
+ key: i.value,
270
+ "model-value": !e.value && ((F = g(l)._currentLocation) == null ? void 0 : F.dbName) === i.value,
271
+ label: i.label,
272
+ sublabel: "Warehouse",
273
+ onClick: (C) => L(i),
274
+ onVnodeMounted: (C) => {
275
+ var r, $;
276
+ return !e.value && ((r = g(l)._currentLocation) == null ? void 0 : r.dbName) === i.value && (($ = C.el) == null || $.scrollIntoView({ behavior: "smooth", block: "center" })), void 0;
277
+ }
278
+ }, null, 8, ["model-value", "label", "onClick", "onVnodeMounted"]);
279
+ }), 128)),
280
+ !n.showBusiness && !p.value.length && !h.value.length ? (o(), d(x, {
281
+ key: 1,
282
+ disabled: "",
283
+ label: g(s)("inventory.common.noResultFound")
284
+ }, null, 8, ["label"])) : b("", !0)
285
+ ])
286
+ ])
287
+ ]),
288
+ _: 1
289
+ })
290
+ ]);
291
+ };
292
+ }
293
+ });
294
+ function ke() {
295
+ const v = /* @__PURE__ */ new Date();
296
+ return v.setDate(v.getDate() - 15), {
297
+ start: v,
298
+ end: /* @__PURE__ */ new Date()
299
+ };
300
+ }
301
+ function A(v = 15) {
302
+ const l = /* @__PURE__ */ new Date();
303
+ l.setDate(l.getDate() - v);
304
+ const m = l, a = /* @__PURE__ */ new Date();
305
+ return {
306
+ startDate: `${O(m)}`,
307
+ endDate: `${O(a)}`
308
+ };
309
+ }
310
+ const re = { 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" }, ie = { class: "fm-typo-en-body-md-600 select-none text-ellipsis overflow-hidden whitespace-nowrap" }, ce = /* @__PURE__ */ T({
311
+ __name: "FmDateRangePickerChip",
312
+ props: {
313
+ modelValue: { default: (v) => v.modelValue ?? A() }
314
+ },
315
+ emits: ["update:modelValue"],
316
+ setup(v, { emit: l }) {
317
+ const m = l, a = H(A());
318
+ J(a, (t) => {
319
+ m("update:modelValue", t);
320
+ });
321
+ const s = _(() => {
322
+ const { startDate: t, endDate: e } = a.value;
323
+ return !t && !e ? "" : `${t} - ${e}`;
324
+ });
325
+ return (t, e) => {
326
+ const c = k("FmIcon"), p = k("FmDateRangePicker");
327
+ return o(), d(p, {
328
+ "show-predefined-range": "",
329
+ modelValue: a.value,
330
+ "onUpdate:modelValue": e[0] || (e[0] = (h) => a.value = h),
331
+ "start-label": "",
332
+ "end-label": ""
333
+ }, {
334
+ "trigger-button": I(() => [
335
+ f("div", re, [
336
+ M(c, {
337
+ name: "calendar_month",
338
+ size: "sm"
339
+ }),
340
+ f("div", ie, R(s.value), 1)
341
+ ])
342
+ ]),
343
+ _: 1
344
+ }, 8, ["modelValue"]);
345
+ };
346
+ }
347
+ }), de = { class: "flex-1 w-full flex items-center gap-4" }, ve = {
348
+ key: 0,
349
+ class: "flex-1"
350
+ }, me = { class: "w-full max-w-[343px] xs:max-w-[unset] sm:max-w-[unset]" }, xe = /* @__PURE__ */ T({
351
+ __name: "FmInventoryTableToolbar",
352
+ props: /* @__PURE__ */ K({
353
+ dateRangeQuery: { type: Boolean },
354
+ changeLocation: { type: Boolean },
355
+ searchable: { type: Boolean },
356
+ actions: {},
357
+ usingBusinessHelperText: {},
358
+ showBusiness: { type: Boolean }
359
+ }, {
360
+ search: {},
361
+ searchModifiers: {},
362
+ dateRange: {},
363
+ dateRangeModifiers: {}
364
+ }),
365
+ emits: ["update:search", "update:dateRange"],
366
+ setup(v) {
367
+ const { breakpoints: l } = Y(), m = _(() => l.value.xs || l.value.sm), a = P(v, "search"), s = P(v, "dateRange"), { t } = Q(), e = E();
368
+ return (c, p) => {
369
+ const h = k("FmTextField"), L = k("FmButton");
370
+ return o(), w("div", {
371
+ class: "flex flex-col gap-8",
372
+ onVnodeMounted: p[2] || (p[2] = //@ts-ignore
373
+ (...n) => g(e).onMounted && g(e).onMounted(...n)),
374
+ onVnodeUnmounted: p[3] || (p[3] = //@ts-ignore
375
+ (...n) => g(e).onUnmounted && g(e).onUnmounted(...n))
376
+ }, [
377
+ f("div", {
378
+ class: D([
379
+ "flex gap-8 items-center",
380
+ {
381
+ "px-8 flex-col-reverse h-[unset]": m.value,
382
+ "h-48": !m.value
383
+ }
384
+ ])
385
+ }, [
386
+ c.changeLocation || c.dateRangeQuery ? (o(), w("div", {
387
+ key: 0,
388
+ class: D([
389
+ "flex gap-8 items-center",
390
+ {
391
+ "w-full overflow-x-auto": m.value
392
+ }
393
+ ])
394
+ }, [
395
+ c.changeLocation ? (o(), d(ue, {
396
+ key: 0,
397
+ "show-business": c.showBusiness
398
+ }, null, 8, ["show-business"])) : b("", !0),
399
+ c.dateRangeQuery ? (o(), d(ce, {
400
+ key: 1,
401
+ "model-value": s.value,
402
+ "onUpdate:modelValue": p[0] || (p[0] = (n) => s.value = n)
403
+ }, null, 8, ["model-value"])) : b("", !0)
404
+ ], 2)) : b("", !0),
405
+ f("div", de, [
406
+ m.value ? b("", !0) : (o(), w("div", ve)),
407
+ f("div", me, [
408
+ c.searchable ? (o(), d(h, {
409
+ key: 0,
410
+ "model-value": a.value,
411
+ "onUpdate:modelValue": p[1] || (p[1] = (n) => a.value = n),
412
+ "prepend-icon": "search",
413
+ placeholder: g(t)("inventory.common.table.toolbar.filterItems"),
414
+ class: "w-full"
415
+ }, null, 8, ["model-value", "placeholder"])) : b("", !0)
416
+ ]),
417
+ (o(!0), w(V, null, S(c.actions, (n, B) => (o(), d(L, {
418
+ key: B,
419
+ variant: "tertiary",
420
+ "prepend-icon": n.icon,
421
+ onClick: n.onClick
422
+ }, null, 8, ["prepend-icon", "onClick"]))), 128))
423
+ ])
424
+ ], 2)
425
+ ], 512);
426
+ };
427
+ }
428
+ });
429
+ export {
430
+ he as _,
431
+ xe as a,
432
+ ke as b,
433
+ A as i,
434
+ E as u
435
+ };
@@ -0,0 +1,51 @@
1
+ import { defineComponent as p, openBlock as s, createElementBlock as n, createElementVNode as r, toDisplayString as o, unref as i, Fragment as d, renderList as x } from "vue";
2
+ import { a, l as y } from "./app-B4pi48sM.js";
3
+ import { useI18n as _ } from "@feedmepos/mf-common";
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
+ class: "flex-0 py-8 px-16",
6
+ style: { "flex-basis": "120px" }
7
+ }, k = { class: "flex-1 py-8 px-16" }, B = {
8
+ key: 0,
9
+ class: "flex-0 py-8 px-16",
10
+ style: { "flex-basis": "120px" }
11
+ }, I = {
12
+ key: 1,
13
+ class: "flex-0 py-8 px-16",
14
+ style: { "flex-basis": "120px" }
15
+ }, A = /* @__PURE__ */ p({
16
+ __name: "IngredientBindedItem",
17
+ props: {
18
+ name: {},
19
+ bindings: {}
20
+ },
21
+ setup($) {
22
+ const { t: m } = _();
23
+ function c(e, l) {
24
+ var t;
25
+ if (e.measurement) {
26
+ const u = y(e.amount, e.measurement.conversion);
27
+ return `${a(u, !1)} ${(t = e.measurement) == null ? void 0 : t.abbrev}`;
28
+ }
29
+ return `${a(e.amount, !1)} ${l.abbrev}`;
30
+ }
31
+ function f(e) {
32
+ return e.unit !== void 0;
33
+ }
34
+ return (e, l) => (s(), n("div", v, [
35
+ r("div", g, [
36
+ r("div", h, o(e.name), 1),
37
+ r("div", b, o(i(m)("inventory.ingredient.bindedItems.amount")), 1)
38
+ ]),
39
+ (s(!0), n(d, null, x(e.bindings, (t) => (s(), n("div", {
40
+ key: t.id,
41
+ class: "flex flex-row fm-typo-en-body-md-400 h-48 items-center border-b border-b-fm-color-neutral-gray-100"
42
+ }, [
43
+ r("div", k, o(t.name), 1),
44
+ f(t) ? (s(), n("div", B, o(c(t, t.unit)), 1)) : (s(), n("div", I, o(i(a)(t.amount, !1)), 1))
45
+ ]))), 128))
46
+ ]));
47
+ }
48
+ });
49
+ export {
50
+ A as _
51
+ };