hvp-shared 6.53.0 → 6.54.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/dist/constants/employment.enums.d.ts +0 -1
- package/dist/constants/employment.enums.js +0 -7
- package/dist/contracts/employment/requests.d.ts +0 -2
- package/dist/contracts/employment/responses.d.ts +0 -1
- package/dist/types/coverage.types.d.ts +59 -0
- package/dist/types/coverage.types.js +26 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/index.js +1 -0
- package/package.json +1 -1
|
@@ -79,7 +79,6 @@ export interface EmploymentTypeDefaults {
|
|
|
79
79
|
hasImss: boolean;
|
|
80
80
|
payrollStampingMode: PayrollStampingMode;
|
|
81
81
|
scheduleType: ScheduleType;
|
|
82
|
-
maxWeeklyHours: number;
|
|
83
82
|
attendanceSource: AttendanceSource;
|
|
84
83
|
}
|
|
85
84
|
export declare const EMPLOYMENT_TYPE_DEFAULTS: Record<EmploymentType, EmploymentTypeDefaults>;
|
|
@@ -114,7 +114,6 @@ exports.EMPLOYMENT_TYPE_DEFAULTS = {
|
|
|
114
114
|
hasImss: true,
|
|
115
115
|
payrollStampingMode: PayrollStampingMode.ordinary,
|
|
116
116
|
scheduleType: ScheduleType.fixed,
|
|
117
|
-
maxWeeklyHours: 48,
|
|
118
117
|
attendanceSource: AttendanceSource.attendance_records,
|
|
119
118
|
},
|
|
120
119
|
[EmploymentType.payroll_draft]: {
|
|
@@ -123,7 +122,6 @@ exports.EMPLOYMENT_TYPE_DEFAULTS = {
|
|
|
123
122
|
hasImss: false,
|
|
124
123
|
payrollStampingMode: PayrollStampingMode.none,
|
|
125
124
|
scheduleType: ScheduleType.fixed,
|
|
126
|
-
maxWeeklyHours: 48,
|
|
127
125
|
attendanceSource: AttendanceSource.attendance_records,
|
|
128
126
|
},
|
|
129
127
|
[EmploymentType.intern]: {
|
|
@@ -132,7 +130,6 @@ exports.EMPLOYMENT_TYPE_DEFAULTS = {
|
|
|
132
130
|
hasImss: false,
|
|
133
131
|
payrollStampingMode: PayrollStampingMode.none,
|
|
134
132
|
scheduleType: ScheduleType.fixed,
|
|
135
|
-
maxWeeklyHours: 36,
|
|
136
133
|
attendanceSource: AttendanceSource.activity_register,
|
|
137
134
|
},
|
|
138
135
|
[EmploymentType.hourly_agreed]: {
|
|
@@ -141,7 +138,6 @@ exports.EMPLOYMENT_TYPE_DEFAULTS = {
|
|
|
141
138
|
hasImss: false,
|
|
142
139
|
payrollStampingMode: PayrollStampingMode.none,
|
|
143
140
|
scheduleType: ScheduleType.fixed,
|
|
144
|
-
maxWeeklyHours: 48,
|
|
145
141
|
attendanceSource: AttendanceSource.attendance_records,
|
|
146
142
|
},
|
|
147
143
|
[EmploymentType.casual]: {
|
|
@@ -150,7 +146,6 @@ exports.EMPLOYMENT_TYPE_DEFAULTS = {
|
|
|
150
146
|
hasImss: false,
|
|
151
147
|
payrollStampingMode: PayrollStampingMode.nominal,
|
|
152
148
|
scheduleType: ScheduleType.none,
|
|
153
|
-
maxWeeklyHours: 48,
|
|
154
149
|
attendanceSource: AttendanceSource.activity_register,
|
|
155
150
|
},
|
|
156
151
|
[EmploymentType.contractor]: {
|
|
@@ -159,7 +154,6 @@ exports.EMPLOYMENT_TYPE_DEFAULTS = {
|
|
|
159
154
|
hasImss: false,
|
|
160
155
|
payrollStampingMode: PayrollStampingMode.none,
|
|
161
156
|
scheduleType: ScheduleType.none,
|
|
162
|
-
maxWeeklyHours: 48,
|
|
163
157
|
attendanceSource: AttendanceSource.none,
|
|
164
158
|
},
|
|
165
159
|
[EmploymentType.coverage_only]: {
|
|
@@ -168,7 +162,6 @@ exports.EMPLOYMENT_TYPE_DEFAULTS = {
|
|
|
168
162
|
hasImss: false,
|
|
169
163
|
payrollStampingMode: PayrollStampingMode.nominal,
|
|
170
164
|
scheduleType: ScheduleType.none,
|
|
171
|
-
maxWeeklyHours: 48,
|
|
172
165
|
attendanceSource: AttendanceSource.none,
|
|
173
166
|
},
|
|
174
167
|
};
|
|
@@ -21,7 +21,6 @@ export interface CreateEmploymentRequest {
|
|
|
21
21
|
employmentStartDate: string;
|
|
22
22
|
employmentEndDate?: string;
|
|
23
23
|
weeklyHours?: number;
|
|
24
|
-
maxWeeklyHours?: number;
|
|
25
24
|
seniorityBonusPercentage?: number;
|
|
26
25
|
commissionBonusPercentage?: number;
|
|
27
26
|
additionalFixedIncomes?: Array<{
|
|
@@ -60,7 +59,6 @@ export interface UpdateEmploymentRequest {
|
|
|
60
59
|
employmentStartDate?: string;
|
|
61
60
|
employmentEndDate?: string;
|
|
62
61
|
weeklyHours?: number;
|
|
63
|
-
maxWeeklyHours?: number;
|
|
64
62
|
seniorityBonusPercentage?: number;
|
|
65
63
|
commissionBonusPercentage?: number;
|
|
66
64
|
additionalFixedIncomes?: Array<{
|
|
@@ -34,7 +34,6 @@ export interface EmploymentViewResponse extends PublicEmploymentResponse {
|
|
|
34
34
|
hasImss: boolean;
|
|
35
35
|
payrollStampingMode: PayrollStampingMode;
|
|
36
36
|
weeklyHours?: number;
|
|
37
|
-
maxWeeklyHours: number;
|
|
38
37
|
seniorityBonusPercentage?: number;
|
|
39
38
|
commissionBonusPercentage?: number;
|
|
40
39
|
createdAt?: string;
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Employment Coverage Types
|
|
3
|
+
*
|
|
4
|
+
* Types for employment coverage analysis — identifying gaps between
|
|
5
|
+
* employment records for each collaborator.
|
|
6
|
+
*
|
|
7
|
+
* @see GH#11 - Employment coverage visibility in collaborator views
|
|
8
|
+
*/
|
|
9
|
+
/**
|
|
10
|
+
* Overall coverage status for a collaborator's employment history.
|
|
11
|
+
*/
|
|
12
|
+
export declare enum CoverageStatus {
|
|
13
|
+
full = "full",
|
|
14
|
+
has_gaps = "has_gaps",
|
|
15
|
+
no_employments = "no_employments"
|
|
16
|
+
}
|
|
17
|
+
export declare const COVERAGE_STATUS_LABELS: Record<CoverageStatus, string>;
|
|
18
|
+
/**
|
|
19
|
+
* A single block in the coverage timeline — either an employment or a gap.
|
|
20
|
+
*
|
|
21
|
+
* Used in the detail view to render a chronological timeline.
|
|
22
|
+
*/
|
|
23
|
+
export interface CoveragePeriod {
|
|
24
|
+
/** Whether this period is an employment record or a gap between records */
|
|
25
|
+
type: "employment" | "gap";
|
|
26
|
+
/** Start date of the period (ISO 8601) */
|
|
27
|
+
startDate: string;
|
|
28
|
+
/** End date of the period (ISO 8601). Null if employment is ongoing. */
|
|
29
|
+
endDate: string | null;
|
|
30
|
+
/** Duration in calendar days. 0 if ongoing. */
|
|
31
|
+
durationDays: number;
|
|
32
|
+
/** Employment ID — only present for employment periods */
|
|
33
|
+
employmentId?: string;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Coverage summary for a single collaborator.
|
|
37
|
+
*
|
|
38
|
+
* Used in the collaborators table for the "Cobertura" column chip.
|
|
39
|
+
*
|
|
40
|
+
* @example GET /api/employments/coverage-summary
|
|
41
|
+
*/
|
|
42
|
+
export interface CollaboratorCoverageSummary {
|
|
43
|
+
collaboratorId: string;
|
|
44
|
+
status: CoverageStatus;
|
|
45
|
+
totalGapDays: number;
|
|
46
|
+
employmentCount: number;
|
|
47
|
+
isCurrentlyCovered: boolean;
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Detailed coverage info for a single collaborator, including the timeline.
|
|
51
|
+
*
|
|
52
|
+
* Used in the collaborator detail view for the EmploymentTimeline component.
|
|
53
|
+
*
|
|
54
|
+
* @example GET /api/employments/coverage/:collaboratorId
|
|
55
|
+
*/
|
|
56
|
+
export interface CollaboratorCoverageDetail extends CollaboratorCoverageSummary {
|
|
57
|
+
/** Chronological list of employment and gap periods */
|
|
58
|
+
periods: CoveragePeriod[];
|
|
59
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Employment Coverage Types
|
|
4
|
+
*
|
|
5
|
+
* Types for employment coverage analysis — identifying gaps between
|
|
6
|
+
* employment records for each collaborator.
|
|
7
|
+
*
|
|
8
|
+
* @see GH#11 - Employment coverage visibility in collaborator views
|
|
9
|
+
*/
|
|
10
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
11
|
+
exports.COVERAGE_STATUS_LABELS = exports.CoverageStatus = void 0;
|
|
12
|
+
// ─── Coverage Status Enum ───────────────────────────────────────────────────
|
|
13
|
+
/**
|
|
14
|
+
* Overall coverage status for a collaborator's employment history.
|
|
15
|
+
*/
|
|
16
|
+
var CoverageStatus;
|
|
17
|
+
(function (CoverageStatus) {
|
|
18
|
+
CoverageStatus["full"] = "full";
|
|
19
|
+
CoverageStatus["has_gaps"] = "has_gaps";
|
|
20
|
+
CoverageStatus["no_employments"] = "no_employments";
|
|
21
|
+
})(CoverageStatus || (exports.CoverageStatus = CoverageStatus = {}));
|
|
22
|
+
exports.COVERAGE_STATUS_LABELS = {
|
|
23
|
+
[CoverageStatus.full]: "Cubierto",
|
|
24
|
+
[CoverageStatus.has_gaps]: "Con huecos",
|
|
25
|
+
[CoverageStatus.no_employments]: "Sin empleos",
|
|
26
|
+
};
|
package/dist/types/index.d.ts
CHANGED
package/dist/types/index.js
CHANGED
|
@@ -28,3 +28,4 @@ __exportStar(require("./qvet.types"), exports);
|
|
|
28
28
|
__exportStar(require("./background-job.types"), exports);
|
|
29
29
|
__exportStar(require("./payroll-v2.types"), exports);
|
|
30
30
|
__exportStar(require("./cash-reconciliation.types"), exports);
|
|
31
|
+
__exportStar(require("./coverage.types"), exports);
|