@feedmepos/mf-inventory-portal 1.8.0-dev.2 → 1.8.0-dev.21

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 (248) hide show
  1. package/dist/App-BxpqrT2x.js +1445 -0
  2. package/dist/{ApprovalView-RaXuWWSu.js → ApprovalView-DZBM9n1Y.js} +26 -25
  3. package/dist/{BindingsDialog-DomvXijP.js → BindingsDialog-jjHrmqY_.js} +2 -2
  4. package/dist/{BindingsPicker-DGnzxEs7.js → BindingsPicker-Dv1KwHIQ.js} +2 -2
  5. package/dist/{BindingsTable-DfG9kWrv.js → BindingsTable-Ch_TlrZu.js} +10 -10
  6. package/dist/BulkReceiveRequestPage-BVB3PNxF.js +2839 -0
  7. package/dist/{ChangeLocationComponent.vue_vue_type_script_setup_true_lang-CVekIoiN.js → ChangeLocationComponent.vue_vue_type_script_setup_true_lang-DpHYhOmI.js} +1 -1
  8. package/dist/{ClosingDraftView-C3n66bbh.js → ClosingDraftView-DQQkWYOh.js} +748 -746
  9. package/dist/ClosingHistoryView-CXXd0Csp.js +769 -0
  10. package/dist/{ClosingTemplateView-DwGloYxn.js → ClosingTemplateView-Bf5Ivxjw.js} +22 -21
  11. package/dist/{CustomPrintTemplatePreview.vue_vue_type_script_setup_true_lang-9eY_r8LF.js → CustomPrintTemplatePreview.vue_vue_type_script_setup_true_lang-C3Y_rwNE.js} +1 -1
  12. package/dist/{DefaultView-JC_e4xgC.js → DefaultView-Bt8ZFV10.js} +2 -2
  13. package/dist/{DeliveryOrderPrintPreview-BBCvI67S.js → DeliveryOrderPrintPreview-BS5ZKe1f.js} +15 -15
  14. package/dist/{EmailDialog.vue_vue_type_script_setup_true_lang-H4FWc9ga.js → EmailDialog.vue_vue_type_script_setup_true_lang-BvDFKrFF.js} +10077 -9950
  15. package/dist/FeatureCapabilityBadge.vue_vue_type_script_setup_true_lang-B389iY-f.js +48 -0
  16. package/dist/FeatureCapabilityGate-BAOroN-j.js +82 -0
  17. package/dist/FeaturePageGate.vue_vue_type_script_setup_true_lang-Xapa8xyy.js +189 -0
  18. package/dist/{FmDateRangePickerChip.vue_vue_type_script_setup_true_lang-Q8Mptiv3.js → FmDateRangePickerChip.vue_vue_type_script_setup_true_lang-CgbvPK8u.js} +1 -1
  19. package/dist/{FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-CE1_yyHe.js → FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-DnCj1qv6.js} +2 -2
  20. package/dist/{FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-CGJi3f86.js → FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-CUb4VGOc.js} +2 -2
  21. package/dist/{FmMultiselectDialog-DCaRlBIy.js → FmMultiselectDialog-Bz8bNuK2.js} +2 -2
  22. package/dist/FmMultiselectDialog-CosTDuNE.js +123 -0
  23. package/dist/{FmUnitInput.vue_vue_type_script_setup_true_lang-ClaLVtpK.js → FmUnitInput.vue_vue_type_script_setup_true_lang-3OrHiybe.js} +105 -99
  24. package/dist/ImportView-BoTmcCyn.js +1540 -0
  25. package/dist/{IngredientsView-DPj9lBTK.js → IngredientsView-VED94pGW.js} +691 -689
  26. package/dist/{IntegrationExplorerView-CO2wpUR_.js → IntegrationExplorerView-B9ZY9hG1.js} +1537 -1620
  27. package/dist/IntegrationPlatformView-Bar1zj3R.js +13385 -0
  28. package/dist/{IntegrationView-DIeZoey0.js → IntegrationView-BvzBDBGp.js} +2604 -2565
  29. package/dist/{InventoryBindingForm-Cj4_Chue.js → InventoryBindingForm-DWhXHIaL.js} +1 -1
  30. package/dist/InventoryBindingForm.vue_vue_type_script_setup_true_lang-mZRrPywY.js +472 -0
  31. package/dist/{InventoryBindingSummary-yzGzd7jJ.js → InventoryBindingSummary-Imo2J8O2.js} +1 -1
  32. package/dist/JsonViewer.vue_vue_type_script_setup_true_lang-C_hg75l0.js +25 -0
  33. package/dist/NumberPrecisionInput.vue_vue_type_script_setup_true_lang-CChCnKxa.js +79 -0
  34. package/dist/PlanTierBadge.vue_vue_type_script_setup_true_lang-CM3gtYZo.js +19 -0
  35. package/dist/PlanUpgradeDialog.vue_vue_type_script_setup_true_lang-0F-yOcPC.js +79 -0
  36. package/dist/PremiumUpgradePage.vue_vue_type_script_setup_true_lang-DGAxPOEh.js +58 -0
  37. package/dist/ProductionRunDetailPage-KFKeWhhY.js +2317 -0
  38. package/dist/{ProductionRunLifecycleDialogs.vue_vue_type_script_setup_true_lang-BYyiiAWb.js → ProductionRunLifecycleDialogs.vue_vue_type_script_setup_true_lang-CobaPkUr.js} +3053 -3163
  39. package/dist/ProductionRunPage-BrXsPo-A.js +954 -0
  40. package/dist/{PublishView-CPK9NeVF.js → PublishView-_k3N44Pl.js} +3 -3
  41. package/dist/{PurchaseOrderPrintPreview-DosqWQeN.js → PurchaseOrderPrintPreview-DXVEhy-G.js} +17 -17
  42. package/dist/{ReceiveRequestView-BxSkpK2t.js → ReceiveRequestView-ByWddqiL.js} +17 -16
  43. package/dist/RecipeView-C29uNZxj.js +3272 -0
  44. package/dist/SettingsView-CyE6ZM8x.js +1005 -0
  45. package/dist/StockView-BBR404Ie.js +3003 -0
  46. package/dist/{SubsidiaryTreeDialog.vue_vue_type_script_setup_true_lang-GdGJCuc0.js → SubsidiaryTreeDialog.vue_vue_type_script_setup_true_lang-Cmnk66T9.js} +1 -1
  47. package/dist/{SupplierView-BKxKoi_0.js → SupplierView-CIB5GCwp.js} +304 -301
  48. package/dist/{SurchargeView-Db4cwhZv.js → SurchargeView-DNtEbO7I.js} +7 -7
  49. package/dist/{SystemTrailDialog.vue_vue_type_script_setup_true_lang-CpkF77Ow.js → SystemTrailDialog.vue_vue_type_script_setup_true_lang-ClCi5rLI.js} +2 -2
  50. package/dist/TableActionableRow.vue_vue_type_script_setup_true_lang-gJQQKKAC.js +71 -0
  51. package/dist/TemplatePublishDialog.vue_vue_type_script_setup_true_lang-C19KOLrQ.js +332 -0
  52. package/dist/TransferDetails.vue_vue_type_script_setup_true_lang-DD5nMsrn.js +4953 -0
  53. package/dist/TransferTemplateView-BftwH1_W.js +2347 -0
  54. package/dist/{UnitCostHistoryView-CqcyjCCd.js → UnitCostHistoryView-CE-1joTV.js} +4 -4
  55. package/dist/{UnitDisplayControl.vue_vue_type_script_setup_true_lang-DO80_8SZ.js → UnitDisplayControl.vue_vue_type_script_setup_true_lang-reJFavQF.js} +4 -4
  56. package/dist/{UnitView-BqdK1AM_.js → UnitView-T-Vo8IpV.js} +111 -106
  57. package/dist/{WarehouseView-COJM9IXM.js → WarehouseView-CzQcj5VY.js} +12 -11
  58. package/dist/{WastageTemplateView-DW3viTHN.js → WastageTemplateView-Cm5_V2zN.js} +19 -18
  59. package/dist/api/bill.d.ts +4 -2
  60. package/dist/api/bill.spec.d.ts +1 -0
  61. package/dist/api/closing.d.ts +1 -0
  62. package/dist/api/feature-flags.d.ts +4 -0
  63. package/dist/api/integration-sync-log.d.ts +0 -13
  64. package/dist/api/license.d.ts +0 -2
  65. package/dist/api/netsuite-explorer.d.ts +1 -0
  66. package/dist/api/stock.d.ts +1 -1
  67. package/dist/{app-yvK__CBL.js → app-DnOtng5V.js} +10177 -10126
  68. package/dist/app.d.ts +151 -164
  69. package/dist/app.js +1 -1
  70. package/dist/bulk-edit-simulation.helper-BZRyNbpM.js +178 -0
  71. package/dist/{closing-template-DezidSM0.js → closing-template-BiJRchG9.js} +4 -4
  72. package/dist/components/FeatureCapabilityBadge.vue.d.ts +4 -0
  73. package/dist/components/FeatureCapabilityGate.spec.d.ts +1 -0
  74. package/dist/components/FeatureCapabilityGate.vue.d.ts +5 -0
  75. package/dist/components/FeatureGateLayout.vue.d.ts +11 -0
  76. package/dist/components/FeaturePageGate.spec.d.ts +1 -0
  77. package/dist/components/FeaturePageGate.vue.d.ts +34 -0
  78. package/dist/components/FmAdminCollapsiblePanel.vue.d.ts +1 -1
  79. package/dist/components/FmDroppableField.vue.d.ts +1 -1
  80. package/dist/components/FmInventoryTableToolbar.vue.d.ts +2 -2
  81. package/dist/components/FmUnitInputProps.d.ts +1 -0
  82. package/dist/components/FmUnitInputRules.d.ts +1 -1
  83. package/dist/components/HrmPermissionGuard.vue.d.ts +1 -1
  84. package/dist/components/NumberPrecisionInput.spec.d.ts +1 -0
  85. package/dist/{views/ingredient-group/IngredientGroupView.vue.d.ts → components/PremiumUpgradePage.vue.d.ts} +0 -1
  86. package/dist/components/TemplatePublishDialog.d.ts +2 -0
  87. package/dist/components/TemplatePublishDialog.spec.d.ts +1 -0
  88. package/dist/composable/defineApi.d.ts +1 -1
  89. package/dist/{date2-2XjepIqc.js → date2-Bzlk0lSj.js} +1 -1
  90. package/dist/{dayjs.min-CNp5DLBB.js → dayjs.min-B8gqMYa7.js} +1 -1
  91. package/dist/{decimal-Z7oJdGk8.js → decimal-utE08Cjv.js} +2 -2
  92. package/dist/{defineDeepModel-CMxJn_H2.js → defineDeepModel-D_tKNP-n.js} +5 -5
  93. package/dist/{duplicate-template-BetV5oy_.js → duplicate-template-lCi99jVD.js} +1 -1
  94. package/dist/{feature-CkWaZ-5K.js → feature-Zeyz4pJe.js} +2089 -2854
  95. package/dist/feature-flags/core.d.ts +4 -2
  96. package/dist/feature-flags/portal-feature-catalog.d.ts +1 -6
  97. package/dist/feature-flags/portal-feature-catalog.spec.d.ts +1 -0
  98. package/dist/feature-flags/vue.d.ts +24 -1
  99. package/dist/feature-flags/vue.spec.d.ts +1 -0
  100. package/dist/{format-time-from-id-DatSI9uD.js → format-time-from-id-v_KvI4jM.js} +1 -1
  101. package/dist/{format-unit-display-DM5We5cx.js → format-unit-display-C8oexlpM.js} +209 -208
  102. package/dist/helper/country.spec.d.ts +1 -0
  103. package/dist/helper/menu-usage-module.d.ts +2 -1
  104. package/dist/helper/number.d.ts +5 -1
  105. package/dist/helper/rules.d.ts +1 -1
  106. package/dist/{id-to-date-Dxw2jKhy.js → id-to-date-Doi1vn9Q.js} +1 -1
  107. package/dist/{import-export.helper-BOmADwUw.js → import-export.helper-DyRPa4wa.js} +17 -17
  108. package/dist/{index-CIH9NCvs.js → index-B-SVjo8N.js} +1 -1
  109. package/dist/{index-ClYgfwW7.js → index-Bl8qrC1m.js} +2234 -2163
  110. package/dist/{JsonViewer.vue_vue_type_script_setup_true_lang-ig2zSXAB.js → index-C25C1Dg7.js} +1074 -1066
  111. package/dist/{index-7fz5sGDO.js → index-DZ9i-1uy.js} +3 -3
  112. package/dist/index-eGvSlWMU.js +1892 -0
  113. package/dist/layout/SingleColumnLayout.vue.d.ts +1 -1
  114. package/dist/{lz-string-CCsc2X7t.js → lz-string-pPNhTzCj.js} +1 -1
  115. package/dist/menu-usage-module-Bq_KLsO4.js +74 -0
  116. package/dist/{netsuite-COumFXC2.js → netsuite-C5s0JXRA.js} +254 -263
  117. package/dist/netsuite-explorer-BF-bujxD.js +79 -0
  118. package/dist/{predefined-templates-Bw9A9LNA.js → predefined-templates-C6hmqqhm.js} +1 -1
  119. package/dist/production-run-list-DR1WsaBR.js +61 -0
  120. package/dist/{purchase-order-template-BaZjdGq8.js → purchase-order-template-C0XlITpK.js} +1 -1
  121. package/dist/{recalculationUtils-t32wAurN.js → recalculationUtils-CnzCEyIJ.js} +1 -1
  122. package/dist/router/name.d.ts +2 -2
  123. package/dist/{row-action.enum-BDeudY4d.js → row-action.enum-Ci5mHFdS.js} +1 -1
  124. package/dist/rules-rAD4INHX.js +243 -0
  125. package/dist/{stock-B59sfN28.js → stock-CukGlv0u.js} +1 -1
  126. package/dist/stock-DUQYl3xe.js +78 -0
  127. package/dist/stores/feature.d.ts +41 -11
  128. package/dist/stores/feature.load-state.spec.d.ts +1 -0
  129. package/dist/stores/inventory.d.ts +0 -47
  130. package/dist/stores/inventory.no-location.spec.d.ts +1 -0
  131. package/dist/stores/supplier.d.ts +1 -1
  132. package/dist/stores/warehouse.d.ts +1 -1
  133. package/dist/style.css +1 -1
  134. package/dist/{supplier-DnbLJ_cS.js → supplier-CDPdi2B5.js} +2 -2
  135. package/dist/{surcharge-C1uE3uQa.js → surcharge-XABFccMt.js} +1 -1
  136. package/dist/tsconfig.app.tsbuildinfo +1 -1
  137. package/dist/{uom-rules-DjfyrFHJ.js → uom-rules-BbNTM-Xw.js} +1 -1
  138. package/dist/{use-ingredient-select-dialog-7A7fWyEH.js → use-ingredient-select-dialog-CxrFXfoM.js} +2 -2
  139. package/dist/use-inventory-binding-dialog-BZpguHE1.js +113 -0
  140. package/dist/{use-template-enabled-locations-C-Hqqgzt.js → use-template-enabled-locations-B9n-uc36.js} +2 -2
  141. package/dist/{use-transfer-locations-CqsXvOI2.js → use-transfer-locations-z78M6XgR.js} +14 -14
  142. package/dist/{useHrmPermission-BzwD3Ctc.js → useHrmPermission-CfMWeFGZ.js} +1 -1
  143. package/dist/{useNavigationMenu-PrZg9HS7.js → useNavigationMenu-B6dCSflb.js} +111 -117
  144. package/dist/{useSseClient-FCyLWq8k.js → useSseClient-ICUObHUB.js} +1 -1
  145. package/dist/views/changelog/composables/use-snapshot-diff.d.ts +2 -2
  146. package/dist/views/closing-draft/composables/use-closing-draft-table.d.ts +1 -1
  147. package/dist/views/closing-draft/helpers/draft-status-to-class-name.helper.d.ts +1 -1
  148. package/dist/views/import/helper/submit-rows.d.ts +1 -1
  149. package/dist/views/ingredients/components/inventory-binding/InventoryBindingForm.vue.d.ts +0 -1
  150. package/dist/views/ingredients/components/inventory-binding/composables/use-inventory-binding-dialog.d.ts +0 -1
  151. package/dist/views/ingredients/components/inventory-binding/recipe-amount-validation.spec.d.ts +1 -0
  152. package/dist/views/ingredients/components/inventory-binding/v2/InventoryBindingFormV2.vue.d.ts +0 -1
  153. package/dist/views/ingredients/components/inventory-binding/v2/composables/use-inventory-binding-dialog.d.ts +0 -1
  154. package/dist/views/ingredients/helper/is-linked-ingredient-error.d.ts +3 -1
  155. package/dist/views/{ingredient-group/components/ingredient-group-rule-field/IngredientGroupRuleField.vue.d.ts → integration/IntegrationPlatformView.vue.d.ts} +11 -24
  156. package/dist/views/integration/components/Synergy/importFn.spec.d.ts +1 -0
  157. package/dist/views/integration/components/Xilnex/importFn.spec.d.ts +1 -0
  158. package/dist/views/integration/helper/opening-balance.d.ts +22 -0
  159. package/dist/views/integration/helper/opening-balance.spec.d.ts +1 -0
  160. package/dist/views/production-run/ProductionRunDetailPage.spec.d.ts +1 -0
  161. package/dist/views/{integration/components/IntegrationSyncLogTab.vue.d.ts → production-run/ProductionRunDetailPage.vue.d.ts} +2 -2
  162. package/dist/views/production-run/ProductionRunPage.vue.d.ts +2 -0
  163. package/dist/views/production-run/features/detail/ProductionRunItemsTable.vue.d.ts +2 -2
  164. package/dist/views/production-run/features/detail/ProductionRunOverviewTab.vue.d.ts +4 -4
  165. package/dist/views/production-run/features/detail/use-production-run-detail.d.ts +19 -9
  166. package/dist/views/production-run/features/lifecycle/CancelRunDialog.vue.d.ts +4 -4
  167. package/dist/views/production-run/features/lifecycle/CloseRunDialog.vue.d.ts +4 -4
  168. package/dist/views/production-run/features/lifecycle/ProductionRunLifecycleDialogs.vue.d.ts +14 -14
  169. package/dist/views/production-run/features/lifecycle/TargetReachedDialog.vue.d.ts +4 -4
  170. package/dist/views/production-run/features/planning/ProductionRunFormDialog.vue.d.ts +4 -4
  171. package/dist/views/production-run/features/planning/ProductionRunPlanner.vue.d.ts +1 -1
  172. package/dist/views/production-run/features/planning/use-production-run-duplicate-sources.d.ts +6 -6
  173. package/dist/views/production-run/shared/helpers/production-run-navigation.d.ts +0 -1
  174. package/dist/views/production-run/shared/model/production-run-list.d.ts +1 -1
  175. package/dist/views/production-run/shared/ui/ProductionRunInfoBadge.vue.d.ts +1 -1
  176. package/dist/views/production-run/shared/ui/ProductionRunInfoText.vue.d.ts +1 -1
  177. package/dist/views/production-run/shared/ui/ProductionRunScrollHint.vue.d.ts +2 -2
  178. package/dist/views/production-run/shared/ui/ProductionRunTextarea.vue.d.ts +3 -3
  179. package/dist/views/receive-request/composables/netsuite-order-label.d.ts +11 -0
  180. package/dist/views/receive-request/composables/netsuite-order-label.spec.d.ts +1 -0
  181. package/dist/views/receive-request/composables/use-process-purchase-order.d.ts +1 -1
  182. package/dist/views/receive-request/composables/use-receive-request-form.d.ts +9 -9
  183. package/dist/views/receive-request/composables/use-receive-request-form.spec.d.ts +1 -0
  184. package/dist/views/receive-request/composables/use-receive-request-table.d.ts +7 -7
  185. package/dist/views/receive-request/import/export.spec.d.ts +1 -0
  186. package/dist/views/receive-request-bulk/BulkReceiveRequestPage.vue.d.ts +2 -0
  187. package/dist/views/receive-request-bulk/components/CreateTransferWizard.spec.d.ts +1 -0
  188. package/dist/views/receive-request-bulk/composables/use-bulk-receive-request-form.d.ts +20 -20
  189. package/dist/views/receive-request-bulk/composables/use-bulk-receive-request-form.readiness.spec.d.ts +1 -0
  190. package/dist/views/receive-request-bulk/composables/use-bulk-receive-request-table.d.ts +2 -2
  191. package/dist/views/recipe/components/recipe-bulk-editor/components/ModificationCard.spec.d.ts +1 -0
  192. package/dist/views/recipe/helper/bulk-edit-simulation.helper.d.ts +0 -1
  193. package/dist/views/recipe/helper/import-recipe.d.ts +32 -2
  194. package/dist/views/recipe/helper/import-recipe.spec.d.ts +1 -0
  195. package/dist/views/settings/PlanLicenseDisplay.spec.d.ts +1 -0
  196. package/dist/views/settings/PlanLicenseDisplay.vue.d.ts +2 -0
  197. package/dist/views/stock/components/StockRecordCard.spec.d.ts +1 -0
  198. package/dist/views/stock/components/StockRecordCard.vue.d.ts +19 -865
  199. package/dist/views/stock/components/dialog/AmendAdjustmentForm.spec.d.ts +1 -0
  200. package/dist/views/stock/components/dialog/BillInventoryInfoDialog.spec.d.ts +1 -0
  201. package/dist/views/stock/components/dialog/BillInventoryInfoDialog.vue.d.ts +36 -0
  202. package/dist/views/stock/components/dialog/ConvertSkuDialog.spec.d.ts +1 -0
  203. package/dist/views/stock/composables/use-last-closing-summary.d.ts +4 -0
  204. package/dist/views/stock/composables/use-last-closing-summary.spec.d.ts +1 -0
  205. package/dist/views/transfer-template/components/transfer-template-form/composables/use-transfer-template-items.spec.d.ts +1 -0
  206. package/dist/views/transfer-template/helpers/template-item.error.helper.spec.d.ts +1 -0
  207. package/dist/views/unit/composables/use-unit-form.spec.d.ts +1 -0
  208. package/dist/views/warehouse/components/WarehouseForm.vue.d.ts +2 -2
  209. package/dist/vue-DBxqzbt5.js +295 -0
  210. package/dist/{vue-i18n-C34f-Tph.js → vue-i18n-CdbY8MsR.js} +539 -539
  211. package/dist/{xlsx.util-X4amwe_k.js → xlsx.util-CD5NablT.js} +2 -2
  212. package/package.json +71 -66
  213. package/dist/App-DVHgBTHP.js +0 -1499
  214. package/dist/BulkReceiveRequestView-DxHWrfbi.js +0 -2656
  215. package/dist/ClosingHistoryView-kdpYGy1Y.js +0 -761
  216. package/dist/DeprecateSoonWarningDialog.vue_vue_type_script_setup_true_lang-5Cc08Svt.js +0 -58
  217. package/dist/FeatureCapabilityBadge.vue_vue_type_script_setup_true_lang-C1C8aDA6.js +0 -61
  218. package/dist/FmMultiselectDialog-yVPY5aBV.js +0 -77
  219. package/dist/ImportView-DQrVMzxN.js +0 -1302
  220. package/dist/IngredientBindedItem.vue_vue_type_script_setup_true_lang-7lT5UZc8.js +0 -51
  221. package/dist/IngredientGroupView-BMUnEaY7.js +0 -1000
  222. package/dist/InventoryBindingForm.vue_vue_type_script_setup_true_lang-CaBOK7NC.js +0 -563
  223. package/dist/NumberPrecisionInput.vue_vue_type_script_setup_true_lang-DzzTPdyF.js +0 -72
  224. package/dist/ProductionRunDetailView-Cw-ecaey.js +0 -2312
  225. package/dist/ProductionRunView-C11eseXQ.js +0 -930
  226. package/dist/RecipeView-oHDWsT0P.js +0 -3624
  227. package/dist/SettingsView-QlUNwFhM.js +0 -983
  228. package/dist/StockView-a8LbVZ_7.js +0 -2614
  229. package/dist/TableActionableRow.vue_vue_type_script_setup_true_lang-DAMpuZ1X.js +0 -84
  230. package/dist/TemplatePublishDialog.vue_vue_type_script_setup_true_lang-CCCj4WVF.js +0 -299
  231. package/dist/TransferDetails.vue_vue_type_script_setup_true_lang-CFNPXqt5.js +0 -4796
  232. package/dist/TransferTemplateView-CzwxOBMQ.js +0 -2326
  233. package/dist/menu-usage-module-BdjYEk3s.js +0 -57
  234. package/dist/number-gSLvxNqA.js +0 -138
  235. package/dist/portal-feature-catalog-yGIESKTc.js +0 -246
  236. package/dist/random-CSbEbElR.js +0 -10
  237. package/dist/rules-C1btu0Md.js +0 -98
  238. package/dist/stock-BF86TMW0.js +0 -75
  239. package/dist/use-inventory-binding-dialog-Cc1tjTfV.js +0 -152
  240. package/dist/usePromise-CbVUCxhj.js +0 -29
  241. package/dist/views/ingredient-group/components/ingredient-group-dialog/IngredientGroupDialog.vue.d.ts +0 -31
  242. package/dist/views/ingredient-group/components/ingredient-group-dialog/IngredientGroupDialogProps.d.ts +0 -10
  243. package/dist/views/ingredient-group/components/ingredient-group-form/IngredientGroupForm.vue.d.ts +0 -21
  244. package/dist/views/ingredient-group/components/ingredient-group-form/IngredientGroupFormProps.d.ts +0 -12
  245. package/dist/views/ingredient-group/composables/use-ingredient-group-actions.d.ts +0 -24
  246. package/dist/views/ingredient-group/composables/use-ingredient-group-rule-item.d.ts +0 -31
  247. package/dist/views/ingredient-group/composables/use-ingredient-group-table.d.ts +0 -77
  248. package/dist/views/integration/composables/use-integration-sync-log.d.ts +0 -45
