@feedmepos/mf-inventory-portal 0.0.19-dev.13 → 0.0.19-dev.14

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 (178) hide show
  1. package/dist/App.vue.d.ts +1 -1
  2. package/dist/{ApprovalView-9MdmwrUz.js → ApprovalView-BY13XuOu.js} +5 -5
  3. package/dist/{BindingsDialog-C-q6Y04n.js → BindingsDialog-B3PP-XkE.js} +22 -22
  4. package/dist/{BindingsPicker-syyx9h8v.js → BindingsPicker-DL17pRty.js} +17 -17
  5. package/dist/{BindingsTable-CQ0WyX2i.js → BindingsTable-CjKOv7Yw.js} +29 -29
  6. package/dist/Entry.vue.d.ts +1 -1
  7. package/dist/FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-DoF7wwNT.js +306 -0
  8. package/dist/{IngredientsView-Ofs2UG-9.js → IngredientsView-C-rsKAsF.js} +294 -294
  9. package/dist/{IntegrationView-BCruLSTA.js → IntegrationView-BkhfPSjM.js} +278 -278
  10. package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-Bvw_BkWY.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-Buc21sEN.js} +1 -1
  11. package/dist/{PremiumBadge.vue_vue_type_script_setup_true_lang-BLVAIHDv.js → PremiumBadge.vue_vue_type_script_setup_true_lang-BRijSilS.js} +1 -1
  12. package/dist/PurchaseOrderPrintPreview-CGMMozPA.js +152 -0
  13. package/dist/{ReceiveRequestView-Dw-AC1Mw.js → ReceiveRequestView-Bk0pUeEm.js} +7 -7
  14. package/dist/{RecipeView-B5WkUzLO.js → RecipeView-kzA9kIg8.js} +181 -181
  15. package/dist/Standalone.vue.d.ts +1 -1
  16. package/dist/{StockView-CMTxj8Ly.js → StockView-DF-ucES_.js} +23 -23
  17. package/dist/SupplierView-XlzsU00G.js +813 -0
  18. package/dist/{TransferDetails.vue_vue_type_script_setup_true_lang-B8IGZmDZ.js → TransferDetails.vue_vue_type_script_setup_true_lang-Bp7AJiJ-.js} +106 -106
  19. package/dist/TransferDialog.vue_vue_type_script_setup_true_lang-D1NAkXMT.js +1690 -0
  20. package/dist/TransferTemplateView-CsA2SzQY.js +1279 -0
  21. package/dist/{UnitView-CExCsCFg.js → UnitView-9VMIlEZ_.js} +242 -242
  22. package/dist/{WarehouseView-DuPizg7w.js → WarehouseView-JTYLFBsu.js} +360 -362
  23. package/dist/api/bill.d.ts +238 -84
  24. package/dist/api/supplier.d.ts +4 -4
  25. package/dist/app-kYGuBDV8.js +68549 -0
  26. package/dist/app.d.ts +14 -0
  27. package/dist/app.js +3 -3
  28. package/dist/components/ChangeLocationComponent.vue.d.ts +11 -1
  29. package/dist/components/DeferableLoading.vue.d.ts +1 -1
  30. package/dist/components/DeleteDialog.vue.d.ts +1 -1
  31. package/dist/components/FmCoordinateInput.vue.d.ts +3 -3
  32. package/dist/components/FmDroppableField.vue.d.ts +6 -6
  33. package/dist/components/FmFilterableSelect.vue.d.ts +3 -3
  34. package/dist/components/FmInventoryTableToolbar.vue.d.ts +21 -10
  35. package/dist/components/FmMinMaxInput.vue.d.ts +20 -0
  36. package/dist/components/FmMinMaxInputProps.d.ts +16 -0
  37. package/dist/components/FmMinMaxInputRules.d.ts +4 -0
  38. package/dist/components/FmMultiselectDialog.vue.d.ts +5 -5
  39. package/dist/components/FmMultiselectDialogProps.d.ts +3 -0
  40. package/dist/components/FmUnitInputRules.d.ts +1 -0
  41. package/dist/components/MultiSelectDialog.vue.d.ts +1 -1
  42. package/dist/components/NavigationTab.vue.d.ts +1 -1
  43. package/dist/components/NumberPrecisionInput.vue.d.ts +3 -3
  44. package/dist/components/PremiumBadge.vue.d.ts +3 -3
  45. package/dist/components/PreviewBadge.vue.d.ts +3 -3
  46. package/dist/components/StockForecast.vue.d.ts +1 -1
  47. package/dist/components/TableActionableRow.vue.d.ts +4 -4
  48. package/dist/components/UnitDisplayControl.vue.d.ts +1 -1
  49. package/dist/components/icons/IconCommunity.vue.d.ts +1 -1
  50. package/dist/components/icons/IconDocumentation.vue.d.ts +1 -1
  51. package/dist/components/icons/IconEcosystem.vue.d.ts +1 -1
  52. package/dist/components/icons/IconSupport.vue.d.ts +1 -1
  53. package/dist/components/icons/IconTooling.vue.d.ts +1 -1
  54. package/dist/components/inventory-binding/InventoryBinding.vue.d.ts +5 -5
  55. package/dist/components/map/CoordinateDialog.vue.d.ts +4 -4
  56. package/dist/components/map/GoogleMap.vue.d.ts +6 -6
  57. package/dist/components/nested-multiselect/FmNestedMultiselectDialog.vue.d.ts +3 -3
  58. package/dist/components/shell/inventory/binding-dialog.vue.d.ts +3 -3
  59. package/dist/components/shell/inventory/binding-ui.vue.d.ts +5 -5
  60. package/dist/components/ui-library/FmDateRangePickerChip.vue.d.ts +5 -5
  61. package/dist/composable/useIframe.d.ts +1 -1
  62. package/dist/composable/useSearch.d.ts +1 -1
  63. package/dist/{decimal-GwZ2MmM_.js → decimal-E3w4eGHF.js} +1 -1
  64. package/dist/helper/number.d.ts +2 -0
  65. package/dist/{id-to-date-CMUZ2glF.js → id-to-date-gyR82hWy.js} +1 -1
  66. package/dist/is-linked-ingredient-error-fJ2TJb3z.js +37 -0
  67. package/dist/layout/InventoryLayout.vue.d.ts +1 -1
  68. package/dist/layout/SingleColumnLayout.vue.d.ts +5 -5
  69. package/dist/layout/components/NavigationButton.vue.d.ts +4 -4
  70. package/dist/{layout-C3IEOm7C.js → layout-BTYR4n3X.js} +1 -1
  71. package/dist/{purchase-order-transaction-type-DpZQe_jA.js → purchase-order-transaction-type-CUtdDhYo.js} +2 -2
  72. package/dist/stores/feature.d.ts +2 -1
  73. package/dist/stores/location.d.ts +108 -148
  74. package/dist/stores/supplier.d.ts +672 -18
  75. package/dist/stores/warehouse.d.ts +9 -5
  76. package/dist/supplier-Ed-Bva_-.js +60 -0
  77. package/dist/tsconfig.app.tsbuildinfo +1 -1
  78. package/dist/views/InventoryView.vue.d.ts +1 -1
  79. package/dist/views/SelectBussinessDialog.vue.d.ts +1 -1
  80. package/dist/views/approval/ApprovalView.vue.d.ts +1 -1
  81. package/dist/views/dev/ComponentPreview.vue.d.ts +1 -1
  82. package/dist/views/dev/components/CoordinateTest.vue.d.ts +1 -1
  83. package/dist/views/dev/components/DateRange.vue.d.ts +1 -1
  84. package/dist/views/dev/components/FmDecimalInputTest.vue.d.ts +1 -1
  85. package/dist/views/dev/components/FmMultiselectDialogGrouped.vue.d.ts +1 -1
  86. package/dist/views/dev/components/FmSelectTest.vue.d.ts +1 -1
  87. package/dist/views/dev/components/InventoryIframe.vue.d.ts +1 -1
  88. package/dist/views/dev/components/LayoutDev.vue.d.ts +1 -1
  89. package/dist/views/dev/components/MfCommontTest.vue.d.ts +1 -1
  90. package/dist/views/dev/components/NestedSelection.vue.d.ts +1 -1
  91. package/dist/views/dev/components/NumberStepper.vue.d.ts +1 -1
  92. package/dist/views/dev/components/TabStorageTest.vue.d.ts +1 -1
  93. package/dist/views/dev/components/UnitInput.vue.d.ts +1 -1
  94. package/dist/views/dev/helpers/pinia-test.d.ts +1 -1
  95. package/dist/views/home/HomeView.vue.d.ts +1 -1
  96. package/dist/views/iframe/inventory-bindings/bindings-dialog/BindingsDialog.vue.d.ts +1 -1
  97. package/dist/views/iframe/inventory-bindings/bindings-picker/BindingsPicker.vue.d.ts +1 -1
  98. package/dist/views/iframe/inventory-bindings/bindings-table/BindingsTable.vue.d.ts +1 -1
  99. package/dist/views/ingredients/IngredientsView.vue.d.ts +1 -1
  100. package/dist/views/ingredients/components/cannot-delete/CannotDelete.vue.d.ts +4 -4
  101. package/dist/views/ingredients/components/convert/ConvertForm.vue.d.ts +3 -3
  102. package/dist/views/ingredients/components/import-ingredients/ImportIngredientItem.vue.d.ts +1 -1
  103. package/dist/views/ingredients/components/import-ingredients/ImportIngredients.vue.d.ts +1 -1
  104. package/dist/views/ingredients/components/ingredient-binded-item/IngredientBindedItem.vue.d.ts +1 -1
  105. package/dist/views/ingredients/components/ingredient-dialog/IngredientDialog.vue.d.ts +5 -5
  106. package/dist/views/ingredients/components/ingredient-form/IngredientForm.vue.d.ts +4 -4
  107. package/dist/views/ingredients/components/inventory-binding/InventoryBindingForm.vue.d.ts +5 -5
  108. package/dist/views/ingredients/components/inventory-binding/InventoryBindingSummary.vue.d.ts +3 -3
  109. package/dist/views/ingredients/composables/use-ingredient-form.d.ts +8 -8
  110. package/dist/views/integration/IntegrationView.vue.d.ts +1 -1
  111. package/dist/views/integration/components/ApplyAddon.vue.d.ts +5 -5
  112. package/dist/views/integration/components/ApplyProduct.vue.d.ts +5 -5
  113. package/dist/views/integration/components/ApplyProductDialog.vue.d.ts +5 -5
  114. package/dist/views/integration/components/ApplyProductDialogV4.vue.d.ts +5 -5
  115. package/dist/views/receive-request/ReceiveRequestView.vue.d.ts +1 -1
  116. package/dist/views/receive-request/components/supplier-price-history/SupplierPriceHistory.vue.d.ts +1 -1
  117. package/dist/views/receive-request/components/transfer-details/TransferDetails.vue.d.ts +3 -3
  118. package/dist/views/receive-request/components/transfer-dialog/TransferDialog.vue.d.ts +4 -4
  119. package/dist/views/receive-request/components/transfer-form/SparkIcon.vue.d.ts +4 -4
  120. package/dist/views/receive-request/components/transfer-form/TransferForm.vue.d.ts +27 -27
  121. package/dist/views/receive-request/components/transfer-form/TransferForm2.vue.d.ts +4 -4
  122. package/dist/views/receive-request/components/transfer-form/components/ForecastStock.vue.d.ts +4 -4
  123. package/dist/views/receive-request/components/transfer-form/components/TransferItem.vue.d.ts +3 -3
  124. package/dist/views/receive-request/components/transfer-form/components/TransferItemTable.vue.d.ts +3 -3
  125. package/dist/views/receive-request/components/transfer-form/composables/use-backdate-po.d.ts +4 -4
  126. package/dist/views/receive-request/components/transfer-form/composables/use-compare-price.d.ts +3 -3
  127. package/dist/views/receive-request/components/transfer-form/composables/use-transfer-items.d.ts +0 -8
  128. package/dist/views/receive-request/composables/use-receive-request-form.d.ts +1012 -66
  129. package/dist/views/receive-request/composables/use-receive-request-table.d.ts +24 -24
  130. package/dist/views/receive-request/print-preview/PurchaseOrderPrintPreview.vue.d.ts +1 -1
  131. package/dist/views/recipe/RecipeView.vue.d.ts +1 -1
  132. package/dist/views/recipe/components/recipe-dialog/RecipeDialog.vue.d.ts +5 -5
  133. package/dist/views/recipe/components/recipe-form/RecipeForm.vue.d.ts +4 -4
  134. package/dist/views/recipe/composables/use-recipe-form.d.ts +8 -8
  135. package/dist/views/stock/StockView.vue.d.ts +1 -1
  136. package/dist/views/stock/components/StockHeaderPreview.vue.d.ts +1 -1
  137. package/dist/views/stock/components/StockHistory.vue.d.ts +3 -3
  138. package/dist/views/stock/components/StockRecalculateDialog.vue.d.ts +2 -2
  139. package/dist/views/stock/components/StockRecordCard.vue.d.ts +123 -46
  140. package/dist/views/stock/components/dialog/AdjustSkuDialog.vue.d.ts +4 -4
  141. package/dist/views/stock/components/dialog/AdjustedItemForm.vue.d.ts +3 -3
  142. package/dist/views/stock/components/dialog/ConvertSkuDialog.vue.d.ts +4 -4
  143. package/dist/views/stock/composables/use-stock-action.d.ts +11 -11
  144. package/dist/views/supplier/SupplierView.vue.d.ts +1 -1
  145. package/dist/views/supplier/components/SupplierDialog.vue.d.ts +4 -4
  146. package/dist/views/supplier/components/SupplierDialogProps.d.ts +1 -0
  147. package/dist/views/supplier/components/SupplierForm.vue.d.ts +10 -10
  148. package/dist/views/supplier/components/SupplierSupplyItemField.vue.d.ts +3 -3
  149. package/dist/views/supplier/composables/use-supplier-table.d.ts +3 -3
  150. package/dist/views/transfer-template/TransferTemplateView.vue.d.ts +1 -1
  151. package/dist/views/transfer-template/components/transfer-template-details/TransferTemplateDetails.vue.d.ts +3 -3
  152. package/dist/views/transfer-template/components/transfer-template-dialog/TransferTemplateDialog.vue.d.ts +4 -4
  153. package/dist/views/transfer-template/components/transfer-template-form/TransferTemplateForm.vue.d.ts +2 -2
  154. package/dist/views/transfer-template/components/transfer-template-form/components/TransferTemplateItem.vue.d.ts +3 -3
  155. package/dist/views/transfer-template/components/transfer-template-form/composables/use-transfer-locations.d.ts +7 -7
  156. package/dist/views/transfer-template/components/transfer-template-form/composables/use-transfer-template-items.d.ts +13 -8
  157. package/dist/views/transfer-template/composables/use-transfer-template-actions.d.ts +1020 -79
  158. package/dist/views/transfer-template/composables/use-transfer-template-table.d.ts +309 -11
  159. package/dist/views/unit/UnitView.vue.d.ts +1 -1
  160. package/dist/views/unit/components/unit-dialog/UnitDialog.vue.d.ts +5 -5
  161. package/dist/views/unit/components/unit-form/UnitForm.vue.d.ts +4 -4
  162. package/dist/views/unit/components/unit-summary/UnitSummary.vue.d.ts +3 -3
  163. package/dist/views/unit/components/unit-used-by/UnitUsedBy.vue.d.ts +1 -1
  164. package/dist/views/unit/composables/use-unit-form.d.ts +8 -8
  165. package/dist/views/warehouse/WarehouseView.vue.d.ts +1 -1
  166. package/dist/views/warehouse/components/WarehouseDialog.vue.d.ts +4 -4
  167. package/dist/views/warehouse/components/WarehouseForm.vue.d.ts +22 -14
  168. package/dist/{xlsx-CjErNF-B.js → xlsx-q6Ctgevr.js} +2759 -2759
  169. package/dist/{xlsx.util-CMXCCmUA.js → xlsx.util-Cvqg56mI.js} +2 -2
  170. package/package.json +2 -1
  171. package/dist/FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-DlIq3AyC.js +0 -272
  172. package/dist/PurchaseOrderPrintPreview-Do2KxBzF.js +0 -152
  173. package/dist/SupplierView-OmZ0X1E1.js +0 -801
  174. package/dist/TransferDialog.vue_vue_type_script_setup_true_lang-BJMBsA9j.js +0 -1672
  175. package/dist/TransferTemplateView-Da6ehaJF.js +0 -1101
  176. package/dist/app-Chj8x632.js +0 -67206
  177. package/dist/is-linked-ingredient-error-C6AghEwR.js +0 -37
  178. package/dist/supplier-dG_APcwB.js +0 -54
