@feedmepos/mf-inventory-portal 0.0.5

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 (284) hide show
  1. package/README.md +31 -0
  2. package/dist/App.vue.d.ts +2 -0
  3. package/dist/ApprovalView-CTQdDgGH.js +119 -0
  4. package/dist/BindingsDialog-DvX_DRsO.js +82 -0
  5. package/dist/BindingsPicker-CQIGhTCR.js +124 -0
  6. package/dist/BindingsTable-Da4BLkvc.js +122 -0
  7. package/dist/ChangeLocationComponent.vue_vue_type_script_setup_true_lang-DcixBOcX.js +97 -0
  8. package/dist/Entry.vue.d.ts +2 -0
  9. package/dist/FmMultiselectDialog.vue_vue_type_script_setup_true_lang-BXU7x6di.js +144 -0
  10. package/dist/IngredientBindedItem.vue_vue_type_script_setup_true_lang-CD89qCIa.js +49 -0
  11. package/dist/IngredientsView-2ZKdzsgI.js +739 -0
  12. package/dist/IntegrationView-BRWYO3VE.js +1172 -0
  13. package/dist/InventoryBindingForm.vue_vue_type_script_setup_true_lang-CnsDmPTe.js +240 -0
  14. package/dist/NumberPrecisionInput.vue_vue_type_script_setup_true_lang-DBK7mpQS.js +66 -0
  15. package/dist/PurchaseOrderPrintPreview-CH9gVYDg.js +152 -0
  16. package/dist/ReceiveRequestView-DQBqc3GF.js +1298 -0
  17. package/dist/RecipeView-DFG9Wkx-.js +594 -0
  18. package/dist/SingleColumnLayout.vue_vue_type_script_setup_true_lang-CFjO4TPG.js +53 -0
  19. package/dist/Standalone.vue.d.ts +2 -0
  20. package/dist/StockView-DLWMp_I5.js +1733 -0
  21. package/dist/SupplierView-CZhM2ie3.js +607 -0
  22. package/dist/TransferDetails.vue_vue_type_script_setup_true_lang-Ffe9bhq8.js +1027 -0
  23. package/dist/UnitView-C3XVSbJY.js +626 -0
  24. package/dist/WarehouseView-BntzAdz3.js +1139 -0
  25. package/dist/api/bill.d.ts +1364 -0
  26. package/dist/api/closing.d.ts +3 -0
  27. package/dist/api/error.d.ts +31 -0
  28. package/dist/api/food-market-hub.d.ts +38 -0
  29. package/dist/api/inventory.d.ts +176 -0
  30. package/dist/api/purchase-order.d.ts +13 -0
  31. package/dist/api/stock.d.ts +9 -0
  32. package/dist/api/supplier.d.ts +7 -0
  33. package/dist/api/type.d.ts +12 -0
  34. package/dist/api/warehouse.d.ts +7 -0
  35. package/dist/app-BzDhmCVx.js +36639 -0
  36. package/dist/app.d.ts +2 -0
  37. package/dist/app.js +5 -0
  38. package/dist/components/ChangeLocationComponent.vue.d.ts +2 -0
  39. package/dist/components/DeferableLoading.vue.d.ts +19 -0
  40. package/dist/components/DeferableLoadingProps.d.ts +4 -0
  41. package/dist/components/DeleteDialog.vue.d.ts +18 -0
  42. package/dist/components/FmCoordinateInput.vue.d.ts +24 -0
  43. package/dist/components/FmCoordinateInputProps.d.ts +23 -0
  44. package/dist/components/FmFilterableSelect.vue.d.ts +25 -0
  45. package/dist/components/FmFilterableSelectProps.d.ts +28 -0
  46. package/dist/components/FmMultiselectDialog.vue.d.ts +30 -0
  47. package/dist/components/FmMultiselectDialogProps.d.ts +16 -0
  48. package/dist/components/FmTableToolbar.vue.d.ts +49 -0
  49. package/dist/components/MultiSelectDialog.vue.d.ts +12 -0
  50. package/dist/components/MultiSelectDialogProps.d.ts +7 -0
  51. package/dist/components/NavigationTab.vue.d.ts +2 -0
  52. package/dist/components/NumberPrecisionInput.vue.d.ts +16 -0
  53. package/dist/components/NumberPrecisionInputProps.d.ts +12 -0
  54. package/dist/components/TableActionableRow.vue.d.ts +40 -0
  55. package/dist/components/UnitDisplayControl.vue.d.ts +12 -0
  56. package/dist/components/UnitDisplayControlProp.d.ts +7 -0
  57. package/dist/components/fm-components.type.d.ts +8 -0
  58. package/dist/components/form/form-mode.enum.d.ts +5 -0
  59. package/dist/components/icons/IconCommunity.vue.d.ts +2 -0
  60. package/dist/components/icons/IconDocumentation.vue.d.ts +2 -0
  61. package/dist/components/icons/IconEcosystem.vue.d.ts +2 -0
  62. package/dist/components/icons/IconSupport.vue.d.ts +2 -0
  63. package/dist/components/icons/IconTooling.vue.d.ts +2 -0
  64. package/dist/components/inventory-binding/InventoryBinding.vue.d.ts +145 -0
  65. package/dist/components/inventory-binding/InventoryBindingProps.d.ts +11 -0
  66. package/dist/components/map/CoordinateDialog.vue.d.ts +24 -0
  67. package/dist/components/map/GoogleMap.vue.d.ts +79 -0
  68. package/dist/components/map/coordinates.d.ts +6 -0
  69. package/dist/components/map/helper/coords-to-latlong.d.ts +8 -0
  70. package/dist/components/map/type.d.ts +27 -0
  71. package/dist/components/nested-multiselect/FmNestedMultiselectDialog.vue.d.ts +7 -0
  72. package/dist/components/nested-multiselect/FmNestedMultiselectDialogProps.d.ts +22 -0
  73. package/dist/components/nested-multiselect/helper/multiselect-utils.d.ts +2 -0
  74. package/dist/components/row-action.enum.d.ts +13 -0
  75. package/dist/components/shell/inventory/binding-dialog.vue.d.ts +84 -0
  76. package/dist/components/shell/inventory/binding-ui.test.d.ts +1 -0
  77. package/dist/components/shell/inventory/binding-ui.vue.d.ts +110 -0
  78. package/dist/components/shell/inventory/utils.d.ts +5 -0
  79. package/dist/components/ui-library/FmDateRangePickerChip.vue.d.ts +36 -0
  80. package/dist/components/ui-library/FmSpecialChip.vue.d.ts +79 -0
  81. package/dist/composable/defineApi.d.ts +18 -0
  82. package/dist/composable/useBreakpoints.d.ts +7 -0
  83. package/dist/composable/useIframe.d.ts +37 -0
  84. package/dist/composable/useSearch.d.ts +5 -0
  85. package/dist/composable/useTabStorage.d.ts +2 -0
  86. package/dist/composable/useToast.d.ts +36 -0
  87. package/dist/core.d.ts +12 -0
  88. package/dist/cypress/component/FmFilterableSelect.cy.d.ts +1 -0
  89. package/dist/cypress/component/FmNestedMultiselectDialog.cy.d.ts +1 -0
  90. package/dist/cypress/component/UnitDisplayControl.cy.d.ts +1 -0
  91. package/dist/cypress/component/receive-request/KDI-15-total-price-currency.cy.d.ts +2 -0
  92. package/dist/cypress/e2e/views/MenuV3.spec.cy.d.ts +0 -0
  93. package/dist/cypress/e2e/views/MenuV4.spec.cy.d.ts +0 -0
  94. package/dist/cypress/e2e/views/Root.spec.cy.d.ts +0 -0
  95. package/dist/cypress/e2e/views/StockView.spec.cy.d.ts +0 -0
  96. package/dist/cypress/support/commands.d.ts +0 -0
  97. package/dist/cypress/support/component.d.ts +10 -0
  98. package/dist/cypress/support/e2e.d.ts +1 -0
  99. package/dist/date2-C7HiAWQG.js +209 -0
  100. package/dist/dayjs.min-Db57WhI9.js +282 -0
  101. package/dist/decimal-D3a0BwVj.js +98 -0
  102. package/dist/empty-placeholder-wf6-BWE8.js +4 -0
  103. package/dist/extensions/array.d.ts +15 -0
  104. package/dist/favicon.ico +0 -0
  105. package/dist/fuzzy-BW8ZYsDG.js +41 -0
  106. package/dist/helper/address.d.ts +2 -0
  107. package/dist/helper/component.d.ts +4 -0
  108. package/dist/helper/core/country/codes.d.ts +255 -0
  109. package/dist/helper/core/country/utils.d.ts +8 -0
  110. package/dist/helper/core/id-to-date.d.ts +1 -0
  111. package/dist/helper/core/store/type.d.ts +2 -0
  112. package/dist/helper/country.d.ts +260 -0
  113. package/dist/helper/date.spec.d.ts +1 -0
  114. package/dist/helper/date2.d.ts +20 -0
  115. package/dist/helper/decimal.d.ts +15 -0
  116. package/dist/helper/decimal.spec.d.ts +1 -0
  117. package/dist/helper/export.d.ts +12 -0
  118. package/dist/helper/form.d.ts +5 -0
  119. package/dist/helper/inventory.d.ts +1 -0
  120. package/dist/helper/iteration.d.ts +15 -0
  121. package/dist/helper/number.d.ts +27 -0
  122. package/dist/helper/number.spec.d.ts +1 -0
  123. package/dist/helper/object.d.ts +36 -0
  124. package/dist/helper/object.spec.d.ts +1 -0
  125. package/dist/helper/rules.d.ts +22 -0
  126. package/dist/helper/search.d.ts +21 -0
  127. package/dist/helper/semver.d.ts +20 -0
  128. package/dist/helper/semver.spec.d.ts +1 -0
  129. package/dist/helper/type.d.ts +8 -0
  130. package/dist/helper/url.d.ts +7 -0
  131. package/dist/helper/validate.d.ts +70 -0
  132. package/dist/helper/xlsx.util.d.ts +8 -0
  133. package/dist/helper/zod.d.ts +21 -0
  134. package/dist/id-to-date-ReZIpUDw.js +30 -0
  135. package/dist/index-D46it8Rk.js +12956 -0
  136. package/dist/init-date-range-M3Q03-Fd.js +21 -0
  137. package/dist/is-linked-ingredient-error-C6AghEwR.js +37 -0
  138. package/dist/layout/InventoryLayout.vue.d.ts +2 -0
  139. package/dist/layout/SingleColumnLayout.vue.d.ts +55 -0
  140. package/dist/layout/components/NavigationButton.vue.d.ts +22 -0
  141. package/dist/layout/layout-routes.d.ts +7 -0
  142. package/dist/layout/type.d.ts +17 -0
  143. package/dist/layout-BvUjg6JS.js +151 -0
  144. package/dist/locales/en/common.json +7 -0
  145. package/dist/main.d.ts +2 -0
  146. package/dist/router/index.d.ts +5 -0
  147. package/dist/router/name.d.ts +17 -0
  148. package/dist/router/shared.d.ts +11 -0
  149. package/dist/row-action.enum-BwQbURNh.js +28 -0
  150. package/dist/rules-DHfAMDW3.js +86 -0
  151. package/dist/stores/api.d.ts +10 -0
  152. package/dist/stores/env.d.ts +5 -0
  153. package/dist/stores/feature.d.ts +9 -0
  154. package/dist/stores/googlemap.d.ts +37 -0
  155. package/dist/stores/helper/generate-backend-urls.d.ts +8 -0
  156. package/dist/stores/inventory.d.ts +1983 -0
  157. package/dist/stores/layout.d.ts +5 -0
  158. package/dist/stores/location.d.ts +1898 -0
  159. package/dist/stores/route.d.ts +12 -0
  160. package/dist/stores/stock.d.ts +58 -0
  161. package/dist/stores/supplier.d.ts +30 -0
  162. package/dist/stores/warehouse.d.ts +88 -0
  163. package/dist/style.css +1 -0
  164. package/dist/supplier-DTiiOLtg.js +65 -0
  165. package/dist/tsconfig.app.tsbuildinfo +1 -0
  166. package/dist/use-inventory-binding-dialog-B6JO7050.js +109 -0
  167. package/dist/views/InventoryView.vue.d.ts +2 -0
  168. package/dist/views/SelectBussinessDialog.vue.d.ts +2 -0
  169. package/dist/views/approval/ApprovalView.vue.d.ts +2 -0
  170. package/dist/views/dev/ComponentPreview.vue.d.ts +2 -0
  171. package/dist/views/dev/components/CoordinateTest.vue.d.ts +2 -0
  172. package/dist/views/dev/components/DateRange.vue.d.ts +2 -0
  173. package/dist/views/dev/components/FmSelectTest.vue.d.ts +2 -0
  174. package/dist/views/dev/components/InventoryIframe.vue.d.ts +2 -0
  175. package/dist/views/dev/components/LayoutDev.vue.d.ts +2 -0
  176. package/dist/views/dev/components/MfCommontTest.vue.d.ts +2 -0
  177. package/dist/views/dev/components/NestedSelection.vue.d.ts +2 -0
  178. package/dist/views/dev/components/NumberStepper.vue.d.ts +2 -0
  179. package/dist/views/dev/components/TabStorageTest.vue.d.ts +2 -0
  180. package/dist/views/dev/helpers/debug.d.ts +22 -0
  181. package/dist/views/dev/helpers/nested-options.d.ts +60 -0
  182. package/dist/views/dev/helpers/pinia-test.d.ts +9 -0
  183. package/dist/views/home/HomeView.vue.d.ts +2 -0
  184. package/dist/views/iframe/inventory-bindings/bindings-dialog/BindingsDialog.vue.d.ts +2 -0
  185. package/dist/views/iframe/inventory-bindings/bindings-picker/BindingsPicker.vue.d.ts +2 -0
  186. package/dist/views/iframe/inventory-bindings/bindings-table/BindingsTable.vue.d.ts +2 -0
  187. package/dist/views/ingredients/IngredientsView.vue.d.ts +2 -0
  188. package/dist/views/ingredients/components/cannot-delete/CannotDelete.vue.d.ts +30 -0
  189. package/dist/views/ingredients/components/convert/ConvertForm.vue.d.ts +54 -0
  190. package/dist/views/ingredients/components/convert/ConvertFormProps.d.ts +8 -0
  191. package/dist/views/ingredients/components/ingredient-binded-item/IngredientBindedItem.vue.d.ts +12 -0
  192. package/dist/views/ingredients/components/ingredient-binded-item/IngredientBindedItemProps.d.ts +5 -0
  193. package/dist/views/ingredients/components/ingredient-dialog/IngredientDialog.vue.d.ts +31 -0
  194. package/dist/views/ingredients/components/ingredient-dialog/IngredientDialogProps.d.ts +9 -0
  195. package/dist/views/ingredients/components/ingredient-form/IngredientForm.vue.d.ts +104 -0
  196. package/dist/views/ingredients/components/ingredient-form/IngredientFormProps.d.ts +10 -0
  197. package/dist/views/ingredients/components/inventory-binding/InventoryBindingForm.vue.d.ts +88 -0
  198. package/dist/views/ingredients/components/inventory-binding/composables/use-inventory-binding-dialog.d.ts +4 -0
  199. package/dist/views/ingredients/components/inventory-binding/util.d.ts +7 -0
  200. package/dist/views/ingredients/composables/use-ingredient-form.d.ts +8 -0
  201. package/dist/views/ingredients/composables/use-ingredient-table.d.ts +46 -0
  202. package/dist/views/ingredients/helper/is-linked-ingredient-error.d.ts +7 -0
  203. package/dist/views/integration/IntegrationView.vue.d.ts +2 -0
  204. package/dist/views/integration/components/ApplyAddon.vue.d.ts +379 -0
  205. package/dist/views/integration/components/ApplyProduct.vue.d.ts +303 -0
  206. package/dist/views/integration/components/ApplyProductDialog.vue.d.ts +277 -0
  207. package/dist/views/integration/components/ApplyProductDialogProps.d.ts +17 -0
  208. package/dist/views/integration/components/ApplyProductDialogV4.vue.d.ts +277 -0
  209. package/dist/views/integration/helper/menu.d.ts +36 -0
  210. package/dist/views/receive-request/ReceiveRequestView.vue.d.ts +2 -0
  211. package/dist/views/receive-request/components/supplier-price-history/SupplierPriceHistory.vue.d.ts +12 -0
  212. package/dist/views/receive-request/components/supplier-price-history/SupplierPriceHistoryProps.d.ts +11 -0
  213. package/dist/views/receive-request/components/transfer-details/TransferDetails.vue.d.ts +18 -0
  214. package/dist/views/receive-request/components/transfer-details/TransferDetailsProps.d.ts +12 -0
  215. package/dist/views/receive-request/components/transfer-dialog/TransferDialog.vue.d.ts +22 -0
  216. package/dist/views/receive-request/components/transfer-dialog/TransferDialogProps.d.ts +11 -0
  217. package/dist/views/receive-request/components/transfer-form/TransferForm.vue.d.ts +450 -0
  218. package/dist/views/receive-request/components/transfer-form/TransferFormProps.d.ts +10 -0
  219. package/dist/views/receive-request/composables/use-receive-request-form.d.ts +369 -0
  220. package/dist/views/receive-request/composables/use-receive-request-table.d.ts +1202 -0
  221. package/dist/views/receive-request/constants/dialog-templates.d.ts +8 -0
  222. package/dist/views/receive-request/constants/purchase-order-transaction-type.d.ts +4 -0
  223. package/dist/views/receive-request/constants/purchase-row-actions.d.ts +2 -0
  224. package/dist/views/receive-request/helper/format-time-from-id.d.ts +2 -0
  225. package/dist/views/receive-request/helper/format-unit-display.d.ts +6 -0
  226. package/dist/views/receive-request/helper/get-received-amount.d.ts +2 -0
  227. package/dist/views/receive-request/helper/init-date-range.d.ts +8 -0
  228. package/dist/views/receive-request/helper/print-po.d.ts +2 -0
  229. package/dist/views/receive-request/helper/status-to-background.d.ts +2 -0
  230. package/dist/views/receive-request/print-preview/PurchaseOrderPrintPreview.vue.d.ts +47 -0
  231. package/dist/views/recipe/RecipeView.vue.d.ts +2 -0
  232. package/dist/views/recipe/components/recipe-dialog/RecipeDialog.vue.d.ts +31 -0
  233. package/dist/views/recipe/components/recipe-dialog/RecipeDialogProps.d.ts +9 -0
  234. package/dist/views/recipe/components/recipe-form/RecipeForm.vue.d.ts +62 -0
  235. package/dist/views/recipe/components/recipe-form/RecipeFormProps.d.ts +10 -0
  236. package/dist/views/recipe/composables/use-recipe-form.d.ts +9 -0
  237. package/dist/views/recipe/composables/use-recipe-table.d.ts +11 -0
  238. package/dist/views/recipe/helper/export-recipe.d.ts +1 -0
  239. package/dist/views/stock/StockView.vue.d.ts +2 -0
  240. package/dist/views/stock/components/StockHistory.vue.d.ts +17 -0
  241. package/dist/views/stock/components/StockHistoryProps.d.ts +7 -0
  242. package/dist/views/stock/components/StockRecordCard.vue.d.ts +712 -0
  243. package/dist/views/stock/components/dialog/AdjustSkuDialog.vue.d.ts +22 -0
  244. package/dist/views/stock/components/dialog/AdjustSkuDialogProps.d.ts +8 -0
  245. package/dist/views/stock/components/dialog/AdjustedItemForm.vue.d.ts +164 -0
  246. package/dist/views/stock/components/dialog/AdjustedItemFormProps.d.ts +8 -0
  247. package/dist/views/stock/components/dialog/ConvertSkuDialog.vue.d.ts +22 -0
  248. package/dist/views/stock/components/dialog/ConvertSkuDialogProps.d.ts +9 -0
  249. package/dist/views/stock/components/dialog/constant/adjustment-type-options.d.ts +7 -0
  250. package/dist/views/stock/components/dialog/helper/adjust.d.ts +3 -0
  251. package/dist/views/stock/components/dialog/helper/form-adjust.d.ts +10 -0
  252. package/dist/views/stock/composables/use-stock-table.d.ts +12 -0
  253. package/dist/views/stock/helper/compute-summary-total-test.d.ts +1 -0
  254. package/dist/views/stock/helper/compute-summary-total.d.ts +1 -0
  255. package/dist/views/stock/helper/compute-summary-total.spec.d.ts +1 -0
  256. package/dist/views/stock/helper/format-date-from-id.d.ts +2 -0
  257. package/dist/views/stock/helper/on-click-export-excel.d.ts +9 -0
  258. package/dist/views/stock/helper/stock-row-action.d.ts +13 -0
  259. package/dist/views/stock/type.d.ts +9 -0
  260. package/dist/views/supplier/SupplierView.vue.d.ts +2 -0
  261. package/dist/views/supplier/components/SupplierDialog.vue.d.ts +22 -0
  262. package/dist/views/supplier/components/SupplierDialogProps.d.ts +10 -0
  263. package/dist/views/supplier/components/SupplierForm.vue.d.ts +58 -0
  264. package/dist/views/supplier/components/SupplierFormProps.d.ts +8 -0
  265. package/dist/views/supplier/composables/use-supplier-table.d.ts +22 -0
  266. package/dist/views/unit/UnitView.vue.d.ts +2 -0
  267. package/dist/views/unit/components/unit-dialog/UnitDialog.vue.d.ts +31 -0
  268. package/dist/views/unit/components/unit-dialog/UnitDialogProps.d.ts +9 -0
  269. package/dist/views/unit/components/unit-form/UnitForm.vue.d.ts +50 -0
  270. package/dist/views/unit/components/unit-form/UnitFormProps.d.ts +10 -0
  271. package/dist/views/unit/components/unit-summary/UnitSummary.vue.d.ts +43 -0
  272. package/dist/views/unit/components/unit-used-by/UnitUsedBy.vue.d.ts +12 -0
  273. package/dist/views/unit/components/unit-used-by/UnitUsedByProps.d.ts +3 -0
  274. package/dist/views/unit/composables/use-unit-form.d.ts +8 -0
  275. package/dist/views/unit/composables/use-unit-table.d.ts +19 -0
  276. package/dist/views/unit/type.d.ts +2 -0
  277. package/dist/views/warehouse/WarehouseView.vue.d.ts +2 -0
  278. package/dist/views/warehouse/components/WarehouseDialog.vue.d.ts +22 -0
  279. package/dist/views/warehouse/components/WarehouseDialogProps.d.ts +10 -0
  280. package/dist/views/warehouse/components/WarehouseForm.vue.d.ts +174 -0
  281. package/dist/views/warehouse/components/WarehouseFormProps.d.ts +8 -0
  282. package/dist/views/warehouse/composables/use-warehouse-table.d.ts +12 -0
  283. package/dist/xlsx-BljO4Lx2.js +15510 -0
  284. package/package.json +93 -0