@@ -1,80 +1,81 @@
1
- import { ref as P, defineComponent as ke, computed as g, resolveComponent as S, createElementBlock as V, openBlock as c, Fragment as ee, createCommentVNode as N, createVNode as s, unref as o, withModifiers as Rt, withCtx as x, createElementVNode as n, renderList as de, createBlock as j, toDisplayString as $, normalizeClass as ie, h as Z, mergeModels as st, onMounted as Ot, watch as _t, useModel as Bt, createTextVNode as xt, isRef as rt, createSlots as kt, normalizeStyle as Dt, Teleport as it, normalizeProps as Nt, guardReactiveProps as zt } from "vue";
2
- import { a as Fe, c as wt, S as Lt, g as dt, e as ut, f as jt, h as mt, i as ct, j as pt, k as vt, u as Wt, l as qt } from "./app-yvK__CBL.js";
3
- import { useDialog as Ke, useSnackbar as Ae, components as ze, useProxiedModel as ft, useDialogChild as Ht, useBreakpoints as Yt } from "@feedmepos/ui-library";
4
- import { i as Kt, _ as Gt, m as Jt } from "./menu-usage-module-BdjYEk3s.js";
5
- import { F as W } from "./form-mode.enum-BKiNVH6A.js";
1
+ import { ref as P, defineComponent as xe, computed as g, resolveComponent as C, createElementBlock as V, openBlock as p, Fragment as ee, createCommentVNode as L, createVNode as r, unref as o, withModifiers as Rt, withCtx as x, createElementVNode as n, renderList as de, createBlock as Y, toDisplayString as $, normalizeClass as ie, h as Z, mergeModels as st, onMounted as Dt, watch as _t, useModel as Ot, createTextVNode as xt, isRef as rt, createSlots as kt, normalizeStyle as Bt, Teleport as it, normalizeProps as Nt, guardReactiveProps as zt } from "vue";
2
+ import { a as Fe, c as wt, S as Lt, g as dt, e as ut, f as jt, h as ct, i as mt, j as pt, k as vt, u as Wt, l as qt } from "./app-DnOtng5V.js";
3
+ import { p as Ht } from "./production-run-list-DR1WsaBR.js";
4
+ import { useDialog as Ke, useSnackbar as Ae, components as ze, useProxiedModel as ft, useDialogChild as Yt, useBreakpoints as Kt } from "@feedmepos/ui-library";
5
+ import { i as Gt, _ as Jt, m as Qt } from "./menu-usage-module-Bq_KLsO4.js";
6
+ import { F as j } from "./form-mode.enum-BKiNVH6A.js";
6
7
  import { useI18n as pe, useCoreStore as Ge } from "@feedmepos/mf-common";
7
- import { defineStore as Qt, storeToRefs as Xt } from "pinia";
8
- import { D as yt, R as Pe } from "./row-action.enum-BDeudY4d.js";
9
- import { c as Zt } from "./component-BmLAdDiY.js";
10
- import { u as Ee, _ as en } from "./netsuite-COumFXC2.js";
11
- import { F as Be } from "./FmAdminBadge-DlplQOHb.js";
12
- import { u as tn, _ as nn } from "./SingleColumnLayout.vue_vue_type_script_setup_true_lang-DpwneGOV.js";
13
- import { A as Oe, R as Le, U as on, M as ln } from "./rules-C1btu0Md.js";
14
- import { g as an, _ as je, S as We, a as sn } from "./SubsidiaryTreeDialog.vue_vue_type_script_setup_true_lang-GdGJCuc0.js";
15
- import { _ as rn } from "./InventoryBindingForm.vue_vue_type_script_setup_true_lang-CaBOK7NC.js";
16
- import { _ as qe } from "./IngredientBindedItem.vue_vue_type_script_setup_true_lang-7lT5UZc8.js";
17
- import { u as Tt } from "./feature-CkWaZ-5K.js";
18
- import { t as dn, a as un, g as mn } from "./number-gSLvxNqA.js";
19
- import { a as xe } from "./FeatureCapabilityBadge.vue_vue_type_script_setup_true_lang-C1C8aDA6.js";
20
- import { d as Re, g as cn, e as pn, a as vn } from "./import-export.helper-BOmADwUw.js";
21
- import { _ as fn } from "./FmCustomAttribute.vue_vue_type_script_setup_true_lang-CG1m-B2p.js";
8
+ import { defineStore as Xt, storeToRefs as Zt } from "pinia";
9
+ import { D as yt, R as Pe } from "./row-action.enum-Ci5mHFdS.js";
10
+ import { c as en } from "./component-BmLAdDiY.js";
11
+ import { u as Ee, _ as tn } from "./netsuite-C5s0JXRA.js";
12
+ import { F as Oe } from "./FmAdminBadge-DlplQOHb.js";
13
+ import { u as nn, _ as on } from "./SingleColumnLayout.vue_vue_type_script_setup_true_lang-DpwneGOV.js";
14
+ import { A as De, t as ln, a as an, R as Le, U as sn, M as rn, g as dn } from "./rules-rAD4INHX.js";
15
+ import { g as un, _ as je, S as We, a as cn } from "./SubsidiaryTreeDialog.vue_vue_type_script_setup_true_lang-Cmnk66T9.js";
16
+ import { _ as mn } from "./InventoryBindingForm.vue_vue_type_script_setup_true_lang-mZRrPywY.js";
17
+ import { _ as qe, u as pn } from "./FmMultiselectDialog-CosTDuNE.js";
18
+ import { u as Tt } from "./feature-Zeyz4pJe.js";
19
+ import { _ as ke } from "./FeatureCapabilityBadge.vue_vue_type_script_setup_true_lang-B389iY-f.js";
20
+ import { d as Re, g as vn, e as fn, a as yn } from "./import-export.helper-DyRPa4wa.js";
21
+ import { _ as gn } from "./FmCustomAttribute.vue_vue_type_script_setup_true_lang-CG1m-B2p.js";
22
22
  import { _ as Ce } from "./FmLockableField.vue_vue_type_script_setup_true_lang-FCg4K7y8.js";
