@feedmepos/mf-hrm-portal 2.3.2-dev.8 → 2.3.2-dev.9

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 (44) hide show
  1. package/dist/{ApprovalCodeList-DIYhVMGW.js → ApprovalCodeList-gb0bre9J.js} +7 -7
  2. package/dist/{AuditLogList-DIc3Jgpr.js → AuditLogList-9cwS6bL7.js} +5 -5
  3. package/dist/{ConditionBuilderForm.vue_vue_type_script_setup_true_lang-4YsF7lXu.js → ConditionBuilderForm.vue_vue_type_script_setup_true_lang-DR-c15gr.js} +2 -2
  4. package/dist/{EmployeeList-iVg4pI9Y.js → EmployeeList-DjyoW1we.js} +8 -8
  5. package/dist/{FormSection.vue_vue_type_script_setup_true_lang-C9AE0EHw.js → FormSection.vue_vue_type_script_setup_true_lang-BBWlADve.js} +1 -1
  6. package/dist/{GrantUserList-8zmzFk9z.js → GrantUserList-yU2NqFVO.js} +8 -8
  7. package/dist/{Main-DYzFd_qa.js → Main-4KwMqF3h.js} +5 -5
  8. package/dist/{Main-gRu17-N6.js → Main-BS_Lk_eB.js} +11 -11
  9. package/dist/{Main-ClJox3pV.js → Main-BuG7SPnC.js} +10 -10
  10. package/dist/MyPosProfile-CuDzRaRS.js +360 -0
  11. package/dist/{PermissionSetList-CL42jQY4.js → PermissionSetList-D7SS1iAr.js} +24 -24
  12. package/dist/{PortalPermissionEditor.vue_vue_type_script_setup_true_lang-DkA0XbZw.js → PortalPermissionEditor.vue_vue_type_script_setup_true_lang-u1UlV2Aw.js} +1044 -1044
  13. package/dist/{PortalUserSearcher.vue_vue_type_style_index_0_scoped_827dfd60_lang-CA87qQ4b.js → PortalUserSearcher.vue_vue_type_style_index_0_scoped_827dfd60_lang-CYkv2x_y.js} +1 -1
  14. package/dist/{RoleForm.vue_vue_type_script_setup_true_lang-B3N3hTcU.js → RoleForm.vue_vue_type_script_setup_true_lang-hiMgwiya.js} +9 -9
  15. package/dist/{RoleList-F9ZORhgE.js → RoleList-B3P-LQYV.js} +7 -7
  16. package/dist/{ScheduleAddPositionModal.vue_vue_type_script_setup_true_lang-B9NMhw9Z.js → ScheduleAddPositionModal.vue_vue_type_script_setup_true_lang--dsZOhnv.js} +1 -1
  17. package/dist/{ScheduleGeneralPage-751cEUwS.js → ScheduleGeneralPage-Pq6ufiDu.js} +2 -2
  18. package/dist/{ScheduleModal.vue_vue_type_script_setup_true_lang-CBDNfiIM.js → ScheduleModal.vue_vue_type_script_setup_true_lang-DKFJLsTW.js} +4 -4
  19. package/dist/{SchedulePage-C-NcbGIl.js → SchedulePage-8EAOfiJx.js} +9 -9
  20. package/dist/{SchedulePositionPage-Ba0iiSRg.js → SchedulePositionPage-CGXeUnju.js} +3 -3
  21. package/dist/{SelectFilter-Dpsq165k.js → SelectFilter-C-UEVLla.js} +1 -1
  22. package/dist/{TeamMemberList-DZ0aRbxg.js → TeamMemberList-Bd1O44Ur.js} +90 -90
  23. package/dist/{TimesheetList-DO5T__dL.js → TimesheetList-CSCmigCM.js} +6 -6
  24. package/dist/{app-DXkKrcRn.js → app-BohKQtlz.js} +54 -14
  25. package/dist/app.js +1 -1
  26. package/dist/{approval-code-D2pGW-sI.js → approval-code-Bfvxsg8h.js} +1 -1
  27. package/dist/{dayjs.min-BAz84JAQ.js → dayjs.min-C0MqTPg1.js} +1 -1
  28. package/dist/{employee-yYhuhc9L.js → employee-DWxT78W2.js} +5 -5
  29. package/dist/{grant-user-B95RDjkR.js → grant-user-LZ3b6siI.js} +1 -1
  30. package/dist/{index-TrBkLxJe.js → index-DDDG-LHm.js} +1 -1
  31. package/dist/{lodash-DXRsZpTB.js → lodash-BRqMda7F.js} +1 -1
  32. package/dist/{member-grant-ByAQ1Qja.js → member-grant-a3AGCWfT.js} +2 -2
  33. package/dist/{restaurant-COSpCpTQ.js → restaurant-pL7vHt-H.js} +1 -1
  34. package/dist/{role-ZmCd2yG4.js → role--EKCVqho.js} +3 -3
  35. package/dist/{rule-Bty9eoI3.js → rule-Db3gFVHx.js} +71 -71
  36. package/dist/src/views/my-pos-profile/components/PasscodeChangedDialog.vue.d.ts +1 -1
  37. package/dist/src/views/my-pos-profile/locales/index.d.ts +40 -0
  38. package/dist/{timesheet-CFD6XPiG.js → timesheet-NYW1P4rf.js} +3 -3
  39. package/dist/tsconfig.app.tsbuildinfo +1 -1
  40. package/dist/{useAppStore-7O0GMkXY.js → useAppStore-DV13z6oc.js} +1 -1
  41. package/dist/{useLoading-BZXydjer.js → useLoading-Fcnnfywt.js} +1 -1
  42. package/dist/{useReportPermissions-Cn3ntCJ9.js → useReportPermissions-BcyVoKVq.js} +13 -13
  43. package/package.json +1 -1
  44. package/dist/MyPosProfile-ARRrolbz.js +0 -290
