@feedmepos/mf-hrm-portal 2.1.1-dev.4 → 2.1.1-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 (40) hide show
  1. package/dist/ApprovalCodeList-B1XHbhum.js +757 -0
  2. package/dist/AuditLogList-DrrL4vf4.js +1149 -0
  3. package/dist/{ConditionFormHost.vue_vue_type_script_setup_true_lang-zJwkM_Xb.js → ConditionFormHost.vue_vue_type_script_setup_true_lang-CBjO1MZo.js} +2 -2
  4. package/dist/{EmployeeList-DN2pnXcS.js → EmployeeList-BMol4ah4.js} +7 -8
  5. package/dist/{GrantUserList-DoyxknJZ.js → GrantUserList-CLBl7FZ-.js} +3 -3
  6. package/dist/{Main-DQj4xtkB.js → Main-DNOHZd3j.js} +5 -5
  7. package/dist/{Main-B5BKGpLg.js → Main-D_LwrBdZ.js} +9 -9
  8. package/dist/{Main-BGONIxo8.js → Main-auigiuVZ.js} +2 -2
  9. package/dist/{PermissionSetList-4uIU9FvN.js → PermissionSetList-DLYrXFbz.js} +5 -5
  10. package/dist/{PortalPermissionEditor.vue_vue_type_script_setup_true_lang-D0luaKDb.js → PortalPermissionEditor.vue_vue_type_script_setup_true_lang-Drcx0tL_.js} +763 -763
  11. package/dist/{RoleList-Bj5Y5jd_.js → RoleList-g8PjH_k2.js} +7 -7
  12. package/dist/{TeamMemberList-Byjlca2Y.js → TeamMemberList-B9aCagSc.js} +21 -22
  13. package/dist/{TimesheetList-DwIcsOM-.js → TimesheetList-C1IJhOYE.js} +5 -5
  14. package/dist/{TimesheetList.vue_vue_type_style_index_0_scoped_2c7a177a_lang-B9qlQ6KG.js → TimesheetList.vue_vue_type_style_index_0_scoped_2c7a177a_lang-CqtiVm1j.js} +2 -2
  15. package/dist/{app-BZwE2coe.js → app-DnOYVjuj.js} +500 -804
  16. package/dist/app.js +1 -1
  17. package/dist/{dayjs.min-BXBPls4m.js → dayjs.min-Dxul0qTK.js} +1 -1
  18. package/dist/{employee-CJTbs1f7.js → employee-sr65CZR7.js} +3 -3
  19. package/dist/{iteration-BCbIbdHR.js → iteration-DIqDMvFa.js} +1 -1
  20. package/dist/{lodash-CUIS1iIz.js → lodash-CXlqXFmD.js} +1 -1
  21. package/dist/{role-CzXchcSS.js → role-CE3NY-63.js} +1 -1
  22. package/dist/{rule-BO6xj2Xa.js → rule-CEjrit6c.js} +2 -2
  23. package/dist/src/api/audit-log/index.d.ts +0 -6
  24. package/dist/src/stores/approval-code.d.ts +6 -6
  25. package/dist/src/types/approval-code.d.ts +51 -26
  26. package/dist/src/types/audit-log.d.ts +1 -1
  27. package/dist/src/views/approval-code/ApprovalCodeList.vue.d.ts +1 -1
  28. package/dist/src/views/approval-code/locales/index.d.ts +4 -12
  29. package/dist/src/views/audit-log/locales/index.d.ts +0 -296
  30. package/dist/style.css +1 -1
  31. package/dist/tsconfig.app.tsbuildinfo +1 -1
  32. package/dist/useDebounce-CWb5QR9G.js +28 -0
  33. package/dist/{useReportPermissions-Q-xLwz5N.js → useReportPermissions-FVW_HwcL.js} +3 -3
  34. package/package.json +1 -1
  35. package/dist/ApprovalCodeList-B0PLZwav.js +0 -758
  36. package/dist/AuditLogList-CRXwPImZ.js +0 -1611
  37. package/dist/Skeleton.vue_vue_type_script_setup_true_lang-B4PxNMwq.js +0 -16
  38. package/dist/src/views/audit-log/event-line.d.ts +0 -13
  39. package/dist/src/views/audit-log/snapshot-diff.d.ts +0 -11
  40. package/dist/useDebounce-B8ZPVS5C.js +0 -15
