@feedmepos/mf-hrm-portal 2.2.1-dev.2 → 2.2.1-dev.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (47) hide show
  1. package/dist/{ApprovalCodeList-DZajn7xx.js → ApprovalCodeList-CJpbX8H_.js} +5 -5
  2. package/dist/AuditLogList-A1217xlw.js +1722 -0
  3. package/dist/ConditionBuilderForm.vue_vue_type_script_setup_true_lang-BWNAtv1G.js +438 -0
  4. package/dist/{EmployeeList-DDuxDdlJ.js → EmployeeList-Gh8aU7BY.js} +6 -6
  5. package/dist/{GrantUserList-735upmIE.js → GrantUserList-vpaCAv1u.js} +6 -6
  6. package/dist/{Main-tQ6MrkkP.js → Main-38YNSkW6.js} +11 -11
  7. package/dist/{Main-DyZ6dJ2d.js → Main-CXjbH7aE.js} +8 -8
  8. package/dist/{Main-CHHR0r5b.js → Main-GwRBJ3al.js} +5 -5
  9. package/dist/{PermissionSetList-ZxLNYPEB.js → PermissionSetList-CuzFQm7J.js} +7 -7
  10. package/dist/PortalPermissionEditor.vue_vue_type_script_setup_true_lang-C9bkMb41.js +4169 -0
  11. package/dist/{PortalUserSearcher.vue_vue_type_style_index_0_scoped_827dfd60_lang-DVVSBIx2.js → PortalUserSearcher.vue_vue_type_style_index_0_scoped_827dfd60_lang-XHuHin8t.js} +1 -1
  12. package/dist/RoleList-C5VZbU3f.js +725 -0
  13. package/dist/{TeamMemberList-B58boeR9.js → TeamMemberList-ChrUNLsA.js} +9 -9
  14. package/dist/{TimesheetList-DMnNVVlB.js → TimesheetList-Dqx3RZ4c.js} +7 -7
  15. package/dist/{TimesheetList.vue_vue_type_style_index_0_scoped_2c7a177a_lang-Ch8Ng6wi.js → TimesheetList.vue_vue_type_style_index_0_scoped_2c7a177a_lang-rtbLyLSE.js} +3 -3
  16. package/dist/{app-CtuaUGnw.js → app-CPByRtdD.js} +10 -6
  17. package/dist/app.js +1 -1
  18. package/dist/{approval-code-Q4666xp5.js → approval-code-jIjkeVEb.js} +1 -1
  19. package/dist/{dayjs.min-9pRWRTS9.js → dayjs.min-DeAdykwc.js} +1 -1
  20. package/dist/{employee-JmfN-rQF.js → employee-dFHap_s3.js} +4 -4
  21. package/dist/{grant-user-CQZaTzVt.js → grant-user-SNiDV22U.js} +1 -1
  22. package/dist/{iteration-CkzTvtOv.js → iteration-B_EcCwqv.js} +1 -1
  23. package/dist/{lodash-BNBzabCH.js → lodash-C5UxxqU2.js} +1 -1
  24. package/dist/{restaurant-YOVMuuFY.js → restaurant-BTpBmfBV.js} +12 -14
  25. package/dist/role-8ZQb8Cap.js +92 -0
  26. package/dist/rule-DJZO_Kev.js +1094 -0
  27. package/dist/src/composables/useReportPermissions.d.ts +1 -0
  28. package/dist/src/helpers/rule.d.ts +10 -1
  29. package/dist/src/stores/role.d.ts +6 -6
  30. package/dist/src/views/audit-log/change-nodes.d.ts +14 -0
  31. package/dist/src/views/audit-log/locales/index.d.ts +4 -0
  32. package/dist/src/views/audit-log/operation-status.d.ts +2 -0
  33. package/dist/src/views/team/components/PortalConditionForm.vue.d.ts +44 -0
  34. package/dist/src/views/team/condition-builders/ConditionBuilderForm.vue.d.ts +39 -0
  35. package/dist/style.css +1 -1
  36. package/dist/tsconfig.app.tsbuildinfo +1 -1
  37. package/dist/{useAppStore-DNTlIeMv.js → useAppStore-DCwd8GWN.js} +1 -1
  38. package/dist/{useLoading-BH02lYns.js → useLoading-CXzTpIVv.js} +1 -1
  39. package/dist/useReportPermissions-Phq7vqLK.js +71 -0
  40. package/package.json +1 -1
  41. package/dist/AuditLogList-CpKIq8I0.js +0 -1611
  42. package/dist/ConditionFormHost.vue_vue_type_script_setup_true_lang-DCfvikJB.js +0 -387
  43. package/dist/PortalPermissionEditor.vue_vue_type_script_setup_true_lang-MoFevdmL.js +0 -4122
  44. package/dist/RoleList-BZbEGpCi.js +0 -685
  45. package/dist/role-R_9sO2QD.js +0 -82
  46. package/dist/rule-D1pKbnKR.js +0 -1066
  47. package/dist/useReportPermissions-ByxRc3kz.js +0 -70
