@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,31 +1,33 @@
1
- import { defineComponent as te, resolveComponent as G, createElementBlock as T, openBlock as _, createElementVNode as r, createCommentVNode as H, normalizeClass as Z, createTextVNode as K, toDisplayString as D, unref as f, createVNode as A, withCtx as j, Fragment as Y, renderList as X, ref as V, computed as U, watch as Ie, createSlots as Je, createBlock as W, h as De, createStaticVNode as qe, normalizeStyle as Se, withDirectives as Xe, isRef as Ve, vModelText as Ze, withModifiers as _e, Teleport as et, normalizeProps as tt, guardReactiveProps as ot, mergeProps as nt } from "vue";
2
- import { u as st, _ as at } from "./SingleColumnLayout.vue_vue_type_script_setup_true_lang-DpwneGOV.js";
3
- import { useCoreStore as Ae, useI18n as ne } from "@feedmepos/mf-common";
4
- import { useDialogChild as rt, useSnackbar as ue, useDialog as Fe, FmButtonVariant as xe, components as lt, useProxiedModel as it, useBreakpoints as ct } from "@feedmepos/ui-library";
5
- import { defineStore as ze, storeToRefs as Ge } from "pinia";
1
+ import { defineComponent as te, resolveComponent as G, createElementBlock as T, openBlock as _, createElementVNode as r, createCommentVNode as H, normalizeClass as Z, createTextVNode as K, toDisplayString as D, unref as f, createVNode as A, withCtx as j, Fragment as Y, renderList as X, ref as V, computed as U, watch as Ce, createSlots as Qe, createBlock as W, h as Fe, createStaticVNode as Je, normalizeStyle as De, withDirectives as qe, isRef as Ue, vModelText as Xe, withModifiers as he, Teleport as Ze, normalizeProps as et, guardReactiveProps as tt, mergeProps as ot } from "vue";
2
+ import { u as nt, _ as st } from "./SingleColumnLayout.vue_vue_type_script_setup_true_lang-DpwneGOV.js";
3
+ import { useCoreStore as Se, useI18n as ne } from "@feedmepos/mf-common";
4
+ import { useDialogChild as at, useSnackbar as de, useDialog as Ie, FmButtonVariant as _e, components as rt, useProxiedModel as lt, useBreakpoints as it } from "@feedmepos/ui-library";
5
+ import { defineStore as Ve, storeToRefs as ze } from "pinia";
6
6
  import { F as oe } from "./form-mode.enum-BKiNVH6A.js";
7
- import { a as pe } from "./closing-template-B4lQetjU.js";
8
- import { a as Re, m as mt, u as Pe, c as Oe } from "./app-CGcDbrt8.js";
9
- import { t as Te, a as Me, d as Ee, s as He, r as dt } from "./xlsx.util-DrElrKDx.js";
10
- import { F as ut } from "./FmDroppableField-J0tG_U3w.js";
11
- import { f as je, b as $e } from "./date2-CHOcS7LX.js";
12
- import { u as pt } from "./netsuite-CaILEA4R.js";
13
- import { D as ke, R as J } from "./row-action.enum-ncgDYAjP.js";
14
- import { c as ft } from "./component-BmLAdDiY.js";
15
- import { f as yt } from "./format-time-from-id-DBFdt14U.js";
16
- import { _ as vt } from "./TemplatePublishDialog.vue_vue_type_script_setup_true_lang-Dxc-jNte.js";
17
- import { u as gt } from "./duplicate-template-Dyz7iXqd.js";
18
- import { _ as bt } from "./FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-CB50Gqot.js";
19
- import { _ as ht } from "./CursorPaginatedTable.vue_vue_type_script_setup_true_lang-BCUhtL_B.js";
20
- import { R as _t, A as xt } from "./rules-CkaU7yFU.js";
21
- import { u as Ye } from "./use-ingredient-select-dialog-eYM-6q4s.js";
22
- import { d as kt } from "./defineDeepModel-DLlTW3xL.js";
23
- import { u as wt } from "./use-template-enabled-locations-C0o5r4_0.js";
24
- import { _ as $t } from "./SystemTrailDialog.vue_vue_type_script_setup_true_lang-tfMHi9Yv.js";
25
- import { _ as Tt, F as we } from "./TableActionableRow.vue_vue_type_script_setup_true_lang-DAMpuZ1X.js";
7
+ import { a as ue } from "./closing-template-DIxXDgZQ.js";
8
+ import { a as Ae, m as ct, u as Re, c as Ge } from "./app-OztWApio.js";
9
+ import { t as $e, a as Pe, d as Me, s as Oe, r as mt } from "./xlsx.util-CKx0NYTq.js";
10
+ import { F as dt } from "./FmDroppableField-J0tG_U3w.js";
11
+ import { f as He, b as we } from "./date2-BTzYzk-x.js";
12
+ import { u as ut } from "./netsuite-DEhdSyBn.js";
13
+ import { D as xe, R as J } from "./row-action.enum-B2Y5YFbc.js";
14
+ import { c as pt } from "./component-BmLAdDiY.js";
15
+ import { f as ft } from "./format-time-from-id-DGLxhRFH.js";
16
+ import { _ as yt } from "./TemplatePublishDialog.vue_vue_type_script_setup_true_lang-CyQujMzv.js";
17
+ import { u as vt } from "./duplicate-template-BKVPhi40.js";
18
+ import { _ as gt } from "./FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-CiBhz5sq.js";
19
+ import { _ as bt } from "./CursorPaginatedTable.vue_vue_type_script_setup_true_lang-BCUhtL_B.js";
20
+ import { R as ht, A as _t } from "./rules-D01xYhgI.js";
21
+ import { u as je } from "./use-ingredient-select-dialog-DV_hkAt9.js";
22
+ import { d as xt } from "./defineDeepModel-CrZAv12u.js";
23
+ import { _ as kt } from "./FeatureCapabilityBadge.vue_vue_type_script_setup_true_lang-BUYI8koH.js";
24
+ import { u as wt } from "./use-template-enabled-locations-DGqw8tvz.js";
25
+ import { _ as $t } from "./SystemTrailDialog.vue_vue_type_script_setup_true_lang-C_YmC-ZX.js";
26
+ import { _ as Tt } from "./TableActionableRow.vue_vue_type_script_setup_true_lang-gJQQKKAC.js";
27
+ import { F as ke } from "./index-eGvSlWMU.js";
26
28
  import { _ as Ct } from "./_plugin-vue_export-helper-CHgC5LLL.js";
27
- var Ne = /* @__PURE__ */ ((m) => (m.Ingredients = "Ingredients", m))(Ne || {});
28
- function Ke(m) {
29
+ var Ee = /* @__PURE__ */ ((m) => (m.Ingredients = "Ingredients", m))(Ee || {});
30
+ function Ye(m) {
29
31
  const t = m.sku, e = new Set(m.disabledMeasurements);
30
32
  return [
31
33
  {
@@ -40,7 +42,7 @@ function Ke(m) {
40
42
  }))
41
43
  ];
42
44
  }
