@feedmepos/mf-inventory-portal 1.3.14 → 1.3.16-dev.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (95) hide show
  1. package/dist/App-BPrgeKO5.js +309 -0
  2. package/dist/{ApprovalView-BVszC4Cw.js → ApprovalView-BP21UP2s.js} +17 -17
  3. package/dist/{BindingsDialog-B3L_3xdo.js → BindingsDialog-ZMUmkLSC.js} +13 -13
  4. package/dist/{BindingsPicker-A4togB2v.js → BindingsPicker-f640U3jk.js} +2 -2
  5. package/dist/{BindingsTable-DacoMdY6.js → BindingsTable-BoTU8_ii.js} +3 -3
  6. package/dist/{ClosingDraftView-C9tvMgLl.js → ClosingDraftView-DeFODFRH.js} +15 -15
  7. package/dist/{ClosingHistoryView-CqqzqSqU.js → ClosingHistoryView-LmrCMCuz.js} +5 -5
  8. package/dist/{ClosingTemplateView-CLi0XE8S.js → ClosingTemplateView-5ioCcZTW.js} +14 -14
  9. package/dist/DefaultView-hYmDl5l-.js +31 -0
  10. package/dist/{DeliveryOrderPrintPreview-DEHEfd80.js → DeliveryOrderPrintPreview-CDYDvv7K.js} +11 -11
  11. package/dist/{FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-BDZVaj3l.js → FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-CC5AemGX.js} +8 -8
  12. package/dist/{FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-xxS4P6uo.js → FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-wuP2HuXh.js} +2 -2
  13. package/dist/{FmMultiselectDialog-FGR8t9rz.js → FmMultiselectDialog-DEwvnps8.js} +16 -16
  14. package/dist/{FmMultiselectDialog-CR2peMEL.js → FmMultiselectDialog-DQk_uhPT.js} +1 -1
  15. package/dist/{FmUnitInput.vue_vue_type_script_setup_true_lang-DgXOsVLe.js → FmUnitInput.vue_vue_type_script_setup_true_lang-biGUrxMi.js} +4 -4
  16. package/dist/{ImportView-CEI0QqGz.js → ImportView-9vzXeSDH.js} +6 -6
  17. package/dist/{IngredientBindedItem.vue_vue_type_script_setup_true_lang-cRgKjHY0.js → IngredientBindedItem.vue_vue_type_script_setup_true_lang-CH_nyzm6.js} +1 -1
  18. package/dist/{IngredientGroupView-DEELNMpl.js → IngredientGroupView-Ca68TCys.js} +5 -5
  19. package/dist/{IngredientsView-D3OcjZdT.js → IngredientsView-D8LmfmXW.js} +15 -15
  20. package/dist/{IntegrationExplorerView-ByPpT3hC.js → IntegrationExplorerView-j5pZ09cq.js} +5 -5
  21. package/dist/{IntegrationView-BSqlJBp-.js → IntegrationView-CXFeCPyP.js} +81 -81
  22. package/dist/{InventoryBindingForm-SgmyJvCs.js → InventoryBindingForm-jjWc7yWv.js} +1 -1
  23. package/dist/{InventoryBindingForm.vue_vue_type_script_setup_true_lang-GLipe2bO.js → InventoryBindingForm.vue_vue_type_script_setup_true_lang-q7PsPAqr.js} +5 -5
  24. package/dist/{InventoryBindingSummary-D6deGR6B.js → InventoryBindingSummary-D_n2JHgj.js} +1 -1
  25. package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-DGDL-t7m.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-CSOT60hU.js} +1 -1
  26. package/dist/{PremiumBadge.vue_vue_type_script_setup_true_lang-ff1rPUJW.js → PremiumBadge.vue_vue_type_script_setup_true_lang-B5xzpwF7.js} +7 -7
  27. package/dist/{PublishView-7TAa2QQB.js → PublishView-bEPdlxEE.js} +15 -15
  28. package/dist/{PurchaseOrderPrintPreview-DhcnInSW.js → PurchaseOrderPrintPreview-DLDFWJht.js} +11 -11
  29. package/dist/{ReceiveRequestView-Z3JYH3gf.js → ReceiveRequestView-CG24mmXP.js} +24 -24
  30. package/dist/{RecipeView--ALwYD-O.js → RecipeView-DMn3M9SP.js} +15 -15
  31. package/dist/{SettingsView-F_BWUxoq.js → SettingsView-Vf1neo5W.js} +4 -4
  32. package/dist/StockView-DkHv_yE_.js +2439 -0
  33. package/dist/{SubsidiaryTreeDialog.vue_vue_type_script_setup_true_lang-CxNgi5uv.js → SubsidiaryTreeDialog.vue_vue_type_script_setup_true_lang-DdsxuASV.js} +1 -1
  34. package/dist/{SupplierView-DklOXwHD.js → SupplierView-D94us1xa.js} +12 -12
  35. package/dist/{SurchargeView-DcImorUr.js → SurchargeView-BDqzJFZS.js} +16 -16
  36. package/dist/{SystemTrailDialog.vue_vue_type_script_setup_true_lang-xdLxGAOM.js → SystemTrailDialog.vue_vue_type_script_setup_true_lang-RxH4R9vD.js} +2 -2
  37. package/dist/{TemplatePublishDialog.vue_vue_type_script_setup_true_lang-Bu4XKhII.js → TemplatePublishDialog.vue_vue_type_script_setup_true_lang-B_9ugyP_.js} +1 -1
  38. package/dist/{TransferDetails.vue_vue_type_script_setup_true_lang-DMrRfwKD.js → TransferDetails.vue_vue_type_script_setup_true_lang-BWldDVB8.js} +812 -828
  39. package/dist/{TransferTemplateView-DTdlSI2b.js → TransferTemplateView-CFJmOt0_.js} +17 -17
  40. package/dist/{UnitCostHistoryView-CQ_DJE-t.js → UnitCostHistoryView-BjvxX6t4.js} +246 -243
  41. package/dist/{UnitDisplayControl.vue_vue_type_script_setup_true_lang-QuejzcCL.js → UnitDisplayControl.vue_vue_type_script_setup_true_lang-BBeCcEqZ.js} +4 -4
  42. package/dist/{UnitView-DzcCdCGw.js → UnitView-CL-RHEwm.js} +7 -7
  43. package/dist/{WarehouseView-BYj9DD1N.js → WarehouseView-CV2kfNlj.js} +25 -25
  44. package/dist/{WastageTemplateView--w6an2Ar.js → WastageTemplateView-vYiPpr4f.js} +14 -14
  45. package/dist/{app-CPlgHGkC.js → app-Xm6qpWfd.js} +23519 -22306
  46. package/dist/app.d.ts +22 -6
  47. package/dist/app.js +5 -5
  48. package/dist/{closing-template-B9JOB9ah.js → closing-template-B47iC5cb.js} +1 -1
  49. package/dist/components/HrmPermissionGuard.vue.d.ts +54 -0
  50. package/dist/composable/useHrmPermission.d.ts +17 -0
  51. package/dist/composable/useInventoryAccess.d.ts +11 -0
  52. package/dist/composable/useNavigationMenu.d.ts +14 -0
  53. package/dist/{date2-Ci9tlLMJ.js → date2-Ctgy0LHT.js} +1 -1
  54. package/dist/{dayjs.min-DTx2lmq6.js → dayjs.min-Di6FEjRq.js} +32 -32
  55. package/dist/{decimal-iKhH_VJO.js → decimal-DeqyFu05.js} +2 -2
  56. package/dist/{defineDeepModel-C25T8oyP.js → defineDeepModel-QsJ5Tk5R.js} +1 -1
  57. package/dist/{duplicate-template-BptIBRQ3.js → duplicate-template-DrS-BtlB.js} +1 -1
  58. package/dist/{empty-placeholder-wf6-BWE8.js → empty-placeholder-B0QU467o.js} +1 -1
  59. package/dist/{export-CKuVd5pP.js → export-nGe-IrFm.js} +1 -1
  60. package/dist/{feature-CXMSo4z7.js → feature-D5-0IKeC.js} +22 -22
  61. package/dist/{format-time-from-id-Bk60g6lh.js → format-time-from-id-BS0-ljoa.js} +1 -1
  62. package/dist/{format-unit-display-C4nf8hG8.js → format-unit-display-D3BJr6xW.js} +11 -11
  63. package/dist/{import-export.helper-BDzsQcYD.js → import-export.helper-yU7r8SD1.js} +6 -6
  64. package/dist/{index-DiKOwY5C.js → index-3tmEl1Vx.js} +1 -1
  65. package/dist/{index-DTszDSPO.js → index-DwOhoIIj.js} +1 -1
  66. package/dist/{index-CUVlQagt.js → index-YO20Idcz.js} +3 -3
  67. package/dist/{inventory-core-dart.default-Cn3sonot.js → inventory-core-dart.default-qV8YW8oe.js} +10 -10
  68. package/dist/{lodash-DGOK6ZkA.js → lodash-B1y84Me_.js} +1 -1
  69. package/dist/{lz-string-QrWbdmw6.js → lz-string-BSdU_fLB.js} +21 -21
  70. package/dist/{netsuite-DglgyKcZ.js → netsuite-DuIW6Lx3.js} +37 -37
  71. package/dist/{number-Ut7u2ZEE.js → number-DKpiml_w.js} +11 -11
  72. package/dist/{predefined-templates-DZtFebPU.js → predefined-templates-DfBT39uu.js} +1 -1
  73. package/dist/{purchase-order-template-DhNVhXmD.js → purchase-order-template-bUCzYwIP.js} +1 -1
  74. package/dist/{recalculationUtils-CqJRd9B2.js → recalculationUtils-B5vtjJ7Z.js} +1 -1
  75. package/dist/router/name.d.ts +1 -0
  76. package/dist/router/route-permission.d.ts +10 -0
  77. package/dist/{rules-BIm67nl_.js → rules-CX1NVdUi.js} +2 -2
  78. package/dist/{stock-CzdMn9n8.js → stock-mwCadSfs.js} +3 -3
  79. package/dist/{stock-Dc4_U69J.js → stock-sMY18eio.js} +28 -27
  80. package/dist/{supplier-De5G6CeF.js → supplier-CV7wbbgo.js} +2 -2
  81. package/dist/{surcharge-CN5FtDZq.js → surcharge-DfkPrRWG.js} +8 -8
  82. package/dist/tsconfig.app.tsbuildinfo +1 -1
  83. package/dist/{use-ingredient-select-dialog-Wy4CtYcZ.js → use-ingredient-select-dialog-DMxSzgr4.js} +2 -2
  84. package/dist/{use-inventory-binding-dialog-C1LCH0jV.js → use-inventory-binding-dialog-BfdHj5zx.js} +2 -2
  85. package/dist/{use-template-enabled-locations-BfZFcXZ_.js → use-template-enabled-locations-cQuWrkpb.js} +2 -2
  86. package/dist/useHrmPermission-Dr1JvOPF.js +16 -0
  87. package/dist/useNavigationMenu-w9DyVemK.js +162 -0
  88. package/dist/views/DefaultView.vue.d.ts +2 -0
  89. package/dist/views/receive-request/composables/use-order-draft-permission.d.ts +2 -5
  90. package/dist/{vue-i18n-CvVV4Xof.js → vue-i18n-DWiVQ_sJ.js} +494 -494
  91. package/dist/{xlsx-lawW6Hwh.js → xlsx-Bvjg71OX.js} +1 -1
  92. package/dist/{xlsx.util-DSCqPt8v.js → xlsx.util-CZKwClH8.js} +1 -1
  93. package/package.json +4 -3
  94. package/dist/App-BQZQFNKG.js +0 -411
  95. package/dist/StockView-BLrquJf2.js +0 -2406