@@ -1,18 +1,18 @@
1
1
  import { ref as z, defineComponent as le, computed as C, resolveComponent as R, openBlock as y, createBlock as B, withCtx as $, createVNode as f, unref as d, createElementBlock as U, Fragment as Q, createElementVNode as c, createCommentVNode as O, onMounted as nt, watch as je, normalizeClass as X, createTextVNode as He, toDisplayString as L, renderList as oe, isRef as Ee, renderSlot as ge, createSlots as Oe, normalizeStyle as ot, Teleport as De, normalizeProps as lt, guardReactiveProps as at } from "vue";
2
- import { u as ae, c as Ye, S as rt, _ as st, A as _e, a as Ge, g as xe, t as qe, F as ve, R as be, U as it, M as ut, d as Ae, b as We, C as Ce, e as Te, f as dt, h as ct, I as mt, i as pt, j as vt } from "./app-Chj8x632.js";
2
+ import { u as ae, c as Ye, S as rt, _ as st, A as _e, a as Ge, g as xe, t as qe, F as ve, R as be, U as it, M as ut, d as Ae, b as We, C as Ce, e as Te, f as dt, h as ct, I as mt, i as pt, j as vt } from "./app-kYGuBDV8.js";
3
3
  import { useDialog as Ke, useSnackbar as Ve, useProxiedModel as Pe, useDialogChild as ft, useBreakpoints as yt } from "@feedmepos/ui-library";
4
- import { i as gt, _ as bt } from "./is-linked-ingredient-error-C6AghEwR.js";
4
+ import { i as gt, _ as bt } from "./is-linked-ingredient-error-fJ2TJb3z.js";
5
5
  import { F as K, D as Be, R as he } from "./row-action.enum-PMKMRrZR.js";
6
6
  import { useI18n as re, useCoreStore as fe } from "@feedmepos/mf-common";
7
7
  import { defineStore as ht, storeToRefs as _t } from "pinia";
8
- import { c as xt, _ as Vt, F as ze, u as kt } from "./layout-C3IEOm7C.js";
9
- import { _ as Ct, a as Ft } from "./FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-DlIq3AyC.js";
8
+ import { c as xt, _ as Vt, F as ze, u as kt } from "./layout-BTYR4n3X.js";
9
+ import { _ as Ct, a as Ft } from "./FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-DoF7wwNT.js";
10
10
  import { g as St, _ as Fe, S as Se } from "./StockForecast.vue_vue_type_style_index_0_lang-KLXSWvo5.js";
11
- import { _ as we, t as Je, d as Qe, s as wt, r as Mt } from "./xlsx.util-CMXCCmUA.js";
11
+ import { _ as we, t as Je, d as Qe, s as wt, r as Mt } from "./xlsx.util-Cvqg56mI.js";
12
12
  import { _ as Me } from "./PreviewBadge.vue_vue_type_script_setup_true_lang-CRZiQHjx.js";
13
13
  import "./array-AvWd53LI.js";
