@seniorsistemas/hcm-clocking-event-rule-nodejs 0.35.0
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.
- package/.github/copilot-instructions.md +11 -0
- package/.github/workflows/release.yaml +10 -0
- package/.gitlab-ci.yml +68 -0
- package/CHANGELOG.md +274 -0
- package/README.doc.md +658 -0
- package/README.md +117 -0
- package/assets/favicon.ico +0 -0
- package/catalog-info.yaml +19 -0
- package/jest.config.js +17 -0
- package/package.json +48 -0
- package/prompt.md +15 -0
- package/run_build_win.bat +1 -0
- package/run_link.bat +3 -0
- package/run_test.bat +1 -0
- package/sonar-project.properties +21 -0
- package/src/data/changes/changes.ts +92 -0
- package/src/data/context/context.ts +251 -0
- package/src/data/context/contextReference.ts +376 -0
- package/src/data/contract/contract.ts +272 -0
- package/src/data/dataset/database.ts +130 -0
- package/src/data/dataset/dataset.ts +275 -0
- package/src/data/definition/timeEvaluationSituationDefinitionHistory.ts +1425 -0
- package/src/data/employee/employee.ts +434 -0
- package/src/data/foundation/companyBranch.ts +66 -0
- package/src/data/foundation/costCenter.ts +47 -0
- package/src/data/foundation/employer.ts +35 -0
- package/src/data/foundation/employmentRelationship.ts +63 -0
- package/src/data/foundation/holiday.ts +84 -0
- package/src/data/foundation/holidayGroup.ts +47 -0
- package/src/data/foundation/jobPosition.ts +73 -0
- package/src/data/foundation/person.ts +35 -0
- package/src/data/foundation/situation.ts +301 -0
- package/src/data/foundation/syndicate.ts +244 -0
- package/src/data/foundation/workschedule.ts +688 -0
- package/src/data/foundation/workshift.ts +647 -0
- package/src/data/foundation/workshiftBase.ts +113 -0
- package/src/data/histories/companyBranchHistory.ts +128 -0
- package/src/data/histories/costCenterHistory.ts +114 -0
- package/src/data/histories/employmentRelationshipHistory.ts +116 -0
- package/src/data/histories/histories.ts +419 -0
- package/src/data/histories/jobPositionHistory.ts +117 -0
- package/src/data/histories/leaveHistory.ts +227 -0
- package/src/data/histories/timeEvaluationHistory.ts +191 -0
- package/src/data/histories/workshiftHistory.ts +66 -0
- package/src/data/hourBank/hourBank.ts +43 -0
- package/src/data/hourBank/hourBankAccount.ts +77 -0
- package/src/data/log/log.ts +38 -0
- package/src/data/schedules/bridge.ts +84 -0
- package/src/data/schedules/compensation.ts +332 -0
- package/src/data/schedules/overtimeAuthorization.ts +174 -0
- package/src/data/schedules/readiness.ts +150 -0
- package/src/data/schedules/schedules.ts +398 -0
- package/src/data/schedules/workscheduleChange.ts +91 -0
- package/src/data/schedules/workshiftChange.ts +76 -0
- package/src/data/timeEvaluation/adjustmentReason.ts +46 -0
- package/src/data/timeEvaluation/clockingEvent.ts +198 -0
- package/src/data/timeEvaluation/estimatedHours.ts +245 -0
- package/src/data/timeEvaluation/interval.ts +568 -0
- package/src/data/timeEvaluation/separatedHours.ts +134 -0
- package/src/data/timeEvaluation/timeEvaluation.ts +1540 -0
- package/src/data/timeEvaluation/timeEvaluationSituation.ts +154 -0
- package/src/data/user/user.ts +44 -0
- package/src/index.ts +60 -0
- package/src/test/builder/bridgeBuilder.builder.ts +28 -0
- package/src/test/builder/clockingEvent.builder.ts +49 -0
- package/src/test/builder/companyBranchHistoryBuilder.ts +29 -0
- package/src/test/builder/compensation.builder.ts +84 -0
- package/src/test/builder/contextReference.builder.ts +69 -0
- package/src/test/builder/costCenterHistoryBuilder.ts +29 -0
- package/src/test/builder/database.builder.ts +21 -0
- package/src/test/builder/datasetBuilder.ts +111 -0
- package/src/test/builder/dateIntervalBuilder.ts +25 -0
- package/src/test/builder/employee.builder.ts +91 -0
- package/src/test/builder/employmentRelationshipBuilder.ts +35 -0
- package/src/test/builder/employmentRelationshipHistoryBuilder.ts +29 -0
- package/src/test/builder/historiesBuilder.ts +56 -0
- package/src/test/builder/holiday.builder.ts +44 -0
- package/src/test/builder/hourBankAccountBuilder.ts +77 -0
- package/src/test/builder/hourBankBuilder.ts +32 -0
- package/src/test/builder/interval.builder.ts +113 -0
- package/src/test/builder/jobPositionHistoryBuilder.ts +29 -0
- package/src/test/builder/overtimeAuthorization.builder.ts +42 -0
- package/src/test/builder/readinessBuilder.builder.ts +57 -0
- package/src/test/builder/schedules.builder.ts +126 -0
- package/src/test/builder/situation.builder.ts +59 -0
- package/src/test/builder/syndicate.builder.ts +96 -0
- package/src/test/builder/syndicateHistoryBuilder.ts +33 -0
- package/src/test/builder/timeEvaluation.builder.ts +138 -0
- package/src/test/builder/timeEvaluationHistory.builder.ts +49 -0
- package/src/test/builder/timeEvaluationSituation.builder.ts +34 -0
- package/src/test/builder/workschedule.builder.ts +96 -0
- package/src/test/builder/workshift.builder.ts +179 -0
- package/src/test/builder/workshiftBuilder.ts +55 -0
- package/src/test/data/clockingEvent.spec.ts +56 -0
- package/src/test/data/context.spec.ts +176 -0
- package/src/test/data/currentUser.spec.ts +11 -0
- package/src/test/data/dataset.spec.ts +144 -0
- package/src/test/data/employee/employee.spec.ts +20 -0
- package/src/test/data/employmentRelationship/employmentRelationship.spec.ts +48 -0
- package/src/test/data/estimatedHours/estimatedHours.spec.ts +96 -0
- package/src/test/data/histories/costCenterHistory.spec.ts +32 -0
- package/src/test/data/histories/histories.spec.ts +306 -0
- package/src/test/data/holyday.spec.ts +89 -0
- package/src/test/data/hourBank/hourBank.spec.ts +48 -0
- package/src/test/data/hourBank/hourBankAccount.spec.ts +32 -0
- package/src/test/data/schedules/bridge.spec.ts +13 -0
- package/src/test/data/schedules/compesation.spect.ts +89 -0
- package/src/test/data/schedules/overtimeAuthorization.spec.ts +52 -0
- package/src/test/data/schedules/readiness.spec.ts +64 -0
- package/src/test/data/schedules/schedules.spec.ts +134 -0
- package/src/test/data/schedules/workscheduleChange.spec.ts +21 -0
- package/src/test/data/syndicate/syndicate.spec.ts +51 -0
- package/src/test/data/timeEvaluation.spec.ts +1057 -0
- package/src/test/data/timeEvaluationDefinition.spec.ts +144 -0
- package/src/test/data/workschedule/workschedule.spec.ts +194 -0
- package/src/test/data/workshift/workshift.spec.ts +79 -0
- package/src/test/utils/date.utils.spec.ts +198 -0
- package/src/test/utils/dateIntervalUtils.spec.ts +210 -0
- package/src/test/utils/object.utils.spec.ts +83 -0
- package/src/utils/dateIntervalUtils.ts +284 -0
- package/src/utils/dateUtils.ts +456 -0
- package/src/utils/decompressGzipLambda.ts +15 -0
- package/src/utils/object.utils.ts +156 -0
- package/trivy/vulnerabilities_scan.json +1160 -0
- package/tsconfig.json +32 -0
- package/tsconfig.spec.json +21 -0
- package/tslint.json +92 -0
- package/typedoc.json +22 -0
|
@@ -0,0 +1,179 @@
|
|
|
1
|
+
import { HolidayGroup } from "../../data/holidayGroup";
|
|
2
|
+
import { ContextReferenceBuilder } from "./contextReference.builder";
|
|
3
|
+
import {
|
|
4
|
+
Workshift,
|
|
5
|
+
WorkshiftParams,
|
|
6
|
+
AutoSearchType,
|
|
7
|
+
TimeShiftType,
|
|
8
|
+
WorkshiftType,
|
|
9
|
+
WorkshiftGroup,
|
|
10
|
+
WorkshiftDetail,
|
|
11
|
+
HolidayType,
|
|
12
|
+
} from "../../data/workshift/workshift";
|
|
13
|
+
|
|
14
|
+
export class WorkshiftBuilder {
|
|
15
|
+
private contextRef = ContextReferenceBuilder.empty();
|
|
16
|
+
private id = "015fb90d-7728-4f84-9728-2840970ec66e";
|
|
17
|
+
private code = 1;
|
|
18
|
+
private type = WorkshiftType.INTERMITTENT;
|
|
19
|
+
private dsrMinutes = 200;
|
|
20
|
+
private weekMinutes = 1000;
|
|
21
|
+
private monthMinutes = 4000;
|
|
22
|
+
private rotationWorkShift = true;
|
|
23
|
+
private extensionNightHours = true;
|
|
24
|
+
private autoSearchType = AutoSearchType.LARGEST_NUMBER_OF_HOURS_WORKED;
|
|
25
|
+
private timeShiftType = TimeShiftType.GENERAL;
|
|
26
|
+
private workshiftGroupsKeys: string[] = [
|
|
27
|
+
'123',
|
|
28
|
+
'124',
|
|
29
|
+
'125',
|
|
30
|
+
'126',
|
|
31
|
+
];
|
|
32
|
+
private workshiftDetailsKeys: string[] = [
|
|
33
|
+
'detail1',
|
|
34
|
+
];
|
|
35
|
+
|
|
36
|
+
constructor() {
|
|
37
|
+
this.contextRef = ContextReferenceBuilder.empty();
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
withCode(code: number): WorkshiftBuilder {
|
|
41
|
+
this.code = code;
|
|
42
|
+
return this;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
withType(type: WorkshiftType): WorkshiftBuilder {
|
|
46
|
+
this.type = type;
|
|
47
|
+
return this;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
withDsrMinutes(dsrMinutes: number): WorkshiftBuilder {
|
|
51
|
+
this.dsrMinutes = dsrMinutes;
|
|
52
|
+
return this;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
withWeekMinutes(weekMinutes: number): WorkshiftBuilder {
|
|
56
|
+
this.weekMinutes = weekMinutes;
|
|
57
|
+
return this;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
withMonthMinutes(monthMinutes: number): WorkshiftBuilder {
|
|
61
|
+
this.monthMinutes = monthMinutes;
|
|
62
|
+
return this;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
withRotationWorkShift(rotationWorkShift: boolean): WorkshiftBuilder {
|
|
66
|
+
this.rotationWorkShift = rotationWorkShift;
|
|
67
|
+
return this;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
withExtensionNightHours(extensionNightHours: boolean): WorkshiftBuilder {
|
|
71
|
+
this.extensionNightHours = extensionNightHours;
|
|
72
|
+
return this;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
withAutoSearchType(autoSearchType: AutoSearchType): WorkshiftBuilder {
|
|
76
|
+
this.autoSearchType = autoSearchType;
|
|
77
|
+
return this;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
withTimeShiftType(timeShiftType: TimeShiftType): WorkshiftBuilder {
|
|
81
|
+
this.timeShiftType = timeShiftType;
|
|
82
|
+
return this;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
withWorkshiftGroupsKeys(workshiftGroupsKeys: string[]): WorkshiftBuilder {
|
|
86
|
+
this.workshiftGroupsKeys = workshiftGroupsKeys;
|
|
87
|
+
|
|
88
|
+
// Create mock WorkshiftGroup objects for testing
|
|
89
|
+
const mockWorkshiftGroups = [
|
|
90
|
+
{ id: '756ae344-4708-472c-80aa-1e304340fffa', code: 1, baseDate: new Date("2022-08-01") },
|
|
91
|
+
{ id: '5a8f1fd7-98b3-4742-a94b-8b510420effa', code: 2, baseDate: new Date("2022-08-08") },
|
|
92
|
+
{ id: '7c2e49fd-a504-45a9-b4e9-3e3ef203ffa2', code: 3, baseDate: new Date("2022-08-15") },
|
|
93
|
+
{ id: '24d054c6-6eba-4526-8ed5-59ccd7180b6a', code: 4, baseDate: new Date("1901-01-08") },
|
|
94
|
+
{ id: '756e0ceb-0fdc-4df2-ab88-464cdb28218b', code: 4, baseDate: new Date("2022-08-22") },
|
|
95
|
+
{ id: '3b6923e1-092f-452b-a790-f3f6d167df1e', code: 5, baseDate: new Date("2022-08-29") },
|
|
96
|
+
{ id: '137fa797-595f-45e7-8365-f256e3148016', code: 5, baseDate: new Date("2023-03-22") },
|
|
97
|
+
{ id: '88d10282-188c-4b16-a205-8e6eeabc965f', code: 6, baseDate: new Date("2022-09-05") },
|
|
98
|
+
];
|
|
99
|
+
|
|
100
|
+
// Add mock WorkshiftGroup objects to the contextRef using reflection or alternative contextRef
|
|
101
|
+
// This is a simplified approach for testing purposes
|
|
102
|
+
const contextRefWithMocks = {
|
|
103
|
+
...this.contextRef,
|
|
104
|
+
getWorkshiftGroup: (id: string) => {
|
|
105
|
+
const mockGroup = mockWorkshiftGroups.find(g => g.id === id);
|
|
106
|
+
if (!mockGroup) return undefined;
|
|
107
|
+
|
|
108
|
+
return new WorkshiftGroup({
|
|
109
|
+
id: mockGroup.id,
|
|
110
|
+
code: mockGroup.code,
|
|
111
|
+
baseDate: mockGroup.baseDate
|
|
112
|
+
});
|
|
113
|
+
}
|
|
114
|
+
};
|
|
115
|
+
|
|
116
|
+
this.contextRef = contextRefWithMocks as any;
|
|
117
|
+
return this;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
withWorkshiftDetailsKeys(workshiftDetailsKeys: string[]): WorkshiftBuilder {
|
|
121
|
+
this.workshiftDetailsKeys = workshiftDetailsKeys;
|
|
122
|
+
|
|
123
|
+
const mockWorkshiftDetails = [
|
|
124
|
+
{
|
|
125
|
+
workshiftDetailsKey: '2022-08-12_OWN_2',
|
|
126
|
+
holidayGroup: { code: 2 },
|
|
127
|
+
holidayType: HolidayType.OWN,
|
|
128
|
+
startDate: new Date("2022-08-12")
|
|
129
|
+
},
|
|
130
|
+
{
|
|
131
|
+
workshiftDetailsKey: '2024-01-01_BRANCH_0',
|
|
132
|
+
holidayGroup: { code: 0 },
|
|
133
|
+
holidayType: HolidayType.BRANCH,
|
|
134
|
+
startDate: new Date("2024-01-01")
|
|
135
|
+
}
|
|
136
|
+
];
|
|
137
|
+
|
|
138
|
+
// Add mock WorkshiftDetail objects to the contextRef
|
|
139
|
+
const contextRefWithMocks = {
|
|
140
|
+
...this.contextRef,
|
|
141
|
+
getWorkshiftGroup: this.contextRef.getWorkshiftGroup,
|
|
142
|
+
getWorkshiftDetail: (key: string) => {
|
|
143
|
+
const mockDetail = mockWorkshiftDetails.find(d => d.workshiftDetailsKey === key);
|
|
144
|
+
if (!mockDetail) return undefined;
|
|
145
|
+
|
|
146
|
+
return new WorkshiftDetail({
|
|
147
|
+
workshiftDetailsKey: mockDetail.workshiftDetailsKey,
|
|
148
|
+
holidayGroup: new HolidayGroup({
|
|
149
|
+
code: mockDetail.holidayGroup.code
|
|
150
|
+
}),
|
|
151
|
+
holidayType: mockDetail.holidayType,
|
|
152
|
+
startDate: mockDetail.startDate
|
|
153
|
+
});
|
|
154
|
+
}
|
|
155
|
+
};
|
|
156
|
+
|
|
157
|
+
this.contextRef = contextRefWithMocks as any;
|
|
158
|
+
return this;
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
build(): Workshift {
|
|
162
|
+
const params: WorkshiftParams = {
|
|
163
|
+
id: this.id,
|
|
164
|
+
code: this.code,
|
|
165
|
+
type: this.type,
|
|
166
|
+
dsrMinutes: this.dsrMinutes,
|
|
167
|
+
weekMinutes: this.weekMinutes,
|
|
168
|
+
monthMinutes: this.monthMinutes,
|
|
169
|
+
rotationWorkShift: this.rotationWorkShift,
|
|
170
|
+
extensionNightHours: this.extensionNightHours,
|
|
171
|
+
autoSearchType: this.autoSearchType,
|
|
172
|
+
timeShiftType: this.timeShiftType,
|
|
173
|
+
workshiftGroupsKeys: this.workshiftGroupsKeys,
|
|
174
|
+
workshiftDetailsKeys: this.workshiftDetailsKeys
|
|
175
|
+
};
|
|
176
|
+
|
|
177
|
+
return new Workshift(params);
|
|
178
|
+
}
|
|
179
|
+
}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { Workshift, WorkshiftParams, WorkshiftType, AutoSearchType, TimeShiftType, WorkshiftGroup, WorkshiftDetail, HolidayGroupParams, HolidayType } from "../../data/workshift/workshift";
|
|
2
|
+
|
|
3
|
+
export class WorkshiftBuilder {
|
|
4
|
+
static defaultParams(): WorkshiftParams {
|
|
5
|
+
return {
|
|
6
|
+
code: 1,
|
|
7
|
+
type: WorkshiftType.PERMANENT,
|
|
8
|
+
dsrMinutes: 60,
|
|
9
|
+
weekMinutes: 2400,
|
|
10
|
+
monthMinutes: 9600,
|
|
11
|
+
rotationWorkShift: false,
|
|
12
|
+
extensionNightHours: false,
|
|
13
|
+
autoSearchType: AutoSearchType.LARGEST_NUMBER_OF_HOURS_WORKED,
|
|
14
|
+
timeShiftType: TimeShiftType.FIRSTSHIFT,
|
|
15
|
+
workshiftGroups: [
|
|
16
|
+
new WorkshiftGroup({
|
|
17
|
+
code: 100,
|
|
18
|
+
baseDate: new Date("2023-01-01")
|
|
19
|
+
})
|
|
20
|
+
],
|
|
21
|
+
workshiftDetails: [
|
|
22
|
+
new WorkshiftDetail({
|
|
23
|
+
holidayGroup: new HolidayGroup({ code: 200 } as HolidayGroupParams),
|
|
24
|
+
holidayType: HolidayType.OWN,
|
|
25
|
+
startDate: new Date("2023-01-01")
|
|
26
|
+
})
|
|
27
|
+
]
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
static default(): { build: () => Workshift } {
|
|
32
|
+
return {
|
|
33
|
+
build: (): Workshift => {
|
|
34
|
+
return new Workshift(this.defaultParams());
|
|
35
|
+
}
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
static withParams(params: Partial<WorkshiftParams>): { build: () => Workshift } {
|
|
40
|
+
return {
|
|
41
|
+
build: (): Workshift => {
|
|
42
|
+
const def = this.defaultParams();
|
|
43
|
+
const merged: WorkshiftParams = { ...def, ...params };
|
|
44
|
+
// Para arrays, faz merge manual se necessário
|
|
45
|
+
if (params.workshiftGroups){
|
|
46
|
+
merged.workshiftGroups = params.workshiftGroups;
|
|
47
|
+
}
|
|
48
|
+
if (params.workshiftDetails) {
|
|
49
|
+
merged.workshiftDetails = params.workshiftDetails;
|
|
50
|
+
}
|
|
51
|
+
return new Workshift(merged);
|
|
52
|
+
}
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { ClockingEventOriginType, ClockingUseType } from "../../data/timeEvaluation/clockingEvent";
|
|
2
|
+
import { Context } from "../../data/context/context";
|
|
3
|
+
|
|
4
|
+
describe('Clocking event', () => {
|
|
5
|
+
|
|
6
|
+
it('Usuário corrente', () => {
|
|
7
|
+
let inputRule = '{"version":"1.0.0","input":{"batchId":"7bdd1b6c-98f7-41f2-a3b9-fc0afaad39c2","processType":"EVALUATE","startDate":"2025-06-25","endDate":"2025-06-25","contracts":[{"id":"943a66fb-3636-456f-b7ba-e3e1526e8892","holidaysKeys":[],"timeEvaluation":[{"date":"2025-06-25","workscheduleId":"2ea56497-6df6-489d-94b5-3baa3ac166d5","workscheduleWorkshiftId":"dc3dd08e-f0b6-4569-8a5b-83e55b5b9ce3","workshiftId":"87db8a76-156c-4265-9989-39be06859135","timeEvaluationSituations":[{"situationId":"ceeacf87-0df3-4263-a8fa-d66d4bd3f4b0","situationCode":1,"numberOfHours":280},{"situationId":"ccb72e89-c9d6-4ea6-960d-ed99e573d77f","situationCode":103,"numberOfHours":105},{"situationId":"eab898c7-87f8-4b6a-b67e-f62bba5c1c14","situationCode":101,"numberOfHours":125},{"situationId":"ae0b0bc6-2178-4876-91a7-c468360070ec","situationCode":66,"numberOfHours":180},{"situationId":"ae7950c4-2b50-4c95-93ea-e6e8e924e776","situationCode":523,"numberOfHours":205}],"clockingEvents":[{"clockingEventDate":"2025-06-25","clockingEventTime":0,"functionCode":0,"originType":"TYPED","useType":"CLOCKING"},{"clockingEventDate":"2025-06-25","clockingEventTime":180,"functionCode":0,"originType":"TYPED","useType":"CLOCKING"},{"clockingEventDate":"2025-06-25","clockingEventTime":480,"functionCode":0,"originType":"TYPED","useType":"PAID_BREAK"},{"clockingEventDate":"2025-06-25","clockingEventTime":720,"functionCode":0,"originType":"TYPED","useType":"WAITING"},{"clockingEventDate":"2025-06-25","clockingEventTime":915,"functionCode":0,"originType":"TYPED","useType":"REQUIRED_STOP"},{"clockingEventDate":"2025-06-25","clockingEventTime":955,"functionCode":0,"originType":"TYPED","useType":"DRIVING"}],"intervals":[{"clockingEventStart":"2025-06-25T00:00:00","clockingEventEnd":"2025-06-25T03:00:00","type":"OVERTIME","subType":"BEFORE_WORKING","situationCode":0,"situationReasonCode":0,"justifiedDays":0,"positionWorkingPart":{"workingHours":1,"part":1},"isNightly":true,"isOvertimeAuthorized":false,"isTolerancePeriod":false,"inClockingEventTolerance":true},{"clockingEventStart":"2025-06-25T08:00:00","clockingEventEnd":"2025-06-25T12:00:00","type":"WORKING","situationCode":0,"situationReasonCode":0,"justifiedDays":0,"positionWorkingPart":{"workingHours":1,"part":1},"isNightly":false,"isOvertimeAuthorized":false,"isTolerancePeriod":false,"inClockingEventTolerance":false},{"clockingEventStart":"2025-06-25T12:00:00","clockingEventEnd":"2025-06-25T13:30:00","type":"MEAL","situationCode":0,"situationReasonCode":0,"justifiedDays":0,"positionWorkingPart":{"workingHours":1,"part":1},"isNightly":false,"isOvertimeAuthorized":false,"isTolerancePeriod":false,"inClockingEventTolerance":false},{"clockingEventStart":"2025-06-25T13:30:00","clockingEventEnd":"2025-06-25T15:15:00","type":"ABSENCE","subType":"DELAY","situationCode":0,"situationReasonCode":0,"justifiedDays":0,"positionWorkingPart":{"workingHours":1,"part":2},"isNightly":false,"isOvertimeAuthorized":false,"isTolerancePeriod":false,"inClockingEventTolerance":true},{"clockingEventStart":"2025-06-25T15:15:00","clockingEventEnd":"2025-06-25T15:55:00","type":"WORKING","situationCode":0,"situationReasonCode":0,"justifiedDays":0,"positionWorkingPart":{"workingHours":1,"part":1},"isNightly":false,"isOvertimeAuthorized":false,"isTolerancePeriod":false,"inClockingEventTolerance":false},{"clockingEventStart":"2025-06-25T15:55:00","clockingEventEnd":"2025-06-25T18:00:00","type":"ABSENCE","subType":"EARLY_EXIT","situationCode":0,"situationReasonCode":0,"justifiedDays":0,"positionWorkingPart":{"workingHours":1,"part":2},"isNightly":false,"isOvertimeAuthorized":false,"isTolerancePeriod":false,"inClockingEventTolerance":false}],"situationDefinitionKey":"3_2025-01-01_null","estimatedHours":{"meal":[{"dailyHours":90,"nightlyHours":0}],"snack":[],"work":[{"dailyHours":240,"nightlyHours":0},{"dailyHours":270,"nightlyHours":0}]},"syndicateKey":"1","missingClockingEvent":false}],"employee":{"id":"943a66fb-3636-456f-b7ba-e3e1526e8892","code":1,"person":{"name":"Eric Blauerstein"},"hireDate":"2020-01-01","employmentRelationshipId":"bda638aa-a392-4900-a388-58dd80b2d751","employer":{"code":1},"jobPositionCode":"2","companyBranchCode":1,"workshiftCode":1,"workshiftGroupCode":1},"histories":{"jobPositionHistories":[{"startDate":"2025-04-10","jobPositionKey":"1_2"}],"companyBranchHistories":[{"startDate":"2020-01-01","companyBranchKey":"1_1"}],"employmentRelationshipHistories":[{"startDate":"2020-01-01","endDate":"2025-05-31","employmentRelationshipId":"9f051554-763f-4d7a-a688-2ce8922f83a8"},{"startDate":"2025-06-01","employmentRelationshipId":"bda638aa-a392-4900-a388-58dd80b2d751"}],"timeEvaluationHistories":[{"startDate":"2025-04-10","type":"NORMAL","situationDefinitionKey":["3_2025-01-01_null"]}],"workshiftHistories":[{"startDate":"2020-01-01","workshiftId":"87db8a76-156c-4265-9989-39be06859135","workshiftGroupsCode":1}],"leaveHistories":[{"startDate":"2025-06-04","endDate":"2025-06-08","startTime":0,"endTime":0,"situationId":"07a513ab-a523-492b-af98-c04884241014"},{"startDate":"2025-06-13","endDate":"2025-06-13","startTime":0,"endTime":0,"situationId":"21ddf37a-7388-488c-afe3-53ce9868dbb9"},{"startDate":"2025-06-15","endDate":"2025-06-16","startTime":0,"endTime":0,"situationId":"bee787b7-94ec-477f-b2fd-3403007e28fb"},{"startDate":"2025-06-18","endDate":"2025-06-18","startTime":480,"endTime":600,"situationId":"bee787b7-94ec-477f-b2fd-3403007e28fb"},{"startDate":"2025-06-18","endDate":"2025-06-18","startTime":900,"endTime":1080,"situationId":"bee787b7-94ec-477f-b2fd-3403007e28fb"},{"startDate":"2025-06-20","endDate":"2025-06-23","startTime":0,"endTime":0,"situationId":"bee787b7-94ec-477f-b2fd-3403007e28fb"}]},"schedules":{"bridges":[{"originDate":"2025-06-08","destinationDate":"2025-06-09"},{"originDate":"2025-06-09","destinationDate":"2025-06-10"}],"workscheduleChanges":[{"date":"2025-06-25","workscheduleId":"2ea56497-6df6-489d-94b5-3baa3ac166d5"},{"date":"2025-05-19","workscheduleId":"5e6678d0-e63a-4fca-852c-7f481293487a"}],"workshiftChanges":[{"startDate":"2025-05-02","endDate":"2025-05-03","workshiftId":"0672b0da-0406-4fbf-a4ac-9c2631c2b5cd","workshiftGroupsCode":1},{"startDate":"2025-05-20","endDate":"2025-05-21","workshiftId":"0672b0da-0406-4fbf-a4ac-9c2631c2b5cd","workshiftGroupsCode":7}]},"hourBankAccounts":[{"hourBank":{"code":1},"creationDate":"2025-04-01","extinctionDate":"2025-04-11"},{"hourBank":{"code":1},"creationDate":"2025-05-01"}]}],"database":{"situations":[{"id":"ceeacf87-0df3-4263-a8fa-d66d4bd3f4b0","code":1,"type":"WORKING","exception":false,"complementarySituationId":"1ff19942-ace7-45ea-b886-861e75471795","daytime":true},{"id":"d609b9e3-25f3-419e-be4a-63d7cffdb5c1","code":2,"type":"VACATION","exception":false,"complementarySituationId":"4313de66-ec62-4bbf-b469-fe87546fc5c3","daytime":true},{"id":"bee787b7-94ec-477f-b2fd-3403007e28fb","code":4,"type":"LABORACCIDENT","exception":false,"complementarySituationId":"4313de66-ec62-4bbf-b469-fe87546fc5c3","daytime":true},{"id":"21ddf37a-7388-488c-afe3-53ce9868dbb9","code":5,"type":"MILITARYSERVICE","exception":false,"complementarySituationId":"4313de66-ec62-4bbf-b469-fe87546fc5c3","daytime":true},{"id":"07a513ab-a523-492b-af98-c04884241014","code":10,"type":"PAIDLEAVE","exception":false,"complementarySituationId":"bb5e3c0e-642d-481d-9726-7985a2e559aa","daytime":true},{"id":"814b36c4-aabf-4639-b0d7-884ba7cf17bb","code":15,"type":"ABSENCES","exception":true,"complementarySituationId":"61963c0b-213c-4fbc-9329-6afadc971b34","daytime":true},{"id":"77c72619-b2a8-4777-bdfb-ff63a0283400","code":16,"type":"OVERTIME","exception":true,"complementarySituationId":"ae0b0bc6-2178-4876-91a7-c468360070ec","daytime":true},{"id":"bb5e3c0e-642d-481d-9726-7985a2e559aa","code":60,"type":"PAIDLEAVE","exception":false,"complementarySituationId":"07a513ab-a523-492b-af98-c04884241014","daytime":false},{"id":"61963c0b-213c-4fbc-9329-6afadc971b34","code":65,"type":"ABSENCES","exception":true,"complementarySituationId":"814b36c4-aabf-4639-b0d7-884ba7cf17bb","daytime":false},{"id":"ae0b0bc6-2178-4876-91a7-c468360070ec","code":66,"type":"OVERTIME","exception":true,"complementarySituationId":"77c72619-b2a8-4777-bdfb-ff63a0283400","daytime":false},{"id":"eab898c7-87f8-4b6a-b67e-f62bba5c1c14","code":101,"type":"ABSENCES","exception":true,"complementarySituationId":"71d9ba6f-8a49-4e46-8251-67b8626fbeeb","daytime":true},{"id":"71d9ba6f-8a49-4e46-8251-67b8626fbeeb","code":102,"type":"ABSENCES","exception":true,"complementarySituationId":"eab898c7-87f8-4b6a-b67e-f62bba5c1c14","daytime":false},{"id":"ccb72e89-c9d6-4ea6-960d-ed99e573d77f","code":103,"type":"ABSENCES","exception":true,"complementarySituationId":"f8e7a234-6d85-499b-836e-9f5b78884be7","daytime":true},{"id":"f8e7a234-6d85-499b-836e-9f5b78884be7","code":104,"type":"ABSENCES","exception":true,"complementarySituationId":"ccb72e89-c9d6-4ea6-960d-ed99e573d77f","daytime":false},{"id":"e6077a7c-645b-4bc6-8698-402c68467ce9","code":105,"type":"ABSENCES","exception":true,"complementarySituationId":"37d56ac4-8cd6-4a3d-b660-1c53890dca1f","daytime":true},{"id":"37d56ac4-8cd6-4a3d-b660-1c53890dca1f","code":106,"type":"ABSENCES","exception":true,"complementarySituationId":"e6077a7c-645b-4bc6-8698-402c68467ce9","daytime":false},{"id":"1ff19942-ace7-45ea-b886-861e75471795","code":501,"type":"WORKING","exception":false,"complementarySituationId":"ceeacf87-0df3-4263-a8fa-d66d4bd3f4b0","daytime":false},{"id":"ef6bd93e-53da-4b41-b532-d85006b9e607","code":502,"type":"OTHERS","exception":true,"complementarySituationId":"ef6bd93e-53da-4b41-b532-d85006b9e607","daytime":false},{"id":"ebaf5a44-bed7-4646-96fa-7582b496ab0a","code":503,"type":"WORKING","exception":true,"complementarySituationId":"ebaf5a44-bed7-4646-96fa-7582b496ab0a","daytime":true},{"id":"65d5b620-5889-4819-b7d3-c17ebffd1ac0","code":504,"type":"ABSENCES","exception":true,"complementarySituationId":"65d5b620-5889-4819-b7d3-c17ebffd1ac0","daytime":true},{"id":"b809cc96-bcdb-4ca8-b2be-f71a2d014c30","code":505,"type":"OVERTIME","exception":false,"complementarySituationId":"b809cc96-bcdb-4ca8-b2be-f71a2d014c30","daytime":true},{"id":"804a6ecc-df01-42b9-ad37-ed68de3a8a0d","code":506,"type":"OVERTIME","exception":false,"complementarySituationId":"804a6ecc-df01-42b9-ad37-ed68de3a8a0d","daytime":true},{"id":"3d6f1c23-bd6d-4d97-a6f6-0bce25703a1b","code":507,"type":"OVERTIME","exception":false,"complementarySituationId":"3d6f1c23-bd6d-4d97-a6f6-0bce25703a1b","daytime":true},{"id":"803645a7-5f43-49b1-bafa-70fa910733d6","code":508,"type":"OVERTIME","exception":false,"complementarySituationId":"803645a7-5f43-49b1-bafa-70fa910733d6","daytime":true},{"id":"60030488-fe09-423a-9b1f-248d366430b4","code":509,"type":"OVERTIME","exception":false,"complementarySituationId":"60030488-fe09-423a-9b1f-248d366430b4","daytime":true},{"id":"3f61cff5-18d7-4042-b44f-791a4c308f2c","code":510,"type":"OVERTIME","exception":false,"complementarySituationId":"3f61cff5-18d7-4042-b44f-791a4c308f2c","daytime":true},{"id":"b3d37da3-21bd-4902-9358-0bbc4721b327","code":511,"type":"OVERTIME","exception":false,"complementarySituationId":"b3d37da3-21bd-4902-9358-0bbc4721b327","daytime":true},{"id":"1d62f6c8-b128-4c8d-a63b-e9e056a7b07e","code":512,"type":"OVERTIME","exception":false,"complementarySituationId":"1d62f6c8-b128-4c8d-a63b-e9e056a7b07e","daytime":true},{"id":"48f5bc52-4fdf-4479-9a4c-7c2d70d89a2b","code":513,"type":"OVERTIME","exception":false,"complementarySituationId":"48f5bc52-4fdf-4479-9a4c-7c2d70d89a2b","daytime":true},{"id":"c705ea33-88b4-44dc-b755-fe2ae6fff151","code":514,"type":"OVERTIME","exception":false,"complementarySituationId":"c705ea33-88b4-44dc-b755-fe2ae6fff151","daytime":true},{"id":"c3df3a50-6ac4-4fea-b166-66ffd90a89c5","code":515,"type":"OVERTIME","exception":false,"complementarySituationId":"c3df3a50-6ac4-4fea-b166-66ffd90a89c5","daytime":true},{"id":"e5b79a9d-5093-4b68-aa0d-34cac5536053","code":516,"type":"OVERTIME","exception":false,"complementarySituationId":"e5b79a9d-5093-4b68-aa0d-34cac5536053","daytime":true},{"id":"5f728686-409a-44c8-8b7e-e848e598de60","code":517,"type":"OVERTIME","exception":false,"complementarySituationId":"5f728686-409a-44c8-8b7e-e848e598de60","daytime":true},{"id":"a5da8e1f-612c-4903-865a-de1b861ad98c","code":518,"type":"OVERTIME","exception":false,"complementarySituationId":"a5da8e1f-612c-4903-865a-de1b861ad98c","daytime":true},{"id":"90b4e18c-80fe-4ccb-86eb-e59f9168115c","code":519,"type":"OVERTIME","exception":false,"complementarySituationId":"90b4e18c-80fe-4ccb-86eb-e59f9168115c","daytime":true},{"id":"97fa2f0e-bac1-4cbe-b1a3-83c43a74072b","code":520,"type":"OVERTIME","exception":false,"complementarySituationId":"97fa2f0e-bac1-4cbe-b1a3-83c43a74072b","daytime":true},{"id":"94dec6d5-e769-4668-9b52-8896452b5e39","code":521,"type":"OVERTIME","exception":false,"complementarySituationId":"94dec6d5-e769-4668-9b52-8896452b5e39","daytime":true},{"id":"18d6ae61-9b3e-43ce-8fb3-82cf9d05a45c","code":522,"type":"OVERTIME","exception":false,"complementarySituationId":"18d6ae61-9b3e-43ce-8fb3-82cf9d05a45c","daytime":true},{"id":"ae7950c4-2b50-4c95-93ea-e6e8e924e776","code":523,"type":"OVERTIME","exception":true,"complementarySituationId":"ae7950c4-2b50-4c95-93ea-e6e8e924e776","daytime":false},{"id":"3a01f30a-c58f-4a7d-af4e-5f6c08951e9d","code":524,"type":"OVERTIME","exception":false,"complementarySituationId":"3a01f30a-c58f-4a7d-af4e-5f6c08951e9d","daytime":false},{"id":"4313de66-ec62-4bbf-b469-fe87546fc5c3","code":750,"type":"VACATION","exception":false,"complementarySituationId":"21ddf37a-7388-488c-afe3-53ce9868dbb9","daytime":false},{"id":"c5e72905-07fb-4baf-929f-847d96fe0a05","code":999,"type":"TIMEEVALUATIONSITUATION","exception":true,"complementarySituationId":"c5e72905-07fb-4baf-929f-847d96fe0a05","daytime":true}],"holidays":[],"timeEvaluationSituationDefinitions":[{"code":3,"startDate":"2025-01-01","workSituationId":"ceeacf87-0df3-4263-a8fa-d66d4bd3f4b0","nightShiftWorkPremiumId":"1ff19942-ace7-45ea-b886-861e75471795","invalidEventsSituationId":"c5e72905-07fb-4baf-929f-847d96fe0a05","vacationPaidLeaveSituationId":"d609b9e3-25f3-419e-be4a-63d7cffdb5c1","dailyRestViolationSituationId":"ef6bd93e-53da-4b41-b532-d85006b9e607","workBreakViolationSituationId":"ebaf5a44-bed7-4646-96fa-7582b496ab0a","absenceSituationId":"814b36c4-aabf-4639-b0d7-884ba7cf17bb","tardinessSituationId":"ccb72e89-c9d6-4ea6-960d-ed99e573d77f","intermediateLeaveSituationId":"e6077a7c-645b-4bc6-8698-402c68467ce9","earlyLeaveSituationId":"eab898c7-87f8-4b6a-b67e-f62bba5c1c14","absenceSituationOnRelayScheduleHolidaysId":"65d5b620-5889-4819-b7d3-c17ebffd1ac0","percentageNextDay":false,"normalOvertimeSeparationLimit":90,"separateOvertimeAfterConvertingNightShiftHours":false,"unauthorizedOvertimeId":"77c72619-b2a8-4777-bdfb-ff63a0283400","overtimeBeforeId":"b809cc96-bcdb-4ca8-b2be-f71a2d014c30","overtimeEntryId":"3d6f1c23-bd6d-4d97-a6f6-0bce25703a1b","overtimeDuringMealId":"60030488-fe09-423a-9b1f-248d366430b4","leaveOvertimeId":"b3d37da3-21bd-4902-9358-0bbc4721b327","overtimeAfterId":"48f5bc52-4fdf-4479-9a4c-7c2d70d89a2b","overtimeSeparationLimitDuringRest":240,"overtimeDuringRestId":"c3df3a50-6ac4-4fea-b166-66ffd90a89c5","overtimeSeparationLimitDuringCompensatedDays":240,"overtimeOnCompensatedDaysId":"5f728686-409a-44c8-8b7e-e848e598de60","overtimeSeparationLimitDuringHoliday":240,"overtimeDuringHolidayId":"90b4e18c-80fe-4ccb-86eb-e59f9168115c","overtimeSeparationLimitDuringDayOff":240,"overtimeDuringDayOffId":"94dec6d5-e769-4668-9b52-8896452b5e39","overtimeSituationOnRelayScheduleHolidaysId":"3a01f30a-c58f-4a7d-af4e-5f6c08951e9d","nightShiftOvertimePremiumSituationId":"ae7950c4-2b50-4c95-93ea-e6e8e924e776","overtimeSeparationBeforeId":"804a6ecc-df01-42b9-ad37-ed68de3a8a0d","overtimeSeparationEntryId":"803645a7-5f43-49b1-bafa-70fa910733d6","overtimeSeparationDuringMealId":"3f61cff5-18d7-4042-b44f-791a4c308f2c","overtimeSeparationLeaveId":"1d62f6c8-b128-4c8d-a63b-e9e056a7b07e","overtimeSeparationAfterId":"c705ea33-88b4-44dc-b755-fe2ae6fff151","overtimeSeparationDuringRestId":"e5b79a9d-5093-4b68-aa0d-34cac5536053","overtimeSeparationDuringCompensatedDaysId":"a5da8e1f-612c-4903-865a-de1b861ad98c","overtimeSeparationDuringHolidayId":"97fa2f0e-bac1-4cbe-b1a3-83c43a74072b","overtimeSeparationDuringDayOffId":"18d6ae61-9b3e-43ce-8fb3-82cf9d05a45c"}],"jobPositions":[{"key":"1_2","code":2,"structureCode":1}],"workschedules":[{"id":"2ea56497-6df6-489d-94b5-3baa3ac166d5","code":6,"workload":510,"type":"FLEXIBLE_AT_INTERVALS","definitionType":"NORMAL","clockingRegisters":[{"sequence":1,"clockingEvent":480,"toleranceBefore":470,"toleranceAfter":485,"mobilityBefore":0,"mobilityAfter":0,"clockingEventScheduleType":"MANDATORY","usingType":"MANDATORY_ENTRY_OR_EXIT"},{"sequence":2,"clockingEvent":720,"toleranceBefore":720,"toleranceAfter":720,"mobilityBefore":0,"mobilityAfter":0,"intervalType":"FLEXIBLE","clockingEventScheduleType":"MANDATORY","usingType":"MANDATORY_MEAL"},{"sequence":3,"clockingEvent":810,"toleranceBefore":810,"toleranceAfter":810,"mobilityBefore":0,"mobilityAfter":0,"intervalType":"FLEXIBLE","clockingEventScheduleType":"MANDATORY","usingType":"MANDATORY_MEAL"},{"sequence":4,"clockingEvent":1080,"toleranceBefore":1075,"toleranceAfter":1090,"mobilityBefore":0,"mobilityAfter":0,"clockingEventScheduleType":"MANDATORY","usingType":"MANDATORY_ENTRY_OR_EXIT"}],"clockingEvent":{"workStartEndOvertimeTolerance":0,"mealOvertimeTolerance":0,"overtimeDailyTotalTolerance":0,"absenceDailyTotalTolerance":0,"workStartEndAbsenceTolerance":0,"mealAbsenceTolerance":0}},{"id":"dc3dd08e-f0b6-4569-8a5b-83e55b5b9ce3","code":1,"workload":510,"type":"RIGID","definitionType":"NORMAL","clockingRegisters":[{"sequence":1,"clockingEvent":480,"toleranceBefore":470,"toleranceAfter":485,"mobilityBefore":0,"mobilityAfter":0,"clockingEventScheduleType":"MANDATORY","usingType":"MANDATORY_ENTRY_OR_EXIT"},{"sequence":2,"clockingEvent":720,"toleranceBefore":715,"toleranceAfter":730,"mobilityBefore":0,"mobilityAfter":0,"intervalType":"RIGID","clockingEventScheduleType":"MANDATORY","usingType":"MANDATORY_MEAL"},{"sequence":3,"clockingEvent":810,"toleranceBefore":800,"toleranceAfter":815,"mobilityBefore":0,"mobilityAfter":0,"intervalType":"RIGID","clockingEventScheduleType":"MANDATORY","usingType":"MANDATORY_MEAL"},{"sequence":4,"clockingEvent":1080,"toleranceBefore":1075,"toleranceAfter":1090,"mobilityBefore":0,"mobilityAfter":0,"clockingEventScheduleType":"MANDATORY","usingType":"MANDATORY_ENTRY_OR_EXIT"}],"clockingEvent":{"workStartEndOvertimeTolerance":0,"mealOvertimeTolerance":0,"overtimeDailyTotalTolerance":0,"absenceDailyTotalTolerance":0,"workStartEndAbsenceTolerance":0,"mealAbsenceTolerance":0}},{"id":"5e6678d0-e63a-4fca-852c-7f481293487a","code":344,"workload":540,"type":"RIGID","definitionType":"NORMAL","clockingRegisters":[{"sequence":1,"clockingEvent":480,"toleranceBefore":480,"toleranceAfter":480,"mobilityBefore":0,"mobilityAfter":0,"clockingEventScheduleType":"MANDATORY","usingType":"MANDATORY_ENTRY_OR_EXIT"},{"sequence":2,"clockingEvent":720,"toleranceBefore":720,"toleranceAfter":720,"mobilityBefore":0,"mobilityAfter":0,"intervalType":"RIGID","clockingEventScheduleType":"GENERATED","usingType":"GENERATED_PRE_ASSIGNED_MEAL"},{"sequence":3,"clockingEvent":780,"toleranceBefore":780,"toleranceAfter":780,"mobilityBefore":0,"mobilityAfter":0,"intervalType":"RIGID","clockingEventScheduleType":"GENERATED","usingType":"GENERATED_PRE_ASSIGNED_MEAL"},{"sequence":4,"clockingEvent":1080,"toleranceBefore":1080,"toleranceAfter":1080,"mobilityBefore":0,"mobilityAfter":0,"clockingEventScheduleType":"MANDATORY","usingType":"MANDATORY_ENTRY_OR_EXIT"}],"clockingEvent":{"workStartEndOvertimeTolerance":0,"mealOvertimeTolerance":0,"overtimeDailyTotalTolerance":0,"absenceDailyTotalTolerance":0,"workStartEndAbsenceTolerance":0,"mealAbsenceTolerance":0}}],"workshifts":[{"id":"87db8a76-156c-4265-9989-39be06859135","code":1,"type":"PERMANENT","rotationWorkShift":true,"extensionNightHours":true,"dsrMinutes":440,"weekMinutes":2640,"monthMinutes":13200,"timeShiftType":"GENERAL","workshiftGroups":[{"code":1,"baseDate":"1998-12-28"},{"code":2,"baseDate":"2001-01-20"},{"code":8,"baseDate":"1901-01-07"}],"workshiftDetails":[{"holidayGroup":{"code":0},"holidayType":"BRANCH","startDate":"2022-10-01"}]},{"id":"0672b0da-0406-4fbf-a4ac-9c2631c2b5cd","code":9,"type":"PERMANENT","rotationWorkShift":false,"extensionNightHours":true,"dsrMinutes":440,"weekMinutes":2640,"monthMinutes":13200,"timeShiftType":"THIRDSHIFT","workshiftGroups":[{"code":1,"baseDate":"2001-01-01"},{"code":2,"baseDate":"2001-01-02"},{"code":3,"baseDate":"2001-01-03"},{"code":4,"baseDate":"2001-01-04"},{"code":5,"baseDate":"2001-01-05"},{"code":6,"baseDate":"2001-01-06"},{"code":7,"baseDate":"2001-01-07"},{"code":8,"baseDate":"2001-01-08"}],"workshiftDetails":[{"holidayGroup":{"code":2},"holidayType":"OWN","startDate":"2022-10-01"}]}],"companyBranches":[{"key":"1_1","code":1}],"syndicates":[{"key":"1","code":1,"nightStartHour":1320,"nightEndHour":300,"minimumInterval4to6Hours":0,"minimumInterval6Hours":0,"minimumWorkDuration6Hours":361}],"employmentRelationships":[{"id":"bda638aa-a392-4900-a388-58dd80b2d751","code":"10.10.10","contractType":"EMPLOYEE"},{"id":"9f051554-763f-4d7a-a688-2ce8922f83a8","code":"2.2.2","contractType":"APRENTICE"}]},"currentUser":{"userName":"admin@matiello.com.br"}}}';
|
|
8
|
+
let context = new Context({ body: inputRule });
|
|
9
|
+
|
|
10
|
+
const timeEvaluation = context.contracts[0].timeEvaluation[0];
|
|
11
|
+
|
|
12
|
+
expect(timeEvaluation.clockingEvents[0].clockingEventDate).toEqual(new Date("2025-06-25"));
|
|
13
|
+
expect(timeEvaluation.clockingEvents[0].clockingEventTime).toBe(0);
|
|
14
|
+
expect(timeEvaluation.clockingEvents[0].clockingEventDateTime).toEqual(new Date("2025-06-25T00:00:00Z"));
|
|
15
|
+
expect(timeEvaluation.clockingEvents[0].originType).toBe(ClockingEventOriginType.TYPED);
|
|
16
|
+
expect(timeEvaluation.clockingEvents[0].useType).toBe(ClockingUseType.CLOCKING);
|
|
17
|
+
expect(timeEvaluation.clockingEvents[0].functionCode).toBe(0);
|
|
18
|
+
|
|
19
|
+
expect(timeEvaluation.clockingEvents[1].clockingEventDate).toEqual(new Date("2025-06-25"));
|
|
20
|
+
expect(timeEvaluation.clockingEvents[1].clockingEventTime).toBe(180);
|
|
21
|
+
expect(timeEvaluation.clockingEvents[1].clockingEventDateTime).toEqual(new Date("2025-06-25T03:00:00Z"));
|
|
22
|
+
expect(timeEvaluation.clockingEvents[1].originType).toBe(ClockingEventOriginType.TYPED);
|
|
23
|
+
expect(timeEvaluation.clockingEvents[1].useType).toBe(ClockingUseType.CLOCKING);
|
|
24
|
+
expect(timeEvaluation.clockingEvents[1].functionCode).toBe(0);
|
|
25
|
+
|
|
26
|
+
expect(timeEvaluation.clockingEvents[2].clockingEventDate).toEqual(new Date("2025-06-25"));
|
|
27
|
+
expect(timeEvaluation.clockingEvents[2].clockingEventTime).toBe(480);
|
|
28
|
+
expect(timeEvaluation.clockingEvents[2].clockingEventDateTime).toEqual(new Date("2025-06-25T08:00:00Z"));
|
|
29
|
+
expect(timeEvaluation.clockingEvents[2].originType).toBe(ClockingEventOriginType.TYPED);
|
|
30
|
+
expect(timeEvaluation.clockingEvents[2].useType).toBe(ClockingUseType.PAID_BREAK);
|
|
31
|
+
expect(timeEvaluation.clockingEvents[2].functionCode).toBe(0);
|
|
32
|
+
|
|
33
|
+
expect(timeEvaluation.clockingEvents[3].clockingEventDate).toEqual(new Date("2025-06-25"));
|
|
34
|
+
expect(timeEvaluation.clockingEvents[3].clockingEventTime).toBe(720);
|
|
35
|
+
expect(timeEvaluation.clockingEvents[3].clockingEventDateTime).toEqual(new Date("2025-06-25T12:00:00Z"));
|
|
36
|
+
expect(timeEvaluation.clockingEvents[3].originType).toBe(ClockingEventOriginType.TYPED);
|
|
37
|
+
expect(timeEvaluation.clockingEvents[3].useType).toBe(ClockingUseType.WAITING);
|
|
38
|
+
expect(timeEvaluation.clockingEvents[3].functionCode).toBe(0);
|
|
39
|
+
|
|
40
|
+
expect(timeEvaluation.clockingEvents[4].clockingEventDate).toEqual(new Date("2025-06-25"));
|
|
41
|
+
expect(timeEvaluation.clockingEvents[4].clockingEventTime).toBe(915);
|
|
42
|
+
expect(timeEvaluation.clockingEvents[4].clockingEventDateTime).toEqual(new Date("2025-06-25T15:15:00Z"));
|
|
43
|
+
expect(timeEvaluation.clockingEvents[4].originType).toBe(ClockingEventOriginType.TYPED);
|
|
44
|
+
expect(timeEvaluation.clockingEvents[4].useType).toBe(ClockingUseType.REQUIRED_STOP);
|
|
45
|
+
expect(timeEvaluation.clockingEvents[4].functionCode).toBe(0);
|
|
46
|
+
|
|
47
|
+
expect(timeEvaluation.clockingEvents[5].clockingEventDate).toEqual(new Date("2025-06-25"));
|
|
48
|
+
expect(timeEvaluation.clockingEvents[5].clockingEventTime).toBe(955);
|
|
49
|
+
expect(timeEvaluation.clockingEvents[5].clockingEventDateTime).toEqual(new Date("2025-06-25T15:55:00Z"));
|
|
50
|
+
expect(timeEvaluation.clockingEvents[5].originType).toBe(ClockingEventOriginType.TYPED);
|
|
51
|
+
expect(timeEvaluation.clockingEvents[5].useType).toBe(ClockingUseType.DRIVING);
|
|
52
|
+
expect(timeEvaluation.clockingEvents[5].functionCode).toBe(0);
|
|
53
|
+
|
|
54
|
+
});
|
|
55
|
+
|
|
56
|
+
});
|