@feedmepos/mf-hrm-portal 2.3.2-dev.3 → 2.3.2-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 (99) hide show
  1. package/dist/{ApprovalCodeList-D3U4nvlF.js → ApprovalCodeList-BPTnWcra.js} +14 -15
  2. package/dist/{AuditLogList-qGCW7tf0.js → AuditLogList-CvEF4bit.js} +12 -12
  3. package/dist/ConditionBuilderForm.vue_vue_type_script_setup_true_lang-CPX0sv64.js +459 -0
  4. package/dist/EmployeeList-CANPsrQY.js +896 -0
  5. package/dist/FormSection.vue_vue_type_script_setup_true_lang-mdfK9rtZ.js +90 -0
  6. package/dist/{GrantUserList-C71pal0N.js → GrantUserList-DPj_6Wsg.js} +15 -16
  7. package/dist/{Main-CCdTWngg.js → Main-BWRMirTY.js} +11 -11
  8. package/dist/{Main-BWJPyEU1.js → Main-Cob4hcf-.js} +5 -5
  9. package/dist/Main-DXcSgkhR.js +101 -0
  10. package/dist/MyPosProfile-Bp7-pATz.js +301 -0
  11. package/dist/PasscodePinField.vue_vue_type_script_setup_true_lang-TXPEqa46.js +126 -0
  12. package/dist/{PermissionSetList-BS-oBunI.js → PermissionSetList-DvAW1q0c.js} +45 -46
  13. package/dist/PortalPermissionEditor.vue_vue_type_script_setup_true_lang-DmbI5vgH.js +4243 -0
  14. package/dist/PortalUserSearcher.vue_vue_type_style_index_0_scoped_827dfd60_lang-C8hcooKP.js +1831 -0
  15. package/dist/RoleForm.vue_vue_type_script_setup_true_lang-Bq8-aBSv.js +547 -0
  16. package/dist/RoleList-DsrHgU4s.js +274 -0
  17. package/dist/{ScheduleAddPositionModal.vue_vue_type_script_setup_true_lang-BXihM4sl.js → ScheduleAddPositionModal.vue_vue_type_script_setup_true_lang-CRR18xmB.js} +1 -1
  18. package/dist/{ScheduleGeneralPage-DpNvWNGs.js → ScheduleGeneralPage-C_Kj9wmp.js} +2 -2
  19. package/dist/{ScheduleModal.vue_vue_type_script_setup_true_lang-DIYLOF9N.js → ScheduleModal.vue_vue_type_script_setup_true_lang-3oQ6lE86.js} +187 -186
  20. package/dist/{SchedulePage-QW-cYvu2.js → SchedulePage-9dFXxWwZ.js} +13 -13
  21. package/dist/{SchedulePositionPage-BtFfVo2N.js → SchedulePositionPage-Dea5X8Sa.js} +3 -3
  22. package/dist/{SelectFilter-BXeVKgHN.js → SelectFilter-Dr9lB6Ta.js} +1 -1
  23. package/dist/TeamMemberList-Bu9QNP9W.js +2086 -0
  24. package/dist/{TimesheetList-D-bESKe5.js → TimesheetList-B98l028z.js} +9 -9
  25. package/dist/{TimesheetList.vue_vue_type_style_index_0_scoped_63294af2_lang-D0zAVqCa.js → TimesheetList.vue_vue_type_style_index_0_scoped_63294af2_lang-DIQ7kjG8.js} +3 -3
  26. package/dist/{app-D-MUq9Ab.js → app-BHQJX4L4.js} +6398 -3459
  27. package/dist/app.js +3 -3
  28. package/dist/{approval-code-BXUiojPH.js → approval-code-w0rZJeYU.js} +1 -1
  29. package/dist/{dayjs.min-BZ1pM-6M.js → dayjs.min-C4H4diN8.js} +34 -34
  30. package/dist/{employee-HQEU8fjb.js → employee-BEwUmdt6.js} +48 -47
  31. package/dist/{grant-user-CBJ3gEgW.js → grant-user-DdxPMH5_.js} +1 -1
  32. package/dist/{iteration-ogxW2-Tv.js → iteration-DBHifssn.js} +1 -1
  33. package/dist/{lodash-Def4gaas.js → lodash-DqZsWm-0.js} +1 -1
  34. package/dist/member-grant-DOigVnBR.js +55 -0
  35. package/dist/restaurant-2xCb2x26.js +51 -0
  36. package/dist/{role-JDoDFVd9.js → role-C8STcmLJ.js} +5 -4
  37. package/dist/{rule-DPtqlnz-.js → rule-BkL34-Ma.js} +105 -100
  38. package/dist/src/api/my-pos-profile/index.d.ts +5 -0
  39. package/dist/src/api/sso-provider/index.d.ts +5 -0
  40. package/dist/src/api/staff-invite/index.d.ts +16 -0
  41. package/dist/src/components/CollapsibleWrapper.vue.d.ts +11 -3
  42. package/dist/src/components/form/SegmentedTabs.vue.d.ts +23 -0
  43. package/dist/src/composables/useMenuAccess.d.ts +56 -0
  44. package/dist/src/composables/useSsoProviders.d.ts +19 -0
  45. package/dist/src/composables/useStaffInviteProviders.d.ts +8 -0
  46. package/dist/src/helpers/member-grant.d.ts +36 -0
  47. package/dist/src/helpers/my-pos-profile.d.ts +37 -0
  48. package/dist/src/helpers/pos-assignment-rows.d.ts +28 -0
  49. package/dist/src/helpers/staff-invite.d.ts +54 -0
  50. package/dist/src/helpers/string.d.ts +10 -1
  51. package/dist/src/router/menu-access-guard.d.ts +17 -0
  52. package/dist/src/router/shared.d.ts +3 -1
  53. package/dist/src/stores/restaurant.d.ts +7 -7
  54. package/dist/src/stores/team.d.ts +30 -0
  55. package/dist/src/types/my-pos-profile.d.ts +25 -0
  56. package/dist/src/types/sso-provider.d.ts +10 -0
  57. package/dist/src/types/staff-invite.d.ts +100 -0
  58. package/dist/src/types/team.d.ts +17 -1
  59. package/dist/src/views/hr/locales/index.d.ts +20 -0
  60. package/dist/src/views/hr/role/RoleForm.vue.d.ts +29 -2
  61. package/dist/src/views/my-pos-profile/MyPosProfile.vue.d.ts +2 -0
  62. package/dist/src/views/my-pos-profile/components/PasscodeChangedDialog.vue.d.ts +4 -0
  63. package/dist/src/views/my-pos-profile/locales/index.d.ts +200 -0
  64. package/dist/src/views/scheduling/composables/useScheduleOnboardingAvailability.d.ts +1 -1
  65. package/dist/src/views/scheduling/composables/useScheduleOnboardingWizard.d.ts +1 -1
  66. package/dist/src/views/scheduling/composables/useScheduleShiftDraft.d.ts +1 -1
  67. package/dist/src/views/scheduling/composables/useScheduleShiftPopover.d.ts +1 -1
  68. package/dist/src/views/team/components/BasePermission.vue.d.ts +11 -0
  69. package/dist/src/views/team/components/ConditionPermission.vue.d.ts +11 -0
  70. package/dist/src/views/team/components/MemberGrantFields.vue.d.ts +51 -0
  71. package/dist/src/views/team/{member/MemberInfo.vue.d.ts → components/MemberStatusBadge.vue.d.ts} +2 -2
  72. package/dist/src/views/team/components/PortalPermissionEditor.vue.d.ts +21 -0
  73. package/dist/src/views/team/components/PosAssignmentRows.vue.d.ts +44 -0
  74. package/dist/src/views/team/components/PosRolePermission.vue.d.ts +11 -0
  75. package/dist/src/views/team/locales/index.d.ts +716 -0
  76. package/dist/src/views/team/member/AddMemberForm.vue.d.ts +48 -3
  77. package/dist/src/views/team/member/ExistingMemberNotice.vue.d.ts +11 -0
  78. package/dist/src/views/team/member/MemberDetailsCard.vue.d.ts +35 -0
  79. package/dist/src/views/team/member/MemberHeaderCard.vue.d.ts +19 -0
  80. package/dist/src/views/team/member/TeamMemberList.vue.d.ts +1 -0
  81. package/dist/string-DZQ1uNjn.js +22 -0
  82. package/dist/style.css +1 -1
  83. package/dist/tsconfig.app.tsbuildinfo +1 -1
  84. package/dist/{useAppStore-DZCdxlCd.js → useAppStore-BUmFt2dT.js} +1 -1
  85. package/dist/{useLoading-Nygx2zn8.js → useLoading-oHRj4RgU.js} +1 -1
  86. package/dist/{useReportPermissions-CxV7Dz1B.js → useReportPermissions-CpcyfEuV.js} +5 -5
  87. package/package.json +1 -1
  88. package/dist/ConditionBuilderForm.vue_vue_type_script_setup_true_lang-B0VcRYUg.js +0 -438
  89. package/dist/EmployeeList-Bd73xDCX.js +0 -776
  90. package/dist/FormItem.vue_vue_type_script_setup_true_lang-cLEnrtC6.js +0 -45
  91. package/dist/FormSection.vue_vue_type_script_setup_true_lang-DknXTYiK.js +0 -49
  92. package/dist/Main-DGf0bQvy.js +0 -96
  93. package/dist/PasscodePinField.vue_vue_type_script_setup_true_lang-CqG0v0Sz.js +0 -243
  94. package/dist/PortalPermissionEditor.vue_vue_type_script_setup_true_lang-CkOAT-oX.js +0 -4167
  95. package/dist/PortalUserSearcher.vue_vue_type_style_index_0_scoped_827dfd60_lang-DQcgZ0nF.js +0 -35
  96. package/dist/RoleList-B_7UnVNb.js +0 -740
  97. package/dist/TeamMemberList-DoisBYnk.js +0 -1154
  98. package/dist/restaurant-D2mfKHaH.js +0 -1880
  99. package/dist/string-VNuQNweN.js +0 -15
