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

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-BPhAFsnf.js} +515 -536
  2. package/dist/{ApprovalView-GHgTeCBV.js → ApprovalView-DuJIX7ux.js} +26 -25
  3. package/dist/{BindingsDialog-C4-S2CWk.js → BindingsDialog-BiNopu6T.js} +2 -2
  4. package/dist/{BindingsPicker-C7YUArBj.js → BindingsPicker-C2GUK3np.js} +2 -2
  5. package/dist/{BindingsTable-1Zoqi4ZS.js → BindingsTable-DlPl5o1h.js} +10 -10
  6. package/dist/BulkReceiveRequestPage-YtqUSPUN.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-CAKGP0N3.js} +1 -1
  8. package/dist/{ClosingDraftView-CnWFyWSE.js → ClosingDraftView-C0XEpqat.js} +748 -746
  9. package/dist/{ClosingHistoryView-Bkm0voU6.js → ClosingHistoryView-C2Bl2vnF.js} +7 -7
  10. package/dist/{ClosingTemplateView-Bz81JTsg.js → ClosingTemplateView-DAXyH1l9.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-sP8-Pw8r.js} +1 -1
  12. package/dist/{DefaultView-1RRzbPB3.js → DefaultView-QUjOTT9z.js} +2 -2
  13. package/dist/{DeliveryOrderPrintPreview-KcLqjOj1.js → DeliveryOrderPrintPreview-CNO7dng4.js} +15 -15
  14. package/dist/{EmailDialog.vue_vue_type_script_setup_true_lang-r0Q0qhoK.js → EmailDialog.vue_vue_type_script_setup_true_lang-MiLvwxSQ.js} +9847 -9723
  15. package/dist/{FeatureCapabilityBadge.vue_vue_type_script_setup_true_lang-Cwmk3NLS.js → FeatureCapabilityBadge.vue_vue_type_script_setup_true_lang-Bo7xjTer.js} +11 -10
  16. package/dist/FeatureCapabilityGate-CQrRBMcC.js +82 -0
  17. package/dist/FeaturePageGate.vue_vue_type_script_setup_true_lang-CIKrUrln.js +189 -0
  18. package/dist/{FmDateRangePickerChip.vue_vue_type_script_setup_true_lang-pzIzIWpX.js → FmDateRangePickerChip.vue_vue_type_script_setup_true_lang-DfCQ8SNd.js} +1 -1
  19. package/dist/{FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-B6cFB4vX.js → FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-BTeJz4Mm.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-DiwH0vnm.js} +2 -2
  21. package/dist/{FmMultiselectDialog-D0GhmOQ9.js → FmMultiselectDialog-BZvKKnBB.js} +2 -2
  22. package/dist/{FmMultiselectDialog-CC_Na_p1.js → FmMultiselectDialog-Dne8GSe8.js} +2 -2
  23. package/dist/{FmUnitInput.vue_vue_type_script_setup_true_lang-DQlSMRoB.js → FmUnitInput.vue_vue_type_script_setup_true_lang-D1-MLyJi.js} +105 -99
  24. package/dist/ImportView-Dr-2cv9N.js +1540 -0
  25. package/dist/{IngredientsView-B2I2OPSb.js → IngredientsView-BnaNrWb7.js} +367 -365
  26. package/dist/{IntegrationExplorerView-WK1EmwLA.js → IntegrationExplorerView-Bjflxeha.js} +1537 -1620
  27. package/dist/IntegrationPlatformView-fO7R9fGT.js +13385 -0
  28. package/dist/{IntegrationView-CeaL92Yj.js → IntegrationView-CxpmB0o2.js} +2380 -2340
  29. package/dist/{InventoryBindingForm-DgtaDM0I.js → InventoryBindingForm-DbgvnZ9I.js} +1 -1
  30. package/dist/{InventoryBindingForm.vue_vue_type_script_setup_true_lang-CqDN355J.js → InventoryBindingForm.vue_vue_type_script_setup_true_lang-3stkPlAW.js} +134 -134
  31. package/dist/{InventoryBindingSummary-C_W456aj.js → InventoryBindingSummary-BrIFW5dO.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-BAVjiZbm.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-DhImFq9B.js +2317 -0
  38. package/dist/{ProductionRunLifecycleDialogs.vue_vue_type_script_setup_true_lang-DwBY6gIb.js → ProductionRunLifecycleDialogs.vue_vue_type_script_setup_true_lang-CCUBGX4K.js} +3051 -3161
  39. package/dist/ProductionRunPage-D9SaErg3.js +954 -0
  40. package/dist/{PublishView-Dv-W6ntx.js → PublishView-CmqorDCm.js} +3 -3
  41. package/dist/{PurchaseOrderPrintPreview-D1TAnJd_.js → PurchaseOrderPrintPreview-CvplcGNv.js} +17 -17
  42. package/dist/{ReceiveRequestView-Rc_uw_Ad.js → ReceiveRequestView-DAN7eOH5.js} +17 -16
  43. package/dist/RecipeView-CgJcpA_f.js +3272 -0
  44. package/dist/{SettingsView-K5wAt8oo.js → SettingsView-I1XEa1NJ.js} +398 -425
  45. package/dist/StockView-C2tK0oPv.js +3003 -0
  46. package/dist/{SubsidiaryTreeDialog.vue_vue_type_script_setup_true_lang-CsRLy0xI.js → SubsidiaryTreeDialog.vue_vue_type_script_setup_true_lang-DSz37GY_.js} +1 -1
  47. package/dist/{SupplierView-CLVupRN0.js → SupplierView-C69gOB_i.js} +21 -20
  48. package/dist/{SurchargeView-CToB_z5v.js → SurchargeView-DfDtR1jP.js} +7 -7
  49. package/dist/{SystemTrailDialog.vue_vue_type_script_setup_true_lang-CvqIw9q6.js → SystemTrailDialog.vue_vue_type_script_setup_true_lang-CWD44FiP.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-5RLeEfkg.js +332 -0
  52. package/dist/TransferDetails.vue_vue_type_script_setup_true_lang-Dzlex2fK.js +4953 -0
  53. package/dist/TransferTemplateView-Dc892CSr.js +2347 -0
  54. package/dist/{UnitCostHistoryView-BMB2MeTh.js → UnitCostHistoryView-DkuDLBSq.js} +4 -4
  55. package/dist/{UnitDisplayControl.vue_vue_type_script_setup_true_lang-Dn8Y8zfp.js → UnitDisplayControl.vue_vue_type_script_setup_true_lang-3Iyv5v10.js} +4 -4
  56. package/dist/{UnitView-Bl8jws6R.js → UnitView-CakqjGDe.js} +111 -106
  57. package/dist/{WarehouseView-BurSM1jg.js → WarehouseView-AUPuNwRA.js} +12 -11
  58. package/dist/{WastageTemplateView-DRfJ9LGR.js → WastageTemplateView-1kxcX31h.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-Duum3eHx.js → app-tiHt7P8o.js} +9786 -9547
  68. package/dist/app.d.ts +151 -14
  69. package/dist/app.js +1 -1
  70. package/dist/bulk-edit-simulation.helper-D490leZh.js +178 -0
  71. package/dist/{closing-template-BE41yfue.js → closing-template-CAahWrPo.js} +4 -4
  72. package/dist/components/FeatureCapabilityGate.vue.d.ts +3 -0
  73. package/dist/components/FeatureGateLayout.vue.d.ts +11 -0
  74. package/dist/components/FeaturePageGate.spec.d.ts +1 -0
  75. package/dist/components/FeaturePageGate.vue.d.ts +34 -0
  76. package/dist/components/FmAdminCollapsiblePanel.vue.d.ts +1 -1
  77. package/dist/components/FmDroppableField.vue.d.ts +1 -1
  78. package/dist/components/FmInventoryTableToolbar.vue.d.ts +2 -2
  79. package/dist/components/FmUnitInputProps.d.ts +1 -0
  80. package/dist/components/FmUnitInputRules.d.ts +1 -1
  81. package/dist/components/HrmPermissionGuard.vue.d.ts +1 -1
  82. package/dist/components/MultiLocationSelector.vue.d.ts +6 -6
  83. package/dist/components/NumberPrecisionInput.spec.d.ts +1 -0
  84. package/dist/components/PremiumUpgradePage.vue.d.ts +2 -0
  85. package/dist/components/TemplatePublishDialog.d.ts +2 -0
  86. package/dist/components/TemplatePublishDialog.spec.d.ts +1 -0
  87. package/dist/composable/defineApi.d.ts +1 -1
  88. package/dist/{date2-DrhO3BxU.js → date2-CKKZ3b1E.js} +1 -1
  89. package/dist/{dayjs.min-CQp6EpOp.js → dayjs.min-CXmScEL-.js} +1 -1
  90. package/dist/{decimal-Cq0qUT4r.js → decimal-CE8yRxZg.js} +2 -2
  91. package/dist/{defineDeepModel-DRC39nJs.js → defineDeepModel-BRZrUePH.js} +5 -5
  92. package/dist/{duplicate-template-j2ymeDNH.js → duplicate-template-DGrH04lc.js} +1 -1
  93. package/dist/{feature-C0hQza5A.js → feature-BuUIX2LY.js} +327 -287
  94. package/dist/feature-flags/core.d.ts +1 -0
  95. package/dist/feature-flags/vue.d.ts +22 -1
  96. package/dist/{format-time-from-id-BmJoI3jT.js → format-time-from-id-BQOfGm26.js} +1 -1
  97. package/dist/{format-unit-display-CRgIMXsD.js → format-unit-display-BuBfy3bb.js} +209 -208
  98. package/dist/helper/country.spec.d.ts +1 -0
  99. package/dist/helper/menu-usage-module.d.ts +2 -1
  100. package/dist/helper/number.d.ts +5 -1
  101. package/dist/helper/rules.d.ts +1 -1
  102. package/dist/{id-to-date-CuFZDvIr.js → id-to-date-B_aPAdeF.js} +1 -1
  103. package/dist/{import-export.helper-B43zbsbj.js → import-export.helper-DPqodvrw.js} +17 -17
  104. package/dist/{JsonViewer.vue_vue_type_script_setup_true_lang-ig2zSXAB.js → index-C25C1Dg7.js} +1074 -1066
  105. package/dist/{index-BYDjs08n.js → index-CBkSXbQw.js} +2234 -2163
  106. package/dist/{index-Cwvg7EHd.js → index-EgLlcZ4g.js} +3 -3
  107. package/dist/index-eGvSlWMU.js +1892 -0
  108. package/dist/{index-DXNYZeq3.js → index-yTHfPUVq.js} +1 -1
  109. package/dist/layout/SingleColumnLayout.vue.d.ts +1 -1
  110. package/dist/{lz-string-6DgW1cPF.js → lz-string-Dgq0u7oK.js} +1 -1
  111. package/dist/menu-usage-module-Bq_KLsO4.js +74 -0
  112. package/dist/{netsuite-BSpmyaE1.js → netsuite-BgB1tjJx.js} +254 -263
  113. package/dist/netsuite-explorer-BMtIwGyi.js +79 -0
  114. package/dist/{predefined-templates-C0jtb4T7.js → predefined-templates-BiuP4m7R.js} +1 -1
  115. package/dist/production-run-list-DR1WsaBR.js +61 -0
  116. package/dist/{purchase-order-template-B5Pjddfi.js → purchase-order-template-D5Z0bPLL.js} +1 -1
  117. package/dist/{recalculationUtils-DtJWwWSj.js → recalculationUtils-BitV6W_8.js} +1 -1
  118. package/dist/router/name.d.ts +2 -1
  119. package/dist/{row-action.enum-BDDJNSi0.js → row-action.enum-CTNl1V0l.js} +1 -1
  120. package/dist/rules-BpG29H9Z.js +243 -0
  121. package/dist/{stock-BKMDvf5S.js → stock-DNV9xfbE.js} +1 -1
  122. package/dist/stock-DTzUuxKl.js +78 -0
  123. package/dist/stores/feature.d.ts +26 -8
  124. package/dist/stores/feature.load-state.spec.d.ts +1 -0
  125. package/dist/stores/integration/netsuite.d.ts +2 -2
  126. package/dist/stores/inventory.no-location.spec.d.ts +1 -0
  127. package/dist/stores/location.d.ts +42 -42
  128. package/dist/stores/supplier.d.ts +48 -48
  129. package/dist/stores/warehouse.d.ts +2 -2
  130. package/dist/style.css +1 -1
  131. package/dist/{supplier-Cv8HRNou.js → supplier-8uMx5fFa.js} +2 -2
  132. package/dist/{surcharge-ktE1pRyy.js → surcharge-D0c44dor.js} +1 -1
  133. package/dist/tsconfig.app.tsbuildinfo +1 -1
  134. package/dist/{uom-rules-DCnXmEkb.js → uom-rules-BErW6UQ4.js} +1 -1
  135. package/dist/{use-ingredient-select-dialog-CYUUVrCI.js → use-ingredient-select-dialog-CZTe4ayv.js} +2 -2
  136. package/dist/{use-inventory-binding-dialog-Dugj9i-6.js → use-inventory-binding-dialog-D_N7K7pw.js} +2 -2
  137. package/dist/{use-template-enabled-locations-BlZ7WAqX.js → use-template-enabled-locations-C1xNZr4V.js} +2 -2
  138. package/dist/{use-transfer-locations-CUDFnsVH.js → use-transfer-locations-BlSNA3qv.js} +14 -14
  139. package/dist/{useHrmPermission-BOwmXi9H.js → useHrmPermission-Bd1_Ia_U.js} +1 -1
  140. package/dist/{useNavigationMenu-CbNKFBwx.js → useNavigationMenu-DXrUeRX9.js} +39 -39
  141. package/dist/{useSseClient-CdyQh47h.js → useSseClient-Di0ywAz-.js} +1 -1
  142. package/dist/views/adjustment-template/wastage-template/actions.d.ts +36 -36
  143. package/dist/views/adjustment-template/wastage-template/table.d.ts +36 -36
  144. package/dist/views/changelog/composables/use-snapshot-diff.d.ts +2 -2
  145. package/dist/views/closing-draft/components/closing-draft-dialog/ClosingDraftApprovalDialog.vue.d.ts +6 -6
  146. package/dist/views/closing-draft/components/closing-draft-dialog/ClosingDraftDialog.vue.d.ts +12 -12
  147. package/dist/views/closing-draft/components/closing-draft-groups/ClosingGroupDetailSideSheet.vue.d.ts +6 -6
  148. package/dist/views/closing-draft/composables/use-closing-draft-import.d.ts +3 -3
  149. package/dist/views/closing-draft/composables/use-closing-draft-table.d.ts +19 -19
  150. package/dist/views/closing-draft/helpers/draft-status-to-class-name.helper.d.ts +1 -1
  151. package/dist/views/closing-template/composables/use-closing-template-actions.d.ts +45 -45
  152. package/dist/views/closing-template/composables/use-closing-template-table.d.ts +36 -36
  153. package/dist/views/import/helper/submit-rows.d.ts +1 -1
  154. package/dist/views/ingredients/components/inventory-binding/recipe-amount-validation.spec.d.ts +1 -0
  155. package/dist/views/ingredients/helper/is-linked-ingredient-error.d.ts +3 -1
  156. package/dist/views/integration/IntegrationPlatformView.vue.d.ts +24 -0
  157. package/dist/views/integration/components/IntegrationCard.vue.d.ts +3 -3
  158. package/dist/views/integration/components/Synergy/importFn.spec.d.ts +1 -0
  159. package/dist/views/integration/components/Xilnex/importFn.spec.d.ts +1 -0
  160. package/dist/views/integration/components/netsuite/business/AddLocationDialog.vue.d.ts +36 -36
  161. package/dist/views/integration/components/netsuite/business/AddVendorDialog.vue.d.ts +24 -24
  162. package/dist/views/integration/helper/opening-balance.d.ts +22 -0
  163. package/dist/views/integration/helper/opening-balance.spec.d.ts +1 -0
  164. package/dist/views/production-run/ProductionRunDetailPage.spec.d.ts +1 -0
  165. package/dist/views/{integration/components/IntegrationSyncLogTab.vue.d.ts → production-run/ProductionRunDetailPage.vue.d.ts} +2 -2
  166. package/dist/views/production-run/ProductionRunPage.vue.d.ts +2 -0
  167. package/dist/views/production-run/features/detail/ProductionRunItemsTable.vue.d.ts +2 -2
  168. package/dist/views/production-run/features/detail/ProductionRunOverviewTab.vue.d.ts +4 -4
  169. package/dist/views/production-run/features/detail/use-production-run-detail.d.ts +19 -9
  170. package/dist/views/production-run/features/lifecycle/CancelRunDialog.vue.d.ts +4 -4
  171. package/dist/views/production-run/features/lifecycle/CloseRunDialog.vue.d.ts +4 -4
  172. package/dist/views/production-run/features/lifecycle/ProductionRunLifecycleDialogs.vue.d.ts +14 -14
  173. package/dist/views/production-run/features/lifecycle/TargetReachedDialog.vue.d.ts +4 -4
  174. package/dist/views/production-run/features/planning/ProductionRunFormDialog.vue.d.ts +4 -4
  175. package/dist/views/production-run/features/planning/ProductionRunPlanner.vue.d.ts +1 -1
  176. package/dist/views/production-run/features/planning/use-production-run-duplicate-sources.d.ts +6 -6
  177. package/dist/views/production-run/shared/helpers/production-run-navigation.d.ts +0 -1
  178. package/dist/views/production-run/shared/model/production-run-list.d.ts +1 -1
  179. package/dist/views/production-run/shared/ui/ProductionRunInfoBadge.vue.d.ts +1 -1
  180. package/dist/views/production-run/shared/ui/ProductionRunInfoText.vue.d.ts +1 -1
  181. package/dist/views/production-run/shared/ui/ProductionRunScrollHint.vue.d.ts +2 -2
  182. package/dist/views/production-run/shared/ui/ProductionRunTextarea.vue.d.ts +3 -3
  183. package/dist/views/receive-request/components/transfer-form/TransferFormWithController.vue.d.ts +5 -5
  184. package/dist/views/receive-request/composables/netsuite-order-label.d.ts +11 -0
  185. package/dist/views/receive-request/composables/netsuite-order-label.spec.d.ts +1 -0
  186. package/dist/views/receive-request/composables/use-process-purchase-order.d.ts +6 -6
  187. package/dist/views/receive-request/composables/use-receive-request-form.d.ts +48 -48
  188. package/dist/views/receive-request/composables/use-receive-request-form.spec.d.ts +1 -0
  189. package/dist/views/receive-request/composables/use-receive-request-table.d.ts +42 -42
  190. package/dist/views/receive-request/import/export.spec.d.ts +1 -0
  191. package/dist/views/receive-request-bulk/BulkReceiveRequestPage.vue.d.ts +2 -0
  192. package/dist/views/receive-request-bulk/components/CreateTransferWizard.spec.d.ts +1 -0
  193. package/dist/views/receive-request-bulk/composables/use-bulk-receive-request-form.d.ts +54 -54
  194. package/dist/views/receive-request-bulk/composables/use-bulk-receive-request-form.readiness.spec.d.ts +1 -0
  195. package/dist/views/receive-request-bulk/composables/use-bulk-receive-request-table.d.ts +8 -8
  196. package/dist/views/recipe/components/recipe-bulk-editor/components/ModificationCard.spec.d.ts +1 -0
  197. package/dist/views/recipe/helper/import-recipe.d.ts +30 -0
  198. package/dist/views/recipe/helper/import-recipe.spec.d.ts +1 -0
  199. package/dist/views/settings/PlanLicenseDisplay.vue.d.ts +1 -14
  200. package/dist/views/stock/components/StockRecordCard.spec.d.ts +1 -0
  201. package/dist/views/stock/components/StockRecordCard.vue.d.ts +19 -865
  202. package/dist/views/stock/components/dialog/AmendAdjustmentForm.spec.d.ts +1 -0
  203. package/dist/views/stock/components/dialog/BillInventoryInfoDialog.spec.d.ts +1 -0
  204. package/dist/views/stock/components/dialog/BillInventoryInfoDialog.vue.d.ts +36 -0
  205. package/dist/views/stock/components/dialog/ConvertSkuDialog.spec.d.ts +1 -0
  206. package/dist/views/stock/composables/use-last-closing-summary.d.ts +4 -0
  207. package/dist/views/stock/composables/use-last-closing-summary.spec.d.ts +1 -0
  208. package/dist/views/supplier/components/SupplierForm.vue.d.ts +4 -4
  209. package/dist/views/supplier/composables/use-supplier-table.d.ts +2 -2
  210. package/dist/views/transfer-template/components/transfer-template-dialog/TransferTemplateDialog.vue.d.ts +8 -8
  211. package/dist/views/transfer-template/components/transfer-template-form/composables/use-transfer-locations.d.ts +4 -4
  212. package/dist/views/transfer-template/components/transfer-template-form/composables/use-transfer-template-items.spec.d.ts +1 -0
  213. package/dist/views/transfer-template/composables/use-template-item-bulk-editor.d.ts +24 -24
  214. package/dist/views/transfer-template/composables/use-transfer-template-actions.d.ts +48 -48
  215. package/dist/views/transfer-template/composables/use-transfer-template-table.d.ts +48 -48
  216. package/dist/views/transfer-template/helpers/template-item.error.helper.spec.d.ts +1 -0
  217. package/dist/views/unit/composables/use-unit-form.spec.d.ts +1 -0
  218. package/dist/views/warehouse/components/WarehouseForm.vue.d.ts +4 -4
  219. package/dist/{PlanTierBadge.vue_vue_type_script_setup_true_lang-BSR_nyHY.js → vue-C029rfpt.js} +101 -80
  220. package/dist/{vue-i18n-dSKy66Jh.js → vue-i18n-Bg7KOfUG.js} +416 -416
  221. package/dist/{xlsx.util-pjzuMquw.js → xlsx.util-BQrh6imS.js} +2 -2
  222. package/package.json +71 -66
  223. package/dist/BulkReceiveRequestView-Lakk8011.js +0 -2656
  224. package/dist/FeatureCapabilityGate-C6t1VwKD.js +0 -74
  225. package/dist/ImportView-DCcdEvy4.js +0 -1291
  226. package/dist/NumberPrecisionInput.vue_vue_type_script_setup_true_lang-BMDjCk9T.js +0 -72
  227. package/dist/ProductionRunDetailView-C9rxLBbL.js +0 -2312
  228. package/dist/ProductionRunView-DvMdVGz1.js +0 -930
  229. package/dist/RecipeView-ByUaGc4w.js +0 -3428
  230. package/dist/StockView-B3EjdjVx.js +0 -2615
  231. package/dist/TableActionableRow.vue_vue_type_script_setup_true_lang-DAMpuZ1X.js +0 -84
  232. package/dist/TemplatePublishDialog.vue_vue_type_script_setup_true_lang-BGPuaJlU.js +0 -299
  233. package/dist/TransferDetails.vue_vue_type_script_setup_true_lang-8ydaQEw-.js +0 -4836
  234. package/dist/TransferTemplateView-BnfALwmw.js +0 -2326
  235. package/dist/api/license.d.ts +0 -8
  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
@@ -0,0 +1,954 @@
1
+ import { defineComponent as oe, computed as m, createElementBlock as k, createCommentVNode as H, openBlock as p, withModifiers as rt, createVNode as $, unref as r, ref as _, watch as ye, onMounted as Re, onBeforeUnmount as Ie, resolveComponent as ne, Fragment as J, createElementVNode as s, createTextVNode as ge, toDisplayString as b, withCtx as B, renderList as we, normalizeClass as ae, nextTick as st, watchEffect as wt, h as Q, createBlock as X, normalizeStyle as kt } from "vue";
2
+ import { _ as Rt, a as It } from "./FeaturePageGate.vue_vue_type_script_setup_true_lang-CIKrUrln.js";
3
+ import { F as te } from "./index-eGvSlWMU.js";
4
+ import { useRouter as $t } from "vue-router";
5
+ import { useDialog as St, useSnackbar as At, useBreakpoints as Ct } from "@feedmepos/ui-library";
6
+ import { useI18n as ie, useCoreStore as Nt } from "@feedmepos/mf-common";
7
+ import { u as Ft, _ as Pt } from "./SingleColumnLayout.vue_vue_type_script_setup_true_lang-DpwneGOV.js";
8
+ import { _ as Dt } from "./TableActionableRow.vue_vue_type_script_setup_true_lang-gJQQKKAC.js";
9
+ import { F as at } from "./FmAdminBadge-DlplQOHb.js";
10
+ import { _ as Tt } from "./FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-DiwH0vnm.js";
11
+ import { p as Mt, i as ke, _ as zt, h as Lt, a as Vt, f as Ot, b as Et, c as Ut, u as qt, d as jt, e as Wt, P as Ht, g as Bt, j as xe, k as tt, l as Yt } from "./ProductionRunLifecycleDialogs.vue_vue_type_script_setup_true_lang-CCUBGX4K.js";
12
+ import { u as Qt, a as Gt } from "./app-tiHt7P8o.js";
13
+ import { p as $e, a as it, P as Kt, m as Jt, b as Xt, c as nt, d as ot } from "./production-run-list-DR1WsaBR.js";
14
+ import { _ as lt } from "./_plugin-vue_export-helper-CHgC5LLL.js";
15
+ const Zt = /* @__PURE__ */ oe({
16
+ __name: "ProductionRunActionsCell",
17
+ props: {
18
+ run: {}
19
+ },
20
+ emits: ["action"],
21
+ setup(V, { emit: o }) {
22
+ const i = V, F = o, { t: c } = ie(), R = m(
23
+ () => $e(i.run, c("inventory.production.run.list.untitled"))
24
+ ), g = {
25
+ request: 0,
26
+ prepare: 0,
27
+ complete: 0,
28
+ update: 1,
29
+ close: 1,
30
+ cancel: 2
31
+ }, f = m(
32
+ () => Mt(i.run).filter(({ action: n }) => n !== "request" || i.run.plan.items.length > 0).sort((n, d) => ke(i.run) && n.action === "close" ? -1 : ke(i.run) && d.action === "close" ? 1 : g[n.action] - g[d.action]).map(({ action: n }) => n)
33
+ );
34
+ function w(n) {
35
+ return n === "complete" && Lt(i.run) ? c("inventory.production.run.detail.pendingStock.resume") : c(`inventory.production.run.list.rowActions.${n}`);
36
+ }
37
+ const l = m(
38
+ () => f.value.map((n) => ({
39
+ id: n,
40
+ label: w(n),
41
+ destructive: n === "cancel"
42
+ }))
43
+ );
44
+ function v(n) {
45
+ F("action", n);
46
+ }
47
+ return (n, d) => f.value.length ? (p(), k("div", {
48
+ key: 0,
49
+ class: "production-run-action-interactive relative flex items-center justify-center",
50
+ onClick: d[0] || (d[0] = rt(() => {
51
+ }, ["stop"]))
52
+ }, [
53
+ $(zt, {
54
+ items: l.value,
55
+ placement: "bottom-end",
56
+ "menu-testid": "run-actions-menu",
57
+ "accessible-label": r(c)("inventory.production.run.list.actionsFor", { name: R.value }),
58
+ onSelect: v
59
+ }, null, 8, ["items", "accessible-label"])
60
+ ])) : H("", !0);
61
+ }
62
+ }), en = ["id"], tn = {
63
+ key: 0,
64
+ class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary"
65
+ }, nn = {
66
+ key: 1,
67
+ class: "production-run-items-interactive relative min-w-0"
68
+ }, on = { class: "min-w-0 overflow-hidden whitespace-nowrap" }, rn = {
69
+ key: 0,
70
+ class: "shrink-0",
71
+ "aria-hidden": "true"
72
+ }, sn = ["data-hidden-count"], an = ["aria-label"], ln = { class: "fm-typo-en-body-sm-600 mb-8 text-fm-color-typo-primary" }, un = { class: "flex flex-col gap-8 border-t border-fm-color-neutral-gray-100 pt-8" }, cn = { class: "text-fm-color-typo-primary" }, dn = { class: "shrink-0 text-fm-color-typo-secondary" };
73
+ let pn = 0;
74
+ const mn = /* @__PURE__ */ oe({
75
+ __name: "ProductionRunItemsCell",
76
+ props: {
77
+ run: {},
78
+ resolveSku: {},
79
+ rowLinkFocused: { type: Boolean, default: !1 },
80
+ descriptionId: {},
81
+ wrap: { type: Boolean, default: !1 }
82
+ },
83
+ setup(V) {
84
+ const o = V, { t: i } = ie(), F = _(!1), c = m(() => F.value || o.rowLinkFocused), R = _(null), g = _(null), f = _(null), w = _(Number.POSITIVE_INFINITY), l = _(!1), v = typeof navigator < "u" && /safari/i.test(navigator.userAgent) && !/(chrome|chromium|crios|android)/i.test(navigator.userAgent), n = ++pn, d = `production-run-items-tooltip-${n}`, T = `production-run-items-description-${n}`, P = m(() => o.descriptionId ?? T), u = 44;
85
+ let h = null, x = null, O = null, Y = !1;
86
+ const I = m(
87
+ () => o.run.plan.items.map((a, S) => {
88
+ const D = o.resolveSku(a.skuId), A = Vt(a.measurement) ? a.measurement : null, j = (A == null ? void 0 : A.abbrev) ?? null, W = Ot(a.requestedAmount, j, {
89
+ precision: a.requestedAmount.precision
90
+ });
91
+ return {
92
+ key: `${a.skuId}-${S}`,
93
+ name: (D == null ? void 0 : D.name) ?? a.skuId,
94
+ quantity: j ? W : `${W} · ${i("inventory.production.run.list.itemsUnitUnresolved")}`
95
+ };
96
+ })
97
+ ), z = m(() => I.value.slice(0, w.value)), G = m(() => I.value.map(({ name: a }) => a).join(", ")), E = m(() => z.value.map(({ name: a }) => a).join(", ")), L = m(
98
+ () => o.wrap ? 0 : Math.max(0, I.value.length - z.value.length)
99
+ ), Z = m(() => L.value > 99 ? "99+" : `+${L.value}`), _e = m(
100
+ () => I.value.map(({ name: a, quantity: S }) => `${a}: ${S}`).join(", ")
101
+ );
102
+ function be() {
103
+ if (o.wrap) {
104
+ w.value = I.value.length, l.value = !1;
105
+ return;
106
+ }
107
+ const a = g.value, S = f.value;
108
+ if (!a || !S || a.clientWidth <= 0) return;
109
+ const D = Array.from(S.children).map((U) => U.offsetWidth);
110
+ if (!D.length || D.reduce((U, ue) => U + ue, 0) <= a.clientWidth) {
111
+ w.value = I.value.length, l.value = !1;
112
+ return;
113
+ }
114
+ l.value = !0;
115
+ const A = Math.max(0, a.clientWidth - u);
116
+ let j = 0, W = 0;
117
+ for (const U of D) {
118
+ if (j + U > A) break;
119
+ j += U, W++;
120
+ }
121
+ w.value = Math.min(I.value.length, Math.max(1, W + 1));
122
+ }
123
+ function K() {
124
+ Y || (Y = !0, st(() => {
125
+ Y = !1, be();
126
+ }));
127
+ }
128
+ function re() {
129
+ h && (x !== g.value && (x && h.unobserve(x), x = g.value, x && h.observe(x)), O !== f.value && (O && h.unobserve(O), O = f.value, O && h.observe(O)), K());
130
+ }
131
+ ye(
132
+ () => I.value.map(({ name: a }) => a).join("\0"),
133
+ () => {
134
+ w.value = Number.POSITIVE_INFINITY, K();
135
+ },
136
+ { flush: "post" }
137
+ ), ye(
138
+ () => o.wrap,
139
+ () => {
140
+ w.value = Number.POSITIVE_INFINITY, K();
141
+ },
142
+ { flush: "post" }
143
+ ), ye([g, f], re, { flush: "post" }), Re(() => {
144
+ typeof ResizeObserver < "u" && (h = new ResizeObserver(K), re()), K();
145
+ }), Ie(() => h == null ? void 0 : h.disconnect());
146
+ function le(a) {
147
+ var S, D;
148
+ a !== c.value && (c.value ? (S = R.value) == null || S.show() : (D = R.value) == null || D.hide());
149
+ }
150
+ return (a, S) => {
151
+ const D = ne("FmPopover");
152
+ return p(), k(J, null, [
153
+ s("span", {
154
+ id: P.value,
155
+ "data-testid": "run-items-a11y-description",
156
+ class: "sr-only"
157
+ }, [
158
+ L.value ? (p(), k(J, { key: 0 }, [
159
+ ge(b(r(i)("inventory.production.run.list.itemsHidden", { count: L.value })) + ". ", 1)
160
+ ], 64)) : H("", !0),
161
+ ge(" " + b(I.value.length ? r(i)("inventory.production.run.list.itemsLabel", { names: _e.value }) : r(i)("inventory.production.run.list.itemsNone")), 1)
162
+ ], 8, en),
163
+ I.value.length === 0 ? (p(), k("span", tn, b(r(i)("inventory.production.run.list.itemsNone")), 1)) : (p(), k("div", nn, [
164
+ $(D, {
165
+ ref_key: "popover",
166
+ ref: R,
167
+ "show-popover": c.value,
168
+ placement: "bottom-start",
169
+ onPopoverChanged: le
170
+ }, {
171
+ "popover-button": B(() => [
172
+ s("div", {
173
+ ref_key: "disclosureContainer",
174
+ ref: g,
175
+ "data-testid": "items-disclosure-container",
176
+ class: ae(["flex w-full max-w-full min-w-0 gap-4 text-left", a.wrap ? "items-start overflow-visible" : "items-center overflow-hidden"]),
177
+ onMouseenter: S[0] || (S[0] = (A) => F.value = !0),
178
+ onMouseleave: S[1] || (S[1] = (A) => F.value = !1)
179
+ }, [
180
+ s("span", {
181
+ "data-testid": "run-items-summary",
182
+ class: ae([
183
+ "fm-typo-en-body-md-400 min-w-0 flex-1 text-fm-color-typo-primary",
184
+ a.wrap ? "whitespace-normal break-words" : r(v) ? "flex overflow-hidden whitespace-nowrap" : "truncate"
185
+ ])
186
+ }, [
187
+ r(v) && !a.wrap ? (p(), k(J, { key: 0 }, [
188
+ s("span", on, b(E.value), 1),
189
+ l.value ? (p(), k("span", rn, "…")) : H("", !0)
190
+ ], 64)) : (p(), k(J, { key: 1 }, [
191
+ ge(b(G.value), 1)
192
+ ], 64))
193
+ ], 2),
194
+ L.value ? (p(), k("span", {
195
+ key: 0,
196
+ "data-testid": "run-items-overflow",
197
+ "data-hidden-count": L.value,
198
+ "data-production-info-size": "sm",
199
+ "aria-hidden": "true",
200
+ class: "inline-flex h-[20px] shrink-0 items-center justify-center whitespace-nowrap rounded-full bg-fm-color-neutral-gray-100 px-[8px] text-[12px] font-normal leading-[18px] text-fm-color-typo-primary"
201
+ }, b(Z.value), 9, sn)) : H("", !0),
202
+ s("span", {
203
+ ref_key: "measureRail",
204
+ ref: f,
205
+ "data-testid": "run-items-measure",
206
+ "aria-hidden": "true",
207
+ class: "fm-typo-en-body-md-400 pointer-events-none invisible absolute w-max whitespace-nowrap"
208
+ }, [
209
+ (p(!0), k(J, null, we(I.value, (A, j) => (p(), k("span", {
210
+ key: A.key,
211
+ "data-testid": "run-item-measure"
212
+ }, b(j ? `, ${A.name}` : A.name), 1))), 128))
213
+ ], 512)
214
+ ], 34)
215
+ ]),
216
+ default: B(() => [
217
+ s("div", {
218
+ id: d,
219
+ "data-testid": "run-items-disclosure",
220
+ role: "tooltip",
221
+ "aria-label": r(i)("inventory.production.run.list.itemsDisclosure"),
222
+ class: "pointer-events-none min-w-[288px] p-12"
223
+ }, [
224
+ s("h3", ln, b(r(i)("inventory.production.run.list.itemsCount", { count: I.value.length })), 1),
225
+ s("ul", un, [
226
+ (p(!0), k(J, null, we(I.value, (A) => (p(), k("li", {
227
+ key: A.key,
228
+ class: "fm-typo-en-body-sm-400 flex items-start justify-between gap-16"
229
+ }, [
230
+ s("span", cn, b(A.name), 1),
231
+ s("span", dn, b(A.quantity), 1)
232
+ ]))), 128))
233
+ ])
234
+ ], 8, an)
235
+ ]),
236
+ _: 1
237
+ }, 8, ["show-popover"])
238
+ ]))
239
+ ], 64);
240
+ };
241
+ }
242
+ }), vn = ["href", "aria-describedby"], fn = /* @__PURE__ */ oe({
243
+ __name: "ProductionRunNameCell",
244
+ props: {
245
+ name: {},
246
+ href: {},
247
+ descriptionId: {},
248
+ wrap: { type: Boolean, default: !1 }
249
+ },
250
+ emits: ["open", "focus", "blur"],
251
+ setup(V, { emit: o }) {
252
+ const i = V, F = o, c = _(null), R = _(!1);
253
+ let g = null, f = !1;
254
+ function w() {
255
+ const n = c.value;
256
+ R.value = !i.wrap && !!n && n.scrollWidth > n.clientWidth;
257
+ }
258
+ function l() {
259
+ f || (f = !0, st(() => {
260
+ f = !1, w();
261
+ }));
262
+ }
263
+ ye(() => [i.name, i.wrap], l, { flush: "post" }), Re(() => {
264
+ typeof ResizeObserver < "u" && c.value && (g = new ResizeObserver(l), g.observe(c.value)), l();
265
+ }), Ie(() => g == null ? void 0 : g.disconnect());
266
+ function v(n) {
267
+ n.preventDefault(), n.stopPropagation(), F("open");
268
+ }
269
+ return (n, d) => {
270
+ const T = ne("FmTooltip");
271
+ return p(), k("a", {
272
+ href: n.href,
273
+ "aria-describedby": n.descriptionId,
274
+ class: "production-run-row-link fm-typo-en-body-md-600 block min-w-0 max-w-full text-left text-fm-color-typo-primary",
275
+ onClick: v,
276
+ onFocus: d[0] || (d[0] = (P) => F("focus")),
277
+ onBlur: d[1] || (d[1] = (P) => F("blur"))
278
+ }, [
279
+ $(T, {
280
+ content: n.name,
281
+ disabled: !R.value,
282
+ placement: "top",
283
+ "z-index": 51,
284
+ "content-class": "production-run-name-tooltip-reference"
285
+ }, {
286
+ default: B(() => [
287
+ s("span", {
288
+ ref_key: "label",
289
+ ref: c,
290
+ "data-testid": "run-name-label",
291
+ class: ae(["block min-w-0", n.wrap ? "whitespace-normal break-words" : "truncate"])
292
+ }, b(n.name), 3)
293
+ ]),
294
+ _: 1
295
+ }, 8, ["content", "disabled"])
296
+ ], 40, vn);
297
+ };
298
+ }
299
+ }), yn = /* @__PURE__ */ lt(fn, [["__scopeId", "data-v-4d06048a"]]), _n = ["aria-label"], bn = { class: "min-w-0 truncate" }, hn = /* @__PURE__ */ oe({
300
+ __name: "ProductionRunSortHeader",
301
+ props: {
302
+ columnId: {},
303
+ label: {},
304
+ activeColumnId: {},
305
+ descending: { type: Boolean }
306
+ },
307
+ emits: ["toggle"],
308
+ setup(V, { emit: o }) {
309
+ const i = V, F = o, { t: c } = ie(), R = m(() => i.activeColumnId === i.columnId), g = m(
310
+ () => R.value ? c(`inventory.production.run.list.sort.${i.descending ? "descending" : "ascending"}`) : c("inventory.production.run.list.sort.unsorted")
311
+ ), f = m(
312
+ () => R.value ? i.descending ? "arrow_downward" : "arrow_upward" : "unfold_more"
313
+ ), w = m(
314
+ () => c("inventory.production.run.list.sort.label", {
315
+ column: i.label,
316
+ direction: g.value
317
+ })
318
+ ), l = _(null), v = _(null);
319
+ return Re(() => {
320
+ var n;
321
+ v.value = ((n = l.value) == null ? void 0 : n.closest("th")) ?? null;
322
+ }), wt(() => {
323
+ v.value && v.value.setAttribute(
324
+ "aria-sort",
325
+ R.value ? i.descending ? "descending" : "ascending" : "none"
326
+ );
327
+ }), Ie(() => {
328
+ var n;
329
+ return (n = v.value) == null ? void 0 : n.removeAttribute("aria-sort");
330
+ }), (n, d) => {
331
+ const T = ne("FmIcon");
332
+ return p(), k("button", {
333
+ ref_key: "button",
334
+ ref: l,
335
+ type: "button",
336
+ class: "production-run-sort-header flex h-[35px] w-full items-center gap-4 px-16 text-left fm-typo-en-body-md-600 text-fm-color-typo-secondary hover:text-fm-color-typo-primary focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-[-2px] focus-visible:outline-fm-color-primary",
337
+ "aria-label": w.value,
338
+ onClick: d[0] || (d[0] = rt((P) => F("toggle", n.columnId), ["stop"]))
339
+ }, [
340
+ s("span", bn, b(n.label), 1),
341
+ $(T, {
342
+ name: f.value,
343
+ size: "sm",
344
+ "aria-hidden": "true",
345
+ class: "shrink-0"
346
+ }, null, 8, ["name"])
347
+ ], 8, _n);
348
+ };
349
+ }
350
+ });
351
+ let gn = 0;
352
+ function xn(V, o = () => null, i = () => {
353
+ }, F = () => {
354
+ }, c = () => {
355
+ }, R = () => !1, g = (f) => `/production-run/${encodeURIComponent(f._id)}`) {
356
+ var P;
357
+ const { t: f } = ie(), w = Nt(), l = ++gn, v = _(null), n = (u) => `production-run-table-${l}-items-${encodeURIComponent(u._id)}`, d = (u, h) => {
358
+ const x = F();
359
+ return Q(hn, {
360
+ columnId: u,
361
+ label: h,
362
+ activeColumnId: x == null ? void 0 : x.id,
363
+ descending: x == null ? void 0 : x.desc,
364
+ onToggle: c
365
+ });
366
+ };
367
+ return { columnDefs: [
368
+ {
369
+ id: "runNo",
370
+ header: () => d("runNo", "#"),
371
+ enableSorting: !1,
372
+ size: 80,
373
+ meta: { headerClass: "p-0" },
374
+ cell: (u) => Q(
375
+ "span",
376
+ { class: "fm-typo-en-body-md-600 text-fm-color-typo-primary" },
377
+ `${u.row.original.runNo}`
378
+ )
379
+ },
380
+ {
381
+ id: "name",
382
+ header: () => d("name", f("inventory.production.run.list.columns.name")),
383
+ enableSorting: !1,
384
+ minSize: 240,
385
+ size: 320,
386
+ maxSize: 320,
387
+ meta: { headerClass: "p-0" },
388
+ cell: (u) => Q(yn, {
389
+ name: $e(
390
+ u.row.original,
391
+ f("inventory.production.run.list.untitled")
392
+ ),
393
+ href: g(u.row.original),
394
+ descriptionId: n(u.row.original),
395
+ wrap: R(),
396
+ onOpen: () => i(u.row.original),
397
+ onFocus: () => {
398
+ v.value = u.row.original._id;
399
+ },
400
+ onBlur: () => {
401
+ v.value === u.row.original._id && (v.value = null);
402
+ }
403
+ })
404
+ },
405
+ {
406
+ id: "items",
407
+ header: () => f("inventory.production.run.list.columns.items"),
408
+ enableSorting: !1,
409
+ minSize: 220,
410
+ size: 280,
411
+ maxSize: 280,
412
+ cell: (u) => Q(mn, {
413
+ run: u.row.original,
414
+ resolveSku: o,
415
+ descriptionId: n(u.row.original),
416
+ wrap: R(),
417
+ rowLinkFocused: v.value === u.row.original._id
418
+ })
419
+ },
420
+ ...(P = w.sessionUser.value) != null && P.role.isAdmin ? [
421
+ {
422
+ id: "statusForAdmin",
423
+ header: () => Q(at, {}, () => f("inventory.production.run.list.columns.status")),
424
+ cell: (u) => u.row.original.status,
425
+ enableSorting: !1,
426
+ size: 120
427
+ }
428
+ ] : [],
429
+ {
430
+ id: "status",
431
+ header: () => d("status", f("inventory.production.run.list.columns.status")),
432
+ enableSorting: !1,
433
+ size: 120,
434
+ meta: { headerClass: "p-0" },
435
+ cell: (u) => Q(Et, { status: u.row.original.status })
436
+ },
437
+ {
438
+ id: "updatedAt",
439
+ header: () => d("updatedAt", f("inventory.production.run.list.columns.updated")),
440
+ enableSorting: !1,
441
+ minSize: 180,
442
+ size: 200,
443
+ maxSize: 200,
444
+ meta: { headerClass: "p-0" },
445
+ cell: (u) => {
446
+ const h = u.row.original, x = it(h);
447
+ return Q(
448
+ "span",
449
+ { class: "fm-typo-en-body-md-400 text-fm-color-typo-primary whitespace-nowrap" },
450
+ Ut((x == null ? void 0 : x.at) ?? h.createdAt)
451
+ );
452
+ }
453
+ },
454
+ {
455
+ id: "action",
456
+ header: "",
457
+ enableSorting: !1,
458
+ cell: (u) => Q(Zt, {
459
+ run: u.row.original,
460
+ onAction: (h) => V(h, u.row.original)
461
+ }),
462
+ size: 40,
463
+ meta: {
464
+ cellClass: "",
465
+ headerClass: ""
466
+ }
467
+ }
468
+ ] };
469
+ }
470
+ const wn = { class: "sr-only" }, kn = ["aria-label"], Rn = {
471
+ key: 0,
472
+ "data-testid": "production-run-history-scope",
473
+ class: "flex shrink-0 flex-wrap items-center justify-between gap-8"
474
+ }, In = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, $n = {
475
+ key: 1,
476
+ role: "alert",
477
+ class: "w-full fm-typo-en-body-sm-400 text-fm-color-typo-secondary"
478
+ }, Sn = ["aria-label"], An = ["aria-label"], Cn = {
479
+ key: 2,
480
+ "data-testid": "production-run-list-empty",
481
+ class: "rounded-md border border-dashed border-fm-color-neutral-gray-200 p-48 text-center"
482
+ }, Nn = { class: "fm-typo-en-body-lg-600 text-fm-color-typo-primary" }, Fn = { class: "mx-auto mt-4 max-w-[25rem] fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Pn = {
483
+ key: 3,
484
+ "data-testid": "production-run-list-no-match",
485
+ class: "rounded-md border border-dashed border-fm-color-neutral-gray-200 p-40 text-center"
486
+ }, Dn = { class: "fm-typo-en-body-lg-600 text-fm-color-typo-primary" }, Tn = { class: "mx-auto mt-4 max-w-[25rem] fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Mn = { class: "flex flex-col gap-[8px] py-[8px]" }, zn = {
487
+ "data-testid": "production-run-mobile-run-number",
488
+ class: "flex items-center gap-[4px]"
489
+ }, Ln = { class: "fm-typo-en-body-md-400 text-fm-color-typo-primary" }, Vn = { class: "flex min-w-0 flex-col gap-[2px]" }, On = { class: "text-[12px] font-medium leading-[18px] text-fm-color-typo-secondary" }, En = { class: "fm-typo-en-body-lg-600 text-fm-color-typo-primary" }, Un = { class: "flex min-w-0 flex-col gap-[2px]" }, qn = { class: "text-[12px] font-medium leading-[18px] text-fm-color-typo-secondary" }, jn = {
490
+ "data-testid": "production-run-admin-status",
491
+ class: "flex flex-col gap-[4px]"
492
+ }, Wn = { class: "text-[12px] font-medium leading-[18px] text-fm-color-typo-secondary" }, Hn = { class: "flex flex-col gap-[2px]" }, Bn = { class: "text-[12px] font-medium leading-[18px] text-fm-color-typo-secondary" }, Yn = { class: "flex flex-col gap-[2px]" }, Qn = { class: "text-[12px] font-medium leading-[18px] text-fm-color-typo-secondary" }, Gn = /* @__PURE__ */ oe({
493
+ __name: "ProductionRunView",
494
+ setup(V) {
495
+ const { t: o } = ie(), i = $t(), F = St(), c = At(), R = qt(), g = Qt(), f = Gt(), w = Ft();
496
+ jt();
497
+ const l = _([]), v = _(!1), n = _(null), d = _(null), T = _(!1), P = _(null), u = m(() => ({
498
+ loading: v.value || T.value,
499
+ loaded: !v.value && !n.value,
500
+ hasMore: d.value !== null,
501
+ error: P.value ?? n.value
502
+ })), h = _(""), x = _("all"), O = _([{ id: "updatedAt", desc: !0 }]), Y = _(!1), I = _(null), z = _(null), G = _(null);
503
+ let E = 0, L = 0;
504
+ const Z = m(
505
+ () => l.value.find((e) => e._id === z.value) ?? null
506
+ ), _e = Wt(() => Z.value), be = m(() => !!Z.value && ke(Z.value)), K = m(
507
+ () => _e.ingredientLines.value.map((e) => ({
508
+ skuId: e.skuId,
509
+ name: e.name,
510
+ unit: e.unit,
511
+ unitRef: e.unitRef,
512
+ outputSkuIds: e.outputSkuIds
513
+ }))
514
+ );
515
+ function re() {
516
+ return n.value ? a() : S();
517
+ }
518
+ function le() {
519
+ L++, G.value = null, z.value = null, I.value = null, Y.value = !1;
520
+ }
521
+ async function a() {
522
+ const e = ++E;
523
+ v.value = !0, n.value = null, d.value = null, T.value = !1, P.value = null;
524
+ try {
525
+ const t = await R.list();
526
+ if (e !== E) return;
527
+ l.value = t.items, d.value = t.nextCursor;
528
+ } catch (t) {
529
+ if (e !== E) return;
530
+ const y = xe(t);
531
+ n.value = y.message, c == null || c.open({
532
+ title: o("inventory.production.run.list.error.load"),
533
+ message: y.message,
534
+ type: "error"
535
+ });
536
+ } finally {
537
+ e === E && (v.value = !1);
538
+ }
539
+ }
540
+ async function S() {
541
+ const e = d.value;
542
+ if (!e || v.value || T.value) return;
543
+ const t = E;
544
+ T.value = !0, P.value = null;
545
+ try {
546
+ const y = await R.list({ cursor: e });
547
+ if (t !== E || e !== d.value) return;
548
+ if (y.nextCursor === e)
549
+ throw new Error(o("inventory.production.run.list.history.cursorError"));
550
+ const C = new Set(l.value.map((q) => q._id));
551
+ l.value = [...l.value, ...y.items.filter((q) => !C.has(q._id))], d.value = y.nextCursor;
552
+ } catch (y) {
553
+ t === E && (P.value = xe(y).message);
554
+ } finally {
555
+ t === E && (T.value = !1);
556
+ }
557
+ }
558
+ let D;
559
+ g.watchLocation(async () => {
560
+ var t;
561
+ const e = ((t = g._currentLocation) == null ? void 0 : t.dbName) ?? null;
562
+ if (e !== D) {
563
+ if (D = e, le(), !e) {
564
+ E++, l.value = [];
565
+ return;
566
+ }
567
+ await a();
568
+ }
569
+ });
570
+ const A = m(
571
+ () => Kt.map((e) => ({
572
+ label: o(`inventory.production.run.list.tabs.${e.key}`),
573
+ value: e.key
574
+ }))
575
+ );
576
+ function j(e) {
577
+ var t;
578
+ return ((t = it(e)) == null ? void 0 : t.at) ?? e.createdAt;
579
+ }
580
+ function W(e, t, y) {
581
+ switch (y) {
582
+ case "runNo":
583
+ return e.runNo - t.runNo;
584
+ case "name":
585
+ return ot(e).localeCompare(ot(t));
586
+ case "status":
587
+ return nt(e.status) - nt(t.status);
588
+ case "updatedAt":
589
+ return Date.parse(j(e)) - Date.parse(j(t));
590
+ default:
591
+ return 0;
592
+ }
593
+ }
594
+ const U = m(() => {
595
+ const e = l.value.filter(
596
+ (C) => Jt(C, x.value) && Xt(C, h.value, Se)
597
+ ), t = O.value[0];
598
+ if (!t)
599
+ return e.sort(
600
+ (C, q) => W(q, C, "updatedAt") || W(q, C, "runNo")
601
+ );
602
+ const y = t.desc ? -1 : 1;
603
+ return e.sort(
604
+ (C, q) => y * W(C, q, t.id) || W(q, C, "runNo")
605
+ );
606
+ }), { breakpoints: ue } = Ct(), ee = m(() => ue.value.xs || ue.value.sm), ut = m(() => ee.value ? 10 : 20), ct = m(() => ee.value ? { height: `calc(${w.tableHeight.height} - 16px)` } : w.tableHeight), dt = m(
607
+ () => ee.value ? U.value.map((e) => `${e._id}:${e._rev}`).join("|") : "desktop"
608
+ );
609
+ function pt() {
610
+ h.value = "", x.value = "all";
611
+ }
612
+ function mt(e) {
613
+ const t = O.value[0];
614
+ O.value = [
615
+ (t == null ? void 0 : t.id) === e ? { id: e, desc: !t.desc } : { id: e, desc: !1 }
616
+ ];
617
+ }
618
+ function Se(e) {
619
+ return f.skuById[e];
620
+ }
621
+ function he(e) {
622
+ i.push(tt(e._id));
623
+ }
624
+ function vt(e) {
625
+ return i.resolve(tt(e._id)).href;
626
+ }
627
+ function ft(e, t) {
628
+ const y = ++L;
629
+ if (z.value = t._id, G.value = null, e === "request") {
630
+ F.open(Yt(o)).onPrimary(() => void yt(t._id, y));
631
+ return;
632
+ }
633
+ G.value = e;
634
+ }
635
+ async function yt(e, t) {
636
+ if (!(t !== L || z.value !== e))
637
+ try {
638
+ const y = await R.request(e);
639
+ if (t !== L || z.value !== e || !Ae(y)) return;
640
+ c == null || c.open({
641
+ title: o("inventory.production.run.list.request.success"),
642
+ message: o("inventory.production.run.list.request.successMessage", {
643
+ name: $e(y, o("inventory.production.run.list.untitled"))
644
+ }),
645
+ type: "success"
646
+ }), z.value = null;
647
+ } catch (y) {
648
+ if (t !== L || z.value !== e) return;
649
+ c == null || c.open({
650
+ title: o("inventory.production.run.list.error.action", {
651
+ action: o("inventory.production.run.list.rowActions.request")
652
+ }),
653
+ message: xe(y).message,
654
+ type: "error"
655
+ });
656
+ }
657
+ }
658
+ function Ae(e) {
659
+ const t = l.value.findIndex((C) => C._id === e._id);
660
+ if (t < 0) return !1;
661
+ const y = [...l.value];
662
+ return y[t] = e, l.value = y, !0;
663
+ }
664
+ function se(e) {
665
+ z.value === e._id && Ae(e);
666
+ }
667
+ function _t(e) {
668
+ e === null && (G.value = null, z.value = null);
669
+ }
670
+ function bt() {
671
+ le(), a();
672
+ }
673
+ const { columnDefs: ht } = xn(
674
+ ft,
675
+ Se,
676
+ he,
677
+ () => O.value[0],
678
+ mt,
679
+ () => ee.value,
680
+ vt
681
+ );
682
+ function Ce(e) {
683
+ e === "refresh" && a(), e === "create" && (I.value = null, Y.value = !0);
684
+ }
685
+ const gt = m(() => [
686
+ {
687
+ label: o("inventory.common.refresh"),
688
+ value: "refresh",
689
+ prependIcon: "refresh"
690
+ },
691
+ {
692
+ label: o("inventory.production.run.list.actions.create"),
693
+ value: "create",
694
+ prependIcon: "add",
695
+ testId: "production-run-mobile-create",
696
+ isPrimary: !0
697
+ }
698
+ ]);
699
+ function xt() {
700
+ I.value = null, a();
701
+ }
702
+ return (e, t) => {
703
+ const y = ne("FmTabs"), C = ne("FmButton"), q = ne("FmTable");
704
+ return p(), X(Pt, {
705
+ title: r(o)("inventory.production.run.list.title"),
706
+ "helper-text": r(o)("inventory.production.run.list.caption"),
707
+ actions: gt.value,
708
+ "onClick:action": Ce
709
+ }, {
710
+ default: B(() => {
711
+ var Ne;
712
+ return [
713
+ s("div", {
714
+ "data-testid": "production-run-list-content",
715
+ class: ae([
716
+ "flex w-full max-h-full flex-col gap-12",
717
+ {
718
+ "p-0": ee.value,
719
+ "px-24": !ee.value
720
+ }
721
+ ])
722
+ }, [
723
+ s("h1", wn, b(r(o)("inventory.production.run.list.title")), 1),
724
+ $(Tt, {
725
+ "change-location": "",
726
+ searchable: "",
727
+ search: h.value,
728
+ "onUpdate:search": t[0] || (t[0] = (N) => h.value = N)
729
+ }, null, 8, ["search"]),
730
+ s("div", {
731
+ class: "flex min-w-0 shrink-0 flex-col gap-12",
732
+ "data-testid": "production-run-list-controls",
733
+ onVnodeMounted: t[2] || (t[2] = //@ts-ignore
734
+ (...N) => r(w).onMounted && r(w).onMounted(...N)),
735
+ onVnodeUnmounted: t[3] || (t[3] = //@ts-ignore
736
+ (...N) => r(w).onUnmounted && r(w).onUnmounted(...N))
737
+ }, [
738
+ s("nav", {
739
+ class: "min-w-0 overflow-x-auto",
740
+ "aria-label": r(o)("inventory.production.run.list.tabsLabel")
741
+ }, [
742
+ $(y, {
743
+ "model-value": x.value,
744
+ "onUpdate:modelValue": t[1] || (t[1] = (N) => x.value = N),
745
+ items: A.value
746
+ }, null, 8, ["model-value", "items"])
747
+ ], 8, kn),
748
+ !v.value && !n.value && (d.value || P.value) ? (p(), k("div", Rn, [
749
+ s("p", In, b(r(o)("inventory.production.run.list.history.scope", { count: l.value.length })), 1),
750
+ d.value ? (p(), X(C, {
751
+ key: 0,
752
+ "data-testid": "production-run-load-more",
753
+ variant: "secondary",
754
+ label: r(o)("inventory.production.run.list.history.loadMore"),
755
+ loading: T.value,
756
+ disabled: T.value,
757
+ onClick: S
758
+ }, null, 8, ["label", "loading", "disabled"])) : H("", !0),
759
+ P.value ? (p(), k("p", $n, b(P.value), 1)) : H("", !0)
760
+ ])) : H("", !0)
761
+ ], 512),
762
+ s("div", {
763
+ id: "production-run-list-panel",
764
+ role: "region",
765
+ "aria-label": r(o)("inventory.production.run.list.tabsLabel"),
766
+ class: ae(["flex min-h-0 flex-col", !v.value && !n.value && U.value.length ? "" : "overflow-y-auto"])
767
+ }, [
768
+ v.value ? (p(), k("div", {
769
+ key: 0,
770
+ "data-testid": "production-run-list-loading",
771
+ role: "status",
772
+ class: "w-full space-y-12",
773
+ "aria-busy": "true",
774
+ "aria-label": r(o)("inventory.production.run.list.loading")
775
+ }, [
776
+ (p(), k(J, null, we(6, (N) => s("div", {
777
+ key: N,
778
+ "data-testid": "production-run-list-skeleton-row",
779
+ class: "h-80 w-full animate-pulse rounded-md bg-fm-color-neutral-gray-100"
780
+ })), 64))
781
+ ], 8, An)) : n.value ? (p(), X(Rt, {
782
+ key: 1,
783
+ "data-testid": "production-run-list-error",
784
+ class: "m-16",
785
+ role: "alert",
786
+ tone: "critical",
787
+ title: r(o)("inventory.production.run.list.error.load"),
788
+ message: n.value
789
+ }, {
790
+ actions: B(() => [
791
+ $(C, {
792
+ "data-testid": "production-run-list-retry",
793
+ label: r(o)("inventory.production.run.list.error.retry"),
794
+ variant: "secondary",
795
+ onClick: a
796
+ }, null, 8, ["label"])
797
+ ]),
798
+ _: 1
799
+ }, 8, ["title", "message"])) : l.value.length === 0 ? (p(), k("div", Cn, [
800
+ s("div", Nn, b(r(o)("inventory.production.run.list.empty.noneTitle")), 1),
801
+ s("div", Fn, b(r(o)("inventory.production.run.list.empty.noneDescription")), 1),
802
+ $(C, {
803
+ "data-testid": "production-run-list-empty-create",
804
+ class: "mx-auto mt-16",
805
+ label: r(o)("inventory.production.run.list.empty.create"),
806
+ "prepend-icon": "add",
807
+ onClick: t[4] || (t[4] = (N) => Ce("create"))
808
+ }, null, 8, ["label"])
809
+ ])) : U.value.length === 0 ? (p(), k("div", Pn, [
810
+ s("div", Dn, b(r(o)("inventory.production.run.list.empty.noMatchTitle")), 1),
811
+ s("div", Tn, b(h.value.trim() ? r(o)("inventory.production.run.list.empty.searchDescription", {
812
+ query: h.value.trim()
813
+ }) : r(o)("inventory.production.run.list.empty.noMatchDescription")), 1),
814
+ $(C, {
815
+ "data-testid": "production-run-list-clear-filters",
816
+ class: "mx-auto mt-12",
817
+ label: r(o)("inventory.production.run.list.empty.clearFilters"),
818
+ "aria-label": r(o)("inventory.production.run.list.empty.clearFilters"),
819
+ variant: "tertiary",
820
+ onClick: pt
821
+ }, null, 8, ["label", "aria-label"])
822
+ ])) : (p(), X(q, {
823
+ key: dt.value,
824
+ class: "production-run-table",
825
+ style: kt(ct.value),
826
+ "column-defs": r(ht),
827
+ "row-data": U.value,
828
+ loading: v.value,
829
+ "page-size": ut.value,
830
+ "pin-header-row": !1,
831
+ onRowClick: t[5] || (t[5] = (N) => he(N.original))
832
+ }, {
833
+ "list-row": B((N) => [
834
+ $(Dt, {
835
+ "data-testid": "production-run-mobile-row",
836
+ class: "production-run-mobile-row !py-8",
837
+ row: N,
838
+ onRowClick: he
839
+ }, {
840
+ default: B((M) => {
841
+ var Fe, Pe, De, ce, Te, Me, ze, Le, de, Ve, Oe, Ee, Ue, pe, qe, je, We, He, me, Be, Ye, Qe, Ge, ve, Ke;
842
+ return [
843
+ s("div", Mn, [
844
+ s("div", zn, [
845
+ t[7] || (t[7] = s("span", { class: "text-[12px] font-medium leading-[18px] text-fm-color-typo-secondary" }, "#", -1)),
846
+ s("div", Ln, [
847
+ $(r(te), {
848
+ render: (De = (Pe = (Fe = M.runNo) == null ? void 0 : Fe.column) == null ? void 0 : Pe.columnDef) == null ? void 0 : De.cell,
849
+ props: (Te = (ce = M.runNo) == null ? void 0 : ce.getContext) == null ? void 0 : Te.call(ce)
850
+ }, null, 8, ["render", "props"])
851
+ ])
852
+ ]),
853
+ s("div", Vn, [
854
+ s("span", On, b(r(o)("inventory.production.run.list.columns.name")), 1),
855
+ s("div", En, [
856
+ $(r(te), {
857
+ render: (Le = (ze = (Me = M.name) == null ? void 0 : Me.column) == null ? void 0 : ze.columnDef) == null ? void 0 : Le.cell,
858
+ props: (Ve = (de = M.name) == null ? void 0 : de.getContext) == null ? void 0 : Ve.call(de)
859
+ }, null, 8, ["render", "props"])
860
+ ])
861
+ ]),
862
+ s("div", Un, [
863
+ s("span", qn, b(r(o)("inventory.production.run.list.columns.items")), 1),
864
+ $(r(te), {
865
+ render: (Ue = (Ee = (Oe = M.items) == null ? void 0 : Oe.column) == null ? void 0 : Ee.columnDef) == null ? void 0 : Ue.cell,
866
+ props: (qe = (pe = M.items) == null ? void 0 : pe.getContext) == null ? void 0 : qe.call(pe)
867
+ }, null, 8, ["render", "props"])
868
+ ]),
869
+ M.statusForAdmin ? (p(), X(at, { key: 0 }, {
870
+ default: B(() => {
871
+ var Je, Xe, Ze, fe, et;
872
+ return [
873
+ s("div", jn, [
874
+ s("span", Wn, b(r(o)("inventory.production.run.list.columns.status")), 1),
875
+ $(r(te), {
876
+ render: (Ze = (Xe = (Je = M.statusForAdmin) == null ? void 0 : Je.column) == null ? void 0 : Xe.columnDef) == null ? void 0 : Ze.cell,
877
+ props: (et = (fe = M.statusForAdmin) == null ? void 0 : fe.getContext) == null ? void 0 : et.call(fe)
878
+ }, null, 8, ["render", "props"])
879
+ ])
880
+ ];
881
+ }),
882
+ _: 2
883
+ }, 1024)) : H("", !0),
884
+ s("div", Hn, [
885
+ s("span", Bn, b(r(o)("inventory.production.run.list.columns.status")), 1),
886
+ $(r(te), {
887
+ render: (He = (We = (je = M.status) == null ? void 0 : je.column) == null ? void 0 : We.columnDef) == null ? void 0 : He.cell,
888
+ props: (Be = (me = M.status) == null ? void 0 : me.getContext) == null ? void 0 : Be.call(me)
889
+ }, null, 8, ["render", "props"])
890
+ ]),
891
+ s("div", Yn, [
892
+ s("span", Qn, b(r(o)("inventory.production.run.list.columns.updated")), 1),
893
+ $(r(te), {
894
+ render: (Ge = (Qe = (Ye = M.updatedAt) == null ? void 0 : Ye.column) == null ? void 0 : Qe.columnDef) == null ? void 0 : Ge.cell,
895
+ props: (Ke = (ve = M.updatedAt) == null ? void 0 : ve.getContext) == null ? void 0 : Ke.call(ve)
896
+ }, null, 8, ["render", "props"])
897
+ ])
898
+ ])
899
+ ];
900
+ }),
901
+ _: 2
902
+ }, 1032, ["row"])
903
+ ]),
904
+ _: 1
905
+ }, 8, ["style", "column-defs", "row-data", "loading", "page-size"]))
906
+ ], 10, Sn)
907
+ ], 2),
908
+ Y.value ? (p(), X(Ht, {
909
+ key: 0,
910
+ show: !0,
911
+ run: I.value,
912
+ "duplicate-sources": l.value,
913
+ "duplicate-source-state": u.value,
914
+ onLoadMoreDuplicateSources: re,
915
+ "onUpdate:show": t[6] || (t[6] = (N) => Y.value = N),
916
+ onSaved: xt
917
+ }, null, 8, ["run", "duplicate-sources", "duplicate-source-state"])) : H("", !0),
918
+ $(Bt, {
919
+ action: G.value,
920
+ run: Z.value,
921
+ "location-name": ((Ne = r(g)._currentLocation) == null ? void 0 : Ne.name) ?? null,
922
+ "duplicate-sources": l.value,
923
+ "duplicate-source-state": u.value,
924
+ onLoadMoreDuplicateSources: re,
925
+ "at-target": be.value,
926
+ ingredients: K.value,
927
+ "onUpdate:action": _t,
928
+ onEdited: se,
929
+ onIssued: se,
930
+ onRecorded: se,
931
+ onClosed: se,
932
+ onCancelled: se,
933
+ onReload: bt
934
+ }, null, 8, ["action", "run", "location-name", "duplicate-sources", "duplicate-source-state", "at-target", "ingredients"])
935
+ ];
936
+ }),
937
+ _: 1
938
+ }, 8, ["title", "helper-text", "actions"]);
939
+ };
940
+ }
941
+ }), Kn = /* @__PURE__ */ lt(Gn, [["__scopeId", "data-v-7dab6ed2"]]), po = /* @__PURE__ */ oe({
942
+ __name: "ProductionRunPage",
943
+ setup(V) {
944
+ return (o, i) => (p(), X(It, { "feature-key": "production-runs" }, {
945
+ default: B(() => [
946
+ $(Kn)
947
+ ]),
948
+ _: 1
949
+ }));
950
+ }
951
+ });
952
+ export {
953
+ po as default
954
+ };