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