43
- function We() {
45
+ function Ke() {
44
46
  return [
45
47
  {
46
48
  id: "code",
@@ -62,9 +64,9 @@ function We() {
62
64
  }
63
65
  function It(m) {
64
66
  var h;
65
- const e = Ae().currentBusiness.value, a = (h = m.map((l) => {
67
+ const e = Se().currentBusiness.value, a = (h = m.map((l) => {
66
68
  var y;
67
- const o = l.items.flatMap(Ke), g = We(), i = [
69
+ const o = l.items.flatMap(Ye), g = Ke(), i = [
68
70
  ["Template ID", l._id],
69
71
  ["Template name", l.name],
70
72
  ["Business name", e == null ? void 0 : e.name],
@@ -78,8 +80,8 @@ function It(m) {
78
80
  [],
79
81
  g.map((x) => x.name),
80
82
  ...o.map((x) => g.map((d) => x[d.id]))
81
- ], I = g.map((x) => `system:${x.id}`), C = Te(i, I);
82
- return { name: l.name, sheet: C };
83
+ ], F = g.map((x) => `system:${x.id}`), I = $e(i, F);
84
+ return { name: l.name, sheet: I };
83
85
  }).reduce(
84
86
  (l, o) => {
85
87
  var i;
@@ -90,46 +92,46 @@ function It(m) {
90
92
  sheets: {},
91
93
  sheetOccurence: {}
92
94
  }
93
- )) == null ? void 0 : h.sheets, u = `${e == null ? void 0 : e.name} closing templates (${je(/* @__PURE__ */ new Date())}).xlsx`, b = Me(a);
94
- return Ee(b, u), u;
95
+ )) == null ? void 0 : h.sheets, u = `${e == null ? void 0 : e.name} closing templates (${He(/* @__PURE__ */ new Date())}).xlsx`, b = Pe(a);
96
+ return Me(b, u), u;
95
97
  }
96
98
  function Ft(m) {
97
- Ae().currentBusiness.value;
99
+ Se().currentBusiness.value;
98
100
  const e = 3, k = (i) => {
99
- const I = [], C = i.sku, y = new Set(i.disabledMeasurements || []);
100
- y.has(C.unit._id) || I.push(C.unit.abbrev);
101
- for (const x of C.unit.measurements) {
102
- if (I.length >= e) break;
103
- y.has(x.id) || I.push(x.abbrev);
101
+ const F = [], I = i.sku, y = new Set(i.disabledMeasurements || []);
102
+ y.has(I.unit._id) || F.push(I.unit.abbrev);
103
+ for (const x of I.unit.measurements) {
104
+ if (F.length >= e) break;
105
+ y.has(x.id) || F.push(x.abbrev);
104
106
  }
105
- return I;
107
+ return F;
106
108
  }, a = ["#", "Code", "Name", "UOM"], u = [
107
109
  ["Template:", m.name],
108
110
  ["Reference:", m.ref ?? ""],
109
111
  [],
110
112
  a,
111
- ...m.items.map((i, I) => {
112
- const C = k(i);
113
+ ...m.items.map((i, F) => {
114
+ const I = k(i);
113
115
  return [
114
- I + 1,
116
+ F + 1,
115
117
  // Index starting from 1
116
118
  i.sku.code,
117
119
  i.sku.name,
118
120
  // Add UOM columns (up to MAX_UOM_COLUMNS)
119
121
  ...Array(e).fill("").map(
120
- (y, x) => C[x] ? `_____ ${C[x]}` : ""
122
+ (y, x) => I[x] ? `_____ ${I[x]}` : ""
121
123
  )
122
124
  ];
123
125
  })
124
- ], b = Te(u, a);
126
+ ], b = $e(u, a);
125
127
  if (b["!ref"]) {
126
128
  const i = {
127
129
  top: { style: "thin", color: { rgb: "000000" } },
128
130
  bottom: { style: "thin", color: { rgb: "000000" } },
129
131
  left: { style: "thin", color: { rgb: "000000" } },
130
132
  right: { style: "thin", color: { rgb: "000000" } }
131
- }, I = 4, C = I + m.items.length, y = a.map((x, d) => String.fromCharCode(65 + d));
132
- for (let x = I; x <= C; x++)
133
+ }, F = 4, I = F + m.items.length, y = a.map((x, d) => String.fromCharCode(65 + d));
134
+ for (let x = F; x <= I; x++)
133
135
  y.forEach((d) => {
134
136
  const $ = `${d}${x}`;
135
137
  b[$] || (b[$] = { t: "s", v: "" }), b[$].s = {
@@ -154,11 +156,11 @@ function Ft(m) {
154
156
  header: 0.3,
155
157
  footer: 0.3
156
158
  };
157
- const l = m.name.slice(0, 31), o = Me({ [l]: b }), g = `${m.name} - Closing Template (${je(/* @__PURE__ */ new Date())}).xlsx`;
158
- return Ee(o, g), g;
159
+ const l = m.name.slice(0, 31), o = Pe({ [l]: b }), g = `${m.name} - Closing Template (${He(/* @__PURE__ */ new Date())}).xlsx`;
160
+ return Me(o, g), g;
159
161
  }
160
162
  function Dt() {
161
- const m = Ae(), t = Re(), e = pt(), k = Ke({
163
+ const m = Se(), t = Ae(), e = ut(), k = Ye({
162
164
  sku: {
163
165
  unit: {
164
166
  _id: "",
@@ -171,7 +173,7 @@ function Dt() {
171
173
  _id: "",
172
174
  name: "Sugar"
173
175
  }
174
- })[0], a = m.currentBusiness.value, u = We(), b = [
176
+ })[0], a = m.currentBusiness.value, u = Ke(), b = [
175
177
  ["Template ID (leave empty to create new)", ""],
176
178
  ["Template Name", "New template"],
177
179
  ["Business name", a == null ? void 0 : a.name],
@@ -186,7 +188,7 @@ function Dt() {
186
188
  [],
187
189
  u.map((y) => y.name),
188
190
  u.map((y) => k[y.id])
189
- ], h = u.map((y) => `system:${y.id}`), l = Te(b, h), o = e.isEnabled ? e.state.setting.childItems ?? [] : [], g = o.reduce(
191
+ ], h = u.map((y) => `system:${y.id}`), l = $e(b, h), o = e.isEnabled ? e.state.setting.childItems ?? [] : [], g = o.reduce(
190
192
  (y, x) => {
191
193
  var S, P;
192
194
  const d = (S = e.netSuiteItemIdToSkuId.get(x.parentNetSuiteId)) == null ? void 0 : S[0], $ = (P = e.netSuiteMeasurementIdToMeasurementId.get(
@@ -206,7 +208,7 @@ function Dt() {
206
208
  ), y);
207
209
  },
208
210
  {}
209
- ), i = Te(
211
+ ), i = $e(
210
212
  [
211
213
  ...t.skus.flatMap((y) => [
212
214
  [y.code, y.name, y.unit.abbrev, !0],
@@ -232,16 +234,16 @@ function Dt() {
232
234
  "Enabled (true/false)",
233
235
  ...o.length ? ["Netsuite Parent"] : []
234
236
  ]
235
- ), I = Me({
237
+ ), F = Pe({
236
238
  Template: l,
237
239
  Ingredients: i
238
- }), C = `${a == null ? void 0 : a.name} transfer templates import.xlsx`;
239
- return Ee(I, C), C;
240
+ }), I = `${a == null ? void 0 : a.name} transfer templates import.xlsx`;
241
+ return Me(F, I), I;
240
242
  }
241
243
  function St(m) {
242
244
  if (!m.length || `${m[0]}`.toLocaleLowerCase() === "all")
243
245
  return [];
244
- const t = /(.*) \(((warehouse_|restaurant_).{24,})\)/, k = Pe().locationByDbName;
246
+ const t = /(.*) \(((warehouse_|restaurant_).{24,})\)/, k = Re().locationByDbName;
245
247
  return m.map((a) => {
246
248
  const u = new Array(), b = a.trim(), h = t.exec(b);
247
249
  if (!h)
@@ -269,7 +271,7 @@ function At(m) {
269
271
  b,
270
272
  h,
271
273
  l
272
- ] = He(m);
274
+ ] = Oe(m);
273
275
  return {
274
276
  id: `${e[1] ?? ""}`.trim(),
275
277
  name: `${k[1] ?? ""}`.trim(),
@@ -290,18 +292,18 @@ function Rt(m) {
290
292
  o,
291
293
  g,
292
294
  ...i
293
- ] = He(m);
295
+ ] = Oe(m);
294
296
  if (!t || !t.length || t.some((d) => d.length && !d.startsWith("system:")))
295
297
  throw new Error("Missing meta header. Excel file does not come from the template.");
296
- const I = t.map((d) => d.split(":")[1]), y = ["code", "name", "unit", "enabled"].filter((d) => !I.includes(d));
298
+ const F = t.map((d) => d.split(":")[1]), y = ["code", "name", "unit", "enabled"].filter((d) => !F.includes(d));
297
299
  if (y.length)
298
300
  throw new Error(
299
301
  `Missing meta headers (${y.join()}). Excel file does not come from the template.`
300
302
  );
301
303
  return i.map((d, $) => {
302
304
  const n = {};
303
- for (const w in I) {
304
- const S = I[w];
305
+ for (const w in F) {
306
+ const S = F[w];
305
307
  Object.assign(n, { [S]: d[w] });
306
308
  }
307
309
  return {
@@ -321,7 +323,7 @@ function Pt(m) {
321
323
  );
322
324
  }
323
325
  function Mt(m) {
324
- const t = m.parent.data, e = new Array(), a = Re().skuByCode[t.code ?? ""];
326
+ const t = m.parent.data, e = new Array(), a = Ae().skuByCode[t.code ?? ""];
325
327
  if (!a)
326
328
  return e.push(`Cannot find ingredient of code ${t.code} ${t.name}`), { errors: e };
327
329
  const u = {
@@ -331,7 +333,7 @@ function Mt(m) {
331
333
  `Cannot find measurement unit of ${t.unit} for (${t.code}) ${t.name}.`
332
334
  ) : (t.enabled === !0 || `${t.enabled}`.toLocaleLowerCase() === "true") && b.delete(a.unit._id);
333
335
  for (const l of m.children) {
334
- const o = l.data, g = o.unit === a.unit.abbrev ? a.unit : void 0, i = a.unit.measurements.find((I) => I.abbrev === o.unit);
336
+ const o = l.data, g = o.unit === a.unit.abbrev ? a.unit : void 0, i = a.unit.measurements.find((F) => F.abbrev === o.unit);
335
337
  if (!i && !g) {
336
338
  e.push(
337
339
  `Cannot find measurement unit of ${o.unit} for (${t.code}) ${t.name}.`
@@ -344,18 +346,18 @@ function Mt(m) {
344
346
  }
345
347
  async function Et(m) {
346
348
  const t = m.SheetNames.filter(
347
- (u) => !Object.values(Ne).map(String).includes(u)
348
- ), k = await pe().readTemplates(), a = mt(k, "_id");
349
+ (u) => !Object.values(Ee).map(String).includes(u)
350
+ ), k = await ue().readTemplates(), a = ct(k, "_id");
349
351
  try {
350
352
  return t.reduce(
351
353
  (u, b) => {
352
354
  const h = new Array(), l = m.Sheets[b], o = At(l), g = St(o.locations), i = g.filter((n) => n.location).map((n) => n.location);
353
355
  h.push(...g.flatMap((n) => n.errors));
354
- const I = Rt(l).filter(
356
+ const F = Rt(l).filter(
355
357
  (n) => n.data.code || n.data.unit
356
- ), C = Pt(I);
357
- h.push(...C.errors);
358
- const y = C.result.map(
358
+ ), I = Pt(F);
359
+ h.push(...I.errors);
360
+ const y = I.result.map(
359
361
  (n) => Mt(n)
360
362
  );
361
363
  h.push(...y.flatMap((n) => n.errors));
@@ -423,7 +425,7 @@ async function Et(m) {
423
425
  const Nt = { class: "flex items-center gap-12 pl-8" }, Bt = { class: "flex flex-col" }, Lt = { class: "fm-typo-en-body-md-400 text-fm-color-typo-primary flex items-center gap-4" }, Ut = {
424
426
  key: 0,
425
427
  class: "text-fm-color-typo-secondary fm-typo-en-body-sm-400"
426
- }, Vt = { key: 0 }, Ue = /* @__PURE__ */ te({
428
+ }, Vt = { key: 0 }, Le = /* @__PURE__ */ te({
427
429
  __name: "ClosingTemplateImportItem",
428
430
  props: {
429
431
  type: {},
@@ -495,22 +497,22 @@ const Nt = { class: "flex items-center gap-12 pl-8" }, Bt = { class: "flex flex-
495
497
  }, qt = { class: "fm-typo-en-body-lg-600" }, Xt = /* @__PURE__ */ te({
496
498
  __name: "ClosingTemplateImport",
497
499
  setup(m) {
498
- const t = V(null), e = rt(), k = ue(), a = V(!1), u = V(!1), b = V(new Array()), h = V([]), l = V([]), o = U(
499
- () => !!b.value.length || h.value.some((C) => C.errors.length) || l.value.some((C) => C.errors.length)
500
+ const t = V(null), e = at(), k = de(), a = V(!1), u = V(!1), b = V(new Array()), h = V([]), l = V([]), o = U(
501
+ () => !!b.value.length || h.value.some((I) => I.errors.length) || l.value.some((I) => I.errors.length)
500
502
  ), g = U(
501
503
  () => !!h.value.length || !!l.value.length
502
504
  ), { t: i } = ne();
503
- async function I(C) {
505
+ async function F(I) {
504
506
  b.value = [], h.value = [], l.value = [];
505
507
  try {
506
508
  a.value = !0;
507
509
  const [y] = await Promise.all([
508
- dt(C),
510
+ mt(I),
509
511
  // fake buffer
510
512
  new Promise((n) => setTimeout(n, 1e3))
511
513
  ]);
512
514
  if (!y.SheetNames.filter(
513
- (n) => !Object.values(Ne).map(String).includes(n)
515
+ (n) => !Object.values(Ee).map(String).includes(n)
514
516
  ).find((n) => n)) {
515
517
  b.value.push(i("inventory.ingredient.import.fileError.noSheet"));
516
518
  return;
@@ -540,9 +542,9 @@ const Nt = { class: "flex items-center gap-12 pl-8" }, Bt = { class: "flex flex-
540
542
  }), a.value = !1;
541
543
  }
542
544
  }
543
- return Ie(t, (C) => {
544
- C && I(C);
545
- }), (C, y) => {
545
+ return Ce(t, (I) => {
546
+ I && F(I);
547
+ }), (I, y) => {
546
548
  const x = G("FmCircularProgress"), d = G("FmIcon"), $ = G("FmButton");
547
549
  return _(), T("div", zt, [
548
550
  r("div", Gt, D(f(i)("inventory.closing.template.import.message")), 1),
@@ -555,7 +557,7 @@ const Nt = { class: "flex items-center gap-12 pl-8" }, Bt = { class: "flex flex-
555
557
  ]),
556
558
  r("div", Ht, D(f(i)("inventory.formField.loading")), 1)
557
559
  ])) : (_(), T(Y, { key: 1 }, [
558
- A(ut, {
560
+ A(dt, {
559
561
  class: Z({
560
562
  "w-full": !0,
561
563
  "h-[200px]": !t.value
@@ -564,7 +566,7 @@ const Nt = { class: "flex items-center gap-12 pl-8" }, Bt = { class: "flex flex-
564
566
  onFileUpload: y[0] || (y[0] = (n) => t.value = n),
565
567
  label: f(i)("inventory.ingredient.import.uploadTemplate"),
566
568
  "button-label": f(i)("inventory.ingredient.import.selectFile")
567
- }, Je({ _: 2 }, [
569
+ }, Qe({ _: 2 }, [
568
570
  t.value ? {
569
571
  name: "default",
570
572
  fn: j(({ openFileDialog: n }) => [
@@ -629,7 +631,7 @@ const Nt = { class: "flex items-center gap-12 pl-8" }, Bt = { class: "flex flex-
629
631
  ]), 1032, ["class", "label", "button-label"]),
630
632
  g.value ? (_(), T("div", Jt, [
631
633
  r("div", qt, D(f(i)("inventory.ingredient.import.summary")), 1),
632
- (_(!0), T(Y, null, X(h.value, (n, w) => (_(), W(Ue, {
634
+ (_(!0), T(Y, null, X(h.value, (n, w) => (_(), W(Le, {
633
635
  key: w,
634
636
  name: n.template.name,
635
637
  locations: n.template.locations,
@@ -637,7 +639,7 @@ const Nt = { class: "flex items-center gap-12 pl-8" }, Bt = { class: "flex flex-
637
639
  errors: n.errors,
638
640
  type: "create"
639
641
  }, null, 8, ["name", "locations", "items", "errors"]))), 128)),
640
- (_(!0), T(Y, null, X(l.value, (n) => (_(), W(Ue, {
642
+ (_(!0), T(Y, null, X(l.value, (n) => (_(), W(Le, {
641
643
  key: n.template._id,
642
644
  name: n.template.name,
643
645
  locations: n.template.locations,
@@ -650,11 +652,11 @@ const Nt = { class: "flex items-center gap-12 pl-8" }, Bt = { class: "flex flex-
650
652
  ]);
651
653
  };
652
654
  }
653
- }), Be = ze(
655
+ }), Ne = Ve(
654
656
  "closingTemplateTable",
655
657
  function() {
656
658
  var P;
657
- const { t } = ne(), e = Fe(), k = ue();
659
+ const { t } = ne(), e = Ie(), k = de();
658
660
  function a(s) {
659
661
  console.error("Row action failed:", s), k.open({
660
662
  title: t("inventory.common.somethingWentWrong"),
@@ -662,8 +664,8 @@ const Nt = { class: "flex items-center gap-12 pl-8" }, Bt = { class: "flex flex-
662
664
  type: "error"
663
665
  });
664
666
  }
665
- const u = V({}), b = Ce(), h = V({}), l = V(new Array()), o = V(!1), g = Pe(), i = pe();
666
- function I(s) {
667
+ const u = V({}), b = Te(), h = V({}), l = V(new Array()), o = V(!1), g = Re(), i = ue();
668
+ function F(s) {
667
669
  const c = {
668
670
  title: s.name,
669
671
  doc: s,
@@ -699,7 +701,7 @@ const Nt = { class: "flex items-center gap-12 pl-8" }, Bt = { class: "flex flex-
699
701
  };
700
702
  e.open({
701
703
  title: "Publish template",
702
- contentComponent: vt,
704
+ contentComponent: yt,
703
705
  contentComponentProps: c,
704
706
  closeButton: !0,
705
707
  minWidth: 700,
@@ -712,7 +714,7 @@ const Nt = { class: "flex items-center gap-12 pl-8" }, Bt = { class: "flex flex-
712
714
  }
713
715
  });
714
716
  }
715
- const C = V(0);
717
+ const I = V(0);
716
718
  let y = (P = g._currentLocation) == null ? void 0 : P.dbName;
717
719
  async function x(s) {
718
720
  if (!g._currentLocation) return { docs: [], nextStartkey: null, hasMore: !1 };
@@ -725,7 +727,7 @@ const Nt = { class: "flex items-center gap-12 pl-8" }, Bt = { class: "flex flex-
725
727
  return h.value = M, u.value = R.publishedRevByLocation || {}, c;
726
728
  }
727
729
  function d() {
728
- l.value = [], C.value++;
730
+ l.value = [], I.value++;
729
731
  }
730
732
  async function $() {
731
733
  var c;
@@ -738,7 +740,7 @@ const Nt = { class: "flex items-center gap-12 pl-8" }, Bt = { class: "flex flex-
738
740
  const [c] = await Promise.all([
739
741
  i.getTemplate(s),
740
742
  new Promise((R) => setTimeout(R, 1e3))
741
- ]), { toClosingTemplateListItem: M } = await import("./index-CqgYx0tx.js");
743
+ ]), { toClosingTemplateListItem: M } = await import("./index-CCvxPS3E.js");
742
744
  l.value = [
743
745
  M(c)
744
746
  ];
@@ -750,7 +752,7 @@ const Nt = { class: "flex items-center gap-12 pl-8" }, Bt = { class: "flex flex-
750
752
  }
751
753
  }
752
754
  function w(s, c) {
753
- switch (c = Oe(c), s) {
755
+ switch (c = Ge(c), s) {
754
756
  case J.Details:
755
757
  return b.viewTemplate(c._id).catch(a);
756
758
  case J.Edit:
@@ -758,7 +760,7 @@ const Nt = { class: "flex items-center gap-12 pl-8" }, Bt = { class: "flex flex-
758
760
  case J.Delete:
759
761
  return b.deleteTemplate(c, o, d);
760
762
  case J.Publish:
761
- return I(c);
763
+ return F(c);
762
764
  case J.Duplicate:
763
765
  return b.duplicateTemplate(c, o, d);
764
766
  }
@@ -770,7 +772,7 @@ const Nt = { class: "flex items-center gap-12 pl-8" }, Bt = { class: "flex flex-
770
772
  accessorKey: "_id",
771
773
  header: () => t("inventory.closing.table.createdAt"),
772
774
  cell(s) {
773
- return yt(`${s.getValue()}`);
775
+ return ft(`${s.getValue()}`);
774
776
  },
775
777
  enableSorting: !0
776
778
  },
@@ -821,12 +823,12 @@ const Nt = { class: "flex items-center gap-12 pl-8" }, Bt = { class: "flex flex-
821
823
  const c = s.row.original, R = (s.row.original.locations || g.locations).filter((O) => !!g.locationByDbName[O.dbName]), B = R.filter((O) => !!(u.value[O.dbName] || []).find(
822
824
  (ee) => ee._id === c._id && (ee.updatedAt ? ee.updatedAt === c.updatedAt : ee._rev === c._rev)
823
825
  )).length, z = R.length > 0 && B === R.length;
824
- return De(
826
+ return Fe(
825
827
  "div",
826
828
  {
827
829
  class: "flex items-center gap-8"
828
830
  },
829
- De(
831
+ Fe(
830
832
  "div",
831
833
  {
832
834
  class: [
@@ -843,12 +845,12 @@ const Nt = { class: "flex items-center gap-12 pl-8" }, Bt = { class: "flex flex-
843
845
  id: "action",
844
846
  cell(s) {
845
847
  const c = s.row.original, M = [
846
- ke[J.Edit],
847
- ke[J.Duplicate],
848
- ke[J.Delete],
849
- ke[J.Publish]
848
+ xe[J.Edit],
849
+ xe[J.Duplicate],
850
+ xe[J.Delete],
851
+ xe[J.Publish]
850
852
  ];
851
- return ft(M, (R) => w(R, c));
853
+ return pt(M, (R) => w(R, c));
852
854
  },
853
855
  enableSorting: !1,
854
856
  size: 40,
@@ -861,15 +863,15 @@ const Nt = { class: "flex items-center gap-12 pl-8" }, Bt = { class: "flex flex-
861
863
  recentPublish: h,
862
864
  templates: l,
863
865
  loading: o,
864
- tableKey: C,
866
+ tableKey: I,
865
867
  fetchTemplatesPage: x,
866
868
  refresh: d,
867
869
  onLocationChanged: $,
868
870
  loadTemplate: n
869
871
  };
870
872
  }
871
- ), Ce = ze("closingTemplateActions", () => {
872
- const { t: m } = ne(), t = Fe(), e = ue(), k = pe(), a = gt(), u = Be(), { loading: b } = Ge(u), h = V({});
873
+ ), Te = Ve("closingTemplateActions", () => {
874
+ const { t: m } = ne(), t = Ie(), e = de(), k = ue(), a = vt(), u = Ne(), { loading: b } = ze(u), h = V({});
873
875
  function l() {
874
876
  h.value = {
875
877
  mode: oe.CREATE,
@@ -896,12 +898,12 @@ const Nt = { class: "flex items-center gap-12 pl-8" }, Bt = { class: "flex flex-
896
898
  message: "Deleted template can no longer be retrieved",
897
899
  primaryActions: {
898
900
  text: "Delete",
899
- variant: xe.Destructive,
901
+ variant: _e.Destructive,
900
902
  close: !0
901
903
  },
902
904
  secondaryActions: {
903
905
  text: "Cancel",
904
- variant: xe.Plain,
906
+ variant: _e.Plain,
905
907
  close: !0
906
908
  }
907
909
  }).onPrimary(async () => {
@@ -938,19 +940,19 @@ const Nt = { class: "flex items-center gap-12 pl-8" }, Bt = { class: "flex flex-
938
940
  message: "Duplicated template can be edited after creation",
939
941
  primaryActions: {
940
942
  text: "Duplicate",
941
- variant: xe.Destructive,
943
+ variant: _e.Destructive,
942
944
  close: !0
943
945
  },
944
946
  secondaryActions: {
945
947
  text: "Cancel",
946
- variant: xe.Plain,
948
+ variant: _e.Plain,
947
949
  close: !0
948
950
  },
949
951
  contentComponent: te({
950
952
  props: ["modelValue"],
951
953
  emits: ["update:modelValue"],
952
954
  setup(s) {
953
- return () => De(lt.FmTextField, {
955
+ return () => Fe(rt.FmTextField, {
954
956
  modelValue: s.modelValue,
955
957
  "onUpdate:modelValue": (c) => P = c,
956
958
  label: "New Template Name",
@@ -986,17 +988,17 @@ const Nt = { class: "flex items-center gap-12 pl-8" }, Bt = { class: "flex flex-
986
988
  }
987
989
  });
988
990
  }
989
- const I = V({});
990
- async function C(n) {
991
+ const F = V({});
992
+ async function I(n) {
991
993
  const w = await k.getTemplate(n);
992
- I.value = {
994
+ F.value = {
993
995
  template: w,
994
996
  show: !0,
995
997
  "onUpdate:show"(S) {
996
- I.value.show = S;
998
+ F.value.show = S;
997
999
  },
998
1000
  "onAction:edit"() {
999
- I.value.show = !1, o(Oe(w));
1001
+ F.value.show = !1, o(Ge(w));
1000
1002
  }
1001
1003
  };
1002
1004
  }
@@ -1115,7 +1117,7 @@ const Nt = { class: "flex items-center gap-12 pl-8" }, Bt = { class: "flex flex-
1115
1117
  }
1116
1118
  return {
1117
1119
  createTemplate: l,
1118
- viewTemplate: C,
1120
+ viewTemplate: I,
1119
1121
  updateTemplate: o,
1120
1122
  deleteTemplate: g,
1121
1123
  duplicateTemplate: i,
@@ -1123,13 +1125,13 @@ const Nt = { class: "flex items-center gap-12 pl-8" }, Bt = { class: "flex flex-
1123
1125
  exportSingleTemplate: x,
1124
1126
  importTemplates: d,
1125
1127
  templateDialogProps: h,
1126
- templateDetailsProps: I
1128
+ templateDetailsProps: F
1127
1129
  };
1128
1130
  });
1129
1131
  function Zt(m) {
1130
1132
  return m ? Number(m.amount) / Math.pow(10, Number(m.precision) || 0) : 0;
1131
1133
  }
1132
- function Le(m) {
1134
+ function Be(m) {
1133
1135
  const t = new Set(m.disabledMeasurements ?? []), e = [
1134
1136
  {
1135
1137
  id: m.sku.unit._id,
@@ -1150,10 +1152,10 @@ function Le(m) {
1150
1152
  return e;
1151
1153
  }
1152
1154
  function eo(m) {
1153
- return Le(m).filter((t) => t.enabled).length;
1155
+ return Be(m).filter((t) => t.enabled).length;
1154
1156
  }
1155
1157
  function to(m) {
1156
- return Le(m).filter((t) => t.enabled).map((t) => !t.isBase && t.factor ? `${t.label} ×${t.factor}` : t.label);
1158
+ return Be(m).filter((t) => t.enabled).map((t) => !t.isBase && t.factor ? `${t.label} ×${t.factor}` : t.label);
1157
1159
  }
1158
1160
  function oo(m, t) {
1159
1161
  const e = new Set(m.disabledMeasurements ?? []);
@@ -1196,7 +1198,7 @@ const no = { class: "flex items-center gap-12 py-12" }, so = {
1196
1198
  },
1197
1199
  emits: ["update", "delete"],
1198
1200
  setup(m, { emit: t }) {
1199
- const e = m, k = t, a = U(() => Le(e.item)), u = U(() => a.value.filter((o) => o.enabled)), b = U(() => u.value.length);
1201
+ const e = m, k = t, a = U(() => Be(e.item)), u = U(() => a.value.filter((o) => o.enabled)), b = U(() => u.value.length);
1200
1202
  function h(o) {
1201
1203
  if (e.disabled) return;
1202
1204
  const g = oo(e.item, o);
@@ -1206,7 +1208,7 @@ const no = { class: "flex items-center gap-12 py-12" }, so = {
1206
1208
  return o.isBase ? "Base unit" : o.factor ? `1 ${o.label} = ${o.factor} ${e.item.sku.unit.abbrev}` : "";
1207
1209
  }
1208
1210
  return (o, g) => {
1209
- const i = G("FmButton"), I = G("FmMenuItem"), C = G("FmMenu");
1211
+ const i = G("FmButton"), F = G("FmMenuItem"), I = G("FmMenu");
1210
1212
  return _(), T("div", no, [
1211
1213
  r("span", so, D(o.index + 1), 1),
1212
1214
  r("div", ao, [
@@ -1229,7 +1231,7 @@ const no = { class: "flex items-center gap-12 py-12" }, so = {
1229
1231
  ], 2))), 128))
1230
1232
  ]),
1231
1233
  r("div", uo, [
1232
- A(C, { "close-on-click": !1 }, {
1234
+ A(I, { "close-on-click": !1 }, {
1233
1235
  "menu-button": j(() => [
1234
1236
  A(i, {
1235
1237
  variant: "secondary",
@@ -1240,7 +1242,7 @@ const no = { class: "flex items-center gap-12 py-12" }, so = {
1240
1242
  }, null, 8, ["disabled", "label"])
1241
1243
  ]),
1242
1244
  default: j(() => [
1243
- (_(!0), T(Y, null, X(a.value, (y) => (_(), W(I, {
1245
+ (_(!0), T(Y, null, X(a.value, (y) => (_(), W(F, {
1244
1246
  key: y.id,
1245
1247
  "model-value": y.enabled,
1246
1248
  "has-checkbox": "",
@@ -1266,7 +1268,7 @@ const no = { class: "flex items-center gap-12 py-12" }, so = {
1266
1268
  });
1267
1269
  function fo(m) {
1268
1270
  const t = V("");
1269
- Ie(m, () => {
1271
+ Ce(m, () => {
1270
1272
  t.value = "";
1271
1273
  });
1272
1274
  const e = U(() => t.value.trim().length > 0);
@@ -1336,61 +1338,68 @@ const yo = { class: "flex flex-col gap-12" }, vo = { class: "flex items-start ju
1336
1338
  },
1337
1339
  emits: ["reorderDefault", "addItems"],
1338
1340
  setup(m, { emit: t }) {
1339
- const { promptSelectIngredients: e } = Ye(), k = Fe(), a = m, u = t, b = ["#EAB308", "#22C55E", "#3B82F6", "#A855F7", "#F97316", "#EC4899", "#14B8A6"], h = V("default"), { searchQuery: l, hasQuery: o, filterItems: g } = fo(h), i = U(() => a.groups ?? []);
1340
- function I(p) {
1341
+ const { promptSelectIngredients: e } = je(), k = Ie(), a = m, u = t, b = ["#EAB308", "#22C55E", "#3B82F6", "#A855F7", "#F97316", "#EC4899", "#14B8A6"], h = V("default"), { searchQuery: l, hasQuery: o, filterItems: g } = fo(h), i = U(() => a.groups ?? []);
1342
+ function F(p) {
1341
1343
  a.updateGroups(p);
1342
1344
  }
1343
- function C() {
1345
+ function I() {
1344
1346
  return `tmplGroup_${Date.now()}_${Math.floor(Math.random() * 1e4)}`;
1345
1347
  }
1346
1348
  const y = V(null), x = V(null);
1347
- function d(p, v, F) {
1349
+ function d(p, v, C) {
1348
1350
  var E;
1349
- x.value = p, y.value = v, (E = F.dataTransfer) == null || E.setData("text/plain", String(v)), F.dataTransfer && (F.dataTransfer.effectAllowed = "move");
1351
+ x.value = p, y.value = v, (E = C.dataTransfer) == null || E.setData("text/plain", String(v)), C.dataTransfer && (C.dataTransfer.effectAllowed = "move");
1350
1352
  }
1351
- function $(p, v, F) {
1352
- const E = [...p], [N] = E.splice(v, 1);
1353
- return E.splice(F, 0, N), E;
1353
+ function $(p, v, C) {
1354
+ const E = [...p], [L] = E.splice(v, 1);
1355
+ return E.splice(C, 0, L), E;
1354
1356
  }
1355
1357
  function n(p, v) {
1356
- const F = y.value, E = x.value;
1357
- if (y.value = null, x.value = null, !(F === null || E !== p || F === v))
1358
+ const C = y.value, E = x.value;
1359
+ if (y.value = null, x.value = null, !(C === null || E !== p || C === v))
1358
1360
  if (p === "default")
1359
1361
  u(
1360
1362
  "reorderDefault",
1361
1363
  $(
1362
- a.items.map((N) => N.sku._id),
1363
- F,
1364
+ a.items.map((L) => L.sku._id),
1365
+ C,
1364
1366
  v
1365
1367
  )
1366
1368
  );
1367
1369
  else {
1368
- const N = O(p);
1369
- N && re(p, $(N.items.map((Q) => Q.skuId), F, v));
1370
+ const L = O(p);
1371
+ L && ae(
1372
+ p,
1373
+ $(
1374
+ L.items.map((N) => N.skuId),
1375
+ C,
1376
+ v
1377
+ )
1378
+ );
1370
1379
  }
1371
1380
  }
1372
1381
  const w = U(
1373
1382
  () => Object.fromEntries(a.items.map((p) => [p.sku._id, p]))
1374
1383
  );
1375
- Ie(
1384
+ Ce(
1376
1385
  () => a.items.map((p) => p.sku._id),
1377
1386
  (p) => {
1378
1387
  const v = new Set(p);
1379
- let F = !1;
1380
- const E = i.value.map((N) => {
1381
- const Q = N.items.filter((L) => v.has(L.skuId));
1382
- return Q.length !== N.items.length ? (F = !0, { ...N, items: Q }) : N;
1388
+ let C = !1;
1389
+ const E = i.value.map((L) => {
1390
+ const N = L.items.filter((Q) => v.has(Q.skuId));
1391
+ return N.length !== L.items.length ? (C = !0, { ...L, items: N }) : L;
1383
1392
  });
1384
- F && I(E);
1393
+ C && F(E);
1385
1394
  }
1386
1395
  );
1387
1396
  const S = U(() => {
1388
1397
  const p = /* @__PURE__ */ new Map();
1389
- for (const F of i.value)
1390
- for (const E of F.items) p.set(E.skuId, (p.get(E.skuId) ?? 0) + 1);
1398
+ for (const C of i.value)
1399
+ for (const E of C.items) p.set(E.skuId, (p.get(E.skuId) ?? 0) + 1);
1391
1400
  let v = 0;
1392
- return p.forEach((F) => {
1393
- F > 1 && v++;
1401
+ return p.forEach((C) => {
1402
+ C > 1 && v++;
1394
1403
  }), v;
1395
1404
  }), P = U(() => {
1396
1405
  const p = i.value.length;
@@ -1407,20 +1416,20 @@ const yo = { class: "flex flex-col gap-12" }, vo = { class: "flex items-start ju
1407
1416
  ]), c = U(
1408
1417
  () => s.value.find((p) => p.id === h.value) ?? s.value[0]
1409
1418
  ), M = U(() => c.value.isDefault), R = U(
1410
- () => M.value ? [] : le(h.value)
1419
+ () => M.value ? [] : re(h.value)
1411
1420
  );
1412
1421
  function B(p) {
1413
1422
  return h.value === p;
1414
1423
  }
1415
1424
  function z() {
1416
- const p = C();
1417
- I([...i.value, { id: p, name: `Group ${i.value.length + 1}`, items: [] }]), h.value = p;
1425
+ const p = I();
1426
+ F([...i.value, { id: p, name: `Group ${i.value.length + 1}`, items: [] }]), h.value = p;
1418
1427
  }
1419
1428
  function O(p) {
1420
1429
  return i.value.find((v) => v.id === p) ?? null;
1421
1430
  }
1422
- function me(p) {
1423
- I(i.value.filter((v) => v.id !== p)), h.value === p && (h.value = "default");
1431
+ function ce(p) {
1432
+ F(i.value.filter((v) => v.id !== p)), h.value === p && (h.value = "default");
1424
1433
  }
1425
1434
  function ee(p, v) {
1426
1435
  k.open({
@@ -1429,74 +1438,77 @@ const yo = { class: "flex flex-col gap-12" }, vo = { class: "flex items-start ju
1429
1438
  message: "This removes the group and its item selection. The items stay in Default and other groups.",
1430
1439
  primaryActions: { text: "Delete", close: !0, variant: "destructive" },
1431
1440
  secondaryActions: { text: "Cancel", close: !0 }
1432
- }).onPrimary(() => me(p));
1441
+ }).onPrimary(() => ce(p));
1433
1442
  }
1434
- function ae(p, v) {
1435
- I(i.value.map((F) => F.id === p ? { ...F, name: v } : F));
1443
+ function se(p, v) {
1444
+ F(i.value.map((C) => C.id === p ? { ...C, name: v } : C));
1436
1445
  }
1437
- function re(p, v) {
1438
- I(
1446
+ function ae(p, v) {
1447
+ F(
1439
1448
  i.value.map(
1440
- (F) => F.id === p ? { ...F, items: v.map((E, N) => ({ skuId: E, position: N })) } : F
1449
+ (C) => C.id === p ? { ...C, items: v.map((E, L) => ({ skuId: E, position: L })) } : C
1441
1450
  )
1442
1451
  );
1443
1452
  }
1444
- async function fe(p) {
1453
+ async function pe(p) {
1445
1454
  if (a.disabled) return;
1446
1455
  const v = O(p);
1447
1456
  if (!v) return;
1448
- const F = await e(
1457
+ const C = await e(
1449
1458
  v.items.map((E) => E.skuId),
1450
1459
  (E) => E,
1451
1460
  a.items.map((E) => E.sku)
1452
1461
  );
1453
- F && re(p, F);
1462
+ C && ae(p, C);
1454
1463
  }
1455
- function ye() {
1456
- M.value ? u("addItems") : fe(h.value);
1464
+ function fe() {
1465
+ M.value ? u("addItems") : pe(h.value);
1457
1466
  }
1458
- function ve(p, v) {
1459
- const F = O(p);
1460
- if (!F) return;
1461
- const E = F.items.some((N) => N.skuId === v) ? F.items.filter((N) => N.skuId !== v).map((N) => N.skuId) : [...F.items.map((N) => N.skuId), v];
1462
- re(p, E);
1467
+ function ye(p, v) {
1468
+ const C = O(p);
1469
+ if (!C) return;
1470
+ const E = C.items.some((L) => L.skuId === v) ? C.items.filter((L) => L.skuId !== v).map((L) => L.skuId) : [...C.items.map((L) => L.skuId), v];
1471
+ ae(p, E);
1463
1472
  }
1464
- function le(p) {
1473
+ function re(p) {
1465
1474
  const v = O(p);
1466
- return v ? v.items.map((F) => w.value[F.skuId]).filter(Boolean) : [];
1475
+ return v ? v.items.map((C) => w.value[C.skuId]).filter(Boolean) : [];
1467
1476
  }
1468
- const ie = U(() => g(a.items)), ce = U(
1477
+ const le = U(() => g(a.items)), ie = U(
1469
1478
  () => g(R.value)
1470
- ), ge = U(
1471
- () => o.value ? M.value ? ie.value.length : ce.value.length : c.value.itemCount
1479
+ ), ve = U(
1480
+ () => o.value ? M.value ? le.value.length : ie.value.length : c.value.itemCount
1472
1481
  );
1473
- function be(p) {
1482
+ function ge(p) {
1474
1483
  const v = B(p.id);
1475
1484
  if (p.isDefault)
1476
1485
  return v ? { background: "#1F2937", color: "#FFFFFF", border: "1px solid #1F2937" } : { background: "#FFFFFF", color: "#374151", border: "1px solid #E5E7EB" };
1477
- const F = p.color || "#999999";
1478
- return v ? { background: F, color: de(F), border: `1px solid ${F}` } : { background: `${F}1A`, color: "#374151", border: `1px solid ${F}` };
1486
+ const C = p.color || "#999999";
1487
+ return v ? { background: C, color: me(C), border: `1px solid ${C}` } : { background: `${C}1A`, color: "#374151", border: `1px solid ${C}` };
1479
1488
  }
1480
- function de(p) {
1481
- const v = p.replace("#", ""), F = parseInt(v.slice(0, 2), 16), E = parseInt(v.slice(2, 4), 16), N = parseInt(v.slice(4, 6), 16);
1482
- return (0.299 * F + 0.587 * E + 0.114 * N) / 255 > 0.6 ? "#1F2937" : "#FFFFFF";
1489
+ function me(p) {
1490
+ const v = p.replace("#", ""), C = parseInt(v.slice(0, 2), 16), E = parseInt(v.slice(2, 4), 16), L = parseInt(v.slice(4, 6), 16);
1491
+ return (0.299 * C + 0.587 * E + 0.114 * L) / 255 > 0.6 ? "#1F2937" : "#FFFFFF";
1483
1492
  }
1484
- function he(p) {
1485
- return B(p.id) ? (p.isDefault ? "#FFFFFF" : de(p.color || "#999999")) === "#FFFFFF" ? { background: "rgba(255,255,255,0.25)", color: "#FFFFFF" } : { background: "rgba(0,0,0,0.12)", color: "#1F2937" } : { background: "rgba(0,0,0,0.06)", color: "inherit" };
1493
+ function be(p) {
1494
+ return B(p.id) ? (p.isDefault ? "#FFFFFF" : me(p.color || "#999999")) === "#FFFFFF" ? { background: "rgba(255,255,255,0.25)", color: "#FFFFFF" } : { background: "rgba(0,0,0,0.12)", color: "#1F2937" } : { background: "rgba(0,0,0,0.06)", color: "inherit" };
1486
1495
  }
1487
1496
  return (p, v) => {
1488
- const F = G("FmPill"), E = G("FmButton"), N = G("FmIcon"), Q = G("FmTextField");
1497
+ const C = G("FmButton"), E = G("FmIcon"), L = G("FmTextField");
1489
1498
  return _(), T("div", yo, [
1490
1499
  r("div", vo, [
1491
1500
  r("div", go, [
1492
1501
  r("div", bo, [
1493
1502
  v[6] || (v[6] = r("div", { class: "fm-typo-en-title-sm-600 text-fm-color-typo-primary" }, "Groups & items", -1)),
1494
- A(F, { variant: "beta" })
1503
+ A(kt, {
1504
+ tier: "standard",
1505
+ category: "beta"
1506
+ })
1495
1507
  ]),
1496
1508
  r("div", ho, D(P.value), 1)
1497
1509
  ]),
1498
1510
  r("div", _o, [
1499
- A(E, {
1511
+ A(C, {
1500
1512
  disabled: p.disabled,
1501
1513
  label: "New Group",
1502
1514
  "prepend-icon": "add",
@@ -1507,20 +1519,20 @@ const yo = { class: "flex flex-col gap-12" }, vo = { class: "flex items-start ju
1507
1519
  }, null, 8, ["disabled"])
1508
1520
  ])
1509
1521
  ]),
1510
- v[15] || (v[15] = qe('<div class="flex items-start gap-8 p-12 fm-corner-radius-md border-1 border-yellow-500 bg-yellow-50 text-yellow-700"><div class="flex flex-col gap-2"><div class="fm-typo-en-body-md-600 text-fm-color-typo-primary">📦 Closing Groups</div><div class="fm-typo-en-body-sm-400"> Split a closing template into named groups (e.g. by section, fridge, or station) so several staff can stock take in parallel and you manage them in one place. Group stock take is currently only available in the Inventory mobile app — it&#39;s not yet available in POS. You can keep using the <span class="fm-typo-en-body-sm-600 text-fm-color-typo-primary">Default (master list)</span> group as usual. </div></div></div>', 1)),
1522
+ v[15] || (v[15] = Je('<div class="flex items-start gap-8 p-12 fm-corner-radius-md border-1 border-yellow-500 bg-yellow-50 text-yellow-700"><div class="flex flex-col gap-2"><div class="fm-typo-en-body-md-600 text-fm-color-typo-primary">📦 Closing Groups</div><div class="fm-typo-en-body-sm-400"> Split a closing template into named groups (e.g. by section, fridge, or station) so several staff can stock take in parallel and you manage them in one place. Group stock take is currently only available in the Inventory mobile app — it&#39;s not yet available in POS. You can keep using the <span class="fm-typo-en-body-sm-600 text-fm-color-typo-primary">Default (master list)</span> group as usual. </div></div></div>', 1)),
1511
1523
  r("div", xo, [
1512
- (_(!0), T(Y, null, X(s.value, (L) => (_(), T("button", {
1513
- key: L.id,
1524
+ (_(!0), T(Y, null, X(s.value, (N) => (_(), T("button", {
1525
+ key: N.id,
1514
1526
  type: "button",
1515
1527
  class: "flex items-center rounded-full",
1516
- style: Se([{ gap: "8px", padding: "6px 14px" }, be(L)]),
1517
- onClick: (se) => h.value = L.id
1528
+ style: De([{ gap: "8px", padding: "6px 14px" }, ge(N)]),
1529
+ onClick: (Q) => h.value = N.id
1518
1530
  }, [
1519
- r("span", wo, D(L.name), 1),
1531
+ r("span", wo, D(N.name), 1),
1520
1532
  r("span", {
1521
1533
  class: "fm-typo-en-body-sm-600 rounded-full",
1522
- style: Se([{ padding: "0 8px" }, he(L)])
1523
- }, D(L.itemCount), 5)
1534
+ style: De([{ padding: "0 8px" }, be(N)])
1535
+ }, D(N.itemCount), 5)
1524
1536
  ], 12, ko))), 128)),
1525
1537
  r("button", {
1526
1538
  type: "button",
@@ -1529,7 +1541,7 @@ const yo = { class: "flex flex-col gap-12" }, vo = { class: "flex items-start ju
1529
1541
  style: { gap: "6px", padding: "6px 14px" },
1530
1542
  onClick: z
1531
1543
  }, [
1532
- A(N, {
1544
+ A(E, {
1533
1545
  name: "add",
1534
1546
  size: "sm"
1535
1547
  }),
@@ -1542,22 +1554,22 @@ const yo = { class: "flex flex-col gap-12" }, vo = { class: "flex items-start ju
1542
1554
  r("span", { class: "fm-typo-en-body-lg-600 italic text-fm-color-typo-primary" }, "Default", -1),
1543
1555
  r("span", { class: "fm-typo-en-body-sm-400 text-fm-color-typo-secondary truncate" }, " master list · sets the item pool & units ", -1)
1544
1556
  ]))) : (_(), T("div", Fo, [
1545
- A(Q, {
1557
+ A(L, {
1546
1558
  "model-value": c.value.name,
1547
1559
  disabled: p.disabled,
1548
1560
  placeholder: "Group name",
1549
- "onUpdate:modelValue": v[0] || (v[0] = (L) => ae(h.value, L))
1561
+ "onUpdate:modelValue": v[0] || (v[0] = (N) => se(h.value, N))
1550
1562
  }, null, 8, ["model-value", "disabled"])
1551
1563
  ])),
1552
1564
  r("span", Do, [
1553
1565
  f(o) ? (_(), T(Y, { key: 0 }, [
1554
- K(D(ge.value) + " of " + D(c.value.itemCount), 1)
1566
+ K(D(ve.value) + " of " + D(c.value.itemCount), 1)
1555
1567
  ], 64)) : (_(), T(Y, { key: 1 }, [
1556
1568
  K(D(c.value.itemCount), 1)
1557
1569
  ], 64)),
1558
1570
  v[9] || (v[9] = K(" items "))
1559
1571
  ]),
1560
- M.value ? H("", !0) : (_(), W(E, {
1572
+ M.value ? H("", !0) : (_(), W(C, {
1561
1573
  key: 2,
1562
1574
  disabled: p.disabled,
1563
1575
  label: "Delete group",
@@ -1565,33 +1577,33 @@ const yo = { class: "flex flex-col gap-12" }, vo = { class: "flex items-start ju
1565
1577
  variant: "secondary",
1566
1578
  size: "md",
1567
1579
  class: "rounded-lg shrink-0",
1568
- onClick: v[1] || (v[1] = (L) => ee(h.value, c.value.name))
1580
+ onClick: v[1] || (v[1] = (N) => ee(h.value, c.value.name))
1569
1581
  }, null, 8, ["disabled"])),
1570
- A(E, {
1582
+ A(C, {
1571
1583
  disabled: p.disabled,
1572
1584
  label: "Add items",
1573
1585
  "prepend-icon": "add",
1574
1586
  variant: "primary",
1575
1587
  size: "md",
1576
1588
  class: "rounded-lg shrink-0",
1577
- onClick: ye
1589
+ onClick: fe
1578
1590
  }, null, 8, ["disabled"])
1579
1591
  ]),
1580
1592
  c.value.itemCount > 0 || f(o) ? (_(), T("div", So, [
1581
- A(N, {
1593
+ A(E, {
1582
1594
  name: "search",
1583
1595
  size: "sm",
1584
1596
  color: "neutral-gray-400",
1585
1597
  class: "shrink-0"
1586
1598
  }),
1587
- Xe(r("input", {
1588
- "onUpdate:modelValue": v[2] || (v[2] = (L) => Ve(l) ? l.value = L : null),
1599
+ qe(r("input", {
1600
+ "onUpdate:modelValue": v[2] || (v[2] = (N) => Ue(l) ? l.value = N : null),
1589
1601
  type: "search",
1590
1602
  "aria-label": "Search items by name or code",
1591
1603
  placeholder: "Search items by name or code...",
1592
1604
  class: "flex-1 bg-transparent outline-none fm-typo-en-body-md-400 text-fm-color-typo-primary placeholder:text-fm-color-typo-disabled"
1593
1605
  }, null, 512), [
1594
- [Ze, f(l)]
1606
+ [Xe, f(l)]
1595
1607
  ]),
1596
1608
  f(o) ? (_(), T("button", {
1597
1609
  key: 0,
@@ -1599,16 +1611,16 @@ const yo = { class: "flex flex-col gap-12" }, vo = { class: "flex items-start ju
1599
1611
  "aria-label": "Clear search",
1600
1612
  title: "Clear search",
1601
1613
  class: "flex items-center text-fm-color-typo-secondary hover:text-fm-color-typo-primary",
1602
- onClick: v[3] || (v[3] = (L) => l.value = "")
1614
+ onClick: v[3] || (v[3] = (N) => l.value = "")
1603
1615
  }, [
1604
- A(N, {
1616
+ A(E, {
1605
1617
  name: "close",
1606
1618
  size: "sm"
1607
1619
  })
1608
1620
  ])) : H("", !0)
1609
1621
  ])) : H("", !0),
1610
1622
  !f(o) && c.value.itemCount > 1 ? (_(), T("div", Ao, [
1611
- A(N, {
1623
+ A(E, {
1612
1624
  name: "drag_indicator",
1613
1625
  size: "sm",
1614
1626
  color: "neutral-gray-400",
@@ -1617,16 +1629,16 @@ const yo = { class: "flex flex-col gap-12" }, vo = { class: "flex items-start ju
1617
1629
  v[10] || (v[10] = K(" Drag a row to reorder items. "))
1618
1630
  ])) : H("", !0),
1619
1631
  M.value ? (_(), T("div", Ro, [
1620
- (_(!0), T(Y, null, X(ie.value, (L, se) => (_(), T("div", {
1621
- key: L.sku._id,
1632
+ (_(!0), T(Y, null, X(le.value, (N, Q) => (_(), T("div", {
1633
+ key: N.sku._id,
1622
1634
  draggable: !f(o),
1623
- onDragstart: (q) => !f(o) && d("default", se, q),
1624
- onDragover: v[4] || (v[4] = _e(() => {
1635
+ onDragstart: (q) => !f(o) && d("default", Q, q),
1636
+ onDragover: v[4] || (v[4] = he(() => {
1625
1637
  }, ["prevent"])),
1626
- onDrop: _e((q) => !f(o) && n("default", se), ["prevent"]),
1638
+ onDrop: he((q) => !f(o) && n("default", Q), ["prevent"]),
1627
1639
  class: Z(["flex items-center gap-4 px-16 border-b border-fm-color-neutral-gray-200 hover:bg-fm-color-neutral-gray-100", f(o) ? "cursor-default" : "cursor-grab"])
1628
1640
  }, [
1629
- f(o) ? H("", !0) : (_(), W(N, {
1641
+ f(o) ? H("", !0) : (_(), W(E, {
1630
1642
  key: 0,
1631
1643
  name: "drag_indicator",
1632
1644
  size: "sm",
@@ -1635,14 +1647,14 @@ const yo = { class: "flex flex-col gap-12" }, vo = { class: "flex items-start ju
1635
1647
  })),
1636
1648
  A(po, {
1637
1649
  class: "flex-1 min-w-0",
1638
- item: L,
1639
- index: se,
1650
+ item: N,
1651
+ index: Q,
1640
1652
  disabled: p.disabled,
1641
1653
  onUpdate: p.updateItem,
1642
- onDelete: (q) => p.deleteItem(L)
1654
+ onDelete: (q) => p.deleteItem(N)
1643
1655
  }, null, 8, ["item", "index", "disabled", "onUpdate", "onDelete"])
1644
1656
  ], 42, Po))), 128)),
1645
- f(o) && p.items.length > 0 && !ie.value.length ? (_(), T("div", Mo, [
1657
+ f(o) && p.items.length > 0 && !le.value.length ? (_(), T("div", Mo, [
1646
1658
  v[11] || (v[11] = K(" No items match ")),
1647
1659
  r("span", Eo, D(f(l)), 1)
1648
1660
  ])) : p.items.length ? H("", !0) : (_(), T("div", No, v[12] || (v[12] = [
@@ -1651,7 +1663,7 @@ const yo = { class: "flex flex-col gap-12" }, vo = { class: "flex items-start ju
1651
1663
  K(" to add from your catalog. ")
1652
1664
  ])))
1653
1665
  ])) : (_(), T("div", Bo, [
1654
- f(o) && R.value.length > 0 && !ce.value.length ? (_(), T("div", Lo, [
1666
+ f(o) && R.value.length > 0 && !ie.value.length ? (_(), T("div", Lo, [
1655
1667
  v[13] || (v[13] = K(" No items match ")),
1656
1668
  r("span", Uo, D(f(l)), 1)
1657
1669
  ])) : R.value.length ? H("", !0) : (_(), T("div", Vo, v[14] || (v[14] = [
@@ -1659,39 +1671,39 @@ const yo = { class: "flex flex-col gap-12" }, vo = { class: "flex items-start ju
1659
1671
  r("span", { class: "fm-typo-en-body-sm-600 text-fm-color-typo-primary" }, "+ Add items", -1),
1660
1672
  K(" on this group to assign items. ")
1661
1673
  ]))),
1662
- (_(!0), T(Y, null, X(ce.value, (L, se) => (_(), T("div", {
1663
- key: L.sku._id,
1674
+ (_(!0), T(Y, null, X(ie.value, (N, Q) => (_(), T("div", {
1675
+ key: N.sku._id,
1664
1676
  draggable: !f(o),
1665
- onDragstart: (q) => !f(o) && d(h.value, se, q),
1666
- onDragover: v[5] || (v[5] = _e(() => {
1677
+ onDragstart: (q) => !f(o) && d(h.value, Q, q),
1678
+ onDragover: v[5] || (v[5] = he(() => {
1667
1679
  }, ["prevent"])),
1668
- onDrop: _e((q) => !f(o) && n(h.value, se), ["prevent"]),
1680
+ onDrop: he((q) => !f(o) && n(h.value, Q), ["prevent"]),
1669
1681
  class: Z(["flex items-center gap-12 px-16 py-12 border-b border-fm-color-neutral-gray-200 hover:bg-fm-color-neutral-gray-100", f(o) ? "cursor-default" : "cursor-grab"])
1670
1682
  }, [
1671
- f(o) ? H("", !0) : (_(), W(N, {
1683
+ f(o) ? H("", !0) : (_(), W(E, {
1672
1684
  key: 0,
1673
1685
  name: "drag_indicator",
1674
1686
  size: "sm",
1675
1687
  color: "neutral-gray-400",
1676
1688
  class: "shrink-0"
1677
1689
  })),
1678
- r("span", Go, D(R.value.findIndex((q) => q.sku._id === L.sku._id) + 1), 1),
1690
+ r("span", Go, D(R.value.findIndex((q) => q.sku._id === N.sku._id) + 1), 1),
1679
1691
  r("div", Oo, [
1680
- r("div", Ho, D(L.sku.code), 1),
1681
- r("div", jo, D(L.sku.name), 1)
1692
+ r("div", Ho, D(N.sku.code), 1),
1693
+ r("div", jo, D(N.sku.name), 1)
1682
1694
  ]),
1683
1695
  r("div", Yo, [
1684
- (_(!0), T(Y, null, X(f(to)(L), (q, Qe) => (_(), T("span", {
1685
- key: Qe,
1696
+ (_(!0), T(Y, null, X(f(to)(N), (q, We) => (_(), T("span", {
1697
+ key: We,
1686
1698
  class: "px-8 py-2 rounded-full border border-fm-color-neutral-gray-200 fm-typo-en-body-sm-400 text-fm-color-typo-secondary"
1687
1699
  }, D(q), 1))), 128))
1688
1700
  ]),
1689
- A(E, {
1701
+ A(C, {
1690
1702
  disabled: p.disabled,
1691
1703
  icon: "delete",
1692
1704
  variant: "tertiary",
1693
1705
  size: "md",
1694
- onClick: (q) => ve(h.value, L.sku._id)
1706
+ onClick: (q) => ye(h.value, N.sku._id)
1695
1707
  }, null, 8, ["disabled", "onClick"])
1696
1708
  ], 42, zo))), 128))
1697
1709
  ]))
@@ -1706,7 +1718,7 @@ const yo = { class: "flex flex-col gap-12" }, vo = { class: "flex items-start ju
1706
1718
  disabled: { type: Boolean }
1707
1719
  },
1708
1720
  setup(m, { expose: t }) {
1709
- const e = kt(), { t: k } = ne(), a = Re(), {
1721
+ const e = xt(), { t: k } = ne(), a = Ae(), {
1710
1722
  promptSelectLocations: u,
1711
1723
  columnDefs: b,
1712
1724
  rowData: h
@@ -1745,13 +1757,13 @@ const yo = { class: "flex flex-col gap-12" }, vo = { class: "flex items-start ju
1745
1757
  function i(d) {
1746
1758
  e.items = e.items.map(($) => $.sku._id === d.sku._id ? d : $);
1747
1759
  }
1748
- function I(d) {
1760
+ function F(d) {
1749
1761
  e.items = e.items.filter(($) => $.sku._id !== d.sku._id);
1750
1762
  }
1751
- function C(d) {
1763
+ function I(d) {
1752
1764
  e.groups = d;
1753
1765
  }
1754
- const { promptSelectIngredients: y } = Ye();
1766
+ const { promptSelectIngredients: y } = je();
1755
1767
  async function x() {
1756
1768
  const $ = a.skus.map((S) => ({
1757
1769
  label: S.name,
@@ -1787,7 +1799,7 @@ const yo = { class: "flex flex-col gap-12" }, vo = { class: "flex items-start ju
1787
1799
  "label-mark": "required",
1788
1800
  modelValue: f(e).name,
1789
1801
  "onUpdate:modelValue": $[0] || ($[0] = (c) => f(e).name = c),
1790
- rules: [f(_t)()]
1802
+ rules: [f(ht)()]
1791
1803
  }, null, 8, ["label", "modelValue", "rules"]),
1792
1804
  A(n, {
1793
1805
  label: f(k)("inventory.closing.form.reference"),
@@ -1825,15 +1837,15 @@ const yo = { class: "flex flex-col gap-12" }, vo = { class: "flex items-start ju
1825
1837
  items: o.value,
1826
1838
  groups: f(e).groups,
1827
1839
  "update-item": i,
1828
- "delete-item": I,
1829
- "update-groups": C,
1840
+ "delete-item": F,
1841
+ "update-groups": I,
1830
1842
  disabled: d.disabled,
1831
1843
  onReorderDefault: g,
1832
1844
  onAddItems: x
1833
1845
  }, null, 8, ["items", "groups", "disabled"]),
1834
1846
  A(P, {
1835
1847
  "model-value": f(e).items.length,
1836
- rules: [f(xt)(1)]
1848
+ rules: [f(_t)(1)]
1837
1849
  }, null, 8, ["model-value", "rules"])
1838
1850
  ])
1839
1851
  ]),
@@ -1851,7 +1863,7 @@ const yo = { class: "flex flex-col gap-12" }, vo = { class: "flex items-start ju
1851
1863
  emits: ["update:show", "submitted"],
1852
1864
  setup(m, { expose: t, emit: e }) {
1853
1865
  var P;
1854
- const k = m, a = e, u = pe(), b = Ce(), h = ue(), { t: l } = ne(), o = it(k, "show");
1866
+ const k = m, a = e, u = ue(), b = Te(), h = de(), { t: l } = ne(), o = lt(k, "show");
1855
1867
  function g() {
1856
1868
  return {
1857
1869
  _id: "",
@@ -1859,15 +1871,15 @@ const yo = { class: "flex flex-col gap-12" }, vo = { class: "flex items-start ju
1859
1871
  items: []
1860
1872
  };
1861
1873
  }
1862
- const i = V(k.modelValue ?? g()), I = V(((P = k.modelValue) == null ? void 0 : P._id) ?? `${Math.random()}`);
1863
- Ie(
1874
+ const i = V(k.modelValue ?? g()), F = V(((P = k.modelValue) == null ? void 0 : P._id) ?? `${Math.random()}`);
1875
+ Ce(
1864
1876
  () => k.show,
1865
1877
  (s) => {
1866
1878
  var c;
1867
- s && (i.value = k.modelValue ?? g(), I.value = ((c = k.modelValue) == null ? void 0 : c._id) ?? `${Math.random()}`);
1879
+ s && (i.value = k.modelValue ?? g(), F.value = ((c = k.modelValue) == null ? void 0 : c._id) ?? `${Math.random()}`);
1868
1880
  }
1869
1881
  );
1870
- const C = V(!1), y = U(() => {
1882
+ const I = V(!1), y = U(() => {
1871
1883
  switch (k.mode) {
1872
1884
  case oe.READ:
1873
1885
  return "";
@@ -1895,7 +1907,7 @@ const yo = { class: "flex flex-col gap-12" }, vo = { class: "flex items-start ju
1895
1907
  async function d() {
1896
1908
  const s = i.value;
1897
1909
  if (s) {
1898
- C.value = !0;
1910
+ I.value = !0;
1899
1911
  try {
1900
1912
  await u.createTemplate(s), await new Promise((c) => setTimeout(c, 1e3)), h.open({
1901
1913
  title: l("inventory.closing.template.create.success"),
@@ -1909,14 +1921,14 @@ const yo = { class: "flex flex-col gap-12" }, vo = { class: "flex items-start ju
1909
1921
  type: "error"
1910
1922
  }), console.error("Error in creating closing template", c);
1911
1923
  } finally {
1912
- C.value = !1;
1924
+ I.value = !1;
1913
1925
  }
1914
1926
  }
1915
1927
  }
1916
1928
  async function $() {
1917
1929
  const s = i.value;
1918
1930
  if (s) {
1919
- C.value = !0, delete s.updatedAt;
1931
+ I.value = !0, delete s.updatedAt;
1920
1932
  try {
1921
1933
  await u.updateTemplate({
1922
1934
  ...s,
@@ -1933,7 +1945,7 @@ const yo = { class: "flex flex-col gap-12" }, vo = { class: "flex items-start ju
1933
1945
  type: "error"
1934
1946
  }), console.error("Error in updating closing template", c);
1935
1947
  } finally {
1936
- C.value = !1;
1948
+ I.value = !1;
1937
1949
  }
1938
1950
  }
1939
1951
  }
@@ -1956,7 +1968,7 @@ const yo = { class: "flex flex-col gap-12" }, vo = { class: "flex items-start ju
1956
1968
  const M = G("FmMenuDivider"), R = G("FmCard"), B = G("FmButton"), z = G("FmSideSheet");
1957
1969
  return _(), W(z, {
1958
1970
  modelValue: f(o),
1959
- "onUpdate:modelValue": c[2] || (c[2] = (O) => Ve(o) ? o.value = O : null),
1971
+ "onUpdate:modelValue": c[2] || (c[2] = (O) => Ue(o) ? o.value = O : null),
1960
1972
  "dismiss-away": "",
1961
1973
  "close-button": "",
1962
1974
  "max-width": 9999
@@ -1984,7 +1996,7 @@ const yo = { class: "flex flex-col gap-12" }, vo = { class: "flex items-start ju
1984
1996
  r("div", mn, D(f(l)("inventory.transfer.receiveRequest.details.updatedAt")), 1),
1985
1997
  r("div", dn, [
1986
1998
  r("div", un, [
1987
- K(D(f($e)(i.value.updatedAt)) + " ", 1),
1999
+ K(D(f(we)(i.value.updatedAt)) + " ", 1),
1988
2000
  (O = i.value.updatedBy) != null && O.name ? (_(), T(Y, { key: 0 }, [
1989
2001
  K(" (" + D(i.value.updatedBy.name) + ") ", 1)
1990
2002
  ], 64)) : H("", !0)
@@ -2006,27 +2018,27 @@ const yo = { class: "flex flex-col gap-12" }, vo = { class: "flex items-start ju
2006
2018
  onValidationSuccess: n,
2007
2019
  "model-value": i.value,
2008
2020
  "onUpdate:modelValue": c[0] || (c[0] = (O) => i.value = O),
2009
- disabled: C.value,
2010
- key: I.value
2021
+ disabled: I.value,
2022
+ key: F.value
2011
2023
  }, null, 8, ["model-value", "disabled"]))
2012
2024
  ]),
2013
2025
  "side-sheet-footer": j(() => [
2014
2026
  r("div", pn, [
2015
2027
  A(B, {
2016
- loading: C.value,
2028
+ loading: I.value,
2017
2029
  label: f(l)("common.save"),
2018
2030
  onClick: w
2019
2031
  }, null, 8, ["loading", "label"]),
2020
2032
  s.mode === f(oe).UPDATE ? (_(), W(B, {
2021
2033
  key: 0,
2022
- disabled: C.value,
2034
+ disabled: I.value,
2023
2035
  variant: "secondary",
2024
2036
  label: f(l)("inventory.common.export"),
2025
2037
  "prepend-icon": "download",
2026
2038
  onClick: S
2027
2039
  }, null, 8, ["disabled", "label"])) : H("", !0),
2028
2040
  A(B, {
2029
- disabled: C.value,
2041
+ disabled: I.value,
2030
2042
  variant: "tertiary",
2031
2043
  label: f(l)("common.close"),
2032
2044
  onClick: c[1] || (c[1] = (O) => a("update:show", !1))
@@ -2054,7 +2066,7 @@ const gn = /* @__PURE__ */ Ct(yn, [["render", vn]]), bn = { class: "flex flex-co
2054
2066
  __name: "ClosingTemplatePublish",
2055
2067
  emits: ["close"],
2056
2068
  setup(m, { emit: t }) {
2057
- const e = V(!1), k = ue(), a = pe(), u = Be(), { t: b } = ne(), h = t;
2069
+ const e = V(!1), k = de(), a = ue(), u = Ne(), { t: b } = ne(), h = t;
2058
2070
  async function l() {
2059
2071
  e.value = !0;
2060
2072
  try {
@@ -2063,12 +2075,12 @@ const gn = /* @__PURE__ */ Ct(yn, [["render", vn]]), bn = { class: "flex flex-co
2063
2075
  message: "You may refresh after a while to review publish status",
2064
2076
  type: "success"
2065
2077
  }), i();
2066
- } catch (I) {
2078
+ } catch (F) {
2067
2079
  k.open({
2068
2080
  title: "Something went wrong",
2069
2081
  message: "Please try again",
2070
2082
  type: "error"
2071
- }), console.error("error on creating publish task", I);
2083
+ }), console.error("error on creating publish task", F);
2072
2084
  } finally {
2073
2085
  e.value = !1;
2074
2086
  }
@@ -2079,7 +2091,7 @@ const gn = /* @__PURE__ */ Ct(yn, [["render", vn]]), bn = { class: "flex flex-co
2079
2091
  function i() {
2080
2092
  h("close");
2081
2093
  }
2082
- return (I, C) => {
2094
+ return (F, I) => {
2083
2095
  const y = G("FmCircularProgress"), x = G("i18n-t"), d = G("FmButton");
2084
2096
  return _(), T("div", bn, [
2085
2097
  f(u).templates.length ? e.value ? (_(), T("div", _n, [
@@ -2098,10 +2110,10 @@ const gn = /* @__PURE__ */ Ct(yn, [["render", vn]]), bn = { class: "flex flex-co
2098
2110
  tag: "p"
2099
2111
  }, {
2100
2112
  started: j(() => [
2101
- r("span", $n, D(f($e)(new Date(o.value.createdAt))), 1)
2113
+ r("span", $n, D(f(we)(new Date(o.value.createdAt))), 1)
2102
2114
  ]),
2103
2115
  finished: j(() => [
2104
- r("span", Tn, D(f($e)(new Date(o.value.updatedAt))), 1)
2116
+ r("span", Tn, D(f(we)(new Date(o.value.updatedAt))), 1)
2105
2117
  ]),
2106
2118
  _: 1
2107
2119
  }),
@@ -2112,7 +2124,7 @@ const gn = /* @__PURE__ */ Ct(yn, [["render", vn]]), bn = { class: "flex flex-co
2112
2124
  tag: "p"
2113
2125
  }, {
2114
2126
  started: j(() => [
2115
- r("span", In, D(f($e)(new Date(o.value.createdAt))), 1)
2127
+ r("span", In, D(f(we)(new Date(o.value.createdAt))), 1)
2116
2128
  ]),
2117
2129
  progress: j(() => [
2118
2130
  r("span", Fn, " (" + D(o.value.completed.length) + "/" + D(o.value.outlets.length) + " completed) ", 1)
@@ -2142,21 +2154,21 @@ const gn = /* @__PURE__ */ Ct(yn, [["render", vn]]), bn = { class: "flex flex-co
2142
2154
  ]);
2143
2155
  };
2144
2156
  }
2145
- }), An = { class: "flex-1 flex flex-col gap-8" }, Rn = { class: "flex flex-col" }, Pn = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Mn = { class: "fm-typo-en-body-lg-600 text-fm-color-typo-primary" }, En = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary line-clamp-2" }, Nn = { class: "fm-typo-en-body-lg-400 line-clamp-2" }, cs = /* @__PURE__ */ te({
2157
+ }), An = { class: "flex-1 flex flex-col gap-8" }, Rn = { class: "flex flex-col" }, Pn = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Mn = { class: "fm-typo-en-body-lg-600 text-fm-color-typo-primary" }, En = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary line-clamp-2" }, Nn = { class: "fm-typo-en-body-lg-400 line-clamp-2" }, ds = /* @__PURE__ */ te({
2146
2158
  __name: "ClosingTemplateView",
2147
2159
  setup(m) {
2148
- const { t } = ne(), { createTemplate: e, updateTemplate: k, exportTemplates: a, importTemplates: u } = Ce(), { templateDialogProps: b, templateDetailsProps: h } = Ge(Ce()), l = Pe(), o = Fe(), g = Be(), i = st(), { breakpoints: I } = ct();
2160
+ const { t } = ne(), { createTemplate: e, updateTemplate: k, exportTemplates: a, importTemplates: u } = Te(), { templateDialogProps: b, templateDetailsProps: h } = ze(Te()), l = Re(), o = Ie(), g = Ne(), i = nt(), { breakpoints: F } = it();
2149
2161
  l.watchLocation(g.onLocationChanged);
2150
- const C = U(() => g.loading), y = V(""), x = V();
2162
+ const I = U(() => g.loading), y = V(""), x = V();
2151
2163
  function d(M) {
2152
2164
  var R;
2153
2165
  (R = x.value) == null || R.openRowDetail(M);
2154
2166
  }
2155
2167
  async function $(M) {
2156
- const { toClosingTemplateListItem: R } = await import("./index-CqgYx0tx.js");
2168
+ const { toClosingTemplateListItem: R } = await import("./index-CCvxPS3E.js");
2157
2169
  return { ...R(M), _rev: M._rev };
2158
2170
  }
2159
- const n = U(() => I.value.xs || I.value.sm), w = U(() => n.value ? 10 : 20);
2171
+ const n = U(() => F.value.xs || F.value.sm), w = U(() => n.value ? 10 : 20);
2160
2172
  function S(M) {
2161
2173
  switch (M) {
2162
2174
  case J.Add:
@@ -2241,7 +2253,7 @@ const gn = /* @__PURE__ */ Ct(yn, [["render", vn]]), bn = { class: "flex flex-co
2241
2253
  }
2242
2254
  ]);
2243
2255
  return (M, R) => (_(), T(Y, null, [
2244
- A(at, {
2256
+ A(st, {
2245
2257
  title: f(t)("inventory.closing.template.title"),
2246
2258
  actions: c.value,
2247
2259
  "onClick:action": S
@@ -2256,13 +2268,13 @@ const gn = /* @__PURE__ */ Ct(yn, [["render", vn]]), bn = { class: "flex flex-co
2256
2268
  }
2257
2269
  ])
2258
2270
  }, [
2259
- A(bt, {
2271
+ A(gt, {
2260
2272
  searchable: "",
2261
2273
  search: y.value,
2262
2274
  "onUpdate:search": R[0] || (R[0] = (B) => y.value = B)
2263
2275
  }, null, 8, ["search"]),
2264
- A(ht, {
2265
- style: Se(f(i).tableHeight),
2276
+ A(bt, {
2277
+ style: De(f(i).tableHeight),
2266
2278
  "column-defs": f(g).columnDefs,
2267
2279
  rows: f(g).templates,
2268
2280
  "onUpdate:rows": R[1] || (R[1] = (B) => f(g).templates = B),
@@ -2271,7 +2283,7 @@ const gn = /* @__PURE__ */ Ct(yn, [["render", vn]]), bn = { class: "flex flex-co
2271
2283
  ref_key: "tableRef",
2272
2284
  ref: x,
2273
2285
  "search-value": y.value,
2274
- loading: C.value,
2286
+ loading: I.value,
2275
2287
  "fetch-detail": (B, z) => f(k)(B._id, z),
2276
2288
  "detail-to-row": $,
2277
2289
  "page-size": w.value
@@ -2282,24 +2294,24 @@ const gn = /* @__PURE__ */ Ct(yn, [["render", vn]]), bn = { class: "flex flex-co
2282
2294
  onRowClick: (z) => d(z)
2283
2295
  }, {
2284
2296
  default: j((z) => {
2285
- var O, me, ee, ae, re, fe, ye, ve, le, ie, ce, ge, be, de, he, p, v, F, E, N, Q, L;
2297
+ var O, ce, ee, se, ae, pe, fe, ye, re, le, ie, ve, ge, me, be, p, v, C, E, L, N, Q;
2286
2298
  return [
2287
2299
  r("div", An, [
2288
2300
  r("div", Rn, [
2289
2301
  r("div", Pn, [
2290
- A(f(we), {
2291
- render: (ee = (me = (O = z._id) == null ? void 0 : O.column) == null ? void 0 : me.columnDef) == null ? void 0 : ee.cell,
2292
- props: (re = (ae = z._id) == null ? void 0 : ae.getContext) == null ? void 0 : re.call(ae)
2302
+ A(f(ke), {
2303
+ render: (ee = (ce = (O = z._id) == null ? void 0 : O.column) == null ? void 0 : ce.columnDef) == null ? void 0 : ee.cell,
2304
+ props: (ae = (se = z._id) == null ? void 0 : se.getContext) == null ? void 0 : ae.call(se)
2293
2305
  }, null, 8, ["render", "props"])
2294
2306
  ]),
2295
2307
  r("div", Mn, [
2296
- A(f(we), {
2297
- render: (ve = (ye = (fe = z.name) == null ? void 0 : fe.column) == null ? void 0 : ye.columnDef) == null ? void 0 : ve.cell,
2298
- props: (ie = (le = z.name) == null ? void 0 : le.getContext) == null ? void 0 : ie.call(le)
2308
+ A(f(ke), {
2309
+ render: (ye = (fe = (pe = z.name) == null ? void 0 : pe.column) == null ? void 0 : fe.columnDef) == null ? void 0 : ye.cell,
2310
+ props: (le = (re = z.name) == null ? void 0 : re.getContext) == null ? void 0 : le.call(re)
2299
2311
  }, null, 8, ["render", "props"])
2300
2312
  ]),
2301
- r("div", null, D((ce = B.original.locations) != null && ce.length ? f(t)("inventory.closing.table.enabledForN", {
2302
- count: ((ge = B.original.locations) == null ? void 0 : ge.length) ?? 0
2313
+ r("div", null, D((ie = B.original.locations) != null && ie.length ? f(t)("inventory.closing.table.enabledForN", {
2314
+ count: ((ve = B.original.locations) == null ? void 0 : ve.length) ?? 0
2303
2315
  }) : f(t)("inventory.closing.table.enabledForAll")), 1),
2304
2316
  r("div", En, D([
2305
2317
  ...B.original.previewItemNames,
@@ -2308,16 +2320,16 @@ const gn = /* @__PURE__ */ Ct(yn, [["render", vn]]), bn = { class: "flex flex-co
2308
2320
  ] : []
2309
2321
  ].join(", ")), 1),
2310
2322
  r("div", Nn, [
2311
- A(f(we), {
2312
- render: (he = (de = (be = z.ref) == null ? void 0 : be.column) == null ? void 0 : de.columnDef) == null ? void 0 : he.cell,
2323
+ A(f(ke), {
2324
+ render: (be = (me = (ge = z.ref) == null ? void 0 : ge.column) == null ? void 0 : me.columnDef) == null ? void 0 : be.cell,
2313
2325
  props: (v = (p = z.ref) == null ? void 0 : p.getContext) == null ? void 0 : v.call(p)
2314
2326
  }, null, 8, ["render", "props"])
2315
2327
  ])
2316
2328
  ]),
2317
2329
  r("div", null, [
2318
- A(f(we), {
2319
- render: (N = (E = (F = z.status) == null ? void 0 : F.column) == null ? void 0 : E.columnDef) == null ? void 0 : N.cell,
2320
- props: (L = (Q = z.status) == null ? void 0 : Q.getContext) == null ? void 0 : L.call(Q)
2330
+ A(f(ke), {
2331
+ render: (L = (E = (C = z.status) == null ? void 0 : C.column) == null ? void 0 : E.columnDef) == null ? void 0 : L.cell,
2332
+ props: (Q = (N = z.status) == null ? void 0 : N.getContext) == null ? void 0 : Q.call(N)
2321
2333
  }, null, 8, ["render", "props"])
2322
2334
  ])
2323
2335
  ])
@@ -2332,9 +2344,9 @@ const gn = /* @__PURE__ */ Ct(yn, [["render", vn]]), bn = { class: "flex flex-co
2332
2344
  ]),
2333
2345
  _: 1
2334
2346
  }, 8, ["title", "actions"]),
2335
- (_(), W(et, { to: "body" }, [
2336
- A(gn, tt(ot(f(h))), null, 16),
2337
- A(fn, nt(f(b), {
2347
+ (_(), W(Ze, { to: "body" }, [
2348
+ A(gn, et(tt(f(h))), null, 16),
2349
+ A(fn, ot(f(b), {
2338
2350
  onSubmitted: R[2] || (R[2] = (B) => f(g).refresh())
2339
2351
  }), null, 16)
2340
2352
  ]))
@@ -2342,5 +2354,5 @@ const gn = /* @__PURE__ */ Ct(yn, [["render", vn]]), bn = { class: "flex flex-co
2342
2354
  }
2343
2355
  });
2344
2356
  export {
2345
- cs as default
2357
+ ds as default
2346
2358
  };