@acorex-platform/module-report-management-server 0.0.15 → 2.0.0-next.42

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 (209) hide show
  1. package/contracts/src/commands.keys.d.ts +11 -0
  2. package/contracts/src/commands.keys.js +17 -0
  3. package/contracts/src/commands.keys.js.map +1 -0
  4. package/contracts/src/entities/index.d.ts +3 -0
  5. package/contracts/src/entities/index.js +3 -0
  6. package/contracts/src/entities/index.js.map +1 -1
  7. package/contracts/src/entities/query-snapshot/index.d.ts +1 -0
  8. package/contracts/src/entities/query-snapshot/index.js +5 -0
  9. package/contracts/src/entities/query-snapshot/index.js.map +1 -0
  10. package/contracts/src/entities/query-snapshot/query-snapshot.entity.d.ts +2 -0
  11. package/contracts/src/entities/query-snapshot/query-snapshot.entity.js +127 -0
  12. package/contracts/src/entities/query-snapshot/query-snapshot.entity.js.map +1 -0
  13. package/contracts/src/entities/query-snapshot/query-snapshot.types.d.ts +34 -0
  14. package/contracts/src/entities/query-snapshot/query-snapshot.types.js +5 -0
  15. package/contracts/src/entities/query-snapshot/query-snapshot.types.js.map +1 -0
  16. package/contracts/src/entities/query-snapshot-policy/index.d.ts +1 -0
  17. package/contracts/src/entities/query-snapshot-policy/index.js +5 -0
  18. package/contracts/src/entities/query-snapshot-policy/index.js.map +1 -0
  19. package/contracts/src/entities/query-snapshot-policy/query-snapshot-policy.entity.d.ts +2 -0
  20. package/contracts/src/entities/query-snapshot-policy/query-snapshot-policy.entity.js +100 -0
  21. package/contracts/src/entities/query-snapshot-policy/query-snapshot-policy.entity.js.map +1 -0
  22. package/contracts/src/entities/query-snapshot-policy/query-snapshot-policy.types.d.ts +14 -0
  23. package/contracts/src/entities/query-snapshot-policy/query-snapshot-policy.types.js +5 -0
  24. package/contracts/src/entities/query-snapshot-policy/query-snapshot-policy.types.js.map +1 -0
  25. package/contracts/src/entities/report/index.d.ts +1 -1
  26. package/contracts/src/entities/report/index.js +1 -1
  27. package/contracts/src/entities/report/index.js.map +1 -1
  28. package/contracts/src/entities/report/report.entity.js +51 -7
  29. package/contracts/src/entities/report/report.entity.js.map +1 -1
  30. package/contracts/src/entities/report-category/index.d.ts +1 -1
  31. package/contracts/src/entities/report-category/index.js +0 -2
  32. package/contracts/src/entities/report-category/index.js.map +1 -1
  33. package/contracts/src/entities/report-category/report-category.entity.js +14 -1
  34. package/contracts/src/entities/report-category/report-category.entity.js.map +1 -1
  35. package/contracts/src/entities/report-generation-request/index.d.ts +1 -0
  36. package/contracts/src/entities/report-generation-request/index.js +5 -0
  37. package/contracts/src/entities/report-generation-request/index.js.map +1 -0
  38. package/contracts/src/entities/report-generation-request/report-generation-request.entity.d.ts +2 -0
  39. package/contracts/src/entities/report-generation-request/report-generation-request.entity.js +208 -0
  40. package/contracts/src/entities/report-generation-request/report-generation-request.entity.js.map +1 -0
  41. package/contracts/src/entity-catalog.d.ts +7 -0
  42. package/contracts/src/entity-catalog.js +24 -0
  43. package/contracts/src/entity-catalog.js.map +1 -0
  44. package/contracts/src/entity-entry.query-snapshot-policy.d.ts +1 -0
  45. package/contracts/src/entity-entry.query-snapshot-policy.js +6 -0
  46. package/contracts/src/entity-entry.query-snapshot-policy.js.map +1 -0
  47. package/contracts/src/entity-entry.query-snapshot.d.ts +1 -0
  48. package/contracts/src/entity-entry.query-snapshot.js +6 -0
  49. package/contracts/src/entity-entry.query-snapshot.js.map +1 -0
  50. package/contracts/src/entity-entry.report-category.d.ts +1 -0
  51. package/contracts/src/entity-entry.report-category.js +6 -0
  52. package/contracts/src/entity-entry.report-category.js.map +1 -0
  53. package/contracts/src/entity-entry.report-generation-request.d.ts +1 -0
  54. package/contracts/src/entity-entry.report-generation-request.js +6 -0
  55. package/contracts/src/entity-entry.report-generation-request.js.map +1 -0
  56. package/contracts/src/entity-entry.report.d.ts +1 -0
  57. package/contracts/src/entity-entry.report.js +6 -0
  58. package/contracts/src/entity-entry.report.js.map +1 -0
  59. package/contracts/src/index.d.ts +5 -0
  60. package/contracts/src/index.js +5 -0
  61. package/contracts/src/index.js.map +1 -1
  62. package/contracts/src/manifest.d.ts +6 -0
  63. package/contracts/src/manifest.js +24 -0
  64. package/contracts/src/manifest.js.map +1 -0
  65. package/contracts/src/permission.keys.d.ts +30 -14
  66. package/contracts/src/permission.keys.js +28 -12
  67. package/contracts/src/permission.keys.js.map +1 -1
  68. package/contracts/src/report-generation.types.d.ts +97 -0
  69. package/contracts/src/report-generation.types.js +14 -0
  70. package/contracts/src/report-generation.types.js.map +1 -0
  71. package/contracts/src/report.types.d.ts +107 -107
  72. package/contracts/src/report.types.js.map +1 -1
  73. package/contracts/src/root-config.d.ts +23 -2
  74. package/contracts/src/root-config.js +23 -2
  75. package/contracts/src/root-config.js.map +1 -1
  76. package/contracts/src/runtime.keys.d.ts +14 -0
  77. package/contracts/src/runtime.keys.js +20 -0
  78. package/contracts/src/runtime.keys.js.map +1 -0
  79. package/contracts/src/settings.keys.d.ts +11 -0
  80. package/contracts/src/settings.keys.js +17 -0
  81. package/contracts/src/settings.keys.js.map +1 -0
  82. package/package.json +8 -8
  83. package/server/src/index.d.ts +2 -4
  84. package/server/src/index.js +5 -8
  85. package/server/src/index.js.map +1 -1
  86. package/server/src/lib/entities/index.d.ts +1 -0
  87. package/server/src/lib/entities/index.js +5 -0
  88. package/server/src/lib/entities/index.js.map +1 -0
  89. package/server/src/lib/entities/report-management.entity-catalog.d.ts +1 -0
  90. package/server/src/lib/entities/report-management.entity-catalog.js +12 -0
  91. package/server/src/lib/entities/report-management.entity-catalog.js.map +1 -0
  92. package/server/src/lib/query-snapshots/query-snapshot-bypass.util.d.ts +3 -0
  93. package/server/src/lib/query-snapshots/query-snapshot-bypass.util.js +16 -0
  94. package/server/src/lib/query-snapshots/query-snapshot-bypass.util.js.map +1 -0
  95. package/server/src/lib/query-snapshots/query-snapshot-debounce.service.d.ts +19 -0
  96. package/server/src/lib/query-snapshots/query-snapshot-debounce.service.js +118 -0
  97. package/server/src/lib/query-snapshots/query-snapshot-debounce.service.js.map +1 -0
  98. package/server/src/lib/query-snapshots/query-snapshot-enqueue.service.d.ts +24 -0
  99. package/server/src/lib/query-snapshots/query-snapshot-enqueue.service.js +61 -0
  100. package/server/src/lib/query-snapshots/query-snapshot-enqueue.service.js.map +1 -0
  101. package/server/src/lib/query-snapshots/query-snapshot-entity-change.middleware.d.ts +12 -0
  102. package/server/src/lib/query-snapshots/query-snapshot-entity-change.middleware.js +90 -0
  103. package/server/src/lib/query-snapshots/query-snapshot-entity-change.middleware.js.map +1 -0
  104. package/server/src/lib/query-snapshots/query-snapshot-entity-storage.bootstrap.d.ts +9 -0
  105. package/server/src/lib/query-snapshots/query-snapshot-entity-storage.bootstrap.js +25 -0
  106. package/server/src/lib/query-snapshots/query-snapshot-entity-storage.bootstrap.js.map +1 -0
  107. package/server/src/lib/query-snapshots/query-snapshot-payload.util.d.ts +22 -0
  108. package/server/src/lib/query-snapshots/query-snapshot-payload.util.js +282 -0
  109. package/server/src/lib/query-snapshots/query-snapshot-payload.util.js.map +1 -0
  110. package/server/src/lib/query-snapshots/query-snapshot-recalc.service.d.ts +23 -0
  111. package/server/src/lib/query-snapshots/query-snapshot-recalc.service.js +122 -0
  112. package/server/src/lib/query-snapshots/query-snapshot-recalc.service.js.map +1 -0
  113. package/server/src/lib/query-snapshots/query-snapshot-schedule.setup.d.ts +2 -0
  114. package/server/src/lib/query-snapshots/query-snapshot-schedule.setup.js +79 -0
  115. package/server/src/lib/query-snapshots/query-snapshot-schedule.setup.js.map +1 -0
  116. package/server/src/lib/query-snapshots/query-snapshot.constants.d.ts +17 -0
  117. package/server/src/lib/query-snapshots/query-snapshot.constants.js +46 -0
  118. package/server/src/lib/query-snapshots/query-snapshot.constants.js.map +1 -0
  119. package/server/src/lib/query-snapshots/query-snapshot.middleware.d.ts +21 -0
  120. package/server/src/lib/query-snapshots/query-snapshot.middleware.js +135 -0
  121. package/server/src/lib/query-snapshots/query-snapshot.middleware.js.map +1 -0
  122. package/server/src/lib/query-snapshots/query-snapshot.store.d.ts +34 -0
  123. package/server/src/lib/query-snapshots/query-snapshot.store.js +137 -0
  124. package/server/src/lib/query-snapshots/query-snapshot.store.js.map +1 -0
  125. package/server/src/lib/query-snapshots/recalculate-query-snapshots.command.d.ts +8 -0
  126. package/server/src/lib/query-snapshots/recalculate-query-snapshots.command.js +74 -0
  127. package/server/src/lib/query-snapshots/recalculate-query-snapshots.command.js.map +1 -0
  128. package/server/src/lib/query-snapshots/refresh-query-snapshots.command.d.ts +16 -0
  129. package/server/src/lib/query-snapshots/refresh-query-snapshots.command.js +56 -0
  130. package/server/src/lib/query-snapshots/refresh-query-snapshots.command.js.map +1 -0
  131. package/server/src/lib/report-browse.service.js +32 -13
  132. package/server/src/lib/report-browse.service.js.map +1 -1
  133. package/server/src/lib/report-browse.types.d.ts +27 -12
  134. package/server/src/lib/report-browse.types.js +0 -1
  135. package/server/src/lib/report-browse.types.js.map +1 -1
  136. package/server/src/lib/report-definition.seed-provider.d.ts +15 -0
  137. package/server/src/lib/report-definition.seed-provider.js +63 -0
  138. package/server/src/lib/report-definition.seed-provider.js.map +1 -0
  139. package/server/src/lib/report-generation/report-generation-create.command.d.ts +17 -0
  140. package/server/src/lib/report-generation/report-generation-create.command.js +177 -0
  141. package/server/src/lib/report-generation/report-generation-create.command.js.map +1 -0
  142. package/server/src/lib/report-generation/report-generation-enqueue.service.d.ts +21 -0
  143. package/server/src/lib/report-generation/report-generation-enqueue.service.js +58 -0
  144. package/server/src/lib/report-generation/report-generation-enqueue.service.js.map +1 -0
  145. package/server/src/lib/report-generation/report-generation-execute.command.d.ts +10 -0
  146. package/server/src/lib/report-generation/report-generation-execute.command.js +49 -0
  147. package/server/src/lib/report-generation/report-generation-execute.command.js.map +1 -0
  148. package/server/src/lib/report-generation/report-generation-execute.service.d.ts +23 -0
  149. package/server/src/lib/report-generation/report-generation-execute.service.js +225 -0
  150. package/server/src/lib/report-generation/report-generation-execute.service.js.map +1 -0
  151. package/server/src/lib/report-generation/report-generation-job-presentation.util.d.ts +8 -0
  152. package/server/src/lib/report-generation/report-generation-job-presentation.util.js +43 -0
  153. package/server/src/lib/report-generation/report-generation-job-presentation.util.js.map +1 -0
  154. package/server/src/lib/report-generation/report-generation-notify.service.d.ts +23 -0
  155. package/server/src/lib/report-generation/report-generation-notify.service.js +159 -0
  156. package/server/src/lib/report-generation/report-generation-notify.service.js.map +1 -0
  157. package/server/src/lib/report-generation/report-generation-policy.util.d.ts +39 -0
  158. package/server/src/lib/report-generation/report-generation-policy.util.js +95 -0
  159. package/server/src/lib/report-generation/report-generation-policy.util.js.map +1 -0
  160. package/server/src/lib/report-generation/report-generation-progress.util.d.ts +14 -0
  161. package/server/src/lib/report-generation/report-generation-progress.util.js +51 -0
  162. package/server/src/lib/report-generation/report-generation-progress.util.js.map +1 -0
  163. package/server/src/lib/report-generation/report-generation-release-inline-watch.command.d.ts +10 -0
  164. package/server/src/lib/report-generation/report-generation-release-inline-watch.command.js +55 -0
  165. package/server/src/lib/report-generation/report-generation-release-inline-watch.command.js.map +1 -0
  166. package/server/src/lib/report-generation/report-generation-runtime.handlers.d.ts +27 -0
  167. package/server/src/lib/report-generation/report-generation-runtime.handlers.js +136 -0
  168. package/server/src/lib/report-generation/report-generation-runtime.handlers.js.map +1 -0
  169. package/server/src/lib/report-generation/report-generation-settings.service.d.ts +12 -0
  170. package/server/src/lib/report-generation/report-generation-settings.service.js +49 -0
  171. package/server/src/lib/report-generation/report-generation-settings.service.js.map +1 -0
  172. package/server/src/lib/report-generation/report-generation.constants.d.ts +16 -0
  173. package/server/src/lib/report-generation/report-generation.constants.js +24 -0
  174. package/server/src/lib/report-generation/report-generation.constants.js.map +1 -0
  175. package/server/src/lib/report-generation/report-generation.store.d.ts +25 -0
  176. package/server/src/lib/report-generation/report-generation.store.js +145 -0
  177. package/server/src/lib/report-generation/report-generation.store.js.map +1 -0
  178. package/server/src/lib/report-generation/report-generation.util.d.ts +8 -0
  179. package/server/src/lib/report-generation/report-generation.util.js +131 -0
  180. package/server/src/lib/report-generation/report-generation.util.js.map +1 -0
  181. package/server/src/lib/report-management-runtime.handlers.d.ts +32 -0
  182. package/server/src/lib/report-management-runtime.handlers.js +78 -0
  183. package/server/src/lib/report-management-runtime.handlers.js.map +1 -0
  184. package/server/src/lib/report-management-server.module.js +64 -9
  185. package/server/src/lib/report-management-server.module.js.map +1 -1
  186. package/server/src/lib/report-management.controller.d.ts +1 -4
  187. package/server/src/lib/report-management.controller.js +2 -16
  188. package/server/src/lib/report-management.controller.js.map +1 -1
  189. package/server/src/lib/seed/index.d.ts +0 -19
  190. package/server/src/lib/seed/index.js +0 -21
  191. package/server/src/lib/seed/index.js.map +0 -1
  192. package/server/src/lib/seed/report-management-seed.provider.d.ts +0 -4
  193. package/server/src/lib/seed/report-management-seed.provider.js +0 -18
  194. package/server/src/lib/seed/report-management-seed.provider.js.map +0 -1
  195. package/server/src/lib/seed/report-management-seed.tokens.d.ts +0 -1
  196. package/server/src/lib/seed/report-management-seed.tokens.js +0 -7
  197. package/server/src/lib/seed/report-management-seed.tokens.js.map +0 -1
  198. package/server/src/lib/seed/report-management.seed-catalog.d.ts +0 -2
  199. package/server/src/lib/seed/report-management.seed-catalog.js +0 -10
  200. package/server/src/lib/seed/report-management.seed-catalog.js.map +0 -1
  201. package/server/src/lib/seed/samples/employee-report.mock.d.ts +0 -9
  202. package/server/src/lib/seed/samples/employee-report.mock.js +0 -322
  203. package/server/src/lib/seed/samples/employee-report.mock.js.map +0 -1
  204. package/server/src/lib/seed/samples/index.d.ts +0 -2
  205. package/server/src/lib/seed/samples/index.js +0 -6
  206. package/server/src/lib/seed/samples/index.js.map +0 -1
  207. package/server/src/lib/seed/samples/location-report.mock.d.ts +0 -9
  208. package/server/src/lib/seed/samples/location-report.mock.js +0 -339
  209. package/server/src/lib/seed/samples/location-report.mock.js.map +0 -1
