@feedmepos/mf-inventory-portal 1.3.14 → 1.3.16-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 (102) hide show
  1. package/dist/App-BckRpjrE.js +309 -0
  2. package/dist/{ApprovalView-BVszC4Cw.js → ApprovalView-C5rVI_O7.js} +17 -17
  3. package/dist/{BindingsDialog-B3L_3xdo.js → BindingsDialog-Y530TN7D.js} +13 -13
  4. package/dist/{BindingsPicker-A4togB2v.js → BindingsPicker-BbQ9Ygep.js} +2 -2
  5. package/dist/{BindingsTable-DacoMdY6.js → BindingsTable-ClHmMFLP.js} +3 -3
  6. package/dist/{ClosingDraftView-C9tvMgLl.js → ClosingDraftView-Dn16j97_.js} +15 -15
  7. package/dist/{ClosingHistoryView-CqqzqSqU.js → ClosingHistoryView-BK7KJbbf.js} +5 -5
  8. package/dist/{ClosingTemplateView-CLi0XE8S.js → ClosingTemplateView-D2petgop.js} +14 -14
  9. package/dist/DefaultView-CdCpGT5n.js +31 -0
  10. package/dist/{DeliveryOrderPrintPreview-DEHEfd80.js → DeliveryOrderPrintPreview-C_S4SG8h.js} +11 -11
  11. package/dist/FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-GT5YUrJz.js +76 -0
  12. package/dist/{FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-xxS4P6uo.js → FmInventoryTableToolbar.vue_vue_type_script_setup_true_lang-q8fQfbEV.js} +2 -2
  13. package/dist/{FmMultiselectDialog-CR2peMEL.js → FmMultiselectDialog-6JADZ5xC.js} +1 -1
  14. package/dist/{FmMultiselectDialog-FGR8t9rz.js → FmMultiselectDialog-BEkAAZZp.js} +16 -16
  15. package/dist/{FmUnitInput.vue_vue_type_script_setup_true_lang-DgXOsVLe.js → FmUnitInput.vue_vue_type_script_setup_true_lang-kaW8FwP5.js} +6 -5
  16. package/dist/{ImportView-CEI0QqGz.js → ImportView-D8i5_GO9.js} +6 -6
  17. package/dist/{IngredientBindedItem.vue_vue_type_script_setup_true_lang-cRgKjHY0.js → IngredientBindedItem.vue_vue_type_script_setup_true_lang-baV8qK0P.js} +1 -1
  18. package/dist/{IngredientGroupView-DEELNMpl.js → IngredientGroupView-BiqFuJx0.js} +5 -5
  19. package/dist/{IngredientsView-D3OcjZdT.js → IngredientsView-CQHobUvF.js} +15 -15
  20. package/dist/{IntegrationExplorerView-ByPpT3hC.js → IntegrationExplorerView-BFbGH5-S.js} +5 -5
  21. package/dist/{IntegrationView-BSqlJBp-.js → IntegrationView-UF8UwPNk.js} +81 -81
  22. package/dist/{InventoryBindingForm-SgmyJvCs.js → InventoryBindingForm-DB4LwgzC.js} +1 -1
  23. package/dist/{InventoryBindingForm.vue_vue_type_script_setup_true_lang-GLipe2bO.js → InventoryBindingForm.vue_vue_type_script_setup_true_lang-Dc0sxYMV.js} +5 -5
  24. package/dist/{InventoryBindingSummary-D6deGR6B.js → InventoryBindingSummary-Bwn4HZy5.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-BvBOo5wi.js} +1 -1
  26. package/dist/{PremiumBadge.vue_vue_type_script_setup_true_lang-ff1rPUJW.js → PremiumBadge.vue_vue_type_script_setup_true_lang-D2wiVygJ.js} +7 -7
  27. package/dist/{PublishView-7TAa2QQB.js → PublishView-BFac9M5C.js} +15 -15
  28. package/dist/{PurchaseOrderPrintPreview-DhcnInSW.js → PurchaseOrderPrintPreview-tree07u5.js} +11 -11
  29. package/dist/{ReceiveRequestView-Z3JYH3gf.js → ReceiveRequestView-DLERk28I.js} +30 -29
  30. package/dist/RecipeView-DDgN0DkI.js +2898 -0
  31. package/dist/{SettingsView-F_BWUxoq.js → SettingsView-BWw7AhqT.js} +4 -4
  32. package/dist/StockView-D0wW54eN.js +2439 -0
  33. package/dist/{SubsidiaryTreeDialog.vue_vue_type_script_setup_true_lang-CxNgi5uv.js → SubsidiaryTreeDialog.vue_vue_type_script_setup_true_lang-Btor1W6X.js} +1 -1
  34. package/dist/{SupplierView-DklOXwHD.js → SupplierView-Bd_PLuYt.js} +12 -12
  35. package/dist/{SurchargeView-DcImorUr.js → SurchargeView-F1B_fcv-.js} +16 -16
  36. package/dist/{SystemTrailDialog.vue_vue_type_script_setup_true_lang-xdLxGAOM.js → SystemTrailDialog.vue_vue_type_script_setup_true_lang-95m2qnoM.js} +2 -2
  37. package/dist/{TemplatePublishDialog.vue_vue_type_script_setup_true_lang-Bu4XKhII.js → TemplatePublishDialog.vue_vue_type_script_setup_true_lang-DHKDRFgr.js} +1 -1
  38. package/dist/{TransferDetails.vue_vue_type_script_setup_true_lang-DMrRfwKD.js → TransferDetails.vue_vue_type_script_setup_true_lang-BC0PNCtM.js} +812 -828
  39. package/dist/{TransferTemplateView-DTdlSI2b.js → TransferTemplateView-DM8qOCpO.js} +20 -19
  40. package/dist/{UnitCostHistoryView-CQ_DJE-t.js → UnitCostHistoryView-Bzocbij3.js} +246 -243
  41. package/dist/{UnitDisplayControl.vue_vue_type_script_setup_true_lang-QuejzcCL.js → UnitDisplayControl.vue_vue_type_script_setup_true_lang-BDzz91rl.js} +4 -4
  42. package/dist/{UnitView-DzcCdCGw.js → UnitView-EndrhMnI.js} +7 -7
  43. package/dist/{WarehouseView-BYj9DD1N.js → WarehouseView-BJZELae1.js} +25 -25
  44. package/dist/{WastageTemplateView--w6an2Ar.js → WastageTemplateView-s6ZiQR8E.js} +14 -14
  45. package/dist/{app-CPlgHGkC.js → app-CaGW5ogt.js} +23768 -22367
  46. package/dist/app.d.ts +148 -6
  47. package/dist/app.js +5 -5
  48. package/dist/{closing-template-B9JOB9ah.js → closing-template-CUgXd6Na.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-fQDP1Rtk.js} +1 -1
  54. package/dist/{dayjs.min-DTx2lmq6.js → dayjs.min-UwaUKDHA.js} +32 -32
  55. package/dist/{decimal-iKhH_VJO.js → decimal-CKysiOcn.js} +2 -2
  56. package/dist/{defineDeepModel-C25T8oyP.js → defineDeepModel-CwM7TJuT.js} +1 -1
  57. package/dist/{duplicate-template-BptIBRQ3.js → duplicate-template-Bb5b_40t.js} +1 -1
  58. package/dist/{empty-placeholder-wf6-BWE8.js → empty-placeholder-B0QU467o.js} +1 -1
  59. package/dist/{export-CKuVd5pP.js → export-nbyx5EYR.js} +1 -1
  60. package/dist/{feature-CXMSo4z7.js → feature-Dqme8-Xr.js} +22 -22
  61. package/dist/{format-time-from-id-Bk60g6lh.js → format-time-from-id-DsRN_JB-.js} +1 -1
  62. package/dist/{format-unit-display-C4nf8hG8.js → format-unit-display-Df1v6CMC.js} +11 -11
  63. package/dist/{import-export.helper-BDzsQcYD.js → import-export.helper-QInnTLhY.js} +6 -6
  64. package/dist/{index-CUVlQagt.js → index-BCwp1fKe.js} +3 -3
  65. package/dist/{index-DiKOwY5C.js → index-CbwjQK_M.js} +1 -1
  66. package/dist/{index-DTszDSPO.js → index-Cij7rBSm.js} +1 -1
  67. package/dist/{inventory-core-dart.default-Cn3sonot.js → inventory-core-dart.default-Bgq3Sd7C.js} +10 -10
  68. package/dist/{lodash-DGOK6ZkA.js → lodash-B15PREHg.js} +1 -1
  69. package/dist/{lz-string-QrWbdmw6.js → lz-string-DdnEcXDA.js} +21 -21
  70. package/dist/{netsuite-DglgyKcZ.js → netsuite-NcBlI9QO.js} +37 -37
  71. package/dist/{number-Ut7u2ZEE.js → number-DQ-rkxYN.js} +11 -11
  72. package/dist/{predefined-templates-DZtFebPU.js → predefined-templates-zYAuXO9-.js} +1 -1
  73. package/dist/{purchase-order-template-DhNVhXmD.js → purchase-order-template-DcoKKoiW.js} +1 -1
  74. package/dist/{recalculationUtils-CqJRd9B2.js → recalculationUtils-MW6hf5oz.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-CxC7ePEb.js} +2 -2
  78. package/dist/{stock-Dc4_U69J.js → stock-Bly2vXJq.js} +28 -27
  79. package/dist/{stock-CzdMn9n8.js → stock-Bqk5_C4b.js} +3 -3
  80. package/dist/{supplier-De5G6CeF.js → supplier-B0yIc028.js} +2 -2
  81. package/dist/{surcharge-CN5FtDZq.js → surcharge-BZa9y16I.js} +8 -8
  82. package/dist/tsconfig.app.tsbuildinfo +1 -1
  83. package/dist/{use-ingredient-select-dialog-Wy4CtYcZ.js → use-ingredient-select-dialog-BGPPfGO-.js} +2 -2
  84. package/dist/{use-inventory-binding-dialog-C1LCH0jV.js → use-inventory-binding-dialog-DUsjKdNr.js} +2 -2
  85. package/dist/{use-template-enabled-locations-BfZFcXZ_.js → use-template-enabled-locations-D2EWKhWK.js} +2 -2
  86. package/dist/use-transfer-locations-BRQbfZYI.js +116 -0
  87. package/dist/useHrmPermission-BZSfcBwi.js +16 -0
  88. package/dist/useNavigationMenu-C7F5h-H5.js +162 -0
  89. package/dist/views/DefaultView.vue.d.ts +2 -0
  90. package/dist/views/receive-request/composables/use-order-draft-permission.d.ts +2 -5
  91. package/dist/views/recipe/components/recipe-bulk-editor/RecipeBulkEditorDialog.vue.d.ts +19 -0
  92. package/dist/views/recipe/components/recipe-bulk-editor/RecipeBulkEditorQueryStep.vue.d.ts +2 -0
  93. package/dist/views/recipe/components/recipe-bulk-editor/RecipeBulkEditorSummaryStep.vue.d.ts +2 -0
  94. package/dist/views/recipe/composables/use-recipe-bulk-editor.d.ts +634 -0
  95. package/dist/{vue-i18n-CvVV4Xof.js → vue-i18n-BuXEP0EQ.js} +348 -348
  96. package/dist/{xlsx-lawW6Hwh.js → xlsx-C0BSmeBh.js} +1 -1
  97. package/dist/{xlsx.util-DSCqPt8v.js → xlsx.util-CyLHh8k-.js} +1 -1
  98. package/package.json +4 -3
  99. package/dist/App-BQZQFNKG.js +0 -411
  100. package/dist/FmFilterableMenuOptions.vue_vue_type_script_setup_true_lang-BDZVaj3l.js +0 -188
  101. package/dist/RecipeView--ALwYD-O.js +0 -1692
  102. 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-CaGW5ogt.js";
