@feedmepos/mf-inventory-portal 1.8.0-dev.1 → 1.8.0-dev.11

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 (219) hide show
  1. package/dist/App-BTUjyQbn.js +1466 -0
  2. package/dist/{ApprovalView-C8_ax05b.js → ApprovalView-CTOTedxc.js} +26 -25
  3. package/dist/{BindingsDialog-t0ZY9eh5.js → BindingsDialog-C9v4TTzJ.js} +2 -2
  4. package/dist/{BindingsPicker-C0Qblmml.js → BindingsPicker-B5b0lavg.js} +8 -8
  5. package/dist/{BindingsTable-CsqUBbRA.js → BindingsTable-CQPan4pU.js} +4 -4
  6. package/dist/{BulkReceiveRequestView-DAG-TMox.js → BulkReceiveRequestView-BVrrjoYW.js} +21 -21
  7. package/dist/ChangeLocationComponent.vue_vue_type_script_setup_true_lang-D4Z56y7h.js +151 -0
  8. package/dist/{ClosingDraftView-CdKp4Ny6.js → ClosingDraftView-5ETKikfT.js} +748 -746
  9. package/dist/ClosingHistoryView-GM0DRWhq.js +769 -0
  10. package/dist/{ClosingTemplateView-C326DL4q.js → ClosingTemplateView-Czz--dWq.js} +303 -291
  11. package/dist/{CustomPrintTemplatePreview.vue_vue_type_script_setup_true_lang-CXjubRbj.js → CustomPrintTemplatePreview.vue_vue_type_script_setup_true_lang-Bjs8hW_q.js} +1 -1
  12. package/dist/{DefaultView-CsIMmQAY.js → DefaultView-Baksd_Lk.js} +2 -2
  13. package/dist/{DeliveryOrderPrintPreview-eTrMvJzA.js → DeliveryOrderPrintPreview-CUdMQmLf.js} +9 -9
  14. package/dist/{EmailDialog.vue_vue_type_script_setup_true_lang-B7nBbxMo.js → EmailDialog.vue_vue_type_script_setup_true_lang-CDta65pB.js} +6228 -6216
  15. package/dist/FeatureCapabilityBadge.vue_vue_type_script_setup_true_lang-CrCdJfOf.js +47 -0
  16. package/dist/FeatureCapabilityGate-C34Z4k5D.js +74 -0
  17. package/dist/{FmDateRangePickerChip.vue_vue_type_script_setup_true_lang-CI2KTzDs.js → FmDateRangePickerChip.vue_vue_type_script_setup_true_lang-C43lHbmc.js} +1 -1
  18. package/dist/{FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-Db_FiSRe.js → FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-CIMCZnY9.js} +2 -2
  19. package/dist/FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-UbMV3dKh.js +120 -0
  20. package/dist/{FmMultiselectDialog-CYUxtxnS.js → FmMultiselectDialog-DYM4qyMH.js} +2 -2
  21. package/dist/FmMultiselectDialog-tbS01AI7.js +123 -0
  22. package/dist/{FmUnitInput.vue_vue_type_script_setup_true_lang-DOkV11NN.js → FmUnitInput.vue_vue_type_script_setup_true_lang-DaOKC6RQ.js} +72 -73
  23. package/dist/ImportView-CPf8zj0t.js +1290 -0
  24. package/dist/{IngredientsView-CZ6E7cXf.js → IngredientsView-N4CH6zdo.js} +656 -649
  25. package/dist/{IntegrationExplorerView-B15ND4Fg.js → IntegrationExplorerView-Ds5fTNi3.js} +602 -614
  26. package/dist/IntegrationPlatformView-wuOLFIQR.js +13073 -0
  27. package/dist/{IntegrationView-hkNhsqx2.js → IntegrationView-Bhxwz6Ha.js} +2956 -2922
  28. package/dist/{InventoryBindingForm-SfuUF0_O.js → InventoryBindingForm-DWm9pOH_.js} +1 -1
  29. package/dist/InventoryBindingForm.vue_vue_type_script_setup_true_lang-TvwD5HcR.js +472 -0
  30. package/dist/{InventoryBindingSummary-DUcukkyJ.js → InventoryBindingSummary-DI6H0ehi.js} +1 -1
  31. package/dist/JsonViewer.vue_vue_type_script_setup_true_lang-C_hg75l0.js +25 -0
  32. package/dist/NumberPrecisionInput.vue_vue_type_script_setup_true_lang-ngeYJhtg.js +79 -0
  33. package/dist/PlanTierBadge.vue_vue_type_script_setup_true_lang-Cr1LFRUd.js +274 -0
  34. package/dist/PlanUpgradeDialog.vue_vue_type_script_setup_true_lang-CtoPkGo2.js +79 -0
  35. package/dist/{ProductionRunDetailView-BwgRX-14.js → ProductionRunDetailView-rGGuDANE.js} +4 -4
  36. package/dist/{ProductionRunLifecycleDialogs.vue_vue_type_script_setup_true_lang-BbNXNhpr.js → ProductionRunLifecycleDialogs.vue_vue_type_script_setup_true_lang-CTseB9Sn.js} +9 -9
  37. package/dist/{ProductionRunView-CZU7LY9-.js → ProductionRunView-BLBIYhKd.js} +16 -15
  38. package/dist/{PublishView-DS2FZ66p.js → PublishView-D_H_LAq2.js} +3 -3
  39. package/dist/{PurchaseOrderPrintPreview-CZa0MVAs.js → PurchaseOrderPrintPreview-DZy57dQ6.js} +7 -7
  40. package/dist/{ReceiveRequestView-Bk5b3nVB.js → ReceiveRequestView-qFQPah64.js} +15 -15
  41. package/dist/RecipeView-BPQ_MlxJ.js +3440 -0
  42. package/dist/SettingsView-DF_HGtkr.js +1032 -0
  43. package/dist/StockView-De_R8pxv.js +2651 -0
  44. package/dist/{SubsidiaryTreeDialog.vue_vue_type_script_setup_true_lang-DdZg9T4n.js → SubsidiaryTreeDialog.vue_vue_type_script_setup_true_lang-B3tBgcH7.js} +1 -1
  45. package/dist/{SupplierView-D8q6siZW.js → SupplierView-DvvB_Nn0.js} +577 -571
  46. package/dist/{SurchargeView-Db_5YFoR.js → SurchargeView-6gQPyGqi.js} +7 -7
  47. package/dist/{SystemTrailDialog.vue_vue_type_script_setup_true_lang-WOVs4Fr1.js → SystemTrailDialog.vue_vue_type_script_setup_true_lang-D6gnQpe-.js} +2 -2
  48. package/dist/TableActionableRow.vue_vue_type_script_setup_true_lang-gJQQKKAC.js +71 -0
  49. package/dist/{TemplatePublishDialog.vue_vue_type_script_setup_true_lang-BtoP4XgE.js → TemplatePublishDialog.vue_vue_type_script_setup_true_lang-CiuRBHBL.js} +1 -1
  50. package/dist/{TransferDetails.vue_vue_type_script_setup_true_lang-Bljc4Vuy.js → TransferDetails.vue_vue_type_script_setup_true_lang-B-1-jtmF.js} +1707 -1657
  51. package/dist/TransferTemplateView-Dcc9K-AJ.js +2343 -0
  52. package/dist/{UnitCostHistoryView-BqDiQ4IE.js → UnitCostHistoryView-e1MYu0_N.js} +4 -4
  53. package/dist/{UnitDisplayControl.vue_vue_type_script_setup_true_lang-BjSmg5LX.js → UnitDisplayControl.vue_vue_type_script_setup_true_lang-DQWOi2ol.js} +4 -4
  54. package/dist/{UnitView-CM695-VI.js → UnitView-BaLqtGk3.js} +84 -84
  55. package/dist/{WarehouseView-BdidU4p6.js → WarehouseView-CKYdpZoP.js} +194 -189
  56. package/dist/{WastageTemplateView-DdhwdXT6.js → WastageTemplateView-DazO6lu1.js} +19 -18
  57. package/dist/api/feature-flags.d.ts +12 -0
  58. package/dist/api/integration-sync-log.d.ts +0 -13
  59. package/dist/api/inventory.d.ts +9 -9
  60. package/dist/api/license.d.ts +8 -0
  61. package/dist/{app-Cb5s4jMu.js → app-ZyQBMnlh.js} +6102 -6066
  62. package/dist/app.d.ts +36 -150
  63. package/dist/app.js +1 -1
  64. package/dist/{closing-template-DnqnpXxn.js → closing-template-BZfYcHAK.js} +1 -1
  65. package/dist/components/ChangeLocationComponent.vue.d.ts +21 -14
  66. package/dist/components/DeprecateSoonWarningDialog.vue.d.ts +22 -0
  67. package/dist/components/FeatureCapabilityBadge.vue.d.ts +29 -0
  68. package/dist/components/FeatureCapabilityGate.spec.d.ts +1 -0
  69. package/dist/components/FeatureCapabilityGate.vue.d.ts +29 -0
  70. package/dist/components/FmUnitInputRules.d.ts +1 -1
  71. package/dist/components/MultiLocationSelector.vue.d.ts +6 -6
  72. package/dist/components/NumberPrecisionInput.spec.d.ts +1 -0
  73. package/dist/components/{PremiumBadge.vue.d.ts → PlanTierBadge.vue.d.ts} +5 -13
  74. package/dist/components/PlanUpgradeDialog.vue.d.ts +30 -0
  75. package/dist/composable/useNavigationMenu.d.ts +2 -1
  76. package/dist/{date2-BPhD_1Of.js → date2-CtVXF-Pl.js} +1 -1
  77. package/dist/{dayjs.min-Zbd6-uVD.js → dayjs.min-BG2xA9Zk.js} +1 -1
  78. package/dist/{decimal-Df6a50Ld.js → decimal-C0ERI9wc.js} +2 -2
  79. package/dist/{defineDeepModel-Brbsikbi.js → defineDeepModel-CAK0Fghp.js} +6 -6
  80. package/dist/{duplicate-template-B9kuShaF.js → duplicate-template-DwAQVTH7.js} +1 -1
  81. package/dist/{inventory-core-dart.default-DDRxXXnt.js → feature-1IL43YWw.js} +766 -398
  82. package/dist/feature-flags/core.d.ts +28 -0
  83. package/dist/feature-flags/core.spec.d.ts +1 -0
  84. package/dist/feature-flags/navigation-capabilities.d.ts +23 -0
  85. package/dist/feature-flags/navigation-capabilities.spec.d.ts +1 -0
  86. package/dist/feature-flags/plan-tier.d.ts +6 -0
  87. package/dist/feature-flags/plan-tier.spec.d.ts +1 -0
  88. package/dist/feature-flags/portal-feature-catalog.d.ts +19 -0
  89. package/dist/feature-flags/portal-feature-catalog.spec.d.ts +1 -0
  90. package/dist/feature-flags/vue.d.ts +16 -0
  91. package/dist/feature-flags/vue.spec.d.ts +1 -0
  92. package/dist/{format-time-from-id-DmUjUcVj.js → format-time-from-id-QIs7t8ML.js} +1 -1
  93. package/dist/{format-unit-display-CsQA0SQd.js → format-unit-display-DiTPPgut.js} +118 -119
  94. package/dist/helper/menu-usage-module.d.ts +1 -1
  95. package/dist/helper/number.d.ts +5 -1
  96. package/dist/helper/rules.d.ts +1 -1
  97. package/dist/id-to-date-DcuC_yKQ.js +67 -0
  98. package/dist/{import-export.helper-DCQ6oX9s.js → import-export.helper-grsZqa63.js} +16 -17
  99. package/dist/{JsonViewer.vue_vue_type_script_setup_true_lang-ig2zSXAB.js → index-C25C1Dg7.js} +1074 -1066
  100. package/dist/{index-UmM6gHJ1.js → index-DN5mjbXr.js} +1 -1
  101. package/dist/{index-C-mazZwS.js → index-DdSQrnuw.js} +3 -3
  102. package/dist/index-eGvSlWMU.js +1892 -0
  103. package/dist/{index-BXaIMGnI.js → index-twVxfWIB.js} +190 -190
  104. package/dist/{lz-string-Bibw5D_6.js → lz-string-DrKhkO_Q.js} +1 -1
  105. package/dist/{netsuite-Bev0OtQT.js → netsuite-C_EH9MVy.js} +9 -3
  106. package/dist/{predefined-templates-BHvUnTk_.js → predefined-templates-mWX1M2Dn.js} +1 -1
  107. package/dist/{purchase-order-template-DgOKEzhS.js → purchase-order-template-DZ3DsIUr.js} +1 -1
  108. package/dist/{recalculationUtils-Dv__DzZh.js → recalculationUtils-BZ5ccSeX.js} +1 -1
  109. package/dist/router/name.d.ts +2 -2
  110. package/dist/{row-action.enum-ncgDYAjP.js → row-action.enum-B2z1DXD9.js} +2 -2
  111. package/dist/rules-BpTWt_Y_.js +238 -0
  112. package/dist/stock-BO2mbTLO.js +74 -0
  113. package/dist/{stock-CxCRZo_D.js → stock-D9dhzEKk.js} +1 -1
  114. package/dist/stores/feature.d.ts +20 -2
  115. package/dist/stores/integration/netsuite.d.ts +2 -2
  116. package/dist/stores/inventory.d.ts +0 -47
  117. package/dist/stores/inventory.no-location.spec.d.ts +1 -0
  118. package/dist/stores/location.d.ts +42 -42
  119. package/dist/stores/supplier.d.ts +49 -49
  120. package/dist/stores/warehouse.d.ts +1 -1
  121. package/dist/style.css +1 -1
  122. package/dist/{supplier-CkZdeMcl.js → supplier-C-Ra1omj.js} +2 -2
  123. package/dist/{surcharge-FRSFqjGl.js → surcharge-BFDrFP1T.js} +1 -1
  124. package/dist/tsconfig.app.tsbuildinfo +1 -1
  125. package/dist/{uom-rules-Cm1styDr.js → uom-rules-B8pou4DQ.js} +1 -1
  126. package/dist/{use-ingredient-select-dialog-ntAqHX04.js → use-ingredient-select-dialog-DJvcL3EP.js} +2 -2
  127. package/dist/use-inventory-binding-dialog-DQBcnw0G.js +113 -0
  128. package/dist/{use-template-enabled-locations-CIZqw-Z8.js → use-template-enabled-locations-CSgJma2Z.js} +2 -2
  129. package/dist/{use-transfer-locations-CM5vNttA.js → use-transfer-locations-CkeJ5Nng.js} +14 -14
  130. package/dist/{useHrmPermission-CslLuBoP.js → useHrmPermission-BDc1xULx.js} +1 -1
  131. package/dist/useNavigationMenu-B7jkRkTi.js +346 -0
  132. package/dist/{useSseClient-CCV4mPzD.js → useSseClient-Bxl6D4Xs.js} +1 -1
  133. package/dist/views/adjustment-template/wastage-template/actions.d.ts +36 -36
  134. package/dist/views/adjustment-template/wastage-template/table.d.ts +36 -36
  135. package/dist/views/closing-draft/components/closing-draft-dialog/ClosingDraftApprovalDialog.vue.d.ts +6 -6
  136. package/dist/views/closing-draft/components/closing-draft-dialog/ClosingDraftDialog.vue.d.ts +12 -12
  137. package/dist/views/closing-draft/components/closing-draft-groups/ClosingGroupDetailSideSheet.vue.d.ts +6 -6
  138. package/dist/views/closing-draft/composables/use-closing-draft-import.d.ts +3 -3
  139. package/dist/views/closing-draft/composables/use-closing-draft-table.d.ts +18 -18
  140. package/dist/views/closing-template/composables/use-closing-template-actions.d.ts +45 -45
  141. package/dist/views/closing-template/composables/use-closing-template-table.d.ts +36 -36
  142. package/dist/views/ingredients/components/inventory-binding/InventoryBindingForm.vue.d.ts +0 -1
  143. package/dist/views/ingredients/components/inventory-binding/composables/use-inventory-binding-dialog.d.ts +0 -1
  144. package/dist/views/ingredients/components/inventory-binding/recipe-amount-validation.spec.d.ts +1 -0
  145. package/dist/views/ingredients/components/inventory-binding/v2/InventoryBindingFormV2.vue.d.ts +0 -1
  146. package/dist/views/ingredients/components/inventory-binding/v2/composables/use-inventory-binding-dialog.d.ts +0 -1
  147. package/dist/views/ingredients/helper/is-linked-ingredient-error.d.ts +1 -1
  148. package/dist/{components/PreviewBadge.vue.d.ts → views/integration/IntegrationPlatformView.vue.d.ts} +11 -13
  149. package/dist/views/integration/components/IntegrationCard.vue.d.ts +38 -0
  150. package/dist/views/integration/components/Synergy/importFn.spec.d.ts +1 -0
  151. package/dist/views/integration/components/Xilnex/importFn.spec.d.ts +1 -0
  152. package/dist/views/integration/components/netsuite/business/AddLocationDialog.vue.d.ts +36 -36
  153. package/dist/views/integration/components/netsuite/business/AddVendorDialog.vue.d.ts +24 -24
  154. package/dist/views/integration/helper/opening-balance.d.ts +22 -0
  155. package/dist/views/integration/helper/opening-balance.spec.d.ts +1 -0
  156. package/dist/views/receive-request/components/transfer-form/TransferFormWithController.vue.d.ts +5 -5
  157. package/dist/views/receive-request/composables/netsuite-order-label.d.ts +11 -0
  158. package/dist/views/receive-request/composables/netsuite-order-label.spec.d.ts +1 -0
  159. package/dist/views/receive-request/composables/use-process-purchase-order.d.ts +5 -5
  160. package/dist/views/receive-request/composables/use-receive-request-form.d.ts +39 -39
  161. package/dist/views/receive-request/composables/use-receive-request-table.d.ts +35 -35
  162. package/dist/views/receive-request/import/export.spec.d.ts +1 -0
  163. package/dist/views/receive-request-bulk/composables/use-bulk-receive-request-form.d.ts +34 -34
  164. package/dist/views/receive-request-bulk/composables/use-bulk-receive-request-table.d.ts +6 -6
  165. package/dist/views/recipe/components/recipe-bulk-editor/components/ModificationCard.spec.d.ts +1 -0
  166. package/dist/views/recipe/helper/bulk-edit-simulation.helper.d.ts +0 -1
  167. package/dist/views/recipe/helper/import-recipe.d.ts +2 -2
  168. package/dist/views/recipe/helper/import-recipe.spec.d.ts +1 -0
  169. package/dist/views/{ingredient-group/IngredientGroupView.vue.d.ts → settings/FeatureFlagView.vue.d.ts} +0 -1
  170. package/dist/views/settings/PlanLicenseDisplay.spec.d.ts +1 -0
  171. package/dist/views/{integration/components/IntegrationSyncLogTab.vue.d.ts → settings/PlanLicenseDisplay.vue.d.ts} +2 -2
  172. package/dist/views/stock/components/dialog/AmendAdjustmentForm.spec.d.ts +1 -0
  173. package/dist/views/stock/components/dialog/ConvertSkuDialog.spec.d.ts +1 -0
  174. package/dist/views/supplier/components/SupplierForm.vue.d.ts +4 -4
  175. package/dist/views/supplier/composables/use-supplier-table.d.ts +2 -2
  176. package/dist/views/transfer-template/components/transfer-template-dialog/TransferTemplateDialog.vue.d.ts +8 -8
  177. package/dist/views/transfer-template/components/transfer-template-form/composables/use-transfer-locations.d.ts +4 -4
  178. package/dist/views/transfer-template/components/transfer-template-form/composables/use-transfer-template-items.spec.d.ts +1 -0
  179. package/dist/views/transfer-template/composables/use-template-item-bulk-editor.d.ts +24 -24
  180. package/dist/views/transfer-template/composables/use-transfer-template-actions.d.ts +48 -48
  181. package/dist/views/transfer-template/composables/use-transfer-template-table.d.ts +48 -48
  182. package/dist/views/warehouse/components/WarehouseForm.vue.d.ts +2 -2
  183. package/dist/{vue-i18n-C5j4EQhi.js → vue-i18n-gaCwgS41.js} +355 -355
  184. package/dist/{xlsx.util-B50OvX4z.js → xlsx.util-lW-27xp-.js} +2 -2
  185. package/package.json +71 -66
  186. package/dist/App-BXgpGzGR.js +0 -1476
  187. package/dist/ClosingHistoryView-Blyq9-BS.js +0 -761
  188. package/dist/FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-zcEv1Swg.js +0 -243
  189. package/dist/FmMultiselectDialog-BAw-gp5K.js +0 -77
  190. package/dist/ImportView-BmotFC-3.js +0 -1302
  191. package/dist/IngredientBindedItem.vue_vue_type_script_setup_true_lang-DVCCpvS4.js +0 -51
  192. package/dist/IngredientGroupView-qrR9ksEn.js +0 -985
  193. package/dist/InventoryBindingForm.vue_vue_type_script_setup_true_lang-Zq81p_MF.js +0 -563
  194. package/dist/NumberPrecisionInput.vue_vue_type_script_setup_true_lang-BmfROiLM.js +0 -72
  195. package/dist/PremiumBadge.vue_vue_type_script_setup_true_lang-3e3kDsbN.js +0 -93
  196. package/dist/PreviewBadge.vue_vue_type_script_setup_true_lang-DX2MJqL4.js +0 -29
  197. package/dist/RecipeView-DvI6X-uN.js +0 -3625
  198. package/dist/SettingsView-sThYErMz.js +0 -698
  199. package/dist/StockView-Z9wGihT7.js +0 -2612
  200. package/dist/TableActionableRow.vue_vue_type_script_setup_true_lang-DAMpuZ1X.js +0 -84
  201. package/dist/TransferTemplateView-DtsJzmUr.js +0 -2327
  202. package/dist/feature-Ckn5ra3z.js +0 -1136
  203. package/dist/number-y_W4pn_d.js +0 -138
  204. package/dist/random-CSbEbElR.js +0 -10
  205. package/dist/rules-CZTBvenw.js +0 -98
  206. package/dist/stock-XINW8JOM.js +0 -75
  207. package/dist/use-inventory-binding-dialog-DVIJO8Cl.js +0 -152
  208. package/dist/useNavigationMenu-CSinmNCY.js +0 -172
  209. package/dist/usePromise-CbVUCxhj.js +0 -29
  210. package/dist/views/ingredient-group/components/ingredient-group-dialog/IngredientGroupDialog.vue.d.ts +0 -31
  211. package/dist/views/ingredient-group/components/ingredient-group-dialog/IngredientGroupDialogProps.d.ts +0 -10
  212. package/dist/views/ingredient-group/components/ingredient-group-form/IngredientGroupForm.vue.d.ts +0 -21
  213. package/dist/views/ingredient-group/components/ingredient-group-form/IngredientGroupFormProps.d.ts +0 -12
  214. package/dist/views/ingredient-group/components/ingredient-group-rule-field/IngredientGroupRuleField.vue.d.ts +0 -37
  215. package/dist/views/ingredient-group/composables/use-ingredient-group-actions.d.ts +0 -24
  216. package/dist/views/ingredient-group/composables/use-ingredient-group-rule-item.d.ts +0 -31
  217. package/dist/views/ingredient-group/composables/use-ingredient-group-table.d.ts +0 -77
  218. package/dist/views/integration/composables/use-integration-sync-log.d.ts +0 -45
  219. /package/dist/components/{FmFeatureFlagDialog.vue.d.ts → DeprecateSoonPill.vue.d.ts} +0 -0
