@feedmepos/mf-menu 0.32.43 → 0.32.44
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.
- package/dist/{App-C9b4SjED.js → App-BXkiQoTM.js} +5 -5
- package/dist/{ApplyProduct.vue_vue_type_script_setup_true_lang-C1T4Ewek.js → ApplyProduct.vue_vue_type_script_setup_true_lang-BoSL4dm7.js} +3 -3
- package/dist/{Catalog-BVrf3VaX.js → Catalog-CLFVLyor.js} +44 -44
- package/dist/{Category-BkReM5IG.js → Category-BdyouDU8.js} +24 -24
- package/dist/{Category-BMzIQqIE.js → Category-CNuVHuI3.js} +25 -25
- package/dist/{CookingGuide-CvctI1TH.js → CookingGuide-Bed7bUt1.js} +105 -105
- package/dist/{CustomAttributeChip.vue_vue_type_script_setup_true_lang-bYSEp6Wb.js → CustomAttributeChip.vue_vue_type_script_setup_true_lang-CZDL2xJC.js} +1 -1
- package/dist/{Group-CHkNuuHE.js → Group-D4UTsIxI.js} +3 -3
- package/dist/{Group-BQzmXagr.js → Group-TUqCPmO3.js} +1 -1
- package/dist/{Group.vue_vue_type_script_setup_true_lang-BkruJTpL.js → Group.vue_vue_type_script_setup_true_lang-BJPT8flL.js} +19 -19
- package/dist/{GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-CBz83Qd1.js → GroupMarkupPriceDialog.vue_vue_type_script_setup_true_lang-D83liryu.js} +30 -30
- package/dist/{ImportProductDialog.vue_vue_type_script_setup_true_lang-Dpx4meDa.js → ImportProductDialog.vue_vue_type_script_setup_true_lang-CRIRinHB.js} +10 -11
- package/dist/{Ingredient-BNsKYrQB.js → Ingredient-CcxoeuDd.js} +20 -20
- package/dist/{InventoryBinding.vue_vue_type_script_setup_true_lang-DzzwwdA_.js → InventoryBinding.vue_vue_type_script_setup_true_lang-58tyxdVh.js} +2 -2
- package/dist/{LinkProductSideSheet-C6-wef-M.js → LinkProductSideSheet-DazOkwkd.js} +45 -45
- package/dist/{MenuSetting-DRaw7b6m.js → MenuSetting-B3oLll4C.js} +47 -47
- package/dist/{PrintRoute-BKB-thVp.js → PrintRoute-D878qPu8.js} +39 -39
- package/dist/{Product-vviXmBR1.js → Product-DOC8y_mW.js} +1 -1
- package/dist/{Product.vue_vue_type_script_setup_true_lang-5h-k6zad.js → Product.vue_vue_type_script_setup_true_lang-tZyBhWYT.js} +140 -140
- package/dist/{ProductInternalTools-DtLk3xFR.js → ProductInternalTools-9TgIc2bR.js} +66 -66
- package/dist/Products-DfUGnHmD.js +1568 -0
- package/dist/{Publish-jx0_H_26.js → Publish-BktK_PKq.js} +29 -29
- package/dist/{Recipe-Dk04ge-_.js → Recipe-eA0xrGYk.js} +24 -24
- package/dist/{RuleView.vue_vue_type_script_setup_true_lang-DaCVUn1i.js → RuleView.vue_vue_type_script_setup_true_lang-t8M7z09s.js} +2 -2
- package/dist/{Scheduler-vFTvCVcY.js → Scheduler-CKSqPZLQ.js} +11 -11
- package/dist/{ServingSequence-DiBqQ_iS.js → ServingSequence-Ea20baNj.js} +44 -44
- package/dist/{Setting-CtzJ_pVM.js → Setting-u6lX_Dzg.js} +17 -17
- package/dist/{Subcategory-Cmv2W67T.js → Subcategory-C6s7OMOb.js} +51 -51
- package/dist/{Takeaway-DBW4UPFZ.js → Takeaway-B9kr-Nf4.js} +13 -13
- package/dist/{Takeaway-ChaYk0Ix.js → Takeaway-lWxS9oWe.js} +1 -1
- package/dist/{Takeaway.vue_vue_type_script_setup_true_lang-C7RL3ITP.js → Takeaway.vue_vue_type_script_setup_true_lang-oA0e9oI5.js} +54 -54
- package/dist/{Thumbnail.vue_vue_type_script_setup_true_lang-edwJ1203.js → Thumbnail.vue_vue_type_script_setup_true_lang-T40ChY7j.js} +27 -27
- package/dist/TranslationSideSheet.vue_vue_type_script_setup_true_lang-CcIGCUwk.js +194 -0
- package/dist/TreeEditorOpenner.vue_vue_type_script_setup_true_lang-B1e3d-uX.js +6130 -0
- package/dist/{Unit-BgLqPMLe.js → Unit-DkQlUg2l.js} +8 -8
- package/dist/{Variant-B8yxF5mJ.js → Variant-BF5r2WLL.js} +25 -25
- package/dist/{_id_-CDN7as0K.js → _id_-_oqk-OhC.js} +28 -28
- package/dist/app-CfCYl2pO.js +363 -0
- package/dist/{app-0AQBxO0B.js → app-DIYHNWEw.js} +1 -1
- package/dist/app.js +1 -1
- package/dist/apps/mf-menu/tsconfig.app.tsbuildinfo +1 -1
- package/dist/assets/{linked-status-DTIHdzDw.js → linked-status-AoXjo9FF.js} +2 -2
- package/dist/assets/{menu-export-CpcyYnR-.js → menu-export-BHcaWhM3.js} +2 -2
- package/dist/assets/{override-menu-CASoFjhZ.js → override-menu-B9xQcjuJ.js} +2 -2
- package/dist/assets/{validate-menu-C5AkexWv.js → validate-menu-D-ezd4W8.js} +2 -2
- package/dist/{catalog-BA1e4WAu.js → catalog-CvN9Wu8V.js} +1 -1
- package/dist/{catalogSetting-DE5rjVfj.js → catalogSetting-qS5Np22q.js} +1 -1
- package/dist/{currency-D5qYOpxI.js → currency-Nxod6uwl.js} +1 -1
- package/dist/dayjs.min-B1AjAGva.js +6 -0
- package/dist/index-C0Zw1cSS.js +545 -0
- package/dist/{index-vPs04fVf.js → index-Cq-czJjU.js} +31 -31
- package/dist/index-nKlYiotY.js +246 -0
- package/dist/{index.vue_vue_type_script_setup_true_lang-DSZsSghE.js → index.vue_vue_type_script_setup_true_lang-YXKayPEp.js} +103 -78
- package/dist/{item-Dp17qTYi.js → item-CUZSonzT.js} +2587 -2587
- package/dist/{jszip.min-DlpCmtaR.js → jszip.min-BnkZQ6lD.js} +6 -7
- package/dist/{menu-BOVrJ7di.js → menu-BP_ArXCI.js} +1 -1
- package/dist/{menuV2-BHnldQiM.js → menuV2-BGEYgQ8-.js} +59 -59
- package/dist/{priceTier-BRQz1GRF.js → priceTier-B-Qa0xaO.js} +1 -1
- package/dist/{rules-CO49kqfr.js → rules-Dchd_ilF.js} +12 -12
- package/dist/{scheduler-BDHjl8t7.js → scheduler-DN7ZGLk8.js} +29 -29
- package/dist/{toExcel-DGdZKSxT.js → toExcel-jHmkDqcm.js} +2 -2
- package/dist/{translation-BCZ1Ruvv.js → translation-Cdap0IVg.js} +21 -35
- package/dist/{unit-D7QVgTp_.js → unit-DgL56pkI.js} +35 -35
- package/package.json +1 -1
- package/dist/Products-BR3iBVFd.js +0 -307
- package/dist/RestaurantAttributesSelector.vue_vue_type_script_setup_true_lang-I6qrPmxY.js +0 -144
- package/dist/TranslationSideSheet.vue_vue_type_script_setup_true_lang-Cs6s_csi.js +0 -196
- package/dist/TreeEditorOpenner.vue_vue_type_script_setup_true_lang-DIbjlDVn.js +0 -5767
- package/dist/app-BU6wILmn.js +0 -2286
- package/dist/dayjs.min-BFDAHpA8.js +0 -7
- package/dist/index--nQbIQ0d.js +0 -545
|
@@ -0,0 +1,1568 @@
|
|
|
1
|
+
import { defineComponent as ve, computed as H, ref as De, resolveComponent as Z, createBlock as N, openBlock as D, unref as g, withCtx as q, createElementVNode as U, toDisplayString as Ee, createVNode as E, createCommentVNode as X, createElementBlock as je, Fragment as ke } from "vue";
|
|
2
|
+
import { D as le } from "./dayjs.min-B1AjAGva.js";
|
|
3
|
+
import { J as rt, F as st } from "./jszip.min-BnkZQ6lD.js";
|
|
4
|
+
import { g as ot, u as Ie, G as Ne, B as Se, H as we, A as He, D as it, I as at, J as $e, K as ut } from "./index.vue_vue_type_script_setup_true_lang-YXKayPEp.js";
|
|
5
|
+
import { w as ct } from "./ImportProductDialog.vue_vue_type_script_setup_true_lang-CRIRinHB.js";
|
|
6
|
+
import { useCoreStore as Ue, useI18n as lt } from "@feedmepos/mf-common";
|
|
7
|
+
import { useDialog as Ve, useDialogChild as mt, useSnackbar as qe, useBreakpoints as pt, FmButtonVariant as me, FmButtonColorThemeVariant as Y } from "@feedmepos/ui-library";
|
|
8
|
+
import { _ as pe } from "./ResponsiveFabButton.vue_vue_type_script_setup_true_lang-Cn-3MRBO.js";
|
|
9
|
+
import { _ as yt, a as Re } from "./BottomSheetMenuItem.vue_vue_type_script_setup_true_lang-DhrXKy3b.js";
|
|
10
|
+
import { _ as dt } from "./PageLayout.vue_vue_type_script_setup_true_lang-2f0QfweQ.js";
|
|
11
|
+
import { u as ft, a as vt } from "./menu-BP_ArXCI.js";
|
|
12
|
+
import { u as bt } from "./item-CUZSonzT.js";
|
|
13
|
+
import { _ as Oe, a as _t } from "./Product.vue_vue_type_script_setup_true_lang-tZyBhWYT.js";
|
|
14
|
+
import { L as Te } from "./LinkProductSideSheet-DazOkwkd.js";
|
|
15
|
+
import { _ as gt } from "./TreeEditorOpenner.vue_vue_type_script_setup_true_lang-B1e3d-uX.js";
|
|
16
|
+
import { u as ht } from "./Thumbnail.vue_vue_type_script_setup_true_lang-T40ChY7j.js";
|
|
17
|
+
import { m as jt } from "./toExcel-jHmkDqcm.js";
|
|
18
|
+
var oe = { exports: {} }, kt = oe.exports, xe;
|
|
19
|
+
function St() {
|
|
20
|
+
return xe || (xe = 1, function(e, u) {
|
|
21
|
+
(function(l, i) {
|
|
22
|
+
e.exports = i();
|
|
23
|
+
})(kt, function() {
|
|
24
|
+
return function(l) {
|
|
25
|
+
var i = {};
|
|
26
|
+
function o(a) {
|
|
27
|
+
if (i[a]) return i[a].exports;
|
|
28
|
+
var m = i[a] = { i: a, l: !1, exports: {} };
|
|
29
|
+
return l[a].call(m.exports, m, m.exports, o), m.l = !0, m.exports;
|
|
30
|
+
}
|
|
31
|
+
return o.m = l, o.c = i, o.d = function(a, m, p) {
|
|
32
|
+
o.o(a, m) || Object.defineProperty(a, m, { enumerable: !0, get: p });
|
|
33
|
+
}, o.r = function(a) {
|
|
34
|
+
typeof Symbol < "u" && Symbol.toStringTag && Object.defineProperty(a, Symbol.toStringTag, { value: "Module" }), Object.defineProperty(a, "__esModule", { value: !0 });
|
|
35
|
+
}, o.t = function(a, m) {
|
|
36
|
+
if (1 & m && (a = o(a)), 8 & m || 4 & m && typeof a == "object" && a && a.__esModule) return a;
|
|
37
|
+
var p = /* @__PURE__ */ Object.create(null);
|
|
38
|
+
if (o.r(p), Object.defineProperty(p, "default", { enumerable: !0, value: a }), 2 & m && typeof a != "string")
|
|
39
|
+
for (var j in a)
|
|
40
|
+
o.d(
|
|
41
|
+
p,
|
|
42
|
+
j,
|
|
43
|
+
(function(k) {
|
|
44
|
+
return a[k];
|
|
45
|
+
}).bind(null, j)
|
|
46
|
+
);
|
|
47
|
+
return p;
|
|
48
|
+
}, o.n = function(a) {
|
|
49
|
+
var m = a && a.__esModule ? function() {
|
|
50
|
+
return a.default;
|
|
51
|
+
} : function() {
|
|
52
|
+
return a;
|
|
53
|
+
};
|
|
54
|
+
return o.d(m, "a", m), m;
|
|
55
|
+
}, o.o = function(a, m) {
|
|
56
|
+
return Object.prototype.hasOwnProperty.call(a, m);
|
|
57
|
+
}, o.p = "", o(o.s = 0);
|
|
58
|
+
}([
|
|
59
|
+
function(l, i, o) {
|
|
60
|
+
l.exports = o(1);
|
|
61
|
+
},
|
|
62
|
+
function(l, i, o) {
|
|
63
|
+
function a(n) {
|
|
64
|
+
return (a = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(r) {
|
|
65
|
+
return typeof r;
|
|
66
|
+
} : function(r) {
|
|
67
|
+
return r && typeof Symbol == "function" && r.constructor === Symbol && r !== Symbol.prototype ? "symbol" : typeof r;
|
|
68
|
+
})(n);
|
|
69
|
+
}
|
|
70
|
+
function m(n) {
|
|
71
|
+
var r = "[object " + n + "]";
|
|
72
|
+
return function(c) {
|
|
73
|
+
return Object.prototype.toString.call(c) === r;
|
|
74
|
+
};
|
|
75
|
+
}
|
|
76
|
+
o.r(i), o.d(i, "default", function() {
|
|
77
|
+
return te;
|
|
78
|
+
}), o.d(i, "compare", function() {
|
|
79
|
+
return T;
|
|
80
|
+
}), o.d(i, "comparable", function() {
|
|
81
|
+
return w;
|
|
82
|
+
});
|
|
83
|
+
var p = m("Array"), j = m("Object"), k = m("Function");
|
|
84
|
+
function _(n, r) {
|
|
85
|
+
return k(n.get) ? n.get(r) : n[r];
|
|
86
|
+
}
|
|
87
|
+
function S(n) {
|
|
88
|
+
return function(r, c) {
|
|
89
|
+
if (!p(c) || !c.length) return n(r, c);
|
|
90
|
+
for (var y = 0, d = c.length; y < d; y++)
|
|
91
|
+
if (n(r, _(c, y))) return !0;
|
|
92
|
+
return !1;
|
|
93
|
+
};
|
|
94
|
+
}
|
|
95
|
+
function P(n) {
|
|
96
|
+
return function(r, c) {
|
|
97
|
+
if (!p(c) || !c.length) return n(r, c);
|
|
98
|
+
for (var y = 0, d = c.length; y < d; y++)
|
|
99
|
+
if (!n(r, _(c, y))) return !1;
|
|
100
|
+
return !0;
|
|
101
|
+
};
|
|
102
|
+
}
|
|
103
|
+
function R(n, r, c, y) {
|
|
104
|
+
return n.validate(n.options, r, c, y);
|
|
105
|
+
}
|
|
106
|
+
var M = {
|
|
107
|
+
$eq: S(function(n, r) {
|
|
108
|
+
return n(r);
|
|
109
|
+
}),
|
|
110
|
+
$ne: P(function(n, r) {
|
|
111
|
+
return n(r);
|
|
112
|
+
}),
|
|
113
|
+
$gt: S(function(n, r) {
|
|
114
|
+
return n(r);
|
|
115
|
+
}),
|
|
116
|
+
$gte: S(function(n, r) {
|
|
117
|
+
return n(r);
|
|
118
|
+
}),
|
|
119
|
+
$lt: S(function(n, r) {
|
|
120
|
+
return n(r);
|
|
121
|
+
}),
|
|
122
|
+
$lte: S(function(n, r) {
|
|
123
|
+
return n(r);
|
|
124
|
+
}),
|
|
125
|
+
$mod: S(function(n, r) {
|
|
126
|
+
return n(r);
|
|
127
|
+
}),
|
|
128
|
+
$in: function(n, r) {
|
|
129
|
+
return n(r);
|
|
130
|
+
},
|
|
131
|
+
$nin: function(n, r) {
|
|
132
|
+
return n(r);
|
|
133
|
+
},
|
|
134
|
+
$not: function(n, r, c, y) {
|
|
135
|
+
return n(r, c, y);
|
|
136
|
+
},
|
|
137
|
+
$type: function(n, r) {
|
|
138
|
+
return n(r);
|
|
139
|
+
},
|
|
140
|
+
$all: function(n, r, c, y) {
|
|
141
|
+
return M.$and(n, r, c, y);
|
|
142
|
+
},
|
|
143
|
+
$size: function(n, r) {
|
|
144
|
+
return !!r && n === r.length;
|
|
145
|
+
},
|
|
146
|
+
$or: function(n, r, c, y) {
|
|
147
|
+
for (var d = 0, v = n.length; d < v; d++)
|
|
148
|
+
if (R(_(n, d), r, c, y)) return !0;
|
|
149
|
+
return !1;
|
|
150
|
+
},
|
|
151
|
+
$nor: function(n, r, c, y) {
|
|
152
|
+
return !M.$or(n, r, c, y);
|
|
153
|
+
},
|
|
154
|
+
$and: function(n, r, c, y) {
|
|
155
|
+
for (var d = 0, v = n.length; d < v; d++)
|
|
156
|
+
if (!R(_(n, d), r, c, y)) return !1;
|
|
157
|
+
return !0;
|
|
158
|
+
},
|
|
159
|
+
$regex: S(function(n, r) {
|
|
160
|
+
return typeof r == "string" && n.test(r);
|
|
161
|
+
}),
|
|
162
|
+
$where: function(n, r, c, y) {
|
|
163
|
+
return n.call(r, r, c, y);
|
|
164
|
+
},
|
|
165
|
+
$elemMatch: function(n, r, c, y) {
|
|
166
|
+
return p(r) ? !!~function(d, v) {
|
|
167
|
+
for (var b = 0; b < d.length; b++)
|
|
168
|
+
if (_(d, b), R(v, _(d, b))) return b;
|
|
169
|
+
return -1;
|
|
170
|
+
}(r, n) : R(n, r, c, y);
|
|
171
|
+
},
|
|
172
|
+
$exists: function(n, r, c, y) {
|
|
173
|
+
return y.hasOwnProperty(c) === n;
|
|
174
|
+
}
|
|
175
|
+
}, F = {
|
|
176
|
+
$eq: function(n, r, c) {
|
|
177
|
+
var y = c.comparable, d = c.compare;
|
|
178
|
+
return n instanceof RegExp ? S(function(v) {
|
|
179
|
+
return typeof v == "string" && n.test(v);
|
|
180
|
+
}) : n instanceof Function ? S(n) : p(n) && !n.length ? S(function(v) {
|
|
181
|
+
return p(v) && !v.length;
|
|
182
|
+
}) : S(
|
|
183
|
+
n === null ? function(v) {
|
|
184
|
+
return v == null;
|
|
185
|
+
} : function(v) {
|
|
186
|
+
return d(y(v), y(n)) === 0;
|
|
187
|
+
}
|
|
188
|
+
);
|
|
189
|
+
},
|
|
190
|
+
$gt: function(n, r, c) {
|
|
191
|
+
var y = c.comparable, d = c.compare;
|
|
192
|
+
return function(v) {
|
|
193
|
+
return d(y(v), y(n)) > 0;
|
|
194
|
+
};
|
|
195
|
+
},
|
|
196
|
+
$gte: function(n, r, c) {
|
|
197
|
+
var y = c.comparable, d = c.compare;
|
|
198
|
+
return function(v) {
|
|
199
|
+
return d(y(v), y(n)) >= 0;
|
|
200
|
+
};
|
|
201
|
+
},
|
|
202
|
+
$lt: function(n, r, c) {
|
|
203
|
+
var y = c.comparable, d = c.compare;
|
|
204
|
+
return function(v) {
|
|
205
|
+
return d(y(v), y(n)) < 0;
|
|
206
|
+
};
|
|
207
|
+
},
|
|
208
|
+
$lte: function(n, r, c) {
|
|
209
|
+
var y = c.comparable, d = c.compare;
|
|
210
|
+
return function(v) {
|
|
211
|
+
return d(y(v), y(n)) <= 0;
|
|
212
|
+
};
|
|
213
|
+
},
|
|
214
|
+
$in: function(n, r, c) {
|
|
215
|
+
var y = c.comparable;
|
|
216
|
+
return function(d) {
|
|
217
|
+
if (!(d instanceof Array)) {
|
|
218
|
+
var v = y(d);
|
|
219
|
+
if (v === d && a(d) === "object") {
|
|
220
|
+
for (h = n.length; h--; )
|
|
221
|
+
if (String(n[h]) === String(d) && String(d) !== "[object Object]")
|
|
222
|
+
return !0;
|
|
223
|
+
}
|
|
224
|
+
if (v === void 0) {
|
|
225
|
+
for (h = n.length; h--; ) if (n[h] == null) return !0;
|
|
226
|
+
}
|
|
227
|
+
for (h = n.length; h--; ) {
|
|
228
|
+
var b = R(ee(_(n, h), c), v, h, n);
|
|
229
|
+
if (b && String(b) !== "[object Object]" && String(v) !== "[object Object]")
|
|
230
|
+
return !0;
|
|
231
|
+
}
|
|
232
|
+
return !!~n.indexOf(v);
|
|
233
|
+
}
|
|
234
|
+
for (var h = d.length; h--; )
|
|
235
|
+
if (~n.indexOf(y(_(d, h)))) return !0;
|
|
236
|
+
return !1;
|
|
237
|
+
};
|
|
238
|
+
},
|
|
239
|
+
$nin: function(n, r, c) {
|
|
240
|
+
var y = F.$in(n, r, c);
|
|
241
|
+
return function(d, v, b, h) {
|
|
242
|
+
return !y(d, v, b, h);
|
|
243
|
+
};
|
|
244
|
+
},
|
|
245
|
+
$mod: function(n) {
|
|
246
|
+
return function(r) {
|
|
247
|
+
return r % n[0] == n[1];
|
|
248
|
+
};
|
|
249
|
+
},
|
|
250
|
+
$ne: function(n, r, c) {
|
|
251
|
+
var y = F.$eq(n, r, c);
|
|
252
|
+
return P(function(d, v, b, h) {
|
|
253
|
+
return !y(d, v, b, h);
|
|
254
|
+
});
|
|
255
|
+
},
|
|
256
|
+
$and: function(n, r, c) {
|
|
257
|
+
return n.map(B(c));
|
|
258
|
+
},
|
|
259
|
+
$all: function(n, r, c) {
|
|
260
|
+
return F.$and(n, r, c);
|
|
261
|
+
},
|
|
262
|
+
$or: function(n, r, c) {
|
|
263
|
+
return n.map(B(c));
|
|
264
|
+
},
|
|
265
|
+
$nor: function(n, r, c) {
|
|
266
|
+
return n.map(B(c));
|
|
267
|
+
},
|
|
268
|
+
$not: function(n, r, c) {
|
|
269
|
+
var y = B(c)(n);
|
|
270
|
+
return function(d, v, b) {
|
|
271
|
+
return !R(y, d, v, b);
|
|
272
|
+
};
|
|
273
|
+
},
|
|
274
|
+
$type: function(n) {
|
|
275
|
+
return function(r, c, y) {
|
|
276
|
+
return r != null && (r instanceof n || r.constructor == n);
|
|
277
|
+
};
|
|
278
|
+
},
|
|
279
|
+
$regex: function(n, r) {
|
|
280
|
+
return new RegExp(n, r.$options);
|
|
281
|
+
},
|
|
282
|
+
$where: function(n) {
|
|
283
|
+
if (typeof n == "function") return n;
|
|
284
|
+
throw new Error(
|
|
285
|
+
'In CSP mode, sift does not support strings in "$where" condition'
|
|
286
|
+
);
|
|
287
|
+
},
|
|
288
|
+
$elemMatch: function(n, r, c) {
|
|
289
|
+
return B(c)(n);
|
|
290
|
+
},
|
|
291
|
+
$exists: function(n) {
|
|
292
|
+
return !!n;
|
|
293
|
+
}
|
|
294
|
+
};
|
|
295
|
+
function I(n, r) {
|
|
296
|
+
return { options: n, validate: r };
|
|
297
|
+
}
|
|
298
|
+
function K(n, r) {
|
|
299
|
+
var c = n.keyPath, y = n.child, d = n.query, v = [];
|
|
300
|
+
if (function ge(G, J, W, tt, ue) {
|
|
301
|
+
if (W === J.length || G == null)
|
|
302
|
+
return void ue.push([G, J[W - 1], tt]);
|
|
303
|
+
var he = _(J, W);
|
|
304
|
+
if (p(G) && isNaN(Number(he)))
|
|
305
|
+
for (var ce = 0, nt = G.length; ce < nt; ce++) ge(_(G, ce), J, W, G, ue);
|
|
306
|
+
else ge(_(G, he), J, W + 1, G, ue);
|
|
307
|
+
}(r, c, 0, r, v), v.length === 1) {
|
|
308
|
+
var b = v[0];
|
|
309
|
+
return R(y, b[0], b[1], b[2]);
|
|
310
|
+
}
|
|
311
|
+
for (var h = d && d.$ne !== void 0, O = h, A = 0; A < v.length; A++) {
|
|
312
|
+
var V = v[A], ne = R(y, V[0], V[1], V[2]);
|
|
313
|
+
h ? O &= ne : O |= ne;
|
|
314
|
+
}
|
|
315
|
+
return O;
|
|
316
|
+
}
|
|
317
|
+
function Q(n, r, c) {
|
|
318
|
+
return I({ keyPath: n, child: r, query: c }, K);
|
|
319
|
+
}
|
|
320
|
+
function B(n) {
|
|
321
|
+
var r = n.comparable, c = n.expressions, y = function(b) {
|
|
322
|
+
var h;
|
|
323
|
+
return (!b || !(h = b) || h.constructor !== Object && h.constructor !== Array && h.constructor.toString() !== "function Object() { [native code] }" && h.constructor.toString() !== "function Array() { [native code] }" || h.toJSON) && (b = { $eq: b }), b;
|
|
324
|
+
}, d = function(b) {
|
|
325
|
+
b = r(b);
|
|
326
|
+
var h = [];
|
|
327
|
+
for (var O in b) {
|
|
328
|
+
var A = b[O];
|
|
329
|
+
if (O !== "$options") {
|
|
330
|
+
var V = M[O] || n && c && c[O];
|
|
331
|
+
if (V) F[O] && (A = F[O](A, b, n)), h.push(I(r(A), V));
|
|
332
|
+
else {
|
|
333
|
+
if (O.charCodeAt(0) === 36)
|
|
334
|
+
throw new Error("Unknown operation " + O);
|
|
335
|
+
var ne = O.split(".");
|
|
336
|
+
h.push(Q(ne, v(A), A));
|
|
337
|
+
}
|
|
338
|
+
}
|
|
339
|
+
}
|
|
340
|
+
return h.length === 1 ? h[0] : I(h, M.$and);
|
|
341
|
+
}, v = function(b) {
|
|
342
|
+
return b = y(b), function h(O, A) {
|
|
343
|
+
if (!j(O)) return A;
|
|
344
|
+
for (var V in O) A.push(V), h(O[V], A);
|
|
345
|
+
return A;
|
|
346
|
+
}(b, []).join(",").search(/[$.]/) === -1 ? I(b, L) : d(b);
|
|
347
|
+
};
|
|
348
|
+
return function(b) {
|
|
349
|
+
return d(y(b));
|
|
350
|
+
};
|
|
351
|
+
}
|
|
352
|
+
function L(n, r) {
|
|
353
|
+
if (Object.prototype.toString.call(n) !== Object.prototype.toString.call(r))
|
|
354
|
+
return !1;
|
|
355
|
+
if (j(n)) {
|
|
356
|
+
if (Object.keys(n).length !== Object.keys(r).length) return !1;
|
|
357
|
+
for (var c in n) if (!L(n[c], r[c])) return !1;
|
|
358
|
+
return !0;
|
|
359
|
+
}
|
|
360
|
+
if (p(n)) {
|
|
361
|
+
if (n.length !== r.length) return !1;
|
|
362
|
+
for (var y = 0, d = n.length; y < d; y++)
|
|
363
|
+
if (!L(n[y], r[y])) return !1;
|
|
364
|
+
return !0;
|
|
365
|
+
}
|
|
366
|
+
return n === r;
|
|
367
|
+
}
|
|
368
|
+
function ee(n, r) {
|
|
369
|
+
var c = B(r)(n);
|
|
370
|
+
return r && r.select && (c = {
|
|
371
|
+
options: c,
|
|
372
|
+
validate: function(y, d, v, b) {
|
|
373
|
+
return R(y, d && r.select(d), v, b);
|
|
374
|
+
}
|
|
375
|
+
}), c;
|
|
376
|
+
}
|
|
377
|
+
function te(n, r) {
|
|
378
|
+
var c = ee(n, r = Object.assign({ compare: T, comparable: w }, r));
|
|
379
|
+
return function(y, d, v) {
|
|
380
|
+
return R(c, y, d, v);
|
|
381
|
+
};
|
|
382
|
+
}
|
|
383
|
+
function T(n, r) {
|
|
384
|
+
if (L(n, r)) return 0;
|
|
385
|
+
if (a(n) === a(r)) {
|
|
386
|
+
if (n > r) return 1;
|
|
387
|
+
if (n < r) return -1;
|
|
388
|
+
}
|
|
389
|
+
}
|
|
390
|
+
function w(n) {
|
|
391
|
+
return n instanceof Date ? n.getTime() : p(n) ? n.map(w) : n && typeof n.toJSON == "function" ? n.toJSON() : n;
|
|
392
|
+
}
|
|
393
|
+
}
|
|
394
|
+
]);
|
|
395
|
+
});
|
|
396
|
+
}(oe)), oe.exports;
|
|
397
|
+
}
|
|
398
|
+
var wt = St();
|
|
399
|
+
const $t = /* @__PURE__ */ ot(wt);
|
|
400
|
+
function Rt(e, u) {
|
|
401
|
+
for (var l = 0; l < u.length; l++) {
|
|
402
|
+
var i = u[l];
|
|
403
|
+
i.enumerable = i.enumerable || !1, i.configurable = !0, "value" in i && (i.writable = !0), Object.defineProperty(e, i.key, i);
|
|
404
|
+
}
|
|
405
|
+
}
|
|
406
|
+
function Ot(e, u, l) {
|
|
407
|
+
return u && Rt(e.prototype, u), e;
|
|
408
|
+
}
|
|
409
|
+
function Tt(e, u) {
|
|
410
|
+
e.prototype = Object.create(u.prototype), e.prototype.constructor = e, e.__proto__ = u;
|
|
411
|
+
}
|
|
412
|
+
function ye(e) {
|
|
413
|
+
return ye = Object.setPrototypeOf ? Object.getPrototypeOf : function(l) {
|
|
414
|
+
return l.__proto__ || Object.getPrototypeOf(l);
|
|
415
|
+
}, ye(e);
|
|
416
|
+
}
|
|
417
|
+
function ae(e, u) {
|
|
418
|
+
return ae = Object.setPrototypeOf || function(i, o) {
|
|
419
|
+
return i.__proto__ = o, i;
|
|
420
|
+
}, ae(e, u);
|
|
421
|
+
}
|
|
422
|
+
function xt() {
|
|
423
|
+
if (typeof Reflect > "u" || !Reflect.construct || Reflect.construct.sham) return !1;
|
|
424
|
+
if (typeof Proxy == "function") return !0;
|
|
425
|
+
try {
|
|
426
|
+
return Date.prototype.toString.call(Reflect.construct(Date, [], function() {
|
|
427
|
+
})), !0;
|
|
428
|
+
} catch {
|
|
429
|
+
return !1;
|
|
430
|
+
}
|
|
431
|
+
}
|
|
432
|
+
function ie(e, u, l) {
|
|
433
|
+
return xt() ? ie = Reflect.construct : ie = function(o, a, m) {
|
|
434
|
+
var p = [null];
|
|
435
|
+
p.push.apply(p, a);
|
|
436
|
+
var j = Function.bind.apply(o, p), k = new j();
|
|
437
|
+
return m && ae(k, m.prototype), k;
|
|
438
|
+
}, ie.apply(null, arguments);
|
|
439
|
+
}
|
|
440
|
+
function At(e) {
|
|
441
|
+
return Function.toString.call(e).indexOf("[native code]") !== -1;
|
|
442
|
+
}
|
|
443
|
+
function de(e) {
|
|
444
|
+
var u = typeof Map == "function" ? /* @__PURE__ */ new Map() : void 0;
|
|
445
|
+
return de = function(i) {
|
|
446
|
+
if (i === null || !At(i)) return i;
|
|
447
|
+
if (typeof i != "function")
|
|
448
|
+
throw new TypeError("Super expression must either be null or a function");
|
|
449
|
+
if (typeof u < "u") {
|
|
450
|
+
if (u.has(i)) return u.get(i);
|
|
451
|
+
u.set(i, o);
|
|
452
|
+
}
|
|
453
|
+
function o() {
|
|
454
|
+
return ie(i, arguments, ye(this).constructor);
|
|
455
|
+
}
|
|
456
|
+
return o.prototype = Object.create(i.prototype, {
|
|
457
|
+
constructor: {
|
|
458
|
+
value: o,
|
|
459
|
+
enumerable: !1,
|
|
460
|
+
writable: !0,
|
|
461
|
+
configurable: !0
|
|
462
|
+
}
|
|
463
|
+
}), ae(o, i);
|
|
464
|
+
}, de(e);
|
|
465
|
+
}
|
|
466
|
+
function Ae(e) {
|
|
467
|
+
if (e === void 0)
|
|
468
|
+
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
469
|
+
return e;
|
|
470
|
+
}
|
|
471
|
+
var Be = function(u) {
|
|
472
|
+
return 'Cannot execute "' + u.action + '" on "' + u.subjectName + '"';
|
|
473
|
+
}, re = Be, Mt = /* @__PURE__ */ function(e) {
|
|
474
|
+
Tt(u, e), u.setDefaultMessage = function(o) {
|
|
475
|
+
o === null ? re = Be : re = typeof o == "string" ? function() {
|
|
476
|
+
return o;
|
|
477
|
+
} : o;
|
|
478
|
+
}, u.from = function(o) {
|
|
479
|
+
var a = new this("");
|
|
480
|
+
return Object.defineProperty(a, "ability", {
|
|
481
|
+
value: o
|
|
482
|
+
}), a;
|
|
483
|
+
};
|
|
484
|
+
function u(i, o) {
|
|
485
|
+
var a;
|
|
486
|
+
return o === void 0 && (o = {}), a = e.call(this, i) || this, a._setMetadata(o), a.message = i || re(Ae(a)), a._customMessage = null, typeof Error.captureStackTrace == "function" && (a.name = a.constructor.name, Error.captureStackTrace(Ae(a), a.constructor)), a;
|
|
487
|
+
}
|
|
488
|
+
var l = u.prototype;
|
|
489
|
+
return l.setMessage = function(o) {
|
|
490
|
+
return this._customMessage = o, this;
|
|
491
|
+
}, l.throwUnlessCan = function(o, a, m) {
|
|
492
|
+
if (!this.ability)
|
|
493
|
+
throw new ReferenceError("Cannot throw FordiddenError without respective ability instance");
|
|
494
|
+
var p = this.ability.relevantRuleFor(o, a, m);
|
|
495
|
+
if (!(p && !p.inverted)) {
|
|
496
|
+
this._setMetadata({
|
|
497
|
+
action: o,
|
|
498
|
+
subject: a,
|
|
499
|
+
field: m,
|
|
500
|
+
subjectName: this.ability.subjectName(a)
|
|
501
|
+
});
|
|
502
|
+
var j = p ? p.reason : "";
|
|
503
|
+
throw this.message = this._customMessage || j || re(this), this;
|
|
504
|
+
}
|
|
505
|
+
}, l._setMetadata = function(o) {
|
|
506
|
+
this.subject = o.subject, this.subjectName = o.subjectName, this.action = o.action, this.field = o.field;
|
|
507
|
+
}, u;
|
|
508
|
+
}(de(Error));
|
|
509
|
+
function fe(e) {
|
|
510
|
+
return Array.isArray(e) ? e : [e];
|
|
511
|
+
}
|
|
512
|
+
function Ct(e) {
|
|
513
|
+
if (!e || typeof e == "string")
|
|
514
|
+
return e;
|
|
515
|
+
var u = typeof e == "object" ? e.constructor : e;
|
|
516
|
+
return u.modelName || u.name;
|
|
517
|
+
}
|
|
518
|
+
function Pt(e) {
|
|
519
|
+
return JSON.parse(JSON.stringify(e));
|
|
520
|
+
}
|
|
521
|
+
var Ft = /[-/\\^$+?.()|[\]{}]/g, Dt = /\.?\*+\.?/g, Et = /\*+/, It = /\./g;
|
|
522
|
+
function Nt(e, u, l) {
|
|
523
|
+
var i = l[0] === "*" || e[0] === "." && e[e.length - 1] === "." ? "+" : "*", o = e.indexOf("**") === -1 ? "[^.]" : ".", a = e.replace(It, "\\$&").replace(Et, o + i);
|
|
524
|
+
return u + e.length === l.length ? "(?:" + a + ")?" : a;
|
|
525
|
+
}
|
|
526
|
+
function Ht(e, u, l) {
|
|
527
|
+
return e === "." && (l[u - 1] === "*" || l[u + 1] === "*") ? e : "\\" + e;
|
|
528
|
+
}
|
|
529
|
+
function Ut(e) {
|
|
530
|
+
var u = e.map(function(i) {
|
|
531
|
+
return i.replace(Ft, Ht).replace(Dt, Nt);
|
|
532
|
+
}), l = u.length > 1 ? "(?:" + u.join("|") + ")" : u[0];
|
|
533
|
+
return new RegExp("^" + l + "$");
|
|
534
|
+
}
|
|
535
|
+
var Vt = /* @__PURE__ */ function() {
|
|
536
|
+
function e(l) {
|
|
537
|
+
this.actions = l.actions || l.action, this.subject = l.subject, this.fields = !l.fields || l.fields.length === 0 ? void 0 : fe(l.fields), Object.defineProperty(this, "_fieldsPattern", {
|
|
538
|
+
writable: !0
|
|
539
|
+
}), this.inverted = !!l.inverted, this.conditions = l.conditions, Object.defineProperty(this, "_matches", {
|
|
540
|
+
writable: !0,
|
|
541
|
+
value: this.conditions ? $t(this.conditions) : void 0
|
|
542
|
+
}), this.reason = l.reason;
|
|
543
|
+
}
|
|
544
|
+
var u = e.prototype;
|
|
545
|
+
return u.matches = function(i) {
|
|
546
|
+
return this._matches ? typeof i == "string" ? !this.inverted : this._matches(i) : !0;
|
|
547
|
+
}, u.isRelevantFor = function(i, o) {
|
|
548
|
+
return this.fields ? o ? this.matchesField(o) : !this.inverted : !0;
|
|
549
|
+
}, u.matchesField = function(i) {
|
|
550
|
+
return typeof this._fieldsPattern > "u" && (this._fieldsPattern = this.fields.join("").indexOf("*") === -1 ? null : Ut(this.fields)), this._fieldsPattern === null || i.indexOf("*") !== -1 ? this.fields.indexOf(i) !== -1 : this._fieldsPattern.test(i);
|
|
551
|
+
}, e;
|
|
552
|
+
}(), C = typeof Symbol < "u" ? Symbol("private") : "__" + Date.now(), Me = {
|
|
553
|
+
crud: ["create", "read", "update", "delete"]
|
|
554
|
+
};
|
|
555
|
+
function Ce(e, u) {
|
|
556
|
+
return e === u || Array.isArray(u) && u.indexOf(e) !== -1;
|
|
557
|
+
}
|
|
558
|
+
var Ge = /* @__PURE__ */ function() {
|
|
559
|
+
e.addAlias = function(i, o) {
|
|
560
|
+
if (i === "manage" || Ce("manage", o))
|
|
561
|
+
throw new Error('Cannot add alias for "manage" action because it represents any action');
|
|
562
|
+
if (Ce(i, o))
|
|
563
|
+
throw new Error("Attempt to alias action to itself: " + i + " -> " + o.toString());
|
|
564
|
+
return Me[i] = o, this;
|
|
565
|
+
};
|
|
566
|
+
function e(l, i) {
|
|
567
|
+
i === void 0 && (i = {}), Object.defineProperty(this, "subjectName", {
|
|
568
|
+
value: i.subjectName || Ct
|
|
569
|
+
}), this[C] = {
|
|
570
|
+
RuleType: i.RuleType || Vt,
|
|
571
|
+
originalRules: l || [],
|
|
572
|
+
hasPerFieldRules: !1,
|
|
573
|
+
indexedRules: /* @__PURE__ */ Object.create(null),
|
|
574
|
+
mergedRules: /* @__PURE__ */ Object.create(null),
|
|
575
|
+
events: {},
|
|
576
|
+
aliases: Pt(Me)
|
|
577
|
+
}, this.update(l);
|
|
578
|
+
}
|
|
579
|
+
var u = e.prototype;
|
|
580
|
+
return u.update = function(i) {
|
|
581
|
+
if (!Array.isArray(i))
|
|
582
|
+
return this;
|
|
583
|
+
var o = {
|
|
584
|
+
rules: i,
|
|
585
|
+
ability: this
|
|
586
|
+
};
|
|
587
|
+
this.emit("update", o), this[C].originalRules = i.slice(0), this[C].mergedRules = /* @__PURE__ */ Object.create(null);
|
|
588
|
+
var a = this.buildIndexFor(i);
|
|
589
|
+
return this[C].indexedRules = a.rules, this[C].hasPerFieldRules = a.hasPerFieldRules, this.emit("updated", o), this;
|
|
590
|
+
}, u.buildIndexFor = function(i) {
|
|
591
|
+
for (var o = /* @__PURE__ */ Object.create(null), a = this[C].RuleType, m = !0, p = !1, j = 0; j < i.length; j++) {
|
|
592
|
+
var k = new a(i[j]), _ = this.expandActions(k.actions), S = fe(k.subject), P = i.length - j - 1;
|
|
593
|
+
m = !!(m && k.inverted), !p && k.fields && (p = !0);
|
|
594
|
+
for (var R = 0; R < S.length; R++) {
|
|
595
|
+
var M = S[R];
|
|
596
|
+
o[M] = o[M] || /* @__PURE__ */ Object.create(null);
|
|
597
|
+
for (var F = 0; F < _.length; F++) {
|
|
598
|
+
var I = _[F];
|
|
599
|
+
o[M][I] = o[M][I] || /* @__PURE__ */ Object.create(null), o[M][I][P] = k;
|
|
600
|
+
}
|
|
601
|
+
}
|
|
602
|
+
}
|
|
603
|
+
return {
|
|
604
|
+
isAllInverted: m,
|
|
605
|
+
hasPerFieldRules: p,
|
|
606
|
+
rules: o
|
|
607
|
+
};
|
|
608
|
+
}, u.expandActions = function(i) {
|
|
609
|
+
for (var o = this[C].aliases, a = fe(i), m = 0; m < a.length; ) {
|
|
610
|
+
var p = a[m++];
|
|
611
|
+
o.hasOwnProperty(p) && (a = a.concat(o[p]));
|
|
612
|
+
}
|
|
613
|
+
return a;
|
|
614
|
+
}, u.can = function(i, o, a) {
|
|
615
|
+
if (a && typeof a != "string")
|
|
616
|
+
throw new Error("Ability.can expects 3rd parameter to be a string. See https://stalniy.github.io/casl/abilities/2017/07/21/check-abilities.html#checking-fields for details");
|
|
617
|
+
var m = this.relevantRuleFor(i, o, a);
|
|
618
|
+
return !!m && !m.inverted;
|
|
619
|
+
}, u.relevantRuleFor = function(i, o, a) {
|
|
620
|
+
for (var m = this.rulesFor(i, o, a), p = 0; p < m.length; p++)
|
|
621
|
+
if (m[p].matches(o))
|
|
622
|
+
return m[p];
|
|
623
|
+
return null;
|
|
624
|
+
}, u.possibleRulesFor = function(i, o) {
|
|
625
|
+
var a = this.subjectName(o), m = this[C].mergedRules, p = a + "_" + i;
|
|
626
|
+
return m[p] || (m[p] = this.mergeRulesFor(i, a)), m[p];
|
|
627
|
+
}, u.mergeRulesFor = function(i, o) {
|
|
628
|
+
var a = this[C].indexedRules, m = [o, "all"].reduce(function(p, j) {
|
|
629
|
+
var k = a[j];
|
|
630
|
+
return k ? Object.assign(p, k[i], k.manage) : p;
|
|
631
|
+
}, []);
|
|
632
|
+
return m.filter(Boolean);
|
|
633
|
+
}, u.rulesFor = function(i, o, a) {
|
|
634
|
+
var m = this.possibleRulesFor(i, o);
|
|
635
|
+
return this[C].hasPerFieldRules ? m.filter(function(p) {
|
|
636
|
+
return p.isRelevantFor(o, a);
|
|
637
|
+
}) : m;
|
|
638
|
+
}, u.cannot = function() {
|
|
639
|
+
return !this.can.apply(this, arguments);
|
|
640
|
+
}, u.throwUnlessCan = function() {
|
|
641
|
+
var i;
|
|
642
|
+
console.warn(`
|
|
643
|
+
Ability.throwUnlessCan is deprecated and will be removed in 4.x version.
|
|
644
|
+
Please use "ForbiddenError.from(ability).throwUnlessCan(...)" instead.
|
|
645
|
+
`.trim()), (i = Mt.from(this)).throwUnlessCan.apply(i, arguments);
|
|
646
|
+
}, u.on = function(i, o) {
|
|
647
|
+
var a = this[C].events, m = !0;
|
|
648
|
+
return a[i] || (a[i] = []), a[i].push(o), function() {
|
|
649
|
+
if (m) {
|
|
650
|
+
var p = a[i].indexOf(o);
|
|
651
|
+
a[i].splice(p, 1), m = !1;
|
|
652
|
+
}
|
|
653
|
+
};
|
|
654
|
+
}, u.emit = function(i, o) {
|
|
655
|
+
var a = this[C].events[i];
|
|
656
|
+
a && a.slice(0).forEach(function(m) {
|
|
657
|
+
return m(o);
|
|
658
|
+
});
|
|
659
|
+
}, Ot(e, [{
|
|
660
|
+
key: "rules",
|
|
661
|
+
get: function() {
|
|
662
|
+
return this[C].originalRules;
|
|
663
|
+
}
|
|
664
|
+
}]), e;
|
|
665
|
+
}(), t = /* @__PURE__ */ ((e) => (e.manage = "manage", e.create = "create", e.read = "read", e.update = "update", e.delete = "delete", e))(t || {}), s = /* @__PURE__ */ ((e) => (e.crm = "business::crm", e.crm_promotion = "business::crm::promotion", e.crm_voucher = "business::crm::voucher", e.crm_membership = "business::crm::membership", e.crm_analytic = "business::crm::analytic", e.crm_broadcast = "business::crm::broadcast", e.crm_program = "business::crm::program", e.crm_loyaltyMember = "business::crm::loyaltyMember", e.crm_loyaltySegment = "business::crm::loyaltySegment", e.crm_loyaltyCard = "business::crm::loyaltyCard", e.crm_referral = "business::crm::referral", e.crm_store = "business::crm::store", e.crm_transaction = "business::crm::transaction", e.crm_marketing = "business::crm::marketing", e.crm_setting = "business::crm::setting", e.crm_bin = "business::crm::bin", e.crm_queue = "business::crm::queue", e.payment = "business::payment", e.payment_payoutAccount = "business::payment::payoutAccount", e.payment_paymentOnboarding = "business::payment::paymentOnboarding", e.payment_transactions = "business::payment::transactions", e.payment_settlements = "business::payment::settlements", e.inventory_stock = "business::inventory::stock", e.inventory_stockBalance = "business::inventory::stockBalance", e.inventory_stockAdjustment = "business::inventory::stockAdjustment", e.inventory_unitCostHistory = "business::inventory::unitCostHistory", e.inventory_wastageTemplate = "business::inventory::wastageTemplate", e.inventory_closingHistory = "business::inventory::closingHistory", e.inventory_closingTemplate = "business::inventory::closingTemplate", e.inventory_closingDraft = "business::inventory::closingDraft", e.inventory_ingredient = "business::inventory::ingredient", e.inventory_ingredientGroup = "business::inventory::ingredientGroup", e.inventory_recipe = "business::inventory::recipe", e.inventory_unit = "business::inventory::unit", e.inventory_purchaseTransfer = "business::inventory::purchaseTransfer", e.inventory_orderDraftApproval = "business::inventory::orderDraftApproval", e.inventory_transferOut = "business::inventory::transferOut", e.inventory_surcharge = "business::inventory::surcharge", e.inventory_orderTemplate = "business::inventory::orderTemplate", e.inventory_supplier = "business::inventory::supplier", e.inventory_warehouse = "business::inventory::warehouse", e.inventory_publish = "business::inventory::publish", e.inventory_import = "business::inventory::import", e.inventory_integration = "business::inventory::integration", e.hrm = "business::hrm", e.hrm_employee = "business::hrm::employee", e.hrm_teamMember = "business::hrm::teamMember", e.hrm_auditLog = "business::hrm::auditLog", e.menu_item = "business::menu::item", e.menu_catalog = "business::menu::catalog", e.menu_category = "business::menu::category", e.menu_subCategory = "business::menu::subCategory", e.menu_group = "business::menu::group", e.menu_takeaway = "business::menu::takeaway", e.menu_scheduler = "business::menu::scheduler", e.menu_variant = "business::menu::variant", e.menu_cookingGuide = "business::menu::cookingGuide", e.menu_printRoute = "business::menu::printRoute", e.menu_servingSequence = "business::menu::servingSequence", e.menu_settings = "business::menu::settings", e.menu_publish = "business::menu::publish", e.menu_menuManagement = "business::menu::menuManagement", e.menu_importExport = "business::menu::importExport", e.menu_unit = "business::menu::unit", e.menu_ingredient = "business::menu::ingredient", e.menu_recipe = "business::menu::recipe", e.restaurant = "business::restaurant", e.role = "business::role", e.profile = "business::profile", e.report_createReport = "business::report::createReport", e.report_accessInsight = "business::report::accessInsight", e.report_accessSetting = "business::report::accessSetting", e.report_accessIntegration = "business::report::accessIntegration", e.report_accessOverview = "business::report::accessOverview", e.report_reports_allDefaultReports = "business::report::allDefaultReports", e.report_reports_allCustomReports = "business::report::allCustomReports", e))(s || {}), $ = /* @__PURE__ */ ((e) => (e.profile = "business::profile", e.restaurant = "business::restaurant", e.menu = "business::menu", e.promotion = "business::promotion", e.voucher = "business::voucher", e.membership = "business::membership", e.stock = "business::stock", e.permission = "business::permission", e.role = "business::role", e.wastageTemplate = "business::wastageTemplate", e.closingTemplate = "business::closingTemplate", e.orderTemplate = "business::orderTemplate", e.ingredient = "business::ingredient", e.recipe = "business::recipe", e.unit = "business::unit", e.supplier = "business::supplier", e.warehouse = "business::warehouse", e.publish = "business::publish", e.integration = "business::integration", e.orderDraft = "business::orderDraft", e.unitCostHistory = "business::unitCostHistory", e))($ || {});
|
|
666
|
+
const se = {
|
|
667
|
+
Action: t,
|
|
668
|
+
Subject: {
|
|
669
|
+
Business: s
|
|
670
|
+
}
|
|
671
|
+
}, qt = {
|
|
672
|
+
[$.permission]: s.hrm_teamMember,
|
|
673
|
+
[$.promotion]: s.crm_promotion,
|
|
674
|
+
[$.voucher]: s.crm_voucher,
|
|
675
|
+
[$.membership]: s.crm_membership,
|
|
676
|
+
[$.stock]: s.inventory_stock,
|
|
677
|
+
[$.wastageTemplate]: s.inventory_wastageTemplate,
|
|
678
|
+
[$.closingTemplate]: s.inventory_closingTemplate,
|
|
679
|
+
[$.orderTemplate]: s.inventory_orderTemplate,
|
|
680
|
+
[$.ingredient]: s.inventory_ingredient,
|
|
681
|
+
[$.recipe]: s.inventory_recipe,
|
|
682
|
+
[$.unit]: s.inventory_unit,
|
|
683
|
+
[$.supplier]: s.inventory_supplier,
|
|
684
|
+
[$.warehouse]: s.inventory_warehouse,
|
|
685
|
+
[$.publish]: s.inventory_publish,
|
|
686
|
+
[$.integration]: s.inventory_integration,
|
|
687
|
+
[$.orderDraft]: s.inventory_orderDraftApproval,
|
|
688
|
+
[$.unitCostHistory]: s.inventory_unitCostHistory
|
|
689
|
+
};
|
|
690
|
+
function Bt(e) {
|
|
691
|
+
return qt[e] ?? e;
|
|
692
|
+
}
|
|
693
|
+
s.restaurant, t.manage, s.menu_item, t.manage, s.menu_catalog, t.manage, s.menu_category, t.manage, s.menu_subCategory, t.manage, s.menu_group, t.manage, s.menu_takeaway, t.manage, s.menu_scheduler, t.manage, s.menu_variant, t.manage, s.menu_cookingGuide, t.manage, s.menu_printRoute, t.manage, s.menu_servingSequence, t.manage, s.menu_unit, t.manage, s.menu_ingredient, t.manage, s.menu_recipe, t.manage, s.menu_settings, t.manage, s.menu_publish, t.manage, s.menu_menuManagement, t.manage, s.menu_importExport, t.manage, s.inventory_stockBalance, t.manage, s.inventory_stockAdjustment, t.manage, s.inventory_unitCostHistory, t.manage, s.inventory_wastageTemplate, t.manage, s.inventory_closingHistory, t.manage, s.inventory_closingTemplate, t.manage, s.inventory_closingDraft, t.manage, s.inventory_ingredient, t.manage, s.inventory_ingredientGroup, t.manage, s.inventory_recipe, t.manage, s.inventory_unit, t.manage, s.inventory_purchaseTransfer, t.manage, s.inventory_orderDraftApproval, t.manage, s.inventory_transferOut, t.manage, s.inventory_surcharge, t.manage, s.inventory_orderTemplate, t.manage, s.inventory_supplier, t.manage, s.inventory_warehouse, t.manage, s.inventory_publish, t.manage, s.inventory_import, t.manage, s.inventory_integration, t.manage, s.crm_promotion, t.manage, s.crm_voucher, t.manage, s.crm_membership, t.manage, s.crm_analytic, t.manage, s.crm_broadcast, t.manage, s.crm_program, t.manage, s.crm_loyaltyMember, t.manage, s.crm_loyaltySegment, t.manage, s.crm_loyaltyCard, t.manage, s.crm_referral, t.manage, s.crm_store, t.manage, s.crm_transaction, t.manage, s.crm_marketing, t.manage, s.crm_setting, t.manage, s.crm_bin, t.manage, s.crm_queue, t.manage, s.payment_payoutAccount, t.manage, s.payment_paymentOnboarding, t.manage, s.payment_transactions, t.manage, s.payment_settlements, t.manage, s.hrm_teamMember, t.manage, s.hrm_employee, t.manage, s.hrm_auditLog, t.manage, s.report_createReport, t.manage, s.report_accessOverview, t.manage, s.report_accessInsight, t.manage, s.report_accessSetting, t.manage, s.report_accessIntegration, t.manage, s.report_reports_allDefaultReports, t.manage, t.read, t.create, s.report_reports_allCustomReports, t.manage, t.read, t.create, t.update, t.delete;
|
|
694
|
+
var f = /* @__PURE__ */ ((e) => (e.inventory = "inventory", e.inventory_stock = "inventory::stock", e.inventory_stockAdjustment = "inventory::stockAdjustment", e.inventory_stockRecalculation = "inventory::stockRecalculation", e.inventory_unitCostHistory = "inventory::unitCostHistory", e.inventory_wastageTemplate = "inventory::wastageTemplate", e.inventory_closing = "inventory::closing", e.inventory_closingDraft = "inventory::closingDraft", e.inventory_closingTemplate = "inventory::closingTemplate", e.inventory_ingredient = "inventory::ingredient", e.inventory_ingredientGroup = "inventory::ingredientGroup", e.inventory_recipe = "inventory::recipe", e.inventory_unit = "inventory::unit", e.inventory_orderTemplate = "inventory::orderTemplate", e.inventory_orderDraft = "inventory::orderDraft", e.inventory_printTemplate = "inventory::printTemplate", e.inventory_purchaseOrder = "inventory::purchaseOrder", e.inventory_transferOutApproval = "inventory::transferOutApproval", e.inventory_adjustmentTemplate = "inventory::adjustmentTemplate", e.inventory_surcharge = "inventory::surcharge", e.inventory_supplier = "inventory::supplier", e.inventory_warehouse = "inventory::warehouse", e.inventory_publish = "inventory::publish", e.inventory_integration = "inventory::integration", e.inventory_deliveryOrder = "inventory::deliveryOrder", e.inventory_shipment = "inventory::shipment", e.inventory_orderDraftApproval = "inventory::orderDraftApproval", e))(f || {});
|
|
695
|
+
const x = [
|
|
696
|
+
{
|
|
697
|
+
label: "Inventory",
|
|
698
|
+
subject: f.inventory,
|
|
699
|
+
actions: [t.read]
|
|
700
|
+
}
|
|
701
|
+
], be = [
|
|
702
|
+
...x,
|
|
703
|
+
{
|
|
704
|
+
label: "Stock",
|
|
705
|
+
subject: f.inventory_stock,
|
|
706
|
+
actions: [t.read, t.create, t.update]
|
|
707
|
+
},
|
|
708
|
+
{
|
|
709
|
+
label: "Stock Adjustment",
|
|
710
|
+
subject: f.inventory_stockAdjustment,
|
|
711
|
+
actions: [t.read, t.update]
|
|
712
|
+
},
|
|
713
|
+
{
|
|
714
|
+
label: "Stock Recalculation",
|
|
715
|
+
subject: f.inventory_stockRecalculation,
|
|
716
|
+
actions: [t.update]
|
|
717
|
+
},
|
|
718
|
+
{
|
|
719
|
+
label: "Unit Cost History",
|
|
720
|
+
subject: f.inventory_unitCostHistory,
|
|
721
|
+
actions: [t.read]
|
|
722
|
+
}
|
|
723
|
+
], Gt = [
|
|
724
|
+
...x,
|
|
725
|
+
{
|
|
726
|
+
label: "Stock Adjustment",
|
|
727
|
+
subject: f.inventory_stockAdjustment,
|
|
728
|
+
actions: [t.update]
|
|
729
|
+
}
|
|
730
|
+
], Le = [
|
|
731
|
+
...x,
|
|
732
|
+
{
|
|
733
|
+
label: "Unit Cost History",
|
|
734
|
+
subject: f.inventory_unitCostHistory,
|
|
735
|
+
actions: [t.read, t.update]
|
|
736
|
+
}
|
|
737
|
+
], Ye = [
|
|
738
|
+
...x,
|
|
739
|
+
{
|
|
740
|
+
label: "Wastage Template",
|
|
741
|
+
subject: f.inventory_wastageTemplate,
|
|
742
|
+
actions: [
|
|
743
|
+
t.read,
|
|
744
|
+
t.create,
|
|
745
|
+
t.update,
|
|
746
|
+
t.delete
|
|
747
|
+
]
|
|
748
|
+
}
|
|
749
|
+
];
|
|
750
|
+
[
|
|
751
|
+
...be,
|
|
752
|
+
...Le,
|
|
753
|
+
...Ye
|
|
754
|
+
];
|
|
755
|
+
const _e = [
|
|
756
|
+
...x,
|
|
757
|
+
{
|
|
758
|
+
label: "Closing",
|
|
759
|
+
subject: f.inventory_closing,
|
|
760
|
+
actions: [t.read, t.create]
|
|
761
|
+
},
|
|
762
|
+
{
|
|
763
|
+
label: "Stock Recalculation",
|
|
764
|
+
subject: f.inventory_stockRecalculation,
|
|
765
|
+
actions: [t.read, t.update]
|
|
766
|
+
},
|
|
767
|
+
{
|
|
768
|
+
label: "Closing Draft",
|
|
769
|
+
subject: f.inventory_closingDraft,
|
|
770
|
+
actions: [t.read]
|
|
771
|
+
}
|
|
772
|
+
], ze = [
|
|
773
|
+
...x,
|
|
774
|
+
{
|
|
775
|
+
label: "Closing Draft",
|
|
776
|
+
subject: f.inventory_closingDraft,
|
|
777
|
+
actions: [t.read, t.create, t.update]
|
|
778
|
+
},
|
|
779
|
+
{
|
|
780
|
+
label: "Closing",
|
|
781
|
+
subject: f.inventory_closing,
|
|
782
|
+
actions: [t.read]
|
|
783
|
+
},
|
|
784
|
+
{
|
|
785
|
+
label: "Stock Recalculation",
|
|
786
|
+
subject: f.inventory_stockRecalculation,
|
|
787
|
+
actions: [t.read, t.update]
|
|
788
|
+
},
|
|
789
|
+
{
|
|
790
|
+
label: "Stock",
|
|
791
|
+
subject: f.inventory_stock,
|
|
792
|
+
actions: [t.read]
|
|
793
|
+
},
|
|
794
|
+
{
|
|
795
|
+
label: "Stock Adjustment",
|
|
796
|
+
subject: f.inventory_stockAdjustment,
|
|
797
|
+
actions: [t.read]
|
|
798
|
+
}
|
|
799
|
+
], Je = [
|
|
800
|
+
...x,
|
|
801
|
+
{
|
|
802
|
+
label: "Closing Template",
|
|
803
|
+
subject: f.inventory_closingTemplate,
|
|
804
|
+
actions: [
|
|
805
|
+
t.read,
|
|
806
|
+
t.create,
|
|
807
|
+
t.update,
|
|
808
|
+
t.delete
|
|
809
|
+
]
|
|
810
|
+
},
|
|
811
|
+
{
|
|
812
|
+
label: "Closing",
|
|
813
|
+
subject: f.inventory_closing,
|
|
814
|
+
actions: [t.read]
|
|
815
|
+
}
|
|
816
|
+
];
|
|
817
|
+
[
|
|
818
|
+
..._e,
|
|
819
|
+
...ze,
|
|
820
|
+
...Je
|
|
821
|
+
];
|
|
822
|
+
const Lt = [
|
|
823
|
+
{
|
|
824
|
+
label: "Inventory",
|
|
825
|
+
subject: f.inventory,
|
|
826
|
+
actions: [t.read, t.update]
|
|
827
|
+
},
|
|
828
|
+
{
|
|
829
|
+
label: "Order Template",
|
|
830
|
+
subject: f.inventory_orderTemplate,
|
|
831
|
+
actions: [t.read, t.update]
|
|
832
|
+
},
|
|
833
|
+
{
|
|
834
|
+
label: "Wastage Template",
|
|
835
|
+
subject: f.inventory_wastageTemplate,
|
|
836
|
+
actions: [t.read, t.update]
|
|
837
|
+
},
|
|
838
|
+
{
|
|
839
|
+
label: "Closing Template",
|
|
840
|
+
subject: f.inventory_closingTemplate,
|
|
841
|
+
actions: [t.read, t.update]
|
|
842
|
+
}
|
|
843
|
+
], Yt = [
|
|
844
|
+
{
|
|
845
|
+
label: "Inventory",
|
|
846
|
+
subject: f.inventory,
|
|
847
|
+
actions: [t.read, t.update]
|
|
848
|
+
}
|
|
849
|
+
], zt = [
|
|
850
|
+
{
|
|
851
|
+
label: "Inventory",
|
|
852
|
+
subject: f.inventory,
|
|
853
|
+
actions: [t.read, t.update]
|
|
854
|
+
}
|
|
855
|
+
], Jt = [
|
|
856
|
+
{
|
|
857
|
+
label: "Inventory",
|
|
858
|
+
subject: f.inventory,
|
|
859
|
+
actions: [t.read, t.update]
|
|
860
|
+
}
|
|
861
|
+
], We = [
|
|
862
|
+
{
|
|
863
|
+
label: "Purchase Order",
|
|
864
|
+
subject: f.inventory_purchaseOrder,
|
|
865
|
+
actions: [t.read, t.create, t.update]
|
|
866
|
+
},
|
|
867
|
+
{
|
|
868
|
+
label: "Inventory",
|
|
869
|
+
subject: f.inventory,
|
|
870
|
+
actions: [t.read, t.create, t.update]
|
|
871
|
+
},
|
|
872
|
+
{
|
|
873
|
+
label: "Closing",
|
|
874
|
+
subject: f.inventory_closing,
|
|
875
|
+
actions: [t.read]
|
|
876
|
+
},
|
|
877
|
+
{
|
|
878
|
+
label: "Order Template",
|
|
879
|
+
subject: f.inventory_orderTemplate,
|
|
880
|
+
actions: [t.read]
|
|
881
|
+
},
|
|
882
|
+
{
|
|
883
|
+
label: "Supplier",
|
|
884
|
+
subject: f.inventory_supplier,
|
|
885
|
+
actions: [t.read]
|
|
886
|
+
},
|
|
887
|
+
{
|
|
888
|
+
label: "Surcharge",
|
|
889
|
+
subject: f.inventory_surcharge,
|
|
890
|
+
actions: [t.read]
|
|
891
|
+
},
|
|
892
|
+
{
|
|
893
|
+
label: "Delivery Order",
|
|
894
|
+
subject: f.inventory_deliveryOrder,
|
|
895
|
+
actions: [t.read, t.create, t.update]
|
|
896
|
+
},
|
|
897
|
+
{
|
|
898
|
+
label: "Shipment",
|
|
899
|
+
subject: f.inventory_shipment,
|
|
900
|
+
actions: [t.read, t.update]
|
|
901
|
+
}
|
|
902
|
+
], Xe = [
|
|
903
|
+
{
|
|
904
|
+
label: "Purchase Order",
|
|
905
|
+
subject: f.inventory_purchaseOrder,
|
|
906
|
+
actions: [t.read, t.update]
|
|
907
|
+
},
|
|
908
|
+
{
|
|
909
|
+
label: "Inventory",
|
|
910
|
+
subject: f.inventory,
|
|
911
|
+
actions: [t.read, t.create, t.update]
|
|
912
|
+
},
|
|
913
|
+
{
|
|
914
|
+
label: "Delivery Order",
|
|
915
|
+
subject: f.inventory_deliveryOrder,
|
|
916
|
+
actions: [t.read, t.create, t.update]
|
|
917
|
+
},
|
|
918
|
+
{
|
|
919
|
+
label: "Shipment",
|
|
920
|
+
subject: f.inventory_shipment,
|
|
921
|
+
actions: [t.read, t.update]
|
|
922
|
+
}
|
|
923
|
+
], Ze = [
|
|
924
|
+
...x,
|
|
925
|
+
{
|
|
926
|
+
label: "Surcharge",
|
|
927
|
+
subject: f.inventory_surcharge,
|
|
928
|
+
actions: [
|
|
929
|
+
t.read,
|
|
930
|
+
t.create,
|
|
931
|
+
t.update,
|
|
932
|
+
t.delete
|
|
933
|
+
]
|
|
934
|
+
},
|
|
935
|
+
{
|
|
936
|
+
label: "Supplier",
|
|
937
|
+
subject: f.inventory_supplier,
|
|
938
|
+
actions: [t.read]
|
|
939
|
+
}
|
|
940
|
+
], Ke = [
|
|
941
|
+
...x,
|
|
942
|
+
{
|
|
943
|
+
label: "Order Template",
|
|
944
|
+
subject: f.inventory_orderTemplate,
|
|
945
|
+
actions: [
|
|
946
|
+
t.read,
|
|
947
|
+
t.create,
|
|
948
|
+
t.update,
|
|
949
|
+
t.delete
|
|
950
|
+
]
|
|
951
|
+
},
|
|
952
|
+
{
|
|
953
|
+
label: "Supplier",
|
|
954
|
+
subject: f.inventory_supplier,
|
|
955
|
+
actions: [t.read]
|
|
956
|
+
},
|
|
957
|
+
{
|
|
958
|
+
label: "Shipment",
|
|
959
|
+
subject: f.inventory_shipment,
|
|
960
|
+
actions: [t.read, t.update]
|
|
961
|
+
}
|
|
962
|
+
], Wt = [
|
|
963
|
+
...x,
|
|
964
|
+
{
|
|
965
|
+
label: "Order Draft Approval",
|
|
966
|
+
subject: f.inventory_orderDraftApproval,
|
|
967
|
+
actions: [t.update]
|
|
968
|
+
}
|
|
969
|
+
];
|
|
970
|
+
[
|
|
971
|
+
...We,
|
|
972
|
+
...Xe,
|
|
973
|
+
...Ze,
|
|
974
|
+
...Ke
|
|
975
|
+
];
|
|
976
|
+
const Xt = [
|
|
977
|
+
...x,
|
|
978
|
+
{
|
|
979
|
+
label: "Supplier",
|
|
980
|
+
subject: f.inventory_supplier,
|
|
981
|
+
actions: [
|
|
982
|
+
t.read,
|
|
983
|
+
t.create,
|
|
984
|
+
t.update,
|
|
985
|
+
t.delete
|
|
986
|
+
]
|
|
987
|
+
},
|
|
988
|
+
{
|
|
989
|
+
label: "Order Template",
|
|
990
|
+
subject: f.inventory_orderTemplate,
|
|
991
|
+
actions: [t.read, t.update]
|
|
992
|
+
}
|
|
993
|
+
], Zt = [
|
|
994
|
+
...x,
|
|
995
|
+
{
|
|
996
|
+
label: "Warehouse",
|
|
997
|
+
subject: f.inventory_warehouse,
|
|
998
|
+
actions: [
|
|
999
|
+
t.read,
|
|
1000
|
+
t.create,
|
|
1001
|
+
t.update,
|
|
1002
|
+
t.delete
|
|
1003
|
+
]
|
|
1004
|
+
}
|
|
1005
|
+
], Kt = [
|
|
1006
|
+
{
|
|
1007
|
+
label: "Inventory",
|
|
1008
|
+
subject: f.inventory,
|
|
1009
|
+
actions: [t.read, t.update]
|
|
1010
|
+
}
|
|
1011
|
+
], Qt = [
|
|
1012
|
+
...x,
|
|
1013
|
+
{
|
|
1014
|
+
label: "Inventory",
|
|
1015
|
+
subject: f.inventory,
|
|
1016
|
+
actions: [t.update]
|
|
1017
|
+
}
|
|
1018
|
+
], en = [
|
|
1019
|
+
...x,
|
|
1020
|
+
{
|
|
1021
|
+
label: "Integration",
|
|
1022
|
+
subject: f.inventory_integration,
|
|
1023
|
+
actions: [t.read, t.create, t.update]
|
|
1024
|
+
}
|
|
1025
|
+
];
|
|
1026
|
+
[
|
|
1027
|
+
...x,
|
|
1028
|
+
...be,
|
|
1029
|
+
..._e
|
|
1030
|
+
];
|
|
1031
|
+
const tn = {
|
|
1032
|
+
[`set_${s.inventory_stockBalance}`]: {
|
|
1033
|
+
key: "sys:inventory:stock_balance",
|
|
1034
|
+
name: "Stock Balance",
|
|
1035
|
+
permissions: be
|
|
1036
|
+
},
|
|
1037
|
+
[`set_${s.inventory_stockAdjustment}`]: {
|
|
1038
|
+
key: "sys:inventory:stock_adjustment",
|
|
1039
|
+
name: "Stock Adjustment",
|
|
1040
|
+
permissions: Gt
|
|
1041
|
+
},
|
|
1042
|
+
[`set_${s.inventory_unitCostHistory}`]: {
|
|
1043
|
+
key: "sys:inventory:unit_cost_history",
|
|
1044
|
+
name: "Unit Cost History",
|
|
1045
|
+
permissions: Le
|
|
1046
|
+
},
|
|
1047
|
+
[`set_${s.inventory_wastageTemplate}`]: {
|
|
1048
|
+
key: "sys:inventory:wastage_template",
|
|
1049
|
+
name: "Wastage Template",
|
|
1050
|
+
permissions: Ye
|
|
1051
|
+
},
|
|
1052
|
+
[`set_${s.inventory_closingHistory}`]: {
|
|
1053
|
+
key: "sys:inventory:closing_history",
|
|
1054
|
+
name: "Closing History",
|
|
1055
|
+
permissions: _e
|
|
1056
|
+
},
|
|
1057
|
+
[`set_${s.inventory_closingTemplate}`]: {
|
|
1058
|
+
key: "sys:inventory:closing_template",
|
|
1059
|
+
name: "Closing Template",
|
|
1060
|
+
permissions: Je
|
|
1061
|
+
},
|
|
1062
|
+
[`set_${s.inventory_closingDraft}`]: {
|
|
1063
|
+
key: "sys:inventory:closing_draft",
|
|
1064
|
+
name: "Closing Draft",
|
|
1065
|
+
permissions: ze
|
|
1066
|
+
},
|
|
1067
|
+
[`set_${s.inventory_ingredient}`]: {
|
|
1068
|
+
key: "sys:inventory:ingredient",
|
|
1069
|
+
name: "Ingredient",
|
|
1070
|
+
permissions: Lt
|
|
1071
|
+
},
|
|
1072
|
+
[`set_${s.inventory_ingredientGroup}`]: {
|
|
1073
|
+
key: "sys:inventory:ingredient_group",
|
|
1074
|
+
name: "Ingredient Group",
|
|
1075
|
+
permissions: Yt
|
|
1076
|
+
},
|
|
1077
|
+
[`set_${s.inventory_recipe}`]: {
|
|
1078
|
+
key: "sys:inventory:recipe",
|
|
1079
|
+
name: "Recipe",
|
|
1080
|
+
permissions: zt
|
|
1081
|
+
},
|
|
1082
|
+
[`set_${s.inventory_unit}`]: {
|
|
1083
|
+
key: "sys:inventory:unit",
|
|
1084
|
+
name: "Unit",
|
|
1085
|
+
permissions: Jt
|
|
1086
|
+
},
|
|
1087
|
+
[`set_${s.inventory_purchaseTransfer}`]: {
|
|
1088
|
+
key: "sys:inventory:purchase_transfer",
|
|
1089
|
+
name: "Purchase Transfer",
|
|
1090
|
+
permissions: We
|
|
1091
|
+
},
|
|
1092
|
+
[`set_${s.inventory_orderDraftApproval}`]: {
|
|
1093
|
+
key: "sys:inventory:order_draft_approval",
|
|
1094
|
+
name: "Order Draft Approval",
|
|
1095
|
+
permissions: Wt
|
|
1096
|
+
},
|
|
1097
|
+
[`set_${s.inventory_transferOut}`]: {
|
|
1098
|
+
key: "sys:inventory:transfer_out",
|
|
1099
|
+
name: "Transfer Out",
|
|
1100
|
+
permissions: Xe
|
|
1101
|
+
},
|
|
1102
|
+
[`set_${s.inventory_surcharge}`]: {
|
|
1103
|
+
key: "sys:inventory:surcharge",
|
|
1104
|
+
name: "Surcharge",
|
|
1105
|
+
permissions: Ze
|
|
1106
|
+
},
|
|
1107
|
+
[`set_${s.inventory_orderTemplate}`]: {
|
|
1108
|
+
key: "sys:inventory:order_template",
|
|
1109
|
+
name: "Order Template",
|
|
1110
|
+
permissions: Ke
|
|
1111
|
+
},
|
|
1112
|
+
[`set_${s.inventory_supplier}`]: {
|
|
1113
|
+
key: "sys:inventory:supplier",
|
|
1114
|
+
name: "Supplier",
|
|
1115
|
+
permissions: Xt
|
|
1116
|
+
},
|
|
1117
|
+
[`set_${s.inventory_warehouse}`]: {
|
|
1118
|
+
key: "sys:inventory:warehouse",
|
|
1119
|
+
name: "Warehouse",
|
|
1120
|
+
permissions: Zt
|
|
1121
|
+
},
|
|
1122
|
+
[`set_${s.inventory_publish}`]: {
|
|
1123
|
+
key: "sys:inventory:publish",
|
|
1124
|
+
name: "Publish",
|
|
1125
|
+
permissions: Kt
|
|
1126
|
+
},
|
|
1127
|
+
[`set_${s.inventory_import}`]: {
|
|
1128
|
+
key: "sys:inventory:import",
|
|
1129
|
+
name: "Import",
|
|
1130
|
+
permissions: Qt
|
|
1131
|
+
},
|
|
1132
|
+
[`set_${s.inventory_integration}`]: {
|
|
1133
|
+
key: "sys:inventory:integration",
|
|
1134
|
+
name: "Integration",
|
|
1135
|
+
permissions: en
|
|
1136
|
+
}
|
|
1137
|
+
};
|
|
1138
|
+
var z = /* @__PURE__ */ ((e) => (e.hrm_posRole = "hrm::posRole", e.hrm_portalUsers = "hrm::portalUsers", e))(z || {});
|
|
1139
|
+
const nn = {
|
|
1140
|
+
/**
|
|
1141
|
+
* Triggered by: hrm_teamMember:manage (portal toggle)
|
|
1142
|
+
* Injects: team member list read + pos role read
|
|
1143
|
+
* Users who can manage team members need to see the team member list and assign POS roles.
|
|
1144
|
+
*/
|
|
1145
|
+
[`set_${s.hrm_teamMember}`]: {
|
|
1146
|
+
key: "sys:team_member_access",
|
|
1147
|
+
name: "Team Member Access",
|
|
1148
|
+
permissions: [
|
|
1149
|
+
{
|
|
1150
|
+
label: "Portal Users",
|
|
1151
|
+
subject: z.hrm_portalUsers,
|
|
1152
|
+
actions: [t.manage]
|
|
1153
|
+
},
|
|
1154
|
+
{
|
|
1155
|
+
label: "Role resource",
|
|
1156
|
+
subject: s.role,
|
|
1157
|
+
actions: [t.read, t.update]
|
|
1158
|
+
},
|
|
1159
|
+
{
|
|
1160
|
+
label: "Pos Role",
|
|
1161
|
+
subject: z.hrm_posRole,
|
|
1162
|
+
actions: [t.read]
|
|
1163
|
+
}
|
|
1164
|
+
]
|
|
1165
|
+
},
|
|
1166
|
+
/**
|
|
1167
|
+
* Triggered by: hrm_employee:manage (portal toggle)
|
|
1168
|
+
* Injects: pos role read + restaurant manage (cross-level: needed for employee–restaurant linking)
|
|
1169
|
+
*/
|
|
1170
|
+
[`set_${s.hrm_employee}`]: {
|
|
1171
|
+
key: "sys:employee_access",
|
|
1172
|
+
name: "Employee Access",
|
|
1173
|
+
permissions: [
|
|
1174
|
+
{
|
|
1175
|
+
label: "Portal Users",
|
|
1176
|
+
subject: z.hrm_portalUsers,
|
|
1177
|
+
actions: [t.read]
|
|
1178
|
+
},
|
|
1179
|
+
{
|
|
1180
|
+
label: "Restaurant resource",
|
|
1181
|
+
subject: s.restaurant,
|
|
1182
|
+
actions: [t.read]
|
|
1183
|
+
},
|
|
1184
|
+
{
|
|
1185
|
+
label: "Pos Role",
|
|
1186
|
+
subject: z.hrm_posRole,
|
|
1187
|
+
actions: [t.manage]
|
|
1188
|
+
}
|
|
1189
|
+
]
|
|
1190
|
+
},
|
|
1191
|
+
/**
|
|
1192
|
+
* Triggered by: hrm_auditLog:manage (portal toggle)
|
|
1193
|
+
* Injects: portal user list read — audit log must resolve portal user names from the list API.
|
|
1194
|
+
* Uses HrmResource.hrm_portalUsers (not the module subject hrm_teamMember) to avoid
|
|
1195
|
+
* conflating the audit-log read dependency with the full team-management module grant.
|
|
1196
|
+
*/
|
|
1197
|
+
[`set_${s.hrm_auditLog}`]: {
|
|
1198
|
+
key: "sys:audit_log_access",
|
|
1199
|
+
name: "Audit Log Access",
|
|
1200
|
+
permissions: [
|
|
1201
|
+
{
|
|
1202
|
+
label: "Portal Users",
|
|
1203
|
+
subject: z.hrm_portalUsers,
|
|
1204
|
+
actions: [t.read]
|
|
1205
|
+
}
|
|
1206
|
+
]
|
|
1207
|
+
}
|
|
1208
|
+
};
|
|
1209
|
+
var Qe = /* @__PURE__ */ ((e) => (e.payment_terminals = "payment::terminals", e))(Qe || {});
|
|
1210
|
+
const Pe = [
|
|
1211
|
+
{
|
|
1212
|
+
label: "Payout Account",
|
|
1213
|
+
subject: s.payment_payoutAccount,
|
|
1214
|
+
actions: [t.read]
|
|
1215
|
+
},
|
|
1216
|
+
{
|
|
1217
|
+
label: "Payment Terminals",
|
|
1218
|
+
subject: Qe.payment_terminals,
|
|
1219
|
+
actions: [t.read]
|
|
1220
|
+
}
|
|
1221
|
+
], rn = {
|
|
1222
|
+
[`set_${s.payment_transactions}`]: {
|
|
1223
|
+
key: "sys:payment:transactions",
|
|
1224
|
+
name: "Payment Transactions Access",
|
|
1225
|
+
permissions: Pe
|
|
1226
|
+
},
|
|
1227
|
+
[`set_${s.payment_settlements}`]: {
|
|
1228
|
+
key: "sys:payment:settlements",
|
|
1229
|
+
name: "Payment Settlements Access",
|
|
1230
|
+
permissions: Pe
|
|
1231
|
+
}
|
|
1232
|
+
}, sn = {
|
|
1233
|
+
...tn,
|
|
1234
|
+
...nn,
|
|
1235
|
+
...rn
|
|
1236
|
+
};
|
|
1237
|
+
Object.values(
|
|
1238
|
+
sn
|
|
1239
|
+
).flatMap((e) => e.permissions ?? []).reduce(
|
|
1240
|
+
(e, u) => {
|
|
1241
|
+
var l;
|
|
1242
|
+
return e[l = u.subject] ?? (e[l] = u.label), e;
|
|
1243
|
+
},
|
|
1244
|
+
{}
|
|
1245
|
+
);
|
|
1246
|
+
function et(e) {
|
|
1247
|
+
return e.map((u) => ({
|
|
1248
|
+
...u,
|
|
1249
|
+
subject: Bt(u.subject),
|
|
1250
|
+
reason: u.source !== void 0 ? JSON.stringify(u.source) : u.reason
|
|
1251
|
+
}));
|
|
1252
|
+
}
|
|
1253
|
+
function on(e) {
|
|
1254
|
+
return new Ge(et(e));
|
|
1255
|
+
}
|
|
1256
|
+
function an(e) {
|
|
1257
|
+
return new Ge(et(e), {
|
|
1258
|
+
subjectName(u) {
|
|
1259
|
+
return typeof u != "string" && u.subjectType ? u.subjectType : u;
|
|
1260
|
+
}
|
|
1261
|
+
});
|
|
1262
|
+
}
|
|
1263
|
+
function Fe(e, u, l) {
|
|
1264
|
+
const i = Array.isArray(e) ? e : [e], o = l !== void 0 ? an(u) : on(u), a = (_) => _.subject, m = (_) => o.can(_.action, a(_), _.field) ? !0 : _.coverSubject !== void 0 ? o.can(_.action, _.coverSubject, _.field) : !1, p = i.find((_) => !m(_));
|
|
1265
|
+
if (p) {
|
|
1266
|
+
const _ = o.relevantRuleFor(
|
|
1267
|
+
p.action,
|
|
1268
|
+
a(p),
|
|
1269
|
+
p.field
|
|
1270
|
+
);
|
|
1271
|
+
return {
|
|
1272
|
+
granted: !1,
|
|
1273
|
+
decisivePermission: p,
|
|
1274
|
+
decisiveRule: _ ?? null
|
|
1275
|
+
};
|
|
1276
|
+
}
|
|
1277
|
+
const j = i[0], k = o.relevantRuleFor(j.action, a(j), j.field);
|
|
1278
|
+
return { granted: !0, decisivePermission: j, decisiveRule: k ?? null };
|
|
1279
|
+
}
|
|
1280
|
+
const un = { class: "space-y-24 mb-24" }, cn = ["innerHTML"], ln = { class: "flex justify-end gap-8" }, mn = /* @__PURE__ */ ve({
|
|
1281
|
+
__name: "ConfirmActionDialog",
|
|
1282
|
+
props: {
|
|
1283
|
+
description: {},
|
|
1284
|
+
value: {},
|
|
1285
|
+
message: { default: "To confirm your action, type <b>[[value]]</b> in the text field." }
|
|
1286
|
+
},
|
|
1287
|
+
setup(e) {
|
|
1288
|
+
const u = e, l = H(() => u.message.replace("[[value]]", u.value)), i = De(""), o = Ve(), { emitAction: a } = mt();
|
|
1289
|
+
return (m, p) => {
|
|
1290
|
+
const j = Z("FmTextField"), k = Z("FmButton"), _ = Z("FmForm");
|
|
1291
|
+
return D(), N(_, {
|
|
1292
|
+
"on-validation-success": () => g(a)("primary"),
|
|
1293
|
+
"blame-form-child-on-validation-failed": ""
|
|
1294
|
+
}, {
|
|
1295
|
+
default: q(() => [
|
|
1296
|
+
U("div", un, [
|
|
1297
|
+
U("div", null, Ee(m.description), 1),
|
|
1298
|
+
U("div", { innerHTML: l.value }, null, 8, cn),
|
|
1299
|
+
U("div", null, [
|
|
1300
|
+
E(j, {
|
|
1301
|
+
modelValue: i.value,
|
|
1302
|
+
"onUpdate:modelValue": [
|
|
1303
|
+
p[0] || (p[0] = (S) => i.value = S),
|
|
1304
|
+
p[1] || (p[1] = () => {
|
|
1305
|
+
})
|
|
1306
|
+
],
|
|
1307
|
+
placeholder: m.value,
|
|
1308
|
+
rules: [(S) => S === m.value || "Value does not match"]
|
|
1309
|
+
}, null, 8, ["modelValue", "placeholder", "rules"])
|
|
1310
|
+
]),
|
|
1311
|
+
U("div", ln, [
|
|
1312
|
+
E(k, {
|
|
1313
|
+
label: "Cancel",
|
|
1314
|
+
variant: "secondary",
|
|
1315
|
+
onClick: p[2] || (p[2] = (S) => g(o).close())
|
|
1316
|
+
}),
|
|
1317
|
+
E(k, {
|
|
1318
|
+
label: "Confirm",
|
|
1319
|
+
type: "submit"
|
|
1320
|
+
})
|
|
1321
|
+
])
|
|
1322
|
+
])
|
|
1323
|
+
]),
|
|
1324
|
+
_: 1
|
|
1325
|
+
}, 8, ["on-validation-success"]);
|
|
1326
|
+
};
|
|
1327
|
+
}
|
|
1328
|
+
}), pn = /* @__PURE__ */ ve({
|
|
1329
|
+
__name: "Migrate",
|
|
1330
|
+
setup(e) {
|
|
1331
|
+
const u = Ie(), l = Ue(), i = qe(), { minor: o } = Ne(i), a = De(!1), m = Ve();
|
|
1332
|
+
async function p() {
|
|
1333
|
+
j.value || a.value || m.open({
|
|
1334
|
+
title: "Migrate to new version",
|
|
1335
|
+
contentComponent: mn,
|
|
1336
|
+
contentComponentProps: {
|
|
1337
|
+
value: "MIGRATE",
|
|
1338
|
+
description: "Do you want to migrate to new version? Once migrate it will unable to revert to the older version."
|
|
1339
|
+
}
|
|
1340
|
+
}).onPrimary(async () => {
|
|
1341
|
+
m.close(), await o(
|
|
1342
|
+
async () => {
|
|
1343
|
+
await u.migrate(), setTimeout(() => {
|
|
1344
|
+
window.location.reload();
|
|
1345
|
+
}, 2e3);
|
|
1346
|
+
},
|
|
1347
|
+
{
|
|
1348
|
+
isLoading: a,
|
|
1349
|
+
customId: u.state.menu._id,
|
|
1350
|
+
message: "Migrating menu",
|
|
1351
|
+
successMessage: "Migration completed"
|
|
1352
|
+
}
|
|
1353
|
+
);
|
|
1354
|
+
});
|
|
1355
|
+
}
|
|
1356
|
+
const j = H(() => {
|
|
1357
|
+
const k = l.restaurants.value;
|
|
1358
|
+
if (!k.length) return "Required at least one restaurant to migrate";
|
|
1359
|
+
const _ = k.filter((P) => !P.posVersion || !Se.Pos.canUse({ feature: we.F_FEATURE.enum.menuV4, posVersion: P.posVersion }));
|
|
1360
|
+
return _.length ? `Upgrade POS to V${Se.Pos.minVersionToUse(we.F_FEATURE.enum.menuV4)} to use new menu: ${_.map((P) => P.profile.name).join(", ")}` : null;
|
|
1361
|
+
});
|
|
1362
|
+
return H(() => j.value ? j.value : "Migrate your menu to new version to enjoy more features. Content of new menu will remain the same as current."), (k, _) => {
|
|
1363
|
+
const S = Z("FmSnackbar");
|
|
1364
|
+
return !j.value && g(u).version !== g(He.F_MENU_VERSION).enum.v4 ? (D(), N(S, {
|
|
1365
|
+
key: 0,
|
|
1366
|
+
class: "!max-w-full",
|
|
1367
|
+
title: "New version of menu is out now!",
|
|
1368
|
+
description: "Migrate your current menu version to the latest to enjoy more features such as product sequential dispatch, serving sequence, scheduler and more! Your content and current setting will be preserved.",
|
|
1369
|
+
variant: "info",
|
|
1370
|
+
action: "Migrate",
|
|
1371
|
+
"z-index": 0,
|
|
1372
|
+
onOnAction: p
|
|
1373
|
+
})) : X("", !0);
|
|
1374
|
+
};
|
|
1375
|
+
}
|
|
1376
|
+
}), yn = "/assets/menu-export-BHcaWhM3.js", dn = { class: "flex-1 flex justify-between gap-8 pl-8" }, fn = { class: "flex items-center" }, vn = { class: "bg-fm-color-neutral-gray-100 rounded-md px-8 py-4" }, bn = { class: "fm-typo-en-body-md-600 font-semibold" }, _n = { class: "flex gap-8" }, En = /* @__PURE__ */ ve({
|
|
1377
|
+
__name: "Products",
|
|
1378
|
+
setup(e) {
|
|
1379
|
+
const { t: u } = lt(), l = Ue(), i = Ne(qe()), o = Ie(), a = H(() => o.rules.item), m = bt(), p = H(() => !o.state.currentSchedulerId), { selectedCategories: j } = ft(), k = H(() => ({
|
|
1380
|
+
...it.menuV4ToV3(at(o.state.menu)),
|
|
1381
|
+
_id: o.state.menu._id,
|
|
1382
|
+
_rev: o.state.menu._rev
|
|
1383
|
+
})), _ = H(() => {
|
|
1384
|
+
const T = $e.flatten(j.value.map((w) => w.items));
|
|
1385
|
+
return $e.uniqBy(T, (w) => w._id).length;
|
|
1386
|
+
});
|
|
1387
|
+
async function S(T, w) {
|
|
1388
|
+
const n = new rt();
|
|
1389
|
+
for (let c = 0; c < T.length; c++)
|
|
1390
|
+
n.file(`${w[c]}.xlsx`, T[c]);
|
|
1391
|
+
const r = await n.generateAsync({ type: "blob" });
|
|
1392
|
+
st.saveAs(r, `books_${le().format("DD-MM-YYYY_HH-mm")}.zip`);
|
|
1393
|
+
}
|
|
1394
|
+
async function P() {
|
|
1395
|
+
await i.minor(
|
|
1396
|
+
async () => {
|
|
1397
|
+
if (await o.readMenu(), o.version === He.F_MENU_VERSION.enum.v4) {
|
|
1398
|
+
const T = o.state.menu, w = le().format("DD-MM-YYYY_HH-mm"), n = [
|
|
1399
|
+
`menu_${w}`,
|
|
1400
|
+
`addonGroup_${w}`,
|
|
1401
|
+
`itemLinkedAddon_${w}`
|
|
1402
|
+
], r = await ut(
|
|
1403
|
+
yn,
|
|
1404
|
+
JSON.stringify({
|
|
1405
|
+
menu: T,
|
|
1406
|
+
attributeSettings: l.itemAttributeSettings.value
|
|
1407
|
+
})
|
|
1408
|
+
);
|
|
1409
|
+
await S(r, n);
|
|
1410
|
+
} else {
|
|
1411
|
+
const T = jt(k.value), w = `menu_${le().format("DD-MM-YYYY_HH-mm")}`;
|
|
1412
|
+
await ct(T, `${w}.xlsx`, {
|
|
1413
|
+
bookType: "xlsx",
|
|
1414
|
+
bookSST: !0,
|
|
1415
|
+
type: "array",
|
|
1416
|
+
compression: !0
|
|
1417
|
+
});
|
|
1418
|
+
}
|
|
1419
|
+
},
|
|
1420
|
+
{ successMessage: "Menu exported", customId: o.state.menu._id }
|
|
1421
|
+
);
|
|
1422
|
+
}
|
|
1423
|
+
const {
|
|
1424
|
+
menuItems: R,
|
|
1425
|
+
categories: M,
|
|
1426
|
+
linkItemRules: F,
|
|
1427
|
+
handleSubmit: I,
|
|
1428
|
+
catalogManager: K,
|
|
1429
|
+
schedulerManager: Q
|
|
1430
|
+
} = ht(!1), B = pt(), L = H(() => B.breakpoints.value.xs), ee = H(() => {
|
|
1431
|
+
var n;
|
|
1432
|
+
const T = ((n = l.sessionUser.value) == null ? void 0 : n.permissions) ?? [], w = {
|
|
1433
|
+
action: se.Action.manage,
|
|
1434
|
+
subject: se.Subject.Business.menu_menuManagement
|
|
1435
|
+
};
|
|
1436
|
+
return Fe([w], T).granted;
|
|
1437
|
+
}), te = H(() => {
|
|
1438
|
+
var n;
|
|
1439
|
+
const T = ((n = l.sessionUser.value) == null ? void 0 : n.permissions) ?? [], w = {
|
|
1440
|
+
action: se.Action.manage,
|
|
1441
|
+
subject: se.Subject.Business.menu_importExport
|
|
1442
|
+
};
|
|
1443
|
+
return Fe([w], T).granted;
|
|
1444
|
+
});
|
|
1445
|
+
return vt().resetOnMount(), (T, w) => {
|
|
1446
|
+
const n = Z("fm-button");
|
|
1447
|
+
return D(), N(dt, {
|
|
1448
|
+
heading: g(u)("menu.products.title")
|
|
1449
|
+
}, {
|
|
1450
|
+
default: q(() => [
|
|
1451
|
+
E(pn),
|
|
1452
|
+
E(_t)
|
|
1453
|
+
]),
|
|
1454
|
+
"append-heading": q(() => [
|
|
1455
|
+
U("div", dn, [
|
|
1456
|
+
U("div", fn, [
|
|
1457
|
+
U("div", vn, [
|
|
1458
|
+
U("p", bn, Ee(_.value), 1)
|
|
1459
|
+
])
|
|
1460
|
+
]),
|
|
1461
|
+
U("div", _n, [
|
|
1462
|
+
L.value ? (D(), N(Oe, { key: 1 }, {
|
|
1463
|
+
default: q(({ trigger: r }) => [
|
|
1464
|
+
E(yt, null, {
|
|
1465
|
+
default: q(() => [
|
|
1466
|
+
E(Re, {
|
|
1467
|
+
label: g(u)("menu.products.actions.export"),
|
|
1468
|
+
onClick: P
|
|
1469
|
+
}, null, 8, ["label"]),
|
|
1470
|
+
E(Re, {
|
|
1471
|
+
label: g(u)("menu.products.actions.import"),
|
|
1472
|
+
onClick: r
|
|
1473
|
+
}, null, 8, ["label", "onClick"])
|
|
1474
|
+
]),
|
|
1475
|
+
_: 2
|
|
1476
|
+
}, 1024)
|
|
1477
|
+
]),
|
|
1478
|
+
_: 1
|
|
1479
|
+
})) : (D(), je(ke, { key: 0 }, [
|
|
1480
|
+
ee.value ? (D(), N(gt, { key: 0 }, {
|
|
1481
|
+
default: q(({ trigger: r }) => [
|
|
1482
|
+
E(n, {
|
|
1483
|
+
label: g(u)("menu.tree_editor.title"),
|
|
1484
|
+
"bg-color": g(Y).NeutralGray100,
|
|
1485
|
+
"text-color": g(Y).TypoSecondary,
|
|
1486
|
+
variant: g(me).Primary,
|
|
1487
|
+
onClick: r
|
|
1488
|
+
}, null, 8, ["label", "bg-color", "text-color", "variant", "onClick"])
|
|
1489
|
+
]),
|
|
1490
|
+
_: 1
|
|
1491
|
+
})) : X("", !0),
|
|
1492
|
+
te.value ? (D(), N(n, {
|
|
1493
|
+
key: 1,
|
|
1494
|
+
"bg-color": g(Y).NeutralGray100,
|
|
1495
|
+
"text-color": g(Y).TypoSecondary,
|
|
1496
|
+
variant: g(me).Primary,
|
|
1497
|
+
label: g(u)("menu.products.actions.export"),
|
|
1498
|
+
onClick: P
|
|
1499
|
+
}, null, 8, ["bg-color", "text-color", "variant", "label"])) : X("", !0),
|
|
1500
|
+
te.value ? (D(), N(Oe, { key: 2 }, {
|
|
1501
|
+
default: q(({ trigger: r }) => [
|
|
1502
|
+
E(n, {
|
|
1503
|
+
"bg-color": g(Y).NeutralGray100,
|
|
1504
|
+
"text-color": g(Y).TypoSecondary,
|
|
1505
|
+
variant: g(me).Primary,
|
|
1506
|
+
label: g(u)("menu.products.actions.import"),
|
|
1507
|
+
onClick: r
|
|
1508
|
+
}, null, 8, ["bg-color", "text-color", "variant", "label", "onClick"])
|
|
1509
|
+
]),
|
|
1510
|
+
_: 1
|
|
1511
|
+
})) : X("", !0)
|
|
1512
|
+
], 64)),
|
|
1513
|
+
_.value > 0 ? (D(), je(ke, { key: 2 }, [
|
|
1514
|
+
a.value.create ? (D(), N(pe, {
|
|
1515
|
+
key: 0,
|
|
1516
|
+
label: g(u)("menu.products.actions.add"),
|
|
1517
|
+
"prepend-icon": "add",
|
|
1518
|
+
onClick: w[0] || (w[0] = (r) => g(m).create(null))
|
|
1519
|
+
}, null, 8, ["label"])) : p.value ? (D(), N(Te, {
|
|
1520
|
+
key: 1,
|
|
1521
|
+
"categorized-items": g(K).linkableItems.value,
|
|
1522
|
+
"initial-value": g(K).currentItems.value,
|
|
1523
|
+
"show-variant": !1,
|
|
1524
|
+
"menu-items": g(R),
|
|
1525
|
+
categories: g(M),
|
|
1526
|
+
"link-item-rules": g(F),
|
|
1527
|
+
"no-scheduler": p.value,
|
|
1528
|
+
onSubmit: g(I)
|
|
1529
|
+
}, {
|
|
1530
|
+
default: q(({ trigger: r }) => [
|
|
1531
|
+
E(pe, {
|
|
1532
|
+
label: g(u)("menu.products.actions.link"),
|
|
1533
|
+
"prepend-icon": "link",
|
|
1534
|
+
onClick: r
|
|
1535
|
+
}, null, 8, ["label", "onClick"])
|
|
1536
|
+
]),
|
|
1537
|
+
_: 1
|
|
1538
|
+
}, 8, ["categorized-items", "initial-value", "menu-items", "categories", "link-item-rules", "no-scheduler", "onSubmit"])) : (D(), N(Te, {
|
|
1539
|
+
key: 2,
|
|
1540
|
+
"categorized-items": g(Q).linkableItems.value,
|
|
1541
|
+
"initial-value": g(Q).currentItems.value,
|
|
1542
|
+
"show-variant": !1,
|
|
1543
|
+
"menu-items": g(R),
|
|
1544
|
+
categories: g(M),
|
|
1545
|
+
"link-item-rules": g(F),
|
|
1546
|
+
"no-scheduler": p.value,
|
|
1547
|
+
onSubmit: g(I)
|
|
1548
|
+
}, {
|
|
1549
|
+
default: q(({ trigger: r }) => [
|
|
1550
|
+
E(pe, {
|
|
1551
|
+
label: g(u)("menu.products.actions.apply_scheduler"),
|
|
1552
|
+
onClick: r
|
|
1553
|
+
}, null, 8, ["label", "onClick"])
|
|
1554
|
+
]),
|
|
1555
|
+
_: 1
|
|
1556
|
+
}, 8, ["categorized-items", "initial-value", "menu-items", "categories", "link-item-rules", "no-scheduler", "onSubmit"]))
|
|
1557
|
+
], 64)) : X("", !0)
|
|
1558
|
+
])
|
|
1559
|
+
])
|
|
1560
|
+
]),
|
|
1561
|
+
_: 1
|
|
1562
|
+
}, 8, ["heading"]);
|
|
1563
|
+
};
|
|
1564
|
+
}
|
|
1565
|
+
});
|
|
1566
|
+
export {
|
|
1567
|
+
En as default
|
|
1568
|
+
};
|