@@ -1,6 +1,6 @@
1
1
  import { defineStore as y } from "pinia";
2
- import { a as S } from "./app-CPlgHGkC.js";
3
- import { a as b } from "./FmMultiselectDialog-FGR8t9rz.js";
2
+ import { a as S } from "./app-Xm6qpWfd.js";
3
+ import { a as b } from "./FmMultiselectDialog-DEwvnps8.js";
4
4
  import { useDialog as A } from "@feedmepos/ui-library";
5
5
  import { useI18n as I } from "@feedmepos/mf-common";
6
6
  const B = y(
@@ -1,5 +1,5 @@
1
- import { a as g } from "./FmMultiselectDialog-FGR8t9rz.js";
2
- import { a as P } from "./app-CPlgHGkC.js";
1
+ import { a as g } from "./FmMultiselectDialog-DEwvnps8.js";
2
+ import { a as P } from "./app-Xm6qpWfd.js";
3
3
  import { useDialog as E } from "@feedmepos/ui-library";
4
4
  function A() {
5
5
  const u = P(), _ = E();
@@ -1,5 +1,5 @@
1
- import { a as A } from "./FmMultiselectDialog-FGR8t9rz.js";
2
- import { u as S } from "./app-CPlgHGkC.js";
1
+ import { a as A } from "./FmMultiselectDialog-DEwvnps8.js";
2
+ import { u as S } from "./app-Xm6qpWfd.js";
3
3
  import { useI18n as v, useCoreStore as d, useCustomAttributes as w } from "@feedmepos/mf-common";
4
4
  import { useDialog as _, components as m } from "@feedmepos/ui-library";
5
5
  import { computed as r, h as c } from "vue";
@@ -0,0 +1,16 @@
1
+ import { computed as p, toValue as o } from "vue";
2
+ import { a2 as n } from "./app-Xm6qpWfd.js";
3
+ import { useCoreStore as c } from "@feedmepos/mf-common";
4
+ function g(t, i = "all") {
5
+ const m = c();
6
+ return { hasPermission: p(() => {
7
+ var e;
8
+ const r = o(t), u = o(i);
9
+ if (r.length === 0) return !0;
10
+ const s = ((e = m.sessionUser.value) == null ? void 0 : e.permissions) ?? [];
11
+ return u === "any" ? r.some((a) => n([a], s).granted) : n(r, s).granted;
12
+ }) };
13
+ }
14
+ export {
15
+ g as u
16
+ };
@@ -0,0 +1,162 @@
1
+ import { computed as T } from "vue";
2
+ import { am as P, R as e, b, an as A, a2 as O } from "./app-Xm6qpWfd.js";
3
+ import { useCoreStore as C, useI18n as L } from "@feedmepos/mf-common";
4
+ import { u as _ } from "./feature-D5-0IKeC.js";
5
+ const G = P.reduce(
6
+ (o, i) => {
7
+ var s;
8
+ return i.name && (o[i.name] = (s = i.meta) == null ? void 0 : s.validationManifest), o;
9
+ },
10
+ {}
11
+ );
12
+ function p() {
13
+ const o = C(), i = _(), { t: s } = L(), { isDev: c } = b(), l = (r) => A(r, s), N = T(
14
+ () => {
15
+ var r;
16
+ return ((r = o.sessionUser.value) == null ? void 0 : r.permissions) ?? [];
17
+ }
18
+ ), h = (r = []) => r.length === 0 ? !0 : O(r, N.value).granted, a = (r) => {
19
+ const n = G[r];
20
+ return h(n == null ? void 0 : n.requiredCaslPermissions);
21
+ }, R = (r) => r.filter((n) => !n.hide).map((n) => n.children ? { ...n, children: R(n.children) } : n).filter((n) => !n.children || n.children.length > 0), I = (r) => r.map((n) => {
22
+ const { hide: E, children: t, ...u } = n, S = { ...u };
23
+ return t && (S.children = I(t)), S;
24
+ }), d = T(() => {
25
+ var E;
26
+ const r = [
27
+ {
28
+ label: "Non-Production Environment",
29
+ icon: "logo_dev",
30
+ disabled: !0,
31
+ hide: !c
32
+ },
33
+ {
34
+ label: l(e.STOCK),
35
+ children: [
36
+ {
37
+ label: s("inventory.stock.stock_balance.title"),
38
+ value: e.STOCK,
39
+ hide: !a(e.STOCK)
40
+ },
41
+ {
42
+ label: l(e.UNIT_COST_HISTORY),
43
+ value: e.UNIT_COST_HISTORY,
44
+ hide: !a(e.UNIT_COST_HISTORY) || !i.enableTotalCost
45
+ },
46
+ {
47
+ label: l(e.WASTAGE_TEMPLATE),
48
+ value: e.WASTAGE_TEMPLATE,
49
+ hide: !a(e.WASTAGE_TEMPLATE) || !i.enableWastageTemplate
50
+ }
51
+ ]
52
+ },
53
+ {
54
+ label: s("inventory.closing.title"),
55
+ children: [
56
+ {
57
+ label: l(e.CLOSING_HISTORY),
58
+ value: e.CLOSING_HISTORY,
59
+ hide: !a(e.CLOSING_HISTORY)
60
+ },
61
+ {
62
+ label: l(e.CLOSING_TEMPLATE),
63
+ value: e.CLOSING_TEMPLATE,
64
+ hide: !a(e.CLOSING_TEMPLATE) || !i.enableClosingTemplate
65
+ },
66
+ {
67
+ label: l(e.CLOSING_DRAFT),
68
+ value: e.CLOSING_DRAFT,
69
+ hide: !a(e.CLOSING_DRAFT) || !i.enableClosingTemplate
70
+ }
71
+ ]
72
+ },
73
+ {
74
+ label: l(e.INGREDIENTS),
75
+ value: e.INGREDIENTS,
76
+ hide: !a(e.INGREDIENTS)
77
+ },
78
+ {
79
+ label: l(e.INGREDIENT_GROUP),
80
+ value: e.INGREDIENT_GROUP,
81
+ hide: !a(e.INGREDIENT_GROUP) || !i.enableIngredientGroup
82
+ },
83
+ {
84
+ label: l(e.RECIPE),
85
+ value: e.RECIPE,
86
+ hide: !a(e.RECIPE)
87
+ },
88
+ {
89
+ label: l(e.UNIT),
90
+ value: e.UNIT,
91
+ hide: !a(e.UNIT)
92
+ },
93
+ {
94
+ label: s("inventory.transfer.title"),
95
+ children: [
96
+ {
97
+ label: l(e.RECEIVE_REQUEST),
98
+ value: e.RECEIVE_REQUEST,
99
+ hide: !a(e.RECEIVE_REQUEST)
100
+ },
101
+ {
102
+ label: l(e.APPROVAL),
103
+ value: e.APPROVAL,
104
+ hide: !a(e.APPROVAL)
105
+ },
106
+ {
107
+ label: l(e.SURCHARGE),
108
+ value: e.SURCHARGE,
109
+ hide: !a(e.SURCHARGE) || !i.enableSurcharge
110
+ },
111
+ {
112
+ label: l(e.TRANSFER_TEMPLATE),
113
+ value: e.TRANSFER_TEMPLATE,
114
+ hide: !a(e.TRANSFER_TEMPLATE) || !i.enablePoTemplate
115
+ }
116
+ ]
117
+ },
118
+ {
119
+ label: l(e.SUPPLIER),
120
+ value: e.SUPPLIER,
121
+ hide: !a(e.SUPPLIER)
122
+ },
123
+ {
124
+ label: l(e.WAREHOUSE),
125
+ value: e.WAREHOUSE,
126
+ hide: !a(e.WAREHOUSE)
127
+ },
128
+ {
129
+ label: l(e.PUBLISH),
130
+ value: e.PUBLISH,
131
+ hide: !a(e.PUBLISH)
132
+ },
133
+ {
134
+ label: l(e.IMPORT),
135
+ value: e.IMPORT,
136
+ hide: !a(e.IMPORT) || !i.enableBulkImport
137
+ },
138
+ {
139
+ label: l(e.INTEGRATION),
140
+ value: e.INTEGRATION,
141
+ hide: !a(e.INTEGRATION)
142
+ }
143
+ ], n = I(R(r));
144
+ return ((E = o.currentBusiness.value) == null ? void 0 : E.menuVersion) === "v3" ? n.filter(
145
+ (t) => t.value !== e.INGREDIENTS && t.value !== e.RECIPE && t.value !== e.UNIT && t.value !== e.PUBLISH
146
+ ) : n;
147
+ }), v = T(() => {
148
+ function r(E) {
149
+ for (const t of E)
150
+ if (t.children && t.children.length > 0) {
151
+ const u = r(t.children);
152
+ if (u) return u;
153
+ } else if (t.value)
154
+ return t.value;
155
+ }
156
+ return r(d.value) ?? null;
157
+ });
158
+ return { menuItems: d, firstAccessibleRouteName: v };
159
+ }
160
+ export {
161
+ p as u
162
+ };
@@ -0,0 +1,2 @@
1
+ declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
2
+ export default _default;
@@ -1,11 +1,8 @@
1
1
  /**
2
2
  * Composable to check if the current user has order draft permissions
3
3
  *
4
- * Leverages the built-in validatePermission() function from @feedmepos/mf-common
5
- * which properly handles CASL hierarchical permission logic including:
6
- * - FeedMe admins (role.isAdmin)
7
- * - Business owners (manage on "all" subjects)
8
- * - Regular users (explicit orderDraft permissions)
4
+ * Uses useHrmPermission composable which internally calls checkAccess
5
+ * from @feedmepos/hrm-permission/utils for CASL permission validation.
9
6
  */
10
7
  export declare function useOrderDraftPermission(): {
11
8
  hasOrderDraftPermission: Readonly<import("vue").Ref<boolean, boolean>>;