@feedmepos/mf-hrm-portal 2.3.2-dev.18 → 2.3.2-dev.19

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 (52) hide show
  1. package/dist/{ApprovalCodeList-Cv4-P7fX.js → ApprovalCodeList-CiZcp75s.js} +7 -7
  2. package/dist/{AuditLogList-KH-H5uzM.js → AuditLogList-AVdhUk22.js} +5 -5
  3. package/dist/{ConditionBuilderForm.vue_vue_type_script_setup_true_lang-BQq5xW8d.js → ConditionBuilderForm.vue_vue_type_script_setup_true_lang-CGsOJ4bA.js} +2 -2
  4. package/dist/{EmployeeList-BCjOwL1V.js → EmployeeList-DmB3wCwv.js} +8 -8
  5. package/dist/{FormSection.vue_vue_type_script_setup_true_lang-D4e5iSQq.js → FormSection.vue_vue_type_script_setup_true_lang-Qsc3hk6l.js} +1 -1
  6. package/dist/{GrantUserList-CfvdU440.js → GrantUserList-CUWnDKaH.js} +8 -8
  7. package/dist/{Main-CVF5eDBd.js → Main-CbJjQFFR.js} +10 -10
  8. package/dist/{Main-DKKGpzdb.js → Main-D7CAtkiV.js} +1328 -1339
  9. package/dist/{Main-YrCgPqZU.js → Main-DT4TJPRM.js} +5 -5
  10. package/dist/{MyPosProfile-z84_PtAn.js → MyPosProfile-EWK8IPlZ.js} +1 -1
  11. package/dist/{PermissionSetList-9xD_n1VF.js → PermissionSetList-D2HDsSFi.js} +6 -6
  12. package/dist/{PortalPermissionEditor.vue_vue_type_script_setup_true_lang-IX3av4mS.js → PortalPermissionEditor.vue_vue_type_script_setup_true_lang-BUSup81G.js} +551 -551
  13. package/dist/{PortalUserSearcher.vue_vue_type_style_index_0_scoped_827dfd60_lang-sPatt5hV.js → PortalUserSearcher.vue_vue_type_style_index_0_scoped_827dfd60_lang-B1sb_3ow.js} +2 -2
  14. package/dist/{RoleForm.vue_vue_type_script_setup_true_lang-CSsgsqvl.js → RoleForm.vue_vue_type_script_setup_true_lang-D-Gve4l8.js} +9 -9
  15. package/dist/{RoleList-oSqkcGgN.js → RoleList-DRFTQcwP.js} +7 -7
  16. package/dist/{ScheduleAddPositionModal.vue_vue_type_script_setup_true_lang-qJhZA2DN.js → ScheduleAddPositionModal.vue_vue_type_script_setup_true_lang-b96QQsiZ.js} +1 -1
  17. package/dist/{ScheduleGeneralPage-BxXDcGD4.js → ScheduleGeneralPage-DO6ZO_7t.js} +2 -2
  18. package/dist/{ScheduleModal.vue_vue_type_script_setup_true_lang-Dcr2USSq.js → ScheduleModal.vue_vue_type_script_setup_true_lang-BG0-qg1-.js} +4 -4
  19. package/dist/{SchedulePage-C_M2ABMR.js → SchedulePage-m9fYfgEO.js} +9 -9
  20. package/dist/{SchedulePositionPage-XaIHUH4A.js → SchedulePositionPage-B9M8bgu1.js} +3 -3
  21. package/dist/{SelectFilter-BzqdpDfg.js → SelectFilter-qanI8DEh.js} +1 -1
  22. package/dist/{TeamMemberList--WEaatay.js → TeamMemberList-D7PIM3xv.js} +12 -12
  23. package/dist/TimesheetList-C_XQe3jl.js +408 -0
  24. package/dist/{TimesheetList.vue_vue_type_style_index_0_scoped_63294af2_lang-GIIAlhti.js → TimesheetList.vue_vue_type_style_index_0_scoped_ffd7f807_lang-D6qTouaS.js} +7 -7
  25. package/dist/{app-DSUfooPD.js → app-BuJGxfu4.js} +10 -10
  26. package/dist/app.js +1 -1
  27. package/dist/{approval-code-BZYlghBT.js → approval-code-HPeWQne5.js} +1 -1
  28. package/dist/{dayjs.min-5UvwoDGv.js → dayjs.min-CLUgksBW.js} +1 -1
  29. package/dist/employee-DrsTtOKq.js +237 -0
  30. package/dist/{grant-user-CgvKn27g.js → grant-user-J6TSUXHn.js} +1 -1
  31. package/dist/{iteration-BFI7vEBg.js → index-Dl7XhjSB.js} +573 -558
  32. package/dist/{lodash-DJ0F99PK.js → lodash-CMqarlaS.js} +1 -1
  33. package/dist/{member-grant-BmthjLCk.js → member-grant-BeNgG3hd.js} +2 -2
  34. package/dist/{restaurant-CeR-XM1L.js → restaurant-9Y8x8pCL.js} +1 -1
  35. package/dist/role-COuuwMES.js +91 -0
  36. package/dist/rule-50_hBJQJ.js +845 -0
  37. package/dist/src/helpers/employee-merge.d.ts +33 -0
  38. package/dist/src/helpers/iteration.d.ts +9 -2
  39. package/dist/src/helpers/restaurant-lookup.d.ts +19 -0
  40. package/dist/src/helpers/role-merge.d.ts +11 -0
  41. package/dist/src/views/hr/timesheet/timesheet-view.d.ts +29 -0
  42. package/dist/style.css +1 -1
  43. package/dist/tsconfig.app.tsbuildinfo +1 -1
  44. package/dist/{useAppStore-KvMQH09O.js → useAppStore-BCvZUxKY.js} +1 -1
  45. package/dist/{useLoading-4s1zzjal.js → useLoading-BOt2Is3p.js} +1 -1
  46. package/dist/{useReportPermissions-BVxVU0SS.js → useReportPermissions-BVTpovDL.js} +3 -3
  47. package/dist/{useSsoProviders-CKRDQYcP.js → useSsoProviders-Bec-WHC7.js} +1 -1
  48. package/package.json +1 -1
  49. package/dist/TimesheetList-D6FG69-S.js +0 -402
  50. package/dist/employee-CT3TDtIM.js +0 -210
  51. package/dist/role-C2QeFrHr.js +0 -91
  52. package/dist/rule-CYsTf24V.js +0 -839
