@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
|
@@ -3,18 +3,18 @@ import { useRouter as x, useRoute as F } from "vue-router";
|
|
|
3
3
|
import { useI18n as I, useCoreStore as O } from "@feedmepos/mf-common";
|
|
4
4
|
import { _ as $ } from "./ResponsiveFabButton.vue_vue_type_script_setup_true_lang-QrqYEy8i.js";
|
|
5
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-
|
|
7
|
-
import { u as P } from "./restaurant-
|
|
6
|
+
import { u as D } from "./PortalUserSearcher.vue_vue_type_style_index_0_scoped_827dfd60_lang-CYkv2x_y.js";
|
|
7
|
+
import { u as P } from "./restaurant-pL7vHt-H.js";
|
|
8
8
|
import "@feedmepos/ui-library";
|
|
9
|
-
import "./rule-
|
|
10
|
-
import "./lodash-
|
|
11
|
-
import "./
|
|
12
|
-
import "./useAppStore-
|
|
13
|
-
import { R as B } from "./app-
|
|
14
|
-
import "./member-grant-
|
|
15
|
-
import "./role
|
|
9
|
+
import "./rule-Db3gFVHx.js";
|
|
10
|
+
import "./lodash-BRqMda7F.js";
|
|
11
|
+
import "./index-DDDG-LHm.js";
|
|
12
|
+
import "./useAppStore-DV13z6oc.js";
|
|
13
|
+
import { R as B } from "./app-BohKQtlz.js";
|
|
14
|
+
import "./member-grant-a3AGCWfT.js";
|
|
15
|
+
import "./role--EKCVqho.js";
|
|
16
16
|
/* empty css */
|
|
17
|
-
import "./useReportPermissions-
|
|
17
|
+
import "./useReportPermissions-BcyVoKVq.js";
|
|
18
18
|
const U = { class: "space-y-24" }, se = /* @__PURE__ */ M({
|
|
19
19
|
__name: "Main",
|
|
20
20
|
setup(j) {
|
|
@@ -0,0 +1,360 @@
|
|
|
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-BohKQtlz.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"
|
|
68
|
+
}, De = {
|
|
69
|
+
key: 2,
|
|
70
|
+
class: "space-y-24"
|
|
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,16 +1,17 @@
|
|
|
1
1
|
import { defineComponent as Z, ref as v, computed as h, watch as ue, resolveComponent as b, createBlock as de, openBlock as ee, unref as r, withCtx as C, createVNode as m, createElementVNode as P, toDisplayString as J, nextTick as pe, onMounted as fe, createElementBlock as ve, Fragment as Se, h as S } from "vue";
|
|
2
2
|
import { useI18n as se, useCoreStore as he } from "@feedmepos/mf-common";
|
|
3
3
|
import { useSnackbar as oe, useDialog as te, useBreakpoints as ne, components as Q } from "@feedmepos/ui-library";
|
|
4
|
-
import { v as X, _ as be, n as _e } from "./app-
|
|
4
|
+
import { v as X, _ as be, n as _e } from "./app-BohKQtlz.js";
|
|
5
5
|
import { _ as ge } from "./TableEmptyState.vue_vue_type_script_setup_true_lang-IfAZmWr0.js";
|
|
6
6
|
import { _ as ye } from "./ResponsiveContextMenu.vue_vue_type_script_setup_true_lang-mSJFKo7r.js";
|
|
7
|
-
import { u as ie,
|
|
8
|
-
import { l as $ } from "./lodash-
|
|
9
|
-
import
|
|
10
|
-
import { u as
|
|
11
|
-
import { u as
|
|
12
|
-
import {
|
|
13
|
-
|
|
7
|
+
import { u as ie, P as M, a as ae, p as Y, $ as Pe, H as we, R as A, B as xe, x as Fe, T as ke, E as Ce, m as Ie } from "./rule-Db3gFVHx.js";
|
|
8
|
+
import { l as $ } from "./lodash-BRqMda7F.js";
|
|
9
|
+
import "./index-DDDG-LHm.js";
|
|
10
|
+
import { u as Ve } from "./useDiscardConfirm-CzZSPyvh.js";
|
|
11
|
+
import { u as Re } from "./useLoading-Fcnnfywt.js";
|
|
12
|
+
import { c as je } from "./iteration-CcXrOMQe.js";
|
|
13
|
+
import { _ as Ee } from "./PortalPermissionEditor.vue_vue_type_script_setup_true_lang-u1UlV2Aw.js";
|
|
14
|
+
const $e = { class: "flex w-full items-center justify-between" }, Be = { class: "fm-typo-en-title-md-600" }, Le = { class: "fm-typo-en-title-sm-600 mt-24" }, Te = { class: "flex items-center justify-start gap-8" }, Ae = /* @__PURE__ */ Z({
|
|
14
15
|
__name: "PermissionSetForm",
|
|
15
16
|
props: {
|
|
16
17
|
modelValue: {
|
|
@@ -19,10 +20,10 @@ const $e = { class: "flex w-full items-center justify-between" }, Le = { class:
|
|
|
19
20
|
}
|
|
20
21
|
},
|
|
21
22
|
setup(K, { expose: D }) {
|
|
22
|
-
const o = K, { t: i } = se(), f = v(!1),
|
|
23
|
+
const o = K, { t: i } = se(), f = v(!1), B = h(() => {
|
|
23
24
|
var e;
|
|
24
25
|
return (e = o.modelValue) != null && e.id ? i("permissionSet.form.update.title") : i("permissionSet.form.create.title");
|
|
25
|
-
}), I = v(), N = oe(), w = te(), { breakpoints: V } = ne(), R =
|
|
26
|
+
}), I = v(), N = oe(), w = te(), { breakpoints: V } = ne(), R = Re(N), l = ie(), d = v({ ...o.modelValue }), a = v([]), p = v([]), L = [(e) => !!e || i("permissionSet.form.nameRequired")], q = h(() => {
|
|
26
27
|
var e;
|
|
27
28
|
return (e = o.modelValue) != null && e.id ? i("permissionSet.form.update.confirmButtonLabel") : i("permissionSet.form.create.confirmButtonLabel");
|
|
28
29
|
}), z = h(
|
|
@@ -60,13 +61,13 @@ const $e = { class: "flex w-full items-center justify-between" }, Le = { class:
|
|
|
60
61
|
), y.value = {
|
|
61
62
|
name: d.value.name ?? "",
|
|
62
63
|
permissionSetIds: [...a.value],
|
|
63
|
-
userPermissions:
|
|
64
|
+
userPermissions: je(p.value)
|
|
64
65
|
};
|
|
65
66
|
}
|
|
66
67
|
ue(f, async (e) => {
|
|
67
68
|
e && await n();
|
|
68
69
|
});
|
|
69
|
-
const W =
|
|
70
|
+
const W = Ve(
|
|
70
71
|
() => !$.isEqual(d.value.name ?? "", y.value.name) || !$.isEqual(a.value, y.value.permissionSetIds) || !$.isEqual(p.value, y.value.userPermissions),
|
|
71
72
|
() => {
|
|
72
73
|
f.value = !1;
|
|
@@ -76,23 +77,23 @@ const $e = { class: "flex w-full items-center justify-between" }, Le = { class:
|
|
|
76
77
|
const e = A(j.value), s = c.value ? g.value : _, u = xe(p.value, s), x = Fe(u, O.value), F = ke(x);
|
|
77
78
|
return Ce(e, F);
|
|
78
79
|
}
|
|
79
|
-
function
|
|
80
|
+
function H(e) {
|
|
80
81
|
return A(
|
|
81
82
|
M(e, l.permissionSets.value)
|
|
82
83
|
);
|
|
83
84
|
}
|
|
84
|
-
function
|
|
85
|
-
p.value =
|
|
85
|
+
function G(e) {
|
|
86
|
+
p.value = H(e);
|
|
86
87
|
}
|
|
87
88
|
function le(e) {
|
|
88
89
|
const s = [...e ?? []];
|
|
89
90
|
if ($.isEqual(s, a.value)) return;
|
|
90
91
|
const u = !$.isEqual(
|
|
91
92
|
p.value,
|
|
92
|
-
|
|
93
|
+
H(a.value)
|
|
93
94
|
);
|
|
94
95
|
if (a.value = s, !u) {
|
|
95
|
-
|
|
96
|
+
G(s);
|
|
96
97
|
return;
|
|
97
98
|
}
|
|
98
99
|
w.open({
|
|
@@ -108,7 +109,7 @@ const $e = { class: "flex w-full items-center justify-between" }, Le = { class:
|
|
|
108
109
|
close: !0
|
|
109
110
|
}
|
|
110
111
|
}).onPrimary(() => {
|
|
111
|
-
|
|
112
|
+
G(s), w.close();
|
|
112
113
|
});
|
|
113
114
|
}
|
|
114
115
|
async function me() {
|
|
@@ -150,7 +151,7 @@ const $e = { class: "flex w-full items-center justify-between" }, Le = { class:
|
|
|
150
151
|
}, {
|
|
151
152
|
"side-sheet-header": C(() => [
|
|
152
153
|
P("div", $e, [
|
|
153
|
-
P("p",
|
|
154
|
+
P("p", Be, J(B.value), 1),
|
|
154
155
|
m(u, {
|
|
155
156
|
name: "close",
|
|
156
157
|
size: "md",
|
|
@@ -187,7 +188,7 @@ const $e = { class: "flex w-full items-center justify-between" }, Le = { class:
|
|
|
187
188
|
"onUpdate:modelValue": s[0] || (s[0] = (E) => d.value.name = E),
|
|
188
189
|
label: r(i)("permissionSet.form.name"),
|
|
189
190
|
placeholder: r(i)("permissionSet.form.namePlaceholder"),
|
|
190
|
-
rules:
|
|
191
|
+
rules: L
|
|
191
192
|
}, null, 8, ["modelValue", "label", "placeholder"]),
|
|
192
193
|
m(F, {
|
|
193
194
|
"model-value": a.value,
|
|
@@ -200,7 +201,7 @@ const $e = { class: "flex w-full items-center justify-between" }, Le = { class:
|
|
|
200
201
|
class: "mt-16",
|
|
201
202
|
"onUpdate:modelValue": le
|
|
202
203
|
}, null, 8, ["model-value", "items", "label", "placeholder"]),
|
|
203
|
-
P("div",
|
|
204
|
+
P("div", Le, J(r(i)("team.memberForm.permissions.title")), 1),
|
|
204
205
|
m(Ee, {
|
|
205
206
|
modelValue: p.value,
|
|
206
207
|
"onUpdate:modelValue": s[1] || (s[1] = (E) => p.value = E),
|
|
@@ -215,10 +216,10 @@ const $e = { class: "flex w-full items-center justify-between" }, Le = { class:
|
|
|
215
216
|
}, 8, ["modelValue", "onOn:clickedAway"]);
|
|
216
217
|
};
|
|
217
218
|
}
|
|
218
|
-
}), De = { class: "space-y-8" }, Ne = { class: "flex justify-end xs:px-16" }, qe = { class: "flex flex-col h-full overflow-auto" },
|
|
219
|
+
}), De = { class: "space-y-8" }, Ne = { class: "flex justify-end xs:px-16" }, qe = { class: "flex flex-col h-full overflow-auto" }, es = /* @__PURE__ */ Z({
|
|
219
220
|
__name: "PermissionSetList",
|
|
220
221
|
setup(K, { expose: D }) {
|
|
221
|
-
const { t: o } = se(), { customReportPermissions: i, fetchCustomReportPermissions: f } = ae(),
|
|
222
|
+
const { t: o } = se(), { customReportPermissions: i, fetchCustomReportPermissions: f } = ae(), B = oe(), I = te(), { breakpoints: N } = ne(), w = v(""), V = h(() => {
|
|
222
223
|
var n;
|
|
223
224
|
return (n = d.value) == null ? void 0 : n.filter((t) => {
|
|
224
225
|
const c = w.value.toLowerCase();
|
|
@@ -230,7 +231,7 @@ const $e = { class: "flex w-full items-center justify-between" }, Le = { class:
|
|
|
230
231
|
async function p() {
|
|
231
232
|
await l.readPermissionSets();
|
|
232
233
|
}
|
|
233
|
-
function
|
|
234
|
+
function L(n) {
|
|
234
235
|
var t;
|
|
235
236
|
a.value = n, (t = R.value) == null || t.trigger();
|
|
236
237
|
}
|
|
@@ -290,7 +291,7 @@ const $e = { class: "flex w-full items-center justify-between" }, Le = { class:
|
|
|
290
291
|
[
|
|
291
292
|
S(ye, {
|
|
292
293
|
items: [
|
|
293
|
-
{ label: o("common.update"), onClick: () =>
|
|
294
|
+
{ label: o("common.update"), onClick: () => L(t) },
|
|
294
295
|
{
|
|
295
296
|
label: o("common.remove"),
|
|
296
297
|
onClick: () => j(t),
|
|
@@ -321,7 +322,7 @@ const $e = { class: "flex w-full items-center justify-between" }, Le = { class:
|
|
|
321
322
|
secondaryActions: { text: o("common.cancel"), close: !0 }
|
|
322
323
|
}).onPrimary(async () => {
|
|
323
324
|
try {
|
|
324
|
-
await l.deletePermissionSet(n.id),
|
|
325
|
+
await l.deletePermissionSet(n.id), B.open({
|
|
325
326
|
message: o("permissionSet.form.delete.successMessage", { permissionSetName: n.name }),
|
|
326
327
|
type: "success"
|
|
327
328
|
});
|
|
@@ -329,7 +330,7 @@ const $e = { class: "flex w-full items-center justify-between" }, Le = { class:
|
|
|
329
330
|
const c = t instanceof _e && t.status === 409 ? t.message.includes("referenced by") ? o("permissionSet.form.delete.setReferencedConflictError", {
|
|
330
331
|
permissionSetName: n.name
|
|
331
332
|
}) : o("permissionSet.form.delete.conflictError", { permissionSetName: n.name }) : t instanceof Error ? t.message : `${t}`;
|
|
332
|
-
|
|
333
|
+
B.open({ message: c, type: "error" });
|
|
333
334
|
}
|
|
334
335
|
I.close();
|
|
335
336
|
});
|
|
@@ -375,7 +376,7 @@ const $e = { class: "flex w-full items-center justify-between" }, Le = { class:
|
|
|
375
376
|
"pin-header-row": "",
|
|
376
377
|
"hide-footer": "",
|
|
377
378
|
"shrink-at": !1,
|
|
378
|
-
onRowClick: t[1] || (t[1] = (g) =>
|
|
379
|
+
onRowClick: t[1] || (t[1] = (g) => L(g.original))
|
|
379
380
|
}, null, 8, ["row-data", "page-size", "loading"])
|
|
380
381
|
]),
|
|
381
382
|
_: 1
|
|
@@ -390,5 +391,5 @@ const $e = { class: "flex w-full items-center justify-between" }, Le = { class:
|
|
|
390
391
|
}
|
|
391
392
|
});
|
|
392
393
|
export {
|
|
393
|
-
|
|
394
|
+
es as default
|
|
394
395
|
};
|