@@ -3,18 +3,18 @@ import { useI18n as Pe, useCoreStore as Ae, baseClientInstance as Ke } from "@fe
3
3
  import { useSnackbar as He, useDialog as es, useBreakpoints as ss, components as je } from "@feedmepos/ui-library";
4
4
  import { u as fs } from "./useDebounce-B8ZPVS5C.js";
5
5
  import { _ as vs, S as ye } from "./SelectFilter-ATOm0hdn.js";
6
- import { b as ze, m as bs, d as hs, _ as ys, a as _s } from "./app-CtuaUGnw.js";
6
+ import { b as ze, m as bs, d as hs, _ as ys, a as _s } from "./app-CPByRtdD.js";
7
7
  import { u as gs, _ as xs } from "./useDiscardConfirm-DPhEV6v0.js";
8
8
  import { _ as Us } from "./TableEmptyState.vue_vue_type_script_setup_true_lang-IfAZmWr0.js";
9
9
  import { _ as Ss } from "./Skeleton.vue_vue_type_script_setup_true_lang-B4PxNMwq.js";
10
- import { u as Fs } from "./useLoading-BH02lYns.js";
11
- import { l as Se } from "./lodash-BNBzabCH.js";
12
- import { c as he } from "./iteration-CkzTvtOv.js";
13
- import { u as ts, c as Le, d as Ge, m as Me, i as as, p as We, j as Vs, k as Je, l as Xe, s as ws, n as Is, o as Ps, q as ks, v as Rs, t as Fe } from "./rule-D1pKbnKR.js";
14
- import { u as ls } from "./role-R_9sO2QD.js";
15
- import { u as os, i as $s } from "./PortalUserSearcher.vue_vue_type_style_index_0_scoped_827dfd60_lang-DVVSBIx2.js";
16
- import { g as Ze, u as rs } from "./restaurant-YOVMuuFY.js";
17
- import { _ as Cs } from "./PortalPermissionEditor.vue_vue_type_script_setup_true_lang-MoFevdmL.js";
10
+ import { u as Fs } from "./useLoading-CXzTpIVv.js";
11
+ import { l as Se } from "./lodash-C5UxxqU2.js";
12
+ import { c as he } from "./iteration-B_EcCwqv.js";
13
+ import { u as ts, c as Le, d as Ge, m as Me, i as as, p as We, j as Vs, k as Je, l as Xe, n as ws, o as Is, q as Ps, v as ks, w as Rs, t as Fe } from "./rule-DJZO_Kev.js";
14
+ import { u as ls } from "./role-8ZQb8Cap.js";
15
+ import { u as os, i as $s } from "./PortalUserSearcher.vue_vue_type_style_index_0_scoped_827dfd60_lang-XHuHin8t.js";
16
+ import { g as Ze, u as rs } from "./restaurant-BTpBmfBV.js";
17
+ import { _ as Cs } from "./PortalPermissionEditor.vue_vue_type_script_setup_true_lang-C9bkMb41.js";
18
18
  var ge = /* @__PURE__ */ ((i) => (i.Update = "Update", i.Remove = "Remove", i))(ge || {});
19
19
  const we = "__unassigned__";