14
14
  const $e = ht("ingredientForm", function() {
15
- const i = Ke(), m = Ve(), r = ae(), t = z(!1), { t: l } = re(), o = z();
15
+ const i = Ke(), m = Ve(), r = ae(), n = z(!1), { t: l } = re(), o = z();
16
16
  function p() {
17
17
  const h = {
18
18
  unit: {},
@@ -36,7 +36,7 @@ const $e = ht("ingredientForm", function() {
36
36
  o.value = u;
37
37
  }
38
38
  async function _(h) {
39
- t.value = !0;
39
+ n.value = !0;
40
40
  try {
41
41
  await r.deleteSku(h), m.open({
42
42
  title: "Success",
@@ -61,7 +61,7 @@ const $e = ht("ingredientForm", function() {
61
61
  type: "error"
62
62
  }), console.error("failed to delete ingredient", u);
63
63
  } finally {
64
- t.value = !1;
64
+ n.value = !1;
65
65
  }
66
66
  }
67
67
  function g(h) {
@@ -85,7 +85,7 @@ const $e = ht("ingredientForm", function() {
85
85
  updateIngredient: b,
86
86
  deleteIngredient: g,
87
87
  ingredientDialogProps: o,
88
- ingredientViewLoading: t
88
+ ingredientViewLoading: n
89
89
  };
90
90
  });
91
91
  function $t() {
@@ -164,7 +164,7 @@ const It = /* @__PURE__ */ le({
164
164
  const m = s, r = C(() => {
165
165
  var u;
166
166
  return (u = m.rootValue) == null ? void 0 : u.unit;
167
- }), t = C(() => {
167
+ }), n = C(() => {
168
168
  var u;
169
169
  return (u = m.rootValue) == null ? void 0 : u._id;
170
170
  }), l = i, { t: o } = re(), p = C({
@@ -218,10 +218,10 @@ const It = /* @__PURE__ */ le({
218
218
  }, null, 8, ["label", "modelValue", "items"])
219
219
  ]),
220
220
  f(st, {
221
- id: t.value,
221
+ id: n.value,
222
222
  "model-value": ((V = u.modelValue) == null ? void 0 : V.inventoryBindings) ?? [],
223
223
  "onUpdate:modelValue": g,
224
- "exclude-binding-id": t.value,
224
+ "exclude-binding-id": n.value,
225
225
  rules: [d(_e)(1)]
226
226
  }, null, 8, ["id", "model-value", "exclude-binding-id", "rules"])
227
227
  ], 64)) : O("", !0)
@@ -247,31 +247,9 @@ const Rt = { class: "text-fm-color-typo-secondary" }, Ut = { class: "text-fm-col
247
247
  }, Bt = {
248
248
  key: 2,
249
249
  class: "col-span-2 mt-16 border-1 border-fm-color-neutral-gray-200 fm-corner-radius-lg flex flex-col p-16 gap-16"
250
- }, zt = { class: "col-span-2 flex flex-col gap-12" }, Lt = { class: "flex flex-col gap-4" }, Nt = { class: "fm-typo-en-title-sm-800" }, jt = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, Ht = { class: "col-span-2 flex flex-col gap-4" }, Ot = { class: "flex fm-corner-radius-md border-1 border-fm-color-neutral-gray-200" }, Yt = { class: "flex-1 p-12 flex flex-col gap-8" }, Gt = { class: "mx-auto" }, qt = { class: "flex flex-col" }, Wt = { class: "fm-typo-en-body-sm-600 translate-y-4" }, Kt = /* @__PURE__ */ c("div", {
251
- class: "text-fm-color-typo-secondary",
252
- style: { "padding-right": "32px" }
253
- }, "days", -1), Jt = /* @__PURE__ */ c("div", {
254
- class: "h-full bg-fm-color-neutral-gray-200 relative",
255
- style: { width: "1px" }
256
- }, [
257
- /* @__PURE__ */ c("div", {
258
- class: "absolute bg-white",
259
- style: { transform: "translate(-50%, -50%)", left: "50%", top: "20%" }
260
- }, " < ")
261
- ], -1), Qt = { class: "flex-1 p-12 flex flex-col gap-8" }, Xt = { class: "mx-auto" }, Zt = { class: "flex flex-col" }, en = { class: "fm-typo-en-body-sm-600 translate-y-4" }, tn = /* @__PURE__ */ c("div", {
262
- class: "text-fm-color-typo-secondary",
263
- style: { "padding-right": "32px" }
264
- }, "days", -1), nn = /* @__PURE__ */ c("div", {
265
- class: "h-full bg-fm-color-neutral-gray-200 relative",
266
- style: { width: "1px" }
267
- }, [
268
- /* @__PURE__ */ c("div", {
269
- class: "absolute bg-white",
270
- style: { transform: "translate(-50%, -50%)", left: "50%", top: "20%" }
271
- }, " < ")
272
- ], -1), on = { class: "flex-1 p-12 flex flex-col gap-8" }, ln = { class: "mx-auto" }, an = { class: "flex flex-col" }, rn = { class: "fm-typo-en-body-sm-600 translate-y-4" };
250
+ }, zt = { class: "col-span-2 flex flex-col gap-12" }, Lt = { class: "flex flex-col gap-4" }, Nt = { class: "fm-typo-en-title-sm-800" }, jt = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, Ht = { class: "col-span-2 flex flex-col gap-4" }, Ot = { class: "flex fm-corner-radius-md border-1 border-fm-color-neutral-gray-200" }, Yt = { class: "flex-1 p-12 flex flex-col gap-8" }, Gt = { class: "mx-auto" }, qt = { class: "flex flex-col" }, Wt = { class: "fm-typo-en-body-sm-600 translate-y-4" }, Kt = { class: "flex-1 p-12 flex flex-col gap-8" }, Jt = { class: "mx-auto" }, Qt = { class: "flex flex-col" }, Xt = { class: "fm-typo-en-body-sm-600 translate-y-4" }, Zt = { class: "flex-1 p-12 flex flex-col gap-8" }, en = { class: "mx-auto" }, tn = { class: "flex flex-col" }, nn = { class: "fm-typo-en-body-sm-600 translate-y-4" };
273
251
  var Ie = /* @__PURE__ */ ((s) => (s.Daily = "Daily", s.Consumables = "Consumables", s.ShortTerm = "Short term", s.Kitchen = "Kitchen", s))(Ie || {});
274
- const sn = /* @__PURE__ */ le({
252
+ const on = /* @__PURE__ */ le({
275
253
  __name: "IngredientForm",
276
254
  props: {
277
255
  mode: {},
@@ -281,113 +259,113 @@ const sn = /* @__PURE__ */ le({
281
259
  emits: ["update:modelValue", "click:submit"],
282
260
  setup(s, { expose: i, emit: m }) {
283
261
  var pe;
284
- const { t: r } = re(), t = s, l = m, o = ae(), p = fe(), b = We();
285
- function _(e) {
286
- if (e.length === 0) return;
287
- const n = e[0], v = t.modelValue ?? {
262
+ const { t: r } = re(), n = s, l = m, o = ae(), p = fe(), b = We();
263
+ function _(t) {
264
+ if (t.length === 0) return;
265
+ const e = t[0], v = n.modelValue ?? {
288
266
  unit: o.units.find((k) => k)
289
267
  };
290
- v.unit || (v.unit = n, l("update:modelValue", v));
268
+ v.unit || (v.unit = e, l("update:modelValue", v));
291
269
  }
292
270
  nt(() => {
293
271
  _(o.units);
294
- }), je([() => o.units], ([e]) => {
295
- _(e);
272
+ }), je([() => o.units], ([t]) => {
273
+ _(t);
296
274
  });
297
275
  function g() {
298
276
  l("click:submit");
299
277
  }
300
278
  const h = C({
301
279
  get() {
302
- var e;
303
- return ((e = t.modelValue) == null ? void 0 : e.code) ?? "";
280
+ var t;
281
+ return ((t = n.modelValue) == null ? void 0 : t.code) ?? "";
304
282
  },
305
- set(e) {
306
- const n = t.modelValue ? {
307
- ...t.modelValue
283
+ set(t) {
284
+ const e = n.modelValue ? {
285
+ ...n.modelValue
308
286
  } : {};
309
- n.code = e, l("update:modelValue", n);
287
+ e.code = t, l("update:modelValue", e);
310
288
  }
311
289
  }), u = C({
312
290
  get() {
313
- var e;
314
- return ((e = t.modelValue) == null ? void 0 : e.name) ?? "";
291
+ var t;
292
+ return ((t = n.modelValue) == null ? void 0 : t.name) ?? "";
315
293
  },
316
- set(e) {
317
- const n = t.modelValue ? {
318
- ...t.modelValue
294
+ set(t) {
295
+ const e = n.modelValue ? {
296
+ ...n.modelValue
319
297
  } : {};
320
- n.name = e, l("update:modelValue", n);
298
+ e.name = t, l("update:modelValue", e);
321
299
  }
322
300
  }), x = C({
323
301
  get() {
324
- var n, v;
325
- const e = (v = (n = t.modelValue) == null ? void 0 : n.defaultCost) == null ? void 0 : v.costPerUnit;
326
- return e ? +Ge(e) : 0;
302
+ var e, v;
303
+ const t = (v = (e = n.modelValue) == null ? void 0 : e.defaultCost) == null ? void 0 : v.costPerUnit;
304
+ return t ? +Ge(t) : 0;
327
305
  },
328
- set(e) {
306
+ set(t) {
329
307
  var v, k, T, I;
330
- const n = t.modelValue ? {
331
- ...t.modelValue
308
+ const e = n.modelValue ? {
309
+ ...n.modelValue
332
310
  } : {};
333
- n.defaultCost ?? (n.defaultCost = {
311
+ e.defaultCost ?? (e.defaultCost = {
334
312
  costPerUnit: {
335
313
  amount: 0,
336
314
  precision: 2,
337
315
  currency: ((v = xe(p.currentCountry.value)) == null ? void 0 : v.currency) ?? "MYR"
338
316
  },
339
- measurement: (I = (T = (k = t.modelValue) == null ? void 0 : k.unit) == null ? void 0 : T.measurements) == null ? void 0 : I.find(
317
+ measurement: (I = (T = (k = n.modelValue) == null ? void 0 : k.unit) == null ? void 0 : T.measurements) == null ? void 0 : I.find(
340
318
  (Y) => {
341
319
  var G;
342
- return Y.id === ((G = t.modelValue) == null ? void 0 : G.trackingMeasurement);
320
+ return Y.id === ((G = n.modelValue) == null ? void 0 : G.trackingMeasurement);
343
321
  }
344
322
  )
345
- }), n.defaultCost.costPerUnit = {
346
- ...n.defaultCost.costPerUnit,
347
- ...qe(+e, 4)
348
- }, l("update:modelValue", n);
323
+ }), e.defaultCost.costPerUnit = {
324
+ ...e.defaultCost.costPerUnit,
325
+ ...qe(+t, 4)
326
+ }, l("update:modelValue", e);
349
327
  }
350
328
  }), D = C(() => {
351
- var n, v, k;
352
- const e = ((n = t.modelValue) == null ? void 0 : n.unit) ?? o.units.find((T) => T);
353
- return e ? {
354
- _id: e._id,
355
- measurement: (v = t.modelValue) == null ? void 0 : v.trackingMeasurement,
356
- name: ((k = e.measurements.find((T) => {
329
+ var e, v, k;
330
+ const t = ((e = n.modelValue) == null ? void 0 : e.unit) ?? o.units.find((T) => T);
331
+ return t ? {
332
+ _id: t._id,
333
+ measurement: (v = n.modelValue) == null ? void 0 : v.trackingMeasurement,
334
+ name: ((k = t.measurements.find((T) => {
357
335
  var I;
358
- return T.id === ((I = t.modelValue) == null ? void 0 : I.trackingMeasurement);
359
- })) == null ? void 0 : k.name) ?? e.name
336
+ return T.id === ((I = n.modelValue) == null ? void 0 : I.trackingMeasurement);
337
+ })) == null ? void 0 : k.name) ?? t.name
360
338
  } : null;
361
339
  }), S = C(
362
- () => o.units.flatMap(({ name: e, _id: n, abbrev: v, measurements: k }) => [
340
+ () => o.units.flatMap(({ name: t, _id: e, abbrev: v, measurements: k }) => [
363
341
  {
364
- label: `${e}`,
342
+ label: `${t}`,
365
343
  value: null,
366
344
  displayAsSection: !0
367
345
  },
368
346
  {
369
- label: `${e} (${v})`,
370
- value: { _id: n },
347
+ label: `${t} (${v})`,
348
+ value: { _id: e },
371
349
  displayAsSection: !1
372
350
  },
373
351
  ...k.map(({ id: T, name: I, abbrev: Y }) => ({
374
352
  label: `${I} (${Y})`,
375
- value: { _id: n, measurement: T },
353
+ value: { _id: e, measurement: T },
376
354
  displayAsSection: !1
377
355
  }))
378
356
  ])
379
357
  );
380
- function w(e) {
381
- var n, v, k, T, I;
382
- return ((v = (n = t.modelValue) == null ? void 0 : n.unit) == null ? void 0 : v._id) === ((k = e.value) == null ? void 0 : k._id) && ((T = t.modelValue) == null ? void 0 : T.trackingMeasurement) === ((I = e.value) == null ? void 0 : I.measurement);
358
+ function w(t) {
359
+ var e, v, k, T, I;
360
+ return ((v = (e = n.modelValue) == null ? void 0 : e.unit) == null ? void 0 : v._id) === ((k = t.value) == null ? void 0 : k._id) && ((T = n.modelValue) == null ? void 0 : T.trackingMeasurement) === ((I = t.value) == null ? void 0 : I.measurement);
383
361
  }
384
- function M(e) {
362
+ function M(t) {
385
363
  var Y, G;
386
- if (!e) return;
387
- const { _id: n, measurement: v } = e, k = v || void 0, T = o.units.find((ie) => ie._id === n);
364
+ if (!t) return;
365
+ const { _id: e, measurement: v } = t, k = v || void 0, T = o.units.find((ie) => ie._id === e);
388
366
  if (!T)
389
367
  return;
390
- const I = t.modelValue ?? {};
368
+ const I = n.modelValue ?? {};
391
369
  I.unit = T, I.trackingMeasurement = k, I.convert && (I.convert.measurement = k || null), b.enableTotalCost && (I.defaultCost = {
392
370
  measurement: T.measurements.find((ie) => ie.id === k),
393
371
  costPerUnit: {
@@ -401,99 +379,99 @@ const sn = /* @__PURE__ */ le({
401
379
  }
402
380
  const V = C({
403
381
  get() {
404
- var e;
405
- return ((e = t.modelValue) == null ? void 0 : e.operationalGroup) ?? null;
382
+ var t;
383
+ return ((t = n.modelValue) == null ? void 0 : t.operationalGroup) ?? null;
406
384
  },
407
- set(e) {
408
- const n = t.modelValue ? {
409
- ...t.modelValue
385
+ set(t) {
386
+ const e = n.modelValue ? {
387
+ ...n.modelValue
410
388
  } : {};
411
- n.operationalGroup = e, l("update:modelValue", n);
389
+ e.operationalGroup = t, l("update:modelValue", e);
412
390
  }
413
391
  }), H = C(
414
392
  () => [
415
393
  ...new Set(
416
- o.skus.map((e) => e.operationalGroup ?? "").filter((e) => e && !Object.values(Ie).includes(e))
394
+ o.skus.map((t) => t.operationalGroup ?? "").filter((t) => t && !Object.values(Ie).includes(t))
417
395
  )
418
396
  ].sort()
419
397
  ), J = C({
420
398
  get() {
421
399
  return V.value !== null;
422
400
  },
423
- set(e) {
424
- e ? V.value = "" : V.value = null;
401
+ set(t) {
402
+ t ? V.value = "" : V.value = null;
425
403
  }
426
404
  }), ee = C({
427
405
  get() {
428
- var e;
429
- return ((e = t.modelValue) == null ? void 0 : e.convert) ?? null;
406
+ var t;
407
+ return ((t = n.modelValue) == null ? void 0 : t.convert) ?? null;
430
408
  },
431
- set(e) {
432
- const n = t.modelValue ? {
433
- ...t.modelValue
409
+ set(t) {
410
+ const e = n.modelValue ? {
411
+ ...n.modelValue
434
412
  } : {};
435
- e ? n.convert = e : n.convert = null, l("update:modelValue", n);
413
+ t ? e.convert = t : e.convert = null, l("update:modelValue", e);
436
414
  }
437
415
  }), de = C(() => ve.options.filter(
438
- (e) => e === ve.enum.FIFO || e === ve.enum.WAVG
439
- ).map((e) => ({
440
- label: r(`inventory.ingredient.valuationMethod.${e}`),
441
- value: e
416
+ (t) => t === ve.enum.FIFO || t === ve.enum.WAVG
417
+ ).map((t) => ({
418
+ label: r(`inventory.ingredient.valuationMethod.${t}`),
419
+ value: t
442
420
  }))), Z = C({
443
421
  get() {
444
- var e;
445
- return ((e = t.modelValue) == null ? void 0 : e.valuation) ?? "WAVG";
422
+ var t;
423
+ return ((t = n.modelValue) == null ? void 0 : t.valuation) ?? "WAVG";
446
424
  },
447
- set(e) {
448
- const n = t.modelValue ? {
449
- ...t.modelValue
425
+ set(t) {
426
+ const e = n.modelValue ? {
427
+ ...n.modelValue
450
428
  } : {};
451
- n.valuation = e, l("update:modelValue", n);
429
+ e.valuation = t, l("update:modelValue", e);
452
430
  }
453
431
  }), a = z();
454
432
  i({
455
433
  validateInputs: () => {
456
- var e, n;
457
- (n = (e = a.value) == null ? void 0 : e.validateInputs) == null || n.call(e);
434
+ var t, e;
435
+ (e = (t = a.value) == null ? void 0 : t.validateInputs) == null || e.call(t);
458
436
  },
459
437
  resetInputsValidation: () => {
460
- var e, n;
461
- (n = (e = a.value) == null ? void 0 : e.resetInputsValidation) == null || n.call(e);
438
+ var t, e;
439
+ (e = (t = a.value) == null ? void 0 : t.resetInputsValidation) == null || e.call(t);
462
440
  },
463
441
  resetInputs: () => {
464
- var e, n;
465
- (n = (e = a.value) == null ? void 0 : e.resetInputs) == null || n.call(e);
442
+ var t, e;
443
+ (e = (t = a.value) == null ? void 0 : t.resetInputs) == null || e.call(t);
466
444
  }
467
445
  });
468
446
  const N = z(!1), W = C(
469
447
  () => {
470
- var e, n, v;
471
- return (e = t.modelValue) != null && e._id ? ((v = o.menu.bindedBySkuId[(n = t.modelValue) == null ? void 0 : n._id]) == null ? void 0 : v.filter(
448
+ var t, e, v;
449
+ return (t = n.modelValue) != null && t._id ? ((v = o.menu.bindedBySkuId[(e = n.modelValue) == null ? void 0 : e._id]) == null ? void 0 : v.filter(
472
450
  (k) => k.from === "INGREDIENT"
473
451
  )) ?? [] : [];
474
452
  }
475
453
  ), se = C(
476
454
  () => {
477
- var e, n, v;
478
- return (e = t.modelValue) != null && e._id ? ((v = o.menu.bindedBySkuId[(n = t.modelValue) == null ? void 0 : n._id]) == null ? void 0 : v.filter(
455
+ var t, e, v;
456
+ return (t = n.modelValue) != null && t._id ? ((v = o.menu.bindedBySkuId[(e = n.modelValue) == null ? void 0 : e._id]) == null ? void 0 : v.filter(
479
457
  (k) => k.from === "RECIPE"
480
458
  )) ?? [] : [];
481
459
  }
482
460
  ), te = C(
483
461
  () => {
484
- var e, n, v;
485
- return (e = t.modelValue) != null && e._id ? ((v = o.menu.bindedBySkuId[(n = t.modelValue) == null ? void 0 : n._id]) == null ? void 0 : v.filter((k) => k.from === "MENU")) ?? [] : [];
462
+ var t, e, v;
463
+ return (t = n.modelValue) != null && t._id ? ((v = o.menu.bindedBySkuId[(e = n.modelValue) == null ? void 0 : e._id]) == null ? void 0 : v.filter((k) => k.from === "MENU")) ?? [] : [];
486
464
  }
487
465
  ), A = C(
488
- () => o.skus.map((e) => ({ label: e.name, value: e.code }))
489
- ), E = z((pe = t.modelValue) == null ? void 0 : pe.code);
490
- function ce(e) {
466
+ () => o.skus.map((t) => ({ label: t.name, value: t.code }))
467
+ ), E = z((pe = n.modelValue) == null ? void 0 : pe.code);
468
+ function ce(t) {
491
469
  var v;
492
- const n = e.el;
493
- n && ((v = n.querySelector("[x-should-scroll-into=true]")) == null || v.scrollIntoView());
470
+ const e = t.el;
471
+ e && ((v = e.querySelector("[x-should-scroll-into=true]")) == null || v.scrollIntoView());
494
472
  }
495
- function ne(e) {
496
- switch (e) {
473
+ function ne(t) {
474
+ switch (t) {
497
475
  case Ce.MY:
498
476
  return "MYR";
499
477
  case Ce.SG:
@@ -506,52 +484,52 @@ const sn = /* @__PURE__ */ le({
506
484
  }
507
485
  const me = C(
508
486
  () => {
509
- var e, n, v, k, T, I;
510
- return ((k = (v = (n = (e = t.modelValue) == null ? void 0 : e.unit) == null ? void 0 : n.measurements) == null ? void 0 : v.find(
487
+ var t, e, v, k, T, I;
488
+ return ((k = (v = (e = (t = n.modelValue) == null ? void 0 : t.unit) == null ? void 0 : e.measurements) == null ? void 0 : v.find(
511
489
  (Y) => {
512
490
  var G;
513
- return Y.id === ((G = t.modelValue) == null ? void 0 : G.trackingMeasurement);
491
+ return Y.id === ((G = n.modelValue) == null ? void 0 : G.trackingMeasurement);
514
492
  }
515
- )) == null ? void 0 : k.abbrev) ?? ((I = (T = t.modelValue) == null ? void 0 : T.unit) == null ? void 0 : I.abbrev);
493
+ )) == null ? void 0 : k.abbrev) ?? ((I = (T = n.modelValue) == null ? void 0 : T.unit) == null ? void 0 : I.abbrev);
516
494
  }
517
495
  ), P = C({
518
496
  get() {
519
- var e, n;
520
- return ((n = (e = t.modelValue) == null ? void 0 : e.thresholds) == null ? void 0 : n.low) ?? ue().low;
497
+ var t, e;
498
+ return ((e = (t = n.modelValue) == null ? void 0 : t.thresholds) == null ? void 0 : e.low) ?? ue().low;
521
499
  },
522
- set(e) {
500
+ set(t) {
523
501
  var k;
524
- const n = ((k = t.modelValue) == null ? void 0 : k.thresholds) ?? ue();
525
- n.low = e;
526
- const v = t.modelValue ? {
527
- ...t.modelValue
502
+ const e = ((k = n.modelValue) == null ? void 0 : k.thresholds) ?? ue();
503
+ e.low = t;
504
+ const v = n.modelValue ? {
505
+ ...n.modelValue
528
506
  } : {};
529
- v.thresholds = n, l("update:modelValue", v);
507
+ v.thresholds = e, l("update:modelValue", v);
530
508
  }
531
509
  }), j = C({
532
510
  get() {
533
- var e, n;
534
- return ((n = (e = t.modelValue) == null ? void 0 : e.thresholds) == null ? void 0 : n.mid) ?? ue().mid;
511
+ var t, e;
512
+ return ((e = (t = n.modelValue) == null ? void 0 : t.thresholds) == null ? void 0 : e.mid) ?? ue().mid;
535
513
  },
536
- set(e) {
514
+ set(t) {
537
515
  var k;
538
- const n = ((k = t.modelValue) == null ? void 0 : k.thresholds) ?? ue();
539
- n.mid = e;
540
- const v = t.modelValue ? {
541
- ...t.modelValue
516
+ const e = ((k = n.modelValue) == null ? void 0 : k.thresholds) ?? ue();
517
+ e.mid = t;
518
+ const v = n.modelValue ? {
519
+ ...n.modelValue
542
520
  } : {};
543
- v.thresholds = n, l("update:modelValue", v);
521
+ v.thresholds = e, l("update:modelValue", v);
544
522
  }
545
523
  });
546
524
  function ye() {
547
- return function(n) {
548
- return typeof (n == null ? void 0 : n.low) != "number" || typeof (n == null ? void 0 : n.mid) != "number" ? "Required" : n.low >= n.mid ? "Days for red indicator should be less than yellow indicator." : !0;
525
+ return function(e) {
526
+ return typeof (e == null ? void 0 : e.low) != "number" || typeof (e == null ? void 0 : e.mid) != "number" ? "Required" : e.low >= e.mid ? "Days for red indicator should be less than yellow indicator." : !0;
549
527
  };
550
528
  }
551
- return (e, n) => {
529
+ return (t, e) => {
552
530
  const v = R("FmTextField"), k = R("FmLabel"), T = R("FmField"), I = R("FmMenuHeader"), Y = R("FmMenuDivider"), G = R("FmMenuItem"), ie = R("FmMenu"), ke = R("FmFormGroup"), Ze = R("FmSelect"), Re = R("FmSwitch"), et = R("FmIcon"), Ue = R("FmStepperField"), tt = R("FmForm");
553
531
  return y(), B(tt, {
554
- disabled: e.disabled,
532
+ disabled: t.disabled,
555
533
  ref_key: "formRef",
556
534
  ref: a,
557
535
  class: "grid grid-cols-2 gap-24",
@@ -561,14 +539,14 @@ const sn = /* @__PURE__ */ le({
561
539
  f(v, {
562
540
  label: d(r)("inventory.ingredient.code"),
563
541
  "model-value": h.value,
564
- "onUpdate:modelValue": n[0] || (n[0] = (F) => h.value = F),
542
+ "onUpdate:modelValue": e[0] || (e[0] = (F) => h.value = F),
565
543
  rules: [d(be)(), d(it)(A.value, E.value)],
566
544
  "label-mark": "required"
567
545
  }, null, 8, ["label", "model-value", "rules"]),
568
546
  f(v, {
569
547
  label: d(r)("inventory.ingredient.name"),
570
548
  "model-value": u.value,
571
- "onUpdate:modelValue": n[1] || (n[1] = (F) => u.value = F),
549
+ "onUpdate:modelValue": e[1] || (e[1] = (F) => u.value = F),
572
550
  rules: [d(be)()],
573
551
  "label-mark": "required"
574
552
  }, null, 8, ["label", "model-value", "rules"]),
@@ -590,8 +568,8 @@ const sn = /* @__PURE__ */ le({
590
568
  class: X([
591
569
  "fm-typo-en-body-lg-400",
592
570
  {
593
- "text-fm-color-typo-primary": !e.disabled,
594
- "text-fm-color-typo-disabled": e.disabled
571
+ "text-fm-color-typo-primary": !t.disabled,
572
+ "text-fm-color-typo-disabled": t.disabled
595
573
  }
596
574
  ]),
597
575
  invalid: F,
@@ -623,7 +601,7 @@ const sn = /* @__PURE__ */ le({
623
601
  key: 1,
624
602
  label: q.label,
625
603
  "model-value": w(q),
626
- onClick: (Gn) => M(q.value),
604
+ onClick: (Nn) => M(q.value),
627
605
  "x-should-scroll-into": `${w(q)}`
628
606
  }, null, 8, ["label", "model-value", "onClick", "x-should-scroll-into"]))
629
607
  ], 64))), 128))
@@ -638,7 +616,7 @@ const sn = /* @__PURE__ */ le({
638
616
  key: 0,
639
617
  class: "col-span-1",
640
618
  "model-value": Z.value,
641
- "onUpdate:modelValue": n[2] || (n[2] = (F) => Z.value = F),
619
+ "onUpdate:modelValue": e[2] || (e[2] = (F) => Z.value = F),
642
620
  items: de.value
643
621
  }, {
644
622
  label: $(() => [
@@ -656,7 +634,7 @@ const sn = /* @__PURE__ */ le({
656
634
  d(b).enableTotalCost ? (y(), B(v, {
657
635
  key: 1,
658
636
  "model-value": x.value,
659
- "onUpdate:modelValue": n[3] || (n[3] = (F) => x.value = F),
637
+ "onUpdate:modelValue": e[3] || (e[3] = (F) => x.value = F),
660
638
  rules: [d(_e)(0), d(ut)(4)]
661
639
  }, {
662
640
  label: $(() => [
@@ -683,8 +661,8 @@ const sn = /* @__PURE__ */ le({
683
661
  c("div", Et, [
684
662
  f(It, {
685
663
  "model-value": ee.value,
686
- "onUpdate:modelValue": n[4] || (n[4] = (F) => ee.value = F),
687
- "root-value": e.modelValue
664
+ "onUpdate:modelValue": e[4] || (e[4] = (F) => ee.value = F),
665
+ "root-value": t.modelValue
688
666
  }, null, 8, ["model-value", "root-value"])
689
667
  ]),
690
668
  c("div", Dt, [
@@ -693,7 +671,7 @@ const sn = /* @__PURE__ */ le({
693
671
  label: d(r)("inventory.ingredient.operational.applyOperationalGroup"),
694
672
  sublabel: d(r)("inventory.ingredient.operational.subtitle"),
695
673
  modelValue: J.value,
696
- "onUpdate:modelValue": n[5] || (n[5] = (F) => J.value = F),
674
+ "onUpdate:modelValue": e[5] || (e[5] = (F) => J.value = F),
697
675
  "label-placement": "right"
698
676
  }, null, 8, ["label", "sublabel", "modelValue"])
699
677
  ]),
@@ -703,7 +681,7 @@ const sn = /* @__PURE__ */ le({
703
681
  f(v, {
704
682
  label: d(r)("inventory.ingredient.operational.operationalLabel"),
705
683
  modelValue: V.value,
706
- "onUpdate:modelValue": n[6] || (n[6] = (F) => V.value = F),
684
+ "onUpdate:modelValue": e[6] || (e[6] = (F) => V.value = F),
707
685
  placeholder: d(r)("inventory.ingredient.operational.operationalLabelHint")
708
686
  }, {
709
687
  append: $(() => [
@@ -743,12 +721,12 @@ const sn = /* @__PURE__ */ le({
743
721
  }, null, 8, ["model-value", "rules"])
744
722
  ])) : O("", !0)
745
723
  ]),
746
- e.mode !== d(K).CREATE ? (y(), U("div", Bt, [
724
+ t.mode !== d(K).CREATE ? (y(), U("div", Bt, [
747
725
  c("div", null, [
748
726
  f(Re, {
749
727
  label: d(r)("inventory.ingredient.bindedItems.title"),
750
728
  modelValue: N.value,
751
- "onUpdate:modelValue": n[7] || (n[7] = (F) => N.value = F),
729
+ "onUpdate:modelValue": e[7] || (e[7] = (F) => N.value = F),
752
730
  "label-placement": "right"
753
731
  }, null, 8, ["label", "modelValue"])
754
732
  ]),
@@ -795,48 +773,70 @@ const sn = /* @__PURE__ */ le({
795
773
  c("div", Wt, L(d(r)("inventory.ingredient.threshold.whenRemaining")), 1),
796
774
  f(Ue, {
797
775
  modelValue: P.value,
798
- "onUpdate:modelValue": n[8] || (n[8] = (F) => P.value = F),
776
+ "onUpdate:modelValue": e[8] || (e[8] = (F) => P.value = F),
799
777
  rules: [d(_e)(0)]
800
778
  }, {
801
- append: $(() => [
802
- Kt
803
- ]),
779
+ append: $(() => e[10] || (e[10] = [
780
+ c("div", {
781
+ class: "text-fm-color-typo-secondary",
782
+ style: { "padding-right": "32px" }
783
+ }, "days", -1)
784
+ ])),
804
785
  _: 1
805
786
  }, 8, ["modelValue", "rules"])
806
787
  ])
807
788
  ]),
808
- Jt,
809
- c("div", Qt, [
810
- c("div", Xt, [
789
+ e[12] || (e[12] = c("div", {
790
+ class: "h-full bg-fm-color-neutral-gray-200 relative",
791
+ style: { width: "1px" }
792
+ }, [
793
+ c("div", {
794
+ class: "absolute bg-white",
795
+ style: { transform: "translate(-50%, -50%)", left: "50%", top: "20%" }
796
+ }, " < ")
797
+ ], -1)),
798
+ c("div", Kt, [
799
+ c("div", Jt, [
811
800
  f(Fe, {
812
801
  days: j.value,
813
802
  level: d(Se).mid
814
803
  }, null, 8, ["days", "level"])
815
804
  ]),
816
- c("div", Zt, [
817
- c("div", en, L(d(r)("inventory.ingredient.threshold.whenRemaining")), 1),
805
+ c("div", Qt, [
806
+ c("div", Xt, L(d(r)("inventory.ingredient.threshold.whenRemaining")), 1),
818
807
  f(Ue, {
819
808
  modelValue: j.value,
820
- "onUpdate:modelValue": n[9] || (n[9] = (F) => j.value = F),
809
+ "onUpdate:modelValue": e[9] || (e[9] = (F) => j.value = F),
821
810
  rules: [d(_e)(0)]
822
811
  }, {
823
- append: $(() => [
824
- tn
825
- ]),
812
+ append: $(() => e[11] || (e[11] = [
813
+ c("div", {
814
+ class: "text-fm-color-typo-secondary",
815
+ style: { "padding-right": "32px" }
816
+ }, "days", -1)
817
+ ])),
826
818
  _: 1
827
819
  }, 8, ["modelValue", "rules"])
828
820
  ])
829
821
  ]),
830
- nn,
831
- c("div", on, [
832
- c("div", ln, [
822
+ e[13] || (e[13] = c("div", {
823
+ class: "h-full bg-fm-color-neutral-gray-200 relative",
824
+ style: { width: "1px" }
825
+ }, [
826
+ c("div", {
827
+ class: "absolute bg-white",
828
+ style: { transform: "translate(-50%, -50%)", left: "50%", top: "20%" }
829
+ }, " < ")
830
+ ], -1)),
831
+ c("div", Zt, [
832
+ c("div", en, [
833
833
  f(Fe, {
834
834
  days: j.value + 1,
835
835
  level: d(Se).high
836
836
  }, null, 8, ["days", "level"])
837
837
  ]),
838
- c("div", an, [
839
- c("div", rn, L(d(r)("inventory.ingredient.threshold.stockIsStaple")), 1)
838
+ c("div", tn, [
839
+ c("div", nn, L(d(r)("inventory.ingredient.threshold.stockIsStaple")), 1)
840
840
  ])
841
841
  ])
842
842
  ])
@@ -847,7 +847,7 @@ const sn = /* @__PURE__ */ le({
847
847
  }, 8, ["disabled"]);
848
848
  };
849
849
  }
850
- }), un = { class: "flex gap-4" }, dn = /* @__PURE__ */ le({
850
+ }), ln = { class: "flex gap-4" }, an = /* @__PURE__ */ le({
851
851
  __name: "IngredientDialog",
852
852
  props: {
853
853
  show: { type: Boolean },
@@ -856,14 +856,14 @@ const sn = /* @__PURE__ */ le({
856
856
  },
857
857
  emits: ["update:show"],
858
858
  setup(s) {
859
- const i = s, m = ae(), r = Ve(), { t } = re(), l = Pe(i, "show"), o = Pe(i, "unit"), p = C(() => {
859
+ const i = s, m = ae(), r = Ve(), { t: n } = re(), l = Pe(i, "show"), o = Pe(i, "unit"), p = C(() => {
860
860
  switch (i.mode) {
861
861
  case K.READ:
862
862
  return "";
863
863
  case K.UPDATE:
864
- return t("inventory.ingredient.update.title");
864
+ return n("inventory.ingredient.update.title");
865
865
  case K.CREATE:
866
- return t("inventory.ingredient.create.title");
866
+ return n("inventory.ingredient.create.title");
867
867
  }
868
868
  return "";
869
869
  }), b = C(() => {
@@ -871,9 +871,9 @@ const sn = /* @__PURE__ */ le({
871
871
  case K.READ:
872
872
  return "";
873
873
  case K.UPDATE:
874
- return t("common.save");
874
+ return n("common.save");
875
875
  case K.CREATE:
876
- return t("common.add");
876
+ return n("common.add");
877
877
  }
878
878
  return "";
879
879
  }), _ = z(), g = z(!1);
@@ -881,14 +881,14 @@ const sn = /* @__PURE__ */ le({
881
881
  g.value = !0;
882
882
  try {
883
883
  await m.createSku(o.value), l.value = !1, r.open({
884
- title: t("common.success"),
885
- message: t("inventory.ingredient.create.success", { name: o.value.name }),
884
+ title: n("common.success"),
885
+ message: n("inventory.ingredient.create.success", { name: o.value.name }),
886
886
  type: "success"
887
887
  });
888
888
  } catch (S) {
889
889
  S instanceof Te || r.open({
890
- title: t("inventory.ingredient.create.error.title"),
891
- message: t("inventory.ingredient.create.error.message"),
890
+ title: n("inventory.ingredient.create.error.title"),
891
+ message: n("inventory.ingredient.create.error.message"),
892
892
  type: "error"
893
893
  });
894
894
  } finally {
@@ -899,14 +899,14 @@ const sn = /* @__PURE__ */ le({
899
899
  g.value = !0;
900
900
  try {
901
901
  await m.updateSku(o.value), g.value = !1, l.value = !1, r.open({
902
- title: t("common.success"),
903
- message: t("inventory.ingredient.update.success", { name: o.value.name }),
902
+ title: n("common.success"),
903
+ message: n("inventory.ingredient.update.success", { name: o.value.name }),
904
904
  type: "success"
905
905
  });
906
906
  } catch (S) {
907
907
  S instanceof Te || r.open({
908
- title: t("inventory.ingredient.update.error.title"),
909
- message: t("inventory.ingredient.update.error.message"),
908
+ title: n("inventory.ingredient.update.error.title"),
909
+ message: n("inventory.ingredient.update.error.message"),
910
910
  type: "error"
911
911
  });
912
912
  } finally {
@@ -938,7 +938,7 @@ const sn = /* @__PURE__ */ le({
938
938
  "max-width": 500
939
939
  }, {
940
940
  "side-sheet-footer": $(() => [
941
- c("div", un, [
941
+ c("div", ln, [
942
942
  f(M, {
943
943
  loading: g.value,
944
944
  label: b.value,
@@ -946,14 +946,14 @@ const sn = /* @__PURE__ */ le({
946
946
  }, null, 8, ["loading", "label"]),
947
947
  f(M, {
948
948
  disabled: g.value,
949
- label: d(t)("common.close"),
949
+ label: d(n)("common.close"),
950
950
  variant: "tertiary",
951
951
  onClick: w[2] || (w[2] = (H) => l.value = !1)
952
952
  }, null, 8, ["disabled", "label"])
953
953
  ])
954
954
  ]),
955
955
  default: $(() => [
956
- f(sn, {
956
+ f(on, {
957
957
  class: "w-full",
958
958
  ref_key: "hasValidationExpose",
959
959
  ref: _,
@@ -969,38 +969,38 @@ const sn = /* @__PURE__ */ le({
969
969
  };
970
970
  }
971
971
  });
972
- function* cn(s) {
972
+ function* rn(s) {
973
973
  for (; ; )
974
974
  yield s[Math.floor(Math.random() * s.length)];
975
975
  }
976
- function mn(s = 4, i = cn("qwertyuiopasdfghjklzxcvbnm".split(""))) {
976
+ function sn(s = 4, i = rn("qwertyuiopasdfghjklzxcvbnm".split(""))) {
977
977
  return Array.from({ length: s }).map(() => i.next().value).join("");
978
978
  }
979
- function pn() {
980
- return `sku_${(/* @__PURE__ */ new Date()).toISOString()}_${mn()}`;
979
+ function un() {
980
+ return `sku_${(/* @__PURE__ */ new Date()).toISOString()}_${sn()}`;
981
981
  }
982
- const vn = {
982
+ const dn = {
983
983
  _id: "",
984
984
  name: "",
985
985
  abbrev: "",
986
986
  precision: 0,
987
987
  measurements: []
988
988
  };
989
- function fn(s) {
990
- var m, r, t, l, o;
989
+ function cn(s) {
990
+ var m, r, n, l, o;
991
991
  return {
992
992
  code: s.code,
993
993
  name: s.name,
994
994
  unit: ((m = s.unit.measurements.find((p) => p.id === s.trackingMeasurement)) == null ? void 0 : m.abbrev) ?? s.unit.abbrev,
995
995
  baseUnit: s.unit.abbrev,
996
996
  valuationMethod: s.valuation ?? "WAVG",
997
- pricePerUnit: (r = s.defaultCost) != null && r.costPerUnit ? +Ge((t = s.defaultCost) == null ? void 0 : t.costPerUnit) : 0,
997
+ pricePerUnit: (r = s.defaultCost) != null && r.costPerUnit ? +Ge((n = s.defaultCost) == null ? void 0 : n.costPerUnit) : 0,
998
998
  thresholdLow: ((l = s.thresholds) == null ? void 0 : l.low) ?? ue().low,
999
999
  thresholdMid: ((o = s.thresholds) == null ? void 0 : o.mid) ?? ue().mid
1000
1000
  };
1001
1001
  }
1002
1002
  function Xe() {
1003
- var t;
1003
+ var n;
1004
1004
  const s = [
1005
1005
  {
1006
1006
  id: "code",
@@ -1028,7 +1028,7 @@ function Xe() {
1028
1028
  id: "pricePerUnit",
1029
1029
  name: `Price per unit (${r == null ? void 0 : r.currency})`
1030
1030
  }
1031
- ), ((t = m.currentBusiness.value) == null ? void 0 : t.menuVersion) === "v4" && s.push(
1031
+ ), ((n = m.currentBusiness.value) == null ? void 0 : n.menuVersion) === "v4" && s.push(
1032
1032
  {
1033
1033
  id: "thresholdLow",
1034
1034
  name: "Show RED when remaining"
@@ -1039,33 +1039,33 @@ function Xe() {
1039
1039
  }
1040
1040
  ), s;
1041
1041
  }
1042
- function yn() {
1043
- const i = ae().skus.map(fn), r = fe().currentBusiness.value, t = Xe(), l = [
1042
+ function mn() {
1043
+ const i = ae().skus.map(cn), r = fe().currentBusiness.value, n = Xe(), l = [
1044
1044
  ["Business name:", r == null ? void 0 : r.name],
1045
1045
  ["Business ID:", r == null ? void 0 : r._id],
1046
1046
  ["Menu version", r == null ? void 0 : r.menuVersion],
1047
1047
  [],
1048
- t.map((_) => _.name),
1049
- ...i.map((_) => t.map((g) => _[g.id]))
1050
- ], o = t.map((_) => `system:${_.id}`), p = Je(l, o), b = `${r == null ? void 0 : r.name} ingredients (${dt(/* @__PURE__ */ new Date())}).xlsx`;
1048
+ n.map((_) => _.name),
1049
+ ...i.map((_) => n.map((g) => _[g.id]))
1050
+ ], o = n.map((_) => `system:${_.id}`), p = Je(l, o), b = `${r == null ? void 0 : r.name} ingredients (${dt(/* @__PURE__ */ new Date())}).xlsx`;
1051
1051
  return Qe(p, b), b;
1052
1052
  }
1053
- function gn() {
1053
+ function pn() {
1054
1054
  const i = fe().currentBusiness.value, m = Xe(), r = [
1055
1055
  ["Business name:", i == null ? void 0 : i.name],
1056
1056
  ["Business ID:", i == null ? void 0 : i._id],
1057
1057
  ["Menu version", i == null ? void 0 : i.menuVersion],
1058
1058
  [],
1059
1059
  m.map((p) => p.name)
1060
- ], t = m.map((p) => `system:${p.id}`), l = Je(r, t), o = "FeedMe ingredients template.xlsx";
1060
+ ], n = m.map((p) => `system:${p.id}`), l = Je(r, n), o = "FeedMe ingredients template.xlsx";
1061
1061
  return Qe(l, o), o;
1062
1062
  }
1063
- function bn(s) {
1063
+ function vn(s) {
1064
1064
  const [
1065
1065
  i,
1066
1066
  m,
1067
1067
  r,
1068
- t,
1068
+ n,
1069
1069
  l,
1070
1070
  o,
1071
1071
  ...p
@@ -1091,11 +1091,11 @@ function bn(s) {
1091
1091
  }
1092
1092
  function Le(s, i, m) {
1093
1093
  var M;
1094
- const t = ae().units, l = new Array(), o = m.filter((V) => V.data.code === s.code);
1094
+ const n = ae().units, l = new Array(), o = m.filter((V) => V.data.code === s.code);
1095
1095
  o.length > 1 && l.push(
1096
1096
  `Code ${s.code} is already used in row ${o.map((V) => V.index + 6).join()}.`
1097
1097
  );
1098
- const p = t.find((V) => V.abbrev === s.baseUnit), b = p == null ? void 0 : p.measurements.find((V) => V.abbrev === s.unit);
1098
+ const p = n.find((V) => V.abbrev === s.baseUnit), b = p == null ? void 0 : p.measurements.find((V) => V.abbrev === s.unit);
1099
1099
  if (!p)
1100
1100
  l.push(`Cannot find base unit of symbol ${s.baseUnit}.`);
1101
1101
  else if (s.baseUnit !== s.unit && !b) {
@@ -1121,10 +1121,10 @@ function Le(s, i, m) {
1121
1121
  return {
1122
1122
  type: "create",
1123
1123
  sku: {
1124
- _id: pn(),
1124
+ _id: un(),
1125
1125
  code: s.code,
1126
1126
  name: s.name,
1127
- unit: p ?? t.find((V) => V) ?? vn,
1127
+ unit: p ?? n.find((V) => V) ?? dn,
1128
1128
  trackingMeasurement: b == null ? void 0 : b.id,
1129
1129
  valuation: _,
1130
1130
  defaultCost: x,
@@ -1134,12 +1134,12 @@ function Le(s, i, m) {
1134
1134
  excelRowNumber: i + 6
1135
1135
  };
1136
1136
  }
1137
- function hn(s) {
1137
+ function fn(s) {
1138
1138
  try {
1139
- const i = bn(s).filter((_) => _.data.code), r = ae().skus, t = ct(r, "code"), l = i.filter((_) => !t[_.data.code]), o = i.filter((_) => t[_.data.code]), p = l.map(
1139
+ const i = vn(s).filter((_) => _.data.code), r = ae().skus, n = ct(r, "code"), l = i.filter((_) => !n[_.data.code]), o = i.filter((_) => n[_.data.code]), p = l.map(
1140
1140
  (_) => Le(_.data, _.index, i)
1141
1141
  ), b = o.map((_) => {
1142
- const g = Le(_.data, _.index, i), h = t[_.data.code];
1142
+ const g = Le(_.data, _.index, i), h = n[_.data.code];
1143
1143
  return {
1144
1144
  ...g,
1145
1145
  type: "update",
@@ -1171,10 +1171,10 @@ function hn(s) {
1171
1171
  };
1172
1172
  }
1173
1173
  }
1174
- const _n = {
1174
+ const yn = {
1175
1175
  key: 0,
1176
1176
  class: "relative"
1177
- }, xn = ["accept", "disabled"], Vn = { class: "flex flex-col gap-8" }, kn = ["accept", "disabled"], Cn = /* @__PURE__ */ le({
1177
+ }, gn = ["accept", "disabled"], bn = { class: "flex flex-col gap-8" }, hn = ["accept", "disabled"], _n = /* @__PURE__ */ le({
1178
1178
  __name: "FmDroppableField",
1179
1179
  props: {
1180
1180
  buttonLabel: {},
@@ -1186,15 +1186,15 @@ const _n = {
1186
1186
  },
1187
1187
  emits: ["file-upload", "file-rejected"],
1188
1188
  setup(s, { emit: i }) {
1189
- const m = s, r = i, t = z(!1), l = z(null), o = z(null), p = z(), b = (a) => {
1189
+ const m = s, r = i, n = z(!1), l = z(null), o = z(null), p = z(), b = (a) => {
1190
1190
  m.disabled || (a.stopPropagation(), a.preventDefault());
1191
1191
  }, _ = (a) => {
1192
- m.disabled || (a.stopPropagation(), a.preventDefault(), t.value = !0);
1192
+ m.disabled || (a.stopPropagation(), a.preventDefault(), n.value = !0);
1193
1193
  }, g = (a) => {
1194
- m.disabled || (a.stopPropagation(), a.preventDefault(), t.value = !1);
1194
+ m.disabled || (a.stopPropagation(), a.preventDefault(), n.value = !1);
1195
1195
  }, h = (a) => {
1196
1196
  var N;
1197
- m.disabled || (a.stopPropagation(), a.preventDefault(), t.value = !1, u((N = a.dataTransfer) == null ? void 0 : N.files));
1197
+ m.disabled || (a.stopPropagation(), a.preventDefault(), n.value = !1, u((N = a.dataTransfer) == null ? void 0 : N.files));
1198
1198
  };
1199
1199
  function u(a) {
1200
1200
  if (a)
@@ -1222,7 +1222,7 @@ const _n = {
1222
1222
  } else if (M(a) === W || a.type === W) return !0;
1223
1223
  return !1;
1224
1224
  }, S = (a) => a.size <= m.maxFileSize, w = (a) => a.indexOf("*") !== -1, M = (a) => "." + a.name.split(".").pop(), V = (a) => a.substring(0, a.indexOf("/")), H = C(() => {
1225
- if (t.value) return "Drop file to upload";
1225
+ if (n.value) return "Drop file to upload";
1226
1226
  if (l.value) {
1227
1227
  if (!o.value) return `File size exceeds ${m.maxFileSize * 1e-6}mb`;
1228
1228
  } else return "File type is not valid";
@@ -1241,17 +1241,17 @@ const _n = {
1241
1241
  ref_key: "fmButtonRef",
1242
1242
  ref: Z
1243
1243
  }, [
1244
- a.$slots.default ? (y(), U("div", _n, [
1244
+ a.$slots.default ? (y(), U("div", yn, [
1245
1245
  c("input", {
1246
1246
  accept: a.accept,
1247
1247
  disabled: a.disabled,
1248
1248
  class: "fm-droppable-field__input",
1249
1249
  type: "file",
1250
1250
  onChange: ee
1251
- }, null, 40, xn)
1251
+ }, null, 40, gn)
1252
1252
  ])) : O("", !0),
1253
1253
  ge(a.$slots, "default", {
1254
- isDragging: t.value,
1254
+ isDragging: n.value,
1255
1255
  isValidFileType: l.value,
1256
1256
  isValidFileSize: o.value,
1257
1257
  singleValidFile: de.value,
@@ -1260,7 +1260,7 @@ const _n = {
1260
1260
  return console.log("click", Z.value), (te = Z.value) == null ? void 0 : te.click();
1261
1261
  }
1262
1262
  }, () => [
1263
- c("div", Vn, [
1263
+ c("div", bn, [
1264
1264
  a.$slots.label ? ge(a.$slots, "label", { key: 0 }, void 0, !0) : (y(), B(W, {
1265
1265
  key: 1,
1266
1266
  label: a.label
@@ -1270,7 +1270,7 @@ const _n = {
1270
1270
  class: X([[
1271
1271
  a.contentClass ? a.contentClass : "w-full h-full",
1272
1272
  {
1273
- "fm-droppable-field__container--dragging": t.value,
1273
+ "fm-droppable-field__container--dragging": n.value,
1274
1274
  "fm-droppable-field__container--invalid": J.value && !a.disabled,
1275
1275
  "fm-droppable-field__container--disabled": a.disabled
1276
1276
  }
@@ -1280,11 +1280,11 @@ const _n = {
1280
1280
  onDragover: _,
1281
1281
  onDrop: h
1282
1282
  }, [
1283
- (t.value || J.value) && !a.disabled ? (y(), U("div", {
1283
+ (n.value || J.value) && !a.disabled ? (y(), U("div", {
1284
1284
  key: 0,
1285
1285
  class: X({
1286
1286
  "fm-typo-en-body-lg-600": !0,
1287
- "text-fm-color-primary": t.value,
1287
+ "text-fm-color-primary": n.value,
1288
1288
  "text-fm-color-typo-error": J.value
1289
1289
  })
1290
1290
  }, L(H.value), 3)) : (y(), B(se, {
@@ -1306,7 +1306,7 @@ const _n = {
1306
1306
  class: "fm-droppable-field__input",
1307
1307
  type: "file",
1308
1308
  onChange: ee
1309
- }, null, 40, kn)
1309
+ }, null, 40, hn)
1310
1310
  ], 34),
1311
1311
  ge(a.$slots, "helper-text", {}, () => [
1312
1312
  c("div", {
@@ -1317,10 +1317,10 @@ const _n = {
1317
1317
  ], 512);
1318
1318
  };
1319
1319
  }
1320
- }), Fn = /* @__PURE__ */ pt(Cn, [["__scopeId", "data-v-311b22a0"]]), Sn = { class: "flex items-center gap-12 pl-8" }, wn = /* @__PURE__ */ c("div", null, "•", -1), Mn = { class: "flex flex-col" }, $n = { class: "fm-typo-en-body-md-400 text-fm-color-typo-primary flex items-center gap-4" }, In = {
1320
+ }), xn = /* @__PURE__ */ pt(_n, [["__scopeId", "data-v-311b22a0"]]), Vn = { class: "flex items-center gap-12 pl-8" }, kn = { class: "flex flex-col" }, Cn = { class: "fm-typo-en-body-md-400 text-fm-color-typo-primary flex items-center gap-4" }, Fn = {
1321
1321
  key: 0,
1322
1322
  class: "text-fm-color-typo-secondary fm-typo-en-body-sm-400"
1323
- }, Rn = { key: 0 }, Ne = /* @__PURE__ */ le({
1323
+ }, Sn = { key: 0 }, Ne = /* @__PURE__ */ le({
1324
1324
  __name: "ImportIngredientItem",
1325
1325
  props: {
1326
1326
  type: {},
@@ -1330,21 +1330,21 @@ const _n = {
1330
1330
  },
1331
1331
  setup(s) {
1332
1332
  return (i, m) => {
1333
- const r = R("FmIcon"), t = R("FmTooltip");
1334
- return y(), U("div", Sn, [
1335
- wn,
1336
- c("div", Mn, [
1337
- c("div", $n, [
1333
+ const r = R("FmIcon"), n = R("FmTooltip");
1334
+ return y(), U("div", Vn, [
1335
+ m[0] || (m[0] = c("div", null, "•", -1)),
1336
+ c("div", kn, [
1337
+ c("div", Cn, [
1338
1338
  c("div", {
1339
1339
  class: X({
1340
1340
  "text-fm-color-system-error-300": i.errors.length
1341
1341
  })
1342
1342
  }, [
1343
1343
  He(L(i.name) + " ", 1),
1344
- i.type === "create" ? (y(), U("span", In, "(new)")) : O("", !0)
1344
+ i.type === "create" ? (y(), U("span", Fn, "(new)")) : O("", !0)
1345
1345
  ], 2),
1346
- i.errors.length ? (y(), U("div", Rn, [
1347
- f(t, { "z-index": 50 }, {
1346
+ i.errors.length ? (y(), U("div", Sn, [
1347
+ f(n, { "z-index": 50 }, {
1348
1348
  content: $(() => [
1349
1349
  c("ol", null, [
1350
1350
  (y(!0), U(Q, null, oe(i.errors, (l, o) => (y(), U("li", { key: o }, L(l), 1))), 128))
@@ -1374,19 +1374,19 @@ const _n = {
1374
1374
  ]);
1375
1375
  };
1376
1376
  }
1377
- }), Un = { class: "flex flex-col gap-24" }, En = { class: "fm-typo-en-body-md-400" }, Dn = { class: "flex flex-col gap-8" }, An = { class: "line-clamp-2 text-ellipsis break-all" }, Tn = {
1377
+ }), wn = { class: "flex flex-col gap-24" }, Mn = { class: "fm-typo-en-body-md-400" }, $n = { class: "flex flex-col gap-8" }, In = { class: "line-clamp-2 text-ellipsis break-all" }, Rn = {
1378
1378
  key: 2,
1379
1379
  class: "shrink-0"
1380
- }, Pn = {
1380
+ }, Un = {
1381
1381
  key: 0,
1382
1382
  class: "flex flex-col"
1383
- }, Bn = { class: "text-fm-color-system-error-300 fm-typo-en-body-sm-400" }, zn = {
1383
+ }, En = { class: "text-fm-color-system-error-300 fm-typo-en-body-sm-400" }, Dn = {
1384
1384
  key: 0,
1385
1385
  class: "max-h-[200px] overflow-y-auto flex flex-col gap-8"
1386
- }, Ln = { class: "fm-typo-en-body-lg-600" }, Nn = /* @__PURE__ */ le({
1386
+ }, An = { class: "fm-typo-en-body-lg-600" }, Tn = /* @__PURE__ */ le({
1387
1387
  __name: "ImportIngredients",
1388
1388
  setup(s) {
1389
- const i = z(null), m = ft(), r = Ve(), t = z(!1), l = z(new Array()), o = z([]), p = z([]), b = C(
1389
+ const i = z(null), m = ft(), r = Ve(), n = z(!1), l = z(new Array()), o = z([]), p = z([]), b = C(
1390
1390
  () => !!l.value.length || o.value.some((u) => u.errors.length) || p.value.some((u) => u.errors.length)
1391
1391
  ), _ = C(
1392
1392
  () => !!o.value.length || !!p.value.length
@@ -1394,7 +1394,7 @@ const _n = {
1394
1394
  async function h(u) {
1395
1395
  l.value = [], o.value = [], p.value = [];
1396
1396
  try {
1397
- t.value = !0;
1397
+ n.value = !0;
1398
1398
  const [x] = await Promise.all([
1399
1399
  Mt(u),
1400
1400
  // fake buffer
@@ -1404,7 +1404,7 @@ const _n = {
1404
1404
  l.value.push(g("inventory.ingredient.import.fileError.noSheet"));
1405
1405
  return;
1406
1406
  }
1407
- const S = hn(x.Sheets[D]);
1407
+ const S = fn(x.Sheets[D]);
1408
1408
  if (S.invalidExcel) {
1409
1409
  l.value.push(S.invalidExcelMessage ?? g("inventory.ingredient.import.fileError.invalidExcel"));
1410
1410
  return;
@@ -1424,16 +1424,16 @@ const _n = {
1424
1424
  l.value.length && r.open({
1425
1425
  title: g("inventory.ingredient.import.fileError.invalidExcel"),
1426
1426
  type: "error"
1427
- }), t.value = !1;
1427
+ }), n.value = !1;
1428
1428
  }
1429
1429
  }
1430
1430
  return je(i, (u) => {
1431
1431
  u && h(u);
1432
1432
  }), (u, x) => {
1433
1433
  const D = R("FmCircularProgress"), S = R("FmIcon"), w = R("FmButton");
1434
- return y(), U("div", Un, [
1435
- c("div", En, L(d(g)("inventory.ingredient.import.uploadDescription")), 1),
1436
- f(Fn, {
1434
+ return y(), U("div", wn, [
1435
+ c("div", Mn, L(d(g)("inventory.ingredient.import.uploadDescription")), 1),
1436
+ f(xn, {
1437
1437
  class: X({
1438
1438
  "w-full": !0,
1439
1439
  "h-[200px]": !i.value
@@ -1446,18 +1446,18 @@ const _n = {
1446
1446
  i.value ? {
1447
1447
  name: "default",
1448
1448
  fn: $(({ openFileDialog: M }) => [
1449
- c("div", Dn, [
1449
+ c("div", $n, [
1450
1450
  c("div", {
1451
1451
  class: X([
1452
1452
  "fm-corner-radius-md p-16 flex items-center gap-16",
1453
1453
  {
1454
- "border border-fm-color-neutral-gray-100": t.value,
1455
- "border border-fm-color-neutral-gray-200": !t.value && !b.value,
1454
+ "border border-fm-color-neutral-gray-100": n.value,
1455
+ "border border-fm-color-neutral-gray-200": !n.value && !b.value,
1456
1456
  "border border-fm-color-system-error-200": b.value
1457
1457
  }
1458
1458
  ])
1459
1459
  }, [
1460
- t.value ? (y(), B(D, {
1460
+ n.value ? (y(), B(D, {
1461
1461
  key: 0,
1462
1462
  size: "md",
1463
1463
  color: "neutral-gray-200"
@@ -1471,14 +1471,14 @@ const _n = {
1471
1471
  class: X([
1472
1472
  "fm-typo-en-body-md-400 flex-1 h-[36px] flex items-center",
1473
1473
  {
1474
- "text-fm-color-typo-disabled": t.value,
1475
- "text-fm-color-typo-primary": !t.value
1474
+ "text-fm-color-typo-disabled": n.value,
1475
+ "text-fm-color-typo-primary": !n.value
1476
1476
  }
1477
1477
  ])
1478
1478
  }, [
1479
- c("div", An, L(i.value.name), 1)
1479
+ c("div", In, L(i.value.name), 1)
1480
1480
  ], 2),
1481
- t.value ? O("", !0) : (y(), U("div", Tn, [
1481
+ n.value ? O("", !0) : (y(), U("div", Rn, [
1482
1482
  f(w, {
1483
1483
  label: d(g)("inventory.ingredient.import.replaceFile"),
1484
1484
  variant: b.value ? "destructive" : "secondary",
@@ -1487,7 +1487,7 @@ const _n = {
1487
1487
  }, null, 8, ["label", "variant", "prepend-icon", "onClick"])
1488
1488
  ]))
1489
1489
  ], 2),
1490
- l.value.length ? (y(), U("div", Pn, [
1490
+ l.value.length ? (y(), U("div", Un, [
1491
1491
  (y(!0), U(Q, null, oe(l.value, (V, H) => (y(), U("div", {
1492
1492
  key: H,
1493
1493
  class: "flex gap-8 items-center"
@@ -1497,7 +1497,7 @@ const _n = {
1497
1497
  size: "sm",
1498
1498
  color: "system-error-300"
1499
1499
  }),
1500
- c("div", Bn, L(V), 1)
1500
+ c("div", En, L(V), 1)
1501
1501
  ]))), 128))
1502
1502
  ])) : O("", !0)
1503
1503
  ])
@@ -1505,8 +1505,8 @@ const _n = {
1505
1505
  key: "0"
1506
1506
  } : void 0
1507
1507
  ]), 1032, ["class", "label", "button-label"]),
1508
- _.value ? (y(), U("div", zn, [
1509
- c("div", Ln, L(d(g)("inventory.ingredient.import.summary")), 1),
1508
+ _.value ? (y(), U("div", Dn, [
1509
+ c("div", An, L(d(g)("inventory.ingredient.import.summary")), 1),
1510
1510
  (y(!0), U(Q, null, oe(o.value, (M) => (y(), B(Ne, {
1511
1511
  key: M.sku._id,
1512
1512
  code: M.sku.code,
@@ -1525,10 +1525,10 @@ const _n = {
1525
1525
  ]);
1526
1526
  };
1527
1527
  }
1528
- }), jn = { class: "px-24 xs:p-0 sm:p-0 flex flex-col gap-8 max-h-full" }, Hn = { class: "flex flex-col py-8" }, On = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Yn = { class: "fm-typo-en-body-lg-600 text-fm-color-typo-primary" }, ro = /* @__PURE__ */ le({
1528
+ }), Pn = { class: "px-24 xs:p-0 sm:p-0 flex flex-col gap-8 max-h-full" }, Bn = { class: "flex flex-col py-8" }, zn = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Ln = { class: "fm-typo-en-body-lg-600 text-fm-color-typo-primary" }, to = /* @__PURE__ */ le({
1529
1529
  __name: "IngredientsView",
1530
1530
  setup(s) {
1531
- const i = ae(), m = C(() => i.skus), r = vt(), t = Ke(), l = Ve(), { t: o } = re(), { createIngredient: p, updateIngredient: b } = $e(), { ingredientDialogProps: _, ingredientViewLoading: g } = _t($e()), { columnDefs: h } = $t();
1531
+ const i = ae(), m = C(() => i.skus), r = vt(), n = Ke(), l = Ve(), { t: o } = re(), { createIngredient: p, updateIngredient: b } = $e(), { ingredientDialogProps: _, ingredientViewLoading: g } = _t($e()), { columnDefs: h } = $t();
1532
1532
  function u(A) {
1533
1533
  switch (A) {
1534
1534
  case "add":
@@ -1567,7 +1567,7 @@ const _n = {
1567
1567
  return M.value ? A : [...A, { label: o("inventory.ingredient.import.title"), value: "import" }];
1568
1568
  });
1569
1569
  function N() {
1570
- const A = yn();
1570
+ const A = mn();
1571
1571
  l.open({
1572
1572
  title: o("inventory.ingredient.export.success"),
1573
1573
  message: o("inventory.ingredient.export.filename", [A]),
@@ -1575,9 +1575,9 @@ const _n = {
1575
1575
  });
1576
1576
  }
1577
1577
  function W() {
1578
- t.open({
1578
+ n.open({
1579
1579
  title: o("inventory.ingredient.import.title"),
1580
- contentComponent: Nn,
1580
+ contentComponent: Tn,
1581
1581
  overlay: !0,
1582
1582
  closeButton: !0,
1583
1583
  primaryActions: {
@@ -1617,8 +1617,8 @@ const _n = {
1617
1617
  });
1618
1618
  return;
1619
1619
  }
1620
- t.close(), se(A);
1621
- }).onTertiary(gn);
1620
+ n.close(), se(A);
1621
+ }).onTertiary(pn);
1622
1622
  }
1623
1623
  async function se(A) {
1624
1624
  D.value = !0;
@@ -1666,7 +1666,7 @@ const _n = {
1666
1666
  "onClick:action": u
1667
1667
  }, {
1668
1668
  default: $(() => [
1669
- c("div", jn, [
1669
+ c("div", Pn, [
1670
1670
  f(Ft, {
1671
1671
  searchable: "",
1672
1672
  search: x.value,
@@ -1689,16 +1689,16 @@ const _n = {
1689
1689
  onRowClick: d(b)
1690
1690
  }, Oe({
1691
1691
  default: $((j) => {
1692
- var ye, pe, e, n, v, k, T, I, Y, G;
1692
+ var ye, pe, t, e, v, k, T, I, Y, G;
1693
1693
  return [
1694
- c("div", Hn, [
1695
- c("div", On, [
1694
+ c("div", Bn, [
1695
+ c("div", zn, [
1696
1696
  f(d(ze), {
1697
- render: (e = (pe = (ye = j.code) == null ? void 0 : ye.column) == null ? void 0 : pe.columnDef) == null ? void 0 : e.cell,
1698
- props: (v = (n = j.code) == null ? void 0 : n.getContext) == null ? void 0 : v.call(n)
1697
+ render: (t = (pe = (ye = j.code) == null ? void 0 : ye.column) == null ? void 0 : pe.columnDef) == null ? void 0 : t.cell,
1698
+ props: (v = (e = j.code) == null ? void 0 : e.getContext) == null ? void 0 : v.call(e)
1699
1699
  }, null, 8, ["render", "props"])
1700
1700
  ]),
1701
- c("div", Yn, [
1701
+ c("div", Ln, [
1702
1702
  f(d(ze), {
1703
1703
  render: (I = (T = (k = j.name) == null ? void 0 : k.column) == null ? void 0 : T.columnDef) == null ? void 0 : I.cell,
1704
1704
  props: (G = (Y = j.name) == null ? void 0 : Y.getContext) == null ? void 0 : G.call(Y)
@@ -1722,7 +1722,7 @@ const _n = {
1722
1722
  }, 8, ["style", "column-defs", "row-data", "search-value", "loading", "page-size"])
1723
1723
  ]),
1724
1724
  (y(), B(De, { to: "body" }, [
1725
- f(dn, lt(at(d(_))), null, 16)
1725
+ f(an, lt(at(d(_))), null, 16)
1726
1726
  ])),
1727
1727
  (y(), B(De, { to: "body" }, [
1728
1728
  f(me, {
@@ -1747,5 +1747,5 @@ const _n = {
1747
1747
  }
1748
1748
  });
1749
1749
  export {
1750
- ro as default
1750
+ to as default
1751
1751
  };