@feedmepos/mf-inventory-portal 1.8.0-dev.0 → 1.8.0-dev.10

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 (247) hide show
  1. package/dist/App-BjFIh5km.js +1466 -0
  2. package/dist/{ApprovalView-BK6E_3Cw.js → ApprovalView-CauRuf64.js} +26 -25
  3. package/dist/{BindingsDialog-BAVPQ_Eq.js → BindingsDialog-U-tzIfGX.js} +2 -2
  4. package/dist/{BindingsPicker-bAuDX7Af.js → BindingsPicker-CV_oghtz.js} +2 -2
  5. package/dist/{BindingsTable-LGlvV0lt.js → BindingsTable-TKSQxAxV.js} +4 -4
  6. package/dist/{BulkReceiveRequestView-CQf7FYos.js → BulkReceiveRequestView-Cyeq26qc.js} +21 -21
  7. package/dist/ChangeLocationComponent.vue_vue_type_script_setup_true_lang-BpJhboKU.js +151 -0
  8. package/dist/{ClosingDraftView-DH7iYiE9.js → ClosingDraftView-UqeHsxyJ.js} +748 -746
  9. package/dist/ClosingHistoryView-Cr6cQq6j.js +769 -0
  10. package/dist/{ClosingTemplateView-D532GNTn.js → ClosingTemplateView-DZ0Mdc87.js} +303 -291
  11. package/dist/{CustomPrintTemplatePreview.vue_vue_type_script_setup_true_lang-CvqZGcvX.js → CustomPrintTemplatePreview.vue_vue_type_script_setup_true_lang-C-OsCTxZ.js} +1 -1
  12. package/dist/{DefaultView-DqqXJVba.js → DefaultView-DQKHG5Jl.js} +2 -2
  13. package/dist/{DeliveryOrderPrintPreview-DkHNDEKP.js → DeliveryOrderPrintPreview-Z_kBbMMO.js} +2 -2
  14. package/dist/{EmailDialog.vue_vue_type_script_setup_true_lang-Cyj3ka37.js → EmailDialog.vue_vue_type_script_setup_true_lang-Ce6Ly9pT.js} +6228 -6216
  15. package/dist/FeatureCapabilityBadge.vue_vue_type_script_setup_true_lang-BUYI8koH.js +47 -0
  16. package/dist/FeatureCapabilityGate-DOn2IVJb.js +74 -0
  17. package/dist/{FmDateRangePickerChip.vue_vue_type_script_setup_true_lang-BCuhx2cN.js → FmDateRangePickerChip.vue_vue_type_script_setup_true_lang-BJuo4lEh.js} +1 -1
  18. package/dist/{FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-CDNqm_9N.js → FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-DZxz5hbo.js} +2 -2
  19. package/dist/FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-CiBhz5sq.js +120 -0
  20. package/dist/FmMultiselectDialog-Bx9cLdYs.js +123 -0
  21. package/dist/{FmMultiselectDialog-eH3nO3P3.js → FmMultiselectDialog-DvaWLGY5.js} +2 -2
  22. package/dist/{FmUnitInput.vue_vue_type_script_setup_true_lang-BCIkEl75.js → FmUnitInput.vue_vue_type_script_setup_true_lang-D6f1M96D.js} +72 -73
  23. package/dist/ImportView-1-cjN7ay.js +1290 -0
  24. package/dist/{IngredientsView-DtDtzaMt.js → IngredientsView-JfKlUU2E.js} +656 -649
  25. package/dist/{IntegrationExplorerView-C4lYc_LH.js → IntegrationExplorerView-uElgWH8i.js} +602 -614
  26. package/dist/IntegrationPlatformView-g2dU5SG6.js +13061 -0
  27. package/dist/{IntegrationView-Bx5VdV5l.js → IntegrationView-B9g888K4.js} +2956 -2922
  28. package/dist/{InventoryBindingForm-DKa1DwYs.js → InventoryBindingForm-DfGOKZWg.js} +1 -1
  29. package/dist/InventoryBindingForm.vue_vue_type_script_setup_true_lang-CNjTdNL7.js +472 -0
  30. package/dist/{InventoryBindingSummary-CNqwcsrX.js → InventoryBindingSummary-CSii8B2X.js} +1 -1
  31. package/dist/JsonViewer.vue_vue_type_script_setup_true_lang-C_hg75l0.js +25 -0
  32. package/dist/NumberPrecisionInput.vue_vue_type_script_setup_true_lang-D_Xk4SOH.js +79 -0
  33. package/dist/PlanTierBadge.vue_vue_type_script_setup_true_lang-DJvfMOND.js +274 -0
  34. package/dist/PlanUpgradeDialog.vue_vue_type_script_setup_true_lang-Bdjm0Y4w.js +79 -0
  35. package/dist/ProductionRunDetailView-HgH2Wp99.js +2312 -0
  36. package/dist/{production-run-prepare-sheet-aQOcxgaC.js → ProductionRunLifecycleDialogs.vue_vue_type_script_setup_true_lang-C88pjV2s.js} +11039 -3661
  37. package/dist/ProductionRunView-BkvQHeCP.js +931 -0
  38. package/dist/{PublishView-D0oSoJ5a.js → PublishView-CIei_T5e.js} +3 -3
  39. package/dist/{PurchaseOrderPrintPreview-CE-l4mvB.js → PurchaseOrderPrintPreview-Wmv7676h.js} +2 -2
  40. package/dist/{ReceiveRequestView-B2z8Ji0e.js → ReceiveRequestView-MqOIpIDB.js} +15 -15
  41. package/dist/RecipeView-WzXJX4JU.js +3440 -0
  42. package/dist/SettingsView-1YlgjyzB.js +1032 -0
  43. package/dist/StockView-C-dIRXPv.js +2651 -0
  44. package/dist/{SubsidiaryTreeDialog.vue_vue_type_script_setup_true_lang-BTh5E4Tt.js → SubsidiaryTreeDialog.vue_vue_type_script_setup_true_lang-CewKTZzy.js} +1 -1
  45. package/dist/{SupplierView-qqhUQ-SY.js → SupplierView-53rHhQ63.js} +577 -571
  46. package/dist/{SurchargeView-B0TYUfqY.js → SurchargeView-DuJb5EUn.js} +7 -7
  47. package/dist/{SystemTrailDialog.vue_vue_type_script_setup_true_lang-tfMHi9Yv.js → SystemTrailDialog.vue_vue_type_script_setup_true_lang-C_YmC-ZX.js} +2 -2
  48. package/dist/TableActionableRow.vue_vue_type_script_setup_true_lang-gJQQKKAC.js +71 -0
  49. package/dist/{TemplatePublishDialog.vue_vue_type_script_setup_true_lang-Dxc-jNte.js → TemplatePublishDialog.vue_vue_type_script_setup_true_lang-CyQujMzv.js} +1 -1
  50. package/dist/{TransferDetails.vue_vue_type_script_setup_true_lang-BX36zWMb.js → TransferDetails.vue_vue_type_script_setup_true_lang-CMwqjlb0.js} +1722 -1672
  51. package/dist/TransferTemplateView-B6OGfKQr.js +2343 -0
  52. package/dist/{UnitCostHistoryView-xdRSkjD7.js → UnitCostHistoryView-BVlq4BNG.js} +4 -4
  53. package/dist/{UnitDisplayControl.vue_vue_type_script_setup_true_lang-BT2v1gZv.js → UnitDisplayControl.vue_vue_type_script_setup_true_lang-CULJEeCU.js} +4 -4
  54. package/dist/{UnitView-p-V_TMMo.js → UnitView-AuIJokVF.js} +84 -84
  55. package/dist/{WarehouseView-BOGYcUHH.js → WarehouseView-Cjv8S1ov.js} +194 -189
  56. package/dist/{WastageTemplateView-CiifZMq6.js → WastageTemplateView-mxSTzVSZ.js} +19 -18
  57. package/dist/api/bill.d.ts +144 -88
  58. package/dist/api/feature-flags.d.ts +12 -0
  59. package/dist/api/food-market-hub.d.ts +2 -2
  60. package/dist/api/integration-sync-log.d.ts +0 -13
  61. package/dist/api/inventory.d.ts +9 -9
  62. package/dist/api/license.d.ts +8 -0
  63. package/dist/{app-CGcDbrt8.js → app-OztWApio.js} +27841 -28064
  64. package/dist/app.d.ts +36 -150
  65. package/dist/app.js +1 -1
  66. package/dist/{closing-template-B4lQetjU.js → closing-template-DIxXDgZQ.js} +1 -1
  67. package/dist/components/ChangeLocationComponent.vue.d.ts +21 -14
  68. package/dist/components/DeprecateSoonWarningDialog.vue.d.ts +22 -0
  69. package/dist/components/FeatureCapabilityBadge.vue.d.ts +29 -0
  70. package/dist/components/FeatureCapabilityGate.vue.d.ts +29 -0
  71. package/dist/components/FmUnitInputRules.d.ts +1 -1
  72. package/dist/components/MultiLocationSelector.vue.d.ts +6 -6
  73. package/dist/components/{PreviewBadge.vue.d.ts → PlanTierBadge.vue.d.ts} +5 -13
  74. package/dist/components/PlanUpgradeDialog.vue.d.ts +30 -0
  75. package/dist/composable/useNavigationMenu.d.ts +2 -1
  76. package/dist/{date2-CHOcS7LX.js → date2-BTzYzk-x.js} +1 -1
  77. package/dist/{dayjs.min-DrqpmBJQ.js → dayjs.min-BIg6CfC4.js} +1 -1
  78. package/dist/{decimal-BJ-B2ZXz.js → decimal-B34w3X7O.js} +2 -2
  79. package/dist/{defineDeepModel-DLlTW3xL.js → defineDeepModel-CrZAv12u.js} +1 -1
  80. package/dist/{duplicate-template-Dyz7iXqd.js → duplicate-template-BKVPhi40.js} +1 -1
  81. package/dist/{inventory-core-dart.default-DGI40oFz.js → feature-BUVZ_ab3.js} +766 -398
  82. package/dist/feature-flags/core.d.ts +28 -0
  83. package/dist/feature-flags/navigation-capabilities.d.ts +23 -0
  84. package/dist/feature-flags/navigation-capabilities.spec.d.ts +1 -0
  85. package/dist/feature-flags/plan-tier.d.ts +6 -0
  86. package/dist/feature-flags/plan-tier.spec.d.ts +1 -0
  87. package/dist/feature-flags/portal-feature-catalog.d.ts +19 -0
  88. package/dist/feature-flags/portal-feature-catalog.spec.d.ts +1 -0
  89. package/dist/feature-flags/vue.d.ts +16 -0
  90. package/dist/feature-flags/vue.spec.d.ts +1 -0
  91. package/dist/{format-time-from-id-DBFdt14U.js → format-time-from-id-DGLxhRFH.js} +1 -1
  92. package/dist/{format-unit-display-BXCWhtXb.js → format-unit-display-BhudItCc.js} +118 -119
  93. package/dist/helper/menu-usage-module.d.ts +1 -1
  94. package/dist/helper/number.d.ts +5 -1
  95. package/dist/helper/rules.d.ts +1 -1
  96. package/dist/id-to-date-BfwadWDS.js +67 -0
  97. package/dist/{import-export.helper-BgaADwYQ.js → import-export.helper-BdQ_d-fT.js} +16 -17
  98. package/dist/{index-BT-a2SOP.js → index-BTNI4XZ2.js} +1 -1
  99. package/dist/{index-BS5wlvV_.js → index-B_hoeQNL.js} +3 -3
  100. package/dist/{JsonViewer.vue_vue_type_script_setup_true_lang-ig2zSXAB.js → index-C25C1Dg7.js} +1074 -1066
  101. package/dist/{index-CqgYx0tx.js → index-CCvxPS3E.js} +1 -1
  102. package/dist/index-eGvSlWMU.js +1892 -0
  103. package/dist/{lz-string-CRDgHWib.js → lz-string-CVEGZpSC.js} +1 -1
  104. package/dist/{netsuite-CaILEA4R.js → netsuite-DEhdSyBn.js} +9 -3
  105. package/dist/{predefined-templates-CTLn4dgR.js → predefined-templates-BTdQl7jj.js} +1 -1
  106. package/dist/{purchase-order-template-CE4_gQyK.js → purchase-order-template-DfMmpsrJ.js} +1 -1
  107. package/dist/{recalculationUtils-DoBJhZjA.js → recalculationUtils-Ds9Jcg0l.js} +1 -1
  108. package/dist/router/name.d.ts +2 -3
  109. package/dist/{row-action.enum-ncgDYAjP.js → row-action.enum-B2Y5YFbc.js} +2 -2
  110. package/dist/rules-D01xYhgI.js +238 -0
  111. package/dist/{stock-WxsPiRKa.js → stock-D3kBNq3e.js} +1 -1
  112. package/dist/stock-DyTC4Teu.js +74 -0
  113. package/dist/stores/feature.d.ts +20 -2
  114. package/dist/stores/integration/codemax.d.ts +2 -2
  115. package/dist/stores/integration/foodmarkethub.d.ts +2 -2
  116. package/dist/stores/integration/netsuite.d.ts +2 -2
  117. package/dist/stores/inventory.d.ts +0 -47
  118. package/dist/stores/inventory.no-location.spec.d.ts +1 -0
  119. package/dist/stores/location.d.ts +42 -42
  120. package/dist/stores/supplier.d.ts +49 -49
  121. package/dist/stores/warehouse.d.ts +3 -2
  122. package/dist/style.css +1 -1
  123. package/dist/{supplier-DbdPWPj7.js → supplier-DaidezrO.js} +2 -2
  124. package/dist/{surcharge-BsvY29nN.js → surcharge-C-PFvvlU.js} +1 -1
  125. package/dist/tsconfig.app.tsbuildinfo +1 -1
  126. package/dist/{uom-rules-dxyRNetA.js → uom-rules-Un5bhcrm.js} +1 -1
  127. package/dist/{use-ingredient-select-dialog-eYM-6q4s.js → use-ingredient-select-dialog-DV_hkAt9.js} +2 -2
  128. package/dist/use-inventory-binding-dialog-CTceyFrg.js +113 -0
  129. package/dist/{use-template-enabled-locations-C0o5r4_0.js → use-template-enabled-locations-DGqw8tvz.js} +2 -2
  130. package/dist/{use-transfer-locations-CC35SlyA.js → use-transfer-locations-DgtKajec.js} +2 -2
  131. package/dist/{useHrmPermission-DxzYJX4n.js → useHrmPermission-BMpZlah6.js} +1 -1
  132. package/dist/useNavigationMenu-D0NtXAnB.js +346 -0
  133. package/dist/{useSseClient-ml-_A-4u.js → useSseClient-CHZZxy7Z.js} +1 -1
  134. package/dist/views/adjustment-template/wastage-template/actions.d.ts +36 -36
  135. package/dist/views/adjustment-template/wastage-template/table.d.ts +36 -36
  136. package/dist/views/closing-draft/components/closing-draft-dialog/ClosingDraftApprovalDialog.vue.d.ts +6 -6
  137. package/dist/views/closing-draft/components/closing-draft-dialog/ClosingDraftDialog.vue.d.ts +12 -12
  138. package/dist/views/closing-draft/components/closing-draft-groups/ClosingGroupDetailSideSheet.vue.d.ts +6 -6
  139. package/dist/views/closing-draft/composables/use-closing-draft-import.d.ts +3 -3
  140. package/dist/views/closing-draft/composables/use-closing-draft-table.d.ts +18 -18
  141. package/dist/views/closing-template/composables/use-closing-template-actions.d.ts +45 -45
  142. package/dist/views/closing-template/composables/use-closing-template-table.d.ts +36 -36
  143. package/dist/views/ingredients/components/inventory-binding/InventoryBindingForm.vue.d.ts +0 -1
  144. package/dist/views/ingredients/components/inventory-binding/composables/use-inventory-binding-dialog.d.ts +0 -1
  145. package/dist/views/ingredients/components/inventory-binding/recipe-amount-validation.spec.d.ts +1 -0
  146. package/dist/views/ingredients/components/inventory-binding/v2/InventoryBindingFormV2.vue.d.ts +0 -1
  147. package/dist/views/ingredients/components/inventory-binding/v2/composables/use-inventory-binding-dialog.d.ts +0 -1
  148. package/dist/views/ingredients/helper/is-linked-ingredient-error.d.ts +1 -1
  149. package/dist/{components/PremiumBadge.vue.d.ts → views/integration/IntegrationPlatformView.vue.d.ts} +11 -13
  150. package/dist/views/integration/components/ApplyProductDialog.vue.d.ts +4 -4
  151. package/dist/views/integration/components/ApplyProductDialogCodemax.vue.d.ts +4 -4
  152. package/dist/views/integration/components/ApplyProductDialogV4.vue.d.ts +4 -4
  153. package/dist/views/integration/components/CodemaxDialog.vue.d.ts +4 -4
  154. package/dist/views/integration/components/IntegrationCard.vue.d.ts +38 -0
  155. package/dist/views/integration/components/Synergy/importFn.spec.d.ts +1 -0
  156. package/dist/views/integration/components/Xilnex/importFn.spec.d.ts +1 -0
  157. package/dist/views/integration/components/netsuite/business/AddLocationDialog.vue.d.ts +36 -36
  158. package/dist/views/integration/components/netsuite/business/AddVendorDialog.vue.d.ts +24 -24
  159. package/dist/views/integration/helper/opening-balance.d.ts +22 -0
  160. package/dist/views/integration/helper/opening-balance.spec.d.ts +1 -0
  161. package/dist/views/production-run/features/detail/ProductionRunDetailTabs.spec.d.ts +1 -0
  162. package/dist/views/production-run/features/detail/{ProductionRunTabs.vue.d.ts → ProductionRunDetailTabs.vue.d.ts} +4 -8
  163. package/dist/views/production-run/features/detail/ProductionRunOverviewTab.vue.d.ts +2 -2
  164. package/dist/views/production-run/features/detail/use-production-run-detail.d.ts +4 -4
  165. package/dist/views/production-run/features/lifecycle/CancelRunDialog.vue.d.ts +2 -2
  166. package/dist/views/production-run/features/lifecycle/CloseRunDialog.vue.d.ts +2 -2
  167. package/dist/views/production-run/features/lifecycle/ProductionRunLifecycleDialogs.vue.d.ts +11 -11
  168. package/dist/views/production-run/features/lifecycle/TargetReachedDialog.vue.d.ts +2 -2
  169. package/dist/views/production-run/features/planning/ProductionRunFormDialog.vue.d.ts +2 -2
  170. package/dist/views/production-run/features/planning/use-production-run-duplicate-sources.d.ts +3 -3
  171. package/dist/views/production-run/features/prepare/production-run-prepare-sheet.d.ts +0 -9
  172. package/dist/views/production-run/shared/helpers/production-run-navigation.d.ts +0 -2
  173. package/dist/views/production-run/shared/model/production-run-list.d.ts +0 -1
  174. package/dist/views/production-run/shared/ui/ProductionRunScrollHint.vue.d.ts +10 -0
  175. package/dist/views/receive-request/components/transfer-form/TransferFormWithController.vue.d.ts +5 -5
  176. package/dist/views/receive-request/composables/netsuite-order-label.d.ts +11 -0
  177. package/dist/views/receive-request/composables/netsuite-order-label.spec.d.ts +1 -0
  178. package/dist/views/receive-request/composables/use-process-purchase-order.d.ts +6 -6
  179. package/dist/views/receive-request/composables/use-receive-request-form.d.ts +48 -48
  180. package/dist/views/receive-request/composables/use-receive-request-table.d.ts +42 -42
  181. package/dist/views/receive-request/import/export.spec.d.ts +1 -0
  182. package/dist/views/receive-request-bulk/composables/use-bulk-receive-request-form.d.ts +42 -42
  183. package/dist/views/receive-request-bulk/composables/use-bulk-receive-request-table.d.ts +8 -8
  184. package/dist/views/recipe/components/recipe-bulk-editor/components/ModificationCard.spec.d.ts +1 -0
  185. package/dist/views/recipe/helper/bulk-edit-simulation.helper.d.ts +0 -1
  186. package/dist/views/recipe/helper/import-recipe.d.ts +2 -2
  187. package/dist/views/recipe/helper/import-recipe.spec.d.ts +1 -0
  188. package/dist/views/settings/PlanLicenseDisplay.spec.d.ts +1 -0
  189. package/dist/views/{integration/components/IntegrationSyncLogTab.vue.d.ts → settings/PlanLicenseDisplay.vue.d.ts} +2 -2
  190. package/dist/views/stock/components/StockRecordCard.vue.d.ts +72 -44
  191. package/dist/views/stock/components/dialog/AmendAdjustmentForm.spec.d.ts +1 -0
  192. package/dist/views/stock/components/dialog/ConvertSkuDialog.spec.d.ts +1 -0
  193. package/dist/views/supplier/components/SupplierForm.vue.d.ts +4 -4
  194. package/dist/views/supplier/composables/use-supplier-table.d.ts +2 -2
  195. package/dist/views/transfer-template/components/transfer-template-dialog/TransferTemplateDialog.vue.d.ts +8 -8
  196. package/dist/views/transfer-template/components/transfer-template-form/composables/use-transfer-locations.d.ts +4 -4
  197. package/dist/views/transfer-template/components/transfer-template-form/composables/use-transfer-template-items.spec.d.ts +1 -0
  198. package/dist/views/transfer-template/composables/use-template-item-bulk-editor.d.ts +24 -24
  199. package/dist/views/transfer-template/composables/use-transfer-template-actions.d.ts +48 -48
  200. package/dist/views/transfer-template/composables/use-transfer-template-table.d.ts +48 -48
  201. package/dist/views/warehouse/components/WarehouseForm.vue.d.ts +6 -4
  202. package/dist/{vue-i18n-DYapak10.js → vue-i18n-mXrQUZTi.js} +235 -235
  203. package/dist/{xlsx.util-DrElrKDx.js → xlsx.util-CKx0NYTq.js} +2 -2
  204. package/package.json +72 -67
  205. package/dist/App-CBS1Tqpl.js +0 -1476
  206. package/dist/ClosingHistoryView-3z17ZJzK.js +0 -761
  207. package/dist/FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-CB50Gqot.js +0 -243
  208. package/dist/FmMultiselectDialog-7xh6h5AX.js +0 -77
  209. package/dist/ImportView-C3Fc0e_X.js +0 -1302
  210. package/dist/IngredientBindedItem.vue_vue_type_script_setup_true_lang-6naVJEke.js +0 -51
  211. package/dist/IngredientGroupView-DA1buE1C.js +0 -985
  212. package/dist/InventoryBindingForm.vue_vue_type_script_setup_true_lang-tEKGPtHZ.js +0 -563
  213. package/dist/NumberPrecisionInput.vue_vue_type_script_setup_true_lang-Cbg0j7Jz.js +0 -72
  214. package/dist/PremiumBadge.vue_vue_type_script_setup_true_lang-Btrg9HNc.js +0 -93
  215. package/dist/PreviewBadge.vue_vue_type_script_setup_true_lang-DX2MJqL4.js +0 -29
  216. package/dist/ProductionRunDetailView-DYeSPsIY.js +0 -2284
  217. package/dist/ProductionRunPreparePrintView-DJOejqOC.js +0 -34
  218. package/dist/ProductionRunTabs.vue_vue_type_script_setup_true_lang-JKMI-vVw.js +0 -7543
  219. package/dist/ProductionRunView-Cg3aYOg9.js +0 -911
  220. package/dist/RecipeView-DC0p9RKL.js +0 -3625
  221. package/dist/SettingsView-DaKfCVY5.js +0 -698
  222. package/dist/StockView-DdweBRFv.js +0 -2612
  223. package/dist/TableActionableRow.vue_vue_type_script_setup_true_lang-DAMpuZ1X.js +0 -84
  224. package/dist/TransferTemplateView-CSXcAB3-.js +0 -2327
  225. package/dist/feature-DtpSrELx.js +0 -1136
  226. package/dist/number-DE6ovaTs.js +0 -138
  227. package/dist/random-CSbEbElR.js +0 -10
  228. package/dist/rules-CkaU7yFU.js +0 -98
  229. package/dist/stock-B3Q9e174.js +0 -75
  230. package/dist/use-inventory-binding-dialog-CCV1iieA.js +0 -152
  231. package/dist/useNavigationMenu-IKam6CEf.js +0 -172
  232. package/dist/usePromise-CbVUCxhj.js +0 -29
  233. package/dist/views/ingredient-group/IngredientGroupView.vue.d.ts +0 -3
  234. package/dist/views/ingredient-group/components/ingredient-group-dialog/IngredientGroupDialog.vue.d.ts +0 -31
  235. package/dist/views/ingredient-group/components/ingredient-group-dialog/IngredientGroupDialogProps.d.ts +0 -10
  236. package/dist/views/ingredient-group/components/ingredient-group-form/IngredientGroupForm.vue.d.ts +0 -21
  237. package/dist/views/ingredient-group/components/ingredient-group-form/IngredientGroupFormProps.d.ts +0 -12
  238. package/dist/views/ingredient-group/components/ingredient-group-rule-field/IngredientGroupRuleField.vue.d.ts +0 -37
  239. package/dist/views/ingredient-group/composables/use-ingredient-group-actions.d.ts +0 -24
  240. package/dist/views/ingredient-group/composables/use-ingredient-group-rule-item.d.ts +0 -31
  241. package/dist/views/ingredient-group/composables/use-ingredient-group-table.d.ts +0 -77
  242. package/dist/views/integration/composables/use-integration-sync-log.d.ts +0 -45
  243. /package/dist/components/{FmFeatureFlagDialog.vue.d.ts → DeprecateSoonPill.vue.d.ts} +0 -0
  244. /package/dist/{views/production-run/ProductionRunPreparePrintView.spec.d.ts → components/FeatureCapabilityGate.spec.d.ts} +0 -0
  245. /package/dist/{views/production-run/features/detail/ProductionRunTabs.spec.d.ts → components/NumberPrecisionInput.spec.d.ts} +0 -0
  246. /package/dist/{views/production-run/features/prepare/production-run-prepare-sheet-cleanup.spec.d.ts → feature-flags/core.spec.d.ts} +0 -0
  247. /package/dist/views/{production-run/ProductionRunPreparePrintView.vue.d.ts → settings/FeatureFlagView.vue.d.ts} +0 -0
