@feedmepos/mf-hrm-portal 2.3.2-dev.4 → 2.3.2-dev.6

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 (55) hide show
  1. package/dist/{ApprovalCodeList-BPTnWcra.js → ApprovalCodeList-ix9OeJEQ.js} +7 -7
  2. package/dist/{AuditLogList-CvEF4bit.js → AuditLogList-D5H_O9Q0.js} +5 -5
  3. package/dist/{ConditionBuilderForm.vue_vue_type_script_setup_true_lang-CPX0sv64.js → ConditionBuilderForm.vue_vue_type_script_setup_true_lang-CuELLYY4.js} +10 -10
  4. package/dist/{EmployeeList-CANPsrQY.js → EmployeeList-DICzZjVM.js} +8 -8
  5. package/dist/{FormSection.vue_vue_type_script_setup_true_lang-mdfK9rtZ.js → FormSection.vue_vue_type_script_setup_true_lang-BQzSWAqC.js} +1 -1
  6. package/dist/{GrantUserList-DPj_6Wsg.js → GrantUserList-DoMN7Eks.js} +8 -8
  7. package/dist/{Main-Cob4hcf-.js → Main-CHIExpOV.js} +5 -5
  8. package/dist/{Main-BWRMirTY.js → Main-CQ42sYi9.js} +11 -11
  9. package/dist/{Main-DXcSgkhR.js → Main-DwYh9cxQ.js} +10 -10
  10. package/dist/{MyPosProfile-Bp7-pATz.js → MyPosProfile-DaUdREQX.js} +100 -111
  11. package/dist/{PermissionSetList-DvAW1q0c.js → PermissionSetList-B7WM9N-p.js} +66 -66
  12. package/dist/PortalPermissionEditor.vue_vue_type_script_setup_true_lang-BSVtyLlL.js +4207 -0
  13. package/dist/{PortalUserSearcher.vue_vue_type_style_index_0_scoped_827dfd60_lang-C8hcooKP.js → PortalUserSearcher.vue_vue_type_style_index_0_scoped_827dfd60_lang-C7fnnbme.js} +1 -1
  14. package/dist/{RoleForm.vue_vue_type_script_setup_true_lang-Bq8-aBSv.js → RoleForm.vue_vue_type_script_setup_true_lang-AbQIllkX.js} +30 -30
  15. package/dist/{RoleList-DsrHgU4s.js → RoleList-vQsHxlNc.js} +96 -105
  16. package/dist/{ScheduleAddPositionModal.vue_vue_type_script_setup_true_lang-CRR18xmB.js → ScheduleAddPositionModal.vue_vue_type_script_setup_true_lang-D52LhvGG.js} +1 -1
  17. package/dist/{ScheduleGeneralPage-C_Kj9wmp.js → ScheduleGeneralPage-BLqh7jH6.js} +2 -2
  18. package/dist/{ScheduleModal.vue_vue_type_script_setup_true_lang-3oQ6lE86.js → ScheduleModal.vue_vue_type_script_setup_true_lang-C9doSgov.js} +4 -4
  19. package/dist/{SchedulePage-9dFXxWwZ.js → SchedulePage-YADV_6w9.js} +9 -9
  20. package/dist/{SchedulePositionPage-Dea5X8Sa.js → SchedulePositionPage-BowDQMG_.js} +3 -3
  21. package/dist/{SelectFilter-Dr9lB6Ta.js → SelectFilter-CBp1qxLd.js} +2 -3
  22. package/dist/{TeamMemberList-Bu9QNP9W.js → TeamMemberList-BoJ87moU.js} +184 -184
  23. package/dist/TimesheetList-BULw75oo.js +401 -0
  24. package/dist/{TimesheetList.vue_vue_type_style_index_0_scoped_63294af2_lang-DIQ7kjG8.js → TimesheetList.vue_vue_type_style_index_0_scoped_c98b0b84_lang-VlnjH9aQ.js} +3 -3
  25. package/dist/{app-BHQJX4L4.js → app-DOFDND9j.js} +5454 -4639
  26. package/dist/app.js +1 -1
  27. package/dist/{approval-code-w0rZJeYU.js → approval-code-Dgj6S82q.js} +1 -1
  28. package/dist/{dayjs.min-C4H4diN8.js → dayjs.min-AoirQCgL.js} +16 -16
  29. package/dist/{employee-BEwUmdt6.js → employee-VB6YmuSS.js} +5 -5
  30. package/dist/{grant-user-DdxPMH5_.js → grant-user-C-ptrq7l.js} +1 -1
  31. package/dist/{iteration-DBHifssn.js → iteration-DmuDXP8U.js} +1 -1
  32. package/dist/{lodash-DqZsWm-0.js → lodash-CBFO-xTu.js} +1 -1
  33. package/dist/member-grant-CHOB8eQ_.js +54 -0
  34. package/dist/restaurant-DH2Fxzi7.js +52 -0
  35. package/dist/role-DUpHwRiY.js +97 -0
  36. package/dist/rule-aUPH1VOW.js +842 -0
  37. package/dist/src/api/my-pos-profile/index.d.ts +1 -3
  38. package/dist/src/helpers/permission-set.d.ts +1 -102
  39. package/dist/src/helpers/rule.d.ts +2 -2
  40. package/dist/src/stores/restaurant.d.ts +61 -1
  41. package/dist/src/types/my-pos-profile.d.ts +2 -3
  42. package/dist/src/views/audit-log/locales/index.d.ts +12 -0
  43. package/dist/src/views/my-pos-profile/locales/index.d.ts +0 -4
  44. package/dist/style.css +1 -1
  45. package/dist/tsconfig.app.tsbuildinfo +1 -1
  46. package/dist/{useAppStore-BUmFt2dT.js → useAppStore-DwmJbpf-.js} +1 -1
  47. package/dist/{useLoading-oHRj4RgU.js → useLoading-Dmlm4oSU.js} +1 -1
  48. package/dist/{useReportPermissions-CpcyfEuV.js → useReportPermissions-XPn-p57R.js} +5 -5
  49. package/package.json +3 -3
  50. package/dist/PortalPermissionEditor.vue_vue_type_script_setup_true_lang-DmbI5vgH.js +0 -4243
  51. package/dist/TimesheetList-B98l028z.js +0 -402
  52. package/dist/member-grant-DOigVnBR.js +0 -55
  53. package/dist/restaurant-2xCb2x26.js +0 -51
  54. package/dist/role-C8STcmLJ.js +0 -93
  55. package/dist/rule-BkL34-Ma.js +0 -788
