@feedmepos/mf-hrm-portal 2.3.2-dev.7 → 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.
- package/dist/{ApprovalCodeList-Bw0E-hZl.js → ApprovalCodeList-gb0bre9J.js} +7 -7
- package/dist/{AuditLogList-CA-_t77n.js → AuditLogList-9cwS6bL7.js} +795 -719
- package/dist/{ConditionBuilderForm.vue_vue_type_script_setup_true_lang-LtjNCAFN.js → ConditionBuilderForm.vue_vue_type_script_setup_true_lang-DR-c15gr.js} +2 -2
- package/dist/{EmployeeList-D_bX0EhQ.js → EmployeeList-DjyoW1we.js} +8 -8
- package/dist/{FormSection.vue_vue_type_script_setup_true_lang-CyZxQa-b.js → FormSection.vue_vue_type_script_setup_true_lang-BBWlADve.js} +1 -1
- package/dist/{GrantUserList-Cg7ITk_M.js → GrantUserList-yU2NqFVO.js} +8 -8
- package/dist/{Main-Bl-Ocx1G.js → Main-4KwMqF3h.js} +5 -5
- package/dist/{Main-BaB4vgI5.js → Main-BS_Lk_eB.js} +1005 -999
- package/dist/{Main-D5wi42fp.js → Main-BuG7SPnC.js} +10 -10
- package/dist/MyPosProfile-CuDzRaRS.js +360 -0
- package/dist/{PermissionSetList-kgG9H3DX.js → PermissionSetList-D7SS1iAr.js} +30 -29
- package/dist/{PortalPermissionEditor.vue_vue_type_script_setup_true_lang-y1YcZpGA.js → PortalPermissionEditor.vue_vue_type_script_setup_true_lang-u1UlV2Aw.js} +902 -901
- package/dist/{PortalUserSearcher.vue_vue_type_style_index_0_scoped_827dfd60_lang-fQyCtDXM.js → PortalUserSearcher.vue_vue_type_style_index_0_scoped_827dfd60_lang-CYkv2x_y.js} +1 -1
- package/dist/{RoleForm.vue_vue_type_script_setup_true_lang-3Q8udk43.js → RoleForm.vue_vue_type_script_setup_true_lang-hiMgwiya.js} +9 -9
- package/dist/{RoleList-Cmz97HHP.js → RoleList-B3P-LQYV.js} +7 -7
- package/dist/{ScheduleAddPositionModal.vue_vue_type_script_setup_true_lang-CggEy3OI.js → ScheduleAddPositionModal.vue_vue_type_script_setup_true_lang--dsZOhnv.js} +1 -1
- package/dist/{ScheduleGeneralPage-B39k3SQH.js → ScheduleGeneralPage-Pq6ufiDu.js} +2 -2
- package/dist/{ScheduleModal.vue_vue_type_script_setup_true_lang-C5j3D4eF.js → ScheduleModal.vue_vue_type_script_setup_true_lang-DKFJLsTW.js} +4 -4
- package/dist/{SchedulePage-AVmRkFi1.js → SchedulePage-8EAOfiJx.js} +189 -201
- package/dist/{SchedulePositionPage-3rE-O8CG.js → SchedulePositionPage-CGXeUnju.js} +3 -3
- package/dist/{SelectFilter-R7ry_GEg.js → SelectFilter-C-UEVLla.js} +1 -1
- package/dist/{TeamMemberList-CvDnIILn.js → TeamMemberList-Bd1O44Ur.js} +102 -101
- package/dist/TimesheetList-CSCmigCM.js +437 -0
- package/dist/{app-DKUCzcrc.js → app-BohKQtlz.js} +82 -14
- package/dist/app.js +1 -1
- package/dist/{approval-code-nsETgIry.js → approval-code-Bfvxsg8h.js} +4 -4
- package/dist/{dayjs.min-CtULWW1N.js → dayjs.min-C0MqTPg1.js} +1 -1
- package/dist/employee-DWxT78W2.js +172 -0
- package/dist/{grant-user-Dpa_Rl6j.js → grant-user-LZ3b6siI.js} +2 -2
- package/dist/{iteration-DpHBtiyr.js → index-DDDG-LHm.js} +698 -726
- package/dist/iteration-CcXrOMQe.js +30 -0
- package/dist/{lodash-YaHCUo_F.js → lodash-BRqMda7F.js} +1 -1
- package/dist/{member-grant-CEokFI3_.js → member-grant-a3AGCWfT.js} +2 -2
- package/dist/{restaurant-CDFKqEFm.js → restaurant-pL7vHt-H.js} +2 -2
- package/dist/{role-DyBVVlEA.js → role--EKCVqho.js} +8 -7
- package/dist/{rule-xErZqYmH.js → rule-Db3gFVHx.js} +83 -82
- package/dist/src/api/audit-log/index.d.ts +2 -0
- package/dist/src/api/employee/index.d.ts +1 -2
- package/dist/src/stores/approval-code.d.ts +1 -1
- package/dist/src/stores/employee.d.ts +3 -9
- package/dist/src/stores/grant-user.d.ts +1 -1
- package/dist/src/stores/permission-assignment.d.ts +2 -2
- package/dist/src/stores/permission-set.d.ts +2 -2
- package/dist/src/stores/restaurant.d.ts +2 -2
- package/dist/src/stores/role.d.ts +2 -2
- package/dist/src/stores/team.d.ts +1 -1
- package/dist/src/stores/timesheet.d.ts +62 -47
- package/dist/src/types/timesheet.d.ts +3 -0
- package/dist/src/views/audit-log/locales/index.d.ts +28 -0
- package/dist/src/views/audit-log/useTraceIdDeepLink.d.ts +19 -0
- package/dist/src/views/my-pos-profile/components/PasscodeChangedDialog.vue.d.ts +1 -1
- package/dist/src/views/my-pos-profile/locales/index.d.ts +40 -0
- package/dist/style.css +1 -1
- package/dist/timesheet-NYW1P4rf.js +76 -0
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/{useAppStore-BqsvPsPB.js → useAppStore-DV13z6oc.js} +1 -1
- package/dist/{useLoading-BS1bnZg1.js → useLoading-Fcnnfywt.js} +1 -1
- package/dist/useMessage-_ywT_N9X.js +17 -0
- package/dist/{useReportPermissions-DJEhkyGc.js → useReportPermissions-BcyVoKVq.js} +13 -13
- package/package.json +3 -3
- package/dist/MyPosProfile-CUG_201f.js +0 -290
- package/dist/TimesheetList-DYoglTi8.js +0 -401
- package/dist/TimesheetList.vue_vue_type_style_index_0_scoped_d0c6fd51_lang-DBpzyQ17.js +0 -63
- package/dist/employee-DlsSqR3i.js +0 -210
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { computed as I, isRef as L, watch as M } from "vue";
|
|
2
2
|
import { SnackbarPosition as y } from "@feedmepos/ui-library";
|
|
3
|
-
import { u as w, v } from "./useAppStore-
|
|
3
|
+
import { u as w, v } from "./useAppStore-DV13z6oc.js";
|
|
4
4
|
const E = (r) => {
|
|
5
5
|
async function d(u, e) {
|
|
6
6
|
var l, a;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { useSnackbar as u } from "@feedmepos/ui-library";
|
|
2
|
+
function a() {
|
|
3
|
+
const c = u();
|
|
4
|
+
function s(r, e) {
|
|
5
|
+
c.open({ title: r, type: "success", position: e == null ? void 0 : e.position });
|
|
6
|
+
}
|
|
7
|
+
function t(r, e) {
|
|
8
|
+
c.open({ title: r, type: "error", position: e == null ? void 0 : e.position });
|
|
9
|
+
}
|
|
10
|
+
return {
|
|
11
|
+
success: s,
|
|
12
|
+
error: t
|
|
13
|
+
};
|
|
14
|
+
}
|
|
15
|
+
export {
|
|
16
|
+
a as u
|
|
17
|
+
};
|
|
@@ -1,30 +1,30 @@
|
|
|
1
1
|
import { computed as r, ref as n } from "vue";
|
|
2
|
-
import { e as d } from "./
|
|
2
|
+
import { e as d } from "./index-DDDG-LHm.js";
|
|
3
3
|
import { useCoreStore as h } from "@feedmepos/mf-common";
|
|
4
|
-
import {
|
|
5
|
-
import { s as g } from "./app-
|
|
6
|
-
const
|
|
4
|
+
import { i as K } from "./rule-Db3gFVHx.js";
|
|
5
|
+
import { s as g } from "./app-BohKQtlz.js";
|
|
6
|
+
const i = n([]), a = n(!1), l = n(!1), f = n(null), p = n(null), u = n(!1);
|
|
7
7
|
function B() {
|
|
8
8
|
const v = h();
|
|
9
9
|
async function m() {
|
|
10
10
|
var e;
|
|
11
11
|
const s = (e = v.currentBusiness.value) == null ? void 0 : e.id;
|
|
12
12
|
if (!s) return;
|
|
13
|
-
f.value !== s && (
|
|
13
|
+
f.value !== s && (i.value = [], a.value = !1, l.value = !1, f.value = s, u.value = !1);
|
|
14
14
|
const o = localStorage.getItem("locale");
|
|
15
|
-
if (!(
|
|
15
|
+
if (!(a.value && p.value === o)) {
|
|
16
16
|
if (l.value) {
|
|
17
17
|
u.value = !0;
|
|
18
18
|
return;
|
|
19
19
|
}
|
|
20
20
|
l.value = !0;
|
|
21
21
|
try {
|
|
22
|
-
|
|
22
|
+
i.value = await K.fetchReportPermissions(
|
|
23
23
|
s,
|
|
24
24
|
o
|
|
25
|
-
),
|
|
25
|
+
), a.value = !0, p.value = o;
|
|
26
26
|
} catch (t) {
|
|
27
|
-
console.warn("Failed to fetch dynamic report permissions, keeping last known list:", t),
|
|
27
|
+
console.warn("Failed to fetch dynamic report permissions, keeping last known list:", t), a.value = !1;
|
|
28
28
|
} finally {
|
|
29
29
|
l.value = !1, u.value && (u.value = !1, await m());
|
|
30
30
|
}
|
|
@@ -38,7 +38,7 @@ function B() {
|
|
|
38
38
|
const t = typeof e.conditions == "string" ? JSON.parse(e.conditions) : e.conditions;
|
|
39
39
|
return t == null ? void 0 : t.name;
|
|
40
40
|
})
|
|
41
|
-
), o =
|
|
41
|
+
), o = i.value.filter((e) => !s.has(e.permissionKey)).map((e) => ({
|
|
42
42
|
label: e.name,
|
|
43
43
|
subject: d.F_RULE_SUBJECT.enum.report,
|
|
44
44
|
actions: ["read"],
|
|
@@ -54,7 +54,7 @@ function B() {
|
|
|
54
54
|
return e == null ? void 0 : e.name;
|
|
55
55
|
})
|
|
56
56
|
);
|
|
57
|
-
for (const o of
|
|
57
|
+
for (const o of i.value)
|
|
58
58
|
s.add(o.permissionKey);
|
|
59
59
|
return s;
|
|
60
60
|
}), S = r(() => {
|
|
@@ -64,7 +64,7 @@ function B() {
|
|
|
64
64
|
return t == null ? void 0 : t.name;
|
|
65
65
|
})
|
|
66
66
|
), o = /* @__PURE__ */ new Set();
|
|
67
|
-
for (const e of
|
|
67
|
+
for (const e of i.value)
|
|
68
68
|
s.has(e.permissionKey) || o.add(e.permissionKey);
|
|
69
69
|
return o;
|
|
70
70
|
});
|
|
@@ -74,7 +74,7 @@ function B() {
|
|
|
74
74
|
availableReportKeys: R,
|
|
75
75
|
customReportKeys: S,
|
|
76
76
|
isLoading: r(() => l.value),
|
|
77
|
-
isLoaded: r(() =>
|
|
77
|
+
isLoaded: r(() => a.value)
|
|
78
78
|
};
|
|
79
79
|
}
|
|
80
80
|
export {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@feedmepos/mf-hrm-portal",
|
|
3
|
-
"version": "2.3.2-dev.
|
|
3
|
+
"version": "2.3.2-dev.9",
|
|
4
4
|
"files": [
|
|
5
5
|
"dist"
|
|
6
6
|
],
|
|
@@ -30,8 +30,8 @@
|
|
|
30
30
|
"vue-router": "^4.3.2",
|
|
31
31
|
"vue3-lottie": "^3.3.0",
|
|
32
32
|
"xlsx": "^0.18.5",
|
|
33
|
-
"@feedmepos/hrm-
|
|
34
|
-
"@feedmepos/hrm-
|
|
33
|
+
"@feedmepos/hrm-schedule-contract": "1.0.0",
|
|
34
|
+
"@feedmepos/hrm-permission": "1.2.2"
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {
|
|
37
37
|
"@casl/ability": "^3.4.0",
|
|
@@ -1,290 +0,0 @@
|
|
|
1
|
-
import { defineComponent as j, ref as u, computed as v, resolveComponent as h, createBlock as $, openBlock as a, withCtx as F, createElementVNode as t, createElementBlock as l, Fragment as E, renderList as L, toDisplayString as c, unref as s, createVNode as r, onUnmounted as Q, watch as X, createCommentVNode as Y, h as U } from "vue";
|
|
2
|
-
import { useI18n as R, 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 ce, c as ie, r as de, i as V, d as me, p as ue, o as pe } from "./app-DKUCzcrc.js";
|
|
6
|
-
import { _ as fe } from "./index.vue_vue_type_script_setup_true_lang-BVVwfd7B.js";
|
|
7
|
-
const ye = { class: "flex w-full flex-col items-center gap-8 pt-[4px]" }, _e = { class: "fm-typo-en-title-sm-600 text-center" }, ge = { class: "py-[4px]" }, ve = {
|
|
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" }, Pe = /* @__PURE__ */ j({
|
|
11
|
-
__name: "PasscodeChangedDialog",
|
|
12
|
-
setup(T, { expose: e }) {
|
|
13
|
-
const { t: P } = R(), y = u(!1), x = u(""), b = v(() => x.value.split("")), A = (_) => {
|
|
14
|
-
x.value = _, y.value = !0;
|
|
15
|
-
}, i = () => {
|
|
16
|
-
y.value = !1, x.value = "";
|
|
17
|
-
};
|
|
18
|
-
return e({ open: A }), (_, n) => {
|
|
19
|
-
const g = h("FmIcon"), p = h("FmButton"), S = h("FmDialog");
|
|
20
|
-
return a(), $(S, {
|
|
21
|
-
modelValue: y.value,
|
|
22
|
-
"onUpdate:modelValue": [
|
|
23
|
-
n[0] || (n[0] = (d) => y.value = d),
|
|
24
|
-
n[1] || (n[1] = (d) => !d && i())
|
|
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", ye, [
|
|
33
|
-
r(g, {
|
|
34
|
-
name: "check_circle",
|
|
35
|
-
size: "xl",
|
|
36
|
-
outline: "",
|
|
37
|
-
color: "typo-success"
|
|
38
|
-
}),
|
|
39
|
-
t("p", _e, c(s(P)("myPosProfile.changed.title")), 1)
|
|
40
|
-
])
|
|
41
|
-
]),
|
|
42
|
-
"dialog-footer": F(() => [
|
|
43
|
-
r(p, {
|
|
44
|
-
class: "w-full",
|
|
45
|
-
variant: "primary",
|
|
46
|
-
label: s(P)("myPosProfile.changed.done"),
|
|
47
|
-
onClick: i
|
|
48
|
-
}, null, 8, ["label"])
|
|
49
|
-
]),
|
|
50
|
-
default: F(() => [
|
|
51
|
-
t("div", ge, [
|
|
52
|
-
t("div", ve, [
|
|
53
|
-
(a(!0), l(E, null, L(b.value, (d, C) => (a(), l("span", {
|
|
54
|
-
key: C,
|
|
55
|
-
class: "flex h-[56px] w-[52px] items-center justify-center text-[48px] font-bold leading-[56px] text-fm-color-typo-primary"
|
|
56
|
-
}, c(d), 1))), 128))
|
|
57
|
-
]),
|
|
58
|
-
t("p", he, c(s(P)("myPosProfile.changed.message")), 1)
|
|
59
|
-
])
|
|
60
|
-
]),
|
|
61
|
-
_: 1
|
|
62
|
-
}, 8, ["modelValue"]);
|
|
63
|
-
};
|
|
64
|
-
}
|
|
65
|
-
}), xe = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, be = {
|
|
66
|
-
key: 1,
|
|
67
|
-
class: "flex flex-1 items-center justify-center"
|
|
68
|
-
}, we = {
|
|
69
|
-
key: 2,
|
|
70
|
-
class: "space-y-24"
|
|
71
|
-
}, ke = {
|
|
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
|
-
}, Fe = { class: "fm-typo-en-body-lg-400 text-fm-color-typo-primary" }, Se = { class: "space-y-12" }, Ae = { class: "fm-typo-en-body-lg-600" }, Ce = { class: "flex items-center gap-24 rounded-[12px] border border-fm-color-neutral-gray-100 p-24 xs:flex-wrap" }, De = { class: "flex h-48 w-48 shrink-0 items-center justify-center rounded-[12px] bg-fm-color-neutral-gray-100" }, Be = { class: "min-w-0 flex-1" }, Ue = { class: "flex items-center gap-8" }, $e = ["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
|
-
}, Me = {
|
|
83
|
-
key: 0,
|
|
84
|
-
class: "fm-typo-en-body-md-400 pt-[6px] text-fm-color-typo-secondary"
|
|
85
|
-
}, ze = { class: "flex flex-wrap items-center gap-[10px] rounded-[12px] bg-fm-color-neutral-gray-100 px-16 py-[14px]" }, Ve = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, je = 4, He = /* @__PURE__ */ j({
|
|
86
|
-
__name: "MyPosProfile",
|
|
87
|
-
setup(T) {
|
|
88
|
-
const { t: e, locale: P } = R(), y = Z(), x = oe(), b = te(), { breakpoints: A } = se(), i = u(null), _ = u(!0), n = u(!1), g = u(!1), p = u(!1), S = u(), d = u(Date.now()), C = setInterval(() => d.value = Date.now(), 3e4);
|
|
89
|
-
Q(() => clearInterval(C));
|
|
90
|
-
const w = v(() => {
|
|
91
|
-
var o;
|
|
92
|
-
return ((o = i.value) == null ? void 0 : o.profile) ?? null;
|
|
93
|
-
}), N = v(() => w.value ? re(w.value) : []), I = v(
|
|
94
|
-
() => {
|
|
95
|
-
var o;
|
|
96
|
-
return ce(
|
|
97
|
-
((o = w.value) == null ? void 0 : o.passcodeUpdatedAt) ?? null,
|
|
98
|
-
e,
|
|
99
|
-
String(P.value),
|
|
100
|
-
d.value
|
|
101
|
-
);
|
|
102
|
-
}
|
|
103
|
-
), k = v(() => {
|
|
104
|
-
var o;
|
|
105
|
-
return n.value ? (o = w.value) == null ? void 0 : o.passcode : null;
|
|
106
|
-
}), O = v(
|
|
107
|
-
() => k.value ? k.value.split("") : Array.from({ length: je }, () => null)
|
|
108
|
-
), G = [
|
|
109
|
-
{
|
|
110
|
-
id: "name",
|
|
111
|
-
header: () => e("myPosProfile.table.columns.name"),
|
|
112
|
-
enableSorting: !1,
|
|
113
|
-
cell: (o) => {
|
|
114
|
-
const f = o.row.original.name;
|
|
115
|
-
return f ? U("div", { class: "flex items-center gap-8" }, [
|
|
116
|
-
U(ae.FmAvatar, { name: f, size: "sm", class: "shrink-0" }),
|
|
117
|
-
U("span", { class: "truncate" }, f)
|
|
118
|
-
]) : "";
|
|
119
|
-
}
|
|
120
|
-
},
|
|
121
|
-
{
|
|
122
|
-
id: "contact",
|
|
123
|
-
header: () => e("myPosProfile.table.columns.contact"),
|
|
124
|
-
enableSorting: !1,
|
|
125
|
-
cell: (o) => o.row.original.contact ?? ""
|
|
126
|
-
},
|
|
127
|
-
{
|
|
128
|
-
id: "restaurant",
|
|
129
|
-
header: () => e("myPosProfile.table.columns.restaurant"),
|
|
130
|
-
enableSorting: !1,
|
|
131
|
-
cell: (o) => o.row.original.restaurant
|
|
132
|
-
},
|
|
133
|
-
{
|
|
134
|
-
id: "role",
|
|
135
|
-
header: () => e("myPosProfile.table.columns.role"),
|
|
136
|
-
enableSorting: !1,
|
|
137
|
-
cell: (o) => o.row.original.role
|
|
138
|
-
}
|
|
139
|
-
];
|
|
140
|
-
function D(o) {
|
|
141
|
-
x.open({ type: "error", title: o, position: le.BOTTOM });
|
|
142
|
-
}
|
|
143
|
-
async function H() {
|
|
144
|
-
_.value = !0, p.value = !1, n.value = !1;
|
|
145
|
-
try {
|
|
146
|
-
i.value = await de();
|
|
147
|
-
} catch (o) {
|
|
148
|
-
i.value = null, V(o) ? p.value = !0 : D(e("myPosProfile.loadFailed"));
|
|
149
|
-
} finally {
|
|
150
|
-
_.value = !1;
|
|
151
|
-
}
|
|
152
|
-
}
|
|
153
|
-
X(
|
|
154
|
-
y.currentBusiness,
|
|
155
|
-
(o) => {
|
|
156
|
-
o && H();
|
|
157
|
-
},
|
|
158
|
-
{ immediate: !0 }
|
|
159
|
-
);
|
|
160
|
-
function K() {
|
|
161
|
-
n.value = !n.value;
|
|
162
|
-
}
|
|
163
|
-
function W() {
|
|
164
|
-
b.open({
|
|
165
|
-
title: e("myPosProfile.change.title"),
|
|
166
|
-
message: e("myPosProfile.change.message"),
|
|
167
|
-
minWidth: A.value.lg ? 598 : 0,
|
|
168
|
-
primaryActions: {
|
|
169
|
-
text: e("common.confirm"),
|
|
170
|
-
close: !1,
|
|
171
|
-
isLoading: g
|
|
172
|
-
},
|
|
173
|
-
secondaryActions: { text: e("common.cancel"), close: !0 }
|
|
174
|
-
}).onPrimary(async () => {
|
|
175
|
-
var o, f;
|
|
176
|
-
if (!g.value) {
|
|
177
|
-
g.value = !0;
|
|
178
|
-
try {
|
|
179
|
-
const { passcode: m, passcodeUpdatedAt: B } = await me();
|
|
180
|
-
n.value = !1, (o = i.value) != null && o.profile && (i.value.profile.passcode = m, i.value.profile.passcodeUpdatedAt = B), d.value = Date.now(), b.close(), (f = S.value) == null || f.open(m);
|
|
181
|
-
} catch (m) {
|
|
182
|
-
b.close(), V(m) ? p.value = !0 : D(e(ue(m)));
|
|
183
|
-
} finally {
|
|
184
|
-
g.value = !1;
|
|
185
|
-
}
|
|
186
|
-
}
|
|
187
|
-
});
|
|
188
|
-
}
|
|
189
|
-
function q() {
|
|
190
|
-
pe(ee) || D(e("myPosProfile.manageAccount.failed"));
|
|
191
|
-
}
|
|
192
|
-
return (o, f) => {
|
|
193
|
-
const m = h("FmIcon"), B = h("FmTable"), M = h("FmButton");
|
|
194
|
-
return a(), $(ne, {
|
|
195
|
-
heading: s(e)("myPosProfile.title")
|
|
196
|
-
}, {
|
|
197
|
-
"sub-heading": F(() => [
|
|
198
|
-
t("p", xe, c(s(e)("myPosProfile.subtitle")), 1)
|
|
199
|
-
]),
|
|
200
|
-
default: F(() => [
|
|
201
|
-
_.value ? (a(), $(ie, { key: 0 })) : !w.value && !p.value ? (a(), l("div", be, [
|
|
202
|
-
r(s(fe), {
|
|
203
|
-
title: s(e)("myPosProfile.noPosUser.title"),
|
|
204
|
-
subtitle: s(e)("myPosProfile.noPosUser.description")
|
|
205
|
-
}, null, 8, ["title", "subtitle"])
|
|
206
|
-
])) : (a(), l("div", we, [
|
|
207
|
-
p.value ? (a(), l("div", ke, [
|
|
208
|
-
r(m, {
|
|
209
|
-
name: "warning",
|
|
210
|
-
size: "sm",
|
|
211
|
-
outline: "",
|
|
212
|
-
color: "typo-warning"
|
|
213
|
-
}),
|
|
214
|
-
t("span", Fe, c(s(e)("myPosProfile.shared.message")), 1)
|
|
215
|
-
])) : (a(), l(E, { key: 1 }, [
|
|
216
|
-
r(B, {
|
|
217
|
-
"column-defs": G,
|
|
218
|
-
"row-data": N.value,
|
|
219
|
-
"page-size": 100,
|
|
220
|
-
"hide-footer": ""
|
|
221
|
-
}, null, 8, ["row-data"]),
|
|
222
|
-
t("section", Se, [
|
|
223
|
-
t("p", Ae, c(s(e)("myPosProfile.passcode.title")), 1),
|
|
224
|
-
t("div", Ce, [
|
|
225
|
-
t("div", De, [
|
|
226
|
-
r(m, {
|
|
227
|
-
name: "lock",
|
|
228
|
-
outline: ""
|
|
229
|
-
})
|
|
230
|
-
]),
|
|
231
|
-
t("div", Be, [
|
|
232
|
-
t("div", Ue, [
|
|
233
|
-
t("div", {
|
|
234
|
-
class: "flex h-24 items-center gap-[10px]",
|
|
235
|
-
"data-testid": "passcode",
|
|
236
|
-
"aria-label": k.value ? void 0 : s(e)("myPosProfile.passcode.title")
|
|
237
|
-
}, [
|
|
238
|
-
(a(!0), l(E, null, L(O.value, (z, J) => (a(), l("span", {
|
|
239
|
-
key: J,
|
|
240
|
-
class: "flex w-[20px] items-center justify-center"
|
|
241
|
-
}, [
|
|
242
|
-
z === null ? (a(), l("span", Ee)) : (a(), l("span", Ie, c(z), 1))
|
|
243
|
-
]))), 128))
|
|
244
|
-
], 8, $e),
|
|
245
|
-
r(M, {
|
|
246
|
-
variant: "tertiary",
|
|
247
|
-
"prepend-icon": k.value ? "visibility_off" : "visibility",
|
|
248
|
-
"aria-label": k.value ? s(e)("myPosProfile.passcode.hide") : s(e)("myPosProfile.passcode.show"),
|
|
249
|
-
onClick: K
|
|
250
|
-
}, null, 8, ["prepend-icon", "aria-label"])
|
|
251
|
-
]),
|
|
252
|
-
I.value ? (a(), l("p", Me, c(I.value), 1)) : Y("", !0)
|
|
253
|
-
]),
|
|
254
|
-
r(M, {
|
|
255
|
-
variant: "secondary",
|
|
256
|
-
size: "md",
|
|
257
|
-
label: s(e)("myPosProfile.passcode.change"),
|
|
258
|
-
onClick: W
|
|
259
|
-
}, null, 8, ["label"])
|
|
260
|
-
])
|
|
261
|
-
])
|
|
262
|
-
], 64)),
|
|
263
|
-
t("div", ze, [
|
|
264
|
-
r(m, {
|
|
265
|
-
name: "info",
|
|
266
|
-
size: "sm",
|
|
267
|
-
outline: "",
|
|
268
|
-
color: "typo-secondary"
|
|
269
|
-
}),
|
|
270
|
-
t("span", Ve, c(s(e)("myPosProfile.manageAccount.message")), 1),
|
|
271
|
-
t("button", {
|
|
272
|
-
type: "button",
|
|
273
|
-
class: "fm-typo-en-body-md-600 text-fm-color-system-info-300",
|
|
274
|
-
onClick: q
|
|
275
|
-
}, c(s(e)("myPosProfile.manageAccount.link")), 1)
|
|
276
|
-
])
|
|
277
|
-
])),
|
|
278
|
-
r(Pe, {
|
|
279
|
-
ref_key: "changedDialogRef",
|
|
280
|
-
ref: S
|
|
281
|
-
}, null, 512)
|
|
282
|
-
]),
|
|
283
|
-
_: 1
|
|
284
|
-
}, 8, ["heading"]);
|
|
285
|
-
};
|
|
286
|
-
}
|
|
287
|
-
});
|
|
288
|
-
export {
|
|
289
|
-
He as default
|
|
290
|
-
};
|