@acorex-platform/module-timesheet-management-client 0.0.32 → 0.0.33

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 (34) hide show
  1. package/fesm2022/acorex-platform-module-timesheet-management-client-contracts-entities-time-entry.mjs +369 -0
  2. package/fesm2022/acorex-platform-module-timesheet-management-client-contracts-entities-time-entry.mjs.map +1 -0
  3. package/fesm2022/acorex-platform-module-timesheet-management-client-contracts-entities-timesheet-correction.mjs +252 -0
  4. package/fesm2022/acorex-platform-module-timesheet-management-client-contracts-entities-timesheet-correction.mjs.map +1 -0
  5. package/fesm2022/acorex-platform-module-timesheet-management-client-contracts-entities-timesheet-period.mjs +347 -0
  6. package/fesm2022/acorex-platform-module-timesheet-management-client-contracts-entities-timesheet-period.mjs.map +1 -0
  7. package/fesm2022/acorex-platform-module-timesheet-management-client-contracts-entities-timesheet-policy.mjs +281 -0
  8. package/fesm2022/acorex-platform-module-timesheet-management-client-contracts-entities-timesheet-policy.mjs.map +1 -0
  9. package/fesm2022/acorex-platform-module-timesheet-management-client-contracts-entities-work-item.mjs +305 -0
  10. package/fesm2022/acorex-platform-module-timesheet-management-client-contracts-entities-work-item.mjs.map +1 -0
  11. package/fesm2022/acorex-platform-module-timesheet-management-client-contracts-entity-catalog-acorex-platform-module-timesheet-management-client-contracts-entity-catalog-BbB3MCCl.mjs +97 -0
  12. package/fesm2022/acorex-platform-module-timesheet-management-client-contracts-entity-catalog-acorex-platform-module-timesheet-management-client-contracts-entity-catalog-BbB3MCCl.mjs.map +1 -0
  13. package/fesm2022/acorex-platform-module-timesheet-management-client-contracts-entity-catalog-time-entry.entity-CAs7zUnV.mjs +295 -0
  14. package/fesm2022/acorex-platform-module-timesheet-management-client-contracts-entity-catalog-time-entry.entity-CAs7zUnV.mjs.map +1 -0
  15. package/fesm2022/acorex-platform-module-timesheet-management-client-contracts-entity-catalog-timesheet-correction.entity--wZeCM5Q.mjs +178 -0
  16. package/fesm2022/acorex-platform-module-timesheet-management-client-contracts-entity-catalog-timesheet-correction.entity--wZeCM5Q.mjs.map +1 -0
  17. package/fesm2022/acorex-platform-module-timesheet-management-client-contracts-entity-catalog-timesheet-period.entity-BOyfB4YA.mjs +273 -0
  18. package/fesm2022/acorex-platform-module-timesheet-management-client-contracts-entity-catalog-timesheet-period.entity-BOyfB4YA.mjs.map +1 -0
  19. package/fesm2022/acorex-platform-module-timesheet-management-client-contracts-entity-catalog-timesheet-policy.entity-CqqN7Xty.mjs +207 -0
  20. package/fesm2022/acorex-platform-module-timesheet-management-client-contracts-entity-catalog-timesheet-policy.entity-CqqN7Xty.mjs.map +1 -0
  21. package/fesm2022/acorex-platform-module-timesheet-management-client-contracts-entity-catalog-work-item.entity-DilF7u50.mjs +231 -0
  22. package/fesm2022/acorex-platform-module-timesheet-management-client-contracts-entity-catalog-work-item.entity-DilF7u50.mjs.map +1 -0
  23. package/fesm2022/acorex-platform-module-timesheet-management-client-contracts-entity-catalog.mjs +2 -0
  24. package/fesm2022/acorex-platform-module-timesheet-management-client-contracts-entity-catalog.mjs.map +1 -0
  25. package/fesm2022/acorex-platform-module-timesheet-management-client-local-entities.mjs +33 -0
  26. package/fesm2022/acorex-platform-module-timesheet-management-client-local-entities.mjs.map +1 -0
  27. package/package.json +29 -1
  28. package/types/acorex-platform-module-timesheet-management-client-contracts-entities-time-entry.d.ts +8 -0
  29. package/types/acorex-platform-module-timesheet-management-client-contracts-entities-timesheet-correction.d.ts +8 -0
  30. package/types/acorex-platform-module-timesheet-management-client-contracts-entities-timesheet-period.d.ts +8 -0
  31. package/types/acorex-platform-module-timesheet-management-client-contracts-entities-timesheet-policy.d.ts +8 -0
  32. package/types/acorex-platform-module-timesheet-management-client-contracts-entities-work-item.d.ts +8 -0
  33. package/types/acorex-platform-module-timesheet-management-client-contracts-entity-catalog.d.ts +10 -0
  34. package/types/acorex-platform-module-timesheet-management-client-local-entities.d.ts +12 -0
