@feedmepos/mf-inventory-portal 1.8.0-dev.8 → 1.8.0

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 (240) hide show
  1. package/dist/{App-C8i7vBxz.js → App-BPdZMhM8.js} +515 -536
  2. package/dist/{ApprovalView-GHgTeCBV.js → ApprovalView-UzjSuZ2L.js} +26 -25
  3. package/dist/{BindingsDialog-C4-S2CWk.js → BindingsDialog-Cb6WRlKq.js} +2 -2
  4. package/dist/{BindingsPicker-C7YUArBj.js → BindingsPicker-CtD4U4lv.js} +2 -2
  5. package/dist/{BindingsTable-1Zoqi4ZS.js → BindingsTable-CX-3403K.js} +10 -10
  6. package/dist/BulkReceiveRequestPage-CUq1Lmww.js +2839 -0
  7. package/dist/{ChangeLocationComponent.vue_vue_type_script_setup_true_lang-DFSg0-gv.js → ChangeLocationComponent.vue_vue_type_script_setup_true_lang-C5cA-lGH.js} +1 -1
  8. package/dist/{ClosingDraftView-CnWFyWSE.js → ClosingDraftView-Ca_SvdWQ.js} +748 -746
  9. package/dist/{ClosingHistoryView-Bkm0voU6.js → ClosingHistoryView-DzkeJYoe.js} +7 -7
  10. package/dist/{ClosingTemplateView-Bz81JTsg.js → ClosingTemplateView-DSrelbso.js} +22 -21
  11. package/dist/{CustomPrintTemplatePreview.vue_vue_type_script_setup_true_lang-6s-24euf.js → CustomPrintTemplatePreview.vue_vue_type_script_setup_true_lang-BuOuXPy1.js} +1 -1
  12. package/dist/{DefaultView-1RRzbPB3.js → DefaultView-Dw-7Y8vD.js} +2 -2
  13. package/dist/{DeliveryOrderPrintPreview-KcLqjOj1.js → DeliveryOrderPrintPreview-C5qJsv_O.js} +15 -15
  14. package/dist/{EmailDialog.vue_vue_type_script_setup_true_lang-r0Q0qhoK.js → EmailDialog.vue_vue_type_script_setup_true_lang-D8od7aKT.js} +9847 -9723
  15. package/dist/{FeatureCapabilityBadge.vue_vue_type_script_setup_true_lang-Cwmk3NLS.js → FeatureCapabilityBadge.vue_vue_type_script_setup_true_lang-ChekXW32.js} +11 -10
  16. package/dist/FeatureCapabilityGate-C-IM5_7n.js +82 -0
  17. package/dist/FeaturePageGate.vue_vue_type_script_setup_true_lang-DEDU1XUC.js +189 -0
  18. package/dist/{FmDateRangePickerChip.vue_vue_type_script_setup_true_lang-pzIzIWpX.js → FmDateRangePickerChip.vue_vue_type_script_setup_true_lang-B861gqIJ.js} +1 -1
  19. package/dist/{FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-B6cFB4vX.js → FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-Ckli_nZx.js} +2 -2
  20. package/dist/{FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-D_o6pX9i.js → FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-BEjFoMJJ.js} +2 -2
  21. package/dist/{FmMultiselectDialog-CC_Na_p1.js → FmMultiselectDialog-CShFKSIW.js} +2 -2
  22. package/dist/{FmMultiselectDialog-D0GhmOQ9.js → FmMultiselectDialog-Ci-6NMsV.js} +2 -2
  23. package/dist/{FmUnitInput.vue_vue_type_script_setup_true_lang-DQlSMRoB.js → FmUnitInput.vue_vue_type_script_setup_true_lang-Dkx5vVap.js} +105 -99
  24. package/dist/ImportView-7ij7RUHI.js +1540 -0
  25. package/dist/{IngredientsView-B2I2OPSb.js → IngredientsView-fIPtTyFD.js} +367 -365
  26. package/dist/{IntegrationExplorerView-WK1EmwLA.js → IntegrationExplorerView-DLYT4T-I.js} +1537 -1620
  27. package/dist/IntegrationPlatformView-CwywuK_y.js +13385 -0
  28. package/dist/{IntegrationView-CeaL92Yj.js → IntegrationView-DnyVHXge.js} +2380 -2340
  29. package/dist/{InventoryBindingForm-DgtaDM0I.js → InventoryBindingForm-BBs8v7CL.js} +1 -1
  30. package/dist/{InventoryBindingForm.vue_vue_type_script_setup_true_lang-CqDN355J.js → InventoryBindingForm.vue_vue_type_script_setup_true_lang--pI5wz_M.js} +134 -134
  31. package/dist/{InventoryBindingSummary-C_W456aj.js → InventoryBindingSummary-CwIrQ8lG.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-DJSbskyn.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-D6-lo7iI.js → PlanUpgradeDialog.vue_vue_type_script_setup_true_lang-0F-yOcPC.js} +1 -1
  36. package/dist/PremiumUpgradePage.vue_vue_type_script_setup_true_lang-DGAxPOEh.js +58 -0
  37. package/dist/ProductionRunDetailPage-C_WC4qfP.js +2317 -0
  38. package/dist/{ProductionRunLifecycleDialogs.vue_vue_type_script_setup_true_lang-DwBY6gIb.js → ProductionRunLifecycleDialogs.vue_vue_type_script_setup_true_lang-BIkoMOM2.js} +3051 -3161
  39. package/dist/ProductionRunPage-DuzVrjbZ.js +954 -0
  40. package/dist/{PublishView-Dv-W6ntx.js → PublishView-BVg44yke.js} +3 -3
  41. package/dist/{PurchaseOrderPrintPreview-D1TAnJd_.js → PurchaseOrderPrintPreview-CNx6unyj.js} +17 -17
  42. package/dist/{ReceiveRequestView-Rc_uw_Ad.js → ReceiveRequestView-DeNrYOUt.js} +17 -16
  43. package/dist/RecipeView-De3pLsPR.js +3272 -0
  44. package/dist/{SettingsView-K5wAt8oo.js → SettingsView-B5ud0KtI.js} +398 -425
  45. package/dist/StockView-4N3NRjY8.js +3003 -0
  46. package/dist/{SubsidiaryTreeDialog.vue_vue_type_script_setup_true_lang-CsRLy0xI.js → SubsidiaryTreeDialog.vue_vue_type_script_setup_true_lang-DvlRRKdt.js} +1 -1
  47. package/dist/{SupplierView-CLVupRN0.js → SupplierView-fC9oe5nu.js} +21 -20
  48. package/dist/{SurchargeView-CToB_z5v.js → SurchargeView-H6rv7u8A.js} +7 -7
  49. package/dist/{SystemTrailDialog.vue_vue_type_script_setup_true_lang-CvqIw9q6.js → SystemTrailDialog.vue_vue_type_script_setup_true_lang-DFdrmR2Z.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-BivHE94R.js +332 -0
  52. package/dist/TransferDetails.vue_vue_type_script_setup_true_lang-Df01LqHp.js +4953 -0
  53. package/dist/TransferTemplateView-CVUnofkI.js +2347 -0
  54. package/dist/{UnitCostHistoryView-BMB2MeTh.js → UnitCostHistoryView-DjD2WAFI.js} +4 -4
  55. package/dist/{UnitDisplayControl.vue_vue_type_script_setup_true_lang-Dn8Y8zfp.js → UnitDisplayControl.vue_vue_type_script_setup_true_lang-CE0zHU6c.js} +4 -4
  56. package/dist/{UnitView-Bl8jws6R.js → UnitView-DCfsbE8e.js} +111 -106
  57. package/dist/{WarehouseView-BurSM1jg.js → WarehouseView-BCebmbcj.js} +12 -11
  58. package/dist/{WastageTemplateView-DRfJ9LGR.js → WastageTemplateView-BXYNMBun.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 +2 -0
  63. package/dist/api/integration-sync-log.d.ts +0 -13
  64. package/dist/api/inventory.d.ts +9 -9
  65. package/dist/api/license.d.ts +0 -1
  66. package/dist/api/netsuite-explorer.d.ts +1 -0
  67. package/dist/api/stock.d.ts +1 -1
  68. package/dist/{app-Duum3eHx.js → app-VtVYHCDF.js} +9785 -9546
  69. package/dist/app.d.ts +151 -14
  70. package/dist/app.js +1 -1
  71. package/dist/bulk-edit-simulation.helper-Nd6CtWGf.js +178 -0
  72. package/dist/{closing-template-BE41yfue.js → closing-template-LCe0U9w9.js} +4 -4
  73. package/dist/components/FeatureCapabilityGate.vue.d.ts +3 -0
  74. package/dist/components/FeatureGateLayout.vue.d.ts +11 -0
  75. package/dist/components/FeaturePageGate.spec.d.ts +1 -0
  76. package/dist/components/FeaturePageGate.vue.d.ts +34 -0
  77. package/dist/components/FmAdminCollapsiblePanel.vue.d.ts +1 -1
  78. package/dist/components/FmDroppableField.vue.d.ts +1 -1
  79. package/dist/components/FmInventoryTableToolbar.vue.d.ts +2 -2
  80. package/dist/components/FmUnitInputProps.d.ts +1 -0
  81. package/dist/components/FmUnitInputRules.d.ts +1 -1
  82. package/dist/components/HrmPermissionGuard.vue.d.ts +1 -1
  83. package/dist/components/MultiLocationSelector.vue.d.ts +6 -6
  84. package/dist/components/NumberPrecisionInput.spec.d.ts +1 -0
  85. package/dist/components/PremiumUpgradePage.vue.d.ts +2 -0
  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-DrhO3BxU.js → date2-Cfb6DXM4.js} +1 -1
  90. package/dist/{dayjs.min-CQp6EpOp.js → dayjs.min-BOndKK7B.js} +1 -1
  91. package/dist/{decimal-Cq0qUT4r.js → decimal-nbuisP61.js} +2 -2
  92. package/dist/{defineDeepModel-DRC39nJs.js → defineDeepModel-DKySrdwp.js} +5 -5
  93. package/dist/{duplicate-template-j2ymeDNH.js → duplicate-template-BxcKb3Jp.js} +1 -1
  94. package/dist/{feature-C0hQza5A.js → feature-VDUlSvM1.js} +435 -359
  95. package/dist/feature-flags/core.d.ts +1 -0
  96. package/dist/feature-flags/vue.d.ts +22 -1
  97. package/dist/{format-time-from-id-BmJoI3jT.js → format-time-from-id-CfVH4LZ_.js} +1 -1
  98. package/dist/{format-unit-display-CRgIMXsD.js → format-unit-display-BjTeAtgS.js} +209 -208
  99. package/dist/helper/country.spec.d.ts +1 -0
  100. package/dist/helper/menu-usage-module.d.ts +2 -1
  101. package/dist/helper/number.d.ts +5 -1
  102. package/dist/helper/rules.d.ts +1 -1
  103. package/dist/{id-to-date-CuFZDvIr.js → id-to-date-Jr9SlHLO.js} +1 -1
  104. package/dist/{import-export.helper-B43zbsbj.js → import-export.helper-FT9Wbigh.js} +17 -17
  105. package/dist/{index-BYDjs08n.js → index-BV9b3Ulp.js} +2234 -2163
  106. package/dist/{index-DXNYZeq3.js → index-By5-VjVg.js} +1 -1
  107. package/dist/{JsonViewer.vue_vue_type_script_setup_true_lang-ig2zSXAB.js → index-C25C1Dg7.js} +1074 -1066
  108. package/dist/{index-Cwvg7EHd.js → index-DXHVgUHU.js} +3 -3
  109. package/dist/index-eGvSlWMU.js +1892 -0
  110. package/dist/layout/SingleColumnLayout.vue.d.ts +1 -1
  111. package/dist/{lz-string-6DgW1cPF.js → lz-string-BAzqO9xf.js} +1 -1
  112. package/dist/menu-usage-module-Bq_KLsO4.js +74 -0
  113. package/dist/{netsuite-BSpmyaE1.js → netsuite-BhGuduqd.js} +254 -263
  114. package/dist/netsuite-explorer-9Qj7qAum.js +79 -0
  115. package/dist/{predefined-templates-C0jtb4T7.js → predefined-templates-BlRafgnc.js} +1 -1
  116. package/dist/production-run-list-DR1WsaBR.js +61 -0
  117. package/dist/{purchase-order-template-B5Pjddfi.js → purchase-order-template-By_Zxu1b.js} +1 -1
  118. package/dist/{recalculationUtils-DtJWwWSj.js → recalculationUtils-VsBar7jB.js} +1 -1
  119. package/dist/router/name.d.ts +2 -1
  120. package/dist/{row-action.enum-BDDJNSi0.js → row-action.enum-76yLYmPA.js} +1 -1
  121. package/dist/rules-fOcvgt4t.js +243 -0
  122. package/dist/{stock-BKMDvf5S.js → stock-C-dQaxY2.js} +1 -1
  123. package/dist/stock-Dh0KXA1P.js +78 -0
  124. package/dist/stores/feature.d.ts +26 -2
  125. package/dist/stores/feature.load-state.spec.d.ts +1 -0
  126. package/dist/stores/integration/netsuite.d.ts +2 -2
  127. package/dist/stores/inventory.no-location.spec.d.ts +1 -0
  128. package/dist/stores/location.d.ts +42 -42
  129. package/dist/stores/supplier.d.ts +48 -48
  130. package/dist/stores/warehouse.d.ts +2 -2
  131. package/dist/style.css +1 -1
  132. package/dist/{supplier-Cv8HRNou.js → supplier-XHHHN8vZ.js} +2 -2
  133. package/dist/{surcharge-ktE1pRyy.js → surcharge-0-oBiYoF.js} +1 -1
  134. package/dist/tsconfig.app.tsbuildinfo +1 -1
  135. package/dist/{uom-rules-DCnXmEkb.js → uom-rules-DrRuSFgM.js} +1 -1
  136. package/dist/{use-ingredient-select-dialog-CYUUVrCI.js → use-ingredient-select-dialog-mQ7aQChK.js} +2 -2
  137. package/dist/{use-inventory-binding-dialog-Dugj9i-6.js → use-inventory-binding-dialog-5Wu0ItnH.js} +2 -2
  138. package/dist/{use-template-enabled-locations-BlZ7WAqX.js → use-template-enabled-locations-CgpPMl8g.js} +2 -2
  139. package/dist/{use-transfer-locations-CUDFnsVH.js → use-transfer-locations-DZ6B7eMT.js} +14 -14
  140. package/dist/{useHrmPermission-BOwmXi9H.js → useHrmPermission-BaGxz4EV.js} +1 -1
  141. package/dist/{useNavigationMenu-CbNKFBwx.js → useNavigationMenu-CyP39v3U.js} +39 -39
  142. package/dist/{useSseClient-CdyQh47h.js → useSseClient-CaD4MVg0.js} +1 -1
  143. package/dist/views/adjustment-template/wastage-template/actions.d.ts +36 -36
  144. package/dist/views/adjustment-template/wastage-template/table.d.ts +36 -36
  145. package/dist/views/changelog/composables/use-snapshot-diff.d.ts +2 -2
  146. package/dist/views/closing-draft/components/closing-draft-dialog/ClosingDraftApprovalDialog.vue.d.ts +6 -6
  147. package/dist/views/closing-draft/components/closing-draft-dialog/ClosingDraftDialog.vue.d.ts +12 -12
  148. package/dist/views/closing-draft/components/closing-draft-groups/ClosingGroupDetailSideSheet.vue.d.ts +6 -6
  149. package/dist/views/closing-draft/composables/use-closing-draft-import.d.ts +3 -3
  150. package/dist/views/closing-draft/composables/use-closing-draft-table.d.ts +19 -19
  151. package/dist/views/closing-draft/helpers/draft-status-to-class-name.helper.d.ts +1 -1
  152. package/dist/views/closing-template/composables/use-closing-template-actions.d.ts +45 -45
  153. package/dist/views/closing-template/composables/use-closing-template-table.d.ts +36 -36
  154. package/dist/views/import/helper/submit-rows.d.ts +1 -1
  155. package/dist/views/ingredients/components/inventory-binding/recipe-amount-validation.spec.d.ts +1 -0
  156. package/dist/views/ingredients/helper/is-linked-ingredient-error.d.ts +3 -1
  157. package/dist/views/integration/IntegrationPlatformView.vue.d.ts +24 -0
  158. package/dist/views/integration/components/IntegrationCard.vue.d.ts +3 -3
  159. package/dist/views/integration/components/Synergy/importFn.spec.d.ts +1 -0
  160. package/dist/views/integration/components/Xilnex/importFn.spec.d.ts +1 -0
  161. package/dist/views/integration/components/netsuite/business/AddLocationDialog.vue.d.ts +36 -36
  162. package/dist/views/integration/components/netsuite/business/AddVendorDialog.vue.d.ts +24 -24
  163. package/dist/views/integration/helper/opening-balance.d.ts +22 -0
  164. package/dist/views/integration/helper/opening-balance.spec.d.ts +1 -0
  165. package/dist/views/production-run/ProductionRunDetailPage.spec.d.ts +1 -0
  166. package/dist/views/{integration/components/IntegrationSyncLogTab.vue.d.ts → production-run/ProductionRunDetailPage.vue.d.ts} +2 -2
  167. package/dist/views/production-run/ProductionRunPage.vue.d.ts +2 -0
  168. package/dist/views/production-run/features/detail/ProductionRunItemsTable.vue.d.ts +2 -2
  169. package/dist/views/production-run/features/detail/ProductionRunOverviewTab.vue.d.ts +4 -4
  170. package/dist/views/production-run/features/detail/use-production-run-detail.d.ts +19 -9
  171. package/dist/views/production-run/features/lifecycle/CancelRunDialog.vue.d.ts +4 -4
  172. package/dist/views/production-run/features/lifecycle/CloseRunDialog.vue.d.ts +4 -4
  173. package/dist/views/production-run/features/lifecycle/ProductionRunLifecycleDialogs.vue.d.ts +14 -14
  174. package/dist/views/production-run/features/lifecycle/TargetReachedDialog.vue.d.ts +4 -4
  175. package/dist/views/production-run/features/planning/ProductionRunFormDialog.vue.d.ts +4 -4
  176. package/dist/views/production-run/features/planning/ProductionRunPlanner.vue.d.ts +1 -1
  177. package/dist/views/production-run/features/planning/use-production-run-duplicate-sources.d.ts +6 -6
  178. package/dist/views/production-run/shared/helpers/production-run-navigation.d.ts +0 -1
  179. package/dist/views/production-run/shared/model/production-run-list.d.ts +1 -1
  180. package/dist/views/production-run/shared/ui/ProductionRunInfoBadge.vue.d.ts +1 -1
  181. package/dist/views/production-run/shared/ui/ProductionRunInfoText.vue.d.ts +1 -1
  182. package/dist/views/production-run/shared/ui/ProductionRunScrollHint.vue.d.ts +2 -2
  183. package/dist/views/production-run/shared/ui/ProductionRunTextarea.vue.d.ts +3 -3
  184. package/dist/views/receive-request/components/transfer-form/TransferFormWithController.vue.d.ts +5 -5
  185. package/dist/views/receive-request/composables/netsuite-order-label.d.ts +11 -0
  186. package/dist/views/receive-request/composables/netsuite-order-label.spec.d.ts +1 -0
  187. package/dist/views/receive-request/composables/use-process-purchase-order.d.ts +6 -6
  188. package/dist/views/receive-request/composables/use-receive-request-form.d.ts +48 -48
  189. package/dist/views/receive-request/composables/use-receive-request-form.spec.d.ts +1 -0
  190. package/dist/views/receive-request/composables/use-receive-request-table.d.ts +42 -42
  191. package/dist/views/receive-request/import/export.spec.d.ts +1 -0
  192. package/dist/views/receive-request-bulk/BulkReceiveRequestPage.vue.d.ts +2 -0
  193. package/dist/views/receive-request-bulk/components/CreateTransferWizard.spec.d.ts +1 -0
  194. package/dist/views/receive-request-bulk/composables/use-bulk-receive-request-form.d.ts +54 -54
  195. package/dist/views/receive-request-bulk/composables/use-bulk-receive-request-form.readiness.spec.d.ts +1 -0
  196. package/dist/views/receive-request-bulk/composables/use-bulk-receive-request-table.d.ts +8 -8
  197. package/dist/views/recipe/components/recipe-bulk-editor/components/ModificationCard.spec.d.ts +1 -0
  198. package/dist/views/recipe/helper/import-recipe.d.ts +30 -0
  199. package/dist/views/recipe/helper/import-recipe.spec.d.ts +1 -0
  200. package/dist/views/settings/PlanLicenseDisplay.vue.d.ts +1 -14
  201. package/dist/views/stock/components/StockRecordCard.spec.d.ts +1 -0
  202. package/dist/views/stock/components/StockRecordCard.vue.d.ts +19 -865
  203. package/dist/views/stock/components/dialog/AmendAdjustmentForm.spec.d.ts +1 -0
  204. package/dist/views/stock/components/dialog/BillInventoryInfoDialog.spec.d.ts +1 -0
  205. package/dist/views/stock/components/dialog/BillInventoryInfoDialog.vue.d.ts +36 -0
  206. package/dist/views/stock/components/dialog/ConvertSkuDialog.spec.d.ts +1 -0
  207. package/dist/views/stock/composables/use-last-closing-summary.d.ts +4 -0
  208. package/dist/views/stock/composables/use-last-closing-summary.spec.d.ts +1 -0
  209. package/dist/views/supplier/components/SupplierForm.vue.d.ts +4 -4
  210. package/dist/views/supplier/composables/use-supplier-table.d.ts +2 -2
  211. package/dist/views/transfer-template/components/transfer-template-dialog/TransferTemplateDialog.vue.d.ts +8 -8
  212. package/dist/views/transfer-template/components/transfer-template-form/composables/use-transfer-locations.d.ts +4 -4
  213. package/dist/views/transfer-template/components/transfer-template-form/composables/use-transfer-template-items.spec.d.ts +1 -0
  214. package/dist/views/transfer-template/composables/use-template-item-bulk-editor.d.ts +24 -24
  215. package/dist/views/transfer-template/composables/use-transfer-template-actions.d.ts +48 -48
  216. package/dist/views/transfer-template/composables/use-transfer-template-table.d.ts +48 -48
  217. package/dist/views/transfer-template/helpers/template-item.error.helper.spec.d.ts +1 -0
  218. package/dist/views/unit/composables/use-unit-form.spec.d.ts +1 -0
  219. package/dist/views/warehouse/components/WarehouseForm.vue.d.ts +4 -4
  220. package/dist/{PlanTierBadge.vue_vue_type_script_setup_true_lang-BSR_nyHY.js → vue-KHCpiw_e.js} +101 -80
  221. package/dist/{vue-i18n-dSKy66Jh.js → vue-i18n-D6btLtve.js} +513 -513
  222. package/dist/{xlsx.util-pjzuMquw.js → xlsx.util-Dr5i_LBa.js} +2 -2
  223. package/package.json +71 -66
  224. package/dist/BulkReceiveRequestView-Lakk8011.js +0 -2656
  225. package/dist/FeatureCapabilityGate-C6t1VwKD.js +0 -74
  226. package/dist/ImportView-DCcdEvy4.js +0 -1291
  227. package/dist/NumberPrecisionInput.vue_vue_type_script_setup_true_lang-BMDjCk9T.js +0 -72
  228. package/dist/ProductionRunDetailView-C9rxLBbL.js +0 -2312
  229. package/dist/ProductionRunView-DvMdVGz1.js +0 -930
  230. package/dist/RecipeView-ByUaGc4w.js +0 -3428
  231. package/dist/StockView-B3EjdjVx.js +0 -2615
  232. package/dist/TableActionableRow.vue_vue_type_script_setup_true_lang-DAMpuZ1X.js +0 -84
  233. package/dist/TemplatePublishDialog.vue_vue_type_script_setup_true_lang-BGPuaJlU.js +0 -299
  234. package/dist/TransferDetails.vue_vue_type_script_setup_true_lang-8ydaQEw-.js +0 -4836
  235. package/dist/TransferTemplateView-BnfALwmw.js +0 -2326
  236. package/dist/menu-usage-module-BdjYEk3s.js +0 -57
  237. package/dist/number-5ZeFx-wN.js +0 -138
  238. package/dist/rules-CinZKpvV.js +0 -98
  239. package/dist/stock-1n-4iyqz.js +0 -75
  240. package/dist/views/integration/composables/use-integration-sync-log.d.ts +0 -45
@@ -1,117 +1,118 @@
1
- import { defineComponent as ee, ref as _, computed as E, watch as j, resolveComponent as L, createElementBlock as i, openBlock as o, createElementVNode as l, toDisplayString as C, Fragment as A, renderList as W, createBlock as O, createCommentVNode as Z, createVNode as m, nextTick as xe, createSlots as he, withCtx as z, normalizeClass as ue, unref as S, withModifiers as ke, h as V, Teleport as we } from "vue";
1
+ import { defineComponent as ee, ref as k, computed as A, watch as J, resolveComponent as L, createElementBlock as r, openBlock as o, createElementVNode as l, toDisplayString as C, Fragment as E, renderList as Y, createBlock as z, createCommentVNode as Z, createVNode as p, nextTick as xe, createSlots as he, withCtx as P, normalizeClass as ue, unref as w, withModifiers as ke, h as B, Teleport as we } from "vue";
2
2
  import { _ as Fe } from "./SingleColumnLayout.vue_vue_type_script_setup_true_lang-DpwneGOV.js";
3
- import { B as Y, g as Te, r as Se, s as $e, u as De, a as ae, b as Ce, c as Be, d as be, e as Ve, f as Ie } from "./predefined-templates-C0jtb4T7.js";
3
+ import { B as G, g as Te, r as Se, s as $e, u as Ce, a as ae, b as De, c as Be, d as be, e as Ve, f as Ie } from "./predefined-templates-BlRafgnc.js";
4
4
  import { useSnackbar as Pe, components as X } from "@feedmepos/ui-library";
5
5
  import { _ as ze } from "./_plugin-vue_export-helper-CHgC5LLL.js";
6
- import { H as se, I as Oe, u as _e } from "./app-Duum3eHx.js";
6
+ import { H as se, J as Oe, u as Le } from "./app-VtVYHCDF.js";
7
7
  import { useCoreStore as ye, useI18n as Ee } from "@feedmepos/mf-common";
8
- import "./dayjs.min-CQp6EpOp.js";
9
- import { a as Le, b as Ae, I as Ne, u as Ue } from "./feature-C0hQza5A.js";
10
- import { _ as He, D as Me } from "./FeatureCapabilityBadge.vue_vue_type_script_setup_true_lang-Cwmk3NLS.js";
11
- import { _ as Re } from "./ChangeLocationComponent.vue_vue_type_script_setup_true_lang-DFSg0-gv.js";
12
- import { _ as je, a as Ke } from "./PlanTierBadge.vue_vue_type_script_setup_true_lang-BSR_nyHY.js";
13
- const qe = { class: "p-3" }, Ge = { class: "text-sm font-semibold text-gray-700 mb-4 pb-2 border-b border-gray-200" }, Ye = { class: "flex flex-col gap-3" }, We = {
8
+ import "./dayjs.min-BOndKK7B.js";
9
+ import { u as _e, a as Ue, I as Ae } from "./feature-VDUlSvM1.js";
10
+ import { _ as He, D as Ne } from "./FeatureCapabilityBadge.vue_vue_type_script_setup_true_lang-ChekXW32.js";
11
+ import { _ as Me } from "./ChangeLocationComponent.vue_vue_type_script_setup_true_lang-C5cA-lGH.js";
12
+ import { _ as Re } from "./PlanTierBadge.vue_vue_type_script_setup_true_lang-CM3gtYZo.js";
13
+ import { a as je } from "./vue-KHCpiw_e.js";
14
+ const Ke = { class: "p-3" }, qe = { class: "text-sm font-semibold text-gray-700 mb-4 pb-2 border-b border-gray-200" }, Ge = { class: "flex flex-col gap-3" }, Ye = {
14
15
  key: 0,
15
16
  class: "flex items-center justify-between py-1"
16
- }, Je = { class: "text-[13px] text-gray-600" }, Qe = { class: "text-[13px] text-gray-600" }, Xe = ["value", "rows", "placeholder", "onInput"], Ze = {
17
+ }, Je = { class: "text-[13px] text-gray-600" }, We = { class: "text-[13px] text-gray-600" }, Qe = ["value", "rows", "placeholder", "onInput"], Xe = {
17
18
  key: 5,
18
19
  class: "flex items-center justify-between py-1"
19
- }, et = { class: "text-[13px] text-gray-600" }, tt = ["value", "onInput"], lt = /* @__PURE__ */ ee({
20
+ }, Ze = { class: "text-[13px] text-gray-600" }, et = ["value", "onInput"], tt = /* @__PURE__ */ ee({
20
21
  __name: "BlockConfigPanel",
21
22
  props: {
22
23
  block: {}
23
24
  },
24
25
  emits: ["update"],
25
- setup(N, { emit: h }) {
26
- const T = N, k = h;
27
- function w(n) {
28
- var g;
29
- if ((g = n.config) != null && g.configFields && Array.isArray(n.config.configFields)) {
30
- const f = n.config.configFields.map((d) => ({ ...d })), x = new Set(f.map((d) => d.key)), a = Y[n.tag], D = a ? a.initialConfigFields().filter((d) => !x.has(d.key)) : [];
31
- return [...f, ...D];
26
+ setup(H, { emit: v }) {
27
+ const T = H, x = v;
28
+ function S(c) {
29
+ var b;
30
+ if ((b = c.config) != null && b.configFields && Array.isArray(c.config.configFields)) {
31
+ const _ = c.config.configFields.map((d) => ({ ...d })), h = new Set(_.map((d) => d.key)), a = G[c.tag], $ = a ? a.initialConfigFields().filter((d) => !h.has(d.key)) : [];
32
+ return [..._, ...$];
32
33
  }
33
- const r = Y[n.tag];
34
- return r ? r.initialConfigFields() : [];
34
+ const u = G[c.tag];
35
+ return u ? u.initialConfigFields() : [];
35
36
  }
36
- const p = _(w(T.block)), $ = E(() => {
37
- const n = Y[T.block.tag];
38
- return (n == null ? void 0 : n.label) ?? T.block.tag;
37
+ const m = k(S(T.block)), O = A(() => {
38
+ const c = G[T.block.tag];
39
+ return (c == null ? void 0 : c.label) ?? T.block.tag;
39
40
  });
40
- j(
41
+ J(
41
42
  () => T.block,
42
- (n) => {
43
- p.value = w(n);
43
+ (c) => {
44
+ m.value = S(c);
44
45
  },
45
46
  { deep: !0 }
46
47
  );
47
- function v(n, r) {
48
- const g = p.value[n];
49
- g && (g.value = r, y());
48
+ function f(c, u) {
49
+ const b = m.value[c];
50
+ b && (b.value = u, g());
50
51
  }
51
- function y() {
52
- k("update", {
52
+ function g() {
53
+ x("update", {
53
54
  ...T.block.config || {},
54
- configFields: p.value.map((n) => ({ ...n }))
55
+ configFields: m.value.map((c) => ({ ...c }))
55
56
  });
56
57
  }
57
- return (n, r) => {
58
- const g = L("FmSwitch"), f = L("FmTextField"), x = L("FmSelect");
59
- return o(), i("div", qe, [
60
- l("div", Ge, C($.value) + " Settings ", 1),
61
- l("div", Ye, [
62
- (o(!0), i(A, null, W(p.value, (a, D) => (o(), i("div", {
58
+ return (c, u) => {
59
+ const b = L("FmSwitch"), _ = L("FmTextField"), h = L("FmSelect");
60
+ return o(), r("div", Ke, [
61
+ l("div", qe, C(O.value) + " Settings ", 1),
62
+ l("div", Ge, [
63
+ (o(!0), r(E, null, Y(m.value, (a, $) => (o(), r("div", {
63
64
  key: a.key
64
65
  }, [
65
- a.type === "toggle" ? (o(), i("div", We, [
66
+ a.type === "toggle" ? (o(), r("div", Ye, [
66
67
  l("label", Je, C(a.label), 1),
67
- m(g, {
68
+ p(b, {
68
69
  "model-value": a.value,
69
- "onUpdate:modelValue": (d) => v(D, d)
70
+ "onUpdate:modelValue": (d) => f($, d)
70
71
  }, null, 8, ["model-value", "onUpdate:modelValue"])
71
- ])) : a.type === "text" ? (o(), O(f, {
72
+ ])) : a.type === "text" ? (o(), z(_, {
72
73
  key: 1,
73
74
  label: a.label,
74
75
  "model-value": a.value,
75
76
  placeholder: a.placeholder,
76
- "onUpdate:modelValue": (d) => v(D, d)
77
- }, null, 8, ["label", "model-value", "placeholder", "onUpdate:modelValue"])) : a.type === "textarea" ? (o(), i(A, { key: 2 }, [
78
- l("div", Qe, C(a.label), 1),
77
+ "onUpdate:modelValue": (d) => f($, d)
78
+ }, null, 8, ["label", "model-value", "placeholder", "onUpdate:modelValue"])) : a.type === "textarea" ? (o(), r(E, { key: 2 }, [
79
+ l("div", We, C(a.label), 1),
79
80
  l("textarea", {
80
81
  class: "w-full font-mono text-[13px] p-2 border border-gray-300 rounded resize-y box-border focus:outline-none focus:border-blue-600",
81
82
  value: a.value,
82
83
  rows: a.rows ?? 8,
83
84
  placeholder: a.placeholder,
84
- onInput: (d) => v(D, d.target.value)
85
- }, null, 40, Xe)
86
- ], 64)) : a.type === "select" ? (o(), O(x, {
85
+ onInput: (d) => f($, d.target.value)
86
+ }, null, 40, Qe)
87
+ ], 64)) : a.type === "select" ? (o(), z(h, {
87
88
  key: 3,
88
89
  label: a.label,
89
90
  "model-value": a.value,
90
91
  items: a.options || [],
91
92
  "item-label": "label",
92
93
  "item-value": "value",
93
- "onUpdate:modelValue": (d) => v(D, d)
94
- }, null, 8, ["label", "model-value", "items", "onUpdate:modelValue"])) : a.type === "number" ? (o(), O(f, {
94
+ "onUpdate:modelValue": (d) => f($, d)
95
+ }, null, 8, ["label", "model-value", "items", "onUpdate:modelValue"])) : a.type === "number" ? (o(), z(_, {
95
96
  key: 4,
96
97
  label: a.label,
97
98
  type: "number",
98
99
  "model-value": String(a.value),
99
- "onUpdate:modelValue": (d) => v(D, Number(d))
100
- }, null, 8, ["label", "model-value", "onUpdate:modelValue"])) : a.type === "color" ? (o(), i("div", Ze, [
101
- l("label", et, C(a.label), 1),
100
+ "onUpdate:modelValue": (d) => f($, Number(d))
101
+ }, null, 8, ["label", "model-value", "onUpdate:modelValue"])) : a.type === "color" ? (o(), r("div", Xe, [
102
+ l("label", Ze, C(a.label), 1),
102
103
  l("input", {
103
104
  type: "color",
104
105
  value: a.value,
105
106
  class: "color-input w-9 h-7 p-0 border border-gray-300 rounded cursor-pointer bg-transparent",
106
- onInput: (d) => v(D, d.target.value)
107
- }, null, 40, tt)
107
+ onInput: (d) => f($, d.target.value)
108
+ }, null, 40, et)
108
109
  ])) : Z("", !0)
109
110
  ]))), 128))
110
111
  ])
111
112
  ]);
112
113
  };
113
114
  }
114
- }), ot = /* @__PURE__ */ ze(lt, [["__scopeId", "data-v-840687bf"]]), at = { class: "h-full flex flex-col" }, st = { class: "flex-1 overflow-auto p-4 bg-gray-100" }, nt = /* @__PURE__ */ ee({
115
+ }), lt = /* @__PURE__ */ ze(tt, [["__scopeId", "data-v-840687bf"]]), ot = { class: "h-full flex flex-col" }, at = { class: "flex-1 overflow-auto p-4 bg-gray-100" }, st = /* @__PURE__ */ ee({
115
116
  __name: "TemplatePreview",
116
117
  props: {
117
118
  blocks: {},
@@ -119,21 +120,21 @@ const qe = { class: "p-3" }, Ge = { class: "text-sm font-semibold text-gray-700
119
120
  selectedBlockId: {},
120
121
  templateType: {}
121
122
  },
122
- setup(N) {
123
- const h = N, T = _(null);
124
- let k = null;
125
- function w() {
126
- return !k && T.value && (k = T.value.attachShadow({ mode: "open" })), k;
127
- }
128
- const p = E(() => h.previewData ?? Te(h.templateType));
129
- j(
130
- () => [h.blocks, p.value, T.value],
123
+ setup(H) {
124
+ const v = H, T = k(null);
125
+ let x = null;
126
+ function S() {
127
+ return !x && T.value && (x = T.value.attachShadow({ mode: "open" })), x;
128
+ }
129
+ const m = A(() => v.previewData ?? Te(v.templateType));
130
+ J(
131
+ () => [v.blocks, m.value, T.value],
131
132
  () => {
132
- const v = w();
133
- if (v) {
133
+ const f = S();
134
+ if (f) {
134
135
  try {
135
- const y = Se(h.blocks, p.value), n = $e(y);
136
- v.innerHTML = `
136
+ const g = Se(v.blocks, m.value), c = $e(g);
137
+ f.innerHTML = `
137
138
  <style>
138
139
  :host { display: block; }
139
140
  .preview-scale-wrapper {
@@ -155,30 +156,30 @@ const qe = { class: "p-3" }, Ge = { class: "text-sm font-semibold text-gray-700
155
156
  }
156
157
  </style>
157
158
  <div class="preview-scale-wrapper">
158
- <div class="preview-content">${n}</div>
159
+ <div class="preview-content">${c}</div>
159
160
  </div>
160
161
  `;
161
- } catch (y) {
162
- v.innerHTML = `<div style="color:red;padding:20px;">Error rendering template: ${y}</div>`;
162
+ } catch (g) {
163
+ f.innerHTML = `<div style="color:red;padding:20px;">Error rendering template: ${g}</div>`;
163
164
  }
164
- xe(() => $(h.selectedBlockId));
165
+ xe(() => O(v.selectedBlockId));
165
166
  }
166
167
  },
167
168
  { deep: !0, immediate: !0 }
168
- ), j(
169
- () => h.selectedBlockId,
170
- (v) => $(v)
169
+ ), J(
170
+ () => v.selectedBlockId,
171
+ (f) => O(f)
171
172
  );
172
- function $(v) {
173
- if (!k || (k.querySelectorAll("[data-block-id].highlight").forEach((n) => {
174
- n.classList.remove("highlight");
175
- }), !v)) return;
176
- const y = k.querySelector(`[data-block-id="${v}"]`);
177
- y && (y.classList.add("highlight"), y.scrollIntoView({ behavior: "smooth", block: "nearest" }));
178
- }
179
- return (v, y) => (o(), i("div", at, [
180
- y[0] || (y[0] = l("div", { class: "text-xs font-semibold text-gray-400 uppercase tracking-wider px-3 py-2 border-b border-gray-200" }, " Live Preview ", -1)),
181
- l("div", st, [
173
+ function O(f) {
174
+ if (!x || (x.querySelectorAll("[data-block-id].highlight").forEach((c) => {
175
+ c.classList.remove("highlight");
176
+ }), !f)) return;
177
+ const g = x.querySelector(`[data-block-id="${f}"]`);
178
+ g && (g.classList.add("highlight"), g.scrollIntoView({ behavior: "smooth", block: "nearest" }));
179
+ }
180
+ return (f, g) => (o(), r("div", ot, [
181
+ g[0] || (g[0] = l("div", { class: "text-xs font-semibold text-gray-400 uppercase tracking-wider px-3 py-2 border-b border-gray-200" }, " Live Preview ", -1)),
182
+ l("div", at, [
182
183
  l("div", {
183
184
  ref_key: "shadowHost",
184
185
  ref: T
@@ -186,47 +187,47 @@ const qe = { class: "p-3" }, Ge = { class: "text-sm font-semibold text-gray-700
186
187
  ])
187
188
  ]));
188
189
  }
189
- }), rt = { class: "flex items-center gap-2 text-base font-semibold" }, it = { key: 1 }, ut = { key: 2 }, ct = {
190
+ }), nt = { class: "flex items-center gap-2 text-base font-semibold" }, rt = { key: 1 }, it = { key: 2 }, ut = {
190
191
  key: 0,
191
192
  class: "p-6"
192
- }, dt = {
193
+ }, ct = {
193
194
  key: 0,
194
195
  class: "flex justify-center items-center h-40 text-gray-400"
195
- }, pt = {
196
+ }, dt = {
196
197
  key: 1,
197
198
  class: "grid grid-cols-2 gap-8"
198
- }, mt = ["onClick"], vt = { class: "flex items-center justify-center w-12 h-12 rounded-xl bg-gray-100 text-gray-500 group-hover:bg-blue-100 group-hover:text-blue-600 transition-colors" }, ft = { class: "text-center" }, yt = { class: "text-sm font-semibold text-gray-700 group-hover:text-blue-700" }, gt = { class: "text-xs text-gray-400 mt-1" }, bt = {
199
+ }, pt = ["onClick"], mt = { class: "flex items-center justify-center w-12 h-12 rounded-xl bg-gray-100 text-gray-500 group-hover:bg-blue-100 group-hover:text-blue-600 transition-colors" }, vt = { class: "text-center" }, ft = { class: "text-sm font-semibold text-gray-700 group-hover:text-blue-700" }, yt = { class: "text-xs text-gray-400 mt-1" }, gt = {
199
200
  key: 0,
200
201
  class: "absolute top-2.5 right-2.5 text-[10px] font-medium text-green-600 bg-green-50 border border-green-200 px-2 py-0.5 rounded-full"
201
- }, _t = {
202
+ }, bt = {
202
203
  key: 1,
203
204
  class: "absolute top-2.5 right-2.5 text-[10px] font-medium text-gray-400 bg-gray-100 px-2 py-0.5 rounded-full"
204
- }, xt = {
205
+ }, _t = {
205
206
  key: 1,
206
207
  class: "flex justify-center items-center h-[400px] text-gray-400"
207
- }, ht = {
208
+ }, xt = {
208
209
  key: 2,
209
210
  class: "flex h-[calc(100vh-120px)] border-t border-gray-200"
210
- }, kt = { class: "w-[280px] border-r border-gray-200 overflow-y-auto shrink-0" }, wt = { class: "px-3 pt-3 pb-2" }, Ft = { class: "flex flex-col" }, Tt = ["onClick"], St = { class: "border-y border-gray-100" }, $t = ["onDragstart", "onDragover", "onDrop", "onClick"], Dt = { class: "flex-1" }, Ct = { class: "flex gap-1 opacity-50 hover:opacity-100" }, Bt = {
211
+ }, ht = { class: "w-[280px] border-r border-gray-200 overflow-y-auto shrink-0" }, kt = { class: "px-3 pt-3 pb-2" }, wt = { class: "flex flex-col" }, Ft = ["onClick"], Tt = { class: "border-y border-gray-100" }, St = ["onDragstart", "onDragover", "onDrop", "onClick"], $t = { class: "flex-1" }, Ct = { class: "flex gap-1 opacity-50 hover:opacity-100" }, Dt = {
211
212
  key: 0,
212
213
  class: "py-6 px-4 text-center text-gray-400 text-[13px]"
213
- }, Vt = {
214
+ }, Bt = {
214
215
  key: 0,
215
216
  class: "border-t border-gray-200"
216
- }, It = {
217
+ }, Vt = {
217
218
  key: 1,
218
219
  class: "flex items-center justify-center text-gray-400 text-[13px] py-8"
219
- }, Pt = { class: "p-3 border-t border-gray-200" }, zt = { class: "flex-1 overflow-hidden" }, Ot = { class: "ml-auto flex gap-2" }, Et = { class: "p-4" }, Lt = { class: "flex items-center gap-1.5 mt-3 text-xs text-amber-600 bg-amber-50 border border-amber-200 rounded px-3 py-2" }, At = { class: "p-4" }, Nt = { class: "flex items-center gap-1.5 mt-3 text-xs text-amber-600 bg-amber-50 border border-amber-200 rounded px-3 py-2" }, Ut = /* @__PURE__ */ ee({
220
+ }, It = { class: "p-3 border-t border-gray-200" }, Pt = { class: "flex-1 overflow-hidden" }, zt = { class: "ml-auto flex gap-2" }, Ot = { class: "p-4" }, Lt = { class: "flex items-center gap-1.5 mt-3 text-xs text-amber-600 bg-amber-50 border border-amber-200 rounded px-3 py-2" }, Et = { class: "p-4" }, Ut = { class: "flex items-center gap-1.5 mt-3 text-xs text-amber-600 bg-amber-50 border border-amber-200 rounded px-3 py-2" }, At = /* @__PURE__ */ ee({
220
221
  __name: "PrintTemplateEditorDialog",
221
222
  props: {
222
223
  modelValue: { type: Boolean }
223
224
  },
224
225
  emits: ["update:modelValue", "saved"],
225
- setup(N, { emit: h }) {
226
- const T = N, k = h, w = De(), p = Pe(), $ = ye(), v = E({
226
+ setup(H, { emit: v }) {
227
+ const T = H, x = v, S = Ce(), m = Pe(), O = ye(), f = A({
227
228
  get: () => T.modelValue,
228
- set: (u) => k("update:modelValue", u)
229
- }), y = _(!1), n = _(!1), r = _(ae()), g = _(null), f = _(se.Enum.purchaseOrder), x = _("Purchase Order Template"), a = _(null), D = _(!1), d = _(!1), I = _("select-type"), J = [
229
+ set: (n) => x("update:modelValue", n)
230
+ }), g = k(!1), c = k(!1), u = k(ae()), b = k(null), _ = k(se.Enum.purchaseOrder), h = k("Purchase Order Template"), a = k(null), $ = k(!1), d = k(!1), V = k("select-type"), W = [
230
231
  {
231
232
  label: "Purchase Order",
232
233
  value: se.Enum.purchaseOrder,
@@ -251,25 +252,25 @@ const qe = { class: "p-3" }, Ge = { class: "text-sm font-semibold text-gray-700
251
252
  icon: "local_shipping",
252
253
  description: "Customize the layout for delivery order printouts"
253
254
  }
254
- ], K = _(/* @__PURE__ */ new Set()), Q = E(
255
- () => r.value.find((u) => u.id === g.value) ?? null
256
- ), U = _(null), H = _(null);
257
- j(v, async (u) => {
258
- if (u) {
259
- I.value = "select-type", y.value = !0;
255
+ ], j = k(/* @__PURE__ */ new Set()), Q = A(
256
+ () => u.value.find((n) => n.id === b.value) ?? null
257
+ ), U = k(null), N = k(null);
258
+ J(f, async (n) => {
259
+ if (n) {
260
+ V.value = "select-type", g.value = !0;
260
261
  try {
261
- const e = await w.browse();
262
- K.value = new Set(e.map((b) => b.type));
262
+ const e = await S.browse();
263
+ j.value = new Set(e.map((y) => y.type));
263
264
  } catch {
264
265
  } finally {
265
- y.value = !1;
266
+ g.value = !1;
266
267
  }
267
268
  }
268
- }), j(f, async () => {
269
- g.value = null, await le();
269
+ }), J(_, async () => {
270
+ b.value = null, await le();
270
271
  });
271
- async function ne(u) {
272
- f.value = u, await le(), I.value = "editor";
272
+ async function ne(n) {
273
+ _.value = n, await le(), V.value = "editor";
273
274
  }
274
275
  function te() {
275
276
  return {
@@ -277,329 +278,329 @@ const qe = { class: "p-3" }, Ge = { class: "text-sm font-semibold text-gray-700
277
278
  transferOrder: "Transfer Order Template",
278
279
  goodsReceivedNote: "Goods Received Note Template",
279
280
  deliveryOrder: "Delivery Order Template"
280
- }[f.value] ?? "Purchase Order Template";
281
+ }[_.value] ?? "Purchase Order Template";
281
282
  }
282
283
  async function le() {
283
- y.value = !0;
284
+ g.value = !0;
284
285
  try {
285
- const u = await w.browse();
286
- K.value = new Set(u.map((b) => b.type));
287
- const e = u.find((b) => b.type === f.value);
288
- e ? (a.value = e._id, x.value = e.name, r.value = e.blocks.map((b) => ({ ...b }))) : (a.value = null, r.value = ae(), x.value = te());
286
+ const n = await S.browse();
287
+ j.value = new Set(n.map((y) => y.type));
288
+ const e = n.find((y) => y.type === _.value);
289
+ e ? (a.value = e._id, h.value = e.name, u.value = e.blocks.map((y) => ({ ...y }))) : (a.value = null, u.value = ae(), h.value = te());
289
290
  } catch {
290
- r.value = ae(), x.value = te();
291
+ u.value = ae(), h.value = te();
291
292
  } finally {
292
- y.value = !1;
293
+ g.value = !1;
293
294
  }
294
295
  }
295
- function ce(u) {
296
+ function ce(n) {
296
297
  const e = {
297
298
  id: Be(),
298
- tag: u,
299
- config: Ce(u)
299
+ tag: n,
300
+ config: De(n)
300
301
  };
301
- r.value.push(e), g.value = e.id;
302
+ u.value.push(e), b.value = e.id;
302
303
  }
303
- function de(u) {
304
- const e = r.value.findIndex((b) => b.id === u);
305
- e >= 0 && (r.value.splice(e, 1), g.value === u && (g.value = null));
304
+ function de(n) {
305
+ const e = u.value.findIndex((y) => y.id === n);
306
+ e >= 0 && (u.value.splice(e, 1), b.value === n && (b.value = null));
306
307
  }
307
- function re(u) {
308
- const e = r.value.find((b) => b.id === g.value);
308
+ function re(n) {
309
+ const e = u.value.find((y) => y.id === b.value);
309
310
  if (e) {
310
- const b = u.configFields || [], oe = be(e.tag);
311
- e.config = { configFields: b, templateHtml: oe };
311
+ const y = n.configFields || [], oe = be(e.tag);
312
+ e.config = { configFields: y, templateHtml: oe };
312
313
  }
313
314
  }
314
- function pe(u) {
315
- U.value = u;
315
+ function pe(n) {
316
+ U.value = n;
316
317
  }
317
- function me(u, e) {
318
- u.preventDefault(), H.value = e;
318
+ function me(n, e) {
319
+ n.preventDefault(), N.value = e;
319
320
  }
320
321
  function ve() {
321
- H.value = null;
322
+ N.value = null;
322
323
  }
323
- function fe(u) {
324
- if (U.value === null || U.value === u) {
325
- U.value = null, H.value = null;
324
+ function fe(n) {
325
+ if (U.value === null || U.value === n) {
326
+ U.value = null, N.value = null;
326
327
  return;
327
328
  }
328
- const e = r.value.splice(U.value, 1)[0];
329
- r.value.splice(u, 0, e), U.value = null, H.value = null;
329
+ const e = u.value.splice(U.value, 1)[0];
330
+ u.value.splice(n, 0, e), U.value = null, N.value = null;
330
331
  }
331
332
  function t() {
332
- U.value = null, H.value = null;
333
+ U.value = null, N.value = null;
333
334
  }
334
335
  async function s() {
335
- var u;
336
- n.value = !0;
336
+ var n;
337
+ c.value = !0;
337
338
  try {
338
- const e = (u = $.currentBusiness.value) == null ? void 0 : u._id;
339
+ const e = (n = O.currentBusiness.value) == null ? void 0 : n._id;
339
340
  if (!e)
340
341
  throw new Error("Business ID is missing. Please select a business first.");
341
- const b = r.value.map((c) => {
342
+ const y = u.value.map((i) => {
342
343
  var ge;
343
- const P = ((ge = c.config) == null ? void 0 : ge.configFields) || [], G = be(c.tag, P);
344
+ const I = ((ge = i.config) == null ? void 0 : ge.configFields) || [], q = be(i.tag, I);
344
345
  return {
345
- ...c,
346
- config: { configFields: P, templateHtml: G }
346
+ ...i,
347
+ config: { configFields: I, templateHtml: q }
347
348
  };
348
- }), oe = Ve(b), M = {
349
- name: x.value,
350
- type: f.value,
349
+ }), oe = Ve(y), M = {
350
+ name: h.value,
351
+ type: _.value,
351
352
  blocks: oe,
352
353
  businessId: e,
353
354
  createdAt: (/* @__PURE__ */ new Date()).toISOString(),
354
355
  updatedAt: (/* @__PURE__ */ new Date()).toISOString()
355
356
  };
356
357
  let R;
357
- a.value ? R = await w.update(a.value, {
358
+ a.value ? R = await S.update(a.value, {
358
359
  _id: a.value,
359
360
  ...M
360
- }) : (R = await w.create(M), a.value = R._id), K.value.add(f.value), d.value = !1, p == null || p.open({
361
+ }) : (R = await S.create(M), a.value = R._id), j.value.add(_.value), d.value = !1, m == null || m.open({
361
362
  title: "Success",
362
363
  message: "Print template saved",
363
364
  type: "success"
364
- }), k("saved", R), v.value = !1;
365
+ }), x("saved", R), f.value = !1;
365
366
  } catch (e) {
366
- p == null || p.open({
367
+ m == null || m.open({
367
368
  title: "Error",
368
369
  message: (e == null ? void 0 : e.message) || "Failed to save template",
369
370
  type: "error"
370
371
  });
371
372
  } finally {
372
- n.value = !1;
373
+ c.value = !1;
373
374
  }
374
375
  }
375
- async function B() {
376
+ async function D() {
376
377
  if (a.value) {
377
- n.value = !0;
378
+ c.value = !0;
378
379
  try {
379
- await w.delete(a.value), a.value = null, r.value = ae(), x.value = te(), K.value.delete(f.value), D.value = !1, p == null || p.open({
380
+ await S.delete(a.value), a.value = null, u.value = ae(), h.value = te(), j.value.delete(_.value), $.value = !1, m == null || m.open({
380
381
  title: "Deleted",
381
382
  message: "Print template deleted. Default layout will be used.",
382
383
  type: "success"
383
- }), k("saved", null), v.value = !1;
384
- } catch (u) {
385
- p == null || p.open({
384
+ }), x("saved", null), f.value = !1;
385
+ } catch (n) {
386
+ m == null || m.open({
386
387
  title: "Error",
387
- message: (u == null ? void 0 : u.message) || "Failed to delete template",
388
+ message: (n == null ? void 0 : n.message) || "Failed to delete template",
388
389
  type: "error"
389
390
  });
390
391
  } finally {
391
- n.value = !1;
392
+ c.value = !1;
392
393
  }
393
394
  }
394
395
  }
395
- function q() {
396
- r.value = ae(), g.value = null;
396
+ function K() {
397
+ u.value = ae(), b.value = null;
397
398
  }
398
- function F(u) {
399
+ function F(n) {
399
400
  var e;
400
- return ((e = Y[u]) == null ? void 0 : e.label) ?? u;
401
+ return ((e = G[n]) == null ? void 0 : e.label) ?? n;
401
402
  }
402
- function ie(u) {
403
+ function ie(n) {
403
404
  var e;
404
- return ((e = Y[u]) == null ? void 0 : e.icon) ?? "widgets";
405
- }
406
- return (u, e) => {
407
- const b = L("FmIcon"), oe = L("FmTextField"), M = L("FmButton"), R = L("FmDialog");
408
- return o(), i(A, null, [
409
- m(R, {
410
- modelValue: v.value,
411
- "onUpdate:modelValue": e[4] || (e[4] = (c) => v.value = c),
405
+ return ((e = G[n]) == null ? void 0 : e.icon) ?? "widgets";
406
+ }
407
+ return (n, e) => {
408
+ const y = L("FmIcon"), oe = L("FmTextField"), M = L("FmButton"), R = L("FmDialog");
409
+ return o(), r(E, null, [
410
+ p(R, {
411
+ modelValue: f.value,
412
+ "onUpdate:modelValue": e[4] || (e[4] = (i) => f.value = i),
412
413
  overlay: !0,
413
414
  "close-button": "",
414
415
  "max-width": "98vw",
415
416
  "max-height": "98vh"
416
417
  }, he({
417
- "dialog-header": z(() => {
418
- var c;
418
+ "dialog-header": P(() => {
419
+ var i;
419
420
  return [
420
- l("div", rt, [
421
- I.value === "editor" ? (o(), i("button", {
421
+ l("div", nt, [
422
+ V.value === "editor" ? (o(), r("button", {
422
423
  key: 0,
423
424
  class: "flex items-center justify-center w-7 h-7 rounded hover:bg-gray-100 transition-colors text-gray-500",
424
- onClick: e[0] || (e[0] = (P) => I.value = "select-type")
425
+ onClick: e[0] || (e[0] = (I) => V.value = "select-type")
425
426
  }, [
426
- m(b, {
427
+ p(y, {
427
428
  name: "arrow_back",
428
429
  size: "sm"
429
430
  })
430
431
  ])) : Z("", !0),
431
- I.value === "select-type" ? (o(), i("span", it, "Print Template Editor")) : (o(), i("span", ut, C((c = J.find((P) => P.value === f.value)) == null ? void 0 : c.label) + " Template", 1))
432
+ V.value === "select-type" ? (o(), r("span", rt, "Print Template Editor")) : (o(), r("span", it, C((i = W.find((I) => I.value === _.value)) == null ? void 0 : i.label) + " Template", 1))
432
433
  ])
433
434
  ];
434
435
  }),
435
- default: z(() => [
436
- I.value === "select-type" ? (o(), i("div", ct, [
436
+ default: P(() => [
437
+ V.value === "select-type" ? (o(), r("div", ut, [
437
438
  e[7] || (e[7] = l("p", { class: "text-sm text-gray-500 mb-5" }, " Select a template type to customize its print layout. ", -1)),
438
- y.value ? (o(), i("div", dt, " Loading... ")) : (o(), i("div", pt, [
439
- (o(), i(A, null, W(J, (c) => l("div", {
440
- key: c.value,
439
+ g.value ? (o(), r("div", ct, " Loading... ")) : (o(), r("div", dt, [
440
+ (o(), r(E, null, Y(W, (i) => l("div", {
441
+ key: i.value,
441
442
  class: ue(["group relative flex flex-col items-center gap-3 p-6 rounded-xl border-2 border-gray-200 cursor-pointer transition-all hover:border-blue-400 hover:shadow-md", {
442
- "border-blue-500 bg-blue-50/50 shadow-md": f.value === c.value && I.value === "select-type"
443
+ "border-blue-500 bg-blue-50/50 shadow-md": _.value === i.value && V.value === "select-type"
443
444
  }]),
444
- onClick: (P) => ne(c.value)
445
+ onClick: (I) => ne(i.value)
445
446
  }, [
446
- l("div", vt, [
447
- m(b, {
448
- name: c.icon,
447
+ l("div", mt, [
448
+ p(y, {
449
+ name: i.icon,
449
450
  size: "sm"
450
451
  }, null, 8, ["name"])
451
452
  ]),
452
- l("div", ft, [
453
- l("div", yt, C(c.label), 1),
454
- l("div", gt, C(c.description), 1)
453
+ l("div", vt, [
454
+ l("div", ft, C(i.label), 1),
455
+ l("div", yt, C(i.description), 1)
455
456
  ]),
456
- K.value.has(c.value) ? (o(), i("span", bt, "Customized")) : (o(), i("span", _t, "Default"))
457
- ], 10, mt)), 64))
457
+ j.value.has(i.value) ? (o(), r("span", gt, "Customized")) : (o(), r("span", bt, "Default"))
458
+ ], 10, pt)), 64))
458
459
  ]))
459
- ])) : y.value ? (o(), i("div", xt, e[8] || (e[8] = [
460
+ ])) : g.value ? (o(), r("div", _t, e[8] || (e[8] = [
460
461
  l("div", null, "Loading template...", -1)
461
- ]))) : (o(), i("div", ht, [
462
- l("div", kt, [
463
- l("div", wt, [
464
- m(oe, {
465
- modelValue: x.value,
466
- "onUpdate:modelValue": e[1] || (e[1] = (c) => x.value = c),
462
+ ]))) : (o(), r("div", xt, [
463
+ l("div", ht, [
464
+ l("div", kt, [
465
+ p(oe, {
466
+ modelValue: h.value,
467
+ "onUpdate:modelValue": e[1] || (e[1] = (i) => h.value = i),
467
468
  placeholder: "Template name",
468
469
  label: "Template Name"
469
470
  }, null, 8, ["modelValue"])
470
471
  ]),
471
472
  e[9] || (e[9] = l("div", { class: "text-xs font-semibold text-gray-400 uppercase tracking-wider px-3 py-2" }, " Add Blocks ", -1)),
472
- l("div", Ft, [
473
- (o(!0), i(A, null, W(S(Oe).Values, (c) => (o(), i("div", {
474
- key: c,
473
+ l("div", wt, [
474
+ (o(!0), r(E, null, Y(w(Oe).Values, (i) => (o(), r("div", {
475
+ key: i,
475
476
  class: "group flex items-center gap-2 px-3 py-2 cursor-pointer text-[13px] text-gray-600 transition-colors hover:bg-gray-100",
476
- onClick: (P) => ce(c)
477
+ onClick: (I) => ce(i)
477
478
  }, [
478
- m(b, {
479
- name: S(Y)[c].icon,
479
+ p(y, {
480
+ name: w(G)[i].icon,
480
481
  size: "sm"
481
482
  }, null, 8, ["name"]),
482
- l("span", null, C(S(Y)[c].label), 1),
483
- m(b, {
483
+ l("span", null, C(w(G)[i].label), 1),
484
+ p(y, {
484
485
  name: "add",
485
486
  size: "sm",
486
487
  class: "ml-auto opacity-0 text-blue-600 group-hover:opacity-100"
487
488
  })
488
- ], 8, Tt))), 128))
489
+ ], 8, Ft))), 128))
489
490
  ]),
490
491
  e[10] || (e[10] = l("div", { class: "text-xs font-semibold text-gray-400 uppercase tracking-wider px-3 py-2 mt-2" }, " Block Order ", -1)),
491
- l("div", St, [
492
- (o(!0), i(A, null, W(r.value, (c, P) => (o(), i("div", {
493
- key: c.id,
492
+ l("div", Tt, [
493
+ (o(!0), r(E, null, Y(u.value, (i, I) => (o(), r("div", {
494
+ key: i.id,
494
495
  class: ue(["flex items-center gap-2 px-3 py-2 cursor-pointer text-[13px] text-gray-600 border-b border-gray-100 transition-colors hover:bg-gray-100", {
495
- "bg-blue-50 border-l-[3px] border-l-blue-600": c.id === g.value,
496
- "border-t-2 border-t-blue-600": H.value === P
496
+ "bg-blue-50 border-l-[3px] border-l-blue-600": i.id === b.value,
497
+ "border-t-2 border-t-blue-600": N.value === I
497
498
  }]),
498
499
  draggable: "true",
499
- onDragstart: (G) => pe(P),
500
- onDragover: (G) => me(G, P),
500
+ onDragstart: (q) => pe(I),
501
+ onDragover: (q) => me(q, I),
501
502
  onDragleave: ve,
502
- onDrop: (G) => fe(P),
503
+ onDrop: (q) => fe(I),
503
504
  onDragend: t,
504
- onClick: (G) => g.value = c.id
505
+ onClick: (q) => b.value = i.id
505
506
  }, [
506
- m(b, {
507
+ p(y, {
507
508
  name: "drag_indicator",
508
509
  size: "sm",
509
510
  class: "cursor-grab text-gray-300"
510
511
  }),
511
- m(b, {
512
- name: ie(c.tag),
512
+ p(y, {
513
+ name: ie(i.tag),
513
514
  size: "sm"
514
515
  }, null, 8, ["name"]),
515
- l("span", Dt, C(F(c.tag)), 1),
516
+ l("span", $t, C(F(i.tag)), 1),
516
517
  l("div", Ct, [
517
- m(b, {
518
+ p(y, {
518
519
  name: "delete",
519
520
  size: "sm",
520
521
  class: "cursor-pointer text-gray-400 hover:text-red-500",
521
- onClick: ke((G) => de(c.id), ["stop"])
522
+ onClick: ke((q) => de(i.id), ["stop"])
522
523
  }, null, 8, ["onClick"])
523
524
  ])
524
- ], 42, $t))), 128)),
525
- r.value.length === 0 ? (o(), i("div", Bt, " Click a block above to add it ")) : Z("", !0)
525
+ ], 42, St))), 128)),
526
+ u.value.length === 0 ? (o(), r("div", Dt, " Click a block above to add it ")) : Z("", !0)
526
527
  ]),
527
- Q.value ? (o(), i("div", Vt, [
528
- (o(), O(ot, {
528
+ Q.value ? (o(), r("div", Bt, [
529
+ (o(), z(lt, {
529
530
  key: Q.value.id,
530
531
  block: Q.value,
531
532
  onUpdate: re
532
533
  }, null, 8, ["block"]))
533
- ])) : (o(), i("div", It, " Select a block to configure it ")),
534
- l("div", Pt, [
535
- m(M, {
534
+ ])) : (o(), r("div", Vt, " Select a block to configure it ")),
535
+ l("div", It, [
536
+ p(M, {
536
537
  label: "Reset to Default",
537
538
  variant: "plain",
538
539
  size: "md",
539
- onClick: q
540
+ onClick: K
540
541
  })
541
542
  ])
542
543
  ]),
543
- l("div", zt, [
544
- m(nt, {
545
- blocks: r.value,
546
- "selected-block-id": g.value,
547
- "template-type": f.value
544
+ l("div", Pt, [
545
+ p(st, {
546
+ blocks: u.value,
547
+ "selected-block-id": b.value,
548
+ "template-type": _.value
548
549
  }, null, 8, ["blocks", "selected-block-id", "template-type"])
549
550
  ])
550
551
  ]))
551
552
  ]),
552
553
  _: 2
553
554
  }, [
554
- I.value === "editor" ? {
555
+ V.value === "editor" ? {
555
556
  name: "dialog-footer",
556
- fn: z(() => [
557
- l("div", Ot, [
558
- a.value ? (o(), O(M, {
557
+ fn: P(() => [
558
+ l("div", zt, [
559
+ a.value ? (o(), z(M, {
559
560
  key: 0,
560
561
  label: "Delete Template",
561
562
  variant: "destructive",
562
563
  size: "md",
563
- onClick: e[2] || (e[2] = (c) => D.value = !0)
564
+ onClick: e[2] || (e[2] = (i) => $.value = !0)
564
565
  })) : Z("", !0),
565
- m(M, {
566
+ p(M, {
566
567
  label: "Save Template",
567
568
  variant: "primary",
568
569
  size: "md",
569
- onClick: e[3] || (e[3] = (c) => d.value = !0)
570
+ onClick: e[3] || (e[3] = (i) => d.value = !0)
570
571
  })
571
572
  ])
572
573
  ]),
573
574
  key: "0"
574
575
  } : void 0
575
576
  ]), 1032, ["modelValue"]),
576
- m(R, {
577
+ p(R, {
577
578
  modelValue: d.value,
578
- "onUpdate:modelValue": e[5] || (e[5] = (c) => d.value = c),
579
+ "onUpdate:modelValue": e[5] || (e[5] = (i) => d.value = i),
579
580
  overlay: !0,
580
581
  dismissAway: !0,
581
582
  "close-button": "",
582
583
  "max-width": "400px"
583
584
  }, {
584
- "dialog-header": z(() => e[11] || (e[11] = [
585
+ "dialog-header": P(() => e[11] || (e[11] = [
585
586
  l("span", null, "Save Print Template?", -1)
586
587
  ])),
587
- "dialog-footer": z(() => [
588
- m(M, {
588
+ "dialog-footer": P(() => [
589
+ p(M, {
589
590
  class: "ml-auto",
590
591
  label: "Save",
591
592
  variant: "primary",
592
593
  size: "md",
593
- loading: n.value,
594
+ loading: c.value,
594
595
  onClick: s
595
596
  }, null, 8, ["loading"])
596
597
  ]),
597
- default: z(() => [
598
- l("div", Et, [
598
+ default: P(() => [
599
+ l("div", Ot, [
599
600
  e[13] || (e[13] = l("p", null, "Are you sure you want to save this print template?", -1)),
600
601
  e[14] || (e[14] = l("p", { class: "text-gray-500 text-sm mt-2" }, " This template will be used for all future prints of this type. ", -1)),
601
602
  l("div", Lt, [
602
- m(b, {
603
+ p(y, {
603
604
  name: "warning",
604
605
  size: "sm"
605
606
  }),
@@ -609,33 +610,33 @@ const qe = { class: "p-3" }, Ge = { class: "text-sm font-semibold text-gray-700
609
610
  ]),
610
611
  _: 1
611
612
  }, 8, ["modelValue"]),
612
- m(R, {
613
- modelValue: D.value,
614
- "onUpdate:modelValue": e[6] || (e[6] = (c) => D.value = c),
613
+ p(R, {
614
+ modelValue: $.value,
615
+ "onUpdate:modelValue": e[6] || (e[6] = (i) => $.value = i),
615
616
  overlay: !0,
616
617
  dismissAway: !0,
617
618
  "close-button": "",
618
619
  "max-width": "400px"
619
620
  }, {
620
- "dialog-header": z(() => e[15] || (e[15] = [
621
+ "dialog-header": P(() => e[15] || (e[15] = [
621
622
  l("span", null, "Delete Print Template?", -1)
622
623
  ])),
623
- "dialog-footer": z(() => [
624
- m(M, {
624
+ "dialog-footer": P(() => [
625
+ p(M, {
625
626
  class: "ml-auto",
626
627
  label: "Delete",
627
628
  variant: "destructive",
628
629
  size: "md",
629
- loading: n.value,
630
- onClick: B
630
+ loading: c.value,
631
+ onClick: D
631
632
  }, null, 8, ["loading"])
632
633
  ]),
633
- default: z(() => [
634
- l("div", At, [
634
+ default: P(() => [
635
+ l("div", Et, [
635
636
  e[17] || (e[17] = l("p", null, "Are you sure you want to delete this print template?", -1)),
636
637
  e[18] || (e[18] = l("p", { class: "text-gray-500 text-sm mt-2" }, " The default print layout will be used for all future prints. ", -1)),
637
- l("div", Nt, [
638
- m(b, {
638
+ l("div", Ut, [
639
+ p(y, {
639
640
  name: "warning",
640
641
  size: "sm"
641
642
  }),
@@ -648,65 +649,34 @@ const qe = { class: "p-3" }, Ge = { class: "text-sm font-semibold text-gray-700
648
649
  ], 64);
649
650
  };
650
651
  }
651
- }), Ht = { class: "flex flex-wrap items-center gap-8 border-b border-fm-color-neutral-gray-200 pb-16" }, Mt = {
652
+ }), Ht = { class: "flex flex-wrap items-center gap-8 border-b border-fm-color-neutral-gray-200 pb-16" }, Nt = {
652
653
  key: 0,
653
- class: "text-fm-color-typo-secondary"
654
- }, Rt = {
654
+ class: "text-fm-color-typo-error"
655
+ }, Mt = {
655
656
  key: 1,
656
657
  class: "text-fm-color-typo-secondary"
657
- }, jt = {
658
- key: 2,
659
- class: "text-fm-color-typo-error"
660
- }, Kt = {
661
- key: 4,
658
+ }, Rt = {
659
+ key: 3,
662
660
  class: "fm-typo-en-body-md-600"
663
- }, qt = {
664
- key: 5,
665
- class: "text-fm-color-typo-secondary"
666
- }, Gt = /* @__PURE__ */ ee({
661
+ }, jt = /* @__PURE__ */ ee({
667
662
  __name: "PlanLicenseDisplay",
668
- props: {
669
- scopeDbName: {}
670
- },
671
- setup(N) {
672
- const h = N, T = _e(), k = Le(), w = E(() => T.locationByDbName[h.scopeDbName ?? ""]), p = E(() => {
673
- var r;
674
- const n = (r = w.value) == null ? void 0 : r.doc;
675
- return n ? n.id || n._id : void 0;
676
- }), $ = _(null), v = _(!1), y = _(!1);
677
- return j(
678
- p,
679
- async (n, r, g) => {
680
- if ($.value = null, y.value = !1, !n) return;
681
- let f = !1;
682
- g(() => {
683
- f = !0;
684
- }), v.value = !0;
685
- try {
686
- const x = await k.getInventoryPlan(n);
687
- f || ($.value = x);
688
- } catch {
689
- f || (y.value = !0);
690
- } finally {
691
- f || (v.value = !1);
692
- }
693
- },
694
- { immediate: !0 }
695
- ), (n, r) => (o(), i("div", Ht, [
696
- r[0] || (r[0] = l("span", { class: "fm-typo-en-body-md-600" }, "Inventory plan", -1)),
697
- w.value ? v.value ? (o(), i("span", Rt, "Loading…")) : y.value ? (o(), i("span", jt, "Could not load plan")) : $.value === "Premium" ? (o(), O(je, {
698
- key: 3,
663
+ setup(H) {
664
+ const v = _e();
665
+ return (T, x) => (o(), r("div", Ht, [
666
+ x[0] || (x[0] = l("span", { class: "fm-typo-en-body-md-600" }, "Inventory plan", -1)),
667
+ w(v).loadState.status === "error" ? (o(), r("span", Nt, "Could not load plan")) : w(v).isLoaded ? w(v).premium ? (o(), z(Re, {
668
+ key: 2,
699
669
  tier: "premium"
700
- })) : $.value === "Standard" ? (o(), i("span", Kt, "Standard")) : (o(), i("span", qt, "No plan assigned")) : (o(), i("span", Mt, "Select a location to view its plan"))
670
+ })) : (o(), r("span", Rt, "Standard")) : (o(), r("span", Mt, "Loading…"))
701
671
  ]));
702
672
  }
703
- }), Yt = { class: "flex min-h-0 w-full flex-col gap-12" }, Wt = { class: "flex w-full flex-wrap items-center gap-8" }, Jt = /* @__PURE__ */ ee({
673
+ }), Kt = { class: "flex min-h-0 w-full flex-col gap-12" }, qt = { class: "flex w-full flex-wrap items-center gap-8" }, Gt = /* @__PURE__ */ ee({
704
674
  __name: "FeatureFlagView",
705
- setup(N) {
706
- const h = Ue(), T = _e(), k = ye(), w = Ae(), p = X.FmSwitch, $ = X.FmTable, v = X.FmMenu, y = X.FmMenuDivider, n = X.FmMenuHeader, r = X.FmMenuItem, g = /* @__PURE__ */ new Set(), f = {
675
+ setup(H) {
676
+ const v = _e(), T = Le(), x = ye(), S = Ue(), m = X.FmSwitch, O = X.FmTable, f = X.FmMenu, g = X.FmMenuDivider, c = X.FmMenuHeader, u = X.FmMenuItem, b = /* @__PURE__ */ new Set(), _ = {
707
677
  inventory_pos_closing_v1: "Use v2: Closing Draft and Closing Template.",
708
678
  inventory_pos_convert_v1: "Use Production Item instead."
709
- }, x = _([]), a = _(null), D = ["In use", "Deprecate Soon", "Deprecated"], d = _(null), I = _({}), J = _(!1), K = {
679
+ }, h = k([]), a = k(null), $ = ["In use", "Deprecate Soon", "Deprecated"], d = k(null), V = k({}), W = k(!1), j = {
710
680
  inventory_netsuite_inventory_transfer_out: ["netsuite"],
711
681
  inventory_portal_accept_require_fulfillment: ["mobile"],
712
682
  inventory_portal_must_use_transfer_template: ["mobile"],
@@ -722,64 +692,67 @@ const qe = { class: "p-3" }, Ge = { class: "text-sm font-semibold text-gray-700
722
692
  inventory_pos_stock_return: ["mobile"],
723
693
  inventory_pos_transfer_require_fulfillment: ["mobile", "pos-v7", "pos-7.8"],
724
694
  inventory_purchase_order_approval: ["mobile"]
725
- }, Q = E(
726
- () => Object.values(Ne).map((t) => {
727
- const s = h.flags.find((B) => B.name === t);
695
+ }, Q = A(
696
+ () => Object.values(Ae).map((t) => {
697
+ const s = v.flags.find((D) => D.name === t);
728
698
  return {
729
699
  name: t,
730
700
  enabled: (s == null ? void 0 : s.enabled) ?? null,
731
- domains: ["portal", ...K[t] ?? []],
732
- features: Ke(t)
701
+ domains: ["portal", ...j[t] ?? []],
702
+ features: je(t)
733
703
  };
734
704
  })
735
- ), U = E(
705
+ ), U = A(
736
706
  () => [...new Set(Q.value.flatMap((t) => t.domains))].sort()
737
- ), H = E(
707
+ ), N = A(
738
708
  () => Q.value.filter(
739
- (t) => (x.value.length === 0 || x.value.some((s) => t.domains.includes(s))) && (!a.value || re(t) === a.value)
709
+ (t) => (h.value.length === 0 || h.value.some((s) => t.domains.includes(s))) && (!a.value || re(t) === a.value)
740
710
  )
741
711
  );
742
712
  function ne(t) {
743
- x.value = x.value.includes(t) ? x.value.filter((s) => s !== t) : [...x.value, t];
713
+ h.value = h.value.includes(t) ? h.value.filter((s) => s !== t) : [...h.value, t];
744
714
  }
745
715
  function te() {
746
- x.value = [], a.value = null;
716
+ h.value = [], a.value = null;
747
717
  }
748
718
  function le(t) {
749
719
  return t.domains.includes("mobile") || t.domains.some((s) => s.startsWith("pos-"));
750
720
  }
751
721
  function ce(t) {
752
- return d.value && le(t) ? I.value[t.name] === !0 : t.enabled === !0;
722
+ return d.value && le(t) ? V.value[t.name] === !0 : t.enabled === !0;
753
723
  }
754
724
  async function de(t) {
755
725
  if (!t) {
756
- I.value = {};
726
+ V.value = {};
757
727
  return;
758
728
  }
759
729
  const s = t;
760
- J.value = !0;
730
+ W.value = !0;
761
731
  try {
762
- const { flags: B } = await w.listForScope(s);
763
- d.value === s && (I.value = Object.fromEntries(B.map((q) => [q.name, q.enabled])));
764
- } catch (B) {
765
- console.error("Unable to load feature flags for the selected scope", B), d.value === s && (I.value = {});
732
+ const [{ flags: D }] = await Promise.all([
733
+ S.listForScope(s),
734
+ v.retryLoad()
735
+ ]);
736
+ d.value === s && (V.value = Object.fromEntries(D.map((K) => [K.name, K.enabled])));
737
+ } catch (D) {
738
+ console.error("Unable to load feature flags for the selected scope", D), d.value === s && (V.value = {});
766
739
  } finally {
767
- d.value === s && (J.value = !1);
740
+ d.value === s && (W.value = !1);
768
741
  }
769
742
  }
770
- j(
743
+ J(
771
744
  () => {
772
745
  var t;
773
- return (t = k.currentBusiness.value) != null && t._id ? `business_${k.currentBusiness.value._id}` : null;
746
+ return (t = x.currentBusiness.value) != null && t._id ? `business_${x.currentBusiness.value._id}` : null;
774
747
  },
775
748
  (t) => {
776
749
  var s;
777
750
  d.value || (d.value = ((s = T._currentLocation) == null ? void 0 : s.dbName) ?? t);
778
751
  },
779
752
  { immediate: !0 }
780
- ), j(d, de, { immediate: !0 });
753
+ ), J(d, de, { immediate: !0 });
781
754
  function re(t) {
782
- return g.has(t.name) ? "Deprecated" : f[t.name] ? "Deprecate Soon" : "In use";
755
+ return b.has(t.name) ? "Deprecated" : _[t.name] ? "Deprecate Soon" : "In use";
783
756
  }
784
757
  function pe(t) {
785
758
  return t === "Deprecated" ? "bg-red-50 text-red-700" : t === "Deprecate Soon" ? "bg-fm-color-state-warning-subtle text-fm-color-state-warning-base" : "bg-green-50 text-green-700";
@@ -788,17 +761,17 @@ const qe = { class: "p-3" }, Ge = { class: "text-sm font-semibold text-gray-700
788
761
  return t.features.length === 0 ? ["Controls the availability of this inventory feature."] : t.features.length === 1 ? [t.features[0].controls] : t.features.map((s) => `${s.label}: ${s.controls}`);
789
762
  }
790
763
  function ve(t) {
791
- return g.has(t.name) ? "This flag is deprecated. Use its supported replacement for new work." : f[t.name];
764
+ return b.has(t.name) ? "This flag is deprecated. Use its supported replacement for new work." : _[t.name];
792
765
  }
793
- const fe = E(() => [
766
+ const fe = A(() => [
794
767
  {
795
768
  accessorKey: "name",
796
769
  header: "Feature flag",
797
770
  meta: { width: "27%" },
798
- cell: ({ row: t }) => V("div", { class: "flex flex-wrap items-center gap-2" }, [
799
- V("span", { class: "break-all font-mono text-xs text-gray-700" }, t.original.name),
771
+ cell: ({ row: t }) => B("div", { class: "flex flex-wrap items-center gap-2" }, [
772
+ B("span", { class: "break-all font-mono text-xs text-gray-700" }, t.original.name),
800
773
  ...t.original.features.slice(0, 1).map(
801
- (s) => V(He, {
774
+ (s) => B(He, {
802
775
  tier: s.category === "premium" ? "premium" : "standard",
803
776
  category: s.category,
804
777
  deprecateSoon: s.deprecateSoon,
@@ -811,11 +784,11 @@ const qe = { class: "p-3" }, Ge = { class: "text-sm font-semibold text-gray-700
811
784
  id: "domains",
812
785
  header: "Domains",
813
786
  meta: { width: "19%" },
814
- cell: ({ row: t }) => V(
787
+ cell: ({ row: t }) => B(
815
788
  "div",
816
789
  { class: "flex flex-wrap gap-2" },
817
790
  t.original.domains.map(
818
- (s) => V(
791
+ (s) => B(
819
792
  "span",
820
793
  {
821
794
  class: "rounded-full bg-fm-color-neutral-gray-100 px-2 py-0.5 text-xs font-medium text-fm-color-typo-secondary"
@@ -831,11 +804,11 @@ const qe = { class: "p-3" }, Ge = { class: "text-sm font-semibold text-gray-700
831
804
  meta: { width: "29%" },
832
805
  cell: ({ row: t }) => {
833
806
  const s = ve(t.original);
834
- return V("div", { class: "flex flex-col gap-2 text-xs" }, [
807
+ return B("div", { class: "flex flex-col gap-2 text-xs" }, [
835
808
  ...me(t.original).map(
836
- (B) => V("span", { class: "text-fm-color-typo-secondary" }, B)
809
+ (D) => B("span", { class: "text-fm-color-typo-secondary" }, D)
837
810
  ),
838
- ...s ? [V("span", { class: "text-fm-color-state-warning-base" }, s)] : []
811
+ ...s ? [B("span", { class: "text-fm-color-state-warning-base" }, s)] : []
839
812
  ]);
840
813
  }
841
814
  },
@@ -845,7 +818,7 @@ const qe = { class: "p-3" }, Ge = { class: "text-sm font-semibold text-gray-700
845
818
  meta: { width: "13%" },
846
819
  cell: ({ row: t }) => {
847
820
  const s = re(t.original);
848
- return s === "Deprecate Soon" ? V(Me) : V(
821
+ return s === "Deprecate Soon" ? B(Ne) : B(
849
822
  "span",
850
823
  {
851
824
  class: `inline-flex rounded-full px-2 py-0.5 text-xs font-medium ${pe(s)}`
@@ -860,63 +833,63 @@ const qe = { class: "p-3" }, Ge = { class: "text-sm font-semibold text-gray-700
860
833
  meta: { width: "12%" },
861
834
  cell: ({ row: t }) => {
862
835
  const s = !!d.value && le(t.original);
863
- return V("div", { class: "flex flex-col items-end gap-2" }, [
864
- V(p, { modelValue: ce(t.original), disabled: !0, showIcon: !0 }),
865
- ...s && J.value ? [V("span", { class: "text-xs text-gray-500" }, "Loading location value…")] : [],
866
- ...t.original.features.some((B) => B.category === "premium") && t.original.enabled !== !0 && !s ? [V("span", { class: "text-xs text-gray-500" }, "Controlled by the Premium plan")] : []
836
+ return B("div", { class: "flex flex-col items-end gap-2" }, [
837
+ B(m, { modelValue: ce(t.original), disabled: !0, showIcon: !0 }),
838
+ ...s && W.value ? [B("span", { class: "text-xs text-gray-500" }, "Loading location value…")] : [],
839
+ ...t.original.features.some((D) => D.category === "premium") && t.original.enabled !== !0 && !s ? [B("span", { class: "text-xs text-gray-500" }, "Controlled by the Premium plan")] : []
867
840
  ]);
868
841
  }
869
842
  }
870
843
  ]);
871
844
  return (t, s) => {
872
- const B = L("FmChip"), q = L("FmButton");
873
- return o(), i("div", Yt, [
874
- m(Gt, { "scope-db-name": d.value }, null, 8, ["scope-db-name"]),
875
- l("div", Wt, [
876
- m(Re, {
845
+ const D = L("FmChip"), K = L("FmButton");
846
+ return o(), r("div", Kt, [
847
+ p(jt),
848
+ l("div", qt, [
849
+ p(Me, {
877
850
  "model-value": d.value,
878
851
  "onUpdate:modelValue": s[0] || (s[0] = (F) => d.value = F),
879
852
  "selection-only": "",
880
853
  "show-business": ""
881
854
  }, null, 8, ["model-value"]),
882
- (o(!0), i(A, null, W(x.value, (F) => (o(), O(B, {
855
+ (o(!0), r(E, null, Y(h.value, (F) => (o(), z(D, {
883
856
  key: F,
884
857
  label: `domain in ${F}`,
885
858
  removable: "",
886
859
  onChipClosed: (ie) => ne(F)
887
860
  }, null, 8, ["label", "onChipClosed"]))), 128)),
888
- a.value ? (o(), O(B, {
861
+ a.value ? (o(), z(D, {
889
862
  key: 0,
890
863
  label: `status in ${a.value}`,
891
864
  removable: "",
892
865
  onChipClosed: s[1] || (s[1] = (F) => a.value = null)
893
866
  }, null, 8, ["label"])) : Z("", !0),
894
- m(S(v), {
867
+ p(w(f), {
895
868
  "close-on-click": !1,
896
869
  width: 288,
897
870
  "max-height": 420,
898
871
  placement: "bottom-start"
899
872
  }, {
900
- "menu-button": z(() => [
901
- m(q, {
873
+ "menu-button": P(() => [
874
+ p(K, {
902
875
  label: "Filter",
903
876
  "prepend-icon": "add",
904
877
  variant: "secondary"
905
878
  })
906
879
  ]),
907
- default: z(() => [
908
- m(S(n), { label: "Domains" }),
909
- (o(!0), i(A, null, W(U.value, (F) => (o(), O(S(r), {
880
+ default: P(() => [
881
+ p(w(c), { label: "Domains" }),
882
+ (o(!0), r(E, null, Y(U.value, (F) => (o(), z(w(u), {
910
883
  key: F,
911
884
  label: F,
912
885
  selectable: "",
913
886
  "has-checkbox": "",
914
- "model-value": x.value.includes(F),
887
+ "model-value": h.value.includes(F),
915
888
  onClick: (ie) => ne(F)
916
889
  }, null, 8, ["label", "model-value", "onClick"]))), 128)),
917
- m(S(y)),
918
- m(S(n), { label: "Status" }),
919
- (o(), i(A, null, W(D, (F) => m(S(r), {
890
+ p(w(g)),
891
+ p(w(c), { label: "Status" }),
892
+ (o(), r(E, null, Y($, (F) => p(w(u), {
920
893
  key: F,
921
894
  label: F,
922
895
  selectable: "",
@@ -927,16 +900,16 @@ const qe = { class: "p-3" }, Ge = { class: "text-sm font-semibold text-gray-700
927
900
  ]),
928
901
  _: 1
929
902
  }),
930
- x.value.length || a.value ? (o(), O(q, {
903
+ h.value.length || a.value ? (o(), z(K, {
931
904
  key: 1,
932
905
  label: "Clear all",
933
906
  variant: "tertiary",
934
907
  onClick: te
935
908
  })) : Z("", !0)
936
909
  ]),
937
- m(S($), {
910
+ p(w(O), {
938
911
  "column-defs": fe.value,
939
- "row-data": H.value,
912
+ "row-data": N.value,
940
913
  "page-size": 50,
941
914
  "hide-footer": "",
942
915
  "shrink-at": !1
@@ -944,81 +917,81 @@ const qe = { class: "p-3" }, Ge = { class: "text-sm font-semibold text-gray-700
944
917
  ]);
945
918
  };
946
919
  }
947
- }), Qt = { class: "flex w-full flex-col gap-16 p-16" }, Xt = {
920
+ }), Yt = { class: "flex w-full flex-col gap-16 p-16" }, Jt = {
948
921
  key: 0,
949
922
  class: "py-32 text-center"
950
- }, Zt = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, el = {
923
+ }, Wt = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Qt = {
951
924
  class: "flex gap-2 border-b border-gray-200",
952
925
  role: "tablist"
953
- }, tl = ["aria-selected"], ll = ["aria-selected"], ol = { key: 0 }, al = { class: "flex items-center justify-between gap-12" }, sl = { class: "fm-typo-en-heading-sm-600 text-fm-color-typo-primary" }, nl = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, rl = {
926
+ }, Xt = ["aria-selected"], Zt = ["aria-selected"], el = { key: 0 }, tl = { class: "flex items-center justify-between gap-12" }, ll = { class: "fm-typo-en-heading-sm-600 text-fm-color-typo-primary" }, ol = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, al = {
954
927
  key: 1,
955
928
  class: "w-full"
956
- }, il = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, hl = /* @__PURE__ */ ee({
929
+ }, sl = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, _l = /* @__PURE__ */ ee({
957
930
  __name: "SettingsView",
958
- setup(N) {
959
- const { t: h } = Ee(), T = ye(), k = Ie(), w = _(!1), p = _("order"), $ = E(() => {
960
- var n, r;
961
- return ((r = (n = T.sessionUser.value) == null ? void 0 : n.role) == null ? void 0 : r.isAdmin) === !0;
931
+ setup(H) {
932
+ const { t: v } = Ee(), T = ye(), x = Ie(), S = k(!1), m = k("order"), O = A(() => {
933
+ var c, u;
934
+ return ((u = (c = T.sessionUser.value) == null ? void 0 : c.role) == null ? void 0 : u.isAdmin) === !0;
962
935
  });
963
- function v() {
964
- k.invalidate(), k.fetchTemplates();
936
+ function f() {
937
+ x.invalidate(), x.fetchTemplates();
965
938
  }
966
- function y() {
967
- k.fetchTemplates(), w.value = !0;
939
+ function g() {
940
+ x.fetchTemplates(), S.value = !0;
968
941
  }
969
- return (n, r) => {
970
- const g = L("FmButton");
971
- return o(), O(Fe, {
972
- title: S(h)("inventory.settings.title")
942
+ return (c, u) => {
943
+ const b = L("FmButton");
944
+ return o(), z(Fe, {
945
+ title: w(v)("inventory.settings.title")
973
946
  }, {
974
- default: z(() => [
975
- l("div", Qt, [
976
- $.value ? (o(), i(A, { key: 1 }, [
977
- l("div", el, [
947
+ default: P(() => [
948
+ l("div", Yt, [
949
+ O.value ? (o(), r(E, { key: 1 }, [
950
+ l("div", Qt, [
978
951
  l("button", {
979
952
  type: "button",
980
953
  role: "tab",
981
- "aria-selected": p.value === "order",
954
+ "aria-selected": m.value === "order",
982
955
  class: ue([
983
956
  "border-b-2 px-3 py-2 text-sm font-medium",
984
- p.value === "order" ? "border-fm-color-primary text-fm-color-primary" : "border-transparent text-gray-500"
957
+ m.value === "order" ? "border-fm-color-primary text-fm-color-primary" : "border-transparent text-gray-500"
985
958
  ]),
986
- onClick: r[0] || (r[0] = (f) => p.value = "order")
987
- }, C(S(h)("inventory.settings.order.title")), 11, tl),
959
+ onClick: u[0] || (u[0] = (_) => m.value = "order")
960
+ }, C(w(v)("inventory.settings.order.title")), 11, Xt),
988
961
  l("button", {
989
962
  type: "button",
990
963
  role: "tab",
991
- "aria-selected": p.value === "features",
964
+ "aria-selected": m.value === "features",
992
965
  class: ue([
993
966
  "border-b-2 px-3 py-2 text-sm font-medium",
994
- p.value === "features" ? "border-fm-color-primary text-fm-color-primary" : "border-transparent text-gray-500"
967
+ m.value === "features" ? "border-fm-color-primary text-fm-color-primary" : "border-transparent text-gray-500"
995
968
  ]),
996
- onClick: r[1] || (r[1] = (f) => p.value = "features")
997
- }, C(S(h)("inventory.settings.features.title")), 11, ll)
969
+ onClick: u[1] || (u[1] = (_) => m.value = "features")
970
+ }, C(w(v)("inventory.settings.features.title")), 11, Zt)
998
971
  ]),
999
- p.value === "order" ? (o(), i("div", ol, [
1000
- l("div", al, [
1001
- l("h2", sl, C(S(h)("inventory.settings.order.printTemplates")), 1),
1002
- m(g, {
1003
- onClick: y,
972
+ m.value === "order" ? (o(), r("div", el, [
973
+ l("div", tl, [
974
+ l("h2", ll, C(w(v)("inventory.settings.order.printTemplates")), 1),
975
+ p(b, {
976
+ onClick: g,
1004
977
  variant: "secondary",
1005
- label: S(h)("inventory.settings.printTemplate.edit")
978
+ label: w(v)("inventory.settings.printTemplate.edit")
1006
979
  }, null, 8, ["label"])
1007
980
  ]),
1008
- l("p", nl, C(S(h)("inventory.settings.printTemplate.description")), 1)
1009
- ])) : (o(), i("div", rl, [
1010
- l("p", il, C(S(h)("inventory.settings.features.description")), 1),
1011
- m(Jt)
981
+ l("p", ol, C(w(v)("inventory.settings.printTemplate.description")), 1)
982
+ ])) : (o(), r("div", al, [
983
+ l("p", sl, C(w(v)("inventory.settings.features.description")), 1),
984
+ p(Gt)
1012
985
  ]))
1013
- ], 64)) : (o(), i("div", Xt, [
1014
- l("p", Zt, C(S(h)("inventory.settings.adminOnly")), 1)
986
+ ], 64)) : (o(), r("div", Jt, [
987
+ l("p", Wt, C(w(v)("inventory.settings.adminOnly")), 1)
1015
988
  ]))
1016
989
  ]),
1017
- (o(), O(we, { to: "body" }, [
1018
- m(Ut, {
1019
- modelValue: w.value,
1020
- "onUpdate:modelValue": r[2] || (r[2] = (f) => w.value = f),
1021
- onSaved: v
990
+ (o(), z(we, { to: "body" }, [
991
+ p(At, {
992
+ modelValue: S.value,
993
+ "onUpdate:modelValue": u[2] || (u[2] = (_) => S.value = _),
994
+ onSaved: f
1022
995
  }, null, 8, ["modelValue"])
1023
996
  ]))
1024
997
  ]),
@@ -1028,5 +1001,5 @@ const qe = { class: "p-3" }, Ge = { class: "text-sm font-semibold text-gray-700
1028
1001
  }
1029
1002
  });
1030
1003
  export {
1031
- hl as default
1004
+ _l as default
1032
1005
  };