@@ -1,5 +1,3 @@
1
- import type { FdtoMyPosPasscode, FdtoMyPosProfile, FdtoRegenerateMyPosPasscodeRes } from '@/types/my-pos-profile';
1
+ import type { FdtoMyPosProfile, FdtoRegenerateMyPosPasscodeRes } from '@/types/my-pos-profile';
2
2
  export declare const readMyPosProfile: () => Promise<FdtoMyPosProfile>;
3
- /** D50: the signed-in user's own current passcode. */
4
- export declare const readMyPosPasscode: () => Promise<FdtoMyPosPasscode>;
5
3
  export declare const regenerateMyPosPasscode: () => Promise<FdtoRegenerateMyPosPasscodeRes>;
@@ -1,21 +1,5 @@
1
1
  import type { InheritedPermission, IFdtoPermissionSet } from '@/types/permission-set';
2
- import type { FdoPermissionRule } from '@feedmepos/core/entity';
3
- /**
4
- * Recursively collect all permission sets following permissionSetIds links.
5
- * Returns a flat, deduplicated list in depth-first order (parent before children).
6
- * Cycle-safe via the visited set.
7
- */
8
- export declare function collectAllPermissionSets(setIds: string[], allSets: IFdtoPermissionSet[], visited?: Set<string>): IFdtoPermissionSet[];
9
- /**
10
- * Compute the effective permissions from a list of permission sets.
11
- *
12
- * Unlike a raw `mergePermissionSet().map(...)`, this correctly handles sets that store
13
- * override diffs (inverted rules): it first merges all grants and denials from the sets,
14
- * then applies the denials on top of the grants via `getEffectivePermissions`, producing a
15
- * clean list of effective grants only. This ensures that subjects removed by a child set's
16
- * inversion are not incorrectly shown as granted.
17
- */
18
- export declare function mergeToEffectivePermissions(sets: IFdtoPermissionSet[]): FdoPermissionRule[];
2
+ export { collectAllPermissionSets, mergeToEffectivePermissions, getOverridePermissions, materializeSystemPermissionSetOverrides, stripSystemExpandedPositives, REPORT_SUBJECT_PREFIX, filterStalePermissions, filterRedundantReportPermissions, getEffectivePermissions, getEditorPermissions, } from '@feedmepos/hrm-permission/utils';
19
3
  /**
20
4
  * Transform permission sets by grouping role names by collection IDs for a specific field
21
5
  * @param permissionSets - Array of permission sets with their permissions
@@ -24,88 +8,3 @@ export declare function mergeToEffectivePermissions(sets: IFdtoPermissionSet[]):
24
8
  * @returns Array of objects containing collection ID and associated role names
25
9
  */