@@ -1,25 +1,24 @@
1
1
  import { components as ce, useDialogChild as Pe, useSnackbar as de, useDialog as Me, FmButtonVariant as te } from "@feedmepos/ui-library";
2
2
  import { defineStore as pe } from "pinia";
3
3
  import { F as xe } from "./form-mode.enum-BKiNVH6A.js";
4
- import { u as fe } from "./purchase-order-template-DgOKEzhS.js";
5
- import { ref as I, h as oe, defineComponent as ye, resolveComponent as W, createElementBlock as F, openBlock as O, createElementVNode as N, createCommentVNode as J, normalizeClass as Z, createTextVNode as Be, toDisplayString as q, unref as B, createVNode as z, withCtx as me, Fragment as Y, renderList as ae, onMounted as Le, computed as H, watch as Qe, createSlots as Ue, createBlock as re } from "vue";
6
- import { a as X, c as ve, r as L, u as ie, m as qe, k as _e, s as Ve, R as we } from "./app-Cb5s4jMu.js";
7
- import { useRouter as He } from "vue-router";
8
- import { a as ze } from "./FmMultiselectDialog-CYUxtxnS.js";
9
- import { D as ne, R as U } from "./row-action.enum-ncgDYAjP.js";
10
- import { c as je } from "./component-BmLAdDiY.js";
11
- import { f as Ye } from "./format-time-from-id-DmUjUcVj.js";
4
+ import { u as fe } from "./purchase-order-template-DZ3DsIUr.js";
5
+ import { ref as I, h as oe, defineComponent as ye, resolveComponent as W, createElementBlock as F, openBlock as O, createElementVNode as D, createCommentVNode as J, normalizeClass as Z, createTextVNode as Be, toDisplayString as q, unref as B, createVNode as z, withCtx as me, Fragment as Y, renderList as ae, onMounted as Le, computed as H, watch as Qe, createSlots as Ue, createBlock as re } from "vue";
6
+ import { a as X, c as ve, r as L, u as ie, s as qe, m as Ve, k as _e, t as He, R as we } from "./app-ZyQBMnlh.js";
7
+ import { useRouter as ze } from "vue-router";
8
+ import { a as je } from "./FmMultiselectDialog-DYM4qyMH.js";
9
+ import { D as ne, R as U } from "./row-action.enum-B2z1DXD9.js";
10
+ import { c as Ye } from "./component-BmLAdDiY.js";
11
+ import { f as Ke } from "./format-time-from-id-QIs7t8ML.js";
12
12
  import { useI18n as he, useCoreStore as Ie } from "@feedmepos/mf-common";