@@ -14366,7 +14366,10 @@ Max 5 days / week`,
14366
14366
  updatedJustNow: "Updated just now",
14367
14367
  show: "Show passcode",
14368
14368
  hide: "Hide passcode",
14369
- change: "Change passcode"
14369
+ change: "Change passcode",
14370
+ empty: "No passcode yet",
14371
+ emptyHint: "Generate a passcode to log in to FeedMe POS.",
14372
+ generate: "Generate passcode"
14370
14373
  },
14371
14374
  change: {
14372
14375
  title: "Change POS passcode",
@@ -14376,11 +14379,18 @@ Max 5 days / week`,
14376
14379
  inProgress: "Your passcode is already being changed. Please wait a moment and try again.",
14377
14380
  incomplete: "Your passcode was not updated at every restaurant. Please change it again."
14378
14381
  },
14382
+ generate: {
14383
+ failed: "Couldn't generate your passcode. Please try again."
14384
+ },
14379
14385
  changed: {
14380
14386
  title: "Passcode changed",
14381
14387
  message: "Your old passcode has stopped working. Use this new one to log in to FeedMe POS at all your restaurants.",
14382
14388
  done: "Done"
14383
14389
  },
14390
+ generated: {
14391
+ title: "Passcode generated",
14392
+ message: "Use this passcode to log in to FeedMe POS at all your restaurants."
14393
+ },
14384
14394
  manageAccount: {
14385
14395
  message: "To update your name, phone number, email or account password, go to",
14386
14396
  link: "Manage Account",
@@ -14417,7 +14427,10 @@ Max 5 days / week`,
14417
14427
  updatedJustNow: "อัปเดตเมื่อสักครู่",
14418
14428
  show: "แสดงรหัสผ่าน",
14419
14429
  hide: "ซ่อนรหัสผ่าน",
14420
- change: "เปลี่ยนรหัสผ่าน"
14430
+ change: "เปลี่ยนรหัสผ่าน",
14431
+ empty: "ยังไม่มีรหัสผ่าน",
14432
+ emptyHint: "สร้างรหัสผ่านเพื่อเข้าสู่ระบบ FeedMe POS",
14433
+ generate: "สร้างรหัสผ่าน"
14421
14434
  },
14422
14435
  change: {
14423
14436
  title: "เปลี่ยนรหัสผ่าน POS",
@@ -14427,11 +14440,18 @@ Max 5 days / week`,
14427
14440
  inProgress: "กำลังเปลี่ยนรหัสผ่านของคุณอยู่ โปรดรอสักครู่แล้วลองอีกครั้ง",
14428
14441
  incomplete: "รหัสผ่านของคุณยังไม่ได้อัปเดตในทุกร้านอาหาร โปรดเปลี่ยนอีกครั้ง"
14429
14442
  },
14443
+ generate: {
14444
+ failed: "ไม่สามารถสร้างรหัสผ่านได้ โปรดลองอีกครั้ง"
14445
+ },
14430
14446
  changed: {
14431
14447
  title: "เปลี่ยนรหัสผ่านแล้ว",
14432
14448
  message: "รหัสผ่านเดิมของคุณใช้งานไม่ได้แล้ว ใช้รหัสใหม่นี้เพื่อเข้าสู่ระบบ FeedMe POS ในทุกร้านอาหารของคุณ",
14433
14449
  done: "เสร็จสิ้น"
14434
14450
  },