26
10
  export declare function transformByCollection(permissionSets: IFdtoPermissionSet[], field: string, resourceIds: string[]): InheritedPermission[];
27
- /**
28
- * Combine base permissions (permissions set) with user permissions
29
- * @param basePermissions - Base permissions
30
- * @param overridePermissions - User permissions
31
- * @returns Combined permissions
32
- * Return combined result with below criteria:
33
- * - If base has it and user doesn't, return base permission with { inverted: true }
34
- * - If user has it and base doesn't, return user permission
35
- * - If base and user has it, nothing return
36
- * For permission with conditions (collection: warehouses, roles, restaurants)
37
- * - If base conditions different from user conditions, return rule with { inverted: true } and conditions on collection ids to be denied
38
- * - If base has conditions and user doesn't, return base with { inverted: true } without conditions, essentially denied all access
39
- * - If user has conditions and base doesn't, return user's rule (user added)
40
- */
41
- export declare function getOverridePermissions(basePermissions: FdoPermissionRule[], overridePermissions: FdoPermissionRule[]): FdoPermissionRule[];
42
- export declare function materializeSystemPermissionSetOverrides(overridePermissions: FdoPermissionRule[]): FdoPermissionRule[];
43
- /**
44
- * Strip positive rules whose subject would be re-injected by system permission set expansion.
45
- * These need not be persisted to DB — expansion re-adds them at runtime.
46
- *
47
- * Also strips inverted rules for subjects that are ONLY reachable as non-manage via permissions[]
48
- * leaf injection. Such inverted rules cannot block permissions[] injection (only visitedSetIds/
49
- * permissionSets[] expansion is blockable), are useless, and cause a CASL side-effect where an
50
- * inverted `manage` rule inadvertently blocks `read` access.
51
- *
52
- * Inverted rules targeting subjects reachable as `manage` (via permissionSets[] chaining) are
53
- * always preserved — they seed visitedSetIds to block system set re-expansion.
54
- */
55
- export declare function stripSystemExpandedPositives(permissions: FdoPermissionRule[]): FdoPermissionRule[];
56
- export declare const REPORT_SUBJECT_PREFIX = "business::report::";
57
- /**
58
- * Filter out stale report permission rules.
59
- *
60
- * Only rules whose subject starts with `business::report::` are candidates for removal —
61
- * any other subject (restaurant, role, warehouse, etc.) passes through untouched.
62
- * A report-prefixed subject is kept only if it exists in `knownReportSubjects`.
63
- *
64
- * This handles:
65
- * - Deprecated/renamed subjects (e.g. `business::report::closeup` → `business::report::reports::closeup`)
66
- * - Deleted dynamic reports that no longer exist
67
- */
68
- export declare function filterStalePermissions(permissions: FdoPermissionRule[], knownReportSubjects: Set<string>): FdoPermissionRule[];
69
- /**
70
- * Strip individual-report actions already covered by an `allDefaultReports` or
71
- * `allCustomReports` positive grant, preventing redundant data from being saved.
72
- *
73
- * - If the cover rule has `manage` selected → every individual rule in that bucket is
74
- * fully covered and dropped entirely only when the cover condition also covers the
75
- * individual rule.
76
- * - Otherwise, only covered non-manage actions are stripped from individual rules when
77
- * the cover condition also covers the individual rule.
78
- * `manage` is a real CASL wildcard grant that implies every action, not merely a
79
- * shorthand for "all non-manage actions selected" — a rule carrying `manage` is
80
- * pushed through UNCHANGED (a cover lacking `manage` cannot cover it). Stripping its
81
- * constituent actions and then dropping `manage` would destroy the user's grant.
82
- * Rules that end up with no remaining actions are dropped.
83
- *
84
- * Inverted rules and the cover subjects themselves pass through untouched.
85
- *
86
- * @param defaultReportSubjects Full set of subjects in the "Default Report" UI category —
87
- * includes static hardcoded subjects AND dynamic reports with `isDefault: true`.
88
- * Built by the caller from `portalTeamPermissions` + `customReportPermissions`.
89
- */
90
- export declare function filterRedundantReportPermissions(permissions: FdoPermissionRule[], defaultReportSubjects: Set<string>): FdoPermissionRule[];
91
- /**
92
- * Combine base permissions with override permissions to get effective permissions
93
- * @param basePermissions - Base permissions from permission sets
94
- * @param overridePermissions - Override permissions from permission user
95
- * @returns - Combined effective permissions
96
- */
97
- export declare function getEffectivePermissions(basePermissions: FdoPermissionRule[], overridePermissions: FdoPermissionRule[]): FdoPermissionRule[];
98
- /**
99
- * Compute the initial permissions for the permission editor.
100
- *
101
- * Like `getEffectivePermissions`, but also preserves "orphaned" inverted rules — denials whose
102
- * subject is NOT present in any base permission set (i.e. they target system-expanded subjects,
103
- * not permission-set-inherited subjects). These denials seed `visitedSetIds` in
104
- * `expandWithSystemPermissionSets` to block runtime re-expansion of system sets that the user
105
- * explicitly unchecked. Without them the editor would initialize without the denial guard and
106
- * those subjects would reappear as checked the next time the form opens.
107
- *
108
- * Inverted rules whose subject IS in base are handled correctly by `getEffectivePermissions`
109
- * already (they cancel the inherited grant) and do not need special treatment here.
110
- */
111
- export declare function getEditorPermissions(basePermissions: FdoPermissionRule[], customPermissions: FdoPermissionRule[]): FdoPermissionRule[];
@@ -1,5 +1,6 @@
1
1
  import type { RawRule } from '@casl/ability';