13
- import { t as K, a as Ce, d as Oe, s as Ae, r as Ke } from "./xlsx.util-B50OvX4z.js";
14
- import { F as Ge } from "./FmDroppableField-J0tG_U3w.js";
15
- import { a as G, c as We, t as se, g as ue } from "./number-y_W4pn_d.js";
16
- import { f as Je } from "./date2-BPhD_1Of.js";
17
- import { u as ge } from "./supplier-CkZdeMcl.js";
18
- import { a as Ze, B as Xe } from "./rules-CZTBvenw.js";
19
- import { u as Te } from "./netsuite-Bev0OtQT.js";
20
- import { u as et } from "./duplicate-template-B9kuShaF.js";
21
- import { u as tt } from "./vue-i18n-C5j4EQhi.js";
22
- function De(n) {
13
+ import { t as K, a as Ce, d as Oe, s as Ae, r as Ge } from "./xlsx.util-lW-27xp-.js";
14
+ import { F as We } from "./FmDroppableField-J0tG_U3w.js";
15
+ import { a as G, t as se, g as ue, c as Je, B as Ze } from "./rules-BpTWt_Y_.js";
16
+ import { f as Xe } from "./date2-CtVXF-Pl.js";
17
+ import { u as ge } from "./supplier-C-Ra1omj.js";
18
+ import { u as be } from "./netsuite-C_EH9MVy.js";
19
+ import { u as et } from "./duplicate-template-DwAQVTH7.js";
20
+ import { u as tt } from "./vue-i18n-gaCwgS41.js";
21
+ function Ne(n) {
23
22
  const e = X(), o = n.sku, d = e.skuById[o._id];
24
23
  if (d.unit._id !== o.unit._id) return !0;
25
24
  const u = n.measurement;
@@ -29,7 +28,7 @@ function ke(n) {
29
28
  const { skuById: e } = X(), o = ve(n);
30
29
  return o.purchaseOrder.items = n.purchaseOrder.items.filter((d) => e[d.sku._id]), o;
31
30
  }
32
- const be = pe(
31
+ const Te = pe(
33
32
  "transferTemplateTable",
34
33
  function() {
35
34
  const { t: e } = he(), o = At(), d = I(!1), u = I(new Array()), s = fe(), m = X();
@@ -80,7 +79,7 @@ const be = pe(
80
79
  accessorKey: "_id",
81
80
  header: () => e("inventory.transfer.table.createdAt"),
82
81
  cell(l) {
83
- return Ye(`${l.getValue()}`);
82
+ return Ke(`${l.getValue()}`);
84
83
  },
85
84
  enableSorting: !0
86
85
  },
@@ -108,7 +107,7 @@ const be = pe(
108
107
  textAlign: "right"
109
108
  },
110
109
  cell(l) {
111
- const c = Number(l.getValue()) || 0, h = l.row.original.purchaseOrder.items.some(De);
110
+ const c = Number(l.getValue()) || 0, h = l.row.original.purchaseOrder.items.some(Ne);
112
111
  return c === 0 || h ? oe("div", { class: "flex justify-end gap-4 items-center" }, [
113
112
  oe(
114
113
  ce.FmTooltip,
@@ -161,7 +160,7 @@ const be = pe(
161
160
  ne[U.Duplicate],
162
161
  ne[U.Delete]
163
162
  ];
164
- return je(h, (b) => i(b, c));
163
+ return Ye(h, (T) => i(T, c));
165
164
  },
166
165
  enableSorting: !1,
167
166
  size: 40,
@@ -179,8 +178,8 @@ const be = pe(
179
178
  }
180
179
  );
181
180
  var Se = /* @__PURE__ */ ((n) => (n.Source = "Source", n.Destination = "Destination", n.Ingredient = "Ingredient", n))(Se || {});
182
- const Ee = We(0);
183
- function Ne(n) {
181
+ const Ee = qe.fromNumber(0);
182
+ function De(n) {
184
183
  var d;
185
184
  const e = n.sku;
186
185
  return {
@@ -233,8 +232,8 @@ function Re() {
233
232
  function rt(n) {
234
233
  var a;
235
234
  const o = Ie().currentBusiness.value, u = (a = n.map((r) => {
236
- var b;
237
- const i = r.purchaseOrder.items.map((t) => Ne(t)), p = Re(), l = [
235
+ var T;
236
+ const i = r.purchaseOrder.items.map((t) => De(t)), p = Re(), l = [
238
237
  ["Template ID", r._id],
239
238
  ["Template name", r.name],
240
239
  ["Business name", o == null ? void 0 : o.name],
@@ -253,7 +252,7 @@ function rt(n) {
253
252
  ],
254
253
  [
255
254
  "Locations",
256
- ...(b = r.locations) != null && b.length ? r.locations.map((t) => `${t.name} (${t.dbName})`) : ["All"]
255
+ ...(T = r.locations) != null && T.length ? r.locations.map((t) => `${t.name} (${t.dbName})`) : ["All"]
257
256
  ],
258
257
  ["Reference", r.purchaseOrder.ref ?? ""],
259
258
  ["Remark", r.purchaseOrder.remark ?? ""],
@@ -272,11 +271,11 @@ function rt(n) {
272
271
  sheets: {},
273
272
  sheetOccurence: {}
274
273
  }
275
- )) == null ? void 0 : a.sheets, s = `${o == null ? void 0 : o.name} transfer templates (${Je(/* @__PURE__ */ new Date())}).xlsx`, m = Ce(u);
274
+ )) == null ? void 0 : a.sheets, s = `${o == null ? void 0 : o.name} transfer templates (${Xe(/* @__PURE__ */ new Date())}).xlsx`, m = Ce(u);
276
275
  return Oe(m, s), s;
277
276
  }
278
277
  function nt() {
279
- const n = Ie(), e = ge(), o = ie(), d = X(), u = n.currentBusiness.value, s = Ne({
278
+ const n = Ie(), e = ge(), o = ie(), d = X(), u = n.currentBusiness.value, s = De({
280
279
  sku: {
281
280
  unit: {
282
281
  _id: "",
@@ -382,8 +381,8 @@ function nt() {
382
381
  Source: p,
383
382
  Destination: l,
384
383
  Ingredient: c
385
- }), b = `${u == null ? void 0 : u.name} transfer templates import.xlsx`;
386
- return Oe(h, b), b;
384
+ }), T = `${u == null ? void 0 : u.name} transfer templates import.xlsx`;
385
+ return Oe(h, T), T;
387
386
  }
388
387
  function ot(n, e) {
389
388
  const o = new Array(), d = /(.*) \(((supplier_|warehouse_|restaurant_).{24,})\)/, s = ie().locationByDbName, a = ge().supplierById, r = n.trim(), i = d.exec(r);
@@ -487,7 +486,7 @@ function it(n) {
487
486
  l,
488
487
  c,
489
488
  h,
490
- ...b
489
+ ...T
491
490
  ] = Ae(n);
492
491
  if (!e || !e.length || e.some((f) => f.length && !f.startsWith("system:")))
493
492
  throw new Error("Missing meta header. Excel file does not come from the template.");
@@ -504,7 +503,7 @@ function it(n) {
504
503
  throw new Error(
505
504
  `Missing meta headers (${E.join()}). Excel file does not come from the template.`
506
505
  );
507
- return b.map((f, v) => {
506
+ return T.map((f, v) => {
508
507
  const _ = {};
509
508
  for (const y in t) {
510
509
  const x = t[y];
@@ -525,7 +524,7 @@ function lt(n, e, o) {
525
524
  };
526
525
  }
527
526
  function ut(n, e, o) {
528
- const d = X(), u = Te(), s = d.skuByCode[n.code], m = new Array();
527
+ const d = X(), u = be(), s = d.skuByCode[n.code], m = new Array();
529
528
  if (!s)
530
529
  return m.push(`Cannot find ingredient with code (${n.code}) ${n.name}.`), {
531
530
  index: e,
@@ -565,18 +564,18 @@ function ut(n, e, o) {
565
564
  ue(a, r)
566
565
  );
567
566
  (Number.isNaN(Number(n.quantityStep)) || Number(n.quantityStep) <= 0) && m.push("Amount step must be more than 0");
568
- const p = Ze(i), l = lt(
567
+ const p = Je(i), l = lt(
569
568
  n.minimumQuantity,
570
569
  n.maximumQuantity,
571
570
  ue(a, r)
572
571
  ), c = l.min, h = l.max;
573
572
  l.compareError && m.push(l.compareError);
574
- const b = Xe(+n.minimumQuantity, +n.maximumQuantity), t = se(
573
+ const T = Ze(+n.minimumQuantity, +n.maximumQuantity), t = se(
575
574
  n.defaultQuantity,
576
575
  ue(a, r)
577
576
  ), S = p(t);
578
577
  typeof S == "string" && m.push(`Default amount: ${S}`);
579
- const E = l.min && l.max ? b(`${n.defaultQuantity}`) : null;
578
+ const E = l.min && l.max ? T(`${n.defaultQuantity}`) : null;
580
579
  typeof E == "string" && m.push(`Default amount: ${E}`);
581
580
  const w = {
582
581
  sku: s,
@@ -597,7 +596,7 @@ function ut(n, e, o) {
597
596
  function ct(n) {
598
597
  const e = n.SheetNames.filter(
599
598
  (s) => !Object.values(Se).map(String).includes(s)
600
- ), d = be().templates, u = qe(d, "_id");
599
+ ), d = Te().templates, u = Ve(d, "_id");
601
600
  try {
602
601
  return e.reduce(
603
602
  (s, m) => {
@@ -606,8 +605,8 @@ function ct(n) {
606
605
  a.push(...p.errors);
607
606
  const l = p.from, c = at(i.locations), h = c.filter((v) => v.location).map((v) => v.location);
608
607
  a.push(...c.flatMap((v) => v.errors));
609
- const b = it(r).filter((v) => v.data.code), t = b.map(
610
- (v, _) => ut(v.data, _, b)
608
+ const T = it(r).filter((v) => v.data.code), t = T.map(
609
+ (v, _) => ut(v.data, _, T)
611
610
  );
612
611
  a.push(
613
612
  ...t.flatMap(
@@ -724,22 +723,22 @@ const dt = { class: "flex items-center gap-12 pl-8" }, pt = { class: "flex flex-
724
723
  var s, m, a;
725
724
  const d = W("FmIcon"), u = W("FmTooltip");
726
725
  return O(), F("div", dt, [
727
- o[0] || (o[0] = N("div", null, "•", -1)),
728
- N("div", pt, [
729
- N("div", ft, [
730
- N("div", {
726
+ o[0] || (o[0] = D("div", null, "•", -1)),
727
+ D("div", pt, [
728
+ D("div", ft, [
729
+ D("div", {
731
730
  class: Z({
732
731
  "text-fm-color-system-error-300": e.errors.length
733
732
  })
734
733
  }, [
735
734
  Be(q(e.name) + " ", 1),
736
- N("span", yt, " (" + q(B(Ve)(`${e.transferType}`)) + ") ", 1),
735
+ D("span", yt, " (" + q(B(He)(`${e.transferType}`)) + ") ", 1),
737
736
  e.type === "create" ? (O(), F("span", vt, "(new)")) : J("", !0)
738
737
  ], 2),
739
738
  e.errors.length ? (O(), F("div", ht, [
740
739
  z(u, { "z-index": 50 }, {
741
740
  content: me(() => [
742
- N("ol", null, [
741
+ D("ol", null, [
743
742
  (O(!0), F(Y, null, ae(e.errors, (r, i) => (O(), F("li", { key: i }, q(r), 1))), 128))
744
743
  ])
745
744
  ]),
@@ -754,7 +753,7 @@ const dt = { class: "flex items-center gap-12 pl-8" }, pt = { class: "flex flex-
754
753
  })
755
754
  ])) : J("", !0)
756
755
  ]),
757
- N("div", {
756
+ D("div", {
758
757
  class: Z([
759
758
  "fm-typo-en-body-sm-400",
760
759
  {
@@ -767,10 +766,10 @@ const dt = { class: "flex items-center gap-12 pl-8" }, pt = { class: "flex flex-
767
766
  ]);
768
767
  };
769
768
  }
770
- }), gt = { class: "flex flex-col gap-24" }, Tt = {
769
+ }), gt = { class: "flex flex-col gap-24" }, bt = {
771
770
  key: 0,
772
771
  class: "flex items-center gap-8"
773
- }, bt = { class: "flex flex-col gap-8" }, St = { class: "line-clamp-2 text-ellipsis break-all" }, xt = {
772
+ }, Tt = { class: "flex flex-col gap-8" }, St = { class: "line-clamp-2 text-ellipsis break-all" }, xt = {
774
773
  key: 2,
775
774
  class: "shrink-0"
776
775
  }, _t = {
@@ -798,16 +797,16 @@ const dt = { class: "flex items-center gap-12 pl-8" }, pt = { class: "flex flex-
798
797
  }
799
798
  });
800
799
  const a = I(new Array()), r = I([]), i = I([]), p = H(
801
- () => !!a.value.length || r.value.some((b) => b.errors.length) || i.value.some((b) => b.errors.length)
800
+ () => !!a.value.length || r.value.some((T) => T.errors.length) || i.value.some((T) => T.errors.length)
802
801
  ), l = H(
803
802
  () => !!r.value.length || !!i.value.length
804
803
  ), { t: c } = he();
805
- async function h(b) {
804
+ async function h(T) {
806
805
  a.value = [], r.value = [], i.value = [];
807
806
  try {
808
807
  u.value = !0;
809
808
  const [t] = await Promise.all([
810
- Ke(b),
809
+ Ge(T),
811
810
  // fake buffer
812
811
  new Promise((f) => setTimeout(f, 1e3))
813
812
  ]);
@@ -842,22 +841,22 @@ const dt = { class: "flex items-center gap-12 pl-8" }, pt = { class: "flex flex-
842
841
  }), u.value = !1;
843
842
  }
844
843
  }
845
- return Qe(e, (b) => {
846
- b && h(b);
847
- }), (b, t) => {
844
+ return Qe(e, (T) => {
845
+ T && h(T);
846
+ }), (T, t) => {
848
847
  const S = W("FmCircularProgress"), E = W("FmIcon"), w = W("FmButton");
849
848
  return O(), F("div", gt, [
850
- t[2] || (t[2] = N("div", { class: "fm-typo-en-body-md-400" }, "Import transfer templates from excel sheets.", -1)),
851
- s.value ? (O(), F("div", Tt, [
852
- N("div", null, [
849
+ t[2] || (t[2] = D("div", { class: "fm-typo-en-body-md-400" }, "Import transfer templates from excel sheets.", -1)),
850
+ s.value ? (O(), F("div", bt, [
851
+ D("div", null, [
853
852
  z(S, {
854
853
  size: "md",
855
854
  color: "neutral-gray-200"
856
855
  })
857
856
  ]),
858
- t[1] || (t[1] = N("div", { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, "Loading...", -1))
857
+ t[1] || (t[1] = D("div", { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, "Loading...", -1))
859
858
  ])) : (O(), F(Y, { key: 1 }, [
860
- z(Ge, {
859
+ z(We, {
861
860
  class: Z({
862
861
  "w-full": !0,
863
862
  "h-[200px]": !e.value
@@ -870,8 +869,8 @@ const dt = { class: "flex items-center gap-12 pl-8" }, pt = { class: "flex flex-
870
869
  e.value ? {
871
870
  name: "default",
872
871
  fn: me(({ openFileDialog: f }) => [
873
- N("div", bt, [
874
- N("div", {
872
+ D("div", Tt, [
873
+ D("div", {
875
874
  class: Z([
876
875
  "fm-corner-radius-md p-16 flex items-center gap-16",
877
876
  {
@@ -891,7 +890,7 @@ const dt = { class: "flex items-center gap-12 pl-8" }, pt = { class: "flex flex-
891
890
  outline: "",
892
891
  color: p.value ? "system-error-300" : void 0
893
892
  }, null, 8, ["name", "color"])),
894
- N("div", {
893
+ D("div", {
895
894
  class: Z([
896
895
  "fm-typo-en-body-md-400 flex-1 h-[36px] flex items-center",
897
896
  {
@@ -900,7 +899,7 @@ const dt = { class: "flex items-center gap-12 pl-8" }, pt = { class: "flex flex-
900
899
  }
901
900
  ])
902
901
  }, [
903
- N("div", St, q(e.value.name), 1)
902
+ D("div", St, q(e.value.name), 1)
904
903
  ], 2),
905
904
  u.value ? J("", !0) : (O(), F("div", xt, [
906
905
  z(w, {
@@ -921,7 +920,7 @@ const dt = { class: "flex items-center gap-12 pl-8" }, pt = { class: "flex flex-
921
920
  size: "sm",
922
921
  color: "system-error-300"
923
922
  }),
924
- N("div", wt, q(v), 1)
923
+ D("div", wt, q(v), 1)
925
924
  ]))), 128))
926
925
  ])) : J("", !0)
927
926
  ])
@@ -930,7 +929,7 @@ const dt = { class: "flex items-center gap-12 pl-8" }, pt = { class: "flex flex-
930
929
  } : void 0
931
930
  ]), 1032, ["class", "label", "button-label"]),
932
931
  l.value ? (O(), F("div", kt, [
933
- N("div", Et, q(B(c)("inventory.ingredient.import.summary")), 1),
932
+ D("div", Et, q(B(c)("inventory.ingredient.import.summary")), 1),
934
933
  (O(!0), F(Y, null, ae(r.value, (f, v) => (O(), re($e, {
935
934
  key: v,
936
935
  name: f.template.name,
@@ -957,7 +956,7 @@ const dt = { class: "flex items-center gap-12 pl-8" }, pt = { class: "flex flex-
957
956
  });
958
957
  function It(n) {
959
958
  var s, m;
960
- const e = Te();
959
+ const e = be();
961
960
  if (!e.isEnabled) return !0;
962
961
  if (!n.internal) {
963
962
  const a = e.getNetSuiteVendor(n._id), r = a == null ? void 0 : a.subsidiaryId, i = (s = e.currentVendorSubsidiary(n._id)) == null ? void 0 : s.id;
@@ -975,27 +974,27 @@ const Ct = {
975
974
  }, Ot = pe(
976
975
  "templateItemBulkEditor",
977
976
  function() {
978
- const { t: e } = tt(), o = de(), d = be(), u = fe(), s = I(!1), m = I(1), a = I(null), r = I([]), i = I({}), p = I(/* @__PURE__ */ new Set()), l = I([]), c = I(!1), h = I(/* @__PURE__ */ new Map()), b = I(/* @__PURE__ */ new Set()), t = H(() => {
977
+ const { t: e } = tt(), o = de(), d = Te(), u = fe(), s = I(!1), m = I(1), a = I(null), r = I([]), i = I({}), p = I(/* @__PURE__ */ new Set()), l = I([]), c = I(!1), h = I(/* @__PURE__ */ new Map()), T = I(/* @__PURE__ */ new Set()), t = H(() => {
979
978
  if (!a.value) return [];
980
- const T = a.value._id;
979
+ const b = a.value._id;
981
980
  return d.templates.filter(
982
- (C) => C.purchaseOrder.items.some(($) => $.sku._id === T)
981
+ (C) => C.purchaseOrder.items.some(($) => $.sku._id === b)
983
982
  );
984
983
  }), S = H(
985
- () => t.value.filter((T) => r.value.includes(T._id))
984
+ () => t.value.filter((b) => r.value.includes(b._id))
986
985
  ), E = H(
987
986
  () => a.value !== null && t.value.length > 0 && r.value.length > 0
988
987
  ), w = H(() => {
989
988
  if (p.value.size === 0) return !1;
990
- const T = i.value;
991
- return !(p.value.has("code") && (!T.code || T.code.trim().length === 0) || p.value.has("name") && (!T.name || T.name.trim().length === 0) || p.value.has("defaultAmount") && T.quantity == null || p.value.has("step") && T.quantityStep == null);
989
+ const b = i.value;
990
+ return !(p.value.has("code") && (!b.code || b.code.trim().length === 0) || p.value.has("name") && (!b.name || b.name.trim().length === 0) || p.value.has("defaultAmount") && b.quantity == null || p.value.has("step") && b.quantityStep == null);
992
991
  }), f = H(() => {
993
992
  if (!a.value) return [];
994
- const T = a.value._id;
993
+ const b = a.value._id;
995
994
  return S.value.map((C) => {
996
995
  const $ = JSON.parse(JSON.stringify(C));
997
996
  return $.purchaseOrder.items = $.purchaseOrder.items.map((k) => {
998
- if (k.sku._id !== T) return k;
997
+ if (k.sku._id !== b) return k;
999
998
  const P = {};
1000
999
  for (const j of p.value)
1001
1000
  for (const ee of Ct[j])
@@ -1011,13 +1010,13 @@ const Ct = {
1011
1010
  s.value = !1;
1012
1011
  }
1013
1012
  function y() {
1014
- m.value = 1, a.value = null, r.value = [], i.value = {}, p.value = /* @__PURE__ */ new Set(), l.value = [], c.value = !1, h.value = /* @__PURE__ */ new Map(), b.value = /* @__PURE__ */ new Set();
1013
+ m.value = 1, a.value = null, r.value = [], i.value = {}, p.value = /* @__PURE__ */ new Set(), l.value = [], c.value = !1, h.value = /* @__PURE__ */ new Map(), T.value = /* @__PURE__ */ new Set();
1015
1014
  }
1016
1015
  function x() {
1017
1016
  if (!a.value) return;
1018
- const T = a.value._id, C = S.value[0] ?? t.value[0];
1017
+ const b = a.value._id, C = S.value[0] ?? t.value[0];
1019
1018
  if (C) {
1020
- const $ = C.purchaseOrder.items.find((k) => k.sku._id === T);
1019
+ const $ = C.purchaseOrder.items.find((k) => k.sku._id === b);
1021
1020
  $ && (i.value = { ...$ });
1022
1021
  }
1023
1022
  m.value = 2;
@@ -1028,21 +1027,21 @@ const Ct = {
1028
1027
  function A() {
1029
1028
  m.value === 3 ? (l.value = [], m.value = 2) : m.value === 2 && (m.value = 1);
1030
1029
  }
1031
- async function D() {
1030
+ async function N() {
1032
1031
  if (!c.value) {
1033
1032
  c.value = !0, h.value = /* @__PURE__ */ new Map();
1034
1033
  try {
1035
- const T = l.value.filter(
1036
- (k) => !b.value.has(k._id)
1034
+ const b = l.value.filter(
1035
+ (k) => !T.value.has(k._id)
1037
1036
  ), C = await Promise.allSettled(
1038
- T.map((k) => u.updateTemplate(k))
1037
+ b.map((k) => u.updateTemplate(k))
1039
1038
  ), $ = /* @__PURE__ */ new Map();
1040
1039
  C.forEach((k, P) => {
1041
1040
  if (k.status === "rejected") {
1042
- const j = T[P], ee = k.reason instanceof Error ? k.reason.message : String(k.reason ?? "Unknown error");
1041
+ const j = b[P], ee = k.reason instanceof Error ? k.reason.message : String(k.reason ?? "Unknown error");
1043
1042
  $.set(j._id, ee);
1044
1043
  } else
1045
- b.value = /* @__PURE__ */ new Set([...b.value, T[P]._id]);
1044
+ T.value = /* @__PURE__ */ new Set([...T.value, b[P]._id]);
1046
1045
  }), $.size > 0 ? (h.value = $, await d.fetchTemplates(), l.value = l.value.map((k) => {
1047
1046
  if (!$.has(k._id)) return k;
1048
1047
  const P = d.templates.find((j) => j._id === k._id);
@@ -1061,31 +1060,31 @@ const Ct = {
1061
1060
  }, l.value.length),
1062
1061
  type: "success"
1063
1062
  }), s.value = !1, y(), await d.fetchTemplates());
1064
- } catch (T) {
1063
+ } catch (b) {
1065
1064
  o.open({
1066
1065
  title: e("inventory.transfer.template.bulkEditor.save.errorTitle"),
1067
1066
  message: e("inventory.transfer.template.bulkEditor.save.errorMessage"),
1068
1067
  type: "error"
1069
- }), console.error("templateItemBulkEditor.confirmAndApply failed", T);
1068
+ }), console.error("templateItemBulkEditor.confirmAndApply failed", b);
1070
1069
  } finally {
1071
1070
  c.value = !1;
1072
1071
  }
1073
1072
  }
1074
1073
  }
1075
- function g(T) {
1074
+ function g(b) {
1076
1075
  const C = new Set(p.value);
1077
- C.has(T) ? C.delete(T) : C.add(T), p.value = C;
1076
+ C.has(b) ? C.delete(b) : C.add(b), p.value = C;
1078
1077
  }
1079
- function M(T) {
1078
+ function M(b) {
1080
1079
  const C = new Set(p.value);
1081
- for (const $ of T) C.add($);
1080
+ for (const $ of b) C.add($);
1082
1081
  p.value = C;
1083
1082
  }
1084
- function Q(T) {
1085
- r.value.indexOf(T) === -1 ? r.value = [...r.value, T] : r.value = r.value.filter(($) => $ !== T);
1083
+ function Q(b) {
1084
+ r.value.indexOf(b) === -1 ? r.value = [...r.value, b] : r.value = r.value.filter(($) => $ !== b);
1086
1085
  }
1087
1086
  function V() {
1088
- r.value = t.value.map((T) => T._id);
1087
+ r.value = t.value.map((b) => b._id);
1089
1088
  }
1090
1089
  function le() {
1091
1090
  r.value = [];
@@ -1101,7 +1100,7 @@ const Ct = {
1101
1100
  reviewPayloads: l,
1102
1101
  isSaving: c,
1103
1102
  applyErrors: h,
1104
- succeededIds: b,
1103
+ succeededIds: T,
1105
1104
  // computed
1106
1105
  candidateTemplates: t,
1107
1106
  selectedTemplates: S,
@@ -1115,7 +1114,7 @@ const Ct = {
1115
1114
  goToStep2: x,
1116
1115
  goToStep3: R,
1117
1116
  back: A,
1118
- confirmAndApply: D,
1117
+ confirmAndApply: N,
1119
1118
  toggleField: g,
1120
1119
  autoSelectFields: M,
1121
1120
  toggleTemplate: Q,
@@ -1124,7 +1123,7 @@ const Ct = {
1124
1123
  };
1125
1124
  }
1126
1125
  ), At = pe("transferTemplateActions", () => {
1127
- const n = Me(), e = de(), o = ie(), d = be(), u = et(), s = fe(), m = Te(), a = He(), { t: r } = he(), i = I({}), p = Ot();
1126
+ const n = Me(), e = de(), o = ie(), d = Te(), u = et(), s = fe(), m = be(), a = ze(), { t: r } = he(), i = I({}), p = Ot();
1128
1127
  function l() {
1129
1128
  p.openDialog();
1130
1129
  }
@@ -1147,7 +1146,7 @@ const Ct = {
1147
1146
  }
1148
1147
  };
1149
1148
  }
1150
- function b(y, x, R) {
1149
+ function T(y, x, R) {
1151
1150
  n.open({
1152
1151
  title: `Confirm deleting template ${y.name}?`,
1153
1152
  message: "Deleted template can no longer be retrieved",
@@ -1170,7 +1169,7 @@ const Ct = {
1170
1169
  x.value = !0;
1171
1170
  const [A] = await Promise.allSettled([
1172
1171
  s.deleteTemplate(y),
1173
- new Promise((D) => setTimeout(D, 1e3))
1172
+ new Promise((N) => setTimeout(N, 1e3))
1174
1173
  ]);
1175
1174
  if (A.status === "rejected") throw A.reason;
1176
1175
  e.open({
@@ -1206,9 +1205,9 @@ const Ct = {
1206
1205
  contentComponent: ye({
1207
1206
  props: ["modelValue"],
1208
1207
  emits: ["update:modelValue"],
1209
- setup(D) {
1208
+ setup(N) {
1210
1209
  return () => oe(ce.FmTextField, {
1211
- modelValue: D.modelValue,
1210
+ modelValue: N.modelValue,
1212
1211
  "onUpdate:modelValue": (g) => A = g,
1213
1212
  label: "New Template Name",
1214
1213
  size: "md",
@@ -1223,21 +1222,21 @@ const Ct = {
1223
1222
  });
1224
1223
  try {
1225
1224
  x.value = !0;
1226
- const [D] = await Promise.allSettled([
1225
+ const [N] = await Promise.allSettled([
1227
1226
  u.duplicatePurchaseOrderTemplate(y._id, A),
1228
1227
  new Promise((g) => setTimeout(g, 1e3))
1229
1228
  ]);
1230
- if (D.status === "rejected") throw D.reason;
1229
+ if (N.status === "rejected") throw N.reason;
1231
1230
  e.open({
1232
1231
  title: `Duplicated ${y.name}`,
1233
1232
  type: "success"
1234
1233
  });
1235
- } catch (D) {
1234
+ } catch (N) {
1236
1235
  e.open({
1237
1236
  title: `Unable to duplicate ${y.name}`,
1238
- message: `See error from server: ${D}`,
1237
+ message: `See error from server: ${N}`,
1239
1238
  type: "error"
1240
- }), console.error("error on duplicating purchase order template", D);
1239
+ }), console.error("error on duplicating purchase order template", N);
1241
1240
  } finally {
1242
1241
  x.value = !1, R();
1243
1242
  }
@@ -1278,24 +1277,24 @@ const Ct = {
1278
1277
  }).onPrimary(() => {
1279
1278
  a.push({ name: we.TRANSFER_TEMPLATE }), R(void 0);
1280
1279
  }).onSecondary(() => R(void 0)).onClose(() => R(void 0)), y;
1281
- const D = A.map((g) => {
1280
+ const N = A.map((g) => {
1282
1281
  var P;
1283
- const M = !g.purchaseOrder.items.length || g.purchaseOrder.items.some(De), Q = !It(g.purchaseOrder.supplier), V = g.purchaseOrder.supplier.internal ? m.getNetSuiteLocation(
1282
+ const M = !g.purchaseOrder.items.length || g.purchaseOrder.items.some(Ne), Q = !It(g.purchaseOrder.supplier), V = g.purchaseOrder.supplier.internal ? m.getNetSuiteLocation(
1284
1283
  `${g.purchaseOrder.supplier.internal}_${g.purchaseOrder.supplier._id}`
1285
1284
  ) : m.getNetSuiteVendor(g.purchaseOrder.supplier._id), le = Q ? `The subsidiary of the request
1286
- location is ${(P = m.getLocationSubsidiary(V == null ? void 0 : V.netSuiteId)) == null ? void 0 : P.fullName}.` : void 0, T = M || Q, C = M ? "This template is invalid. Update this template." : Q ? le : void 0, $ = `${g.purchaseOrder.supplier.internal ? "Transfer" : "Purchase"} from ${g.purchaseOrder.supplier.name}`;
1285
+ location is ${(P = m.getLocationSubsidiary(V == null ? void 0 : V.netSuiteId)) == null ? void 0 : P.fullName}.` : void 0, b = M || Q, C = M ? "This template is invalid. Update this template." : Q ? le : void 0, $ = `${g.purchaseOrder.supplier.internal ? "Transfer" : "Purchase"} from ${g.purchaseOrder.supplier.name}`;
1287
1286
  return {
1288
1287
  label: g.name,
1289
1288
  value: g._id,
1290
- disabled: T,
1289
+ disabled: b,
1291
1290
  sublabel: C ?? $
1292
1291
  };
1293
1292
  });
1294
- return D.sort((g, M) => +!!g.disabled - +!!M.disabled), n.open({
1293
+ return N.sort((g, M) => +!!g.disabled - +!!M.disabled), n.open({
1295
1294
  title: "Select one template",
1296
- contentComponent: ze,
1295
+ contentComponent: je,
1297
1296
  contentComponentProps: {
1298
- items: D,
1297
+ items: N,
1299
1298
  singleSelect: !0
1300
1299
  },
1301
1300
  primaryActions: {
@@ -1371,7 +1370,7 @@ const Ct = {
1371
1370
  )
1372
1371
  ], R = 100;
1373
1372
  let A = 0;
1374
- const D = () => {
1373
+ const N = () => {
1375
1374
  A += R, e.open({
1376
1375
  title: r("inventory.ingredient.import.progress", [
1377
1376
  Math.min(A, x.length),
@@ -1380,7 +1379,7 @@ const Ct = {
1380
1379
  });
1381
1380
  };
1382
1381
  for (const g of x.chunk(100))
1383
- D(), await s.importTemplates(g);
1382
+ N(), await s.importTemplates(g);
1384
1383
  e.open({
1385
1384
  title: r("inventory.ingredient.import.success"),
1386
1385
  type: "success"
@@ -1407,7 +1406,7 @@ const Ct = {
1407
1406
  createTemplate: c,
1408
1407
  viewTemplate: E,
1409
1408
  updateTemplate: h,
1410
- deleteTemplate: b,
1409
+ deleteTemplate: T,
1411
1410
  duplicateTemplate: t,
1412
1411
  getTemplateId: w,
1413
1412
  importTemplates: f,
@@ -1417,15 +1416,15 @@ const Ct = {
1417
1416
  templateDetailsProps: S
1418
1417
  };
1419
1418
  });
1420
- function Xt(n, e, o) {
1419
+ function Zt(n, e, o) {
1421
1420
  const d = (o == null ? void 0 : o.abbrev) ?? (e == null ? void 0 : e.abbrev) ?? "";
1422
1421
  return `${G(n, !1)} ${d}`.trimEnd();
1423
1422
  }
1424
1423
  export {
1425
1424
  At as a,
1426
- be as b,
1427
- Xt as f,
1425
+ Te as b,
1426
+ Zt as f,
1428
1427
  Re as g,
1429
- De as t,
1428
+ Ne as t,
1430
1429
  Ot as u
1431
1430
  };
@@ -1,4 +1,4 @@
1
- export type ModuleKey = 'item' | 'variant' | 'group' | 'catalog' | 'menu' | 'sku' | 'recipe' | 'skuGroup';
1
+ export type ModuleKey = 'item' | 'variant' | 'group' | 'catalog' | 'menu' | 'sku' | 'recipe';
2
2
  export declare function moduleFromPath(path: string): ModuleKey;
3
3
  export type UsageChainSegment = {
4
4
  itemName: string;
@@ -12,6 +12,11 @@ export declare function adjustmentAmountMultiply(a: AdjustmentAmount, multiplier
12
12
  export declare function adjustmentAmountMultiplyDecimal(left: AdjustmentAmount, right: AdjustmentAmount): AdjustmentAmount;
13
13
  export declare function adjustmentAmountDivide(a: AdjustmentAmount, divisor: AdjustmentAmount): number;
14
14
  export declare function adjustmentAmountDivideDecimal(a: AdjustmentAmount, divisor: AdjustmentAmount): AdjustmentAmount;
15
+ /**
16
+ * Validates an imported cell before its caller uses FfCalculator.fromNumber.
17
+ * Returns a row error for missing, non-numeric or unsupported values.
18
+ */
19
+ export declare function validateImportNumber(raw: unknown): string | null;
15
20
  export declare function upgradePrecision(a: FdoDecimal, minimumPrecision: number): {
16
21
  amount: number;
17
22
  precision: number;
@@ -26,7 +31,6 @@ export declare function numberFormatTrimPrecision(amount: number, precision?: nu
26
31
  export declare function adjustmentCurrencyFormat(a: FdoDinero, asSuffix?: boolean, precision?: number): string;
27
32
  export declare function adjustmentAmountAbs(a: AdjustmentAmount): AdjustmentAmount;
28
33
  export declare function getPrecision(a: number): number;
29
- export declare function toAdjustmentAmount(a: number): AdjustmentAmount;
30
34
  export declare function toAdjustmentWithPrecision(amt: string | number, precision?: number, allowNegative?: boolean): {
31
35
  amount: number;
32
36
  precision: number;