@feedmepos/mf-inventory-portal 0.0.23-dev.4 → 0.0.23-dev.40

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 (136) hide show
  1. package/dist/{App-DReDvY0M.js → App-D8DXxTIq.js} +84 -72
  2. package/dist/{ApprovalView-BMZlYmRk.js → ApprovalView-BWGXkHV6.js} +25 -28
  3. package/dist/{BindingsDialog-Y2K4I7H7.js → BindingsDialog-D7WypDot.js} +6 -6
  4. package/dist/{BindingsPicker-DKBq9c37.js → BindingsPicker-DUlGwkwM.js} +8 -9
  5. package/dist/{BindingsTable-45v4SDfp.js → BindingsTable-BjeZYCaJ.js} +18 -22
  6. package/dist/ClosingDraftView-o2LEUfo8.js +1190 -0
  7. package/dist/{ClosingTemplateView-CKJVYSbj.js → ClosingTemplateView-Dt983Cg4.js} +271 -285
  8. package/dist/FmCustomAttribute.vue_vue_type_script_setup_true_lang-Dc_7IyBG.js +142 -0
  9. package/dist/{FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-CMEOp-0r.js → FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-wocPyZls.js} +18 -19
  10. package/dist/{FmUnitInput.vue_vue_type_script_setup_true_lang-C1DjyjyH.js → FmUnitInput.vue_vue_type_script_setup_true_lang-DzoEp-Pg.js} +25 -26
  11. package/dist/{IngredientGroupView-BuP-HGeg.js → IngredientGroupView-CIPpIpv1.js} +63 -69
  12. package/dist/IngredientsView-CFV3kX7Q.js +1707 -0
  13. package/dist/{IntegrationView-kYCaKG0o.js → IntegrationView-DkW32m-t.js} +89 -92
  14. package/dist/{InventoryBindingForm-BXHq4h-n.js → InventoryBindingForm-B4CBet9W.js} +1 -1
  15. package/dist/{InventoryBindingForm.vue_vue_type_script_setup_true_lang-CVxJ_bV3.js → InventoryBindingForm.vue_vue_type_script_setup_true_lang-DpdDVf6O.js} +112 -104
  16. package/dist/{InventoryBindingSummary-Bjasfc_v.js → InventoryBindingSummary-75ImZtqK.js} +1 -1
  17. package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-DM0C4raP.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-DfpG3Fy8.js} +1 -1
  18. package/dist/{PremiumBadge.vue_vue_type_script_setup_true_lang-C3O3JebE.js → PremiumBadge.vue_vue_type_script_setup_true_lang-B4d0c3nk.js} +19 -20
  19. package/dist/{PurchaseOrderPrintPreview-CmjkfTTS.js → PurchaseOrderPrintPreview-BYO0JcQW.js} +17 -18
  20. package/dist/ReceiveRequestView-cFLNExw9.js +4194 -0
  21. package/dist/RecipeView-CjfpaHaT.js +609 -0
  22. package/dist/StockView-HMtD9qar.js +1818 -0
  23. package/dist/{SupplierView-DAx7E7sR.js → SupplierView-Cidfe-Xm.js} +2325 -787
  24. package/dist/TransferDetails.vue_vue_type_script_setup_true_lang-CdU3HPBC.js +1275 -0
  25. package/dist/TransferTemplateView-Doxr1fXP.js +1264 -0
  26. package/dist/{UnitView-CQPGZ8-r.js → UnitView-C1af71aM.js} +228 -227
  27. package/dist/{WarehouseView-jy-RNCgy.js → WarehouseView-CviOLXfX.js} +100 -106
  28. package/dist/api/adjustment-template.d.ts +25 -0
  29. package/dist/api/bill.d.ts +240 -84
  30. package/dist/api/closing-draft.d.ts +6 -0
  31. package/dist/api/closing.d.ts +1 -0
  32. package/dist/api/inventory.d.ts +15 -6
  33. package/dist/api/netsuite.d.ts +3 -3
  34. package/dist/app-BE8SgDqI.js +84466 -0
  35. package/dist/app.d.ts +64 -0
  36. package/dist/app.js +2 -2
  37. package/dist/components/FmCustomAttribute.vue.d.ts +23 -0
  38. package/dist/components/FmLockableField.vue.d.ts +37 -0
  39. package/dist/components/FmMultiselectDialogProps.d.ts +1 -0
  40. package/dist/components/inventory-binding/InventoryBinding.vue.d.ts +3 -1
  41. package/dist/components/row-action.enum.d.ts +1 -0
  42. package/dist/components/shell/inventory/binding-ui.vue.d.ts +3 -1
  43. package/dist/composable/defineDeepModel.d.ts +1 -1
  44. package/dist/{decimal-BAc9M88Q.js → decimal-xj3kVOP6.js} +1 -1
  45. package/dist/feature-CWpNYcWJ.js +946 -0
  46. package/dist/format-unit-display-CZ835oaL.js +1215 -0
  47. package/dist/index-B8IWDKYv.js +29202 -0
  48. package/dist/{StockView-D9no-mrA.js → index-C6SzYqK7.js} +2242 -3986
  49. package/dist/router/name.d.ts +2 -0
  50. package/dist/stock-C2xyYnS7.js +125 -0
  51. package/dist/stores/feature.d.ts +6 -0
  52. package/dist/stores/integration/netsuite.d.ts +70 -2
  53. package/dist/stores/inventory.d.ts +21 -12
  54. package/dist/stores/supplier.d.ts +1 -1
  55. package/dist/style.css +1 -1
  56. package/dist/{supplier-DJC0UZWv.js → supplier-B-7o9hg1.js} +15 -15
  57. package/dist/tsconfig.app.tsbuildinfo +1 -1
  58. package/dist/{use-inventory-binding-dialog-PEQbFRvO.js → use-inventory-binding-dialog-Dm8Ky1MH.js} +10 -11
  59. package/dist/views/adjustment-template/import/AdjustmentTemplateImport.vue.d.ts +2 -0
  60. package/dist/views/adjustment-template/import/AdjustmentTemplateImportItem.vue.d.ts +18 -0
  61. package/dist/views/adjustment-template/import/export.d.ts +60 -0
  62. package/dist/views/adjustment-template/wastage-template/WastageTemplateDetails.vue.d.ts +2 -0
  63. package/dist/views/adjustment-template/wastage-template/WastageTemplateDialog.vue.d.ts +22 -0
  64. package/dist/views/adjustment-template/wastage-template/WastageTemplatePublish.vue.d.ts +6 -0
  65. package/dist/views/adjustment-template/wastage-template/WastageTemplateReason.vue.d.ts +18 -0
  66. package/dist/views/adjustment-template/wastage-template/WastageTemplateView.vue.d.ts +2 -0
  67. package/dist/views/adjustment-template/wastage-template/actions.d.ts +1329 -0
  68. package/dist/views/adjustment-template/wastage-template/form/WastageTemplateForm.vue.d.ts +16 -0
  69. package/dist/views/adjustment-template/wastage-template/form/WastageTemplateItemTable.vue.d.ts +35 -0
  70. package/dist/views/adjustment-template/wastage-template/form/useAdjustmentTemplateItems.d.ts +20 -0
  71. package/dist/views/adjustment-template/wastage-template/props.d.ts +36 -0
  72. package/dist/views/adjustment-template/wastage-template/table.d.ts +1303 -0
  73. package/dist/views/closing-draft/ClosingDraftView.vue.d.ts +2 -0
  74. package/dist/views/closing-draft/components/closing-draft-action/ClosingDraftAction.vue.d.ts +22 -0
  75. package/dist/views/closing-draft/components/closing-draft-dialog/ClosingDraftDialog.vue.d.ts +625 -0
  76. package/dist/views/closing-draft/composables/use-closing-draft-actions.d.ts +25 -0
  77. package/dist/views/closing-draft/composables/use-closing-draft-table.d.ts +3645 -0
  78. package/dist/views/closing-draft/helpers/draft-status-to-class-name.helper.d.ts +1 -0
  79. package/dist/views/closing-draft/helpers/export-draft.helper.d.ts +19 -0
  80. package/dist/views/closing-draft/helpers/get-calculated-total.helper.d.ts +4 -0
  81. package/dist/views/closing-template/components/closing-template-form/composables/use-closing-template-items.d.ts +2 -1
  82. package/dist/views/closing-template/composables/use-closing-template-actions.d.ts +48 -204
  83. package/dist/views/closing-template/composables/use-closing-template-table.d.ts +49 -205
  84. package/dist/views/ingredient-group/composables/use-ingredient-group-table.d.ts +6 -3
  85. package/dist/views/ingredients/components/convert/ConvertFormProps.d.ts +1 -0
  86. package/dist/views/ingredients/components/ingredient-form/IngredientForm.vue.d.ts +4 -2
  87. package/dist/views/ingredients/components/inventory-binding/InventoryBindingForm.vue.d.ts +1 -0
  88. package/dist/views/ingredients/composables/use-ingredient-table.d.ts +2 -1
  89. package/dist/views/receive-request/components/netsuite/NetSuiteInfo.vue.d.ts +12 -0
  90. package/dist/views/receive-request/components/netsuite/NetSuiteProps.d.ts +13 -0
  91. package/dist/views/receive-request/components/netsuite/NetSuiteSync.vue.d.ts +12 -0
  92. package/dist/views/receive-request/components/transfer-form/NetSuiteField.vue.d.ts +2 -0
  93. package/dist/views/receive-request/components/transfer-form/SparkIcon.vue.d.ts +1 -1
  94. package/dist/views/receive-request/components/transfer-form/TransferForm.vue.d.ts +40 -17
  95. package/dist/views/receive-request/components/transfer-form/components/ForecastStock.vue.d.ts +4 -2
  96. package/dist/views/receive-request/components/transfer-form/composables/use-transfer-items.d.ts +2 -1
  97. package/dist/views/receive-request/composables/use-receive-request-form.d.ts +57 -24
  98. package/dist/views/receive-request/composables/use-receive-request-table.d.ts +57 -24
  99. package/dist/views/recipe/components/recipe-form/RecipeForm.vue.d.ts +2 -0
  100. package/dist/views/stock/components/StockRecordCard.vue.d.ts +120 -42
  101. package/dist/views/stock/components/dialog/AdjustedItemForm.vue.d.ts +6 -4
  102. package/dist/views/stock/helper/compute-summary-total.d.ts +2 -2
  103. package/dist/views/transfer-template/components/transfer-template-form/composables/use-transfer-template-items.d.ts +2 -1
  104. package/dist/views/transfer-template/composables/use-transfer-template-actions.d.ts +24 -12
  105. package/dist/views/transfer-template/composables/use-transfer-template-table.d.ts +24 -12
  106. package/dist/views/transfer-template/helpers/import-export.helper.d.ts +2 -1
  107. package/package.json +5 -4
  108. package/dist/FmDroppableField-8RzKjEdL.js +0 -154
  109. package/dist/FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-BhdcqRh-.js +0 -436
  110. package/dist/FmMultiselectDialog-D7YtdoyJ.js +0 -415
  111. package/dist/IngredientBindedItem.vue_vue_type_script_setup_true_lang-zjvFEF5C.js +0 -51
  112. package/dist/IngredientsView-DMRN-odY.js +0 -1613
  113. package/dist/ReceiveRequestView-aQZJO8sq.js +0 -4165
  114. package/dist/RecipeView-DXO43tFi.js +0 -597
  115. package/dist/TableActionableRow.vue_vue_type_script_setup_true_lang-DlNJ6kRg.js +0 -135
  116. package/dist/TransferDetails.vue_vue_type_script_setup_true_lang-DCA0RUfu.js +0 -1209
  117. package/dist/TransferTemplateView-CfxdQF1t.js +0 -1261
  118. package/dist/_plugin-vue_export-helper-CHgC5LLL.js +0 -9
  119. package/dist/app-KnSMkJBV.js +0 -33496
  120. package/dist/date2-CIeUqUIc.js +0 -117
  121. package/dist/dayjs.min-Df5jSnDJ.js +0 -282
  122. package/dist/defineDeepModel-BfuQAIoM.js +0 -13
  123. package/dist/feature-dwB4OxRQ.js +0 -86
  124. package/dist/format-time-from-id-BbvzyIN6.js +0 -15
  125. package/dist/format-unit-display-BBWblJEt.js +0 -1216
  126. package/dist/fuzzy-B9ryZ9VZ.js +0 -41
  127. package/dist/index-BN0CY3sZ.js +0 -22277
  128. package/dist/index-Bj1fJum-.js +0 -45
  129. package/dist/index-C4yL_7rR.js +0 -10545
  130. package/dist/netsuite-ByWOS6tI.js +0 -194
  131. package/dist/normalizeArguments-DP7Hrren.js +0 -1552
  132. package/dist/row-action.enum-PMKMRrZR.js +0 -50
  133. package/dist/rules-C12nWDD1.js +0 -198
  134. package/dist/use-template-enabled-locations-2-k9g5t8tt.js +0 -86
  135. package/dist/xlsx-B4XHad7S.js +0 -24004
  136. package/dist/xlsx.util-BSO4SHJi.js +0 -78
