@feedmepos/mf-hrm-portal 1.1.0-dev → 1.1.1-dev

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 (96) hide show
  1. package/dist/AuditLogList-D62QRWN-.js +232 -0
  2. package/dist/{EmployeeList-tmUqs5a6.js → EmployeeList-CMUbRS7j.js} +156 -150
  3. package/dist/Main-BbZ-t-pu.js +85 -0
  4. package/dist/{main-DOtgCRZe.js → Main-un3v_g6p.js} +1500 -1532
  5. package/dist/{PageLayout.vue_vue_type_script_setup_true_lang-DuwNwJDM.js → PageLayout.vue_vue_type_script_setup_true_lang-HKK4cbW8.js} +2 -2
  6. package/dist/PortalPermissionEditor.vue_vue_type_script_setup_true_lang-CZKBfM_R.js +3119 -0
  7. package/dist/ResponsiveFabButton.vue_vue_type_script_setup_true_lang-Cn-3MRBO.js +38 -0
  8. package/dist/{RoleList-C5xG7LHg.js → RoleList-mlTepnhN.js} +52 -50
  9. package/dist/RolePermissionList-tR-Kmlu7.js +285 -0
  10. package/dist/TeamMemberList-BkRQl6x8.js +948 -0
  11. package/dist/{TimesheetList-CZfo4Dua.js → TimesheetList-i5yaAzhB.js} +21 -21
  12. package/dist/api/audit-log/index.d.ts +10 -0
  13. package/dist/api/index.d.ts +1 -3
  14. package/dist/api/permission-assignment/index.d.ts +10 -0
  15. package/dist/api/permission-set/index.d.ts +8 -0
  16. package/dist/api/team/index.d.ts +2 -1
  17. package/dist/app-4LaGLcWC.js +2305 -0
  18. package/dist/app.js +1 -1
  19. package/dist/components/AppForm.vue.d.ts +3 -2
  20. package/dist/components/CheckboxInput.vue.d.ts +10 -4
  21. package/dist/components/CollapsibleWrapper.vue.d.ts +3 -2
  22. package/dist/components/form/SelectFilter.vue.d.ts +3 -2
  23. package/dist/components/layout/FormColumn.vue.d.ts +6 -3
  24. package/dist/components/layout/FormItem.vue.d.ts +2 -1
  25. package/dist/components/layout/FormSection.vue.d.ts +2 -1
  26. package/dist/components/layout/FullWrapper.vue.d.ts +6 -3
  27. package/dist/components/layout/PageLayout.vue.d.ts +2 -1
  28. package/dist/components/menu/BottomSheetMenu.vue.d.ts +2 -1
  29. package/dist/components/menu/BottomSheetMenuItem.vue.d.ts +6 -3
  30. package/dist/components/table/EmptyDataTemplate/index.vue.d.ts +6 -3
  31. package/dist/composables/useAppStore.d.ts +6 -6
  32. package/dist/composables/useDateRange.d.ts +1 -1
  33. package/dist/composables/useRestaurantMap.d.ts +4 -8
  34. package/dist/composables/useSheet.d.ts +1 -1
  35. package/dist/{employee-BQc7Wgpu.js → employee-BZTntAR0.js} +9 -9
  36. package/dist/helpers/permission-set.d.ts +32 -0
  37. package/dist/helpers/portal-user.d.ts +8 -0
  38. package/dist/helpers/rule.d.ts +4 -3
  39. package/dist/index-BsEM84j5.js +8440 -0
  40. package/dist/{empty-placeholder-ey8LJtN1.js → index.vue_vue_type_script_setup_true_lang-Vc5ARO29.js} +43 -2
  41. package/dist/{lodash-DNzKT_gG.js → lodash-DYaYvsmp.js} +326 -343
  42. package/dist/router/shared.d.ts +3 -1
  43. package/dist/stores/employee.d.ts +4 -4
  44. package/dist/stores/permission-assignment.d.ts +277 -0
  45. package/dist/stores/permission-set.d.ts +250 -0
  46. package/dist/stores/role.d.ts +4 -4
  47. package/dist/stores/team.d.ts +288 -0
  48. package/dist/stores/timesheet.d.ts +19 -19
  49. package/dist/team-eo_yQh1g.js +26 -0
  50. package/dist/{timesheet-B4M1nCIm.js → timesheet-CfPIK52Q.js} +14 -15
  51. package/dist/tsconfig.app.tsbuildinfo +1 -1
  52. package/dist/types/audit-log.d.ts +18 -0
  53. package/dist/types/permission-assignment.d.ts +20 -0
  54. package/dist/types/permission-set.d.ts +20 -0
  55. package/dist/types/permission.d.ts +4 -3
  56. package/dist/types/team.d.ts +13 -3
  57. package/dist/useAppStore-D0F-tWJO.js +180 -0
  58. package/dist/useLoading-DpbOtToC.js +99 -0
  59. package/dist/useRestaurantMap-D5BNPLKh.js +107 -0
  60. package/dist/{useSearch-C25VELOk.js → useSearch-C6gRA62e.js} +8 -8
  61. package/dist/views/hr/employee/{components/EmployeeForm.vue.d.ts → EmployeeForm.vue.d.ts} +10 -7
  62. package/dist/views/hr/locales/index.d.ts +0 -214
  63. package/dist/views/team/components/BasePermission.vue.d.ts +76 -0
  64. package/dist/views/team/components/{TeamMemberConditionPermission.vue.d.ts → ConditionPermission.vue.d.ts} +14 -1
  65. package/dist/views/team/components/InheritPermissionTooltip.vue.d.ts +14 -0
  66. package/dist/views/team/components/PermissionWithTooltip.vue.d.ts +14 -0
  67. package/dist/views/team/components/PortalPermissionEditor.vue.d.ts +68 -28
  68. package/dist/views/team/components/{TeamMemberRolePermission.vue.d.ts → PosRolePermission.vue.d.ts} +14 -1
  69. package/dist/views/team/locales/index.d.ts +176 -4
  70. package/dist/views/team/{components → member}/AddMemberForm.vue.d.ts +1 -0
  71. package/dist/views/team/member/TeamMemberList.vue.d.ts +4 -0
  72. package/dist/views/team/member/TeamMemberMasterUser.vue.d.ts +55 -0
  73. package/dist/views/team/role/RolePermissionForm.vue.d.ts +19 -0
  74. package/dist/views/{hr/grant-user/GrantUserList.vue.d.ts → team/role/RolePermissionList.vue.d.ts} +0 -12
  75. package/package.json +14 -9
  76. package/dist/FormSection.vue_vue_type_script_setup_true_lang-BY9VGOoM.js +0 -71
  77. package/dist/HorizontalSplitter-B9DVYJIM.js +0 -12
  78. package/dist/Main-ebQsujY3.js +0 -600
  79. package/dist/TeamMemberList-09_3YTHe.js +0 -1509
  80. package/dist/api/grant-user/index.d.ts +0 -8
  81. package/dist/app-B4KDGOw1.js +0 -1432
  82. package/dist/index-CSG8t9Dl.js +0 -58
  83. package/dist/role-DGAu9X1X.js +0 -9728
  84. package/dist/rule-CSj0p2P3.js +0 -450
  85. package/dist/stores/grant-user.d.ts +0 -86
  86. package/dist/types/grant-user.d.ts +0 -17
  87. package/dist/useAppStore-CKmMR-gI.js +0 -93
  88. package/dist/useLoading-v4m-6mEy.js +0 -141
  89. package/dist/useRestaurantMap-e9fQJiLC.js +0 -39
  90. package/dist/views/hr/grant-user/components/GrantUserForm.vue.d.ts +0 -14
  91. package/dist/views/team/components/TeamMemberBasePermission.vue.d.ts +0 -36
  92. package/dist/views/team/components/TeamMemberMasterUser.vue.d.ts +0 -718
  93. /package/dist/views/hr/{grant-user/Main.vue.d.ts → Main.vue.d.ts} +0 -0
  94. /package/dist/views/hr/{main.vue.d.ts → audit-log/AuditLogList.vue.d.ts} +0 -0
  95. /package/dist/views/team/{TeamMemberList.vue.d.ts → Main.vue.d.ts} +0 -0
  96. /package/dist/views/team/{components → member}/MemberInfo.vue.d.ts +0 -0