@@ -0,0 +1,252 @@
1
+ import { AXPWidgetsCatalog } from '@acorex-platform/framework-shared/core';
2
+ import { createAllQueryView, entityMasterCrudActions, entityMasterRecordActions } from '@acorex-platform/framework-shared/entity';
3
+
4
+ //#region ---- Module Config ----
5
+ const config = {
6
+ i18n: 'timesheet-management',
7
+ module: 'TimesheetManagement',
8
+ route: 'timesheet-management',
9
+ };
10
+ const RootConfig = {
11
+ config,
12
+ module: {
13
+ name: config.module,
14
+ route: config.route,
15
+ title: `@${config.i18n}:module.title`,
16
+ icon: 'fa-light fa-clock',
17
+ },
18
+ entities: {
19
+ workItem: {
20
+ name: 'WorkItem',
21
+ source: `${config.module}.WorkItem`,
22
+ title: `@${config.i18n}:work-items.entities.work-item.title`,
23
+ titlePlural: `@${config.i18n}:work-items.entities.work-item.plural`,
24
+ icon: 'fa-light fa-list-check',
25
+ },
26
+ timesheetPeriod: {
27
+ name: 'TimesheetPeriod',
28
+ source: `${config.module}.TimesheetPeriod`,
29
+ title: `@${config.i18n}:timesheet-periods.entities.timesheet-period.title`,
30
+ titlePlural: `@${config.i18n}:timesheet-periods.entities.timesheet-period.plural`,
31
+ icon: 'fa-light fa-calendar-week',
32
+ },
33
+ timeEntry: {
34
+ name: 'TimeEntry',
35
+ source: `${config.module}.TimeEntry`,
36
+ title: `@${config.i18n}:time-entries.entities.time-entry.title`,
37
+ titlePlural: `@${config.i18n}:time-entries.entities.time-entry.plural`,
38
+ icon: 'fa-light fa-hourglass-half',
39
+ },
40
+ timesheetCorrection: {
41
+ name: 'TimesheetCorrection',
42
+ source: `${config.module}.TimesheetCorrection`,
43
+ title: `@${config.i18n}:timesheet-corrections.entities.timesheet-correction.title`,
44
+ titlePlural: `@${config.i18n}:timesheet-corrections.entities.timesheet-correction.plural`,
45
+ icon: 'fa-light fa-pen-to-square',
46
+ },
47
+ timesheetPolicy: {
48
+ name: 'TimesheetPolicy',
49
+ source: `${config.module}.TimesheetPolicy`,
50
+ title: `@${config.i18n}:timesheet-policies.entities.timesheet-policy.title`,
51
+ titlePlural: `@${config.i18n}:timesheet-policies.entities.timesheet-policy.plural`,
52
+ icon: 'fa-light fa-sliders',
53
+ },
54
+ },
55
+ pages: {
56
+ myTimesheet: {
57
+ path: 'my-timesheet',
58
+ title: `@${config.i18n}:pages.my-timesheet.title`,
59
+ icon: 'fa-light fa-calendar-week',
60
+ },
61
+ approvalInbox: {
62
+ path: 'approval-inbox',
63
+ title: `@${config.i18n}:pages.approval-inbox.title`,
64
+ icon: 'fa-light fa-inbox',
65
+ },
66
+ teamTimesheets: {
67
+ path: 'team-timesheets',
68
+ title: `@${config.i18n}:pages.team-timesheets.title`,
69
+ icon: 'fa-light fa-users',
70
+ },
71
+ },
72
+ };
73
+ //#endregion
74
+
75
+ //#region ---- Constants ----
76
+ const i18n = RootConfig.config.i18n;
77
+ const entityI18n = `${i18n}:timesheet-corrections.entities.timesheet-correction`;
78
+ const listSortAndFilterOptions = {
79
+ sort: { enabled: true },
80
+ filter: { advance: { enabled: true }, inline: { enabled: true } },
81
+ };
82
+ //#endregion
83
+ //#region ---- Entity Factory ----
84
+ /**
85
+ * Timesheet correction entity factory for post-submission change requests.
86
+ */
87
+ async function factoryTimesheetCorrection() {
88
+ const entityDef = {
89
+ module: RootConfig.module.name,
90
+ name: RootConfig.entities.timesheetCorrection.name,
91
+ title: RootConfig.entities.timesheetCorrection.title,
92
+ icon: RootConfig.entities.timesheetCorrection.icon,
93
+ formats: {
94
+ individual: RootConfig.entities.timesheetCorrection.title,
95
+ plural: RootConfig.entities.timesheetCorrection.titlePlural,
96
+ searchResult: {
97
+ title: '{{ period.startDate | date:"mediumDate" }}',
98
+ description: '{{ reason }}',
99
+ },
100
+ },
101
+ plugins: [
102
+ { name: 'history' },
103
+ {
104
+ name: 'status',
105
+ options: {
106
+ field: 'statusId',
107
+ definition: 'timesheet-management.status.timesheet-correction',
108
+ },
109
+ },
110
+ ],
111
+ groups: [
112
+ { id: 'basic-info', title: '@general:terms.interface.basic-info' },
113
+ { id: 'changes', title: `@${entityI18n}.groups.changes` },
114
+ ],
115
+ properties: [
116
+ {
117
+ name: 'id',
118
+ title: '@general:terms.common.id',
119
+ groupId: 'basic-info',
120
+ schema: { dataType: 'uuid', visible: false, nullable: false, readonly: true, unique: { enabled: true } },
121
+ },
122
+ {
123
+ name: 'periodId',
124
+ title: `@${entityI18n}.fields.period-id.title`,
125
+ groupId: 'basic-info',
126
+ options: listSortAndFilterOptions,
127
+ schema: {
128
+ dataType: 'string',
129
+ interface: {
130
+ type: AXPWidgetsCatalog.lookup,
131
+ options: {
132
+ look: 'select',
133
+ entity: `${RootConfig.module.name}.${RootConfig.entities.timesheetPeriod.name}`,
134
+ textField: 'startDate',
135
+ valueField: 'id',
136
+ expose: [
137
+ { source: 'id', target: 'period.id' },
138
+ { source: 'startDate', target: 'period.startDate' },
139
+ { source: 'endDate', target: 'period.endDate' },
140
+ ],
141
+ },
142
+ },
143
+ },
144
+ validations: [{ rule: 'required' }],
145
+ },
146
+ {
147
+ name: 'requestedById',
148
+ title: `@${entityI18n}.fields.requested-by-id.title`,
149
+ groupId: 'basic-info',
150
+ options: listSortAndFilterOptions,
151
+ schema: {
152
+ dataType: 'string',
153
+ interface: {
154
+ type: AXPWidgetsCatalog.lookup,
155
+ options: {
156
+ look: 'select',
157
+ entity: 'HumanCapitalManagement.Employee',
158
+ textField: 'person.fullName',
159
+ valueField: 'id',
160
+ expose: [{ source: 'id', target: 'requestedBy.id' }],
161
+ },
162
+ },
163
+ },
164
+ validations: [{ rule: 'required' }],
165
+ },
166
+ {
167
+ name: 'reason',
168
+ title: `@${entityI18n}.fields.reason.title`,
169
+ groupId: 'basic-info',
170
+ schema: {
171
+ dataType: 'string',
172
+ interface: { type: AXPWidgetsCatalog.largeText, options: { rows: 3 } },
173
+ },
174
+ validations: [{ rule: 'required' }],
175
+ },
176
+ {
177
+ name: 'statusId',
178
+ title: `@${entityI18n}.fields.status-id.title`,
179
+ groupId: 'basic-info',
180
+ options: listSortAndFilterOptions,
181
+ schema: {
182
+ dataType: 'string',
183
+ readonly: true,
184
+ visible: false,
185
+ interface: { type: AXPWidgetsCatalog.text },
186
+ },
187
+ },
188
+ {
189
+ name: 'changes',
190
+ title: `@${entityI18n}.fields.changes.title`,
191
+ groupId: 'changes',
192
+ schema: {
193
+ dataType: 'string',
194
+ interface: { type: AXPWidgetsCatalog.largeText, options: { rows: 6 } },
195
+ },
196
+ validations: [{ rule: 'required' }],
197
+ },
198
+ ],
199
+ columns: [
200
+ { name: 'periodId', options: { dataPath: 'period.startDate' } },
201
+ { name: 'requestedById' },
202
+ { name: 'statusId' },
203
+ { name: 'reason' },
204
+ ],
205
+ interfaces: {
206
+ master: {
207
+ create: {
208
+ sections: [{ id: 'basic-info' }, { id: 'changes' }],
209
+ properties: [
210
+ { name: 'periodId', layout: { positions: { lg: { colSpan: 6 } } } },
211
+ { name: 'requestedById', layout: { positions: { lg: { colSpan: 6 } } } },
212
+ { name: 'reason', layout: { positions: { lg: { colSpan: 12 } } } },
213
+ { name: 'changes', layout: { positions: { lg: { colSpan: 12 } } } },
214
+ ],
215
+ },
216
+ update: {
217
+ sections: [{ id: 'basic-info' }, { id: 'changes' }],
218
+ properties: [
219
+ { name: 'periodId', layout: { positions: { lg: { colSpan: 6 } } } },
220
+ { name: 'requestedById', layout: { positions: { lg: { colSpan: 6 } } } },
221
+ { name: 'reason', layout: { positions: { lg: { colSpan: 12 } } } },
222
+ { name: 'changes', layout: { positions: { lg: { colSpan: 12 } } } },
223
+ ],
224
+ },
225
+ single: {
226
+ title: '{{ reason }}',
227
+ sections: [{ id: 'basic-info' }, { id: 'changes' }],
228
+ properties: [
229
+ { name: 'periodId', layout: { positions: { lg: { colSpan: 6 } } } },
230
+ { name: 'requestedById', layout: { positions: { lg: { colSpan: 6 } } } },
231
+ { name: 'reason', layout: { positions: { lg: { colSpan: 12 } } } },
232
+ { name: 'changes', layout: { positions: { lg: { colSpan: 12 } } } },
233
+ ],
234
+ actions: [...entityMasterRecordActions()],
235
+ },
236
+ list: {
237
+ actions: [...entityMasterCrudActions()],
238
+ views: [createAllQueryView({ sorts: [{ name: 'periodId', dir: 'desc' }] })],
239
+ },
240
+ },
241
+ },
242
+ };
243
+ return entityDef;
244
+ }
245
+ //#endregion
246
+
247
+ /**
248
+ * Generated bundle index. Do not edit.
249
+ */
250
+
251
+ export { factoryTimesheetCorrection };
252
+ //# sourceMappingURL=acorex-platform-module-timesheet-management-client-contracts-entities-timesheet-correction.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"acorex-platform-module-timesheet-management-client-contracts-entities-timesheet-correction.mjs","sources":["../../../../libs/modules/timesheet-management/contracts/src/root-config.ts","../../../../libs/modules/timesheet-management/contracts/src/entities/timesheet-correction/timesheet-correction.entity.ts","../../../../libs/modules/timesheet-management/contracts/src/acorex-platform-module-timesheet-management-client-contracts-entities-timesheet-correction.ts"],"sourcesContent":["//#region ---- Module Config ----\n\nconst config = {\n i18n: 'timesheet-management',\n module: 'TimesheetManagement',\n route: 'timesheet-management',\n};\n\nexport const RootConfig = {\n config,\n module: {\n name: config.module,\n route: config.route,\n title: `@${config.i18n}:module.title`,\n icon: 'fa-light fa-clock',\n },\n entities: {\n workItem: {\n name: 'WorkItem',\n source: `${config.module}.WorkItem`,\n title: `@${config.i18n}:work-items.entities.work-item.title`,\n titlePlural: `@${config.i18n}:work-items.entities.work-item.plural`,\n icon: 'fa-light fa-list-check',\n },\n timesheetPeriod: {\n name: 'TimesheetPeriod',\n source: `${config.module}.TimesheetPeriod`,\n title: `@${config.i18n}:timesheet-periods.entities.timesheet-period.title`,\n titlePlural: `@${config.i18n}:timesheet-periods.entities.timesheet-period.plural`,\n icon: 'fa-light fa-calendar-week',\n },\n timeEntry: {\n name: 'TimeEntry',\n source: `${config.module}.TimeEntry`,\n title: `@${config.i18n}:time-entries.entities.time-entry.title`,\n titlePlural: `@${config.i18n}:time-entries.entities.time-entry.plural`,\n icon: 'fa-light fa-hourglass-half',\n },\n timesheetCorrection: {\n name: 'TimesheetCorrection',\n source: `${config.module}.TimesheetCorrection`,\n title: `@${config.i18n}:timesheet-corrections.entities.timesheet-correction.title`,\n titlePlural: `@${config.i18n}:timesheet-corrections.entities.timesheet-correction.plural`,\n icon: 'fa-light fa-pen-to-square',\n },\n timesheetPolicy: {\n name: 'TimesheetPolicy',\n source: `${config.module}.TimesheetPolicy`,\n title: `@${config.i18n}:timesheet-policies.entities.timesheet-policy.title`,\n titlePlural: `@${config.i18n}:timesheet-policies.entities.timesheet-policy.plural`,\n icon: 'fa-light fa-sliders',\n },\n },\n pages: {\n myTimesheet: {\n path: 'my-timesheet',\n title: `@${config.i18n}:pages.my-timesheet.title`,\n icon: 'fa-light fa-calendar-week',\n },\n approvalInbox: {\n path: 'approval-inbox',\n title: `@${config.i18n}:pages.approval-inbox.title`,\n icon: 'fa-light fa-inbox',\n },\n teamTimesheets: {\n path: 'team-timesheets',\n title: `@${config.i18n}:pages.team-timesheets.title`,\n icon: 'fa-light fa-users',\n },\n },\n};\n\n//#endregion\n","import { AXPWidgetsCatalog } from '@acorex-platform/framework-shared/core';\nimport { AXPEntity, createAllQueryView, entityMasterCrudActions, entityMasterRecordActions } from '@acorex-platform/framework-shared/entity';\nimport { RootConfig } from '../../root-config';\n\n//#region ---- Constants ----\n\nconst i18n = RootConfig.config.i18n;\nconst entityI18n = `${i18n}:timesheet-corrections.entities.timesheet-correction`;\n\nconst listSortAndFilterOptions = {\n sort: { enabled: true },\n filter: { advance: { enabled: true }, inline: { enabled: true } },\n};\n\n//#endregion\n\n//#region ---- Entity Factory ----\n\n/**\n * Timesheet correction entity factory for post-submission change requests.\n */\nexport async function factoryTimesheetCorrection(): Promise<AXPEntity | null> {\n const entityDef: AXPEntity = {\n module: RootConfig.module.name,\n name: RootConfig.entities.timesheetCorrection.name,\n title: RootConfig.entities.timesheetCorrection.title,\n icon: RootConfig.entities.timesheetCorrection.icon,\n formats: {\n individual: RootConfig.entities.timesheetCorrection.title,\n plural: RootConfig.entities.timesheetCorrection.titlePlural,\n searchResult: {\n title: '{{ period.startDate | date:\"mediumDate\" }}',\n description: '{{ reason }}',\n },\n },\n plugins: [\n { name: 'history' },\n {\n name: 'status',\n options: {\n field: 'statusId',\n definition: 'timesheet-management.status.timesheet-correction',\n },\n },\n ],\n groups: [\n { id: 'basic-info', title: '@general:terms.interface.basic-info' },\n { id: 'changes', title: `@${entityI18n}.groups.changes` },\n ],\n properties: [\n {\n name: 'id',\n title: '@general:terms.common.id',\n groupId: 'basic-info',\n schema: { dataType: 'uuid', visible: false, nullable: false, readonly: true, unique: { enabled: true } },\n },\n {\n name: 'periodId',\n title: `@${entityI18n}.fields.period-id.title`,\n groupId: 'basic-info',\n options: listSortAndFilterOptions,\n schema: {\n dataType: 'string',\n interface: {\n type: AXPWidgetsCatalog.lookup,\n options: {\n look: 'select',\n entity: `${RootConfig.module.name}.${RootConfig.entities.timesheetPeriod.name}`,\n textField: 'startDate',\n valueField: 'id',\n expose: [\n { source: 'id', target: 'period.id' },\n { source: 'startDate', target: 'period.startDate' },\n { source: 'endDate', target: 'period.endDate' },\n ],\n },\n },\n },\n validations: [{ rule: 'required' }],\n },\n {\n name: 'requestedById',\n title: `@${entityI18n}.fields.requested-by-id.title`,\n groupId: 'basic-info',\n options: listSortAndFilterOptions,\n schema: {\n dataType: 'string',\n interface: {\n type: AXPWidgetsCatalog.lookup,\n options: {\n look: 'select',\n entity: 'HumanCapitalManagement.Employee',\n textField: 'person.fullName',\n valueField: 'id',\n expose: [{ source: 'id', target: 'requestedBy.id' }],\n },\n },\n },\n validations: [{ rule: 'required' }],\n },\n {\n name: 'reason',\n title: `@${entityI18n}.fields.reason.title`,\n groupId: 'basic-info',\n schema: {\n dataType: 'string',\n interface: { type: AXPWidgetsCatalog.largeText, options: { rows: 3 } },\n },\n validations: [{ rule: 'required' }],\n },\n {\n name: 'statusId',\n title: `@${entityI18n}.fields.status-id.title`,\n groupId: 'basic-info',\n options: listSortAndFilterOptions,\n schema: {\n dataType: 'string',\n readonly: true,\n visible: false,\n interface: { type: AXPWidgetsCatalog.text },\n },\n },\n {\n name: 'changes',\n title: `@${entityI18n}.fields.changes.title`,\n groupId: 'changes',\n schema: {\n dataType: 'string',\n interface: { type: AXPWidgetsCatalog.largeText, options: { rows: 6 } },\n },\n validations: [{ rule: 'required' }],\n },\n ],\n columns: [\n { name: 'periodId', options: { dataPath: 'period.startDate' } },\n { name: 'requestedById' },\n { name: 'statusId' },\n { name: 'reason' },\n ],\n interfaces: {\n master: {\n create: {\n sections: [{ id: 'basic-info' }, { id: 'changes' }],\n properties: [\n { name: 'periodId', layout: { positions: { lg: { colSpan: 6 } } } },\n { name: 'requestedById', layout: { positions: { lg: { colSpan: 6 } } } },\n { name: 'reason', layout: { positions: { lg: { colSpan: 12 } } } },\n { name: 'changes', layout: { positions: { lg: { colSpan: 12 } } } },\n ],\n },\n update: {\n sections: [{ id: 'basic-info' }, { id: 'changes' }],\n properties: [\n { name: 'periodId', layout: { positions: { lg: { colSpan: 6 } } } },\n { name: 'requestedById', layout: { positions: { lg: { colSpan: 6 } } } },\n { name: 'reason', layout: { positions: { lg: { colSpan: 12 } } } },\n { name: 'changes', layout: { positions: { lg: { colSpan: 12 } } } },\n ],\n },\n single: {\n title: '{{ reason }}',\n sections: [{ id: 'basic-info' }, { id: 'changes' }],\n properties: [\n { name: 'periodId', layout: { positions: { lg: { colSpan: 6 } } } },\n { name: 'requestedById', layout: { positions: { lg: { colSpan: 6 } } } },\n { name: 'reason', layout: { positions: { lg: { colSpan: 12 } } } },\n { name: 'changes', layout: { positions: { lg: { colSpan: 12 } } } },\n ],\n actions: [...entityMasterRecordActions()],\n },\n list: {\n actions: [...entityMasterCrudActions()],\n views: [createAllQueryView({ sorts: [{ name: 'periodId', dir: 'desc' }] })],\n },\n },\n },\n };\n\n return entityDef;\n}\n\n//#endregion\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './entity-entry.timesheet-correction';\n"],"names":[],"mappings":";;;AAAA;AAEA,MAAM,MAAM,GAAG;AACb,IAAA,IAAI,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AE,MAAM,EAAE,CAAC,EAAE,CAAC,CAAC;AAC5E,iBAAA;AACF,aAAA;AACF,SAAA;KACF;AAED,IAAA,OAAO,SAAS;AAClB;AAEA;;ACrLA;;AAEG;;;;"}
@@ -0,0 +1,347 @@
1
+ import { AXPWidgetsCatalog, AXPRegionalSetting } from '@acorex-platform/framework-shared/core';
2
+ import { createAllQueryView, entityMasterCrudActions, entityMasterRecordActions, entityDetailsCrudActions, entityDetailsSimpleCondition } from '@acorex-platform/framework-shared/entity';
3
+
4
+ //#region ---- Module Config ----
5
+ const config = {
6
+ i18n: 'timesheet-management',
7
+ module: 'TimesheetManagement',
8
+ route: 'timesheet-management',
9
+ };
10
+ const RootConfig = {
11
+ config,
12
+ module: {
13
+ name: config.module,
14
+ route: config.route,
15
+ title: `@${config.i18n}:module.title`,
16
+ icon: 'fa-light fa-clock',
17
+ },
18
+ entities: {
19
+ workItem: {
20
+ name: 'WorkItem',
21
+ source: `${config.module}.WorkItem`,
22
+ title: `@${config.i18n}:work-items.entities.work-item.title`,
23
+ titlePlural: `@${config.i18n}:work-items.entities.work-item.plural`,
24
+ icon: 'fa-light fa-list-check',
25
+ },
26
+ timesheetPeriod: {
27
+ name: 'TimesheetPeriod',
28
+ source: `${config.module}.TimesheetPeriod`,
29
+ title: `@${config.i18n}:timesheet-periods.entities.timesheet-period.title`,
30
+ titlePlural: `@${config.i18n}:timesheet-periods.entities.timesheet-period.plural`,
31
+ icon: 'fa-light fa-calendar-week',
32
+ },
33
+ timeEntry: {
34
+ name: 'TimeEntry',
35
+ source: `${config.module}.TimeEntry`,
36
+ title: `@${config.i18n}:time-entries.entities.time-entry.title`,
37
+ titlePlural: `@${config.i18n}:time-entries.entities.time-entry.plural`,
38
+ icon: 'fa-light fa-hourglass-half',
39
+ },
40
+ timesheetCorrection: {
41
+ name: 'TimesheetCorrection',
42
+ source: `${config.module}.TimesheetCorrection`,
43
+ title: `@${config.i18n}:timesheet-corrections.entities.timesheet-correction.title`,
44
+ titlePlural: `@${config.i18n}:timesheet-corrections.entities.timesheet-correction.plural`,
45
+ icon: 'fa-light fa-pen-to-square',
46
+ },
47
+ timesheetPolicy: {
48
+ name: 'TimesheetPolicy',
49
+ source: `${config.module}.TimesheetPolicy`,
50
+ title: `@${config.i18n}:timesheet-policies.entities.timesheet-policy.title`,
51
+ titlePlural: `@${config.i18n}:timesheet-policies.entities.timesheet-policy.plural`,
52
+ icon: 'fa-light fa-sliders',
53
+ },
54
+ },
55
+ pages: {
56
+ myTimesheet: {
57
+ path: 'my-timesheet',
58
+ title: `@${config.i18n}:pages.my-timesheet.title`,
59
+ icon: 'fa-light fa-calendar-week',
60
+ },
61
+ approvalInbox: {
62
+ path: 'approval-inbox',
63
+ title: `@${config.i18n}:pages.approval-inbox.title`,
64
+ icon: 'fa-light fa-inbox',
65
+ },
66
+ teamTimesheets: {
67
+ path: 'team-timesheets',
68
+ title: `@${config.i18n}:pages.team-timesheets.title`,
69
+ icon: 'fa-light fa-users',
70
+ },
71
+ },
72
+ };
73
+ //#endregion
74
+
75
+ //#region ---- Constants ----
76
+ const i18n = RootConfig.config.i18n;
77
+ const entityI18n = `${i18n}:timesheet-periods.entities.timesheet-period`;
78
+ const listSortAndFilterOptions = {
79
+ sort: { enabled: true },
80
+ filter: { advance: { enabled: true }, inline: { enabled: true } },
81
+ };
82
+ const PERIOD_TYPE_OPTIONS = [
83
+ { id: 'Weekly', title: `@${entityI18n}.fields.period-type.options.weekly` },
84
+ { id: 'Biweekly', title: `@${entityI18n}.fields.period-type.options.biweekly` },
85
+ { id: 'Monthly', title: `@${entityI18n}.fields.period-type.options.monthly` },
86
+ ];
87
+ //#endregion
88
+ //#region ---- Entity Factory ----
89
+ /**
90
+ * Timesheet period entity factory grouping time entries for approval workflows.
91
+ */
92
+ async function factoryTimesheetPeriod() {
93
+ const entityDef = {
94
+ module: RootConfig.module.name,
95
+ name: RootConfig.entities.timesheetPeriod.name,
96
+ title: RootConfig.entities.timesheetPeriod.title,
97
+ icon: RootConfig.entities.timesheetPeriod.icon,
98
+ formats: {
99
+ individual: RootConfig.entities.timesheetPeriod.title,
100
+ plural: RootConfig.entities.timesheetPeriod.titlePlural,
101
+ searchResult: {
102
+ title: '{{ employee.person.fullName }}',
103
+ description: '{{ startDate | date:"mediumDate" }} — {{ endDate | date:"mediumDate" }}',
104
+ },
105
+ },
106
+ plugins: [
107
+ { name: 'history' },
108
+ {
109
+ name: 'status',
110
+ options: {
111
+ field: 'statusId',
112
+ definition: 'timesheet-management.status.timesheet-period',
113
+ },
114
+ },
115
+ { name: 'lock' },
116
+ ],
117
+ relatedEntities: [
118
+ {
119
+ entity: `${RootConfig.module.name}.${RootConfig.entities.timeEntry.name}`,
120
+ title: RootConfig.entities.timeEntry.titlePlural,
121
+ columns: ['workItemId', 'entryDate', 'durationSeconds', 'isBillable', 'description'],
122
+ conditions: [entityDetailsSimpleCondition('periodId')],
123
+ actions: [...entityDetailsCrudActions('periodId')],
124
+ layout: { type: 'page-list' },
125
+ excludeProperties: ['periodId', 'employeeId'],
126
+ },
127
+ ],
128
+ groups: [
129
+ { id: 'basic-info', title: '@general:terms.interface.basic-info' },
130
+ { id: 'period', title: `@${entityI18n}.groups.period` },
131
+ { id: 'totals', title: `@${entityI18n}.groups.totals` },
132
+ { id: 'approval', title: `@${entityI18n}.groups.approval` },
133
+ ],
134
+ properties: [
135
+ {
136
+ name: 'id',
137
+ title: '@general:terms.common.id',
138
+ groupId: 'basic-info',
139
+ schema: { dataType: 'uuid', visible: false, nullable: false, readonly: true, unique: { enabled: true } },
140
+ },
141
+ {
142
+ name: 'employeeId',
143
+ title: `@${entityI18n}.fields.employee-id.title`,
144
+ groupId: 'basic-info',
145
+ options: listSortAndFilterOptions,
146
+ schema: {
147
+ dataType: 'string',
148
+ interface: {
149
+ type: AXPWidgetsCatalog.lookup,
150
+ options: {
151
+ look: 'select',
152
+ entity: 'HumanCapitalManagement.Employee',
153
+ textField: 'person.fullName',
154
+ valueField: 'id',
155
+ expose: [
156
+ { source: 'id', target: 'employee.id' },
157
+ { source: 'employeeCode', target: 'employee.employeeCode' },
158
+ { source: 'person.fullName', target: 'employee.person.fullName' },
159
+ ],
160
+ },
161
+ },
162
+ },
163
+ validations: [{ rule: 'required' }],
164
+ },
165
+ {
166
+ name: 'periodType',
167
+ title: `@${entityI18n}.fields.period-type.title`,
168
+ groupId: 'period',
169
+ options: listSortAndFilterOptions,
170
+ schema: {
171
+ dataType: 'string',
172
+ defaultValue: 'Weekly',
173
+ interface: {
174
+ type: AXPWidgetsCatalog.select,
175
+ options: { items: PERIOD_TYPE_OPTIONS },
176
+ },
177
+ },
178
+ validations: [{ rule: 'required' }],
179
+ },
180
+ {
181
+ name: 'startDate',
182
+ title: `@${entityI18n}.fields.start-date.title`,
183
+ groupId: 'period',
184
+ options: listSortAndFilterOptions,
185
+ schema: {
186
+ dataType: 'date',
187
+ interface: { type: AXPWidgetsCatalog.dateTime, options: { format: 'date' } },
188
+ },
189
+ validations: [{ rule: 'required' }],
190
+ },
191
+ {
192
+ name: 'endDate',
193
+ title: `@${entityI18n}.fields.end-date.title`,
194
+ groupId: 'period',
195
+ options: listSortAndFilterOptions,
196
+ schema: {
197
+ dataType: 'date',
198
+ interface: { type: AXPWidgetsCatalog.dateTime, options: { format: 'date' } },
199
+ },
200
+ validations: [{ rule: 'required' }],
201
+ },
202
+ {
203
+ name: 'statusId',
204
+ title: `@${entityI18n}.fields.status-id.title`,
205
+ groupId: 'approval',
206
+ options: listSortAndFilterOptions,
207
+ schema: {
208
+ dataType: 'string',
209
+ readonly: true,
210
+ visible: false,
211
+ interface: { type: AXPWidgetsCatalog.text },
212
+ },
213
+ },
214
+ {
215
+ name: 'totalSeconds',
216
+ title: `@${entityI18n}.fields.total-seconds.title`,
217
+ groupId: 'totals',
218
+ options: listSortAndFilterOptions,
219
+ schema: {
220
+ dataType: 'number',
221
+ readonly: true,
222
+ interface: { type: AXPWidgetsCatalog.number, options: { minValue: 0 } },
223
+ },
224
+ },
225
+ {
226
+ name: 'timezone',
227
+ title: `@${entityI18n}.fields.timezone.title`,
228
+ groupId: 'period',
229
+ schema: {
230
+ dataType: 'string',
231
+ defaultValue: `{{ settings.get('${AXPRegionalSetting.TimeZone}') }}`,
232
+ interface: {
233
+ type: AXPWidgetsCatalog.lookup,
234
+ options: {
235
+ entity: 'LocaleManagement.Timezones',
236
+ look: 'select',
237
+ allowSearch: true,
238
+ valueField: 'code',
239
+ textField: 'title',
240
+ filter: {
241
+ logic: 'and',
242
+ filters: [{ field: 'isActive', operator: { type: 'equal' }, value: true }],
243
+ },
244
+ },
245
+ },
246
+ },
247
+ validations: [{ rule: 'required' }],
248
+ },
249
+ {
250
+ name: 'submittedAt',
251
+ title: `@${entityI18n}.fields.submitted-at.title`,
252
+ groupId: 'approval',
253
+ schema: {
254
+ dataType: 'date',
255
+ readonly: true,
256
+ interface: { type: AXPWidgetsCatalog.dateTime },
257
+ },
258
+ },
259
+ {
260
+ name: 'approvedAt',
261
+ title: `@${entityI18n}.fields.approved-at.title`,
262
+ groupId: 'approval',
263
+ schema: {
264
+ dataType: 'date',
265
+ readonly: true,
266
+ interface: { type: AXPWidgetsCatalog.dateTime },
267
+ },
268
+ },
269
+ {
270
+ name: 'rejectionReason',
271
+ title: `@${entityI18n}.fields.rejection-reason.title`,
272
+ groupId: 'approval',
273
+ schema: {
274
+ dataType: 'string',
275
+ readonly: true,
276
+ interface: { type: AXPWidgetsCatalog.largeText, options: { rows: 3 } },
277
+ },
278
+ },
279
+ ],
280
+ columns: [
281
+ { name: 'employeeId', options: { dataPath: 'employee.person.fullName' } },
282
+ { name: 'periodType' },
283
+ { name: 'startDate' },
284
+ { name: 'endDate' },
285
+ { name: 'statusId' },
286
+ { name: 'totalSeconds' },
287
+ { name: 'submittedAt' },
288
+ ],
289
+ interfaces: {
290
+ master: {
291
+ create: {
292
+ sections: [{ id: 'basic-info' }, { id: 'period' }],
293
+ properties: [
294
+ { name: 'employeeId', layout: { positions: { lg: { colSpan: 6 } } } },
295
+ { name: 'periodType', layout: { positions: { lg: { colSpan: 6 } } } },
296
+ { name: 'startDate', layout: { positions: { lg: { colSpan: 6 } } } },
297
+ { name: 'endDate', layout: { positions: { lg: { colSpan: 6 } } } },
298
+ { name: 'timezone', layout: { positions: { lg: { colSpan: 6 } } } },
299
+ ],
300
+ },
301
+ update: {
302
+ sections: [{ id: 'basic-info' }, { id: 'period' }, { id: 'totals' }, { id: 'approval' }],
303
+ properties: [
304
+ { name: 'employeeId', layout: { positions: { lg: { colSpan: 6 } } } },
305
+ { name: 'periodType', layout: { positions: { lg: { colSpan: 6 } } } },
306
+ { name: 'startDate', layout: { positions: { lg: { colSpan: 6 } } } },
307
+ { name: 'endDate', layout: { positions: { lg: { colSpan: 6 } } } },
308
+ { name: 'timezone', layout: { positions: { lg: { colSpan: 6 } } } },
309
+ { name: 'totalSeconds', layout: { positions: { lg: { colSpan: 6 } } } },
310
+ { name: 'submittedAt', layout: { positions: { lg: { colSpan: 6 } } } },
311
+ { name: 'approvedAt', layout: { positions: { lg: { colSpan: 6 } } } },
312
+ { name: 'rejectionReason', layout: { positions: { lg: { colSpan: 12 } } } },
313
+ ],
314
+ },
315
+ single: {
316
+ title: '{{ employee.person.fullName }}',
317
+ sections: [{ id: 'basic-info' }, { id: 'period' }, { id: 'totals' }, { id: 'approval' }],
318
+ properties: [
319
+ { name: 'employeeId', layout: { positions: { lg: { colSpan: 6 } } } },
320
+ { name: 'periodType', layout: { positions: { lg: { colSpan: 6 } } } },
321
+ { name: 'startDate', layout: { positions: { lg: { colSpan: 6 } } } },
322
+ { name: 'endDate', layout: { positions: { lg: { colSpan: 6 } } } },
323
+ { name: 'totalSeconds', layout: { positions: { lg: { colSpan: 6 } } } },
324
+ { name: 'timezone', layout: { positions: { lg: { colSpan: 6 } } } },
325
+ { name: 'submittedAt', layout: { positions: { lg: { colSpan: 6 } } } },
326
+ { name: 'approvedAt', layout: { positions: { lg: { colSpan: 6 } } } },
327
+ { name: 'rejectionReason', layout: { positions: { lg: { colSpan: 12 } } } },
328
+ ],
329
+ actions: [...entityMasterRecordActions()],
330
+ },
331
+ list: {
332
+ actions: [...entityMasterCrudActions()],
333
+ views: [createAllQueryView({ sorts: [{ name: 'startDate', dir: 'desc' }] })],
334
+ },
335
+ },
336
+ },
337
+ };
338
+ return entityDef;
339
+ }
340
+ //#endregion
341
+
342
+ /**
343
+ * Generated bundle index. Do not edit.
344
+ */
345
+
346
+ export { factoryTimesheetPeriod };
347
+ //# sourceMappingURL=acorex-platform-module-timesheet-management-client-contracts-entities-timesheet-period.mjs.map