@@ -0,0 +1,931 @@
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 { F as te } from "./index-eGvSlWMU.js";
3
+ import { useRouter as kt } from "vue-router";
4
+ import { useDialog as Rt, useSnackbar as It, useBreakpoints as $t } from "@feedmepos/ui-library";
5
+ import { useI18n as ie, useCoreStore as St } from "@feedmepos/mf-common";
6
+ import { u as At, _ as Ct } from "./SingleColumnLayout.vue_vue_type_script_setup_true_lang-DpwneGOV.js";
7
+ import { _ as Ft } from "./TableActionableRow.vue_vue_type_script_setup_true_lang-gJQQKKAC.js";
8
+ import { F as st } from "./FmAdminBadge-DlplQOHb.js";
9
+ 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-C88pjV2s.js";
10
+ import { _ as Qt } from "./FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-CiBhz5sq.js";
11
+ import { u as Gt, a as Kt } from "./app-OztWApio.js";
12
+ import { _ as it } from "./_plugin-vue_export-helper-CHgC5LLL.js";
13
+ const Jt = /* @__PURE__ */ ae({
14
+ __name: "ProductionRunActionsCell",
15
+ props: {
16
+ run: {}
17
+ },
18
+ emits: ["action"],
19
+ setup(q, { emit: o }) {
20
+ const i = q, N = o, { t: u } = ie(), R = m(
21
+ () => Ie(i.run, u("inventory.production.run.list.untitled"))
22
+ ), x = {
23
+ request: 0,
24
+ prepare: 0,
25
+ complete: 0,
26
+ update: 1,
27
+ close: 1,
28
+ cancel: 2
29
+ }, f = m(
30
+ () => 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)
31
+ );
32
+ function w(t) {
33
+ return t === "complete" && Tt(i.run) ? u("inventory.production.run.detail.pendingStock.resume") : u(`inventory.production.run.list.rowActions.${t}`);
34
+ }
35
+ const c = m(
36
+ () => f.value.map((t) => ({
37
+ id: t,
38
+ label: w(t),
39
+ destructive: t === "cancel"
40
+ }))
41
+ );
42
+ function v(t) {
43
+ N("action", t);
44
+ }
45
+ return (t, d) => f.value.length ? (p(), k("div", {
46
+ key: 0,
47
+ class: "production-run-action-interactive relative flex items-center justify-center",
48
+ onClick: d[0] || (d[0] = ot(() => {
49
+ }, ["stop"]))
50
+ }, [
51
+ C(Pt, {
52
+ items: c.value,
53
+ placement: "bottom-end",
54
+ "menu-testid": "run-actions-menu",
55
+ "accessible-label": r(u)("inventory.production.run.list.actionsFor", { name: R.value }),
56
+ onSelect: v
57
+ }, null, 8, ["items", "accessible-label"])
58
+ ])) : H("", !0);
59
+ }
60
+ }), Xt = ["id"], Zt = {
61
+ key: 0,
62
+ class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary"
63
+ }, en = {
64
+ key: 1,
65
+ class: "production-run-items-interactive relative min-w-0"
66
+ }, tn = { class: "min-w-0 overflow-hidden whitespace-nowrap" }, nn = {
67
+ key: 0,
68
+ class: "shrink-0",
69
+ "aria-hidden": "true"
70
+ }, 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" };
71
+ let cn = 0;
72
+ const dn = /* @__PURE__ */ ae({
73
+ __name: "ProductionRunItemsCell",
74
+ props: {
75
+ run: {},
76
+ resolveSku: {},
77
+ rowLinkFocused: { type: Boolean, default: !1 },
78
+ descriptionId: {},
79
+ wrap: { type: Boolean, default: !1 }
80
+ },
81
+ setup(q) {
82
+ 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;
83
+ let _ = null, g = null, O = null, B = !1;
84
+ const I = m(
85
+ () => o.run.plan.items.map((a, S) => {
86
+ const D = o.resolveSku(a.skuId), $ = Dt(a.measurement) ? a.measurement : null, V = ($ == null ? void 0 : $.abbrev) ?? null, j = Mt(a.requestedAmount, V, {
87
+ precision: a.requestedAmount.precision
88
+ });
89
+ return {
90
+ key: `${a.skuId}-${S}`,
91
+ name: (D == null ? void 0 : D.name) ?? a.skuId,
92
+ quantity: V ? j : `${j} · ${i("inventory.production.run.list.itemsUnitUnresolved")}`
93
+ };
94
+ })
95
+ ), 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(
96
+ () => o.wrap ? 0 : Math.max(0, I.value.length - z.value.length)
97
+ ), Z = m(() => L.value > 99 ? "99+" : `+${L.value}`), ye = m(
98
+ () => I.value.map(({ name: a, quantity: S }) => `${a}: ${S}`).join(", ")
99
+ );
100
+ function he() {
101
+ if (o.wrap) {
102
+ w.value = I.value.length, c.value = !1;
103
+ return;
104
+ }
105
+ const a = x.value, S = f.value;
106
+ if (!a || !S || a.clientWidth <= 0) return;
107
+ const D = Array.from(S.children).map((W) => W.offsetWidth);
108
+ if (!D.length || D.reduce((W, Y) => W + Y, 0) <= a.clientWidth) {
109
+ w.value = I.value.length, c.value = !1;
110
+ return;
111
+ }
112
+ c.value = !0;
113
+ const $ = Math.max(0, a.clientWidth - l);
114
+ let V = 0, j = 0;
115
+ for (const W of D) {
116
+ if (V + W > $) break;
117
+ V += W, j++;
118
+ }
119
+ w.value = Math.min(I.value.length, Math.max(1, j + 1));
120
+ }
121
+ function J() {
122
+ B || (B = !0, rt(() => {
123
+ B = !1, he();
124
+ }));
125
+ }
126
+ function oe() {
127
+ _ && (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());
128
+ }
129
+ fe(
130
+ () => I.value.map(({ name: a }) => a).join("\0"),
131
+ () => {
132
+ w.value = Number.POSITIVE_INFINITY, J();
133
+ },
134
+ { flush: "post" }
135
+ ), fe(
136
+ () => o.wrap,
137
+ () => {
138
+ w.value = Number.POSITIVE_INFINITY, J();
139
+ },
140
+ { flush: "post" }
141
+ ), fe([x, f], oe, { flush: "post" }), ke(() => {
142
+ typeof ResizeObserver < "u" && (_ = new ResizeObserver(J), oe()), J();
143
+ }), Re(() => _ == null ? void 0 : _.disconnect());
144
+ function le(a) {
145
+ var S, D;
146
+ a !== u.value && (u.value ? (S = R.value) == null || S.show() : (D = R.value) == null || D.hide());
147
+ }
148
+ return (a, S) => {
149
+ const D = ne("FmPopover");
150
+ return p(), k(X, null, [
151
+ s("span", {
152
+ id: P.value,
153
+ "data-testid": "run-items-a11y-description",
154
+ class: "sr-only"
155
+ }, [
156
+ L.value ? (p(), k(X, { key: 0 }, [
157
+ _e(b(r(i)("inventory.production.run.list.itemsHidden", { count: L.value })) + ". ", 1)
158
+ ], 64)) : H("", !0),
159
+ _e(" " + b(I.value.length ? r(i)("inventory.production.run.list.itemsLabel", { names: ye.value }) : r(i)("inventory.production.run.list.itemsNone")), 1)
160
+ ], 8, Xt),
161
+ I.value.length === 0 ? (p(), k("span", Zt, b(r(i)("inventory.production.run.list.itemsNone")), 1)) : (p(), k("div", en, [
162
+ C(D, {
163
+ ref_key: "popover",
164
+ ref: R,
165
+ "show-popover": u.value,
166
+ placement: "bottom-start",
167
+ onPopoverChanged: le
168
+ }, {
169
+ "popover-button": G(() => [
170
+ s("div", {
171
+ ref_key: "disclosureContainer",
172
+ ref: x,
173
+ "data-testid": "items-disclosure-container",
174
+ 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"]),
175
+ onMouseenter: S[0] || (S[0] = ($) => N.value = !0),
176
+ onMouseleave: S[1] || (S[1] = ($) => N.value = !1)
177
+ }, [
178
+ s("span", {
179
+ "data-testid": "run-items-summary",
180
+ class: se([
181
+ "fm-typo-en-body-md-400 min-w-0 flex-1 text-fm-color-typo-primary",
182
+ a.wrap ? "whitespace-normal break-words" : r(v) ? "flex overflow-hidden whitespace-nowrap" : "truncate"
183
+ ])
184
+ }, [
185
+ r(v) && !a.wrap ? (p(), k(X, { key: 0 }, [
186
+ s("span", tn, b(U.value), 1),
187
+ c.value ? (p(), k("span", nn, "…")) : H("", !0)
188
+ ], 64)) : (p(), k(X, { key: 1 }, [
189
+ _e(b(K.value), 1)
190
+ ], 64))
191
+ ], 2),
192
+ L.value ? (p(), k("span", {
193
+ key: 0,
194
+ "data-testid": "run-items-overflow",
195
+ "data-hidden-count": L.value,
196
+ "data-production-info-size": "sm",
197
+ "aria-hidden": "true",
198
+ 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"
199
+ }, b(Z.value), 9, on)) : H("", !0),
200
+ s("span", {
201
+ ref_key: "measureRail",
202
+ ref: f,
203
+ "data-testid": "run-items-measure",
204
+ "aria-hidden": "true",
205
+ class: "fm-typo-en-body-md-400 pointer-events-none invisible absolute w-max whitespace-nowrap"
206
+ }, [
207
+ (p(!0), k(X, null, xe(I.value, ($, V) => (p(), k("span", {
208
+ key: $.key,
209
+ "data-testid": "run-item-measure"
210
+ }, b(V ? `, ${$.name}` : $.name), 1))), 128))
211
+ ], 512)
212
+ ], 34)
213
+ ]),
214
+ default: G(() => [
215
+ s("div", {
216
+ id: d,
217
+ "data-testid": "run-items-disclosure",
218
+ role: "tooltip",
219
+ "aria-label": r(i)("inventory.production.run.list.itemsDisclosure"),
220
+ class: "pointer-events-none min-w-[288px] p-12"
221
+ }, [
222
+ s("h3", sn, b(r(i)("inventory.production.run.list.itemsCount", { count: I.value.length })), 1),
223
+ s("ul", an, [
224
+ (p(!0), k(X, null, xe(I.value, ($) => (p(), k("li", {
225
+ key: $.key,
226
+ class: "fm-typo-en-body-sm-400 flex items-start justify-between gap-16"
227
+ }, [
228
+ s("span", ln, b($.name), 1),
229
+ s("span", un, b($.quantity), 1)
230
+ ]))), 128))
231
+ ])
232
+ ], 8, rn)
233
+ ]),
234
+ _: 1
235
+ }, 8, ["show-popover"])
236
+ ]))
237
+ ], 64);
238
+ };
239
+ }
240
+ }), pn = ["href", "aria-describedby"], mn = /* @__PURE__ */ ae({
241
+ __name: "ProductionRunNameCell",
242
+ props: {
243
+ name: {},
244
+ href: {},
245
+ descriptionId: {},
246
+ wrap: { type: Boolean, default: !1 }
247
+ },
248
+ emits: ["open", "focus", "blur"],
249
+ setup(q, { emit: o }) {
250
+ const i = q, N = o, u = h(null), R = h(!1);
251
+ let x = null, f = !1;
252
+ function w() {
253
+ const t = u.value;
254
+ R.value = !i.wrap && !!t && t.scrollWidth > t.clientWidth;
255
+ }
256
+ function c() {
257
+ f || (f = !0, rt(() => {
258
+ f = !1, w();
259
+ }));
260
+ }
261
+ fe(() => [i.name, i.wrap], c, { flush: "post" }), ke(() => {
262
+ typeof ResizeObserver < "u" && u.value && (x = new ResizeObserver(c), x.observe(u.value)), c();
263
+ }), Re(() => x == null ? void 0 : x.disconnect());
264
+ function v(t) {
265
+ t.preventDefault(), t.stopPropagation(), N("open");
266
+ }
267
+ return (t, d) => {
268
+ const T = ne("FmTooltip");
269
+ return p(), k("a", {
270
+ href: t.href,
271
+ "aria-describedby": t.descriptionId,
272
+ 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",
273
+ onClick: v,
274
+ onFocus: d[0] || (d[0] = (P) => N("focus")),
275
+ onBlur: d[1] || (d[1] = (P) => N("blur"))
276
+ }, [
277
+ C(T, {
278
+ content: t.name,
279
+ disabled: !R.value,
280
+ placement: "top",
281
+ "z-index": 51,
282
+ "content-class": "production-run-name-tooltip-reference"
283
+ }, {
284
+ default: G(() => [
285
+ s("span", {
286
+ ref_key: "label",
287
+ ref: u,
288
+ "data-testid": "run-name-label",
289
+ class: se(["block min-w-0", t.wrap ? "whitespace-normal break-words" : "truncate"])
290
+ }, b(t.name), 3)
291
+ ]),
292
+ _: 1
293
+ }, 8, ["content", "disabled"])
294
+ ], 40, pn);
295
+ };
296
+ }
297
+ }), vn = /* @__PURE__ */ it(mn, [["__scopeId", "data-v-4d06048a"]]), fn = ["aria-label"], yn = { class: "min-w-0 truncate" }, hn = /* @__PURE__ */ ae({
298
+ __name: "ProductionRunSortHeader",
299
+ props: {
300
+ columnId: {},
301
+ label: {},
302
+ activeColumnId: {},
303
+ descending: { type: Boolean }
304
+ },
305
+ emits: ["toggle"],
306
+ setup(q, { emit: o }) {
307
+ const i = q, N = o, { t: u } = ie(), R = m(() => i.activeColumnId === i.columnId), x = m(
308
+ () => R.value ? u(`inventory.production.run.list.sort.${i.descending ? "descending" : "ascending"}`) : u("inventory.production.run.list.sort.unsorted")
309
+ ), f = m(
310
+ () => R.value ? i.descending ? "arrow_downward" : "arrow_upward" : "unfold_more"
311
+ ), w = m(
312
+ () => u("inventory.production.run.list.sort.label", {
313
+ column: i.label,
314
+ direction: x.value
315
+ })
316
+ ), c = h(null), v = h(null);
317
+ return ke(() => {
318
+ var t;
319
+ v.value = ((t = c.value) == null ? void 0 : t.closest("th")) ?? null;
320
+ }), xt(() => {
321
+ v.value && v.value.setAttribute(
322
+ "aria-sort",
323
+ R.value ? i.descending ? "descending" : "ascending" : "none"
324
+ );
325
+ }), Re(() => {
326
+ var t;
327
+ return (t = v.value) == null ? void 0 : t.removeAttribute("aria-sort");
328
+ }), (t, d) => {
329
+ const T = ne("FmIcon");
330
+ return p(), k("button", {
331
+ ref_key: "button",
332
+ ref: c,
333
+ type: "button",
334
+ 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",
335
+ "aria-label": w.value,
336
+ onClick: d[0] || (d[0] = ot((P) => N("toggle", t.columnId), ["stop"]))
337
+ }, [
338
+ s("span", yn, b(t.label), 1),
339
+ C(T, {
340
+ name: f.value,
341
+ size: "sm",
342
+ "aria-hidden": "true",
343
+ class: "shrink-0"
344
+ }, null, 8, ["name"])
345
+ ], 8, fn);
346
+ };
347
+ }
348
+ });
349
+ let bn = 0;
350
+ function _n(q, o = () => null, i = () => {
351
+ }, N = () => {
352
+ }, u = () => {
353
+ }, R = () => !1, x = (f) => `/production-run/${encodeURIComponent(f._id)}`) {
354
+ var P;
355
+ const { t: f } = ie(), w = St(), c = ++bn, v = h(null), t = (l) => `production-run-table-${c}-items-${encodeURIComponent(l._id)}`, d = (l, _) => {
356
+ const g = N();
357
+ return Q(hn, {
358
+ columnId: l,
359
+ label: _,
360
+ activeColumnId: g == null ? void 0 : g.id,
361
+ descending: g == null ? void 0 : g.desc,
362
+ onToggle: u
363
+ });
364
+ };
365
+ return { columnDefs: [
366
+ {
367
+ id: "runNo",
368
+ header: () => d("runNo", "#"),
369
+ enableSorting: !1,
370
+ size: 80,
371
+ meta: { headerClass: "p-0" },
372
+ cell: (l) => Q(
373
+ "span",
374
+ { class: "fm-typo-en-body-md-600 text-fm-color-typo-primary" },
375
+ `${l.row.original.runNo}`
376
+ )
377
+ },
378
+ {
379
+ id: "name",
380
+ header: () => d("name", f("inventory.production.run.list.columns.name")),
381
+ enableSorting: !1,
382
+ minSize: 240,
383
+ size: 320,
384
+ maxSize: 320,
385
+ meta: { headerClass: "p-0" },
386
+ cell: (l) => Q(vn, {
387
+ name: Ie(
388
+ l.row.original,
389
+ f("inventory.production.run.list.untitled")
390
+ ),
391
+ href: x(l.row.original),
392
+ descriptionId: t(l.row.original),
393
+ wrap: R(),
394
+ onOpen: () => i(l.row.original),
395
+ onFocus: () => {
396
+ v.value = l.row.original._id;
397
+ },
398
+ onBlur: () => {
399
+ v.value === l.row.original._id && (v.value = null);
400
+ }
401
+ })
402
+ },
403
+ {
404
+ id: "items",
405
+ header: () => f("inventory.production.run.list.columns.items"),
406
+ enableSorting: !1,
407
+ minSize: 220,
408
+ size: 280,
409
+ maxSize: 280,
410
+ cell: (l) => Q(dn, {
411
+ run: l.row.original,
412
+ resolveSku: o,
413
+ descriptionId: t(l.row.original),
414
+ wrap: R(),
415
+ rowLinkFocused: v.value === l.row.original._id
416
+ })
417
+ },
418
+ ...(P = w.sessionUser.value) != null && P.role.isAdmin ? [
419
+ {
420
+ id: "statusForAdmin",
421
+ header: () => Q(st, {}, () => f("inventory.production.run.list.columns.status")),
422
+ cell: (l) => l.row.original.status,
423
+ enableSorting: !1,
424
+ size: 120
425
+ }
426
+ ] : [],
427
+ {
428
+ id: "status",
429
+ header: () => d("status", f("inventory.production.run.list.columns.status")),
430
+ enableSorting: !1,
431
+ size: 120,
432
+ meta: { headerClass: "p-0" },
433
+ cell: (l) => Q(zt, { status: l.row.original.status })
434
+ },
435
+ {
436
+ id: "updatedAt",
437
+ header: () => d("updatedAt", f("inventory.production.run.list.columns.updated")),
438
+ enableSorting: !1,
439
+ minSize: 180,
440
+ size: 200,
441
+ maxSize: 200,
442
+ meta: { headerClass: "p-0" },
443
+ cell: (l) => {
444
+ const _ = l.row.original, g = at(_);
445
+ return Q(
446
+ "span",
447
+ { class: "fm-typo-en-body-md-400 text-fm-color-typo-primary whitespace-nowrap" },
448
+ Lt((g == null ? void 0 : g.at) ?? _.createdAt)
449
+ );
450
+ }
451
+ },
452
+ {
453
+ id: "action",
454
+ header: "",
455
+ enableSorting: !1,
456
+ cell: (l) => Q(Jt, {
457
+ run: l.row.original,
458
+ onAction: (_) => q(_, l.row.original)
459
+ }),
460
+ size: 40,
461
+ meta: {
462
+ cellClass: "",
463
+ headerClass: ""
464
+ }
465
+ }
466
+ ] };
467
+ }
468
+ const gn = { class: "sr-only" }, xn = ["aria-label"], wn = {
469
+ key: 0,
470
+ "data-testid": "production-run-history-scope",
471
+ class: "flex shrink-0 flex-wrap items-center justify-between gap-8"
472
+ }, kn = { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary" }, Rn = {
473
+ key: 1,
474
+ role: "alert",
475
+ class: "w-full fm-typo-en-body-sm-400 text-fm-color-typo-secondary"
476
+ }, In = ["aria-label"], $n = ["aria-label"], Sn = {
477
+ key: 2,
478
+ "data-testid": "production-run-list-empty",
479
+ class: "rounded-md border border-dashed border-fm-color-neutral-gray-200 p-48 text-center"
480
+ }, 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 = {
481
+ key: 3,
482
+ "data-testid": "production-run-list-no-match",
483
+ class: "rounded-md border border-dashed border-fm-color-neutral-gray-200 p-40 text-center"
484
+ }, 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 = {
485
+ "data-testid": "production-run-mobile-run-number",
486
+ class: "flex items-center gap-[4px]"
487
+ }, 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 = {
488
+ "data-testid": "production-run-admin-status",
489
+ class: "flex flex-col gap-[4px]"
490
+ }, 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({
491
+ __name: "ProductionRunView",
492
+ setup(q) {
493
+ const { t: o } = ie(), i = kt(), N = Rt(), u = It(), R = Vt(), x = Gt(), f = Kt(), w = At();
494
+ Ot();
495
+ const c = h([]), v = h(!1), t = h(null), d = h(null), T = h(!1), P = h(null), l = m(() => ({
496
+ loading: v.value || T.value,
497
+ loaded: !v.value && !t.value,
498
+ hasMore: d.value !== null,
499
+ error: P.value ?? t.value
500
+ })), _ = h(""), g = h("all"), O = h([{ id: "updatedAt", desc: !0 }]), B = h(!1), I = h(null), z = h(null), K = h(null);
501
+ let U = 0, L = 0;
502
+ const Z = m(
503
+ () => c.value.find((e) => e._id === z.value) ?? null
504
+ ), ye = Et(() => Z.value), he = m(() => !!Z.value && we(Z.value)), J = m(
505
+ () => ye.ingredientLines.value.map((e) => ({
506
+ skuId: e.skuId,
507
+ name: e.name,
508
+ unit: e.unit,
509
+ unitRef: e.unitRef,
510
+ outputSkuIds: e.outputSkuIds
511
+ }))
512
+ );
513
+ function oe() {
514
+ return t.value ? a() : S();
515
+ }
516
+ function le() {
517
+ L++, K.value = null, z.value = null, I.value = null, B.value = !1;
518
+ }
519
+ async function a() {
520
+ const e = ++U;
521
+ v.value = !0, t.value = null, d.value = null, T.value = !1, P.value = null;
522
+ try {
523
+ const n = await R.list();
524
+ if (e !== U) return;
525
+ c.value = n.items, d.value = n.nextCursor;
526
+ } catch (n) {
527
+ if (e !== U) return;
528
+ const y = ge(n);
529
+ t.value = y.message, u == null || u.open({
530
+ title: o("inventory.production.run.list.error.load"),
531
+ message: y.message,
532
+ type: "error"
533
+ });
534
+ } finally {
535
+ e === U && (v.value = !1);
536
+ }
537
+ }
538
+ async function S() {
539
+ const e = d.value;
540
+ if (!e || v.value || T.value) return;
541
+ const n = U;
542
+ T.value = !0, P.value = null;
543
+ try {
544
+ const y = await R.list({ cursor: e });
545
+ if (n !== U || e !== d.value) return;
546
+ if (y.nextCursor === e)
547
+ throw new Error(o("inventory.production.run.list.history.cursorError"));
548
+ const A = new Set(c.value.map((E) => E._id));
549
+ c.value = [...c.value, ...y.items.filter((E) => !A.has(E._id))], d.value = y.nextCursor;
550
+ } catch (y) {
551
+ n === U && (P.value = ge(y).message);
552
+ } finally {
553
+ n === U && (T.value = !1);
554
+ }
555
+ }
556
+ x.watchLocation(() => (le(), a()));
557
+ const D = m(
558
+ () => qt.map((e) => ({
559
+ label: o(`inventory.production.run.list.tabs.${e.key}`),
560
+ value: e.key
561
+ }))
562
+ );
563
+ function $(e) {
564
+ var n;
565
+ return ((n = at(e)) == null ? void 0 : n.at) ?? e.createdAt;
566
+ }
567
+ function V(e, n, y) {
568
+ switch (y) {
569
+ case "runNo":
570
+ return e.runNo - n.runNo;
571
+ case "name":
572
+ return tt(e).localeCompare(tt(n));
573
+ case "status":
574
+ return et(e.status) - et(n.status);
575
+ case "updatedAt":
576
+ return Date.parse($(e)) - Date.parse($(n));
577
+ default:
578
+ return 0;
579
+ }
580
+ }
581
+ const j = m(() => {
582
+ const e = c.value.filter(
583
+ (A) => Ut(A, g.value) && jt(A, _.value, $e)
584
+ ), n = O.value[0];
585
+ if (!n)
586
+ return e.sort(
587
+ (A, E) => V(E, A, "updatedAt") || V(E, A, "runNo")
588
+ );
589
+ const y = n.desc ? -1 : 1;
590
+ return e.sort(
591
+ (A, E) => y * V(A, E, n.id) || V(E, A, "runNo")
592
+ );
593
+ }), { breakpoints: W } = $t(), 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(
594
+ () => Y.value ? j.value.map((e) => `${e._id}:${e._rev}`).join("|") : "desktop"
595
+ );
596
+ function dt() {
597
+ _.value = "", g.value = "all";
598
+ }
599
+ function pt(e) {
600
+ const n = O.value[0];
601
+ O.value = [
602
+ (n == null ? void 0 : n.id) === e ? { id: e, desc: !n.desc } : { id: e, desc: !1 }
603
+ ];
604
+ }
605
+ function $e(e) {
606
+ return f.skuById[e];
607
+ }
608
+ function be(e) {
609
+ i.push(nt(e._id));
610
+ }
611
+ function mt(e) {
612
+ return i.resolve(nt(e._id)).href;
613
+ }
614
+ function vt(e, n) {
615
+ const y = ++L;
616
+ if (z.value = n._id, K.value = null, e === "request") {
617
+ N.open(Yt(o)).onPrimary(() => void ft(n._id, y));
618
+ return;
619
+ }
620
+ K.value = e;
621
+ }
622
+ async function ft(e, n) {
623
+ if (!(n !== L || z.value !== e))
624
+ try {
625
+ const y = await R.request(e);
626
+ if (n !== L || z.value !== e || !Se(y)) return;
627
+ u == null || u.open({
628
+ title: o("inventory.production.run.list.request.success"),
629
+ message: o("inventory.production.run.list.request.successMessage", {
630
+ name: Ie(y, o("inventory.production.run.list.untitled"))
631
+ }),
632
+ type: "success"
633
+ }), z.value = null;
634
+ } catch (y) {
635
+ if (n !== L || z.value !== e) return;
636
+ u == null || u.open({
637
+ title: o("inventory.production.run.list.error.action", {
638
+ action: o("inventory.production.run.list.rowActions.request")
639
+ }),
640
+ message: ge(y).message,
641
+ type: "error"
642
+ });
643
+ }
644
+ }
645
+ function Se(e) {
646
+ const n = c.value.findIndex((A) => A._id === e._id);
647
+ if (n < 0) return !1;
648
+ const y = [...c.value];
649
+ return y[n] = e, c.value = y, !0;
650
+ }
651
+ function re(e) {
652
+ z.value === e._id && Se(e);
653
+ }
654
+ function yt(e) {
655
+ e === null && (K.value = null, z.value = null);
656
+ }
657
+ function ht() {
658
+ le(), a();
659
+ }
660
+ const { columnDefs: bt } = _n(
661
+ vt,
662
+ $e,
663
+ be,
664
+ () => O.value[0],
665
+ pt,
666
+ () => Y.value,
667
+ mt
668
+ );
669
+ function Ae(e) {
670
+ e === "refresh" && a(), e === "create" && (I.value = null, B.value = !0);
671
+ }
672
+ const _t = m(() => [
673
+ {
674
+ label: o("inventory.common.refresh"),
675
+ value: "refresh",
676
+ prependIcon: "refresh"
677
+ },
678
+ {
679
+ label: o("inventory.production.run.list.actions.create"),
680
+ value: "create",
681
+ prependIcon: "add",
682
+ testId: "production-run-mobile-create",
683
+ isPrimary: !0
684
+ }
685
+ ]);
686
+ function gt() {
687
+ I.value = null, a();
688
+ }
689
+ return (e, n) => {
690
+ const y = ne("FmTabs"), A = ne("FmButton"), E = ne("FmTable");
691
+ return p(), ee(Ct, {
692
+ title: r(o)("inventory.production.run.list.title"),
693
+ "helper-text": r(o)("inventory.production.run.list.caption"),
694
+ actions: _t.value,
695
+ "onClick:action": Ae
696
+ }, {
697
+ default: G(() => {
698
+ var Ce;
699
+ return [
700
+ s("div", {
701
+ "data-testid": "production-run-list-content",
702
+ class: se([
703
+ "flex w-full max-h-full flex-col gap-12",
704
+ {
705
+ "p-0": Y.value,
706
+ "px-24": !Y.value
707
+ }
708
+ ])
709
+ }, [
710
+ s("h1", gn, b(r(o)("inventory.production.run.list.title")), 1),
711
+ C(Qt, {
712
+ "change-location": "",
713
+ searchable: "",
714
+ search: _.value,
715
+ "onUpdate:search": n[0] || (n[0] = (F) => _.value = F)
716
+ }, null, 8, ["search"]),
717
+ s("div", {
718
+ class: "flex min-w-0 shrink-0 flex-col gap-12",
719
+ "data-testid": "production-run-list-controls",
720
+ onVnodeMounted: n[2] || (n[2] = //@ts-ignore
721
+ (...F) => r(w).onMounted && r(w).onMounted(...F)),
722
+ onVnodeUnmounted: n[3] || (n[3] = //@ts-ignore
723
+ (...F) => r(w).onUnmounted && r(w).onUnmounted(...F))
724
+ }, [
725
+ s("nav", {
726
+ class: "min-w-0 overflow-x-auto",
727
+ "aria-label": r(o)("inventory.production.run.list.tabsLabel")
728
+ }, [
729
+ C(y, {
730
+ "model-value": g.value,
731
+ "onUpdate:modelValue": n[1] || (n[1] = (F) => g.value = F),
732
+ items: D.value
733
+ }, null, 8, ["model-value", "items"])
734
+ ], 8, xn),
735
+ !v.value && !t.value && (d.value || P.value) ? (p(), k("div", wn, [
736
+ s("p", kn, b(r(o)("inventory.production.run.list.history.scope", { count: c.value.length })), 1),
737
+ d.value ? (p(), ee(A, {
738
+ key: 0,
739
+ "data-testid": "production-run-load-more",
740
+ variant: "secondary",
741
+ label: r(o)("inventory.production.run.list.history.loadMore"),
742
+ loading: T.value,
743
+ disabled: T.value,
744
+ onClick: S
745
+ }, null, 8, ["label", "loading", "disabled"])) : H("", !0),
746
+ P.value ? (p(), k("p", Rn, b(P.value), 1)) : H("", !0)
747
+ ])) : H("", !0)
748
+ ], 512),
749
+ s("div", {
750
+ id: "production-run-list-panel",
751
+ role: "region",
752
+ "aria-label": r(o)("inventory.production.run.list.tabsLabel"),
753
+ class: se(["flex min-h-0 flex-col", !v.value && !t.value && j.value.length ? "" : "overflow-y-auto"])
754
+ }, [
755
+ v.value ? (p(), k("div", {
756
+ key: 0,
757
+ "data-testid": "production-run-list-loading",
758
+ role: "status",
759
+ class: "w-full space-y-12",
760
+ "aria-busy": "true",
761
+ "aria-label": r(o)("inventory.production.run.list.loading")
762
+ }, [
763
+ (p(), k(X, null, xe(6, (F) => s("div", {
764
+ key: F,
765
+ "data-testid": "production-run-list-skeleton-row",
766
+ class: "h-80 w-full animate-pulse rounded-md bg-fm-color-neutral-gray-100"
767
+ })), 64))
768
+ ], 8, $n)) : t.value ? (p(), ee(Wt, {
769
+ key: 1,
770
+ "data-testid": "production-run-list-error",
771
+ class: "m-16",
772
+ role: "alert",
773
+ tone: "critical",
774
+ title: r(o)("inventory.production.run.list.error.load"),
775
+ message: t.value
776
+ }, {
777
+ actions: G(() => [
778
+ C(A, {
779
+ "data-testid": "production-run-list-retry",
780
+ label: r(o)("inventory.production.run.list.error.retry"),
781
+ variant: "secondary",
782
+ onClick: a
783
+ }, null, 8, ["label"])
784
+ ]),
785
+ _: 1
786
+ }, 8, ["title", "message"])) : c.value.length === 0 ? (p(), k("div", Sn, [
787
+ s("div", An, b(r(o)("inventory.production.run.list.empty.noneTitle")), 1),
788
+ s("div", Cn, b(r(o)("inventory.production.run.list.empty.noneDescription")), 1),
789
+ C(A, {
790
+ "data-testid": "production-run-list-empty-create",
791
+ class: "mx-auto mt-16",
792
+ label: r(o)("inventory.production.run.list.empty.create"),
793
+ "prepend-icon": "add",
794
+ onClick: n[4] || (n[4] = (F) => Ae("create"))
795
+ }, null, 8, ["label"])
796
+ ])) : j.value.length === 0 ? (p(), k("div", Fn, [
797
+ s("div", Nn, b(r(o)("inventory.production.run.list.empty.noMatchTitle")), 1),
798
+ s("div", Pn, b(_.value.trim() ? r(o)("inventory.production.run.list.empty.searchDescription", {
799
+ query: _.value.trim()
800
+ }) : r(o)("inventory.production.run.list.empty.noMatchDescription")), 1),
801
+ C(A, {
802
+ "data-testid": "production-run-list-clear-filters",
803
+ class: "mx-auto mt-12",
804
+ label: r(o)("inventory.production.run.list.empty.clearFilters"),
805
+ "aria-label": r(o)("inventory.production.run.list.empty.clearFilters"),
806
+ variant: "tertiary",
807
+ onClick: dt
808
+ }, null, 8, ["label", "aria-label"])
809
+ ])) : (p(), ee(E, {
810
+ key: ct.value,
811
+ class: "production-run-table",
812
+ style: wt(ut.value),
813
+ "column-defs": r(bt),
814
+ "row-data": j.value,
815
+ loading: v.value,
816
+ "page-size": lt.value,
817
+ "pin-header-row": !1,
818
+ onRowClick: n[5] || (n[5] = (F) => be(F.original))
819
+ }, {
820
+ "list-row": G((F) => [
821
+ C(Ft, {
822
+ "data-testid": "production-run-mobile-row",
823
+ class: "production-run-mobile-row !py-8",
824
+ row: F,
825
+ onRowClick: be
826
+ }, {
827
+ default: G((M) => {
828
+ 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;
829
+ return [
830
+ s("div", Tn, [
831
+ s("div", Dn, [
832
+ n[7] || (n[7] = s("span", { class: "text-[12px] font-medium leading-[18px] text-fm-color-typo-secondary" }, "#", -1)),
833
+ s("div", Mn, [
834
+ C(r(te), {
835
+ render: (Pe = (Ne = (Fe = M.runNo) == null ? void 0 : Fe.column) == null ? void 0 : Ne.columnDef) == null ? void 0 : Pe.cell,
836
+ props: (Te = (ue = M.runNo) == null ? void 0 : ue.getContext) == null ? void 0 : Te.call(ue)
837
+ }, null, 8, ["render", "props"])
838
+ ])
839
+ ]),
840
+ s("div", zn, [
841
+ s("span", Ln, b(r(o)("inventory.production.run.list.columns.name")), 1),
842
+ s("div", Vn, [
843
+ C(r(te), {
844
+ render: (ze = (Me = (De = M.name) == null ? void 0 : De.column) == null ? void 0 : Me.columnDef) == null ? void 0 : ze.cell,
845
+ props: (Le = (ce = M.name) == null ? void 0 : ce.getContext) == null ? void 0 : Le.call(ce)
846
+ }, null, 8, ["render", "props"])
847
+ ])
848
+ ]),
849
+ s("div", On, [
850
+ s("span", En, b(r(o)("inventory.production.run.list.columns.items")), 1),
851
+ C(r(te), {
852
+ render: (Ee = (Oe = (Ve = M.items) == null ? void 0 : Ve.column) == null ? void 0 : Oe.columnDef) == null ? void 0 : Ee.cell,
853
+ props: (qe = (de = M.items) == null ? void 0 : de.getContext) == null ? void 0 : qe.call(de)
854
+ }, null, 8, ["render", "props"])
855
+ ]),
856
+ M.statusForAdmin ? (p(), ee(st, { key: 0 }, {
857
+ default: G(() => {
858
+ var Ke, Je, Xe, ve, Ze;
859
+ return [
860
+ s("div", qn, [
861
+ s("span", Un, b(r(o)("inventory.production.run.list.columns.status")), 1),
862
+ C(r(te), {
863
+ render: (Xe = (Je = (Ke = M.statusForAdmin) == null ? void 0 : Ke.column) == null ? void 0 : Je.columnDef) == null ? void 0 : Xe.cell,
864
+ props: (Ze = (ve = M.statusForAdmin) == null ? void 0 : ve.getContext) == null ? void 0 : Ze.call(ve)
865
+ }, null, 8, ["render", "props"])
866
+ ])
867
+ ];
868
+ }),
869
+ _: 2
870
+ }, 1024)) : H("", !0),
871
+ s("div", jn, [
872
+ s("span", Wn, b(r(o)("inventory.production.run.list.columns.status")), 1),
873
+ C(r(te), {
874
+ render: (We = (je = (Ue = M.status) == null ? void 0 : Ue.column) == null ? void 0 : je.columnDef) == null ? void 0 : We.cell,
875
+ props: (He = (pe = M.status) == null ? void 0 : pe.getContext) == null ? void 0 : He.call(pe)
876
+ }, null, 8, ["render", "props"])
877
+ ]),
878
+ s("div", Hn, [
879
+ s("span", Bn, b(r(o)("inventory.production.run.list.columns.updated")), 1),
880
+ C(r(te), {
881
+ render: (Qe = (Ye = (Be = M.updatedAt) == null ? void 0 : Be.column) == null ? void 0 : Ye.columnDef) == null ? void 0 : Qe.cell,
882
+ props: (Ge = (me = M.updatedAt) == null ? void 0 : me.getContext) == null ? void 0 : Ge.call(me)
883
+ }, null, 8, ["render", "props"])
884
+ ])
885
+ ])
886
+ ];
887
+ }),
888
+ _: 2
889
+ }, 1032, ["row"])
890
+ ]),
891
+ _: 1
892
+ }, 8, ["style", "column-defs", "row-data", "loading", "page-size"]))
893
+ ], 10, In)
894
+ ], 2),
895
+ B.value ? (p(), ee(Ht, {
896
+ key: 0,
897
+ show: !0,
898
+ run: I.value,
899
+ "duplicate-sources": c.value,
900
+ "duplicate-source-state": l.value,
901
+ onLoadMoreDuplicateSources: oe,
902
+ "onUpdate:show": n[6] || (n[6] = (F) => B.value = F),
903
+ onSaved: gt
904
+ }, null, 8, ["run", "duplicate-sources", "duplicate-source-state"])) : H("", !0),
905
+ C(Bt, {
906
+ action: K.value,
907
+ run: Z.value,
908
+ "location-name": ((Ce = r(x)._currentLocation) == null ? void 0 : Ce.name) ?? null,
909
+ "duplicate-sources": c.value,
910
+ "duplicate-source-state": l.value,
911
+ onLoadMoreDuplicateSources: oe,
912
+ "at-target": he.value,
913
+ ingredients: J.value,
914
+ "onUpdate:action": yt,
915
+ onEdited: re,
916
+ onIssued: re,
917
+ onRecorded: re,
918
+ onClosed: re,
919
+ onCancelled: re,
920
+ onReload: ht
921
+ }, null, 8, ["action", "run", "location-name", "duplicate-sources", "duplicate-source-state", "at-target", "ingredients"])
922
+ ];
923
+ }),
924
+ _: 1
925
+ }, 8, ["title", "helper-text", "actions"]);
926
+ };
927
+ }
928
+ }), ao = /* @__PURE__ */ it(Yn, [["__scopeId", "data-v-53484757"]]);
929
+ export {
930
+ ao as default
931
+ };