3
+ import { a as b } from "./FmMultiselectDialog-BEkAAZZp.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-BEkAAZZp.js";
2
+ import { a as P } from "./app-CaGW5ogt.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-BEkAAZZp.js";
2
+ import { u as S } from "./app-CaGW5ogt.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,116 @@
1
+ import { u as w, r as l, Q as R, W as g } from "./app-CaGW5ogt.js";
2
+ import { u as E } from "./supplier-B0yIc028.js";
3
+ import { computed as u } from "vue";
4
+ function d(o) {
5
+ const c = g.safeParse(o);
6
+ if (c.success) return c.data;
7
+ throw new Error("Invalid supplier data");
8
+ }
9
+ function _(o) {
10
+ return {
11
+ _id: o.doc._id,
12
+ internal: o.type,
13
+ contactName: o.doc.profile.name,
14
+ name: o.doc.profile.name ?? "",
15
+ email: o.doc.profile.email,
16
+ phoneNumber: o.doc.profile.phoneNo,
17
+ registrationNumber: o.doc.profile.regNo,
18
+ address: o.doc.profile.address ?? {
19
+ line1: "",
20
+ state: "",
21
+ city: "",
22
+ postcode: "",
23
+ country: ""
24
+ },
25
+ preparationTime: o.preparationTime
26
+ };
27
+ }
28
+ function F(o, c, v = !1, f = !1) {
29
+ const p = E(), r = w();
30
+ r.watchLocation(async () => {
31
+ var a;
32
+ await p.readSuppliers();
33
+ const e = o();
34
+ if ((a = e.supplier) != null && a._id) return;
35
+ const s = f ? p.suppliers[0] : p.businessSuppliers[0], n = (v ? r.locations.filter((i) => i.doc._id !== r.currentLocation.doc._id) : r.locations)[0];
36
+ c({
37
+ ...e,
38
+ supplier: s ? d(s) : n ? _(n) : e.supplier
39
+ });
40
+ });
41
+ const y = u(
42
+ () => {
43
+ var e, s;
44
+ return typeof ((s = (e = o()) == null ? void 0 : e.supplier) == null ? void 0 : s.internal) == "string" ? l.enum.transfer : l.enum.purchase;
45
+ }
46
+ ), h = u({
47
+ get() {
48
+ var e, s;
49
+ return (s = (e = o()) == null ? void 0 : e.supplier) == null ? void 0 : s._id;
50
+ },
51
+ set(e) {
52
+ const s = o() ?? {};
53
+ if (y.value === l.enum.purchase) {
54
+ const m = (f ? p.suppliers : p.businessSuppliers).find((N) => N._id === e);
55
+ c({
56
+ ...s,
57
+ supplier: m ? d(m) : s.supplier
58
+ });
59
+ return;
60
+ }
61
+ const a = (v ? r.allLocations.filter(
62
+ (i) => i.doc._id !== r.currentLocation.doc._id
63
+ ) : r.allLocations).find((i) => i.doc._id === e);
64
+ c({
65
+ ...s,
66
+ supplier: a ? _(a) : s.supplier
67
+ });
68
+ }
69
+ }), L = u(() => p.locationSuppliers.map(d)), T = u(() => p.businessSuppliers.map(d)), S = u(() => {
70
+ const e = [...L.value], s = [...T.value];
71
+ return f ? [...s, ...e] : s;
72
+ }), b = u(() => {
73
+ var t;
74
+ const e = ((t = r._currentLocation) == null ? void 0 : t.type) === R.warehouse;
75
+ return (v ? r.allLocations.filter(
76
+ (n) => n.doc._id !== r.currentLocation.doc._id
77
+ ) : r.allLocations).filter((n) => e || n.acceptRequest).map(_);
78
+ }), O = u(() => {
79
+ if (y.value === l.enum.purchase) {
80
+ const s = L.value.map((n) => ({
81
+ label: n.name,
82
+ value: n._id
83
+ })), t = T.value.map((n) => ({
84
+ label: n.name,
85
+ sublabel: "Business supplier",
86
+ value: n._id
87
+ }));
88
+ return f ? [...s, ...t] : t;
89
+ }
90
+ return b.value.map((s) => ({
91
+ label: s.name,
92
+ sublabel: s.internal ? `${s.internal}` : void 0,
93
+ value: s._id
94
+ }));
95
+ }), P = u(() => {
96
+ var n, a;
97
+ const e = (a = (n = o()) == null ? void 0 : n.supplier) == null ? void 0 : a._id;
98
+ if (y.value === l.enum.purchase) {
99
+ const i = p.suppliers.find((m) => m._id === e);
100
+ return i ? d(i) : null;
101
+ }
102
+ const t = r.allLocations.find((i) => i.doc._id);
103
+ return t ? _(t) : null;
104
+ });
105
+ return {
106
+ transferLocationModel: h,
107
+ transferLocationOptions: O,
108
+ locationOptionsTypePurchase: S,
109
+ locationOptionsTypePurchaseLocationLevel: L,
110
+ locationOptionsTypeTransfer: b,
111
+ selectedLocation: P
112
+ };
113
+ }
114
+ export {
115
+ F as u
116
+ };
@@ -0,0 +1,16 @@
1
+ import { computed as p, toValue as o } from "vue";
2
+ import { a2 as n } from "./app-CaGW5ogt.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-CaGW5ogt.js";
3
+ import { useCoreStore as C, useI18n as L } from "@feedmepos/mf-common";
4
+ import { u as _ } from "./feature-Dqme8-Xr.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>>;
@@ -0,0 +1,19 @@
1
+ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
2
+ show?: boolean | undefined;
3
+ }>>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
4
+ "update:show": (value: boolean) => void;
5
+ }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
6
+ show?: boolean | undefined;
7
+ }>>> & Readonly<{
8
+ "onUpdate:show"?: ((value: boolean) => any) | undefined;
9
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
10
+ export default _default;
11
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
12
+ type __VLS_TypePropsToRuntimeProps<T> = {
13
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
14
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
15
+ } : {
16
+ type: import('vue').PropType<T[K]>;
17
+ required: true;
18
+ };
19
+ };
@@ -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;
@@ -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;