14451
+ generated: {
14452
+ title: "สร้างรหัสผ่านแล้ว",
14453
+ message: "ใช้รหัสผ่านนี้เพื่อเข้าสู่ระบบ FeedMe POS ในทุกร้านอาหารของคุณ"
14454
+ },
14435
14455
  manageAccount: {
14436
14456
  message: "หากต้องการอัปเดตชื่อ หมายเลขโทรศัพท์ อีเมล หรือรหัสผ่านบัญชี ให้ไปที่",
14437
14457
  link: "จัดการบัญชี",
@@ -14468,7 +14488,10 @@ Max 5 days / week`,
14468
14488
  updatedJustNow: "刚刚更新",
14469
14489
  show: "显示密码",
14470
14490
  hide: "隐藏密码",
14471
- change: "更改密码"
14491
+ change: "更改密码",
14492
+ empty: "尚未设置密码",
14493
+ emptyHint: "生成密码后即可登录 FeedMe POS。",
14494
+ generate: "生成密码"
14472
14495
  },
14473
14496
  change: {
14474
14497
  title: "更改 POS 密码",
@@ -14478,11 +14501,18 @@ Max 5 days / week`,
14478
14501
  inProgress: "您的密码正在更改中,请稍候再试。",
14479
14502
  incomplete: "您的密码未在所有餐厅更新,请再次更改。"
14480
14503
  },
14504
+ generate: {
14505
+ failed: "无法生成密码,请重试。"
14506
+ },
14481
14507
  changed: {
14482
14508
  title: "密码已更改",
14483
14509
  message: "您的旧密码已失效。请使用此新密码登录您所有餐厅的 FeedMe POS。",
14484
14510
  done: "完成"
14485
14511
  },
14512
+ generated: {
14513
+ title: "密码已生成",
14514
+ message: "请使用此密码在您的所有餐厅登录 FeedMe POS。"
14515
+ },
14486
14516
  manageAccount: {
14487
14517
  message: "如需更新姓名、电话号码、电子邮件或账户密码,请前往",
14488
14518
  link: "管理账户",
@@ -14519,7 +14549,10 @@ Max 5 days / week`,
14519
14549
  updatedJustNow: "剛剛更新",
14520
14550
  show: "顯示密碼",
14521
14551
  hide: "隱藏密碼",
14522
- change: "更改密碼"
14552
+ change: "更改密碼",
14553
+ empty: "尚未設定密碼",
14554
+ emptyHint: "產生密碼後即可登入 FeedMe POS。",
14555
+ generate: "產生密碼"
14523
14556
  },
14524
14557
  change: {
14525
14558
  title: "更改 POS 密碼",
@@ -14529,11 +14562,18 @@ Max 5 days / week`,
14529
14562
  inProgress: "您的密碼正在更改中,請稍候再試。",
14530
14563
  incomplete: "您的密碼未在所有餐廳更新,請再次更改。"
14531
14564
  },
14565
+ generate: {
14566
+ failed: "無法產生密碼,請再試一次。"
14567
+ },
14532
14568
  changed: {
14533
14569
  title: "密碼已更改",
14534
14570
  message: "您的舊密碼已失效。請使用此新密碼登入您所有餐廳的 FeedMe POS。",
14535
14571
  done: "完成"
14536
14572
  },
14573
+ generated: {
14574
+ title: "密碼已產生",
14575
+ message: "請使用此密碼在您的所有餐廳登入 FeedMe POS。"
14576
+ },
14537
14577
  manageAccount: {
14538
14578
  message: "如需更新姓名、電話號碼、電子郵件或帳戶密碼,請前往",
14539
14579
  link: "管理帳戶",
@@ -20458,20 +20498,20 @@ const wt = (e) => ({
20458
20498
  }
20459
20499
  ]
20460
20500
  }