@@ -0,0 +1,90 @@
1
+ import { createElementBlock as s, openBlock as o, createElementVNode as n, ref as y, computed as h, defineComponent as d, renderSlot as r, createCommentVNode as i, toDisplayString as a, normalizeClass as m, createVNode as _, withCtx as b } from "vue";
2
+ import { a as x } from "./app-BHQJX4L4.js";
3
+ const $ = {};
4
+ function k(e, t) {
5
+ return o(), s("div", null, [...t[0] || (t[0] = [
6
+ n("div", { class: "h-px w-full bg-fm-color-neutral-gray-100" }, null, -1)
7
+ ])]);
8
+ }
9
+ const E = /* @__PURE__ */ x($, [["render", k]]), H = (e) => {
10
+ const t = y("");
11
+ function l(c) {
12
+ return `${c}`.trim().toLowerCase();
13
+ }
14
+ const u = h(() => l(t.value));
15
+ function f(c) {
16
+ return u.value ? c.some((p) => l(p).includes(u.value)) : !0;
17
+ }
18
+ return { searchKey: t, filter: f };
19
+ }, v = { class: "space-y-8" }, w = { class: "flex items-center justify-between" }, C = { class: "space-y-8" }, S = { class: "fm-typo-en-body-lg-600" }, g = {
20
+ key: 0,
21
+ class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary"
22
+ }, K = /* @__PURE__ */ d({
23
+ __name: "FormItem",
24
+ props: {
25
+ label: {},
26
+ description: {}
27
+ },
28
+ setup(e) {
29
+ return (t, l) => (o(), s("div", v, [
30
+ n("div", w, [
31
+ n("div", C, [
32
+ n("p", S, a(e.label), 1),
33
+ e.description ? (o(), s("p", g, a(e.description), 1)) : i("", !0)
34
+ ]),
35
+ r(t.$slots, "append")
36
+ ]),
37
+ r(t.$slots, "default")
38
+ ]));
39
+ }
40
+ }), B = /* @__PURE__ */ d({
41
+ __name: "FormColumn",
42
+ props: {
43
+ shrinkable: { type: Boolean }
44
+ },
45
+ setup(e) {
46
+ return (t, l) => (o(), s("div", {
47
+ class: m(["flex-1 flex flex-col space-y-24", { "min-h-0": e.shrinkable }])
48
+ }, [
49
+ r(t.$slots, "default")
50
+ ], 2));
51
+ }
52
+ }), V = {
53
+ key: 0,
54
+ class: "flex flex-row justify-between items-center"
55
+ }, F = { class: "space-y-4" }, N = { class: "fm-typo-en-title-sm-600" }, T = {
56
+ key: 0,
57
+ class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary"
58
+ }, D = /* @__PURE__ */ d({
59
+ __name: "FormSection",
60
+ props: {
61
+ title: {},
62
+ subTitle: {},
63
+ shrinkable: { type: Boolean }
64
+ },
65
+ setup(e) {
66
+ return (t, l) => (o(), s("div", {
67
+ class: m(["flex flex-col space-y-16", { "min-h-0": e.shrinkable }])
68
+ }, [
69
+ e.title ? (o(), s("div", V, [
70
+ n("div", F, [
71
+ n("p", N, a(e.title), 1),
72
+ e.subTitle ? (o(), s("p", T, a(e.subTitle), 1)) : i("", !0)
73
+ ]),
74
+ r(t.$slots, "append-title")
75
+ ])) : i("", !0),
76
+ _(B, { shrinkable: e.shrinkable }, {
77
+ default: b(() => [
78
+ r(t.$slots, "default")
79
+ ]),
80
+ _: 3
81
+ }, 8, ["shrinkable"])
82
+ ], 2));
83
+ }
84
+ });
85
+ export {
86
+ E as H,
87
+ D as _,
88
+ K as a,
89
+ H as u
90
+ };
@@ -1,16 +1,15 @@
1
1
  import { defineComponent as X, ref as S, computed as f, watch as ue, resolveComponent as v, createElementBlock as D, openBlock as w, Fragment as E, renderSlot as de, createVNode as l, unref as s, withCtx as g, createElementVNode as o, toDisplayString as _, isRef as H, renderList as me, createBlock as pe, createCommentVNode as fe, withModifiers as W, createTextVNode as J, normalizeClass as ve, h as p } from "vue";
