@feedmepos/mf-hrm-portal 2.0.3-dev.3 → 2.0.3-dev.5
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/{AuditLogList-ssYtQ2J1.js → AuditLogList-CV-y1xix.js} +28 -28
- package/dist/{EmployeeList-CNNgH2vX.js → EmployeeList-DDbML16v.js} +5 -5
- package/dist/{Main-DAcmCNsi.js → Main-CHG4jcIV.js} +8 -8
- package/dist/{Main-DmaUVB5Y.js → Main-CoY-GVfR.js} +5 -5
- package/dist/{PermissionSetList-CybAQCrm.js → PermissionSetList-BpbcJwgS.js} +27 -27
- package/dist/{PortalPermissionEditor.vue_vue_type_script_setup_true_lang-6Vgf4lIX.js → PortalPermissionEditor.vue_vue_type_script_setup_true_lang-CUqD40tX.js} +361 -361
- package/dist/{RoleList-rv6egTFo.js → RoleList-DU6TSPjK.js} +6 -6
- package/dist/{TeamMemberList-JjUw7Pdt.js → TeamMemberList-BPhlYPcR.js} +7 -7
- package/dist/{TimesheetList-lYmFc7sY.js → TimesheetList-BZX7mz7l.js} +6 -6
- package/dist/{app-BF5fWLn5.js → app-CsL8zF1K.js} +703 -789
- package/dist/app.js +1 -1
- package/dist/{dayjs.min-_VE-J0yP.js → dayjs.min-DEds7FgH.js} +1 -1
- package/dist/{employee-BDPrgphI.js → employee-7Dzn6dfg.js} +3 -3
- package/dist/{index-CdQ13eT1.js → index-BWPzcUza.js} +1 -1
- package/dist/{index-CFGp5zzo.js → index-C5JbANxF.js} +652 -631
- package/dist/{lodash-CucjoHYl.js → lodash-OC-U-Tc5.js} +1 -1
- package/dist/src/helpers/permission-set.d.ts +1 -1
- package/dist/{team-DzG7du5b.js → team-WEakcs7T.js} +1 -1
- package/dist/{timesheet-BHNzrve1.js → timesheet-ORUr4kLh.js} +2 -2
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/{useAppStore-D4PCstqq.js → useAppStore-BecgT5CH.js} +1 -1
- package/dist/{useLoading-wggM_LZw.js → useLoading-C-sYO9Ah.js} +1 -1
- package/dist/{useReportPermissions-C2cFzRyt.js → useReportPermissions-C0YEiS2R.js} +2 -2
- package/package.json +1 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { h as
|
|
1
|
+
import { h as be, defineComponent as I, ref as S, renderSlot as Ce, createBlock as _, onMounted as oe, openBlock as z, createElementBlock as ve, createElementVNode as P, unref as se, toDisplayString as pe, watch as we, nextTick as fe, onBeforeUnmount as nt, computed as Ge, normalizeStyle as ot, resolveComponent as ce, withCtx as ct, createVNode as it, defineAsyncComponent as lt, watchEffect as ut } from "vue";
|
|
2
2
|
import { useBreakpoints as gt } from "@feedmepos/ui-library";
|
|
3
3
|
import { useRoute as mt, useRouter as dt } from "vue-router";
|
|
4
|
-
import { useI18n as
|
|
5
|
-
const
|
|
4
|
+
import { useI18n as he, useCoreStore as Bt } from "@feedmepos/mf-common";
|
|
5
|
+
const ye = {
|
|
6
6
|
title: "Audit Log",
|
|
7
7
|
dateRange: {
|
|
8
8
|
placeholder: "Select date range"
|
|
@@ -71,12 +71,12 @@ const he = {
|
|
|
71
71
|
requestPath: "Request Path",
|
|
72
72
|
requestBody: "Request Body"
|
|
73
73
|
}
|
|
74
|
-
},
|
|
75
|
-
auditLog:
|
|
76
|
-
},
|
|
74
|
+
}, bt = {
|
|
75
|
+
auditLog: ye
|
|
76
|
+
}, pt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
77
77
|
__proto__: null,
|
|
78
|
-
auditLog:
|
|
79
|
-
default:
|
|
78
|
+
auditLog: ye,
|
|
79
|
+
default: bt
|
|
80
80
|
}, Symbol.toStringTag, { value: "Module" })), Ve = {
|
|
81
81
|
title: "บันทึกการตรวจสอบ",
|
|
82
82
|
dateRange: {
|
|
@@ -306,7 +306,7 @@ const he = {
|
|
|
306
306
|
auditLog: Ee,
|
|
307
307
|
default: Yt
|
|
308
308
|
}, Symbol.toStringTag, { value: "Module" })), vt = {
|
|
309
|
-
"en-US":
|
|
309
|
+
"en-US": pt,
|
|
310
310
|
"zh-CN": Mt,
|
|
311
311
|
"th-TH": ft,
|
|
312
312
|
"zh-Hant": Ct
|
|
@@ -463,11 +463,11 @@ const he = {
|
|
|
463
463
|
placeholder: "Search restaurant"
|
|
464
464
|
}
|
|
465
465
|
}
|
|
466
|
-
},
|
|
466
|
+
}, Gt = {
|
|
467
467
|
hr: xe
|
|
468
|
-
},
|
|
468
|
+
}, ht = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
469
469
|
__proto__: null,
|
|
470
|
-
default:
|
|
470
|
+
default: Gt,
|
|
471
471
|
hr: xe
|
|
472
472
|
}, Symbol.toStringTag, { value: "Module" })), Qe = {
|
|
473
473
|
employee: {
|
|
@@ -621,11 +621,11 @@ const he = {
|
|
|
621
621
|
placeholder: "ค้นหาร้านอาหาร"
|
|
622
622
|
}
|
|
623
623
|
}
|
|
624
|
-
},
|
|
624
|
+
}, yt = {
|
|
625
625
|
hr: Qe
|
|
626
626
|
}, Vt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
627
627
|
__proto__: null,
|
|
628
|
-
default:
|
|
628
|
+
default: yt,
|
|
629
629
|
hr: Qe
|
|
630
630
|
}, Symbol.toStringTag, { value: "Module" })), Xe = {
|
|
631
631
|
employee: {
|
|
@@ -941,7 +941,7 @@ const he = {
|
|
|
941
941
|
default: xt,
|
|
942
942
|
hr: qe
|
|
943
943
|
}, Symbol.toStringTag, { value: "Module" })), Xt = {
|
|
944
|
-
"en-US":
|
|
944
|
+
"en-US": ht,
|
|
945
945
|
"zh-CN": Et,
|
|
946
946
|
"th-TH": Vt,
|
|
947
947
|
"zh-Hant": Qt
|
|
@@ -1525,26 +1525,26 @@ function Ut(e) {
|
|
|
1525
1525
|
}
|
|
1526
1526
|
var We = { exports: {} };
|
|
1527
1527
|
(function(e, o) {
|
|
1528
|
-
(function(
|
|
1529
|
-
e.exports =
|
|
1528
|
+
(function(c, A) {
|
|
1529
|
+
e.exports = A();
|
|
1530
1530
|
})(Wt, function() {
|
|
1531
|
-
return function(
|
|
1532
|
-
var
|
|
1533
|
-
function
|
|
1534
|
-
if (
|
|
1535
|
-
var u =
|
|
1536
|
-
return
|
|
1531
|
+
return function(c) {
|
|
1532
|
+
var A = {};
|
|
1533
|
+
function r(n) {
|
|
1534
|
+
if (A[n]) return A[n].exports;
|
|
1535
|
+
var u = A[n] = { i: n, l: !1, exports: {} };
|
|
1536
|
+
return c[n].call(u.exports, u, u.exports, r), u.l = !0, u.exports;
|
|
1537
1537
|
}
|
|
1538
|
-
return
|
|
1539
|
-
|
|
1540
|
-
},
|
|
1538
|
+
return r.m = c, r.c = A, r.d = function(n, u, g) {
|
|
1539
|
+
r.o(n, u) || Object.defineProperty(n, u, { enumerable: !0, get: g });
|
|
1540
|
+
}, r.r = function(n) {
|
|
1541
1541
|
typeof Symbol < "u" && Symbol.toStringTag && Object.defineProperty(n, Symbol.toStringTag, { value: "Module" }), Object.defineProperty(n, "__esModule", { value: !0 });
|
|
1542
|
-
},
|
|
1543
|
-
if (1 & u && (n =
|
|
1542
|
+
}, r.t = function(n, u) {
|
|
1543
|
+
if (1 & u && (n = r(n)), 8 & u || 4 & u && typeof n == "object" && n && n.__esModule) return n;
|
|
1544
1544
|
var g = /* @__PURE__ */ Object.create(null);
|
|
1545
|
-
if (
|
|
1545
|
+
if (r.r(g), Object.defineProperty(g, "default", { enumerable: !0, value: n }), 2 & u && typeof n != "string")
|
|
1546
1546
|
for (var M in n)
|
|
1547
|
-
|
|
1547
|
+
r.d(
|
|
1548
1548
|
g,
|
|
1549
1549
|
M,
|
|
1550
1550
|
(function(Y) {
|
|
@@ -1552,350 +1552,350 @@ var We = { exports: {} };
|
|
|
1552
1552
|
}).bind(null, M)
|
|
1553
1553
|
);
|
|
1554
1554
|
return g;
|
|
1555
|
-
},
|
|
1555
|
+
}, r.n = function(n) {
|
|
1556
1556
|
var u = n && n.__esModule ? function() {
|
|
1557
1557
|
return n.default;
|
|
1558
1558
|
} : function() {
|
|
1559
1559
|
return n;
|
|
1560
1560
|
};
|
|
1561
|
-
return
|
|
1562
|
-
},
|
|
1561
|
+
return r.d(u, "a", u), u;
|
|
1562
|
+
}, r.o = function(n, u) {
|
|
1563
1563
|
return Object.prototype.hasOwnProperty.call(n, u);
|
|
1564
|
-
},
|
|
1564
|
+
}, r.p = "", r(r.s = 0);
|
|
1565
1565
|
}([
|
|
1566
|
-
function(
|
|
1567
|
-
|
|
1566
|
+
function(c, A, r) {
|
|
1567
|
+
c.exports = r(1);
|
|
1568
1568
|
},
|
|
1569
|
-
function(
|
|
1570
|
-
function n(
|
|
1569
|
+
function(c, A, r) {
|
|
1570
|
+
function n(t) {
|
|
1571
1571
|
return (n = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(a) {
|
|
1572
1572
|
return typeof a;
|
|
1573
1573
|
} : function(a) {
|
|
1574
1574
|
return a && typeof Symbol == "function" && a.constructor === Symbol && a !== Symbol.prototype ? "symbol" : typeof a;
|
|
1575
|
-
})(
|
|
1575
|
+
})(t);
|
|
1576
1576
|
}
|
|
1577
|
-
function u(
|
|
1578
|
-
var a = "[object " +
|
|
1579
|
-
return function(
|
|
1580
|
-
return Object.prototype.toString.call(
|
|
1577
|
+
function u(t) {
|
|
1578
|
+
var a = "[object " + t + "]";
|
|
1579
|
+
return function(i) {
|
|
1580
|
+
return Object.prototype.toString.call(i) === a;
|
|
1581
1581
|
};
|
|
1582
1582
|
}
|
|
1583
|
-
|
|
1584
|
-
return
|
|
1585
|
-
}),
|
|
1583
|
+
r.r(A), r.d(A, "default", function() {
|
|
1584
|
+
return At;
|
|
1585
|
+
}), r.d(A, "compare", function() {
|
|
1586
1586
|
return me;
|
|
1587
|
-
}),
|
|
1587
|
+
}), r.d(A, "comparable", function() {
|
|
1588
1588
|
return $;
|
|
1589
1589
|
});
|
|
1590
1590
|
var g = u("Array"), M = u("Object"), Y = u("Function");
|
|
1591
|
-
function D(
|
|
1592
|
-
return Y(
|
|
1591
|
+
function D(t, a) {
|
|
1592
|
+
return Y(t.get) ? t.get(a) : t[a];
|
|
1593
1593
|
}
|
|
1594
|
-
function
|
|
1595
|
-
return function(a,
|
|
1596
|
-
if (!g(
|
|
1597
|
-
for (var m = 0, d =
|
|
1598
|
-
if (
|
|
1594
|
+
function h(t) {
|
|
1595
|
+
return function(a, i) {
|
|
1596
|
+
if (!g(i) || !i.length) return t(a, i);
|
|
1597
|
+
for (var m = 0, d = i.length; m < d; m++)
|
|
1598
|
+
if (t(a, D(i, m))) return !0;
|
|
1599
1599
|
return !1;
|
|
1600
1600
|
};
|
|
1601
1601
|
}
|
|
1602
|
-
function U(
|
|
1603
|
-
return function(a,
|
|
1604
|
-
if (!g(
|
|
1605
|
-
for (var m = 0, d =
|
|
1606
|
-
if (!
|
|
1602
|
+
function U(t) {
|
|
1603
|
+
return function(a, i) {
|
|
1604
|
+
if (!g(i) || !i.length) return t(a, i);
|
|
1605
|
+
for (var m = 0, d = i.length; m < d; m++)
|
|
1606
|
+
if (!t(a, D(i, m))) return !1;
|
|
1607
1607
|
return !0;
|
|
1608
1608
|
};
|
|
1609
1609
|
}
|
|
1610
|
-
function
|
|
1611
|
-
return
|
|
1610
|
+
function y(t, a, i, m) {
|
|
1611
|
+
return t.validate(t.options, a, i, m);
|
|
1612
1612
|
}
|
|
1613
1613
|
var x = {
|
|
1614
|
-
$eq:
|
|
1615
|
-
return
|
|
1614
|
+
$eq: h(function(t, a) {
|
|
1615
|
+
return t(a);
|
|
1616
1616
|
}),
|
|
1617
|
-
$ne: U(function(
|
|
1618
|
-
return
|
|
1617
|
+
$ne: U(function(t, a) {
|
|
1618
|
+
return t(a);
|
|
1619
1619
|
}),
|
|
1620
|
-
$gt:
|
|
1621
|
-
return
|
|
1620
|
+
$gt: h(function(t, a) {
|
|
1621
|
+
return t(a);
|
|
1622
1622
|
}),
|
|
1623
|
-
$gte:
|
|
1624
|
-
return
|
|
1623
|
+
$gte: h(function(t, a) {
|
|
1624
|
+
return t(a);
|
|
1625
1625
|
}),
|
|
1626
|
-
$lt:
|
|
1627
|
-
return
|
|
1626
|
+
$lt: h(function(t, a) {
|
|
1627
|
+
return t(a);
|
|
1628
1628
|
}),
|
|
1629
|
-
$lte:
|
|
1630
|
-
return
|
|
1629
|
+
$lte: h(function(t, a) {
|
|
1630
|
+
return t(a);
|
|
1631
1631
|
}),
|
|
1632
|
-
$mod:
|
|
1633
|
-
return
|
|
1632
|
+
$mod: h(function(t, a) {
|
|
1633
|
+
return t(a);
|
|
1634
1634
|
}),
|
|
1635
|
-
$in: function(
|
|
1636
|
-
return
|
|
1635
|
+
$in: function(t, a) {
|
|
1636
|
+
return t(a);
|
|
1637
1637
|
},
|
|
1638
|
-
$nin: function(
|
|
1639
|
-
return
|
|
1638
|
+
$nin: function(t, a) {
|
|
1639
|
+
return t(a);
|
|
1640
1640
|
},
|
|
1641
|
-
$not: function(
|
|
1642
|
-
return
|
|
1641
|
+
$not: function(t, a, i, m) {
|
|
1642
|
+
return t(a, i, m);
|
|
1643
1643
|
},
|
|
1644
|
-
$type: function(
|
|
1645
|
-
return
|
|
1644
|
+
$type: function(t, a) {
|
|
1645
|
+
return t(a);
|
|
1646
1646
|
},
|
|
1647
|
-
$all: function(
|
|
1648
|
-
return x.$and(
|
|
1647
|
+
$all: function(t, a, i, m) {
|
|
1648
|
+
return x.$and(t, a, i, m);
|
|
1649
1649
|
},
|
|
1650
|
-
$size: function(
|
|
1651
|
-
return !!a &&
|
|
1650
|
+
$size: function(t, a) {
|
|
1651
|
+
return !!a && t === a.length;
|
|
1652
1652
|
},
|
|
1653
|
-
$or: function(
|
|
1654
|
-
for (var d = 0,
|
|
1655
|
-
if (
|
|
1653
|
+
$or: function(t, a, i, m) {
|
|
1654
|
+
for (var d = 0, b = t.length; d < b; d++)
|
|
1655
|
+
if (y(D(t, d), a, i, m)) return !0;
|
|
1656
1656
|
return !1;
|
|
1657
1657
|
},
|
|
1658
|
-
$nor: function(
|
|
1659
|
-
return !x.$or(
|
|
1658
|
+
$nor: function(t, a, i, m) {
|
|
1659
|
+
return !x.$or(t, a, i, m);
|
|
1660
1660
|
},
|
|
1661
|
-
$and: function(
|
|
1662
|
-
for (var d = 0,
|
|
1663
|
-
if (!
|
|
1661
|
+
$and: function(t, a, i, m) {
|
|
1662
|
+
for (var d = 0, b = t.length; d < b; d++)
|
|
1663
|
+
if (!y(D(t, d), a, i, m)) return !1;
|
|
1664
1664
|
return !0;
|
|
1665
1665
|
},
|
|
1666
|
-
$regex:
|
|
1667
|
-
return typeof a == "string" &&
|
|
1666
|
+
$regex: h(function(t, a) {
|
|
1667
|
+
return typeof a == "string" && t.test(a);
|
|
1668
1668
|
}),
|
|
1669
|
-
$where: function(
|
|
1670
|
-
return
|
|
1669
|
+
$where: function(t, a, i, m) {
|
|
1670
|
+
return t.call(a, a, i, m);
|
|
1671
1671
|
},
|
|
1672
|
-
$elemMatch: function(
|
|
1673
|
-
return g(a) ? !!~function(d,
|
|
1674
|
-
for (var
|
|
1675
|
-
if (D(d,
|
|
1672
|
+
$elemMatch: function(t, a, i, m) {
|
|
1673
|
+
return g(a) ? !!~function(d, b) {
|
|
1674
|
+
for (var p = 0; p < d.length; p++)
|
|
1675
|
+
if (D(d, p), y(b, D(d, p))) return p;
|
|
1676
1676
|
return -1;
|
|
1677
|
-
}(a,
|
|
1677
|
+
}(a, t) : y(t, a, i, m);
|
|
1678
1678
|
},
|
|
1679
|
-
$exists: function(
|
|
1680
|
-
return m.hasOwnProperty(
|
|
1679
|
+
$exists: function(t, a, i, m) {
|
|
1680
|
+
return m.hasOwnProperty(i) === t;
|
|
1681
1681
|
}
|
|
1682
1682
|
}, Q = {
|
|
1683
|
-
$eq: function(
|
|
1684
|
-
var m =
|
|
1685
|
-
return
|
|
1686
|
-
return typeof
|
|
1687
|
-
}) :
|
|
1688
|
-
return g(
|
|
1689
|
-
}) :
|
|
1690
|
-
|
|
1691
|
-
return
|
|
1692
|
-
} : function(
|
|
1693
|
-
return d(m(
|
|
1683
|
+
$eq: function(t, a, i) {
|
|
1684
|
+
var m = i.comparable, d = i.compare;
|
|
1685
|
+
return t instanceof RegExp ? h(function(b) {
|
|
1686
|
+
return typeof b == "string" && t.test(b);
|
|
1687
|
+
}) : t instanceof Function ? h(t) : g(t) && !t.length ? h(function(b) {
|
|
1688
|
+
return g(b) && !b.length;
|
|
1689
|
+
}) : h(
|
|
1690
|
+
t === null ? function(b) {
|
|
1691
|
+
return b == null;
|
|
1692
|
+
} : function(b) {
|
|
1693
|
+
return d(m(b), m(t)) === 0;
|
|
1694
1694
|
}
|
|
1695
1695
|
);
|
|
1696
1696
|
},
|
|
1697
|
-
$gt: function(
|
|
1698
|
-
var m =
|
|
1699
|
-
return function(
|
|
1700
|
-
return d(m(
|
|
1697
|
+
$gt: function(t, a, i) {
|
|
1698
|
+
var m = i.comparable, d = i.compare;
|
|
1699
|
+
return function(b) {
|
|
1700
|
+
return d(m(b), m(t)) > 0;
|
|
1701
1701
|
};
|
|
1702
1702
|
},
|
|
1703
|
-
$gte: function(
|
|
1704
|
-
var m =
|
|
1705
|
-
return function(
|
|
1706
|
-
return d(m(
|
|
1703
|
+
$gte: function(t, a, i) {
|
|
1704
|
+
var m = i.comparable, d = i.compare;
|
|
1705
|
+
return function(b) {
|
|
1706
|
+
return d(m(b), m(t)) >= 0;
|
|
1707
1707
|
};
|
|
1708
1708
|
},
|
|
1709
|
-
$lt: function(
|
|
1710
|
-
var m =
|
|
1711
|
-
return function(
|
|
1712
|
-
return d(m(
|
|
1709
|
+
$lt: function(t, a, i) {
|
|
1710
|
+
var m = i.comparable, d = i.compare;
|
|
1711
|
+
return function(b) {
|
|
1712
|
+
return d(m(b), m(t)) < 0;
|
|
1713
1713
|
};
|
|
1714
1714
|
},
|
|
1715
|
-
$lte: function(
|
|
1716
|
-
var m =
|
|
1717
|
-
return function(
|
|
1718
|
-
return d(m(
|
|
1715
|
+
$lte: function(t, a, i) {
|
|
1716
|
+
var m = i.comparable, d = i.compare;
|
|
1717
|
+
return function(b) {
|
|
1718
|
+
return d(m(b), m(t)) <= 0;
|
|
1719
1719
|
};
|
|
1720
1720
|
},
|
|
1721
|
-
$in: function(
|
|
1722
|
-
var m =
|
|
1721
|
+
$in: function(t, a, i) {
|
|
1722
|
+
var m = i.comparable;
|
|
1723
1723
|
return function(d) {
|
|
1724
1724
|
if (!(d instanceof Array)) {
|
|
1725
|
-
var
|
|
1726
|
-
if (
|
|
1727
|
-
for (f =
|
|
1728
|
-
if (String(
|
|
1725
|
+
var b = m(d);
|
|
1726
|
+
if (b === d && n(d) === "object") {
|
|
1727
|
+
for (f = t.length; f--; )
|
|
1728
|
+
if (String(t[f]) === String(d) && String(d) !== "[object Object]")
|
|
1729
1729
|
return !0;
|
|
1730
1730
|
}
|
|
1731
|
-
if (
|
|
1732
|
-
for (f =
|
|
1731
|
+
if (b === void 0) {
|
|
1732
|
+
for (f = t.length; f--; ) if (t[f] == null) return !0;
|
|
1733
1733
|
}
|
|
1734
|
-
for (f =
|
|
1735
|
-
var
|
|
1736
|
-
if (
|
|
1734
|
+
for (f = t.length; f--; ) {
|
|
1735
|
+
var p = y(ge(D(t, f), i), b, f, t);
|
|
1736
|
+
if (p && String(p) !== "[object Object]" && String(b) !== "[object Object]")
|
|
1737
1737
|
return !0;
|
|
1738
1738
|
}
|
|
1739
|
-
return !!~
|
|
1739
|
+
return !!~t.indexOf(b);
|
|
1740
1740
|
}
|
|
1741
1741
|
for (var f = d.length; f--; )
|
|
1742
|
-
if (~
|
|
1742
|
+
if (~t.indexOf(m(D(d, f)))) return !0;
|
|
1743
1743
|
return !1;
|
|
1744
1744
|
};
|
|
1745
1745
|
},
|
|
1746
|
-
$nin: function(
|
|
1747
|
-
var m = Q.$in(
|
|
1748
|
-
return function(d,
|
|
1749
|
-
return !m(d,
|
|
1746
|
+
$nin: function(t, a, i) {
|
|
1747
|
+
var m = Q.$in(t, a, i);
|
|
1748
|
+
return function(d, b, p, f) {
|
|
1749
|
+
return !m(d, b, p, f);
|
|
1750
1750
|
};
|
|
1751
1751
|
},
|
|
1752
|
-
$mod: function(
|
|
1752
|
+
$mod: function(t) {
|
|
1753
1753
|
return function(a) {
|
|
1754
|
-
return a %
|
|
1754
|
+
return a % t[0] == t[1];
|
|
1755
1755
|
};
|
|
1756
1756
|
},
|
|
1757
|
-
$ne: function(
|
|
1758
|
-
var m = Q.$eq(
|
|
1759
|
-
return U(function(d,
|
|
1760
|
-
return !m(d,
|
|
1757
|
+
$ne: function(t, a, i) {
|
|
1758
|
+
var m = Q.$eq(t, a, i);
|
|
1759
|
+
return U(function(d, b, p, f) {
|
|
1760
|
+
return !m(d, b, p, f);
|
|
1761
1761
|
});
|
|
1762
1762
|
},
|
|
1763
|
-
$and: function(
|
|
1764
|
-
return
|
|
1763
|
+
$and: function(t, a, i) {
|
|
1764
|
+
return t.map(O(i));
|
|
1765
1765
|
},
|
|
1766
|
-
$all: function(
|
|
1767
|
-
return Q.$and(
|
|
1766
|
+
$all: function(t, a, i) {
|
|
1767
|
+
return Q.$and(t, a, i);
|
|
1768
1768
|
},
|
|
1769
|
-
$or: function(
|
|
1770
|
-
return
|
|
1769
|
+
$or: function(t, a, i) {
|
|
1770
|
+
return t.map(O(i));
|
|
1771
1771
|
},
|
|
1772
|
-
$nor: function(
|
|
1773
|
-
return
|
|
1772
|
+
$nor: function(t, a, i) {
|
|
1773
|
+
return t.map(O(i));
|
|
1774
1774
|
},
|
|
1775
|
-
$not: function(
|
|
1776
|
-
var m = O(
|
|
1777
|
-
return function(d,
|
|
1778
|
-
return !
|
|
1775
|
+
$not: function(t, a, i) {
|
|
1776
|
+
var m = O(i)(t);
|
|
1777
|
+
return function(d, b, p) {
|
|
1778
|
+
return !y(m, d, b, p);
|
|
1779
1779
|
};
|
|
1780
1780
|
},
|
|
1781
|
-
$type: function(
|
|
1782
|
-
return function(a,
|
|
1783
|
-
return a != null && (a instanceof
|
|
1781
|
+
$type: function(t) {
|
|
1782
|
+
return function(a, i, m) {
|
|
1783
|
+
return a != null && (a instanceof t || a.constructor == t);
|
|
1784
1784
|
};
|
|
1785
1785
|
},
|
|
1786
|
-
$regex: function(
|
|
1787
|
-
return new RegExp(
|
|
1786
|
+
$regex: function(t, a) {
|
|
1787
|
+
return new RegExp(t, a.$options);
|
|
1788
1788
|
},
|
|
1789
|
-
$where: function(
|
|
1790
|
-
if (typeof
|
|
1789
|
+
$where: function(t) {
|
|
1790
|
+
if (typeof t == "function") return t;
|
|
1791
1791
|
throw new Error(
|
|
1792
1792
|
'In CSP mode, sift does not support strings in "$where" condition'
|
|
1793
1793
|
);
|
|
1794
1794
|
},
|
|
1795
|
-
$elemMatch: function(
|
|
1796
|
-
return O(
|
|
1795
|
+
$elemMatch: function(t, a, i) {
|
|
1796
|
+
return O(i)(t);
|
|
1797
1797
|
},
|
|
1798
|
-
$exists: function(
|
|
1799
|
-
return !!
|
|
1798
|
+
$exists: function(t) {
|
|
1799
|
+
return !!t;
|
|
1800
1800
|
}
|
|
1801
1801
|
};
|
|
1802
|
-
function q(
|
|
1803
|
-
return { options:
|
|
1802
|
+
function q(t, a) {
|
|
1803
|
+
return { options: t, validate: a };
|
|
1804
1804
|
}
|
|
1805
|
-
function tt(
|
|
1806
|
-
var
|
|
1807
|
-
if (function de(H, N, W,
|
|
1805
|
+
function tt(t, a) {
|
|
1806
|
+
var i = t.keyPath, m = t.child, d = t.query, b = [];
|
|
1807
|
+
if (function de(H, N, W, rt, ee) {
|
|
1808
1808
|
if (W === N.length || H == null)
|
|
1809
|
-
return void ee.push([H, N[W - 1],
|
|
1809
|
+
return void ee.push([H, N[W - 1], rt]);
|
|
1810
1810
|
var Be = D(N, W);
|
|
1811
1811
|
if (g(H) && isNaN(Number(Be)))
|
|
1812
1812
|
for (var te = 0, at = H.length; te < at; te++) de(D(H, te), N, W, H, ee);
|
|
1813
1813
|
else de(D(H, Be), N, W + 1, H, ee);
|
|
1814
|
-
}(a,
|
|
1815
|
-
var
|
|
1816
|
-
return
|
|
1814
|
+
}(a, i, 0, a, b), b.length === 1) {
|
|
1815
|
+
var p = b[0];
|
|
1816
|
+
return y(m, p[0], p[1], p[2]);
|
|
1817
1817
|
}
|
|
1818
|
-
for (var f = d && d.$ne !== void 0, v = f, V = 0; V <
|
|
1819
|
-
var X =
|
|
1818
|
+
for (var f = d && d.$ne !== void 0, v = f, V = 0; V < b.length; V++) {
|
|
1819
|
+
var X = b[V], T = y(m, X[0], X[1], X[2]);
|
|
1820
1820
|
f ? v &= T : v |= T;
|
|
1821
1821
|
}
|
|
1822
1822
|
return v;
|
|
1823
1823
|
}
|
|
1824
|
-
function st(
|
|
1825
|
-
return q({ keyPath:
|
|
1824
|
+
function st(t, a, i) {
|
|
1825
|
+
return q({ keyPath: t, child: a, query: i }, tt);
|
|
1826
1826
|
}
|
|
1827
|
-
function O(
|
|
1828
|
-
var a =
|
|
1827
|
+
function O(t) {
|
|
1828
|
+
var a = t.comparable, i = t.expressions, m = function(p) {
|
|
1829
1829
|
var f;
|
|
1830
|
-
return (!
|
|
1831
|
-
}, d = function(
|
|
1832
|
-
|
|
1830
|
+
return (!p || !(f = p) || f.constructor !== Object && f.constructor !== Array && f.constructor.toString() !== "function Object() { [native code] }" && f.constructor.toString() !== "function Array() { [native code] }" || f.toJSON) && (p = { $eq: p }), p;
|
|
1831
|
+
}, d = function(p) {
|
|
1832
|
+
p = a(p);
|
|
1833
1833
|
var f = [];
|
|
1834
|
-
for (var v in
|
|
1835
|
-
var V =
|
|
1834
|
+
for (var v in p) {
|
|
1835
|
+
var V = p[v];
|
|
1836
1836
|
if (v !== "$options") {
|
|
1837
|
-
var X = x[v] ||
|
|
1838
|
-
if (X) Q[v] && (V = Q[v](V,
|
|
1837
|
+
var X = x[v] || t && i && i[v];
|
|
1838
|
+
if (X) Q[v] && (V = Q[v](V, p, t)), f.push(q(a(V), X));
|
|
1839
1839
|
else {
|
|
1840
1840
|
if (v.charCodeAt(0) === 36)
|
|
1841
1841
|
throw new Error("Unknown operation " + v);
|
|
1842
1842
|
var T = v.split(".");
|
|
1843
|
-
f.push(st(T,
|
|
1843
|
+
f.push(st(T, b(V), V));
|
|
1844
1844
|
}
|
|
1845
1845
|
}
|
|
1846
1846
|
}
|
|
1847
1847
|
return f.length === 1 ? f[0] : q(f, x.$and);
|
|
1848
|
-
},
|
|
1849
|
-
return
|
|
1848
|
+
}, b = function(p) {
|
|
1849
|
+
return p = m(p), function f(v, V) {
|
|
1850
1850
|
if (!M(v)) return V;
|
|
1851
1851
|
for (var X in v) V.push(X), f(v[X], V);
|
|
1852
1852
|
return V;
|
|
1853
|
-
}(
|
|
1853
|
+
}(p, []).join(",").search(/[$.]/) === -1 ? q(p, R) : d(p);
|
|
1854
1854
|
};
|
|
1855
|
-
return function(
|
|
1856
|
-
return d(m(
|
|
1855
|
+
return function(p) {
|
|
1856
|
+
return d(m(p));
|
|
1857
1857
|
};
|
|
1858
1858
|
}
|
|
1859
|
-
function R(
|
|
1860
|
-
if (Object.prototype.toString.call(
|
|
1859
|
+
function R(t, a) {
|
|
1860
|
+
if (Object.prototype.toString.call(t) !== Object.prototype.toString.call(a))
|
|
1861
1861
|
return !1;
|
|
1862
|
-
if (M(
|
|
1863
|
-
if (Object.keys(
|
|
1864
|
-
for (var
|
|
1862
|
+
if (M(t)) {
|
|
1863
|
+
if (Object.keys(t).length !== Object.keys(a).length) return !1;
|
|
1864
|
+
for (var i in t) if (!R(t[i], a[i])) return !1;
|
|
1865
1865
|
return !0;
|
|
1866
1866
|
}
|
|
1867
|
-
if (g(
|
|
1868
|
-
if (
|
|
1869
|
-
for (var m = 0, d =
|
|
1870
|
-
if (!R(
|
|
1867
|
+
if (g(t)) {
|
|
1868
|
+
if (t.length !== a.length) return !1;
|
|
1869
|
+
for (var m = 0, d = t.length; m < d; m++)
|
|
1870
|
+
if (!R(t[m], a[m])) return !1;
|
|
1871
1871
|
return !0;
|
|
1872
1872
|
}
|
|
1873
|
-
return
|
|
1873
|
+
return t === a;
|
|
1874
1874
|
}
|
|
1875
|
-
function ge(
|
|
1876
|
-
var
|
|
1877
|
-
return a && a.select && (
|
|
1878
|
-
options:
|
|
1879
|
-
validate: function(m, d,
|
|
1880
|
-
return
|
|
1875
|
+
function ge(t, a) {
|
|
1876
|
+
var i = O(a)(t);
|
|
1877
|
+
return a && a.select && (i = {
|
|
1878
|
+
options: i,
|
|
1879
|
+
validate: function(m, d, b, p) {
|
|
1880
|
+
return y(m, d && a.select(d), b, p);
|
|
1881
1881
|
}
|
|
1882
|
-
}),
|
|
1882
|
+
}), i;
|
|
1883
1883
|
}
|
|
1884
|
-
function
|
|
1885
|
-
var
|
|
1886
|
-
return function(m, d,
|
|
1887
|
-
return
|
|
1884
|
+
function At(t, a) {
|
|
1885
|
+
var i = ge(t, a = Object.assign({ compare: me, comparable: $ }, a));
|
|
1886
|
+
return function(m, d, b) {
|
|
1887
|
+
return y(i, m, d, b);
|
|
1888
1888
|
};
|
|
1889
1889
|
}
|
|
1890
|
-
function me(
|
|
1891
|
-
if (R(
|
|
1892
|
-
if (n(
|
|
1893
|
-
if (
|
|
1894
|
-
if (
|
|
1890
|
+
function me(t, a) {
|
|
1891
|
+
if (R(t, a)) return 0;
|
|
1892
|
+
if (n(t) === n(a)) {
|
|
1893
|
+
if (t > a) return 1;
|
|
1894
|
+
if (t < a) return -1;
|
|
1895
1895
|
}
|
|
1896
1896
|
}
|
|
1897
|
-
function $(
|
|
1898
|
-
return
|
|
1897
|
+
function $(t) {
|
|
1898
|
+
return t instanceof Date ? t.getTime() : g(t) ? t.map($) : t && typeof t.toJSON == "function" ? t.toJSON() : t;
|
|
1899
1899
|
}
|
|
1900
1900
|
}
|
|
1901
1901
|
]);
|
|
@@ -1904,25 +1904,25 @@ var We = { exports: {} };
|
|
|
1904
1904
|
var Rt = We.exports;
|
|
1905
1905
|
const Tt = /* @__PURE__ */ Ut(Rt);
|
|
1906
1906
|
function Kt(e, o) {
|
|
1907
|
-
for (var
|
|
1908
|
-
var
|
|
1909
|
-
|
|
1907
|
+
for (var c = 0; c < o.length; c++) {
|
|
1908
|
+
var A = o[c];
|
|
1909
|
+
A.enumerable = A.enumerable || !1, A.configurable = !0, "value" in A && (A.writable = !0), Object.defineProperty(e, A.key, A);
|
|
1910
1910
|
}
|
|
1911
1911
|
}
|
|
1912
|
-
function Jt(e, o,
|
|
1912
|
+
function Jt(e, o, c) {
|
|
1913
1913
|
return o && Kt(e.prototype, o), e;
|
|
1914
1914
|
}
|
|
1915
1915
|
function kt(e, o) {
|
|
1916
1916
|
e.prototype = Object.create(o.prototype), e.prototype.constructor = e, e.__proto__ = o;
|
|
1917
1917
|
}
|
|
1918
|
-
function
|
|
1919
|
-
return
|
|
1920
|
-
return
|
|
1921
|
-
},
|
|
1918
|
+
function re(e) {
|
|
1919
|
+
return re = Object.setPrototypeOf ? Object.getPrototypeOf : function(c) {
|
|
1920
|
+
return c.__proto__ || Object.getPrototypeOf(c);
|
|
1921
|
+
}, re(e);
|
|
1922
1922
|
}
|
|
1923
1923
|
function L(e, o) {
|
|
1924
|
-
return L = Object.setPrototypeOf || function(
|
|
1925
|
-
return
|
|
1924
|
+
return L = Object.setPrototypeOf || function(A, r) {
|
|
1925
|
+
return A.__proto__ = r, A;
|
|
1926
1926
|
}, L(e, o);
|
|
1927
1927
|
}
|
|
1928
1928
|
function Lt() {
|
|
@@ -1935,11 +1935,11 @@ function Lt() {
|
|
|
1935
1935
|
return !1;
|
|
1936
1936
|
}
|
|
1937
1937
|
}
|
|
1938
|
-
function J(e, o,
|
|
1939
|
-
return Lt() ? J = Reflect.construct : J = function(
|
|
1938
|
+
function J(e, o, c) {
|
|
1939
|
+
return Lt() ? J = Reflect.construct : J = function(r, n, u) {
|
|
1940
1940
|
var g = [null];
|
|
1941
1941
|
g.push.apply(g, n);
|
|
1942
|
-
var M = Function.bind.apply(
|
|
1942
|
+
var M = Function.bind.apply(r, g), Y = new M();
|
|
1943
1943
|
return u && L(Y, u.prototype), Y;
|
|
1944
1944
|
}, J.apply(null, arguments);
|
|
1945
1945
|
}
|
|
@@ -1948,25 +1948,25 @@ function St(e) {
|
|
|
1948
1948
|
}
|
|
1949
1949
|
function ae(e) {
|
|
1950
1950
|
var o = typeof Map == "function" ? /* @__PURE__ */ new Map() : void 0;
|
|
1951
|
-
return ae = function(
|
|
1952
|
-
if (
|
|
1953
|
-
if (typeof
|
|
1951
|
+
return ae = function(A) {
|
|
1952
|
+
if (A === null || !St(A)) return A;
|
|
1953
|
+
if (typeof A != "function")
|
|
1954
1954
|
throw new TypeError("Super expression must either be null or a function");
|
|
1955
1955
|
if (typeof o < "u") {
|
|
1956
|
-
if (o.has(
|
|
1957
|
-
o.set(
|
|
1956
|
+
if (o.has(A)) return o.get(A);
|
|
1957
|
+
o.set(A, r);
|
|
1958
1958
|
}
|
|
1959
|
-
function
|
|
1960
|
-
return J(
|
|
1959
|
+
function r() {
|
|
1960
|
+
return J(A, arguments, re(this).constructor);
|
|
1961
1961
|
}
|
|
1962
|
-
return
|
|
1962
|
+
return r.prototype = Object.create(A.prototype, {
|
|
1963
1963
|
constructor: {
|
|
1964
|
-
value:
|
|
1964
|
+
value: r,
|
|
1965
1965
|
enumerable: !1,
|
|
1966
1966
|
writable: !0,
|
|
1967
1967
|
configurable: !0
|
|
1968
1968
|
}
|
|
1969
|
-
}), L(
|
|
1969
|
+
}), L(r, A);
|
|
1970
1970
|
}, ae(e);
|
|
1971
1971
|
}
|
|
1972
1972
|
function De(e) {
|
|
@@ -1977,30 +1977,30 @@ function De(e) {
|
|
|
1977
1977
|
var Ue = function(o) {
|
|
1978
1978
|
return 'Cannot execute "' + o.action + '" on "' + o.subjectName + '"';
|
|
1979
1979
|
}, K = Ue, _t = /* @__PURE__ */ function(e) {
|
|
1980
|
-
kt(o, e), o.setDefaultMessage = function(
|
|
1981
|
-
|
|
1982
|
-
return
|
|
1983
|
-
} :
|
|
1984
|
-
}, o.from = function(
|
|
1980
|
+
kt(o, e), o.setDefaultMessage = function(r) {
|
|
1981
|
+
r === null ? K = Ue : K = typeof r == "string" ? function() {
|
|
1982
|
+
return r;
|
|
1983
|
+
} : r;
|
|
1984
|
+
}, o.from = function(r) {
|
|
1985
1985
|
var n = new this("");
|
|
1986
1986
|
return Object.defineProperty(n, "ability", {
|
|
1987
|
-
value:
|
|
1987
|
+
value: r
|
|
1988
1988
|
}), n;
|
|
1989
1989
|
};
|
|
1990
|
-
function o(
|
|
1990
|
+
function o(A, r) {
|
|
1991
1991
|
var n;
|
|
1992
|
-
return
|
|
1992
|
+
return r === void 0 && (r = {}), n = e.call(this, A) || this, n._setMetadata(r), n.message = A || K(De(n)), n._customMessage = null, typeof Error.captureStackTrace == "function" && (n.name = n.constructor.name, Error.captureStackTrace(De(n), n.constructor)), n;
|
|
1993
1993
|
}
|
|
1994
|
-
var
|
|
1995
|
-
return
|
|
1996
|
-
return this._customMessage =
|
|
1997
|
-
},
|
|
1994
|
+
var c = o.prototype;
|
|
1995
|
+
return c.setMessage = function(r) {
|
|
1996
|
+
return this._customMessage = r, this;
|
|
1997
|
+
}, c.throwUnlessCan = function(r, n, u) {
|
|
1998
1998
|
if (!this.ability)
|
|
1999
1999
|
throw new ReferenceError("Cannot throw FordiddenError without respective ability instance");
|
|
2000
|
-
var g = this.ability.relevantRuleFor(
|
|
2000
|
+
var g = this.ability.relevantRuleFor(r, n, u);
|
|
2001
2001
|
if (!(g && !g.inverted)) {
|
|
2002
2002
|
this._setMetadata({
|
|
2003
|
-
action:
|
|
2003
|
+
action: r,
|
|
2004
2004
|
subject: n,
|
|
2005
2005
|
field: u,
|
|
2006
2006
|
subjectName: this.ability.subjectName(n)
|
|
@@ -2008,8 +2008,8 @@ var Ue = function(o) {
|
|
|
2008
2008
|
var M = g ? g.reason : "";
|
|
2009
2009
|
throw this.message = this._customMessage || M || K(this), this;
|
|
2010
2010
|
}
|
|
2011
|
-
},
|
|
2012
|
-
this.subject =
|
|
2011
|
+
}, c._setMetadata = function(r) {
|
|
2012
|
+
this.subject = r.subject, this.subjectName = r.subjectName, this.action = r.action, this.field = r.field;
|
|
2013
2013
|
}, o;
|
|
2014
2014
|
}(ae(Error));
|
|
2015
2015
|
function ne(e) {
|
|
@@ -2024,36 +2024,36 @@ function $t(e) {
|
|
|
2024
2024
|
function es(e) {
|
|
2025
2025
|
return JSON.parse(JSON.stringify(e));
|
|
2026
2026
|
}
|
|
2027
|
-
var ts = /[-/\\^$+?.()|[\]{}]/g, ss = /\.?\*+\.?/g,
|
|
2028
|
-
function as(e, o,
|
|
2029
|
-
var
|
|
2030
|
-
return o + e.length ===
|
|
2027
|
+
var ts = /[-/\\^$+?.()|[\]{}]/g, ss = /\.?\*+\.?/g, As = /\*+/, rs = /\./g;
|
|
2028
|
+
function as(e, o, c) {
|
|
2029
|
+
var A = c[0] === "*" || e[0] === "." && e[e.length - 1] === "." ? "+" : "*", r = e.indexOf("**") === -1 ? "[^.]" : ".", n = e.replace(rs, "\\$&").replace(As, r + A);
|
|
2030
|
+
return o + e.length === c.length ? "(?:" + n + ")?" : n;
|
|
2031
2031
|
}
|
|
2032
|
-
function ns(e, o,
|
|
2033
|
-
return e === "." && (
|
|
2032
|
+
function ns(e, o, c) {
|
|
2033
|
+
return e === "." && (c[o - 1] === "*" || c[o + 1] === "*") ? e : "\\" + e;
|
|
2034
2034
|
}
|
|
2035
2035
|
function os(e) {
|
|
2036
|
-
var o = e.map(function(
|
|
2037
|
-
return
|
|
2038
|
-
}),
|
|
2039
|
-
return new RegExp("^" +
|
|
2036
|
+
var o = e.map(function(A) {
|
|
2037
|
+
return A.replace(ts, ns).replace(ss, as);
|
|
2038
|
+
}), c = o.length > 1 ? "(?:" + o.join("|") + ")" : o[0];
|
|
2039
|
+
return new RegExp("^" + c + "$");
|
|
2040
2040
|
}
|
|
2041
2041
|
var cs = /* @__PURE__ */ function() {
|
|
2042
|
-
function e(
|
|
2043
|
-
this.actions =
|
|
2042
|
+
function e(c) {
|
|
2043
|
+
this.actions = c.actions || c.action, this.subject = c.subject, this.fields = !c.fields || c.fields.length === 0 ? void 0 : ne(c.fields), Object.defineProperty(this, "_fieldsPattern", {
|
|
2044
2044
|
writable: !0
|
|
2045
|
-
}), this.inverted = !!
|
|
2045
|
+
}), this.inverted = !!c.inverted, this.conditions = c.conditions, Object.defineProperty(this, "_matches", {
|
|
2046
2046
|
writable: !0,
|
|
2047
2047
|
value: this.conditions ? Tt(this.conditions) : void 0
|
|
2048
|
-
}), this.reason =
|
|
2048
|
+
}), this.reason = c.reason;
|
|
2049
2049
|
}
|
|
2050
2050
|
var o = e.prototype;
|
|
2051
|
-
return o.matches = function(
|
|
2052
|
-
return this._matches ? typeof
|
|
2053
|
-
}, o.isRelevantFor = function(
|
|
2054
|
-
return this.fields ?
|
|
2055
|
-
}, o.matchesField = function(
|
|
2056
|
-
return typeof this._fieldsPattern > "u" && (this._fieldsPattern = this.fields.join("").indexOf("*") === -1 ? null : os(this.fields)), this._fieldsPattern === null ||
|
|
2051
|
+
return o.matches = function(A) {
|
|
2052
|
+
return this._matches ? typeof A == "string" ? !this.inverted : this._matches(A) : !0;
|
|
2053
|
+
}, o.isRelevantFor = function(A, r) {
|
|
2054
|
+
return this.fields ? r ? this.matchesField(r) : !this.inverted : !0;
|
|
2055
|
+
}, o.matchesField = function(A) {
|
|
2056
|
+
return typeof this._fieldsPattern > "u" && (this._fieldsPattern = this.fields.join("").indexOf("*") === -1 ? null : os(this.fields)), this._fieldsPattern === null || A.indexOf("*") !== -1 ? this.fields.indexOf(A) !== -1 : this._fieldsPattern.test(A);
|
|
2057
2057
|
}, e;
|
|
2058
2058
|
}(), E = typeof Symbol < "u" ? Symbol("private") : "__" + Date.now(), Me = {
|
|
2059
2059
|
crud: ["create", "read", "update", "delete"]
|
|
@@ -2062,105 +2062,105 @@ function Ye(e, o) {
|
|
|
2062
2062
|
return e === o || Array.isArray(o) && o.indexOf(e) !== -1;
|
|
2063
2063
|
}
|
|
2064
2064
|
var is = /* @__PURE__ */ function() {
|
|
2065
|
-
e.addAlias = function(
|
|
2066
|
-
if (
|
|
2065
|
+
e.addAlias = function(A, r) {
|
|
2066
|
+
if (A === "manage" || Ye("manage", r))
|
|
2067
2067
|
throw new Error('Cannot add alias for "manage" action because it represents any action');
|
|
2068
|
-
if (Ye(
|
|
2069
|
-
throw new Error("Attempt to alias action to itself: " +
|
|
2070
|
-
return Me[
|
|
2068
|
+
if (Ye(A, r))
|
|
2069
|
+
throw new Error("Attempt to alias action to itself: " + A + " -> " + r.toString());
|
|
2070
|
+
return Me[A] = r, this;
|
|
2071
2071
|
};
|
|
2072
|
-
function e(
|
|
2073
|
-
|
|
2074
|
-
value:
|
|
2072
|
+
function e(c, A) {
|
|
2073
|
+
A === void 0 && (A = {}), Object.defineProperty(this, "subjectName", {
|
|
2074
|
+
value: A.subjectName || $t
|
|
2075
2075
|
}), this[E] = {
|
|
2076
|
-
RuleType:
|
|
2077
|
-
originalRules:
|
|
2076
|
+
RuleType: A.RuleType || cs,
|
|
2077
|
+
originalRules: c || [],
|
|
2078
2078
|
hasPerFieldRules: !1,
|
|
2079
2079
|
indexedRules: /* @__PURE__ */ Object.create(null),
|
|
2080
2080
|
mergedRules: /* @__PURE__ */ Object.create(null),
|
|
2081
2081
|
events: {},
|
|
2082
2082
|
aliases: es(Me)
|
|
2083
|
-
}, this.update(
|
|
2083
|
+
}, this.update(c);
|
|
2084
2084
|
}
|
|
2085
2085
|
var o = e.prototype;
|
|
2086
|
-
return o.update = function(
|
|
2087
|
-
if (!Array.isArray(
|
|
2086
|
+
return o.update = function(A) {
|
|
2087
|
+
if (!Array.isArray(A))
|
|
2088
2088
|
return this;
|
|
2089
|
-
var
|
|
2090
|
-
rules:
|
|
2089
|
+
var r = {
|
|
2090
|
+
rules: A,
|
|
2091
2091
|
ability: this
|
|
2092
2092
|
};
|
|
2093
|
-
this.emit("update",
|
|
2094
|
-
var n = this.buildIndexFor(
|
|
2095
|
-
return this[E].indexedRules = n.rules, this[E].hasPerFieldRules = n.hasPerFieldRules, this.emit("updated",
|
|
2096
|
-
}, o.buildIndexFor = function(
|
|
2097
|
-
for (var
|
|
2098
|
-
var Y = new n(
|
|
2093
|
+
this.emit("update", r), this[E].originalRules = A.slice(0), this[E].mergedRules = /* @__PURE__ */ Object.create(null);
|
|
2094
|
+
var n = this.buildIndexFor(A);
|
|
2095
|
+
return this[E].indexedRules = n.rules, this[E].hasPerFieldRules = n.hasPerFieldRules, this.emit("updated", r), this;
|
|
2096
|
+
}, o.buildIndexFor = function(A) {
|
|
2097
|
+
for (var r = /* @__PURE__ */ Object.create(null), n = this[E].RuleType, u = !0, g = !1, M = 0; M < A.length; M++) {
|
|
2098
|
+
var Y = new n(A[M]), D = this.expandActions(Y.actions), h = ne(Y.subject), U = A.length - M - 1;
|
|
2099
2099
|
u = !!(u && Y.inverted), !g && Y.fields && (g = !0);
|
|
2100
|
-
for (var
|
|
2101
|
-
var x =
|
|
2102
|
-
|
|
2100
|
+
for (var y = 0; y < h.length; y++) {
|
|
2101
|
+
var x = h[y];
|
|
2102
|
+
r[x] = r[x] || /* @__PURE__ */ Object.create(null);
|
|
2103
2103
|
for (var Q = 0; Q < D.length; Q++) {
|
|
2104
2104
|
var q = D[Q];
|
|
2105
|
-
|
|
2105
|
+
r[x][q] = r[x][q] || /* @__PURE__ */ Object.create(null), r[x][q][U] = Y;
|
|
2106
2106
|
}
|
|
2107
2107
|
}
|
|
2108
2108
|
}
|
|
2109
2109
|
return {
|
|
2110
2110
|
isAllInverted: u,
|
|
2111
2111
|
hasPerFieldRules: g,
|
|
2112
|
-
rules:
|
|
2112
|
+
rules: r
|
|
2113
2113
|
};
|
|
2114
|
-
}, o.expandActions = function(
|
|
2115
|
-
for (var
|
|
2114
|
+
}, o.expandActions = function(A) {
|
|
2115
|
+
for (var r = this[E].aliases, n = ne(A), u = 0; u < n.length; ) {
|
|
2116
2116
|
var g = n[u++];
|
|
2117
|
-
|
|
2117
|
+
r.hasOwnProperty(g) && (n = n.concat(r[g]));
|
|
2118
2118
|
}
|
|
2119
2119
|
return n;
|
|
2120
|
-
}, o.can = function(
|
|
2120
|
+
}, o.can = function(A, r, n) {
|
|
2121
2121
|
if (n && typeof n != "string")
|
|
2122
2122
|
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");
|
|
2123
|
-
var u = this.relevantRuleFor(
|
|
2123
|
+
var u = this.relevantRuleFor(A, r, n);
|
|
2124
2124
|
return !!u && !u.inverted;
|
|
2125
|
-
}, o.relevantRuleFor = function(
|
|
2126
|
-
for (var u = this.rulesFor(
|
|
2127
|
-
if (u[g].matches(
|
|
2125
|
+
}, o.relevantRuleFor = function(A, r, n) {
|
|
2126
|
+
for (var u = this.rulesFor(A, r, n), g = 0; g < u.length; g++)
|
|
2127
|
+
if (u[g].matches(r))
|
|
2128
2128
|
return u[g];
|
|
2129
2129
|
return null;
|
|
2130
|
-
}, o.possibleRulesFor = function(
|
|
2131
|
-
var n = this.subjectName(
|
|
2132
|
-
return u[g] || (u[g] = this.mergeRulesFor(
|
|
2133
|
-
}, o.mergeRulesFor = function(
|
|
2134
|
-
var n = this[E].indexedRules, u = [
|
|
2130
|
+
}, o.possibleRulesFor = function(A, r) {
|
|
2131
|
+
var n = this.subjectName(r), u = this[E].mergedRules, g = n + "_" + A;
|
|
2132
|
+
return u[g] || (u[g] = this.mergeRulesFor(A, n)), u[g];
|
|
2133
|
+
}, o.mergeRulesFor = function(A, r) {
|
|
2134
|
+
var n = this[E].indexedRules, u = [r, "all"].reduce(function(g, M) {
|
|
2135
2135
|
var Y = n[M];
|
|
2136
|
-
return Y ? Object.assign(g, Y[
|
|
2136
|
+
return Y ? Object.assign(g, Y[A], Y.manage) : g;
|
|
2137
2137
|
}, []);
|
|
2138
2138
|
return u.filter(Boolean);
|
|
2139
|
-
}, o.rulesFor = function(
|
|
2140
|
-
var u = this.possibleRulesFor(
|
|
2139
|
+
}, o.rulesFor = function(A, r, n) {
|
|
2140
|
+
var u = this.possibleRulesFor(A, r);
|
|
2141
2141
|
return this[E].hasPerFieldRules ? u.filter(function(g) {
|
|
2142
|
-
return g.isRelevantFor(
|
|
2142
|
+
return g.isRelevantFor(r, n);
|
|
2143
2143
|
}) : u;
|
|
2144
2144
|
}, o.cannot = function() {
|
|
2145
2145
|
return !this.can.apply(this, arguments);
|
|
2146
2146
|
}, o.throwUnlessCan = function() {
|
|
2147
|
-
var
|
|
2147
|
+
var A;
|
|
2148
2148
|
console.warn(`
|
|
2149
2149
|
Ability.throwUnlessCan is deprecated and will be removed in 4.x version.
|
|
2150
2150
|
Please use "ForbiddenError.from(ability).throwUnlessCan(...)" instead.
|
|
2151
|
-
`.trim()), (
|
|
2152
|
-
}, o.on = function(
|
|
2151
|
+
`.trim()), (A = _t.from(this)).throwUnlessCan.apply(A, arguments);
|
|
2152
|
+
}, o.on = function(A, r) {
|
|
2153
2153
|
var n = this[E].events, u = !0;
|
|
2154
|
-
return n[
|
|
2154
|
+
return n[A] || (n[A] = []), n[A].push(r), function() {
|
|
2155
2155
|
if (u) {
|
|
2156
|
-
var g = n[
|
|
2157
|
-
n[
|
|
2156
|
+
var g = n[A].indexOf(r);
|
|
2157
|
+
n[A].splice(g, 1), u = !1;
|
|
2158
2158
|
}
|
|
2159
2159
|
};
|
|
2160
|
-
}, o.emit = function(
|
|
2161
|
-
var n = this[E].events[
|
|
2160
|
+
}, o.emit = function(A, r) {
|
|
2161
|
+
var n = this[E].events[A];
|
|
2162
2162
|
n && n.slice(0).forEach(function(u) {
|
|
2163
|
-
return u(
|
|
2163
|
+
return u(r);
|
|
2164
2164
|
});
|
|
2165
2165
|
}, Jt(e, [{
|
|
2166
2166
|
key: "rules",
|
|
@@ -2168,8 +2168,8 @@ var is = /* @__PURE__ */ function() {
|
|
|
2168
2168
|
return this[E].originalRules;
|
|
2169
2169
|
}
|
|
2170
2170
|
}]), e;
|
|
2171
|
-
}(),
|
|
2172
|
-
const
|
|
2171
|
+
}(), s = /* @__PURE__ */ ((e) => (e.manage = "manage", e.create = "create", e.read = "read", e.update = "update", e.delete = "delete", e))(s || {}), l = /* @__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.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 = "business::menu", 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_reports_allDefaultReports = "business::report::allDefaultReports", e.report_reports_allCustomReports = "business::report::allCustomReports", e))(l || {}), C = /* @__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))(C || {}), Re = /* @__PURE__ */ ((e) => (e.restaurant = "restaurant", e))(Re || {});
|
|
2172
|
+
const w = {
|
|
2173
2173
|
general: "General",
|
|
2174
2174
|
inventory: "Inventory",
|
|
2175
2175
|
hrm: "HRM",
|
|
@@ -2178,407 +2178,322 @@ const b = {
|
|
|
2178
2178
|
reports: "Default Report",
|
|
2179
2179
|
customReports: "Custom Report"
|
|
2180
2180
|
}, ls = "access-denied", k = {
|
|
2181
|
-
Action:
|
|
2181
|
+
Action: s,
|
|
2182
2182
|
Subject: {
|
|
2183
|
-
Business:
|
|
2183
|
+
Business: l,
|
|
2184
2184
|
Restaurant: Re
|
|
2185
2185
|
}
|
|
2186
2186
|
}, Te = {
|
|
2187
|
-
[C.permission]:
|
|
2188
|
-
[C.promotion]:
|
|
2189
|
-
[C.voucher]:
|
|
2190
|
-
[C.membership]:
|
|
2191
|
-
[C.stock]:
|
|
2192
|
-
[C.wastageTemplate]:
|
|
2193
|
-
[C.closingTemplate]:
|
|
2194
|
-
[C.orderTemplate]:
|
|
2195
|
-
[C.ingredient]:
|
|
2196
|
-
[C.recipe]:
|
|
2197
|
-
[C.unit]:
|
|
2198
|
-
[C.supplier]:
|
|
2199
|
-
[C.warehouse]:
|
|
2200
|
-
[C.publish]:
|
|
2201
|
-
[C.integration]:
|
|
2202
|
-
[C.orderDraft]:
|
|
2203
|
-
[C.unitCostHistory]:
|
|
2187
|
+
[C.permission]: l.hrm_teamMember,
|
|
2188
|
+
[C.promotion]: l.crm_promotion,
|
|
2189
|
+
[C.voucher]: l.crm_voucher,
|
|
2190
|
+
[C.membership]: l.crm_membership,
|
|
2191
|
+
[C.stock]: l.inventory_stock,
|
|
2192
|
+
[C.wastageTemplate]: l.inventory_wastageTemplate,
|
|
2193
|
+
[C.closingTemplate]: l.inventory_closingTemplate,
|
|
2194
|
+
[C.orderTemplate]: l.inventory_orderTemplate,
|
|
2195
|
+
[C.ingredient]: l.inventory_ingredient,
|
|
2196
|
+
[C.recipe]: l.inventory_recipe,
|
|
2197
|
+
[C.unit]: l.inventory_unit,
|
|
2198
|
+
[C.supplier]: l.inventory_supplier,
|
|
2199
|
+
[C.warehouse]: l.inventory_warehouse,
|
|
2200
|
+
[C.publish]: l.inventory_publish,
|
|
2201
|
+
[C.integration]: l.inventory_integration,
|
|
2202
|
+
[C.orderDraft]: l.inventory_orderDraftApproval,
|
|
2203
|
+
[C.unitCostHistory]: l.inventory_unitCostHistory
|
|
2204
2204
|
};
|
|
2205
2205
|
function us(e) {
|
|
2206
2206
|
return Te[e] ?? e;
|
|
2207
2207
|
}
|
|
2208
|
-
function
|
|
2209
|
-
const o = Object.entries(Te).find(([,
|
|
2208
|
+
function uA(e) {
|
|
2209
|
+
const o = Object.entries(Te).find(([, c]) => c === e);
|
|
2210
2210
|
return o ? o[0] : e;
|
|
2211
2211
|
}
|
|
2212
|
-
const
|
|
2213
|
-
"closeup",
|
|
2214
|
-
"dailySales",
|
|
2215
|
-
"hourlySales",
|
|
2216
|
-
"drawer",
|
|
2217
|
-
"userProductSales",
|
|
2218
|
-
"counter",
|
|
2219
|
-
"discount",
|
|
2220
|
-
"timesheet",
|
|
2221
|
-
"productSales",
|
|
2222
|
-
"addonSales",
|
|
2223
|
-
"void",
|
|
2224
|
-
"refund"
|
|
2225
|
-
]), mr = {
|
|
2212
|
+
const gA = {
|
|
2226
2213
|
// General
|
|
2227
2214
|
restaurant: {
|
|
2228
2215
|
label: "Restaurant Owner",
|
|
2229
|
-
subject:
|
|
2230
|
-
actions: [
|
|
2231
|
-
category:
|
|
2216
|
+
subject: l.restaurant,
|
|
2217
|
+
actions: [s.manage],
|
|
2218
|
+
category: w.general
|
|
2232
2219
|
},
|
|
2233
2220
|
menu: {
|
|
2234
2221
|
label: "Menu Management",
|
|
2235
|
-
subject:
|
|
2236
|
-
actions: [
|
|
2237
|
-
category:
|
|
2222
|
+
subject: l.menu,
|
|
2223
|
+
actions: [s.manage],
|
|
2224
|
+
category: w.general
|
|
2238
2225
|
},
|
|
2239
2226
|
// inventory
|
|
2240
2227
|
stockBalance: {
|
|
2241
2228
|
label: "Stock Balance Management",
|
|
2242
|
-
subject:
|
|
2243
|
-
actions: [
|
|
2244
|
-
category:
|
|
2229
|
+
subject: l.inventory_stockBalance,
|
|
2230
|
+
actions: [s.manage],
|
|
2231
|
+
category: w.inventory
|
|
2245
2232
|
},
|
|
2246
2233
|
stockAdjustment: {
|
|
2247
2234
|
label: "Stock Adjustment Management",
|
|
2248
|
-
subject:
|
|
2249
|
-
actions: [
|
|
2250
|
-
category:
|
|
2235
|
+
subject: l.inventory_stockAdjustment,
|
|
2236
|
+
actions: [s.manage],
|
|
2237
|
+
category: w.inventory
|
|
2251
2238
|
},
|
|
2252
2239
|
unitCostHistory: {
|
|
2253
2240
|
label: "Unit Cost History Management",
|
|
2254
|
-
subject:
|
|
2255
|
-
actions: [
|
|
2256
|
-
category:
|
|
2241
|
+
subject: l.inventory_unitCostHistory,
|
|
2242
|
+
actions: [s.manage],
|
|
2243
|
+
category: w.inventory
|
|
2257
2244
|
},
|
|
2258
2245
|
wastageTemplate: {
|
|
2259
2246
|
label: "Wastage Template Management",
|
|
2260
|
-
subject:
|
|
2261
|
-
actions: [
|
|
2262
|
-
category:
|
|
2247
|
+
subject: l.inventory_wastageTemplate,
|
|
2248
|
+
actions: [s.manage],
|
|
2249
|
+
category: w.inventory,
|
|
2263
2250
|
showByFeatureFlag: "inventory_pos_adjust_v2_wastage"
|
|
2264
2251
|
},
|
|
2265
2252
|
closingHistory: {
|
|
2266
2253
|
label: "Closing History Management",
|
|
2267
|
-
subject:
|
|
2268
|
-
actions: [
|
|
2269
|
-
category:
|
|
2254
|
+
subject: l.inventory_closingHistory,
|
|
2255
|
+
actions: [s.manage],
|
|
2256
|
+
category: w.inventory
|
|
2270
2257
|
},
|
|
2271
2258
|
closingTemplate: {
|
|
2272
2259
|
label: "Closing Template Management",
|
|
2273
|
-
subject:
|
|
2274
|
-
actions: [
|
|
2275
|
-
category:
|
|
2260
|
+
subject: l.inventory_closingTemplate,
|
|
2261
|
+
actions: [s.manage],
|
|
2262
|
+
category: w.inventory,
|
|
2276
2263
|
showByFeatureFlag: "inventory_pos_closing_v2"
|
|
2277
2264
|
},
|
|
2278
2265
|
closingDraft: {
|
|
2279
2266
|
label: "Closing Draft Management",
|
|
2280
|
-
subject:
|
|
2281
|
-
actions: [
|
|
2282
|
-
category:
|
|
2267
|
+
subject: l.inventory_closingDraft,
|
|
2268
|
+
actions: [s.manage],
|
|
2269
|
+
category: w.inventory,
|
|
2283
2270
|
showByFeatureFlag: "inventory_pos_closing_v2"
|
|
2284
2271
|
},
|
|
2285
2272
|
ingredient: {
|
|
2286
2273
|
label: "Ingredient Management",
|
|
2287
|
-
subject:
|
|
2288
|
-
actions: [
|
|
2289
|
-
category:
|
|
2274
|
+
subject: l.inventory_ingredient,
|
|
2275
|
+
actions: [s.manage],
|
|
2276
|
+
category: w.inventory
|
|
2290
2277
|
},
|
|
2291
2278
|
ingredientGroup: {
|
|
2292
2279
|
label: "Ingredient Group Management",
|
|
2293
|
-
subject:
|
|
2294
|
-
actions: [
|
|
2280
|
+
subject: l.inventory_ingredientGroup,
|
|
2281
|
+
actions: [s.manage],
|
|
2295
2282
|
showByFeatureFlag: "inventory_ingredient_group",
|
|
2296
|
-
category:
|
|
2283
|
+
category: w.inventory
|
|
2297
2284
|
},
|
|
2298
2285
|
recipe: {
|
|
2299
2286
|
label: "Recipe Management",
|
|
2300
|
-
subject:
|
|
2301
|
-
actions: [
|
|
2302
|
-
category:
|
|
2287
|
+
subject: l.inventory_recipe,
|
|
2288
|
+
actions: [s.manage],
|
|
2289
|
+
category: w.inventory
|
|
2303
2290
|
},
|
|
2304
2291
|
unit: {
|
|
2305
2292
|
label: "Unit Management",
|
|
2306
|
-
subject:
|
|
2307
|
-
actions: [
|
|
2308
|
-
category:
|
|
2293
|
+
subject: l.inventory_unit,
|
|
2294
|
+
actions: [s.manage],
|
|
2295
|
+
category: w.inventory
|
|
2309
2296
|
},
|
|
2310
2297
|
purchaseTransfer: {
|
|
2311
2298
|
label: "Purchase / Transfer Management",
|
|
2312
|
-
subject:
|
|
2313
|
-
actions: [
|
|
2314
|
-
category:
|
|
2299
|
+
subject: l.inventory_purchaseTransfer,
|
|
2300
|
+
actions: [s.manage],
|
|
2301
|
+
category: w.inventory
|
|
2315
2302
|
},
|
|
2316
2303
|
orderDraftApproval: {
|
|
2317
2304
|
label: "Order Draft Approval",
|
|
2318
|
-
subject:
|
|
2319
|
-
actions: [
|
|
2320
|
-
category:
|
|
2305
|
+
subject: l.inventory_orderDraftApproval,
|
|
2306
|
+
actions: [s.manage],
|
|
2307
|
+
category: w.inventory
|
|
2321
2308
|
},
|
|
2322
2309
|
transferOut: {
|
|
2323
2310
|
label: "Transfer Out Management",
|
|
2324
|
-
subject:
|
|
2325
|
-
actions: [
|
|
2326
|
-
category:
|
|
2311
|
+
subject: l.inventory_transferOut,
|
|
2312
|
+
actions: [s.manage],
|
|
2313
|
+
category: w.inventory
|
|
2327
2314
|
},
|
|
2328
2315
|
surcharge: {
|
|
2329
2316
|
label: "Surcharge Management",
|
|
2330
|
-
subject:
|
|
2331
|
-
actions: [
|
|
2317
|
+
subject: l.inventory_surcharge,
|
|
2318
|
+
actions: [s.manage],
|
|
2332
2319
|
showByFeatureFlag: "inventory_portal_surcharge",
|
|
2333
|
-
category:
|
|
2320
|
+
category: w.inventory
|
|
2334
2321
|
},
|
|
2335
2322
|
orderTemplate: {
|
|
2336
2323
|
label: "Order Template Management",
|
|
2337
|
-
subject:
|
|
2338
|
-
actions: [
|
|
2324
|
+
subject: l.inventory_orderTemplate,
|
|
2325
|
+
actions: [s.manage],
|
|
2339
2326
|
showByFeatureFlag: "inventory_portal_must_use_transfer_template",
|
|
2340
|
-
category:
|
|
2327
|
+
category: w.inventory
|
|
2341
2328
|
},
|
|
2342
2329
|
supplier: {
|
|
2343
2330
|
label: "Supplier Management",
|
|
2344
|
-
subject:
|
|
2345
|
-
actions: [
|
|
2346
|
-
category:
|
|
2331
|
+
subject: l.inventory_supplier,
|
|
2332
|
+
actions: [s.manage],
|
|
2333
|
+
category: w.inventory
|
|
2347
2334
|
},
|
|
2348
2335
|
warehouse: {
|
|
2349
2336
|
label: "Warehouse Management",
|
|
2350
|
-
subject:
|
|
2351
|
-
actions: [
|
|
2352
|
-
category:
|
|
2337
|
+
subject: l.inventory_warehouse,
|
|
2338
|
+
actions: [s.manage],
|
|
2339
|
+
category: w.inventory
|
|
2353
2340
|
},
|
|
2354
2341
|
publish: {
|
|
2355
2342
|
label: "Publish Management",
|
|
2356
|
-
subject:
|
|
2357
|
-
actions: [
|
|
2358
|
-
category:
|
|
2343
|
+
subject: l.inventory_publish,
|
|
2344
|
+
actions: [s.manage],
|
|
2345
|
+
category: w.inventory
|
|
2359
2346
|
},
|
|
2360
2347
|
import: {
|
|
2361
2348
|
label: "Import Management",
|
|
2362
|
-
subject:
|
|
2363
|
-
actions: [
|
|
2349
|
+
subject: l.inventory_import,
|
|
2350
|
+
actions: [s.manage],
|
|
2364
2351
|
showByFeatureFlag: "inventory_bulk_import",
|
|
2365
|
-
category:
|
|
2352
|
+
category: w.inventory
|
|
2366
2353
|
},
|
|
2367
2354
|
integration: {
|
|
2368
2355
|
label: "Integration Management",
|
|
2369
|
-
subject:
|
|
2370
|
-
actions: [
|
|
2371
|
-
category:
|
|
2356
|
+
subject: l.inventory_integration,
|
|
2357
|
+
actions: [s.manage],
|
|
2358
|
+
category: w.inventory
|
|
2372
2359
|
},
|
|
2373
2360
|
// CRM
|
|
2374
2361
|
promotion: {
|
|
2375
2362
|
label: "Promotion Management",
|
|
2376
|
-
subject:
|
|
2377
|
-
actions: [
|
|
2378
|
-
category:
|
|
2363
|
+
subject: l.crm_promotion,
|
|
2364
|
+
actions: [s.manage],
|
|
2365
|
+
category: w.crm
|
|
2379
2366
|
},
|
|
2380
2367
|
voucher: {
|
|
2381
2368
|
label: "Voucher Management",
|
|
2382
|
-
subject:
|
|
2383
|
-
actions: [
|
|
2384
|
-
category:
|
|
2369
|
+
subject: l.crm_voucher,
|
|
2370
|
+
actions: [s.manage],
|
|
2371
|
+
category: w.crm
|
|
2385
2372
|
},
|
|
2386
2373
|
membership: {
|
|
2387
2374
|
label: "Membership Management",
|
|
2388
|
-
subject:
|
|
2389
|
-
actions: [
|
|
2390
|
-
category:
|
|
2375
|
+
subject: l.crm_membership,
|
|
2376
|
+
actions: [s.manage],
|
|
2377
|
+
category: w.crm
|
|
2391
2378
|
},
|
|
2392
2379
|
// HRM
|
|
2393
2380
|
teamMember: {
|
|
2394
2381
|
label: "Team Member Management",
|
|
2395
|
-
subject:
|
|
2396
|
-
actions: [
|
|
2397
|
-
category:
|
|
2382
|
+
subject: l.hrm_teamMember,
|
|
2383
|
+
actions: [s.manage],
|
|
2384
|
+
category: w.hrm
|
|
2398
2385
|
},
|
|
2399
2386
|
employee: {
|
|
2400
2387
|
label: "Employee Management",
|
|
2401
|
-
subject:
|
|
2402
|
-
actions: [
|
|
2403
|
-
category:
|
|
2388
|
+
subject: l.hrm_employee,
|
|
2389
|
+
actions: [s.manage],
|
|
2390
|
+
category: w.hrm
|
|
2404
2391
|
},
|
|
2405
2392
|
auditLog: {
|
|
2406
2393
|
label: "Audit Log Management",
|
|
2407
|
-
subject:
|
|
2408
|
-
actions: [
|
|
2409
|
-
category:
|
|
2394
|
+
subject: l.hrm_auditLog,
|
|
2395
|
+
actions: [s.manage],
|
|
2396
|
+
category: w.hrm
|
|
2410
2397
|
},
|
|
2411
2398
|
// Report
|
|
2412
2399
|
report_reports: {
|
|
2413
2400
|
label: "Create Report",
|
|
2414
|
-
subject:
|
|
2415
|
-
actions: [
|
|
2416
|
-
category:
|
|
2401
|
+
subject: l.report_createReport,
|
|
2402
|
+
actions: [s.manage],
|
|
2403
|
+
category: w.report
|
|
2417
2404
|
},
|
|
2418
2405
|
report_accessInsight: {
|
|
2419
2406
|
label: "Access Insight",
|
|
2420
|
-
subject:
|
|
2421
|
-
actions: [
|
|
2422
|
-
category:
|
|
2407
|
+
subject: l.report_accessInsight,
|
|
2408
|
+
actions: [s.manage],
|
|
2409
|
+
category: w.report
|
|
2423
2410
|
},
|
|
2424
2411
|
report_accessSetting: {
|
|
2425
2412
|
label: "Access Report Setting",
|
|
2426
|
-
subject:
|
|
2427
|
-
actions: [
|
|
2428
|
-
category:
|
|
2413
|
+
subject: l.report_accessSetting,
|
|
2414
|
+
actions: [s.manage],
|
|
2415
|
+
category: w.report
|
|
2429
2416
|
},
|
|
2430
2417
|
report_accessIntegration: {
|
|
2431
2418
|
label: "Access Report Integration",
|
|
2432
|
-
subject:
|
|
2433
|
-
actions: [
|
|
2434
|
-
category:
|
|
2419
|
+
subject: l.report_accessIntegration,
|
|
2420
|
+
actions: [s.manage],
|
|
2421
|
+
category: w.report
|
|
2435
2422
|
},
|
|
2436
2423
|
report_reports_allDefaultReports: {
|
|
2437
2424
|
label: "Include future Default Reports",
|
|
2438
|
-
subject:
|
|
2439
|
-
actions: [
|
|
2440
|
-
category:
|
|
2425
|
+
subject: l.report_reports_allDefaultReports,
|
|
2426
|
+
actions: [s.manage, s.read, s.create],
|
|
2427
|
+
category: w.reports,
|
|
2441
2428
|
isCategoryCover: !0
|
|
2442
2429
|
},
|
|
2443
|
-
closeup: {
|
|
2444
|
-
label: "Closeup",
|
|
2445
|
-
subject: c.report_reports_closeup,
|
|
2446
|
-
actions: [t.manage, t.read, t.create],
|
|
2447
|
-
category: b.reports
|
|
2448
|
-
},
|
|
2449
|
-
dailySales: {
|
|
2450
|
-
label: "Daily Sales",
|
|
2451
|
-
subject: c.report_reports_dailySales,
|
|
2452
|
-
actions: [t.manage, t.read, t.create],
|
|
2453
|
-
category: b.reports
|
|
2454
|
-
},
|
|
2455
|
-
hourlySales: {
|
|
2456
|
-
label: "Hourly Sales",
|
|
2457
|
-
subject: c.report_reports_hourlySales,
|
|
2458
|
-
actions: [t.manage, t.read, t.create],
|
|
2459
|
-
category: b.reports
|
|
2460
|
-
},
|
|
2461
|
-
drawer: {
|
|
2462
|
-
label: "Drawer",
|
|
2463
|
-
subject: c.report_reports_drawer,
|
|
2464
|
-
actions: [t.manage, t.read, t.create],
|
|
2465
|
-
category: b.reports
|
|
2466
|
-
},
|
|
2467
|
-
userProductSales: {
|
|
2468
|
-
label: "User Product Sales",
|
|
2469
|
-
subject: c.report_reports_userProductSales,
|
|
2470
|
-
actions: [t.manage, t.read, t.create],
|
|
2471
|
-
category: b.reports
|
|
2472
|
-
},
|
|
2473
|
-
counter: {
|
|
2474
|
-
label: "Counter",
|
|
2475
|
-
subject: c.report_reports_counter,
|
|
2476
|
-
actions: [t.manage, t.read, t.create],
|
|
2477
|
-
category: b.reports
|
|
2478
|
-
},
|
|
2479
|
-
discount: {
|
|
2480
|
-
label: "Discount",
|
|
2481
|
-
subject: c.report_reports_discount,
|
|
2482
|
-
actions: [t.manage, t.read, t.create],
|
|
2483
|
-
category: b.reports
|
|
2484
|
-
},
|
|
2485
|
-
timesheet: {
|
|
2486
|
-
label: "Timesheet",
|
|
2487
|
-
subject: c.report_reports_timesheet,
|
|
2488
|
-
actions: [t.manage, t.read, t.create],
|
|
2489
|
-
category: b.reports
|
|
2490
|
-
},
|
|
2491
|
-
productSales: {
|
|
2492
|
-
label: "Product Sales",
|
|
2493
|
-
subject: c.report_reports_productSales,
|
|
2494
|
-
actions: [t.manage, t.read, t.create],
|
|
2495
|
-
category: b.reports
|
|
2496
|
-
},
|
|
2497
|
-
addonSales: {
|
|
2498
|
-
label: "Addon Sales",
|
|
2499
|
-
subject: c.report_reports_addonSales,
|
|
2500
|
-
actions: [t.manage, t.read, t.create],
|
|
2501
|
-
category: b.reports
|
|
2502
|
-
},
|
|
2503
|
-
void: {
|
|
2504
|
-
label: "Void",
|
|
2505
|
-
subject: c.report_reports_void,
|
|
2506
|
-
actions: [t.manage, t.read, t.create],
|
|
2507
|
-
category: b.reports
|
|
2508
|
-
},
|
|
2509
|
-
refund: {
|
|
2510
|
-
label: "Refund",
|
|
2511
|
-
subject: c.report_reports_refund,
|
|
2512
|
-
actions: [t.manage, t.read, t.create],
|
|
2513
|
-
category: b.reports
|
|
2514
|
-
},
|
|
2515
2430
|
report_reports_allCustomReports: {
|
|
2516
2431
|
label: "Include future Custom Reports",
|
|
2517
|
-
subject:
|
|
2432
|
+
subject: l.report_reports_allCustomReports,
|
|
2518
2433
|
actions: [
|
|
2519
|
-
|
|
2520
|
-
|
|
2521
|
-
|
|
2522
|
-
|
|
2523
|
-
|
|
2434
|
+
s.manage,
|
|
2435
|
+
s.read,
|
|
2436
|
+
s.create,
|
|
2437
|
+
s.update,
|
|
2438
|
+
s.delete
|
|
2524
2439
|
],
|
|
2525
|
-
category:
|
|
2440
|
+
category: w.customReports,
|
|
2526
2441
|
isCategoryCover: !0
|
|
2527
2442
|
}
|
|
2528
2443
|
};
|
|
2529
2444
|
var B = /* @__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))(B || {});
|
|
2530
|
-
const
|
|
2445
|
+
const G = [
|
|
2531
2446
|
{
|
|
2532
2447
|
label: "Inventory",
|
|
2533
2448
|
subject: B.inventory,
|
|
2534
|
-
actions: [
|
|
2449
|
+
actions: [s.read]
|
|
2535
2450
|
}
|
|
2536
2451
|
], ie = [
|
|
2537
|
-
...
|
|
2452
|
+
...G,
|
|
2538
2453
|
{
|
|
2539
2454
|
label: "Stock",
|
|
2540
2455
|
subject: B.inventory_stock,
|
|
2541
|
-
actions: [
|
|
2456
|
+
actions: [s.read, s.create, s.update]
|
|
2542
2457
|
},
|
|
2543
2458
|
{
|
|
2544
2459
|
label: "Stock Adjustment",
|
|
2545
2460
|
subject: B.inventory_stockAdjustment,
|
|
2546
|
-
actions: [
|
|
2461
|
+
actions: [s.read, s.update]
|
|
2547
2462
|
},
|
|
2548
2463
|
{
|
|
2549
2464
|
label: "Stock Recalculation",
|
|
2550
2465
|
subject: B.inventory_stockRecalculation,
|
|
2551
|
-
actions: [
|
|
2466
|
+
actions: [s.update]
|
|
2552
2467
|
},
|
|
2553
2468
|
{
|
|
2554
2469
|
label: "Unit Cost History",
|
|
2555
2470
|
subject: B.inventory_unitCostHistory,
|
|
2556
|
-
actions: [
|
|
2471
|
+
actions: [s.read]
|
|
2557
2472
|
}
|
|
2558
2473
|
], gs = [
|
|
2559
|
-
...
|
|
2474
|
+
...G,
|
|
2560
2475
|
{
|
|
2561
2476
|
label: "Stock Adjustment",
|
|
2562
2477
|
subject: B.inventory_stockAdjustment,
|
|
2563
|
-
actions: [
|
|
2478
|
+
actions: [s.update]
|
|
2564
2479
|
}
|
|
2565
2480
|
], Ke = [
|
|
2566
|
-
...
|
|
2481
|
+
...G,
|
|
2567
2482
|
{
|
|
2568
2483
|
label: "Unit Cost History",
|
|
2569
2484
|
subject: B.inventory_unitCostHistory,
|
|
2570
|
-
actions: [
|
|
2485
|
+
actions: [s.read, s.update]
|
|
2571
2486
|
}
|
|
2572
2487
|
], Je = [
|
|
2573
|
-
...
|
|
2488
|
+
...G,
|
|
2574
2489
|
{
|
|
2575
2490
|
label: "Wastage Template",
|
|
2576
2491
|
subject: B.inventory_wastageTemplate,
|
|
2577
2492
|
actions: [
|
|
2578
|
-
|
|
2579
|
-
|
|
2580
|
-
|
|
2581
|
-
|
|
2493
|
+
s.read,
|
|
2494
|
+
s.create,
|
|
2495
|
+
s.update,
|
|
2496
|
+
s.delete
|
|
2582
2497
|
]
|
|
2583
2498
|
}
|
|
2584
2499
|
];
|
|
@@ -2588,65 +2503,65 @@ const y = [
|
|
|
2588
2503
|
...Je
|
|
2589
2504
|
];
|
|
2590
2505
|
const le = [
|
|
2591
|
-
...
|
|
2506
|
+
...G,
|
|
2592
2507
|
{
|
|
2593
2508
|
label: "Closing",
|
|
2594
2509
|
subject: B.inventory_closing,
|
|
2595
|
-
actions: [
|
|
2510
|
+
actions: [s.read, s.create]
|
|
2596
2511
|
},
|
|
2597
2512
|
{
|
|
2598
2513
|
label: "Stock Recalculation",
|
|
2599
2514
|
subject: B.inventory_stockRecalculation,
|
|
2600
|
-
actions: [
|
|
2515
|
+
actions: [s.read, s.update]
|
|
2601
2516
|
},
|
|
2602
2517
|
{
|
|
2603
2518
|
label: "Closing Draft",
|
|
2604
2519
|
subject: B.inventory_closingDraft,
|
|
2605
|
-
actions: [
|
|
2520
|
+
actions: [s.read]
|
|
2606
2521
|
}
|
|
2607
2522
|
], ke = [
|
|
2608
|
-
...
|
|
2523
|
+
...G,
|
|
2609
2524
|
{
|
|
2610
2525
|
label: "Closing Draft",
|
|
2611
2526
|
subject: B.inventory_closingDraft,
|
|
2612
|
-
actions: [
|
|
2527
|
+
actions: [s.read, s.create, s.update]
|
|
2613
2528
|
},
|
|
2614
2529
|
{
|
|
2615
2530
|
label: "Closing",
|
|
2616
2531
|
subject: B.inventory_closing,
|
|
2617
|
-
actions: [
|
|
2532
|
+
actions: [s.read]
|
|
2618
2533
|
},
|
|
2619
2534
|
{
|
|
2620
2535
|
label: "Stock Recalculation",
|
|
2621
2536
|
subject: B.inventory_stockRecalculation,
|
|
2622
|
-
actions: [
|
|
2537
|
+
actions: [s.read, s.update]
|
|
2623
2538
|
},
|
|
2624
2539
|
{
|
|
2625
2540
|
label: "Stock",
|
|
2626
2541
|
subject: B.inventory_stock,
|
|
2627
|
-
actions: [
|
|
2542
|
+
actions: [s.read]
|
|
2628
2543
|
},
|
|
2629
2544
|
{
|
|
2630
2545
|
label: "Stock Adjustment",
|
|
2631
2546
|
subject: B.inventory_stockAdjustment,
|
|
2632
|
-
actions: [
|
|
2547
|
+
actions: [s.read]
|
|
2633
2548
|
}
|
|
2634
2549
|
], Le = [
|
|
2635
|
-
...
|
|
2550
|
+
...G,
|
|
2636
2551
|
{
|
|
2637
2552
|
label: "Closing Template",
|
|
2638
2553
|
subject: B.inventory_closingTemplate,
|
|
2639
2554
|
actions: [
|
|
2640
|
-
|
|
2641
|
-
|
|
2642
|
-
|
|
2643
|
-
|
|
2555
|
+
s.read,
|
|
2556
|
+
s.create,
|
|
2557
|
+
s.update,
|
|
2558
|
+
s.delete
|
|
2644
2559
|
]
|
|
2645
2560
|
},
|
|
2646
2561
|
{
|
|
2647
2562
|
label: "Closing",
|
|
2648
2563
|
subject: B.inventory_closing,
|
|
2649
|
-
actions: [
|
|
2564
|
+
actions: [s.read]
|
|
2650
2565
|
}
|
|
2651
2566
|
];
|
|
2652
2567
|
[
|
|
@@ -2658,148 +2573,148 @@ const ms = [
|
|
|
2658
2573
|
{
|
|
2659
2574
|
label: "Inventory",
|
|
2660
2575
|
subject: B.inventory,
|
|
2661
|
-
actions: [
|
|
2576
|
+
actions: [s.read, s.update]
|
|
2662
2577
|
},
|
|
2663
2578
|
{
|
|
2664
2579
|
label: "Order Template",
|
|
2665
2580
|
subject: B.inventory_orderTemplate,
|
|
2666
|
-
actions: [
|
|
2581
|
+
actions: [s.read, s.update]
|
|
2667
2582
|
},
|
|
2668
2583
|
{
|
|
2669
2584
|
label: "Wastage Template",
|
|
2670
2585
|
subject: B.inventory_wastageTemplate,
|
|
2671
|
-
actions: [
|
|
2586
|
+
actions: [s.read, s.update]
|
|
2672
2587
|
},
|
|
2673
2588
|
{
|
|
2674
2589
|
label: "Closing Template",
|
|
2675
2590
|
subject: B.inventory_closingTemplate,
|
|
2676
|
-
actions: [
|
|
2591
|
+
actions: [s.read, s.update]
|
|
2677
2592
|
}
|
|
2678
2593
|
], ds = [
|
|
2679
2594
|
{
|
|
2680
2595
|
label: "Inventory",
|
|
2681
2596
|
subject: B.inventory,
|
|
2682
|
-
actions: [
|
|
2597
|
+
actions: [s.read, s.update]
|
|
2683
2598
|
}
|
|
2684
2599
|
], Bs = [
|
|
2685
2600
|
{
|
|
2686
2601
|
label: "Inventory",
|
|
2687
2602
|
subject: B.inventory,
|
|
2688
|
-
actions: [
|
|
2603
|
+
actions: [s.read, s.update]
|
|
2689
2604
|
}
|
|
2690
|
-
],
|
|
2605
|
+
], bs = [
|
|
2691
2606
|
{
|
|
2692
2607
|
label: "Inventory",
|
|
2693
2608
|
subject: B.inventory,
|
|
2694
|
-
actions: [
|
|
2609
|
+
actions: [s.read, s.update]
|
|
2695
2610
|
}
|
|
2696
2611
|
], Se = [
|
|
2697
2612
|
{
|
|
2698
2613
|
label: "Purchase Order",
|
|
2699
2614
|
subject: B.inventory_purchaseOrder,
|
|
2700
|
-
actions: [
|
|
2615
|
+
actions: [s.read, s.create, s.update]
|
|
2701
2616
|
},
|
|
2702
2617
|
{
|
|
2703
2618
|
label: "Inventory",
|
|
2704
2619
|
subject: B.inventory,
|
|
2705
|
-
actions: [
|
|
2620
|
+
actions: [s.read, s.create, s.update]
|
|
2706
2621
|
},
|
|
2707
2622
|
{
|
|
2708
2623
|
label: "Closing",
|
|
2709
2624
|
subject: B.inventory_closing,
|
|
2710
|
-
actions: [
|
|
2625
|
+
actions: [s.read]
|
|
2711
2626
|
},
|
|
2712
2627
|
{
|
|
2713
2628
|
label: "Order Template",
|
|
2714
2629
|
subject: B.inventory_orderTemplate,
|
|
2715
|
-
actions: [
|
|
2630
|
+
actions: [s.read]
|
|
2716
2631
|
},
|
|
2717
2632
|
{
|
|
2718
2633
|
label: "Supplier",
|
|
2719
2634
|
subject: B.inventory_supplier,
|
|
2720
|
-
actions: [
|
|
2635
|
+
actions: [s.read]
|
|
2721
2636
|
},
|
|
2722
2637
|
{
|
|
2723
2638
|
label: "Surcharge",
|
|
2724
2639
|
subject: B.inventory_surcharge,
|
|
2725
|
-
actions: [
|
|
2640
|
+
actions: [s.read]
|
|
2726
2641
|
},
|
|
2727
2642
|
{
|
|
2728
2643
|
label: "Delivery Order",
|
|
2729
2644
|
subject: B.inventory_deliveryOrder,
|
|
2730
|
-
actions: [
|
|
2645
|
+
actions: [s.read, s.create, s.update]
|
|
2731
2646
|
},
|
|
2732
2647
|
{
|
|
2733
2648
|
label: "Shipment",
|
|
2734
2649
|
subject: B.inventory_shipment,
|
|
2735
|
-
actions: [
|
|
2650
|
+
actions: [s.read, s.update]
|
|
2736
2651
|
}
|
|
2737
2652
|
], _e = [
|
|
2738
2653
|
{
|
|
2739
2654
|
label: "Purchase Order",
|
|
2740
2655
|
subject: B.inventory_purchaseOrder,
|
|
2741
|
-
actions: [
|
|
2656
|
+
actions: [s.read, s.update]
|
|
2742
2657
|
},
|
|
2743
2658
|
{
|
|
2744
2659
|
label: "Inventory",
|
|
2745
2660
|
subject: B.inventory,
|
|
2746
|
-
actions: [
|
|
2661
|
+
actions: [s.read, s.create, s.update]
|
|
2747
2662
|
},
|
|
2748
2663
|
{
|
|
2749
2664
|
label: "Delivery Order",
|
|
2750
2665
|
subject: B.inventory_deliveryOrder,
|
|
2751
|
-
actions: [
|
|
2666
|
+
actions: [s.read, s.create, s.update]
|
|
2752
2667
|
},
|
|
2753
2668
|
{
|
|
2754
2669
|
label: "Shipment",
|
|
2755
2670
|
subject: B.inventory_shipment,
|
|
2756
|
-
actions: [
|
|
2671
|
+
actions: [s.read, s.update]
|
|
2757
2672
|
}
|
|
2758
2673
|
], $e = [
|
|
2759
|
-
...
|
|
2674
|
+
...G,
|
|
2760
2675
|
{
|
|
2761
2676
|
label: "Surcharge",
|
|
2762
2677
|
subject: B.inventory_surcharge,
|
|
2763
2678
|
actions: [
|
|
2764
|
-
|
|
2765
|
-
|
|
2766
|
-
|
|
2767
|
-
|
|
2679
|
+
s.read,
|
|
2680
|
+
s.create,
|
|
2681
|
+
s.update,
|
|
2682
|
+
s.delete
|
|
2768
2683
|
]
|
|
2769
2684
|
},
|
|
2770
2685
|
{
|
|
2771
2686
|
label: "Supplier",
|
|
2772
2687
|
subject: B.inventory_supplier,
|
|
2773
|
-
actions: [
|
|
2688
|
+
actions: [s.read]
|
|
2774
2689
|
}
|
|
2775
2690
|
], et = [
|
|
2776
|
-
...
|
|
2691
|
+
...G,
|
|
2777
2692
|
{
|
|
2778
2693
|
label: "Order Template",
|
|
2779
2694
|
subject: B.inventory_orderTemplate,
|
|
2780
2695
|
actions: [
|
|
2781
|
-
|
|
2782
|
-
|
|
2783
|
-
|
|
2784
|
-
|
|
2696
|
+
s.read,
|
|
2697
|
+
s.create,
|
|
2698
|
+
s.update,
|
|
2699
|
+
s.delete
|
|
2785
2700
|
]
|
|
2786
2701
|
},
|
|
2787
2702
|
{
|
|
2788
2703
|
label: "Supplier",
|
|
2789
2704
|
subject: B.inventory_supplier,
|
|
2790
|
-
actions: [
|
|
2705
|
+
actions: [s.read]
|
|
2791
2706
|
},
|
|
2792
2707
|
{
|
|
2793
2708
|
label: "Shipment",
|
|
2794
2709
|
subject: B.inventory_shipment,
|
|
2795
|
-
actions: [
|
|
2710
|
+
actions: [s.read, s.update]
|
|
2796
2711
|
}
|
|
2797
|
-
],
|
|
2798
|
-
...
|
|
2712
|
+
], ps = [
|
|
2713
|
+
...G,
|
|
2799
2714
|
{
|
|
2800
2715
|
label: "Order Draft Approval",
|
|
2801
2716
|
subject: B.inventory_orderDraftApproval,
|
|
2802
|
-
actions: [
|
|
2717
|
+
actions: [s.update]
|
|
2803
2718
|
}
|
|
2804
2719
|
];
|
|
2805
2720
|
[
|
|
@@ -2809,162 +2724,162 @@ const ms = [
|
|
|
2809
2724
|
...et
|
|
2810
2725
|
];
|
|
2811
2726
|
const ws = [
|
|
2812
|
-
...
|
|
2727
|
+
...G,
|
|
2813
2728
|
{
|
|
2814
2729
|
label: "Supplier",
|
|
2815
2730
|
subject: B.inventory_supplier,
|
|
2816
2731
|
actions: [
|
|
2817
|
-
|
|
2818
|
-
|
|
2819
|
-
|
|
2820
|
-
|
|
2732
|
+
s.read,
|
|
2733
|
+
s.create,
|
|
2734
|
+
s.update,
|
|
2735
|
+
s.delete
|
|
2821
2736
|
]
|
|
2822
2737
|
},
|
|
2823
2738
|
{
|
|
2824
2739
|
label: "Order Template",
|
|
2825
2740
|
subject: B.inventory_orderTemplate,
|
|
2826
|
-
actions: [
|
|
2741
|
+
actions: [s.read, s.update]
|
|
2827
2742
|
}
|
|
2828
2743
|
], fs = [
|
|
2829
|
-
...
|
|
2744
|
+
...G,
|
|
2830
2745
|
{
|
|
2831
2746
|
label: "Warehouse",
|
|
2832
2747
|
subject: B.inventory_warehouse,
|
|
2833
2748
|
actions: [
|
|
2834
|
-
|
|
2835
|
-
|
|
2836
|
-
|
|
2837
|
-
|
|
2749
|
+
s.read,
|
|
2750
|
+
s.create,
|
|
2751
|
+
s.update,
|
|
2752
|
+
s.delete
|
|
2838
2753
|
]
|
|
2839
2754
|
}
|
|
2840
2755
|
], Ds = [
|
|
2841
2756
|
{
|
|
2842
2757
|
label: "Inventory",
|
|
2843
2758
|
subject: B.inventory,
|
|
2844
|
-
actions: [
|
|
2759
|
+
actions: [s.read, s.update]
|
|
2845
2760
|
}
|
|
2846
2761
|
], Ms = [
|
|
2847
|
-
...
|
|
2762
|
+
...G,
|
|
2848
2763
|
{
|
|
2849
2764
|
label: "Inventory",
|
|
2850
2765
|
subject: B.inventory,
|
|
2851
|
-
actions: [
|
|
2766
|
+
actions: [s.update]
|
|
2852
2767
|
}
|
|
2853
2768
|
], Ys = [
|
|
2854
|
-
...
|
|
2769
|
+
...G,
|
|
2855
2770
|
{
|
|
2856
2771
|
label: "Integration",
|
|
2857
2772
|
subject: B.inventory_integration,
|
|
2858
|
-
actions: [
|
|
2773
|
+
actions: [s.read, s.create, s.update]
|
|
2859
2774
|
}
|
|
2860
2775
|
];
|
|
2861
2776
|
[
|
|
2862
|
-
...
|
|
2777
|
+
...G,
|
|
2863
2778
|
...ie,
|
|
2864
2779
|
...le
|
|
2865
2780
|
];
|
|
2866
2781
|
const Cs = {
|
|
2867
|
-
[`set_${
|
|
2782
|
+
[`set_${l.inventory_stockBalance}`]: {
|
|
2868
2783
|
key: "sys:inventory:stock_balance",
|
|
2869
2784
|
name: "Stock Balance",
|
|
2870
2785
|
permissions: ie
|
|
2871
2786
|
},
|
|
2872
|
-
[`set_${
|
|
2787
|
+
[`set_${l.inventory_stockAdjustment}`]: {
|
|
2873
2788
|
key: "sys:inventory:stock_adjustment",
|
|
2874
2789
|
name: "Stock Adjustment",
|
|
2875
2790
|
permissions: gs
|
|
2876
2791
|
},
|
|
2877
|
-
[`set_${
|
|
2792
|
+
[`set_${l.inventory_unitCostHistory}`]: {
|
|
2878
2793
|
key: "sys:inventory:unit_cost_history",
|
|
2879
2794
|
name: "Unit Cost History",
|
|
2880
2795
|
permissions: Ke
|
|
2881
2796
|
},
|
|
2882
|
-
[`set_${
|
|
2797
|
+
[`set_${l.inventory_wastageTemplate}`]: {
|
|
2883
2798
|
key: "sys:inventory:wastage_template",
|
|
2884
2799
|
name: "Wastage Template",
|
|
2885
2800
|
permissions: Je
|
|
2886
2801
|
},
|
|
2887
|
-
[`set_${
|
|
2802
|
+
[`set_${l.inventory_closingHistory}`]: {
|
|
2888
2803
|
key: "sys:inventory:closing_history",
|
|
2889
2804
|
name: "Closing History",
|
|
2890
2805
|
permissions: le
|
|
2891
2806
|
},
|
|
2892
|
-
[`set_${
|
|
2807
|
+
[`set_${l.inventory_closingTemplate}`]: {
|
|
2893
2808
|
key: "sys:inventory:closing_template",
|
|
2894
2809
|
name: "Closing Template",
|
|
2895
2810
|
permissions: Le
|
|
2896
2811
|
},
|
|
2897
|
-
[`set_${
|
|
2812
|
+
[`set_${l.inventory_closingDraft}`]: {
|
|
2898
2813
|
key: "sys:inventory:closing_draft",
|
|
2899
2814
|
name: "Closing Draft",
|
|
2900
2815
|
permissions: ke
|
|
2901
2816
|
},
|
|
2902
|
-
[`set_${
|
|
2817
|
+
[`set_${l.inventory_ingredient}`]: {
|
|
2903
2818
|
key: "sys:inventory:ingredient",
|
|
2904
2819
|
name: "Ingredient",
|
|
2905
2820
|
permissions: ms
|
|
2906
2821
|
},
|
|
2907
|
-
[`set_${
|
|
2822
|
+
[`set_${l.inventory_ingredientGroup}`]: {
|
|
2908
2823
|
key: "sys:inventory:ingredient_group",
|
|
2909
2824
|
name: "Ingredient Group",
|
|
2910
2825
|
permissions: ds
|
|
2911
2826
|
},
|
|
2912
|
-
[`set_${
|
|
2827
|
+
[`set_${l.inventory_recipe}`]: {
|
|
2913
2828
|
key: "sys:inventory:recipe",
|
|
2914
2829
|
name: "Recipe",
|
|
2915
2830
|
permissions: Bs
|
|
2916
2831
|
},
|
|
2917
|
-
[`set_${
|
|
2832
|
+
[`set_${l.inventory_unit}`]: {
|
|
2918
2833
|
key: "sys:inventory:unit",
|
|
2919
2834
|
name: "Unit",
|
|
2920
|
-
permissions:
|
|
2835
|
+
permissions: bs
|
|
2921
2836
|
},
|
|
2922
|
-
[`set_${
|
|
2837
|
+
[`set_${l.inventory_purchaseTransfer}`]: {
|
|
2923
2838
|
key: "sys:inventory:purchase_transfer",
|
|
2924
2839
|
name: "Purchase Transfer",
|
|
2925
2840
|
permissions: Se
|
|
2926
2841
|
},
|
|
2927
|
-
[`set_${
|
|
2842
|
+
[`set_${l.inventory_orderDraftApproval}`]: {
|
|
2928
2843
|
key: "sys:inventory:order_draft_approval",
|
|
2929
2844
|
name: "Order Draft Approval",
|
|
2930
|
-
permissions:
|
|
2845
|
+
permissions: ps
|
|
2931
2846
|
},
|
|
2932
|
-
[`set_${
|
|
2847
|
+
[`set_${l.inventory_transferOut}`]: {
|
|
2933
2848
|
key: "sys:inventory:transfer_out",
|
|
2934
2849
|
name: "Transfer Out",
|
|
2935
2850
|
permissions: _e
|
|
2936
2851
|
},
|
|
2937
|
-
[`set_${
|
|
2852
|
+
[`set_${l.inventory_surcharge}`]: {
|
|
2938
2853
|
key: "sys:inventory:surcharge",
|
|
2939
2854
|
name: "Surcharge",
|
|
2940
2855
|
permissions: $e
|
|
2941
2856
|
},
|
|
2942
|
-
[`set_${
|
|
2857
|
+
[`set_${l.inventory_orderTemplate}`]: {
|
|
2943
2858
|
key: "sys:inventory:order_template",
|
|
2944
2859
|
name: "Order Template",
|
|
2945
2860
|
permissions: et
|
|
2946
2861
|
},
|
|
2947
|
-
[`set_${
|
|
2862
|
+
[`set_${l.inventory_supplier}`]: {
|
|
2948
2863
|
key: "sys:inventory:supplier",
|
|
2949
2864
|
name: "Supplier",
|
|
2950
2865
|
permissions: ws
|
|
2951
2866
|
},
|
|
2952
|
-
[`set_${
|
|
2867
|
+
[`set_${l.inventory_warehouse}`]: {
|
|
2953
2868
|
key: "sys:inventory:warehouse",
|
|
2954
2869
|
name: "Warehouse",
|
|
2955
2870
|
permissions: fs
|
|
2956
2871
|
},
|
|
2957
|
-
[`set_${
|
|
2872
|
+
[`set_${l.inventory_publish}`]: {
|
|
2958
2873
|
key: "sys:inventory:publish",
|
|
2959
2874
|
name: "Publish",
|
|
2960
2875
|
permissions: Ds
|
|
2961
2876
|
},
|
|
2962
|
-
[`set_${
|
|
2877
|
+
[`set_${l.inventory_import}`]: {
|
|
2963
2878
|
key: "sys:inventory:import",
|
|
2964
2879
|
name: "Import",
|
|
2965
2880
|
permissions: Ms
|
|
2966
2881
|
},
|
|
2967
|
-
[`set_${
|
|
2882
|
+
[`set_${l.inventory_integration}`]: {
|
|
2968
2883
|
key: "sys:inventory:integration",
|
|
2969
2884
|
name: "Integration",
|
|
2970
2885
|
permissions: Ys
|
|
@@ -2977,24 +2892,24 @@ const vs = {
|
|
|
2977
2892
|
* Injects: team member list read + pos role read
|
|
2978
2893
|
* Users who can manage team members need to see the team member list and assign POS roles.
|
|
2979
2894
|
*/
|
|
2980
|
-
[`set_${
|
|
2895
|
+
[`set_${l.hrm_teamMember}`]: {
|
|
2981
2896
|
key: "sys:team_member_access",
|
|
2982
2897
|
name: "Team Member Access",
|
|
2983
2898
|
permissions: [
|
|
2984
2899
|
{
|
|
2985
2900
|
label: "Portal Users",
|
|
2986
2901
|
subject: Z.hrm_portalUsers,
|
|
2987
|
-
actions: [
|
|
2902
|
+
actions: [s.manage]
|
|
2988
2903
|
},
|
|
2989
2904
|
{
|
|
2990
2905
|
label: "Role resource",
|
|
2991
|
-
subject:
|
|
2992
|
-
actions: [
|
|
2906
|
+
subject: l.role,
|
|
2907
|
+
actions: [s.read, s.update]
|
|
2993
2908
|
},
|
|
2994
2909
|
{
|
|
2995
2910
|
label: "Pos Role",
|
|
2996
2911
|
subject: Z.hrm_posRole,
|
|
2997
|
-
actions: [
|
|
2912
|
+
actions: [s.read]
|
|
2998
2913
|
}
|
|
2999
2914
|
]
|
|
3000
2915
|
},
|
|
@@ -3002,24 +2917,24 @@ const vs = {
|
|
|
3002
2917
|
* Triggered by: hrm_employee:manage (portal toggle)
|
|
3003
2918
|
* Injects: pos role read + restaurant manage (cross-level: needed for employee–restaurant linking)
|
|
3004
2919
|
*/
|
|
3005
|
-
[`set_${
|
|
2920
|
+
[`set_${l.hrm_employee}`]: {
|
|
3006
2921
|
key: "sys:employee_access",
|
|
3007
2922
|
name: "Employee Access",
|
|
3008
2923
|
permissions: [
|
|
3009
2924
|
{
|
|
3010
2925
|
label: "Portal Users",
|
|
3011
2926
|
subject: Z.hrm_portalUsers,
|
|
3012
|
-
actions: [
|
|
2927
|
+
actions: [s.read]
|
|
3013
2928
|
},
|
|
3014
2929
|
{
|
|
3015
2930
|
label: "Restaurant resource",
|
|
3016
|
-
subject:
|
|
3017
|
-
actions: [
|
|
2931
|
+
subject: l.restaurant,
|
|
2932
|
+
actions: [s.read]
|
|
3018
2933
|
},
|
|
3019
2934
|
{
|
|
3020
2935
|
label: "Pos Role",
|
|
3021
2936
|
subject: Z.hrm_posRole,
|
|
3022
|
-
actions: [
|
|
2937
|
+
actions: [s.manage]
|
|
3023
2938
|
}
|
|
3024
2939
|
]
|
|
3025
2940
|
},
|
|
@@ -3029,43 +2944,43 @@ const vs = {
|
|
|
3029
2944
|
* Uses HrmResource.hrm_portalUsers (not the module subject hrm_teamMember) to avoid
|
|
3030
2945
|
* conflating the audit-log read dependency with the full team-management module grant.
|
|
3031
2946
|
*/
|
|
3032
|
-
[`set_${
|
|
2947
|
+
[`set_${l.hrm_auditLog}`]: {
|
|
3033
2948
|
key: "sys:audit_log_access",
|
|
3034
2949
|
name: "Audit Log Access",
|
|
3035
2950
|
permissions: [
|
|
3036
2951
|
{
|
|
3037
2952
|
label: "Portal Users",
|
|
3038
2953
|
subject: Z.hrm_portalUsers,
|
|
3039
|
-
actions: [
|
|
2954
|
+
actions: [s.read]
|
|
3040
2955
|
}
|
|
3041
2956
|
]
|
|
3042
2957
|
}
|
|
3043
|
-
},
|
|
2958
|
+
}, Gs = {
|
|
3044
2959
|
...Cs,
|
|
3045
2960
|
...vs
|
|
3046
|
-
},
|
|
3047
|
-
|
|
2961
|
+
}, mA = Object.values(
|
|
2962
|
+
Gs
|
|
3048
2963
|
).flatMap((e) => e.permissions ?? []).reduce(
|
|
3049
2964
|
(e, o) => {
|
|
3050
|
-
var
|
|
3051
|
-
return e[
|
|
2965
|
+
var c;
|
|
2966
|
+
return e[c = o.subject] ?? (e[c] = o.label), e;
|
|
3052
2967
|
},
|
|
3053
2968
|
{}
|
|
3054
2969
|
);
|
|
3055
|
-
function
|
|
2970
|
+
function hs(e) {
|
|
3056
2971
|
return e.map((o) => ({
|
|
3057
2972
|
...o,
|
|
3058
2973
|
subject: us(o.subject),
|
|
3059
2974
|
reason: o.source !== void 0 ? JSON.stringify(o.source) : o.reason
|
|
3060
2975
|
}));
|
|
3061
2976
|
}
|
|
3062
|
-
function
|
|
3063
|
-
return new is(
|
|
2977
|
+
function ys(e) {
|
|
2978
|
+
return new is(hs(e));
|
|
3064
2979
|
}
|
|
3065
|
-
function Vs(e, o,
|
|
3066
|
-
const
|
|
2980
|
+
function Vs(e, o, c) {
|
|
2981
|
+
const A = Array.isArray(e) ? e : [e], r = ys(o), n = (D) => D.subject, u = (D) => r.can(D.action, n(D), D.field) ? !0 : D.coverSubject !== void 0 ? r.can(D.action, D.coverSubject, D.field) : !1, g = A.find((D) => !u(D));
|
|
3067
2982
|
if (g) {
|
|
3068
|
-
const D =
|
|
2983
|
+
const D = r.relevantRuleFor(
|
|
3069
2984
|
g.action,
|
|
3070
2985
|
n(g),
|
|
3071
2986
|
g.field
|
|
@@ -3076,20 +2991,20 @@ function Vs(e, o, i) {
|
|
|
3076
2991
|
decisiveRule: D ?? null
|
|
3077
2992
|
};
|
|
3078
2993
|
}
|
|
3079
|
-
const M =
|
|
2994
|
+
const M = A[0], Y = r.relevantRuleFor(M.action, n(M), M.field);
|
|
3080
2995
|
return { granted: !0, decisivePermission: M, decisiveRule: Y ?? null };
|
|
3081
2996
|
}
|
|
3082
2997
|
async function js(e) {
|
|
3083
|
-
const { sessionUser: o, validationManifest:
|
|
2998
|
+
const { sessionUser: o, validationManifest: c } = e, { requiredRoles: A, requiredCaslPermissions: r, customValidationFunction: n } = c;
|
|
3084
2999
|
if (!o)
|
|
3085
3000
|
return { canAccess: !1 };
|
|
3086
|
-
if (
|
|
3001
|
+
if (A && A.length > 0 && !A.includes(o._role || ""))
|
|
3087
3002
|
return Promise.resolve({
|
|
3088
3003
|
canAccess: !1,
|
|
3089
3004
|
message: "User does not have permission to access"
|
|
3090
3005
|
});
|
|
3091
|
-
if (
|
|
3092
|
-
const { granted: u } = Vs(
|
|
3006
|
+
if (r && r.length > 0) {
|
|
3007
|
+
const { granted: u } = Vs(r, o.permissions);
|
|
3093
3008
|
if (!u)
|
|
3094
3009
|
return Promise.resolve({
|
|
3095
3010
|
canAccess: !1,
|
|
@@ -3105,16 +3020,16 @@ async function js(e) {
|
|
|
3105
3020
|
}
|
|
3106
3021
|
async function Es(e) {
|
|
3107
3022
|
const { useCoreStore: o } = await import("@feedmepos/mf-common");
|
|
3108
|
-
for (const
|
|
3109
|
-
if (
|
|
3110
|
-
const
|
|
3023
|
+
for (const c of e.matched)
|
|
3024
|
+
if (c.meta.validationManifest) {
|
|
3025
|
+
const A = await js({
|
|
3111
3026
|
sessionUser: o().sessionUser.value,
|
|
3112
|
-
validationManifest:
|
|
3027
|
+
validationManifest: c.meta.validationManifest
|
|
3113
3028
|
});
|
|
3114
|
-
if (!
|
|
3029
|
+
if (!A.canAccess)
|
|
3115
3030
|
return {
|
|
3116
3031
|
canAccess: !1,
|
|
3117
|
-
message:
|
|
3032
|
+
message: A.message,
|
|
3118
3033
|
redirectTo: ls
|
|
3119
3034
|
};
|
|
3120
3035
|
}
|
|
@@ -3145,7 +3060,7 @@ const xs = "data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20xml
|
|
|
3145
3060
|
}, Is = { class: "w-full h-full flex justify-center items-center" }, zs = { class: "flex flex-row xs:flex-col items-center gap-24 p-16" }, Ns = { class: "w-[300px] h-[300px]" }, Ws = ["src"], Us = { class: "text-2xl" }, Rs = { class: "text-xl" }, Ts = /* @__PURE__ */ I({
|
|
3146
3061
|
__name: "NoPermission",
|
|
3147
3062
|
setup(e) {
|
|
3148
|
-
const { t: o } =
|
|
3063
|
+
const { t: o } = he({
|
|
3149
3064
|
messages: {
|
|
3150
3065
|
"en-US": Xs,
|
|
3151
3066
|
"zh-CN": Hs,
|
|
@@ -3153,7 +3068,7 @@ const xs = "data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20xml
|
|
|
3153
3068
|
"th-TH": Zs
|
|
3154
3069
|
}
|
|
3155
3070
|
});
|
|
3156
|
-
return (
|
|
3071
|
+
return (c, A) => (z(), ve("div", Is, [
|
|
3157
3072
|
P("div", zs, [
|
|
3158
3073
|
P("div", Ns, [
|
|
3159
3074
|
P("img", {
|
|
@@ -3162,8 +3077,8 @@ const xs = "data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20xml
|
|
|
3162
3077
|
}, null, 8, Ws)
|
|
3163
3078
|
]),
|
|
3164
3079
|
P("div", null, [
|
|
3165
|
-
P("h1", Us,
|
|
3166
|
-
P("h2", Rs,
|
|
3080
|
+
P("h1", Us, pe(se(o)("noPermission.title")), 1),
|
|
3081
|
+
P("h2", Rs, pe(se(o)("noPermission.subtitle")), 1)
|
|
3167
3082
|
])
|
|
3168
3083
|
])
|
|
3169
3084
|
]));
|
|
@@ -3171,55 +3086,55 @@ const xs = "data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20xml
|
|
|
3171
3086
|
}), Ks = /* @__PURE__ */ I({
|
|
3172
3087
|
__name: "PermissionWrapper",
|
|
3173
3088
|
setup(e) {
|
|
3174
|
-
const o = S(!1),
|
|
3089
|
+
const o = S(!1), c = mt();
|
|
3175
3090
|
return oe(async () => {
|
|
3176
|
-
const
|
|
3177
|
-
o.value =
|
|
3178
|
-
}), (
|
|
3091
|
+
const A = await Es(c);
|
|
3092
|
+
o.value = A.canAccess;
|
|
3093
|
+
}), (A, r) => o.value ? Ce(A.$slots, "default", { key: 1 }) : (z(), _(Ts, { key: 0 }));
|
|
3179
3094
|
}
|
|
3180
3095
|
});
|
|
3181
3096
|
function ue(e) {
|
|
3182
3097
|
return {
|
|
3183
|
-
render: () =>
|
|
3098
|
+
render: () => be(Ks, {}, { default: () => be(e) })
|
|
3184
3099
|
};
|
|
3185
3100
|
}
|
|
3186
3101
|
function Js(e, o) {
|
|
3187
|
-
const
|
|
3188
|
-
function
|
|
3102
|
+
const c = S({ top: 0, bottom: 0, left: 0, right: 0 });
|
|
3103
|
+
function A() {
|
|
3189
3104
|
if (e.value) {
|
|
3190
|
-
const
|
|
3191
|
-
|
|
3192
|
-
top:
|
|
3193
|
-
bottom:
|
|
3194
|
-
left:
|
|
3195
|
-
right:
|
|
3105
|
+
const r = e.value.getBoundingClientRect();
|
|
3106
|
+
c.value = {
|
|
3107
|
+
top: r.top,
|
|
3108
|
+
bottom: r.bottom,
|
|
3109
|
+
left: r.left,
|
|
3110
|
+
right: r.right
|
|
3196
3111
|
};
|
|
3197
3112
|
}
|
|
3198
3113
|
}
|
|
3199
3114
|
return we(o, async () => {
|
|
3200
|
-
await fe(),
|
|
3201
|
-
}), we(e, async (
|
|
3202
|
-
|
|
3115
|
+
await fe(), A();
|
|
3116
|
+
}), we(e, async (r) => {
|
|
3117
|
+
r && (await fe(), A());
|
|
3203
3118
|
}), oe(() => {
|
|
3204
|
-
window.addEventListener("resize",
|
|
3119
|
+
window.addEventListener("resize", A);
|
|
3205
3120
|
}), nt(() => {
|
|
3206
|
-
window.removeEventListener("resize",
|
|
3207
|
-
}),
|
|
3121
|
+
window.removeEventListener("resize", A);
|
|
3122
|
+
}), c;
|
|
3208
3123
|
}
|
|
3209
3124
|
const ks = /* @__PURE__ */ I({
|
|
3210
3125
|
__name: "FullWrapper",
|
|
3211
3126
|
setup(e) {
|
|
3212
|
-
const o = gt(),
|
|
3127
|
+
const o = gt(), c = S(null), A = Js(c), r = Ge(() => {
|
|
3213
3128
|
var g;
|
|
3214
3129
|
const u = o.isAtMost("sm") ? 56 : 0;
|
|
3215
3130
|
return {
|
|
3216
|
-
height: `calc(100dvh - ${((g =
|
|
3131
|
+
height: `calc(100dvh - ${((g = A.value) == null ? void 0 : g.top) + 24 + u}px)`
|
|
3217
3132
|
};
|
|
3218
3133
|
});
|
|
3219
3134
|
return (n, u) => (z(), ve("div", {
|
|
3220
3135
|
ref_key: "wrapper",
|
|
3221
|
-
ref:
|
|
3222
|
-
style: ot(
|
|
3136
|
+
ref: c,
|
|
3137
|
+
style: ot(r.value)
|
|
3223
3138
|
}, [
|
|
3224
3139
|
Ce(n.$slots, "default")
|
|
3225
3140
|
], 4));
|
|
@@ -3227,12 +3142,12 @@ const ks = /* @__PURE__ */ I({
|
|
|
3227
3142
|
}), Ls = { class: "flex justify-center items-center h-full w-full" }, Ss = /* @__PURE__ */ I({
|
|
3228
3143
|
__name: "PageLoading",
|
|
3229
3144
|
setup(e) {
|
|
3230
|
-
return (o,
|
|
3231
|
-
const
|
|
3145
|
+
return (o, c) => {
|
|
3146
|
+
const A = ce("FmCircularProgress");
|
|
3232
3147
|
return z(), _(ks, null, {
|
|
3233
3148
|
default: ct(() => [
|
|
3234
3149
|
P("div", Ls, [
|
|
3235
|
-
it(
|
|
3150
|
+
it(A, { size: "xl" })
|
|
3236
3151
|
])
|
|
3237
3152
|
]),
|
|
3238
3153
|
_: 1
|
|
@@ -3244,7 +3159,7 @@ const ks = /* @__PURE__ */ I({
|
|
|
3244
3159
|
loadingComponent: Ss
|
|
3245
3160
|
});
|
|
3246
3161
|
var j = /* @__PURE__ */ ((e) => (e.HOME = "home", e.EMPLOYEE = "employee", e.ROLE = "role", e.TIMESHEET = "timesheet", e.AUDIT_LOG = "audit-log", e.TEAM = "team", e.TEAM_MEMBER = "team-member", e.TEAM_ROLE = "team-role", e))(j || {});
|
|
3247
|
-
const
|
|
3162
|
+
const Ae = (e) => ({
|
|
3248
3163
|
validationManifest: {
|
|
3249
3164
|
requiredCaslPermissions: [
|
|
3250
3165
|
{
|
|
@@ -3253,16 +3168,16 @@ const re = (e) => ({
|
|
|
3253
3168
|
}
|
|
3254
3169
|
]
|
|
3255
3170
|
}
|
|
3256
|
-
}), _s = ue(F(() => import("./Main-
|
|
3257
|
-
F(() => import("./AuditLogList-
|
|
3258
|
-
),
|
|
3259
|
-
() => import("./PermissionSetList-
|
|
3260
|
-
),
|
|
3171
|
+
}), _s = ue(F(() => import("./Main-CHG4jcIV.js"))), $s = ue(F(() => import("./Main-CoY-GVfR.js"))), eA = ue(
|
|
3172
|
+
F(() => import("./AuditLogList-CV-y1xix.js"))
|
|
3173
|
+
), tA = F(() => import("./EmployeeList-DDbML16v.js")), sA = F(() => import("./RoleList-DU6TSPjK.js")), AA = F(() => import("./TimesheetList-BZX7mz7l.js")), rA = F(() => import("./TeamMemberList-BPhlYPcR.js")), aA = F(
|
|
3174
|
+
() => import("./PermissionSetList-BpbcJwgS.js")
|
|
3175
|
+
), dA = [
|
|
3261
3176
|
{
|
|
3262
3177
|
path: "/",
|
|
3263
3178
|
name: "home",
|
|
3264
3179
|
component: _s,
|
|
3265
|
-
meta:
|
|
3180
|
+
meta: Ae(k.Subject.Business.hrm_employee),
|
|
3266
3181
|
redirect: {
|
|
3267
3182
|
name: "employee"
|
|
3268
3183
|
/* EMPLOYEE */
|
|
@@ -3271,31 +3186,31 @@ const re = (e) => ({
|
|
|
3271
3186
|
{
|
|
3272
3187
|
path: "employee",
|
|
3273
3188
|
name: "employee",
|
|
3274
|
-
component:
|
|
3189
|
+
component: tA
|
|
3275
3190
|
},
|
|
3276
3191
|
{
|
|
3277
3192
|
path: "role",
|
|
3278
3193
|
name: "role",
|
|
3279
|
-
component:
|
|
3194
|
+
component: sA
|
|
3280
3195
|
},
|
|
3281
3196
|
{
|
|
3282
3197
|
path: "timesheet",
|
|
3283
3198
|
name: "timesheet",
|
|
3284
|
-
component:
|
|
3199
|
+
component: AA
|
|
3285
3200
|
}
|
|
3286
3201
|
]
|
|
3287
3202
|
},
|
|
3288
3203
|
{
|
|
3289
3204
|
path: "/audit-log",
|
|
3290
3205
|
name: "audit-log",
|
|
3291
|
-
component:
|
|
3292
|
-
meta:
|
|
3206
|
+
component: eA,
|
|
3207
|
+
meta: Ae(k.Subject.Business.hrm_auditLog)
|
|
3293
3208
|
},
|
|
3294
3209
|
{
|
|
3295
3210
|
path: "/team",
|
|
3296
3211
|
name: "team",
|
|
3297
3212
|
component: $s,
|
|
3298
|
-
meta:
|
|
3213
|
+
meta: Ae(k.Subject.Business.hrm_teamMember),
|
|
3299
3214
|
redirect: {
|
|
3300
3215
|
name: "team-member"
|
|
3301
3216
|
/* TEAM_MEMBER */
|
|
@@ -3304,53 +3219,53 @@ const re = (e) => ({
|
|
|
3304
3219
|
{
|
|
3305
3220
|
path: "member",
|
|
3306
3221
|
name: "team-member",
|
|
3307
|
-
component:
|
|
3222
|
+
component: rA
|
|
3308
3223
|
},
|
|
3309
3224
|
{
|
|
3310
3225
|
path: "role",
|
|
3311
3226
|
name: "team-role",
|
|
3312
|
-
component:
|
|
3227
|
+
component: aA
|
|
3313
3228
|
}
|
|
3314
3229
|
]
|
|
3315
3230
|
}
|
|
3316
|
-
],
|
|
3231
|
+
], nA = /* @__PURE__ */ I({
|
|
3317
3232
|
__name: "Navigator",
|
|
3318
3233
|
emits: ["close-navigation"],
|
|
3319
3234
|
setup(e, { emit: o }) {
|
|
3320
|
-
const
|
|
3235
|
+
const c = o, { t: A } = he(), r = dt(), n = Ge(() => {
|
|
3321
3236
|
const g = [];
|
|
3322
3237
|
return g.push({
|
|
3323
|
-
label:
|
|
3238
|
+
label: A("hr.employee.title"),
|
|
3324
3239
|
value: "employee",
|
|
3325
3240
|
action: () => {
|
|
3326
|
-
|
|
3241
|
+
r.push({
|
|
3327
3242
|
name: j.EMPLOYEE,
|
|
3328
|
-
query:
|
|
3329
|
-
}),
|
|
3243
|
+
query: r.currentRoute.value.query
|
|
3244
|
+
}), c("close-navigation");
|
|
3330
3245
|
}
|
|
3331
3246
|
}), g.push({
|
|
3332
|
-
label:
|
|
3247
|
+
label: A("team.title"),
|
|
3333
3248
|
value: "team-member",
|
|
3334
3249
|
action: () => {
|
|
3335
|
-
|
|
3250
|
+
r.push({
|
|
3336
3251
|
name: j.TEAM,
|
|
3337
|
-
query:
|
|
3338
|
-
}),
|
|
3252
|
+
query: r.currentRoute.value.query
|
|
3253
|
+
}), c("close-navigation");
|
|
3339
3254
|
}
|
|
3340
3255
|
}), g.push({
|
|
3341
3256
|
label: "Audit Log",
|
|
3342
3257
|
value: "audit-log",
|
|
3343
3258
|
action: () => {
|
|
3344
|
-
|
|
3259
|
+
r.push({
|
|
3345
3260
|
name: j.AUDIT_LOG,
|
|
3346
|
-
query:
|
|
3347
|
-
}),
|
|
3261
|
+
query: r.currentRoute.value.query
|
|
3262
|
+
}), c("close-navigation");
|
|
3348
3263
|
}
|
|
3349
3264
|
}), g;
|
|
3350
3265
|
}), u = S();
|
|
3351
3266
|
return ut(() => {
|
|
3352
3267
|
var M;
|
|
3353
|
-
let g = (M =
|
|
3268
|
+
let g = (M = r.currentRoute.value) == null ? void 0 : M.name;
|
|
3354
3269
|
switch (g) {
|
|
3355
3270
|
case j.EMPLOYEE:
|
|
3356
3271
|
case j.ROLE:
|
|
@@ -3378,45 +3293,44 @@ const re = (e) => ({
|
|
|
3378
3293
|
}, null, 8, ["modelValue", "items"]);
|
|
3379
3294
|
};
|
|
3380
3295
|
}
|
|
3381
|
-
}),
|
|
3296
|
+
}), BA = /* @__PURE__ */ I({
|
|
3382
3297
|
__name: "App",
|
|
3383
3298
|
setup(e) {
|
|
3384
3299
|
const o = Bt();
|
|
3385
3300
|
return oe(() => {
|
|
3386
|
-
o.registerSidebarComponent(
|
|
3387
|
-
}), (
|
|
3388
|
-
const
|
|
3389
|
-
return z(), _(
|
|
3301
|
+
o.registerSidebarComponent(nA);
|
|
3302
|
+
}), (c, A) => {
|
|
3303
|
+
const r = ce("RouterView");
|
|
3304
|
+
return z(), _(r);
|
|
3390
3305
|
};
|
|
3391
3306
|
}
|
|
3392
|
-
}),
|
|
3393
|
-
const e = [Nt, Xt, vt], o = new Set(e.flatMap((
|
|
3307
|
+
}), bA = () => {
|
|
3308
|
+
const e = [Nt, Xt, vt], o = new Set(e.flatMap((c) => Object.keys(c)));
|
|
3394
3309
|
return Array.from(o).reduce(
|
|
3395
|
-
(
|
|
3396
|
-
const
|
|
3397
|
-
return
|
|
3310
|
+
(c, A) => {
|
|
3311
|
+
const r = A;
|
|
3312
|
+
return c[A] = e.reduce((n, u) => ({
|
|
3398
3313
|
...n,
|
|
3399
|
-
...u[
|
|
3400
|
-
}), {}),
|
|
3314
|
+
...u[r] || {}
|
|
3315
|
+
}), {}), c;
|
|
3401
3316
|
},
|
|
3402
3317
|
{}
|
|
3403
3318
|
);
|
|
3404
3319
|
};
|
|
3405
3320
|
export {
|
|
3406
|
-
|
|
3407
|
-
gr as N,
|
|
3321
|
+
mA as F,
|
|
3408
3322
|
j as R,
|
|
3409
|
-
|
|
3323
|
+
gA as U,
|
|
3410
3324
|
ks as _,
|
|
3411
|
-
|
|
3412
|
-
|
|
3325
|
+
Gs as a,
|
|
3326
|
+
s as b,
|
|
3413
3327
|
Wt as c,
|
|
3414
|
-
|
|
3415
|
-
|
|
3416
|
-
|
|
3328
|
+
k as d,
|
|
3329
|
+
bA as e,
|
|
3330
|
+
uA as f,
|
|
3417
3331
|
Ut as g,
|
|
3418
|
-
|
|
3419
|
-
|
|
3420
|
-
|
|
3421
|
-
|
|
3332
|
+
BA as h,
|
|
3333
|
+
w as i,
|
|
3334
|
+
dA as r,
|
|
3335
|
+
us as u
|
|
3422
3336
|
};
|