2
2
  import { F_RULE_SUBJECT, type FdoPermissionRule } from '@feedmepos/core/entity';
3
+ import { getManagableRestaurantIds, usableRoleIds } from '@feedmepos/hrm-permission/utils';
3
4
  import type { Rule } from '../types/role';
4
5
  export declare function filterPermissions(permissions: FdoPermissionRule[], subject: F_RULE_SUBJECT, availablePermissions?: FdoPermissionRule[]): string;
5
6
  export declare function ruleExtension(rule: FdoPermissionRule): {
@@ -19,7 +20,7 @@ export declare function ruleExtension(rule: FdoPermissionRule): {
19
20
  actions: ("update" | "create" | "read" | "delete" | "manage")[];
20
21
  };
21
22
  export declare function getMaxDiscount(rules: FdoPermissionRule[]): number;
22
- export declare function getManagableRestaurantIds(rules: (FdoPermissionRule | RawRule)[]): string[] | null;
23
+ export { getManagableRestaurantIds, usableRoleIds };
23
24
  export interface MasterUserAccess {
24
25
  /** null = every restaurant, [] = none */
25
26
  restaurantIds: string[] | null;
@@ -36,7 +37,6 @@ export declare function resolveMasterUserAccess(rules: (FdoPermissionRule | RawR
36
37
  isOwner: boolean;
37
38
  }): MasterUserAccess;
38
39
  export declare function hasAdminRule(rules: FdoPermissionRule[]): boolean;
39
- export declare function usableRoleIds(rules: (FdoPermissionRule | RawRule)[]): string[] | null;
40
40
  export declare function extractReportExtraCondition(rule: FdoPermissionRule): Record<string, unknown> | undefined;
41
41
  export declare function fromValue(values: string[], maxDiscountPercentage: number, periodConditions?: Map<string, Record<string, unknown>>): {
42
42
  subject: string;
@@ -20,6 +20,16 @@ export declare const useRestaurantStore: () => {
20
20
  };
21
21
  managable: boolean;
22
22
  }[]>;
23
+ restaurantsById: import("vue").ComputedRef<Map<string, {
24
+ _id: string;
25
+ businessId: string;
26
+ profile: {
27
+ name: string;
28
+ code?: string | undefined;
29
+ legalName: string;
30
+ };
31
+ managable: boolean;
32
+ }>>;
23
33
  $state: {
24
34
  isLoading: boolean;
25
35
  restaurants: {
@@ -52,6 +62,16 @@ export declare const useRestaurantStore: () => {
52
62
  };
53
63
  managable: boolean;
54
64
  }[]>;
65
+ restaurantsById: import("vue").ComputedRef<Map<string, {
66
+ _id: string;
67
+ businessId: string;
68
+ profile: {
69
+ name: string;
70
+ code?: string | undefined;
71
+ legalName: string;
72
+ };
73
+ managable: boolean;
74
+ }>>;
55
75
  isLoading: import("vue").Ref<boolean, boolean>;
56
76
  readRestaurants: (force?: boolean) => Promise<void>;
57
77
  }, "isLoading" | "restaurants">>;
@@ -102,6 +122,16 @@ export declare const useRestaurantStore: () => {
102
122
  };
103
123
  managable: boolean;
104
124
  }[]>;
125
+ restaurantsById: import("vue").ComputedRef<Map<string, {
126
+ _id: string;
127
+ businessId: string;
128
+ profile: {
129
+ name: string;
130
+ code?: string | undefined;
131
+ legalName: string;
132
+ };
133
+ managable: boolean;
134
+ }>>;
105
135
  isLoading: import("vue").Ref<boolean, boolean>;
106
136
  readRestaurants: (force?: boolean) => Promise<void>;
107
137
  }, "isLoading" | "restaurants">>, options?: {
@@ -127,6 +157,16 @@ export declare const useRestaurantStore: () => {
127
157
  };
128
158
  managable: boolean;
129
159
  }[]>;