23
- import { F as yn, a as He } from "./FmMultiselectDialog-DCaRlBIy.js";
24
- import { u as Vt } from "./purchase-order-template-BaZjdGq8.js";
25
- import { u as It, a as St } from "./closing-template-DezidSM0.js";
26
- import { _ as gn, F as gt } from "./TableActionableRow.vue_vue_type_script_setup_true_lang-DAMpuZ1X.js";
27
- import { r as bn } from "./xlsx.util-X4amwe_k.js";
28
- import { F as hn } from "./FmDroppableField-J0tG_U3w.js";
29
- import { _ as _n } from "./FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-CGJi3f86.js";
30
- import { u as xn } from "./FmMultiselectDialog-yVPY5aBV.js";
31
- import { P as kn, J as wn } from "./app-C39bYJmq.js";
32
- const Ye = Qt("ingredientForm", function() {
33
- const h = Ke(), k = Ae(), u = Fe(), _ = P(!1), { t: C } = pe(), A = P();
23
+ import { F as bn, a as He } from "./FmMultiselectDialog-Bz8bNuK2.js";
24
+ import { u as Vt } from "./purchase-order-template-C0XlITpK.js";
25
+ import { u as It, a as St } from "./closing-template-BiJRchG9.js";
26
+ import { _ as hn } from "./TableActionableRow.vue_vue_type_script_setup_true_lang-gJQQKKAC.js";
27
+ import { F as gt } from "./index-eGvSlWMU.js";
28
+ import { r as _n } from "./xlsx.util-CD5NablT.js";
29
+ import { F as xn } from "./FmDroppableField-J0tG_U3w.js";
30
+ import { _ as kn } from "./FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-CUb4VGOc.js";
31
+ import { P as wn, J as Tn } from "./app-C39bYJmq.js";
32
+ const Ye = Xt("ingredientForm", function() {
33
+ const h = Ke(), k = Ae(), d = Fe(), _ = P(!1), { t: S } = pe(), A = P();
34
34
  function U() {
35
35
  const a = {
36
36
  sku: {},
37
- mode: W.CREATE,
37
+ mode: j.CREATE,
38
38
  show: !0,
39
- "onUpdate:show"(d) {
40
- A.value.show = d;
39
+ "onUpdate:show"(c) {
40
+ A.value.show = c;
41
41
  }
42
42
  };
43
43
  A.value = a;
44
44
  }
45
45
  async function l(a) {
46
- const d = {
46
+ const c = {
47
47
  sku: wt(a),
48
- mode: W.UPDATE,
48
+ mode: j.UPDATE,
49
49
  show: !0,
50
- "onUpdate:show"(r) {
51
- A.value.show = r;
50
+ "onUpdate:show"(s) {
51
+ A.value.show = s;
52
52
  }
53
53
  };
54
- A.value = d;
54
+ A.value = c;
55
55
  }
56
56
  async function i(a) {
57
57
  _.value = !0;
58
58
  try {
59
- await u.deleteSku(a), k.open({
59
+ await d.deleteSku(a), k.open({
60
60
  title: "Success",
61
61
  message: `Deleted ${a.name}`,
62
62
  type: "success"
63
63
  });
64
- } catch (d) {
65
- if (d instanceof Lt && Kt(d)) {
64
+ } catch (c) {
65
+ if (c instanceof Lt && Gt(c)) {
66
66
  h.open({
67
67
  title: "Cannot delete ingredient",
68
- contentComponent: Gt,
68
+ contentComponent: Jt,
69
69
  contentComponentProps: {
70
70
  subject: (a == null ? void 0 : a.name) ?? "",
71
- items: d.errorResponse.errors.map((r) => {
71
+ items: c.errorResponse.errors.map((s) => {
72
72
  var f;
73
73
  return {
74
74
  chain: [
75
75
  {
76
- itemName: r.name,
77
- moduleKey: (f = r.message) != null && f.startsWith("modules.") ? Jt(r.message) : r.module
76
+ itemName: s.module === "productionRun" && s.runNo != null ? Ht({ runName: s.name, runNo: s.runNo }, S("inventory.production.run.list.untitled")) : s.name,
77
+ locationName: s.locationName,
78
+ moduleKey: (f = s.message) != null && f.startsWith("modules.") ? Qt(s.message) : s.module
78
79
  }
79
80
  ]
80
81
  };
@@ -91,23 +92,23 @@ const Ye = Qt("ingredientForm", function() {
91
92
  title: `Cannot delete ${a.name}`,
92
93
  message: "Please try again.",
93
94
  type: "error"
94
- }), console.error("failed to delete ingredient", d);
95
+ }), console.error("failed to delete ingredient", c);
95
96
  } finally {
96
97
  _.value = !1;
97
98
  }
98
99
  }
99
- function m(a) {
100
+ function u(a) {
100
101
  h.open({
101
- title: C("inventory.ingredient.delete.title", [(a == null ? void 0 : a.name) ?? ""]),
102
+ title: S("inventory.ingredient.delete.title", [(a == null ? void 0 : a.name) ?? ""]),
102
103
  closeButton: !1,
103
- message: C("inventory.ingredient.delete.message"),
104
+ message: S("inventory.ingredient.delete.message"),
104
105
  primaryActions: {
105
- text: C("common.delete"),
106
+ text: S("common.delete"),
106
107
  close: !0,
107
108
  variant: "destructive"
108
109
  },
109
110
  secondaryActions: {
110
- text: C("common.cancel"),
111
+ text: S("common.cancel"),
111
112
  close: !0
112
113
  }
113
114
  }).onPrimary(() => i(a));
@@ -115,113 +116,113 @@ const Ye = Qt("ingredientForm", function() {
115
116
  return {
116
117
  createIngredient: U,
117
118
  updateIngredient: l,
118
- deleteIngredient: m,
119
+ deleteIngredient: u,
119
120
  ingredientDialogProps: A,
120
121
  ingredientViewLoading: _
121
122
  };
122
- }), Tn = {
123
+ }), Vn = {
123
124
  key: 0,
124
125
  class: "flex items-center gap-8"
125
- }, Vn = { class: "flex flex-col gap-1" }, In = { class: "fm-typo-en-heading-lg-600" }, Sn = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Cn = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Fn = {
126
+ }, In = { class: "flex flex-col gap-1" }, Sn = { class: "fm-typo-en-heading-lg-600" }, Cn = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Fn = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, An = {
126
127
  key: 0,
127
128
  class: "fm-typo-en-body-md-400 text-fm-color-system-warning-300"
128
- }, An = {
129
+ }, En = {
129
130
  key: 1,
130
131
  class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary"
131
- }, En = { class: "flex flex-col gap-2 mt-4" }, $n = { class: "flex items-center gap-2 fm-typo-en-body-md-400" }, Mn = { class: "flex flex-wrap gap-2" }, Un = { class: "flex flex-col" }, Pn = { class: "flex flex-col bg-fm-color-bg-secondary font-mono p-4 rounded-md" }, Rn = { class: "text-fm-color-typo-tertiary flex-shrink-0 fm-typo-en-body-md-400 whitespace-pre flex items-center" }, On = { class: "px-2 py-1 rounded-md bg-blue-200 border-2 border-blue-400" }, Bn = { class: "fm-typo-en-body-md-600 text-fm-color-typo-primary" }, Dn = /* @__PURE__ */ ke({
132
+ }, $n = { class: "flex flex-col gap-2 mt-4" }, Mn = { class: "flex items-center gap-2 fm-typo-en-body-md-400" }, Un = { class: "flex flex-wrap gap-2" }, Pn = { class: "flex flex-col" }, Rn = { class: "flex flex-col bg-fm-color-bg-secondary font-mono p-4 rounded-md" }, Dn = { class: "text-fm-color-typo-tertiary flex-shrink-0 fm-typo-en-body-md-400 whitespace-pre flex items-center" }, On = { class: "px-2 py-1 rounded-md bg-blue-200 border-2 border-blue-400" }, Bn = { class: "fm-typo-en-body-md-600 text-fm-color-typo-primary" }, Nn = /* @__PURE__ */ xe({
132
133
  __name: "ItemSubsidiaryTreeDialog",
133
134
  props: {
134
135
  skuId: {},
135
136
  itemName: {},
136
137
  itemCode: {}
137
138
  },
138
- setup(q) {
139
- const h = q, { t: k } = pe(), u = Ge(), _ = Ee(), C = P(!1), A = g(() => {
140
- var r;
141
- return ((r = u.sessionUser.value) == null ? void 0 : r.role.isAdmin) ?? !1;
139
+ setup(W) {
140
+ const h = W, { t: k } = pe(), d = Ge(), _ = Ee(), S = P(!1), A = g(() => {
141
+ var s;
142
+ return ((s = d.sessionUser.value) == null ? void 0 : s.role.isAdmin) ?? !1;
142
143
  }), U = g(() => _.getSkuSubsidiaries(h.skuId)), l = g(() => {
143
- const r = /* @__PURE__ */ new Set();
144
+ const s = /* @__PURE__ */ new Set();
144
145
  function f(F) {
145
- for (const p of F)
146
- p.isAssigned && (r.add(p.id), U.value.includeChildren && w(p)), p.children && p.children.length > 0 && f(p.children);
146
+ for (const m of F)
147
+ m.isAssigned && (s.add(m.id), U.value.includeChildren && w(m)), m.children && m.children.length > 0 && f(m.children);
147
148
  }
148
149
  function w(F) {
149
150
  if (F.children)
150
- for (const p of F.children)
151
- r.add(p.id), w(p);
151
+ for (const m of F.children)
152
+ s.add(m.id), w(m);
152
153
  }
153
- return f(U.value.subsidiaryTree), r;
154
+ return f(U.value.subsidiaryTree), s;
154
155
  });
155
- function i(r, f = [], w = !1) {
156
+ function i(s, f = [], w = !1) {
156
157
  const F = [];
157
- return r.forEach((p, B) => {
158
- const R = B === r.length - 1, ve = [...f, R];
158
+ return s.forEach((m, O) => {
159
+ const R = O === s.length - 1, ve = [...f, R];
159
160
  let ne = "";
160
161
  for (let te = 0; te < f.length; te++)
161
162
  ne += f[te] ? " " : "│ ";
162
163
  ne += R ? "└── " : "├── ";
163
- const ue = l.value.has(p.id), oe = p.isAssigned === !0, le = w && !oe;
164
+ const ue = l.value.has(m.id), oe = m.isAssigned === !0, le = w && !oe;
164
165
  if (F.push({
165
- id: p.id,
166
- name: p.name,
166
+ id: m.id,
167
+ name: m.name,
167
168
  prefix: f.length === 0 ? "" : ne,
168
169
  isHighlighted: ue,
169
170
  isDirectlyBound: oe,
170
171
  isParentIncludedChild: le,
171
172
  isRoot: f.length === 0
172
- }), p.children && p.children.length > 0) {
173
+ }), m.children && m.children.length > 0) {
173
174
  const te = w || oe && U.value.includeChildren;
174
- F.push(...i(p.children, ve, te));
175
+ F.push(...i(m.children, ve, te));
175
176
  }
176
177
  }), F;
177
178
  }
178
- function m(r, f = []) {
179
+ function u(s, f = []) {
179
180
  const w = /* @__PURE__ */ new Set();
180
- for (const F of r) {
181
- const p = [...f, F.id];
182
- F.isAssigned === !0 && p.forEach((B) => w.add(B)), F.children && F.children.length > 0 && m(F.children, p).forEach((R) => w.add(R));
181
+ for (const F of s) {
182
+ const m = [...f, F.id];
183
+ F.isAssigned === !0 && m.forEach((O) => w.add(O)), F.children && F.children.length > 0 && u(F.children, m).forEach((R) => w.add(R));
183
184
  }
184
185
  return w;
185
186
  }
186
- function a(r, f) {
187
- return r.map((w) => f.has(w.id) || w.isAssigned === !0 ? {
187
+ function a(s, f) {
188
+ return s.map((w) => f.has(w.id) || w.isAssigned === !0 ? {
188
189
  ...w,
189
190
  // Recursively filter children
190
191
  children: w.children ? a(w.children, f) : []
191
192
  } : null).filter(Boolean);
192
193
  }
193
- const d = g(() => {
194
- let r = U.value.subsidiaryTree;
195
- if ((!r || r.length === 0) && (r = _.getBusinessSubsidiaryTree()), !A.value) {
196
- const f = m(r);
197
- r = a(r, f);
194
+ const c = g(() => {
195
+ let s = U.value.subsidiaryTree;
196
+ if ((!s || s.length === 0) && (s = _.getBusinessSubsidiaryTree()), !A.value) {
197
+ const f = u(s);
198
+ s = a(s, f);
198
199
  }
199
- return i(r, []);
200
+ return i(s, []);
200
201
  });
201
- return (r, f) => {
202
- const w = S("FmButton"), F = S("FmDialog");
203
- return c(), V(ee, null, [
204
- o(_).isEnabled ? (c(), V("div", Tn, [
205
- s(w, {
202
+ return (s, f) => {
203
+ const w = C("FmButton"), F = C("FmDialog");
204
+ return p(), V(ee, null, [
205
+ o(_).isEnabled ? (p(), V("div", Vn, [
206
+ r(w, {
206
207
  "prepend-icon": "info",
207
208
  variant: "tertiary",
208
- onClick: f[0] || (f[0] = Rt((p) => C.value = !0, ["stop"]))
209
+ onClick: f[0] || (f[0] = Rt((m) => S.value = !0, ["stop"]))
209
210
  })
210
- ])) : N("", !0),
211
- s(F, {
212
- modelValue: C.value,
213
- "onUpdate:modelValue": f[1] || (f[1] = (p) => C.value = p),
211
+ ])) : L("", !0),
212
+ r(F, {
213
+ modelValue: S.value,
214
+ "onUpdate:modelValue": f[1] || (f[1] = (m) => S.value = m),
214
215
  "close-button": "",
215
216
  dismissAway: ""
216
217
  }, {
217
218
  "dialog-header": x(() => [
218
- n("div", Vn, [
219
- n("div", In, $(o(k)("inventory.integration.netsuite.subsidiaryHierarchy.title")), 1),
220
- n("p", Sn, " Name: " + $(h.itemName), 1),
221
- n("p", Cn, " Code: " + $(h.itemCode), 1),
222
- A.value ? (c(), V("p", Fn, " All subsidiaries are shown since you are an admin. ")) : (c(), V("p", An, " Only showing subsidiaries in your business path and bound subsidiaries. ")),
223
- n("div", En, [
224
- n("div", $n, [
219
+ n("div", In, [
220
+ n("div", Sn, $(o(k)("inventory.integration.netsuite.subsidiaryHierarchy.title")), 1),
221
+ n("p", Cn, " Name: " + $(h.itemName), 1),
222
+ n("p", Fn, " Code: " + $(h.itemCode), 1),
223
+ A.value ? (p(), V("p", An, " All subsidiaries are shown since you are an admin. ")) : (p(), V("p", En, " Only showing subsidiaries in your business path and bound subsidiaries. ")),
224
+ n("div", $n, [
225
+ n("div", Mn, [
225
226
  f[2] || (f[2] = n("span", { class: "font-semibold" }, "Include Children Subsidiaries:", -1)),
226
227
  n("span", {
227
228
  class: ie(
@@ -229,12 +230,12 @@ const Ye = Qt("ingredientForm", function() {
229
230
  )
230
231
  }, $(U.value.includeChildren ? "Yes" : "No"), 3)
231
232
  ]),
232
- n("div", Mn, [
233
+ n("div", Un, [
233
234
  f[4] || (f[4] = n("div", { class: "flex items-center gap-2 px-2 py-1 bg-fm-color-bg-brand-secondary rounded-md" }, [
234
235
  n("span", { class: "w-3 h-3 rounded-sm bg-green-400" }),
235
236
  n("span", { class: "fm-typo-en-body-sm-400" }, "Directly Bound")
236
237
  ], -1)),
237
- s(Be, null, {
238
+ r(Oe, null, {
238
239
  default: x(() => f[3] || (f[3] = [
239
240
  n("div", { class: "flex items-center gap-2 px-2 py-1 rounded-md" }, [
240
241
  n("span", { class: "w-3 h-3 rounded-sm bg-blue-400" }),
@@ -248,35 +249,35 @@ const Ye = Qt("ingredientForm", function() {
248
249
  ])
249
250
  ]),
250
251
  default: x(() => [
251
- n("div", Un, [
252
- n("div", Pn, [
253
- (c(!0), V(ee, null, de(d.value, (p) => (c(), V("div", {
254
- key: p.id,
252
+ n("div", Pn, [
253
+ n("div", Rn, [
254
+ (p(!0), V(ee, null, de(c.value, (m) => (p(), V("div", {
255
+ key: m.id,
255
256
  class: "flex items-stretch"
256
257
  }, [
257
- n("span", Rn, $(p.prefix), 1),
258
- p.isParentIncludedChild ? (c(), j(Be, {
258
+ n("span", Dn, $(m.prefix), 1),
259
+ m.isParentIncludedChild ? (p(), Y(Oe, {
259
260
  key: 0,
260
261
  class: "flex-1"
261
262
  }, {
262
263
  default: x(() => [
263
264
  n("div", On, [
264
- n("span", Bn, $(p.name), 1)
265
+ n("span", Bn, $(m.name), 1)
265
266
  ])
266
267
  ]),
267
268
  _: 2
268
- }, 1024)) : (c(), V("div", {
269
+ }, 1024)) : (p(), V("div", {
269
270
  key: 1,
270
271
  class: ie([
271
272
  "px-2 py-1 rounded-md flex-1",
272
- p.isDirectlyBound ? "border-2 bg-green-200 border-green-400" : "bg-fm-color-bg-primary border border-fm-color-border-secondary"
273
+ m.isDirectlyBound ? "border-2 bg-green-200 border-green-400" : "bg-fm-color-bg-primary border border-fm-color-border-secondary"
273
274
  ])
274
275
  }, [
275
276
  n("span", {
276
277
  class: ie([
277
- p.isHighlighted ? "fm-typo-en-body-md-600 text-fm-color-typo-primary" : "fm-typo-en-body-md-400 text-fm-color-typo-secondary"
278
+ m.isHighlighted ? "fm-typo-en-body-md-600 text-fm-color-typo-primary" : "fm-typo-en-body-md-400 text-fm-color-typo-secondary"
278
279
  ])
279
- }, $(p.name), 3)
280
+ }, $(m.name), 3)
280
281
  ], 2))
281
282
  ]))), 128))
282
283
  ])
@@ -288,13 +289,13 @@ const Ye = Qt("ingredientForm", function() {
288
289
  };
289
290
  }
290
291
  });
291
- function Nn() {
292
+ function zn() {
292
293
  var l;
293
- const { updateIngredient: q, deleteIngredient: h } = Ye(), k = Fe(), u = Ee(), { t: _ } = pe(), C = Ge();
294
- async function A(i, m) {
295
- const a = wt(m);
294
+ const { updateIngredient: W, deleteIngredient: h } = Ye(), k = Fe(), d = Ee(), { t: _ } = pe(), S = Ge();
295
+ async function A(i, u) {
296
+ const a = wt(u);
296
297
  if (i === Pe.Edit) {
297
- await q(a);
298
+ await W(a);
298
299
  return;
299
300
  }
300
301
  if (i === Pe.Delete) {
@@ -303,10 +304,10 @@ function Nn() {
303
304
  }
304
305
  }
305
306
  return { columnDefs: [
306
- ...(l = C.sessionUser.value) != null && l.role.isAdmin ? [
307
+ ...(l = S.sessionUser.value) != null && l.role.isAdmin ? [
307
308
  {
308
309
  accessorKey: "_id",
309
- header: () => Z(Be, {}, () => "ID"),
310
+ header: () => Z(Oe, {}, () => "ID"),
310
311
  size: 200
311
312
  }
312
313
  ] : [],
@@ -322,11 +323,11 @@ function Nn() {
322
323
  enableSorting: !0,
323
324
  size: 300,
324
325
  cell(i) {
325
- const m = i.row.original, a = k.skuBindingFlattenCache[m._id], d = a == null ? void 0 : a.inventoryBindings.some(
326
- (r) => "error" in r && r.reason === "circularDependency"
326
+ const u = i.row.original, a = k.skuBindingFlattenCache[u._id], c = a == null ? void 0 : a.inventoryBindings.some(
327
+ (s) => "error" in s && s.reason === "circularDependency"
327
328
  );
328
329
  return Z("div", { class: "flex items-center w-full gap-4" }, [
329
- d ? Z(
330
+ c ? Z(
330
331
  ze.FmTooltip,
331
332
  { class: "text-left" },
332
333
  {
@@ -342,7 +343,7 @@ function Nn() {
342
343
  }
343
344
  }
344
345
  ) : null,
345
- m.name
346
+ u.name
346
347
  ]);
347
348
  }
348
349
  },
@@ -351,7 +352,7 @@ function Nn() {
351
352
  header: () => _("inventory.ingredient.unit"),
352
353
  accessorFn: (i) => bt(i),
353
354
  cell(i) {
354
- const m = i.row.original, a = bt(m);
355
+ const u = i.row.original, a = bt(u);
355
356
  return Z(
356
357
  ze.FmTooltip,
357
358
  { zIndex: 51, content: a },
@@ -371,26 +372,26 @@ function Nn() {
371
372
  accessorKey: "isInactive",
372
373
  header: () => _("inventory.ingredient.status.title"),
373
374
  cell(i) {
374
- const m = i.row.original.isInactive;
375
+ const u = i.row.original.isInactive;
375
376
  return Z(
376
377
  "span",
377
378
  {
378
379
  class: [
379
380
  "inline-block px-3 py-1 rounded-full text-xs font-semibold",
380
- m ? "bg-red-100 text-red-700" : "bg-green-100 text-green-700"
381
+ u ? "bg-red-100 text-red-700" : "bg-green-100 text-green-700"
381
382
  ].join(" ")
382
383
  },
383
- _(m ? "inventory.ingredient.status.inactive" : "inventory.ingredient.status.active")
384
+ _(u ? "inventory.ingredient.status.inactive" : "inventory.ingredient.status.active")
384
385
  );
385
386
  },
386
387
  enableSorting: !0
387
388
  },
388
389
  {
389
390
  id: "netsuiteSubsidiary",
390
- accessorFn: (i) => u.getSkuSubsidiaries(i._id),
391
+ accessorFn: (i) => d.getSkuSubsidiaries(i._id),
391
392
  header: () => "NetSuite Subsidiary",
392
393
  cell(i) {
393
- const m = i.row.original, { flattenedSubsidiaryNames: a } = u.getSkuSubsidiaries(m._id);
394
+ const u = i.row.original, { flattenedSubsidiaryNames: a } = d.getSkuSubsidiaries(u._id);
394
395
  return Z("div", { class: "flex gap-2 items-start" }, [
395
396
  Z(
396
397
  "span",
@@ -399,7 +400,7 @@ function Nn() {
399
400
  },
400
401
  a.join(", ")
401
402
  ),
402
- Z(Dn, { skuId: m._id, itemName: m.name, itemCode: m.code })
403
+ Z(Nn, { skuId: u._id, itemName: u.name, itemCode: u.code })
403
404
  ]);
404
405
  },
405
406
  enableSorting: !1,
@@ -409,10 +410,10 @@ function Nn() {
409
410
  id: "action",
410
411
  header: "",
411
412
  cell(i) {
412
- return Zt(
413
+ return en(
413
414
  [yt[Pe.Edit], yt[Pe.Delete]],
414
- (m) => {
415
- A(m, i.row.original);
415
+ (u) => {
416
+ A(u, i.row.original);
416
417
  }
417
418
  );
418
419
  },
@@ -425,16 +426,16 @@ function Nn() {
425
426
  }
426
427
  ] };
427
428
  }
428
- function bt(q) {
429
+ function bt(W) {
429
430
  var h;
430
- if (q.trackingMeasurement) {
431
- const k = (h = q.unit.measurements) == null ? void 0 : h.find((u) => u.id === q.trackingMeasurement);
431
+ if (W.trackingMeasurement) {
432
+ const k = (h = W.unit.measurements) == null ? void 0 : h.find((d) => d.id === W.trackingMeasurement);
432
433
  if (k)
433
434
  return `${k.name} (${k.abbrev})`;
434
435
  }
435
- return `${q.unit.name} (${q.unit.abbrev})`;
436
+ return `${W.unit.name} (${W.unit.abbrev})`;
436
437
  }
437
- const zn = /* @__PURE__ */ ke({
438
+ const Ln = /* @__PURE__ */ xe({
438
439
  __name: "ConvertForm",
439
440
  props: {
440
441
  modelValue: {},
@@ -443,106 +444,106 @@ const zn = /* @__PURE__ */ ke({
443
444
  readonly: { type: Boolean }
444
445
  },
445
446
  emits: ["update:modelValue"],
446
- setup(q, { emit: h }) {
447
- const k = q, u = g(() => {
448
- var d;
449
- return (d = k.rootValue) == null ? void 0 : d.unit;
447
+ setup(W, { emit: h }) {
448
+ const k = W, d = g(() => {
449
+ var c;
450
+ return (c = k.rootValue) == null ? void 0 : c.unit;
450
451
  }), _ = g(() => {
451
- var d;
452
- return (d = k.rootValue) == null ? void 0 : d._id;
453
- }), C = h, { t: A } = pe(), U = g({
452
+ var c;
453
+ return (c = k.rootValue) == null ? void 0 : c._id;
454
+ }), S = h, { t: A } = pe(), U = g({
454
455
  get() {
455
456
  return !!k.modelValue;
456
457
  },
457
- set(d) {
458
- d ? C("update:modelValue", {
458
+ set(c) {
459
+ c ? S("update:modelValue", {
459
460
  measurement: null,
460
461
  inventoryBindings: []
461
- }) : C("update:modelValue", null);
462
+ }) : S("update:modelValue", null);
462
463
  }
463
- }), l = g(() => an(u.value));
464
- function i(d) {
465
- const r = k.modelValue ?? {};
466
- r.measurement = d ? `${d}` : null, C("update:modelValue", r);
464
+ }), l = g(() => un(d.value));
465
+ function i(c) {
466
+ const s = k.modelValue ?? {};
467
+ s.measurement = c ? `${c}` : null, S("update:modelValue", s);
467
468
  }
468
- function m(d) {
469
- const r = k.modelValue ?? {};
470
- r.inventoryBindings = d, C("update:modelValue", r);
469
+ function u(c) {
470
+ const s = k.modelValue ?? {};
471
+ s.inventoryBindings = c, S("update:modelValue", s);
471
472
  }
472
473
  const a = g(() => {
473
474
  if (!k.modelValue) return null;
474
- const d = k.modelValue;
475
- return d.measurement ? l.value.find((r) => r.value === d.measurement) ?? null : l.value.find((r) => r.value === null) ?? null;
475
+ const c = k.modelValue;
476
+ return c.measurement ? l.value.find((s) => s.value === c.measurement) ?? null : l.value.find((s) => s.value === null) ?? null;
476
477
  });
477
- return (d, r) => {
478
- const f = S("FmSwitch"), w = S("FmSelect"), F = S("FmCard");
479
- return c(), j(F, {
478
+ return (c, s) => {
479
+ const f = C("FmSwitch"), w = C("FmSelect"), F = C("FmCard");
480
+ return p(), Y(F, {
480
481
  variant: "outlined",
481
482
  class: "p-16 flex flex-col gap-16"
482
483
  }, {
483
484
  default: x(() => {
484
- var p, B;
485
+ var m, O;
485
486
  return [
486
- s(f, {
487
+ r(f, {
487
488
  value: "",
488
489
  "model-value": U.value,
489
- "onUpdate:modelValue": r[0] || (r[0] = (R) => U.value = R),
490
+ "onUpdate:modelValue": s[0] || (s[0] = (R) => U.value = R),
490
491
  label: o(A)("inventory.ingredient.convertible.title"),
491
492
  sublabel: o(A)("inventory.ingredient.convertible.subtitle"),
492
493
  labelPlacement: "right",
493
- disabled: d.readonly
494
+ disabled: c.readonly
494
495
  }, null, 8, ["model-value", "label", "sublabel", "disabled"]),
495
- U.value ? (c(), V(ee, { key: 0 }, [
496
+ U.value ? (p(), V(ee, { key: 0 }, [
496
497
  n("div", null, [
497
- s(w, {
498
+ r(w, {
498
499
  label: o(A)("inventory.ingredient.convertible.convertTo"),
499
- modelValue: (p = a.value) == null ? void 0 : p.value,
500
+ modelValue: (m = a.value) == null ? void 0 : m.value,
500
501
  "onUpdate:modelValue": i,
501
502
  items: l.value,
502
- disabled: d.readonly
503
+ disabled: c.readonly
503
504
  }, null, 8, ["label", "modelValue", "items", "disabled"])
504
505
  ]),
505
- s(rn, {
506
+ r(mn, {
506
507
  id: _.value,
507
- "model-value": ((B = d.modelValue) == null ? void 0 : B.inventoryBindings) ?? [],
508
- "onUpdate:modelValue": m,
508
+ "model-value": ((O = c.modelValue) == null ? void 0 : O.inventoryBindings) ?? [],
509
+ "onUpdate:modelValue": u,
509
510
  "exclude-binding-id": _.value,
510
- rules: [o(Oe)(1)],
511
- readonly: d.readonly,
511
+ rules: [o(De)(1)],
512
+ readonly: c.readonly,
512
513
  "allow-recipe-decimal": ""
513
514
  }, null, 8, ["id", "model-value", "exclude-binding-id", "rules", "readonly"])
514
- ], 64)) : N("", !0)
515
+ ], 64)) : L("", !0)
515
516
  ];
516
517
  }),
517
518
  _: 1
518
519
  });
519
520
  };
520
521
  }
521
- }), Ln = { class: "flex gap-8" }, jn = { class: "flex-1" }, Wn = { class: "flex-1" }, qn = { class: "flex flex-col gap-5" }, Hn = { class: "flex items-center gap-8" }, Yn = { class: "flex items-center gap-8" }, Kn = { class: "flex items-center gap-8" }, Gn = { class: "text-fm-color-typo-secondary" }, Jn = { class: "text-fm-color-typo-secondary whitespace-nowrap" }, Qn = {
522
- key: 3,
522
+ }), jn = { class: "flex gap-8" }, Wn = { class: "flex-1" }, qn = { class: "flex-1" }, Hn = { class: "flex flex-col gap-5" }, Yn = { class: "flex flex-col gap-32" }, Kn = { class: "flex items-center gap-8" }, Gn = { class: "flex items-center gap-8" }, Jn = { class: "flex items-center gap-8" }, Qn = { class: "text-fm-color-typo-secondary" }, Xn = { class: "text-fm-color-typo-secondary whitespace-nowrap" }, Zn = {
523
+ key: 1,
523
524
  class: "border-1 border-fm-color-neutral-gray-200 fm-corner-radius-lg flex flex-col p-16 gap-16"
524
- }, Xn = { class: "flex flex-col" }, Zn = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, eo = {
525
- key: 4,
525
+ }, eo = { class: "flex flex-col" }, to = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, no = {
526
+ key: 2,
526
527
  class: "border-1 border-fm-color-neutral-gray-200 fm-corner-radius-lg flex flex-col p-16 gap-16"
527
- }, to = { class: "flex flex-col gap-12" }, no = { class: "flex flex-col gap-4" }, oo = { class: "flex items-center gap-8" }, lo = { class: "fm-typo-en-title-sm-600" }, ao = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, so = { class: "flex flex-col gap-4" }, ro = { class: "flex fm-corner-radius-md border-1 border-fm-color-neutral-gray-200" }, io = { class: "flex-1 p-12 flex flex-col gap-8" }, uo = { class: "mx-auto" }, mo = { class: "flex flex-col" }, co = { class: "fm-typo-en-body-sm-600 translate-y-4" }, po = { class: "flex-1 p-12 flex flex-col gap-8" }, vo = { class: "mx-auto" }, fo = { class: "flex flex-col" }, yo = { class: "fm-typo-en-body-sm-600 translate-y-4" }, go = { class: "flex-1 p-12 flex flex-col gap-8" }, bo = { class: "mx-auto" }, ho = { class: "flex flex-col" }, _o = { class: "fm-typo-en-body-sm-600 translate-y-4" }, xo = {
528
- key: 5,
528
+ }, oo = { class: "flex flex-col gap-12" }, lo = { class: "flex flex-col gap-4" }, ao = { class: "flex items-center gap-8" }, so = { class: "fm-typo-en-title-sm-600" }, ro = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, io = { class: "flex flex-col gap-4" }, uo = { class: "flex fm-corner-radius-md border-1 border-fm-color-neutral-gray-200" }, co = { class: "flex-1 p-12 flex flex-col gap-8" }, mo = { class: "mx-auto" }, po = { class: "flex flex-col" }, vo = { class: "fm-typo-en-body-sm-600 translate-y-4" }, fo = { class: "flex-1 p-12 flex flex-col gap-8" }, yo = { class: "mx-auto" }, go = { class: "flex flex-col" }, bo = { class: "fm-typo-en-body-sm-600 translate-y-4" }, ho = { class: "flex-1 p-12 flex flex-col gap-8" }, _o = { class: "mx-auto" }, xo = { class: "flex flex-col" }, ko = { class: "fm-typo-en-body-sm-600 translate-y-4" }, wo = {
529
+ key: 3,
529
530
  class: "flex flex-col gap-12"
530
- }, ko = { class: "flex flex-col" }, wo = { class: "flex items-center justify-between" }, To = { class: "flex items-center gap-8" }, Vo = { class: "fm-typo-en-title-sm-600" }, Io = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, So = {
531
+ }, To = { class: "flex flex-col" }, Vo = { class: "flex items-center justify-between" }, Io = { class: "flex items-center gap-8" }, So = { class: "fm-typo-en-title-sm-600" }, Co = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, Fo = {
531
532
  key: 0,
532
533
  class: "flex flex-col gap-8"
533
- }, Co = { class: "flex flex-wrap gap-8" }, Fo = {
534
- key: 6,
534
+ }, Ao = { class: "flex flex-wrap gap-8" }, Eo = {
535
+ key: 4,
535
536
  class: "flex flex-col gap-12"
536
- }, Ao = { class: "flex flex-col" }, Eo = { class: "flex items-center justify-between" }, $o = { class: "flex items-center gap-8" }, Mo = { class: "fm-typo-en-title-sm-600" }, Uo = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, Po = {
537
+ }, $o = { class: "flex flex-col" }, Mo = { class: "flex items-center justify-between" }, Uo = { class: "flex items-center gap-8" }, Po = { class: "fm-typo-en-title-sm-600" }, Ro = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, Do = {
537
538
  key: 0,
538
539
  class: "flex flex-col gap-8"
539
- }, Ro = { class: "flex flex-wrap gap-8" }, Oo = {
540
- key: 7,
540
+ }, Oo = { class: "flex flex-wrap gap-8" }, Bo = {
541
+ key: 5,
541
542
  class: "flex flex-col gap-12"
542
- }, Bo = { class: "flex flex-col" }, Do = { class: "flex items-center justify-between" }, No = { class: "flex items-center gap-8" }, zo = { class: "fm-typo-en-title-sm-600" }, Lo = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, jo = {
543
+ }, No = { class: "flex flex-col" }, zo = { class: "flex items-center justify-between" }, Lo = { class: "flex items-center gap-8" }, jo = { class: "fm-typo-en-title-sm-600" }, Wo = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, qo = {
543
544
  key: 0,
544
545
  class: "flex flex-col gap-8"
545
- }, Wo = { class: "flex flex-wrap gap-8" }, qo = /* @__PURE__ */ ke({
546
+ }, Ho = { class: "flex flex-wrap gap-8" }, Yo = /* @__PURE__ */ xe({
546
547
  __name: "IngredientForm",
547
548
  props: /* @__PURE__ */ st({
548
549
  mode: {},
@@ -556,41 +557,41 @@ const zn = /* @__PURE__ */ ke({
556
557
  searchModifiers: {}
557
558
  }),
558
559
  emits: /* @__PURE__ */ st(["update:modelValue", "click:submit", "update:purchaseOrderTemplateIds", "update:wastageTemplateIds", "update:closingTemplateIds"], ["update:search"]),
559
- setup(q, { expose: h, emit: k }) {
560
+ setup(W, { expose: h, emit: k }) {
560
561
  var Xe;
561
- const { t: u } = pe(), _ = Ke();
562
+ const { t: d } = pe(), _ = Ke();
562
563
  Ae();
563
- const C = Vt(), A = It(), U = St(), l = q, i = k, m = Fe(), a = Ge(), d = Tt(), r = Ee(), f = g(() => r.isEnabled);
564
+ const S = Vt(), A = It(), U = St(), l = W, i = k, u = Fe(), a = Ge(), c = Tt(), s = Ee(), f = g(() => s.isEnabled);
564
565
  P(void 0);
565
- const w = P([]), F = P([]), p = P([]), B = P(!1);
566
+ const w = P([]), F = P([]), m = P([]), O = P(!1);
566
567
  function R(e) {
567
568
  if (e.length === 0) return;
568
569
  const t = e[0], b = l.modelValue ?? {
569
- unit: m.units.find((I) => I)
570
+ unit: u.units.find((I) => I)
570
571
  };
571
572
  b.unit || (b.unit = t, i("update:modelValue", b));
572
573
  }
573
- Ot(() => {
574
- R(m.units), l.mode === W.CREATE && (d.mustUsePoTemplate && ne(), d.enableWastageTemplate && ue(), d.enableClosingTemplate && oe());
575
- }), _t([() => m.units], ([e]) => {
574
+ Dt(() => {
575
+ R(u.units), l.mode === j.CREATE && (c.mustUsePoTemplate && ne(), c.enableWastageTemplate && ue(), c.enableClosingTemplate && oe());
576
+ }), _t([() => u.units], ([e]) => {
576
577
  R(e);
577
578
  });
578
579
  function ve() {
579
580
  i("click:submit");
580
581
  }
581
582
  async function ne() {
582
- w.value = [], B.value = !0;
583
+ w.value = [], O.value = !0;
583
584
  try {
584
- const [e] = await Promise.all([C.readTemplates()]).delayed(1e3);
585
+ const [e] = await Promise.all([S.readTemplates()]).delayed(1e3);
585
586
  w.value = e;
586
587
  } catch (e) {
587
588
  console.log("Something went wrong when fetching templates:", e);
588
589
  } finally {
589
- B.value = !1;
590
+ O.value = !1;
590
591
  }
591
592
  }
592
593
  async function ue() {
593
- F.value = [], B.value = !0;
594
+ F.value = [], O.value = !0;
594
595
  try {
595
596
  const [e] = await Promise.all([A.readTemplates()]).delayed(
596
597
  1e3
@@ -599,20 +600,20 @@ const zn = /* @__PURE__ */ ke({
599
600
  } catch (e) {
600
601
  console.log("Something went wrong when fetching wastage templates:", e);
601
602
  } finally {
602
- B.value = !1;
603
+ O.value = !1;
603
604
  }
604
605
  }
605
606
  async function oe() {
606
- p.value = [], B.value = !0;
607
+ m.value = [], O.value = !0;
607
608
  try {
608
609
  const [e] = await Promise.all([U.listTemplates()]).delayed(
609
610
  1e3
610
611
  );
611
- p.value = e;
612
+ m.value = e;
612
613
  } catch (e) {
613
614
  console.log("Something went wrong when fetching closing templates:", e);
614
615
  } finally {
615
- B.value = !1;
616
+ O.value = !1;
616
617
  }
617
618
  }
618
619
  const le = g({
@@ -652,10 +653,10 @@ const zn = /* @__PURE__ */ ke({
652
653
  get() {
653
654
  var t, b;
654
655
  const e = (b = (t = l.modelValue) == null ? void 0 : t.defaultCost) == null ? void 0 : b.costPerUnit;
655
- return e ? +un(e) : 0;
656
+ return e ? +an(e) : 0;
656
657
  },
657
658
  set(e) {
658
- var b, I, Y, D;
659
+ var b, I, H, B;
659
660
  const t = l.modelValue ? {
660
661
  ...l.modelValue
661
662
  } : {};
@@ -665,7 +666,7 @@ const zn = /* @__PURE__ */ ke({
665
666
  precision: 2,
666
667
  currency: ((b = dt(a.currentCountry.value)) == null ? void 0 : b.currency) ?? "MYR"
667
668
  },
668
- measurement: (D = (Y = (I = l.modelValue) == null ? void 0 : I.unit) == null ? void 0 : Y.measurements) == null ? void 0 : D.find(
669
+ measurement: (B = (H = (I = l.modelValue) == null ? void 0 : I.unit) == null ? void 0 : H.measurements) == null ? void 0 : B.find(
669
670
  (se) => {
670
671
  var re;
671
672
  return se.id === ((re = l.modelValue) == null ? void 0 : re.trackingMeasurement);
@@ -673,22 +674,22 @@ const zn = /* @__PURE__ */ ke({
673
674
  )
674
675
  }), t.defaultCost.costPerUnit = {
675
676
  ...t.defaultCost.costPerUnit,
676
- ...dn(+e, 4)
677
+ ...ln(+e, 4)
677
678
  }, i("update:modelValue", t);
678
679
  }
679
680
  }), ye = g(() => {
680
681
  var t, b, I;
681
- const e = ((t = l.modelValue) == null ? void 0 : t.unit) ?? m.units.find((Y) => Y);
682
+ const e = ((t = l.modelValue) == null ? void 0 : t.unit) ?? u.units.find((H) => H);
682
683
  return e ? {
683
684
  _id: e._id,
684
685
  measurement: (b = l.modelValue) == null ? void 0 : b.trackingMeasurement,
685
- name: ((I = e.measurements.find((Y) => {
686
- var D;
687
- return Y.id === ((D = l.modelValue) == null ? void 0 : D.trackingMeasurement);
686
+ name: ((I = e.measurements.find((H) => {
687
+ var B;
688
+ return H.id === ((B = l.modelValue) == null ? void 0 : B.trackingMeasurement);
688
689
  })) == null ? void 0 : I.name) ?? e.name
689
690
  } : null;
690
691
  }), we = g(
691
- () => m.units.flatMap(({ name: e, _id: t, abbrev: b, measurements: I }) => [
692
+ () => u.units.flatMap(({ name: e, _id: t, abbrev: b, measurements: I }) => [
692
693
  {
693
694
  label: `${e}`,
694
695
  value: null,
@@ -699,41 +700,41 @@ const zn = /* @__PURE__ */ ke({
699
700
  value: { _id: t },
700
701
  displayAsSection: !1
701
702
  },
702
- ...I.map(({ id: Y, name: D, abbrev: se }) => ({
703
- label: `${D} (${se})`,
704
- value: { _id: t, measurement: Y },
703
+ ...I.map(({ id: H, name: B, abbrev: se }) => ({
704
+ label: `${B} (${se})`,
705
+ value: { _id: t, measurement: H },
705
706
  displayAsSection: !1
706
707
  }))
707
708
  ])
708
- ), y = Bt(q, "search"), M = g(
709
- () => new yn(we.value, ["label", "value"], {
709
+ ), y = Ot(W, "search"), M = g(
710
+ () => new bn(we.value, ["label", "value"], {
710
711
  caseSensitive: !1,
711
712
  sort: !0
712
713
  })
713
714
  ), G = g(() => M.value.search(y.value));
714
715
  function E(e) {
715
- var t, b, I, Y, D;
716
- return ((b = (t = l.modelValue) == null ? void 0 : t.unit) == null ? void 0 : b._id) === ((I = e.value) == null ? void 0 : I._id) && ((Y = l.modelValue) == null ? void 0 : Y.trackingMeasurement) === ((D = e.value) == null ? void 0 : D.measurement);
716
+ var t, b, I, H, B;
717
+ return ((b = (t = l.modelValue) == null ? void 0 : t.unit) == null ? void 0 : b._id) === ((I = e.value) == null ? void 0 : I._id) && ((H = l.modelValue) == null ? void 0 : H.trackingMeasurement) === ((B = e.value) == null ? void 0 : B.measurement);
717
718
  }
718
719
  function v(e) {
719
720
  var se, re;
720
721
  if (!e) return;
721
- const { _id: t, measurement: b } = e, I = b || void 0, Y = m.units.find((Se) => Se._id === t);
722
- if (!Y)
722
+ const { _id: t, measurement: b } = e, I = b || void 0, H = u.units.find((Se) => Se._id === t);
723
+ if (!H)
723
724
  return;
724
- const D = l.modelValue ?? {};
725
- D.unit = Y, D.trackingMeasurement = I, D.convert && (D.convert.measurement = I || null), d.enableTotalCost && (D.defaultCost = {
726
- measurement: Y.measurements.find((Se) => Se.id === I),
725
+ const B = l.modelValue ?? {};
726
+ B.unit = H, B.trackingMeasurement = I, B.convert && (B.convert.measurement = I || null), B.defaultCost = {
727
+ measurement: H.measurements.find((Se) => Se.id === I),
727
728
  costPerUnit: {
728
- ...((se = D.defaultCost) == null ? void 0 : se.costPerUnit) ?? {
729
+ ...((se = B.defaultCost) == null ? void 0 : se.costPerUnit) ?? {
729
730
  amount: 0,
730
731
  precision: 2,
731
732
  currency: ((re = dt(a.currentCountry.value)) == null ? void 0 : re.currency) ?? "MYR"
732
733
  }
733
734
  }
734
- }), i("update:modelValue", D);
735
+ }, i("update:modelValue", B);
735
736
  }
736
- const z = g({
737
+ const N = g({
737
738
  get() {
738
739
  var e;
739
740
  return ((e = l.modelValue) == null ? void 0 : e.convert) ?? null;
@@ -750,9 +751,9 @@ const zn = /* @__PURE__ */ ke({
750
751
  e === ut.enum.WAVG
751
752
  )
752
753
  ).map((e) => ({
753
- label: u(`inventory.ingredient.valuationMethod.${e}`),
754
+ label: d(`inventory.ingredient.valuationMethod.${e}`),
754
755
  value: e
755
- }))), me = g({
756
+ }))), ce = g({
756
757
  get() {
757
758
  var e;
758
759
  return ((e = l.modelValue) == null ? void 0 : e.valuation) ?? "WAVG";
@@ -774,42 +775,42 @@ const zn = /* @__PURE__ */ ke({
774
775
  } : {};
775
776
  t.customAttributes = e, i("update:modelValue", t);
776
777
  }
777
- }), H = P();
778
+ }), q = P();
778
779
  h({
779
780
  validateInputs: () => {
780
781
  var e, t;
781
- (t = (e = H.value) == null ? void 0 : e.validateInputs) == null || t.call(e);
782
+ (t = (e = q.value) == null ? void 0 : e.validateInputs) == null || t.call(e);
782
783
  },
783
784
  resetInputsValidation: () => {
784
785
  var e, t;
785
- (t = (e = H.value) == null ? void 0 : e.resetInputsValidation) == null || t.call(e);
786
+ (t = (e = q.value) == null ? void 0 : e.resetInputsValidation) == null || t.call(e);
786
787
  },
787
788
  resetInputs: () => {
788
789
  var e, t;
789
- (t = (e = H.value) == null ? void 0 : e.resetInputs) == null || t.call(e);
790
+ (t = (e = q.value) == null ? void 0 : e.resetInputs) == null || t.call(e);
790
791
  }
791
792
  });
792
- const O = P(!1), K = g(
793
+ const D = P(!1), K = g(
793
794
  () => {
794
795
  var e, t, b;
795
- return (e = l.modelValue) != null && e._id ? ((b = m.menu.bindedBySkuId[(t = l.modelValue) == null ? void 0 : t._id]) == null ? void 0 : b.filter(
796
+ return (e = l.modelValue) != null && e._id ? ((b = u.menu.bindedBySkuId[(t = l.modelValue) == null ? void 0 : t._id]) == null ? void 0 : b.filter(
796
797
  (I) => I.from === "INGREDIENT"
797
798
  )) ?? [] : [];
798
799
  }
799
- ), L = g(
800
+ ), z = g(
800
801
  () => {
801
802
  var e, t, b;
802
- return (e = l.modelValue) != null && e._id ? ((b = m.menu.bindedBySkuId[(t = l.modelValue) == null ? void 0 : t._id]) == null ? void 0 : b.filter(
803
+ return (e = l.modelValue) != null && e._id ? ((b = u.menu.bindedBySkuId[(t = l.modelValue) == null ? void 0 : t._id]) == null ? void 0 : b.filter(
803
804
  (I) => I.from === "RECIPE"
804
805
  )) ?? [] : [];
805
806
  }
806
807
  ), ge = g(
807
808
  () => {
808
809
  var e, t, b;
809
- return (e = l.modelValue) != null && e._id ? ((b = m.menu.bindedBySkuId[(t = l.modelValue) == null ? void 0 : t._id]) == null ? void 0 : b.filter((I) => I.from === "MENU")) ?? [] : [];
810
+ return (e = l.modelValue) != null && e._id ? ((b = u.menu.bindedBySkuId[(t = l.modelValue) == null ? void 0 : t._id]) == null ? void 0 : b.filter((I) => I.from === "MENU")) ?? [] : [];
810
811
  }
811
812
  ), $e = g(
812
- () => m.skus.map((e) => ({ label: e.name, value: e.code }))
813
+ () => u.skus.map((e) => ({ label: e.name, value: e.code }))
813
814
  ), Me = P((Xe = l.modelValue) == null ? void 0 : Xe.code);
814
815
  function Ue(e) {
815
816
  var b;
@@ -818,13 +819,13 @@ const zn = /* @__PURE__ */ ke({
818
819
  }
819
820
  const be = g(
820
821
  () => {
821
- var e, t, b, I, Y, D;
822
+ var e, t, b, I, H, B;
822
823
  return ((I = (b = (t = (e = l.modelValue) == null ? void 0 : e.unit) == null ? void 0 : t.measurements) == null ? void 0 : b.find(
823
824
  (se) => {
824
825
  var re;
825
826
  return se.id === ((re = l.modelValue) == null ? void 0 : re.trackingMeasurement);
826
827
  }
827
- )) == null ? void 0 : I.abbrev) ?? ((D = (Y = l.modelValue) == null ? void 0 : Y.unit) == null ? void 0 : D.abbrev);
828
+ )) == null ? void 0 : I.abbrev) ?? ((B = (H = l.modelValue) == null ? void 0 : H.unit) == null ? void 0 : B.abbrev);
828
829
  }
829
830
  ), he = g({
830
831
  get() {
@@ -840,7 +841,7 @@ const zn = /* @__PURE__ */ ke({
840
841
  } : {};
841
842
  b.thresholds = t, i("update:modelValue", b);
842
843
  }
843
- }), ce = g({
844
+ }), me = g({
844
845
  get() {
845
846
  var e, t;
846
847
  return ((t = (e = l.modelValue) == null ? void 0 : e.thresholds) == null ? void 0 : t.mid) ?? Re().mid;
@@ -854,17 +855,17 @@ const zn = /* @__PURE__ */ ke({
854
855
  } : {};
855
856
  b.thresholds = t, i("update:modelValue", b);
856
857
  }
857
- }), Te = g(() => d.mustUsePoTemplate && l.mode === W.CREATE && w.value.length > 0 ? w.value.map((e) => ({
858
+ }), Te = g(() => c.mustUsePoTemplate && l.mode === j.CREATE && w.value.length > 0 ? w.value.map((e) => ({
858
859
  label: e.name || "Template",
859
860
  value: e._id || "template_" + e.name
860
861
  })) : []), Ve = g(() => Te.value.filter(
861
862
  (e) => (l.purchaseOrderTemplateIds ?? []).includes(e.value)
862
- )), _e = g(() => d.enableWastageTemplate && l.mode === W.CREATE && F.value.length > 0 ? F.value.map((e) => ({
863
+ )), _e = g(() => c.enableWastageTemplate && l.mode === j.CREATE && F.value.length > 0 ? F.value.map((e) => ({
863
864
  label: e.name || "Template",
864
865
  value: e._id || "template_" + e.name
865
866
  })) : []), Ie = g(() => _e.value.filter(
866
867
  (e) => (l.wastageTemplateIds ?? []).includes(e.value)
867
- )), Je = g(() => d.enableClosingTemplate && l.mode === W.CREATE && p.value.length > 0 ? p.value.map((e) => ({
868
+ )), Je = g(() => c.enableClosingTemplate && l.mode === j.CREATE && m.value.length > 0 ? m.value.map((e) => ({
868
869
  label: e.name || "Template",
869
870
  value: e._id || "template_" + e.name
870
871
  })) : []), Qe = g(() => Je.value.filter(
@@ -872,7 +873,7 @@ const zn = /* @__PURE__ */ ke({
872
873
  ));
873
874
  function Ct() {
874
875
  _.open({
875
- title: u("inventory.ingredient.purchaseOrderTemplates.selectTitle"),
876
+ title: d("inventory.ingredient.purchaseOrderTemplates.selectTitle"),
876
877
  closeButton: !0,
877
878
  contentComponent: He,
878
879
  contentComponentProps: {
@@ -880,11 +881,11 @@ const zn = /* @__PURE__ */ ke({
880
881
  items: Te.value
881
882
  },
882
883
  primaryActions: {
883
- text: u("common.confirm"),
884
+ text: d("common.confirm"),
884
885
  close: !0
885
886
  },
886
887
  secondaryActions: {
887
- text: u("common.cancel"),
888
+ text: d("common.cancel"),
888
889
  close: !0,
889
890
  variant: "tertiary"
890
891
  }
@@ -894,7 +895,7 @@ const zn = /* @__PURE__ */ ke({
894
895
  }
895
896
  function Ft() {
896
897
  _.open({
897
- title: u("inventory.ingredient.wastageTemplates.selectTitle"),
898
+ title: d("inventory.ingredient.wastageTemplates.selectTitle"),
898
899
  closeButton: !0,
899
900
  contentComponent: He,
900
901
  contentComponentProps: {
@@ -902,11 +903,11 @@ const zn = /* @__PURE__ */ ke({
902
903
  items: _e.value
903
904
  },
904
905
  primaryActions: {
905
- text: u("common.confirm"),
906
+ text: d("common.confirm"),
906
907
  close: !0
907
908
  },
908
909
  secondaryActions: {
909
- text: u("common.cancel"),
910
+ text: d("common.cancel"),
910
911
  close: !0,
911
912
  variant: "tertiary"
912
913
  }
@@ -916,7 +917,7 @@ const zn = /* @__PURE__ */ ke({
916
917
  }
917
918
  function At() {
918
919
  _.open({
919
- title: u("inventory.ingredient.closingTemplates.selectTitle"),
920
+ title: d("inventory.ingredient.closingTemplates.selectTitle"),
920
921
  closeButton: !0,
921
922
  contentComponent: He,
922
923
  contentComponentProps: {
@@ -924,11 +925,11 @@ const zn = /* @__PURE__ */ ke({
924
925
  items: Je.value
925
926
  },
926
927
  primaryActions: {
927
- text: u("common.confirm"),
928
+ text: d("common.confirm"),
928
929
  close: !0
929
930
  },
930
931
  secondaryActions: {
931
- text: u("common.cancel"),
932
+ text: d("common.cancel"),
932
933
  close: !0,
933
934
  variant: "tertiary"
934
935
  }
@@ -942,53 +943,53 @@ const zn = /* @__PURE__ */ ke({
942
943
  };
943
944
  }
944
945
  return (e, t) => {
945
- const b = S("FmTextField"), I = S("FmLabel"), Y = S("FmField"), D = S("FmIcon"), se = S("FmMenuHeader"), re = S("FmMenuDivider"), Se = S("FmMenuItem"), $t = S("FmMenu"), Ze = S("FmFormGroup"), Mt = S("FmSelect"), et = S("FmSwitch"), tt = S("FmStepperField"), De = S("FmButton"), Ne = S("FmChip"), Ut = S("FmForm");
946
- return c(), j(Ut, {
946
+ const b = C("FmTextField"), I = C("FmLabel"), H = C("FmField"), B = C("FmIcon"), se = C("FmMenuHeader"), re = C("FmMenuDivider"), Se = C("FmMenuItem"), $t = C("FmMenu"), Ze = C("FmFormGroup"), Mt = C("FmSelect"), et = C("FmSwitch"), tt = C("FmStepperField"), Be = C("FmButton"), Ne = C("FmChip"), Ut = C("FmForm");
947
+ return p(), Y(Ut, {
947
948
  disabled: e.disabled,
948
949
  ref_key: "formRef",
949
- ref: H,
950
+ ref: q,
950
951
  class: "flex flex-col gap-32",
951
952
  onValidationSuccess: ve
952
953
  }, {
953
954
  default: x(() => {
954
955
  var nt, ot, lt, at;
955
956
  return [
956
- n("div", Ln, [
957
- n("div", jn, [
958
- s(Ce, {
957
+ n("div", jn, [
958
+ n("div", Wn, [
959
+ r(Ce, {
959
960
  "tooltip-message": "This field is managed by NetSuite",
960
961
  "tooltip-z-index": 50,
961
- label: o(u)("inventory.ingredient.code"),
962
+ label: o(d)("inventory.ingredient.code"),
962
963
  "model-value": le.value,
963
964
  "onUpdate:modelValue": t[1] || (t[1] = (T) => le.value = T),
964
965
  locked: f.value,
965
966
  disabled: e.disabled
966
967
  }, {
967
968
  default: x(() => [
968
- s(b, {
969
- label: o(u)("inventory.ingredient.code"),
969
+ r(b, {
970
+ label: o(d)("inventory.ingredient.code"),
970
971
  "model-value": le.value,
971
972
  "onUpdate:modelValue": t[0] || (t[0] = (T) => le.value = T),
972
- rules: [o(Le)(), o(on)($e.value, Me.value)],
973
+ rules: [o(Le)(), o(sn)($e.value, Me.value)],
973
974
  "label-mark": "required"
974
975
  }, null, 8, ["label", "model-value", "rules"])
975
976
  ]),
976
977
  _: 1
977
978
  }, 8, ["label", "model-value", "locked", "disabled"])
978
979
  ]),
979
- n("div", Wn, [
980
- s(Ce, {
980
+ n("div", qn, [
981
+ r(Ce, {
981
982
  "tooltip-message": "This field is managed by NetSuite",
982
983
  "tooltip-z-index": 50,
983
- label: o(u)("inventory.ingredient.name"),
984
+ label: o(d)("inventory.ingredient.name"),
984
985
  "model-value": ae.value,
985
986
  "onUpdate:modelValue": t[3] || (t[3] = (T) => ae.value = T),
986
987
  locked: f.value,
987
988
  disabled: e.disabled
988
989
  }, {
989
990
  default: x(() => [
990
- s(b, {
991
- label: o(u)("inventory.ingredient.name"),
991
+ r(b, {
992
+ label: o(d)("inventory.ingredient.name"),
992
993
  "model-value": ae.value,
993
994
  "onUpdate:modelValue": t[2] || (t[2] = (T) => ae.value = T),
994
995
  rules: [o(Le)()],
@@ -999,30 +1000,30 @@ const zn = /* @__PURE__ */ ke({
999
1000
  }, 8, ["label", "model-value", "locked", "disabled"])
1000
1001
  ])
1001
1002
  ]),
1002
- s(Ce, {
1003
+ r(Ce, {
1003
1004
  "tooltip-message": "This field is managed by NetSuite",
1004
1005
  "tooltip-z-index": 50,
1005
- label: o(u)("inventory.ingredient.unit"),
1006
+ label: o(d)("inventory.ingredient.unit"),
1006
1007
  "helper-text": (nt = e.modelValue) != null && nt.trackingMeasurement ? `Base unit: ${(lt = (ot = e.modelValue) == null ? void 0 : ot.unit) == null ? void 0 : lt.name}` : void 0,
1007
1008
  "model-value": (at = ye.value) == null ? void 0 : at.name,
1008
1009
  locked: f.value,
1009
1010
  disabled: e.disabled
1010
1011
  }, {
1011
1012
  default: x(() => [
1012
- s(Ze, {
1013
+ r(Ze, {
1013
1014
  "model-value": ye.value,
1014
1015
  rules: [o(Le)()],
1015
1016
  "label-mark": "required"
1016
1017
  }, {
1017
1018
  label: x(() => [
1018
- s(I, {
1019
- label: o(u)("inventory.ingredient.unit")
1019
+ r(I, {
1020
+ label: o(d)("inventory.ingredient.unit")
1020
1021
  }, null, 8, ["label"])
1021
1022
  ]),
1022
1023
  default: x(({ invalid: T }) => [
1023
- s($t, null, {
1024
+ r($t, null, {
1024
1025
  "menu-button": x(() => [
1025
- s(Y, {
1026
+ r(H, {
1026
1027
  class: ie([
1027
1028
  "fm-typo-en-body-lg-400",
1028
1029
  {
@@ -1043,14 +1044,14 @@ const zn = /* @__PURE__ */ ke({
1043
1044
  }, 1032, ["class", "invalid"])
1044
1045
  ]),
1045
1046
  default: x(() => [
1046
- n("div", qn, [
1047
- s(b, {
1047
+ n("div", Hn, [
1048
+ r(b, {
1048
1049
  modelValue: y.value,
1049
1050
  "onUpdate:modelValue": t[4] || (t[4] = (X) => y.value = X),
1050
1051
  placeholder: "Filter options"
1051
1052
  }, {
1052
1053
  prepend: x(() => [
1053
- s(D, { name: "search" })
1054
+ r(B, { name: "search" })
1054
1055
  ]),
1055
1056
  _: 1
1056
1057
  }, 8, ["modelValue"]),
@@ -1058,17 +1059,17 @@ const zn = /* @__PURE__ */ ke({
1058
1059
  class: "overflow-x-hidden overflow-y-auto max-h-[300px]",
1059
1060
  onVnodeMounted: Ue
1060
1061
  }, [
1061
- (c(!0), V(ee, null, de(G.value, (X, Pt) => (c(), V(ee, { key: Pt }, [
1062
- X.displayAsSection ? (c(), V(ee, { key: 0 }, [
1063
- s(se, {
1062
+ (p(!0), V(ee, null, de(G.value, (X, Pt) => (p(), V(ee, { key: Pt }, [
1063
+ X.displayAsSection ? (p(), V(ee, { key: 0 }, [
1064
+ r(se, {
1064
1065
  label: X.label
1065
1066
  }, null, 8, ["label"]),
1066
- s(re)
1067
- ], 64)) : (c(), j(Se, {
1067
+ r(re)
1068
+ ], 64)) : (p(), Y(Se, {
1068
1069
  key: 1,
1069
1070
  label: X.label,
1070
1071
  "model-value": E(X),
1071
- onClick: (yl) => v(X.value),
1072
+ onClick: (bl) => v(X.value),
1072
1073
  "x-should-scroll-into": `${E(X)}`
1073
1074
  }, null, 8, ["label", "model-value", "onClick", "x-should-scroll-into"]))
1074
1075
  ], 64))), 128))
@@ -1083,162 +1084,160 @@ const zn = /* @__PURE__ */ ke({
1083
1084
  ]),
1084
1085
  _: 1
1085
1086
  }, 8, ["label", "helper-text", "model-value", "locked", "disabled"]),
1086
- o(d).enableTotalCost ? (c(), j(Ce, {
1087
+ n("div", Yn, [
1088
+ r(Ce, {
1089
+ "tooltip-message": "This field is managed by NetSuite",
1090
+ "tooltip-z-index": 50,
1091
+ label: o(d)("inventory.ingredient.valuationMethod.title"),
1092
+ "model-value": o(d)("inventory.ingredient.valuationMethod." + ce.value),
1093
+ locked: f.value,
1094
+ disabled: e.disabled
1095
+ }, {
1096
+ label: x(() => [
1097
+ n("div", Kn, [
1098
+ r(I, {
1099
+ label: o(d)("inventory.ingredient.valuationMethod.title")
1100
+ }, null, 8, ["label"]),
1101
+ r(ke, {
1102
+ tier: "premium",
1103
+ category: "premium",
1104
+ "feature-key": "total-cost"
1105
+ })
1106
+ ])
1107
+ ]),
1108
+ default: x(() => [
1109
+ r(Mt, {
1110
+ class: "col-span-2",
1111
+ label: o(d)("inventory.ingredient.valuationMethod.title"),
1112
+ "model-value": ce.value,
1113
+ "onUpdate:modelValue": t[5] || (t[5] = (T) => ce.value = T),
1114
+ items: J.value
1115
+ }, null, 8, ["label", "model-value", "items"])
1116
+ ]),
1117
+ _: 1
1118
+ }, 8, ["label", "model-value", "locked", "disabled"]),
1119
+ r(Ce, {
1120
+ "tooltip-message": "This field is managed by NetSuite",
1121
+ "tooltip-z-index": 50,
1122
+ "model-value": `${o(jt)()} ${fe.value}`,
1123
+ locked: f.value,
1124
+ "append-text": `/ ${be.value}`,
1125
+ disabled: e.disabled
1126
+ }, {
1127
+ label: x(() => [
1128
+ n("div", Gn, [
1129
+ r(I, {
1130
+ label: o(d)("inventory.ingredient.pricePerUnit")
1131
+ }, null, 8, ["label"]),
1132
+ r(ke, {
1133
+ tier: "premium",
1134
+ category: "premium",
1135
+ "feature-key": "total-cost"
1136
+ })
1137
+ ])
1138
+ ]),
1139
+ default: x(() => [
1140
+ r(b, {
1141
+ "model-value": fe.value,
1142
+ "onUpdate:modelValue": t[6] || (t[6] = (T) => fe.value = T),
1143
+ rules: [o(De)(0), o(rn)(4)]
1144
+ }, {
1145
+ label: x(() => [
1146
+ n("div", Jn, [
1147
+ r(I, {
1148
+ label: o(d)("inventory.ingredient.pricePerUnit")
1149
+ }, null, 8, ["label"])
1150
+ ])
1151
+ ]),
1152
+ prepend: x(() => {
1153
+ var T, X;
1154
+ return [
1155
+ n("div", Qn, $(o(ct)(((T = o(a).currentCountry) == null ? void 0 : T.value) ?? o(mt)) === "MYR" ? "RM" : o(ct)(((X = o(a).currentCountry) == null ? void 0 : X.value) ?? o(mt))), 1)
1156
+ ];
1157
+ }),
1158
+ append: x(() => [
1159
+ n("div", Xn, " / " + $(be.value), 1)
1160
+ ]),
1161
+ _: 1
1162
+ }, 8, ["model-value", "rules"])
1163
+ ]),
1164
+ _: 1
1165
+ }, 8, ["model-value", "locked", "append-text", "disabled"])
1166
+ ]),
1167
+ !f.value || N.value ? (p(), Y(Ln, {
1087
1168
  key: 0,
1088
- "tooltip-message": "This field is managed by NetSuite",
1089
- "tooltip-z-index": 50,
1090
- label: o(u)("inventory.ingredient.valuationMethod.title"),
1091
- "model-value": o(u)("inventory.ingredient.valuationMethod." + me.value),
1092
- locked: f.value,
1093
- disabled: e.disabled
1094
- }, {
1095
- label: x(() => [
1096
- n("div", Hn, [
1097
- s(I, {
1098
- label: o(u)("inventory.ingredient.valuationMethod.title")
1099
- }, null, 8, ["label"]),
1100
- s(xe, {
1101
- tier: "premium",
1102
- category: "premium"
1103
- })
1104
- ])
1105
- ]),
1106
- default: x(() => [
1107
- s(Mt, {
1108
- class: "col-span-2",
1109
- label: o(u)("inventory.ingredient.valuationMethod.title"),
1110
- "model-value": me.value,
1111
- "onUpdate:modelValue": t[5] || (t[5] = (T) => me.value = T),
1112
- items: J.value
1113
- }, null, 8, ["label", "model-value", "items"])
1114
- ]),
1115
- _: 1
1116
- }, 8, ["label", "model-value", "locked", "disabled"])) : N("", !0),
1117
- o(d).enableTotalCost ? (c(), j(Ce, {
1118
- key: 1,
1119
- "tooltip-message": "This field is managed by NetSuite",
1120
- "tooltip-z-index": 50,
1121
- "model-value": `${o(jt)()} ${fe.value}`,
1122
- locked: f.value,
1123
- "append-text": `/ ${be.value}`,
1124
- disabled: e.disabled
1125
- }, {
1126
- label: x(() => [
1127
- n("div", Yn, [
1128
- s(I, {
1129
- label: o(u)("inventory.ingredient.pricePerUnit")
1130
- }, null, 8, ["label"]),
1131
- s(xe, {
1132
- tier: "premium",
1133
- category: "premium"
1134
- })
1135
- ])
1136
- ]),
1137
- default: x(() => [
1138
- s(b, {
1139
- "model-value": fe.value,
1140
- "onUpdate:modelValue": t[6] || (t[6] = (T) => fe.value = T),
1141
- rules: [o(Oe)(0), o(ln)(4)]
1142
- }, {
1143
- label: x(() => [
1144
- n("div", Kn, [
1145
- s(I, {
1146
- label: o(u)("inventory.ingredient.pricePerUnit")
1147
- }, null, 8, ["label"]),
1148
- s(xe, {
1149
- tier: "premium",
1150
- category: "premium"
1151
- })
1152
- ])
1153
- ]),
1154
- prepend: x(() => {
1155
- var T, X;
1156
- return [
1157
- n("div", Gn, $(o(mt)(((T = o(a).currentCountry) == null ? void 0 : T.value) ?? o(ct)) === "MYR" ? "RM" : o(mt)(((X = o(a).currentCountry) == null ? void 0 : X.value) ?? o(ct))), 1)
1158
- ];
1159
- }),
1160
- append: x(() => [
1161
- n("div", Jn, " / " + $(be.value), 1)
1162
- ]),
1163
- _: 1
1164
- }, 8, ["model-value", "rules"])
1165
- ]),
1166
- _: 1
1167
- }, 8, ["model-value", "locked", "append-text", "disabled"])) : N("", !0),
1168
- !f.value || z.value ? (c(), j(zn, {
1169
- key: 2,
1170
- "model-value": z.value,
1171
- "onUpdate:modelValue": t[7] || (t[7] = (T) => z.value = T),
1169
+ "model-value": N.value,
1170
+ "onUpdate:modelValue": t[7] || (t[7] = (T) => N.value = T),
1172
1171
  "root-value": e.modelValue,
1173
1172
  readonly: f.value
1174
- }, null, 8, ["model-value", "root-value", "readonly"])) : N("", !0),
1175
- e.mode !== o(W).CREATE ? (c(), V("div", Qn, [
1176
- s(et, {
1177
- label: o(u)("inventory.ingredient.status.inactive"),
1173
+ }, null, 8, ["model-value", "root-value", "readonly"])) : L("", !0),
1174
+ e.mode !== o(j).CREATE ? (p(), V("div", Zn, [
1175
+ r(et, {
1176
+ label: o(d)("inventory.ingredient.status.inactive"),
1178
1177
  "model-value": te.value,
1179
1178
  "onUpdate:modelValue": t[8] || (t[8] = (T) => te.value = T),
1180
1179
  "label-placement": "right",
1181
1180
  disabled: f.value
1182
1181
  }, null, 8, ["label", "model-value", "disabled"]),
1183
- n("div", Xn, [
1184
- n("div", Zn, $(o(u)("inventory.ingredient.status.preventFromOrder")), 1)
1182
+ n("div", eo, [
1183
+ n("div", to, $(o(d)("inventory.ingredient.status.preventFromOrder")), 1)
1185
1184
  ])
1186
- ])) : N("", !0),
1187
- e.mode !== o(W).CREATE ? (c(), V("div", eo, [
1185
+ ])) : L("", !0),
1186
+ e.mode !== o(j).CREATE ? (p(), V("div", no, [
1188
1187
  n("div", null, [
1189
- s(et, {
1190
- label: o(u)("inventory.ingredient.bindedItems.title"),
1191
- modelValue: O.value,
1192
- "onUpdate:modelValue": t[9] || (t[9] = (T) => O.value = T),
1188
+ r(et, {
1189
+ label: o(d)("inventory.ingredient.bindedItems.title"),
1190
+ modelValue: D.value,
1191
+ "onUpdate:modelValue": t[9] || (t[9] = (T) => D.value = T),
1193
1192
  "label-placement": "right"
1194
1193
  }, null, 8, ["label", "modelValue"])
1195
1194
  ]),
1196
- O.value && K.value.length ? (c(), j(qe, {
1195
+ D.value && K.value.length ? (p(), Y(qe, {
1197
1196
  key: 0,
1198
- name: o(u)("inventory.ingredient.bindedItems.ingredient"),
1197
+ name: o(d)("inventory.ingredient.bindedItems.ingredient"),
1199
1198
  bindings: K.value
1200
- }, null, 8, ["name", "bindings"])) : N("", !0),
1201
- O.value && L.value.length ? (c(), j(qe, {
1199
+ }, null, 8, ["name", "bindings"])) : L("", !0),
1200
+ D.value && z.value.length ? (p(), Y(qe, {
1202
1201
  key: 1,
1203
- name: o(u)("inventory.ingredient.bindedItems.recipe"),
1204
- bindings: L.value
1205
- }, null, 8, ["name", "bindings"])) : N("", !0),
1206
- O.value && ge.value.length ? (c(), j(qe, {
1202
+ name: o(d)("inventory.ingredient.bindedItems.recipe"),
1203
+ bindings: z.value
1204
+ }, null, 8, ["name", "bindings"])) : L("", !0),
1205
+ D.value && ge.value.length ? (p(), Y(qe, {
1207
1206
  key: 2,
1208
- name: o(u)("inventory.ingredient.bindedItems.menu"),
1207
+ name: o(d)("inventory.ingredient.bindedItems.menu"),
1209
1208
  bindings: ge.value
1210
- }, null, 8, ["name", "bindings"])) : N("", !0)
1211
- ])) : N("", !0),
1212
- n("div", to, [
1213
- n("div", no, [
1214
- n("div", oo, [
1215
- n("div", lo, $(o(u)("inventory.ingredient.threshold.title")), 1),
1216
- s(xe, {
1209
+ }, null, 8, ["name", "bindings"])) : L("", !0)
1210
+ ])) : L("", !0),
1211
+ n("div", oo, [
1212
+ n("div", lo, [
1213
+ n("div", ao, [
1214
+ n("div", so, $(o(d)("inventory.ingredient.threshold.title")), 1),
1215
+ r(ke, {
1217
1216
  tier: "standard",
1218
1217
  category: "beta"
1219
1218
  })
1220
1219
  ]),
1221
- n("div", ao, $(o(u)("inventory.ingredient.threshold.subtitle")), 1)
1220
+ n("div", ro, $(o(d)("inventory.ingredient.threshold.subtitle")), 1)
1222
1221
  ]),
1223
- n("div", so, [
1224
- s(Ze, {
1225
- "model-value": { low: he.value, mid: ce.value },
1222
+ n("div", io, [
1223
+ r(Ze, {
1224
+ "model-value": { low: he.value, mid: me.value },
1226
1225
  rules: [Et()]
1227
1226
  }, null, 8, ["model-value", "rules"]),
1228
- n("div", ro, [
1229
- n("div", io, [
1230
- n("div", uo, [
1231
- s(je, {
1227
+ n("div", uo, [
1228
+ n("div", co, [
1229
+ n("div", mo, [
1230
+ r(je, {
1232
1231
  days: he.value,
1233
1232
  level: o(We).low
1234
1233
  }, null, 8, ["days", "level"])
1235
1234
  ]),
1236
- n("div", mo, [
1237
- n("div", co, $(o(u)("inventory.ingredient.threshold.whenRemaining")), 1),
1238
- s(tt, {
1235
+ n("div", po, [
1236
+ n("div", vo, $(o(d)("inventory.ingredient.threshold.whenRemaining")), 1),
1237
+ r(tt, {
1239
1238
  modelValue: he.value,
1240
1239
  "onUpdate:modelValue": t[10] || (t[10] = (T) => he.value = T),
1241
- rules: [o(Oe)(0)]
1240
+ rules: [o(De)(0)]
1242
1241
  }, {
1243
1242
  append: x(() => t[13] || (t[13] = [
1244
1243
  n("div", {
@@ -1259,19 +1258,19 @@ const zn = /* @__PURE__ */ ke({
1259
1258
  style: { transform: "translate(-50%, -50%)", left: "50%", top: "24px" }
1260
1259
  }, " < ")
1261
1260
  ], -1)),
1262
- n("div", po, [
1263
- n("div", vo, [
1264
- s(je, {
1265
- days: ce.value,
1261
+ n("div", fo, [
1262
+ n("div", yo, [
1263
+ r(je, {
1264
+ days: me.value,
1266
1265
  level: o(We).mid
1267
1266
  }, null, 8, ["days", "level"])
1268
1267
  ]),
1269
- n("div", fo, [
1270
- n("div", yo, $(o(u)("inventory.ingredient.threshold.whenRemaining")), 1),
1271
- s(tt, {
1272
- modelValue: ce.value,
1273
- "onUpdate:modelValue": t[11] || (t[11] = (T) => ce.value = T),
1274
- rules: [o(Oe)(0)]
1268
+ n("div", go, [
1269
+ n("div", bo, $(o(d)("inventory.ingredient.threshold.whenRemaining")), 1),
1270
+ r(tt, {
1271
+ modelValue: me.value,
1272
+ "onUpdate:modelValue": t[11] || (t[11] = (T) => me.value = T),
1273
+ rules: [o(De)(0)]
1275
1274
  }, {
1276
1275
  append: x(() => t[14] || (t[14] = [
1277
1276
  n("div", {
@@ -1292,31 +1291,32 @@ const zn = /* @__PURE__ */ ke({
1292
1291
  style: { transform: "translate(-50%, -50%)", left: "50%", top: "24px" }
1293
1292
  }, " < ")
1294
1293
  ], -1)),
1295
- n("div", go, [
1296
- n("div", bo, [
1297
- s(je, {
1298
- days: ce.value + 1,
1294
+ n("div", ho, [
1295
+ n("div", _o, [
1296
+ r(je, {
1297
+ days: me.value + 1,
1299
1298
  level: o(We).high
1300
1299
  }, null, 8, ["days", "level"])
1301
1300
  ]),
1302
- n("div", ho, [
1303
- n("div", _o, $(o(u)("inventory.ingredient.threshold.stockIsStaple")), 1)
1301
+ n("div", xo, [
1302
+ n("div", ko, $(o(d)("inventory.ingredient.threshold.stockIsStaple")), 1)
1304
1303
  ])
1305
1304
  ])
1306
1305
  ])
1307
1306
  ])
1308
1307
  ]),
1309
- o(d).mustUsePoTemplate && e.mode === o(W).CREATE ? (c(), V("div", xo, [
1310
- n("div", ko, [
1311
- n("div", wo, [
1312
- n("div", To, [
1313
- n("div", Vo, $(o(u)("inventory.ingredient.purchaseOrderTemplates.title")), 1),
1314
- s(xe, {
1308
+ o(c).mustUsePoTemplate && e.mode === o(j).CREATE ? (p(), V("div", wo, [
1309
+ n("div", To, [
1310
+ n("div", Vo, [
1311
+ n("div", Io, [
1312
+ n("div", So, $(o(d)("inventory.ingredient.purchaseOrderTemplates.title")), 1),
1313
+ r(ke, {
1315
1314
  tier: "premium",
1316
- category: "premium"
1315
+ category: "premium",
1316
+ "feature-key": "purchase-order-template"
1317
1317
  })
1318
1318
  ]),
1319
- s(De, {
1319
+ r(Be, {
1320
1320
  variant: "secondary",
1321
1321
  "text-color": "primary",
1322
1322
  "border-color": "primary",
@@ -1324,30 +1324,31 @@ const zn = /* @__PURE__ */ ke({
1324
1324
  onClick: Ct
1325
1325
  })
1326
1326
  ]),
1327
- n("div", Io, $(o(u)("inventory.ingredient.purchaseOrderTemplates.description")), 1)
1327
+ n("div", Co, $(o(d)("inventory.ingredient.purchaseOrderTemplates.description")), 1)
1328
1328
  ]),
1329
- Ve.value.length > 0 ? (c(), V("div", So, [
1330
- n("div", Co, [
1331
- (c(!0), V(ee, null, de(Ve.value, (T) => (c(), j(Ne, {
1329
+ Ve.value.length > 0 ? (p(), V("div", Fo, [
1330
+ n("div", Ao, [
1331
+ (p(!0), V(ee, null, de(Ve.value, (T) => (p(), Y(Ne, {
1332
1332
  key: T.value,
1333
1333
  label: T.label,
1334
1334
  variant: "info",
1335
1335
  compact: ""
1336
1336
  }, null, 8, ["label"]))), 128))
1337
1337
  ])
1338
- ])) : N("", !0)
1339
- ])) : N("", !0),
1340
- o(d).enableWastageTemplate && e.mode === o(W).CREATE ? (c(), V("div", Fo, [
1341
- n("div", Ao, [
1342
- n("div", Eo, [
1343
- n("div", $o, [
1344
- n("div", Mo, $(o(u)("inventory.ingredient.wastageTemplates.title")), 1),
1345
- s(xe, {
1338
+ ])) : L("", !0)
1339
+ ])) : L("", !0),
1340
+ o(c).enableWastageTemplate && e.mode === o(j).CREATE ? (p(), V("div", Eo, [
1341
+ n("div", $o, [
1342
+ n("div", Mo, [
1343
+ n("div", Uo, [
1344
+ n("div", Po, $(o(d)("inventory.ingredient.wastageTemplates.title")), 1),
1345
+ r(ke, {
1346
1346
  tier: "premium",
1347
- category: "premium"
1347
+ category: "premium",
1348
+ "feature-key": "wastage-template"
1348
1349
  })
1349
1350
  ]),
1350
- s(De, {
1351
+ r(Be, {
1351
1352
  variant: "secondary",
1352
1353
  "text-color": "primary",
1353
1354
  "border-color": "primary",
@@ -1355,30 +1356,31 @@ const zn = /* @__PURE__ */ ke({
1355
1356
  onClick: Ft
1356
1357
  })
1357
1358
  ]),
1358
- n("div", Uo, $(o(u)("inventory.ingredient.wastageTemplates.description")), 1)
1359
+ n("div", Ro, $(o(d)("inventory.ingredient.wastageTemplates.description")), 1)
1359
1360
  ]),
1360
- Ie.value.length > 0 ? (c(), V("div", Po, [
1361
- n("div", Ro, [
1362
- (c(!0), V(ee, null, de(Ie.value, (T) => (c(), j(Ne, {
1361
+ Ie.value.length > 0 ? (p(), V("div", Do, [
1362
+ n("div", Oo, [
1363
+ (p(!0), V(ee, null, de(Ie.value, (T) => (p(), Y(Ne, {
1363
1364
  key: T.value,
1364
1365
  label: T.label,
1365
1366
  variant: "info",
1366
1367
  compact: ""
1367
1368
  }, null, 8, ["label"]))), 128))
1368
1369
  ])
1369
- ])) : N("", !0)
1370
- ])) : N("", !0),
1371
- o(d).enableClosingTemplate && e.mode === o(W).CREATE ? (c(), V("div", Oo, [
1372
- n("div", Bo, [
1373
- n("div", Do, [
1374
- n("div", No, [
1375
- n("div", zo, $(o(u)("inventory.ingredient.closingTemplates.title")), 1),
1376
- s(xe, {
1370
+ ])) : L("", !0)
1371
+ ])) : L("", !0),
1372
+ o(c).enableClosingTemplate && e.mode === o(j).CREATE ? (p(), V("div", Bo, [
1373
+ n("div", No, [
1374
+ n("div", zo, [
1375
+ n("div", Lo, [
1376
+ n("div", jo, $(o(d)("inventory.ingredient.closingTemplates.title")), 1),
1377
+ r(ke, {
1377
1378
  tier: "premium",
1378
- category: "premium"
1379
+ category: "premium",
1380
+ "feature-key": "closing-template"
1379
1381
  })
1380
1382
  ]),
1381
- s(De, {
1383
+ r(Be, {
1382
1384
  variant: "secondary",
1383
1385
  "text-color": "primary",
1384
1386
  "border-color": "primary",
@@ -1386,21 +1388,21 @@ const zn = /* @__PURE__ */ ke({
1386
1388
  onClick: At
1387
1389
  })
1388
1390
  ]),
1389
- n("div", Lo, $(o(u)("inventory.ingredient.closingTemplates.description")), 1)
1391
+ n("div", Wo, $(o(d)("inventory.ingredient.closingTemplates.description")), 1)
1390
1392
  ]),
1391
- Qe.value.length > 0 ? (c(), V("div", jo, [
1392
- n("div", Wo, [
1393
- (c(!0), V(ee, null, de(Qe.value, (T) => (c(), j(Ne, {
1393
+ Qe.value.length > 0 ? (p(), V("div", qo, [
1394
+ n("div", Ho, [
1395
+ (p(!0), V(ee, null, de(Qe.value, (T) => (p(), Y(Ne, {
1394
1396
  key: T.value,
1395
1397
  label: T.label,
1396
1398
  variant: "info",
1397
1399
  compact: ""
1398
1400
  }, null, 8, ["label"]))), 128))
1399
1401
  ])
1400
- ])) : N("", !0)
1401
- ])) : N("", !0),
1402
+ ])) : L("", !0)
1403
+ ])) : L("", !0),
1402
1404
  n("div", null, [
1403
- s(fn, {
1405
+ r(gn, {
1404
1406
  entity: "inventorySku",
1405
1407
  modelValue: Q.value,
1406
1408
  "onUpdate:modelValue": t[12] || (t[12] = (T) => Q.value = T)
@@ -1412,50 +1414,50 @@ const zn = /* @__PURE__ */ ke({
1412
1414
  }, 8, ["disabled"]);
1413
1415
  };
1414
1416
  }
1415
- }), Ho = { class: "flex flex-col gap-32" }, Yo = {
1417
+ }), Ko = { class: "flex flex-col gap-32" }, Go = {
1416
1418
  key: 0,
1417
1419
  class: "flex justify-between items-center"
1418
- }, Ko = { class: "flex gap-4" }, Go = /* @__PURE__ */ ke({
1420
+ }, Jo = { class: "flex gap-4" }, Qo = /* @__PURE__ */ xe({
1419
1421
  __name: "IngredientDialog",
1420
1422
  props: {
1421
1423
  show: { type: Boolean },
1422
1424
  sku: {},
1423
- mode: { default: W.READ }
1425
+ mode: { default: j.READ }
1424
1426
  },
1425
1427
  emits: ["update:show"],
1426
- setup(q) {
1427
- const h = q, k = Fe(), u = Tt(), _ = Ee(), C = Vt(), A = It(), U = St(), l = Ae(), { t: i } = pe(), m = ft(h, "show"), a = ft(h, "sku"), d = P([]), r = P([]), f = P([]), w = g(
1428
+ setup(W) {
1429
+ const h = W, k = Fe(), d = Tt(), _ = Ee(), S = Vt(), A = It(), U = St(), l = Ae(), { t: i } = pe(), u = ft(h, "show"), a = ft(h, "sku"), c = P([]), s = P([]), f = P([]), w = g(
1428
1430
  () => {
1429
1431
  var y;
1430
1432
  return _.isEnabled && _.netSuiteItemBySkuId.has((y = h.sku) == null ? void 0 : y._id);
1431
1433
  }
1432
1434
  ), F = g(() => {
1433
1435
  switch (h.mode) {
1434
- case W.READ:
1436
+ case j.READ:
1435
1437
  return "";
1436
- case W.UPDATE:
1438
+ case j.UPDATE:
1437
1439
  return i("inventory.ingredient.update.title");
1438
- case W.CREATE:
1440
+ case j.CREATE:
1439
1441
  return i("inventory.ingredient.create.title");
1440
1442
  }
1441
1443
  return "";
1442
- }), p = g(() => {
1444
+ }), m = g(() => {
1443
1445
  switch (h.mode) {
1444
- case W.READ:
1446
+ case j.READ:
1445
1447
  return "";
1446
- case W.UPDATE:
1448
+ case j.UPDATE:
1447
1449
  return i("common.save");
1448
- case W.CREATE:
1450
+ case j.CREATE:
1449
1451
  return i("common.add");
1450
1452
  }
1451
1453
  return "";
1452
- }), B = P(), R = P(!1);
1454
+ }), O = P(), R = P(!1);
1453
1455
  async function ve() {
1454
1456
  R.value = !0;
1455
1457
  try {
1456
1458
  await k.createSku(a.value);
1457
1459
  const y = k.skuByCode[a.value.code];
1458
- u.enablePoTemplate && d.value.length > 0 && await ue(y), u.enableWastageTemplate && r.value.length > 0 && await oe(y), u.enableClosingTemplate && f.value.length > 0 && await le(y), m.value = !1, l.open({
1460
+ d.enablePoTemplate && c.value.length > 0 && await ue(y), d.enableWastageTemplate && s.value.length > 0 && await oe(y), d.enableClosingTemplate && f.value.length > 0 && await le(y), u.value = !1, l.open({
1459
1461
  title: i("inventory.common.success"),
1460
1462
  message: i("inventory.ingredient.create.success", { name: a.value.name }),
1461
1463
  type: "success"
@@ -1473,7 +1475,7 @@ const zn = /* @__PURE__ */ ke({
1473
1475
  async function ne() {
1474
1476
  R.value = !0;
1475
1477
  try {
1476
- await k.updateSku(a.value), R.value = !1, m.value = !1, l.open({
1478
+ await k.updateSku(a.value), R.value = !1, u.value = !1, l.open({
1477
1479
  title: i("inventory.common.success"),
1478
1480
  message: i("inventory.ingredient.update.success", { name: a.value.name }),
1479
1481
  type: "success"
@@ -1491,16 +1493,16 @@ const zn = /* @__PURE__ */ ke({
1491
1493
  async function ue(y) {
1492
1494
  var M, G, E, v;
1493
1495
  try {
1494
- for (const z of d.value) {
1495
- const J = await C.getTemplate(z);
1496
+ for (const N of c.value) {
1497
+ const J = await S.getTemplate(N);
1496
1498
  if (!J) {
1497
- console.warn(`Template with ID ${z} not found`);
1499
+ console.warn(`Template with ID ${N} not found`);
1498
1500
  continue;
1499
1501
  }
1500
1502
  if (!J.purchaseOrder.items.find(
1501
1503
  (Q) => Q.sku._id === y._id
1502
1504
  )) {
1503
- const Q = { amount: 1, precision: mn(y.unit) }, H = {
1505
+ const Q = { amount: 1, precision: dn(y.unit) }, q = {
1504
1506
  sku: y,
1505
1507
  name: y.name,
1506
1508
  code: y.code,
@@ -1508,29 +1510,29 @@ const zn = /* @__PURE__ */ ke({
1508
1510
  minimumQuantity: Q,
1509
1511
  quantityStep: Q,
1510
1512
  measurement: ((G = (M = y.unit) == null ? void 0 : M.measurements) == null ? void 0 : G[0]) || null
1511
- }, O = {
1513
+ }, D = {
1512
1514
  ...J,
1513
1515
  purchaseOrder: {
1514
1516
  ...J.purchaseOrder,
1515
- items: [...J.purchaseOrder.items, H]
1517
+ items: [...J.purchaseOrder.items, q]
1516
1518
  }
1517
1519
  };
1518
- (((E = O.purchaseOrder.supplier) == null ? void 0 : E.internal) === vt.enum.warehouse || ((v = O.purchaseOrder.supplier) == null ? void 0 : v.internal) === vt.enum.restaurant) && (O.purchaseOrder.items = O.purchaseOrder.items.map(
1519
- ({ totalCost: K, ...L }) => L
1520
- )), await C.updateTemplate(O), await new Promise((K) => setTimeout(K, 1e3));
1520
+ (((E = D.purchaseOrder.supplier) == null ? void 0 : E.internal) === vt.enum.warehouse || ((v = D.purchaseOrder.supplier) == null ? void 0 : v.internal) === vt.enum.restaurant) && (D.purchaseOrder.items = D.purchaseOrder.items.map(
1521
+ ({ totalCost: K, ...z }) => z
1522
+ )), await S.updateTemplate(D), await new Promise((K) => setTimeout(K, 1e3));
1521
1523
  }
1522
1524
  }
1523
- } catch (z) {
1525
+ } catch (N) {
1524
1526
  l.open({
1525
1527
  title: i("inventory.transfer.template.update.error"),
1526
1528
  message: i("inventory.transfer.template.update.errorMessage"),
1527
1529
  type: "error"
1528
- }), console.error("Error in updating transfer template", z);
1530
+ }), console.error("Error in updating transfer template", N);
1529
1531
  }
1530
1532
  }
1531
1533
  async function oe(y) {
1532
1534
  try {
1533
- for (const M of r.value) {
1535
+ for (const M of s.value) {
1534
1536
  const G = await A.getTemplate(M);
1535
1537
  if (!G) {
1536
1538
  console.warn(`Wastage Template with ID ${M} not found`);
@@ -1543,11 +1545,11 @@ const zn = /* @__PURE__ */ ke({
1543
1545
  code: y.code,
1544
1546
  type: "sku",
1545
1547
  disabledMeasurements: []
1546
- }, z = {
1548
+ }, N = {
1547
1549
  ...G,
1548
1550
  items: [...G.items, v]
1549
1551
  };
1550
- await A.updateTemplate(z), await new Promise((J) => setTimeout(J, 1e3));
1552
+ await A.updateTemplate(N), await new Promise((J) => setTimeout(J, 1e3));
1551
1553
  }
1552
1554
  }
1553
1555
  } catch (M) {
@@ -1569,11 +1571,11 @@ const zn = /* @__PURE__ */ ke({
1569
1571
  if (!G.items.find((v) => v.sku._id === y._id)) {
1570
1572
  const v = {
1571
1573
  sku: y
1572
- }, z = {
1574
+ }, N = {
1573
1575
  ...G,
1574
1576
  items: [...G.items, v]
1575
1577
  };
1576
- await U.updateTemplate(z), await new Promise((J) => setTimeout(J, 1e3));
1578
+ await U.updateTemplate(N), await new Promise((J) => setTimeout(J, 1e3));
1577
1579
  }
1578
1580
  }
1579
1581
  } catch (M) {
@@ -1586,77 +1588,77 @@ const zn = /* @__PURE__ */ ke({
1586
1588
  }
1587
1589
  function te() {
1588
1590
  var y, M;
1589
- (M = (y = B.value) == null ? void 0 : y.validateInputs) == null || M.call(y);
1591
+ (M = (y = O.value) == null ? void 0 : y.validateInputs) == null || M.call(y);
1590
1592
  }
1591
1593
  function ae() {
1592
1594
  switch (h.mode) {
1593
- case W.READ:
1595
+ case j.READ:
1594
1596
  return;
1595
- case W.UPDATE:
1597
+ case j.UPDATE:
1596
1598
  return ne();
1597
- case W.CREATE:
1599
+ case j.CREATE:
1598
1600
  return ve();
1599
1601
  }
1600
1602
  }
1601
1603
  function fe(y) {
1602
- d.value = y;
1604
+ c.value = y;
1603
1605
  }
1604
1606
  function ye(y) {
1605
- r.value = y;
1607
+ s.value = y;
1606
1608
  }
1607
1609
  function we(y) {
1608
1610
  f.value = y;
1609
1611
  }
1610
1612
  return (y, M) => {
1611
- const G = S("FmChip"), E = S("FmButton"), v = S("FmSideSheet");
1612
- return c(), j(v, {
1613
- "model-value": o(m),
1614
- "onUpdate:modelValue": M[3] || (M[3] = (z) => rt(m) ? m.value = z : null),
1613
+ const G = C("FmChip"), E = C("FmButton"), v = C("FmSideSheet");
1614
+ return p(), Y(v, {
1615
+ "model-value": o(u),
1616
+ "onUpdate:modelValue": M[3] || (M[3] = (N) => rt(u) ? u.value = N : null),
1615
1617
  header: F.value,
1616
1618
  "close-button": "",
1617
1619
  "dismiss-away": "",
1618
1620
  "max-width": 500
1619
1621
  }, {
1620
1622
  "side-sheet-footer": x(() => [
1621
- n("div", Ko, [
1622
- s(E, {
1623
+ n("div", Jo, [
1624
+ r(E, {
1623
1625
  loading: R.value,
1624
- label: p.value,
1626
+ label: m.value,
1625
1627
  onClick: te
1626
1628
  }, null, 8, ["loading", "label"]),
1627
- s(E, {
1629
+ r(E, {
1628
1630
  disabled: R.value,
1629
1631
  label: o(i)("common.close"),
1630
1632
  variant: "tertiary",
1631
- onClick: M[2] || (M[2] = (z) => m.value = !1)
1633
+ onClick: M[2] || (M[2] = (N) => u.value = !1)
1632
1634
  }, null, 8, ["disabled", "label"])
1633
1635
  ])
1634
1636
  ]),
1635
1637
  default: x(() => [
1636
- n("div", Ho, [
1637
- w.value ? (c(), V("div", Yo, [
1638
- s(G, {
1638
+ n("div", Ko, [
1639
+ w.value ? (p(), V("div", Go, [
1640
+ r(G, {
1639
1641
  label: "Managed by Netsuite",
1640
1642
  compact: ""
1641
1643
  }),
1642
- s(en, {
1644
+ r(tn, {
1643
1645
  readonly: "",
1644
1646
  sku: y.sku,
1645
1647
  settingOptions: o(_).skuSettingOptions
1646
1648
  }, null, 8, ["sku", "settingOptions"])
1647
- ])) : N("", !0),
1648
- s(qo, {
1649
+ ])) : L("", !0),
1650
+ r(Yo, {
1649
1651
  class: "w-full",
1650
1652
  ref_key: "hasValidationExpose",
1651
- ref: B,
1653
+ ref: O,
1652
1654
  modelValue: o(a),
1653
- "onUpdate:modelValue": M[0] || (M[0] = (z) => rt(a) ? a.value = z : null),
1655
+ "onUpdate:modelValue": M[0] || (M[0] = (N) => rt(a) ? a.value = N : null),
1654
1656
  mode: y.mode,
1655
1657
  disabled: R.value,
1656
- purchaseOrderTemplateIds: d.value,
1657
- wastageTemplateIds: r.value,
1658
+ purchaseOrderTemplateIds: c.value,
1659
+ wastageTemplateIds: s.value,
1658
1660
  closingTemplateIds: f.value,
1659
- "onClick:submit": M[1] || (M[1] = (z) => ae()),
1661
+ "onClick:submit": M[1] || (M[1] = (N) => ae()),
1660
1662
  "onUpdate:purchaseOrderTemplateIds": fe,
1661
1663
  "onUpdate:wastageTemplateIds": ye,
1662
1664
  "onUpdate:closingTemplateIds": we
@@ -1667,10 +1669,10 @@ const zn = /* @__PURE__ */ ke({
1667
1669
  }, 8, ["model-value", "header"]);
1668
1670
  };
1669
1671
  }
1670
- }), Jo = { class: "flex items-center gap-12 pl-8" }, Qo = { class: "flex flex-col" }, Xo = { class: "fm-typo-en-body-md-400 text-fm-color-typo-primary flex items-center gap-4" }, Zo = {
1672
+ }), Xo = { class: "flex items-center gap-12 pl-8" }, Zo = { class: "flex flex-col" }, el = { class: "fm-typo-en-body-md-400 text-fm-color-typo-primary flex items-center gap-4" }, tl = {
1671
1673
  key: 0,
1672
1674
  class: "text-fm-color-typo-secondary fm-typo-en-body-sm-400"
1673
- }, el = { key: 0 }, ht = /* @__PURE__ */ ke({
1675
+ }, nl = { key: 0 }, ht = /* @__PURE__ */ xe({
1674
1676
  __name: "ImportIngredientItem",
1675
1677
  props: {
1676
1678
  type: {},
@@ -1678,30 +1680,30 @@ const zn = /* @__PURE__ */ ke({
1678
1680
  name: {},
1679
1681
  errors: {}
1680
1682
  },
1681
- setup(q) {
1683
+ setup(W) {
1682
1684
  return (h, k) => {
1683
- const u = S("FmIcon"), _ = S("FmTooltip");
1684
- return c(), V("div", Jo, [
1685
+ const d = C("FmIcon"), _ = C("FmTooltip");
1686
+ return p(), V("div", Xo, [
1685
1687
  k[0] || (k[0] = n("div", null, "•", -1)),
1686
- n("div", Qo, [
1687
- n("div", Xo, [
1688
+ n("div", Zo, [
1689
+ n("div", el, [
1688
1690
  n("div", {
1689
1691
  class: ie({
1690
1692
  "text-fm-color-system-error-300": h.errors.length
1691
1693
  })
1692
1694
  }, [
1693
1695
  xt($(h.name) + " ", 1),
1694
- h.type === "create" ? (c(), V("span", Zo, "(new)")) : N("", !0)
1696
+ h.type === "create" ? (p(), V("span", tl, "(new)")) : L("", !0)
1695
1697
  ], 2),
1696
- h.errors.length ? (c(), V("div", el, [
1697
- s(_, { "z-index": 50 }, {
1698
+ h.errors.length ? (p(), V("div", nl, [
1699
+ r(_, { "z-index": 50 }, {
1698
1700
  content: x(() => [
1699
1701
  n("ol", null, [
1700
- (c(!0), V(ee, null, de(h.errors, (C, A) => (c(), V("li", { key: A }, $(C), 1))), 128))
1702
+ (p(!0), V(ee, null, de(h.errors, (S, A) => (p(), V("li", { key: A }, $(S), 1))), 128))
1701
1703
  ])
1702
1704
  ]),
1703
1705
  default: x(() => [
1704
- s(u, {
1706
+ r(d, {
1705
1707
  name: "error",
1706
1708
  size: "sm",
1707
1709
  color: "system-error-300"
@@ -1709,7 +1711,7 @@ const zn = /* @__PURE__ */ ke({
1709
1711
  ]),
1710
1712
  _: 1
1711
1713
  })
1712
- ])) : N("", !0)
1714
+ ])) : L("", !0)
1713
1715
  ]),
1714
1716
  n("div", {
1715
1717
  class: ie([
@@ -1724,79 +1726,79 @@ const zn = /* @__PURE__ */ ke({
1724
1726
  ]);
1725
1727
  };
1726
1728
  }
1727
- }), tl = { class: "flex flex-col gap-24" }, nl = { class: "fm-typo-en-body-md-400" }, ol = { class: "flex flex-col gap-8" }, ll = { class: "line-clamp-2 text-ellipsis break-all" }, al = {
1729
+ }), ol = { class: "flex flex-col gap-24" }, ll = { class: "fm-typo-en-body-md-400" }, al = { class: "flex flex-col gap-8" }, sl = { class: "line-clamp-2 text-ellipsis break-all" }, rl = {
1728
1730
  key: 2,
1729
1731
  class: "shrink-0"
1730
- }, sl = {
1732
+ }, il = {
1731
1733
  key: 0,
1732
1734
  class: "flex flex-col"
1733
- }, rl = { class: "text-fm-color-system-error-300 fm-typo-en-body-sm-400" }, il = {
1735
+ }, dl = { class: "text-fm-color-system-error-300 fm-typo-en-body-sm-400" }, ul = {
1734
1736
  key: 0,
1735
1737
  class: "max-h-[200px] overflow-y-auto flex flex-col gap-8"
1736
- }, dl = { class: "fm-typo-en-body-lg-600" }, ul = /* @__PURE__ */ ke({
1738
+ }, cl = { class: "fm-typo-en-body-lg-600" }, ml = /* @__PURE__ */ xe({
1737
1739
  __name: "ImportIngredients",
1738
- setup(q) {
1739
- const h = P(null), k = Ht(), u = Ae(), _ = P(!1), C = P(new Array()), A = P([]), U = P([]), l = g(
1740
- () => !!C.value.length || A.value.some((d) => d.errors.length) || U.value.some((d) => d.errors.length)
1740
+ setup(W) {
1741
+ const h = P(null), k = Yt(), d = Ae(), _ = P(!1), S = P(new Array()), A = P([]), U = P([]), l = g(
1742
+ () => !!S.value.length || A.value.some((c) => c.errors.length) || U.value.some((c) => c.errors.length)
1741
1743
  ), i = g(
1742
1744
  () => !!A.value.length || !!U.value.length
1743
- ), { t: m } = pe();
1744
- async function a(d) {
1745
- C.value = [], A.value = [], U.value = [];
1745
+ ), { t: u } = pe();
1746
+ async function a(c) {
1747
+ S.value = [], A.value = [], U.value = [];
1746
1748
  try {
1747
1749
  _.value = !0;
1748
- const [r] = await Promise.all([
1749
- bn(d),
1750
+ const [s] = await Promise.all([
1751
+ _n(c),
1750
1752
  // fake buffer
1751
1753
  new Promise((F) => setTimeout(F, 1e3))
1752
- ]), f = r.SheetNames.find((F) => F);
1754
+ ]), f = s.SheetNames.find((F) => F);
1753
1755
  if (!f) {
1754
- C.value.push(m("inventory.ingredient.import.fileError.noSheet"));
1756
+ S.value.push(u("inventory.ingredient.import.fileError.noSheet"));
1755
1757
  return;
1756
1758
  }
1757
- const w = cn(r.Sheets[f]);
1759
+ const w = vn(s.Sheets[f]);
1758
1760
  if (w.invalidExcel) {
1759
- C.value.push(w.invalidExcelMessage ?? m("inventory.ingredient.import.fileError.invalidExcel"));
1761
+ S.value.push(w.invalidExcelMessage ?? u("inventory.ingredient.import.fileError.invalidExcel"));
1760
1762
  return;
1761
1763
  }
1762
1764
  if (A.value = w.importCreateResult, U.value = w.importUpdateResult, !A.value.length && !U.value.length) {
1763
- C.value.push(m("inventory.ingredient.import.fileError.noData"));
1765
+ S.value.push(u("inventory.ingredient.import.fileError.noData"));
1764
1766
  return;
1765
1767
  }
1766
1768
  k.emitData(w);
1767
- } catch (r) {
1768
- u.open({
1769
- title: m("inventory.ingredient.import.fileError.unableToRead"),
1770
- message: r == null ? void 0 : r.message,
1769
+ } catch (s) {
1770
+ d.open({
1771
+ title: u("inventory.ingredient.import.fileError.unableToRead"),
1772
+ message: s == null ? void 0 : s.message,
1771
1773
  type: "error"
1772
- }), console.error("Error in reading file", r);
1774
+ }), console.error("Error in reading file", s);
1773
1775
  } finally {
1774
- C.value.length && u.open({
1775
- title: m("inventory.ingredient.import.fileError.invalidExcel"),
1776
+ S.value.length && d.open({
1777
+ title: u("inventory.ingredient.import.fileError.invalidExcel"),
1776
1778
  type: "error"
1777
1779
  }), _.value = !1;
1778
1780
  }
1779
1781
  }
1780
- return _t(h, (d) => {
1781
- d && a(d);
1782
- }), (d, r) => {
1783
- const f = S("FmCircularProgress"), w = S("FmIcon"), F = S("FmButton");
1784
- return c(), V("div", tl, [
1785
- n("div", nl, $(o(m)("inventory.ingredient.import.uploadDescription")), 1),
1786
- s(hn, {
1782
+ return _t(h, (c) => {
1783
+ c && a(c);
1784
+ }), (c, s) => {
1785
+ const f = C("FmCircularProgress"), w = C("FmIcon"), F = C("FmButton");
1786
+ return p(), V("div", ol, [
1787
+ n("div", ll, $(o(u)("inventory.ingredient.import.uploadDescription")), 1),
1788
+ r(xn, {
1787
1789
  class: ie({
1788
1790
  "w-full": !0,
1789
1791
  "h-[200px]": !h.value
1790
1792
  }),
1791
1793
  accept: ".xlsx",
1792
- onFileUpload: r[0] || (r[0] = (p) => h.value = p),
1793
- label: o(m)("inventory.ingredient.import.uploadTemplate"),
1794
- "button-label": o(m)("inventory.ingredient.import.selectFile")
1794
+ onFileUpload: s[0] || (s[0] = (m) => h.value = m),
1795
+ label: o(u)("inventory.ingredient.import.uploadTemplate"),
1796
+ "button-label": o(u)("inventory.ingredient.import.selectFile")
1795
1797
  }, kt({ _: 2 }, [
1796
1798
  h.value ? {
1797
1799
  name: "default",
1798
- fn: x(({ openFileDialog: p }) => [
1799
- n("div", ol, [
1800
+ fn: x(({ openFileDialog: m }) => [
1801
+ n("div", al, [
1800
1802
  n("div", {
1801
1803
  class: ie([
1802
1804
  "fm-corner-radius-md p-16 flex items-center gap-16",
@@ -1807,11 +1809,11 @@ const zn = /* @__PURE__ */ ke({
1807
1809
  }
1808
1810
  ])
1809
1811
  }, [
1810
- _.value ? (c(), j(f, {
1812
+ _.value ? (p(), Y(f, {
1811
1813
  key: 0,
1812
1814
  size: "md",
1813
1815
  color: "neutral-gray-200"
1814
- })) : (c(), j(w, {
1816
+ })) : (p(), Y(w, {
1815
1817
  key: 1,
1816
1818
  name: l.value ? "error" : "attach_file",
1817
1819
  outline: "",
@@ -1826,62 +1828,62 @@ const zn = /* @__PURE__ */ ke({
1826
1828
  }
1827
1829
  ])
1828
1830
  }, [
1829
- n("div", ll, $(h.value.name), 1)
1831
+ n("div", sl, $(h.value.name), 1)
1830
1832
  ], 2),
1831
- _.value ? N("", !0) : (c(), V("div", al, [
1832
- s(F, {
1833
- label: o(m)("inventory.ingredient.import.replaceFile"),
1833
+ _.value ? L("", !0) : (p(), V("div", rl, [
1834
+ r(F, {
1835
+ label: o(u)("inventory.ingredient.import.replaceFile"),
1834
1836
  variant: l.value ? "destructive" : "secondary",
1835
1837
  "prepend-icon": l.value ? void 0 : "autorenew",
1836
- onClick: p
1838
+ onClick: m
1837
1839
  }, null, 8, ["label", "variant", "prepend-icon", "onClick"])
1838
1840
  ]))
1839
1841
  ], 2),
1840
- C.value.length ? (c(), V("div", sl, [
1841
- (c(!0), V(ee, null, de(C.value, (B, R) => (c(), V("div", {
1842
+ S.value.length ? (p(), V("div", il, [
1843
+ (p(!0), V(ee, null, de(S.value, (O, R) => (p(), V("div", {
1842
1844
  key: R,
1843
1845
  class: "flex gap-8 items-center"
1844
1846
  }, [
1845
- s(w, {
1847
+ r(w, {
1846
1848
  name: "error",
1847
1849
  size: "sm",
1848
1850
  color: "system-error-300"
1849
1851
  }),
1850
- n("div", rl, $(B), 1)
1852
+ n("div", dl, $(O), 1)
1851
1853
  ]))), 128))
1852
- ])) : N("", !0)
1854
+ ])) : L("", !0)
1853
1855
  ])
1854
1856
  ]),
1855
1857
  key: "0"
1856
1858
  } : void 0
1857
1859
  ]), 1032, ["class", "label", "button-label"]),
1858
- i.value ? (c(), V("div", il, [
1859
- n("div", dl, $(o(m)("inventory.ingredient.import.summary")), 1),
1860
- (c(!0), V(ee, null, de(A.value, (p) => (c(), j(ht, {
1861
- key: p.sku._id,
1862
- code: p.sku.code,
1863
- name: p.sku.name,
1864
- errors: p.errors,
1860
+ i.value ? (p(), V("div", ul, [
1861
+ n("div", cl, $(o(u)("inventory.ingredient.import.summary")), 1),
1862
+ (p(!0), V(ee, null, de(A.value, (m) => (p(), Y(ht, {
1863
+ key: m.sku._id,
1864
+ code: m.sku.code,
1865
+ name: m.sku.name,
1866
+ errors: m.errors,
1865
1867
  type: "create"
1866
1868
  }, null, 8, ["code", "name", "errors"]))), 128)),
1867
- (c(!0), V(ee, null, de(U.value, (p) => (c(), j(ht, {
1868
- key: p.sku._id,
1869
- code: p.sku.code,
1870
- name: p.sku.name,
1871
- errors: p.errors,
1869
+ (p(!0), V(ee, null, de(U.value, (m) => (p(), Y(ht, {
1870
+ key: m.sku._id,
1871
+ code: m.sku.code,
1872
+ name: m.sku.name,
1873
+ errors: m.errors,
1872
1874
  type: "update"
1873
1875
  }, null, 8, ["code", "name", "errors"]))), 128))
1874
- ])) : N("", !0)
1876
+ ])) : L("", !0)
1875
1877
  ]);
1876
1878
  };
1877
1879
  }
1878
- }), ml = {
1880
+ }), pl = {
1879
1881
  key: 0,
1880
1882
  class: "flex items-center gap-1"
1881
- }, cl = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, pl = { class: "flex flex-col py-8" }, vl = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, fl = { class: "fm-typo-en-body-lg-600 text-fm-color-typo-primary" }, Kl = /* @__PURE__ */ ke({
1883
+ }, vl = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, fl = { class: "flex flex-col py-8" }, yl = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, gl = { class: "fm-typo-en-body-lg-600 text-fm-color-typo-primary" }, Jl = /* @__PURE__ */ xe({
1882
1884
  __name: "IngredientsView",
1883
- setup(q) {
1884
- const h = Fe(), k = Ee(), u = g(() => [
1885
+ setup(W) {
1886
+ const h = Fe(), k = Ee(), d = g(() => [
1885
1887
  {
1886
1888
  type: "string",
1887
1889
  key: "skuCode",
@@ -1910,13 +1912,13 @@ const zn = /* @__PURE__ */ ke({
1910
1912
  type: "string"
1911
1913
  }
1912
1914
  ]
1913
- }), C = g(
1915
+ }), S = g(
1914
1916
  () => new Set(k.getAvailableItems(k.businessSubsidiaryId))
1915
1917
  ), A = g(() => {
1916
1918
  if (!_.value)
1917
1919
  return h.skus;
1918
- const E = kn.build(_.value);
1919
- return h.skus.filter((v) => k.isEnabled && ne.value && C.value && !C.value.has(v._id) ? !1 : wn(
1920
+ const E = wn.build(_.value);
1921
+ return h.skus.filter((v) => k.isEnabled && ne.value && S.value && !S.value.has(v._id) ? !1 : Tn(
1920
1922
  {
1921
1923
  skuCode: v.code,
1922
1924
  skuUnitAbbrev: v.unit.abbrev,
@@ -1924,11 +1926,11 @@ const zn = /* @__PURE__ */ ke({
1924
1926
  },
1925
1927
  E
1926
1928
  ));
1927
- }), U = Wt(), l = Ke(), i = xn(), m = Ae(), { t: a } = pe(), { createIngredient: d, updateIngredient: r } = Ye(), { ingredientDialogProps: f, ingredientViewLoading: w } = Xt(Ye()), { columnDefs: F } = Nn();
1928
- function p(E) {
1929
+ }), U = Wt(), l = Ke(), i = pn(), u = Ae(), { t: a } = pe(), { createIngredient: c, updateIngredient: s } = Ye(), { ingredientDialogProps: f, ingredientViewLoading: w } = Zt(Ye()), { columnDefs: F } = zn();
1930
+ function m(E) {
1929
1931
  switch (E) {
1930
1932
  case "add":
1931
- return k.isEnabled ? void 0 : d();
1933
+ return k.isEnabled ? void 0 : c();
1932
1934
  case "import":
1933
1935
  return M();
1934
1936
  case "export-all":
@@ -1937,7 +1939,7 @@ const zn = /* @__PURE__ */ ke({
1937
1939
  return y(A.value);
1938
1940
  }
1939
1941
  }
1940
- const B = P(""), R = P(!1), ve = g(() => R.value || w.value), ne = P(!0), { breakpoints: ue } = Yt(), oe = g(() => ue.value.xs || ue.value.sm), le = g(() => oe.value ? 10 : 20), te = tn(), ae = P(!1), fe = [
1942
+ const O = P(""), R = P(!1), ve = g(() => R.value || w.value), ne = P(!0), { breakpoints: ue } = Kt(), oe = g(() => ue.value.xs || ue.value.sm), le = g(() => oe.value ? 10 : 20), te = nn(), ae = P(!1), fe = [
1941
1943
  {
1942
1944
  value: "import",
1943
1945
  label: a("common.import")
@@ -1975,8 +1977,8 @@ const zn = /* @__PURE__ */ ke({
1975
1977
  { label: a("inventory.ingredient.export.exportFiltered"), value: "export-filtered", mobileOnly: !0 }
1976
1978
  ]);
1977
1979
  function y(E) {
1978
- const v = pn(E);
1979
- m.open({
1980
+ const v = fn(E);
1981
+ u.open({
1980
1982
  title: a("inventory.ingredient.export.success"),
1981
1983
  message: a("inventory.ingredient.export.filename", [v]),
1982
1984
  type: "success"
@@ -1985,7 +1987,7 @@ const zn = /* @__PURE__ */ ke({
1985
1987
  function M() {
1986
1988
  l.open({
1987
1989
  title: a("inventory.ingredient.import.title"),
1988
- contentComponent: ul,
1990
+ contentComponent: ml,
1989
1991
  overlay: !0,
1990
1992
  closeButton: !0,
1991
1993
  primaryActions: {
@@ -2003,14 +2005,14 @@ const zn = /* @__PURE__ */ ke({
2003
2005
  }
2004
2006
  }).onPrimary((E) => {
2005
2007
  if (!E) {
2006
- m.open({
2008
+ u.open({
2007
2009
  title: a("inventory.ingredient.import.error.noData"),
2008
2010
  type: "error"
2009
2011
  });
2010
2012
  return;
2011
2013
  }
2012
2014
  if (!E.importCreateResult.length && !E.importUpdateResult.length) {
2013
- m.open({
2015
+ u.open({
2014
2016
  title: a("inventory.ingredient.import.error.invalidContent"),
2015
2017
  message: a("inventory.ingredient.import.error.noImportData"),
2016
2018
  type: "error"
@@ -2018,7 +2020,7 @@ const zn = /* @__PURE__ */ ke({
2018
2020
  return;
2019
2021
  }
2020
2022
  if (E.importCreateResult.some((v) => v.errors.length) || E.importUpdateResult.some((v) => v.errors.length)) {
2021
- m.open({
2023
+ u.open({
2022
2024
  title: a("inventory.ingredient.import.error.invalidContent"),
2023
2025
  message: a("inventory.ingredient.import.error.hasErrors"),
2024
2026
  type: "error"
@@ -2026,50 +2028,50 @@ const zn = /* @__PURE__ */ ke({
2026
2028
  return;
2027
2029
  }
2028
2030
  l.close(), G(E);
2029
- }).onTertiary(vn);
2031
+ }).onTertiary(yn);
2030
2032
  }
2031
2033
  async function G(E) {
2032
2034
  R.value = !0;
2033
2035
  try {
2034
2036
  const v = [
2035
- ...E.importCreateResult.map(({ sku: H }) => ({ type: "create", sku: H })),
2036
- ...E.importUpdateResult.map(({ sku: H }) => ({ type: "update", sku: H }))
2037
- ], z = 100;
2037
+ ...E.importCreateResult.map(({ sku: q }) => ({ type: "create", sku: q })),
2038
+ ...E.importUpdateResult.map(({ sku: q }) => ({ type: "update", sku: q }))
2039
+ ], N = 100;
2038
2040
  let J = 0;
2039
- const me = () => {
2040
- J += z, m.open({
2041
+ const ce = () => {
2042
+ J += N, u.open({
2041
2043
  title: a("inventory.ingredient.import.progress", [
2042
2044
  Math.min(J, v.length),
2043
2045
  v.length
2044
2046
  ])
2045
2047
  });
2046
2048
  }, Q = new Array();
2047
- for (const H of v.chunk(100)) {
2048
- me();
2049
+ for (const q of v.chunk(100)) {
2050
+ ce();
2049
2051
  try {
2050
- const O = await h.importSkus({
2051
- create: H.filter((K) => K.type === "create").map((K) => K.sku),
2052
- update: H.filter((K) => K.type === "update").map((K) => K.sku)
2052
+ const D = await h.importSkus({
2053
+ create: q.filter((K) => K.type === "create").map((K) => K.sku),
2054
+ update: q.filter((K) => K.type === "update").map((K) => K.sku)
2053
2055
  });
2054
- Q.push(...O.errors);
2055
- } catch (O) {
2056
+ Q.push(...D.errors);
2057
+ } catch (D) {
2056
2058
  Q.push(
2057
- ...H.map((K) => {
2058
- const L = {
2059
+ ...q.map((K) => {
2060
+ const z = {
2059
2061
  module: qt.enum.sku,
2060
2062
  _id: K.sku._id,
2061
2063
  name: K.sku.name,
2062
- message: (O == null ? void 0 : O.stack) ?? O
2064
+ message: (D == null ? void 0 : D.stack) ?? D
2063
2065
  };
2064
2066
  return {
2065
2067
  data: K.sku,
2066
- error: [L]
2068
+ error: [z]
2067
2069
  };
2068
2070
  })
2069
2071
  );
2070
2072
  }
2071
2073
  }
2072
- m.open({
2074
+ u.open({
2073
2075
  title: a("inventory.ingredient.import.success"),
2074
2076
  type: "success"
2075
2077
  }), Q.length && i.alert(
@@ -2078,19 +2080,19 @@ const zn = /* @__PURE__ */ ke({
2078
2080
  "div",
2079
2081
  { class: "flex flex-col gap-8" },
2080
2082
  Q.map(
2081
- (H) => Z("div", { class: "flex flex-col" }, [
2082
- Z("div", { class: "fm-typo-en-body-lg-600" }, `(${H.data.code}) ${H.data.name}`),
2083
+ (q) => Z("div", { class: "flex flex-col" }, [
2084
+ Z("div", { class: "fm-typo-en-body-lg-600" }, `(${q.data.code}) ${q.data.name}`),
2083
2085
  Z(
2084
2086
  "div",
2085
2087
  { class: "fm-typo-en-body-lg-400" },
2086
- `${H.error.map((O) => (O == null ? void 0 : O.message) ?? "Unknown error").join(", ")}`
2088
+ `${q.error.map((D) => (D == null ? void 0 : D.message) ?? "Unknown error").join(", ")}`
2087
2089
  )
2088
2090
  ])
2089
2091
  )
2090
2092
  )
2091
2093
  );
2092
2094
  } catch (v) {
2093
- m.open({
2095
+ u.open({
2094
2096
  title: a("inventory.ingredient.import.error.failed"),
2095
2097
  message: a("inventory.ingredient.import.error.systemMessage", [v == null ? void 0 : v.message]),
2096
2098
  type: "error"
@@ -2100,29 +2102,29 @@ const zn = /* @__PURE__ */ ke({
2100
2102
  }
2101
2103
  }
2102
2104
  return (E, v) => {
2103
- const z = S("FmButton"), J = S("FmMenuItem"), me = S("FmMenu"), Q = S("FmSwitch"), H = S("FmTable"), O = S("FmCollapsibleTabs"), K = S("FmBottomSheet");
2104
- return c(), j(nn, {
2105
+ const N = C("FmButton"), J = C("FmMenuItem"), ce = C("FmMenu"), Q = C("FmSwitch"), q = C("FmTable"), D = C("FmCollapsibleTabs"), K = C("FmBottomSheet");
2106
+ return p(), Y(on, {
2105
2107
  title: o(a)("inventory.ingredient.title"),
2106
2108
  actions: we.value,
2107
- "onClick:action": p
2109
+ "onClick:action": m
2108
2110
  }, {
2109
2111
  "header-end": x(() => [
2110
- s(me, { "close-on-click": !0 }, {
2112
+ r(ce, { "close-on-click": !0 }, {
2111
2113
  "menu-button": x(() => [
2112
- s(z, {
2114
+ r(N, {
2113
2115
  label: o(a)("common.export"),
2114
2116
  "bg-color": "neutral-gray-100",
2115
2117
  "text-color": "neutral-gray-400"
2116
2118
  }, null, 8, ["label"])
2117
2119
  ]),
2118
2120
  default: x(() => [
2119
- s(J, {
2121
+ r(J, {
2120
2122
  label: o(a)("inventory.ingredient.export.exportAll"),
2121
- onClick: v[0] || (v[0] = (L) => y())
2123
+ onClick: v[0] || (v[0] = (z) => y())
2122
2124
  }, null, 8, ["label"]),
2123
- s(J, {
2125
+ r(J, {
2124
2126
  label: o(a)("inventory.ingredient.export.exportFiltered"),
2125
- onClick: v[1] || (v[1] = (L) => y(A.value))
2127
+ onClick: v[1] || (v[1] = (z) => y(A.value))
2126
2128
  }, null, 8, ["label"])
2127
2129
  ]),
2128
2130
  _: 1
@@ -2138,64 +2140,64 @@ const zn = /* @__PURE__ */ ke({
2138
2140
  }
2139
2141
  ])
2140
2142
  }, [
2141
- s(_n, {
2143
+ r(kn, {
2142
2144
  searchable: "",
2143
- search: B.value,
2144
- "onUpdate:search": v[3] || (v[3] = (L) => B.value = L),
2145
+ search: O.value,
2146
+ "onUpdate:search": v[3] || (v[3] = (z) => O.value = z),
2145
2147
  filterable: "",
2146
- "filter-attributes": u.value,
2148
+ "filter-attributes": d.value,
2147
2149
  filter: _.value,
2148
- "onUpdate:filter": v[4] || (v[4] = (L) => _.value = L)
2150
+ "onUpdate:filter": v[4] || (v[4] = (z) => _.value = z)
2149
2151
  }, {
2150
2152
  default: x(() => [
2151
- o(k).isEnabled ? (c(), V("div", ml, [
2152
- n("span", cl, $(o(a)("inventory.integration.netsuite.subsidiaryHierarchy.filtering")), 1),
2153
- s(sn),
2154
- s(Be, null, {
2153
+ o(k).isEnabled ? (p(), V("div", pl, [
2154
+ n("span", vl, $(o(a)("inventory.integration.netsuite.subsidiaryHierarchy.filtering")), 1),
2155
+ r(cn),
2156
+ r(Oe, null, {
2155
2157
  default: x(() => [
2156
- s(Q, {
2158
+ r(Q, {
2157
2159
  modelValue: ne.value,
2158
- "onUpdate:modelValue": v[2] || (v[2] = (L) => ne.value = L)
2160
+ "onUpdate:modelValue": v[2] || (v[2] = (z) => ne.value = z)
2159
2161
  }, null, 8, ["modelValue"])
2160
2162
  ]),
2161
2163
  _: 1
2162
2164
  })
2163
- ])) : N("", !0)
2165
+ ])) : L("", !0)
2164
2166
  ]),
2165
2167
  _: 1
2166
2168
  }, 8, ["search", "filter-attributes", "filter"]),
2167
- (c(), j(H, {
2169
+ (p(), Y(q, {
2168
2170
  key: JSON.stringify(_.value),
2169
- style: Dt(o(te).tableHeight),
2171
+ style: Bt(o(te).tableHeight),
2170
2172
  "column-defs": o(F),
2171
2173
  "row-data": A.value,
2172
- "search-value": B.value,
2174
+ "search-value": O.value,
2173
2175
  columnVisibility: {
2174
2176
  netsuiteSubsidiary: o(k).isEnabled
2175
2177
  },
2176
2178
  loading: (!o(U)._currentLocation || ve.value) && o(k).isReady,
2177
2179
  "loading-text": o(a)("inventory.common.loading"),
2178
- onRowClick: v[5] || (v[5] = (L) => o(r)(L.original)),
2180
+ onRowClick: v[5] || (v[5] = (z) => o(s)(z.original)),
2179
2181
  "page-size": le.value
2180
2182
  }, {
2181
- "list-row": x((L) => [
2182
- s(gn, {
2183
- row: L,
2184
- onRowClick: o(r)
2183
+ "list-row": x((z) => [
2184
+ r(hn, {
2185
+ row: z,
2186
+ onRowClick: o(s)
2185
2187
  }, kt({
2186
2188
  default: x((ge) => {
2187
- var $e, Me, Ue, be, he, ce, Te, Ve, _e, Ie;
2189
+ var $e, Me, Ue, be, he, me, Te, Ve, _e, Ie;
2188
2190
  return [
2189
- n("div", pl, [
2190
- n("div", vl, [
2191
- s(o(gt), {
2191
+ n("div", fl, [
2192
+ n("div", yl, [
2193
+ r(o(gt), {
2192
2194
  render: (Ue = (Me = ($e = ge.code) == null ? void 0 : $e.column) == null ? void 0 : Me.columnDef) == null ? void 0 : Ue.cell,
2193
2195
  props: (he = (be = ge.code) == null ? void 0 : be.getContext) == null ? void 0 : he.call(be)
2194
2196
  }, null, 8, ["render", "props"])
2195
2197
  ]),
2196
- n("div", fl, [
2197
- s(o(gt), {
2198
- render: (Ve = (Te = (ce = ge.name) == null ? void 0 : ce.column) == null ? void 0 : Te.columnDef) == null ? void 0 : Ve.cell,
2198
+ n("div", gl, [
2199
+ r(o(gt), {
2200
+ render: (Ve = (Te = (me = ge.name) == null ? void 0 : me.column) == null ? void 0 : Te.columnDef) == null ? void 0 : Ve.cell,
2199
2201
  props: (Ie = (_e = ge.name) == null ? void 0 : _e.getContext) == null ? void 0 : Ie.call(_e)
2200
2202
  }, null, 8, ["render", "props"])
2201
2203
  ])
@@ -2216,20 +2218,20 @@ const zn = /* @__PURE__ */ ke({
2216
2218
  _: 1
2217
2219
  }, 8, ["style", "column-defs", "row-data", "search-value", "columnVisibility", "loading", "loading-text", "page-size"]))
2218
2220
  ], 2),
2219
- (c(), j(it, { to: "body" }, [
2220
- s(Go, Nt(zt(o(f))), null, 16)
2221
+ (p(), Y(it, { to: "body" }, [
2222
+ r(Qo, Nt(zt(o(f))), null, 16)
2221
2223
  ])),
2222
- (c(), j(it, { to: "body" }, [
2223
- s(K, {
2224
+ (p(), Y(it, { to: "body" }, [
2225
+ r(K, {
2224
2226
  "dismiss-away": "",
2225
2227
  modelValue: ae.value,
2226
- "onUpdate:modelValue": v[7] || (v[7] = (L) => ae.value = L)
2228
+ "onUpdate:modelValue": v[7] || (v[7] = (z) => ae.value = z)
2227
2229
  }, {
2228
2230
  default: x(() => [
2229
- s(O, {
2231
+ r(D, {
2230
2232
  class: "pb-8",
2231
2233
  items: fe,
2232
- "onUpdate:modelValue": v[6] || (v[6] = (L) => ye(L))
2234
+ "onUpdate:modelValue": v[6] || (v[6] = (z) => ye(z))
2233
2235
  })
2234
2236
  ]),
2235
2237
  _: 1
@@ -2242,5 +2244,5 @@ const zn = /* @__PURE__ */ ke({
2242
2244
  }
2243
2245
  });
2244
2246
  export {
2245
- Kl as default
2247
+ Jl as default
2246
2248
  };