@feedmepos/mf-inventory-portal 1.3.13 → 1.3.14-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 (95) hide show
  1. package/dist/App-D1_jkD6L.js +309 -0
  2. package/dist/{ApprovalView-ClQU6bq0.js → ApprovalView-CfF2FqsE.js} +12 -12
  3. package/dist/{BindingsDialog--w8amPhB.js → BindingsDialog-H-juP-az.js} +13 -13
  4. package/dist/{BindingsPicker-CLZ2cy95.js → BindingsPicker-ClruHF7p.js} +2 -2
  5. package/dist/{BindingsTable-DMKnwFJt.js → BindingsTable-Bx9pbFOO.js} +3 -3
  6. package/dist/{ClosingDraftView-DOSvb2cx.js → ClosingDraftView-DN97Tao5.js} +15 -15
  7. package/dist/{ClosingHistoryView-Dbysx1Ca.js → ClosingHistoryView-DsRYUqa2.js} +5 -5
  8. package/dist/{ClosingTemplateView-kOWpFBhr.js → ClosingTemplateView-f9zfsxCu.js} +14 -14
  9. package/dist/DefaultView-COVVxOrF.js +31 -0
  10. package/dist/{DeliveryOrderPrintPreview-CTrf0b97.js → DeliveryOrderPrintPreview-BMK4kBCQ.js} +11 -11
  11. package/dist/{FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-HLHu23Ly.js → FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-Bqj_Ygmo.js} +8 -8
  12. package/dist/{FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-BTwfJTx3.js → FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-CK1ha_AY.js} +2 -2
  13. package/dist/{FmMultiselectDialog-D8AXgAuO.js → FmMultiselectDialog-BazT9oUX.js} +1 -1
  14. package/dist/{FmMultiselectDialog-ByvnmkuF.js → FmMultiselectDialog-_gUuhudi.js} +16 -16
  15. package/dist/{FmUnitInput.vue_vue_type_script_setup_true_lang-B8Jp-237.js → FmUnitInput.vue_vue_type_script_setup_true_lang-BBtAgdsA.js} +4 -4
  16. package/dist/{ImportView-B8jTVkI3.js → ImportView-jpkwuCXO.js} +6 -6
  17. package/dist/{IngredientBindedItem.vue_vue_type_script_setup_true_lang-D3bMh_iG.js → IngredientBindedItem.vue_vue_type_script_setup_true_lang-DLJnF4do.js} +1 -1
  18. package/dist/{IngredientGroupView-DEZHQArP.js → IngredientGroupView-x3t1hyNn.js} +5 -5
  19. package/dist/{IngredientsView-D_0aKc2P.js → IngredientsView-BzWTnlb4.js} +15 -15
  20. package/dist/{IntegrationExplorerView-RNQ89fRN.js → IntegrationExplorerView-Bca3owbx.js} +5 -5
  21. package/dist/{IntegrationView-HyqeX65i.js → IntegrationView-Dh1c4Qyo.js} +81 -81
  22. package/dist/{InventoryBindingForm-GXWU6jVC.js → InventoryBindingForm-B1sI1TGZ.js} +1 -1
  23. package/dist/{InventoryBindingForm.vue_vue_type_script_setup_true_lang-BSWEOGs7.js → InventoryBindingForm.vue_vue_type_script_setup_true_lang-7NeE7Xos.js} +5 -5
  24. package/dist/{InventoryBindingSummary-Dcsun-ae.js → InventoryBindingSummary-R8zHPc52.js} +1 -1
  25. package/dist/{NumberPrecisionInput.vue_vue_type_script_setup_true_lang-BPHzJFkv.js → NumberPrecisionInput.vue_vue_type_script_setup_true_lang-DMJVh7Nt.js} +1 -1
  26. package/dist/{PremiumBadge.vue_vue_type_script_setup_true_lang-eaX2F6rA.js → PremiumBadge.vue_vue_type_script_setup_true_lang-ChC9sEIk.js} +7 -7
  27. package/dist/{PublishView-BzaSX1CF.js → PublishView-Bqp8Ww4J.js} +15 -15
  28. package/dist/{PurchaseOrderPrintPreview-Dq9RVILX.js → PurchaseOrderPrintPreview-D7TCn8U-.js} +11 -11
  29. package/dist/{ReceiveRequestView-CUR65B8h.js → ReceiveRequestView-oNBVAMYu.js} +23 -23
  30. package/dist/{RecipeView-DA1exNa3.js → RecipeView-D8Mvgji9.js} +15 -15
  31. package/dist/{SettingsView-G9VVMREu.js → SettingsView-BJScLK9z.js} +4 -4
  32. package/dist/StockView-CRRdVCcD.js +2439 -0
  33. package/dist/{SubsidiaryTreeDialog.vue_vue_type_script_setup_true_lang-DflfaS_i.js → SubsidiaryTreeDialog.vue_vue_type_script_setup_true_lang-DUKv_LV6.js} +1 -1
  34. package/dist/{SupplierView-Br3PxWl6.js → SupplierView-DdBBIV8W.js} +12 -12
  35. package/dist/{SurchargeView-DnC875ic.js → SurchargeView-DisBUPIs.js} +16 -16
  36. package/dist/{SystemTrailDialog.vue_vue_type_script_setup_true_lang-DxElZDE3.js → SystemTrailDialog.vue_vue_type_script_setup_true_lang-CZ3Q3BAf.js} +2 -2
  37. package/dist/{TemplatePublishDialog.vue_vue_type_script_setup_true_lang-DncbuAH1.js → TemplatePublishDialog.vue_vue_type_script_setup_true_lang-CC7F5HVc.js} +1 -1
  38. package/dist/{TransferDetails.vue_vue_type_script_setup_true_lang-R0DRQHII.js → TransferDetails.vue_vue_type_script_setup_true_lang-BLlg1Vka.js} +821 -837
  39. package/dist/{TransferTemplateView-CN-1iASP.js → TransferTemplateView-7ICJMF9z.js} +17 -17
  40. package/dist/{UnitCostHistoryView-HMfTl2Rl.js → UnitCostHistoryView-BMRDBQ58.js} +246 -243
  41. package/dist/{UnitDisplayControl.vue_vue_type_script_setup_true_lang-BQSRm_uN.js → UnitDisplayControl.vue_vue_type_script_setup_true_lang-mNXHzLN3.js} +4 -4
  42. package/dist/{UnitView-2J7SxbnX.js → UnitView-uUUYOjYn.js} +7 -7
  43. package/dist/{WarehouseView-EIXt8wd0.js → WarehouseView-BfMf_iuj.js} +25 -25
  44. package/dist/{WastageTemplateView-B8yQevPX.js → WastageTemplateView-BQYjJGZ-.js} +14 -14
  45. package/dist/{app-DZ_O5S5y.js → app-B_zMegJc.js} +23521 -22309
  46. package/dist/app.d.ts +22 -6
  47. package/dist/app.js +2 -2
  48. package/dist/{closing-template-C3F4uA55.js → closing-template-9vhx5Ji1.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-DoKx3vEH.js → date2-BMCS_Dsc.js} +1 -1
  54. package/dist/{dayjs.min-BzKmIVU5.js → dayjs.min-Dl26OaXo.js} +16 -16
  55. package/dist/{decimal-CHryhQrv.js → decimal-e6OK2jkR.js} +2 -2
  56. package/dist/{defineDeepModel-Dt72PPYN.js → defineDeepModel-BvLlwxnd.js} +1 -1
  57. package/dist/{duplicate-template-k0PYkiot.js → duplicate-template-Cnhu8Rxw.js} +1 -1
  58. package/dist/{empty-placeholder-wf6-BWE8.js → empty-placeholder-B0QU467o.js} +1 -1
  59. package/dist/{export-D0nU9NCc.js → export-CGvyGmeo.js} +1 -1
  60. package/dist/{feature-DTXvUM9q.js → feature-Do41WWzx.js} +46 -46
  61. package/dist/{format-time-from-id-CjML4YH3.js → format-time-from-id-CqX_KaUG.js} +1 -1
  62. package/dist/{format-unit-display-BASnDwRJ.js → format-unit-display-D8qWmRXP.js} +11 -11
  63. package/dist/{import-export.helper-BGRAKGXv.js → import-export.helper-85V8Ib5e.js} +6 -6
  64. package/dist/{index-Db7jD-CU.js → index-C-CwnjUn.js} +3 -3
  65. package/dist/{index-D5qTaOFp.js → index-Cg3aLEhT.js} +1 -1
  66. package/dist/{index-FhahM2dg.js → index-CtUF9Nsv.js} +1 -1
  67. package/dist/{inventory-core-dart.default-Cvvr8rpN.js → inventory-core-dart.default-B64FzAla.js} +10 -10
  68. package/dist/{lodash-B4Uj749H.js → lodash-U9ycVPlv.js} +1 -1
  69. package/dist/{lz-string-Ckbaw1Bu.js → lz-string-0CgVsQoC.js} +21 -21
  70. package/dist/{netsuite-B4O7LRpC.js → netsuite-Du7-sXJt.js} +37 -37
  71. package/dist/{number-9PlMlR2G.js → number-iJAzDfmj.js} +11 -11
  72. package/dist/{predefined-templates-BqAy88Rp.js → predefined-templates-LlSrXOXm.js} +1 -1
  73. package/dist/{purchase-order-template-KkhC0FCL.js → purchase-order-template-DFuXb0rr.js} +1 -1
  74. package/dist/{recalculationUtils-Rj0SZQO3.js → recalculationUtils-DWPnMW1G.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-BvLBkdfK.js → rules-DefSKiUN.js} +2 -2
  78. package/dist/{stock-CoG3l91v.js → stock-BfF6peMd.js} +3 -3
  79. package/dist/{stock-yUbmIey0.js → stock-Cx1BwdWs.js} +28 -27
  80. package/dist/{supplier-Qlox4B8s.js → supplier-CU3iqdGr.js} +2 -2
  81. package/dist/{surcharge-CsAxFX-L.js → surcharge-D77J5opH.js} +8 -8
  82. package/dist/tsconfig.app.tsbuildinfo +1 -1
  83. package/dist/{use-ingredient-select-dialog-BOtDFKQO.js → use-ingredient-select-dialog-B-jxV-79.js} +2 -2
  84. package/dist/{use-inventory-binding-dialog-Dz5NbeEn.js → use-inventory-binding-dialog-BdTd5qPl.js} +2 -2
  85. package/dist/{use-template-enabled-locations-MNNKqChl.js → use-template-enabled-locations-vFvaCjlH.js} +2 -2
  86. package/dist/useHrmPermission-CekUhyck.js +16 -0
  87. package/dist/useNavigationMenu-BiLWMIip.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-BqX2td3b.js → vue-i18n-C3_OsgSl.js} +371 -371
  91. package/dist/{xlsx-CtRIIkxr.js → xlsx-o7n1whCa.js} +398 -398
  92. package/dist/{xlsx.util-Bd4_86rn.js → xlsx.util-D6nPboPW.js} +1 -1
  93. package/package.json +3 -2
  94. package/dist/App-Dm-YoD_v.js +0 -411
  95. package/dist/StockView-3J7Gkskb.js +0 -2406
@@ -1,6 +1,6 @@
1
1
  import { defineStore as y } from "pinia";
2
- import { a as S } from "./app-DZ_O5S5y.js";
3
- import { a as b } from "./FmMultiselectDialog-ByvnmkuF.js";
2
+ import { a as S } from "./app-B_zMegJc.js";
3
+ import { a as b } from "./FmMultiselectDialog-_gUuhudi.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-ByvnmkuF.js";
2
- import { a as P } from "./app-DZ_O5S5y.js";
1
+ import { a as g } from "./FmMultiselectDialog-_gUuhudi.js";
2
+ import { a as P } from "./app-B_zMegJc.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-ByvnmkuF.js";
2
- import { u as S } from "./app-DZ_O5S5y.js";
1
+ import { a as A } from "./FmMultiselectDialog-_gUuhudi.js";
2
+ import { u as S } from "./app-B_zMegJc.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 { a1 as n } from "./app-B_zMegJc.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 { al as P, R as e, b, am as A, a1 as O } from "./app-B_zMegJc.js";
3
+ import { useCoreStore as C, useI18n as L } from "@feedmepos/mf-common";
4
+ import { u as _ } from "./feature-Do41WWzx.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>>;