@feedmepos/mf-hrm-portal 2.4.2-dev.2 → 2.4.2
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-b8usXKo8.js → ApprovalCodeList-DGLPcQcv.js} +15 -14
- package/dist/{AuditLogList-DqbgzFAs.js → AuditLogList-ahJwTF7N.js} +12 -12
- package/dist/ConditionBuilderForm.vue_vue_type_script_setup_true_lang-IPkyxwIF.js +438 -0
- package/dist/EmployeeList-B18mlY4V.js +776 -0
- package/dist/FormItem.vue_vue_type_script_setup_true_lang-Dvo9AiKf.js +45 -0
- package/dist/FormSection.vue_vue_type_script_setup_true_lang-DknXTYiK.js +49 -0
- package/dist/{GrantUserList-B-p8Qghu.js → GrantUserList-C8BbP99C.js} +16 -15
- package/dist/{Main-D_EXStcl.js → Main-BA29_N_p.js} +2280 -2274
- package/dist/{Main-x6An4Vlq.js → Main-BN3b_yie.js} +5 -5
- package/dist/Main-Clux_qKN.js +96 -0
- package/dist/PasscodePinField.vue_vue_type_script_setup_true_lang-CqG0v0Sz.js +243 -0
- package/dist/{PermissionSetList-D4Vdbk10.js → PermissionSetList-BSOJ8ftd.js} +108 -107
- package/dist/PortalPermissionEditor.vue_vue_type_script_setup_true_lang-Hz_rFmbH.js +4181 -0
- package/dist/PortalUserSearcher.vue_vue_type_style_index_0_scoped_827dfd60_lang-BwuBk683.js +35 -0
- package/dist/RoleList-EnfxydGa.js +740 -0
- package/dist/{ScheduleAddPositionModal.vue_vue_type_script_setup_true_lang-DiWJzXvb.js → ScheduleAddPositionModal.vue_vue_type_script_setup_true_lang-yIdd8r7y.js} +1 -1
- package/dist/{ScheduleGeneralPage-O7ohVH-K.js → ScheduleGeneralPage-CFUqm5-r.js} +2 -2
- package/dist/{ScheduleModal.vue_vue_type_script_setup_true_lang-DOkdX3vt.js → ScheduleModal.vue_vue_type_script_setup_true_lang-BmPrGRG2.js} +186 -187
- package/dist/{SchedulePage-WT_Ttars.js → SchedulePage-DEFQwipO.js} +16 -16
- package/dist/{SchedulePositionPage-13qwxMn2.js → SchedulePositionPage-CM5NS5-F.js} +3 -3
- package/dist/{SelectFilter-DbE6YV-6.js → SelectFilter-DgjR5o5E.js} +1 -1
- package/dist/TeamMemberList-BKvhHLNG.js +1150 -0
- package/dist/TimesheetList-EQRMimP7.js +402 -0
- package/dist/{TimesheetList.vue_vue_type_style_index_0_scoped_ffd7f807_lang-_tXql6vR.js → TimesheetList.vue_vue_type_style_index_0_scoped_63294af2_lang-BumkwWvb.js} +7 -7
- package/dist/{app-D-6Rxcbg.js → app-Bkc0pF3P.js} +3929 -7722
- package/dist/app.js +3 -3
- package/dist/{approval-code-Ba9JpPf4.js → approval-code-BKMu1GDn.js} +1 -1
- package/dist/{dayjs.min-dCnie4oC.js → dayjs.min-CkI2q2aC.js} +24 -24
- package/dist/employee-BfkxCdPL.js +209 -0
- package/dist/{grant-user-Dpla60s_.js → grant-user-ClN_vTOv.js} +1 -1
- package/dist/{index-D8G0ElDc.js → iteration-CsNIceUp.js} +558 -573
- package/dist/{lodash-CucBZWOa.js → lodash-BgraJgCc.js} +1 -1
- package/dist/restaurant-CRNgiIa4.js +2685 -0
- package/dist/role-CZYSdVn2.js +91 -0
- package/dist/rule-_4roLZrG.js +780 -0
- package/dist/src/components/CollapsibleWrapper.vue.d.ts +3 -11
- package/dist/src/helpers/iteration.d.ts +2 -9
- package/dist/src/helpers/permission-set.d.ts +102 -1
- package/dist/src/helpers/rule.d.ts +2 -2
- package/dist/src/helpers/string.d.ts +1 -10
- package/dist/src/router/shared.d.ts +1 -3
- package/dist/src/stores/restaurant.d.ts +7 -7
- package/dist/src/stores/team.d.ts +0 -30
- package/dist/src/types/team.d.ts +1 -17
- package/dist/src/views/audit-log/locales/index.d.ts +0 -12
- package/dist/src/views/hr/locales/index.d.ts +0 -20
- package/dist/src/views/hr/role/RoleForm.vue.d.ts +2 -29
- package/dist/src/views/scheduling/composables/useScheduleOnboardingAvailability.d.ts +1 -1
- package/dist/src/views/scheduling/composables/useScheduleOnboardingWizard.d.ts +1 -1
- package/dist/src/views/scheduling/composables/useScheduleShiftDraft.d.ts +1 -1
- package/dist/src/views/scheduling/composables/useScheduleShiftPopover.d.ts +1 -1
- package/dist/src/views/team/components/BasePermission.vue.d.ts +0 -11
- package/dist/src/views/team/components/ConditionPermission.vue.d.ts +0 -11
- package/dist/src/views/team/components/PortalPermissionEditor.vue.d.ts +0 -21
- package/dist/src/views/team/components/PosRolePermission.vue.d.ts +0 -11
- package/dist/src/views/team/locales/index.d.ts +0 -716
- package/dist/src/views/team/member/AddMemberForm.vue.d.ts +3 -48
- package/dist/src/views/team/{components/MemberStatusBadge.vue.d.ts → member/MemberInfo.vue.d.ts} +2 -2
- package/dist/src/views/team/member/TeamMemberList.vue.d.ts +0 -1
- package/dist/string-VNuQNweN.js +15 -0
- package/dist/style.css +1 -1
- package/dist/tsconfig.app.tsbuildinfo +1 -1
- package/dist/{useAppStore-C_LStOtj.js → useAppStore-DYmF1kgk.js} +1 -1
- package/dist/{useLoading-CJ-DUrnR.js → useLoading-C2UKuAxD.js} +1 -1
- package/dist/{useReportPermissions-C7TLMKuR.js → useReportPermissions-BiaXRc0p.js} +22 -22
- package/package.json +1 -1
- package/dist/ConditionBuilderForm.vue_vue_type_script_setup_true_lang-WeFI9muF.js +0 -459
- package/dist/EmployeeList-NM0guUbU.js +0 -896
- package/dist/FormSection.vue_vue_type_script_setup_true_lang-BCNKeDZY.js +0 -90
- package/dist/Main-BrhCJsik.js +0 -101
- package/dist/MyPosProfile-CG1PZ5p4.js +0 -360
- package/dist/PasscodePinField.vue_vue_type_script_setup_true_lang-TXPEqa46.js +0 -126
- package/dist/PortalPermissionEditor.vue_vue_type_script_setup_true_lang-CFyGZpKr.js +0 -4212
- package/dist/PortalUserSearcher.vue_vue_type_style_index_0_scoped_827dfd60_lang-CTxqUf16.js +0 -1797
- package/dist/RoleForm.vue_vue_type_script_setup_true_lang-DUhqZaQv.js +0 -547
- package/dist/RoleList-DFcy90mE.js +0 -274
- package/dist/TeamMemberList-CWfXQcO3.js +0 -2082
- package/dist/TimesheetList-Bp2hRf7V.js +0 -408
- package/dist/employee-B5qCkaCi.js +0 -237
- package/dist/member-grant-CZILo1nC.js +0 -54
- package/dist/restaurant-CD6RZ8XG.js +0 -49
- package/dist/role-54DbS-Cy.js +0 -91
- package/dist/rule-DzTp1Kjh.js +0 -845
- package/dist/src/api/my-pos-profile/index.d.ts +0 -3
- package/dist/src/api/sso-provider/index.d.ts +0 -5
- package/dist/src/api/staff-invite/index.d.ts +0 -16
- package/dist/src/components/form/SegmentedTabs.vue.d.ts +0 -23
- package/dist/src/composables/useMenuAccess.d.ts +0 -56
- package/dist/src/composables/useSsoProviders.d.ts +0 -19
- package/dist/src/composables/useStaffInviteProviders.d.ts +0 -8
- package/dist/src/helpers/employee-merge.d.ts +0 -33
- package/dist/src/helpers/member-grant.d.ts +0 -36
- package/dist/src/helpers/my-pos-profile.d.ts +0 -37
- package/dist/src/helpers/pos-assignment-rows.d.ts +0 -28
- package/dist/src/helpers/restaurant-lookup.d.ts +0 -19
- package/dist/src/helpers/role-merge.d.ts +0 -11
- package/dist/src/helpers/staff-invite.d.ts +0 -54
- package/dist/src/router/menu-access-guard.d.ts +0 -17
- package/dist/src/types/my-pos-profile.d.ts +0 -24
- package/dist/src/types/sso-provider.d.ts +0 -10
- package/dist/src/types/staff-invite.d.ts +0 -100
- package/dist/src/views/hr/timesheet/timesheet-view.d.ts +0 -29
- package/dist/src/views/my-pos-profile/MyPosProfile.vue.d.ts +0 -2
- package/dist/src/views/my-pos-profile/components/PasscodeChangedDialog.vue.d.ts +0 -4
- package/dist/src/views/my-pos-profile/locales/index.d.ts +0 -236
- package/dist/src/views/team/components/MemberGrantFields.vue.d.ts +0 -51
- package/dist/src/views/team/components/PosAssignmentRows.vue.d.ts +0 -44
- package/dist/src/views/team/member/ExistingMemberNotice.vue.d.ts +0 -11
- package/dist/src/views/team/member/MemberDetailsCard.vue.d.ts +0 -35
- package/dist/src/views/team/member/MemberHeaderCard.vue.d.ts +0 -19
- package/dist/string-DZQ1uNjn.js +0 -22
- package/dist/useSsoProviders-DhmUc7LW.js +0 -41
|
@@ -1,90 +0,0 @@
|
|
|
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-D-6Rxcbg.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
|
-
};
|
package/dist/Main-BrhCJsik.js
DELETED
|
@@ -1,101 +0,0 @@
|
|
|
1
|
-
import { defineComponent as g, ref as R, computed as i, watch as A, resolveComponent as c, createBlock as p, openBlock as d, withCtx as u, createElementVNode as h, createVNode as v, resolveDynamicComponent as k, createCommentVNode as F, createTextVNode as N, toDisplayString as w } from "vue";
|
|
2
|
-
import { useRouter as x, useRoute as I } from "vue-router";
|
|
3
|
-
import { useI18n as O, useCoreStore as $ } from "@feedmepos/mf-common";
|
|
4
|
-
import { _ as q } from "./ResponsiveFabButton.vue_vue_type_script_setup_true_lang-QrqYEy8i.js";
|
|
5
|
-
import { _ as D } from "./PageLayout.vue_vue_type_script_setup_true_lang-HKK4cbW8.js";
|
|
6
|
-
import { u as P } from "./PortalUserSearcher.vue_vue_type_style_index_0_scoped_827dfd60_lang-CTxqUf16.js";
|
|
7
|
-
import { u as U } from "./restaurant-CD6RZ8XG.js";
|
|
8
|
-
import "@feedmepos/ui-library";
|
|
9
|
-
import "./rule-DzTp1Kjh.js";
|
|
10
|
-
import "./lodash-CucBZWOa.js";
|
|
11
|
-
import "./index-D8G0ElDc.js";
|
|
12
|
-
import { u as j, R as B } from "./app-D-6Rxcbg.js";
|
|
13
|
-
import "./useAppStore-C_LStOtj.js";
|
|
14
|
-
import "./member-grant-CZILo1nC.js";
|
|
15
|
-
import "./role-54DbS-Cy.js";
|
|
16
|
-
/* empty css */
|
|
17
|
-
import "./useReportPermissions-C7TLMKuR.js";
|
|
18
|
-
const z = { class: "space-y-24" }, me = /* @__PURE__ */ g({
|
|
19
|
-
__name: "Main",
|
|
20
|
-
setup(G) {
|
|
21
|
-
const { t: o } = O(), b = x(), T = I(), S = $(), { readRestaurants: V } = U(), { loadProviders: C } = P(), { isFoodCourt: L } = j(), 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] === T.name) ?? "member",
|
|
26
|
-
set: (e) => {
|
|
27
|
-
b.push({
|
|
28
|
-
name: s[e],
|
|
29
|
-
query: b.currentRoute.value.query
|
|
30
|
-
});
|
|
31
|
-
}
|
|
32
|
-
});
|
|
33
|
-
L.value || V(), A(S.currentBusiness, () => C(), { 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"), E = c("FmTabs"), M = c("RouterView");
|
|
57
|
-
return d(), p(D, {
|
|
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(q, {
|
|
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"])) : F("", !0)
|
|
73
|
-
];
|
|
74
|
-
}),
|
|
75
|
-
default: u(() => [
|
|
76
|
-
h("div", z, [
|
|
77
|
-
v(E, {
|
|
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(M, null, {
|
|
83
|
-
default: u(({ Component: t }) => [
|
|
84
|
-
(d(), p(k(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
|
-
me as default
|
|
101
|
-
};
|
|
@@ -1,360 +0,0 @@
|
|
|
1
|
-
import { defineComponent as G, ref as i, computed as y, resolveComponent as x, createBlock as F, openBlock as t, unref as a, withCtx as D, createElementVNode as s, createElementBlock as n, Fragment as z, renderList as j, toDisplayString as l, createVNode as m, onUnmounted as te, watch as ae, createCommentVNode as O, normalizeClass as le, createTextVNode as ne, h as T } from "vue";
|
|
2
|
-
import { useI18n as K, useCoreStore as re, FeedMeAuth as ce } from "@feedmepos/mf-common";
|
|
3
|
-
import { useBreakpoints as W, useSnackbar as ie, useDialog as de, components as me, SnackbarPosition as pe } from "@feedmepos/ui-library";
|
|
4
|
-
import { _ as ue } from "./PageLayout.vue_vue_type_script_setup_true_lang-HKK4cbW8.js";
|
|
5
|
-
import { t as fe, f as ye, c as _e, r as ve, i as H, d as ge, p as xe, o as he } from "./app-D-6Rxcbg.js";
|
|
6
|
-
import { _ as Pe } from "./index.vue_vue_type_script_setup_true_lang-BVVwfd7B.js";
|
|
7
|
-
const be = { class: "flex w-full flex-col items-center gap-8 pt-[4px]" }, ke = { class: "fm-typo-en-title-sm-600 text-center" }, we = { class: "py-[4px]" }, Fe = {
|
|
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
|
-
}, Ae = { class: "fm-typo-en-body-md-400 pt-16 text-center text-fm-color-typo-primary" }, Ce = /* @__PURE__ */ G({
|
|
11
|
-
__name: "PasscodeChangedDialog",
|
|
12
|
-
setup(q, { expose: e }) {
|
|
13
|
-
const { t: A } = K(), { breakpoints: U } = W(), h = i(!1), _ = i(""), P = i("changed"), p = y(() => _.value.split("")), C = (f, c = "changed") => {
|
|
14
|
-
_.value = f, P.value = c, h.value = !0;
|
|
15
|
-
}, u = () => {
|
|
16
|
-
h.value = !1, _.value = "";
|
|
17
|
-
};
|
|
18
|
-
return e({ open: C }), (f, c) => {
|
|
19
|
-
const B = x("FmIcon"), S = x("FmButton"), I = x("FmDialog");
|
|
20
|
-
return t(), F(I, {
|
|
21
|
-
modelValue: h.value,
|
|
22
|
-
"onUpdate:modelValue": [
|
|
23
|
-
c[0] || (c[0] = (r) => h.value = r),
|
|
24
|
-
c[1] || (c[1] = (r) => !r && u())
|
|
25
|
-
],
|
|
26
|
-
"min-width": a(U).xs ? 0 : 360,
|
|
27
|
-
"max-width": 460,
|
|
28
|
-
"close-button": !1,
|
|
29
|
-
"dismiss-away": !1
|
|
30
|
-
}, {
|
|
31
|
-
"dialog-header": D(() => [
|
|
32
|
-
s("div", be, [
|
|
33
|
-
m(B, {
|
|
34
|
-
name: "check_circle",
|
|
35
|
-
size: "xl",
|
|
36
|
-
outline: "",
|
|
37
|
-
color: "typo-success"
|
|
38
|
-
}),
|
|
39
|
-
s("p", ke, l(a(A)(`myPosProfile.${P.value}.title`)), 1)
|
|
40
|
-
])
|
|
41
|
-
]),
|
|
42
|
-
"dialog-footer": D(() => [
|
|
43
|
-
m(S, {
|
|
44
|
-
class: "w-full",
|
|
45
|
-
variant: "primary",
|
|
46
|
-
label: a(A)("myPosProfile.changed.done"),
|
|
47
|
-
onClick: u
|
|
48
|
-
}, null, 8, ["label"])
|
|
49
|
-
]),
|
|
50
|
-
default: D(() => [
|
|
51
|
-
s("div", we, [
|
|
52
|
-
s("div", Fe, [
|
|
53
|
-
(t(!0), n(z, null, j(p.value, (r, b) => (t(), n("span", {
|
|
54
|
-
key: b,
|
|
55
|
-
class: "flex h-[56px] w-[52px] items-center justify-center text-[48px] font-bold leading-[56px] text-fm-color-typo-primary"
|
|
56
|
-
}, l(r), 1))), 128))
|
|
57
|
-
]),
|
|
58
|
-
s("p", Ae, l(a(A)(`myPosProfile.${P.value}.message`)), 1)
|
|
59
|
-
])
|
|
60
|
-
]),
|
|
61
|
-
_: 1
|
|
62
|
-
}, 8, ["modelValue", "min-width"]);
|
|
63
|
-
};
|
|
64
|
-
}
|
|
65
|
-
}), Se = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, $e = {
|
|
66
|
-
key: 1,
|
|
67
|
-
class: "flex flex-1 items-center justify-center xs:p-16"
|
|
68
|
-
}, De = {
|
|
69
|
-
key: 2,
|
|
70
|
-
class: "space-y-24 xs:min-h-0 xs:flex-1 xs:overflow-y-auto xs:p-16"
|
|
71
|
-
}, Be = {
|
|
72
|
-
key: 0,
|
|
73
|
-
role: "alert",
|
|
74
|
-
"data-testid": "pos-user-shared",
|
|
75
|
-
class: "flex items-start gap-[10px] rounded-[12px] bg-fm-color-system-warning-100 px-16 py-[14px]"
|
|
76
|
-
}, ze = { class: "fm-typo-en-body-lg-400 min-w-0 flex-1 text-fm-color-typo-primary" }, Ue = {
|
|
77
|
-
key: 0,
|
|
78
|
-
"data-testid": "profile-card",
|
|
79
|
-
class: "rounded-[12px] border border-fm-color-neutral-gray-100"
|
|
80
|
-
}, Ie = { class: "flex items-center gap-12 p-16" }, Me = { class: "min-w-0 flex-1" }, Ee = { class: "fm-typo-en-body-lg-600 truncate" }, Ve = {
|
|
81
|
-
key: 0,
|
|
82
|
-
class: "fm-typo-en-body-md-400 truncate text-fm-color-typo-secondary"
|
|
83
|
-
}, Te = { class: "fm-typo-en-body-md-400 text-fm-color-typo-secondary" }, je = { class: "fm-typo-en-body-lg-400 break-words" }, Le = { class: "fm-typo-en-body-md-400 pt-8 text-fm-color-typo-secondary" }, Ne = { class: "fm-typo-en-body-lg-400 break-words" }, Re = { class: "space-y-12" }, Oe = { class: "fm-typo-en-body-lg-600" }, He = { class: "flex min-w-0 flex-1 items-center gap-16" }, Ge = { class: "flex h-48 w-48 shrink-0 items-center justify-center rounded-[12px] bg-fm-color-neutral-gray-100" }, Ke = {
|
|
84
|
-
key: 0,
|
|
85
|
-
class: "min-w-0 flex-1",
|
|
86
|
-
"data-testid": "no-passcode"
|
|
87
|
-
}, We = { class: "fm-typo-en-body-lg-600 text-fm-color-typo-primary" }, qe = { class: "fm-typo-en-body-md-400 pt-[2px] text-fm-color-typo-secondary" }, Je = {
|
|
88
|
-
key: 1,
|
|
89
|
-
class: "min-w-0 flex-1"
|
|
90
|
-
}, Qe = { class: "flex items-center gap-8" }, Xe = ["aria-label"], Ye = {
|
|
91
|
-
key: 0,
|
|
92
|
-
class: "h-[14px] w-[14px] rounded-full bg-fm-color-typo-primary"
|
|
93
|
-
}, Ze = {
|
|
94
|
-
key: 1,
|
|
95
|
-
class: "fm-typo-en-title-sm-600 text-fm-color-typo-primary"
|
|
96
|
-
}, eo = {
|
|
97
|
-
key: 0,
|
|
98
|
-
class: "fm-typo-en-body-md-400 pt-[6px] text-fm-color-typo-secondary"
|
|
99
|
-
}, oo = { class: "flex items-start gap-[10px] rounded-[12px] bg-fm-color-neutral-gray-100 px-16 py-[14px]" }, so = { class: "fm-typo-en-body-md-400 min-w-0 flex-1 text-fm-color-typo-secondary" }, to = 4, mo = /* @__PURE__ */ G({
|
|
100
|
-
__name: "MyPosProfile",
|
|
101
|
-
setup(q) {
|
|
102
|
-
const { t: e, locale: A } = K(), U = re(), h = ie(), _ = de(), { breakpoints: P } = W(), p = i(null), C = i(!0), u = i(!1), f = i(!1), c = i(!1), B = i(), S = i(Date.now()), I = setInterval(() => S.value = Date.now(), 3e4);
|
|
103
|
-
te(() => clearInterval(I));
|
|
104
|
-
const r = y(() => {
|
|
105
|
-
var o;
|
|
106
|
-
return ((o = p.value) == null ? void 0 : o.profile) ?? null;
|
|
107
|
-
}), b = y(() => r.value ? fe(r.value) : []), L = y(
|
|
108
|
-
() => {
|
|
109
|
-
var o;
|
|
110
|
-
return ye(
|
|
111
|
-
((o = r.value) == null ? void 0 : o.passcodeUpdatedAt) ?? null,
|
|
112
|
-
e,
|
|
113
|
-
String(A.value),
|
|
114
|
-
S.value
|
|
115
|
-
);
|
|
116
|
-
}
|
|
117
|
-
), M = y(() => {
|
|
118
|
-
var o;
|
|
119
|
-
return !!((o = r.value) != null && o.passcode);
|
|
120
|
-
}), J = y(() => P.value.xs), $ = y(() => {
|
|
121
|
-
var o;
|
|
122
|
-
return u.value ? (o = r.value) == null ? void 0 : o.passcode : null;
|
|
123
|
-
}), Q = y(
|
|
124
|
-
() => $.value ? $.value.split("") : Array.from({ length: to }, () => null)
|
|
125
|
-
), X = [
|
|
126
|
-
{
|
|
127
|
-
id: "name",
|
|
128
|
-
header: () => e("myPosProfile.table.columns.name"),
|
|
129
|
-
enableSorting: !1,
|
|
130
|
-
cell: (o) => {
|
|
131
|
-
const d = o.row.original.name;
|
|
132
|
-
return d ? T("div", { class: "flex items-center gap-8" }, [
|
|
133
|
-
T(me.FmAvatar, { name: d, size: "sm", class: "shrink-0" }),
|
|
134
|
-
T("span", { class: "truncate" }, d)
|
|
135
|
-
]) : "";
|
|
136
|
-
}
|
|
137
|
-
},
|
|
138
|
-
{
|
|
139
|
-
id: "contact",
|
|
140
|
-
header: () => e("myPosProfile.table.columns.contact"),
|
|
141
|
-
enableSorting: !1,
|
|
142
|
-
cell: (o) => o.row.original.contact ?? ""
|
|
143
|
-
},
|
|
144
|
-
{
|
|
145
|
-
id: "restaurant",
|
|
146
|
-
header: () => e("myPosProfile.table.columns.restaurant"),
|
|
147
|
-
enableSorting: !1,
|
|
148
|
-
cell: (o) => o.row.original.restaurant
|
|
149
|
-
},
|
|
150
|
-
{
|
|
151
|
-
id: "role",
|
|
152
|
-
header: () => e("myPosProfile.table.columns.role"),
|
|
153
|
-
enableSorting: !1,
|
|
154
|
-
cell: (o) => o.row.original.role
|
|
155
|
-
}
|
|
156
|
-
];
|
|
157
|
-
function E(o) {
|
|
158
|
-
h.open({ type: "error", title: o, position: pe.BOTTOM });
|
|
159
|
-
}
|
|
160
|
-
async function Y() {
|
|
161
|
-
C.value = !0, c.value = !1, u.value = !1;
|
|
162
|
-
try {
|
|
163
|
-
p.value = await ve();
|
|
164
|
-
} catch (o) {
|
|
165
|
-
p.value = null, H(o) ? c.value = !0 : E(e("myPosProfile.loadFailed"));
|
|
166
|
-
} finally {
|
|
167
|
-
C.value = !1;
|
|
168
|
-
}
|
|
169
|
-
}
|
|
170
|
-
ae(
|
|
171
|
-
U.currentBusiness,
|
|
172
|
-
(o) => {
|
|
173
|
-
o && Y();
|
|
174
|
-
},
|
|
175
|
-
{ immediate: !0 }
|
|
176
|
-
);
|
|
177
|
-
function Z() {
|
|
178
|
-
u.value = !u.value;
|
|
179
|
-
}
|
|
180
|
-
async function N(o) {
|
|
181
|
-
var d, k;
|
|
182
|
-
if (!f.value) {
|
|
183
|
-
f.value = !0;
|
|
184
|
-
try {
|
|
185
|
-
const { passcode: v, passcodeUpdatedAt: w } = await ge();
|
|
186
|
-
u.value = !1, (d = p.value) != null && d.profile && (p.value.profile.passcode = v, p.value.profile.passcodeUpdatedAt = w), S.value = Date.now(), _.close(), (k = B.value) == null || k.open(v, o ? "generated" : "changed");
|
|
187
|
-
} catch (v) {
|
|
188
|
-
if (_.close(), H(v)) c.value = !0;
|
|
189
|
-
else {
|
|
190
|
-
const w = xe(v);
|
|
191
|
-
E(
|
|
192
|
-
e(o && w === "myPosProfile.change.failed" ? "myPosProfile.generate.failed" : w)
|
|
193
|
-
);
|
|
194
|
-
}
|
|
195
|
-
} finally {
|
|
196
|
-
f.value = !1;
|
|
197
|
-
}
|
|
198
|
-
}
|
|
199
|
-
}
|
|
200
|
-
function ee() {
|
|
201
|
-
_.open({
|
|
202
|
-
title: e("myPosProfile.change.title"),
|
|
203
|
-
message: e("myPosProfile.change.message"),
|
|
204
|
-
minWidth: P.value.lg ? 598 : 0,
|
|
205
|
-
primaryActions: {
|
|
206
|
-
text: e("common.confirm"),
|
|
207
|
-
close: !1,
|
|
208
|
-
isLoading: f
|
|
209
|
-
},
|
|
210
|
-
secondaryActions: { text: e("common.cancel"), close: !0 }
|
|
211
|
-
}).onPrimary(() => N(!1));
|
|
212
|
-
}
|
|
213
|
-
function oe() {
|
|
214
|
-
he(ce) || E(e("myPosProfile.manageAccount.failed"));
|
|
215
|
-
}
|
|
216
|
-
return (o, d) => {
|
|
217
|
-
const k = x("FmIcon"), v = x("FmAvatar"), w = x("FmTable"), V = x("FmButton");
|
|
218
|
-
return t(), F(ue, {
|
|
219
|
-
heading: a(e)("myPosProfile.title")
|
|
220
|
-
}, {
|
|
221
|
-
"sub-heading": D(() => [
|
|
222
|
-
s("p", Se, l(a(e)("myPosProfile.subtitle")), 1)
|
|
223
|
-
]),
|
|
224
|
-
default: D(() => {
|
|
225
|
-
var R;
|
|
226
|
-
return [
|
|
227
|
-
C.value ? (t(), F(_e, { key: 0 })) : !r.value && !c.value ? (t(), n("div", $e, [
|
|
228
|
-
m(a(Pe), {
|
|
229
|
-
title: a(e)("myPosProfile.noPosUser.title"),
|
|
230
|
-
subtitle: a(e)("myPosProfile.noPosUser.description")
|
|
231
|
-
}, null, 8, ["title", "subtitle"])
|
|
232
|
-
])) : (t(), n("div", De, [
|
|
233
|
-
c.value ? (t(), n("div", Be, [
|
|
234
|
-
m(k, {
|
|
235
|
-
name: "warning",
|
|
236
|
-
size: "sm",
|
|
237
|
-
outline: "",
|
|
238
|
-
color: "typo-warning",
|
|
239
|
-
class: "shrink-0"
|
|
240
|
-
}),
|
|
241
|
-
s("span", ze, l(a(e)("myPosProfile.shared.message")), 1)
|
|
242
|
-
])) : (t(), n(z, { key: 1 }, [
|
|
243
|
-
J.value ? (t(), n("div", Ue, [
|
|
244
|
-
s("div", Ie, [
|
|
245
|
-
m(v, {
|
|
246
|
-
name: r.value.name,
|
|
247
|
-
size: "md",
|
|
248
|
-
class: "shrink-0"
|
|
249
|
-
}, null, 8, ["name"]),
|
|
250
|
-
s("div", Me, [
|
|
251
|
-
s("p", Ee, l(r.value.name), 1),
|
|
252
|
-
(R = b.value[0]) != null && R.contact ? (t(), n("p", Ve, l(b.value[0].contact), 1)) : O("", !0)
|
|
253
|
-
])
|
|
254
|
-
]),
|
|
255
|
-
(t(!0), n(z, null, j(b.value, (g) => (t(), n("div", {
|
|
256
|
-
key: g.assignment.restaurantId,
|
|
257
|
-
class: "flex flex-col gap-[2px] border-t border-fm-color-neutral-gray-100 px-16 py-12"
|
|
258
|
-
}, [
|
|
259
|
-
s("p", Te, l(a(e)("myPosProfile.table.columns.restaurant")), 1),
|
|
260
|
-
s("p", je, l(g.restaurant), 1),
|
|
261
|
-
s("p", Le, l(a(e)("myPosProfile.table.columns.role")), 1),
|
|
262
|
-
s("p", Ne, l(g.role), 1)
|
|
263
|
-
]))), 128))
|
|
264
|
-
])) : (t(), F(w, {
|
|
265
|
-
key: 1,
|
|
266
|
-
"column-defs": X,
|
|
267
|
-
"row-data": b.value,
|
|
268
|
-
"page-size": 100,
|
|
269
|
-
"hide-footer": ""
|
|
270
|
-
}, null, 8, ["row-data"])),
|
|
271
|
-
s("section", Re, [
|
|
272
|
-
s("p", Oe, l(a(e)("myPosProfile.passcode.title")), 1),
|
|
273
|
-
s("div", {
|
|
274
|
-
class: le(["flex items-center gap-24 rounded-[12px] border border-fm-color-neutral-gray-100 p-24 xs:flex-col xs:items-stretch xs:gap-16 xs:p-16", { "bg-fm-color-system-warning-100": !M.value }])
|
|
275
|
-
}, [
|
|
276
|
-
s("div", He, [
|
|
277
|
-
s("div", Ge, [
|
|
278
|
-
m(k, {
|
|
279
|
-
name: "lock",
|
|
280
|
-
outline: ""
|
|
281
|
-
})
|
|
282
|
-
]),
|
|
283
|
-
M.value ? (t(), n("div", Je, [
|
|
284
|
-
s("div", Qe, [
|
|
285
|
-
s("div", {
|
|
286
|
-
class: "flex h-24 items-center gap-[10px]",
|
|
287
|
-
"data-testid": "passcode",
|
|
288
|
-
"aria-label": $.value ? void 0 : a(e)("myPosProfile.passcode.title")
|
|
289
|
-
}, [
|
|
290
|
-
(t(!0), n(z, null, j(Q.value, (g, se) => (t(), n("span", {
|
|
291
|
-
key: se,
|
|
292
|
-
class: "flex w-[20px] items-center justify-center"
|
|
293
|
-
}, [
|
|
294
|
-
g === null ? (t(), n("span", Ye)) : (t(), n("span", Ze, l(g), 1))
|
|
295
|
-
]))), 128))
|
|
296
|
-
], 8, Xe),
|
|
297
|
-
m(V, {
|
|
298
|
-
variant: "tertiary",
|
|
299
|
-
"prepend-icon": $.value ? "visibility_off" : "visibility",
|
|
300
|
-
"aria-label": $.value ? a(e)("myPosProfile.passcode.hide") : a(e)("myPosProfile.passcode.show"),
|
|
301
|
-
onClick: Z
|
|
302
|
-
}, null, 8, ["prepend-icon", "aria-label"])
|
|
303
|
-
]),
|
|
304
|
-
L.value ? (t(), n("p", eo, l(L.value), 1)) : O("", !0)
|
|
305
|
-
])) : (t(), n("div", Ke, [
|
|
306
|
-
s("p", We, l(a(e)("myPosProfile.passcode.empty")), 1),
|
|
307
|
-
s("p", qe, l(a(e)("myPosProfile.passcode.emptyHint")), 1)
|
|
308
|
-
]))
|
|
309
|
-
]),
|
|
310
|
-
M.value ? (t(), F(V, {
|
|
311
|
-
key: 1,
|
|
312
|
-
class: "xs:w-full",
|
|
313
|
-
variant: "secondary",
|
|
314
|
-
size: "md",
|
|
315
|
-
label: a(e)("myPosProfile.passcode.change"),
|
|
316
|
-
onClick: ee
|
|
317
|
-
}, null, 8, ["label"])) : (t(), F(V, {
|
|
318
|
-
key: 0,
|
|
319
|
-
class: "xs:w-full",
|
|
320
|
-
variant: "primary",
|
|
321
|
-
size: "md",
|
|
322
|
-
label: a(e)("myPosProfile.passcode.generate"),
|
|
323
|
-
loading: f.value,
|
|
324
|
-
onClick: d[0] || (d[0] = (g) => N(!0))
|
|
325
|
-
}, null, 8, ["label", "loading"]))
|
|
326
|
-
], 2)
|
|
327
|
-
])
|
|
328
|
-
], 64)),
|
|
329
|
-
s("div", oo, [
|
|
330
|
-
m(k, {
|
|
331
|
-
name: "info",
|
|
332
|
-
size: "sm",
|
|
333
|
-
outline: "",
|
|
334
|
-
color: "typo-secondary",
|
|
335
|
-
class: "shrink-0"
|
|
336
|
-
}),
|
|
337
|
-
s("p", so, [
|
|
338
|
-
ne(l(a(e)("myPosProfile.manageAccount.message")) + " ", 1),
|
|
339
|
-
s("button", {
|
|
340
|
-
type: "button",
|
|
341
|
-
class: "fm-typo-en-body-md-600 text-fm-color-system-info-300",
|
|
342
|
-
onClick: oe
|
|
343
|
-
}, l(a(e)("myPosProfile.manageAccount.link")), 1)
|
|
344
|
-
])
|
|
345
|
-
])
|
|
346
|
-
])),
|
|
347
|
-
m(Ce, {
|
|
348
|
-
ref_key: "changedDialogRef",
|
|
349
|
-
ref: B
|
|
350
|
-
}, null, 512)
|
|
351
|
-
];
|
|
352
|
-
}),
|
|
353
|
-
_: 1
|
|
354
|
-
}, 8, ["heading"]);
|
|
355
|
-
};
|
|
356
|
-
}
|
|
357
|
-
});
|
|
358
|
-
export {
|
|
359
|
-
mo as default
|
|
360
|
-
};
|
|
@@ -1,126 +0,0 @@
|
|
|
1
|
-
import { defineComponent as c, createElementBlock as s, openBlock as m, normalizeStyle as b, resolveComponent as u, Fragment as p, createVNode as r, createCommentVNode as g, toDisplayString as y, createElementVNode as v } from "vue";
|
|
2
|
-
const B = /* @__PURE__ */ c({
|
|
3
|
-
__name: "Skeleton",
|
|
4
|
-
props: {
|
|
5
|
-
width: { default: "160px" }
|
|
6
|
-
},
|
|
7
|
-
setup(t) {
|
|
8
|
-
return (l, n) => (m(), s("div", {
|
|
9
|
-
class: "h-16 animate-pulse rounded bg-fm-color-neutral-gray-200",
|
|
10
|
-
style: b({ width: t.width })
|
|
11
|
-
}, null, 4));
|
|
12
|
-
}
|
|
13
|
-
});
|
|
14
|
-
function f(t) {
|
|
15
|
-
return t.map((l) => l.restaurantId).filter(Boolean);
|
|
16
|
-
}
|
|
17
|
-
function x(t, l, n) {
|
|
18
|
-
const o = f(l);
|
|
19
|
-
return t.filter((e) => e.managable || e._id === n).map((e) => ({
|
|
20
|
-
label: `${e.profile.code ? `${e.profile.code} - ` : ""}${e.profile.name}`,
|
|
21
|
-
value: e._id,
|
|
22
|
-
disabled: o.includes(e._id) && e._id !== n
|
|
23
|
-
}));
|
|
24
|
-
}
|
|
25
|
-
function k(t, l, n, o) {
|
|
26
|
-
return l ? t.filter((e) => e.restaurants.some((a) => a.id == l)).map((e) => ({
|
|
27
|
-
label: e.name,
|
|
28
|
-
value: e._id,
|
|
29
|
-
disabled: !o.isRoleUsable(e, l) && e._id !== n
|
|
30
|
-
})) : [];
|
|
31
|
-
}
|
|
32
|
-
function V(t, l, n, o) {
|
|
33
|
-
var a, i;
|
|
34
|
-
const e = k(t, l, n, o);
|
|
35
|
-
return ((a = e.find((d) => d.value === n && !d.disabled)) == null ? void 0 : a.value) ?? ((i = e.find((d) => !d.disabled)) == null ? void 0 : i.value) ?? "";
|
|
36
|
-
}
|
|
37
|
-
function C(t, l) {
|
|
38
|
-
const n = f(l), o = t.some(
|
|
39
|
-
(a) => a.managable && !n.includes(a._id)
|
|
40
|
-
), e = l.every((a) => a.restaurantId && a.roleId);
|
|
41
|
-
return o && e;
|
|
42
|
-
}
|
|
43
|
-
function R(t, l, n, o) {
|
|
44
|
-
var a;
|
|
45
|
-
const e = ((a = t[l]) == null ? void 0 : a.restaurantId) ?? "";
|
|
46
|
-
return o.isRestaurantLocked(e) ? t : t.length === 1 ? [n()] : t.filter((i, d) => d !== l);
|
|
47
|
-
}
|
|
48
|
-
const F = {
|
|
49
|
-
key: 0,
|
|
50
|
-
class: "fm-typo-body-sm-400 text-fm-color-typo-secondary"
|
|
51
|
-
}, I = /* @__PURE__ */ c({
|
|
52
|
-
__name: "PasscodeGenerateButton",
|
|
53
|
-
props: {
|
|
54
|
-
label: {},
|
|
55
|
-
hint: {},
|
|
56
|
-
disabled: { type: Boolean, default: !1 },
|
|
57
|
-
loading: { type: Boolean, default: !1 }
|
|
58
|
-
},
|
|
59
|
-
emits: ["click"],
|
|
60
|
-
setup(t) {
|
|
61
|
-
return (l, n) => {
|
|
62
|
-
const o = u("FmButton");
|
|
63
|
-
return m(), s(p, null, [
|
|
64
|
-
r(o, {
|
|
65
|
-
variant: "secondary",
|
|
66
|
-
"text-color": "primary",
|
|
67
|
-
"border-color": "primary",
|
|
68
|
-
label: t.label,
|
|
69
|
-
size: "md",
|
|
70
|
-
loading: t.loading,
|
|
71
|
-
disabled: t.disabled,
|
|
72
|
-
onClick: n[0] || (n[0] = (e) => l.$emit("click"))
|
|
73
|
-
}, null, 8, ["label", "loading", "disabled"]),
|
|
74
|
-
t.disabled ? (m(), s("div", F, y(t.hint), 1)) : g("", !0)
|
|
75
|
-
], 64);
|
|
76
|
-
};
|
|
77
|
-
}
|
|
78
|
-
}), _ = { class: "flex items-center gap-8" }, $ = ["aria-label"], P = /* @__PURE__ */ c({
|
|
79
|
-
__name: "PasscodePinField",
|
|
80
|
-
props: {
|
|
81
|
-
modelValue: {},
|
|
82
|
-
masked: { type: Boolean },
|
|
83
|
-
length: { default: 4 },
|
|
84
|
-
toggleLabel: {}
|
|
85
|
-
},
|
|
86
|
-
emits: ["update:modelValue", "update:masked", "complete"],
|
|
87
|
-
setup(t, { emit: l }) {
|
|
88
|
-
const n = l;
|
|
89
|
-
return (o, e) => {
|
|
90
|
-
const a = u("FmPinField"), i = u("FmIcon");
|
|
91
|
-
return m(), s("div", _, [
|
|
92
|
-
r(a, {
|
|
93
|
-
"model-value": t.modelValue,
|
|
94
|
-
length: t.length,
|
|
95
|
-
masked: t.masked,
|
|
96
|
-
"onUpdate:modelValue": e[0] || (e[0] = (d) => n("update:modelValue", d)),
|
|
97
|
-
onComplete: e[1] || (e[1] = (d) => n("complete", d)),
|
|
98
|
-
onFocus: e[2] || (e[2] = (d) => n("update:masked", !1))
|
|
99
|
-
}, null, 8, ["model-value", "length", "masked"]),
|
|
100
|
-
v("button", {
|
|
101
|
-
type: "button",
|
|
102
|
-
class: "flex items-center justify-center rounded-full p-4 hover:bg-fm-color-neutral-gray-100",
|
|
103
|
-
"aria-label": t.toggleLabel,
|
|
104
|
-
onClick: e[3] || (e[3] = (d) => n("update:masked", !t.masked))
|
|
105
|
-
}, [
|
|
106
|
-
r(i, {
|
|
107
|
-
name: t.masked ? "visibility" : "visibility_off",
|
|
108
|
-
size: "md",
|
|
109
|
-
class: "text-fm-color-neutral-gray-300"
|
|
110
|
-
}, null, 8, ["name"])
|
|
111
|
-
], 8, $)
|
|
112
|
-
]);
|
|
113
|
-
};
|
|
114
|
-
}
|
|
115
|
-
});
|
|
116
|
-
export {
|
|
117
|
-
P as _,
|
|
118
|
-
k as a,
|
|
119
|
-
x as b,
|
|
120
|
-
C as c,
|
|
121
|
-
I as d,
|
|
122
|
-
B as e,
|
|
123
|
-
V as p,
|
|
124
|
-
R as r,
|
|
125
|
-
f as s
|
|
126
|
-
};
|