@@ -1,322 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.EMPLOYEE_CATEGORY_REPORT_MAPPING = exports.EMPLOYEE_REPORT_DEFINITIONS = exports.EMPLOYEE_REPORT_CATEGORIES = void 0;
4
- const core_1 = require("@acorex-platform/framework-shared/core");
5
- const seed_1 = require("@acorex-platform/module-common-server/seed");
6
- //#region ---- Mock Categories ----
7
- /**
8
- * Generate report categories for employee reports
9
- */
10
- function generateCategories() {
11
- const categories = [];
12
- // Root categories with child count metadata
13
- const rootCategories = [
14
- {
15
- title: 'Human Resources',
16
- description: 'Human resources analysis and reports',
17
- childrenCount: 1, // Has 1 child category
18
- itemsCount: 0, // No direct reports
19
- },
20
- ];
21
- rootCategories.forEach(({ title, description, childrenCount, itemsCount }) => {
22
- const categoryId = seed_1.AXPDataGenerator.uuid();
23
- categories.push({
24
- id: categoryId,
25
- title,
26
- description,
27
- parentId: undefined,
28
- childrenCount,
29
- itemsCount,
30
- });
31
- });
32
- // Child categories (leaf nodes with reports)
33
- const childCategories = [
34
- {
35
- parent: 'Human Resources',
36
- children: [
37
- {
38
- title: 'Employee Analysis',
39
- description: 'Employee analysis and insights',
40
- childrenCount: 0,
41
- itemsCount: 1, // Employees by Department
42
- },
43
- ],
44
- },
45
- ];
46
- childCategories.forEach(({ parent, children }) => {
47
- const parentCat = categories.find((c) => (0, seed_1.resolveMultiLanguageString)(c.title, 'en-US') === parent);
48
- if (parentCat) {
49
- children.forEach(({ title, description, childrenCount, itemsCount }) => {
50
- categories.push({
51
- id: seed_1.AXPDataGenerator.uuid(),
52
- title,
53
- description,
54
- parentId: parentCat.id,
55
- childrenCount,
56
- itemsCount,
57
- });
58
- });
59
- }
60
- });
61
- return categories;
62
- }
63
- exports.EMPLOYEE_REPORT_CATEGORIES = generateCategories();
64
- //#endregion
65
- //#region ---- Mock Parameter Groups ----
66
- const employeeReportParameterGroups = [
67
- {
68
- name: 'employeeDetails',
69
- title: 'Employee Details',
70
- description: 'Employee filtering options with cascade parameters',
71
- parameters: [
72
- {
73
- path: 'departmentId',
74
- title: 'Department',
75
- description: 'Filter by department (cascade parent)',
76
- widget: {
77
- type: core_1.AXPWidgetsList.Editors.LookupBox,
78
- options: {
79
- entity: 'OrganizationManagement.BusinessUnit',
80
- multiple: false,
81
- textField: 'title',
82
- valueField: 'id',
83
- look: 'select',
84
- columns: ['title', 'code'],
85
- expose: [
86
- { source: 'id', target: 'department.id' },
87
- { source: 'title', target: 'department.title' },
88
- ],
89
- },
90
- },
91
- },
92
- {
93
- path: 'teamId',
94
- title: 'Team',
95
- description: 'Filter by team (cascade child - filtered by selected department)',
96
- widget: {
97
- type: core_1.AXPWidgetsList.Editors.LookupBox,
98
- options: {
99
- entity: 'OrganizationManagement.Team',
100
- multiple: false,
101
- textField: 'title',
102
- valueField: 'id',
103
- look: 'select',
104
- columns: ['title'],
105
- expose: [
106
- { source: 'id', target: 'team.id' },
107
- { source: 'title', target: 'team.title' },
108
- ],
109
- // CASCADE FILTER: Only show teams for selected department
110
- // Note: This uses leader.position.departmentId path assuming teams are filtered by their leader's department
111
- // Adjust the field path based on your actual Team entity structure
112
- filter: {
113
- logic: 'and',
114
- filters: [
115
- {
116
- field: 'departmentId', // Path to department through team leader's position
117
- operator: { type: 'equal' },
118
- value: '{{ context.eval("departmentId.value") }}', // Extract value from filter context object
119
- },
120
- ],
121
- },
122
- },
123
- // TRIGGER: Refresh team dropdown when department changes
124
- triggers: [
125
- {
126
- event: "{{ events.context('departmentId') }}",
127
- action: `{{
128
- // Clear team selection when department changes
129
- if (!context.eval('department.value')) {
130
- widget.setValue(null);
131
- } else {
132
- widget.refresh();
133
- }
134
- }}`,
135
- },
136
- ],
137
- },
138
- },
139
- {
140
- path: 'employmentType',
141
- title: 'Employment Type',
142
- description: 'Filter by employment type',
143
- widget: {
144
- type: core_1.AXPWidgetsList.Editors.SelectBox,
145
- options: {
146
- valueField: 'value',
147
- textField: 'text',
148
- dataSource: [
149
- { value: 'all', text: 'All' },
150
- { value: 'full-time', text: 'Full Time' },
151
- { value: 'part-time', text: 'Part Time' },
152
- { value: 'contract', text: 'Contract' },
153
- { value: 'intern', text: 'Intern' },
154
- ],
155
- },
156
- },
157
- },
158
- ],
159
- },
160
- ];
161
- //#endregion
162
- //#region ---- Layout Definitions Generator ----
163
- function generateLayoutsForReport(reportTitle) {
164
- const layouts = [];
165
- const titleLower = reportTitle.toLowerCase();
166
- // Generate base export options
167
- const baseExportOptions = {
168
- fileNameTemplate: 'Report_{date}_{user}',
169
- pdf: {
170
- enabled: true,
171
- pageSize: 'A4',
172
- headerEnabled: true,
173
- footerEnabled: true,
174
- showPageNumbers: true,
175
- watermarkText: 'Mock Report',
176
- watermarkOpacity: 0.5,
177
- compression: true,
178
- embedImages: true,
179
- },
180
- };
181
- // Table Layout (always available)
182
- if (titleLower.includes('employee') || titleLower.includes('department')) {
183
- layouts.push({
184
- id: seed_1.AXPDataGenerator.uuid(),
185
- title: 'Table View',
186
- description: 'Detailed tabular view of the data',
187
- icon: 'fa-light fa-table',
188
- isDefault: true,
189
- layout: {
190
- type: 'table',
191
- columns: [
192
- {
193
- field: 'departmentTitle',
194
- title: 'Department',
195
- visible: true,
196
- align: 'left',
197
- sortable: true,
198
- widget: { type: core_1.AXPWidgetsList.Editors.TextBox, path: 'departmentTitle' },
199
- },
200
- {
201
- field: 'teamTitle',
202
- title: 'Team',
203
- visible: true,
204
- align: 'left',
205
- sortable: true,
206
- widget: { type: core_1.AXPWidgetsList.Editors.TextBox, path: 'teamTitle' },
207
- },
208
- {
209
- field: 'employeeCount',
210
- title: 'Employee Count',
211
- visible: true,
212
- align: 'right',
213
- sortable: true,
214
- widget: { type: core_1.AXPWidgetsList.Editors.NumberBox, path: 'employeeCount' },
215
- },
216
- {
217
- field: 'employmentTypes',
218
- title: 'Employment Types',
219
- visible: true,
220
- align: 'left',
221
- widget: { type: core_1.AXPWidgetsList.Editors.TextBox, path: 'employmentTypes' },
222
- },
223
- {
224
- field: 'averageExperience',
225
- title: 'Avg Experience (Years)',
226
- visible: true,
227
- align: 'right',
228
- sortable: true,
229
- widget: { type: core_1.AXPWidgetsList.Editors.NumberBox, path: 'averageExperience' },
230
- },
231
- ],
232
- actions: [],
233
- options: {
234
- pagination: true,
235
- stickyHeader: true,
236
- stripedRows: true,
237
- sorting: [{ name: 'departmentTitle', dir: 'asc' }],
238
- },
239
- summary: [
240
- { field: 'employeeCount', operation: 'sum', displayIn: 'reportFooter' },
241
- { field: 'averageExperience', operation: 'avg', displayIn: 'reportFooter' },
242
- ],
243
- },
244
- dataSource: {
245
- type: 'query',
246
- name: 'getEmployeeList',
247
- pagination: true,
248
- sortFields: [{ name: 'departmentTitle', dir: 'asc' }],
249
- },
250
- export: Object.assign(Object.assign({}, baseExportOptions), { fileNameTemplate: 'Employee_Report_{date}_{user}', excel: {
251
- enabled: true,
252
- sheetName: 'Employee Report',
253
- }, csv: {
254
- enabled: true,
255
- }, pdf: {
256
- enabled: true,
257
- } }),
258
- });
259
- }
260
- return layouts;
261
- }
262
- //#endregion
263
- //#region ---- Mock Report Definitions ----
264
- /**
265
- * Generate report definitions for categories
266
- *
267
- * Optimization: Only generates reports for categories with itemsCount > 0
268
- */
269
- function generateReportDefinitions() {
270
- const reports = [];
271
- // ✅ Get categories that have reports (itemsCount > 0)
272
- const categoriesWithReports = exports.EMPLOYEE_REPORT_CATEGORIES.filter((cat) => { var _a; return ((_a = cat.itemsCount) !== null && _a !== void 0 ? _a : 0) > 0; });
273
- categoriesWithReports.forEach((category) => {
274
- let reportsForCategory = [];
275
- switch (category.title) {
276
- case 'Employee Analysis':
277
- reportsForCategory = [
278
- {
279
- title: 'Employees by Department',
280
- description: 'Employee analysis grouped by department and team with cascade filtering',
281
- parameterGroups: [...employeeReportParameterGroups],
282
- },
283
- ];
284
- break;
285
- }
286
- reportsForCategory.forEach((report) => {
287
- const layouts = generateLayoutsForReport(report.title);
288
- const defaultLayout = layouts.find((l) => l.isDefault) || layouts[0];
289
- reports.push({
290
- id: seed_1.AXPDataGenerator.uuid(),
291
- title: report.title,
292
- description: report.description,
293
- categoryIds: [category.id],
294
- parameterGroups: report.parameterGroups,
295
- layouts: layouts,
296
- defaultLayoutId: (defaultLayout === null || defaultLayout === void 0 ? void 0 : defaultLayout.id) || '',
297
- });
298
- });
299
- });
300
- return reports;
301
- }
302
- exports.EMPLOYEE_REPORT_DEFINITIONS = generateReportDefinitions();
303
- //#endregion
304
- //#region ---- Category-Report Mapping ----
305
- /**
306
- * Create a mapping of categories to their reports for easy lookup
307
- *
308
- * Optimization: Only processes categories with itemsCount > 0
309
- */
310
- exports.EMPLOYEE_CATEGORY_REPORT_MAPPING = new Map();
311
- exports.EMPLOYEE_REPORT_CATEGORIES.filter((cat) => { var _a; return ((_a = cat.itemsCount) !== null && _a !== void 0 ? _a : 0) > 0; }).forEach((category) => {
312
- const categoryTitleLc = (0, seed_1.resolveMultiLanguageString)(category.title, 'en-US').toLowerCase();
313
- const categoryReports = exports.EMPLOYEE_REPORT_DEFINITIONS.filter((report) => {
314
- var _a;
315
- // Simple matching based on category title and report title
316
- return ((0, seed_1.resolveMultiLanguageString)(report.title).toLowerCase().includes(categoryTitleLc) ||
317
- ((_a = (0, seed_1.resolveMultiLanguageString)(report.description)) === null || _a === void 0 ? void 0 : _a.toLowerCase().includes(categoryTitleLc)));
318
- });
319
- exports.EMPLOYEE_CATEGORY_REPORT_MAPPING.set(category.id, categoryReports);
320
- });
321
- //#endregion
322
- //# sourceMappingURL=employee-report.mock.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"employee-report.mock.js","sourceRoot":"","sources":["../../../../../../../../libs/modules/report-management/server/src/lib/seed/samples/employee-report.mock.ts"],"names":[],"mappings":";;;AAEA,iEAAsE;AACtE,qEAAwG;AAQxG,uCAAuC;AAEvC;;GAEG;AACH,SAAS,kBAAkB;IACzB,MAAM,UAAU,GAAwB,EAAE,CAAC;IAE3C,4CAA4C;IAC5C,MAAM,cAAc,GAAG;QACrB;YACE,KAAK,EAAE,iBAAiB;YACxB,WAAW,EAAE,sCAAsC;YACnD,aAAa,EAAE,CAAC,EAAE,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,YAAY"}
@@ -1,2 +0,0 @@
1
- export * from './employee-report.mock';
2
- export * from './location-report.mock';
@@ -1,6 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const tslib_1 = require("tslib");
4
- tslib_1.__exportStar(require("./employee-report.mock"), exports);
5
- tslib_1.__exportStar(require("./location-report.mock"), exports);
6
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../../libs/modules/report-management/server/src/lib/seed/samples/index.ts"],"names":[],"mappings":";;;AAAA,iEAAuC;AACvC,iEAAuC"}
@@ -1,9 +0,0 @@
1
- import { AXPReportCategory, AXPReportDefinition } from '@acorex-platform/module-report-management-contracts';
2
- export declare const LOCATION_REPORT_CATEGORIES: AXPReportCategory[];
3
- export declare const LOCATION_REPORT_DEFINITIONS: AXPReportDefinition[];
4
- /**
5
- * Create a mapping of categories to their reports for easy lookup
6
- *
7
- * Optimization: Only processes categories with itemsCount > 0
8
- */
9
- export declare const LOCATION_CATEGORY_REPORT_MAPPING: Map<string, AXPReportDefinition[]>;