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