2
- import { d as ge } from "./dayjs.min-BZ1pM-6M.js";
2
+ import { d as ge } from "./dayjs.min-C4H4diN8.js";
3
3
  import { useI18n as Z } from "@feedmepos/mf-common";
4
4
  import { useSnackbar as ee, components as K, useDialog as _e, useBreakpoints as ye, FmButtonVariant as O } from "@feedmepos/ui-library";
5
- import { S as A } from "./SelectFilter-BXeVKgHN.js";
6
- import { _ as he } from "./app-D-MUq9Ab.js";
7
- import { _ as Q, u as Ue, H as xe } from "./FormItem.vue_vue_type_script_setup_true_lang-cLEnrtC6.js";
8
- import { _ as be } from "./TableEmptyState.vue_vue_type_script_setup_true_lang-IfAZmWr0.js";
9
- import { u as te } from "./useLoading-Nygx2zn8.js";
10
- import { u as ae } from "./grant-user-CBJ3gEgW.js";
11
- import { u as se } from "./restaurant-D2mfKHaH.js";
12
- import { u as re } from "./role-JDoDFVd9.js";
13
- import { _ as Ve } from "./FormSection.vue_vue_type_script_setup_true_lang-DknXTYiK.js";
5
+ import { S as A } from "./SelectFilter-Dr9lB6Ta.js";
6
+ import { _ as he } from "./app-BHQJX4L4.js";
7
+ import { _ as Ue, a as Q, u as xe, H as be } from "./FormSection.vue_vue_type_script_setup_true_lang-mdfK9rtZ.js";
8
+ import { _ as Ve } from "./TableEmptyState.vue_vue_type_script_setup_true_lang-IfAZmWr0.js";
9
+ import { u as te } from "./useLoading-oHRj4RgU.js";
10
+ import { u as ae } from "./grant-user-DdxPMH5_.js";
11
+ import { u as se } from "./restaurant-2xCb2x26.js";
12
+ import { u as re } from "./role-C8STcmLJ.js";
14
13
  const ke = { class: "fm-typo-en-title-md-600" }, Fe = { class: "space-y-40" }, we = { class: "flex gap-8 items-center justify-start" }, Se = /* @__PURE__ */ X({
15
14
  __name: "GrantUserForm",
16
15
  setup(le, { expose: M }) {
@@ -88,7 +87,7 @@ const ke = { class: "fm-typo-en-title-md-600" }, Fe = { class: "space-y-40" }, w
88
87
  ]),
89
88
  default: g(() => [
90
89
  o("div", Fe, [
91
- l(Ve, {
90
+ l(Ue, {
92
91
  title: s(d)("grantUser.form.section")
93
92
  }, {
94
93
  default: g(() => [
@@ -172,7 +171,7 @@ const ke = { class: "fm-typo-en-title-md-600" }, Fe = { class: "space-y-40" }, w
172
171
  }, Ee = {
173
172
  key: 0,
174
173
  class: "flex flex-col gap-4"
175
- }, rt = /* @__PURE__ */ X({
174
+ }, st = /* @__PURE__ */ X({
176
175
  __name: "GrantUserList",
177
176
  setup(le, {
178
177
  expose: M
@@ -186,7 +185,7 @@ const ke = { class: "fm-typo-en-title-md-600" }, Fe = { class: "space-y-40" }, w
186
185
  } = re(), h = f(() => x.grantUsers), {
187
186
  searchKey: n,
188
187
  filter: B
189
- } = Ue(), U = f(() => {
188
+ } = xe(), U = f(() => {
190
189
  var e;
191
190
  return (e = h.value) == null ? void 0 : e.filter((t) => {
192
191
  const m = !y.value || y.value.includes(t.restaurantId), G = !k.value || k.value.includes(t.status), L = b.value[t.restaurantId] || "", j = V.value[t.roleId] || "";
@@ -395,7 +394,7 @@ const ke = { class: "fm-typo-en-title-md-600" }, Fe = { class: "space-y-40" }, w
395
394
  "onUpdate:modelValue": t[3] || (t[3] = (r) => H(n) ? n.value = r : null),
396
395
  autofocus: "",
397
396
  placeholder: s(a)("grantUser.search.placeholder")
398
- }, null, 8, ["modelValue", "placeholder"])]), l(xe), o("div", Re, [l(A, {
397
+ }, null, 8, ["modelValue", "placeholder"])]), l(be), o("div", Re, [l(A, {
399
398
  modelValue: y.value,
400
399
  "onUpdate:modelValue": t[4] || (t[4] = (r) => y.value = r),
401
400
  multiple: "",
@@ -413,7 +412,7 @@ const ke = { class: "fm-typo-en-title-md-600" }, Fe = { class: "space-y-40" }, w
413
412
  "selected-prefix": s(a)("grantUser.filter.selected_status_prefix"),
414
413
  placeholder: s(a)("grantUser.filter.status_placeholder")
415
414
  }, null, 8, ["modelValue", "items", "selected-prefix", "placeholder"])])]), l(he, null, {
416
- default: g(() => [o("div", ze, [l(be, {
415
+ default: g(() => [o("div", ze, [l(Ve, {
417
416
  "is-loading": s(x).isLoading,
418
417
  "is-empty": U.value.length === 0,
419
418
  title: s(a)("grantUser.noData.title"),
@@ -460,5 +459,5 @@ const ke = { class: "fm-typo-en-title-md-600" }, Fe = { class: "space-y-40" }, w
460
459
  }
461
460
  });
462
461
  export {
463
- rt as default
462
+ st as default
464
463
  };
@@ -4,19 +4,19 @@ import { useCoreStore as uf, useI18n as vf } from "@feedmepos/mf-common";
4
4
  import { useSnackbar as pf } from "@feedmepos/ui-library";
5
5
  import { _ as df } from "./ResponsiveFabButton.vue_vue_type_script_setup_true_lang-QrqYEy8i.js";
6
6
  import { _ as mf } from "./PageLayout.vue_vue_type_script_setup_true_lang-HKK4cbW8.js";
7
- import { u as gf } from "./restaurant-D2mfKHaH.js";
8
- import { u as _f } from "./role-JDoDFVd9.js";
7
+ import { u as gf } from "./restaurant-2xCb2x26.js";
8
+ import { u as _f } from "./role-C8STcmLJ.js";
9
9
  /* empty css */
10
- import "./employee-HQEU8fjb.js";
11
- import "./lodash-Def4gaas.js";
12
- import "./useAppStore-DZCdxlCd.js";
13
- import "./iteration-ogxW2-Tv.js";
10
+ import "./employee-BEwUmdt6.js";
11
+ import "./lodash-DqZsWm-0.js";
12
+ import "./useAppStore-BUmFt2dT.js";
13
+ import "./iteration-DBHifssn.js";
14
14
  /* empty css */
15
- import { R as pt } from "./app-D-MUq9Ab.js";
16
- import "./rule-DPtqlnz-.js";
17
- import "./useReportPermissions-CxV7Dz1B.js";
18
- import "./dayjs.min-BZ1pM-6M.js";
19
- import "./TimesheetList.vue_vue_type_style_index_0_scoped_63294af2_lang-D0zAVqCa.js";
15
+ import { R as pt } from "./app-BHQJX4L4.js";
16
+ import "./rule-BkL34-Ma.js";
17
+ import "./useReportPermissions-CpcyfEuV.js";
18
+ import "./dayjs.min-C4H4diN8.js";
19
+ import "./TimesheetList.vue_vue_type_style_index_0_scoped_63294af2_lang-DIQ7kjG8.js";
20
20
  var Nn = {};
21
21
  /*! xlsx.js (C) 2013-present SheetJS -- http://sheetjs.com */
22
22
  var qt = {};
@@ -4,11 +4,11 @@ import { useI18n as E, useCoreStore as $ } from "@feedmepos/mf-common";
4
4
  import { useSnackbar as I } from "@feedmepos/ui-library";
5
5
  import { _ as z } from "./ResponsiveFabButton.vue_vue_type_script_setup_true_lang-QrqYEy8i.js";
6
6
  import { _ as M } from "./PageLayout.vue_vue_type_script_setup_true_lang-HKK4cbW8.js";
7
- import { u as j } from "./restaurant-D2mfKHaH.js";
8
- import { u as H } from "./role-JDoDFVd9.js";
9
- import { u as J } from "./grant-user-CBJ3gEgW.js";
10
- import { u as K } from "./approval-code-BXUiojPH.js";
11
- import { R as n } from "./app-D-MUq9Ab.js";
7
+ import { u as j } from "./restaurant-2xCb2x26.js";
8
+ import { u as H } from "./role-C8STcmLJ.js";
9
+ import { u as J } from "./grant-user-DdxPMH5_.js";
10
+ import { u as K } from "./approval-code-w0rZJeYU.js";
11
+ import { R as n } from "./app-BHQJX4L4.js";
12
12
  const Q = { class: "space-y-24" }, ue = /* @__PURE__ */ D({
13
13
  __name: "Main",
14
14
  setup(W) {
@@ -0,0 +1,101 @@
1
+ import { defineComponent as M, ref as R, computed as i, watch as g, resolveComponent as c, createBlock as p, openBlock as d, withCtx as u, createElementVNode as A, createVNode as v, resolveDynamicComponent as h, createCommentVNode as k, createTextVNode as N, toDisplayString as w } from "vue";
2
+ import { useRouter as x, useRoute as F } from "vue-router";
3
+ import { useI18n as I, useCoreStore as O } from "@feedmepos/mf-common";
4
+ import { _ as $ } from "./ResponsiveFabButton.vue_vue_type_script_setup_true_lang-QrqYEy8i.js";
5
+ import { _ as q } from "./PageLayout.vue_vue_type_script_setup_true_lang-HKK4cbW8.js";
6
+ import { u as D } from "./PortalUserSearcher.vue_vue_type_style_index_0_scoped_827dfd60_lang-C8hcooKP.js";
7
+ import { u as P } from "./restaurant-2xCb2x26.js";
8
+ import "@feedmepos/ui-library";
9
+ import "./rule-BkL34-Ma.js";
10
+ import "./lodash-DqZsWm-0.js";
11
+ import "./iteration-DBHifssn.js";
12
+ import "./useAppStore-BUmFt2dT.js";
13
+ import { R as B } from "./app-BHQJX4L4.js";
14
+ import "./member-grant-DOigVnBR.js";
15
+ import "./role-C8STcmLJ.js";
16
+ /* empty css */
17
+ import "./useReportPermissions-CpcyfEuV.js";
18
+ const U = { class: "space-y-24" }, se = /* @__PURE__ */ M({
19
+ __name: "Main",
20
+ setup(j) {
21
+ const { t: o } = I(), b = x(), S = F(), T = O(), { readRestaurants: V } = P(), { loadProviders: L } = D(), f = R(), _ = R(), s = {
22
+ member: B.TEAM_MEMBER,
23
+ role: B.TEAM_ROLE
24
+ }, a = i({
25
+ get: () => Object.keys(s).find((e) => s[e] === S.name) ?? "member",
26
+ set: (e) => {
27
+ b.push({
28
+ name: s[e],
29
+ query: b.currentRoute.value.query
30
+ });
31
+ }
32
+ });
33
+ V(), g(T.currentBusiness, () => L(), { immediate: !0 });
34
+ const r = i(() => l.value.find((e) => e.value === a.value) || l.value[0]), l = i(() => [
35
+ {
36
+ label: o("team.title"),
37
+ subTitle: o("team.subtitle"),
38
+ value: "member",
39
+ createButtonLabel: o("team.actions.addMember"),
40
+ createButtonAction: () => {
41
+ var e;
42
+ (e = f.value) == null || e.create();
43
+ }
44
+ },
45
+ {
46
+ label: o("permissionSet.title"),
47
+ value: "role",
48
+ createButtonLabel: o("permissionSet.createButtonLabel"),
49
+ createButtonAction: () => {
50
+ var e;
51
+ (e = _.value) == null || e.create();
52
+ }
53
+ }
54
+ ]);
55
+ return (e, n) => {
56
+ const y = c("FmSpacer"), C = c("FmTabs"), E = c("RouterView");
57
+ return d(), p(q, {
58
+ heading: r.value.label
59
+ }, {
60
+ "sub-heading": u(() => [
61
+ N(w(r.value.subTitle), 1)
62
+ ]),
63
+ "append-heading": u(() => {
64
+ var t;
65
+ return [
66
+ v(y),
67
+ (t = r.value) != null && t.createButtonLabel ? (d(), p($, {
68
+ key: 0,
69
+ icon: "add",
70
+ label: r.value.createButtonLabel,
71
+ onClick: n[0] || (n[0] = (m) => r.value.createButtonAction())
72
+ }, null, 8, ["label"])) : k("", !0)
73
+ ];
74
+ }),
75
+ default: u(() => [
76
+ A("div", U, [
77
+ v(C, {
78
+ modelValue: a.value,
79
+ "onUpdate:modelValue": n[1] || (n[1] = (t) => a.value = t),
80
+ items: l.value
81
+ }, null, 8, ["modelValue", "items"]),
82
+ v(E, null, {
83
+ default: u(({ Component: t }) => [
84
+ (d(), p(h(t), {
85
+ ref: (m) => {
86
+ a.value === "member" && (f.value = m), a.value === "role" && (_.value = m);
87
+ }
88
+ }, null, 512))
89
+ ]),
90
+ _: 1
91
+ })
92
+ ])
93
+ ]),
94
+ _: 1
95
+ }, 8, ["heading"]);
96
+ };
97
+ }
98
+ });
99
+ export {
100
+ se as default
101
+ };
@@ -0,0 +1,301 @@
1
+ import { defineComponent as V, ref as r, computed as k, resolveComponent as P, createBlock as $, openBlock as l, withCtx as F, createElementVNode as t, createElementBlock as n, Fragment as M, renderList as j, toDisplayString as c, unref as s, createVNode as i, onUnmounted as Q, watch as X, createCommentVNode as Y, h as B } from "vue";
2
+ import { useI18n as L, useCoreStore as Z, FeedMeAuth as ee } from "@feedmepos/mf-common";
3
+ import { useSnackbar as oe, useDialog as te, useBreakpoints as se, components as ae, SnackbarPosition as le } from "@feedmepos/ui-library";
4
+ import { _ as ne } from "./PageLayout.vue_vue_type_script_setup_true_lang-HKK4cbW8.js";
5
+ import { t as re, f as ie, c as ce, r as de, i as U, d as ue, e as me, p as pe, o as fe } from "./app-BHQJX4L4.js";
6
+ import { _ as ye } from "./index.vue_vue_type_script_setup_true_lang-BVVwfd7B.js";
7
+ const _e = { class: "flex w-full flex-col items-center gap-8 pt-[4px]" }, ge = { class: "fm-typo-en-title-sm-600 text-center" }, ve = { class: "py-[4px]" }, Pe = {
8
+ class: "flex items-center justify-center gap-4 rounded-[12px] bg-fm-color-neutral-gray-100 px-16 py-[20px]",
9
+ "data-testid": "new-passcode"
10
+ }, he = { class: "fm-typo-en-body-md-400 pt-16 text-center text-fm-color-typo-primary" }, xe = /* @__PURE__ */ V({
11
+ __name: "PasscodeChangedDialog",
12
+ setup(R, { expose: e }) {
13
+ const { t: h } = L(), y = r(!1), x = r(""), b = k(() => x.value.split("")), C = (_) => {
14
+ x.value = _, y.value = !0;
15
+ }, d = () => {
16
+ y.value = !1, x.value = "";
17
+ };
18
+ return e({ open: C }), (_, a) => {
19
+ const g = P("FmIcon"), v = P("FmButton"), u = P("FmDialog");
20
+ return l(), $(u, {
21
+ modelValue: y.value,
22
+ "onUpdate:modelValue": [
23
+ a[0] || (a[0] = (m) => y.value = m),
24
+ a[1] || (a[1] = (m) => !m && d())
25
+ ],
26
+ "min-width": 360,
27
+ "max-width": 460,
28
+ "close-button": !1,
29
+ "dismiss-away": !1
30
+ }, {
31
+ "dialog-header": F(() => [
32
+ t("div", _e, [
33
+ i(g, {
34
+ name: "check_circle",
35
+ size: "xl",
36
+ outline: "",
37
+ color: "typo-success"
38
+ }),
39
+ t("p", ge, c(s(h)("myPosProfile.changed.title")), 1)
40
+ ])
41
+ ]),
42
+ "dialog-footer": F(() => [
43
+ i(v, {
44
+ class: "w-full",
45
+ variant: "primary",
46
+ label: s(h)("myPosProfile.changed.done"),
47
+ onClick: d
48
+ }, null, 8, ["label"])
49
+ ]),
50
+ default: F(() => [
51
+ t("div", ve, [
52
+ t("div", Pe, [
53
+ (l(!0), n(M, null, j(b.value, (m, w) => (l(), n("span", {
54
+ key: w,
55
+ class: "flex h-[56px] w-[52px] items-center justify-center text-[48px] font-bold leading-[56px] text-fm-color-typo-primary"
56
+ }, c(m), 1))), 128))
57
+ ]),
58
+ t("p", he, c(s(h)("myPosProfile.changed.message")), 1)
59
+ ])
60
+ ]),
61
+ _: 1
62
+ }, 8, ["modelValue"]);
63
+ };
64
+ }
65
+ }), be = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, we = {
66
+ key: 1,
67
+ class: "flex flex-1 items-center justify-center"
68
+ }, ke = {
69
+ key: 2,
70
+ class: "space-y-24"
71
+ }, Fe = {
72
+ key: 0,
73
+ role: "alert",
74
+ "data-testid": "pos-user-shared",
75
+ class: "flex items-center gap-[10px] rounded-[12px] bg-fm-color-system-warning-100 px-16 py-[14px]"
76
+ }, Se = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-primary" }, Ae = { class: "space-y-12" }, Ce = { class: "fm-typo-en-body-lg-600" }, De = { class: "flex items-center gap-24 rounded-[12px] border border-fm-color-neutral-gray-100 p-24 xs:flex-wrap" }, Be = { class: "flex h-48 w-48 shrink-0 items-center justify-center rounded-[12px] bg-fm-color-neutral-gray-100" }, Ue = { class: "min-w-0 flex-1" }, $e = { class: "flex items-center gap-8" }, Me = ["aria-label"], Ee = {
77
+ key: 0,
78
+ class: "h-[14px] w-[14px] rounded-full bg-fm-color-typo-primary"
79
+ }, Ie = {
80
+ key: 1,
81
+ class: "fm-typo-en-title-sm-600 text-fm-color-typo-primary"
82
+ }, ze = {
83
+ key: 0,
84
+ class: "fm-typo-en-body-md-400 pt-[6px] text-fm-color-typo-secondary"
85
+ }, Ve = { class: "flex flex-wrap items-center gap-[10px] rounded-[12px] bg-fm-color-neutral-gray-100 px-16 py-[14px]" }, je = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, Le = 4, Ke = /* @__PURE__ */ V({
86
+ __name: "MyPosProfile",
87
+ setup(R) {
88
+ const { t: e, locale: h } = L(), y = Z(), x = oe(), b = te(), { breakpoints: C } = se(), d = r(null), _ = r(!0), a = r(null), g = r(!1), v = r(!1), u = r(!1), m = r(), w = r(Date.now()), T = setInterval(() => w.value = Date.now(), 3e4);
89
+ Q(() => clearInterval(T));
90
+ const S = k(() => {
91
+ var o;
92
+ return ((o = d.value) == null ? void 0 : o.profile) ?? null;
93
+ }), N = k(() => S.value ? re(S.value) : []), E = k(
94
+ () => {
95
+ var o;
96
+ return ie(
97
+ ((o = S.value) == null ? void 0 : o.passcodeUpdatedAt) ?? null,
98
+ e,
99
+ String(h.value),
100
+ w.value
101
+ );
102
+ }
103
+ ), O = k(
104
+ () => a.value ? a.value.split("") : Array.from({ length: Le }, () => null)
105
+ ), G = [
106
+ {
107
+ id: "name",
108
+ header: () => e("myPosProfile.table.columns.name"),
109
+ enableSorting: !1,
110
+ cell: (o) => {
111
+ const f = o.row.original.name;
112
+ return f ? B("div", { class: "flex items-center gap-8" }, [
113
+ B(ae.FmAvatar, { name: f, size: "sm", class: "shrink-0" }),
114
+ B("span", { class: "truncate" }, f)
115
+ ]) : "";
116
+ }
117
+ },
118
+ {
119
+ id: "contact",
120
+ header: () => e("myPosProfile.table.columns.contact"),
121
+ enableSorting: !1,
122
+ cell: (o) => o.row.original.contact ?? ""
123
+ },
124
+ {
125
+ id: "restaurant",
126
+ header: () => e("myPosProfile.table.columns.restaurant"),
127
+ enableSorting: !1,
128
+ cell: (o) => o.row.original.restaurant
129
+ },
130
+ {
131
+ id: "role",
132
+ header: () => e("myPosProfile.table.columns.role"),
133
+ enableSorting: !1,
134
+ cell: (o) => o.row.original.role
135
+ }
136
+ ];
137
+ function A(o) {
138
+ x.open({ type: "error", title: o, position: le.BOTTOM });
139
+ }
140
+ async function H() {
141
+ _.value = !0, u.value = !1, a.value = null;
142
+ try {
143
+ d.value = await de();
144
+ } catch (o) {
145
+ d.value = null, U(o) ? u.value = !0 : A(e("myPosProfile.loadFailed"));
146
+ } finally {
147
+ _.value = !1;
148
+ }
149
+ }
150
+ X(
151
+ y.currentBusiness,
152
+ (o) => {
153
+ o && H();
154
+ },
155
+ { immediate: !0 }
156
+ );
157
+ async function K() {
158
+ if (a.value) {
159
+ a.value = null;
160
+ return;
161
+ }
162
+ if (!g.value) {
163
+ g.value = !0;
164
+ try {
165
+ a.value = (await ue()).passcode;
166
+ } catch (o) {
167
+ U(o) ? u.value = !0 : A(e("myPosProfile.passcode.revealFailed"));
168
+ } finally {
169
+ g.value = !1;
170
+ }
171
+ }
172
+ }
173
+ function W() {
174
+ b.open({
175
+ title: e("myPosProfile.change.title"),
176
+ message: e("myPosProfile.change.message"),
177
+ minWidth: C.value.lg ? 598 : 0,
178
+ primaryActions: {
179
+ text: e("common.confirm"),
180
+ close: !1,
181
+ isLoading: v
182
+ },
183
+ secondaryActions: { text: e("common.cancel"), close: !0 }
184
+ }).onPrimary(async () => {
185
+ var o, f;
186
+ if (!v.value) {
187
+ v.value = !0;
188
+ try {
189
+ const { passcode: p, passcodeUpdatedAt: D } = await me();
190
+ a.value = null, (o = d.value) != null && o.profile && (d.value.profile.passcodeUpdatedAt = D), w.value = Date.now(), b.close(), (f = m.value) == null || f.open(p);
191
+ } catch (p) {
192
+ b.close(), U(p) ? u.value = !0 : A(e(pe(p)));
193
+ } finally {
194
+ v.value = !1;
195
+ }
196
+ }
197
+ });
198
+ }
199
+ function q() {
200
+ fe(ee) || A(e("myPosProfile.manageAccount.failed"));
201
+ }
202
+ return (o, f) => {
203
+ const p = P("FmIcon"), D = P("FmTable"), I = P("FmButton");
204
+ return l(), $(ne, {
205
+ heading: s(e)("myPosProfile.title")
206
+ }, {
207
+ "sub-heading": F(() => [
208
+ t("p", be, c(s(e)("myPosProfile.subtitle")), 1)
209
+ ]),
210
+ default: F(() => [
211
+ _.value ? (l(), $(ce, { key: 0 })) : !S.value && !u.value ? (l(), n("div", we, [
212
+ i(s(ye), {
213
+ title: s(e)("myPosProfile.noPosUser.title"),
214
+ subtitle: s(e)("myPosProfile.noPosUser.description")
215
+ }, null, 8, ["title", "subtitle"])
216
+ ])) : (l(), n("div", ke, [
217
+ u.value ? (l(), n("div", Fe, [
218
+ i(p, {
219
+ name: "warning",
220
+ size: "sm",
221
+ outline: "",
222
+ color: "typo-warning"
223
+ }),
224
+ t("span", Se, c(s(e)("myPosProfile.shared.message")), 1)
225
+ ])) : (l(), n(M, { key: 1 }, [
226
+ i(D, {
227
+ "column-defs": G,
228
+ "row-data": N.value,
229
+ "page-size": 100,
230
+ "hide-footer": ""
231
+ }, null, 8, ["row-data"]),
232
+ t("section", Ae, [
233
+ t("p", Ce, c(s(e)("myPosProfile.passcode.title")), 1),
234
+ t("div", De, [
235
+ t("div", Be, [
236
+ i(p, {
237
+ name: "lock",
238
+ outline: ""
239
+ })
240
+ ]),
241
+ t("div", Ue, [
242
+ t("div", $e, [
243
+ t("div", {
244
+ class: "flex h-24 items-center gap-[10px]",
245
+ "data-testid": "passcode",
246
+ "aria-label": a.value ? void 0 : s(e)("myPosProfile.passcode.title")
247
+ }, [
248
+ (l(!0), n(M, null, j(O.value, (z, J) => (l(), n("span", {
249
+ key: J,
250
+ class: "flex w-[20px] items-center justify-center"
251
+ }, [
252
+ z === null ? (l(), n("span", Ee)) : (l(), n("span", Ie, c(z), 1))
253
+ ]))), 128))
254
+ ], 8, Me),
255
+ i(I, {
256
+ variant: "tertiary",
257
+ "prepend-icon": a.value ? "visibility_off" : "visibility",
258
+ loading: g.value,
259
+ "aria-label": a.value ? s(e)("myPosProfile.passcode.hide") : s(e)("myPosProfile.passcode.show"),
260
+ onClick: K
261
+ }, null, 8, ["prepend-icon", "loading", "aria-label"])
262
+ ]),
263
+ E.value ? (l(), n("p", ze, c(E.value), 1)) : Y("", !0)
264
+ ]),
265
+ i(I, {
266
+ variant: "secondary",
267
+ size: "md",
268
+ label: s(e)("myPosProfile.passcode.change"),
269
+ onClick: W
270
+ }, null, 8, ["label"])
271
+ ])
272
+ ])
273
+ ], 64)),
274
+ t("div", Ve, [
275
+ i(p, {
276
+ name: "info",
277
+ size: "sm",
278
+ outline: "",
279
+ color: "typo-secondary"
280
+ }),
281
+ t("span", je, c(s(e)("myPosProfile.manageAccount.message")), 1),
282
+ t("button", {
283
+ type: "button",
284
+ class: "fm-typo-en-body-md-600 text-fm-color-system-info-300",
285
+ onClick: q
286
+ }, c(s(e)("myPosProfile.manageAccount.link")), 1)
287
+ ])
288
+ ])),
289
+ i(xe, {
290
+ ref_key: "changedDialogRef",
291
+ ref: m
292
+ }, null, 512)
293
+ ]),
294
+ _: 1
295
+ }, 8, ["heading"]);
296
+ };
297
+ }
298
+ });
299
+ export {
300
+ Ke as default
301
+ };