hvp-shared 6.53.1 → 6.55.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.
|
@@ -0,0 +1,63 @@
|
|
|
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
|
+
/** Job ID — only present for employment periods */
|
|
35
|
+
jobId?: string;
|
|
36
|
+
/** Guaranteed income — only present for employment periods */
|
|
37
|
+
guaranteedIncome?: number;
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Coverage summary for a single collaborator.
|
|
41
|
+
*
|
|
42
|
+
* Used in the collaborators table for the "Cobertura" column chip.
|
|
43
|
+
*
|
|
44
|
+
* @example GET /api/employments/coverage-summary
|
|
45
|
+
*/
|
|
46
|
+
export interface CollaboratorCoverageSummary {
|
|
47
|
+
collaboratorId: string;
|
|
48
|
+
status: CoverageStatus;
|
|
49
|
+
totalGapDays: number;
|
|
50
|
+
employmentCount: number;
|
|
51
|
+
isCurrentlyCovered: boolean;
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* Detailed coverage info for a single collaborator, including the timeline.
|
|
55
|
+
*
|
|
56
|
+
* Used in the collaborator detail view for the EmploymentTimeline component.
|
|
57
|
+
*
|
|
58
|
+
* @example GET /api/employments/coverage/:collaboratorId
|
|
59
|
+
*/
|
|
60
|
+
export interface CollaboratorCoverageDetail extends CollaboratorCoverageSummary {
|
|
61
|
+
/** Chronological list of employment and gap periods */
|
|
62
|
+
periods: CoveragePeriod[];
|
|
63
|
+
}
|
|
@@ -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);
|