20461
- }), Sh = zt(Nt(je(() => import("./Main-gRu17-N6.js")))), Ph = zt(Nt(je(() => import("./Main-ClJox3pV.js")))), Dh = zt(
20462
- Nt(je(() => import("./AuditLogList-DIc3Jgpr.js")))
20501
+ }), Sh = zt(Nt(je(() => import("./Main-BS_Lk_eB.js")))), Ph = zt(Nt(je(() => import("./Main-BuG7SPnC.js")))), Dh = zt(
20502
+ Nt(je(() => import("./AuditLogList-9cwS6bL7.js")))
20463
20503
  ), Oh = zt(
20464
- Nt(je(() => import("./Main-DYzFd_qa.js")))
20504
+ Nt(je(() => import("./Main-4KwMqF3h.js")))
20465
20505
  ), Mh = zt(
20466
- je(() => import("./MyPosProfile-ARRrolbz.js"))
20467
- ), kh = je(() => import("./ApprovalCodeList-DIYhVMGW.js")), Bh = je(() => import("./GrantUserList-8zmzFk9z.js")), Th = je(() => import("./EmployeeList-iVg4pI9Y.js")), Eh = je(() => import("./RoleList-F9ZORhgE.js")), xh = je(() => import("./TimesheetList-DO5T__dL.js")), Rh = je(() => import("./TeamMemberList-DZ0aRbxg.js")), Nh = je(
20468
- () => import("./PermissionSetList-CL42jQY4.js")
20506
+ je(() => import("./MyPosProfile-CuDzRaRS.js"))
20507
+ ), kh = je(() => import("./ApprovalCodeList-gb0bre9J.js")), Bh = je(() => import("./GrantUserList-yU2NqFVO.js")), Th = je(() => import("./EmployeeList-DjyoW1we.js")), Eh = je(() => import("./RoleList-B3P-LQYV.js")), xh = je(() => import("./TimesheetList-CSCmigCM.js")), Rh = je(() => import("./TeamMemberList-Bd1O44Ur.js")), Nh = je(
20508
+ () => import("./PermissionSetList-D7SS1iAr.js")
20469
20509
  ), Fh = so(
20470
- Nt(je(() => import("./SchedulePage-C-NcbGIl.js")))
20510
+ Nt(je(() => import("./SchedulePage-8EAOfiJx.js")))
20471
20511
  ), jh = so(
20472
- Nt(je(() => import("./SchedulePositionPage-Ba0iiSRg.js")))
20512
+ Nt(je(() => import("./SchedulePositionPage-CGXeUnju.js")))
20473
20513
  ), Hh = so(
20474
- Nt(je(() => import("./ScheduleGeneralPage-751cEUwS.js")))
20514
+ Nt(je(() => import("./ScheduleGeneralPage-Pq6ufiDu.js")))
20475
20515
  ), Gy = [
20476
20516
  // Landing: waits for menu access, then opens the first page the user can open.
20477
20517
  // Declared before the Employee parent (same path) so it wins the exact '/' match.
@@ -21582,7 +21622,7 @@ const Vy = /* @__PURE__ */ dt({
21582
21622
  };
21583
21623
  }
21584
21624
  });
