@feedmepos/mf-inventory-portal 1.8.0-dev.1 → 1.8.0-dev.2

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 (124) hide show
  1. package/dist/App-DVHgBTHP.js +1499 -0
  2. package/dist/{ApprovalView-C8_ax05b.js → ApprovalView-RaXuWWSu.js} +9 -9
  3. package/dist/{BindingsDialog-t0ZY9eh5.js → BindingsDialog-DomvXijP.js} +2 -2
  4. package/dist/{BindingsPicker-C0Qblmml.js → BindingsPicker-DGnzxEs7.js} +2 -2
  5. package/dist/{BindingsTable-CsqUBbRA.js → BindingsTable-DfG9kWrv.js} +4 -4
  6. package/dist/{BulkReceiveRequestView-DAG-TMox.js → BulkReceiveRequestView-DxHWrfbi.js} +21 -22
  7. package/dist/ChangeLocationComponent.vue_vue_type_script_setup_true_lang-CVekIoiN.js +151 -0
  8. package/dist/{ClosingDraftView-CdKp4Ny6.js → ClosingDraftView-C3n66bbh.js} +20 -20
  9. package/dist/{ClosingHistoryView-Blyq9-BS.js → ClosingHistoryView-kdpYGy1Y.js} +5 -5
  10. package/dist/{ClosingTemplateView-C326DL4q.js → ClosingTemplateView-DwGloYxn.js} +302 -291
  11. package/dist/{CustomPrintTemplatePreview.vue_vue_type_script_setup_true_lang-CXjubRbj.js → CustomPrintTemplatePreview.vue_vue_type_script_setup_true_lang-9eY_r8LF.js} +1 -1
  12. package/dist/{DefaultView-CsIMmQAY.js → DefaultView-JC_e4xgC.js} +2 -2
  13. package/dist/{DeliveryOrderPrintPreview-eTrMvJzA.js → DeliveryOrderPrintPreview-BBCvI67S.js} +2 -2
  14. package/dist/DeprecateSoonWarningDialog.vue_vue_type_script_setup_true_lang-5Cc08Svt.js +58 -0
  15. package/dist/{EmailDialog.vue_vue_type_script_setup_true_lang-B7nBbxMo.js → EmailDialog.vue_vue_type_script_setup_true_lang-H4FWc9ga.js} +1663 -1668
  16. package/dist/FeatureCapabilityBadge.vue_vue_type_script_setup_true_lang-C1C8aDA6.js +61 -0
  17. package/dist/{FmDateRangePickerChip.vue_vue_type_script_setup_true_lang-CI2KTzDs.js → FmDateRangePickerChip.vue_vue_type_script_setup_true_lang-Q8Mptiv3.js} +1 -1
  18. package/dist/{FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-Db_FiSRe.js → FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-CE1_yyHe.js} +2 -2
  19. package/dist/FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-CGJi3f86.js +120 -0
  20. package/dist/{FmMultiselectDialog-CYUxtxnS.js → FmMultiselectDialog-DCaRlBIy.js} +2 -2
  21. package/dist/{FmMultiselectDialog-BAw-gp5K.js → FmMultiselectDialog-yVPY5aBV.js} +1 -1
  22. package/dist/{FmUnitInput.vue_vue_type_script_setup_true_lang-DOkV11NN.js → FmUnitInput.vue_vue_type_script_setup_true_lang-ClaLVtpK.js} +6 -6
  23. package/dist/{ImportView-BmotFC-3.js → ImportView-DQrVMzxN.js} +6 -6
  24. package/dist/{IngredientBindedItem.vue_vue_type_script_setup_true_lang-DVCCpvS4.js → IngredientBindedItem.vue_vue_type_script_setup_true_lang-7lT5UZc8.js} +1 -1
  25. package/dist/IngredientGroupView-BMUnEaY7.js +1000 -0
  26. package/dist/{IngredientsView-CZ6E7cXf.js → IngredientsView-DPj9lBTK.js} +303 -296
  27. package/dist/{IntegrationExplorerView-B15ND4Fg.js → IntegrationExplorerView-CO2wpUR_.js} +4 -4
  28. package/dist/{IntegrationView-hkNhsqx2.js → IntegrationView-DIeZoey0.js} +2403 -2408
  29. package/dist/{InventoryBindingForm-SfuUF0_O.js → InventoryBindingForm-Cj4_Chue.js} +1 -1
  30. package/dist/{InventoryBindingForm.vue_vue_type_script_setup_true_lang-Zq81p_MF.js → InventoryBindingForm.vue_vue_type_script_setup_true_lang-CaBOK7NC.js} +5 -5
  31. package/dist/{InventoryBindingSummary-DUcukkyJ.js → InventoryBindingSummary-yzGzd7jJ.js} +1 -1
  32. package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-BmfROiLM.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-DzzTPdyF.js} +1 -1
  33. package/dist/{ProductionRunDetailView-BwgRX-14.js → ProductionRunDetailView-Cw-ecaey.js} +4 -4
  34. package/dist/{ProductionRunLifecycleDialogs.vue_vue_type_script_setup_true_lang-BbNXNhpr.js → ProductionRunLifecycleDialogs.vue_vue_type_script_setup_true_lang-BYyiiAWb.js} +7 -7
  35. package/dist/{ProductionRunView-CZU7LY9-.js → ProductionRunView-C11eseXQ.js} +3 -3
  36. package/dist/{PublishView-DS2FZ66p.js → PublishView-CPK9NeVF.js} +3 -3
  37. package/dist/{PurchaseOrderPrintPreview-CZa0MVAs.js → PurchaseOrderPrintPreview-DosqWQeN.js} +2 -2
  38. package/dist/{ReceiveRequestView-Bk5b3nVB.js → ReceiveRequestView-BxSkpK2t.js} +15 -16
  39. package/dist/{RecipeView-DvI6X-uN.js → RecipeView-oHDWsT0P.js} +19 -20
  40. package/dist/SettingsView-QlUNwFhM.js +983 -0
  41. package/dist/{StockView-Z9wGihT7.js → StockView-a8LbVZ_7.js} +324 -322
  42. package/dist/{SubsidiaryTreeDialog.vue_vue_type_script_setup_true_lang-DdZg9T4n.js → SubsidiaryTreeDialog.vue_vue_type_script_setup_true_lang-GdGJCuc0.js} +1 -1
  43. package/dist/{SupplierView-D8q6siZW.js → SupplierView-BKxKoi_0.js} +451 -447
  44. package/dist/{SurchargeView-Db_5YFoR.js → SurchargeView-Db4cwhZv.js} +7 -7
  45. package/dist/{SystemTrailDialog.vue_vue_type_script_setup_true_lang-WOVs4Fr1.js → SystemTrailDialog.vue_vue_type_script_setup_true_lang-CpkF77Ow.js} +2 -2
  46. package/dist/{TemplatePublishDialog.vue_vue_type_script_setup_true_lang-BtoP4XgE.js → TemplatePublishDialog.vue_vue_type_script_setup_true_lang-CCCj4WVF.js} +1 -1
  47. package/dist/{TransferDetails.vue_vue_type_script_setup_true_lang-Bljc4Vuy.js → TransferDetails.vue_vue_type_script_setup_true_lang-CFNPXqt5.js} +39 -40
  48. package/dist/{TransferTemplateView-DtsJzmUr.js → TransferTemplateView-CzwxOBMQ.js} +22 -23
  49. package/dist/{UnitCostHistoryView-BqDiQ4IE.js → UnitCostHistoryView-CqcyjCCd.js} +4 -4
  50. package/dist/{UnitDisplayControl.vue_vue_type_script_setup_true_lang-BjSmg5LX.js → UnitDisplayControl.vue_vue_type_script_setup_true_lang-DO80_8SZ.js} +4 -4
  51. package/dist/{UnitView-CM695-VI.js → UnitView-BqdK1AM_.js} +8 -8
  52. package/dist/{WarehouseView-BdidU4p6.js → WarehouseView-COJM9IXM.js} +193 -189
  53. package/dist/{WastageTemplateView-DdhwdXT6.js → WastageTemplateView-DW3viTHN.js} +15 -15
  54. package/dist/api/feature-flags.d.ts +10 -0
  55. package/dist/api/license.d.ts +9 -0
  56. package/dist/{app-Cb5s4jMu.js → app-yvK__CBL.js} +143 -106
  57. package/dist/app.d.ts +36 -0
  58. package/dist/app.js +1 -1
  59. package/dist/{closing-template-DnqnpXxn.js → closing-template-DezidSM0.js} +1 -1
  60. package/dist/components/ChangeLocationComponent.vue.d.ts +21 -14
  61. package/dist/components/DeprecateSoonWarningDialog.vue.d.ts +22 -0
  62. package/dist/components/FeatureCapabilityBadge.vue.d.ts +25 -0
  63. package/dist/components/{PreviewBadge.vue.d.ts → FeatureCapabilityGate.vue.d.ts} +10 -7
  64. package/dist/components/{PremiumBadge.vue.d.ts → PlanTierBadge.vue.d.ts} +5 -13
  65. package/dist/components/PlanUpgradeDialog.vue.d.ts +30 -0
  66. package/dist/composable/useNavigationMenu.d.ts +2 -1
  67. package/dist/{date2-BPhD_1Of.js → date2-2XjepIqc.js} +1 -1
  68. package/dist/{dayjs.min-Zbd6-uVD.js → dayjs.min-CNp5DLBB.js} +1 -1
  69. package/dist/{decimal-Df6a50Ld.js → decimal-Z7oJdGk8.js} +2 -2
  70. package/dist/{defineDeepModel-Brbsikbi.js → defineDeepModel-CMxJn_H2.js} +1 -1
  71. package/dist/{duplicate-template-B9kuShaF.js → duplicate-template-BetV5oy_.js} +1 -1
  72. package/dist/{inventory-core-dart.default-DDRxXXnt.js → feature-CkWaZ-5K.js} +3046 -1837
  73. package/dist/feature-flags/core.d.ts +27 -0
  74. package/dist/feature-flags/core.spec.d.ts +1 -0
  75. package/dist/feature-flags/navigation-capabilities.d.ts +23 -0
  76. package/dist/feature-flags/navigation-capabilities.spec.d.ts +1 -0
  77. package/dist/feature-flags/plan-tier.d.ts +6 -0
  78. package/dist/feature-flags/plan-tier.spec.d.ts +1 -0
  79. package/dist/feature-flags/portal-feature-catalog.d.ts +24 -0
  80. package/dist/feature-flags/vue.d.ts +14 -0
  81. package/dist/{format-time-from-id-DmUjUcVj.js → format-time-from-id-DatSI9uD.js} +1 -1
  82. package/dist/{format-unit-display-CsQA0SQd.js → format-unit-display-DM5We5cx.js} +13 -13
  83. package/dist/id-to-date-Dxw2jKhy.js +67 -0
  84. package/dist/{import-export.helper-DCQ6oX9s.js → import-export.helper-BOmADwUw.js} +6 -6
  85. package/dist/{index-C-mazZwS.js → index-7fz5sGDO.js} +3 -3
  86. package/dist/{index-UmM6gHJ1.js → index-CIH9NCvs.js} +1 -1
  87. package/dist/{index-BXaIMGnI.js → index-ClYgfwW7.js} +1 -1
  88. package/dist/{lz-string-Bibw5D_6.js → lz-string-CCsc2X7t.js} +1 -1
  89. package/dist/{netsuite-Bev0OtQT.js → netsuite-COumFXC2.js} +2 -2
  90. package/dist/{number-y_W4pn_d.js → number-gSLvxNqA.js} +3 -3
  91. package/dist/portal-feature-catalog-yGIESKTc.js +246 -0
  92. package/dist/{predefined-templates-BHvUnTk_.js → predefined-templates-Bw9A9LNA.js} +1 -1
  93. package/dist/{purchase-order-template-DgOKEzhS.js → purchase-order-template-BaZjdGq8.js} +1 -1
  94. package/dist/{recalculationUtils-Dv__DzZh.js → recalculationUtils-t32wAurN.js} +1 -1
  95. package/dist/{row-action.enum-ncgDYAjP.js → row-action.enum-BDeudY4d.js} +2 -2
  96. package/dist/{rules-CZTBvenw.js → rules-C1btu0Md.js} +2 -2
  97. package/dist/{stock-CxCRZo_D.js → stock-B59sfN28.js} +1 -1
  98. package/dist/{stock-XINW8JOM.js → stock-BF86TMW0.js} +3 -3
  99. package/dist/stores/feature.d.ts +12 -0
  100. package/dist/{supplier-CkZdeMcl.js → supplier-DnbLJ_cS.js} +2 -2
  101. package/dist/{surcharge-FRSFqjGl.js → surcharge-C1uE3uQa.js} +1 -1
  102. package/dist/tsconfig.app.tsbuildinfo +1 -1
  103. package/dist/{uom-rules-Cm1styDr.js → uom-rules-DjfyrFHJ.js} +1 -1
  104. package/dist/{use-ingredient-select-dialog-ntAqHX04.js → use-ingredient-select-dialog-7A7fWyEH.js} +2 -2
  105. package/dist/{use-inventory-binding-dialog-DVIJO8Cl.js → use-inventory-binding-dialog-Cc1tjTfV.js} +2 -2
  106. package/dist/{use-template-enabled-locations-CIZqw-Z8.js → use-template-enabled-locations-C-Hqqgzt.js} +2 -2
  107. package/dist/{use-transfer-locations-CM5vNttA.js → use-transfer-locations-CqsXvOI2.js} +2 -2
  108. package/dist/{useHrmPermission-CslLuBoP.js → useHrmPermission-BzwD3Ctc.js} +1 -1
  109. package/dist/useNavigationMenu-PrZg9HS7.js +352 -0
  110. package/dist/{useSseClient-CCV4mPzD.js → useSseClient-FCyLWq8k.js} +1 -1
  111. package/dist/views/integration/components/IntegrationCard.vue.d.ts +38 -0
  112. package/dist/views/settings/FeatureFlagView.vue.d.ts +2 -0
  113. package/dist/{vue-i18n-C5j4EQhi.js → vue-i18n-C34f-Tph.js} +434 -434
  114. package/dist/{xlsx.util-B50OvX4z.js → xlsx.util-X4amwe_k.js} +2 -2
  115. package/package.json +6 -6
  116. package/dist/App-BXgpGzGR.js +0 -1476
  117. package/dist/FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-zcEv1Swg.js +0 -243
  118. package/dist/IngredientGroupView-qrR9ksEn.js +0 -985
  119. package/dist/PremiumBadge.vue_vue_type_script_setup_true_lang-3e3kDsbN.js +0 -93
  120. package/dist/PreviewBadge.vue_vue_type_script_setup_true_lang-DX2MJqL4.js +0 -29
  121. package/dist/SettingsView-sThYErMz.js +0 -698
  122. package/dist/feature-Ckn5ra3z.js +0 -1136
  123. package/dist/useNavigationMenu-CSinmNCY.js +0 -172
  124. /package/dist/components/{FmFeatureFlagDialog.vue.d.ts → DeprecateSoonPill.vue.d.ts} +0 -0