@@ -0,0 +1,33 @@
1
+ import type { Employee, IFdtoPosUser, IFdtoPosUserSummary } from '@/types/employee';
2
+ import type { HrmRestaurant } from '@/types/restaurant';
3
+ import type { Role } from '@/types/role';
4
+ import { type NamedRestaurant } from './restaurant-lookup';
5
+ /** One spreadsheet row of the employee export; keys are in column order. */
6
+ export interface EmployeeExportRow {
7
+ code: unknown;
8
+ name: string;
9
+ passcode: string;
10
+ since: string;
11
+ restaurant: string;
12
+ role: string;
13
+ }
14
+ /**
15
+ * Merges `pos-users` rows (one per employee per outlet) into one employee per `_id`.
16
+ *
17
+ * Each employee keeps the fields of its first row and lists every distinct outlet it is
18
+ * in, sorted by outlet name; employees are sorted by name. Ties keep first-seen order.
19
+ * Outlet and role names come from `new Map(...)`, so a duplicated id resolves to the last
20
+ * entry. One pass and one sort per list, so HQ staff in ~1,000 outlets stay cheap.
21
+ */
22
+ export declare function mergeEmployees(employees: readonly IFdtoPosUser[], restaurants: readonly HrmRestaurant[], roles: readonly Role[]): Employee[];
23
+ /**
24
+ * Returns a mapper from a `pos-users/paged` summary to an `Employee`. The outlet and role
25
+ * maps are built once here (duplicated id → last entry, as `new Map(...)`), not per summary.
26
+ */
27
+ export declare function createEmployeeSummaryMapper(restaurants: readonly HrmRestaurant[], roles: readonly Role[]): (summary: IFdtoPosUserSummary) => Employee;
28
+ /**
29
+ * Spreadsheet rows for the employee export: one row per employee outlet, with the
30
+ * employee's own fields on its first row only. Outlet and role names resolve to the first
31
+ * entry with that id, as `Array.find` did.
32
+ */
33
+ export declare function toEmployeeExportRows(employees: readonly Employee[], restaurants: readonly NamedRestaurant[], roles: readonly Role[]): EmployeeExportRow[];
@@ -1,9 +1,16 @@
1
1
  export declare function clone<T>(value: T, exceptKey?: string[]): T;