20
20
  function Qe(i) {
@@ -1,16 +1,16 @@
1
1
  import { ref as d, computed as g, defineComponent as pe, onMounted as fe, watch as Z, resolveComponent as u, createElementBlock as P, openBlock as E, Fragment as ee, createVNode as l, createElementVNode as i, unref as r, withCtx as b, createCommentVNode as ve, toDisplayString as O, createTextVNode as he, isRef as ge, renderList as we, createBlock as te, nextTick as ye } from "vue";
2
- import { d as v } from "./dayjs.min-9pRWRTS9.js";
2
+ import { d as v } from "./dayjs.min-DeAdykwc.js";
3
3
  import { useI18n as _e } from "@feedmepos/mf-common";
4
4
  import { useSnackbar as be, components as xe } from "@feedmepos/ui-library";
5
5
  import { S as De, _ as Se } from "./SelectFilter-ATOm0hdn.js";
6
- import { _ as Ve } from "./app-CtuaUGnw.js";
6
+ import { _ as Ve } from "./app-CPByRtdD.js";
7
7
  import { _ as ke } from "./TableEmptyState.vue_vue_type_script_setup_true_lang-IfAZmWr0.js";
8
- import { u as Ce } from "./useLoading-BH02lYns.js";
9
- import { g as Fe, s as Ye } from "./iteration-CkzTvtOv.js";
8
+ import { u as Ce } from "./useLoading-CXzTpIVv.js";
9
+ import { g as Fe, s as Ye } from "./iteration-B_EcCwqv.js";
10
10
  import { f as Le } from "./utils-BZkjJbju.js";
11
- import { u as Me } from "./employee-JmfN-rQF.js";
12
- import { u as Te } from "./restaurant-YOVMuuFY.js";
13
- import { u as Re } from "./TimesheetList.vue_vue_type_style_index_0_scoped_2c7a177a_lang-Ch8Ng6wi.js";
11
+ import { u as Me } from "./employee-dFHap_s3.js";
12
+ import { u as Te } from "./restaurant-BTpBmfBV.js";
13
+ import { u as Re } from "./TimesheetList.vue_vue_type_style_index_0_scoped_2c7a177a_lang-rtbLyLSE.js";
14
14
  function Ie(x, a) {
15
15
  return ["years", "months"].find((S) => {
16
16
  const V = x.startOf(S), m = x.endOf(S);
@@ -1,8 +1,8 @@
1
- import { d as i } from "./dayjs.min-9pRWRTS9.js";
1
+ import { d as i } from "./dayjs.min-DeAdykwc.js";
2
2
  import { defineStore as p, storeToRefs as T } from "pinia";
3
3
  import { ref as l } from "vue";
4
- import { b as c, g as y } from "./restaurant-YOVMuuFY.js";
5
- import { s as S } from "./iteration-CkzTvtOv.js";
4
+ import { b as c, g as y } from "./restaurant-BTpBmfBV.js";
5
+ import { s as S } from "./iteration-B_EcCwqv.js";
6
6
  import { i as f, f as g } from "./utils-BZkjJbju.js";
7
7
  const u = {
8
8
  async readTimesheets(t, e) {
@@ -2733,6 +2733,7 @@ const Br = {
2733
2733
  rowHint: "Operation",
2734
2734
  unlabeled: "Operation",
2735
2735
  badge: "{count} ops",
2736
+ partialFailure: "Permission check passed, but one or more operations failed.",
2736
2737
  sheetHeader: "Operation Detail",
2737
2738
  entity: "Entity",
2738
2739
  duration: "Duration",
@@ -2947,6 +2948,7 @@ const Br = {
2947
2948
  rowHint: "การดำเนินการ",
2948
2949
  unlabeled: "การดำเนินการ",
2949
2950
  badge: "{count} รายการ",
2951
+ partialFailure: "การตรวจสอบสิทธิ์ผ่านแล้ว แต่มีการดำเนินการอย่างน้อยหนึ่งรายการล้มเหลว",
2950
2952
  sheetHeader: "รายละเอียดการดำเนินการ",
2951
2953
  entity: "ข้อมูลที่เกี่ยวข้อง",
2952
2954
  duration: "ระยะเวลา",
@@ -3161,6 +3163,7 @@ const Br = {
3161
3163
  rowHint: "操作",
3162
3164
  unlabeled: "操作",
3163
3165
  badge: "{count} 项操作",
3166
+ partialFailure: "权限检查已通过,但一个或多个操作失败。",
3164
3167
  sheetHeader: "操作详情",
3165
3168
  entity: "对象",
3166
3169
  duration: "耗时",
@@ -3375,6 +3378,7 @@ const Br = {
3375
3378
  rowHint: "操作",
3376
3379
  unlabeled: "操作",
3377
3380
  badge: "{count} 項操作",
3381
+ partialFailure: "權限檢查已通過,但一個或多個操作失敗。",
3378
3382
  sheetHeader: "操作詳情",
3379
3383
  entity: "對象",
3380
3384
  duration: "耗時",
@@ -3785,12 +3789,12 @@ const Br = {
3785
3789
  refund: "ขอคืนเงิน",
3786
3790
  counter: "เคาน์เตอร์",
3787
3791
  mallIntegration: "การเชื่อมต่อกับห้างสรรพสินค้า",
3788
- drawer: "ลิ้นชัก",
3792
+ drawer: "ลิ้นชักเก็บเงิน",
3789
3793
  menu: "เมนู",
3790
3794
  inventory: "สินค้าคงคลัง",
3791
3795
  deposit: "เงินมัดจำ",
3792
3796
  delivery: "การจัดส่ง",
3793
- counterRecord: "บันทึกเคาน์เตอร์",
3797
+ counterRecord: "จัดการรอบการขาย",
3794
3798
  restaurantSetting: "การตั้งค่าร้านอาหาร",
3795
3799
  display: "จอแสดงผล",
3796
3800
  printer: "เครื่องพิมพ์",
@@ -8661,10 +8665,10 @@ const Et = (e) => ({
8661
8665
  }
8662
8666
  ]
8663
8667
  }
8664
- }), al = Kt(Be(() => import("./Main-tQ6MrkkP.js"))), ol = Kt(Be(() => import("./Main-DyZ6dJ2d.js"))), il = Kt(
8665
- Be(() => import("./AuditLogList-CpKIq8I0.js"))
8666
- ), cl = Kt(Be(() => import("./Main-CHHR0r5b.js"))), ll = Be(() => import("./ApprovalCodeList-DZajn7xx.js")), ul = Be(() => import("./GrantUserList-735upmIE.js")), Al = Be(() => import("./EmployeeList-DDuxDdlJ.js")), dl = Be(() => import("./RoleList-BZbEGpCi.js")), ml = Be(() => import("./TimesheetList-DMnNVVlB.js")), gl = Be(() => import("./TeamMemberList-B58boeR9.js")), pl = Be(
8667
- () => import("./PermissionSetList-ZxLNYPEB.js")
8668
+ }), al = Kt(Be(() => import("./Main-38YNSkW6.js"))), ol = Kt(Be(() => import("./Main-CXjbH7aE.js"))), il = Kt(
8669
+ Be(() => import("./AuditLogList-A1217xlw.js"))
8670
+ ), cl = Kt(Be(() => import("./Main-GwRBJ3al.js"))), ll = Be(() => import("./ApprovalCodeList-CJpbX8H_.js")), ul = Be(() => import("./GrantUserList-vpaCAv1u.js")), Al = Be(() => import("./EmployeeList-Gh8aU7BY.js")), dl = Be(() => import("./RoleList-C5VZbU3f.js")), ml = Be(() => import("./TimesheetList-Dqx3RZ4c.js")), gl = Be(() => import("./TeamMemberList-ChrUNLsA.js")), pl = Be(
8671
+ () => import("./PermissionSetList-CuzFQm7J.js")
8668
8672
  ), Fl = [
8669
8673
  {
8670
8674
  path: "/",
package/dist/app.js CHANGED
@@ -1,4 +1,4 @@
1
- import { j as e, i as r, r as o } from "./app-CtuaUGnw.js";
1
+ import { j as e, i as r, r as o } from "./app-CPByRtdD.js";
2
2
  export {
3
3
  e as FmApp,
4
4
  r as i18nMessages,
@@ -1,6 +1,6 @@
1
1
  import { defineStore as C } from "pinia";
2
2
  import { ref as l } from "vue";
3
- import { g as p, b as s } from "./restaurant-YOVMuuFY.js";
3
+ import { g as p, b as s } from "./restaurant-BTpBmfBV.js";
4
4
  const n = {
5
5
  async getApprovalCodes() {
6
6
  return p(await s("approval-codes").get(""));
@@ -1,4 +1,4 @@
1
- import { g as Q, c as K } from "./app-CtuaUGnw.js";
1
+ import { g as Q, c as K } from "./app-CPByRtdD.js";
2
2
  var E = { exports: {} };
3
3
  (function(V, X) {
4
4
  (function(W, k) {
@@ -1,10 +1,10 @@
1
- import { d as g } from "./dayjs.min-9pRWRTS9.js";
1
+ import { d as g } from "./dayjs.min-DeAdykwc.js";
2
2
  import { defineStore as $, storeToRefs as T } from "pinia";
3
3
  import { ref as m } from "vue";
4
- import { s as E } from "./iteration-CkzTvtOv.js";
5
- import { b as i, g as f, u as w } from "./restaurant-YOVMuuFY.js";
4
+ import { s as E } from "./iteration-B_EcCwqv.js";
5
+ import { b as i, g as f, u as w } from "./restaurant-BTpBmfBV.js";
6
6
  import { i as v } from "./utils-BZkjJbju.js";
7
- import { u as _ } from "./role-R_9sO2QD.js";
7
+ import { u as _ } from "./role-8ZQb8Cap.js";
8
8
  const o = {
9
9
  async readEmployees() {
10
10
  return f(await i().get("/pos-users"));
@@ -1,6 +1,6 @@
1
1
  import { defineStore as f } from "pinia";
2
2
  import { ref as u } from "vue";
3
- import { g as s, a as v, b as o } from "./restaurant-YOVMuuFY.js";
3
+ import { g as s, a as v, b as o } from "./restaurant-BTpBmfBV.js";
4
4
  const c = {
5
5
  async getGrantUsers() {
6
6
  return s(await o("grant").get(""));
@@ -1,4 +1,4 @@
1
- import { c as B } from "./app-CtuaUGnw.js";
1
+ import { c as B } from "./app-CPByRtdD.js";
2
2
  var ma = {}, Zt = {}, l = {}, ji = {}, Ei = {}, Ii = {}, Dn = {};
3
3
  (function(e) {
4
4
  Object.defineProperty(e, "__esModule", { value: !0 }), e.getParsedType = e.ZodParsedType = e.util = void 0;
@@ -1,4 +1,4 @@
1
- import { c as jt } from "./app-CtuaUGnw.js";
1
+ import { c as jt } from "./app-CPByRtdD.js";
2
2
  var Jr = { exports: {} };
3
3
  /**
4
4
  * @license
@@ -1833,24 +1833,22 @@ const nr = {
1833
1833
  const { currentBusiness: e } = re(), t = fe([]), n = fe(!1), r = fe(null);
1834
1834
  let s = null, o = null;
1835
1835
  async function i(c = !1) {
1836
- var l, u;
1837
- const f = ((l = e.value) == null ? void 0 : l._id) ?? ((u = e.value) == null ? void 0 : u.id) ?? null;
1836
+ var u, h;
1837
+ const f = ((u = e.value) == null ? void 0 : u._id) ?? ((h = e.value) == null ? void 0 : h.id) ?? null;
1838
1838
  if (!f) {
1839
1839
  t.value = [], r.value = null, s = null, o = null;
1840
1840
  return;
1841
1841
  }
1842
- if (r.value !== f && (t.value = [], r.value = null, s = null, o = null), !(!c && r.value === f)) {
1843
- if (!c && s && o === f)
1844
- return await s;
1845
- try {
1846
- n.value = !0;
1847
- const h = (async () => {
1848
- t.value = await nr.readRestaurants(), r.value = f;
1849
- })();
1850
- s = h, o = f, await h;
1851
- } finally {
1852
- s = null, o = null, n.value = !1;
1853
- }
1842
+ if (r.value && r.value !== f && (t.value = [], r.value = null), o && o !== f && (s = null, o = null), !c && r.value === f) return;
1843
+ if (!c && s && o === f)
1844
+ return await s;
1845
+ let l = null;
1846
+ try {
1847
+ n.value = !0, l = (async () => {
1848
+ t.value = await nr.readRestaurants(), r.value = f;
1849
+ })(), s = l, o = f, await l;
1850
+ } finally {
1851
+ s === l && (s = null, o = null), n.value = !1;
1854
1852
  }
1855
1853
  }
1856
1854
  return {
@@ -0,0 +1,92 @@
1
+ import { defineStore as x, storeToRefs as b } from "pinia";
2
+ import { ref as w } from "vue";
3
+ import { useCoreStore as B } from "@feedmepos/mf-common";
4
+ import { s as v } from "./iteration-B_EcCwqv.js";
5
+ import { g as f, b as p, u as I } from "./restaurant-BTpBmfBV.js";
6
+ const R = {
7
+ async readRoles() {
8
+ return f(await p().get("/pos-roles"));
9
+ },
10
+ async createRole(e) {
11
+ return f(await p().post("/pos-roles", e));
12
+ },
13
+ async updateRole(e, c) {
14
+ return f(await p().put(`/pos-roles/${e}`, c));
15
+ },
16
+ async deleteRole(e) {
17
+ return f(
18
+ await p().put(`/pos-roles/${e._id}`, {
19
+ restaurantIds: [],
20
+ role: e
21
+ })
22
+ );
23
+ }
24
+ };
25
+ async function m(e) {
26
+ const { restaurants: c } = I(), u = e.reduce((n, a) => {
27
+ var d;
28
+ const s = n.findIndex((o) => o._id === a._id), r = {
29
+ id: a.restaurantId,
30
+ name: ((d = c.value.find((o) => o._id === a.restaurantId)) == null ? void 0 : d.profile.name) || ""
31
+ };
32
+ return s < 0 ? n.push({
33
+ ...a,
34
+ restaurants: [r]
35
+ }) : n[s].restaurants.some((o) => o.id === a.restaurantId) || (n[s].restaurants = v([...n[s].restaurants, r], { selector: "name" })), n;
36
+ }, []);
37
+ return v(u, { selector: "name" });
38
+ }
39
+ const A = x("role", () => {
40
+ const { currentBusiness: e } = B(), c = I(), u = w([]), n = w(!1), a = w(null);
41
+ let s = null, r = null;
42
+ async function d(l = !1) {
43
+ var y;
44
+ const t = ((y = e.value) == null ? void 0 : y._id) ?? null;
45
+ if (!t) {
46
+ u.value = [], a.value = null, s = null, r = null;
47
+ return;
48
+ }
49
+ if (a.value && a.value !== t && (u.value = [], a.value = null), r && r !== t && (s = null, r = null), !l && a.value === t) return;
50
+ if (!l && s && r === t)
51
+ return await s;
52
+ let i = null;
53
+ try {
54
+ n.value = !0, i = (async () => {
55
+ await c.readRestaurants();
56
+ const _ = await R.readRoles();
57
+ u.value = await m(_), a.value = t;
58
+ })(), s = i, r = t, await i;
59
+ } finally {
60
+ s === i && (s = null, r = null), n.value = !1;
61
+ }
62
+ }
63
+ async function o(l) {
64
+ const t = await R.createRole(l);
65
+ u.value = await m(t);
66
+ }
67
+ async function g(l, t) {
68
+ const i = await R.updateRole(l, t);
69
+ u.value = await m(i);
70
+ }
71
+ async function S(l) {
72
+ const t = await R.deleteRole(l);
73
+ u.value = await m(t);
74
+ }
75
+ return {
76
+ roles: u,
77
+ isLoading: n,
78
+ readRoles: d,
79
+ createRole: o,
80
+ updateRole: g,
81
+ deleteRole: S
82
+ };
83
+ }), L = () => {
84
+ const e = A();
85
+ return {
86
+ ...e,
87
+ ...b(e)
88
+ };
89
+ };
90
+ export {
91
+ L as u
92
+ };