160
+ restaurantsById: import("vue").ComputedRef<Map<string, {
161
+ _id: string;
162
+ businessId: string;
163
+ profile: {
164
+ name: string;
165
+ code?: string | undefined;
166
+ legalName: string;
167
+ };
168
+ managable: boolean;
169
+ }>>;
130
170
  isLoading: import("vue").Ref<boolean, boolean>;
131
171
  readRestaurants: (force?: boolean) => Promise<void>;
132
172
  }, "isLoading" | "restaurants">, Pick<{
@@ -149,9 +189,19 @@ export declare const useRestaurantStore: () => {
149
189
  };
150
190
  managable: boolean;
151
191
  }[]>;
192
+ restaurantsById: import("vue").ComputedRef<Map<string, {
193
+ _id: string;
194
+ businessId: string;
195
+ profile: {
196
+ name: string;
197
+ code?: string | undefined;
198
+ legalName: string;
199
+ };
200
+ managable: boolean;
201
+ }>>;
152
202
  isLoading: import("vue").Ref<boolean, boolean>;
153
203
  readRestaurants: (force?: boolean) => Promise<void>;
154
- }, never>, Pick<{
204
+ }, "restaurantsById">, Pick<{
155
205
  restaurants: import("vue").Ref<{
156
206
  _id: string;
157
207
  businessId: string;
@@ -171,6 +221,16 @@ export declare const useRestaurantStore: () => {
171
221
  };
172
222
  managable: boolean;
173
223
  }[]>;
224
+ restaurantsById: import("vue").ComputedRef<Map<string, {
225
+ _id: string;
226
+ businessId: string;
227
+ profile: {
228
+ name: string;
229
+ code?: string | undefined;
230
+ legalName: string;
231
+ };
232
+ managable: boolean;
233
+ }>>;
174
234
  isLoading: import("vue").Ref<boolean, boolean>;
175
235
  readRestaurants: (force?: boolean) => Promise<void>;
176
236
  }, "readRestaurants">>, detached?: boolean): () => void;