2
2
  type Selector<T> = keyof T | ((item: T) => string);
3
- export declare function sort<T>(arr: T[], option?: {
3
+ interface SortOption<T> {
4
4
  selector?: Selector<T>;
5
5
  descending?: boolean;
6
- } | undefined): T[];
6
+ }
7
+ /** Sorted JSON deep clone of `arr` (drops `undefined`, stringifies `Date`s, unwraps proxies). */
8
+ export declare function sort<T>(arr: T[], option?: SortOption<T> | undefined): T[];
9
+ /**
10
+ * Same order as `sort`, but returns a new array holding the original elements (no clone)
11
+ * and leaves `arr` untouched. Only use it on arrays the caller has just built.
12
+ */
13
+ export declare function sortShallow<T>(arr: readonly T[], option?: SortOption<T>): T[];
7
14
  export declare function group<T>(arr: T[], by: Selector<T>): {
8
15
  [key: string]: T[];
9
16
  };
@@ -0,0 +1,19 @@
1
+ /** The fields a lookup reads; HRM-store and mf-common core-store restaurants both fit. */
2
+ export interface NamedRestaurant {
3
+ _id: string;
4
+ profile: {
5
+ name: string;
6
+ };
7
+ }
8
+ export interface RestaurantLookup {
9
+ /** Outlet name by outlet id; the first restaurant with an id wins, like `Array.find`. */
10
+ nameById: ReadonlyMap<string, string>;
11
+ /** The name of every restaurant in the list, sorted like `sort()` (ties keep list order). */
12
+ allNamesSorted: readonly string[];
13
+ }
14
+ /**
15
+ * Lookup over a restaurant list, built once per list. Use it instead of
16
+ * `restaurants.find((r) => r._id === id)` inside loops: on a business with ~1,000 outlets
17
+ * that scan, repeated per row, freezes the tab.
18
+ */
19
+ export declare function getRestaurantLookup(restaurants: readonly NamedRestaurant[]): RestaurantLookup;
@@ -0,0 +1,11 @@
1
+ import type { HrmRestaurant } from '@/types/restaurant';
2
+ import type { IFdtoPosRole, Role } from '@/types/role';
3
+ /**
4
+ * Merges `pos-roles` rows (one per role per outlet) into one role per `_id`.
5
+ *
6
+ * Each role keeps the fields of its first row and lists every distinct outlet it is in
7
+ * (unknown outlet → empty name), sorted by outlet name; roles are sorted by name. Ties
8
+ * keep first-seen order. One pass and one sort per list, so it stays fast with ~1,000
9
+ * outlets × 8 roles.
10
+ */
11
+ export declare function mergeRoles(roles: readonly IFdtoPosRole[], restaurants: readonly HrmRestaurant[]): Role[];
@@ -0,0 +1,29 @@
1
+ import type { Employee } from '@/types/employee';
2
+ import type { HrmRestaurant } from '@/types/restaurant';
3
+ import type { Timesheet } from '@/types/timesheet';
4
+ /** A list-view row: the timesheet with its outlet code and the employee's code. */
5
+ export type TimesheetRow = Timesheet & {
6
+ restaurantCode?: string;
7
+ user: Timesheet['user'] & {
8
+ code?: string;
9
+ };
10
+ };
11
+ /** A user-view row: one employee name with their timesheets and the total time. */
12
+ export interface TimesheetGroup {
13
+ key: string;
14
+ user: string;
15
+ code: string | undefined;
16
+ timesheets: TimesheetRow[];
17
+ total: string;
18
+ }
19
+ /**
20
+ * Timesheets in the selected outlets (a falsy selection means all) with the outlet code and
21
+ * the employee code attached. Both lookups are built once per call instead of scanning every
22
+ * outlet and every employee per timesheet.
23
+ */
24
+ export declare function attachTimesheetCodes(timesheets: readonly Timesheet[], restaurants: readonly HrmRestaurant[], employees: readonly Employee[], selectedRestaurantIds: readonly string[] | null | undefined): TimesheetRow[];
25
+ /**
26
+ * Rows grouped by employee name and sorted by it. A group's code is its first timesheet's
27
+ * employee code (or the row's own code when that employee is gone).
28
+ */
29
+ export declare function groupTimesheetsByUser(rows: readonly TimesheetRow[], employees: readonly Employee[]): TimesheetGroup[];