package/dist/app.js CHANGED
@@ -1,4 +1,4 @@
1
- import { j as e, i as r, r as o } from "./app-BZwE2coe.js";
1
+ import { j as e, i as r, r as o } from "./app-DnOYVjuj.js";
2
2
  export {
3
3
  e as FmApp,
4
4
  r as i18nMessages,
@@ -1,4 +1,4 @@
1
- import { g as Q, c as K } from "./app-BZwE2coe.js";
1
+ import { g as Q, c as K } from "./app-DnOYVjuj.js";
2
2
  var E = { exports: {} };
3
3
  (function(V, X) {
4
4
  (function(W, k) {
@@ -1,10 +1,10 @@
1
- import { d as g } from "./dayjs.min-BXBPls4m.js";
1
+ import { d as g } from "./dayjs.min-Dxul0qTK.js";
2
2
  import { defineStore as $, storeToRefs as T } from "pinia";
3
3
  import { ref as m } from "vue";
4
- import { s as E } from "./iteration-BCbIbdHR.js";
4
+ import { s as E } from "./iteration-DIqDMvFa.js";
5
5
  import { b as i, g as f, u as w } from "./restaurant-YOVMuuFY.js";
6
6
  import { i as v } from "./utils-BZkjJbju.js";
7
- import { u as _ } from "./role-CzXchcSS.js";
7
+ import { u as _ } from "./role-CE3NY-63.js";
8
8
  const o = {
9
9
  async readEmployees() {
10
10
  return f(await i().get("/pos-users"));
@@ -1,4 +1,4 @@
1
- import { c as B } from "./app-BZwE2coe.js";
1
+ import { c as B } from "./app-DnOYVjuj.js";
2
2
  var ma = {}, Zt = {}, l = {}, ji = {}, Ei = {}, Ii = {}, Dn = {};
3
3
  (function(e) {
4
4
  Object.defineProperty(e, "__esModule", { value: !0 }), e.getParsedType = e.ZodParsedType = e.util = void 0;
@@ -1,4 +1,4 @@
1
- import { c as jt } from "./app-BZwE2coe.js";
1
+ import { c as jt } from "./app-DnOYVjuj.js";
2
2
  var Jr = { exports: {} };
3
3
  /**
4
4
  * @license
@@ -1,7 +1,7 @@
1
1
  import { defineStore as S, storeToRefs as _ } from "pinia";
2
2
  import { ref as w } from "vue";
3
3
  import { useCoreStore as g } from "@feedmepos/mf-common";
4
- import { s as y } from "./iteration-BCbIbdHR.js";
4
+ import { s as y } from "./iteration-DIqDMvFa.js";
5
5
  import { g as d, b as f, u as I } from "./restaurant-YOVMuuFY.js";
6
6
  const R = {
7
7
  async readRoles() {
@@ -1,5 +1,5 @@
1
- import { s as W, c as Z, e as y } from "./iteration-BCbIbdHR.js";
2
- import { h as A, P as V, d as _, v as F, n as j, b as q } from "./app-BZwE2coe.js";
1
+ import { s as W, c as Z, e as y } from "./iteration-DIqDMvFa.js";
2
+ import { h as A, P as V, d as _, v as F, n as j, b as q } from "./app-DnOYVjuj.js";
3
3
  import { s as ee } from "./utils-BZkjJbju.js";
4
4
  import { g as b, b as v, q as k, u as ne } from "./restaurant-YOVMuuFY.js";
5
5
  import { defineStore as z, storeToRefs as K } from "pinia";
@@ -9,9 +9,6 @@ declare const AuditLogAPI: {
9
9
  actions?: string[];
10
10
  outcomes?: string[];
11
11
  feedmeAdminActors?: boolean;
12
- search?: string;
13
- searchUserIds?: string[];
14
- searchSubjects?: string[];
15
12
  }): Promise<number>;
16
13
  read(params?: {
17
14
  limit?: number;
@@ -24,9 +21,6 @@ declare const AuditLogAPI: {
24
21
  actions?: string[];
25
22
  outcomes?: string[];
26
23
  feedmeAdminActors?: boolean;
27
- search?: string;
28
- searchUserIds?: string[];
29
- searchSubjects?: string[];
30
24
  }): Promise<AuditLogEntry[]>;
31
25
  /**
32
26
  * FeedMe-admin options for the User filter. `actors` is the named admin list (internal
@@ -11,7 +11,7 @@ export declare const useApprovalCodeStore: import("pinia").StoreDefinition<"appr
11
11
  key: import("@/types/approval-code").ApprovalCodePermission;
12
12
  subject: string;
13
13
  actions: string[];
14
- conditions?: Record<string, unknown> | undefined;
14
+ conditions?: (Record<string, unknown> | null) | undefined;
15
15
  }[];
16
16
  status: "active" | "used" | "revoked";
17
17
  usedAt?: string | undefined;
@@ -31,7 +31,7 @@ export declare const useApprovalCodeStore: import("pinia").StoreDefinition<"appr
31
31
  key: import("@/types/approval-code").ApprovalCodePermission;
32
32
  subject: string;
33
33
  actions: string[];
34
- conditions?: Record<string, unknown> | undefined;
34
+ conditions?: (Record<string, unknown> | null) | undefined;
35
35
  }[];
36
36
  status: "active" | "used" | "revoked";
37
37
  usedAt?: string | undefined;
@@ -57,7 +57,7 @@ export declare const useApprovalCodeStore: import("pinia").StoreDefinition<"appr
57
57
  key: import("@/types/approval-code").ApprovalCodePermission;
58
58
  subject: string;
59
59
  actions: string[];
60
- conditions?: Record<string, unknown> | undefined;
60
+ conditions?: (Record<string, unknown> | null) | undefined;
61
61
  }[];
62
62
  status: "active" | "used" | "revoked";
63
63
  usedAt?: string | undefined;
@@ -77,7 +77,7 @@ export declare const useApprovalCodeStore: import("pinia").StoreDefinition<"appr
77
77
  key: import("@/types/approval-code").ApprovalCodePermission;
78
78
  subject: string;
79
79
  actions: string[];
80
- conditions?: Record<string, unknown> | undefined;
80
+ conditions?: (Record<string, unknown> | null) | undefined;
81
81
  }[];
82
82
  status: "active" | "used" | "revoked";
83
83
  usedAt?: string | undefined;
@@ -103,7 +103,7 @@ export declare const useApprovalCodeStore: import("pinia").StoreDefinition<"appr
103
103
  key: import("@/types/approval-code").ApprovalCodePermission;
104
104
  subject: string;
105
105
  actions: string[];
106
- conditions?: Record<string, unknown> | undefined;
106
+ conditions?: (Record<string, unknown> | null) | undefined;
107
107
  }[];
108
108
  status: "active" | "used" | "revoked";
109
109
  usedAt?: string | undefined;
@@ -123,7 +123,7 @@ export declare const useApprovalCodeStore: import("pinia").StoreDefinition<"appr
123
123
  key: import("@/types/approval-code").ApprovalCodePermission;
124
124
  subject: string;
125
125
  actions: string[];
126
- conditions?: Record<string, unknown> | undefined;
126
+ conditions?: (Record<string, unknown> | null) | undefined;
127
127
  }[];
128
128
  status: "active" | "used" | "revoked";
129
129
  usedAt?: string | undefined;
@@ -1,37 +1,49 @@
1
- export declare const APPROVAL_CODE_PERMISSIONS: readonly ["void", "refund", "discount", "changePrice", "claimDeposit", "payment", "resend", "changePaymentType", "openDrawer", "openCounter", "closeCounter", "printReceipt"];
1
+ export declare const APPROVAL_CODE_PERMISSIONS: readonly ["void", "refund", "discount", "changePrice", "claimDeposit", "payment", "resend", "changePaymentType", "openDrawer", "counter"];
2
2
  export type ApprovalCodePermission = (typeof APPROVAL_CODE_PERMISSIONS)[number];
3
3
  /**
4
4
  * A single CASL-shaped rule keyed by the approval-code action it grants, as
5
5
  * stored/returned by the backend. Mirrors `FdoApprovalCodeRule` from
6
- * `apps/hrm-backend/src/grant-user/grant-user.entity.ts`.
6
+ * `apps/hrm-backend/src/grant-user/grant-user.entity.ts`. `conditions` is
7
+ * `null` (not just absent) for keys whose full-POS counterpart carries no
8
+ * conditions at all (see `APPROVAL_CODE_RULE_TEMPLATES`).
7
9
  */
8
10
  export interface IFdtoApprovalCodeRule {
9
11
  key: ApprovalCodePermission;
10
12
  subject: string;
11
13
  actions: string[];
12
- conditions?: Record<string, unknown>;
14
+ conditions?: Record<string, unknown> | null;
13
15
  }
14
16
  /**
15
17
  * The rule template (subject/actions/conditions, minus `key`) for every
16
18
  * approval-code permission the portal can grant. The portal is now the
17
19
  * owner of these shapes (KDI-4982 Task A2) — the backend only validates the
18
20
  * shape of whatever rule it receives, it no longer composes rules itself.
19
- * These values were copied verbatim from the backend's server-side
20
- * key-to-rule manifest before it was deleted; they must keep matching
21
- * `FdoApprovalCodeRule`'s shape validation in
22
- * `apps/hrm-backend/src/grant-user/grant-user.entity.ts`.
21
+ * These shapes are not arbitrary: they mirror `FullPosPermissions`
22
+ * (`packages/permission/src/common/full-pos-permissions.ts`) exactly, entry
23
+ * for entry, so a code granting one of these keys evaluates identically to
24
+ * the corresponding rule a full-POS-permission staff member already has.
25
+ * That's why `refund`/`openDrawer`/`counter` carry `conditions: null` — full
26
+ * POS has no `operation` condition on those subjects — and why `discount`
27
+ * always carries an `adjustment` condition (full POS's unbounded discount
28
+ * rule is `adjustment: { $lte: 1 }`, i.e. "up to 100%", not "no adjustment
29
+ * condition at all"). `counter` is a single key (not separate open/close
30
+ * keys) because POS guards both opening and closing a counter with the same
31
+ * `counterRecord`/`manage` permission — two identical rules would just be
32
+ * redundant.
23
33
  */
24
34
  export declare const APPROVAL_CODE_RULE_TEMPLATES: Record<ApprovalCodePermission, {
25
35
  subject: string;
26
36
  actions: string[];
27
- conditions: Record<string, unknown>;
37
+ conditions: Record<string, unknown> | null;
28
38
  }>;
29
39
  /**
30
40
  * Compose the full CASL-shaped rule for `key`, ready to send to the backend
31
- * as-is. Only `discount` honors `params.maxPercentage`, appending it as an
32
- * `adjustment: { $lte: maxPercentage / 100 } }` condition every other key
33
- * ignores `params` if passed, matching the deleted backend manifest's
34
- * `buildRule` behavior.
41
+ * as-is, saved shape-identical to the corresponding `FullPosPermissions`
42
+ * entry. Keys whose template has `conditions: null` always return `null`
43
+ * there's nothing to clone. Only `discount` honors `params.maxPercentage`,
44
+ * setting the `adjustment.$lte` fraction (defaulting to `1`, i.e. no
45
+ * effective ceiling, matching full POS's unbounded discount rule) — every
46
+ * other object-conditions key ignores `params` if passed.
35
47
  */
36
48
  export declare function buildApprovalCodeRule(key: ApprovalCodePermission, params?: {
37
49
  maxPercentage?: number;
@@ -61,7 +73,11 @@ export interface IFdtoCreateApprovalCodeReq {
61
73
  /**
62
74
  * Read the discount ceiling back out of a rule's `conditions.adjustment.$lte`
63
75
  * fraction (0-1) as a whole percentage (1-100). Returns `undefined` when the
64
- * rule has no adjustment ceiling.
76
+ * rule has no adjustment ceiling, when `conditions` is `null` (full-POS-style
77
+ * null-condition rules never carry an adjustment), or when the ceiling is
78
+ * 100% — `$lte: 1` is the unbounded/default form (see
79
+ * `APPROVAL_CODE_RULE_TEMPLATES.discount`), so showing "≤100%" would be
80
+ * meaningless noise on every plain discount grant.
65
81
  */
66
82
  export declare function getRuleAdjustmentCeilingPercentage(rule: IFdtoApprovalCodeRule): number | undefined;
67
83
  /**
@@ -71,12 +87,17 @@ export declare function getRuleAdjustmentCeilingPercentage(rule: IFdtoApprovalCo
71
87
  */
72
88
  export declare function formatPermissionLabels(permissions: IFdtoApprovalCodeRule[], translate: (key: string) => string): string[];
73
89
  /**
74
- * Clipboard text for sharing a code passcode plus its actions and
75
- * restaurant (e.g. "Code 3843 · Refund · Gulu-gulu Main") so the recipient
76
- * can tell what the code unlocks and where without opening the portal.
90
+ * The shared context of a code (or batch of codes): who it's named for, what
91
+ * it unlocks, and where — e.g. "Cashier 1 · Refund · Gulu-gulu Main".
77
92
  * Missing parts are skipped rather than leaving dangling separators.
78
93
  */
79
- export declare function buildCodeClipboardText(code: Pick<IFdtoApprovalCode, 'passcode' | 'permissions'>, restaurantName: string | undefined, translate: (key: string) => string): string;
94
+ export declare function buildCodeContextLine(code: Pick<IFdtoApprovalCode, 'name' | 'permissions'>, restaurantName: string | undefined, translate: (key: string) => string): string;
95
+ /**
96
+ * Clipboard text for sharing a single code — the context line with the
97
+ * passcode appended (e.g. "Cashier 1 · Refund · Gulu-gulu Main · Code 3843"),
98
+ * matching the batch format's context-first ordering.
99
+ */
100
+ export declare function buildCodeClipboardText(code: Pick<IFdtoApprovalCode, 'name' | 'passcode' | 'permissions'>, restaurantName: string | undefined, translate: (key: string) => string): string;
80
101
  /**
81
102
  * Validate the optional discount max-percentage input. Undefined, empty, or
82
103
  * whitespace-only means "no ceiling" and is valid; otherwise the value must
@@ -91,18 +112,22 @@ export declare function validateMaxPercentage(value: number | string | undefined
91
112
  export declare function resolveMaxPercentage(value: number | string | undefined): number | undefined;
92
113
  /**
93
114
  * A selectable action option in the create form / list filter (KDI-4982 UI
94
- * redesign). The 9 options mirror the POS v7 passcode prompts exactly:
115
+ * redesign). The 8 options mirror the POS v7 passcode prompts exactly:
95
116
  * `claimDeposit` and `payment` are not offered (neither has a passcode prompt
96
- * on POS v7), and open/close counter share one option because POS guards both
97
- * with the same `counterRecord` permission. `changePrice` is offered as
98
- * "Input Custom Price" — POS prompts for a passcode when a custom price is
99
- * keyed in. The 12-key `APPROVAL_CODE_PERMISSIONS` enum is untouched stored
100
- * rules and the wire format still use the full key set, so legacy codes keep
101
- * rendering.
117
+ * on POS v7) even though both have `APPROVAL_CODE_RULE_TEMPLATES` entries
118
+ * matching full POS. `changePrice` is offered as "Input Custom Price" — POS
119
+ * prompts for a passcode when a custom price is keyed in. `counter` covers
120
+ * both opening and closing a counter (one `counterRecord`/`manage` rule, see
121
+ * `APPROVAL_CODE_RULE_TEMPLATES.counter`). `printReceipt` was dropped
122
+ * entirely (no full-POS counterpart, and this feature has no pre-existing
123
+ * stored data to keep rendering) — there is a 1:1 mapping between every
124
+ * option and its single `ApprovalCodePermission` rule key, so each option
125
+ * carries `ruleKey` directly rather than an array (there is no longer any
126
+ * option backed by more than one rule).
102
127
  */
103
128
  export interface AccessCodeActionOption {
104
- key: 'printReceipt' | 'resend' | 'openDrawer' | 'counter' | 'discount' | 'changePrice' | 'void' | 'changePaymentType' | 'refund';
105
- ruleKeys: ApprovalCodePermission[];
129
+ key: 'resend' | 'openDrawer' | 'counter' | 'discount' | 'changePrice' | 'void' | 'changePaymentType' | 'refund';
130
+ ruleKey: ApprovalCodePermission;
106
131
  }
107
132
  export type AccessCodeActionOptionKey = AccessCodeActionOption['key'];
108
133
  export declare const ACCESS_CODE_ACTION_OPTIONS: AccessCodeActionOption[];
@@ -1 +1 @@
1
- export type { AuditLogEntry, AuditLogMetadata, AuditLogOperation, AuditLogOutcome, AuditLogResolvedFrom, } from '@feedmepos/hrm-permission';
1
+ export type { AuditLogEntry, AuditLogMetadata, AuditLogOutcome, AuditLogResolvedFrom } from '@feedmepos/hrm-permission';
@@ -12,7 +12,7 @@ declare const _default: import("vue").DefineComponent<{}, {
12
12
  key: import("@/types/approval-code").ApprovalCodePermission;
13
13
  subject: string;
14
14
  actions: string[];
15
- conditions?: Record<string, unknown> | undefined;
15
+ conditions?: (Record<string, unknown> | null) | undefined;
16
16
  }[];
17
17
  status: "active" | "used" | "revoked";
18
18
  usedAt?: string | undefined;
@@ -12,6 +12,7 @@ export declare const i18nMessages: {
12
12
  title: string;
13
13
  section: string;
14
14
  name: string;
15
+ namePlaceholder: string;
15
16
  nameRequired: string;
16
17
  restaurant: string;
17
18
  selectRestaurant: string;
@@ -48,9 +49,6 @@ export declare const i18nMessages: {
48
49
  resend: string;
49
50
  changePaymentType: string;
50
51
  openDrawer: string;
51
- openCounter: string;
52
- closeCounter: string;
53
- printReceipt: string;
54
52
  counter: string;
55
53
  };
56
54
  create: {
@@ -101,6 +99,7 @@ export declare const i18nMessages: {
101
99
  title: string;
102
100
  section: string;
103
101
  name: string;
102
+ namePlaceholder: string;
104
103
  nameRequired: string;
105
104
  restaurant: string;
106
105
  selectRestaurant: string;
@@ -137,9 +136,6 @@ export declare const i18nMessages: {
137
136
  resend: string;
138
137
  changePaymentType: string;
139
138
  openDrawer: string;
140
- openCounter: string;
141
- closeCounter: string;
142
- printReceipt: string;
143
139
  counter: string;
144
140
  };
145
141
  create: {
@@ -190,6 +186,7 @@ export declare const i18nMessages: {
190
186
  title: string;
191
187
  section: string;
192
188
  name: string;
189
+ namePlaceholder: string;
193
190
  nameRequired: string;
194
191
  restaurant: string;
195
192
  selectRestaurant: string;
@@ -226,9 +223,6 @@ export declare const i18nMessages: {
226
223
  resend: string;
227
224
  changePaymentType: string;
228
225
  openDrawer: string;
229
- openCounter: string;
230
- closeCounter: string;
231
- printReceipt: string;
232
226
  counter: string;
233
227
  };
234
228
  create: {
@@ -279,6 +273,7 @@ export declare const i18nMessages: {
279
273
  title: string;
280
274
  section: string;
281
275
  name: string;
276
+ namePlaceholder: string;
282
277
  nameRequired: string;
283
278
  restaurant: string;
284
279
  selectRestaurant: string;
@@ -315,9 +310,6 @@ export declare const i18nMessages: {
315
310
  resend: string;
316
311
  changePaymentType: string;
317
312
  openDrawer: string;
318
- openCounter: string;
319
- closeCounter: string;
320
- printReceipt: string;
321
313
  counter: string;
322
314
  };
323
315
  create: {