21585
- var ks = { name: "@feedmepos/mf-hrm-portal", version: "2.3.2-dev.8", mode: "fmmf" };
21625
+ var ks = { name: "@feedmepos/mf-hrm-portal", version: "2.3.2-dev.9", mode: "fmmf" };
21586
21626
  console.log(
21587
21627
  `%c${ks.name}%c v${ks.version} %c${ks.mode}`,
21588
21628
  "background:#1f1f1f;color:#fff;padding:2px 6px;border-radius:3px 0 0 3px",
package/dist/app.js CHANGED
@@ -1,4 +1,4 @@
1
- import { E as e, D as o, F as p } from "./app-DXkKrcRn.js";
1
+ import { E as e, D as o, F as p } from "./app-BohKQtlz.js";
2
2
  export {
3
3
  e as FmApp,
4
4
  o as i18nMessages,
@@ -1,6 +1,6 @@
1
1
  import { defineStore as A } from "pinia";
2
2
  import { ref as l } from "vue";
3
- import { g as p, b as s } from "./app-DXkKrcRn.js";
3
+ import { g as p, b as s } from "./app-BohKQtlz.js";
4
4
  const n = {
5
5
  async getApprovalCodes() {
6
6
  return p(await s("approval-codes").get(""));
@@ -1,4 +1,4 @@
1
- import { x as Q, w as K } from "./app-DXkKrcRn.js";
1
+ import { x as Q, w as K } from "./app-BohKQtlz.js";
2
2
  var E = { exports: {} };
3
3
  (function(V, X) {
4
4
  (function(W, x) {
@@ -1,12 +1,12 @@
1
- import { d as S } from "./dayjs.min-BAz84JAQ.js";
1
+ import { d as S } from "./dayjs.min-C0MqTPg1.js";
2
2
  import { defineStore as _, storeToRefs as $ } from "pinia";
3
3
  import { ref as u } from "vue";
4
- import "./index-TrBkLxJe.js";
5
- import { b as n, g as m } from "./app-DXkKrcRn.js";
4
+ import "./index-DDDG-LHm.js";
5
+ import { b as n, g as m } from "./app-BohKQtlz.js";
6
6
  import { s as h } from "./iteration-CcXrOMQe.js";
7
7
  import { i as T } from "./utils-BZkjJbju.js";
8
- import { u as x } from "./role-ZmCd2yG4.js";
9
- import { u as f } from "./restaurant-COSpCpTQ.js";
8
+ import { u as x } from "./role--EKCVqho.js";
9
+ import { u as f } from "./restaurant-pL7vHt-H.js";
10
10
  const r = {
11
11
  async readEmployeesPage(e) {
12
12
  var s, l;
@@ -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, e as v, b as o } from "./app-DXkKrcRn.js";
3
+ import { g as s, e as v, b as o } from "./app-BohKQtlz.js";
4
4
  const c = {
5
5
  async getGrantUsers() {
6
6
  return s(await o("grant").get(""));
@@ -1,4 +1,4 @@
1
- import { w as B } from "./app-DXkKrcRn.js";
1
+ import { w as B } from "./app-BohKQtlz.js";
2
2
  var _a = {}, Zt = {}, s = {}, 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 { w as jt } from "./app-DXkKrcRn.js";
1
+ import { w as jt } from "./app-BohKQtlz.js";
2
2
  var Jr = { exports: {} };
3
3
  /**
4
4
  * @license
@@ -1,5 +1,5 @@
1
- import { m as n } from "./app-DXkKrcRn.js";
2
- import { U as u } from "./rule-Bty9eoI3.js";
1
+ import { m as n } from "./app-BohKQtlz.js";
2
+ import { z as u } from "./rule-Db3gFVHx.js";
3
3
  const m = [
4
4
  n.Subject.Business.restaurant,
5
5
  n.Subject.Business.role,
@@ -1,7 +1,7 @@
1
1
  import { defineStore as m, storeToRefs as y } from "pinia";
2
2
  import { ref as i, computed as R } from "vue";
3
3
  import { useCoreStore as g } from "@feedmepos/mf-common";
4
- import { b as f, g as w } from "./app-DXkKrcRn.js";
4
+ import { b as f, g as w } from "./app-BohKQtlz.js";
5
5
  const I = {
6
6
  async readRestaurants() {
7
7
  return w(await f().get("/hr-restaurants"));
@@ -1,10 +1,10 @@
1
1
  import { defineStore as B, storeToRefs as b } from "pinia";
2
2
  import { ref as v } from "vue";
3
3
  import { useCoreStore as x } from "@feedmepos/mf-common";
4
- import "./index-TrBkLxJe.js";
5
- import { g as d, b as f } from "./app-DXkKrcRn.js";
4
+ import "./index-DDDG-LHm.js";
5
+ import { g as d, b as f } from "./app-BohKQtlz.js";
6
6
  import { s as y } from "./iteration-CcXrOMQe.js";
7
- import { u as g } from "./restaurant-COSpCpTQ.js";
7
+ import { u as g } from "./restaurant-pL7vHt-H.js";
8
8
  const p = {
9
9
  async readRoles() {
10
10
  return d(await f().get("/pos-roles"));
@@ -1,11 +1,11 @@
1
- import { e as j } from "./index-TrBkLxJe.js";
2
- import { y as N, m as h, k as W, z as ne, P as z, g, b, B as L, v as x, C as y, s as F } from "./app-DXkKrcRn.js";
3
- import { s as K, c as re } from "./iteration-CcXrOMQe.js";
1
+ import { e as j } from "./index-DDDG-LHm.js";
2
+ import { y as N, m as h, k as W, z as ne, P as z, g, b, B as L, v as x, C as y, s as F } from "./app-BohKQtlz.js";
3
+ import { s as V, c as re } from "./iteration-CcXrOMQe.js";
4
4
  import { s as ie } from "./utils-BZkjJbju.js";
5
- import { defineStore as V, storeToRefs as H } from "pinia";
6
- import { ref as v, computed as E } from "vue";
7
- import { useCoreStore as Q } from "@feedmepos/mf-common";
8
- import { u as oe } from "./restaurant-COSpCpTQ.js";
5
+ import { defineStore as K, storeToRefs as Q } from "pinia";
6
+ import { ref as v, computed as C } from "vue";
7
+ import { useCoreStore as H } from "@feedmepos/mf-common";
8
+ import { u as oe } from "./restaurant-pL7vHt-H.js";
9
9
  function k(e) {
10
10
  if (e) {
11
11
  if (typeof e == "string") {
@@ -25,7 +25,7 @@ function w(e) {
25
25
  (t) => t !== null && typeof t == "object" && !Array.isArray(t) && Object.keys(t).length === 1 && Array.isArray(t.$in)
26
26
  ) : !0;
27
27
  }
28
- function G(e) {
28
+ function Y(e) {
29
29
  const t = /* @__PURE__ */ new Map(), i = /* @__PURE__ */ new Map(), n = (r, s, o) => {
30
30
  var a, c;
31
31
  const u = k(s.conditions);
@@ -53,14 +53,14 @@ function G(e) {
53
53
  n(s.inverted ? i : t, s, r);
54
54
  return [...Array.from(t.values()), ...Array.from(i.values())];
55
55
  }
56
- function C(e, t) {
56
+ function E(e, t) {
57
57
  return `${e}::${[...t].sort().join(",")}`;
58
58
  }
59
- function X(e, t) {
59
+ function G(e, t) {
60
60
  const i = [...e], n = /* @__PURE__ */ new Set(), r = /* @__PURE__ */ new Set(), s = /* @__PURE__ */ new Set();
61
61
  for (const a of e) {
62
62
  const c = N(a.subject);
63
- n.add(C(c, a.actions)), a.inverted && a.actions.includes("manage") && r.add(`set_${c}`), !a.inverted && a.actions.includes("manage") && s.add(c);
63
+ n.add(E(c, a.actions)), a.inverted && a.actions.includes("manage") && r.add(`set_${c}`), !a.inverted && a.actions.includes("manage") && s.add(c);
64
64
  }
65
65
  const o = [...e];
66
66
  for (; o.length > 0; ) {
@@ -71,7 +71,7 @@ function X(e, t) {
71
71
  a.source && !a.source.trace && (a.source = { ...a.source, trace: l });
72
72
  const m = [...l, `${u.name} (system)`];
73
73
  for (const d of u.permissions ?? []) {
74
- const f = N(d.subject), p = C(f, d.actions);
74
+ const f = N(d.subject), p = E(f, d.actions);
75
75
  n.has(p) || s.has(f) || (n.add(p), i.push({
76
76
  ...d,
77
77
  // FdoPermissionRule.fields is string[] | null; RawRule expects string[] | undefined
@@ -85,7 +85,7 @@ function X(e, t) {
85
85
  }));
86
86
  }
87
87
  for (const d of u.permissionSets ?? []) {
88
- const f = N(d), p = C(f, ["manage"]), S = {
88
+ const f = N(d), p = E(f, ["manage"]), S = {
89
89
  subject: f,
90
90
  actions: ["manage"],
91
91
  source: {
@@ -113,21 +113,21 @@ function ae(e) {
113
113
  return [];
114
114
  }
115
115
  }
116
- function Y(e, t) {
116
+ function X(e, t) {
117
117
  return Array.isArray(e) ? e.includes(t) : e === t;
118
118
  }
119
119
  function ue(e) {
120
120
  return Array.isArray(e) ? e[0] : e;
121
121
  }
122
122
  function Te(e, t) {
123
- const i = t.find((r) => Y(r.subject, e));
123
+ const i = t.find((r) => X(r.subject, e));
124
124
  if (!(i != null && i.category) || i.isCategoryCover) return;
125
125
  const n = t.find((r) => r.category === i.category && r.isCategoryCover);
126
126
  if (n)
127
127
  return ue(n.subject);
128
128
  }
129
129
  function Le(e, t) {
130
- const i = t.find((n) => Y(n.subject, e));
130
+ const i = t.find((n) => X(n.subject, e));
131
131
  return !!(i != null && i.isCategoryCover);
132
132
  }
133
133
  function Z(e, t, i = /* @__PURE__ */ new Set()) {
@@ -142,7 +142,7 @@ function Z(e, t, i = /* @__PURE__ */ new Set()) {
142
142
  return r;
143
143
  }
144
144
  function ce(e) {
145
- const t = G(e).map(
145
+ const t = Y(e).map(
146
146
  ({ setNames: r, setId: s, ...o }) => o
147
147
  ), i = t.filter((r) => !r.inverted), n = t.filter((r) => r.inverted);
148
148
  return T(i, n);
@@ -214,7 +214,7 @@ function le(e, t) {
214
214
  return s;
215
215
  }
216
216
  function de(e) {
217
- const t = X(
217
+ const t = G(
218
218
  e,
219
219
  z
220
220
  ), i = new Set(
@@ -402,8 +402,8 @@ const _ = "/permission-sets", J = {
402
402
  async delete(e) {
403
403
  return g(await b().delete(`${_}/${e}`));
404
404
  }
405
- }, je = V("hrm-permission-set", () => {
406
- const { currentBusiness: e } = Q(), t = v([]), i = v(!1), n = v(null);
405
+ }, je = K("hrm-permission-set", () => {
406
+ const { currentBusiness: e } = H(), t = v([]), i = v(!1), n = v(null);
407
407
  async function r() {
408
408
  var l;
409
409
  const u = ((l = e.value) == null ? void 0 : l._id) ?? null;
@@ -442,7 +442,7 @@ const _ = "/permission-sets", J = {
442
442
  const e = je();
443
443
  return {
444
444
  ...e,
445
- ...H(e)
445
+ ...Q(e)
446
446
  };
447
447
  }, P = "/permission-assignments", I = {
448
448
  async readAll() {
@@ -468,7 +468,7 @@ const _ = "/permission-sets", J = {
468
468
  await b().post("/my-permissions/report-manage", { permissionKey: e, label: t })
469
469
  );
470
470
  }
471
- }, Pe = V("hrm-permission-assignment", () => {
471
+ }, Pe = K("hrm-permission-assignment", () => {
472
472
  const e = v([]);
473
473
  async function t() {
474
474
  const a = await I.readAll();
@@ -504,7 +504,7 @@ const _ = "/permission-sets", J = {
504
504
  const e = Pe();
505
505
  return {
506
506
  ...e,
507
- ...H(e)
507
+ ...Q(e)
508
508
  };
509
509
  }, Ie = {
510
510
  async fetchReportPermissions(e, t) {
@@ -519,33 +519,33 @@ const _ = "/permission-sets", J = {
519
519
  await L().get(`/report-query/hrm/${e}/reports`, { params: i })
520
520
  );
521
521
  }
522
- }, B = v([]), U = v(!1), R = v(!1), O = v(null), D = v(null), M = v(!1);
523
- function Re() {
524
- const e = Q();
522
+ }, B = v([]), U = v(!1), O = v(!1), R = v(null), D = v(null), M = v(!1);
523
+ function Oe() {
524
+ const e = H();
525
525
  async function t() {
526
526
  var s;
527
527
  const n = (s = e.currentBusiness.value) == null ? void 0 : s.id;
528
528
  if (!n) return;
529
529
  const r = localStorage.getItem("locale");
530
- if (O.value !== n && (B.value = [], U.value = !1, R.value = !1, O.value = n, M.value = !1), !(U.value && D.value === r)) {
531
- if (R.value) {
530
+ if (R.value !== n && (B.value = [], U.value = !1, O.value = !1, R.value = n, M.value = !1), !(U.value && D.value === r)) {
531
+ if (O.value) {
532
532
  M.value = !0;
533
533
  return;
534
534
  }
535
- R.value = !0;
535
+ O.value = !0;
536
536
  try {
537
537
  const o = await Ie.fetchReportPermissionsForPortal(n, r);
538
- if (O.value !== n) return;
538
+ if (R.value !== n) return;
539
539
  B.value = o, U.value = !0, D.value = r;
540
540
  } catch (o) {
541
- if (O.value !== n) return;
541
+ if (R.value !== n) return;
542
542
  console.warn("Failed to fetch custom report permissions:", o), B.value = [];
543
543
  } finally {
544
- O.value === n && (R.value = !1, M.value && (M.value = !1, await t()));
544
+ R.value === n && (O.value = !1, M.value && (M.value = !1, await t()));
545
545
  }
546
546
  }
547
547
  }
548
- const i = E(() => B.value.map(
548
+ const i = C(() => B.value.map(
549
549
  (n) => n.isDefault ? {
550
550
  label: n.name,
551
551
  subject: `business::report::reports::${n.permissionKey}`,
@@ -567,20 +567,20 @@ function Re() {
567
567
  return {
568
568
  fetchCustomReportPermissions: t,
569
569
  customReportPermissions: i,
570
- isLoading: E(() => R.value),
571
- isLoaded: E(() => U.value)
570
+ isLoading: C(() => O.value),
571
+ isLoaded: C(() => U.value)
572
572
  };
573
573
  }
574
574
  function A(e) {
575
- const t = we(), i = $e(), n = oe().restaurants, { customReportPermissions: r } = Re(), s = i.getPermissionAssignmentByUserId(e.id), o = Z(
575
+ const t = we(), i = $e(), n = oe().restaurants, { customReportPermissions: r } = Oe(), s = i.getPermissionAssignmentByUserId(e.id), o = Z(
576
576
  (s == null ? void 0 : s.permissionSetIds) ?? e.permissionSetIds ?? [],
577
577
  t.permissionSets.value
578
- ), a = G(o).map(
578
+ ), a = Y(o).map(
579
579
  ({ setNames: p, ...S }) => S
580
580
  ), c = s == null ? void 0 : s.customPermissions, u = c ?? e.permissions.map((p) => ({
581
581
  ...p,
582
582
  subject: N(p.subject)
583
- })), l = T(a, u), m = X(
583
+ })), l = T(a, u), m = G(
584
584
  Se(a, u),
585
585
  z
586
586
  ).filter((p) => !p.inverted), d = ee(m), f = d ?? n.value.map((p) => p._id);
@@ -591,7 +591,7 @@ function A(e) {
591
591
  name: e.status === "invited" ? e.name || "-" : e.name && e.name !== e.email && e.name !== e.phoneNumber ? e.name : "-",
592
592
  phoneNumber: e.phoneNumber,
593
593
  email: e.email,
594
- restaurants: K(
594
+ restaurants: V(
595
595
  f.map((p) => {
596
596
  var S;
597
597
  return ((S = n.value.find((se) => se._id === p)) == null ? void 0 : S.profile.name) ?? "";
@@ -604,7 +604,7 @@ function A(e) {
604
604
  loginMethod: e.loginMethod ?? "feedme"
605
605
  };
606
606
  }
607
- const Oe = Object.freeze(
607
+ const Re = Object.freeze(
608
608
  Object.values(W)
609
609
  ), De = {
610
610
  async readTeamMembers() {
@@ -733,19 +733,19 @@ function ze(e) {
733
733
  const i = Number((r = (n = t.conditions) == null ? void 0 : n.adjustment) == null ? void 0 : r.$lte);
734
734
  return Number.isFinite(i) ? parseInt((i * 100).toFixed(0)) : 0;
735
735
  }
736
- function Ke(e, t) {
736
+ function Ve(e, t) {
737
737
  return t.isOwner ? { restaurantIds: null, roleIds: null } : { restaurantIds: ee(e), roleIds: te(e) };
738
738
  }
739
- function Ve(e) {
739
+ function Ke(e) {
740
740
  return (e == null ? void 0 : e.some((t) => t.subject === "all")) ?? !1;
741
741
  }
742
- function He(e) {
742
+ function Qe(e) {
743
743
  const t = $(e);
744
744
  if (!t.isReportPermission) return;
745
745
  const { name: i, ...n } = t.conditions ?? {};
746
746
  return Object.keys(n).length > 0 ? n : void 0;
747
747
  }
748
- function Qe(e, t, i) {
748
+ function He(e, t, i) {
749
749
  return e.flatMap((n) => {
750
750
  const r = Ae(n);
751
751
  if (!r) return [];
@@ -780,7 +780,7 @@ function Ae(e) {
780
780
  reason: ""
781
781
  })) : r = F.find((s) => s.subject === i), r ? $(r) : void 0;
782
782
  }
783
- function Ge(e, t) {
783
+ function Ye(e, t) {
784
784
  const i = { values: [], passthrough: [], dropped: [] };
785
785
  for (const n of e) {
786
786
  const r = n == null ? void 0 : n.actions;
@@ -794,9 +794,9 @@ function Ge(e, t) {
794
794
  return i;
795
795
  }
796
796
  function Ne(e, t = []) {
797
- return K(
797
+ return V(
798
798
  e.reduce((i, n) => {
799
- const r = Oe.find(
799
+ const r = Re.find(
800
800
  (s) => s.subject === n.subject && n.actions.includes("manage")
801
801
  ) || t.find((s) => s.subject === n.subject);
802
802
  if (r) {
@@ -808,36 +808,36 @@ function Ne(e, t = []) {
808
808
  );
809
809
  }
810
810
  export {
811
+ me as $,
812
+ te as A,
813
+ fe as B,
814
+ ye as C,
811
815
  xe as D,
812
- me as E,
813
- ve as F,
814
- ee as H,
815
- de as I,
816
- Te as K,
817
- te as L,
818
- le as N,
819
- ce as P,
820
- Ie as R,
821
- fe as T,
822
- ke as U,
823
- Le as V,
824
- Re as a,
825
- Ke as b,
816
+ le as E,
817
+ Se as H,
818
+ G as N,
819
+ Z as P,
820
+ ee as Q,
821
+ ce as R,
822
+ de as T,
823
+ Te as V,
824
+ Le as Y,
825
+ Oe as a,
826
+ Ve as b,
826
827
  $e as c,
827
- Qe as d,
828
- He as e,
828
+ He as d,
829
+ Qe as e,
829
830
  We as f,
830
831
  ze as g,
831
- Ve as h,
832
- X as i,
833
- G as j,
832
+ Ke as h,
833
+ Ie as i,
834
+ Y as j,
834
835
  Ne as m,
835
- Oe as p,
836
- Se as q,
836
+ Re as p,
837
837
  $ as r,
838
- Ge as s,
838
+ Ye as s,
839
839
  De as t,
840
840
  we as u,
841
- ye as x,
842
- Z as y
841
+ ve as x,
842
+ ke as z
843
843
  };
@@ -1,4 +1,4 @@
1
1
  declare const _default: import("vue").DefineComponent<{}, {
2
- open: (code: string) => void;
2
+ open: (code: string, as?: "changed" | "generated") => void;
3
3
  }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
4
4
  export default _default;