@@ -3,6 +3,8 @@ export interface FdtoMyPosProfile {
3
3
  hasPosUser: boolean;
4
4
  profile: null | {
5
5
  name: string;
6
+ /** The caller's own current passcode, shown on reveal (D50). */
7
+ passcode: string;
6
8
  phoneNumber: string | null;
7
9
  email: string | null;
8
10
  assignments: {
@@ -16,9 +18,6 @@ export interface FdtoMyPosProfile {
16
18
  };
17
19
  }
18
20
  export type FdtoMyPosProfileAssignment = NonNullable<FdtoMyPosProfile['profile']>['assignments'][number];
19
- export interface FdtoMyPosPasscode {
20
- passcode: string;
21
- }
22
21
  export interface FdtoRegenerateMyPosPasscodeRes {
23
22
  passcode: string;
24
23
  passcodeUpdatedAt: string;
@@ -257,6 +257,9 @@ export declare const i18nMessages: {
257
257
  update: string;
258
258
  delete: string;
259
259
  "generate-passcode": string;
260
+ invite: string;
261
+ "invite-update": string;
262
+ "invite-revoke": string;
260
263
  };
261
264
  "pos-user": {
262
265
  list: string;
@@ -605,6 +608,9 @@ export declare const i18nMessages: {
605
608
  update: string;
606
609
  delete: string;
607
610
  "generate-passcode": string;
611
+ invite: string;
612
+ "invite-update": string;
613
+ "invite-revoke": string;
608
614
  };
609
615
  "pos-user": {
610
616
  list: string;
@@ -953,6 +959,9 @@ export declare const i18nMessages: {
953
959
  update: string;
954
960
  delete: string;
955
961
  "generate-passcode": string;
962
+ invite: string;
963
+ "invite-update": string;
964
+ "invite-revoke": string;
956
965
  };
957
966
  "pos-user": {
958
967
  list: string;
@@ -1301,6 +1310,9 @@ export declare const i18nMessages: {
1301
1310
  update: string;
1302
1311
  delete: string;
1303
1312
  "generate-passcode": string;
1313
+ invite: string;
1314
+ "invite-update": string;
1315
+ "invite-revoke": string;
1304
1316
  };
1305
1317
  "pos-user": {
1306
1318
  list: string;
@@ -20,7 +20,6 @@ export declare const i18nMessages: {
20
20
  show: string;
21
21
  hide: string;
22
22
  change: string;
23
- revealFailed: string;
24
23
  };
25
24
  change: {
26
25
  title: string;
@@ -69,7 +68,6 @@ export declare const i18nMessages: {
69
68
  show: string;
70
69
  hide: string;
71
70
  change: string;
72
- revealFailed: string;
73
71
  };
74
72
  change: {
75
73
  title: string;
@@ -118,7 +116,6 @@ export declare const i18nMessages: {
118
116
  show: string;
119
117
  hide: string;
120
118
  change: string;
121
- revealFailed: string;
122
119
  };
123
120
  change: {
124
121
  title: string;
@@ -167,7 +164,6 @@ export declare const i18nMessages: {
167
164
  show: string;
168
165
  hide: string;
169
166
  change: string;
170
- revealFailed: string;
171
167
  };
172
168
  change: {
173
169
  title: string;