@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
@@ -1,930 +0,0 @@
1
- import { defineComponent as ae, computed as m, createElementBlock as k, createCommentVNode as H, openBlock as p, withModifiers as ot, createVNode as C, unref as r, ref as h, watch as fe, onMounted as ke, onBeforeUnmount as Re, resolveComponent as ne, Fragment as X, createElementVNode as s, createTextVNode as _e, toDisplayString as b, withCtx as G, renderList as xe, normalizeClass as se, nextTick as rt, watchEffect as xt, h as Q, createBlock as ee, normalizeStyle as wt } from "vue";
2
- import { _ as kt, F as te } from "./TableActionableRow.vue_vue_type_script_setup_true_lang-DAMpuZ1X.js";
3
- import { useRouter as Rt } from "vue-router";
4
- import { useDialog as It, useSnackbar as $t, useBreakpoints as St } from "@feedmepos/ui-library";
5
- import { useI18n as ie, useCoreStore as At } from "@feedmepos/mf-common";
6
- import { u as Ct, _ as Ft } from "./SingleColumnLayout.vue_vue_type_script_setup_true_lang-DpwneGOV.js";
7
- import { F as st } from "./FmAdminBadge-DlplQOHb.js";
8
- import { p as Ie, a as Nt, i as we, _ as Pt, h as Tt, b as Dt, f as Mt, c as zt, d as at, e as Lt, u as Vt, g as Ot, j as Et, P as qt, m as Ut, k as jt, l as Wt, n as Ht, o as Bt, q as ge, r as et, s as tt, t as nt, v as Yt } from "./ProductionRunLifecycleDialogs.vue_vue_type_script_setup_true_lang-DwBY6gIb.js";
9
- import { _ as Qt } from "./FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-D_o6pX9i.js";
10
- import { u as Gt, a as Kt } from "./app-Duum3eHx.js";
11
- import { _ as it } from "./_plugin-vue_export-helper-CHgC5LLL.js";
12
- const Jt = /* @__PURE__ */ ae({
13
- __name: "ProductionRunActionsCell",
14
- props: {
15
- run: {}
16
- },
17
- emits: ["action"],
18
- setup(q, { emit: o }) {
19
- const i = q, N = o, { t: u } = ie(), R = m(
20
- () => Ie(i.run, u("inventory.production.run.list.untitled"))
21
- ), x = {
22
- request: 0,
23
- prepare: 0,
24
- complete: 0,
25
- update: 1,
26
- close: 1,
27
- cancel: 2
28
- }, f = m(
29
- () => Nt(i.run).filter(({ action: t }) => t !== "request" || i.run.plan.items.length > 0).sort((t, d) => we(i.run) && t.action === "close" ? -1 : we(i.run) && d.action === "close" ? 1 : x[t.action] - x[d.action]).map(({ action: t }) => t)
30
- );
31
- function w(t) {
32
- return t === "complete" && Tt(i.run) ? u("inventory.production.run.detail.pendingStock.resume") : u(`inventory.production.run.list.rowActions.${t}`);
33
- }
34
- const c = m(
35
- () => f.value.map((t) => ({
36
- id: t,
37
- label: w(t),
38
- destructive: t === "cancel"
39
- }))
40
- );
41
- function v(t) {
42
- N("action", t);
43
- }
44
- return (t, d) => f.value.length ? (p(), k("div", {
45
- key: 0,
46
- class: "production-run-action-interactive relative flex items-center justify-center",
47
- onClick: d[0] || (d[0] = ot(() => {
48
- }, ["stop"]))
49
- }, [
50
- C(Pt, {
51
- items: c.value,
52
- placement: "bottom-end",
53
- "menu-testid": "run-actions-menu",
54
- "accessible-label": r(u)("inventory.production.run.list.actionsFor", { name: R.value }),
55
- onSelect: v
56
- }, null, 8, ["items", "accessible-label"])
57
- ])) : H("", !0);
58
- }
59
- }), Xt = ["id"], Zt = {
60
- key: 0,
61
- class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary"
62
- }, en = {
63
- key: 1,
64
- class: "production-run-items-interactive relative min-w-0"
65
- }, tn = { class: "min-w-0 overflow-hidden whitespace-nowrap" }, nn = {
66
- key: 0,
67
- class: "shrink-0",
68
- "aria-hidden": "true"
69
- }, on = ["data-hidden-count"], rn = ["aria-label"], sn = { class: "fm-typo-en-body-sm-600 mb-8 text-fm-color-typo-primary" }, an = { class: "flex flex-col gap-8 border-t border-fm-color-neutral-gray-100 pt-8" }, ln = { class: "text-fm-color-typo-primary" }, un = { class: "shrink-0 text-fm-color-typo-secondary" };
70
- let cn = 0;
71
- const dn = /* @__PURE__ */ ae({
72
- __name: "ProductionRunItemsCell",
73
- props: {
74
- run: {},
75
- resolveSku: {},
76
- rowLinkFocused: { type: Boolean, default: !1 },
77
- descriptionId: {},
78
- wrap: { type: Boolean, default: !1 }
79
- },
80
- setup(q) {
81
- const o = q, { t: i } = ie(), N = h(!1), u = m(() => N.value || o.rowLinkFocused), R = h(null), x = h(null), f = h(null), w = h(Number.POSITIVE_INFINITY), c = h(!1), v = typeof navigator < "u" && /safari/i.test(navigator.userAgent) && !/(chrome|chromium|crios|android)/i.test(navigator.userAgent), t = ++cn, d = `production-run-items-tooltip-${t}`, T = `production-run-items-description-${t}`, P = m(() => o.descriptionId ?? T), l = 44;
82
- let _ = null, g = null, O = null, B = !1;
83
- const I = m(
84
- () => o.run.plan.items.map((a, S) => {
85
- const D = o.resolveSku(a.skuId), $ = Dt(a.measurement) ? a.measurement : null, V = ($ == null ? void 0 : $.abbrev) ?? null, j = Mt(a.requestedAmount, V, {
86
- precision: a.requestedAmount.precision
87
- });
88
- return {
89
- key: `${a.skuId}-${S}`,
90
- name: (D == null ? void 0 : D.name) ?? a.skuId,
91
- quantity: V ? j : `${j} · ${i("inventory.production.run.list.itemsUnitUnresolved")}`
92
- };
93
- })
94
- ), z = m(() => I.value.slice(0, w.value)), K = m(() => I.value.map(({ name: a }) => a).join(", ")), U = m(() => z.value.map(({ name: a }) => a).join(", ")), L = m(
95
- () => o.wrap ? 0 : Math.max(0, I.value.length - z.value.length)
96
- ), Z = m(() => L.value > 99 ? "99+" : `+${L.value}`), ye = m(
97
- () => I.value.map(({ name: a, quantity: S }) => `${a}: ${S}`).join(", ")
98
- );
99
- function he() {
100
- if (o.wrap) {
101
- w.value = I.value.length, c.value = !1;
102
- return;
103
- }
104
- const a = x.value, S = f.value;
105
- if (!a || !S || a.clientWidth <= 0) return;
106
- const D = Array.from(S.children).map((W) => W.offsetWidth);
107
- if (!D.length || D.reduce((W, Y) => W + Y, 0) <= a.clientWidth) {
108
- w.value = I.value.length, c.value = !1;
109
- return;
110
- }
111
- c.value = !0;
112
- const $ = Math.max(0, a.clientWidth - l);
113
- let V = 0, j = 0;
114
- for (const W of D) {
115
- if (V + W > $) break;
116
- V += W, j++;
117
- }
118
- w.value = Math.min(I.value.length, Math.max(1, j + 1));
119
- }
120
- function J() {
121
- B || (B = !0, rt(() => {
122
- B = !1, he();
123
- }));
124
- }
125
- function oe() {
126
- _ && (g !== x.value && (g && _.unobserve(g), g = x.value, g && _.observe(g)), O !== f.value && (O && _.unobserve(O), O = f.value, O && _.observe(O)), J());
127
- }
128
- fe(
129
- () => I.value.map(({ name: a }) => a).join("\0"),
130
- () => {
131
- w.value = Number.POSITIVE_INFINITY, J();
132
- },
133
- { flush: "post" }
134
- ), fe(
135
- () => o.wrap,
136
- () => {
137
- w.value = Number.POSITIVE_INFINITY, J();
138
- },
139
- { flush: "post" }
140
- ), fe([x, f], oe, { flush: "post" }), ke(() => {
141
- typeof ResizeObserver < "u" && (_ = new ResizeObserver(J), oe()), J();
142
- }), Re(() => _ == null ? void 0 : _.disconnect());
143
- function le(a) {
144
- var S, D;
145
- a !== u.value && (u.value ? (S = R.value) == null || S.show() : (D = R.value) == null || D.hide());
146
- }
147
- return (a, S) => {
148
- const D = ne("FmPopover");
149
- return p(), k(X, null, [
150
- s("span", {
151
- id: P.value,
152
- "data-testid": "run-items-a11y-description",
153
- class: "sr-only"
154
- }, [
155
- L.value ? (p(), k(X, { key: 0 }, [
156
- _e(b(r(i)("inventory.production.run.list.itemsHidden", { count: L.value })) + ". ", 1)
157
- ], 64)) : H("", !0),
158
- _e(" " + b(I.value.length ? r(i)("inventory.production.run.list.itemsLabel", { names: ye.value }) : r(i)("inventory.production.run.list.itemsNone")), 1)
159
- ], 8, Xt),
160
- I.value.length === 0 ? (p(), k("span", Zt, b(r(i)("inventory.production.run.list.itemsNone")), 1)) : (p(), k("div", en, [
161
- C(D, {
162
- ref_key: "popover",
163
- ref: R,
164
- "show-popover": u.value,
165
- placement: "bottom-start",
166
- onPopoverChanged: le
167
- }, {
168
- "popover-button": G(() => [
169
- s("div", {
170
- ref_key: "disclosureContainer",
171
- ref: x,
172
- "data-testid": "items-disclosure-container",
173
- class: se(["flex w-full max-w-full min-w-0 gap-4 text-left", a.wrap ? "items-start overflow-visible" : "items-center overflow-hidden"]),
174
- onMouseenter: S[0] || (S[0] = ($) => N.value = !0),
175
- onMouseleave: S[1] || (S[1] = ($) => N.value = !1)
176
- }, [
177
- s("span", {
178
- "data-testid": "run-items-summary",
179
- class: se([
180
- "fm-typo-en-body-md-400 min-w-0 flex-1 text-fm-color-typo-primary",
181
- a.wrap ? "whitespace-normal break-words" : r(v) ? "flex overflow-hidden whitespace-nowrap" : "truncate"
182
- ])
183
- }, [
184
- r(v) && !a.wrap ? (p(), k(X, { key: 0 }, [
185
- s("span", tn, b(U.value), 1),
186
- c.value ? (p(), k("span", nn, "…")) : H("", !0)
187
- ], 64)) : (p(), k(X, { key: 1 }, [
188
- _e(b(K.value), 1)
189
- ], 64))
190
- ], 2),
191
- L.value ? (p(), k("span", {
192
- key: 0,
193
- "data-testid": "run-items-overflow",
194
- "data-hidden-count": L.value,
195
- "data-production-info-size": "sm",
196
- "aria-hidden": "true",
197
- 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"
198
- }, b(Z.value), 9, on)) : H("", !0),
199
- s("span", {
200
- ref_key: "measureRail",
201
- ref: f,
202
- "data-testid": "run-items-measure",
203
- "aria-hidden": "true",
204
- class: "fm-typo-en-body-md-400 pointer-events-none invisible absolute w-max whitespace-nowrap"
205
- }, [
206
- (p(!0), k(X, null, xe(I.value, ($, V) => (p(), k("span", {
207
- key: $.key,
208
- "data-testid": "run-item-measure"
209
- }, b(V ? `, ${$.name}` : $.name), 1))), 128))
210
- ], 512)
211
- ], 34)
212
- ]),
213
- default: G(() => [
214
- s("div", {
215
- id: d,
216
- "data-testid": "run-items-disclosure",
217
- role: "tooltip",
218
- "aria-label": r(i)("inventory.production.run.list.itemsDisclosure"),
219
- class: "pointer-events-none min-w-[288px] p-12"
220
- }, [
221
- s("h3", sn, b(r(i)("inventory.production.run.list.itemsCount", { count: I.value.length })), 1),
222
- s("ul", an, [
223
- (p(!0), k(X, null, xe(I.value, ($) => (p(), k("li", {
224
- key: $.key,
225
- class: "fm-typo-en-body-sm-400 flex items-start justify-between gap-16"
226
- }, [
227
- s("span", ln, b($.name), 1),
228
- s("span", un, b($.quantity), 1)
229
- ]))), 128))
230
- ])
231
- ], 8, rn)
232
- ]),
233
- _: 1
234
- }, 8, ["show-popover"])
235
- ]))
236
- ], 64);
237
- };
238
- }
239
- }), pn = ["href", "aria-describedby"], mn = /* @__PURE__ */ ae({
240
- __name: "ProductionRunNameCell",
241
- props: {
242
- name: {},
243
- href: {},
244
- descriptionId: {},
245
- wrap: { type: Boolean, default: !1 }
246
- },
247
- emits: ["open", "focus", "blur"],
248
- setup(q, { emit: o }) {
249
- const i = q, N = o, u = h(null), R = h(!1);
250
- let x = null, f = !1;
251
- function w() {
252
- const t = u.value;
253
- R.value = !i.wrap && !!t && t.scrollWidth > t.clientWidth;
254
- }
255
- function c() {
256
- f || (f = !0, rt(() => {
257
- f = !1, w();
258
- }));
259
- }
260
- fe(() => [i.name, i.wrap], c, { flush: "post" }), ke(() => {
261
- typeof ResizeObserver < "u" && u.value && (x = new ResizeObserver(c), x.observe(u.value)), c();
262
- }), Re(() => x == null ? void 0 : x.disconnect());
263
- function v(t) {
264
- t.preventDefault(), t.stopPropagation(), N("open");
265
- }
266
- return (t, d) => {
267
- const T = ne("FmTooltip");
268
- return p(), k("a", {
269
- href: t.href,
270
- "aria-describedby": t.descriptionId,
271
- 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",
272
- onClick: v,
273
- onFocus: d[0] || (d[0] = (P) => N("focus")),
274
- onBlur: d[1] || (d[1] = (P) => N("blur"))
275
- }, [
276
- C(T, {
277
- content: t.name,
278
- disabled: !R.value,
279
- placement: "top",
280
- "z-index": 51,
281
- "content-class": "production-run-name-tooltip-reference"
282
- }, {
283
- default: G(() => [
284
- s("span", {
285
- ref_key: "label",
286
- ref: u,
287
- "data-testid": "run-name-label",
288
- class: se(["block min-w-0", t.wrap ? "whitespace-normal break-words" : "truncate"])
289
- }, b(t.name), 3)
290
- ]),
291
- _: 1
292
- }, 8, ["content", "disabled"])
293
- ], 40, pn);
294
- };
295
- }
296
- }), vn = /* @__PURE__ */ it(mn, [["__scopeId", "data-v-4d06048a"]]), fn = ["aria-label"], yn = { class: "min-w-0 truncate" }, hn = /* @__PURE__ */ ae({
297
- __name: "ProductionRunSortHeader",
298
- props: {
299
- columnId: {},
300
- label: {},
301
- activeColumnId: {},
302
- descending: { type: Boolean }
303
- },
304
- emits: ["toggle"],
305
- setup(q, { emit: o }) {
306
- const i = q, N = o, { t: u } = ie(), R = m(() => i.activeColumnId === i.columnId), x = m(
307
- () => R.value ? u(`inventory.production.run.list.sort.${i.descending ? "descending" : "ascending"}`) : u("inventory.production.run.list.sort.unsorted")
308
- ), f = m(
309
- () => R.value ? i.descending ? "arrow_downward" : "arrow_upward" : "unfold_more"
310
- ), w = m(
311
- () => u("inventory.production.run.list.sort.label", {
312
- column: i.label,
313
- direction: x.value
314
- })
315
- ), c = h(null), v = h(null);
316
- return ke(() => {
317
- var t;
318
- v.value = ((t = c.value) == null ? void 0 : t.closest("th")) ?? null;
319
- }), xt(() => {
320
- v.value && v.value.setAttribute(
321
- "aria-sort",
322
- R.value ? i.descending ? "descending" : "ascending" : "none"
323
- );
324
- }), Re(() => {
325
- var t;
326
- return (t = v.value) == null ? void 0 : t.removeAttribute("aria-sort");
327
- }), (t, d) => {
328
- const T = ne("FmIcon");
329
- return p(), k("button", {
330
- ref_key: "button",
331
- ref: c,
332
- type: "button",
333
- 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",
334
- "aria-label": w.value,
335
- onClick: d[0] || (d[0] = ot((P) => N("toggle", t.columnId), ["stop"]))
336
- }, [
337
- s("span", yn, b(t.label), 1),
338
- C(T, {
339
- name: f.value,
340
- size: "sm",
341
- "aria-hidden": "true",
342
- class: "shrink-0"
343
- }, null, 8, ["name"])
344
- ], 8, fn);
345
- };
346
- }
347
- });
348
- let bn = 0;
349
- function _n(q, o = () => null, i = () => {
350
- }, N = () => {
351
- }, u = () => {
352
- }, R = () => !1, x = (f) => `/production-run/${encodeURIComponent(f._id)}`) {
353
- var P;
354
- const { t: f } = ie(), w = At(), c = ++bn, v = h(null), t = (l) => `production-run-table-${c}-items-${encodeURIComponent(l._id)}`, d = (l, _) => {
355
- const g = N();
356
- return Q(hn, {
357
- columnId: l,
358
- label: _,
359
- activeColumnId: g == null ? void 0 : g.id,
360
- descending: g == null ? void 0 : g.desc,
361
- onToggle: u
362
- });
363
- };
364
- return { columnDefs: [
365
- {
366
- id: "runNo",
367
- header: () => d("runNo", "#"),
368
- enableSorting: !1,
369
- size: 80,
370
- meta: { headerClass: "p-0" },
371
- cell: (l) => Q(
372
- "span",
373
- { class: "fm-typo-en-body-md-600 text-fm-color-typo-primary" },
374
- `${l.row.original.runNo}`
375
- )
376
- },
377
- {
378
- id: "name",
379
- header: () => d("name", f("inventory.production.run.list.columns.name")),
380
- enableSorting: !1,
381
- minSize: 240,
382
- size: 320,
383
- maxSize: 320,
384
- meta: { headerClass: "p-0" },
385
- cell: (l) => Q(vn, {
386
- name: Ie(
387
- l.row.original,
388
- f("inventory.production.run.list.untitled")
389
- ),
390
- href: x(l.row.original),
391
- descriptionId: t(l.row.original),
392
- wrap: R(),
393
- onOpen: () => i(l.row.original),
394
- onFocus: () => {
395
- v.value = l.row.original._id;
396
- },
397
- onBlur: () => {
398
- v.value === l.row.original._id && (v.value = null);
399
- }
400
- })
401
- },
402
- {
403
- id: "items",
404
- header: () => f("inventory.production.run.list.columns.items"),
405
- enableSorting: !1,
406
- minSize: 220,
407
- size: 280,
408
- maxSize: 280,
409
- cell: (l) => Q(dn, {
410
- run: l.row.original,
411
- resolveSku: o,
412
- descriptionId: t(l.row.original),
413
- wrap: R(),
414
- rowLinkFocused: v.value === l.row.original._id
415
- })
416
- },
417
- ...(P = w.sessionUser.value) != null && P.role.isAdmin ? [
418
- {
419
- id: "statusForAdmin",
420
- header: () => Q(st, {}, () => f("inventory.production.run.list.columns.status")),
421
- cell: (l) => l.row.original.status,
422
- enableSorting: !1,
423
- size: 120
424
- }
425
- ] : [],
426
- {
427
- id: "status",
428
- header: () => d("status", f("inventory.production.run.list.columns.status")),
429
- enableSorting: !1,
430
- size: 120,
431
- meta: { headerClass: "p-0" },
432
- cell: (l) => Q(zt, { status: l.row.original.status })
433
- },
434
- {
435
- id: "updatedAt",
436
- header: () => d("updatedAt", f("inventory.production.run.list.columns.updated")),
437
- enableSorting: !1,
438
- minSize: 180,
439
- size: 200,
440
- maxSize: 200,
441
- meta: { headerClass: "p-0" },
442
- cell: (l) => {
443
- const _ = l.row.original, g = at(_);
444
- return Q(
445
- "span",
446
- { class: "fm-typo-en-body-md-400 text-fm-color-typo-primary whitespace-nowrap" },
447
- Lt((g == null ? void 0 : g.at) ?? _.createdAt)
448
- );
449
- }
450
- },
451
- {
452
- id: "action",
453
- header: "",
454
- enableSorting: !1,
455
- cell: (l) => Q(Jt, {
456
- run: l.row.original,
457
- onAction: (_) => q(_, l.row.original)
458
- }),
459
- size: 40,
460
- meta: {
461
- cellClass: "",
462
- headerClass: ""
463
- }
464
- }
465
- ] };
466
- }
467
- const gn = { class: "sr-only" }, xn = ["aria-label"], wn = {
468
- key: 0,
469
- "data-testid": "production-run-history-scope",
470
- class: "flex shrink-0 flex-wrap items-center justify-between gap-8"
471
- }, kn = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, Rn = {
472
- key: 1,
473
- role: "alert",
474
- class: "w-full fm-typo-en-body-sm-400 text-fm-color-typo-secondary"
475
- }, In = ["aria-label"], $n = ["aria-label"], Sn = {
476
- key: 2,
477
- "data-testid": "production-run-list-empty",
478
- class: "rounded-md border border-dashed border-fm-color-neutral-gray-200 p-48 text-center"
479
- }, An = { class: "fm-typo-en-body-lg-600 text-fm-color-typo-primary" }, Cn = { class: "mx-auto mt-4 max-w-[25rem] fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Fn = {
480
- key: 3,
481
- "data-testid": "production-run-list-no-match",
482
- class: "rounded-md border border-dashed border-fm-color-neutral-gray-200 p-40 text-center"
483
- }, Nn = { class: "fm-typo-en-body-lg-600 text-fm-color-typo-primary" }, Pn = { class: "mx-auto mt-4 max-w-[25rem] fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Tn = { class: "flex flex-col gap-[8px] py-[8px]" }, Dn = {
484
- "data-testid": "production-run-mobile-run-number",
485
- class: "flex items-center gap-[4px]"
486
- }, Mn = { class: "fm-typo-en-body-md-400 text-fm-color-typo-primary" }, zn = { class: "flex min-w-0 flex-col gap-[2px]" }, Ln = { class: "text-[12px] font-medium leading-[18px] text-fm-color-typo-secondary" }, Vn = { class: "fm-typo-en-body-lg-600 text-fm-color-typo-primary" }, On = { class: "flex min-w-0 flex-col gap-[2px]" }, En = { class: "text-[12px] font-medium leading-[18px] text-fm-color-typo-secondary" }, qn = {
487
- "data-testid": "production-run-admin-status",
488
- class: "flex flex-col gap-[4px]"
489
- }, Un = { class: "text-[12px] font-medium leading-[18px] text-fm-color-typo-secondary" }, jn = { class: "flex flex-col gap-[2px]" }, 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 = /* @__PURE__ */ ae({
490
- __name: "ProductionRunView",
491
- setup(q) {
492
- const { t: o } = ie(), i = Rt(), N = It(), u = $t(), R = Vt(), x = Gt(), f = Kt(), w = Ct();
493
- Ot();
494
- const c = h([]), v = h(!1), t = h(null), d = h(null), T = h(!1), P = h(null), l = m(() => ({
495
- loading: v.value || T.value,
496
- loaded: !v.value && !t.value,
497
- hasMore: d.value !== null,
498
- error: P.value ?? t.value
499
- })), _ = h(""), g = h("all"), O = h([{ id: "updatedAt", desc: !0 }]), B = h(!1), I = h(null), z = h(null), K = h(null);
500
- let U = 0, L = 0;
501
- const Z = m(
502
- () => c.value.find((e) => e._id === z.value) ?? null
503
- ), ye = Et(() => Z.value), he = m(() => !!Z.value && we(Z.value)), J = m(
504
- () => ye.ingredientLines.value.map((e) => ({
505
- skuId: e.skuId,
506
- name: e.name,
507
- unit: e.unit,
508
- unitRef: e.unitRef,
509
- outputSkuIds: e.outputSkuIds
510
- }))
511
- );
512
- function oe() {
513
- return t.value ? a() : S();
514
- }
515
- function le() {
516
- L++, K.value = null, z.value = null, I.value = null, B.value = !1;
517
- }
518
- async function a() {
519
- const e = ++U;
520
- v.value = !0, t.value = null, d.value = null, T.value = !1, P.value = null;
521
- try {
522
- const n = await R.list();
523
- if (e !== U) return;
524
- c.value = n.items, d.value = n.nextCursor;
525
- } catch (n) {
526
- if (e !== U) return;
527
- const y = ge(n);
528
- t.value = y.message, u == null || u.open({
529
- title: o("inventory.production.run.list.error.load"),
530
- message: y.message,
531
- type: "error"
532
- });
533
- } finally {
534
- e === U && (v.value = !1);
535
- }
536
- }
537
- async function S() {
538
- const e = d.value;
539
- if (!e || v.value || T.value) return;
540
- const n = U;
541
- T.value = !0, P.value = null;
542
- try {
543
- const y = await R.list({ cursor: e });
544
- if (n !== U || e !== d.value) return;
545
- if (y.nextCursor === e)
546
- throw new Error(o("inventory.production.run.list.history.cursorError"));
547
- const A = new Set(c.value.map((E) => E._id));
548
- c.value = [...c.value, ...y.items.filter((E) => !A.has(E._id))], d.value = y.nextCursor;
549
- } catch (y) {
550
- n === U && (P.value = ge(y).message);
551
- } finally {
552
- n === U && (T.value = !1);
553
- }
554
- }
555
- x.watchLocation(() => (le(), a()));
556
- const D = m(
557
- () => qt.map((e) => ({
558
- label: o(`inventory.production.run.list.tabs.${e.key}`),
559
- value: e.key
560
- }))
561
- );
562
- function $(e) {
563
- var n;
564
- return ((n = at(e)) == null ? void 0 : n.at) ?? e.createdAt;
565
- }
566
- function V(e, n, y) {
567
- switch (y) {
568
- case "runNo":
569
- return e.runNo - n.runNo;
570
- case "name":
571
- return tt(e).localeCompare(tt(n));
572
- case "status":
573
- return et(e.status) - et(n.status);
574
- case "updatedAt":
575
- return Date.parse($(e)) - Date.parse($(n));
576
- default:
577
- return 0;
578
- }
579
- }
580
- const j = m(() => {
581
- const e = c.value.filter(
582
- (A) => Ut(A, g.value) && jt(A, _.value, $e)
583
- ), n = O.value[0];
584
- if (!n)
585
- return e.sort(
586
- (A, E) => V(E, A, "updatedAt") || V(E, A, "runNo")
587
- );
588
- const y = n.desc ? -1 : 1;
589
- return e.sort(
590
- (A, E) => y * V(A, E, n.id) || V(E, A, "runNo")
591
- );
592
- }), { breakpoints: W } = St(), Y = m(() => W.value.xs || W.value.sm), lt = m(() => Y.value ? 10 : 20), ut = m(() => Y.value ? { height: `calc(${w.tableHeight.height} - 16px)` } : w.tableHeight), ct = m(
593
- () => Y.value ? j.value.map((e) => `${e._id}:${e._rev}`).join("|") : "desktop"
594
- );
595
- function dt() {
596
- _.value = "", g.value = "all";
597
- }
598
- function pt(e) {
599
- const n = O.value[0];
600
- O.value = [
601
- (n == null ? void 0 : n.id) === e ? { id: e, desc: !n.desc } : { id: e, desc: !1 }
602
- ];
603
- }
604
- function $e(e) {
605
- return f.skuById[e];
606
- }
607
- function be(e) {
608
- i.push(nt(e._id));
609
- }
610
- function mt(e) {
611
- return i.resolve(nt(e._id)).href;
612
- }
613
- function vt(e, n) {
614
- const y = ++L;
615
- if (z.value = n._id, K.value = null, e === "request") {
616
- N.open(Yt(o)).onPrimary(() => void ft(n._id, y));
617
- return;
618
- }
619
- K.value = e;
620
- }
621
- async function ft(e, n) {
622
- if (!(n !== L || z.value !== e))
623
- try {
624
- const y = await R.request(e);
625
- if (n !== L || z.value !== e || !Se(y)) return;
626
- u == null || u.open({
627
- title: o("inventory.production.run.list.request.success"),
628
- message: o("inventory.production.run.list.request.successMessage", {
629
- name: Ie(y, o("inventory.production.run.list.untitled"))
630
- }),
631
- type: "success"
632
- }), z.value = null;
633
- } catch (y) {
634
- if (n !== L || z.value !== e) return;
635
- u == null || u.open({
636
- title: o("inventory.production.run.list.error.action", {
637
- action: o("inventory.production.run.list.rowActions.request")
638
- }),
639
- message: ge(y).message,
640
- type: "error"
641
- });
642
- }
643
- }
644
- function Se(e) {
645
- const n = c.value.findIndex((A) => A._id === e._id);
646
- if (n < 0) return !1;
647
- const y = [...c.value];
648
- return y[n] = e, c.value = y, !0;
649
- }
650
- function re(e) {
651
- z.value === e._id && Se(e);
652
- }
653
- function yt(e) {
654
- e === null && (K.value = null, z.value = null);
655
- }
656
- function ht() {
657
- le(), a();
658
- }
659
- const { columnDefs: bt } = _n(
660
- vt,
661
- $e,
662
- be,
663
- () => O.value[0],
664
- pt,
665
- () => Y.value,
666
- mt
667
- );
668
- function Ae(e) {
669
- e === "refresh" && a(), e === "create" && (I.value = null, B.value = !0);
670
- }
671
- const _t = m(() => [
672
- {
673
- label: o("inventory.common.refresh"),
674
- value: "refresh",
675
- prependIcon: "refresh"
676
- },
677
- {
678
- label: o("inventory.production.run.list.actions.create"),
679
- value: "create",
680
- prependIcon: "add",
681
- testId: "production-run-mobile-create",
682
- isPrimary: !0
683
- }
684
- ]);
685
- function gt() {
686
- I.value = null, a();
687
- }
688
- return (e, n) => {
689
- const y = ne("FmTabs"), A = ne("FmButton"), E = ne("FmTable");
690
- return p(), ee(Ft, {
691
- title: r(o)("inventory.production.run.list.title"),
692
- "helper-text": r(o)("inventory.production.run.list.caption"),
693
- actions: _t.value,
694
- "onClick:action": Ae
695
- }, {
696
- default: G(() => {
697
- var Ce;
698
- return [
699
- s("div", {
700
- "data-testid": "production-run-list-content",
701
- class: se([
702
- "flex w-full max-h-full flex-col gap-12",
703
- {
704
- "p-0": Y.value,
705
- "px-24": !Y.value
706
- }
707
- ])
708
- }, [
709
- s("h1", gn, b(r(o)("inventory.production.run.list.title")), 1),
710
- C(Qt, {
711
- "change-location": "",
712
- searchable: "",
713
- search: _.value,
714
- "onUpdate:search": n[0] || (n[0] = (F) => _.value = F)
715
- }, null, 8, ["search"]),
716
- s("div", {
717
- class: "flex min-w-0 shrink-0 flex-col gap-12",
718
- "data-testid": "production-run-list-controls",
719
- onVnodeMounted: n[2] || (n[2] = //@ts-ignore
720
- (...F) => r(w).onMounted && r(w).onMounted(...F)),
721
- onVnodeUnmounted: n[3] || (n[3] = //@ts-ignore
722
- (...F) => r(w).onUnmounted && r(w).onUnmounted(...F))
723
- }, [
724
- s("nav", {
725
- class: "min-w-0 overflow-x-auto",
726
- "aria-label": r(o)("inventory.production.run.list.tabsLabel")
727
- }, [
728
- C(y, {
729
- "model-value": g.value,
730
- "onUpdate:modelValue": n[1] || (n[1] = (F) => g.value = F),
731
- items: D.value
732
- }, null, 8, ["model-value", "items"])
733
- ], 8, xn),
734
- !v.value && !t.value && (d.value || P.value) ? (p(), k("div", wn, [
735
- s("p", kn, b(r(o)("inventory.production.run.list.history.scope", { count: c.value.length })), 1),
736
- d.value ? (p(), ee(A, {
737
- key: 0,
738
- "data-testid": "production-run-load-more",
739
- variant: "secondary",
740
- label: r(o)("inventory.production.run.list.history.loadMore"),
741
- loading: T.value,
742
- disabled: T.value,
743
- onClick: S
744
- }, null, 8, ["label", "loading", "disabled"])) : H("", !0),
745
- P.value ? (p(), k("p", Rn, b(P.value), 1)) : H("", !0)
746
- ])) : H("", !0)
747
- ], 512),
748
- s("div", {
749
- id: "production-run-list-panel",
750
- role: "region",
751
- "aria-label": r(o)("inventory.production.run.list.tabsLabel"),
752
- class: se(["flex min-h-0 flex-col", !v.value && !t.value && j.value.length ? "" : "overflow-y-auto"])
753
- }, [
754
- v.value ? (p(), k("div", {
755
- key: 0,
756
- "data-testid": "production-run-list-loading",
757
- role: "status",
758
- class: "w-full space-y-12",
759
- "aria-busy": "true",
760
- "aria-label": r(o)("inventory.production.run.list.loading")
761
- }, [
762
- (p(), k(X, null, xe(6, (F) => s("div", {
763
- key: F,
764
- "data-testid": "production-run-list-skeleton-row",
765
- class: "h-80 w-full animate-pulse rounded-md bg-fm-color-neutral-gray-100"
766
- })), 64))
767
- ], 8, $n)) : t.value ? (p(), ee(Wt, {
768
- key: 1,
769
- "data-testid": "production-run-list-error",
770
- class: "m-16",
771
- role: "alert",
772
- tone: "critical",
773
- title: r(o)("inventory.production.run.list.error.load"),
774
- message: t.value
775
- }, {
776
- actions: G(() => [
777
- C(A, {
778
- "data-testid": "production-run-list-retry",
779
- label: r(o)("inventory.production.run.list.error.retry"),
780
- variant: "secondary",
781
- onClick: a
782
- }, null, 8, ["label"])
783
- ]),
784
- _: 1
785
- }, 8, ["title", "message"])) : c.value.length === 0 ? (p(), k("div", Sn, [
786
- s("div", An, b(r(o)("inventory.production.run.list.empty.noneTitle")), 1),
787
- s("div", Cn, b(r(o)("inventory.production.run.list.empty.noneDescription")), 1),
788
- C(A, {
789
- "data-testid": "production-run-list-empty-create",
790
- class: "mx-auto mt-16",
791
- label: r(o)("inventory.production.run.list.empty.create"),
792
- "prepend-icon": "add",
793
- onClick: n[4] || (n[4] = (F) => Ae("create"))
794
- }, null, 8, ["label"])
795
- ])) : j.value.length === 0 ? (p(), k("div", Fn, [
796
- s("div", Nn, b(r(o)("inventory.production.run.list.empty.noMatchTitle")), 1),
797
- s("div", Pn, b(_.value.trim() ? r(o)("inventory.production.run.list.empty.searchDescription", {
798
- query: _.value.trim()
799
- }) : r(o)("inventory.production.run.list.empty.noMatchDescription")), 1),
800
- C(A, {
801
- "data-testid": "production-run-list-clear-filters",
802
- class: "mx-auto mt-12",
803
- label: r(o)("inventory.production.run.list.empty.clearFilters"),
804
- "aria-label": r(o)("inventory.production.run.list.empty.clearFilters"),
805
- variant: "tertiary",
806
- onClick: dt
807
- }, null, 8, ["label", "aria-label"])
808
- ])) : (p(), ee(E, {
809
- key: ct.value,
810
- class: "production-run-table",
811
- style: wt(ut.value),
812
- "column-defs": r(bt),
813
- "row-data": j.value,
814
- loading: v.value,
815
- "page-size": lt.value,
816
- "pin-header-row": !1,
817
- onRowClick: n[5] || (n[5] = (F) => be(F.original))
818
- }, {
819
- "list-row": G((F) => [
820
- C(kt, {
821
- "data-testid": "production-run-mobile-row",
822
- class: "production-run-mobile-row !py-8",
823
- row: F,
824
- onRowClick: be
825
- }, {
826
- default: G((M) => {
827
- var Fe, Ne, Pe, ue, Te, De, Me, ze, ce, Le, Ve, Oe, Ee, de, qe, Ue, je, We, pe, He, Be, Ye, Qe, me, Ge;
828
- return [
829
- s("div", Tn, [
830
- s("div", Dn, [
831
- n[7] || (n[7] = s("span", { class: "text-[12px] font-medium leading-[18px] text-fm-color-typo-secondary" }, "#", -1)),
832
- s("div", Mn, [
833
- C(r(te), {
834
- render: (Pe = (Ne = (Fe = M.runNo) == null ? void 0 : Fe.column) == null ? void 0 : Ne.columnDef) == null ? void 0 : Pe.cell,
835
- props: (Te = (ue = M.runNo) == null ? void 0 : ue.getContext) == null ? void 0 : Te.call(ue)
836
- }, null, 8, ["render", "props"])
837
- ])
838
- ]),
839
- s("div", zn, [
840
- s("span", Ln, b(r(o)("inventory.production.run.list.columns.name")), 1),
841
- s("div", Vn, [
842
- C(r(te), {
843
- render: (ze = (Me = (De = M.name) == null ? void 0 : De.column) == null ? void 0 : Me.columnDef) == null ? void 0 : ze.cell,
844
- props: (Le = (ce = M.name) == null ? void 0 : ce.getContext) == null ? void 0 : Le.call(ce)
845
- }, null, 8, ["render", "props"])
846
- ])
847
- ]),
848
- s("div", On, [
849
- s("span", En, b(r(o)("inventory.production.run.list.columns.items")), 1),
850
- C(r(te), {
851
- render: (Ee = (Oe = (Ve = M.items) == null ? void 0 : Ve.column) == null ? void 0 : Oe.columnDef) == null ? void 0 : Ee.cell,
852
- props: (qe = (de = M.items) == null ? void 0 : de.getContext) == null ? void 0 : qe.call(de)
853
- }, null, 8, ["render", "props"])
854
- ]),
855
- M.statusForAdmin ? (p(), ee(st, { key: 0 }, {
856
- default: G(() => {
857
- var Ke, Je, Xe, ve, Ze;
858
- return [
859
- s("div", qn, [
860
- s("span", Un, b(r(o)("inventory.production.run.list.columns.status")), 1),
861
- C(r(te), {
862
- render: (Xe = (Je = (Ke = M.statusForAdmin) == null ? void 0 : Ke.column) == null ? void 0 : Je.columnDef) == null ? void 0 : Xe.cell,
863
- props: (Ze = (ve = M.statusForAdmin) == null ? void 0 : ve.getContext) == null ? void 0 : Ze.call(ve)
864
- }, null, 8, ["render", "props"])
865
- ])
866
- ];
867
- }),
868
- _: 2
869
- }, 1024)) : H("", !0),
870
- s("div", jn, [
871
- s("span", Wn, b(r(o)("inventory.production.run.list.columns.status")), 1),
872
- C(r(te), {
873
- render: (We = (je = (Ue = M.status) == null ? void 0 : Ue.column) == null ? void 0 : je.columnDef) == null ? void 0 : We.cell,
874
- props: (He = (pe = M.status) == null ? void 0 : pe.getContext) == null ? void 0 : He.call(pe)
875
- }, null, 8, ["render", "props"])
876
- ]),
877
- s("div", Hn, [
878
- s("span", Bn, b(r(o)("inventory.production.run.list.columns.updated")), 1),
879
- C(r(te), {
880
- render: (Qe = (Ye = (Be = M.updatedAt) == null ? void 0 : Be.column) == null ? void 0 : Ye.columnDef) == null ? void 0 : Qe.cell,
881
- props: (Ge = (me = M.updatedAt) == null ? void 0 : me.getContext) == null ? void 0 : Ge.call(me)
882
- }, null, 8, ["render", "props"])
883
- ])
884
- ])
885
- ];
886
- }),
887
- _: 2
888
- }, 1032, ["row"])
889
- ]),
890
- _: 1
891
- }, 8, ["style", "column-defs", "row-data", "loading", "page-size"]))
892
- ], 10, In)
893
- ], 2),
894
- B.value ? (p(), ee(Ht, {
895
- key: 0,
896
- show: !0,
897
- run: I.value,
898
- "duplicate-sources": c.value,
899
- "duplicate-source-state": l.value,
900
- onLoadMoreDuplicateSources: oe,
901
- "onUpdate:show": n[6] || (n[6] = (F) => B.value = F),
902
- onSaved: gt
903
- }, null, 8, ["run", "duplicate-sources", "duplicate-source-state"])) : H("", !0),
904
- C(Bt, {
905
- action: K.value,
906
- run: Z.value,
907
- "location-name": ((Ce = r(x)._currentLocation) == null ? void 0 : Ce.name) ?? null,
908
- "duplicate-sources": c.value,
909
- "duplicate-source-state": l.value,
910
- onLoadMoreDuplicateSources: oe,
911
- "at-target": he.value,
912
- ingredients: J.value,
913
- "onUpdate:action": yt,
914
- onEdited: re,
915
- onIssued: re,
916
- onRecorded: re,
917
- onClosed: re,
918
- onCancelled: re,
919
- onReload: ht
920
- }, null, 8, ["action", "run", "location-name", "duplicate-sources", "duplicate-source-state", "at-target", "ingredients"])
921
- ];
922
- }),
923
- _: 1
924
- }, 8, ["title", "helper-text", "actions"]);
925
- };
926
- }
927
- }), so = /* @__PURE__ */ it(Yn, [["__scopeId", "data-v-53484757"]]);
928
- export {
929
- so as default
930
- };