@@ -0,0 +1,232 @@
1
+ import { defineComponent as P, ref as d, watch as N, resolveComponent as g, createElementBlock as c, openBlock as i, Fragment as R, createVNode as r, withCtx as b, createElementVNode as t, createBlock as I, unref as h, createCommentVNode as x, toDisplayString as a } from "vue";
2
+ import { useCoreStore as U } from "@feedmepos/mf-common";
3
+ import { _ as B } from "./app-4LaGLcWC.js";
4
+ import { _ as O } from "./PageLayout.vue_vue_type_script_setup_true_lang-HKK4cbW8.js";
5
+ import { _ as q } from "./index.vue_vue_type_script_setup_true_lang-Vc5ARO29.js";
6
+ import { components as K } from "@feedmepos/ui-library";
7
+ import { g as M, b as $ } from "./index-BsEM84j5.js";
8
+ import { u as j } from "./team-eo_yQh1g.js";
9
+ const E = "/audit-logs", z = {
10
+ async read(s) {
11
+ return M(
12
+ await $().get(E, {
13
+ params: {
14
+ limit: (s == null ? void 0 : s.limit) ?? 100,
15
+ offset: (s == null ? void 0 : s.offset) ?? 0,
16
+ ...s != null && s.from ? { from: s.from } : {},
17
+ ...s != null && s.to ? { to: s.to } : {}
18
+ }
19
+ })
20
+ );
21
+ }
22
+ }, G = {
23
+ class: "flex flex-1 flex-col gap-16 min-h-0"
24
+ }, H = {
25
+ class: "flex shrink-0 items-center gap-8"
26
+ }, J = {
27
+ key: 0,
28
+ class: "space-y-16 p-4 text-sm"
29
+ }, Q = {
30
+ class: "space-y-8"
31
+ }, W = {
32
+ class: "flex gap-8"
33
+ }, X = {
34
+ class: "flex gap-8"
35
+ }, Y = {
36
+ class: "flex flex-col gap-2"
37
+ }, Z = {
38
+ key: 0,
39
+ class: "font-medium"
40
+ }, ee = {
41
+ class: "break-all font-mono text-xs text-fm-color-typo-secondary"
42
+ }, te = {
43
+ class: "flex gap-8"
44
+ }, oe = {
45
+ class: "flex gap-8"
46
+ }, se = {
47
+ class: "flex gap-8"
48
+ }, le = {
49
+ class: "flex gap-8"
50
+ }, ae = {
51
+ class: "flex gap-8"
52
+ }, ne = {
53
+ class: "break-all font-mono text-xs"
54
+ }, ie = {
55
+ class: "flex gap-8"
56
+ }, re = {
57
+ class: "break-all font-mono text-xs"
58
+ }, de = {
59
+ class: "space-y-8"
60
+ }, ue = {
61
+ class: "space-y-8"
62
+ }, ce = {
63
+ class: "flex gap-8"
64
+ }, me = {
65
+ class: "flex gap-8"
66
+ }, fe = {
67
+ key: 0,
68
+ class: "flex gap-8"
69
+ }, pe = {
70
+ class: "break-all font-mono text-xs"
71
+ }, ve = {
72
+ key: 1,
73
+ class: "flex gap-8"
74
+ }, ye = {
75
+ class: "font-mono text-xs break-all"
76
+ }, Ie = /* @__PURE__ */ P({
77
+ __name: "AuditLogList",
78
+ setup(s) {
79
+ const F = U(), m = j(), f = d(!1), p = d([]), o = d(null), _ = d(!1), v = d(""), y = d(""), k = {
80
+ allowed: "success",
81
+ denied: "critical"
82
+ }, C = [{
83
+ accessorKey: "timestamp",
84
+ header: "Timestamp",
85
+ cell(l) {
86
+ const e = l.row.original;
87
+ return new Date(e.timestamp).toLocaleString();
88
+ }
89
+ }, {
90
+ accessorKey: "userId",
91
+ header: "User",
92
+ enableSorting: !1,
93
+ cell(l) {
94
+ const e = l.row.original, u = m.userIdToName[e.userId];
95
+ return u ? `${u} (${e.userId})` : e.userId;
96
+ }
97
+ }, {
98
+ accessorKey: "subject",
99
+ header: "Subject"
100
+ }, {
101
+ accessorKey: "action",
102
+ header: "Action",
103
+ enableSorting: !1
104
+ }, {
105
+ accessorKey: "outcome",
106
+ header: "Outcome",
107
+ enableSorting: !1,
108
+ cell(l) {
109
+ const e = l.row.original;
110
+ return r(K.FmChip, {
111
+ variant: k[e.outcome] ?? "neutral",
112
+ label: e.outcome,
113
+ compact: !0
114
+ }, null);
115
+ }
116
+ }];
117
+ async function w() {
118
+ f.value = !0;
119
+ try {
120
+ let l;
121
+ if (y.value) {
122
+ const e = new Date(y.value);
123
+ e.setDate(e.getDate() + 1), l = e.toISOString().slice(0, 10);
124
+ }
125
+ [p.value] = await Promise.all([z.read({
126
+ ...v.value ? {
127
+ from: v.value
128
+ } : {},
129
+ ...l ? {
130
+ to: l
131
+ } : {}
132
+ }), m.readTeamMembers()]);
133
+ } finally {
134
+ f.value = !1;
135
+ }
136
+ }
137
+ function S() {
138
+ w();
139
+ }
140
+ function D(l) {
141
+ o.value = l, _.value = !0;
142
+ }
143
+ function T() {
144
+ _.value = !1, o.value = null;
145
+ }
146
+ return N(F.currentBusiness, (l) => {
147
+ l && w();
148
+ }, {
149
+ immediate: !0
150
+ }), (l, e) => {
151
+ const u = g("FmDatePicker"), A = g("FmTable"), L = g("FmChip"), V = g("FmSideSheet");
152
+ return i(), c(R, null, [r(O, {
153
+ heading: "Audit Log"
154
+ }, {
155
+ default: b(() => [t("div", G, [t("div", H, [r(u, {
156
+ modelValue: v.value,
157
+ "onUpdate:modelValue": [e[0] || (e[0] = (n) => v.value = n), S],
158
+ label: "From"
159
+ }, null, 8, ["modelValue"]), r(u, {
160
+ modelValue: y.value,
161
+ "onUpdate:modelValue": [e[1] || (e[1] = (n) => y.value = n), S],
162
+ label: "To"
163
+ }, null, 8, ["modelValue"])]), !f.value && p.value.length === 0 ? (i(), I(h(q), {
164
+ key: 0,
165
+ title: "No audit logs",
166
+ subtitle: "Permission check logs will appear here once activity is recorded."
167
+ })) : (i(), I(B, {
168
+ key: 1
169
+ }, {
170
+ default: b(() => [r(A, {
171
+ "column-defs": C,
172
+ "row-data": p.value,
173
+ "page-size": p.value.length,
174
+ loading: f.value,
175
+ "pin-header-row": "",
176
+ "hide-footer": "",
177
+ class: "cursor-pointer",
178
+ onRowClick: e[2] || (e[2] = (n) => D(n.original))
179
+ }, null, 8, ["row-data", "page-size", "loading"])]),
180
+ _: 1
181
+ }))])]),
182
+ _: 1
183
+ }), r(V, {
184
+ header: "Audit Log Detail",
185
+ "model-value": _.value,
186
+ "max-width": 480,
187
+ "dismiss-away": "",
188
+ "onUpdate:modelValue": e[3] || (e[3] = (n) => {
189
+ n || T();
190
+ })
191
+ }, {
192
+ default: b(() => [o.value ? (i(), c("div", J, [t("div", Q, [t("div", W, [e[4] || (e[4] = t("span", {
193
+ class: "w-28 shrink-0 font-semibold text-fm-color-typo-secondary"
194
+ }, "Timestamp", -1)), t("span", null, a(new Date(o.value.timestamp).toLocaleString()), 1)]), t("div", X, [e[5] || (e[5] = t("span", {
195
+ class: "w-28 shrink-0 font-semibold text-fm-color-typo-secondary"
196
+ }, "User", -1)), t("div", Y, [h(m).userIdToName[o.value.userId] ? (i(), c("span", Z, a(h(m).userIdToName[o.value.userId]), 1)) : x("", !0), t("span", ee, a(o.value.userId), 1)])]), t("div", te, [e[6] || (e[6] = t("span", {
197
+ class: "w-28 shrink-0 font-semibold text-fm-color-typo-secondary"
198
+ }, "Action", -1)), t("span", null, a(o.value.action), 1)]), t("div", oe, [e[7] || (e[7] = t("span", {
199
+ class: "w-28 shrink-0 font-semibold text-fm-color-typo-secondary"
200
+ }, "Subject", -1)), t("span", null, a(o.value.subject), 1)]), t("div", se, [e[8] || (e[8] = t("span", {
201
+ class: "w-28 shrink-0 font-semibold text-fm-color-typo-secondary"
202
+ }, "Field", -1)), t("span", null, a(o.value.field || "-"), 1)]), t("div", le, [e[9] || (e[9] = t("span", {
203
+ class: "w-28 shrink-0 font-semibold text-fm-color-typo-secondary"
204
+ }, "Outcome", -1)), r(L, {
205
+ variant: k[o.value.outcome] ?? "neutral",
206
+ label: o.value.outcome,
207
+ compact: ""
208
+ }, null, 8, ["variant", "label"])]), t("div", ae, [e[10] || (e[10] = t("span", {
209
+ class: "w-28 shrink-0 font-semibold text-fm-color-typo-secondary"
210
+ }, "Business", -1)), t("span", ne, a(o.value.businessId || "-"), 1)]), t("div", ie, [e[11] || (e[11] = t("span", {
211
+ class: "w-28 shrink-0 font-semibold text-fm-color-typo-secondary"
212
+ }, "Restaurant", -1)), t("span", re, a(o.value.restaurantId || "-"), 1)])]), e[17] || (e[17] = t("hr", {
213
+ class: "border-fm-color-border-default"
214
+ }, null, -1)), t("div", de, [e[16] || (e[16] = t("p", {
215
+ class: "font-semibold text-fm-color-typo-primary"
216
+ }, "Metadata", -1)), t("div", ue, [t("div", ce, [e[12] || (e[12] = t("span", {
217
+ class: "w-28 shrink-0 font-medium text-fm-color-typo-secondary"
218
+ }, "Reason", -1)), t("span", null, a(o.value.metadata.reason), 1)]), t("div", me, [e[13] || (e[13] = t("span", {
219
+ class: "w-28 shrink-0 font-medium text-fm-color-typo-secondary"
220
+ }, "Resolved From", -1)), t("span", null, a(o.value.metadata.resolvedFrom), 1)]), o.value.metadata.permissionSetId ? (i(), c("div", fe, [e[14] || (e[14] = t("span", {
221
+ class: "w-28 shrink-0 font-medium text-fm-color-typo-secondary"
222
+ }, "Permission Set", -1)), t("span", pe, a(o.value.metadata.permissionSetId), 1)])) : x("", !0), o.value.metadata.requestMethod || o.value.metadata.requestPath ? (i(), c("div", ve, [e[15] || (e[15] = t("span", {
223
+ class: "w-28 shrink-0 font-medium text-fm-color-typo-secondary"
224
+ }, "Request", -1)), t("span", ye, a(o.value.metadata.requestMethod) + " " + a(o.value.metadata.requestPath), 1)])) : x("", !0)])])])) : x("", !0)]),
225
+ _: 1
226
+ }, 8, ["model-value"])], 64);
227
+ };
228
+ }
229
+ });
230
+ export {
231
+ Ie as default
232
+ };