@@ -0,0 +1,739 @@
1
+ import { ref as B, defineComponent as J, computed as d, resolveComponent as b, openBlock as k, createBlock as R, withCtx as x, createVNode as i, createElementBlock as z, Fragment as j, createElementVNode as D, createCommentVNode as G, onMounted as pe, watch as ve, unref as h, normalizeClass as fe, createTextVNode as ge, toDisplayString as be, renderList as Ve, isRef as ee, normalizeStyle as _e, Teleport as ye, normalizeProps as Fe, guardReactiveProps as he } from "vue";
2
+ import { u as Q, c as ae, S as Se, F as L, a as ne, b as ke } from "./app-BzDhmCVx.js";
3
+ import { useDialog as we, useSnackbar as se, useProxiedModel as te, useBreakpoints as Ie } from "@feedmepos/ui-library";
4
+ import { i as xe, _ as Ce } from "./is-linked-ingredient-error-C6AghEwR.js";
5
+ import { F as I, D as le, R as Y } from "./row-action.enum-BwQbURNh.js";
6
+ import { c as Ee, _ as Me, F as oe, u as Ae } from "./layout-BvUjg6JS.js";
7
+ import { _ as De } from "./SingleColumnLayout.vue_vue_type_script_setup_true_lang-CFjO4TPG.js";
8
+ import { R as X, U as Ue } from "./rules-DHfAMDW3.js";
9
+ import { g as Re } from "./use-inventory-binding-dialog-B6JO7050.js";
10
+ import { _ as $e } from "./InventoryBindingForm.vue_vue_type_script_setup_true_lang-CnsDmPTe.js";
11
+ import { _ as Z } from "./IngredientBindedItem.vue_vue_type_script_setup_true_lang-CD89qCIa.js";
12
+ function Te() {
13
+ const C = we(), y = se(), p = Q(), t = B(!1), l = B();
14
+ function o() {
15
+ const s = {
16
+ unit: {},
17
+ mode: I.CREATE,
18
+ show: !0,
19
+ "onUpdate:show"(v) {
20
+ l.value.show = v;
21
+ }
22
+ };
23
+ l.value = s;
24
+ }
25
+ async function m(s) {
26
+ const v = {
27
+ unit: ae(s),
28
+ mode: I.UPDATE,
29
+ show: !0,
30
+ "onUpdate:show"(u) {
31
+ l.value.show = u;
32
+ }
33
+ };
34
+ l.value = v;
35
+ }
36
+ async function w(s) {
37
+ t.value = !0;
38
+ try {
39
+ await p.deleteSku(s), y.open({
40
+ title: "Success",
41
+ message: `Deleted ${s.name}`,
42
+ type: "success"
43
+ });
44
+ } catch (v) {
45
+ v instanceof Se && xe(v) ? C.open({
46
+ title: "Cannot delete ingredient",
47
+ contentComponent: Ce,
48
+ contentComponentProps: {
49
+ subject: (s == null ? void 0 : s.name) ?? "",
50
+ items: v.errorResponse.message
51
+ },
52
+ secondaryActions: {
53
+ text: "Close",
54
+ close: !0
55
+ }
56
+ }) : console.log("unable to delete ingredient", v), y.open({
57
+ title: `Cannot delete ${s.name}`,
58
+ message: "Please try again.",
59
+ type: "error"
60
+ }), console.error("failed to delete ingredient", v);
61
+ } finally {
62
+ t.value = !1;
63
+ }
64
+ }
65
+ function E(s) {
66
+ C.open({
67
+ title: `Delete ${(s == null ? void 0 : s.name) ?? "ingredient"}?`,
68
+ closeButton: !1,
69
+ message: "You may not be able to delete this ingredient if it is linked in any of the inventory modules.",
70
+ primaryActions: {
71
+ text: "Delete",
72
+ close: !0,
73
+ variant: "destructive"
74
+ },
75
+ secondaryActions: {
76
+ text: "Cancel",
77
+ close: !0
78
+ }
79
+ }).onPrimary(() => w(s));
80
+ }
81
+ return {
82
+ createIngredient: o,
83
+ updateIngredient: m,
84
+ deleteIngredient: E,
85
+ ingredientDialogProps: l,
86
+ ingredientViewLoading: t
87
+ };
88
+ }
89
+ function Be({
90
+ updateIngredient: C,
91
+ deleteIngredient: y
92
+ }) {
93
+ async function p(l, o) {
94
+ const m = ae(o);
95
+ if (l === Y.Edit) {
96
+ await C(m);
97
+ return;
98
+ }
99
+ if (l === Y.Delete) {
100
+ await y(m);
101
+ return;
102
+ }
103
+ }
104
+ return { columnDefs: [
105
+ {
106
+ accessorKey: "code",
107
+ header: "Code",
108
+ enableSorting: !0,
109
+ size: 300
110
+ },
111
+ {
112
+ accessorKey: "name",
113
+ header: "Name",
114
+ enableSorting: !0,
115
+ size: 300
116
+ },
117
+ {
118
+ accessorFn: (l) => {
119
+ var o;
120
+ if (l.trackingMeasurement) {
121
+ const m = (o = l.unit.measurements) == null ? void 0 : o.find(
122
+ (w) => w.id === l.trackingMeasurement
123
+ );
124
+ if (m)
125
+ return `${m.name} (${m.abbrev})`;
126
+ }
127
+ return `${l.unit.name} (${l.unit.abbrev})`;
128
+ },
129
+ header: "Unit",
130
+ enableSorting: !1,
131
+ size: "auto"
132
+ },
133
+ {
134
+ id: "action",
135
+ header: "",
136
+ cell(l) {
137
+ return Ee(
138
+ [le[Y.Edit], le[Y.Delete]],
139
+ (o) => {
140
+ p(o, l.row.original);
141
+ }
142
+ );
143
+ },
144
+ enableSorting: !1,
145
+ size: 40,
146
+ meta: {
147
+ cellClass: "",
148
+ headerClass: ""
149
+ }
150
+ }
151
+ ] };
152
+ }
153
+ const Pe = /* @__PURE__ */ J({
154
+ __name: "ConvertForm",
155
+ props: {
156
+ modelValue: {},
157
+ rootValue: {},
158
+ disabled: { type: Boolean }
159
+ },
160
+ emits: ["update:modelValue"],
161
+ setup(C, { emit: y }) {
162
+ const p = C, t = d(() => {
163
+ var u;
164
+ return (u = p.rootValue) == null ? void 0 : u.unit;
165
+ }), l = d(() => {
166
+ var u;
167
+ return (u = p.rootValue) == null ? void 0 : u._id;
168
+ }), o = y, m = d({
169
+ get() {
170
+ return !!p.modelValue;
171
+ },
172
+ set(u) {
173
+ u ? o("update:modelValue", {
174
+ measurement: null,
175
+ inventoryBindings: []
176
+ }) : o("update:modelValue", null);
177
+ }
178
+ }), w = d(() => Re(t.value));
179
+ function E(u) {
180
+ const c = p.modelValue ?? {};
181
+ c.measurement = u ? `${u}` : null, o("update:modelValue", c);
182
+ }
183
+ function s(u) {
184
+ const c = p.modelValue ?? {};
185
+ c.inventoryBindings = u, o("update:modelValue", c);
186
+ }
187
+ const v = d(() => {
188
+ if (!p.modelValue) return null;
189
+ const u = p.modelValue;
190
+ return u.measurement ? w.value.find((c) => c.value === u.measurement) ?? null : w.value.find((c) => c.value === null) ?? null;
191
+ });
192
+ return (u, c) => {
193
+ const $ = b("FmSwitch"), V = b("FmSelect"), _ = b("FmCard");
194
+ return k(), R(_, {
195
+ variant: "outlined",
196
+ class: "p-16 flex flex-col gap-16"
197
+ }, {
198
+ default: x(() => {
199
+ var M, S;
200
+ return [
201
+ i($, {
202
+ value: "",
203
+ "model-value": m.value,
204
+ "onUpdate:modelValue": c[0] || (c[0] = (F) => m.value = F),
205
+ label: "Convertible",
206
+ sublabel: "Convertible from other recipe or ingredients",
207
+ labelPlacement: "right"
208
+ }, null, 8, ["model-value"]),
209
+ m.value ? (k(), z(j, { key: 0 }, [
210
+ D("div", null, [
211
+ i(V, {
212
+ label: "Recipes and ingredients convert to",
213
+ modelValue: (M = v.value) == null ? void 0 : M.value,
214
+ "onUpdate:modelValue": E,
215
+ items: w.value
216
+ }, null, 8, ["modelValue", "items"])
217
+ ]),
218
+ i($e, {
219
+ id: l.value,
220
+ "model-value": ((S = u.modelValue) == null ? void 0 : S.inventoryBindings) ?? [],
221
+ "onUpdate:modelValue": s,
222
+ "exclude-binding-id": l.value
223
+ }, null, 8, ["id", "model-value", "exclude-binding-id"])
224
+ ], 64)) : G("", !0)
225
+ ];
226
+ }),
227
+ _: 1
228
+ });
229
+ };
230
+ }
231
+ }), Oe = { class: "col-span-2 mt-16" }, Le = {
232
+ key: 0,
233
+ 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"
234
+ }, Ne = /* @__PURE__ */ J({
235
+ __name: "IngredientForm",
236
+ props: {
237
+ mode: {},
238
+ modelValue: {},
239
+ disabled: { type: Boolean }
240
+ },
241
+ emits: ["update:modelValue", "click:submit"],
242
+ setup(C, { expose: y, emit: p }) {
243
+ var O;
244
+ const t = C, l = p, o = Q();
245
+ function m(e) {
246
+ if (e.length === 0) return;
247
+ const n = e[0], a = t.modelValue ?? {
248
+ unit: o.units.find((r) => r)
249
+ };
250
+ a.unit || (a.unit = n, l("update:modelValue", a));
251
+ }
252
+ pe(() => {
253
+ m(o.units);
254
+ }), ve([() => o.units], ([e]) => {
255
+ m(e);
256
+ });
257
+ function w() {
258
+ l("click:submit");
259
+ }
260
+ const E = d({
261
+ get() {
262
+ var e;
263
+ return ((e = t.modelValue) == null ? void 0 : e.code) ?? "";
264
+ },
265
+ set(e) {
266
+ const n = t.modelValue ? {
267
+ ...t.modelValue
268
+ } : {};
269
+ n.code = e, l("update:modelValue", n);
270
+ }
271
+ }), s = d({
272
+ get() {
273
+ var e;
274
+ return ((e = t.modelValue) == null ? void 0 : e.name) ?? "";
275
+ },
276
+ set(e) {
277
+ const n = t.modelValue ? {
278
+ ...t.modelValue
279
+ } : {};
280
+ n.name = e, l("update:modelValue", n);
281
+ }
282
+ }), v = d(() => {
283
+ var n, a, r;
284
+ const e = ((n = t.modelValue) == null ? void 0 : n.unit) ?? o.units.find((f) => f);
285
+ return e ? {
286
+ _id: e._id,
287
+ measurement: (a = t.modelValue) == null ? void 0 : a.trackingMeasurement,
288
+ name: ((r = e.measurements.find((f) => {
289
+ var g;
290
+ return f.id === ((g = t.modelValue) == null ? void 0 : g.trackingMeasurement);
291
+ })) == null ? void 0 : r.name) ?? e.name
292
+ } : null;
293
+ }), u = d(
294
+ () => o.units.flatMap(({ name: e, _id: n, abbrev: a, measurements: r }) => [
295
+ {
296
+ label: `${e}`,
297
+ value: null,
298
+ displayAsSection: !0
299
+ },
300
+ {
301
+ label: `${e} (${a})`,
302
+ value: { _id: n },
303
+ displayAsSection: !1
304
+ },
305
+ ...r.map(({ id: f, name: g, abbrev: N }) => ({
306
+ label: `${g} (${N})`,
307
+ value: { _id: n, measurement: f },
308
+ displayAsSection: !1
309
+ }))
310
+ ])
311
+ );
312
+ function c(e) {
313
+ var n, a, r, f, g;
314
+ return ((a = (n = t.modelValue) == null ? void 0 : n.unit) == null ? void 0 : a._id) === ((r = e.value) == null ? void 0 : r._id) && ((f = t.modelValue) == null ? void 0 : f.trackingMeasurement) === ((g = e.value) == null ? void 0 : g.measurement);
315
+ }
316
+ function $(e) {
317
+ if (!e) return;
318
+ const { _id: n, measurement: a } = e, r = a || void 0, f = o.units.find((N) => N._id === n);
319
+ if (!f)
320
+ return;
321
+ const g = t.modelValue ?? {};
322
+ g.unit = f, g.trackingMeasurement = r, g.convert && (g.convert.measurement = r || null), l("update:modelValue", g);
323
+ }
324
+ const V = d({
325
+ get() {
326
+ var e;
327
+ return ((e = t.modelValue) == null ? void 0 : e.convert) ?? null;
328
+ },
329
+ set(e) {
330
+ const n = t.modelValue ? {
331
+ ...t.modelValue
332
+ } : {};
333
+ e ? n.convert = e : n.convert = null, l("update:modelValue", n);
334
+ }
335
+ }), _ = d(() => L.options.filter(
336
+ (e) => e === L.enum.FIFO || e === L.enum.WAVG
337
+ ).map((e) => {
338
+ function n(a) {
339
+ switch (a) {
340
+ case L.enum.WAVG:
341
+ return "Weighted Average (WAVG)";
342
+ case L.enum.FIFO:
343
+ return "First In First Out (FIFO)";
344
+ case L.enum.LIFO:
345
+ return "Last In First Out (LIFO)";
346
+ case L.enum.FEFO:
347
+ return "First Expired First Out (FEFO)";
348
+ }
349
+ return "";
350
+ }
351
+ return {
352
+ label: n(e),
353
+ value: e
354
+ };
355
+ })), M = d({
356
+ get() {
357
+ var e;
358
+ return ((e = t.modelValue) == null ? void 0 : e.valuation) ?? "WAVG";
359
+ },
360
+ set(e) {
361
+ const n = t.modelValue ? {
362
+ ...t.modelValue
363
+ } : {};
364
+ n.valuation = e, l("update:modelValue", n);
365
+ }
366
+ }), S = B();
367
+ y({
368
+ validateInputs: () => {
369
+ var e, n;
370
+ (n = (e = S.value) == null ? void 0 : e.validateInputs) == null || n.call(e);
371
+ },
372
+ resetInputsValidation: () => {
373
+ var e, n;
374
+ (n = (e = S.value) == null ? void 0 : e.resetInputsValidation) == null || n.call(e);
375
+ },
376
+ resetInputs: () => {
377
+ var e, n;
378
+ (n = (e = S.value) == null ? void 0 : e.resetInputs) == null || n.call(e);
379
+ }
380
+ });
381
+ const F = B(!1), q = d(
382
+ () => {
383
+ var e, n, a;
384
+ return (e = t.modelValue) != null && e._id ? ((a = o.menu.bindedBySkuId[(n = t.modelValue) == null ? void 0 : n._id]) == null ? void 0 : a.filter(
385
+ (r) => r.from === "INGREDIENT"
386
+ )) ?? [] : [];
387
+ }
388
+ ), T = d(
389
+ () => {
390
+ var e, n, a;
391
+ return (e = t.modelValue) != null && e._id ? ((a = o.menu.bindedBySkuId[(n = t.modelValue) == null ? void 0 : n._id]) == null ? void 0 : a.filter(
392
+ (r) => r.from === "RECIPE"
393
+ )) ?? [] : [];
394
+ }
395
+ ), P = d(
396
+ () => {
397
+ var e, n, a;
398
+ return (e = t.modelValue) != null && e._id ? ((a = o.menu.bindedBySkuId[(n = t.modelValue) == null ? void 0 : n._id]) == null ? void 0 : a.filter((r) => r.from === "MENU")) ?? [] : [];
399
+ }
400
+ ), H = d(
401
+ () => o.skus.map((e) => ({ label: e.name, value: e.code }))
402
+ ), W = B((O = t.modelValue) == null ? void 0 : O.code);
403
+ function K(e) {
404
+ var a;
405
+ const n = e.el;
406
+ n && ((a = n.querySelector("[x-should-scroll-into=true]")) == null || a.scrollIntoView());
407
+ }
408
+ return (e, n) => {
409
+ const a = b("FmTextField"), r = b("FmSelect"), f = b("FmLabel"), g = b("FmField"), N = b("FmMenuHeader"), ue = b("FmMenuDivider"), re = b("FmMenuItem"), ie = b("FmMenu"), de = b("FmFormGroup"), me = b("FmSwitch"), ce = b("FmForm");
410
+ return k(), R(ce, {
411
+ disabled: e.disabled,
412
+ ref_key: "formRef",
413
+ ref: S,
414
+ class: "grid grid-cols-2 gap-24",
415
+ onValidationSuccess: w
416
+ }, {
417
+ default: x(() => [
418
+ i(a, {
419
+ label: "Code",
420
+ "model-value": E.value,
421
+ "onUpdate:modelValue": n[0] || (n[0] = (A) => E.value = A),
422
+ rules: [h(X)(), h(Ue)(H.value, W.value)],
423
+ "label-mark": "required"
424
+ }, null, 8, ["model-value", "rules"]),
425
+ i(a, {
426
+ label: "Name",
427
+ "model-value": s.value,
428
+ "onUpdate:modelValue": n[1] || (n[1] = (A) => s.value = A),
429
+ rules: [h(X)()],
430
+ "label-mark": "required"
431
+ }, null, 8, ["model-value", "rules"]),
432
+ i(r, {
433
+ class: "col-span-2",
434
+ "model-value": M.value,
435
+ "onUpdate:modelValue": n[2] || (n[2] = (A) => M.value = A),
436
+ label: "Valuation Method",
437
+ items: _.value
438
+ }, null, 8, ["model-value", "items"]),
439
+ i(de, {
440
+ class: "col-span-2",
441
+ "model-value": v.value,
442
+ rules: [h(X)()],
443
+ "label-mark": "required"
444
+ }, {
445
+ label: x(() => [
446
+ i(f, { label: "Unit" })
447
+ ]),
448
+ default: x(({ invalid: A }) => [
449
+ i(ie, null, {
450
+ "menu-button": x(() => [
451
+ i(g, {
452
+ class: fe([
453
+ "fm-typo-en-body-lg-400",
454
+ {
455
+ "text-fm-color-typo-primary": !e.disabled,
456
+ "text-fm-color-typo-disabled": e.disabled
457
+ }
458
+ ]),
459
+ invalid: A,
460
+ "append-icon": "expand_more"
461
+ }, {
462
+ default: x(() => {
463
+ var U;
464
+ return [
465
+ ge(be((U = v.value) == null ? void 0 : U.name), 1)
466
+ ];
467
+ }),
468
+ _: 2
469
+ }, 1032, ["class", "invalid"])
470
+ ]),
471
+ default: x(() => [
472
+ D("div", {
473
+ class: "overflow-x-hidden overflow-y-auto max-h-[300px]",
474
+ onVnodeMounted: K
475
+ }, [
476
+ (k(!0), z(j, null, Ve(u.value, (U) => (k(), z(j, {
477
+ key: U.label
478
+ }, [
479
+ U.displayAsSection ? (k(), z(j, { key: 0 }, [
480
+ i(N, {
481
+ label: U.label
482
+ }, null, 8, ["label"]),
483
+ i(ue)
484
+ ], 64)) : (k(), R(re, {
485
+ key: 1,
486
+ label: U.label,
487
+ "model-value": c(U),
488
+ onClick: (Je) => $(U.value),
489
+ "x-should-scroll-into": `${c(U)}`
490
+ }, null, 8, ["label", "model-value", "onClick", "x-should-scroll-into"]))
491
+ ], 64))), 128))
492
+ ], 512)
493
+ ]),
494
+ _: 2
495
+ }, 1024)
496
+ ]),
497
+ _: 1
498
+ }, 8, ["model-value", "rules"]),
499
+ D("div", Oe, [
500
+ i(Pe, {
501
+ "model-value": V.value,
502
+ "onUpdate:modelValue": n[3] || (n[3] = (A) => V.value = A),
503
+ "root-value": e.modelValue
504
+ }, null, 8, ["model-value", "root-value"])
505
+ ]),
506
+ e.mode !== h(I).CREATE ? (k(), z("div", Le, [
507
+ D("div", null, [
508
+ i(me, {
509
+ label: "Show binded items",
510
+ modelValue: F.value,
511
+ "onUpdate:modelValue": n[4] || (n[4] = (A) => F.value = A),
512
+ "label-placement": "right"
513
+ }, null, 8, ["modelValue"])
514
+ ]),
515
+ F.value && q.value.length ? (k(), R(Z, {
516
+ key: 0,
517
+ name: "Ingredient",
518
+ bindings: q.value
519
+ }, null, 8, ["bindings"])) : G("", !0),
520
+ F.value && T.value.length ? (k(), R(Z, {
521
+ key: 1,
522
+ name: "Recipe",
523
+ bindings: T.value
524
+ }, null, 8, ["bindings"])) : G("", !0),
525
+ F.value && P.value.length ? (k(), R(Z, {
526
+ key: 2,
527
+ name: "Menu",
528
+ bindings: P.value
529
+ }, null, 8, ["bindings"])) : G("", !0)
530
+ ])) : G("", !0)
531
+ ]),
532
+ _: 1
533
+ }, 8, ["disabled"]);
534
+ };
535
+ }
536
+ }), ze = { class: "flex gap-4" }, Ge = /* @__PURE__ */ J({
537
+ __name: "IngredientDialog",
538
+ props: {
539
+ show: { type: Boolean },
540
+ unit: {},
541
+ mode: { default: I.READ }
542
+ },
543
+ emits: ["update:show"],
544
+ setup(C) {
545
+ const y = C, p = Q(), t = se(), l = te(y, "show"), o = te(y, "unit"), m = d(() => {
546
+ switch (y.mode) {
547
+ case I.READ:
548
+ return "View Ingredient";
549
+ case I.UPDATE:
550
+ return "Edit Ingredient";
551
+ case I.CREATE:
552
+ return "Add Ingredient";
553
+ }
554
+ return "";
555
+ }), w = d(() => {
556
+ switch (y.mode) {
557
+ case I.READ:
558
+ return "";
559
+ case I.UPDATE:
560
+ return "Save";
561
+ case I.CREATE:
562
+ return "Add";
563
+ }
564
+ return "";
565
+ }), E = B(), s = B(!1);
566
+ async function v() {
567
+ s.value = !0;
568
+ try {
569
+ await p.createSku(o.value), l.value = !1, t.open({
570
+ title: "Success",
571
+ message: "Created " + o.value.name,
572
+ type: "success"
573
+ });
574
+ } catch (V) {
575
+ V instanceof ne || t.open({
576
+ title: "Failed to create ingredient",
577
+ message: "Please try again",
578
+ type: "error"
579
+ });
580
+ } finally {
581
+ s.value = !1;
582
+ }
583
+ }
584
+ async function u() {
585
+ s.value = !0;
586
+ try {
587
+ await p.updateSku(o.value), s.value = !1, l.value = !1, t.open({
588
+ title: "Success",
589
+ message: "Updated " + o.value.name,
590
+ type: "success"
591
+ });
592
+ } catch (V) {
593
+ V instanceof ne || t.open({
594
+ title: "Failed to update ingredient",
595
+ message: "Please try again",
596
+ type: "error"
597
+ });
598
+ } finally {
599
+ s.value = !1;
600
+ }
601
+ }
602
+ function c() {
603
+ var V, _;
604
+ (_ = (V = E.value) == null ? void 0 : V.validateInputs) == null || _.call(V);
605
+ }
606
+ function $() {
607
+ switch (y.mode) {
608
+ case I.READ:
609
+ return;
610
+ case I.UPDATE:
611
+ return u();
612
+ case I.CREATE:
613
+ return v();
614
+ }
615
+ }
616
+ return (V, _) => {
617
+ const M = b("FmButton"), S = b("FmSideSheet");
618
+ return k(), R(S, {
619
+ "model-value": h(l),
620
+ "onUpdate:modelValue": _[3] || (_[3] = (F) => ee(l) ? l.value = F : null),
621
+ header: m.value,
622
+ "close-button": "",
623
+ "dismiss-away": "",
624
+ "max-width": 500
625
+ }, {
626
+ "side-sheet-footer": x(() => [
627
+ D("div", ze, [
628
+ i(M, {
629
+ loading: s.value,
630
+ label: w.value,
631
+ onClick: c
632
+ }, null, 8, ["loading", "label"]),
633
+ i(M, {
634
+ disabled: s.value,
635
+ label: "Close",
636
+ variant: "tertiary",
637
+ onClick: _[2] || (_[2] = (F) => l.value = !1)
638
+ }, null, 8, ["disabled"])
639
+ ])
640
+ ]),
641
+ default: x(() => [
642
+ i(Ne, {
643
+ class: "w-full",
644
+ ref_key: "hasValidationExpose",
645
+ ref: E,
646
+ modelValue: h(o),
647
+ "onUpdate:modelValue": _[0] || (_[0] = (F) => ee(o) ? o.value = F : null),
648
+ mode: V.mode,
649
+ disabled: s.value,
650
+ "onClick:submit": _[1] || (_[1] = (F) => $())
651
+ }, null, 8, ["modelValue", "mode", "disabled"])
652
+ ]),
653
+ _: 1
654
+ }, 8, ["model-value", "header"]);
655
+ };
656
+ }
657
+ }), qe = { class: "px-24 xs:p-0 sm:p-0 flex flex-col gap-8 max-h-full" }, He = { class: "px-8 flex items-center xs:gap-0 xs:flex-col-reverse sm:gap-0 sm:flex-col-reverse" }, We = { class: "flex-1 w-full" }, Ke = { class: "flex flex-col py-8" }, Ye = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, je = { class: "fm-typo-en-body-lg-600 text-fm-color-typo-primary" }, rn = /* @__PURE__ */ J({
658
+ __name: "IngredientsView",
659
+ setup(C) {
660
+ const y = Q(), p = d(() => y.skus), t = ke(), {
661
+ createIngredient: l,
662
+ updateIngredient: o,
663
+ deleteIngredient: m,
664
+ ingredientDialogProps: w,
665
+ ingredientViewLoading: E
666
+ } = Te(), { columnDefs: s } = Be({ updateIngredient: o, deleteIngredient: m });
667
+ function v(M) {
668
+ M === "add" && l();
669
+ }
670
+ const u = B(""), c = d(() => E.value), { breakpoints: $ } = Ie(), V = d(() => $.value.xs || $.value.sm ? 10 : 20), _ = Ae();
671
+ return (M, S) => {
672
+ const F = b("FmTableToolbar"), q = b("FmTable");
673
+ return k(), R(De, {
674
+ title: "Ingredient",
675
+ actions: [{ label: "Add ingredient", value: "add", isPrimary: !0, prependIcon: "add" }],
676
+ "onClick:action": v
677
+ }, {
678
+ default: x(() => [
679
+ D("div", qe, [
680
+ D("div", He, [
681
+ D("div", We, [
682
+ i(F, {
683
+ searchable: "",
684
+ "search-model": u.value,
685
+ "onUpdate:searchModel": S[0] || (S[0] = (T) => u.value = T)
686
+ }, null, 8, ["search-model"])
687
+ ])
688
+ ]),
689
+ i(q, {
690
+ style: _e(h(_).tableHeight),
691
+ "column-defs": h(s),
692
+ "row-data": p.value,
693
+ "search-value": u.value,
694
+ loading: !h(t)._currentLocation || c.value,
695
+ onRowClick: S[1] || (S[1] = (T) => h(o)(T.original)),
696
+ "page-size": V.value
697
+ }, {
698
+ "list-row": x((T) => [
699
+ i(Me, {
700
+ row: T,
701
+ onRowClick: h(o)
702
+ }, {
703
+ default: x((P) => {
704
+ var H, W, K, O, e, n, a, r, f, g;
705
+ return [
706
+ D("div", Ke, [
707
+ D("div", Ye, [
708
+ i(h(oe), {
709
+ render: (K = (W = (H = P.code) == null ? void 0 : H.column) == null ? void 0 : W.columnDef) == null ? void 0 : K.cell,
710
+ props: (e = (O = P.code) == null ? void 0 : O.getContext) == null ? void 0 : e.call(O)
711
+ }, null, 8, ["render", "props"])
712
+ ]),
713
+ D("div", je, [
714
+ i(h(oe), {
715
+ render: (r = (a = (n = P.name) == null ? void 0 : n.column) == null ? void 0 : a.columnDef) == null ? void 0 : r.cell,
716
+ props: (g = (f = P.name) == null ? void 0 : f.getContext) == null ? void 0 : g.call(f)
717
+ }, null, 8, ["render", "props"])
718
+ ])
719
+ ])
720
+ ];
721
+ }),
722
+ _: 2
723
+ }, 1032, ["row", "onRowClick"])
724
+ ]),
725
+ _: 1
726
+ }, 8, ["style", "column-defs", "row-data", "search-value", "loading", "page-size"])
727
+ ]),
728
+ (k(), R(ye, { to: "body" }, [
729
+ i(Ge, Fe(he(h(w))), null, 16)
730
+ ]))
731
+ ]),
732
+ _: 1
733
+ });
734
+ };
735
+ }
736
+ });
737
+ export {
738
+ rn as default
739
+ };