@@ -1,43 +1,39 @@
1
- import { defineComponent as K, computed as _, openBlock as v, createElementBlock as w, createElementVNode as l, Fragment as q, renderList as H, toDisplayString as V, createCommentVNode as Y, ref as M, resolveComponent as I, createBlock as T, withCtx as R, createVNode as y, unref as a, isRef as Z, normalizeClass as ae, normalizeStyle as re, Teleport as ie, normalizeProps as ue, guardReactiveProps as de } from "vue";
2
- import { a as G, S as me, c as oe, h as ee, u as ce } from "./app-KnSMkJBV.js";
3
- import { useDialog as pe, useSnackbar as le, useProxiedModel as te, useBreakpoints as fe } from "@feedmepos/ui-library";
4
- import { i as ve, _ as ye } from "./is-linked-ingredient-error-fJ2TJb3z.js";
5
- import { F as U, D as ne, R as N } from "./row-action.enum-PMKMRrZR.js";
6
- import { defineStore as be, storeToRefs as ge } from "pinia";
7
- import { c as xe, _ as _e, F as he } from "./TableActionableRow.vue_vue_type_script_setup_true_lang-DlNJ6kRg.js";
8
- import { useI18n as O } from "@feedmepos/mf-common";
9
- import { u as Ve, _ as Ue, a as we } from "./FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-BhdcqRh-.js";
10
- import { R as j, A as Ce, a as J, c as ke, d as Fe } from "./rules-C12nWDD1.js";
11
- import { F as Se } from "./decimal-BAc9M88Q.js";
12
- import { _ as $e } from "./NumberPrecisionInput.vue_vue_type_script_setup_true_lang-DM0C4raP.js";
13
- const Ee = { class: "flex flex-col gap-8" }, Ie = {
1
+ import { defineComponent as H, computed as g, openBlock as v, createElementBlock as C, createElementVNode as l, Fragment as j, renderList as q, toDisplayString as V, createCommentVNode as Y, ref as M, resolveComponent as $, createBlock as T, withCtx as A, createVNode as y, unref as o, isRef as ee, normalizeClass as re, normalizeStyle as ie, Teleport as ue, normalizeProps as de, guardReactiveProps as me } from "vue";
2
+ import { a as G, d as w, S as ce, f as pe, D as te, h as L, e as le, l as N, A as fe, i as J, L as ve, N as ye, o as ne, u as be, b as ge, y as xe, z as _e, B as he, E as Ve, G as Ue } from "./app-BE8SgDqI.js";
3
+ import { useDialog as we, useSnackbar as se, useProxiedModel as oe, useBreakpoints as Ce } from "@feedmepos/ui-library";
4
+ import { i as Se, _ as ke } from "./is-linked-ingredient-error-fJ2TJb3z.js";
5
+ import { defineStore as Ee, storeToRefs as Fe } from "pinia";
6
+ import { useI18n as K } from "@feedmepos/mf-common";
7
+ import { F as $e } from "./decimal-xj3kVOP6.js";
8
+ import { _ as Ie } from "./NumberPrecisionInput.vue_vue_type_script_setup_true_lang-DfpG3Fy8.js";
9
+ const De = { class: "flex flex-col gap-8" }, Ae = {
14
10
  key: 0,
15
11
  class: "flex flex-col"
16
- }, De = { class: "flex-1 py-8 px-16" }, Ae = {
12
+ }, Re = { class: "flex-1 py-8 px-16" }, Me = {
17
13
  class: "flex-0 py-8 px-16",
18
14
  style: { "flex-basis": "240px" }
19
- }, Re = {
15
+ }, Pe = {
20
16
  key: 1,
21
17
  class: "flex flex-col"
22
- }, Me = { class: "flex-1 py-8 px-16" }, Pe = {
18
+ }, Te = { class: "flex-1 py-8 px-16" }, Be = {
23
19
  class: "flex-0 py-8 px-16",
24
20
  style: { "flex-basis": "240px" }
25
- }, Te = {
21
+ }, ze = {
26
22
  key: 2,
27
23
  class: "flex flex-col"
28
- }, Be = { class: "flex-1 py-8 px-16" }, ze = {
24
+ }, Le = { class: "flex-1 py-8 px-16" }, Ne = {
29
25
  class: "flex-0 py-8 px-16",
30
26
  style: { "flex-basis": "240px" }
31
- }, Le = /* @__PURE__ */ K({
27
+ }, je = /* @__PURE__ */ H({
32
28
  __name: "UnitUsedBy",
33
29
  props: {
34
30
  unit: {}
35
31
  },
36
32
  setup(k) {
37
- const f = k, b = G(), i = _(() => b.validateUnitUsage(f.unit)), r = _(() => i.value.filter((c) => c.from === "INGREDIENT")), o = _(() => i.value.filter((c) => c.from === "RECIPE")), m = _(() => i.value.filter((c) => c.from === "MENU"));
38
- return (c, p) => (v(), w("div", Ee, [
33
+ const f = k, b = G(), i = g(() => b.validateUnitUsage(f.unit)), r = g(() => i.value.filter((c) => c.from === "INGREDIENT")), s = g(() => i.value.filter((c) => c.from === "RECIPE")), d = g(() => i.value.filter((c) => c.from === "MENU"));
34
+ return (c, p) => (v(), C("div", De, [
39
35
  p[3] || (p[3] = l("div", { class: "fm-typo-en-body-md-400" }, "Sorry, this unit is used in the following modules:", -1)),
40
- r.value.length ? (v(), w("div", Ie, [
36
+ r.value.length ? (v(), C("div", Ae, [
41
37
  p[0] || (p[0] = l("div", { 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" }, [
42
38
  l("div", { class: "flex-1 py-8 px-16" }, "Ingredient"),
43
39
  l("div", {
@@ -45,18 +41,18 @@ const Ee = { class: "flex flex-col gap-8" }, Ie = {
45
41
  style: { "flex-basis": "240px" }
46
42
  }, "Used in")
47
43
  ], -1)),
48
- (v(!0), w(q, null, H(r.value, (s) => {
44
+ (v(!0), C(j, null, q(r.value, (a) => {
49
45
  var n;
50
- return v(), w("div", {
51
- key: s.code,
46
+ return v(), C("div", {
47
+ key: a.code,
52
48
  class: "flex flex-row fm-typo-en-body-md-400 h-48 items-center border-b border-b-fm-color-neutral-gray-100"
53
49
  }, [
54
- l("div", De, V(s.code) + " " + V(s.name), 1),
55
- l("div", Ae, V((n = s.bindedIngredient) != null && n.length ? "Convert binding" : "Item unit"), 1)
50
+ l("div", Re, V(a.code) + " " + V(a.name), 1),
51
+ l("div", Me, V((n = a.bindedIngredient) != null && n.length ? "Convert binding" : "Item unit"), 1)
56
52
  ]);
57
53
  }), 128))
58
54
  ])) : Y("", !0),
59
- o.value.length ? (v(), w("div", Re, [
55
+ s.value.length ? (v(), C("div", Pe, [
60
56
  p[1] || (p[1] = l("div", { 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" }, [
61
57
  l("div", { class: "flex-1 py-8 px-16" }, "Recipe"),
62
58
  l("div", {
@@ -64,18 +60,18 @@ const Ee = { class: "flex flex-col gap-8" }, Ie = {
64
60
  style: { "flex-basis": "240px" }
65
61
  }, "Used in")
66
62
  ], -1)),
67
- (v(!0), w(q, null, H(o.value, (s) => {
68
- var n, u, g;
69
- return v(), w("div", {
70
- key: s.code,
63
+ (v(!0), C(j, null, q(s.value, (a) => {
64
+ var n, u, x;
65
+ return v(), C("div", {
66
+ key: a.code,
71
67
  class: "flex flex-row fm-typo-en-body-md-400 h-48 items-center border-b border-b-fm-color-neutral-gray-100"
72
68
  }, [
73
- l("div", Me, V(s.code) + " " + V(s.name), 1),
74
- l("div", Pe, V((n = s.bindedIngredient) == null ? void 0 : n.slice(0, 3).map((x) => x.code).join(", ")) + " " + V(s.bindedIngredient && ((u = s.bindedIngredient) == null ? void 0 : u.length) > 3 ? `and ${((g = s.bindedIngredient) == null ? void 0 : g.length) - 3} more` : ""), 1)
69
+ l("div", Te, V(a.code) + " " + V(a.name), 1),
70
+ l("div", Be, V((n = a.bindedIngredient) == null ? void 0 : n.slice(0, 3).map((_) => _.code).join(", ")) + " " + V(a.bindedIngredient && ((u = a.bindedIngredient) == null ? void 0 : u.length) > 3 ? `and ${((x = a.bindedIngredient) == null ? void 0 : x.length) - 3} more` : ""), 1)
75
71
  ]);
76
72
  }), 128))
77
73
  ])) : Y("", !0),
78
- m.value.length ? (v(), w("div", Te, [
74
+ d.value.length ? (v(), C("div", ze, [
79
75
  p[2] || (p[2] = l("div", { 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" }, [
80
76
  l("div", { class: "flex-1 py-8 px-16" }, "Menu"),
81
77
  l("div", {
@@ -83,42 +79,42 @@ const Ee = { class: "flex flex-col gap-8" }, Ie = {
83
79
  style: { "flex-basis": "240px" }
84
80
  }, "Used in")
85
81
  ], -1)),
86
- (v(!0), w(q, null, H(m.value, (s) => {
87
- var n, u, g;
88
- return v(), w("div", {
89
- key: s.code,
82
+ (v(!0), C(j, null, q(d.value, (a) => {
83
+ var n, u, x;
84
+ return v(), C("div", {
85
+ key: a.code,
90
86
  class: "flex flex-row fm-typo-en-body-md-400 h-48 items-center border-b border-b-fm-color-neutral-gray-100"
91
87
  }, [
92
- l("div", Be, V(s.code) + " " + V(s.name), 1),
93
- l("div", ze, V((n = s.bindedIngredient) == null ? void 0 : n.slice(0, 3).map((x) => x.code).join(", ")) + " " + V(s.bindedIngredient && ((u = s.bindedIngredient) == null ? void 0 : u.length) > 3 ? `and ${((g = s.bindedIngredient) == null ? void 0 : g.length) - 3} more` : ""), 1)
88
+ l("div", Le, V(a.code) + " " + V(a.name), 1),
89
+ l("div", Ne, V((n = a.bindedIngredient) == null ? void 0 : n.slice(0, 3).map((_) => _.code).join(", ")) + " " + V(a.bindedIngredient && ((u = a.bindedIngredient) == null ? void 0 : u.length) > 3 ? `and ${((x = a.bindedIngredient) == null ? void 0 : x.length) - 3} more` : ""), 1)
94
90
  ]);
95
91
  }), 128))
96
92
  ])) : Y("", !0)
97
93
  ]));
98
94
  }
99
- }), Q = be("unitForm", function() {
100
- const f = pe(), b = le(), i = G(), r = M(!1), o = M();
101
- function m() {
95
+ }), Q = Ee("unitForm", function() {
96
+ const f = we(), b = se(), i = G(), r = M(!1), s = M();
97
+ function d() {
102
98
  const n = {
103
99
  unit: {},
104
- mode: U.CREATE,
100
+ mode: w.CREATE,
105
101
  show: !0,
106
102
  "onUpdate:show"(u) {
107
- o.value.show = u;
103
+ s.value.show = u;
108
104
  }
109
105
  };
110
- o.value = n;
106
+ s.value = n;
111
107
  }
112
108
  async function c(n) {
113
109
  const u = {
114
110
  unit: n,
115
- mode: U.UPDATE,
111
+ mode: w.UPDATE,
116
112
  show: !0,
117
- "onUpdate:show"(g) {
118
- o.value.show = g;
113
+ "onUpdate:show"(x) {
114
+ s.value.show = x;
119
115
  }
120
116
  };
121
- o.value = u;
117
+ s.value = u;
122
118
  }
123
119
  async function p(n) {
124
120
  r.value = !0;
@@ -129,9 +125,9 @@ const Ee = { class: "flex flex-col gap-8" }, Ie = {
129
125
  type: "success"
130
126
  });
131
127
  } catch (u) {
132
- u instanceof me && ve(u) ? f.open({
128
+ u instanceof ce && Se(u) ? f.open({
133
129
  title: "Cannot delete unit",
134
- contentComponent: ye,
130
+ contentComponent: ke,
135
131
  contentComponentProps: {
136
132
  subject: (n == null ? void 0 : n.name) ?? "",
137
133
  items: u.errorResponse.message
@@ -149,14 +145,14 @@ const Ee = { class: "flex flex-col gap-8" }, Ie = {
149
145
  r.value = !1;
150
146
  }
151
147
  }
152
- function s(n) {
148
+ function a(n) {
153
149
  if (i.validateUnitUsage(n).length) {
154
150
  f.open({
155
151
  title: `Cannot delete ${(n == null ? void 0 : n.name) ?? "unit"}`,
156
152
  overlay: !0,
157
153
  dismissAway: !0,
158
154
  closeButton: !0,
159
- contentComponent: Le,
155
+ contentComponent: je,
160
156
  contentComponentProps: {
161
157
  unit: n
162
158
  },
@@ -183,22 +179,22 @@ const Ee = { class: "flex flex-col gap-8" }, Ie = {
183
179
  }).onPrimary(() => p(n));
184
180
  }
185
181
  return {
186
- createUnit: m,
182
+ createUnit: d,
187
183
  updateUnit: c,
188
- deleteUnit: s,
189
- unitDialogProps: o,
184
+ deleteUnit: a,
185
+ unitDialogProps: s,
190
186
  unitViewLoading: r
191
187
  };
192
188
  });
193
- function Ne() {
194
- const { updateUnit: k, deleteUnit: f } = Q(), { t: b } = O();
195
- async function i(o, m) {
196
- const c = oe(m);
197
- if (o === N.Edit) {
189
+ function qe() {
190
+ const { updateUnit: k, deleteUnit: f } = Q(), { t: b } = K();
191
+ async function i(s, d) {
192
+ const c = le(d);
193
+ if (s === L.Edit) {
198
194
  await k(c);
199
195
  return;
200
196
  }
201
- if (o === N.Delete) {
197
+ if (s === L.Delete) {
202
198
  await f(c);
203
199
  return;
204
200
  }
@@ -219,11 +215,11 @@ function Ne() {
219
215
  {
220
216
  id: "action",
221
217
  header: "",
222
- cell(o) {
223
- return xe(
224
- [ne[N.Edit], ne[N.Delete]],
225
- (m) => {
226
- i(m, o.row.original);
218
+ cell(s) {
219
+ return pe(
220
+ [te[L.Edit], te[L.Delete]],
221
+ (d) => {
222
+ i(d, s.row.original);
227
223
  }
228
224
  );
229
225
  },
@@ -236,7 +232,7 @@ function Ne() {
236
232
  }
237
233
  ] };
238
234
  }
239
- const je = { class: "flex flex-col gap-24" }, qe = { class: "flex gap-24" }, He = { class: "flex-1" }, Ke = { class: "flex-1" }, Ge = { class: "flex" }, Oe = { class: "flex items-center" }, Ye = { class: "fm-typo-en-body-lg-600 flex-grow" }, Je = { class: "flex flex-col gap-24" }, Qe = { class: "flex gap-24" }, We = { class: "flex-1" }, Xe = { class: "flex-1" }, Ze = /* @__PURE__ */ K({
235
+ const He = { class: "flex flex-col gap-24" }, Ge = { class: "flex gap-24" }, Ke = { class: "flex-1" }, Oe = { class: "flex-1" }, Ye = { class: "flex" }, Je = { class: "flex items-center" }, Qe = { class: "fm-typo-en-body-lg-600 flex-grow" }, We = { class: "flex flex-col gap-24" }, Xe = { class: "flex gap-24" }, Ze = { class: "flex-1" }, et = { class: "flex-1" }, tt = /* @__PURE__ */ H({
240
236
  __name: "UnitForm",
241
237
  props: {
242
238
  mode: {},
@@ -245,11 +241,11 @@ const je = { class: "flex flex-col gap-24" }, qe = { class: "flex gap-24" }, He
245
241
  },
246
242
  emits: ["update:modelValue", "click:submit"],
247
243
  setup(k, { expose: f, emit: b }) {
248
- const i = k, r = b, { t: o } = O();
249
- function m() {
244
+ const i = k, r = b, { t: s } = K();
245
+ function d() {
250
246
  r("click:submit");
251
247
  }
252
- const c = _({
248
+ const c = g({
253
249
  get() {
254
250
  var e;
255
251
  return ((e = i.modelValue) == null ? void 0 : e.name) ?? "";
@@ -258,7 +254,7 @@ const je = { class: "flex flex-col gap-24" }, qe = { class: "flex gap-24" }, He
258
254
  const t = i.modelValue ?? {};
259
255
  t.name = e, r("update:modelValue", t);
260
256
  }
261
- }), p = _({
257
+ }), p = g({
262
258
  get() {
263
259
  var e;
264
260
  return ((e = i.modelValue) == null ? void 0 : e.abbrev) ?? "";
@@ -267,7 +263,7 @@ const je = { class: "flex flex-col gap-24" }, qe = { class: "flex gap-24" }, He
267
263
  const t = i.modelValue ?? {};
268
264
  t.abbrev = e, r("update:modelValue", t);
269
265
  }
270
- }), s = _({
266
+ }), a = g({
271
267
  get() {
272
268
  var e;
273
269
  return ((e = i.modelValue) == null ? void 0 : e.precision) ?? 0;
@@ -276,7 +272,7 @@ const je = { class: "flex flex-col gap-24" }, qe = { class: "flex gap-24" }, He
276
272
  const t = i.modelValue ?? {};
277
273
  t.precision = e, r("update:modelValue", t);
278
274
  }
279
- }), n = _({
275
+ }), n = g({
280
276
  get() {
281
277
  var e;
282
278
  return ((e = i.modelValue) == null ? void 0 : e.measurements) ?? [];
@@ -301,137 +297,137 @@ const je = { class: "flex flex-col gap-24" }, qe = { class: "flex gap-24" }, He
301
297
  }
302
298
  ], r("update:modelValue", e);
303
299
  }
304
- function g(e) {
305
- const t = i.modelValue ?? {}, d = t.measurements ?? [];
306
- d.splice(e, 1), t.measurements = d, r("update:modelValue", t);
300
+ function x(e) {
301
+ const t = i.modelValue ?? {}, m = t.measurements ?? [];
302
+ m.splice(e, 1), t.measurements = m, r("update:modelValue", t);
307
303
  }
308
- const x = M();
304
+ const _ = M();
309
305
  return f({
310
306
  validateInputs: () => {
311
307
  var e, t;
312
- (t = (e = x.value) == null ? void 0 : e.validateInputs) == null || t.call(e);
308
+ (t = (e = _.value) == null ? void 0 : e.validateInputs) == null || t.call(e);
313
309
  },
314
310
  resetInputsValidation: () => {
315
311
  var e, t;
316
- (t = (e = x.value) == null ? void 0 : e.resetInputsValidation) == null || t.call(e);
312
+ (t = (e = _.value) == null ? void 0 : e.resetInputsValidation) == null || t.call(e);
317
313
  },
318
314
  resetInputs: () => {
319
315
  var e, t;
320
- (t = (e = x.value) == null ? void 0 : e.resetInputs) == null || t.call(e);
316
+ (t = (e = _.value) == null ? void 0 : e.resetInputs) == null || t.call(e);
321
317
  }
322
318
  }), (e, t) => {
323
- const d = I("FmTextField"), D = I("FmStepperField"), F = I("FmButton"), S = I("FmCard"), E = I("FmForm");
324
- return v(), T(E, {
319
+ const m = $("FmTextField"), I = $("FmStepperField"), D = $("FmButton"), U = $("FmCard"), O = $("FmForm");
320
+ return v(), T(O, {
325
321
  ref_key: "formRef",
326
- ref: x,
322
+ ref: _,
327
323
  class: "flex flex-col gap-40",
328
- onValidationSuccess: m
324
+ onValidationSuccess: d
329
325
  }, {
330
- default: R(() => {
331
- var P;
326
+ default: A(() => {
327
+ var E;
332
328
  return [
333
- l("div", je, [
334
- l("div", qe, [
335
- l("div", He, [
336
- y(d, {
329
+ l("div", He, [
330
+ l("div", Ge, [
331
+ l("div", Ke, [
332
+ y(m, {
337
333
  disabled: e.disabled,
338
- label: a(o)("inventory.unit.name"),
334
+ label: o(s)("inventory.unit.name"),
339
335
  modelValue: c.value,
340
- "onUpdate:modelValue": t[0] || (t[0] = (C) => c.value = C),
341
- rules: [a(j)()],
336
+ "onUpdate:modelValue": t[0] || (t[0] = (S) => c.value = S),
337
+ rules: [o(N)()],
342
338
  "label-mark": "required"
343
339
  }, null, 8, ["disabled", "label", "modelValue", "rules"])
344
340
  ]),
345
- l("div", Ke, [
346
- y(d, {
341
+ l("div", Oe, [
342
+ y(m, {
347
343
  disabled: e.disabled,
348
- label: a(o)("inventory.unit.symbol"),
344
+ label: o(s)("inventory.unit.symbol"),
349
345
  modelValue: p.value,
350
- "onUpdate:modelValue": t[1] || (t[1] = (C) => p.value = C),
351
- rules: [a(j)()],
346
+ "onUpdate:modelValue": t[1] || (t[1] = (S) => p.value = S),
347
+ rules: [o(N)()],
352
348
  "label-mark": "required"
353
349
  }, null, 8, ["disabled", "label", "modelValue", "rules"])
354
350
  ])
355
351
  ]),
356
352
  l("div", null, [
357
- y(D, {
353
+ y(I, {
358
354
  disabled: e.disabled,
359
355
  class: "col-span-3",
360
- label: a(o)("inventory.unit.precision"),
361
- modelValue: s.value,
362
- "onUpdate:modelValue": t[2] || (t[2] = (C) => s.value = C),
363
- rules: [a(Ce)(0)]
356
+ label: o(s)("inventory.unit.precision"),
357
+ modelValue: a.value,
358
+ "onUpdate:modelValue": t[2] || (t[2] = (S) => a.value = S),
359
+ rules: [o(fe)(0)]
364
360
  }, null, 8, ["disabled", "label", "modelValue", "rules"])
365
361
  ])
366
362
  ]),
367
- l("div", Ge, [
368
- y(F, {
363
+ l("div", Ye, [
364
+ y(D, {
369
365
  disabled: e.disabled,
370
366
  type: "button",
371
367
  "prepend-icon": "add",
372
- label: a(o)("inventory.unit.measurement.addMeasurement"),
368
+ label: o(s)("inventory.unit.measurement.addMeasurement"),
373
369
  variant: "plain",
374
370
  onClick: u
375
371
  }, null, 8, ["disabled", "label"])
376
372
  ]),
377
- (v(!0), w(q, null, H((P = e.modelValue) == null ? void 0 : P.measurements, (C, h) => (v(), T(S, {
373
+ (v(!0), C(j, null, q((E = e.modelValue) == null ? void 0 : E.measurements, (S, h) => (v(), T(U, {
378
374
  class: "flex flex-col gap-16 p-16",
379
375
  variant: "outlined",
380
- key: C.id
376
+ key: S.id
381
377
  }, {
382
- default: R(() => [
383
- l("div", Oe, [
384
- l("div", Ye, V(a(o)("inventory.unit.measurement.measurementDefault", [h + 1])), 1),
385
- y(F, {
378
+ default: A(() => [
379
+ l("div", Je, [
380
+ l("div", Qe, V(o(s)("inventory.unit.measurement.measurementDefault", [h + 1])), 1),
381
+ y(D, {
386
382
  disabled: e.disabled,
387
383
  variant: "tertiary",
388
384
  "prepend-icon": "delete",
389
- onClick: ($) => g(h)
385
+ onClick: (F) => x(h)
390
386
  }, null, 8, ["disabled", "onClick"])
391
387
  ]),
392
- l("div", Je, [
393
- l("div", Qe, [
394
- l("div", We, [
395
- y(d, {
388
+ l("div", We, [
389
+ l("div", Xe, [
390
+ l("div", Ze, [
391
+ y(m, {
396
392
  disabled: e.disabled,
397
393
  class: "col-span-2",
398
- label: a(o)("inventory.unit.measurement.name"),
394
+ label: o(s)("inventory.unit.measurement.name"),
399
395
  modelValue: e.modelValue.measurements[h].name,
400
- "onUpdate:modelValue": ($) => e.modelValue.measurements[h].name = $,
401
- rules: [a(j)()],
396
+ "onUpdate:modelValue": (F) => e.modelValue.measurements[h].name = F,
397
+ rules: [o(N)()],
402
398
  "label-mark": "required"
403
399
  }, null, 8, ["disabled", "label", "modelValue", "onUpdate:modelValue", "rules"])
404
400
  ]),
405
- l("div", Xe, [
406
- y(d, {
401
+ l("div", et, [
402
+ y(m, {
407
403
  disabled: e.disabled,
408
- label: a(o)("inventory.unit.measurement.symbol"),
404
+ label: o(s)("inventory.unit.measurement.symbol"),
409
405
  modelValue: e.modelValue.measurements[h].abbrev,
410
- "onUpdate:modelValue": ($) => e.modelValue.measurements[h].abbrev = $,
411
- rules: [a(j)()],
406
+ "onUpdate:modelValue": (F) => e.modelValue.measurements[h].abbrev = F,
407
+ rules: [o(N)()],
412
408
  "label-mark": "required"
413
409
  }, null, 8, ["disabled", "label", "modelValue", "onUpdate:modelValue", "rules"])
414
410
  ])
415
411
  ]),
416
- y($e, {
412
+ y(Ie, {
417
413
  disabled: e.disabled,
418
414
  class: "col-span-3",
419
- label: a(o)("inventory.unit.measurement.conversion"),
420
- "model-value": +a(J)(e.modelValue.measurements[h].conversion),
421
- "onUpdate:modelValue": ($) => n.value = n.value.map(
422
- (A, B) => B === h ? {
423
- ...A,
424
- conversion: a(Se).toPrecision(
425
- a(ke)($),
426
- s.value
415
+ label: o(s)("inventory.unit.measurement.conversion"),
416
+ "model-value": +o(J)(e.modelValue.measurements[h].conversion),
417
+ "onUpdate:modelValue": (F) => n.value = n.value.map(
418
+ (P, R) => R === h ? {
419
+ ...P,
420
+ conversion: o($e).toPrecision(
421
+ o(ve)(F),
422
+ a.value
427
423
  )
428
- } : A
424
+ } : P
429
425
  ),
430
- rules: [a(Fe)(0)],
431
- step: +a(J)({ amount: 1, precision: s.value }),
432
- "helper-text": a(o)("inventory.unit.measurement.conversionHelper", {
426
+ rules: [o(ye)(0)],
427
+ step: +o(J)({ amount: 1, precision: a.value }),
428
+ "helper-text": o(s)("inventory.unit.measurement.conversionHelper", {
433
429
  measurementSymbol: e.modelValue.measurements[h].name || " measurement unit",
434
- conversion: +a(J)(e.modelValue.measurements[h].conversion),
430
+ conversion: +o(J)(e.modelValue.measurements[h].conversion),
435
431
  unitSymbol: p.value || "base unit"
436
432
  })
437
433
  }, null, 8, ["disabled", "label", "model-value", "onUpdate:modelValue", "rules", "step", "helper-text"])
@@ -445,47 +441,47 @@ const je = { class: "flex flex-col gap-24" }, qe = { class: "flex gap-24" }, He
445
441
  }, 512);
446
442
  };
447
443
  }
448
- }), et = { class: "flex gap-4" }, tt = /* @__PURE__ */ K({
444
+ }), nt = { class: "flex gap-4" }, ot = /* @__PURE__ */ H({
449
445
  __name: "UnitDialog",
450
446
  props: {
451
447
  show: { type: Boolean },
452
448
  unit: {},
453
- mode: { default: U.READ }
449
+ mode: { default: w.READ }
454
450
  },
455
451
  emits: ["update:show"],
456
452
  setup(k) {
457
- const f = k, b = G(), i = le(), { t: r } = O(), o = te(f, "show"), m = te(f, "unit"), c = _(() => {
453
+ const f = k, b = G(), i = se(), { t: r } = K(), s = oe(f, "show"), d = oe(f, "unit"), c = g(() => {
458
454
  switch (f.mode) {
459
- case U.READ:
455
+ case w.READ:
460
456
  return "";
461
- case U.UPDATE:
457
+ case w.UPDATE:
462
458
  return r("inventory.unit.update.title");
463
- case U.CREATE:
459
+ case w.CREATE:
464
460
  return r("inventory.unit.create.title");
465
461
  }
466
462
  return "";
467
- }), p = _(() => {
463
+ }), p = g(() => {
468
464
  switch (f.mode) {
469
- case U.READ:
465
+ case w.READ:
470
466
  return "";
471
- case U.UPDATE:
467
+ case w.UPDATE:
472
468
  return r("common.save");
473
- case U.CREATE:
469
+ case w.CREATE:
474
470
  return r("common.add");
475
471
  }
476
472
  return "";
477
- }), s = M(), n = M(!1);
473
+ }), a = M(), n = M(!1);
478
474
  async function u() {
479
475
  n.value = !0;
480
476
  try {
481
- const t = oe(m.value);
482
- t.precision ?? (t.precision = 0), t.measurements ?? (t.measurements = []), await b.createUnit(t), o.value = !1, i.open({
477
+ const t = le(d.value);
478
+ t.precision ?? (t.precision = 0), t.measurements ?? (t.measurements = []), await b.createUnit(t), s.value = !1, i.open({
483
479
  title: r("inventory.common.success"),
484
- message: r("inventory.unit.create.success", { name: m.value.name }),
480
+ message: r("inventory.unit.create.success", { name: d.value.name }),
485
481
  type: "success"
486
482
  });
487
483
  } catch (t) {
488
- t instanceof ee || i.open({
484
+ t instanceof ne || i.open({
489
485
  title: r("inventory.unit.create.error.title"),
490
486
  message: r("inventory.unit.create.error.message"),
491
487
  type: "error"
@@ -494,16 +490,16 @@ const je = { class: "flex flex-col gap-24" }, qe = { class: "flex gap-24" }, He
494
490
  n.value = !1;
495
491
  }
496
492
  }
497
- async function g() {
493
+ async function x() {
498
494
  n.value = !0;
499
495
  try {
500
- await b.updateUnit(m.value), o.value = !1, i.open({
496
+ await b.updateUnit(d.value), s.value = !1, i.open({
501
497
  title: r("inventory.common.success"),
502
- message: r("inventory.unit.update.success", { name: m.value.name }),
498
+ message: r("inventory.unit.update.success", { name: d.value.name }),
503
499
  type: "success"
504
500
  });
505
501
  } catch (t) {
506
- t instanceof ee || i.open({
502
+ t instanceof ne || i.open({
507
503
  title: r("inventory.unit.update.error.title"),
508
504
  message: r("inventory.unit.update.error.message"),
509
505
  type: "error"
@@ -512,118 +508,123 @@ const je = { class: "flex flex-col gap-24" }, qe = { class: "flex gap-24" }, He
512
508
  n.value = !1;
513
509
  }
514
510
  }
515
- function x() {
516
- var t, d;
517
- (d = (t = s.value) == null ? void 0 : t.validateInputs) == null || d.call(t);
511
+ function _() {
512
+ var t, m;
513
+ (m = (t = a.value) == null ? void 0 : t.validateInputs) == null || m.call(t);
518
514
  }
519
515
  function e() {
520
516
  switch (f.mode) {
521
- case U.READ:
517
+ case w.READ:
522
518
  return;
523
- case U.UPDATE:
524
- return g();
525
- case U.CREATE:
519
+ case w.UPDATE:
520
+ return x();
521
+ case w.CREATE:
526
522
  return u();
527
523
  }
528
524
  }
529
- return (t, d) => {
530
- const D = I("FmButton"), F = I("FmSideSheet");
531
- return v(), T(F, {
532
- "model-value": a(o),
533
- "onUpdate:modelValue": d[3] || (d[3] = (S) => Z(o) ? o.value = S : null),
525
+ return (t, m) => {
526
+ const I = $("FmButton"), D = $("FmSideSheet");
527
+ return v(), T(D, {
528
+ "model-value": o(s),
529
+ "onUpdate:modelValue": m[3] || (m[3] = (U) => ee(s) ? s.value = U : null),
534
530
  header: c.value,
535
531
  "close-button": "",
536
532
  "dismiss-away": "",
537
533
  "max-width": 500
538
534
  }, {
539
- "side-sheet-footer": R(() => [
540
- l("div", et, [
541
- y(D, {
535
+ "side-sheet-footer": A(() => [
536
+ l("div", nt, [
537
+ y(I, {
542
538
  loading: n.value,
543
539
  label: p.value,
544
- onClick: x
540
+ onClick: _
545
541
  }, null, 8, ["loading", "label"]),
546
- y(D, {
542
+ y(I, {
547
543
  disabled: n.value,
548
- label: a(r)("common.close"),
544
+ label: o(r)("common.close"),
549
545
  variant: "tertiary",
550
- onClick: d[2] || (d[2] = (S) => o.value = !1)
546
+ onClick: m[2] || (m[2] = (U) => s.value = !1)
551
547
  }, null, 8, ["disabled", "label"])
552
548
  ])
553
549
  ]),
554
- default: R(() => [
555
- y(Ze, {
550
+ default: A(() => [
551
+ y(tt, {
556
552
  class: "w-full",
557
553
  ref_key: "hasValidationExpose",
558
- ref: s,
559
- modelValue: a(m),
560
- "onUpdate:modelValue": d[0] || (d[0] = (S) => Z(m) ? m.value = S : null),
554
+ ref: a,
555
+ modelValue: o(d),
556
+ "onUpdate:modelValue": m[0] || (m[0] = (U) => ee(d) ? d.value = U : null),
561
557
  mode: t.mode,
562
558
  disabled: n.value,
563
- "onClick:submit": d[1] || (d[1] = (S) => e())
559
+ "onClick:submit": m[1] || (m[1] = (U) => e())
564
560
  }, null, 8, ["modelValue", "mode", "disabled"])
565
561
  ]),
566
562
  _: 1
567
563
  }, 8, ["model-value", "header"]);
568
564
  };
569
565
  }
570
- }), nt = { class: "flex flex-col py-8" }, ot = { class: "fm-typo-en-body-lg-600 text-fm-color-typo-primary" }, lt = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, bt = /* @__PURE__ */ K({
566
+ }), lt = { class: "flex flex-col py-8" }, st = { class: "fm-typo-en-body-lg-600 text-fm-color-typo-primary" }, at = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, vt = /* @__PURE__ */ H({
571
567
  __name: "UnitView",
572
568
  setup(k) {
573
- const f = G(), b = ce(), i = _(() => f.units), { createUnit: r, updateUnit: o } = Q(), { unitDialogProps: m, unitViewLoading: c } = ge(Q()), { columnDefs: p } = Ne();
574
- function s(D) {
575
- D === "add" && r();
569
+ const f = G(), b = be(), i = ge(), r = g(() => f.units), { createUnit: s, updateUnit: d } = Q(), { unitDialogProps: c, unitViewLoading: p } = Fe(Q()), { columnDefs: a } = qe();
570
+ function n(D) {
571
+ D === "add" && s();
576
572
  }
577
- const n = M(""), u = _(() => c.value), { breakpoints: g } = fe(), x = _(() => g.value.xs || g.value.sm), e = _(() => x.value ? 10 : 20), t = Ve(), { t: d } = O();
578
- return (D, F) => {
579
- const S = I("FmTable");
580
- return v(), T(Ue, {
581
- title: a(d)("inventory.unit.title"),
582
- actions: [
583
- { label: a(d)("inventory.unit.create.title"), value: "add", isPrimary: !0, prependIcon: "add" }
573
+ const u = M(""), x = g(() => p.value), { breakpoints: _ } = Ce(), e = g(() => _.value.xs || _.value.sm), t = g(() => e.value ? 10 : 20), m = xe(), { t: I } = K();
574
+ return (D, U) => {
575
+ const O = $("FmTable");
576
+ return v(), T(_e, {
577
+ title: o(I)("inventory.unit.title"),
578
+ actions: o(i).isEnabled ? [] : [
579
+ {
580
+ label: o(I)("inventory.unit.create.title"),
581
+ value: "add",
582
+ isPrimary: !0,
583
+ prependIcon: "add"
584
+ }
584
585
  ],
585
- "onClick:action": s
586
+ "onClick:action": n
586
587
  }, {
587
- default: R(() => [
588
+ default: A(() => [
588
589
  l("div", {
589
- class: ae([
590
+ class: re([
590
591
  "flex flex-col gap-8 max-h-full",
591
592
  {
592
- "p-0": x.value,
593
- "px-24 ": !x.value
593
+ "p-0": e.value,
594
+ "px-24 ": !e.value
594
595
  }
595
596
  ])
596
597
  }, [
597
- y(we, {
598
+ y(he, {
598
599
  searchable: "",
599
- search: n.value,
600
- "onUpdate:search": F[0] || (F[0] = (E) => n.value = E)
600
+ search: u.value,
601
+ "onUpdate:search": U[0] || (U[0] = (E) => u.value = E)
601
602
  }, null, 8, ["search"]),
602
- y(S, {
603
- style: re(a(t).tableHeight),
604
- "column-defs": a(p),
605
- "row-data": i.value,
606
- "search-value": n.value,
607
- loading: !a(b)._currentLocation || u.value,
608
- onRowClick: F[1] || (F[1] = (E) => a(o)(E.original)),
609
- "page-size": e.value
603
+ y(O, {
604
+ style: ie(o(m).tableHeight),
605
+ "column-defs": o(a),
606
+ "row-data": r.value,
607
+ "search-value": u.value,
608
+ loading: !o(b)._currentLocation || x.value,
609
+ onRowClick: U[1] || (U[1] = (E) => o(d)(E.original)),
610
+ "page-size": t.value
610
611
  }, {
611
- "list-row": R((E) => [
612
- y(_e, {
612
+ "list-row": A((E) => [
613
+ y(Ve, {
613
614
  row: E,
614
- onRowClick: a(o)
615
+ onRowClick: o(d)
615
616
  }, {
616
- default: R((P) => {
617
- var C, h, $, A, B, z, W, L, X;
617
+ default: A((S) => {
618
+ var h, F, P, R, W, B, X, z, Z;
618
619
  return [
619
- l("div", nt, [
620
- l("div", ot, [
621
- y(a(he), {
622
- render: ($ = (h = (C = P.name) == null ? void 0 : C.column) == null ? void 0 : h.columnDef) == null ? void 0 : $.cell,
623
- props: (B = (A = P.name) == null ? void 0 : A.getContext) == null ? void 0 : B.call(A)
620
+ l("div", lt, [
621
+ l("div", st, [
622
+ y(o(Ue), {
623
+ render: (P = (F = (h = S.name) == null ? void 0 : h.column) == null ? void 0 : F.columnDef) == null ? void 0 : P.cell,
624
+ props: (W = (R = S.name) == null ? void 0 : R.getContext) == null ? void 0 : W.call(R)
624
625
  }, null, 8, ["render", "props"])
625
626
  ]),
626
- l("div", lt, V((X = (L = (W = (z = E.original.measurements) == null ? void 0 : z.map) == null ? void 0 : W.call(z, (se) => se.name)) == null ? void 0 : L.join) == null ? void 0 : X.call(L, ", ")), 1)
627
+ l("div", at, V((Z = (z = (X = (B = E.original.measurements) == null ? void 0 : B.map) == null ? void 0 : X.call(B, (ae) => ae.name)) == null ? void 0 : z.join) == null ? void 0 : Z.call(z, ", ")), 1)
627
628
  ])
628
629
  ];
629
630
  }),
@@ -633,8 +634,8 @@ const je = { class: "flex flex-col gap-24" }, qe = { class: "flex gap-24" }, He
633
634
  _: 1
634
635
  }, 8, ["style", "column-defs", "row-data", "search-value", "loading", "page-size"])
635
636
  ], 2),
636
- (v(), T(ie, { to: "body" }, [
637
- y(tt, ue(de(a(m))), null, 16)
637
+ (v(), T(ue, { to: "body" }, [
638
+ y(ot, de(me(o(c))), null, 16)
638
639
  ]))
639
640
  ]),
640
641
  _: 1
@@ -643,5 +644,5 @@ const je = { class: "flex flex-col gap-24" }, qe = { class: "flex gap-24" }, He
643
644
  }
644
645
  });
645
646
  export {
646
- bt as default
647
+ vt as default
647
648
  };