@@ -0,0 +1,27 @@
1
+ import { type InventoryPlanTier } from './plan-tier';
2
+ export interface FeatureDefinition<Key extends string = string> {
3
+ key: Key;
4
+ minimumTier: InventoryPlanTier;
5
+ release?: FeatureRelease;
6
+ }
7
+ export type ReleaseStage = 'off' | 'beta' | 'ga';
8
+ export interface FeatureRelease {
9
+ stage: ReleaseStage;
10
+ }
11
+ export interface FeatureEvaluationContext {
12
+ planTier: InventoryPlanTier;
13
+ businessId?: string;
14
+ locationId?: string;
15
+ }
16
+ export interface FeatureResult {
17
+ enabled: boolean;
18
+ disabled: boolean;
19
+ stage: ReleaseStage;
20
+ eligible: boolean;
21
+ reason?: string;
22
+ }
23
+ export declare function defineFeature<Key extends string>(definition: FeatureDefinition<Key>): FeatureDefinition<Key>;
24
+ /**
25
+ * Headless release and plan evaluator; it has no Vue or feature-vendor dependency.
26
+ */
27
+ export declare function evaluateFeature(feature: FeatureDefinition, context: FeatureEvaluationContext): FeatureResult;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,23 @@
1
+ import { RouteName } from '@/router/name';
2
+ import { type FeatureDefinition, type FeatureEvaluationContext, type FeatureRelease } from './core';
3
+ import type { InventoryPlanTier } from './plan-tier';
4
+ export interface NavigationCapability {
5
+ route: RouteName;
6
+ module: string;
7
+ tier: InventoryPlanTier;
8
+ description: string;
9
+ featureKey?: string;
10
+ /** Optional staged rollout configuration for this capability. */
11
+ release?: FeatureRelease;
12
+ }
13
+ /**
14
+ * Commercial catalogue for every user-facing portal navigation capability.
15
+ *
16
+ * The Vue navigation consumes this catalogue for tier badges and upgrade
17
+ * dialogs. Existing permission and rollout-feature-flag checks still apply.
18
+ */
19
+ export declare const navigationCapabilities: readonly NavigationCapability[];
20
+ export declare const navigationFeatures: Record<RouteName, FeatureDefinition<RouteName>>;
21
+ export declare function getNavigationCapability(route: RouteName | undefined): NavigationCapability | null;
22
+ export declare function getNavigationFeature(route: RouteName | undefined): FeatureDefinition<RouteName> | null;
23
+ export declare function evaluateNavigationFeature(route: RouteName | undefined, context: FeatureEvaluationContext): import("./core").FeatureResult;
@@ -0,0 +1,6 @@
1
+ export declare const inventoryPlanTiers: readonly ["lite", "standard", "premium"];
2
+ export type InventoryPlanTier = (typeof inventoryPlanTiers)[number];
3
+ /** Converts the license API value to the internal tier name. Null means the Standard baseline. */
4
+ export declare function parseInventoryPlanTier(value: string | null | undefined): InventoryPlanTier;
5
+ /** Whether a business on `current` can use a feature requiring `minimum`. */
6
+ export declare function hasInventoryPlanTier(current: InventoryPlanTier, minimum: InventoryPlanTier): boolean;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,24 @@
1
+ import { type FeatureDefinition } from './core';
2
+ import type { InventoryPlanTier } from './plan-tier';
3
+ export type PortalFeatureCategory = InventoryPlanTier | 'beta';
4
+ /** Raw rollout flags that are consumed by inventory-portal UI code. */
5
+ export declare const PORTAL_FEATURE_FLAG_KEYS: Set<string>;
6
+ export declare function isPortalFeatureFlag(flagKey: string): boolean;
7
+ export interface PortalFeatureCatalogueEntry {
8
+ key: string;
9
+ label: string;
10
+ category: PortalFeatureCategory;
11
+ /** Lifecycle notice for features that remain supported for now. */
12
+ deprecateSoon?: boolean;
13
+ controls: string;
14
+ flagKeys?: readonly string[];
15
+ definition?: FeatureDefinition;
16
+ }
17
+ /**
18
+ * Product classification for every portal feature currently controlled by a
19
+ * feature flag. Keep this independent of the vendor flag names so that rollout
20
+ * mechanisms can change without touching component code.
21
+ */
22
+ export declare const portalFeatureCatalogue: readonly PortalFeatureCatalogueEntry[];
23
+ export declare function getPortalFeature(key: string): PortalFeatureCatalogueEntry | undefined;
24
+ export declare function getPortalFeatureForFlag(flagKey: string): PortalFeatureCatalogueEntry | undefined;
@@ -0,0 +1,14 @@
1
+ import { type ComputedRef, type MaybeRef } from 'vue';
2
+ import { type FeatureDefinition, type FeatureEvaluationContext, type FeatureResult, type ReleaseStage } from './core';
3
+ export interface UseFeatureResult {
4
+ enabled: ComputedRef<boolean>;
5
+ disabled: ComputedRef<boolean>;
6
+ stage: ComputedRef<ReleaseStage>;
7
+ eligible: ComputedRef<boolean>;
8
+ reason: ComputedRef<string | undefined>;
9
+ result: ComputedRef<FeatureResult>;
10
+ }
11
+ /** Vue adapter for the headless feature evaluator. */
12
+ export declare function useFeature(feature: MaybeRef<FeatureDefinition | null>): UseFeatureResult;
13
+ /** Provides the current actor context to the headless evaluator. */
14
+ export declare function useFeatureEvaluationContext(): ComputedRef<FeatureEvaluationContext>;
@@ -1,4 +1,4 @@
1
- import { h as n } from "./date2-BPhD_1Of.js";
1
+ import { h as n } from "./date2-2XjepIqc.js";
2
2
  function d(r) {
3
3
  const t = a(r);
4
4
  return t === null ? "" : n(t);
@@ -1,24 +1,24 @@
1
1
  import { components as ce, useDialogChild as Pe, useSnackbar as de, useDialog as Me, FmButtonVariant as te } from "@feedmepos/ui-library";
2
2
  import { defineStore as pe } from "pinia";
3
3
  import { F as xe } from "./form-mode.enum-BKiNVH6A.js";
4
- import { u as fe } from "./purchase-order-template-DgOKEzhS.js";
4
+ import { u as fe } from "./purchase-order-template-BaZjdGq8.js";
5
5
  import { ref as I, h as oe, defineComponent as ye, resolveComponent as W, createElementBlock as F, openBlock as O, createElementVNode as N, createCommentVNode as J, normalizeClass as Z, createTextVNode as Be, toDisplayString as q, unref as B, createVNode as z, withCtx as me, Fragment as Y, renderList as ae, onMounted as Le, computed as H, watch as Qe, createSlots as Ue, createBlock as re } from "vue";
6
- import { a as X, c as ve, r as L, u as ie, m as qe, k as _e, s as Ve, R as we } from "./app-Cb5s4jMu.js";
6
+ import { a as X, c as ve, r as L, u as ie, m as qe, k as _e, s as Ve, R as we } from "./app-yvK__CBL.js";
7
7
  import { useRouter as He } from "vue-router";
8
- import { a as ze } from "./FmMultiselectDialog-CYUxtxnS.js";
9
- import { D as ne, R as U } from "./row-action.enum-ncgDYAjP.js";
8
+ import { a as ze } from "./FmMultiselectDialog-DCaRlBIy.js";
9
+ import { D as ne, R as U } from "./row-action.enum-BDeudY4d.js";
10
10
  import { c as je } from "./component-BmLAdDiY.js";
11
- import { f as Ye } from "./format-time-from-id-DmUjUcVj.js";
11
+ import { f as Ye } from "./format-time-from-id-DatSI9uD.js";
12
12
  import { useI18n as he, useCoreStore as Ie } from "@feedmepos/mf-common";
13
- import { t as K, a as Ce, d as Oe, s as Ae, r as Ke } from "./xlsx.util-B50OvX4z.js";
13
+ import { t as K, a as Ce, d as Oe, s as Ae, r as Ke } from "./xlsx.util-X4amwe_k.js";
14
14
  import { F as Ge } from "./FmDroppableField-J0tG_U3w.js";
15
- import { a as G, c as We, t as se, g as ue } from "./number-y_W4pn_d.js";
16
- import { f as Je } from "./date2-BPhD_1Of.js";
17
- import { u as ge } from "./supplier-CkZdeMcl.js";
18
- import { a as Ze, B as Xe } from "./rules-CZTBvenw.js";
19
- import { u as Te } from "./netsuite-Bev0OtQT.js";
20
- import { u as et } from "./duplicate-template-B9kuShaF.js";
21
- import { u as tt } from "./vue-i18n-C5j4EQhi.js";
15
+ import { a as G, c as We, t as se, g as ue } from "./number-gSLvxNqA.js";
16
+ import { f as Je } from "./date2-2XjepIqc.js";
17
+ import { u as ge } from "./supplier-DnbLJ_cS.js";
18
+ import { a as Ze, B as Xe } from "./rules-C1btu0Md.js";
19
+ import { u as Te } from "./netsuite-COumFXC2.js";
20
+ import { u as et } from "./duplicate-template-BetV5oy_.js";
21
+ import { u as tt } from "./vue-i18n-C34f-Tph.js";
22
22
  function De(n) {
23
23
  const e = X(), o = n.sku, d = e.skuById[o._id];
24
24
  if (d.unit._id !== o.unit._id) return !0;
@@ -0,0 +1,67 @@
1
+ import { d as p, u as F } from "./app-yvK__CBL.js";
2
+ import { useCoreStore as y } from "@feedmepos/mf-common";
3
+ import { ref as v } from "vue";
4
+ const l = p((e, r) => {
5
+ const t = F(), u = y();
6
+ return {
7
+ async getInventoryForecast() {
8
+ var a;
9
+ const n = ((a = u.currentBusiness.value) == null ? void 0 : a._id) ?? "", s = t.currentLocationId ?? "", c = `${e.dataBackendUrl}/${n}/${s}/inventory-forecast`;
10
+ try {
11
+ return await r.get(c);
12
+ } catch {
13
+ return { skus: [] };
14
+ }
15
+ },
16
+ async getPurchaseOrderForecast(n, s) {
17
+ var d;
18
+ const c = ((d = u.currentBusiness.value) == null ? void 0 : d._id) ?? "", a = t.currentLocationId ?? "", i = `${e.dataBackendUrl}/${c}/${a}/purchase-order-forecast?days=${n}${s ? `&template_id=${s}` : ""}`;
19
+ try {
20
+ return await r.get(i);
21
+ } catch {
22
+ return { skus: [] };
23
+ }
24
+ }
25
+ };
26
+ });
27
+ function f() {
28
+ return {
29
+ inventoryForecast: { skus: [] },
30
+ purchaseOrderForecast: { skus: [] }
31
+ };
32
+ }
33
+ const o = v(f());
34
+ function g() {
35
+ return {
36
+ // state
37
+ get inventoryForecast() {
38
+ return o.value.inventoryForecast;
39
+ },
40
+ set inventoryForecast(e) {
41
+ o.value.inventoryForecast = e;
42
+ },
43
+ get purchaseOrderForecast() {
44
+ return o.value.purchaseOrderForecast;
45
+ },
46
+ set purchaseOrderForecast(e) {
47
+ o.value.purchaseOrderForecast = e;
48
+ },
49
+ // actions
50
+ async readStockEstimateBalance() {
51
+ const e = l();
52
+ this.inventoryForecast = await e.getInventoryForecast();
53
+ },
54
+ async readPurchaseOrder(e, r) {
55
+ const t = l();
56
+ this.purchaseOrderForecast = await t.getPurchaseOrderForecast(e, r);
57
+ }
58
+ };
59
+ }
60
+ function m(e) {
61
+ let r = e.substring(e.indexOf("_") + 1);
62
+ return r.includes("_") && (r = r.substring(0, r.lastIndexOf("_"))), Number.isNaN(Date.parse(r)) ? null : new Date(r).toISOString();
63
+ }
64
+ export {
65
+ m as i,
66
+ g as u
67
+ };
@@ -1,10 +1,10 @@
1
- import { a as w, t as H, f as T } from "./number-y_W4pn_d.js";
2
- import { u as P } from "./feature-Ckn5ra3z.js";
1
+ import { a as w, t as H, f as T } from "./number-gSLvxNqA.js";
2
+ import { u as P } from "./feature-CkWaZ-5K.js";
3
3
  import { useCoreStore as y } from "@feedmepos/mf-common";
4
- import { a as g, g as k, m as j, e as S } from "./app-Cb5s4jMu.js";
5
- import { b as N, d as $, s as I } from "./xlsx.util-B50OvX4z.js";
6
- import { f as _ } from "./date2-BPhD_1Of.js";
7
- import { I as O } from "./rules-CZTBvenw.js";
4
+ import { a as g, g as k, m as j, e as S } from "./app-yvK__CBL.js";
5
+ import { b as N, d as $, s as I } from "./xlsx.util-X4amwe_k.js";
6
+ import { f as _ } from "./date2-2XjepIqc.js";
7
+ import { I as O } from "./rules-C1btu0Md.js";
8
8
  function U() {
9
9
  return {
10
10
  low: 6,
@@ -1,9 +1,9 @@
1
1
  import { ref as v, computed as f } from "vue";
2
- import { u as w } from "./netsuite-Bev0OtQT.js";
3
- import { A as L, a as p, u as y, d as k, G as h } from "./app-Cb5s4jMu.js";
2
+ import { u as w } from "./netsuite-COumFXC2.js";
3
+ import { A as L, a as p, u as y, d as k, G as h } from "./app-yvK__CBL.js";
4
4
  import { useSnackbar as B } from "@feedmepos/ui-library";
5
5
  import { useCoreStore as E } from "@feedmepos/mf-common";
6
- import { u as S } from "./feature-Ckn5ra3z.js";
6
+ import { u as S } from "./feature-CkWaZ-5K.js";
7
7
  function C() {
8
8
  return {
9
9
  setting: {
@@ -1,4 +1,4 @@
1
- import { y as h } from "./app-Cb5s4jMu.js";
1
+ import { y as h } from "./app-yvK__CBL.js";
2
2
  var a = { exports: {} };
3
3
  function x(r, s = 100, u = {}) {
4
4
  if (typeof r != "function")
@@ -1,4 +1,4 @@
1
- import { y as L, aw as V, ax as je, ay as X, ap as Bl, a1 as Ar, az as Te, aA as Yt, aB as Wt } from "./app-Cb5s4jMu.js";
1
+ import { y as L, aw as V, ax as je, ay as X, ap as Bl, a1 as Ar, az as Te, aA as Yt, aB as Wt } from "./app-yvK__CBL.js";
2
2
  import { d as wl, _ as zl } from "./dinero-DMLEtkS9.js";
3
3
  function Ul(t, e) {
4
4
  for (var r = 0; r < e.length; r++) {
@@ -1,4 +1,4 @@
1
- import { y as O } from "./app-Cb5s4jMu.js";
1
+ import { y as O } from "./app-yvK__CBL.js";
2
2
  var j = { exports: {} };
3
3
  (function(_) {
4
4
  var S = function() {
@@ -1,8 +1,8 @@
1
- import { y as s_, a1 as vi, D as i, ae as u_, af as o_, ag as a_, ah as c_, ai as Ti, aj as d_, C as at, ak as bi, a0 as Ys, al as ru, am as nc, an as Oe, ao as Le, N as De, w as oe, ap as Er, B as Bt, aq as Js, Z as Ye, e as zn, ar as ic, as as l_, at as f_, au as m_, a3 as su, a9 as p_, d as g_, j as h_, s as Wa, a as __, u as Ei } from "./app-Cb5s4jMu.js";
1
+ import { y as s_, a1 as vi, D as i, ae as u_, af as o_, ag as a_, ah as c_, ai as Ti, aj as d_, C as at, ak as bi, a0 as Ys, al as ru, am as nc, an as Oe, ao as Le, N as De, w as oe, ap as Er, B as Bt, aq as Js, Z as Ye, e as zn, ar as ic, as as l_, at as f_, au as m_, a3 as su, a9 as p_, d as g_, j as h_, s as Wa, a as __, u as Ei } from "./app-yvK__CBL.js";
2
2
  import { useCoreStore as Cn } from "@feedmepos/mf-common";
3
3
  import { useSnackbar as I_ } from "@feedmepos/ui-library";
4
4
  import { defineComponent as y_, ref as Zs, computed as An, resolveComponent as Kn, createBlock as zs, openBlock as _t, withCtx as ut, createElementVNode as ge, createElementBlock as Qt, createVNode as At, createTextVNode as ot, toDisplayString as Ue, Fragment as vr, createCommentVNode as Dn, renderList as v_, unref as qa, h as E_ } from "vue";
5
- import { u as b_ } from "./feature-Ckn5ra3z.js";
5
+ import { u as b_ } from "./feature-CkWaZ-5K.js";
6
6
  var br = { exports: {} };
7
7
  /**
8
8
  * @license
@@ -1,6 +1,6 @@
1
- import { w as o } from "./app-Cb5s4jMu.js";
2
- import { F as l } from "./decimal-Df6a50Ld.js";
3
- import "./dayjs.min-Zbd6-uVD.js";
1
+ import { w as o } from "./app-yvK__CBL.js";
2
+ import { F as l } from "./decimal-Z7oJdGk8.js";
3
+ import "./dayjs.min-CNp5DLBB.js";
4
4
  function g(n, t) {
5
5
  return o.convertPrecision({
6
6
  value: n,
@@ -0,0 +1,246 @@
1
+ import { h as c } from "./feature-CkWaZ-5K.js";
2
+ function d(t) {
3
+ return t;
4
+ }
5
+ function p(t, r) {
6
+ const a = t.release ?? { stage: "ga" }, i = c(r.planTier, t.minimumTier), o = a.stage === "ga" || a.stage === "beta", n = i && o, s = i ? a.stage === "off" ? "This feature is not currently available." : void 0 : `Requires the ${t.minimumTier} plan.`;
7
+ return {
8
+ enabled: n,
9
+ disabled: !n,
10
+ stage: a.stage,
11
+ eligible: o,
12
+ reason: s
13
+ };
14
+ }
15
+ function e(t, r) {
16
+ return {
17
+ key: t,
18
+ minimumTier: r === "premium" ? "premium" : "standard",
19
+ release: { stage: r === "beta" ? "beta" : "ga" }
20
+ };
21
+ }
22
+ const l = [
23
+ {
24
+ key: "total-cost",
25
+ label: "Total Cost",
26
+ category: "premium",
27
+ flagKeys: ["inventory_pos_costing"],
28
+ controls: "Cost history, stock, ingredient, supplier, purchase-order, and template cost UI.",
29
+ definition: e("total-cost", "premium")
30
+ },
31
+ {
32
+ key: "wastage-template",
33
+ label: "Wastage Template",
34
+ category: "premium",
35
+ flagKeys: ["inventory_pos_adjust_v2_wastage"],
36
+ controls: "Wastage navigation, templates, and ingredient template links.",
37
+ definition: e("wastage-template", "premium")
38
+ },
39
+ {
40
+ key: "purchase-order-template",
41
+ label: "Purchase-Order Template",
42
+ category: "premium",
43
+ flagKeys: ["inventory_portal_must_use_transfer_template", "inventory_pos_allow_receive_order"],
44
+ controls: "Template navigation, forms, and ingredient template links.",
45
+ definition: e("purchase-order-template", "premium")
46
+ },
47
+ {
48
+ key: "closing-template",
49
+ label: "Closing Template",
50
+ category: "premium",
51
+ flagKeys: ["inventory_pos_closing_v2"],
52
+ controls: "Closing Template, Closing Draft, and ingredient template links.",
53
+ definition: e("closing-template", "premium")
54
+ },
55
+ {
56
+ key: "ingredient-group",
57
+ label: "Ingredient Group",
58
+ category: "standard",
59
+ deprecateSoon: !0,
60
+ controls: "Ingredient Group navigation and recipe group selection.",
61
+ definition: e("ingredient-group", "standard")
62
+ },
63
+ {
64
+ key: "production-runs",
65
+ label: "Production Runs",
66
+ category: "beta",
67
+ controls: "Production navigation, routes, and detail view.",
68
+ definition: e("production-runs", "beta")
69
+ },
70
+ {
71
+ key: "bulk-receive-transfer",
72
+ label: "Bulk Receive / Transfer",
73
+ category: "beta",
74
+ controls: "Purchase / Transfer in (New) navigation and bulk receive page.",
75
+ definition: e("bulk-receive-transfer", "beta")
76
+ },
77
+ {
78
+ key: "surcharge",
79
+ label: "Surcharge",
80
+ category: "beta",
81
+ controls: "Surcharge navigation and management page.",
82
+ definition: e("surcharge", "beta")
83
+ },
84
+ {
85
+ key: "bulk-import",
86
+ label: "Bulk Import",
87
+ category: "standard",
88
+ controls: "Import navigation and import page.",
89
+ definition: e("bulk-import", "standard")
90
+ },
91
+ {
92
+ key: "custom-po-cost",
93
+ label: "Custom PO Cost",
94
+ category: "premium",
95
+ flagKeys: ["inventory_purchase_order_custom_cost"],
96
+ controls: "Delivery-order create/edit cost override controls.",
97
+ definition: e("custom-po-cost", "premium")
98
+ },
99
+ {
100
+ key: "po-cost-edit",
101
+ label: "PO Cost Edit",
102
+ category: "premium",
103
+ flagKeys: ["inventory_purchase_order_cost_edit"],
104
+ controls: "Purchase/transfer item cost editing.",
105
+ definition: e("po-cost-edit", "premium")
106
+ },
107
+ {
108
+ key: "po-price-adjustment",
109
+ label: "PO Price Adjustment",
110
+ category: "premium",
111
+ flagKeys: ["inventory_purchase_order_price_adjustment"],
112
+ controls: "Purchase-order price-adjustment editor and list.",
113
+ definition: e("po-price-adjustment", "premium")
114
+ },
115
+ {
116
+ key: "unit-cost-recalculation",
117
+ label: "Unit Cost / Recalculation",
118
+ category: "premium",
119
+ flagKeys: ["inventory_pos_closing_recalculation"],
120
+ controls: "Unit Cost History and recalculation dialog.",
121
+ definition: e("unit-cost-recalculation", "premium")
122
+ },
123
+ {
124
+ key: "backdated-po",
125
+ label: "Backdated PO",
126
+ category: "premium",
127
+ flagKeys: ["inventory_purchase_order_backdate", "inventory_backdate_receive"],
128
+ controls: "Purchase/transfer date controls and list columns.",
129
+ definition: e("backdated-po", "premium")
130
+ },
131
+ {
132
+ key: "po-email",
133
+ label: "PO Email",
134
+ category: "beta",
135
+ controls: "Purchase-order email actions.",
136
+ definition: e("po-email", "beta")
137
+ },
138
+ {
139
+ key: "print-templates",
140
+ label: "Print Templates",
141
+ category: "beta",
142
+ controls: "Custom purchase-order print actions.",
143
+ definition: e("print-templates", "beta")
144
+ },
145
+ {
146
+ key: "recipe-v2",
147
+ label: "Recipe V2",
148
+ category: "beta",
149
+ controls: "Recipe V2 fields and alternatives controls.",
150
+ definition: e("recipe-v2", "beta")
151
+ },
152
+ {
153
+ key: "recipe-bulk-edit",
154
+ label: "Recipe Bulk Edit",
155
+ category: "beta",
156
+ controls: "Recipe bulk-editor action and dialog.",
157
+ definition: e("recipe-bulk-edit", "beta")
158
+ },
159
+ {
160
+ key: "supplier-preparation-time",
161
+ label: "Supplier Preparation Time",
162
+ category: "beta",
163
+ controls: "Supplier and warehouse preparation-time fields.",
164
+ definition: e("supplier-preparation-time", "beta")
165
+ },
166
+ {
167
+ key: "xilnex-transfer-note",
168
+ label: "Xilnex Transfer Note",
169
+ category: "beta",
170
+ controls: "Purchase/transfer columns and Xilnex upload actions.",
171
+ definition: e("xilnex-transfer-note", "beta")
172
+ },
173
+ {
174
+ key: "purchase-order-v2",
175
+ label: "Purchase-Order V2 / Operate V2",
176
+ category: "premium",
177
+ flagKeys: ["inventory_portal_purchase_order_v2"],
178
+ controls: "All Premium plans use the new purchase-order workflow.",
179
+ definition: e("purchase-order-v2", "premium")
180
+ },
181
+ {
182
+ key: "transfer-fulfillment",
183
+ label: "Transfer Fulfillment",
184
+ category: "beta",
185
+ controls: "Transfer form fulfillment behavior.",
186
+ definition: e("transfer-fulfillment", "beta")
187
+ },
188
+ {
189
+ key: "po-workflow-completion",
190
+ label: "PO Workflow Completion",
191
+ category: "beta",
192
+ controls: "Mark-as-completed purchase-order action.",
193
+ definition: e("po-workflow-completion", "beta")
194
+ },
195
+ {
196
+ key: "opening-migration",
197
+ label: "Xilnex / Synergy Opening Migration",
198
+ category: "beta",
199
+ controls: "Xilnex and Synergy migration views.",
200
+ definition: e("opening-migration", "beta")
201
+ },
202
+ {
203
+ key: "netsuite-transfer-out",
204
+ label: "NetSuite Transfer Out",
205
+ category: "beta",
206
+ controls: "NetSuite integration transfer-out functionality.",
207
+ definition: e("netsuite-transfer-out", "beta")
208
+ },
209
+ {
210
+ key: "delivery-order-write",
211
+ label: "Delivery-Order Write",
212
+ category: "beta",
213
+ controls: "Delivery-order create/write UI.",
214
+ definition: e("delivery-order-write", "beta")
215
+ },
216
+ {
217
+ key: "custom-attributes",
218
+ label: "Custom Attributes",
219
+ category: "standard",
220
+ controls: "Inventory custom-attribute controls.",
221
+ definition: e("custom-attributes", "standard")
222
+ },
223
+ {
224
+ key: "legacy-receiving",
225
+ label: "Legacy Warehouse / Manual Receiving",
226
+ category: "standard",
227
+ deprecateSoon: !0,
228
+ controls: "Legacy receive-flow behavior.",
229
+ definition: e("legacy-receiving", "standard")
230
+ }
231
+ ];
232
+ function m(t) {
233
+ return l.find((r) => r.key === t);
234
+ }
235
+ function g(t) {
236
+ return l.find((r) => {
237
+ var a;
238
+ return (a = r.flagKeys) == null ? void 0 : a.includes(t);
239
+ });
240
+ }
241
+ export {
242
+ g as a,
243
+ d,
244
+ p as e,
245
+ m as g
246
+ };
@@ -1,4 +1,4 @@
1
- import { d as qn, j as Wn, y as zn } from "./app-Cb5s4jMu.js";
1
+ import { d as qn, j as Wn, y as zn } from "./app-yvK__CBL.js";
2
2
  import { defineStore as Vn } from "pinia";
3
3
  import { ref as mt, computed as Kn } from "vue";
4
4
  import { useCoreStore as Yn } from "@feedmepos/mf-common";
@@ -1,4 +1,4 @@
1
- import { d as s } from "./app-Cb5s4jMu.js";
1
+ import { d as s } from "./app-yvK__CBL.js";
2
2
  import { useCoreStore as c } from "@feedmepos/mf-common";
3
3
  const u = s((n, a) => {
4
4
  function o() {
@@ -1,4 +1,4 @@
1
- import { B as p } from "./app-Cb5s4jMu.js";
1
+ import { B as p } from "./app-yvK__CBL.js";
2
2
  function l(s) {
3
3
  return Math.floor(s.getTime() / 1e3) * 1e3;
4
4
  }
@@ -1,5 +1,5 @@
1
- import { components as o } from "@feedmepos/ui-library";
2
1
  import { h as r } from "vue";
2
+ import { a as o } from "./FeatureCapabilityBadge.vue_vue_type_script_setup_true_lang-C1C8aDA6.js";
3
3
  var e = /* @__PURE__ */ ((t) => (t.Add = "Add", t.Create = "Create", t.Print = "Print", t.PrintCustom = "PrintCustom", t.PrintPdf = "PrintPdf", t.Export = "Export", t.Update = "Update", t.Details = "Details", t.Edit = "Edit", t.Delete = "Delete", t.Publish = "Publish", t.Duplicate = "Duplicate", t.Email = "Email", t))(e || {});
4
4
  const i = {
5
5
  Add: {
@@ -36,7 +36,7 @@ const i = {
36
36
  translationKey: "inventory.common.print",
37
37
  color: "text-fm-color-typo-primary",
38
38
  value: "PrintCustom",
39
- badgeWidget: () => r(o.FmPill, { variant: "beta" })
39
+ badgeWidget: () => r(o, { tier: "standard", category: "beta" })
40
40
  },
41
41
  PrintPdf: {
42
42
  translationKey: "inventory.common.print",
@@ -1,5 +1,5 @@
1
- import { c as f, a as u, g as d, b as m } from "./number-y_W4pn_d.js";
2
- import { c as b, d as p } from "./date2-BPhD_1Of.js";
1
+ import { c as f, a as u, g as d, b as m } from "./number-gSLvxNqA.js";
2
+ import { c as b, d as p } from "./date2-2XjepIqc.js";
3
3
  function M() {
4
4
  return function(e) {
5
5
  return !!e || "Required";
@@ -1,4 +1,4 @@
1
- import { d as m, u as $ } from "./app-Cb5s4jMu.js";
1
+ import { d as m, u as $ } from "./app-yvK__CBL.js";
2
2
  import { useCoreStore as B } from "@feedmepos/mf-common";
3
3
  import { useSnackbar as y } from "@feedmepos/ui-library";
4
4
  const N = m((r, a) => {
@@ -1,7 +1,7 @@
1
- import { u as i } from "./stock-CxCRZo_D.js";
2
- import { a as s, Y as p } from "./app-Cb5s4jMu.js";
1
+ import { u as i } from "./stock-B59sfN28.js";
2
+ import { a as s, Y as p } from "./app-yvK__CBL.js";
3
3
  import { computed as k, ref as B } from "vue";
4
- import { c as d } from "./number-y_W4pn_d.js";
4
+ import { c as d } from "./number-gSLvxNqA.js";
5
5
  function m() {
6
6
  return {
7
7
  stockBalance: {
@@ -1,6 +1,11 @@
1
+ import { type InventoryPlanTier } from '@/feature-flags/plan-tier';
2
+ import { type InventoryLicensePlan, type WarehouseLicense } from '@/api/license';
1
3
  export { InventoryFeatureFlags } from '@feedmepos/inventory-core-2';
2
4
  export interface FeatureState {
3
5
  isLoaded: boolean;
6
+ planTier: InventoryPlanTier;
7
+ inventoryPlan: InventoryLicensePlan;
8
+ warehouseQuota: WarehouseLicense[];
4
9
  enableTotalCost: boolean;
5
10
  enableBackdatePo: boolean;
6
11
  /** @deprecated TODO: remove */
@@ -63,6 +68,13 @@ export declare const useFeatureStore: () => {
63
68
  /** @deprecated TODO: remove */
64
69
  readonly manualReceive: boolean;
65
70
  readonly isLoaded: boolean;
71
+ readonly planTier: "lite" | "standard" | "premium";
72
+ readonly inventoryPlan: InventoryLicensePlan;
73
+ readonly warehouseQuota: {
74
+ id: string;
75
+ expiredAt: string;
76
+ }[];
77
+ hasPlanTier(minimum: InventoryPlanTier): boolean;
66
78
  readonly enablePoTemplate: boolean;
67
79
  readonly enableClosingTemplate: boolean;
68
80
  readonly enableWastageTemplate: boolean;
@@ -1,5 +1,5 @@
1
- import { d as b, u, m as v, n as w, o as $ } from "./app-Cb5s4jMu.js";
2
- import { u as S } from "./feature-Ckn5ra3z.js";
1
+ import { d as b, u, m as v, n as w, o as $ } from "./app-yvK__CBL.js";
2
+ import { u as S } from "./feature-CkWaZ-5K.js";
3
3
  import { useCoreStore as c } from "@feedmepos/mf-common";
4
4
  import { defineStore as f } from "pinia";
5
5
  import { ref as l, computed as d } from "vue";